Node-Red configuration
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

d3-array.js 39KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455
  1. // https://d3js.org/d3-array/ v3.2.4 Copyright 2010-2023 Mike Bostock
  2. (function (global, factory) {
  3. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  4. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  5. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));
  6. })(this, (function (exports) { 'use strict';
  7. function ascending(a, b) {
  8. return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
  9. }
  10. function descending(a, b) {
  11. return a == null || b == null ? NaN
  12. : b < a ? -1
  13. : b > a ? 1
  14. : b >= a ? 0
  15. : NaN;
  16. }
  17. function bisector(f) {
  18. let compare1, compare2, delta;
  19. // If an accessor is specified, promote it to a comparator. In this case we
  20. // can test whether the search value is (self-) comparable. We can’t do this
  21. // for a comparator (except for specific, known comparators) because we can’t
  22. // tell if the comparator is symmetric, and an asymmetric comparator can’t be
  23. // used to test whether a single value is comparable.
  24. if (f.length !== 2) {
  25. compare1 = ascending;
  26. compare2 = (d, x) => ascending(f(d), x);
  27. delta = (d, x) => f(d) - x;
  28. } else {
  29. compare1 = f === ascending || f === descending ? f : zero;
  30. compare2 = f;
  31. delta = f;
  32. }
  33. function left(a, x, lo = 0, hi = a.length) {
  34. if (lo < hi) {
  35. if (compare1(x, x) !== 0) return hi;
  36. do {
  37. const mid = (lo + hi) >>> 1;
  38. if (compare2(a[mid], x) < 0) lo = mid + 1;
  39. else hi = mid;
  40. } while (lo < hi);
  41. }
  42. return lo;
  43. }
  44. function right(a, x, lo = 0, hi = a.length) {
  45. if (lo < hi) {
  46. if (compare1(x, x) !== 0) return hi;
  47. do {
  48. const mid = (lo + hi) >>> 1;
  49. if (compare2(a[mid], x) <= 0) lo = mid + 1;
  50. else hi = mid;
  51. } while (lo < hi);
  52. }
  53. return lo;
  54. }
  55. function center(a, x, lo = 0, hi = a.length) {
  56. const i = left(a, x, lo, hi - 1);
  57. return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;
  58. }
  59. return {left, center, right};
  60. }
  61. function zero() {
  62. return 0;
  63. }
  64. function number(x) {
  65. return x === null ? NaN : +x;
  66. }
  67. function* numbers(values, valueof) {
  68. if (valueof === undefined) {
  69. for (let value of values) {
  70. if (value != null && (value = +value) >= value) {
  71. yield value;
  72. }
  73. }
  74. } else {
  75. let index = -1;
  76. for (let value of values) {
  77. if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
  78. yield value;
  79. }
  80. }
  81. }
  82. }
  83. const ascendingBisect = bisector(ascending);
  84. const bisectRight = ascendingBisect.right;
  85. const bisectLeft = ascendingBisect.left;
  86. const bisectCenter = bisector(number).center;
  87. var bisect = bisectRight;
  88. function blur(values, r) {
  89. if (!((r = +r) >= 0)) throw new RangeError("invalid r");
  90. let length = values.length;
  91. if (!((length = Math.floor(length)) >= 0)) throw new RangeError("invalid length");
  92. if (!length || !r) return values;
  93. const blur = blurf(r);
  94. const temp = values.slice();
  95. blur(values, temp, 0, length, 1);
  96. blur(temp, values, 0, length, 1);
  97. blur(values, temp, 0, length, 1);
  98. return values;
  99. }
  100. const blur2 = Blur2(blurf);
  101. const blurImage = Blur2(blurfImage);
  102. function Blur2(blur) {
  103. return function(data, rx, ry = rx) {
  104. if (!((rx = +rx) >= 0)) throw new RangeError("invalid rx");
  105. if (!((ry = +ry) >= 0)) throw new RangeError("invalid ry");
  106. let {data: values, width, height} = data;
  107. if (!((width = Math.floor(width)) >= 0)) throw new RangeError("invalid width");
  108. if (!((height = Math.floor(height !== undefined ? height : values.length / width)) >= 0)) throw new RangeError("invalid height");
  109. if (!width || !height || (!rx && !ry)) return data;
  110. const blurx = rx && blur(rx);
  111. const blury = ry && blur(ry);
  112. const temp = values.slice();
  113. if (blurx && blury) {
  114. blurh(blurx, temp, values, width, height);
  115. blurh(blurx, values, temp, width, height);
  116. blurh(blurx, temp, values, width, height);
  117. blurv(blury, values, temp, width, height);
  118. blurv(blury, temp, values, width, height);
  119. blurv(blury, values, temp, width, height);
  120. } else if (blurx) {
  121. blurh(blurx, values, temp, width, height);
  122. blurh(blurx, temp, values, width, height);
  123. blurh(blurx, values, temp, width, height);
  124. } else if (blury) {
  125. blurv(blury, values, temp, width, height);
  126. blurv(blury, temp, values, width, height);
  127. blurv(blury, values, temp, width, height);
  128. }
  129. return data;
  130. };
  131. }
  132. function blurh(blur, T, S, w, h) {
  133. for (let y = 0, n = w * h; y < n;) {
  134. blur(T, S, y, y += w, 1);
  135. }
  136. }
  137. function blurv(blur, T, S, w, h) {
  138. for (let x = 0, n = w * h; x < w; ++x) {
  139. blur(T, S, x, x + n, w);
  140. }
  141. }
  142. function blurfImage(radius) {
  143. const blur = blurf(radius);
  144. return (T, S, start, stop, step) => {
  145. start <<= 2, stop <<= 2, step <<= 2;
  146. blur(T, S, start + 0, stop + 0, step);
  147. blur(T, S, start + 1, stop + 1, step);
  148. blur(T, S, start + 2, stop + 2, step);
  149. blur(T, S, start + 3, stop + 3, step);
  150. };
  151. }
  152. // Given a target array T, a source array S, sets each value T[i] to the average
  153. // of {S[i - r], …, S[i], …, S[i + r]}, where r = ⌊radius⌋, start <= i < stop,
  154. // for each i, i + step, i + 2 * step, etc., and where S[j] is clamped between
  155. // S[start] (inclusive) and S[stop] (exclusive). If the given radius is not an
  156. // integer, S[i - r - 1] and S[i + r + 1] are added to the sum, each weighted
  157. // according to r - ⌊radius⌋.
  158. function blurf(radius) {
  159. const radius0 = Math.floor(radius);
  160. if (radius0 === radius) return bluri(radius);
  161. const t = radius - radius0;
  162. const w = 2 * radius + 1;
  163. return (T, S, start, stop, step) => { // stop must be aligned!
  164. if (!((stop -= step) >= start)) return; // inclusive stop
  165. let sum = radius0 * S[start];
  166. const s0 = step * radius0;
  167. const s1 = s0 + step;
  168. for (let i = start, j = start + s0; i < j; i += step) {
  169. sum += S[Math.min(stop, i)];
  170. }
  171. for (let i = start, j = stop; i <= j; i += step) {
  172. sum += S[Math.min(stop, i + s0)];
  173. T[i] = (sum + t * (S[Math.max(start, i - s1)] + S[Math.min(stop, i + s1)])) / w;
  174. sum -= S[Math.max(start, i - s0)];
  175. }
  176. };
  177. }
  178. // Like blurf, but optimized for integer radius.
  179. function bluri(radius) {
  180. const w = 2 * radius + 1;
  181. return (T, S, start, stop, step) => { // stop must be aligned!
  182. if (!((stop -= step) >= start)) return; // inclusive stop
  183. let sum = radius * S[start];
  184. const s = step * radius;
  185. for (let i = start, j = start + s; i < j; i += step) {
  186. sum += S[Math.min(stop, i)];
  187. }
  188. for (let i = start, j = stop; i <= j; i += step) {
  189. sum += S[Math.min(stop, i + s)];
  190. T[i] = sum / w;
  191. sum -= S[Math.max(start, i - s)];
  192. }
  193. };
  194. }
  195. function count(values, valueof) {
  196. let count = 0;
  197. if (valueof === undefined) {
  198. for (let value of values) {
  199. if (value != null && (value = +value) >= value) {
  200. ++count;
  201. }
  202. }
  203. } else {
  204. let index = -1;
  205. for (let value of values) {
  206. if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
  207. ++count;
  208. }
  209. }
  210. }
  211. return count;
  212. }
  213. function length$1(array) {
  214. return array.length | 0;
  215. }
  216. function empty(length) {
  217. return !(length > 0);
  218. }
  219. function arrayify(values) {
  220. return typeof values !== "object" || "length" in values ? values : Array.from(values);
  221. }
  222. function reducer(reduce) {
  223. return values => reduce(...values);
  224. }
  225. function cross(...values) {
  226. const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop());
  227. values = values.map(arrayify);
  228. const lengths = values.map(length$1);
  229. const j = values.length - 1;
  230. const index = new Array(j + 1).fill(0);
  231. const product = [];
  232. if (j < 0 || lengths.some(empty)) return product;
  233. while (true) {
  234. product.push(index.map((j, i) => values[i][j]));
  235. let i = j;
  236. while (++index[i] === lengths[i]) {
  237. if (i === 0) return reduce ? product.map(reduce) : product;
  238. index[i--] = 0;
  239. }
  240. }
  241. }
  242. function cumsum(values, valueof) {
  243. var sum = 0, index = 0;
  244. return Float64Array.from(values, valueof === undefined
  245. ? v => (sum += +v || 0)
  246. : v => (sum += +valueof(v, index++, values) || 0));
  247. }
  248. function variance(values, valueof) {
  249. let count = 0;
  250. let delta;
  251. let mean = 0;
  252. let sum = 0;
  253. if (valueof === undefined) {
  254. for (let value of values) {
  255. if (value != null && (value = +value) >= value) {
  256. delta = value - mean;
  257. mean += delta / ++count;
  258. sum += delta * (value - mean);
  259. }
  260. }
  261. } else {
  262. let index = -1;
  263. for (let value of values) {
  264. if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
  265. delta = value - mean;
  266. mean += delta / ++count;
  267. sum += delta * (value - mean);
  268. }
  269. }
  270. }
  271. if (count > 1) return sum / (count - 1);
  272. }
  273. function deviation(values, valueof) {
  274. const v = variance(values, valueof);
  275. return v ? Math.sqrt(v) : v;
  276. }
  277. function extent(values, valueof) {
  278. let min;
  279. let max;
  280. if (valueof === undefined) {
  281. for (const value of values) {
  282. if (value != null) {
  283. if (min === undefined) {
  284. if (value >= value) min = max = value;
  285. } else {
  286. if (min > value) min = value;
  287. if (max < value) max = value;
  288. }
  289. }
  290. }
  291. } else {
  292. let index = -1;
  293. for (let value of values) {
  294. if ((value = valueof(value, ++index, values)) != null) {
  295. if (min === undefined) {
  296. if (value >= value) min = max = value;
  297. } else {
  298. if (min > value) min = value;
  299. if (max < value) max = value;
  300. }
  301. }
  302. }
  303. }
  304. return [min, max];
  305. }
  306. // https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423
  307. class Adder {
  308. constructor() {
  309. this._partials = new Float64Array(32);
  310. this._n = 0;
  311. }
  312. add(x) {
  313. const p = this._partials;
  314. let i = 0;
  315. for (let j = 0; j < this._n && j < 32; j++) {
  316. const y = p[j],
  317. hi = x + y,
  318. lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);
  319. if (lo) p[i++] = lo;
  320. x = hi;
  321. }
  322. p[i] = x;
  323. this._n = i + 1;
  324. return this;
  325. }
  326. valueOf() {
  327. const p = this._partials;
  328. let n = this._n, x, y, lo, hi = 0;
  329. if (n > 0) {
  330. hi = p[--n];
  331. while (n > 0) {
  332. x = hi;
  333. y = p[--n];
  334. hi = x + y;
  335. lo = y - (hi - x);
  336. if (lo) break;
  337. }
  338. if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {
  339. y = lo * 2;
  340. x = hi + y;
  341. if (y == x - hi) hi = x;
  342. }
  343. }
  344. return hi;
  345. }
  346. }
  347. function fsum(values, valueof) {
  348. const adder = new Adder();
  349. if (valueof === undefined) {
  350. for (let value of values) {
  351. if (value = +value) {
  352. adder.add(value);
  353. }
  354. }
  355. } else {
  356. let index = -1;
  357. for (let value of values) {
  358. if (value = +valueof(value, ++index, values)) {
  359. adder.add(value);
  360. }
  361. }
  362. }
  363. return +adder;
  364. }
  365. function fcumsum(values, valueof) {
  366. const adder = new Adder();
  367. let index = -1;
  368. return Float64Array.from(values, valueof === undefined
  369. ? v => adder.add(+v || 0)
  370. : v => adder.add(+valueof(v, ++index, values) || 0)
  371. );
  372. }
  373. class InternMap extends Map {
  374. constructor(entries, key = keyof) {
  375. super();
  376. Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
  377. if (entries != null) for (const [key, value] of entries) this.set(key, value);
  378. }
  379. get(key) {
  380. return super.get(intern_get(this, key));
  381. }
  382. has(key) {
  383. return super.has(intern_get(this, key));
  384. }
  385. set(key, value) {
  386. return super.set(intern_set(this, key), value);
  387. }
  388. delete(key) {
  389. return super.delete(intern_delete(this, key));
  390. }
  391. }
  392. class InternSet extends Set {
  393. constructor(values, key = keyof) {
  394. super();
  395. Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});
  396. if (values != null) for (const value of values) this.add(value);
  397. }
  398. has(value) {
  399. return super.has(intern_get(this, value));
  400. }
  401. add(value) {
  402. return super.add(intern_set(this, value));
  403. }
  404. delete(value) {
  405. return super.delete(intern_delete(this, value));
  406. }
  407. }
  408. function intern_get({_intern, _key}, value) {
  409. const key = _key(value);
  410. return _intern.has(key) ? _intern.get(key) : value;
  411. }
  412. function intern_set({_intern, _key}, value) {
  413. const key = _key(value);
  414. if (_intern.has(key)) return _intern.get(key);
  415. _intern.set(key, value);
  416. return value;
  417. }
  418. function intern_delete({_intern, _key}, value) {
  419. const key = _key(value);
  420. if (_intern.has(key)) {
  421. value = _intern.get(key);
  422. _intern.delete(key);
  423. }
  424. return value;
  425. }
  426. function keyof(value) {
  427. return value !== null && typeof value === "object" ? value.valueOf() : value;
  428. }
  429. function identity(x) {
  430. return x;
  431. }
  432. function group(values, ...keys) {
  433. return nest(values, identity, identity, keys);
  434. }
  435. function groups(values, ...keys) {
  436. return nest(values, Array.from, identity, keys);
  437. }
  438. function flatten$1(groups, keys) {
  439. for (let i = 1, n = keys.length; i < n; ++i) {
  440. groups = groups.flatMap(g => g.pop().map(([key, value]) => [...g, key, value]));
  441. }
  442. return groups;
  443. }
  444. function flatGroup(values, ...keys) {
  445. return flatten$1(groups(values, ...keys), keys);
  446. }
  447. function flatRollup(values, reduce, ...keys) {
  448. return flatten$1(rollups(values, reduce, ...keys), keys);
  449. }
  450. function rollup(values, reduce, ...keys) {
  451. return nest(values, identity, reduce, keys);
  452. }
  453. function rollups(values, reduce, ...keys) {
  454. return nest(values, Array.from, reduce, keys);
  455. }
  456. function index(values, ...keys) {
  457. return nest(values, identity, unique, keys);
  458. }
  459. function indexes(values, ...keys) {
  460. return nest(values, Array.from, unique, keys);
  461. }
  462. function unique(values) {
  463. if (values.length !== 1) throw new Error("duplicate key");
  464. return values[0];
  465. }
  466. function nest(values, map, reduce, keys) {
  467. return (function regroup(values, i) {
  468. if (i >= keys.length) return reduce(values);
  469. const groups = new InternMap();
  470. const keyof = keys[i++];
  471. let index = -1;
  472. for (const value of values) {
  473. const key = keyof(value, ++index, values);
  474. const group = groups.get(key);
  475. if (group) group.push(value);
  476. else groups.set(key, [value]);
  477. }
  478. for (const [key, values] of groups) {
  479. groups.set(key, regroup(values, i));
  480. }
  481. return map(groups);
  482. })(values, 0);
  483. }
  484. function permute(source, keys) {
  485. return Array.from(keys, key => source[key]);
  486. }
  487. function sort(values, ...F) {
  488. if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
  489. values = Array.from(values);
  490. let [f] = F;
  491. if ((f && f.length !== 2) || F.length > 1) {
  492. const index = Uint32Array.from(values, (d, i) => i);
  493. if (F.length > 1) {
  494. F = F.map(f => values.map(f));
  495. index.sort((i, j) => {
  496. for (const f of F) {
  497. const c = ascendingDefined(f[i], f[j]);
  498. if (c) return c;
  499. }
  500. });
  501. } else {
  502. f = values.map(f);
  503. index.sort((i, j) => ascendingDefined(f[i], f[j]));
  504. }
  505. return permute(values, index);
  506. }
  507. return values.sort(compareDefined(f));
  508. }
  509. function compareDefined(compare = ascending) {
  510. if (compare === ascending) return ascendingDefined;
  511. if (typeof compare !== "function") throw new TypeError("compare is not a function");
  512. return (a, b) => {
  513. const x = compare(a, b);
  514. if (x || x === 0) return x;
  515. return (compare(b, b) === 0) - (compare(a, a) === 0);
  516. };
  517. }
  518. function ascendingDefined(a, b) {
  519. return (a == null || !(a >= a)) - (b == null || !(b >= b)) || (a < b ? -1 : a > b ? 1 : 0);
  520. }
  521. function groupSort(values, reduce, key) {
  522. return (reduce.length !== 2
  523. ? sort(rollup(values, reduce, key), (([ak, av], [bk, bv]) => ascending(av, bv) || ascending(ak, bk)))
  524. : sort(group(values, key), (([ak, av], [bk, bv]) => reduce(av, bv) || ascending(ak, bk))))
  525. .map(([key]) => key);
  526. }
  527. var array = Array.prototype;
  528. var slice = array.slice;
  529. function constant(x) {
  530. return () => x;
  531. }
  532. const e10 = Math.sqrt(50),
  533. e5 = Math.sqrt(10),
  534. e2 = Math.sqrt(2);
  535. function tickSpec(start, stop, count) {
  536. const step = (stop - start) / Math.max(0, count),
  537. power = Math.floor(Math.log10(step)),
  538. error = step / Math.pow(10, power),
  539. factor = error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1;
  540. let i1, i2, inc;
  541. if (power < 0) {
  542. inc = Math.pow(10, -power) / factor;
  543. i1 = Math.round(start * inc);
  544. i2 = Math.round(stop * inc);
  545. if (i1 / inc < start) ++i1;
  546. if (i2 / inc > stop) --i2;
  547. inc = -inc;
  548. } else {
  549. inc = Math.pow(10, power) * factor;
  550. i1 = Math.round(start / inc);
  551. i2 = Math.round(stop / inc);
  552. if (i1 * inc < start) ++i1;
  553. if (i2 * inc > stop) --i2;
  554. }
  555. if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
  556. return [i1, i2, inc];
  557. }
  558. function ticks(start, stop, count) {
  559. stop = +stop, start = +start, count = +count;
  560. if (!(count > 0)) return [];
  561. if (start === stop) return [start];
  562. const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
  563. if (!(i2 >= i1)) return [];
  564. const n = i2 - i1 + 1, ticks = new Array(n);
  565. if (reverse) {
  566. if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) / -inc;
  567. else for (let i = 0; i < n; ++i) ticks[i] = (i2 - i) * inc;
  568. } else {
  569. if (inc < 0) for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) / -inc;
  570. else for (let i = 0; i < n; ++i) ticks[i] = (i1 + i) * inc;
  571. }
  572. return ticks;
  573. }
  574. function tickIncrement(start, stop, count) {
  575. stop = +stop, start = +start, count = +count;
  576. return tickSpec(start, stop, count)[2];
  577. }
  578. function tickStep(start, stop, count) {
  579. stop = +stop, start = +start, count = +count;
  580. const reverse = stop < start, inc = reverse ? tickIncrement(stop, start, count) : tickIncrement(start, stop, count);
  581. return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
  582. }
  583. function nice(start, stop, count) {
  584. let prestep;
  585. while (true) {
  586. const step = tickIncrement(start, stop, count);
  587. if (step === prestep || step === 0 || !isFinite(step)) {
  588. return [start, stop];
  589. } else if (step > 0) {
  590. start = Math.floor(start / step) * step;
  591. stop = Math.ceil(stop / step) * step;
  592. } else if (step < 0) {
  593. start = Math.ceil(start * step) / step;
  594. stop = Math.floor(stop * step) / step;
  595. }
  596. prestep = step;
  597. }
  598. }
  599. function thresholdSturges(values) {
  600. return Math.max(1, Math.ceil(Math.log(count(values)) / Math.LN2) + 1);
  601. }
  602. function bin() {
  603. var value = identity,
  604. domain = extent,
  605. threshold = thresholdSturges;
  606. function histogram(data) {
  607. if (!Array.isArray(data)) data = Array.from(data);
  608. var i,
  609. n = data.length,
  610. x,
  611. step,
  612. values = new Array(n);
  613. for (i = 0; i < n; ++i) {
  614. values[i] = value(data[i], i, data);
  615. }
  616. var xz = domain(values),
  617. x0 = xz[0],
  618. x1 = xz[1],
  619. tz = threshold(values, x0, x1);
  620. // Convert number of thresholds into uniform thresholds, and nice the
  621. // default domain accordingly.
  622. if (!Array.isArray(tz)) {
  623. const max = x1, tn = +tz;
  624. if (domain === extent) [x0, x1] = nice(x0, x1, tn);
  625. tz = ticks(x0, x1, tn);
  626. // If the domain is aligned with the first tick (which it will by
  627. // default), then we can use quantization rather than bisection to bin
  628. // values, which is substantially faster.
  629. if (tz[0] <= x0) step = tickIncrement(x0, x1, tn);
  630. // If the last threshold is coincident with the domain’s upper bound, the
  631. // last bin will be zero-width. If the default domain is used, and this
  632. // last threshold is coincident with the maximum input value, we can
  633. // extend the niced upper bound by one tick to ensure uniform bin widths;
  634. // otherwise, we simply remove the last threshold. Note that we don’t
  635. // coerce values or the domain to numbers, and thus must be careful to
  636. // compare order (>=) rather than strict equality (===)!
  637. if (tz[tz.length - 1] >= x1) {
  638. if (max >= x1 && domain === extent) {
  639. const step = tickIncrement(x0, x1, tn);
  640. if (isFinite(step)) {
  641. if (step > 0) {
  642. x1 = (Math.floor(x1 / step) + 1) * step;
  643. } else if (step < 0) {
  644. x1 = (Math.ceil(x1 * -step) + 1) / -step;
  645. }
  646. }
  647. } else {
  648. tz.pop();
  649. }
  650. }
  651. }
  652. // Remove any thresholds outside the domain.
  653. // Be careful not to mutate an array owned by the user!
  654. var m = tz.length, a = 0, b = m;
  655. while (tz[a] <= x0) ++a;
  656. while (tz[b - 1] > x1) --b;
  657. if (a || b < m) tz = tz.slice(a, b), m = b - a;
  658. var bins = new Array(m + 1),
  659. bin;
  660. // Initialize bins.
  661. for (i = 0; i <= m; ++i) {
  662. bin = bins[i] = [];
  663. bin.x0 = i > 0 ? tz[i - 1] : x0;
  664. bin.x1 = i < m ? tz[i] : x1;
  665. }
  666. // Assign data to bins by value, ignoring any outside the domain.
  667. if (isFinite(step)) {
  668. if (step > 0) {
  669. for (i = 0; i < n; ++i) {
  670. if ((x = values[i]) != null && x0 <= x && x <= x1) {
  671. bins[Math.min(m, Math.floor((x - x0) / step))].push(data[i]);
  672. }
  673. }
  674. } else if (step < 0) {
  675. for (i = 0; i < n; ++i) {
  676. if ((x = values[i]) != null && x0 <= x && x <= x1) {
  677. const j = Math.floor((x0 - x) * step);
  678. bins[Math.min(m, j + (tz[j] <= x))].push(data[i]); // handle off-by-one due to rounding
  679. }
  680. }
  681. }
  682. } else {
  683. for (i = 0; i < n; ++i) {
  684. if ((x = values[i]) != null && x0 <= x && x <= x1) {
  685. bins[bisect(tz, x, 0, m)].push(data[i]);
  686. }
  687. }
  688. }
  689. return bins;
  690. }
  691. histogram.value = function(_) {
  692. return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value;
  693. };
  694. histogram.domain = function(_) {
  695. return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain;
  696. };
  697. histogram.thresholds = function(_) {
  698. return arguments.length ? (threshold = typeof _ === "function" ? _ : constant(Array.isArray(_) ? slice.call(_) : _), histogram) : threshold;
  699. };
  700. return histogram;
  701. }
  702. function max(values, valueof) {
  703. let max;
  704. if (valueof === undefined) {
  705. for (const value of values) {
  706. if (value != null
  707. && (max < value || (max === undefined && value >= value))) {
  708. max = value;
  709. }
  710. }
  711. } else {
  712. let index = -1;
  713. for (let value of values) {
  714. if ((value = valueof(value, ++index, values)) != null
  715. && (max < value || (max === undefined && value >= value))) {
  716. max = value;
  717. }
  718. }
  719. }
  720. return max;
  721. }
  722. function maxIndex(values, valueof) {
  723. let max;
  724. let maxIndex = -1;
  725. let index = -1;
  726. if (valueof === undefined) {
  727. for (const value of values) {
  728. ++index;
  729. if (value != null
  730. && (max < value || (max === undefined && value >= value))) {
  731. max = value, maxIndex = index;
  732. }
  733. }
  734. } else {
  735. for (let value of values) {
  736. if ((value = valueof(value, ++index, values)) != null
  737. && (max < value || (max === undefined && value >= value))) {
  738. max = value, maxIndex = index;
  739. }
  740. }
  741. }
  742. return maxIndex;
  743. }
  744. function min(values, valueof) {
  745. let min;
  746. if (valueof === undefined) {
  747. for (const value of values) {
  748. if (value != null
  749. && (min > value || (min === undefined && value >= value))) {
  750. min = value;
  751. }
  752. }
  753. } else {
  754. let index = -1;
  755. for (let value of values) {
  756. if ((value = valueof(value, ++index, values)) != null
  757. && (min > value || (min === undefined && value >= value))) {
  758. min = value;
  759. }
  760. }
  761. }
  762. return min;
  763. }
  764. function minIndex(values, valueof) {
  765. let min;
  766. let minIndex = -1;
  767. let index = -1;
  768. if (valueof === undefined) {
  769. for (const value of values) {
  770. ++index;
  771. if (value != null
  772. && (min > value || (min === undefined && value >= value))) {
  773. min = value, minIndex = index;
  774. }
  775. }
  776. } else {
  777. for (let value of values) {
  778. if ((value = valueof(value, ++index, values)) != null
  779. && (min > value || (min === undefined && value >= value))) {
  780. min = value, minIndex = index;
  781. }
  782. }
  783. }
  784. return minIndex;
  785. }
  786. // Based on https://github.com/mourner/quickselect
  787. // ISC license, Copyright 2018 Vladimir Agafonkin.
  788. function quickselect(array, k, left = 0, right = Infinity, compare) {
  789. k = Math.floor(k);
  790. left = Math.floor(Math.max(0, left));
  791. right = Math.floor(Math.min(array.length - 1, right));
  792. if (!(left <= k && k <= right)) return array;
  793. compare = compare === undefined ? ascendingDefined : compareDefined(compare);
  794. while (right > left) {
  795. if (right - left > 600) {
  796. const n = right - left + 1;
  797. const m = k - left + 1;
  798. const z = Math.log(n);
  799. const s = 0.5 * Math.exp(2 * z / 3);
  800. const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
  801. const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
  802. const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
  803. quickselect(array, k, newLeft, newRight, compare);
  804. }
  805. const t = array[k];
  806. let i = left;
  807. let j = right;
  808. swap(array, left, k);
  809. if (compare(array[right], t) > 0) swap(array, left, right);
  810. while (i < j) {
  811. swap(array, i, j), ++i, --j;
  812. while (compare(array[i], t) < 0) ++i;
  813. while (compare(array[j], t) > 0) --j;
  814. }
  815. if (compare(array[left], t) === 0) swap(array, left, j);
  816. else ++j, swap(array, j, right);
  817. if (j <= k) left = j + 1;
  818. if (k <= j) right = j - 1;
  819. }
  820. return array;
  821. }
  822. function swap(array, i, j) {
  823. const t = array[i];
  824. array[i] = array[j];
  825. array[j] = t;
  826. }
  827. function greatest(values, compare = ascending) {
  828. let max;
  829. let defined = false;
  830. if (compare.length === 1) {
  831. let maxValue;
  832. for (const element of values) {
  833. const value = compare(element);
  834. if (defined
  835. ? ascending(value, maxValue) > 0
  836. : ascending(value, value) === 0) {
  837. max = element;
  838. maxValue = value;
  839. defined = true;
  840. }
  841. }
  842. } else {
  843. for (const value of values) {
  844. if (defined
  845. ? compare(value, max) > 0
  846. : compare(value, value) === 0) {
  847. max = value;
  848. defined = true;
  849. }
  850. }
  851. }
  852. return max;
  853. }
  854. function quantile(values, p, valueof) {
  855. values = Float64Array.from(numbers(values, valueof));
  856. if (!(n = values.length) || isNaN(p = +p)) return;
  857. if (p <= 0 || n < 2) return min(values);
  858. if (p >= 1) return max(values);
  859. var n,
  860. i = (n - 1) * p,
  861. i0 = Math.floor(i),
  862. value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),
  863. value1 = min(values.subarray(i0 + 1));
  864. return value0 + (value1 - value0) * (i - i0);
  865. }
  866. function quantileSorted(values, p, valueof = number) {
  867. if (!(n = values.length) || isNaN(p = +p)) return;
  868. if (p <= 0 || n < 2) return +valueof(values[0], 0, values);
  869. if (p >= 1) return +valueof(values[n - 1], n - 1, values);
  870. var n,
  871. i = (n - 1) * p,
  872. i0 = Math.floor(i),
  873. value0 = +valueof(values[i0], i0, values),
  874. value1 = +valueof(values[i0 + 1], i0 + 1, values);
  875. return value0 + (value1 - value0) * (i - i0);
  876. }
  877. function quantileIndex(values, p, valueof = number) {
  878. if (isNaN(p = +p)) return;
  879. numbers = Float64Array.from(values, (_, i) => number(valueof(values[i], i, values)));
  880. if (p <= 0) return minIndex(numbers);
  881. if (p >= 1) return maxIndex(numbers);
  882. var numbers,
  883. index = Uint32Array.from(values, (_, i) => i),
  884. j = numbers.length - 1,
  885. i = Math.floor(j * p);
  886. quickselect(index, i, 0, j, (i, j) => ascendingDefined(numbers[i], numbers[j]));
  887. i = greatest(index.subarray(0, i + 1), (i) => numbers[i]);
  888. return i >= 0 ? i : -1;
  889. }
  890. function thresholdFreedmanDiaconis(values, min, max) {
  891. const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25);
  892. return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1;
  893. }
  894. function thresholdScott(values, min, max) {
  895. const c = count(values), d = deviation(values);
  896. return c && d ? Math.ceil((max - min) * Math.cbrt(c) / (3.49 * d)) : 1;
  897. }
  898. function mean(values, valueof) {
  899. let count = 0;
  900. let sum = 0;
  901. if (valueof === undefined) {
  902. for (let value of values) {
  903. if (value != null && (value = +value) >= value) {
  904. ++count, sum += value;
  905. }
  906. }
  907. } else {
  908. let index = -1;
  909. for (let value of values) {
  910. if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
  911. ++count, sum += value;
  912. }
  913. }
  914. }
  915. if (count) return sum / count;
  916. }
  917. function median(values, valueof) {
  918. return quantile(values, 0.5, valueof);
  919. }
  920. function medianIndex(values, valueof) {
  921. return quantileIndex(values, 0.5, valueof);
  922. }
  923. function* flatten(arrays) {
  924. for (const array of arrays) {
  925. yield* array;
  926. }
  927. }
  928. function merge(arrays) {
  929. return Array.from(flatten(arrays));
  930. }
  931. function mode(values, valueof) {
  932. const counts = new InternMap();
  933. if (valueof === undefined) {
  934. for (let value of values) {
  935. if (value != null && value >= value) {
  936. counts.set(value, (counts.get(value) || 0) + 1);
  937. }
  938. }
  939. } else {
  940. let index = -1;
  941. for (let value of values) {
  942. if ((value = valueof(value, ++index, values)) != null && value >= value) {
  943. counts.set(value, (counts.get(value) || 0) + 1);
  944. }
  945. }
  946. }
  947. let modeValue;
  948. let modeCount = 0;
  949. for (const [value, count] of counts) {
  950. if (count > modeCount) {
  951. modeCount = count;
  952. modeValue = value;
  953. }
  954. }
  955. return modeValue;
  956. }
  957. function pairs(values, pairof = pair) {
  958. const pairs = [];
  959. let previous;
  960. let first = false;
  961. for (const value of values) {
  962. if (first) pairs.push(pairof(previous, value));
  963. previous = value;
  964. first = true;
  965. }
  966. return pairs;
  967. }
  968. function pair(a, b) {
  969. return [a, b];
  970. }
  971. function range(start, stop, step) {
  972. start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
  973. var i = -1,
  974. n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
  975. range = new Array(n);
  976. while (++i < n) {
  977. range[i] = start + i * step;
  978. }
  979. return range;
  980. }
  981. function rank(values, valueof = ascending) {
  982. if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
  983. let V = Array.from(values);
  984. const R = new Float64Array(V.length);
  985. if (valueof.length !== 2) V = V.map(valueof), valueof = ascending;
  986. const compareIndex = (i, j) => valueof(V[i], V[j]);
  987. let k, r;
  988. values = Uint32Array.from(V, (_, i) => i);
  989. // Risky chaining due to Safari 14 https://github.com/d3/d3-array/issues/123
  990. values.sort(valueof === ascending ? (i, j) => ascendingDefined(V[i], V[j]) : compareDefined(compareIndex));
  991. values.forEach((j, i) => {
  992. const c = compareIndex(j, k === undefined ? j : k);
  993. if (c >= 0) {
  994. if (k === undefined || c > 0) k = j, r = i;
  995. R[j] = r;
  996. } else {
  997. R[j] = NaN;
  998. }
  999. });
  1000. return R;
  1001. }
  1002. function least(values, compare = ascending) {
  1003. let min;
  1004. let defined = false;
  1005. if (compare.length === 1) {
  1006. let minValue;
  1007. for (const element of values) {
  1008. const value = compare(element);
  1009. if (defined
  1010. ? ascending(value, minValue) < 0
  1011. : ascending(value, value) === 0) {
  1012. min = element;
  1013. minValue = value;
  1014. defined = true;
  1015. }
  1016. }
  1017. } else {
  1018. for (const value of values) {
  1019. if (defined
  1020. ? compare(value, min) < 0
  1021. : compare(value, value) === 0) {
  1022. min = value;
  1023. defined = true;
  1024. }
  1025. }
  1026. }
  1027. return min;
  1028. }
  1029. function leastIndex(values, compare = ascending) {
  1030. if (compare.length === 1) return minIndex(values, compare);
  1031. let minValue;
  1032. let min = -1;
  1033. let index = -1;
  1034. for (const value of values) {
  1035. ++index;
  1036. if (min < 0
  1037. ? compare(value, value) === 0
  1038. : compare(value, minValue) < 0) {
  1039. minValue = value;
  1040. min = index;
  1041. }
  1042. }
  1043. return min;
  1044. }
  1045. function greatestIndex(values, compare = ascending) {
  1046. if (compare.length === 1) return maxIndex(values, compare);
  1047. let maxValue;
  1048. let max = -1;
  1049. let index = -1;
  1050. for (const value of values) {
  1051. ++index;
  1052. if (max < 0
  1053. ? compare(value, value) === 0
  1054. : compare(value, maxValue) > 0) {
  1055. maxValue = value;
  1056. max = index;
  1057. }
  1058. }
  1059. return max;
  1060. }
  1061. function scan(values, compare) {
  1062. const index = leastIndex(values, compare);
  1063. return index < 0 ? undefined : index;
  1064. }
  1065. var shuffle = shuffler(Math.random);
  1066. function shuffler(random) {
  1067. return function shuffle(array, i0 = 0, i1 = array.length) {
  1068. let m = i1 - (i0 = +i0);
  1069. while (m) {
  1070. const i = random() * m-- | 0, t = array[m + i0];
  1071. array[m + i0] = array[i + i0];
  1072. array[i + i0] = t;
  1073. }
  1074. return array;
  1075. };
  1076. }
  1077. function sum(values, valueof) {
  1078. let sum = 0;
  1079. if (valueof === undefined) {
  1080. for (let value of values) {
  1081. if (value = +value) {
  1082. sum += value;
  1083. }
  1084. }
  1085. } else {
  1086. let index = -1;
  1087. for (let value of values) {
  1088. if (value = +valueof(value, ++index, values)) {
  1089. sum += value;
  1090. }
  1091. }
  1092. }
  1093. return sum;
  1094. }
  1095. function transpose(matrix) {
  1096. if (!(n = matrix.length)) return [];
  1097. for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {
  1098. for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
  1099. row[j] = matrix[j][i];
  1100. }
  1101. }
  1102. return transpose;
  1103. }
  1104. function length(d) {
  1105. return d.length;
  1106. }
  1107. function zip() {
  1108. return transpose(arguments);
  1109. }
  1110. function every(values, test) {
  1111. if (typeof test !== "function") throw new TypeError("test is not a function");
  1112. let index = -1;
  1113. for (const value of values) {
  1114. if (!test(value, ++index, values)) {
  1115. return false;
  1116. }
  1117. }
  1118. return true;
  1119. }
  1120. function some(values, test) {
  1121. if (typeof test !== "function") throw new TypeError("test is not a function");
  1122. let index = -1;
  1123. for (const value of values) {
  1124. if (test(value, ++index, values)) {
  1125. return true;
  1126. }
  1127. }
  1128. return false;
  1129. }
  1130. function filter(values, test) {
  1131. if (typeof test !== "function") throw new TypeError("test is not a function");
  1132. const array = [];
  1133. let index = -1;
  1134. for (const value of values) {
  1135. if (test(value, ++index, values)) {
  1136. array.push(value);
  1137. }
  1138. }
  1139. return array;
  1140. }
  1141. function map(values, mapper) {
  1142. if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
  1143. if (typeof mapper !== "function") throw new TypeError("mapper is not a function");
  1144. return Array.from(values, (value, index) => mapper(value, index, values));
  1145. }
  1146. function reduce(values, reducer, value) {
  1147. if (typeof reducer !== "function") throw new TypeError("reducer is not a function");
  1148. const iterator = values[Symbol.iterator]();
  1149. let done, next, index = -1;
  1150. if (arguments.length < 3) {
  1151. ({done, value} = iterator.next());
  1152. if (done) return;
  1153. ++index;
  1154. }
  1155. while (({done, value: next} = iterator.next()), !done) {
  1156. value = reducer(value, next, ++index, values);
  1157. }
  1158. return value;
  1159. }
  1160. function reverse(values) {
  1161. if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable");
  1162. return Array.from(values).reverse();
  1163. }
  1164. function difference(values, ...others) {
  1165. values = new InternSet(values);
  1166. for (const other of others) {
  1167. for (const value of other) {
  1168. values.delete(value);
  1169. }
  1170. }
  1171. return values;
  1172. }
  1173. function disjoint(values, other) {
  1174. const iterator = other[Symbol.iterator](), set = new InternSet();
  1175. for (const v of values) {
  1176. if (set.has(v)) return false;
  1177. let value, done;
  1178. while (({value, done} = iterator.next())) {
  1179. if (done) break;
  1180. if (Object.is(v, value)) return false;
  1181. set.add(value);
  1182. }
  1183. }
  1184. return true;
  1185. }
  1186. function intersection(values, ...others) {
  1187. values = new InternSet(values);
  1188. others = others.map(set);
  1189. out: for (const value of values) {
  1190. for (const other of others) {
  1191. if (!other.has(value)) {
  1192. values.delete(value);
  1193. continue out;
  1194. }
  1195. }
  1196. }
  1197. return values;
  1198. }
  1199. function set(values) {
  1200. return values instanceof InternSet ? values : new InternSet(values);
  1201. }
  1202. function superset(values, other) {
  1203. const iterator = values[Symbol.iterator](), set = new Set();
  1204. for (const o of other) {
  1205. const io = intern(o);
  1206. if (set.has(io)) continue;
  1207. let value, done;
  1208. while (({value, done} = iterator.next())) {
  1209. if (done) return false;
  1210. const ivalue = intern(value);
  1211. set.add(ivalue);
  1212. if (Object.is(io, ivalue)) break;
  1213. }
  1214. }
  1215. return true;
  1216. }
  1217. function intern(value) {
  1218. return value !== null && typeof value === "object" ? value.valueOf() : value;
  1219. }
  1220. function subset(values, other) {
  1221. return superset(other, values);
  1222. }
  1223. function union(...others) {
  1224. const set = new InternSet();
  1225. for (const other of others) {
  1226. for (const o of other) {
  1227. set.add(o);
  1228. }
  1229. }
  1230. return set;
  1231. }
  1232. exports.Adder = Adder;
  1233. exports.InternMap = InternMap;
  1234. exports.InternSet = InternSet;
  1235. exports.ascending = ascending;
  1236. exports.bin = bin;
  1237. exports.bisect = bisect;
  1238. exports.bisectCenter = bisectCenter;
  1239. exports.bisectLeft = bisectLeft;
  1240. exports.bisectRight = bisectRight;
  1241. exports.bisector = bisector;
  1242. exports.blur = blur;
  1243. exports.blur2 = blur2;
  1244. exports.blurImage = blurImage;
  1245. exports.count = count;
  1246. exports.cross = cross;
  1247. exports.cumsum = cumsum;
  1248. exports.descending = descending;
  1249. exports.deviation = deviation;
  1250. exports.difference = difference;
  1251. exports.disjoint = disjoint;
  1252. exports.every = every;
  1253. exports.extent = extent;
  1254. exports.fcumsum = fcumsum;
  1255. exports.filter = filter;
  1256. exports.flatGroup = flatGroup;
  1257. exports.flatRollup = flatRollup;
  1258. exports.fsum = fsum;
  1259. exports.greatest = greatest;
  1260. exports.greatestIndex = greatestIndex;
  1261. exports.group = group;
  1262. exports.groupSort = groupSort;
  1263. exports.groups = groups;
  1264. exports.histogram = bin;
  1265. exports.index = index;
  1266. exports.indexes = indexes;
  1267. exports.intersection = intersection;
  1268. exports.least = least;
  1269. exports.leastIndex = leastIndex;
  1270. exports.map = map;
  1271. exports.max = max;
  1272. exports.maxIndex = maxIndex;
  1273. exports.mean = mean;
  1274. exports.median = median;
  1275. exports.medianIndex = medianIndex;
  1276. exports.merge = merge;
  1277. exports.min = min;
  1278. exports.minIndex = minIndex;
  1279. exports.mode = mode;
  1280. exports.nice = nice;
  1281. exports.pairs = pairs;
  1282. exports.permute = permute;
  1283. exports.quantile = quantile;
  1284. exports.quantileIndex = quantileIndex;
  1285. exports.quantileSorted = quantileSorted;
  1286. exports.quickselect = quickselect;
  1287. exports.range = range;
  1288. exports.rank = rank;
  1289. exports.reduce = reduce;
  1290. exports.reverse = reverse;
  1291. exports.rollup = rollup;
  1292. exports.rollups = rollups;
  1293. exports.scan = scan;
  1294. exports.shuffle = shuffle;
  1295. exports.shuffler = shuffler;
  1296. exports.some = some;
  1297. exports.sort = sort;
  1298. exports.subset = subset;
  1299. exports.sum = sum;
  1300. exports.superset = superset;
  1301. exports.thresholdFreedmanDiaconis = thresholdFreedmanDiaconis;
  1302. exports.thresholdScott = thresholdScott;
  1303. exports.thresholdSturges = thresholdSturges;
  1304. exports.tickIncrement = tickIncrement;
  1305. exports.tickStep = tickStep;
  1306. exports.ticks = ticks;
  1307. exports.transpose = transpose;
  1308. exports.union = union;
  1309. exports.variance = variance;
  1310. exports.zip = zip;
  1311. }));