1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = exports.cubehelixLong = void 0;
|
7 |
|
8 | var _index = require("../../../lib-vendor/d3-color/src/index.js");
|
9 |
|
10 | var _color = _interopRequireWildcard(require("./color.js"));
|
11 |
|
12 | function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
13 |
|
14 | function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
15 |
|
16 | function cubehelix(hue) {
|
17 | return function cubehelixGamma(y) {
|
18 | y = +y;
|
19 |
|
20 | function cubehelix(start, end) {
|
21 | var h = hue((start = (0, _index.cubehelix)(start)).h, (end = (0, _index.cubehelix)(end)).h),
|
22 | s = (0, _color.default)(start.s, end.s),
|
23 | l = (0, _color.default)(start.l, end.l),
|
24 | opacity = (0, _color.default)(start.opacity, end.opacity);
|
25 | return function (t) {
|
26 | start.h = h(t);
|
27 | start.s = s(t);
|
28 | start.l = l(Math.pow(t, y));
|
29 | start.opacity = opacity(t);
|
30 | return start + "";
|
31 | };
|
32 | }
|
33 |
|
34 | cubehelix.gamma = cubehelixGamma;
|
35 | return cubehelix;
|
36 | }(1);
|
37 | }
|
38 |
|
39 | var _default = cubehelix(_color.hue);
|
40 |
|
41 | exports.default = _default;
|
42 | var cubehelixLong = cubehelix(_color.default);
|
43 | exports.cubehelixLong = cubehelixLong; |
\ | No newline at end of file |