1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-18 20:59:39 +02:00
Maybe/vendor/javascript/d3-array.js
Josh Pigford 868d4ede6e
Sankey Diagram (#2269)
* Enhance cash flow dashboard with new cash flow period handling and improved Sankey diagram rendering. Update D3 and related dependencies for better performance and features.

* Fix Rubocop offenses

* Refactor Sankey chart controller to use Number.parseFloat for value formatting and improve code readability by restructuring conditional logic for node shapes.
2025-05-20 13:31:05 -05:00

4 lines
18 KiB
JavaScript

// d3-array@3.2.4 downloaded from https://ga.jspm.io/npm:d3-array@3.2.4/src/index.js
import{InternMap as t,InternSet as n}from"internmap";export{InternMap,InternSet}from"internmap";function ascending(t,n){return null==t||null==n?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function descending(t,n){return null==t||null==n?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function bisector(t){let n,e,r;if(2!==t.length){n=ascending;e=(n,e)=>ascending(t(n),e);r=(n,e)=>t(n)-e}else{n=t===ascending||t===descending?t:zero;e=t;r=t}function left(t,r,o=0,i=t.length){if(o<i){if(0!==n(r,r))return i;do{const n=o+i>>>1;e(t[n],r)<0?o=n+1:i=n}while(o<i)}return o}function right(t,r,o=0,i=t.length){if(o<i){if(0!==n(r,r))return i;do{const n=o+i>>>1;e(t[n],r)<=0?o=n+1:i=n}while(o<i)}return o}function center(t,n,e=0,o=t.length){const i=left(t,n,e,o-1);return i>e&&r(t[i-1],n)>-r(t[i],n)?i-1:i}return{left:left,center:center,right:right}}function zero(){return 0}function number(t){return null===t?NaN:+t}function*numbers(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}const e=bisector(ascending);const r=e.right;const o=e.left;const i=bisector(number).center;function blur(t,n){if(!((n=+n)>=0))throw new RangeError("invalid r");let e=t.length;if(!((e=Math.floor(e))>=0))throw new RangeError("invalid length");if(!e||!n)return t;const r=blurf(n);const o=t.slice();r(t,o,0,e,1);r(o,t,0,e,1);r(t,o,0,e,1);return t}const f=Blur2(blurf);const u=Blur2(blurfImage);function Blur2(t){return function(n,e,r=e){if(!((e=+e)>=0))throw new RangeError("invalid rx");if(!((r=+r)>=0))throw new RangeError("invalid ry");let{data:o,width:i,height:f}=n;if(!((i=Math.floor(i))>=0))throw new RangeError("invalid width");if(!((f=Math.floor(void 0!==f?f:o.length/i))>=0))throw new RangeError("invalid height");if(!i||!f||!e&&!r)return n;const u=e&&t(e);const l=r&&t(r);const c=o.slice();if(u&&l){blurh(u,c,o,i,f);blurh(u,o,c,i,f);blurh(u,c,o,i,f);blurv(l,o,c,i,f);blurv(l,c,o,i,f);blurv(l,o,c,i,f)}else if(u){blurh(u,o,c,i,f);blurh(u,c,o,i,f);blurh(u,o,c,i,f)}else if(l){blurv(l,o,c,i,f);blurv(l,c,o,i,f);blurv(l,o,c,i,f)}return n}}function blurh(t,n,e,r,o){for(let i=0,f=r*o;i<f;)t(n,e,i,i+=r,1)}function blurv(t,n,e,r,o){for(let i=0,f=r*o;i<r;++i)t(n,e,i,i+f,r)}function blurfImage(t){const n=blurf(t);return(t,e,r,o,i)=>{r<<=2,o<<=2,i<<=2;n(t,e,r+0,o+0,i);n(t,e,r+1,o+1,i);n(t,e,r+2,o+2,i);n(t,e,r+3,o+3,i)}}function blurf(t){const n=Math.floor(t);if(n===t)return bluri(t);const e=t-n;const r=2*t+1;return(t,o,i,f,u)=>{if(!((f-=u)>=i))return;let l=n*o[i];const c=u*n;const s=c+u;for(let t=i,n=i+c;t<n;t+=u)l+=o[Math.min(f,t)];for(let n=i,a=f;n<=a;n+=u){l+=o[Math.min(f,n+c)];t[n]=(l+e*(o[Math.max(i,n-s)]+o[Math.min(f,n+s)]))/r;l-=o[Math.max(i,n-c)]}}}function bluri(t){const n=2*t+1;return(e,r,o,i,f)=>{if(!((i-=f)>=o))return;let u=t*r[o];const l=f*t;for(let t=o,n=o+l;t<n;t+=f)u+=r[Math.min(i,t)];for(let t=o,c=i;t<=c;t+=f){u+=r[Math.min(i,t+l)];e[t]=u/n;u-=r[Math.max(o,t-l)]}}}function count(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(o=+o)>=o&&++e}return e}function length$1(t){return 0|t.length}function empty(t){return!(t>0)}function arrayify(t){return"object"!==typeof t||"length"in t?t:Array.from(t)}function reducer(t){return n=>t(...n)}function cross(...t){const n="function"===typeof t[t.length-1]&&reducer(t.pop());t=t.map(arrayify);const e=t.map(length$1);const r=t.length-1;const o=new Array(r+1).fill(0);const i=[];if(r<0||e.some(empty))return i;while(true){i.push(o.map(((n,e)=>t[e][n])));let f=r;while(++o[f]===e[f]){if(0===f)return n?i.map(n):i;o[f--]=0}}}function cumsum(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:o=>e+=+n(o,r++,t)||0)}function variance(t,n){let e=0;let r;let o=0;let i=0;if(void 0===n){for(let n of t)if(null!=n&&(n=+n)>=n){r=n-o;o+=r/++e;i+=r*(n-o)}}else{let f=-1;for(let u of t)if(null!=(u=n(u,++f,t))&&(u=+u)>=u){r=u-o;o+=r/++e;i+=r*(u-o)}}if(e>1)return i/(e-1)}function deviation(t,n){const e=variance(t,n);return e?Math.sqrt(e):e}function extent(t,n){let e;let r;if(void 0===n){for(const n of t)if(null!=n)if(void 0===e)n>=n&&(e=r=n);else{e>n&&(e=n);r<n&&(r=n)}}else{let o=-1;for(let i of t)if(null!=(i=n(i,++o,t)))if(void 0===e)i>=i&&(e=r=i);else{e>i&&(e=i);r<i&&(r=i)}}return[e,r]}class Adder{constructor(){this._partials=new Float64Array(32);this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const o=n[r],i=t+o,f=Math.abs(t)<Math.abs(o)?t-(i-o):o-(i-t);f&&(n[e++]=f);t=i}n[e]=t;this._n=e+1;return this}valueOf(){const t=this._partials;let n,e,r,o=this._n,i=0;if(o>0){i=t[--o];while(o>0){n=i;e=t[--o];i=n+e;r=e-(i-n);if(r)break}if(o>0&&(r<0&&t[o-1]<0||r>0&&t[o-1]>0)){e=2*r;n=i+e;e==n-i&&(i=n)}}return i}}function fsum(t,n){const e=new Adder;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let o of t)(o=+n(o,++r,t))&&e.add(o)}return+e}function fcumsum(t,n){const e=new Adder;let r=-1;return Float64Array.from(t,void 0===n?t=>e.add(+t||0):o=>e.add(+n(o,++r,t)||0))}function identity(t){return t}function group(t,...n){return nest(t,identity,identity,n)}function groups(t,...n){return nest(t,Array.from,identity,n)}function flatten$1(t,n){for(let e=1,r=n.length;e<r;++e)t=t.flatMap((t=>t.pop().map((([n,e])=>[...t,n,e]))));return t}function flatGroup(t,...n){return flatten$1(groups(t,...n),n)}function flatRollup(t,n,...e){return flatten$1(rollups(t,n,...e),e)}function rollup(t,n,...e){return nest(t,identity,n,e)}function rollups(t,n,...e){return nest(t,Array.from,n,e)}function index(t,...n){return nest(t,identity,unique,n)}function indexes(t,...n){return nest(t,Array.from,unique,n)}function unique(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function nest(n,e,r,o){return function regroup(n,i){if(i>=o.length)return r(n);const f=new t;const u=o[i++];let l=-1;for(const t of n){const e=u(t,++l,n);const r=f.get(e);r?r.push(t):f.set(e,[t])}for(const[t,n]of f)f.set(t,regroup(n,i));return e(f)}(n,0)}function permute(t,n){return Array.from(n,(n=>t[n]))}function sort(t,...n){if("function"!==typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[e]=n;if(e&&2!==e.length||n.length>1){const r=Uint32Array.from(t,((t,n)=>n));if(n.length>1){n=n.map((n=>t.map(n)));r.sort(((t,e)=>{for(const r of n){const n=ascendingDefined(r[t],r[e]);if(n)return n}}))}else{e=t.map(e);r.sort(((t,n)=>ascendingDefined(e[t],e[n])))}return permute(t,r)}return t.sort(compareDefined(e))}function compareDefined(t=ascending){if(t===ascending)return ascendingDefined;if("function"!==typeof t)throw new TypeError("compare is not a function");return(n,e)=>{const r=t(n,e);return r||0===r?r:(0===t(e,e))-(0===t(n,n))}}function ascendingDefined(t,n){return(null==t||!(t>=t))-(null==n||!(n>=n))||(t<n?-1:t>n?1:0)}function groupSort(t,n,e){return(2!==n.length?sort(rollup(t,n,e),(([t,n],[e,r])=>ascending(n,r)||ascending(t,e))):sort(group(t,e),(([t,e],[r,o])=>n(e,o)||ascending(t,r)))).map((([t])=>t))}var l=Array.prototype;var c=l.slice;l.map;function constant(t){return()=>t}const s=Math.sqrt(50),a=Math.sqrt(10),h=Math.sqrt(2);function tickSpec(t,n,e){const r=(n-t)/Math.max(0,e),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),f=i>=s?10:i>=a?5:i>=h?2:1;let u,l,c;if(o<0){c=Math.pow(10,-o)/f;u=Math.round(t*c);l=Math.round(n*c);u/c<t&&++u;l/c>n&&--l;c=-c}else{c=Math.pow(10,o)*f;u=Math.round(t/c);l=Math.round(n/c);u*c<t&&++u;l*c>n&&--l}return l<u&&.5<=e&&e<2?tickSpec(t,n,2*e):[u,l,c]}function ticks(t,n,e){n=+n,t=+t,e=+e;if(!(e>0))return[];if(t===n)return[t];const r=n<t,[o,i,f]=r?tickSpec(n,t,e):tickSpec(t,n,e);if(!(i>=o))return[];const u=i-o+1,l=new Array(u);if(r)if(f<0)for(let t=0;t<u;++t)l[t]=(i-t)/-f;else for(let t=0;t<u;++t)l[t]=(i-t)*f;else if(f<0)for(let t=0;t<u;++t)l[t]=(o+t)/-f;else for(let t=0;t<u;++t)l[t]=(o+t)*f;return l}function tickIncrement(t,n,e){n=+n,t=+t,e=+e;return tickSpec(t,n,e)[2]}function tickStep(t,n,e){n=+n,t=+t,e=+e;const r=n<t,o=r?tickIncrement(n,t,e):tickIncrement(t,n,e);return(r?-1:1)*(o<0?1/-o:o)}function nice(t,n,e){let r;while(true){const o=tickIncrement(t,n,e);if(o===r||0===o||!isFinite(o))return[t,n];if(o>0){t=Math.floor(t/o)*o;n=Math.ceil(n/o)*o}else if(o<0){t=Math.ceil(t*o)/o;n=Math.floor(n*o)/o}r=o}}function thresholdSturges(t){return Math.max(1,Math.ceil(Math.log(count(t))/Math.LN2)+1)}function bin(){var t=identity,n=extent,e=thresholdSturges;function histogram(o){Array.isArray(o)||(o=Array.from(o));var i,f,u,l=o.length,c=new Array(l);for(i=0;i<l;++i)c[i]=t(o[i],i,o);var s=n(c),a=s[0],h=s[1],d=e(c,a,h);if(!Array.isArray(d)){const t=h,e=+d;n===extent&&([a,h]=nice(a,h,e));d=ticks(a,h,e);d[0]<=a&&(u=tickIncrement(a,h,e));if(d[d.length-1]>=h)if(t>=h&&n===extent){const t=tickIncrement(a,h,e);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=(Math.ceil(h*-t)+1)/-t))}else d.pop()}var m=d.length,p=0,g=m;while(d[p]<=a)++p;while(d[g-1]>h)--g;(p||g<m)&&(d=d.slice(p,g),m=g-p);var y,w=new Array(m+1);for(i=0;i<=m;++i){y=w[i]=[];y.x0=i>0?d[i-1]:a;y.x1=i<m?d[i]:h}if(isFinite(u)){if(u>0)for(i=0;i<l;++i)null!=(f=c[i])&&a<=f&&f<=h&&w[Math.min(m,Math.floor((f-a)/u))].push(o[i]);else if(u<0)for(i=0;i<l;++i)if(null!=(f=c[i])&&a<=f&&f<=h){const t=Math.floor((a-f)*u);w[Math.min(m,t+(d[t]<=f))].push(o[i])}}else for(i=0;i<l;++i)null!=(f=c[i])&&a<=f&&f<=h&&w[r(d,f,0,m)].push(o[i]);return w}histogram.value=function(n){return arguments.length?(t="function"===typeof n?n:constant(n),histogram):t};histogram.domain=function(t){return arguments.length?(n="function"===typeof t?t:constant([t[0],t[1]]),histogram):n};histogram.thresholds=function(t){return arguments.length?(e="function"===typeof t?t:constant(Array.isArray(t)?c.call(t):t),histogram):e};return histogram}function max(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(e<o||void 0===e&&o>=o)&&(e=o)}return e}function maxIndex(t,n){let e;let r=-1;let o=-1;if(void 0===n)for(const n of t){++o;null!=n&&(e<n||void 0===e&&n>=n)&&(e=n,r=o)}else for(let i of t)null!=(i=n(i,++o,t))&&(e<i||void 0===e&&i>=i)&&(e=i,r=o);return r}function min(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let o of t)null!=(o=n(o,++r,t))&&(e>o||void 0===e&&o>=o)&&(e=o)}return e}function minIndex(t,n){let e;let r=-1;let o=-1;if(void 0===n)for(const n of t){++o;null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=o)}else for(let i of t)null!=(i=n(i,++o,t))&&(e>i||void 0===e&&i>=i)&&(e=i,r=o);return r}function quickselect(t,n,e=0,r=Infinity,o){n=Math.floor(n);e=Math.floor(Math.max(0,e));r=Math.floor(Math.min(t.length-1,r));if(!(e<=n&&n<=r))return t;o=void 0===o?ascendingDefined:compareDefined(o);while(r>e){if(r-e>600){const i=r-e+1;const f=n-e+1;const u=Math.log(i);const l=.5*Math.exp(2*u/3);const c=.5*Math.sqrt(u*l*(i-l)/i)*(f-i/2<0?-1:1);const s=Math.max(e,Math.floor(n-f*l/i+c));const a=Math.min(r,Math.floor(n+(i-f)*l/i+c));quickselect(t,n,s,a,o)}const i=t[n];let f=e;let u=r;swap(t,e,n);o(t[r],i)>0&&swap(t,e,r);while(f<u){swap(t,f,u),++f,--u;while(o(t[f],i)<0)++f;while(o(t[u],i)>0)--u}0===o(t[e],i)?swap(t,e,u):(++u,swap(t,u,r));u<=n&&(e=u+1);n<=u&&(r=u-1)}return t}function swap(t,n,e){const r=t[n];t[n]=t[e];t[e]=r}function greatest(t,n=ascending){let e;let r=false;if(1===n.length){let o;for(const i of t){const t=n(i);if(r?ascending(t,o)>0:0===ascending(t,t)){e=i;o=t;r=true}}}else for(const o of t)if(r?n(o,e)>0:0===n(o,o)){e=o;r=true}return e}function quantile(t,n,e){t=Float64Array.from(numbers(t,e));if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return min(t);if(n>=1)return max(t);var r,o=(r-1)*n,i=Math.floor(o),f=max(quickselect(t,i).subarray(0,i+1)),u=min(t.subarray(i+1));return f+(u-f)*(o-i)}}function quantileSorted(t,n,e=number){if((r=t.length)&&!isNaN(n=+n)){if(n<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,o=(r-1)*n,i=Math.floor(o),f=+e(t[i],i,t),u=+e(t[i+1],i+1,t);return f+(u-f)*(o-i)}}function quantileIndex(t,n,e=number){if(!isNaN(n=+n)){r=Float64Array.from(t,((n,r)=>number(e(t[r],r,t))));if(n<=0)return minIndex(r);if(n>=1)return maxIndex(r);var r,o=Uint32Array.from(t,((t,n)=>n)),i=r.length-1,f=Math.floor(i*n);quickselect(o,f,0,i,((t,n)=>ascendingDefined(r[t],r[n])));f=greatest(o.subarray(0,f+1),(t=>r[t]));return f>=0?f:-1}}function thresholdFreedmanDiaconis(t,n,e){const r=count(t),o=quantile(t,.75)-quantile(t,.25);return r&&o?Math.ceil((e-n)/(2*o*Math.pow(r,-1/3))):1}function thresholdScott(t,n,e){const r=count(t),o=deviation(t);return r&&o?Math.ceil((e-n)*Math.cbrt(r)/(3.49*o)):1}function mean(t,n){let e=0;let r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let o=-1;for(let i of t)null!=(i=n(i,++o,t))&&(i=+i)>=i&&(++e,r+=i)}if(e)return r/e}function median(t,n){return quantile(t,.5,n)}function medianIndex(t,n){return quantileIndex(t,.5,n)}function*flatten(t){for(const n of t)yield*n}function merge(t){return Array.from(flatten(t))}function mode(n,e){const r=new t;if(void 0===e)for(let t of n)null!=t&&t>=t&&r.set(t,(r.get(t)||0)+1);else{let t=-1;for(let o of n)null!=(o=e(o,++t,n))&&o>=o&&r.set(o,(r.get(o)||0)+1)}let o;let i=0;for(const[t,n]of r)if(n>i){i=n;o=t}return o}function pairs(t,n=pair){const e=[];let r;let o=false;for(const i of t){o&&e.push(n(r,i));r=i;o=true}return e}function pair(t,n){return[t,n]}function range(t,n,e){t=+t,n=+n,e=(o=arguments.length)<2?(n=t,t=0,1):o<3?1:+e;var r=-1,o=0|Math.max(0,Math.ceil((n-t)/e)),i=new Array(o);while(++r<o)i[r]=t+r*e;return i}function rank(t,n=ascending){if("function"!==typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let e=Array.from(t);const r=new Float64Array(e.length);2!==n.length&&(e=e.map(n),n=ascending);const compareIndex=(t,r)=>n(e[t],e[r]);let o,i;t=Uint32Array.from(e,((t,n)=>n));t.sort(n===ascending?(t,n)=>ascendingDefined(e[t],e[n]):compareDefined(compareIndex));t.forEach(((t,n)=>{const e=compareIndex(t,void 0===o?t:o);if(e>=0){(void 0===o||e>0)&&(o=t,i=n);r[t]=i}else r[t]=NaN}));return r}function least(t,n=ascending){let e;let r=false;if(1===n.length){let o;for(const i of t){const t=n(i);if(r?ascending(t,o)<0:0===ascending(t,t)){e=i;o=t;r=true}}}else for(const o of t)if(r?n(o,e)<0:0===n(o,o)){e=o;r=true}return e}function leastIndex(t,n=ascending){if(1===n.length)return minIndex(t,n);let e;let r=-1;let o=-1;for(const i of t){++o;if(r<0?0===n(i,i):n(i,e)<0){e=i;r=o}}return r}function greatestIndex(t,n=ascending){if(1===n.length)return maxIndex(t,n);let e;let r=-1;let o=-1;for(const i of t){++o;if(r<0?0===n(i,i):n(i,e)>0){e=i;r=o}}return r}function scan(t,n){const e=leastIndex(t,n);return e<0?void 0:e}var d=shuffler(Math.random);function shuffler(t){return function shuffle(n,e=0,r=n.length){let o=r-(e=+e);while(o){const r=t()*o--|0,i=n[o+e];n[o+e]=n[r+e];n[r+e]=i}return n}}function sum(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let o of t)(o=+n(o,++r,t))&&(e+=o)}return e}function transpose(t){if(!(o=t.length))return[];for(var n=-1,e=min(t,length),r=new Array(e);++n<e;)for(var o,i=-1,f=r[n]=new Array(o);++i<o;)f[i]=t[i][n];return r}function length(t){return t.length}function zip(){return transpose(arguments)}function every(t,n){if("function"!==typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return false;return true}function some(t,n){if("function"!==typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return true;return false}function filter(t,n){if("function"!==typeof n)throw new TypeError("test is not a function");const e=[];let r=-1;for(const o of t)n(o,++r,t)&&e.push(o);return e}function map(t,n){if("function"!==typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!==typeof n)throw new TypeError("mapper is not a function");return Array.from(t,((e,r)=>n(e,r,t)))}function reduce(t,n,e){if("function"!==typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let o,i,f=-1;if(arguments.length<3){({done:o,value:e}=r.next());if(o)return;++f}while(({done:o,value:i}=r.next()),!o)e=n(e,i,++f,t);return e}function reverse(t){if("function"!==typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function difference(t,...e){t=new n(t);for(const n of e)for(const e of n)t.delete(e);return t}function disjoint(t,e){const r=e[Symbol.iterator](),o=new n;for(const n of t){if(o.has(n))return false;let t,e;while(({value:t,done:e}=r.next())){if(e)break;if(Object.is(n,t))return false;o.add(t)}}return true}function intersection(t,...e){t=new n(t);e=e.map(set);t:for(const n of t)for(const r of e)if(!r.has(n)){t.delete(n);continue t}return t}function set(t){return t instanceof n?t:new n(t)}function superset(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){const n=intern(t);if(r.has(n))continue;let o,i;while(({value:o,done:i}=e.next())){if(i)return false;const t=intern(o);r.add(t);if(Object.is(n,t))break}}return true}function intern(t){return null!==t&&"object"===typeof t?t.valueOf():t}function subset(t,n){return superset(n,t)}function union(...t){const e=new n;for(const n of t)for(const t of n)e.add(t);return e}export{Adder,ascending,bin,r as bisect,i as bisectCenter,o as bisectLeft,r as bisectRight,bisector,blur,f as blur2,u as blurImage,count,cross,cumsum,descending,deviation,difference,disjoint,every,extent,fcumsum,filter,flatGroup,flatRollup,fsum,greatest,greatestIndex,group,groupSort,groups,bin as histogram,index,indexes,intersection,least,leastIndex,map,max,maxIndex,mean,median,medianIndex,merge,min,minIndex,mode,nice,pairs,permute,quantile,quantileIndex,quantileSorted,quickselect,range,rank,reduce,reverse,rollup,rollups,scan,d as shuffle,shuffler,some,sort,subset,sum,superset,thresholdFreedmanDiaconis,thresholdScott,thresholdSturges,tickIncrement,tickStep,ticks,transpose,union,variance,zip};