@kitware/vtk.js 20.1.4 → 20.2.3
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/Common/Core/Base64.d.ts +14 -2
- package/Common/Core/Base64.js +31 -2
- package/Common/Core/Math/index.js +1 -1
- package/Common/Core/Math.d.ts +168 -158
- package/Common/Core/Math.js +1 -1
- package/Common/Core/MatrixBuilder.js +39 -41
- package/Common/DataModel/Box.d.ts +73 -0
- package/Common/DataModel/ImageData.js +12 -14
- package/Common/Transform/LandmarkTransform.js +6 -7
- package/Filters/General/PaintFilter/PaintFilter.worker.js +8 -8
- package/Filters/General/PaintFilter.js +11 -11
- package/Filters/Sources/CubeSource.d.ts +7 -6
- package/Filters/Sources/PlaneSource.js +12 -13
- package/IO/Core/BinaryHelper.js +2 -4
- package/IO/Core/DataAccessHelper/HtmlDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/HttpDataAccessHelper.js +1 -1
- package/IO/Core/DataAccessHelper/JSZipDataAccessHelper.js +2 -2
- package/IO/Core/ZipMultiDataSetReader.js +1 -1
- package/IO/Core/ZipMultiDataSetWriter.js +1 -1
- package/IO/Geometry/STLWriter.js +4 -4
- package/IO/Misc/OBJReader.d.ts +9 -8
- package/IO/Misc/SkyboxReader.js +1 -1
- package/IO/XML/XMLReader.js +3 -4
- package/IO/XML/XMLWriter.js +5 -6
- package/Imaging/Core/ImageReslice.js +18 -19
- package/Interaction/Manipulators/MouseCameraAxisRotateManipulator.js +27 -28
- package/Interaction/Manipulators/MouseCameraTrackballRollManipulator.js +8 -9
- package/Interaction/Manipulators/MouseCameraTrackballRotateManipulator.js +14 -15
- package/Interaction/Manipulators/MouseCameraUnicamRotateManipulator.js +12 -13
- package/Interaction/Widgets/ImageCroppingRegionsWidget.js +5 -6
- package/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/Interaction/Widgets/PiecewiseGaussianWidget.js +2 -2
- package/Interaction/Widgets/ResliceCursor/ResliceCursorRepresentation.js +8 -9
- package/Rendering/Core/Actor.js +3 -4
- package/Rendering/Core/AnnotatedCubeActor.d.ts +5 -6
- package/Rendering/Core/Camera.js +81 -84
- package/Rendering/Core/CellPicker.js +2 -2
- package/Rendering/Core/CubeAxesActor.js +37 -34
- package/Rendering/Core/Follower.js +20 -21
- package/Rendering/Core/Glyph3DMapper.js +30 -32
- package/Rendering/Core/ImageMapper.js +2 -2
- package/Rendering/Core/ImageSlice.js +5 -6
- package/Rendering/Core/Picker.d.ts +5 -5
- package/Rendering/Core/Picker.js +5 -6
- package/Rendering/Core/PixelSpaceCallbackMapper.js +3 -4
- package/Rendering/Core/Prop3D.js +24 -25
- package/Rendering/Core/Renderer.js +11 -12
- package/Rendering/Core/ScalarBarActor.js +37 -34
- package/Rendering/Core/Volume.js +3 -4
- package/Rendering/OpenGL/Actor.js +9 -10
- package/Rendering/OpenGL/Camera.js +8 -9
- package/Rendering/OpenGL/CellArrayBufferObject.js +6 -8
- package/Rendering/OpenGL/Glyph3DMapper.js +8 -9
- package/Rendering/OpenGL/ImageMapper.js +7 -7
- package/Rendering/OpenGL/ImageSlice.js +4 -4
- package/Rendering/OpenGL/PolyDataMapper.js +11 -13
- package/Rendering/OpenGL/RenderWindow.d.ts +21 -35
- package/Rendering/OpenGL/ShaderCache.js +1 -1
- package/Rendering/OpenGL/Skybox.js +4 -5
- package/Rendering/OpenGL/SphereMapper.js +2 -2
- package/Rendering/OpenGL/StickMapper.js +3 -4
- package/Rendering/OpenGL/SurfaceLIC/SurfaceLICInterface.js +1 -1
- package/Rendering/OpenGL/Volume.js +6 -7
- package/Rendering/OpenGL/VolumeMapper.js +47 -49
- package/Rendering/OpenGL/glsl/vtkPolyDataFS.glsl.js +1 -1
- package/Rendering/WebGPU/Actor.js +8 -8
- package/Rendering/WebGPU/Camera.js +8 -8
- package/Rendering/WebGPU/ImageMapper.js +18 -19
- package/Rendering/WebGPU/ImageSlice.js +9 -9
- package/Rendering/WebGPU/PolyDataMapper.js +3 -4
- package/Rendering/WebGPU/Renderer.js +6 -7
- package/Rendering/WebGPU/Volume.js +3 -3
- package/Rendering/WebGPU/VolumePassFSQ.js +10 -10
- package/ThirdParty/index.js +2 -2
- package/Widgets/Manipulators/TrackballManipulator.js +5 -6
- package/Widgets/Representations/ArrowHandleRepresentation.js +10 -12
- package/Widgets/Representations/CircleContextRepresentation.js +4 -5
- package/Widgets/Representations/RectangleContextRepresentation.js +3 -3
- package/Widgets/Widgets3D/EllipseWidget/behavior.js +5 -5
- package/Widgets/Widgets3D/ImageCroppingWidget/helpers.js +6 -8
- package/Widgets/Widgets3D/PaintWidget/behavior.js +2 -2
- package/Widgets/Widgets3D/ResliceCursorWidget.js +6 -7
- package/Widgets/Widgets3D/ShapeWidget/behavior.js +10 -10
- package/Widgets/Widgets3D/SplineWidget/behavior.js +5 -5
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Filters/General/PaintFilter/PaintFilter.worker.js +1 -1
- package/_virtual/rollup-plugin-worker-loader__module_Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js +1 -1
- package/package.json +2 -2
- package/types.d.ts +1 -0
- package/vtk.js +2 -2
- package/_vendor/base64-js/index.js_commonjs-exports.js +0 -1
- package/_vendor/blueimp-md5/js/md5.js_commonjs-module.js +0 -3
- package/_vendor/define-properties/index.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/implementation.browser.js_commonjs-module.js +0 -3
- package/_vendor/globalthis/implementation.browser.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/polyfill.js_commonjs-proxy.js +0 -1
- package/_vendor/globalthis/shim.js_commonjs-proxy.js +0 -2
- package/_vendor/jszip/dist/jszip.min.js_commonjs-module.js +0 -3
- package/_vendor/object-keys/implementation.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/index.js_commonjs-proxy.js +0 -1
- package/_vendor/object-keys/isArguments.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/alea.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/alea.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/tychei.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/tychei.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xor128.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xor128.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xor4096.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xorshift7.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/lib/xorwow.js_commonjs-proxy.js +0 -1
- package/_vendor/seedrandom/seedrandom.js_commonjs-module.js +0 -3
- package/_vendor/seedrandom/seedrandom.js_commonjs-proxy.js +0 -1
- package/_vendor/webworker-promise/lib/register.js_commonjs-module.js +0 -3
- package/_vendor/webworker-promise/lib/tiny-emitter.js_commonjs-proxy.js +0 -1
- package/_vendor/webworker-promise/src/tiny-emitter.js_commonjs-proxy.js +0 -1
- package/_vendor/xmlbuilder2/lib/xmlbuilder2.min.js_commonjs-module.js +0 -3
- package/_virtual/_rollup_plugin_ignore_empty_module_placeholder_commonjs-proxy.js +0 -6
- package/_virtual/commonjsHelpers.js +0 -22
- package/_virtual/polyfill-node.buffer.js +0 -1971
- package/_virtual/polyfill-node.global.js +0 -5
- package/_virtual/rollup_plugin_ignore_empty_module_placeholder.js +0 -8
- package/vendor/base64-js/index.js +0 -72
- package/vendor/blueimp-md5/js/md5.js +0 -402
- package/vendor/d3-array/src/array.js +0 -1
- package/vendor/d3-array/src/ascending.js +0 -5
- package/vendor/d3-array/src/bin.js +0 -1
- package/vendor/d3-array/src/bisect.js +0 -10
- package/vendor/d3-array/src/bisector.js +0 -46
- package/vendor/d3-array/src/constant.js +0 -1
- package/vendor/d3-array/src/count.js +0 -1
- package/vendor/d3-array/src/cross.js +0 -1
- package/vendor/d3-array/src/cumsum.js +0 -1
- package/vendor/d3-array/src/descending.js +0 -1
- package/vendor/d3-array/src/deviation.js +0 -1
- package/vendor/d3-array/src/difference.js +0 -1
- package/vendor/d3-array/src/disjoint.js +0 -1
- package/vendor/d3-array/src/every.js +0 -1
- package/vendor/d3-array/src/extent.js +0 -1
- package/vendor/d3-array/src/filter.js +0 -1
- package/vendor/d3-array/src/fsum.js +0 -1
- package/vendor/d3-array/src/greatest.js +0 -1
- package/vendor/d3-array/src/greatestIndex.js +0 -1
- package/vendor/d3-array/src/group.js +0 -1
- package/vendor/d3-array/src/groupSort.js +0 -1
- package/vendor/d3-array/src/identity.js +0 -1
- package/vendor/d3-array/src/index.js +0 -1
- package/vendor/d3-array/src/intersection.js +0 -1
- package/vendor/d3-array/src/least.js +0 -1
- package/vendor/d3-array/src/leastIndex.js +0 -1
- package/vendor/d3-array/src/map.js +0 -1
- package/vendor/d3-array/src/max.js +0 -1
- package/vendor/d3-array/src/maxIndex.js +0 -1
- package/vendor/d3-array/src/mean.js +0 -1
- package/vendor/d3-array/src/median.js +0 -1
- package/vendor/d3-array/src/merge.js +0 -1
- package/vendor/d3-array/src/min.js +0 -1
- package/vendor/d3-array/src/minIndex.js +0 -1
- package/vendor/d3-array/src/mode.js +0 -1
- package/vendor/d3-array/src/nice.js +0 -1
- package/vendor/d3-array/src/number.js +0 -5
- package/vendor/d3-array/src/pairs.js +0 -1
- package/vendor/d3-array/src/permute.js +0 -1
- package/vendor/d3-array/src/quantile.js +0 -1
- package/vendor/d3-array/src/quickselect.js +0 -1
- package/vendor/d3-array/src/range.js +0 -1
- package/vendor/d3-array/src/reduce.js +0 -1
- package/vendor/d3-array/src/reverse.js +0 -1
- package/vendor/d3-array/src/scan.js +0 -1
- package/vendor/d3-array/src/set.js +0 -1
- package/vendor/d3-array/src/shuffle.js +0 -1
- package/vendor/d3-array/src/some.js +0 -1
- package/vendor/d3-array/src/sort.js +0 -1
- package/vendor/d3-array/src/subset.js +0 -1
- package/vendor/d3-array/src/sum.js +0 -1
- package/vendor/d3-array/src/superset.js +0 -1
- package/vendor/d3-array/src/threshold/freedmanDiaconis.js +0 -1
- package/vendor/d3-array/src/threshold/scott.js +0 -1
- package/vendor/d3-array/src/threshold/sturges.js +0 -1
- package/vendor/d3-array/src/ticks.js +0 -56
- package/vendor/d3-array/src/transpose.js +0 -1
- package/vendor/d3-array/src/union.js +0 -1
- package/vendor/d3-array/src/variance.js +0 -1
- package/vendor/d3-array/src/zip.js +0 -1
- package/vendor/d3-color/src/color.js +0 -373
- package/vendor/d3-color/src/cubehelix.js +0 -1
- package/vendor/d3-color/src/define.js +0 -12
- package/vendor/d3-color/src/index.js +0 -1
- package/vendor/d3-color/src/lab.js +0 -1
- package/vendor/d3-color/src/math.js +0 -1
- package/vendor/d3-format/src/defaultLocale.js +0 -20
- package/vendor/d3-format/src/exponent.js +0 -7
- package/vendor/d3-format/src/formatDecimal.js +0 -22
- package/vendor/d3-format/src/formatGroup.js +0 -20
- package/vendor/d3-format/src/formatNumerals.js +0 -9
- package/vendor/d3-format/src/formatPrefixAuto.js +0 -18
- package/vendor/d3-format/src/formatRounded.js +0 -13
- package/vendor/d3-format/src/formatSpecifier.js +0 -49
- package/vendor/d3-format/src/formatTrim.js +0 -13
- package/vendor/d3-format/src/formatTypes.js +0 -21
- package/vendor/d3-format/src/identity.js +0 -5
- package/vendor/d3-format/src/index.js +0 -1
- package/vendor/d3-format/src/locale.js +0 -150
- package/vendor/d3-format/src/precisionFixed.js +0 -7
- package/vendor/d3-format/src/precisionPrefix.js +0 -7
- package/vendor/d3-format/src/precisionRound.js +0 -8
- package/vendor/d3-interpolate/src/array.js +0 -19
- package/vendor/d3-interpolate/src/basis.js +0 -1
- package/vendor/d3-interpolate/src/basisClosed.js +0 -1
- package/vendor/d3-interpolate/src/color.js +0 -26
- package/vendor/d3-interpolate/src/constant.js +0 -3
- package/vendor/d3-interpolate/src/cubehelix.js +0 -1
- package/vendor/d3-interpolate/src/date.js +0 -8
- package/vendor/d3-interpolate/src/discrete.js +0 -1
- package/vendor/d3-interpolate/src/hcl.js +0 -1
- package/vendor/d3-interpolate/src/hsl.js +0 -1
- package/vendor/d3-interpolate/src/hue.js +0 -1
- package/vendor/d3-interpolate/src/index.js +0 -1
- package/vendor/d3-interpolate/src/lab.js +0 -1
- package/vendor/d3-interpolate/src/number.js +0 -7
- package/vendor/d3-interpolate/src/numberArray.js +0 -16
- package/vendor/d3-interpolate/src/object.js +0 -25
- package/vendor/d3-interpolate/src/piecewise.js +0 -1
- package/vendor/d3-interpolate/src/quantize.js +0 -1
- package/vendor/d3-interpolate/src/rgb.js +0 -26
- package/vendor/d3-interpolate/src/round.js +0 -7
- package/vendor/d3-interpolate/src/string.js +0 -66
- package/vendor/d3-interpolate/src/transform/decompose.js +0 -1
- package/vendor/d3-interpolate/src/transform/index.js +0 -1
- package/vendor/d3-interpolate/src/transform/parse.js +0 -1
- package/vendor/d3-interpolate/src/value.js +0 -24
- package/vendor/d3-interpolate/src/zoom.js +0 -1
- package/vendor/d3-scale/src/band.js +0 -1
- package/vendor/d3-scale/src/constant.js +0 -7
- package/vendor/d3-scale/src/continuous.js +0 -129
- package/vendor/d3-scale/src/diverging.js +0 -1
- package/vendor/d3-scale/src/identity.js +0 -1
- package/vendor/d3-scale/src/index.js +0 -1
- package/vendor/d3-scale/src/init.js +0 -10
- package/vendor/d3-scale/src/linear.js +0 -72
- package/vendor/d3-scale/src/log.js +0 -1
- package/vendor/d3-scale/src/nice.js +0 -1
- package/vendor/d3-scale/src/number.js +0 -5
- package/vendor/d3-scale/src/ordinal.js +0 -1
- package/vendor/d3-scale/src/pow.js +0 -1
- package/vendor/d3-scale/src/quantile.js +0 -1
- package/vendor/d3-scale/src/quantize.js +0 -1
- package/vendor/d3-scale/src/radial.js +0 -1
- package/vendor/d3-scale/src/sequential.js +0 -1
- package/vendor/d3-scale/src/sequentialQuantile.js +0 -1
- package/vendor/d3-scale/src/symlog.js +0 -1
- package/vendor/d3-scale/src/threshold.js +0 -1
- package/vendor/d3-scale/src/tickFormat.js +0 -35
- package/vendor/d3-scale/src/time.js +0 -1
- package/vendor/d3-scale/src/utcTime.js +0 -1
- package/vendor/d3-time/src/day.js +0 -1
- package/vendor/d3-time/src/duration.js +0 -1
- package/vendor/d3-time/src/hour.js +0 -1
- package/vendor/d3-time/src/index.js +0 -1
- package/vendor/d3-time/src/interval.js +0 -1
- package/vendor/d3-time/src/millisecond.js +0 -1
- package/vendor/d3-time/src/minute.js +0 -1
- package/vendor/d3-time/src/month.js +0 -1
- package/vendor/d3-time/src/second.js +0 -1
- package/vendor/d3-time/src/ticks.js +0 -1
- package/vendor/d3-time/src/utcDay.js +0 -1
- package/vendor/d3-time/src/utcHour.js +0 -1
- package/vendor/d3-time/src/utcMinute.js +0 -1
- package/vendor/d3-time/src/utcMonth.js +0 -1
- package/vendor/d3-time/src/utcWeek.js +0 -1
- package/vendor/d3-time/src/utcYear.js +0 -1
- package/vendor/d3-time/src/week.js +0 -1
- package/vendor/d3-time/src/year.js +0 -1
- package/vendor/d3-time-format/src/defaultLocale.js +0 -1
- package/vendor/d3-time-format/src/index.js +0 -1
- package/vendor/d3-time-format/src/isoFormat.js +0 -1
- package/vendor/d3-time-format/src/isoParse.js +0 -1
- package/vendor/d3-time-format/src/locale.js +0 -1
- package/vendor/define-properties/index.js +0 -60
- package/vendor/gl-matrix/esm/common.js +0 -30
- package/vendor/gl-matrix/esm/index.js +0 -1
- package/vendor/gl-matrix/esm/mat2.js +0 -1
- package/vendor/gl-matrix/esm/mat2d.js +0 -1
- package/vendor/gl-matrix/esm/mat3.js +0 -817
- package/vendor/gl-matrix/esm/mat4.js +0 -1868
- package/vendor/gl-matrix/esm/quat.js +0 -330
- package/vendor/gl-matrix/esm/quat2.js +0 -1
- package/vendor/gl-matrix/esm/vec2.js +0 -1
- package/vendor/gl-matrix/esm/vec3.js +0 -842
- package/vendor/gl-matrix/esm/vec4.js +0 -153
- package/vendor/globalthis/implementation.browser.js +0 -11
- package/vendor/globalthis/index.js +0 -25
- package/vendor/globalthis/polyfill.js +0 -14
- package/vendor/globalthis/shim.js +0 -25
- package/vendor/internmap/src/index.js +0 -1
- package/vendor/jszip/dist/jszip.min.js +0 -11
- package/vendor/object-keys/implementation.js +0 -124
- package/vendor/object-keys/index.js +0 -35
- package/vendor/object-keys/isArguments.js +0 -17
- package/vendor/pako/dist/pako.esm.mjs.js +0 -6707
- package/vendor/seedrandom/index.js +0 -77
- package/vendor/seedrandom/lib/alea.js +0 -117
- package/vendor/seedrandom/lib/tychei.js +0 -105
- package/vendor/seedrandom/lib/xor128.js +0 -84
- package/vendor/seedrandom/lib/xor4096.js +0 -150
- package/vendor/seedrandom/lib/xorshift7.js +0 -101
- package/vendor/seedrandom/lib/xorwow.js +0 -89
- package/vendor/seedrandom/seedrandom.js +0 -256
- package/vendor/webworker-promise/lib/register.js +0 -158
- package/vendor/webworker-promise/lib/tiny-emitter.js +0 -89
- package/vendor/webworker-promise/src/index.js +0 -110
- package/vendor/webworker-promise/src/tiny-emitter.js +0 -51
- package/vendor/xmlbuilder2/lib/xmlbuilder2.min.js +0 -13
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var e10 = Math.sqrt(50),
|
|
2
|
-
e5 = Math.sqrt(10),
|
|
3
|
-
e2 = Math.sqrt(2);
|
|
4
|
-
|
|
5
|
-
function ticks(start, stop, count) {
|
|
6
|
-
var reverse,
|
|
7
|
-
i = -1,
|
|
8
|
-
n,
|
|
9
|
-
ticks,
|
|
10
|
-
step;
|
|
11
|
-
|
|
12
|
-
stop = +stop, start = +start, count = +count;
|
|
13
|
-
if (start === stop && count > 0) return [start];
|
|
14
|
-
if (reverse = stop < start) n = start, start = stop, stop = n;
|
|
15
|
-
if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
|
|
16
|
-
|
|
17
|
-
if (step > 0) {
|
|
18
|
-
let r0 = Math.round(start / step), r1 = Math.round(stop / step);
|
|
19
|
-
if (r0 * step < start) ++r0;
|
|
20
|
-
if (r1 * step > stop) --r1;
|
|
21
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
22
|
-
while (++i < n) ticks[i] = (r0 + i) * step;
|
|
23
|
-
} else {
|
|
24
|
-
step = -step;
|
|
25
|
-
let r0 = Math.round(start * step), r1 = Math.round(stop * step);
|
|
26
|
-
if (r0 / step < start) ++r0;
|
|
27
|
-
if (r1 / step > stop) --r1;
|
|
28
|
-
ticks = new Array(n = r1 - r0 + 1);
|
|
29
|
-
while (++i < n) ticks[i] = (r0 + i) / step;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (reverse) ticks.reverse();
|
|
33
|
-
|
|
34
|
-
return ticks;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function tickIncrement(start, stop, count) {
|
|
38
|
-
var step = (stop - start) / Math.max(0, count),
|
|
39
|
-
power = Math.floor(Math.log(step) / Math.LN10),
|
|
40
|
-
error = step / Math.pow(10, power);
|
|
41
|
-
return power >= 0
|
|
42
|
-
? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
|
|
43
|
-
: -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function tickStep(start, stop, count) {
|
|
47
|
-
var step0 = Math.abs(stop - start) / Math.max(0, count),
|
|
48
|
-
step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
|
|
49
|
-
error = step0 / step1;
|
|
50
|
-
if (error >= e10) step1 *= 10;
|
|
51
|
-
else if (error >= e5) step1 *= 5;
|
|
52
|
-
else if (error >= e2) step1 *= 2;
|
|
53
|
-
return stop < start ? -step1 : step1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { tickIncrement as a, tickStep as b, ticks as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import { d as define, e as extend } from './define.js';
|
|
2
|
-
|
|
3
|
-
function Color() {}
|
|
4
|
-
|
|
5
|
-
var darker = 0.7;
|
|
6
|
-
var brighter = 1 / darker;
|
|
7
|
-
|
|
8
|
-
var reI = "\\s*([+-]?\\d+)\\s*",
|
|
9
|
-
reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
|
|
10
|
-
reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
|
|
11
|
-
reHex = /^#([0-9a-f]{3,8})$/,
|
|
12
|
-
reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
|
|
13
|
-
reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
|
|
14
|
-
reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
|
|
15
|
-
reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
|
|
16
|
-
reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
|
|
17
|
-
reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
|
|
18
|
-
|
|
19
|
-
var named = {
|
|
20
|
-
aliceblue: 0xf0f8ff,
|
|
21
|
-
antiquewhite: 0xfaebd7,
|
|
22
|
-
aqua: 0x00ffff,
|
|
23
|
-
aquamarine: 0x7fffd4,
|
|
24
|
-
azure: 0xf0ffff,
|
|
25
|
-
beige: 0xf5f5dc,
|
|
26
|
-
bisque: 0xffe4c4,
|
|
27
|
-
black: 0x000000,
|
|
28
|
-
blanchedalmond: 0xffebcd,
|
|
29
|
-
blue: 0x0000ff,
|
|
30
|
-
blueviolet: 0x8a2be2,
|
|
31
|
-
brown: 0xa52a2a,
|
|
32
|
-
burlywood: 0xdeb887,
|
|
33
|
-
cadetblue: 0x5f9ea0,
|
|
34
|
-
chartreuse: 0x7fff00,
|
|
35
|
-
chocolate: 0xd2691e,
|
|
36
|
-
coral: 0xff7f50,
|
|
37
|
-
cornflowerblue: 0x6495ed,
|
|
38
|
-
cornsilk: 0xfff8dc,
|
|
39
|
-
crimson: 0xdc143c,
|
|
40
|
-
cyan: 0x00ffff,
|
|
41
|
-
darkblue: 0x00008b,
|
|
42
|
-
darkcyan: 0x008b8b,
|
|
43
|
-
darkgoldenrod: 0xb8860b,
|
|
44
|
-
darkgray: 0xa9a9a9,
|
|
45
|
-
darkgreen: 0x006400,
|
|
46
|
-
darkgrey: 0xa9a9a9,
|
|
47
|
-
darkkhaki: 0xbdb76b,
|
|
48
|
-
darkmagenta: 0x8b008b,
|
|
49
|
-
darkolivegreen: 0x556b2f,
|
|
50
|
-
darkorange: 0xff8c00,
|
|
51
|
-
darkorchid: 0x9932cc,
|
|
52
|
-
darkred: 0x8b0000,
|
|
53
|
-
darksalmon: 0xe9967a,
|
|
54
|
-
darkseagreen: 0x8fbc8f,
|
|
55
|
-
darkslateblue: 0x483d8b,
|
|
56
|
-
darkslategray: 0x2f4f4f,
|
|
57
|
-
darkslategrey: 0x2f4f4f,
|
|
58
|
-
darkturquoise: 0x00ced1,
|
|
59
|
-
darkviolet: 0x9400d3,
|
|
60
|
-
deeppink: 0xff1493,
|
|
61
|
-
deepskyblue: 0x00bfff,
|
|
62
|
-
dimgray: 0x696969,
|
|
63
|
-
dimgrey: 0x696969,
|
|
64
|
-
dodgerblue: 0x1e90ff,
|
|
65
|
-
firebrick: 0xb22222,
|
|
66
|
-
floralwhite: 0xfffaf0,
|
|
67
|
-
forestgreen: 0x228b22,
|
|
68
|
-
fuchsia: 0xff00ff,
|
|
69
|
-
gainsboro: 0xdcdcdc,
|
|
70
|
-
ghostwhite: 0xf8f8ff,
|
|
71
|
-
gold: 0xffd700,
|
|
72
|
-
goldenrod: 0xdaa520,
|
|
73
|
-
gray: 0x808080,
|
|
74
|
-
green: 0x008000,
|
|
75
|
-
greenyellow: 0xadff2f,
|
|
76
|
-
grey: 0x808080,
|
|
77
|
-
honeydew: 0xf0fff0,
|
|
78
|
-
hotpink: 0xff69b4,
|
|
79
|
-
indianred: 0xcd5c5c,
|
|
80
|
-
indigo: 0x4b0082,
|
|
81
|
-
ivory: 0xfffff0,
|
|
82
|
-
khaki: 0xf0e68c,
|
|
83
|
-
lavender: 0xe6e6fa,
|
|
84
|
-
lavenderblush: 0xfff0f5,
|
|
85
|
-
lawngreen: 0x7cfc00,
|
|
86
|
-
lemonchiffon: 0xfffacd,
|
|
87
|
-
lightblue: 0xadd8e6,
|
|
88
|
-
lightcoral: 0xf08080,
|
|
89
|
-
lightcyan: 0xe0ffff,
|
|
90
|
-
lightgoldenrodyellow: 0xfafad2,
|
|
91
|
-
lightgray: 0xd3d3d3,
|
|
92
|
-
lightgreen: 0x90ee90,
|
|
93
|
-
lightgrey: 0xd3d3d3,
|
|
94
|
-
lightpink: 0xffb6c1,
|
|
95
|
-
lightsalmon: 0xffa07a,
|
|
96
|
-
lightseagreen: 0x20b2aa,
|
|
97
|
-
lightskyblue: 0x87cefa,
|
|
98
|
-
lightslategray: 0x778899,
|
|
99
|
-
lightslategrey: 0x778899,
|
|
100
|
-
lightsteelblue: 0xb0c4de,
|
|
101
|
-
lightyellow: 0xffffe0,
|
|
102
|
-
lime: 0x00ff00,
|
|
103
|
-
limegreen: 0x32cd32,
|
|
104
|
-
linen: 0xfaf0e6,
|
|
105
|
-
magenta: 0xff00ff,
|
|
106
|
-
maroon: 0x800000,
|
|
107
|
-
mediumaquamarine: 0x66cdaa,
|
|
108
|
-
mediumblue: 0x0000cd,
|
|
109
|
-
mediumorchid: 0xba55d3,
|
|
110
|
-
mediumpurple: 0x9370db,
|
|
111
|
-
mediumseagreen: 0x3cb371,
|
|
112
|
-
mediumslateblue: 0x7b68ee,
|
|
113
|
-
mediumspringgreen: 0x00fa9a,
|
|
114
|
-
mediumturquoise: 0x48d1cc,
|
|
115
|
-
mediumvioletred: 0xc71585,
|
|
116
|
-
midnightblue: 0x191970,
|
|
117
|
-
mintcream: 0xf5fffa,
|
|
118
|
-
mistyrose: 0xffe4e1,
|
|
119
|
-
moccasin: 0xffe4b5,
|
|
120
|
-
navajowhite: 0xffdead,
|
|
121
|
-
navy: 0x000080,
|
|
122
|
-
oldlace: 0xfdf5e6,
|
|
123
|
-
olive: 0x808000,
|
|
124
|
-
olivedrab: 0x6b8e23,
|
|
125
|
-
orange: 0xffa500,
|
|
126
|
-
orangered: 0xff4500,
|
|
127
|
-
orchid: 0xda70d6,
|
|
128
|
-
palegoldenrod: 0xeee8aa,
|
|
129
|
-
palegreen: 0x98fb98,
|
|
130
|
-
paleturquoise: 0xafeeee,
|
|
131
|
-
palevioletred: 0xdb7093,
|
|
132
|
-
papayawhip: 0xffefd5,
|
|
133
|
-
peachpuff: 0xffdab9,
|
|
134
|
-
peru: 0xcd853f,
|
|
135
|
-
pink: 0xffc0cb,
|
|
136
|
-
plum: 0xdda0dd,
|
|
137
|
-
powderblue: 0xb0e0e6,
|
|
138
|
-
purple: 0x800080,
|
|
139
|
-
rebeccapurple: 0x663399,
|
|
140
|
-
red: 0xff0000,
|
|
141
|
-
rosybrown: 0xbc8f8f,
|
|
142
|
-
royalblue: 0x4169e1,
|
|
143
|
-
saddlebrown: 0x8b4513,
|
|
144
|
-
salmon: 0xfa8072,
|
|
145
|
-
sandybrown: 0xf4a460,
|
|
146
|
-
seagreen: 0x2e8b57,
|
|
147
|
-
seashell: 0xfff5ee,
|
|
148
|
-
sienna: 0xa0522d,
|
|
149
|
-
silver: 0xc0c0c0,
|
|
150
|
-
skyblue: 0x87ceeb,
|
|
151
|
-
slateblue: 0x6a5acd,
|
|
152
|
-
slategray: 0x708090,
|
|
153
|
-
slategrey: 0x708090,
|
|
154
|
-
snow: 0xfffafa,
|
|
155
|
-
springgreen: 0x00ff7f,
|
|
156
|
-
steelblue: 0x4682b4,
|
|
157
|
-
tan: 0xd2b48c,
|
|
158
|
-
teal: 0x008080,
|
|
159
|
-
thistle: 0xd8bfd8,
|
|
160
|
-
tomato: 0xff6347,
|
|
161
|
-
turquoise: 0x40e0d0,
|
|
162
|
-
violet: 0xee82ee,
|
|
163
|
-
wheat: 0xf5deb3,
|
|
164
|
-
white: 0xffffff,
|
|
165
|
-
whitesmoke: 0xf5f5f5,
|
|
166
|
-
yellow: 0xffff00,
|
|
167
|
-
yellowgreen: 0x9acd32
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
define(Color, color, {
|
|
171
|
-
copy: function(channels) {
|
|
172
|
-
return Object.assign(new this.constructor, this, channels);
|
|
173
|
-
},
|
|
174
|
-
displayable: function() {
|
|
175
|
-
return this.rgb().displayable();
|
|
176
|
-
},
|
|
177
|
-
hex: color_formatHex, // Deprecated! Use color.formatHex.
|
|
178
|
-
formatHex: color_formatHex,
|
|
179
|
-
formatHsl: color_formatHsl,
|
|
180
|
-
formatRgb: color_formatRgb,
|
|
181
|
-
toString: color_formatRgb
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
function color_formatHex() {
|
|
185
|
-
return this.rgb().formatHex();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function color_formatHsl() {
|
|
189
|
-
return hslConvert(this).formatHsl();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function color_formatRgb() {
|
|
193
|
-
return this.rgb().formatRgb();
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
function color(format) {
|
|
197
|
-
var m, l;
|
|
198
|
-
format = (format + "").trim().toLowerCase();
|
|
199
|
-
return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
|
|
200
|
-
: l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
|
|
201
|
-
: l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
|
|
202
|
-
: l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
|
|
203
|
-
: null) // invalid hex
|
|
204
|
-
: (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
|
|
205
|
-
: (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
|
|
206
|
-
: (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
|
|
207
|
-
: (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
|
|
208
|
-
: (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
|
|
209
|
-
: (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
|
|
210
|
-
: named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
|
|
211
|
-
: format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
|
|
212
|
-
: null;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
function rgbn(n) {
|
|
216
|
-
return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function rgba(r, g, b, a) {
|
|
220
|
-
if (a <= 0) r = g = b = NaN;
|
|
221
|
-
return new Rgb(r, g, b, a);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function rgbConvert(o) {
|
|
225
|
-
if (!(o instanceof Color)) o = color(o);
|
|
226
|
-
if (!o) return new Rgb;
|
|
227
|
-
o = o.rgb();
|
|
228
|
-
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function rgb(r, g, b, opacity) {
|
|
232
|
-
return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
function Rgb(r, g, b, opacity) {
|
|
236
|
-
this.r = +r;
|
|
237
|
-
this.g = +g;
|
|
238
|
-
this.b = +b;
|
|
239
|
-
this.opacity = +opacity;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
define(Rgb, rgb, extend(Color, {
|
|
243
|
-
brighter: function(k) {
|
|
244
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
245
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
246
|
-
},
|
|
247
|
-
darker: function(k) {
|
|
248
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
249
|
-
return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
|
|
250
|
-
},
|
|
251
|
-
rgb: function() {
|
|
252
|
-
return this;
|
|
253
|
-
},
|
|
254
|
-
displayable: function() {
|
|
255
|
-
return (-0.5 <= this.r && this.r < 255.5)
|
|
256
|
-
&& (-0.5 <= this.g && this.g < 255.5)
|
|
257
|
-
&& (-0.5 <= this.b && this.b < 255.5)
|
|
258
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
259
|
-
},
|
|
260
|
-
hex: rgb_formatHex, // Deprecated! Use color.formatHex.
|
|
261
|
-
formatHex: rgb_formatHex,
|
|
262
|
-
formatRgb: rgb_formatRgb,
|
|
263
|
-
toString: rgb_formatRgb
|
|
264
|
-
}));
|
|
265
|
-
|
|
266
|
-
function rgb_formatHex() {
|
|
267
|
-
return "#" + hex(this.r) + hex(this.g) + hex(this.b);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function rgb_formatRgb() {
|
|
271
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
272
|
-
return (a === 1 ? "rgb(" : "rgba(")
|
|
273
|
-
+ Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
|
|
274
|
-
+ Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
|
|
275
|
-
+ Math.max(0, Math.min(255, Math.round(this.b) || 0))
|
|
276
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function hex(value) {
|
|
280
|
-
value = Math.max(0, Math.min(255, Math.round(value) || 0));
|
|
281
|
-
return (value < 16 ? "0" : "") + value.toString(16);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
function hsla(h, s, l, a) {
|
|
285
|
-
if (a <= 0) h = s = l = NaN;
|
|
286
|
-
else if (l <= 0 || l >= 1) h = s = NaN;
|
|
287
|
-
else if (s <= 0) h = NaN;
|
|
288
|
-
return new Hsl(h, s, l, a);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function hslConvert(o) {
|
|
292
|
-
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
293
|
-
if (!(o instanceof Color)) o = color(o);
|
|
294
|
-
if (!o) return new Hsl;
|
|
295
|
-
if (o instanceof Hsl) return o;
|
|
296
|
-
o = o.rgb();
|
|
297
|
-
var r = o.r / 255,
|
|
298
|
-
g = o.g / 255,
|
|
299
|
-
b = o.b / 255,
|
|
300
|
-
min = Math.min(r, g, b),
|
|
301
|
-
max = Math.max(r, g, b),
|
|
302
|
-
h = NaN,
|
|
303
|
-
s = max - min,
|
|
304
|
-
l = (max + min) / 2;
|
|
305
|
-
if (s) {
|
|
306
|
-
if (r === max) h = (g - b) / s + (g < b) * 6;
|
|
307
|
-
else if (g === max) h = (b - r) / s + 2;
|
|
308
|
-
else h = (r - g) / s + 4;
|
|
309
|
-
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
310
|
-
h *= 60;
|
|
311
|
-
} else {
|
|
312
|
-
s = l > 0 && l < 1 ? 0 : h;
|
|
313
|
-
}
|
|
314
|
-
return new Hsl(h, s, l, o.opacity);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
function hsl(h, s, l, opacity) {
|
|
318
|
-
return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
function Hsl(h, s, l, opacity) {
|
|
322
|
-
this.h = +h;
|
|
323
|
-
this.s = +s;
|
|
324
|
-
this.l = +l;
|
|
325
|
-
this.opacity = +opacity;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
define(Hsl, hsl, extend(Color, {
|
|
329
|
-
brighter: function(k) {
|
|
330
|
-
k = k == null ? brighter : Math.pow(brighter, k);
|
|
331
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
332
|
-
},
|
|
333
|
-
darker: function(k) {
|
|
334
|
-
k = k == null ? darker : Math.pow(darker, k);
|
|
335
|
-
return new Hsl(this.h, this.s, this.l * k, this.opacity);
|
|
336
|
-
},
|
|
337
|
-
rgb: function() {
|
|
338
|
-
var h = this.h % 360 + (this.h < 0) * 360,
|
|
339
|
-
s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
|
|
340
|
-
l = this.l,
|
|
341
|
-
m2 = l + (l < 0.5 ? l : 1 - l) * s,
|
|
342
|
-
m1 = 2 * l - m2;
|
|
343
|
-
return new Rgb(
|
|
344
|
-
hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
|
|
345
|
-
hsl2rgb(h, m1, m2),
|
|
346
|
-
hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
|
|
347
|
-
this.opacity
|
|
348
|
-
);
|
|
349
|
-
},
|
|
350
|
-
displayable: function() {
|
|
351
|
-
return (0 <= this.s && this.s <= 1 || isNaN(this.s))
|
|
352
|
-
&& (0 <= this.l && this.l <= 1)
|
|
353
|
-
&& (0 <= this.opacity && this.opacity <= 1);
|
|
354
|
-
},
|
|
355
|
-
formatHsl: function() {
|
|
356
|
-
var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
|
|
357
|
-
return (a === 1 ? "hsl(" : "hsla(")
|
|
358
|
-
+ (this.h || 0) + ", "
|
|
359
|
-
+ (this.s || 0) * 100 + "%, "
|
|
360
|
-
+ (this.l || 0) * 100 + "%"
|
|
361
|
-
+ (a === 1 ? ")" : ", " + a + ")");
|
|
362
|
-
}
|
|
363
|
-
}));
|
|
364
|
-
|
|
365
|
-
/* From FvD 13.37, CSS Color Module Level 3 */
|
|
366
|
-
function hsl2rgb(h, m1, m2) {
|
|
367
|
-
return (h < 60 ? m1 + (m2 - m1) * h / 60
|
|
368
|
-
: h < 180 ? m2
|
|
369
|
-
: h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
|
|
370
|
-
: m1) * 255;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export { color as c, rgb as r };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
function define(constructor, factory, prototype) {
|
|
2
|
-
constructor.prototype = factory.prototype = prototype;
|
|
3
|
-
prototype.constructor = constructor;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
function extend(parent, definition) {
|
|
7
|
-
var prototype = Object.create(parent.prototype);
|
|
8
|
-
for (var key in definition) prototype[key] = definition[key];
|
|
9
|
-
return prototype;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { define as d, extend as e };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { f as formatLocale } from './locale.js';
|
|
2
|
-
|
|
3
|
-
var locale;
|
|
4
|
-
var format;
|
|
5
|
-
var formatPrefix;
|
|
6
|
-
|
|
7
|
-
defaultLocale({
|
|
8
|
-
thousands: ",",
|
|
9
|
-
grouping: [3],
|
|
10
|
-
currency: ["$", ""]
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
function defaultLocale(definition) {
|
|
14
|
-
locale = formatLocale(definition);
|
|
15
|
-
format = locale.format;
|
|
16
|
-
formatPrefix = locale.formatPrefix;
|
|
17
|
-
return locale;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { format as a, formatPrefix as f };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function formatDecimal(x) {
|
|
2
|
-
return Math.abs(x = Math.round(x)) >= 1e21
|
|
3
|
-
? x.toLocaleString("en").replace(/,/g, "")
|
|
4
|
-
: x.toString(10);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// Computes the decimal coefficient and exponent of the specified number x with
|
|
8
|
-
// significant digits p, where x is positive and p is in [1, 21] or undefined.
|
|
9
|
-
// For example, formatDecimalParts(1.23) returns ["123", 0].
|
|
10
|
-
function formatDecimalParts(x, p) {
|
|
11
|
-
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
|
|
12
|
-
var i, coefficient = x.slice(0, i);
|
|
13
|
-
|
|
14
|
-
// The string returned by toExponential either has the form \d\.\d+e[-+]\d+
|
|
15
|
-
// (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
|
|
16
|
-
return [
|
|
17
|
-
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
18
|
-
+x.slice(i + 1)
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { formatDecimal as a, formatDecimalParts as f };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
function formatGroup(grouping, thousands) {
|
|
2
|
-
return function(value, width) {
|
|
3
|
-
var i = value.length,
|
|
4
|
-
t = [],
|
|
5
|
-
j = 0,
|
|
6
|
-
g = grouping[0],
|
|
7
|
-
length = 0;
|
|
8
|
-
|
|
9
|
-
while (i > 0 && g > 0) {
|
|
10
|
-
if (length + g + 1 > width) g = Math.max(1, width - length);
|
|
11
|
-
t.push(value.substring(i -= g, i + g));
|
|
12
|
-
if ((length += g + 1) > width) break;
|
|
13
|
-
g = grouping[j = (j + 1) % grouping.length];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return t.reverse().join(thousands);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { formatGroup as f };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { f as formatDecimalParts } from './formatDecimal.js';
|
|
2
|
-
|
|
3
|
-
var prefixExponent;
|
|
4
|
-
|
|
5
|
-
function formatPrefixAuto(x, p) {
|
|
6
|
-
var d = formatDecimalParts(x, p);
|
|
7
|
-
if (!d) return x + "";
|
|
8
|
-
var coefficient = d[0],
|
|
9
|
-
exponent = d[1],
|
|
10
|
-
i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
|
|
11
|
-
n = coefficient.length;
|
|
12
|
-
return i === n ? coefficient
|
|
13
|
-
: i > n ? coefficient + new Array(i - n + 1).join("0")
|
|
14
|
-
: i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
|
|
15
|
-
: "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { formatPrefixAuto as f, prefixExponent as p };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { f as formatDecimalParts } from './formatDecimal.js';
|
|
2
|
-
|
|
3
|
-
function formatRounded(x, p) {
|
|
4
|
-
var d = formatDecimalParts(x, p);
|
|
5
|
-
if (!d) return x + "";
|
|
6
|
-
var coefficient = d[0],
|
|
7
|
-
exponent = d[1];
|
|
8
|
-
return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
|
|
9
|
-
: coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
|
|
10
|
-
: coefficient + new Array(exponent - coefficient.length + 2).join("0");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export { formatRounded as f };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
|
|
2
|
-
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
3
|
-
|
|
4
|
-
function formatSpecifier(specifier) {
|
|
5
|
-
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
6
|
-
var match;
|
|
7
|
-
return new FormatSpecifier({
|
|
8
|
-
fill: match[1],
|
|
9
|
-
align: match[2],
|
|
10
|
-
sign: match[3],
|
|
11
|
-
symbol: match[4],
|
|
12
|
-
zero: match[5],
|
|
13
|
-
width: match[6],
|
|
14
|
-
comma: match[7],
|
|
15
|
-
precision: match[8] && match[8].slice(1),
|
|
16
|
-
trim: match[9],
|
|
17
|
-
type: match[10]
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
|
|
22
|
-
|
|
23
|
-
function FormatSpecifier(specifier) {
|
|
24
|
-
this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
|
|
25
|
-
this.align = specifier.align === undefined ? ">" : specifier.align + "";
|
|
26
|
-
this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
|
|
27
|
-
this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
|
|
28
|
-
this.zero = !!specifier.zero;
|
|
29
|
-
this.width = specifier.width === undefined ? undefined : +specifier.width;
|
|
30
|
-
this.comma = !!specifier.comma;
|
|
31
|
-
this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
|
|
32
|
-
this.trim = !!specifier.trim;
|
|
33
|
-
this.type = specifier.type === undefined ? "" : specifier.type + "";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
FormatSpecifier.prototype.toString = function() {
|
|
37
|
-
return this.fill
|
|
38
|
-
+ this.align
|
|
39
|
-
+ this.sign
|
|
40
|
-
+ this.symbol
|
|
41
|
-
+ (this.zero ? "0" : "")
|
|
42
|
-
+ (this.width === undefined ? "" : Math.max(1, this.width | 0))
|
|
43
|
-
+ (this.comma ? "," : "")
|
|
44
|
-
+ (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
|
|
45
|
-
+ (this.trim ? "~" : "")
|
|
46
|
-
+ this.type;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export { formatSpecifier as f };
|