1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 04:10:04 +02:00

update packages to latest version

This commit is contained in:
s2
2022-08-20 18:51:33 +02:00
parent 09663a35a5
commit 806ebf9a57
4513 changed files with 366205 additions and 92512 deletions

213
node_modules/decimal.js/CHANGELOG.md generated vendored
View File

@@ -1,213 +0,0 @@
#### 10.2.1
* 28/09/2020
* Correct `sqrt` initial estimate.
#### 10.2.0
* 08/05/2019
* #128 Workaround V8 `Math.pow` change.
* #93 Accept `+` prefix when parsing string values.
* #129 Fix typo.
#### 10.1.1
* 27/02/2019
* Check `Symbol` properly.
#### 10.1.0
* 26/02/2019
* #122 Add custom `util.inspect()` function.
* Add `Symbol.toStringTag`.
* #121 Constructor: add range check for arguments of type number and Decimal.
* Remove premable from uglifyjs build script.
* Move *decimal.min.js.map* to root directory.
#### 10.0.2
* 13/12/2018
* #114 Remove soureMappingURL from *decimal.min.js*.
* Remove *bower.json*.
#### 10.0.1
* 24/05/2018
* Add `browser` field to *package.json*.
#### 10.0.0
* 10/03/2018
* #88 `toNearest` to return the nearest multiple in the direction of the rounding mode.
* #82 #91 `const` to `var`.
* Add trigonometric precision limit explanantion to documentation.
* Put global ts definitions in separate file (see *bignumber.js* #143).
#### 9.0.1
* 15/12/2017
* #80 Typings: correct return type.
#### 9.0.0
* 14/12/2017
* #78 Typings: remove `toFormat`.
#### 8.0.0
* 10/12/2017
* Correct typings: `toFraction` returns `Decimal[]`.
* Type-checking: add `Decimal.isDecimal` method.
* Enable configuration reset with `defaults: true`.
* Add named export, Decimal, to *decimal.mjs*.
#### 7.5.1
* 03/12/2017
* Remove typo.
#### 7.5.0
* 03/12/2017
* Use TypeScript declarations outside modules.
#### 7.4.0
* 25/11/2017
* Add TypeScript typings.
#### 7.3.0
* 26/09/2017
* Rename *decimal.es6.js* to *decimal.mjs*.
* Amend *.travis.yml*.
#### 7.2.4
* 09/09/2017
* Update docs regarding `global.crypto`.
* Fix `import` issues.
#### 7.2.3
* 27/06/2017
* Bugfix: #58 `pow` sometimes throws when result is `Infinity`.
#### 7.2.2
* 25/06/2017
* Bugfix: #57 Powers of -1 for integers over `Number.MAX_SAFE_INTEGER`.
#### 7.2.1
* 04/05/2017
* Fix *README* badges.
#### 7.2.0
* 09/04/2017
* Add *decimal.es6.js*
#### 7.1.2
* 05/04/2017
* `Decimal.default` to `Decimal['default']` IE8 issue
#### 7.1.1
* 10/01/2017
* Remove duplicated for-loop
* Minor refactoring
#### 7.1.0
* 09/11/2016
* Support ES6 imports.
#### 7.0.0
* 09/11/2016
* Remove `require('crypto')` - leave it to the user
* Default `Decimal.crypto` to `false`
* Add `Decimal.set` as `Decimal.config` alias
#### 6.0.0
* 30/06/2016
* Removed base-88 serialization format
* Amended `toJSON` and removed `Decimal.fromJSON` accordingly
#### 5.0.8
* 09/03/2016
* Add newline to single test results
* Correct year
#### 5.0.7
* 29/02/2016
* Add decimal.js-light link
* Remove outdated example from docs
#### 5.0.6
* 22/02/2016
* Add bower.json
#### 5.0.5
* 20/02/2016
* Bugfix: #26 wrong precision applied
#### 5.0.4
* 14/02/2016
* Bugfix: #26 clone
#### 5.0.3
* 06/02/2016
* Refactor tests
#### 5.0.2
* 05/02/2016
* Added immutability tests
* Minor *decimal.js* clean-up
#### 5.0.1
* 28/01/2016
* Bugfix: #20 cos mutates value
* Add pi info to docs
#### 5.0.0
* 25/01/2016
* Added trigonometric functions and `cubeRoot` method
* Added most of JavaScript's `Math` object methods as Decimal methods
* Added `toBinary`, `toHexadecimal` and `toOctal` methods
* Added `isPositive` method
* Removed the 15 significant digit limit for numbers
* `toFraction` now returns an array of two Decimals, not two strings
* String values containing whitespace or a plus sign are no longer accepted
* `valueOf` now returns `'-0'` for minus zero
* `comparedTo` now returns `NaN` not `null` for comparisons with `NaN`
* `Decimal.max` and `Decimal.min` no longer accept an array
* The Decimal constructor and `toString` no longer accept a base argument
* Binary, hexadecimal and octal prefixes are now recognised for string values
* Removed `Decimal.errors` configuration property
* Removed `toFormat` method
* Removed `Decimal.ONE`
* Renamed `exponential` method to `naturalExponential`
* Renamed `Decimal.constructor` method to `Decimal.clone`
* Simplified error handling and amended error messages
* Refactored the test suite
* `Decimal.crypto` is now `undefined` by default, and the `crypto` object will be used if available
* Major internal refactoring
* Removed *bower.json*
#### 4.0.2
* 20/02/2015 Add bower.json. Add source map. Amend travis CI. Amend doc/comments
#### 4.0.1
* 11/12/2014 Assign correct constructor when duplicating a Decimal
#### 4.0.0
* 10/11/2014 `toFormat` amended to use `Decimal.format` object for more flexible configuration
#### 3.0.1
* 8/06/2014 Surround crypto require in try catch. See issue #5
#### 3.0.0
* 4/06/2014 `random` simplified. Major internal changes mean the properties of a Decimal must now be considered read-only
#### 2.1.0
* 4/06/2014 Amend UMD
#### 2.0.3
* 8/05/2014 Fix NaN toNumber
#### 2.0.2
* 30/04/2014 Correct doc links
#### 2.0.1
* 10/04/2014 Update npmignore
#### 2.0.0
* 10/04/2014 Add `toSignificantDigits`
* Remove `toInteger`
* No arguments to `ceil`, `floor`, `round` and `trunc`
#### 1.0.1
* 07/04/2014 Minor documentation clean-up
#### 1.0.0
* 02/04/2014 Initial release

2
node_modules/decimal.js/LICENCE.md generated vendored
View File

@@ -1,6 +1,6 @@
The MIT Licence.
Copyright (c) 2020 Michael Mclaughlin
Copyright (c) 2022 Michael Mclaughlin
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

146
node_modules/decimal.js/README.md generated vendored
View File

@@ -18,7 +18,8 @@ An arbitrary-precision Decimal type for JavaScript.
- Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal
- No dependencies
- Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only
- Comprehensive [documentation](http://mikemcl.github.io/decimal.js/) and test set
- Comprehensive [documentation](https://mikemcl.github.io/decimal.js/) and test set
- Used under the hood by [math.js](https://github.com/josdejong/mathjs)
- Includes a TypeScript declaration file: *decimal.d.ts*
![API](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/API.png)
@@ -32,7 +33,8 @@ This library also adds the trigonometric functions, among others, and supports n
which makes it a significantly larger library than *bignumber.js* and the even smaller
[big.js](https://github.com/MikeMcl/big.js/).
For a lighter version of this library without the trigonometric functions see [decimal.js-light](https://github.com/MikeMcl/decimal.js-light/).
For a lighter version of this library without the trigonometric functions see
[decimal.js-light](https://github.com/MikeMcl/decimal.js-light/).
## Load
@@ -42,48 +44,32 @@ Browser:
```html
<script src='path/to/decimal.js'></script>
```
```html
<script type="module">
import Decimal from './path/to/decimal.mjs';
...
import Decimal from './path/to/decimal.mjs';
...
</script>
```
[Node.js](http://nodejs.org):
[Node.js](https://nodejs.org):
```bash
$ npm install decimal.js
npm install decimal.js
```
```js
var Decimal = require('decimal.js');
```
const Decimal = require('decimal.js');
ES module:
import Decimal from 'decimal.js';
```js
//import Decimal from 'decimal.js';
import {Decimal} from 'decimal.js';
```
AMD loader libraries such as [requireJS](http://requirejs.org/):
```js
require(['decimal'], function(Decimal) {
// Use Decimal here in local scope. No global Decimal.
});
```
## Use
*In all examples below, `var`, semicolons and `toString` calls are not shown.
*In all examples below, semicolons and `toString` calls are not shown.
If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*
The library exports a single function object, `Decimal`, the constructor of Decimal instances.
It accepts a value of type number, string or Decimal.
The library exports a single constructor function, `Decimal`, which expects a single argument that is a number, string or Decimal instance.
```js
x = new Decimal(123.4567)
@@ -92,7 +78,29 @@ z = new Decimal(x)
x.equals(y) && y.equals(z) && x.equals(z) // true
```
A value can also be in binary, hexadecimal or octal if the appropriate prefix is included.
If using values with more than a few digits, it is recommended to pass strings rather than numbers to avoid a potential loss of precision.
```js
// Precision loss from using numeric literals with more than 15 significant digits.
new Decimal(1.0000000000000001) // '1'
new Decimal(88259496234518.57) // '88259496234518.56'
new Decimal(99999999999999999999) // '100000000000000000000'
// Precision loss from using numeric literals outside the range of Number values.
new Decimal(2e+308) // 'Infinity'
new Decimal(1e-324) // '0'
// Precision loss from the unexpected result of arithmetic with Number values.
new Decimal(0.7 + 0.1) // '0.7999999999999999'
```
As with JavaScript numbers, strings can contain underscores as separators to improve readability.
```js
x = new Decimal('2_147_483_647')
```
String values in binary, hexadecimal or octal notation are also accepted if the appropriate prefix is included.
```js
x = new Decimal('0xff.f') // '255.9375'
@@ -101,15 +109,13 @@ z = x.plus(y) // '427.9375'
z.toBinary() // '0b110101011.1111'
z.toBinary(13) // '0b1.101010111111p+8'
```
Using binary exponential notation to create a Decimal with the value of `Number.MAX_VALUE`:
```js
// Using binary exponential notation to create a Decimal with the value of `Number.MAX_VALUE`.
x = new Decimal('0b1.1111111111111111111111111111111111111111111111111111p+1023')
// '1.7976931348623157081e+308'
```
A Decimal is immutable in the sense that it is not changed by its methods.
Decimal instances are immutable in the sense that they are not changed by their methods.
```js
0.3 - 0.1 // 0.19999999999999998
@@ -128,27 +134,28 @@ x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.11177
Many method names have a shorter alias.
```js
x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true
x.cmp(y.mod(z).neg()) == 1 && x.comparedTo(y.modulo(z).negated()) == 1 // true
x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3)) // true
x.comparedTo(y.modulo(z).negated() === x.cmp(y.mod(z).neg()) // true
```
Like JavaScript's Number type, there are `toExponential`, `toFixed` and `toPrecision` methods,
Most of the methods of JavaScript's `Number.prototype` and `Math` objects are replicated.
```js
x = new Decimal(255.5)
x.toExponential(5) // '2.55500e+2'
x.toFixed(5) // '255.50000'
x.toPrecision(5) // '255.50'
```
x.toExponential(5) // '2.55500e+2'
x.toFixed(5) // '255.50000'
x.toPrecision(5) // '255.50'
and almost all of the methods of JavaScript's Math object are also replicated.
```js
Decimal.sqrt('6.98372465832e+9823') // '8.3568682281821340204e+4911'
Decimal.pow(2, 0.0979843) // '1.0702770511687781839'
// Using `toFixed()` to avoid exponential notation:
x = new Decimal('0.0000001')
x.toString() // '1e-7'
x.toFixed() // '0.0000001'
```
There are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values,
And there are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values.
```js
x = new Decimal(NaN) // 'NaN'
@@ -156,7 +163,7 @@ y = new Decimal(Infinity) // 'Infinity'
x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite() // true
```
and a `toFraction` method with an optional *maximum denominator* argument
There is also a `toFraction` method with an optional *maximum denominator* argument.
```js
z = new Decimal(355)
@@ -165,27 +172,27 @@ pi.toFraction() // [ '7853982301', '2500000000' ]
pi.toFraction(1000) // [ '355', '113' ]
```
All calculations are rounded according to the number of significant digits and rounding mode
specified by the `precision` and `rounding` properties of the Decimal constructor.
All calculations are rounded according to the number of significant digits and rounding mode specified
by the `precision` and `rounding` properties of the Decimal constructor.
For advanced usage, multiple Decimal constructors can be created, each with their own independent configuration which
applies to all Decimal numbers created from it.
For advanced usage, multiple Decimal constructors can be created, each with their own independent
configuration which applies to all Decimal numbers created from it.
```js
// Set the precision and rounding of the default Decimal constructor
Decimal.set({ precision: 5, rounding: 4 })
// Create another Decimal constructor, optionally passing in a configuration object
Decimal9 = Decimal.clone({ precision: 9, rounding: 1 })
Dec = Decimal.clone({ precision: 9, rounding: 1 })
x = new Decimal(5)
y = new Decimal9(5)
y = new Dec(5)
x.div(3) // '1.6667'
y.div(3) // '1.66666666'
```
The value of a Decimal is stored in a floating point format in terms of its digits, exponent and sign.
The value of a Decimal is stored in a floating point format in terms of its digits, exponent and sign, but these properties should be considered read-only.
```js
x = new Decimal(-12345.67);
@@ -198,47 +205,42 @@ For further information see the [API](http://mikemcl.github.io/decimal.js/) refe
## Test
The library can be tested using Node.js or a browser.
The *test* directory contains the file *test.js* which runs all the tests when executed by Node,
and the file *test.html* which runs all the tests when opened in a browser.
To run all the tests, from a command-line at the root directory using npm
To run the tests using Node.js from the root directory:
```bash
$ npm test
npm test
```
or at the *test* directory using Node
Each separate test module can also be executed individually, for example:
```bash
$ node test
node test/modules/toFraction
```
Each separate test module can also be executed individually, for example, at the *test/modules* directory
To run the tests in a browser, open *test/test.html*.
```bash
$ node toFraction
```
## Minify
## Build
Two minification examples:
For Node, if [uglify-js](https://github.com/mishoo/UglifyJS2) is installed
Using [uglify-js](https://github.com/mishoo/UglifyJS) to minify the *decimal.js* file:
```bash
npm install uglify-js -g
uglifyjs decimal.js --source-map url=decimal.min.js.map -c -m -o decimal.min.js
```
then
Using [terser](https://github.com/terser/terser) to minify the ES module version, *decimal.mjs*:
```bash
npm run build
npm install terser -g
terser decimal.mjs --source-map url=decimal.min.mjs.map -c -m --toplevel -o decimal.min.mjs
```
will create *decimal.min.js*, and a source map will also be added to the *doc* directory.
```js
import Decimal from './decimal.min.mjs';
```
## Licence
MIT.
See *LICENCE.md*
[The MIT Licence (Expat).](LICENCE.md)

View File

@@ -56,7 +56,7 @@ export declare class Decimal {
readonly d: number[];
readonly e: number;
readonly s: number;
private readonly name: string;
private readonly toStringTag: string;
constructor(n: Decimal.Value);
@@ -64,6 +64,9 @@ export declare class Decimal {
abs(): Decimal;
ceil(): Decimal;
clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
comparedTo(n: Decimal.Value): number;
cmp(n: Decimal.Value): number;
@@ -239,6 +242,7 @@ export declare class Decimal {
static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
static cbrt(n: Decimal.Value): Decimal;
static ceil(n: Decimal.Value): Decimal;
static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
static clone(object?: Decimal.Config): Decimal.Constructor;
static config(object: Decimal.Config): Decimal.Constructor;
static cos(n: Decimal.Value): Decimal;
@@ -247,7 +251,7 @@ export declare class Decimal {
static exp(n: Decimal.Value): Decimal;
static floor(n: Decimal.Value): Decimal;
static hypot(...n: Decimal.Value[]): Decimal;
static isDecimal(object: any): boolean
static isDecimal(object: any): object is Decimal;
static ln(n: Decimal.Value): Decimal;
static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
static log2(n: Decimal.Value): Decimal;
@@ -266,6 +270,7 @@ export declare class Decimal {
static sinh(n: Decimal.Value): Decimal;
static sqrt(n: Decimal.Value): Decimal;
static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
static sum(...n: Decimal.Value[]): Decimal;
static tan(n: Decimal.Value): Decimal;
static tanh(n: Decimal.Value): Decimal;
static trunc(n: Decimal.Value): Decimal;

View File

@@ -1,316 +0,0 @@
// Type definitions for decimal.js >=7.0.0
// Project: https://github.com/MikeMcl/decimal.js
// Definitions by: Michael Mclaughlin <https://github.com/MikeMcl>
// Definitions: https://github.com/MikeMcl/decimal.js
//
// Documentation: http://mikemcl.github.io/decimal.js/
//
// Exports (available globally or when using import):
//
// class Decimal (default export)
// type Decimal.Constructor
// type Decimal.Instance
// type Decimal.Modulo
// type Decimal.Rounding
// type Decimal.Value
// interface Decimal.Config
//
// Example (alternative syntax commented-out):
//
// import {Decimal} from "decimal.js"
// //import Decimal from "decimal.js"
//
// let r: Decimal.Rounding = Decimal.ROUND_UP;
// let c: Decimal.Configuration = {precision: 4, rounding: r};
// Decimal.set(c);
// let v: Decimal.Value = '12345.6789';
// let d: Decimal = new Decimal(v);
// //let d: Decimal.Instance = new Decimal(v);
//
// The use of compiler option `--strictNullChecks` is recommended.
export default Decimal;
export namespace Decimal {
export type Config = DecimalConfig;
export type Constructor = DecimalConstructor;
export type Instance = DecimalInstance;
export type Modulo = DecimalModulo;
export type Rounding = DecimalRounding;
export type Value = DecimalValue;
}
declare global {
const Decimal: DecimalConstructor;
type Decimal = DecimalInstance;
namespace Decimal {
type Config = DecimalConfig;
type Constructor = DecimalConstructor;
type Instance = DecimalInstance;
type Modulo = DecimalModulo;
type Rounding = DecimalRounding;
type Value = DecimalValue;
}
}
type DecimalInstance = Decimal;
type DecimalConstructor = typeof Decimal;
type DecimalValue = string | number | Decimal;
type DecimalRounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
type DecimalModulo = DecimalRounding | 9;
// http://mikemcl.github.io/decimal.js/#constructor-properties
interface DecimalConfig {
precision?: number;
rounding?: DecimalRounding;
toExpNeg?: number;
toExpPos?: number;
minE?: number;
maxE?: number;
crypto?: boolean;
modulo?: DecimalModulo;
defaults?: boolean;
}
export declare class Decimal {
readonly d: number[];
readonly e: number;
readonly s: number;
private readonly name: string;
constructor(n: DecimalValue);
absoluteValue(): Decimal;
abs(): Decimal;
ceil(): Decimal;
comparedTo(n: DecimalValue): number;
cmp(n: DecimalValue): number;
cosine(): Decimal;
cos(): Decimal;
cubeRoot(): Decimal;
cbrt(): Decimal;
decimalPlaces(): number;
dp(): number;
dividedBy(n: DecimalValue): Decimal;
div(n: DecimalValue): Decimal;
dividedToIntegerBy(n: DecimalValue): Decimal;
divToInt(n: DecimalValue): Decimal;
equals(n: DecimalValue): boolean;
eq(n: DecimalValue): boolean;
floor(): Decimal;
greaterThan(n: DecimalValue): boolean;
gt(n: DecimalValue): boolean;
greaterThanOrEqualTo(n: DecimalValue): boolean;
gte(n: DecimalValue): boolean;
hyperbolicCosine(): Decimal;
cosh(): Decimal;
hyperbolicSine(): Decimal;
sinh(): Decimal;
hyperbolicTangent(): Decimal;
tanh(): Decimal;
inverseCosine(): Decimal;
acos(): Decimal;
inverseHyperbolicCosine(): Decimal;
acosh(): Decimal;
inverseHyperbolicSine(): Decimal;
asinh(): Decimal;
inverseHyperbolicTangent(): Decimal;
atanh(): Decimal;
inverseSine(): Decimal;
asin(): Decimal;
inverseTangent(): Decimal;
atan(): Decimal;
isFinite(): boolean;
isInteger(): boolean;
isInt(): boolean;
isNaN(): boolean;
isNegative(): boolean;
isNeg(): boolean;
isPositive(): boolean;
isPos(): boolean;
isZero(): boolean;
lessThan(n: DecimalValue): boolean;
lt(n: DecimalValue): boolean;
lessThanOrEqualTo(n: DecimalValue): boolean;
lte(n: DecimalValue): boolean;
logarithm(n?: DecimalValue): Decimal;
log(n?: DecimalValue): Decimal;
minus(n: DecimalValue): Decimal;
sub(n: DecimalValue): Decimal;
modulo(n: DecimalValue): Decimal;
mod(n: DecimalValue): Decimal;
naturalExponential(): Decimal;
exp(): Decimal;
naturalLogarithm(): Decimal;
ln(): Decimal;
negated(): Decimal;
neg(): Decimal;
plus(n: DecimalValue): Decimal;
add(n: DecimalValue): Decimal;
precision(includeZeros?: boolean): number;
sd(includeZeros?: boolean): number;
round(): Decimal;
sine() : Decimal;
sin() : Decimal;
squareRoot(): Decimal;
sqrt(): Decimal;
tangent() : Decimal;
tan() : Decimal;
times(n: DecimalValue): Decimal;
mul(n: DecimalValue) : Decimal;
toBinary(significantDigits?: number): string;
toBinary(significantDigits: number, rounding: DecimalRounding): string;
toDecimalPlaces(decimalPlaces?: number): Decimal;
toDecimalPlaces(decimalPlaces: number, rounding: DecimalRounding): Decimal;
toDP(decimalPlaces?: number): Decimal;
toDP(decimalPlaces: number, rounding: DecimalRounding): Decimal;
toExponential(decimalPlaces?: number): string;
toExponential(decimalPlaces: number, rounding: DecimalRounding): string;
toFixed(decimalPlaces?: number): string;
toFixed(decimalPlaces: number, rounding: DecimalRounding): string;
toFraction(max_denominator?: DecimalValue): Decimal[];
toHexadecimal(significantDigits?: number): string;
toHexadecimal(significantDigits: number, rounding: DecimalRounding): string;
toHex(significantDigits?: number): string;
toHex(significantDigits: number, rounding?: DecimalRounding): string;
toJSON(): string;
toNearest(n: DecimalValue, rounding?: DecimalRounding): Decimal;
toNumber(): number;
toOctal(significantDigits?: number): string;
toOctal(significantDigits: number, rounding: DecimalRounding): string;
toPower(n: DecimalValue): Decimal;
pow(n: DecimalValue): Decimal;
toPrecision(significantDigits?: number): string;
toPrecision(significantDigits: number, rounding: DecimalRounding): string;
toSignificantDigits(significantDigits?: number): Decimal;
toSignificantDigits(significantDigits: number, rounding: DecimalRounding): Decimal;
toSD(significantDigits?: number): Decimal;
toSD(significantDigits: number, rounding: DecimalRounding): Decimal;
toString(): string;
truncated(): Decimal;
trunc(): Decimal;
valueOf(): string;
static abs(n: DecimalValue): Decimal;
static acos(n: DecimalValue): Decimal;
static acosh(n: DecimalValue): Decimal;
static add(x: DecimalValue, y: DecimalValue): Decimal;
static asin(n: DecimalValue): Decimal;
static asinh(n: DecimalValue): Decimal;
static atan(n: DecimalValue): Decimal;
static atanh(n: DecimalValue): Decimal;
static atan2(y: DecimalValue, x: DecimalValue): Decimal;
static cbrt(n: DecimalValue): Decimal;
static ceil(n: DecimalValue): Decimal;
static clone(object?: DecimalConfig): DecimalConstructor;
static config(object: DecimalConfig): DecimalConstructor;
static cos(n: DecimalValue): Decimal;
static cosh(n: DecimalValue): Decimal;
static div(x: DecimalValue, y: DecimalValue): Decimal;
static exp(n: DecimalValue): Decimal;
static floor(n: DecimalValue): Decimal;
static hypot(...n: DecimalValue[]): Decimal;
static isDecimal(object: any): boolean
static ln(n: DecimalValue): Decimal;
static log(n: DecimalValue, base?: DecimalValue): Decimal;
static log2(n: DecimalValue): Decimal;
static log10(n: DecimalValue): Decimal;
static max(...n: DecimalValue[]): Decimal;
static min(...n: DecimalValue[]): Decimal;
static mod(x: DecimalValue, y: DecimalValue): Decimal;
static mul(x: DecimalValue, y: DecimalValue): Decimal;
static noConflict(): DecimalConstructor; // Browser only
static pow(base: DecimalValue, exponent: DecimalValue): Decimal;
static random(significantDigits?: number): Decimal;
static round(n: DecimalValue): Decimal;
static set(object: DecimalConfig): DecimalConstructor;
static sign(n: DecimalValue): Decimal;
static sin(n: DecimalValue): Decimal;
static sinh(n: DecimalValue): Decimal;
static sqrt(n: DecimalValue): Decimal;
static sub(x: DecimalValue, y: DecimalValue): Decimal;
static tan(n: DecimalValue): Decimal;
static tanh(n: DecimalValue): Decimal;
static trunc(n: DecimalValue): Decimal;
static readonly default?: DecimalConstructor;
static readonly Decimal?: DecimalConstructor;
static readonly precision: number;
static readonly rounding: DecimalRounding;
static readonly toExpNeg: number;
static readonly toExpPos: number;
static readonly minE: number;
static readonly maxE: number;
static readonly crypto: boolean;
static readonly modulo: DecimalModulo;
static readonly ROUND_UP: 0;
static readonly ROUND_DOWN: 1;
static readonly ROUND_CEIL: 2;
static readonly ROUND_FLOOR: 3;
static readonly ROUND_HALF_UP: 4;
static readonly ROUND_HALF_DOWN: 5;
static readonly ROUND_HALF_EVEN: 6;
static readonly ROUND_HALF_CEIL: 7;
static readonly ROUND_HALF_FLOOR: 8;
static readonly EUCLID: 9;
}

105
node_modules/decimal.js/decimal.js generated vendored
View File

@@ -2,11 +2,11 @@
'use strict';
/*
* decimal.js v10.2.1
/*!
* decimal.js v10.4.0
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2020 Michael Mclaughlin <M8ch88l@gmail.com>
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licence
*/
@@ -105,6 +105,7 @@
invalidArgument = decimalError + 'Invalid argument: ',
precisionLimitExceeded = decimalError + 'Precision limit exceeded',
cryptoUnavailable = decimalError + 'crypto unavailable',
tag = '[object Decimal]',
mathfloor = Math.floor,
mathpow = Math.pow,
@@ -122,7 +123,7 @@
PI_PRECISION = PI.length - 1,
// Decimal.prototype object
P = { name: '[object Decimal]' };
P = { toStringTag: tag };
// Decimal prototype methods
@@ -131,6 +132,7 @@
/*
* absoluteValue abs
* ceil
* clampedTo clamp
* comparedTo cmp
* cosine cos
* cubeRoot cbrt
@@ -212,6 +214,27 @@
};
/*
* Return a new Decimal whose value is the value of this Decimal clamped to the range
* delineated by `min` and `max`.
*
* min {number|string|Decimal}
* max {number|string|Decimal}
*
*/
P.clampedTo = P.clamp = function (min, max) {
var k,
x = this,
Ctor = x.constructor;
min = new Ctor(min);
max = new Ctor(max);
if (!min.s || !max.s) return new Ctor(NaN);
if (min.gt(max)) throw Error(invalidArgument + max);
k = x.cmp(min);
return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);
};
/*
* Return
* 1 if the value of this Decimal is greater than the value of `y`,
@@ -2445,18 +2468,6 @@
};
/*
// Add aliases to match BigDecimal method names.
// P.add = P.plus;
P.subtract = P.minus;
P.multiply = P.times;
P.divide = P.div;
P.remainder = P.mod;
P.compareTo = P.cmp;
P.negate = P.neg;
*/
// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.
@@ -2628,13 +2639,15 @@
*
*/
function cosine(Ctor, x) {
var k, y,
len = x.d.length;
var k, len, y;
if (x.isZero()) return x;
// Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1
// i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1
// Estimate the optimum number of times to use the argument reduction.
len = x.d.length;
if (len < 32) {
k = Math.ceil(len / 3);
y = (1 / tinyPow(4, k)).toString();
@@ -3586,7 +3599,10 @@
function parseOther(x, str) {
var base, Ctor, divisor, i, isFloat, len, p, xd, xe;
if (str === 'Infinity' || str === 'NaN') {
if (str.indexOf('_') > -1) {
str = str.replace(/(\d)_(?=\d)/g, '$1');
if (isDecimal.test(str)) return parseDecimal(x, str);
} else if (str === 'Infinity' || str === 'NaN') {
if (!+str) x.s = NaN;
x.e = NaN;
x.d = null;
@@ -3664,7 +3680,9 @@
var k,
len = x.d.length;
if (len < 3) return taylorSeries(Ctor, 2, x, x);
if (len < 3) {
return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);
}
// Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)
// i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)
@@ -3930,6 +3948,7 @@
* atan2
* cbrt
* ceil
* clamp
* clone
* config
* cos
@@ -3955,6 +3974,7 @@
* sinh
* sqrt
* sub
* sum
* tan
* tanh
* trunc
@@ -4148,6 +4168,19 @@
}
/*
* Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.
*
* x {number|string|Decimal}
* min {number|string|Decimal}
* max {number|string|Decimal}
*
*/
function clamp(x, min, max) {
return new this(x).clamp(min, max);
}
/*
* Configure global settings for a Decimal constructor.
*
@@ -4261,7 +4294,7 @@
x.constructor = Decimal;
// Duplicate.
if (v instanceof Decimal) {
if (isDecimalInstance(v)) {
x.s = v.s;
if (external) {
@@ -4381,6 +4414,7 @@
Decimal.atan2 = atan2;
Decimal.cbrt = cbrt; // ES6
Decimal.ceil = ceil;
Decimal.clamp = clamp;
Decimal.cos = cos;
Decimal.cosh = cosh; // ES6
Decimal.div = div;
@@ -4403,6 +4437,7 @@
Decimal.sinh = sinh; // ES6
Decimal.sqrt = sqrt;
Decimal.sub = sub;
Decimal.sum = sum;
Decimal.tan = tan;
Decimal.tanh = tanh; // ES6
Decimal.trunc = trunc; // ES6
@@ -4497,7 +4532,7 @@
*
*/
function isDecimalInstance(obj) {
return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false;
return obj instanceof Decimal || obj && obj.toStringTag === tag || false;
}
@@ -4797,6 +4832,28 @@
}
/*
* Return a new Decimal whose value is the sum of the arguments, rounded to `precision`
* significant digits using rounding mode `rounding`.
*
* Only the result is rounded, not the intermediate calculations.
*
* arguments {number|string|Decimal}
*
*/
function sum() {
var i = 0,
args = arguments,
x = new this(args[i]);
external = false;
for (; x.s && ++i < args.length;) x = x.plus(args[i]);
external = true;
return finalise(x, this.precision, this.rounding);
}
/*
* Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant
* digits using rounding mode `rounding`.
@@ -4834,7 +4891,7 @@
// Create and configure initial Decimal constructor.
Decimal = clone(DEFAULTS);
Decimal.prototype.constructor = Decimal;
Decimal['default'] = Decimal.Decimal = Decimal;
// Create the internal constants from their string values.
@@ -4854,7 +4911,7 @@
// Node and other environments that support module.exports.
} else if (typeof module != 'undefined' && module.exports) {
if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {
P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol['for']('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

103
node_modules/decimal.js/decimal.mjs generated vendored
View File

@@ -1,8 +1,8 @@
/*
* decimal.js v10.2.1
/*!
* decimal.js v10.4.0
* An arbitrary-precision Decimal type for JavaScript.
* https://github.com/MikeMcl/decimal.js
* Copyright (c) 2020 Michael Mclaughlin <M8ch88l@gmail.com>
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
* MIT Licence
*/
@@ -101,6 +101,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
invalidArgument = decimalError + 'Invalid argument: ',
precisionLimitExceeded = decimalError + 'Precision limit exceeded',
cryptoUnavailable = decimalError + 'crypto unavailable',
tag = '[object Decimal]',
mathfloor = Math.floor,
mathpow = Math.pow,
@@ -118,7 +119,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
PI_PRECISION = PI.length - 1,
// Decimal.prototype object
P = { name: '[object Decimal]' };
P = { toStringTag: tag };
// Decimal prototype methods
@@ -127,6 +128,7 @@ var EXP_LIMIT = 9e15, // 0 to 9e15
/*
* absoluteValue abs
* ceil
* clampedTo clamp
* comparedTo cmp
* cosine cos
* cubeRoot cbrt
@@ -208,6 +210,27 @@ P.ceil = function () {
};
/*
* Return a new Decimal whose value is the value of this Decimal clamped to the range
* delineated by `min` and `max`.
*
* min {number|string|Decimal}
* max {number|string|Decimal}
*
*/
P.clampedTo = P.clamp = function (min, max) {
var k,
x = this,
Ctor = x.constructor;
min = new Ctor(min);
max = new Ctor(max);
if (!min.s || !max.s) return new Ctor(NaN);
if (min.gt(max)) throw Error(invalidArgument + max);
k = x.cmp(min);
return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);
};
/*
* Return
* 1 if the value of this Decimal is greater than the value of `y`,
@@ -2441,18 +2464,6 @@ P.valueOf = P.toJSON = function () {
};
/*
// Add aliases to match BigDecimal method names.
// P.add = P.plus;
P.subtract = P.minus;
P.multiply = P.times;
P.divide = P.div;
P.remainder = P.mod;
P.compareTo = P.cmp;
P.negate = P.neg;
*/
// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.
@@ -2624,13 +2635,15 @@ function convertBase(str, baseIn, baseOut) {
*
*/
function cosine(Ctor, x) {
var k, y,
len = x.d.length;
var k, len, y;
if (x.isZero()) return x;
// Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1
// i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1
// Estimate the optimum number of times to use the argument reduction.
len = x.d.length;
if (len < 32) {
k = Math.ceil(len / 3);
y = (1 / tinyPow(4, k)).toString();
@@ -3582,7 +3595,10 @@ function parseDecimal(x, str) {
function parseOther(x, str) {
var base, Ctor, divisor, i, isFloat, len, p, xd, xe;
if (str === 'Infinity' || str === 'NaN') {
if (str.indexOf('_') > -1) {
str = str.replace(/(\d)_(?=\d)/g, '$1');
if (isDecimal.test(str)) return parseDecimal(x, str);
} else if (str === 'Infinity' || str === 'NaN') {
if (!+str) x.s = NaN;
x.e = NaN;
x.d = null;
@@ -3660,7 +3676,9 @@ function sine(Ctor, x) {
var k,
len = x.d.length;
if (len < 3) return taylorSeries(Ctor, 2, x, x);
if (len < 3) {
return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);
}
// Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)
// i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)
@@ -3926,6 +3944,7 @@ function truncate(arr, len) {
* atan2
* cbrt
* ceil
* clamp
* clone
* config
* cos
@@ -3951,6 +3970,7 @@ function truncate(arr, len) {
* sinh
* sqrt
* sub
* sum
* tan
* tanh
* trunc
@@ -4144,6 +4164,19 @@ function ceil(x) {
}
/*
* Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.
*
* x {number|string|Decimal}
* min {number|string|Decimal}
* max {number|string|Decimal}
*
*/
function clamp(x, min, max) {
return new this(x).clamp(min, max);
}
/*
* Configure global settings for a Decimal constructor.
*
@@ -4257,7 +4290,7 @@ function clone(obj) {
x.constructor = Decimal;
// Duplicate.
if (v instanceof Decimal) {
if (isDecimalInstance(v)) {
x.s = v.s;
if (external) {
@@ -4377,6 +4410,7 @@ function clone(obj) {
Decimal.atan2 = atan2;
Decimal.cbrt = cbrt; // ES6
Decimal.ceil = ceil;
Decimal.clamp = clamp;
Decimal.cos = cos;
Decimal.cosh = cosh; // ES6
Decimal.div = div;
@@ -4399,6 +4433,7 @@ function clone(obj) {
Decimal.sinh = sinh; // ES6
Decimal.sqrt = sqrt;
Decimal.sub = sub;
Decimal.sum = sum;
Decimal.tan = tan;
Decimal.tanh = tanh; // ES6
Decimal.trunc = trunc; // ES6
@@ -4493,7 +4528,7 @@ function hypot() {
*
*/
function isDecimalInstance(obj) {
return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false;
return obj instanceof Decimal || obj && obj.toStringTag === tag || false;
}
@@ -4793,6 +4828,28 @@ function sub(x, y) {
}
/*
* Return a new Decimal whose value is the sum of the arguments, rounded to `precision`
* significant digits using rounding mode `rounding`.
*
* Only the result is rounded, not the intermediate calculations.
*
* arguments {number|string|Decimal}
*
*/
function sum() {
var i = 0,
args = arguments,
x = new this(args[i]);
external = false;
for (; x.s && ++i < args.length;) x = x.plus(args[i]);
external = true;
return finalise(x, this.precision, this.rounding);
}
/*
* Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant
* digits using rounding mode `rounding`.
@@ -4832,7 +4889,7 @@ P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
P[Symbol.toStringTag] = 'Decimal';
// Create and configure initial Decimal constructor.
export var Decimal = clone(DEFAULTS);
export var Decimal = P.constructor = clone(DEFAULTS);
// Create the internal constants from their string values.
LN10 = new Decimal(LN10);

2686
node_modules/decimal.js/doc/API.html generated vendored

File diff suppressed because it is too large Load Diff

26
node_modules/decimal.js/package.json generated vendored
View File

@@ -1,8 +1,8 @@
{
"_from": "decimal.js@^10.2.1",
"_id": "decimal.js@10.2.1",
"_id": "decimal.js@10.4.0",
"_inBundle": false,
"_integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==",
"_integrity": "sha512-Nv6ENEzyPQ6AItkGwLE2PGKinZZ9g59vSh2BeH6NqPu0OTKZ5ruJsVqh/orbAnqXc9pBbgXAIrc2EyaCj8NpGg==",
"_location": "/decimal.js",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/jsdom"
],
"_resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz",
"_shasum": "238ae7b0f0c793d3e3cea410108b35a2c01426a3",
"_resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.0.tgz",
"_shasum": "97a7448873b01e92e5ff9117d89a7bca8e63e0fe",
"_spec": "decimal.js@^10.2.1",
"_where": "D:\\Projects\\minifyfromhtml\\node_modules\\jsdom",
"author": {
@@ -33,6 +33,21 @@
"bundleDependencies": false,
"deprecated": false,
"description": "An arbitrary-precision Decimal type for JavaScript.",
"exports": {
".": {
"types": "./decimal.d.ts",
"import": "./decimal.mjs",
"require": "./decimal.js"
},
"./decimal.mjs": "./decimal.mjs",
"./decimal.js": "./decimal.js",
"./package.json": "./package.json"
},
"files": [
"decimal.js",
"decimal.mjs",
"decimal.d.ts"
],
"homepage": "https://github.com/MikeMcl/decimal.js#readme",
"keywords": [
"arbitrary",
@@ -57,9 +72,8 @@
"url": "git+https://github.com/MikeMcl/decimal.js.git"
},
"scripts": {
"build": "uglifyjs decimal.js --source-map url=decimal.min.js.map -c -m -o decimal.min.js",
"test": "node ./test/test.js"
},
"types": "decimal.d.ts",
"version": "10.2.1"
"version": "10.4.0"
}