diff --git a/docs/_file/data/loaders/test.5518808e.csv b/docs/_file/data/loaders/test.5518808e.csv new file mode 100644 index 0000000..63f9b32 --- /dev/null +++ b/docs/_file/data/loaders/test.5518808e.csv @@ -0,0 +1,7 @@ +year,amount,group +1970,30,false +1980,10,true +1990,50,true +2000,60,false +2010,75,true +2020,45,true \ No newline at end of file diff --git a/docs/_import/components/scatter.97e52f71.js b/docs/_import/components/scatter.97e52f71.js new file mode 100644 index 0000000..41290ea --- /dev/null +++ b/docs/_import/components/scatter.97e52f71.js @@ -0,0 +1,21 @@ +import * as Plot from "../../_node/@observablehq/plot@0.6.16/index.bac1276b.js"; + +export default function scatter( + data, + { x = "x", y = "y", width, height } = {} +) { + return Plot.plot({ + width, + height, + marks: [ + Plot.ruleY([0]), + Plot.dot(data, { + x: (d) => +d[x], + y: (d) => +d[y], + }), + ], + grid: true, + x: { label: x }, + y: { label: y }, + }); +} diff --git a/docs/_node/@observablehq/plot@0.6.16/index.bac1276b.js b/docs/_node/@observablehq/plot@0.6.16/index.bac1276b.js new file mode 100644 index 0000000..1acc772 --- /dev/null +++ b/docs/_node/@observablehq/plot@0.6.16/index.bac1276b.js @@ -0,0 +1,59 @@ +import{ascending as cr,descending as _e,timeSecond as Va,timeMinute as Ha,timeHour as Ua,timeDay as Za,timeMonday as Hh,timeTuesday as Uh,timeWednesday as Zh,timeThursday as Kh,timeFriday as Qh,timeSaturday as Jh,timeSunday as td,timeWeek as ed,timeMonth as Ka,timeYear as Qa,utcSecond as Ja,utcMinute as tl,utcHour as el,unixDay as nl,utcMonday as nd,utcTuesday as rd,utcWednesday as od,utcThursday as id,utcFriday as ad,utcSaturday as ld,utcSunday as sd,utcWeek as cd,utcMonth as rl,utcYear as ol,bisector as ud,max as zt,pairs as fd,timeFormat as hd,utcFormat as zo,range as Mn,quantile as An,symbolAsterisk as dd,symbolCircle as So,symbolCross as pd,symbolDiamond as md,symbolDiamond2 as yd,symbolPlus as gd,symbolSquare as $d,symbolSquare2 as vd,symbolStar as xd,symbolTimes as wd,symbolTriangle as bd,symbolTriangle2 as kd,symbolWye as Md,randomLcg as Eo,group as Ce,sort as il,rollup as Ln,sum as qt,InternSet as zn,mode as al,variance as ll,median as Sn,mean as ur,maxIndex as Ad,minIndex as Ld,min as Nt,deviation as fr,rollups as zd,quantize as Bt,schemeAccent as Sd,schemeCategory10 as Ed,schemeDark2 as Od,schemeObservable10 as Cd,schemePaired as Nd,schemePastel1 as Rd,schemePastel2 as Td,schemeSet1 as Id,schemeSet2 as Bd,schemeSet3 as Wd,schemeTableau10 as jd,interpolateBrBG as sl,schemeBrBG as Fd,interpolatePRGn as cl,schemePRGn as Dd,interpolatePiYG as ul,schemePiYG as qd,interpolatePuOr as fl,schemePuOr as Yd,interpolateRdBu as hr,schemeRdBu as hl,interpolateRdGy as dl,schemeRdGy as Pd,interpolateRdYlBu as dr,schemeRdYlBu as pl,interpolateRdYlGn as ml,schemeRdYlGn as Xd,interpolateSpectral as yl,schemeSpectral as _d,interpolateBlues as gl,schemeBlues as Gd,interpolateGreens as $l,schemeGreens as Vd,interpolateGreys as vl,schemeGreys as Hd,interpolateOranges as xl,schemeOranges as Ud,interpolatePurples as wl,schemePurples as Zd,interpolateReds as bl,schemeReds as Kd,interpolateTurbo as kl,interpolateViridis as Ml,interpolateMagma as Al,interpolateInferno as Ll,interpolatePlasma as zl,interpolateCividis as Sl,interpolateCubehelixDefault as El,interpolateWarm as Ol,interpolateCool as Cl,interpolateBuGn as Nl,schemeBuGn as Qd,interpolateBuPu as Rl,schemeBuPu as Jd,interpolateGnBu as Tl,schemeGnBu as tp,interpolateOrRd as Il,schemeOrRd as ep,interpolatePuBu as Bl,schemePuBu as np,interpolatePuBuGn as Wl,schemePuBuGn as rp,interpolatePuRd as jl,schemePuRd as op,interpolateRdPu as Fl,schemeRdPu as ip,interpolateYlGn as Dl,schemeYlGn as ap,interpolateYlGnBu as ql,schemeYlGnBu as lp,interpolateYlOrBr as Yl,schemeYlOrBr as sp,interpolateYlOrRd as Pl,schemeYlOrRd as cp,interpolateRainbow as Xl,interpolateSinebow as _l,scaleLinear as Gl,scalePow as up,scaleLog as fp,scaleSymlog as hp,scaleQuantile as dp,extent as yt,ticks as Oo,interpolateNumber as En,reverse as pr,scaleThreshold as pp,scaleIdentity as mp,piecewise as Co,interpolateRgb as No,interpolateRound as yp,interpolateHsl as gp,interpolateHcl as $p,interpolateLab as vp,scaleDiverging as xp,scaleDivergingPow as wp,scaleDivergingLog as bp,scaleDivergingSymlog as kp,scaleTime as Mp,scaleUtc as Ap,scaleImplicit as Lp,scaleOrdinal as zp,scalePoint as Sp,scaleBand as Vl,symbolsStroke as Ep,symbolsFill as Op,cross as Cp,InternMap as Ro,geoTransform as mr,geoPath as Kt,geoClipRectangle as Np,geoStream as Rp,geoTransverseMercator as Tp,geoStereographic as Ip,geoOrthographic as Bp,geoMercator as Wp,geoGnomonic as jp,geoEquirectangular as Fp,geoEqualEarth as Dp,geoAzimuthalEquidistant as qp,geoAzimuthalEqualArea as Yp,geoAlbersUsa as Pp,geoConicEquidistant as Xp,geoConicEqualArea as _p,geoConicConformal as Gp,geoAlbers as Vp,select as de,creator as Hl,namespaces as Ne,pointer as Hp,format as To,axisBottom as Up,pathRound as Qt,rgb as On,cumsum as Zp,groupSort as Io,greatest as Bo,curveLinear as Wo,curveBasis as Kp,curveBasisClosed as Qp,curveBasisOpen as Jp,curveBundle as tm,curveBumpX as em,curveBumpY as nm,curveCardinal as rm,curveCardinalClosed as om,curveCardinalOpen as im,curveCatmullRom as am,curveCatmullRomClosed as lm,curveCatmullRomOpen as sm,curveLinearClosed as cm,curveMonotoneX as um,curveMonotoneY as fm,curveNatural as hm,curveStep as dm,curveStepAfter as pm,curveStepBefore as mm,thresholdSturges as Ul,thresholdScott as Zl,thresholdFreedmanDiaconis as ym,utcTickInterval as gm,tickIncrement as $m,bisect as vm,area as jo,line as xm,rank as Kl,count as wm,blurImage as bm,Delaunay as Ge,blur2 as km,contours as Mm,nice as Am,contourDensity as Lm,geoCentroid as zm,geoGraticule10 as Sm,stratify as Ql,tree as yr,cluster as Jl,least as Em}from"../../d3@7.9.0/index.e21134d2.js";import{parse as ts,format as Om}from"../../isoformat@0.2.1/index.0882e9d9.js";import Cm from"../../interval-tree-1d@1.0.4/index.f507a53c.js";function vt(t){return t!=null&&!Number.isNaN(t)}function Rt(t,e){return+vt(e)-+vt(t)||cr(t,e)}function gr(t,e){return+vt(e)-+vt(t)||_e(t,e)}function Fo(t){return t!=null&&`${t}`!=""}function $r(t){return isFinite(t)?t:NaN}function Jt(t){return t>0&&isFinite(t)?t:NaN}function vr(t){return t<0&&isFinite(t)?t:NaN}function Ve(t){if(t==null)return;const e=t[0],n=t[t.length-1];return _e(e,n)}const He=1e3,pe=He*60,me=pe*60,Yt=me*24,Pt=Yt*7,Re=Yt*30,ye=Yt*365,Do=[["millisecond",1],["2 milliseconds",2],["5 milliseconds",5],["10 milliseconds",10],["20 milliseconds",20],["50 milliseconds",50],["100 milliseconds",100],["200 milliseconds",200],["500 milliseconds",500],["second",He],["5 seconds",5*He],["15 seconds",15*He],["30 seconds",30*He],["minute",pe],["5 minutes",5*pe],["15 minutes",15*pe],["30 minutes",30*pe],["hour",me],["3 hours",3*me],["6 hours",6*me],["12 hours",12*me],["day",Yt],["2 days",2*Yt],["week",Pt],["2 weeks",2*Pt],["month",Re],["3 months",3*Re],["6 months",6*Re],["year",ye],["2 years",2*ye],["5 years",5*ye],["10 years",10*ye],["20 years",20*ye],["50 years",50*ye],["100 years",100*ye]],qo=new Map([["second",He],["minute",pe],["hour",me],["day",Yt],["monday",Pt],["tuesday",Pt],["wednesday",Pt],["thursday",Pt],["friday",Pt],["saturday",Pt],["sunday",Pt],["week",Pt],["month",Re],["year",ye]]),es=new Map([["second",Va],["minute",Ha],["hour",Ua],["day",Za],["monday",Hh],["tuesday",Uh],["wednesday",Zh],["thursday",Kh],["friday",Qh],["saturday",Jh],["sunday",td],["week",ed],["month",Ka],["year",Qa]]),Yo=new Map([["second",Ja],["minute",tl],["hour",el],["day",nl],["monday",nd],["tuesday",rd],["wednesday",od],["thursday",id],["friday",ad],["saturday",ld],["sunday",sd],["week",cd],["month",rl],["year",ol]]),Cn=Symbol("intervalDuration"),xr=Symbol("intervalType");for(const[t,e]of es)e[Cn]=qo.get(t),e[xr]="time";for(const[t,e]of Yo)e[Cn]=qo.get(t),e[xr]="utc";const Nn=[["year",ol,"utc"],["month",rl,"utc"],["day",nl,"utc",6*Re],["hour",el,"utc",3*Yt],["minute",tl,"utc",6*me],["second",Ja,"utc",30*pe]],wr=[["year",Qa,"time"],["month",Ka,"time"],["day",Za,"time",6*Re],["hour",Ua,"time",3*Yt],["minute",Ha,"time",6*me],["second",Va,"time",30*pe]],Nm=[Nn[0],wr[0],Nn[1],wr[1],Nn[2],wr[2],...Nn.slice(3)];function Po(t){let e=`${t}`.toLowerCase();e.endsWith("s")&&(e=e.slice(0,-1));let n=1;const r=/^(?:(\d+)\s+)/.exec(e);switch(r&&(e=e.slice(r[0].length),n=+r[1]),e){case"quarter":e="month",n*=3;break;case"half":e="month",n*=6;break}let o=Yo.get(e);if(!o)throw new Error(`unknown interval: ${t}`);if(n>1&&!o.every)throw new Error(`non-periodic interval: ${e}`);return[e,n]}function Xo(t){return ns(Po(t),"time")}function br(t){return ns(Po(t),"utc")}function ns([t,e],n){let r=(n==="time"?es:Yo).get(t);return e>1&&(r=r.every(e),r[Cn]=qo.get(t)*e,r[xr]=n),r}function rs(t,e){if(!(e>1))return;const n=t[Cn];if(!Do.some(([,o])=>o===n)||n%Yt===0&&YtMath.log(o)).center(Do,Math.log(n*e))];return(t[xr]==="time"?Xo:br)(r)}function os(t,e,n){const r=e==="time"?hd:zo;if(n==null)return r(t==="year"?"%Y":t==="month"?"%Y-%m":t==="day"?"%Y-%m-%d":t==="hour"||t==="minute"?"%Y-%m-%dT%H:%M":t==="second"?"%Y-%m-%dT%H:%M:%S":"%Y-%m-%dT%H:%M:%S.%L");const o=Rm(n);switch(t){case"millisecond":return Ue(r(".%L"),r(":%M:%S"),o);case"second":return Ue(r(":%S"),r("%-I:%M"),o);case"minute":return Ue(r("%-I:%M"),r("%p"),o);case"hour":return Ue(r("%-I %p"),r("%b %-d"),o);case"day":return Ue(r("%-d"),r("%b"),o);case"month":return Ue(r("%b"),r("%Y"),o);case"year":return r("%Y")}throw new Error("unable to format time ticks")}function Rm(t){return t==="left"||t==="right"?(e,n)=>` +${e} +${n}`:t==="top"?(e,n)=>`${n} +${e}`:(e,n)=>`${e} +${n}`}function Tm(t){return t==="time"?wr:t==="utc"?Nn:Nm}function Im(t,e,n){const r=zt(fd(e,(o,i)=>Math.abs(i-o)));if(r<1e3)return os("millisecond","utc",n);for(const[o,i,a,l]of Tm(t)){if(r>l||o==="hour"&&!r)break;if(e.every(s=>i.floor(s)>=s))return os(o,a,n)}}function Ue(t,e,n){return(r,o,i)=>{const a=t(r,o),l=e(r,o),s=o-Ve(i);return o!==s&&i[s]!==void 0&&l===e(i[s],s)?a:n(a,l)}}const kr=Object.getPrototypeOf(Uint8Array),Bm=Object.prototype.toString;function te(t){return t instanceof Array||t instanceof kr}function is(t){return t instanceof kr&&!Wm(t)}function as(t){return t?.prototype instanceof kr&&!jm(t)}function Wm(t){return t instanceof BigInt64Array||t instanceof BigUint64Array}function jm(t){return t===BigInt64Array||t===BigUint64Array}const ls=Symbol("reindex");function V(t,e,n){const r=typeof e;return r==="string"?ws(t)?Go(t.getChild(e),n):ss(t,cs(e),n):r==="function"?ss(t,e,n):r==="number"||e instanceof Date||r==="boolean"?J(t,xt(e),n):typeof e?.transform=="function"?_o(e.transform(t),n):Fm(_o(e,n),t?.[ls])}function Fm(t,e){return t!=null&&e?Ar(t,e):t}function ss(t,e,n){return J(t,as(n)?(r,o)=>Uo(e(r,o)):e,n)}function _o(t,e){return e===void 0?ee(t):bs(t)?Go(t,e):t instanceof e?t:e.from(t,as(e)&&!is(t)?Uo:void 0)}function Go(t,e){return t==null?t:(e===void 0||e===Array)&&Jm(t.type)?us(t.toArray()):_o(t.toArray(),e)}const Rn=[null],cs=t=>e=>{const n=e[t];return n===void 0&&e.type==="Feature"?e.properties?.[t]:n},gt={transform:ne},D={transform:t=>t},Vo=()=>1,Dm=()=>!0,kt=t=>t==null?t:`${t}`,rt=t=>t==null?t:+t,Mr=t=>t?t[0]:void 0,Tn=t=>t?t[1]:void 0,qm=t=>t?t[2]:void 0,xt=t=>()=>t;function Ho(t){const e=+`${t}`.slice(1)/100;return(n,r)=>An(n,e,r)}function St(t){return is(t)?t:J(t,Uo,Float64Array)}function Uo(t){return t==null?NaN:Number(t)}function us(t){return J(t,fs)}function fs(t){return t instanceof Date&&!isNaN(t)?t:typeof t=="string"?ts(t):t==null||isNaN(t=Number(t))?void 0:new Date(t)}function Mt(t,e){return t===void 0&&(t=e),t===null?[void 0,"none"]:Wn(t)?[void 0,t]:[t,void 0]}function ht(t,e){return t===void 0&&(t=e),t===null||typeof t=="number"?[void 0,t]:[t,void 0]}function hs(t,e,n){if(t!=null)return Ot(t,e,n)}function Ot(t,e,n){const r=`${t}`.toLowerCase();if(!n.includes(r))throw new Error(`invalid ${e}: ${t}`);return r}function Ze(t){return ws(t)?t:ee(t)}function ee(t){if(t==null||te(t))return t;if(bs(t))return Go(t);switch(t.type){case"FeatureCollection":return t.features;case"GeometryCollection":return t.geometries;case"Feature":case"LineString":case"MultiLineString":case"MultiPoint":case"MultiPolygon":case"Point":case"Polygon":case"Sphere":return[t]}return Array.from(t)}function J(t,e,n=Array){return t==null?t:t instanceof n?t.map(e):n.from(t,e)}function In(t,e=Array){return t instanceof e?t.slice():e.from(t)}function ds({x:t,x1:e,x2:n}){return t!==void 0||e!==void 0||n!==void 0}function ps({y:t,y1:e,y2:n}){return t!==void 0||e!==void 0||n!==void 0}function Ke(t){return ds(t)||ps(t)||t.interval!==void 0}function Tt(t){return t?.toString===Bm}function Te(t){return Tt(t)&&(t.type!==void 0||t.domain!==void 0)}function Xt(t){return Tt(t)&&typeof t.transform!="function"}function ge(t){return Xt(t)&&t.value===void 0&&t.channel===void 0}function ms(t,e,n,r=D){return e===void 0&&n===void 0?(e=0,n=t===void 0?r:t):e===void 0?e=t===void 0?0:t:n===void 0&&(n=t===void 0?0:t),[e,n]}function Wt(t,e){return t===void 0&&e===void 0?[Mr,Tn]:[t,e]}function $e({z:t,fill:e,stroke:n}={}){return t===void 0&&([t]=Mt(e)),t===void 0&&([t]=Mt(n)),t}function Bn(t){return te(t)?t.length:t?.numRows}function ne(t){const e=Bn(t),n=new Uint32Array(e);for(let r=0;rt[n],t.constructor):J(e,n=>t.at(n))}function Zo(t){return t.length===1?(e,n)=>t(Ar(n,e)):t}function Ie(t,e,n){return t.subarray?t.subarray(e,n):t.slice(e,n)}function re(t){return t!==null&&typeof t=="object"?t.valueOf():t}function ys(t,e){if(e[t]!==void 0)return e[t];switch(t){case"x1":case"x2":t="x";break;case"y1":case"y2":t="y";break}return e[t]}function Ct(t){let e;return[{transform:()=>e,label:_t(t)},n=>e=n]}function Et(t){return t==null?[t]:Ct(t)}function _t(t,e){return typeof t=="string"?t:t&&t.label!==void 0?t.label:e}function Lr(t,e){return{transform(n){const r=t.transform(n),o=e.transform(n);return At(r)||At(o)?J(r,(i,a)=>new Date((+r[a]+ +o[a])/2)):J(r,(i,a)=>(+r[a]+ +o[a])/2,Float64Array)},label:t.label}}function zr(t,e){const n=gs(e?.interval,e?.type);return n?J(t,n):t}function gs(t,e){const n=Sr(t,e);return n&&(r=>vt(r)?n.floor(r):r)}function Sr(t,e){if(t!=null){if(typeof t=="number")return $s(t);if(typeof t=="string")return(e==="time"?Xo:br)(t);if(typeof t.floor!="function")throw new Error("invalid interval; missing floor method");if(typeof t.offset!="function")throw new Error("invalid interval; missing offset method");return t}}function $s(t){t=+t,0Math.floor(n*e)/e,offset:(n,r=1)=>(n*e+Math.floor(r))/e,range:(n,r)=>Mn(Math.ceil(n*e),r*e).map(o=>o/e)}:{floor:n=>Math.floor(n/e)*e,offset:(n,r=1)=>n+e*Math.floor(r),range:(n,r)=>Mn(Math.ceil(n/e),r/e).map(o=>o*e)}}function Qe(t,e){if(t=Sr(t,e),t&&typeof t.range!="function")throw new Error("invalid interval: missing range method");return t}function Ym(t,e){if(t=Qe(t,e),t&&typeof t.ceil!="function")throw new Error("invalid interval: missing ceil method");return t}function Pm(t){return Je(t)&&typeof t?.floor=="function"&&t.floor()instanceof Date}function Je(t){return typeof t?.range=="function"}function tn(t){return t===void 0||Xt(t)?t:{value:t}}function Xm(t){return t==null?null:{transform:e=>V(e,t,Float64Array),label:_t(t)}}function _m(t){if(!oe(t))return!1;for(const e of t)if(e!=null)return typeof e=="object"&&"0"in e&&"1"in e}function oe(t){return t&&typeof t[Symbol.iterator]=="function"}function vs(t){for(const e of t)if(e!=null)return typeof e!="object"||e instanceof Date}function ct(t){for(const e of t){if(e==null)continue;const n=typeof e;return n==="string"||n==="boolean"}}function At(t){for(const e of t)if(e!=null)return e instanceof Date}function Gm(t){for(const e of t)if(e!=null)return typeof e=="string"&&isNaN(e)&&ts(e)}function Vm(t){for(const e of t)if(e!=null){if(typeof e!="string")return!1;if(e.trim())return!isNaN(e)}}function en(t){for(const e of t)if(e!=null)return typeof e=="number"}function Ko(t,e){let n;for(const r of t)if(r!=null){if(!e(r))return!1;n=!0}return n}const Hm=new Set("none,currentcolor,transparent,aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond,blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue,cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen,darkgrey,darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon,darkseagreen,darkslateblue,darkslategray,darkslategrey,darkturquoise,darkviolet,deeppink,deepskyblue,dimgray,dimgrey,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro,ghostwhite,gold,goldenrod,gray,green,greenyellow,grey,honeydew,hotpink,indianred,indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral,lightcyan,lightgoldenrodyellow,lightgray,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen,lightskyblue,lightslategray,lightslategrey,lightsteelblue,lightyellow,lime,limegreen,linen,magenta,maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen,mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue,mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange,orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip,peachpuff,peru,pink,plum,powderblue,purple,rebeccapurple,red,rosybrown,royalblue,saddlebrown,salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,slategrey,snow,springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke,yellow".split(","));function Wn(t){return typeof t!="string"?!1:(t=t.toLowerCase().trim(),/^#[0-9a-f]{3,8}$/.test(t)||/^(?:url|var|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color|color-mix)\(.*\)$/.test(t)||Hm.has(t))}function Um(t){return typeof t=="number"&&(0<=t&&t<=1||isNaN(t))}function lt(t){return t==null||nn(t)}function nn(t){return/^\s*none\s*$/i.test(t)}function Zm(t){return/^\s*round\s*$/i.test(t)}function Qo(t,e){return hs(t,e,["middle","top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"])}function jn(t="middle"){return Qo(t,"frameAnchor")}function Km(t={},...e){let n=t;for(const r of e)for(const o in r)if(n[o]===void 0){const i=r[o];n===t?n={...n,[o]:i}:n[o]=i}return n}function Qm(t){console.warn("named iterables are deprecated; please use an object instead");const e=new Set;return Object.fromEntries(Array.from(t,n=>{const{name:r}=n;if(r==null)throw new Error("missing name");const o=`${r}`;if(o==="__proto__")throw new Error(`illegal name: ${o}`);if(e.has(o))throw new Error(`duplicate name: ${o}`);return e.add(o),[r,n]}))}function Jo(t){return oe(t)?Qm(t):t}function xs(t){return t===!0?t="frame":t===!1?t=null:t!=null&&(t=Ot(t,"clip",["frame","sphere"])),t}function ws(t){return t&&typeof t.getChild=="function"&&typeof t.toArray=="function"&&t.schema&&Array.isArray(t.schema.fields)}function bs(t){return t&&typeof t.toArray=="function"&&t.type}function Jm(t){return t&&(t.typeId===8||t.typeId===10)&&t.unit===1}const Gt=Symbol("position"),ie=Symbol("color"),Fn=Symbol("radius"),Dn=Symbol("length"),qn=Symbol("opacity"),Er=Symbol("symbol"),ks=Symbol("projection"),st=new Map([["x",Gt],["y",Gt],["fx",Gt],["fy",Gt],["r",Fn],["color",ie],["opacity",qn],["symbol",Er],["length",Dn],["projection",ks]]);function ty(t){return t===Gt||t===ks}function ey(t){return t===Gt||t===Fn||t===Dn||t===qn}const Ms=Math.sqrt(3),As=2/Ms,ny={draw(t,e){const n=Math.sqrt(e/Math.PI),r=n*As,o=r/2;t.moveTo(0,r),t.lineTo(n,o),t.lineTo(n,-o),t.lineTo(0,-r),t.lineTo(-n,-o),t.lineTo(-n,o),t.closePath()}},ti=new Map([["asterisk",dd],["circle",So],["cross",pd],["diamond",md],["diamond2",yd],["hexagon",ny],["plus",gd],["square",$d],["square2",vd],["star",xd],["times",wd],["triangle",bd],["triangle2",kd],["wye",Md]]);function ei(t){return t&&typeof t.draw=="function"}function ry(t){return ei(t)?!0:typeof t!="string"?!1:ti.has(t.toLowerCase())}function ni(t){if(t==null||ei(t))return t;const e=ti.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid symbol: ${t}`)}function oy(t){if(t==null||ei(t))return[void 0,t];if(typeof t=="string"){const e=ti.get(`${t}`.toLowerCase());if(e)return[void 0,e]}return[t,void 0]}function jt({filter:t,sort:e,reverse:n,transform:r,initializer:o,...i}={},a){if(r===void 0&&(t!=null&&(r=ii(t)),e!=null&&!ge(e)&&(r=ri(r,li(e))),n&&(r=ri(r,ai))),a!=null&&o!=null)throw new Error("transforms cannot be applied after initializers");return{...i,...(e===null||ge(e))&&{sort:e},transform:ri(r,a)}}function Lt({filter:t,sort:e,reverse:n,initializer:r,...o}={},i){return r===void 0&&(t!=null&&(r=ii(t)),e!=null&&!ge(e)&&(r=oi(r,li(e))),n&&(r=oi(r,ai))),{...o,...(e===null||ge(e))&&{sort:e},initializer:oi(r,i)}}function ri(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o){return{data:n,facets:r}=t.call(this,n,r,o),e.call(this,Ze(n),r,o)}}function oi(t,e){return t==null?e===null?void 0:e:e==null?t===null?void 0:t:function(n,r,o,...i){let a,l,s,c,u,f;return{data:l=n,facets:s=r,channels:a}=t.call(this,n,r,o,...i),{data:u=l,facets:f=s,channels:c}=e.call(this,l,s,{...o,...a},...i),{data:u,facets:f,channels:{...a,...c}}}}function Or(t,e){return(t.initializer!=null?Lt:jt)(t,e)}function iy(t,e){return Or(e,ii(t))}function ii(t){return(e,n)=>{const r=V(e,t);return{data:e,facets:n.map(o=>o.filter(i=>r[i]))}}}function ay({sort:t,...e}={}){return{...Or(e,ai),sort:ge(t)?t:null}}function ai(t,e){return{data:t,facets:e.map(n=>n.slice().reverse())}}function ly({seed:t,sort:e,...n}={}){return{...Or(n,zs(t==null?Math.random:Eo(t))),sort:ge(e)?e:null}}function Ls(t,{sort:e,...n}={}){return{...(Xt(t)&&t.channel!==void 0?Lt:Or)(n,li(t)),sort:ge(e)?e:null}}function li(t){return(typeof t=="function"&&t.length!==1?sy:zs)(t)}function sy(t){return(e,n)=>{const r=te(e)?(o,i)=>t(e[o],e[i]):(o,i)=>t(e.get(o),e.get(i));return{data:e,facets:n.map(o=>o.slice().sort(r))}}}function zs(t){let e,n;({channel:e,value:t,order:n}={...tn(t)});const r=e?.startsWith("-");if(r&&(e=e.slice(1)),n===void 0&&(n=r?gr:Rt),typeof n!="function")switch(`${n}`.toLowerCase()){case"ascending":n=Rt;break;case"descending":n=gr;break;default:throw new Error(`invalid order: ${n}`)}return(o,i,a)=>{let l;if(e===void 0)l=V(o,t);else{if(a===void 0)throw new Error("channel sort requires an initializer");if(l=a[e],!l)return{};l=l.value}const s=(c,u)=>n(l[c],l[u]);return{data:o,facets:i.map(c=>c.slice().sort(s))}}}function si(t,e){return Cr(null,null,t,e)}function Yn(t={y:"count"},e={}){const{x:n=D}=e;if(n==null)throw new Error("missing channel: x");return Cr(n,null,t,e)}function Pn(t={x:"count"},e={}){const{y:n=D}=e;if(n==null)throw new Error("missing channel: y");return Cr(null,n,t,e)}function ci(t={fill:"count"},e={}){let{x:n,y:r}=e;if([n,r]=Wt(n,r),n==null)throw new Error("missing channel: x");if(r==null)throw new Error("missing channel: y");return Cr(n,r,t,e)}function Cr(t,e,{data:n=di,filter:r,sort:o,reverse:i,...a}={},l={}){a=Es(a,l),n=Ns(n,D),o=o==null?void 0:Os("sort",o,l),r=r==null?void 0:Cs("filter",r,l);const[s,c]=Et(t),[u,f]=Et(e),{z:h,fill:d,stroke:p,x1:m,x2:$,y1:y,y2:g,...x}=l,[v,b]=Et(h),[w]=Mt(d),[k]=Mt(p),[M,A]=Et(w),[z,S]=Et(k);return{..."z"in l&&{z:v||h},..."fill"in l&&{fill:M||d},..."stroke"in l&&{stroke:z||p},...jt(x,(L,C,E)=>{const O=zr(V(L,t),E?.x),R=zr(V(L,e),E?.y),N=V(L,h),F=V(L,w),T=V(L,k),B=hi(a,{z:N,fill:F,stroke:T}),j=[],I=[],Y=O&&c([]),H=R&&f([]),G=N&&b([]),X=F&&A([]),W=T&&S([]);let P=0;for(const _ of a)_.initialize(L);o&&o.initialize(L),r&&r.initialize(L);for(const _ of C){const Z=[];for(const K of a)K.scope("facet",_);o&&o.scope("facet",_),r&&r.scope("facet",_);for(const[K,nt]of Be(_,B))for(const[ft,at]of Be(nt,R))for(const[dt,mt]of Be(at,O)){const bt={data:L};if(O&&(bt.x=dt),R&&(bt.y=ft),B&&(bt.z=K),!(r&&!r.reduce(mt,bt))){Z.push(P++),I.push(n.reduceIndex(mt,L,bt)),O&&Y.push(dt),R&&H.push(ft),N&&G.push(B===N?K:N[mt[0]]),F&&X.push(B===F?K:F[mt[0]]),T&&W.push(B===T?K:T[mt[0]]);for(const Ee of a)Ee.reduce(mt,bt);o&&o.reduce(mt,bt)}}j.push(Z)}return Rs(j,o,i),{data:I,facets:j}}),...!ve(a,"x")&&(s?{x:s}:{x1:m,x2:$}),...!ve(a,"y")&&(u?{y:u}:{y1:y,y2:g}),...Object.fromEntries(a.map(({name:L,output:C})=>[L,C]))}}function ve(t,...e){for(const{name:n}of t)if(e.includes(n))return!0;return!1}function Ss(t,e,n=ui){const r=Object.entries(t);return e.title!=null&&t.title===void 0&&r.push(["title",py]),e.href!=null&&t.href===void 0&&r.push(["href",pi]),r.filter(([,o])=>o!==void 0).map(([o,i])=>i===null?cy(o):n(o,i,e))}function ui(t,e,n,r=fi){let o;Tt(e)&&"reduce"in e&&(o=e.scale,e=e.reduce);const i=r(t,e,n),[a,l]=Ct(i.label);let s;return{name:t,output:o===void 0?a:{value:a,scale:o},initialize(c){i.initialize(c),s=l([])},scope(c,u){i.scope(c,u)},reduce(c,u){s.push(i.reduce(c,u))}}}function cy(t){return{name:t,initialize(){},scope(){},reduce(){}}}function fi(t,e,n,r=Nr){const o=ys(t,n),i=r(e,o);let a,l;return{label:_t(i===Rr?null:o,i.label),initialize(s){a=o===void 0?s:V(s,o),i.scope==="data"&&(l=i.reduceIndex(ne(s),a))},scope(s,c){i.scope===s&&(l=i.reduceIndex(c,a))},reduce(s,c){return i.scope==null?i.reduceIndex(s,a,c):i.reduceIndex(s,a,l,c)}}}function Be(t,e){return e?Ce(t,n=>e[n]):[[,t]]}function Nr(t,e,n=uy){if(t==null)return n(t);if(typeof t.reduceIndex=="function")return t;if(typeof t.reduce=="function"&&Tt(t))return hy(t);if(typeof t=="function")return dy(t);if(/^p\d{2}$/i.test(t))return ae(Ho(t));switch(`${t}`.toLowerCase()){case"first":return pi;case"last":return my;case"identity":return di;case"count":return Rr;case"distinct":return yy;case"sum":return e==null?Rr:gy;case"proportion":return Is(e,"data");case"proportion-facet":return Is(e,"facet");case"deviation":return ae(fr);case"min":return ae(Nt);case"min-index":return ae(Ld);case"max":return ae(zt);case"max-index":return ae(Ad);case"mean":return Ts(ur);case"median":return Ts(Sn);case"variance":return ae(ll);case"mode":return ae(al)}return n(t)}function uy(t){throw new Error(`invalid reduce: ${t}`)}function Es(t,e){return Ss(t,e,Os)}function Os(t,e,n){return ui(t,e,n,Cs)}function Cs(t,e,n){return fi(t,e,n,Ns)}function Ns(t,e){return Nr(t,e,fy)}function fy(t){switch(`${t}`.toLowerCase()){case"x":return $y;case"y":return vy;case"z":return Bs}throw new Error(`invalid group reduce: ${t}`)}function hi(t,e){for(const n in e){const r=e[n];if(r!==void 0&&!t.some(o=>o.name===n))return r}}function Rs(t,e,n){if(e){const r=e.output.transform(),o=(i,a)=>Rt(r[i],r[a]);t.forEach(i=>i.sort(o))}n&&t.forEach(r=>r.reverse())}function hy(t){return console.warn("deprecated reduce interface; implement reduceIndex instead."),{...t,reduceIndex:t.reduce.bind(t)}}function dy(t){return{reduceIndex(e,n,r){return t(Ar(n,e),r)}}}function ae(t){return{reduceIndex(e,n){return t(e,r=>n[r])}}}function Ts(t){return{reduceIndex(e,n){const r=t(e,o=>n[o]);return At(n)?new Date(r):r}}}const di={reduceIndex(t,e){return Ar(e,t)}},pi={reduceIndex(t,e){return e[t[0]]}},py={reduceIndex(t,e){const n=il(Ln(t,o=>o.length,o=>e[o]),Tn),r=n.slice(-5).reverse();if(r.length`${o} (${i.toLocaleString("en-US")})`).join(` +`)}},my={reduceIndex(t,e){return e[t[t.length-1]]}},Rr={label:"Frequency",reduceIndex(t){return t.length}},yy={label:"Distinct",reduceIndex(t,e){const n=new zn;for(const r of t)n.add(e[r]);return n.size}},gy=ae(qt);function Is(t,e){return t==null?{scope:e,label:"Frequency",reduceIndex:(n,r,o=1)=>n.length/o}:{scope:e,reduceIndex:(n,r,o=1)=>qt(n,i=>r[i])/o}}const $y={reduceIndex(t,e,{x:n}){return n}},vy={reduceIndex(t,e,{y:n}){return n}},Bs={reduceIndex(t,e,{z:n}){return n}};function xy(t){if(typeof t!="function")throw new Error(`invalid test function: ${t}`);return{reduceIndex(e,n,{data:r}){return n[e.find(te(r)?o=>t(r[o],o,r):o=>t(r.get(o),o,r))]}}}function Xn(t,{scale:e,type:n,value:r,filter:o,hint:i,label:a=_t(r)},l){return i===void 0&&typeof r?.transform=="function"&&(i=r.hint),js(l,{scale:e,type:n,value:V(t,r),label:a,filter:o,hint:i})}function Ws(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Xn(e,r,n)]))}function mi(t,e){const n=Object.fromEntries(Object.entries(t).map(([r,{scale:o,value:i}])=>{const a=o==null?null:e[o];return[r,a==null?i:J(i,a)]}));return n.channels=t,n}function js(t,e){const{scale:n,value:r}=e;if(n===!0||n==="auto")switch(t){case"fill":case"stroke":case"color":e.scale=n!==!0&&Ko(r,Wn)?null:"color",e.defaultScale="color";break;case"fillOpacity":case"strokeOpacity":case"opacity":e.scale=n!==!0&&Ko(r,Um)?null:"opacity",e.defaultScale="opacity";break;case"symbol":n!==!0&&Ko(r,ry)?(e.scale=null,e.value=J(r,ni)):e.scale="symbol",e.defaultScale="symbol";break;default:e.scale=st.has(t)?t:null;break}else if(n===!1)e.scale=null;else if(n!=null&&!st.has(n))throw new Error(`unknown scale: ${n}`);return e}function wy(t,e,n,r,o){const{order:i,reverse:a,reduce:l=!0,limit:s}=o;for(const c in o){if(!st.has(c))continue;let{value:u,order:f=i,reverse:h=a,reduce:d=l,limit:p=s}=tn(o[c]);const m=u?.startsWith("-");if(m&&(u=u.slice(1)),f=f===void 0?m!==(u==="width"||u==="height")?qs:Ds:My(f),d==null||d===!1)continue;const $=c==="fx"||c==="fy"?ky(e,r[c]):by(n,c);if(!$)throw new Error(`missing channel for scale: ${c}`);const y=$.value,[g=0,x=1/0]=oe(p)?p:p<0?[p]:[0,p];if(u==null)$.domain=()=>{let v=Array.from(new zn(y));return h&&(v=v.reverse()),(g!==0||x!==1/0)&&(v=v.slice(g,x)),v};else{const v=u==="data"?t:u==="height"?Fs(n,"y1","y2"):u==="width"?Fs(n,"x1","x2"):yi(n,u,u==="y"?"y2":u==="x"?"x2":void 0),b=Nr(d===!0?"max":d,v);$.domain=()=>{let w=zd(ne(y),k=>b.reduceIndex(k,v),k=>y[k]);return f&&w.sort(f),h&&w.reverse(),(g!==0||x!==1/0)&&(w=w.slice(g,x)),w.map(Mr)}}}}function by(t,e){for(const n in t){const r=t[n];if(r.scale===e)return r}}function ky(t,e){const n=t.original;if(n===t)return e;const r=e.value,o=e.value=[];for(let i=0;iMath.abs(i-r[a]),Float64Array)}function yi(t,e,n){let r=t[e];if(!r&&n!==void 0&&(r=t[n]),r)return r.value;throw new Error(`missing channel: ${e}`)}function My(t){if(t==null||typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"ascending":return Ds;case"descending":return qs}throw new Error(`invalid order: ${t}`)}function Ds([t,e],[n,r]){return Rt(e,r)||Rt(t,n)}function qs([t,e],[n,r]){return gr(e,r)||Rt(t,n)}function gi(t,e){let n=t[e];if(n){for(;n.source;)n=n.source;return n.source===null?null:n}}const Ys=new Map([["accent",Sd],["category10",Ed],["dark2",Od],["observable10",Cd],["paired",Nd],["pastel1",Rd],["pastel2",Td],["set1",Id],["set2",Bd],["set3",Wd],["tableau10",jd]]);function Ay(t){return t!=null&&Ys.has(`${t}`.toLowerCase())}const Ps=new Map([...Ys,["brbg",le(Fd,sl)],["prgn",le(Dd,cl)],["piyg",le(qd,ul)],["puor",le(Yd,fl)],["rdbu",le(hl,hr)],["rdgy",le(Pd,dl)],["rdylbu",le(pl,dr)],["rdylgn",le(Xd,ml)],["spectral",le(_d,yl)],["burd",Xs(hl,hr)],["buylrd",Xs(pl,dr)],["blues",$t(Gd,gl)],["greens",$t(Vd,$l)],["greys",$t(Hd,vl)],["oranges",$t(Ud,xl)],["purples",$t(Zd,wl)],["reds",$t(Kd,bl)],["turbo",se(kl)],["viridis",se(Ml)],["magma",se(Al)],["inferno",se(Ll)],["plasma",se(zl)],["cividis",se(Sl)],["cubehelix",se(El)],["warm",se(Ol)],["cool",se(Cl)],["bugn",$t(Qd,Nl)],["bupu",$t(Jd,Rl)],["gnbu",$t(tp,Tl)],["orrd",$t(ep,Il)],["pubu",$t(np,Bl)],["pubugn",$t(rp,Wl)],["purd",$t(op,jl)],["rdpu",$t(ip,Fl)],["ylgn",$t(ap,Dl)],["ylgnbu",$t(lp,ql)],["ylorbr",$t(sp,Yl)],["ylorrd",$t(cp,Pl)],["rainbow",_s(Xl)],["sinebow",_s(_l)]]);function $t(t,e){return({length:n})=>n===1?[t[3][1]]:n===2?[t[3][1],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>9?Bt(e,n):t[n])}function le(t,e){return({length:n})=>n===2?[t[3][0],t[3][2]]:(n=Math.max(3,Math.floor(n)),n>11?Bt(e,n):t[n])}function Xs(t,e){return({length:n})=>n===2?[t[3][2],t[3][0]]:(n=Math.max(3,Math.floor(n)),n>11?Bt(r=>e(1-r),n):t[n].slice().reverse())}function se(t){return({length:e})=>Bt(t,Math.max(2,Math.floor(e)))}function _s(t){return({length:e})=>Bt(t,Math.floor(e)+1).slice(0,-1)}function Gs(t){const e=`${t}`.toLowerCase();if(!Ps.has(e))throw new Error(`unknown ordinal scheme: ${e}`);return Ps.get(e)}function Tr(t,e){const n=Gs(t),r=typeof n=="function"?n({length:e}):n;return r.length!==e?r.slice(0,e):r}function Ly(t,e="greys"){const n=new Set,[r,o]=Tr(e,2);for(const i of t)if(i!=null)if(i===!0)n.add(o);else if(i===!1)n.add(r);else return;return[...n]}const Vs=new Map([["brbg",sl],["prgn",cl],["piyg",ul],["puor",fl],["rdbu",hr],["rdgy",dl],["rdylbu",dr],["rdylgn",ml],["spectral",yl],["burd",t=>hr(1-t)],["buylrd",t=>dr(1-t)],["blues",gl],["greens",$l],["greys",vl],["purples",wl],["reds",bl],["oranges",xl],["turbo",kl],["viridis",Ml],["magma",Al],["inferno",Ll],["plasma",zl],["cividis",Sl],["cubehelix",El],["warm",Ol],["cool",Cl],["bugn",Nl],["bupu",Rl],["gnbu",Tl],["orrd",Il],["pubugn",Wl],["pubu",Bl],["purd",jl],["rdpu",Fl],["ylgnbu",ql],["ylgn",Dl],["ylorbr",Yl],["ylorrd",Pl],["rainbow",Xl],["sinebow",_l]]);function $i(t){const e=`${t}`.toLowerCase();if(!Vs.has(e))throw new Error(`unknown quantitative scheme: ${e}`);return Vs.get(e)}const zy=new Set(["brbg","prgn","piyg","puor","rdbu","rdgy","rdylbu","rdylgn","spectral","burd","buylrd"]);function Sy(t){return t!=null&&zy.has(`${t}`.toLowerCase())}const Hs=t=>e=>t(1-e),vi=[0,1],Us=new Map([["number",En],["rgb",No],["hsl",gp],["hcl",$p],["lab",vp]]);function Zs(t){const e=`${t}`.toLowerCase();if(!Us.has(e))throw new Error(`unknown interpolator: ${e}`);return Us.get(e)}function _n(t,e,n,{type:r,nice:o,clamp:i,zero:a,domain:l=Qs(t,n),unknown:s,round:c,scheme:u,interval:f,range:h=st.get(t)===Fn?Fy(n,l):st.get(t)===Dn?Dy(n,l):st.get(t)===qn?vi:void 0,interpolate:d=st.get(t)===ie?u==null&&h!==void 0?No:$i(u!==void 0?u:r==="cyclical"?"rainbow":"turbo"):c?yp:En,reverse:p}){if(f=Qe(f,r),(r==="cyclical"||r==="sequential")&&(r="linear"),typeof d!="function"&&(d=Zs(d)),p=!!p,h!==void 0){const m=(l=ee(l)).length,$=(h=ee(h)).length;if(m!==$){if(d.length===1)throw new Error("invalid piecewise interpolator");d=Co(d,h),h=void 0}}if(d.length===1?(p&&(d=Hs(d),p=!1),h===void 0&&(h=Float64Array.from(l,(m,$)=>$/(l.length-1)),h.length===2&&(h=vi)),e.interpolate((h===vi?xt:wi)(d))):e.interpolate(d),a){const[m,$]=yt(l);(m>0||$<0)&&(l=In(l),(Ve(l)||1)===Math.sign(m)?l[0]=0:l[l.length-1]=0)}return p&&(l=pr(l)),e.domain(l).unknown(s),o&&(e.nice(Ey(o,r)),l=e.domain()),h!==void 0&&e.range(h),i&&e.clamp(i),{type:r,domain:l,range:h,scale:e,interpolate:d,interval:f}}function Ey(t,e){return t===!0?void 0:typeof t=="number"?t:Ym(t,e)}function Oy(t,e,n){return _n(t,Gl(),e,n)}function Cy(t,e,n){return Ks(t,e,{...n,exponent:.5})}function Ks(t,e,{exponent:n=1,...r}){return _n(t,up().exponent(n),e,{...r,type:"pow"})}function Ny(t,e,{base:n=10,domain:r=qy(e),...o}){return _n(t,fp().base(n),e,{...o,domain:r})}function Ry(t,e,{constant:n=1,...r}){return _n(t,hp().constant(n),e,r)}function Ty(t,e,{range:n,quantiles:r=n===void 0?5:(n=[...n]).length,n:o=r,scheme:i="rdylbu",domain:a=Yy(e),unknown:l,interpolate:s,reverse:c}){return n===void 0&&(n=s!==void 0?Bt(s,o):st.get(t)===ie?Tr(i,o):void 0),a.length>0&&(a=dp(a,n===void 0?{length:o}:n).quantiles()),xi(t,e,{domain:a,range:n,reverse:c,unknown:l})}function Iy(t,e,{range:n,n:r=n===void 0?5:(n=[...n]).length,scheme:o="rdylbu",domain:i=Qs(t,e),unknown:a,interpolate:l,reverse:s}){const[c,u]=yt(i);let f;return n===void 0?(f=Oo(c,u,r),f[0]<=c&&f.splice(0,1),f[f.length-1]>=u&&f.pop(),r=f.length+1,n=l!==void 0?Bt(l,r):st.get(t)===ie?Tr(o,r):void 0):(f=Bt(En(c,u),r+1).slice(1,-1),c instanceof Date&&(f=f.map(h=>new Date(h)))),Ve(ee(i))<0&&f.reverse(),xi(t,e,{domain:f,range:n,reverse:s,unknown:a})}function xi(t,e,{domain:n=[0],unknown:r,scheme:o="rdylbu",interpolate:i,range:a=i!==void 0?Bt(i,n.length+1):st.get(t)===ie?Tr(o,n.length+1):void 0,reverse:l}){n=ee(n);const s=Ve(n);if(!isNaN(s)&&!By(n,s))throw new Error(`the ${t} scale has a non-monotonic domain`);return l&&(a=pr(a)),{type:"threshold",scale:pp(s<0?pr(n):n,a===void 0?[]:a).unknown(r),domain:n,range:a}}function By(t,e){for(let n=1,r=t.length,o=t[0];ne}}function Gn(t,e=$r){return t.length?[Nt(t,({value:n})=>n===void 0?n:Nt(n,e)),zt(t,({value:n})=>n===void 0?n:zt(n,e))]:[0,1]}function Qs(t,e){const n=st.get(t);return(n===Fn||n===qn||n===Dn?jy:Gn)(e)}function jy(t){return[0,t.length?zt(t,({value:e})=>e===void 0?e:zt(e,$r)):1]}function Fy(t,e){const n=t.find(({radius:a})=>a!==void 0);if(n!==void 0)return[0,n.radius];const r=An(t,.5,({value:a})=>a===void 0?NaN:An(a,.25,Jt)),o=e.map(a=>3*Math.sqrt(a/r)),i=30/zt(o);return i<1?o.map(a=>a*i):o}function Dy(t,e){const n=Sn(t,({value:i})=>i===void 0?NaN:Sn(i,Math.abs)),r=e.map(i=>12*i/n),o=60/zt(r);return o<1?r.map(i=>i*o):r}function qy(t){for(const{value:e}of t)if(e!==void 0)for(let n of e){if(n>0)return Gn(t,Jt);if(n<0)return Gn(t,vr)}return[1,10]}function Yy(t){const e=[];for(const{value:n}of t)if(n!==void 0)for(const r of n)e.push(r);return e}function wi(t){return(e,n)=>r=>t(e+r*(n-e))}let bi=0,ki;function Py(){const t=bi;return bi=0,ki=void 0,t}function ce(t){t!==ki&&(ki=t,console.warn(t),++bi)}function Ir(t,e,n,r,{type:o,nice:i,clamp:a,domain:l=Gn(r),unknown:s,pivot:c=0,scheme:u,range:f,symmetric:h=!0,interpolate:d=st.get(t)===ie?u==null&&f!==void 0?No:$i(u!==void 0?u:"rdbu"):En,reverse:p}){c=+c,l=ee(l);let[m,$]=l;if(l.length>2&&ce(`Warning: the diverging ${t} scale domain contains extra elements.`),_e(m,$)<0&&([m,$]=[$,m],p=!p),m=Math.min(m,c),$=Math.max($,c),typeof d!="function"&&(d=Zs(d)),f!==void 0&&(d=d.length===1?wi(d)(...f):Co(d,f)),p&&(d=Hs(d)),h){const y=n.apply(c),g=y-n.apply(m),x=n.apply($)-y;gx&&($=n.invert(y+g))}return e.domain([m,c,$]).unknown(s).interpolator(d),a&&e.clamp(a),i&&e.nice(i),{type:o,domain:[m,$],pivot:c,interpolate:d,scale:e}}function Xy(t,e,n){return Ir(t,xp(),Hy,e,n)}function _y(t,e,n){return Js(t,e,{...n,exponent:.5})}function Js(t,e,{exponent:n=1,...r}){return Ir(t,wp().exponent(n=+n),Ky(n),e,{...r,type:"diverging-pow"})}function Gy(t,e,{base:n=10,pivot:r=1,domain:o=Gn(e,r<0?vr:Jt),...i}){return Ir(t,bp().base(n=+n),Uy,e,{domain:o,pivot:r,...i})}function Vy(t,e,{constant:n=1,...r}){return Ir(t,kp().constant(n=+n),Qy(n),e,r)}const Hy={apply(t){return t},invert(t){return t}},Uy={apply:Math.log,invert:Math.exp},Zy={apply(t){return Math.sign(t)*Math.sqrt(Math.abs(t))},invert(t){return Math.sign(t)*(t*t)}};function Ky(t){return t===.5?Zy:{apply(e){return Math.sign(e)*Math.pow(Math.abs(e),t)},invert(e){return Math.sign(e)*Math.pow(Math.abs(e),1/t)}}}function Qy(t){return{apply(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))},invert(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}}function tc(t,e,n,r){return _n(t,e,n,r)}function Jy(t,e,n){return tc(t,Mp(),e,n)}function tg(t,e,n){return tc(t,Ap(),e,n)}const Vn=Symbol("ordinal");function ec(t,e,n,{type:r,interval:o,domain:i,range:a,reverse:l,hint:s}){return o=Qe(o,r),i===void 0&&(i=rc(n,o,t)),(r==="categorical"||r===Vn)&&(r="ordinal"),l&&(i=pr(i)),i=e.domain(i).domain(),a!==void 0&&(typeof a=="function"&&(a=a(i)),e.range(a)),{type:r,domain:i,range:a,scale:e,hint:s,interval:o}}function eg(t,e,{type:n,interval:r,domain:o,range:i,scheme:a,unknown:l,...s}){r=Qe(r,n),o===void 0&&(o=rc(e,r,t));let c;if(st.get(t)===Er)c=og(e),i=i===void 0?ig(c):J(i,ni);else if(st.get(t)===ie&&(i===void 0&&(n==="ordinal"||n===Vn)&&(i=Ly(o,a),i!==void 0&&(a=void 0)),a===void 0&&i===void 0&&(a=n==="ordinal"?"turbo":"observable10"),a!==void 0))if(i!==void 0){const u=$i(a),f=i[0],h=i[1]-i[0];i=({length:d})=>Bt(p=>u(f+h*p),d)}else i=Gs(a);if(l===Lp)throw new Error(`implicit unknown on ${t} scale is not supported`);return ec(t,zp().unknown(l),e,{...s,type:n,domain:o,range:i,hint:c})}function ng(t,e,{align:n=.5,padding:r=.5,...o}){return nc(Sp().align(n).padding(r),e,o,t)}function rg(t,e,{align:n=.5,padding:r=.1,paddingInner:o=r,paddingOuter:i=t==="fx"||t==="fy"?0:r,...a}){return nc(Vl().align(n).paddingInner(o).paddingOuter(i),e,a,t)}function nc(t,e,n,r){let{round:o}=n;return o!==void 0&&t.round(o=!!o),t=ec(r,t,e,n),t.round=o,t}function rc(t,e,n){const r=new zn;for(const{value:o,domain:i}of t){if(i!==void 0)return i();if(o!==void 0)for(const a of o)r.add(a)}if(e!==void 0){const[o,i]=yt(r).map(e.floor,e);return e.range(o,e.offset(i))}if(r.size>1e4&&st.get(n)===Gt)throw new Error(`implicit ordinal domain of ${n} scale has more than 10,000 values`);return il(r,Rt)}function oc(t,e){let n;for(const{hint:r}of t){const o=r?.[e];if(o!==void 0){if(n===void 0)n=o;else if(n!==o)return}}return n}function og(t){return{fill:oc(t,"fill"),stroke:oc(t,"stroke")}}function ig(t){return lt(t.fill)?Ep:Op}function Mi(t,{label:e,inset:n=0,insetTop:r=n,insetRight:o=n,insetBottom:i=n,insetLeft:a=n,round:l,nice:s,clamp:c,zero:u,align:f,padding:h,projection:d,facet:{label:p=e}={},...m}={}){const $={};for(const[y,g]of t){const x=m[y],v=hc(y,g,{round:st.get(y)===Gt?l:void 0,nice:s,clamp:c,zero:u,align:f,padding:h,projection:d,...x});if(v){let{label:b=y==="fx"||y==="fy"?p:e,percent:w,transform:k,inset:M,insetTop:A=M!==void 0?M:y==="y"?r:0,insetRight:z=M!==void 0?M:y==="x"?o:0,insetBottom:S=M!==void 0?M:y==="y"?i:0,insetLeft:L=M!==void 0?M:y==="x"?a:0}=x||{};if(k==null)k=void 0;else if(typeof k!="function")throw new Error("invalid scale transform; not a function");v.percent=!!w,v.label=b===void 0?lg(g,v):b,v.transform=k,y==="x"||y==="fx"?(v.insetLeft=+L,v.insetRight=+z):(y==="y"||y==="fy")&&(v.insetTop=+A,v.insetBottom=+S),$[y]=v}}return $}function ic(t){const e={},n={scales:e};for(const[r,o]of Object.entries(t)){const{scale:i,type:a,interval:l,label:s}=o;e[r]=yc(o),n[r]=i,i.type=a,l!=null&&(i.interval=l),s!=null&&(i.label=s)}return n}function ag(t,e){const{x:n,y:r,fx:o,fy:i}=t,a=o||i?Ai(e):e;o&&sc(o,a),i&&cc(i,a);const l=o||i?lc(t,e):e;n&&sc(n,l),r&&cc(r,l)}function lg(t=[],e){let n;for(const{label:r}of t)if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}if(n!==void 0)return!We(e)&&e.percent&&(n=`${n} (%)`),{inferred:!0,toString:()=>n}}function ac(t){return Math.sign(Ve(t.domain()))*Math.sign(Ve(t.range()))}function Ai(t){const{marginTop:e,marginRight:n,marginBottom:r,marginLeft:o,width:i,height:a,facet:{marginTop:l,marginRight:s,marginBottom:c,marginLeft:u}}=t;return{marginTop:Math.max(e,l),marginRight:Math.max(n,s),marginBottom:Math.max(r,c),marginLeft:Math.max(o,u),width:i,height:a}}function lc({fx:t,fy:e},n){const{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:l,height:s}=Ai(n);return{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:t?t.scale.bandwidth()+a+o:l,height:e?e.scale.bandwidth()+r+i:s,facet:{width:l,height:s}}}function sc(t,e){if(t.range===void 0){const{insetLeft:n,insetRight:r}=t,{width:o,marginLeft:i=0,marginRight:a=0}=e,l=i+n,s=o-a-r;t.range=[l,Math.max(l,s)],We(t)||(t.range=fc(t)),t.scale.range(t.range)}uc(t)}function cc(t,e){if(t.range===void 0){const{insetTop:n,insetBottom:r}=t,{height:o,marginTop:i=0,marginBottom:a=0}=e,l=i+n,s=o-a-r;t.range=[Math.max(l,s),l],We(t)?t.range.reverse():t.range=fc(t),t.scale.range(t.range)}uc(t)}function uc(t){t.round===void 0&&ug(t)&&sg(t)<=30&&t.scale.round(!0)}function sg({scale:t}){const e=t.domain().length,[n,r]=t.range(),o=t.paddingInner?t.paddingInner():1,i=t.paddingOuter?t.paddingOuter():t.padding(),a=e-o,l=Math.abs(r-n)/Math.max(1,a+i*2);return(l-Math.floor(l))*a}function fc(t){const e=t.scale.domain().length+mc(t);if(!(e>2))return t.range;const[n,r]=t.range;return Array.from({length:e},(o,i)=>n+i/(e-1)*(r-n))}function Li(t,e,n){return hc(t,n===void 0?void 0:[{hint:n}],{...e})}function hc(t,e=[],n={}){const r=cg(t,e,n);if(n.type===void 0&&n.domain===void 0&&n.range===void 0&&n.interval==null&&t!=="fx"&&t!=="fy"&&We({type:r})){const o=e.map(({value:i})=>i).filter(i=>i!==void 0);o.some(At)?ce(`Warning: some data associated with the ${t} scale are dates. Dates are typically associated with a "utc" or "time" scale rather than a "${rn(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., d3.utcDay), or you can suppress this warning by setting the type of the ${t} scale to "${rn(r)}".`):o.some(Gm)?ce(`Warning: some data associated with the ${t} scale are strings that appear to be dates (e.g., YYYY-MM-DD). If these strings represent dates, you should parse them to Date objects. Dates are typically associated with a "utc" or "time" scale rather than a "${rn(r)}" scale. If you are using a bar mark, you probably want a rect mark with the interval option instead; if you are using a group transform, you probably want a bin transform instead. If you want to treat this data as ordinal, you can suppress this warning by setting the type of the ${t} scale to "${rn(r)}".`):o.some(Vm)&&ce(`Warning: some data associated with the ${t} scale are strings that appear to be numbers. If these strings represent numbers, you should parse or coerce them to numbers. Numbers are typically associated with a "linear" scale rather than a "${rn(r)}" scale. If you want to treat this data as ordinal, you can specify the interval of the ${t} scale (e.g., 1 for integers), or you can suppress this warning by setting the type of the ${t} scale to "${rn(r)}".`)}switch(n.type=r,r){case"diverging":case"diverging-sqrt":case"diverging-pow":case"diverging-log":case"diverging-symlog":case"cyclical":case"sequential":case"linear":case"sqrt":case"threshold":case"quantile":case"pow":case"log":case"symlog":n=Br(e,n,St);break;case"identity":switch(st.get(t)){case Gt:n=Br(e,n,St);break;case Er:n=Br(e,n,fg);break}break;case"utc":case"time":n=Br(e,n,us);break}switch(r){case"diverging":return Xy(t,e,n);case"diverging-sqrt":return _y(t,e,n);case"diverging-pow":return Js(t,e,n);case"diverging-log":return Gy(t,e,n);case"diverging-symlog":return Vy(t,e,n);case"categorical":case"ordinal":case Vn:return eg(t,e,n);case"cyclical":case"sequential":case"linear":return Oy(t,e,n);case"sqrt":return Cy(t,e,n);case"threshold":return xi(t,e,n);case"quantile":return Ty(t,e,n);case"quantize":return Iy(t,e,n);case"pow":return Ks(t,e,n);case"log":return Ny(t,e,n);case"symlog":return Ry(t,e,n);case"utc":return tg(t,e,n);case"time":return Jy(t,e,n);case"point":return ng(t,e,n);case"band":return rg(t,e,n);case"identity":return Wy(t);case void 0:return;default:throw new Error(`unknown scale type: ${r}`)}}function rn(t){return typeof t=="symbol"?t.description:t}function dc(t){return typeof t=="string"?`${t}`.toLowerCase():t}const pc={toString:()=>"projection"};function cg(t,e,{type:n,domain:r,range:o,scheme:i,pivot:a,projection:l}){if(n=dc(n),t==="fx"||t==="fy")return"band";(t==="x"||t==="y")&&l!=null&&(n=pc);for(const c of e){const u=dc(c.type);if(u!==void 0){if(n===void 0)n=u;else if(n!==u)throw new Error(`scale incompatible with channel: ${n} !== ${u}`)}}if(n===pc)return;if(n!==void 0)return n;if(r===void 0&&!e.some(({value:c})=>c!==void 0))return;const s=st.get(t);if(s===Fn)return"sqrt";if(s===qn||s===Dn)return"linear";if(s===Er)return"ordinal";if((r||o||[]).length>2)return zi(s);if(r!==void 0){if(ct(r))return zi(s);if(At(r))return"utc"}else{const c=e.map(({value:u})=>u).filter(u=>u!==void 0);if(c.some(ct))return zi(s);if(c.some(At))return"utc"}if(s===ie){if(a!=null||Sy(i))return"diverging";if(Ay(i))return"categorical"}return"linear"}function zi(t){switch(t){case Gt:return"point";case ie:return Vn;default:return"ordinal"}}function We({type:t}){return t==="ordinal"||t==="point"||t==="band"||t===Vn}function mc({type:t}){return t==="threshold"}function ug({type:t}){return t==="point"||t==="band"}function Vt(t){if(t===void 0)return!0;const e=t.domain(),n=t(e[0]);for(let r=1,o=e.length;r{if(!st.has(e=`${e}`))throw new Error(`unknown scale: ${e}`);return t[e]}}function yc({scale:t,type:e,domain:n,range:r,interpolate:o,interval:i,transform:a,percent:l,pivot:s}){if(e==="identity")return{type:"identity",apply:u=>u,invert:u=>u};const c=t.unknown?t.unknown():void 0;return{type:e,domain:In(n),...r!==void 0&&{range:In(r)},...a!==void 0&&{transform:a},...l&&{percent:l},...c!==void 0&&{unknown:c},...i!==void 0&&{interval:i},...o!==void 0&&{interpolate:o},...t.clamp&&{clamp:t.clamp()},...s!==void 0&&{pivot:s,symmetric:!1},...t.base&&{base:t.base()},...t.exponent&&{exponent:t.exponent()},...t.constant&&{constant:t.constant()},...t.align&&{align:t.align(),round:t.round()},...t.padding&&(t.paddingInner?{paddingInner:t.paddingInner(),paddingOuter:t.paddingOuter()}:{padding:t.padding()}),...t.bandwidth&&{bandwidth:t.bandwidth(),step:t.step()},apply:u=>t(u),...t.invert&&{invert:u=>t.invert(u)}}}function pg(t,e){const{fx:n,fy:r}=Mi(t,e),o=n?.scale.domain(),i=r?.scale.domain();return o&&i?Cp(o,i).map(([a,l],s)=>({x:a,y:l,i:s})):o?o.map((a,l)=>({x:a,i:l})):i?i.map((a,l)=>({y:a,i:l})):void 0}function mg(t,{x:e,y:n}){return e&&=Ei(e),n&&=Ei(n),t.filter(e&&n?r=>e.has(r.x)&&n.has(r.y):e?r=>e.has(r.x):r=>n.has(r.y)).sort(e&&n?(r,o)=>e.get(r.x)-e.get(o.x)||n.get(r.y)-n.get(o.y):e?(r,o)=>e.get(r.x)-e.get(o.x):(r,o)=>n.get(r.y)-n.get(o.y))}function Si(t,{fx:e,fy:n}){const r=ne(t),o=e?.value,i=n?.value;return e&&n?Ln(r,a=>(a.fx=o[a[0]],a.fy=i[a[0]],a),a=>o[a],a=>i[a]):e?Ln(r,a=>(a.fx=o[a[0]],a),a=>o[a]):Ln(r,a=>(a.fy=i[a[0]],a),a=>i[a])}function yg(t,e,{marginTop:n,marginLeft:r}){return t&&e?({x:o,y:i})=>`translate(${t(o)-r},${e(i)-n})`:t?({x:o})=>`translate(${t(o)-r},0)`:({y:o})=>`translate(0,${e(o)-n})`}function gg(t){const e=[],n=new Uint32Array(qt(t,r=>r.length));for(const r of t){let o=0;for(const i of t)r!==i&&(n.set(i,o),o+=i.length);e.push(n.slice(0,o))}return e}const $g=new Map([["top",Oi],["right",Ri],["bottom",Ci],["left",Ni],["top-left",jr(Oi,Ni)],["top-right",jr(Oi,Ri)],["bottom-left",jr(Ci,Ni)],["bottom-right",jr(Ci,Ri)],["top-empty",wg],["right-empty",Mg],["bottom-empty",bg],["left-empty",kg],["empty",Ag]]);function vg(t){if(t==null)return null;const e=$g.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid facet anchor: ${t}`)}const gc=new WeakMap;function Ei(t){let e=gc.get(t);return e||gc.set(t,e=new Ro(J(t,(n,r)=>[n,r]))),e}function xe(t,e){return Ei(t).get(e)}function xg(t,e,n){return e=re(e),n=re(n),t.find(r=>Object.is(re(r.x),e)&&Object.is(re(r.y),n))}function Wr(t,e,n){return xg(t,e,n)?.empty}function Oi(t,{y:e},{y:n}){return e?xe(e,n)===0:!0}function Ci(t,{y:e},{y:n}){return e?xe(e,n)===e.length-1:!0}function Ni(t,{x:e},{x:n}){return e?xe(e,n)===0:!0}function Ri(t,{x:e},{x:n}){return e?xe(e,n)===e.length-1:!0}function wg(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=xe(e,r);if(i>0)return Wr(t,n,e[i-1])}function bg(t,{y:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=xe(e,r);if(i0)return Wr(t,e[i-1],r)}function Mg(t,{x:e},{x:n,y:r,empty:o}){if(o)return!1;if(!e)return;const i=xe(e,n);if(ir.get(o)?.get(i)??[]):e?t.map(({x:o})=>r.get(o)??[]):t.map(({y:o})=>r.get(o)??[])}const $c=Math.PI,ue=2*$c,Ii=.618;function Lg({projection:t,inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={},a){if(t==null)return;if(typeof t.stream=="function")return t;let l,s,c="frame";if(Tt(t)){let b;if({type:t,domain:s,inset:b,insetTop:n=b!==void 0?b:n,insetRight:r=b!==void 0?b:r,insetBottom:o=b!==void 0?b:o,insetLeft:i=b!==void 0?b:i,clip:c=c,...l}=t,t==null)return}typeof t!="function"&&({type:t}=Bi(t));const{width:u,height:f,marginLeft:h,marginRight:d,marginTop:p,marginBottom:m}=a,$=u-h-d-i-r,y=f-p-m-n-o;if(t=t?.({width:$,height:y,clip:c,...l}),t==null)return;c=zg(c,h,p,u-d,f-m);let g=h+i,x=p+n,v;if(s!=null){const[[b,w],[k,M]]=Kt(t).bounds(s),A=Math.min($/(k-b),y/(M-w));A>0?(g-=(A*(b+k)-$)/2,x-=(A*(w+M)-y)/2,v=mr({point(z,S){this.stream.point(z*A+g,S*A+x)}})):ce("Warning: the projection could not be fit to the specified domain; using the default scale.")}return v??=g===0&&x===0?vc():mr({point(b,w){this.stream.point(b+g,w+x)}}),{stream:b=>t.stream(v.stream(c(b)))}}function Bi(t){switch(`${t}`.toLowerCase()){case"albers-usa":return Ft(Pp,.7463,.4673);case"albers":return Fr(Vp,.7463,.4673);case"azimuthal-equal-area":return Ft(Yp,4,4);case"azimuthal-equidistant":return Ft(qp,ue,ue);case"conic-conformal":return Fr(Gp,ue,ue);case"conic-equal-area":return Fr(_p,6.1702,2.9781);case"conic-equidistant":return Fr(Xp,7.312,3.6282);case"equal-earth":return Ft(Dp,5.4133,2.6347);case"equirectangular":return Ft(Fp,ue,$c);case"gnomonic":return Ft(jp,3.4641,3.4641);case"identity":return{type:vc};case"reflect-y":return{type:Sg};case"mercator":return Ft(Wp,ue,ue);case"orthographic":return Ft(Bp,2,2);case"stereographic":return Ft(Ip,2,2);case"transverse-mercator":return Ft(Tp,ue,ue);default:throw new Error(`unknown projection type: ${t}`)}}function zg(t,e,n,r,o){if(t===!1||t==null||typeof t=="number")return i=>i;switch(t===!0&&(t="frame"),`${t}`.toLowerCase()){case"frame":return Np(e,n,r,o);default:throw new Error(`unknown projection clip type: ${t}`)}}function Ft(t,e,n){return{type:({width:r,height:o,rotate:i,precision:a=.15,clip:l})=>{const s=t();return a!=null&&s.precision?.(a),i!=null&&s.rotate?.(i),typeof l=="number"&&s.clipAngle?.(l),r!=null&&(s.scale(Math.min(r/e,o/n)),s.translate([r/2,o/2])),s},aspectRatio:n/e}}function Fr(t,e,n){const{type:r,aspectRatio:o}=Ft(t,e,n);return{type:i=>{const{parallels:a,domain:l,width:s,height:c}=i,u=r(i);return a!=null&&(u.parallels(a),l===void 0&&s!=null&&u.fitSize([s,c],{type:"Sphere"})),u},aspectRatio:o}}const vc=xt({stream:t=>t}),Sg=xt(mr({point(t,e){this.stream.point(t,-e)}}));function xc(t,e,n,r){const o=n[t],i=n[e],a=o.length,l=n[t]=new Float64Array(a).fill(NaN),s=n[e]=new Float64Array(a).fill(NaN);let c;const u=r.stream({point(f,h){l[c]=f,s[c]=h}});for(c=0;c5?5:s:Ii}}if(t!=null){if(typeof t!="function"){const{aspectRatio:e}=Bi(t);if(e)return e}return Ii}}function Hn(t,e,{projection:n}){const{x:r,y:o}=t;let i={};return r&&(i.x=r),o&&(i.y=o),i=mi(i,e),n&&r?.scale==="x"&&o?.scale==="y"&&xc("x","y",i,n),r&&(i.x=St(i.x)),o&&(i.y=St(i.y)),i}function Cg(t){const e=[],n=[],r={scale:"x",value:e},o={scale:"y",value:n},i={point(a,l){e.push(a),n.push(l)},lineStart(){},lineEnd(){},polygonStart(){},polygonEnd(){},sphere(){}};for(const a of t.value)Rp(a,i);return[r,o]}function Dr(t={}){const{document:e=typeof window<"u"?window.document:void 0,clip:n}=t;return{document:e,clip:xs(n)}}function U(t,{document:e}){return de(Hl(t).call(e.documentElement))}const Wi=Symbol("unset");function on(t){return(t.length===1?Ng:Rg)(t)}function Ng(t){let e,n=Wi;return r=>(Object.is(n,r)||(n=r,e=t(r)),e)}function Rg(t){let e,n;return(...r)=>((n?.length!==r.length||n.some((o,i)=>!Object.is(o,r[i])))&&(n=r,e=t(...r)),e)}const Tg=on(t=>new Intl.NumberFormat(t)),Ig=on((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{month:e}})),Bg=on((t,e)=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e&&{weekday:e}}));function wc(t="en-US"){const e=Tg(t);return n=>n!=null&&!isNaN(n)?e.format(n):void 0}function Wg(t="en-US",e="short"){const n=Ig(t,e);return r=>r!=null&&!isNaN(r=+new Date(Date.UTC(2e3,+r)))?n.format(r):void 0}function jg(t="en-US",e="short"){const n=Bg(t,e);return r=>r!=null&&!isNaN(r=+new Date(Date.UTC(2001,0,+r)))?n.format(r):void 0}function bc(t){return Om(t,"Invalid Date")}function Fg(t="en-US"){const e=wc(t);return n=>(n instanceof Date?bc:typeof n=="number"?e:kt)(n)}const an=Fg(),wt=(typeof window<"u"?window.devicePixelRatio>1:typeof it>"u")?0:.5;let Dg=0,qg=0;function kc(){return`plot-clip-${++Dg}`}function Yg(){return`plot-pattern-${++qg}`}function Mc(t,{title:e,href:n,ariaLabel:r,ariaDescription:o,ariaHidden:i,target:a,fill:l,fillOpacity:s,stroke:c,strokeWidth:u,strokeOpacity:f,strokeLinejoin:h,strokeLinecap:d,strokeMiterlimit:p,strokeDasharray:m,strokeDashoffset:$,opacity:y,mixBlendMode:g,imageFilter:x,paintOrder:v,pointerEvents:b,shapeRendering:w,channels:k},{ariaLabel:M,fill:A="currentColor",fillOpacity:z,stroke:S="none",strokeOpacity:L,strokeWidth:C,strokeLinecap:E,strokeLinejoin:O,strokeMiterlimit:R,paintOrder:N}){A===null&&(l=null,s=null),S===null&&(c=null,f=null),lt(A)?!lt(S)&&(!lt(l)||k?.fill)&&(S="none"):lt(S)&&(!lt(c)||k?.stroke)&&(A="none");const[F,T]=Mt(l,A),[B,j]=ht(s,z),[I,Y]=Mt(c,S),[H,G]=ht(f,L),[X,W]=ht(y);nn(Y)||(u===void 0&&(u=C),d===void 0&&(d=E),h===void 0&&(h=O),p===void 0&&!Zm(h)&&(p=R),!nn(T)&&v===void 0&&(v=N));const[P,_]=ht(u);return A!==null&&(t.fill=pt(T,"currentColor"),t.fillOpacity=Un(j,1)),S!==null&&(t.stroke=pt(Y,"none"),t.strokeWidth=Un(_,1),t.strokeOpacity=Un(G,1),t.strokeLinejoin=pt(h,"miter"),t.strokeLinecap=pt(d,"butt"),t.strokeMiterlimit=Un(p,4),t.strokeDasharray=pt(m,"none"),t.strokeDashoffset=pt($,"0")),t.target=kt(a),t.ariaLabel=kt(M),t.ariaDescription=kt(o),t.ariaHidden=kt(i),t.opacity=Un(W,1),t.mixBlendMode=pt(g,"normal"),t.imageFilter=pt(x,"none"),t.paintOrder=pt(v,"normal"),t.pointerEvents=pt(b,"auto"),t.shapeRendering=pt(w,"auto"),{title:{value:e,optional:!0,filter:null},href:{value:n,optional:!0,filter:null},ariaLabel:{value:r,optional:!0,filter:null},fill:{value:F,scale:"auto",optional:!0},fillOpacity:{value:B,scale:"auto",optional:!0},stroke:{value:I,scale:"auto",optional:!0},strokeOpacity:{value:H,scale:"auto",optional:!0},strokeWidth:{value:P,optional:!0},opacity:{value:X,scale:"auto",optional:!0}}}function Pg(t,e){e&&t.filter(n=>Fo(e[n])).append("title").call(_g,e)}function Xg(t,e){e&&t.filter(([n])=>Fo(e[n])).append("title").call(Gg,e)}function _g(t,e){e&&t.text(n=>an(e[n]))}function Gg(t,e){e&&t.text(([n])=>an(e[n]))}function ut(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:l,strokeOpacity:s,strokeWidth:c,opacity:u,href:f}){r&&q(t,"aria-label",h=>r[h]),i&&q(t,"fill",h=>i[h]),a&&q(t,"fill-opacity",h=>a[h]),l&&q(t,"stroke",h=>l[h]),s&&q(t,"stroke-opacity",h=>s[h]),c&&q(t,"stroke-width",h=>c[h]),u&&q(t,"opacity",h=>u[h]),f&&zc(t,h=>f[h],e),n||Pg(t,o)}function qr(t,{target:e,tip:n},{ariaLabel:r,title:o,fill:i,fillOpacity:a,stroke:l,strokeOpacity:s,strokeWidth:c,opacity:u,href:f}){r&&q(t,"aria-label",([h])=>r[h]),i&&q(t,"fill",([h])=>i[h]),a&&q(t,"fill-opacity",([h])=>a[h]),l&&q(t,"stroke",([h])=>l[h]),s&&q(t,"stroke-opacity",([h])=>s[h]),c&&q(t,"stroke-width",([h])=>c[h]),u&&q(t,"opacity",([h])=>u[h]),f&&zc(t,([h])=>f[h],e),n||Xg(t,o)}function Vg({ariaLabel:t,title:e,fill:n,fillOpacity:r,stroke:o,strokeOpacity:i,strokeWidth:a,opacity:l,href:s},{tip:c}){return[t,c?void 0:e,n,r,o,i,a,l,s].filter(u=>u!==void 0)}function ji(t,e,n){const r=Ce(t,o=>e[o]);return n===void 0&&r.size>1+t.length>>1&&ce("Warning: the implicit z channel has high cardinality. This may occur when the fill or stroke channel is associated with quantitative data rather than ordinal or categorical data. You can suppress this warning by setting the z option explicitly; if this data represents a single series, set z to null."),r.values()}function*Ac(t,e,n,r){const{z:o}=n,{z:i}=r,a=Vg(r,n),l=[...e,...a];for(const s of i?ji(t,i,o):[t]){let c,u;t:for(const f of s){for(const h of l)if(!vt(h[f])){u&&u.push(-1);continue t}if(c===void 0){u&&(yield u),c=a.map(h=>re(h[f])),u=[f];continue}u.push(f);for(let h=0;hre(d[f])),u=[f];continue t}}u&&(yield u)}}function Hg(t,e,n,r){let o;const{clip:i=r.clip}=e;switch(i){case"frame":{t=U("svg:g",r).each(function(){this.appendChild(t.node()),t.node=()=>this}),o=Ug(r,n);break}case"sphere":{o=Zg(r);break}}q(t,"aria-label",e.ariaLabel),q(t,"aria-description",e.ariaDescription),q(t,"aria-hidden",e.ariaHidden),q(t,"clip-path",o)}function Lc(t){const e=new WeakMap;return(n,r)=>{let o=e.get(n);if(!o){const i=kc();de(n.ownerSVGElement).append("clipPath").attr("id",i).call(t,n,r),e.set(n,o=`url(#${i})`)}return o}}const Ug=Lc((t,e,n)=>{const{width:r,height:o,marginLeft:i,marginRight:a,marginTop:l,marginBottom:s}=n;t.append("rect").attr("x",i).attr("y",l).attr("width",r-a-i).attr("height",o-l-s)}),Zg=Lc((t,e)=>{const{projection:n}=e;if(!n)throw new Error('the "sphere" clip option requires a projection');t.append("path").attr("d",Kt(n)({type:"Sphere"}))});function ot(t,e,n,r){Hg(t,e,n,r),q(t,"class",e.className),q(t,"fill",e.fill),q(t,"fill-opacity",e.fillOpacity),q(t,"stroke",e.stroke),q(t,"stroke-width",e.strokeWidth),q(t,"stroke-opacity",e.strokeOpacity),q(t,"stroke-linejoin",e.strokeLinejoin),q(t,"stroke-linecap",e.strokeLinecap),q(t,"stroke-miterlimit",e.strokeMiterlimit),q(t,"stroke-dasharray",e.strokeDasharray),q(t,"stroke-dashoffset",e.strokeDashoffset),q(t,"shape-rendering",e.shapeRendering),q(t,"filter",e.imageFilter),q(t,"paint-order",e.paintOrder);const{pointerEvents:o=r.pointerSticky===!1?"none":void 0}=e;q(t,"pointer-events",o)}function Q(t,e){Kg(t,"mix-blend-mode",e.mixBlendMode),q(t,"opacity",e.opacity)}function zc(t,e,n){t.each(function(r){const o=e(r);if(o!=null){const i=this.ownerDocument.createElementNS(Ne.svg,"a");i.setAttribute("fill","inherit"),i.setAttributeNS(Ne.xlink,"href",o),n!=null&&i.setAttribute("target",n),this.parentNode.insertBefore(i,this).appendChild(this)}})}function q(t,e,n){n!=null&&t.attr(e,n)}function Kg(t,e,n){n!=null&&t.style(e,n)}function tt(t,e,{x:n,y:r},o=wt,i=wt){o+=e.dx,i+=e.dy,n?.bandwidth&&(o+=n.bandwidth()/2),r?.bandwidth&&(i+=r.bandwidth()/2),(o||i)&&t.attr("transform",`translate(${o},${i})`)}function pt(t,e){if((t=kt(t))!==e)return t}function Un(t,e){if((t=rt(t))!==e)return t}const Qg=/^-?([_a-z]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])([_a-z0-9-]|[\240-\377]|\\[0-9a-f]{1,6}(\r\n|[ \t\r\n\f])?|\\[^\r\n\f0-9a-f])*$/i;function Yr(t){if(t===void 0)return"plot-d6a7b5";if(t=`${t}`,!Qg.test(t))throw new Error(`invalid class name: ${t}`);return t}function Fi(t,e){if(typeof e=="string")t.property("style",e);else if(e!=null)for(const n of t)Object.assign(n.style,e)}function Ht({frameAnchor:t},{width:e,height:n,marginTop:r,marginRight:o,marginBottom:i,marginLeft:a}){return[/left$/.test(t)?a:/right$/.test(t)?e-o:(a+e-o)/2,/^top/.test(t)?r:/^bottom/.test(t)?n-i:(r+n-i)/2]}let et=class{constructor(e,n={},r={},o){const{facet:i="auto",facetAnchor:a,fx:l,fy:s,sort:c,dx:u=0,dy:f=0,margin:h=0,marginTop:d=h,marginRight:p=h,marginBottom:m=h,marginLeft:$=h,className:y,clip:g=o?.clip,channels:x,tip:v,render:b}=r;if(this.data=e,this.sort=ge(c)?c:null,this.initializer=Lt(r).initializer,this.transform=this.initializer?r.transform:jt(r).transform,i===null||i===!1?this.facet=null:(this.facet=Ot(i===!0?"include":i,"facet",["auto","include","exclude","super"]),this.fx=e===Rn&&typeof l=="string"?[l]:l,this.fy=e===Rn&&typeof s=="string"?[s]:s),this.facetAnchor=vg(a),n=Jo(n),x!==void 0&&(n={...Jg(x),...n}),o!==void 0&&(n={...Mc(this,r,o),...n}),this.channels=Object.fromEntries(Object.entries(n).map(([w,k])=>{if(Xt(k.value)){const{value:M,label:A=k.label,scale:z=k.scale}=k.value;k={...k,label:A,scale:z,value:M}}if(e===Rn&&typeof k.value=="string"){const{value:M}=k;k={...k,value:[M]}}return[w,k]}).filter(([w,{value:k,optional:M}])=>{if(k!=null)return!0;if(M)return!1;throw new Error(`missing channel value: ${w}`)})),this.dx=+u,this.dy=+f,this.marginTop=+d,this.marginRight=+p,this.marginBottom=+m,this.marginLeft=+$,this.clip=xs(g),this.tip=t0(v),this.className=y?Yr(y):null,this.facet==="super"){if(l||s)throw new Error("super-faceting cannot use fx or fy");for(const w in this.channels){const{scale:k}=n[w];if(!(k!=="x"&&k!=="y"))throw new Error("super-faceting cannot use x or y")}}b!=null&&(this.render=ln(b,this.render))}initialize(e,n,r){let o=Ze(this.data);e===void 0&&o!=null&&(e=[ne(o)]);const i=e;this.transform!=null&&({facets:e,data:o}=this.transform(o,e,r),o=Ze(o)),e!==void 0&&(e.original=i);const a=Ws(this.channels,o);return this.sort!=null&&wy(o,e,a,n,this.sort),{data:o,facets:e,channels:a}}filter(e,n,r){for(const o in n){const{filter:i=vt}=n[o];if(i!==null){const a=r[o];e=e.filter(l=>i(a[l]))}}return e}project(e,n,r){for(const o in e)if(e[o].scale==="x"&&/^x|x$/.test(o)){const i=o.replace(/^x|x$/,"y");i in e&&e[i].scale==="y"&&xc(o,i,n,r.projection)}}scale(e,n,r){const o=mi(e,n);return r.projection&&this.project(e,o,r),o}};function It(...t){return t.plot=et.prototype.plot,t}function ln(t,e){if(t==null)return e===null?void 0:e;if(e==null)return t===null?void 0:t;if(typeof t!="function")throw new TypeError(`invalid render transform: ${t}`);if(typeof e!="function")throw new TypeError(`invalid render transform: ${e}`);return function(n,r,o,i,a,l){return t.call(this,n,r,o,i,a,(s,c,u,f,h)=>e.call(this,s,c,u,f,h,l))}}function Jg(t){return Object.fromEntries(Object.entries(Jo(t)).map(([e,n])=>(n=typeof n=="string"?{value:n,label:e}:tn(n),n.filter===void 0&&n.scale==null&&(n={...n,filter:null}),[e,n])))}function t0(t){return t===!0?"xy":t===!1||t==null?null:typeof t=="string"?Ot(t,"tip",["x","y","xy"]):t}function je(t,e){return t?.tip===!0?{...t,tip:e}:Tt(t?.tip)&&t.tip.pointer===void 0?{...t,tip:{...t.tip,pointer:e}}:t}function e0(t,e,n={}){let r=.5-wt,o=.5+wt,i=.5+wt,a=.5-wt;for(const{marginTop:m,marginRight:$,marginBottom:y,marginLeft:g}of e)m>r&&(r=m),$>o&&(o=$),y>i&&(i=y),g>a&&(a=g);let{margin:l,marginTop:s=l!==void 0?l:r,marginRight:c=l!==void 0?l:o,marginBottom:u=l!==void 0?l:i,marginLeft:f=l!==void 0?l:a}=n;s=+s,c=+c,u=+u,f=+f;let{width:h=640,height:d=n0(t,n,{width:h,marginTopDefault:r,marginRightDefault:o,marginBottomDefault:i,marginLeftDefault:a})+Math.max(0,s-r+u-i)}=n;h=+h,d=+d;const p={width:h,height:d,marginTop:s,marginRight:c,marginBottom:u,marginLeft:f};if(t.fx||t.fy){let{margin:m,marginTop:$=m!==void 0?m:s,marginRight:y=m!==void 0?m:c,marginBottom:g=m!==void 0?m:u,marginLeft:x=m!==void 0?m:f}=n.facet??{};$=+$,y=+y,g=+g,x=+x,p.facet={marginTop:$,marginRight:y,marginBottom:g,marginLeft:x}}return p}function n0({x:t,y:e,fy:n,fx:r},{projection:o,aspectRatio:i},{width:a,marginTopDefault:l,marginRightDefault:s,marginBottomDefault:c,marginLeftDefault:u}){const f=n&&n.scale.domain().length||1,h=Og(o);if(h){const p=r?r.scale.domain().length:1,m=(1.1*f-.1)/(1.1*p-.1)*h,$=Math.max(.1,Math.min(10,m));return Math.round((a-u-s)*$+l+c)}const d=e?We(e)?e.scale.domain().length||1:Math.max(7,17/f):1;if(i!=null){if(i=+i,!(isFinite(i)&&i>0))throw new Error(`invalid aspectRatio: ${i}`);const p=Sc("y",e)/(Sc("x",t)*i),m=r?r.scale.bandwidth():1,$=n?n.scale.bandwidth():1,y=m*(a-u-s)-t.insetLeft-t.insetRight;return(p*y+e.insetTop+e.insetBottom)/$+l+c}return!!(e||n)*Math.max(1,Math.min(60,d*f))*20+!!r*30+60}function Sc(t,e){if(!e)throw new Error(`aspectRatio requires ${t} scale`);const{type:n,domain:r}=e;let o;switch(n){case"linear":case"utc":case"time":o=Number;break;case"pow":{const l=e.scale.exponent();o=s=>Math.pow(s,l);break}case"log":o=Math.log;break;case"point":case"band":return r.length;default:throw new Error(`unsupported ${t} scale for aspectRatio: ${n}`)}const[i,a]=yt(r);return Math.abs(o(a)-o(i))}const Ec=new WeakMap;function Di(t,e,{x:n,y:r,px:o,py:i,maxRadius:a=40,channels:l,render:s,...c}={}){return a=+a,o!=null&&(n??=null,l={...l,px:{value:o,scale:"x"}}),i!=null&&(r??=null,l={...l,py:{value:i,scale:"y"}}),{x:n,y:r,channels:l,...c,render:ln(function(u,f,h,d,p,m){p={...p,pointerSticky:!1};const $=p.ownerSVGElement,{data:y}=p.getMarkState(this);let g=Ec.get($);g||Ec.set($,g={sticky:!1,roots:[],renders:[]});let x=g.renders.push(Y)-1;const{x:v,y:b,fx:w,fy:k}=f;let M=w?w(u.fx)-d.marginLeft:0,A=k?k(u.fy)-d.marginTop:0;v?.bandwidth&&(M+=v.bandwidth()/2),b?.bandwidth&&(A+=b.bandwidth()/2);const z=u.fi!=null;let S;if(z){let W=g.facetStates;W||(g.facetStates=W=new Map),S=W.get(this),S||W.set(this,S=new Map)}const[L,C]=Ht(this,d),{px:E,py:O}=h,R=E?W=>E[W]:Oc(h,L),N=O?W=>O[W]:Cc(h,C);let F,T,B,j;function I(W,P){if(z)if(j&&(j=cancelAnimationFrame(j)),W==null)S.delete(u.fi);else{S.set(u.fi,P),j=requestAnimationFrame(()=>{j=null;for(const[_,Z]of S)if(Z1)){const Z=F==null?null:te(y)?y[F]:y.get(F);p.dispatchValue(Z)}return _}function H(W){if(g.sticky||W.pointerType==="mouse"&&W.buttons===1)return;let[P,_]=Hp(W);P-=M,_-=A;const Z=Pd.width-d.marginRight?1:t,K=_d.height-d.marginBottom?1:e;let nt=null,ft=a*a;for(const at of u){const dt=Z*(R(at)-P),mt=K*(N(at)-_),bt=dt*dt+mt*mt;bt<=ft&&(nt=at,ft=bt)}if(nt!=null&&(t!==1||e!==1)){const at=R(nt)-P,dt=N(nt)-_;ft=at*at+dt*dt}I(nt,ft)}function G(W){W.pointerType==="mouse"&&F!=null&&(g.sticky&&g.roots.some(P=>P?.contains(W.target))||(g.sticky?(g.sticky=!1,g.renders.forEach(P=>P(null))):(g.sticky=!0,Y(F)),W.stopImmediatePropagation()))}function X(W){W.pointerType==="mouse"&&(g.sticky||I(null))}return $.addEventListener("pointerenter",H),$.addEventListener("pointermove",H),$.addEventListener("pointerdown",G),$.addEventListener("pointerleave",X),Y(null)},s)}}function qi(t){return Di(1,1,t)}function Yi(t){return Di(1,.01,t)}function Pr(t){return Di(.01,1,t)}function Oc({x1:t,x2:e,x:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function Cc({y1:t,y2:e,y:n=t},r){return t&&e?o=>(t[o]+e[o])/2:n?o=>n[o]:()=>r}function Nc(t){return We(t)&&t.interval===void 0?void 0:"tabular-nums"}function r0(t,e){let{label:n=t.label,tickSize:r=6,width:o=240,height:i=44+r,marginTop:a=18,marginRight:l=0,marginBottom:s=16+r,marginLeft:c=0,style:u,ticks:f=(o-c-l)/64,tickFormat:h,fontVariant:d=Nc(t),round:p=!0,opacity:m,className:$}=e;const y=Dr(e);$=Yr($),m=ht(m)[1],h===null&&(h=()=>null);const g=U("svg",y).attr("class",`${$}-ramp`).attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("width",o).attr("height",i).attr("viewBox",`0 0 ${o} ${i}`).call(L=>L.append("style").text(`:where(.${$}-ramp) { + display: block; + height: auto; + height: intrinsic; + max-width: 100%; + overflow: visible; +} +:where(.${$}-ramp text) { + white-space: pre; +}`)).call(Fi,u);let x=L=>L.selectAll(".tick line").attr("y1",a+s-i),v;const b=p?(L,C)=>L.rangeRound(C):(L,C)=>L.range(C),{type:w,domain:k,range:M,interpolate:A,scale:z,pivot:S}=t;if(A){const L=M===void 0?A:Co(A.length===1?wi(A):A,M);v=b(z.copy(),Bt(En(c,o-l),Math.min(k.length+(S!==void 0),M===void 0?1/0:M.length)));const C=256,E=y.document.createElement("canvas");E.width=C,E.height=1;const O=E.getContext("2d");for(let R=0,N=C-1;RE:typeof h=="string"?To(h):h;v=b(Gl().domain([-1,M.length-1]),[c,o-l]),g.append("g").attr("fill-opacity",m).selectAll().data(M).enter().append("rect").attr("x",(E,O)=>v(O-1)).attr("y",a).attr("width",(E,O)=>v(O)-v(O-1)).attr("height",i-a-s).attr("fill",E=>E),f=J(L,(E,O)=>O),h=E=>C(L[E],E)}else v=b(Vl().domain(k),[c,o-l]),g.append("g").attr("fill-opacity",m).selectAll().data(k).enter().append("rect").attr("x",v).attr("y",a).attr("width",Math.max(0,v.bandwidth()-1)).attr("height",i-a-s).attr("fill",z),x=()=>{};return g.append("g").attr("transform",`translate(0,${i-s})`).call(Up(v).ticks(Array.isArray(f)?null:f,typeof h=="string"?h:void 0).tickFormat(typeof h=="function"?h:void 0).tickSize(r).tickValues(Array.isArray(f)?f:null)).attr("font-size",null).attr("font-family",null).attr("font-variant",pt(d,"normal")).call(x).call(L=>L.select(".domain").remove()),n!==void 0&&g.append("text").attr("x",c).attr("y",a-6).attr("fill","currentColor").attr("font-weight","bold").text(n),g.node()}const Xr=Math.PI/180;function sn(t,{marker:e,markerStart:n=e,markerMid:r=e,markerEnd:o=e}={}){t.markerStart=Pi(n),t.markerMid=Pi(r),t.markerEnd=Pi(o)}function Pi(t){if(t==null||t===!1)return null;if(t===!0)return Tc;if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"none":return null;case"arrow":return Rc("auto");case"arrow-reverse":return Rc("auto-start-reverse");case"dot":return o0;case"circle":case"circle-fill":return Tc;case"circle-stroke":return i0;case"tick":return Xi("auto");case"tick-x":return Xi(90);case"tick-y":return Xi(0)}throw new Error(`invalid marker: ${t}`)}function Rc(t){return(e,n)=>U("svg:marker",n).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("orient",t).attr("fill","none").attr("stroke",e).attr("stroke-width",1.5).attr("stroke-linecap","round").attr("stroke-linejoin","round").call(r=>r.append("path").attr("d","M-1.5,-3l3,3l-3,3")).node()}function o0(t,e){return U("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","none").call(n=>n.append("circle").attr("r",2.5)).node()}function Tc(t,e){return U("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill",t).attr("stroke","var(--plot-background)").attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function i0(t,e){return U("svg:marker",e).attr("viewBox","-5 -5 10 10").attr("markerWidth",6.67).attr("markerHeight",6.67).attr("fill","var(--plot-background)").attr("stroke",t).attr("stroke-width",1.5).call(n=>n.append("circle").attr("r",3)).node()}function Xi(t){return(e,n)=>U("svg:marker",n).attr("viewBox","-3 -3 6 6").attr("markerWidth",6).attr("markerHeight",6).attr("orient",t).attr("stroke",e).call(r=>r.append("path").attr("d","M0,-3v6")).node()}let a0=0;function Zn(t,e,{stroke:n},r){return Bc(t,e,n&&(o=>n[o]),null,r)}function l0(t,e,{stroke:n,z:r},o){return Bc(t,e,n&&(([i])=>n[i]),r,o)}const _i=1,Ic=2;function s0(t,e){const n=new Uint8Array(e.length),r=t.data().filter(i=>i.length>1),o=r.length;for(let i=0,a=Wi;i1){const s=l[0];a!==(a=re(e[s]))&&(n[s]|=_i)}}for(let i=o-1,a=Wi;i>=0;--i){const l=r[i];if(l.length>1){const s=l[0];a!==(a=re(e[s]))&&(n[s]|=Ic)}}return([i])=>n[i]}function Bc(t,{markerStart:e,markerMid:n,markerEnd:r,stroke:o},i=()=>o,a,l){if(!e&&!n&&!r)return;const s=new Map,c=a&&s0(t,a);function u(f,h,d){return function(p){if(d&&!d(p))return;const m=i(p);let $=s.get(h);$||s.set(h,$=new Map);let y=$.get(m);if(!y){const g=this.parentNode.insertBefore(h(m,l),this),x=`plot-marker-${++a0}`;g.setAttribute("id",x),$.set(m,y=`url(#${x})`)}this.setAttribute(f,y)}}e&&t.each(u("marker-start",e,c&&(f=>c(f)&_i))),n&&c&&t.each(u("marker-start",n,f=>!(c(f)&_i))),n&&t.each(u("marker-mid",n)),r&&t.each(u("marker-end",r,c&&(f=>c(f)&Ic)))}function Kn({inset:t,insetLeft:e,insetRight:n,...r}={}){return[e,n]=Wc(t,e,n),{inset:t,insetLeft:e,insetRight:n,...r}}function Qn({inset:t,insetTop:e,insetBottom:n,...r}={}){return[e,n]=Wc(t,e,n),{inset:t,insetTop:e,insetBottom:n,...r}}function Wc(t,e,n){return t===void 0&&e===void 0&&n===void 0?wt?[1,0]:[.5,.5]:[e,n]}function jc(t,{interval:e}){return t={...tn(t)},t.interval=Sr(t.interval===void 0?e:t.interval),t}function _r(t,e,n,r){const{[t]:o,[`${t}1`]:i,[`${t}2`]:a}=n,{value:l,interval:s}=jc(o,n);if(l==null||s==null&&!r)return n;const c=_t(o);if(s==null){let d;const p={transform:m=>d||(d=V(m,l)),label:c};return{...n,[t]:void 0,[`${t}1`]:i===void 0?p:i,[`${t}2`]:a===void 0&&!(i===a&&r)?p:a}}let u,f;function h(d){return f!==void 0&&d===u?f:f=J(V(u=d,l),p=>s.floor(p))}return e({...n,[t]:void 0,[`${t}1`]:i===void 0?{transform:h,label:c}:i,[`${t}2`]:a===void 0?{transform:d=>h(d).map(p=>s.offset(p)),label:c}:a})}function Fc(t,e,n){const{[t]:r}=n,{value:o,interval:i}=jc(r,n);return o==null||i==null?n:e({...n,[t]:{label:_t(r),transform:a=>{const l=J(V(a,o),c=>i.floor(c)),s=l.map(c=>i.offset(c));return l.map(At(l)?(c,u)=>c==null||isNaN(c=+c)||(u=s[u],u==null)||isNaN(u=+u)?void 0:new Date((c+u)/2):(c,u)=>c==null||(u=s[u],u==null)?NaN:(+c+ +u)/2)}}})}function Dc(t={}){return _r("x",Kn,t,!0)}function qc(t={}){return _r("y",Qn,t,!0)}function Gi(t={}){return _r("x",Kn,t)}function Vi(t={}){return _r("y",Qn,t)}function Yc(t={}){return Fc("x",Kn,t)}function Pc(t={}){return Fc("y",Qn,t)}const Xc={ariaLabel:"rule",fill:null,stroke:"currentColor"};let _c=class extends et{constructor(e,n={}){const{x:r,y1:o,y2:i,inset:a=0,insetTop:l=a,insetBottom:s=a}=n;super(e,{x:{value:r,scale:"x",optional:!0},y1:{value:o,scale:"y",optional:!0},y2:{value:i,scale:"y",optional:!0}},je(n,"x"),Xc),this.insetTop=rt(l),this.insetBottom=rt(s),sn(this,n)}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y1:c,y2:u}=r,{width:f,height:h,marginTop:d,marginRight:p,marginLeft:m,marginBottom:$}=o,{insetTop:y,insetBottom:g}=this;return U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a},wt,0).call(x=>x.selectAll().data(e).enter().append("line").call(Q,this).attr("x1",s?v=>s[v]:(m+f-p)/2).attr("x2",s?v=>s[v]:(m+f-p)/2).attr("y1",c&&!Vt(l)?v=>c[v]+y:d+y).attr("y2",u&&!Vt(l)?l.bandwidth?v=>u[v]+l.bandwidth()-g:v=>u[v]-g:h-$-g).call(ut,this,r).call(Zn,this,r,i)).node()}},Gc=class extends et{constructor(e,n={}){const{x1:r,x2:o,y:i,inset:a=0,insetRight:l=a,insetLeft:s=a}=n;super(e,{y:{value:i,scale:"y",optional:!0},x1:{value:r,scale:"x",optional:!0},x2:{value:o,scale:"x",optional:!0}},je(n,"y"),Xc),this.insetRight=rt(l),this.insetLeft=rt(s),sn(this,n)}render(e,n,r,o,i){const{x:a,y:l}=n,{y:s,x1:c,x2:u}=r,{width:f,height:h,marginTop:d,marginRight:p,marginLeft:m,marginBottom:$}=o,{insetLeft:y,insetRight:g}=this;return U("svg:g",i).call(ot,this,o,i).call(tt,this,{y:s&&l},0,wt).call(x=>x.selectAll().data(e).enter().append("line").call(Q,this).attr("x1",c&&!Vt(a)?v=>c[v]+y:m+y).attr("x2",u&&!Vt(a)?a.bandwidth?v=>u[v]+a.bandwidth()-g:v=>u[v]-g:f-p-g).attr("y1",s?v=>s[v]:(d+h-$)/2).attr("y2",s?v=>s[v]:(d+h-$)/2).call(ut,this,r).call(Zn,this,r,i)).node()}};function we(t,e){let{x:n=D,y:r,y1:o,y2:i,...a}=Vi(e);return[o,i]=Vc(r,o,i),new _c(t,{...a,x:n,y1:o,y2:i})}function be(t,e){let{y:n=D,x:r,x1:o,x2:i,...a}=Gi(e);return[o,i]=Vc(r,o,i),new Gc(t,{...a,y:n,x1:o,x2:i})}function Vc(t,e,n){if(t==null){if(e===void 0){if(n!==void 0)return[0,n]}else if(n===void 0)return[0,e]}else{if(e===void 0)return n===void 0?[0,t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}function cn(t,...e){let n=e.length;for(let r=0,o=!0;r{let o=t[0];for(let i=0;i=0))throw new Error(`invalid lineWidth: ${u}`);this.splitLines=tu(this),this.clipLine=eu(this)}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,rotate:u,text:f,title:h,fontSize:d}=r,{rotate:p}=this,[m,$]=Ht(this,o);return U("svg:g",i).call(ot,this,o,i).call(Qc,this,f,o).call(tt,this,{x:s&&a,y:c&&l}).call(y=>y.selectAll().data(e).enter().append("text").call(Q,this).call(u0,this,f,h).attr("transform",cn`translate(${s?g=>s[g]:m},${c?g=>c[g]:$})${u?g=>` rotate(${u[g]})`:p?` rotate(${p})`:""}`).call(q,"font-size",d&&(g=>d[g])).call(ut,this,r)).node()}};function Uc(t){return t==null?null:Ot(t,"textOverflow",["clip","ellipsis","clip-start","clip-end","ellipsis-start","ellipsis-middle","ellipsis-end"]).replace(/^(clip|ellipsis)$/,"$1-end")}function u0(t,e,n,r){if(!n)return;const{lineAnchor:o,lineHeight:i,textOverflow:a,splitLines:l,clipLine:s}=e;t.each(function(c){const u=l(an(n[c])??"").map(s),f=u.length,h=o==="top"?.71:o==="bottom"?1-f:(164-f*100)/200;if(f>1){let d=0;for(let p=0;po&&n(t,o,l)>e&&(r.push(t.slice(o,i)+(t[i-1]===Hc?"-":"")),o=a),s){r.push(t.slice(o,l)),o=void 0;continue}i=l}return r}function*m0(t){let e=0,n=0;const r=t.length;for(;ni.split(/\r\n?|\n/g);const r=t?Ui:Hi,o=e*100;return i=>p0(i,o,r)}function eu({monospace:t,lineWidth:e,textOverflow:n}){if(n==null||e==1/0)return i=>i;const r=t?Ui:Hi,o=e*100;switch(n){case"clip-start":return i=>ru(i,o,r,"");case"clip-end":return i=>nu(i,o,r,"");case"ellipsis-start":return i=>ru(i,o,r,fn);case"ellipsis-middle":return i=>y0(i,o,r,fn);case"ellipsis-end":return i=>nu(i,o,r,fn)}}const fn="\u2026";function hn(t,e,n,r){const o=[];let i=0;for(let a=0,l=0,s=t.length;ae){for(i+=r;i>e&&a>0;)l=a,a=o.pop(),i-=n(t,a,l);return[a,e-i]}i+=c,o.push(a)}return[-1,0]}function nu(t,e,n,r){t=t.trim();const o=n(r),[i]=hn(t,e,n,o);return i<0?t:t.slice(0,i).trimEnd()+r}function y0(t,e,n,r){t=t.trim();const o=n(t);if(o<=e)return t;const i=n(r)/2,[a,l]=hn(t,e/2,n,i),[s]=hn(t,o-e/2-l+i,n,-i);return s<0?r:t.slice(0,a).trimEnd()+r+t.slice(dn(t,s)).trimStart()}function ru(t,e,n,r){t=t.trim();const o=n(t);if(o<=e)return t;const i=n(r),[a]=hn(t,o-e+i,n,-i);return a<0?r:r+t.slice(dn(t,a)).trimStart()}const Zi=/[\p{Combining_Mark}\p{Emoji_Modifier}]+/uy,ou=new RegExp("\\p{Extended_Pictographic}","uy");function dn(t,e){return e+=g0(t,e)?2:1,v0(t,e)&&(e=Zi.lastIndex),$0(t,e)?dn(t,e+1):e}function iu(t,e){return t.charCodeAt(e)<128}function g0(t,e){const n=t.charCodeAt(e);if(n>=55296&&n<56320){const r=t.charCodeAt(e+1);return r>=56320&&r<57344}return!1}function $0(t,e){return t.charCodeAt(e)===8205}function v0(t,e){return iu(t,e)?!1:(Zi.lastIndex=e,Zi.test(t))}function au(t,e){return iu(t,e)?!1:(ou.lastIndex=e,ou.test(t))}const lu={ariaLabel:"vector",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinejoin:"round",strokeLinecap:"round"},su=3.5,x0=su*5,cu={draw(t,e,n){const r=e*n/x0;t.moveTo(0,0),t.lineTo(0,-e),t.moveTo(-r,r-e),t.lineTo(0,-e),t.lineTo(r,r-e)}},uu={draw(t,e,n){t.moveTo(-n,0),t.lineTo(0,-e),t.lineTo(n,0)}},w0=new Map([["arrow",cu],["spike",uu]]);function b0(t){return t&&typeof t.draw=="function"}function k0(t){if(b0(t))return t;const e=w0.get(`${t}`.toLowerCase());if(e)return e;throw new Error(`invalid shape: ${t}`)}let Vr=class extends et{constructor(e,n={}){const{x:r,y:o,r:i=su,length:a,rotate:l,shape:s=cu,anchor:c="middle",frameAnchor:u}=n,[f,h]=ht(a,12),[d,p]=ht(l,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},length:{value:f,scale:"length",optional:!0},rotate:{value:d,optional:!0}},n,lu),this.r=+i,this.length=h,this.rotate=p,this.shape=k0(s),this.anchor=Ot(c,"anchor",["start","middle","end"]),this.frameAnchor=jn(u)}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,length:u,rotate:f}=r,{length:h,rotate:d,anchor:p,shape:m,r:$}=this,[y,g]=Ht(this,o);return U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a,y:c&&l}).call(x=>x.selectAll().data(e).enter().append("path").call(Q,this).attr("transform",cn`translate(${s?v=>s[v]:y},${c?v=>c[v]:g})${f?v=>` rotate(${f[v]})`:d?` rotate(${d})`:""}${p==="start"?"":p==="end"?u?v=>` translate(0,${u[v]})`:` translate(0,${h})`:u?v=>` translate(0,${u[v]/2})`:` translate(0,${h/2})`}`).attr("d",u?v=>{const b=Qt();return m.draw(b,u[v],$),b}:(()=>{const v=Qt();return m.draw(v,h,$),v})()).call(ut,this,r)).node()}};function fu(t,e={}){let{x:n,y:r,...o}=e;return e.frameAnchor===void 0&&([n,r]=Wt(n,r)),new Vr(t,{...o,x:n,y:r})}function hu(t,e={}){const{x:n=D,...r}=e;return new Vr(t,{...r,x:n})}function du(t,e={}){const{y:n=D,...r}=e;return new Vr(t,{...r,y:n})}function M0(t,e={}){const{shape:n=uu,stroke:r=lu.stroke,strokeWidth:o=1,fill:i=r,fillOpacity:a=.3,anchor:l="start",...s}=e;return fu(t,{...s,shape:n,stroke:r,strokeWidth:o,fill:i,fillOpacity:a,anchor:l})}function ke(t,e){return arguments.length<2&&!oe(t)&&(e=t,t=null),e===void 0&&(e={}),[t,e]}function Hr({anchor:t}={},e){return t===void 0?e[0]:Ot(t,"anchor",e)}function pu(t){return Hr(t,["left","right"])}function mu(t){return Hr(t,["right","left"])}function yu(t){return Hr(t,["bottom","top"])}function gu(t){return Hr(t,["top","bottom"])}function Ki(){const[t,e]=ke(...arguments);return xu("y",pu(e),t,e)}function $u(){const[t,e]=ke(...arguments);return xu("fy",mu(e),t,e)}function Qi(){const[t,e]=ke(...arguments);return wu("x",yu(e),t,e)}function vu(){const[t,e]=ke(...arguments);return wu("fx",gu(e),t,e)}function xu(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:l=1,fill:s=r,fillOpacity:c=o,textAnchor:u,textStroke:f,textStrokeOpacity:h,textStrokeWidth:d,tickSize:p=t==="y"?6:0,tickPadding:m,tickRotate:$,x:y,margin:g,marginTop:x=g===void 0?20:g,marginRight:v=g===void 0?e==="right"?40:0:g,marginBottom:b=g===void 0?20:g,marginLeft:w=g===void 0?e==="left"?40:0:g,label:k,labelAnchor:M,labelArrow:A,labelOffset:z,...S}){return p=rt(p),m=rt(m),$=rt($),M!==void 0&&(M=Ot(M,"labelAnchor",["center","top","bottom"])),A=Ru(A),It(p&&!lt(i)?A0(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:l,tickSize:p,tickPadding:m,tickRotate:$,x:y,...S}):null,lt(s)?null:z0(t,e,n,{fill:s,fillOpacity:c,stroke:f,strokeOpacity:h,strokeWidth:d,textAnchor:u,tickSize:p,tickPadding:m,tickRotate:$,x:y,marginTop:x,marginRight:v,marginBottom:b,marginLeft:w,...S}),!lt(s)&&k!==null?un([],Eu({fill:s,fillOpacity:c,...S},function(L,C,E,O,R){const N=O[t],{marginTop:F,marginRight:T,marginBottom:B,marginLeft:j}=t==="y"&&R.inset||R,I=M??(N.bandwidth?"center":"top"),Y=z??(e==="right"?T:j)-3;return I==="center"?(this.textAnchor=void 0,this.lineAnchor=e==="right"?"bottom":"top",this.frameAnchor=e,this.rotate=-90):(this.textAnchor=e==="right"?"end":"start",this.lineAnchor=I,this.frameAnchor=`${I}-${e}`,this.rotate=0),this.dy=I==="top"?3-F:I==="bottom"?B-3:0,this.dx=e==="right"?Y:-Y,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Nu(t,N,{anchor:e,label:k,labelAnchor:I,labelArrow:A})]}}}})):null)}function wu(t,e,n,{color:r="currentColor",opacity:o=1,stroke:i=r,strokeOpacity:a=o,strokeWidth:l=1,fill:s=r,fillOpacity:c=o,textAnchor:u,textStroke:f,textStrokeOpacity:h,textStrokeWidth:d,tickSize:p=t==="x"?6:0,tickPadding:m,tickRotate:$,y,margin:g,marginTop:x=g===void 0?e==="top"?30:0:g,marginRight:v=g===void 0?20:g,marginBottom:b=g===void 0?e==="bottom"?30:0:g,marginLeft:w=g===void 0?20:g,label:k,labelAnchor:M,labelArrow:A,labelOffset:z,...S}){return p=rt(p),m=rt(m),$=rt($),M!==void 0&&(M=Ot(M,"labelAnchor",["center","left","right"])),A=Ru(A),It(p&&!lt(i)?L0(t,e,n,{stroke:i,strokeOpacity:a,strokeWidth:l,tickSize:p,tickPadding:m,tickRotate:$,y,...S}):null,lt(s)?null:S0(t,e,n,{fill:s,fillOpacity:c,stroke:f,strokeOpacity:h,strokeWidth:d,textAnchor:u,tickSize:p,tickPadding:m,tickRotate:$,y,marginTop:x,marginRight:v,marginBottom:b,marginLeft:w,...S}),!lt(s)&&k!==null?un([],Eu({fill:s,fillOpacity:c,...S},function(L,C,E,O,R){const N=O[t],{marginTop:F,marginRight:T,marginBottom:B,marginLeft:j}=t==="x"&&R.inset||R,I=M??(N.bandwidth?"center":"right"),Y=z??(e==="top"?F:B)-3;return I==="center"?(this.frameAnchor=e,this.textAnchor=void 0):(this.frameAnchor=`${e}-${I}`,this.textAnchor=I==="right"?"end":"start"),this.lineAnchor=e,this.dy=e==="top"?-Y:Y,this.dx=I==="right"?T-3:I==="left"?3-j:0,this.ariaLabel=`${t}-axis label`,{facets:[[0]],channels:{text:{value:[Nu(t,N,{anchor:e,label:k,labelAnchor:I,labelArrow:A})]}}}})):null)}function A0(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="y"?"-empty":""),frameAnchor:l=e,tickSize:s,inset:c=0,insetLeft:u=c,insetRight:f=c,dx:h=0,y:d=t==="y"?void 0:null,...p}){return pn(du,t,n,{ariaLabel:`${t}-axis tick`,ariaHidden:!0},{strokeWidth:r,strokeLinecap:o,strokeLinejoin:i,facetAnchor:a,frameAnchor:l,y:d,...p,dx:e==="left"?+h-wt+ +u:+h+wt-f,anchor:"start",length:s,shape:e==="left"?N0:R0})}function L0(t,e,n,{strokeWidth:r=1,strokeLinecap:o=null,strokeLinejoin:i=null,facetAnchor:a=e+(t==="x"?"-empty":""),frameAnchor:l=e,tickSize:s,inset:c=0,insetTop:u=c,insetBottom:f=c,dy:h=0,x:d=t==="x"?void 0:null,...p}){return pn(hu,t,n,{ariaLabel:`${t}-axis tick`,ariaHidden:!0},{strokeWidth:r,strokeLinejoin:i,strokeLinecap:o,facetAnchor:a,frameAnchor:l,x:d,...p,dy:e==="bottom"?+h-wt-f:+h+wt+ +u,anchor:"start",length:s,shape:e==="bottom"?O0:C0})}function z0(t,e,n,{facetAnchor:r=e+(t==="y"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:l=Math.max(3,9-i)+(Math.abs(a)>60?4*Math.cos(a*Xr):0),text:s,textAnchor:c=Math.abs(a)>60?"middle":e==="left"?"end":"start",lineAnchor:u=a>60?"top":a<-60?"bottom":"middle",fontVariant:f,inset:h=0,insetLeft:d=h,insetRight:p=h,dx:m=0,y:$=t==="y"?void 0:null,...y}){return pn(Kc,t,n,{ariaLabel:`${t}-axis tick label`},{facetAnchor:r,frameAnchor:o,text:s,textAnchor:c,lineAnchor:u,fontVariant:f,rotate:a,y:$,...y,dx:e==="left"?+m-i-l+ +d:+m+ +i+ +l-p},function(g,x,v,b,w){f===void 0&&(this.fontVariant=Cu(g)),s===void 0&&(w.text=Ou(g,x,v,b,e))})}function S0(t,e,n,{facetAnchor:r=e+(t==="x"?"-empty":""),frameAnchor:o=e,tickSize:i,tickRotate:a=0,tickPadding:l=Math.max(3,9-i)+(Math.abs(a)>=10?4*Math.cos(a*Xr):0),text:s,textAnchor:c=Math.abs(a)>=10?a<0^e==="bottom"?"start":"end":"middle",lineAnchor:u=Math.abs(a)>=10?"middle":e==="bottom"?"top":"bottom",fontVariant:f,inset:h=0,insetTop:d=h,insetBottom:p=h,dy:m=0,x:$=t==="x"?void 0:null,...y}){return pn(Zc,t,n,{ariaLabel:`${t}-axis tick label`},{facetAnchor:r,frameAnchor:o,text:s===void 0?null:s,textAnchor:c,lineAnchor:u,fontVariant:f,rotate:a,x:$,...y,dy:e==="bottom"?+m+ +i+ +l-p:+m-i-l+ +d},function(g,x,v,b,w){f===void 0&&(this.fontVariant=Cu(g)),s===void 0&&(w.text=Ou(g,x,v,b,e))})}function bu(){const[t,e]=ke(...arguments);return Lu("y",pu(e),t,e)}function ku(){const[t,e]=ke(...arguments);return Lu("fy",mu(e),t,e)}function Mu(){const[t,e]=ke(...arguments);return zu("x",yu(e),t,e)}function Au(){const[t,e]=ke(...arguments);return zu("fx",gu(e),t,e)}function Lu(t,e,n,{y:r=t==="y"?void 0:null,x:o=null,x1:i=e==="left"?o:null,x2:a=e==="right"?o:null,...l}){return pn(be,t,n,{ariaLabel:`${t}-grid`,ariaHidden:!0},{y:r,x1:i,x2:a,...Su(l)})}function zu(t,e,n,{x:r=t==="x"?void 0:null,y:o=null,y1:i=e==="top"?o:null,y2:a=e==="bottom"?o:null,...l}){return pn(we,t,n,{ariaLabel:`${t}-grid`,ariaHidden:!0},{x:r,y1:i,y2:a,...Su(l)})}function Su({color:t="currentColor",opacity:e=.1,stroke:n=t,strokeOpacity:r=e,strokeWidth:o=1,...i}){return{stroke:n,strokeOpacity:r,strokeWidth:o,...i}}function Eu({fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontVariant:i,fontWeight:a,monospace:l,pointerEvents:s,shapeRendering:c,clip:u=!1},f){return[,t]=Mt(t),[,e]=ht(e),{facet:"super",x:null,y:null,fill:t,fillOpacity:e,fontFamily:n,fontSize:r,fontStyle:o,fontVariant:i,fontWeight:a,monospace:l,pointerEvents:s,shapeRendering:c,clip:u,initializer:f}}function pn(t,e,n,r,o,i){let a;function l(u,f,h,d,p,m){const $=u==null&&(e==="fx"||e==="fy"),{[e]:y}=d;if(!y)throw new Error(`missing scale: ${e}`);const g=y.domain();let{interval:x,ticks:v,tickFormat:b,tickSpacing:w=e==="x"?80:35}=o;if(typeof v=="string"&&Tu(y)&&(x=v,v=void 0),v===void 0&&(v=Qe(x,y.type)??E0(y,w)),u==null){if(oe(v))u=ee(v);else if(Je(v))u=ta(v,...yt(g));else if(y.interval){let M=y.interval;if(y.ticks){const[A,z]=yt(g),S=(z-A)/M[Cn];M=rs(M,S/v)??M,u=ta(M,A,z)}else{u=g;const A=u.length;M=rs(M,A/v)??M,M!==y.interval&&(u=ta(M,...yt(u)))}if(M===y.interval){const A=Math.round(u.length/v);A>1&&(u=u.filter((z,S)=>S%A===0))}}else y.ticks?u=y.ticks(v):u=g;if(!y.ticks&&u.length&&u!==g){const M=new zn(g);u=u.filter(A=>M.has(A)),u.length||ce(`Warning: the ${e}-axis ticks appear to not align with the scale domain, resulting in no ticks. Try different ticks?`)}e==="y"||e==="x"?f=[ne(u)]:a[e]={scale:e,value:D}}i?.call(this,y,u,v,b,a);const k=Object.fromEntries(Object.entries(a).map(([M,A])=>[M,{...A,value:V(u,A.value)}]));return $&&(f=m.filterFacets(u,k)),{data:u,facets:f,channels:k}}const s=Lt(o).initializer,c=t(n,Lt({...o,initializer:l},s));return n==null?(a=c.channels,c.channels={}):a={},r!==void 0&&Object.assign(c,r),c.clip===void 0&&(c.clip=!1),c}function E0(t,e){const[n,r]=yt(t.range());return(r-n)/e}function Ou(t,e,n,r,o){return{value:Ji(t,e,n,r,o)}}function Ji(t,e,n,r,o){return typeof r=="function"&&!(t.type==="log"&&t.tickFormat)?r:r===void 0&&e&&At(e)?Im(t.type,e,o)??an:t.tickFormat?t.tickFormat(typeof n=="number"?n:null,r):r===void 0?an:typeof r=="string"?(At(t.domain())?zo:To)(r):xt(r)}function ta(t,e,n){return t.range(e,t.offset(t.floor(n)))}const O0={draw(t,e){t.moveTo(0,0),t.lineTo(0,e)}},C0={draw(t,e){t.moveTo(0,0),t.lineTo(0,-e)}},N0={draw(t,e){t.moveTo(0,0),t.lineTo(-e,0)}},R0={draw(t,e){t.moveTo(0,0),t.lineTo(e,0)}};function Cu(t){return t.bandwidth&&!t.interval?void 0:"tabular-nums"}function Nu(t,e,{anchor:n,label:r=e.label,labelAnchor:o,labelArrow:i}={}){if(!(r==null||r.inferred&&Tu(e)&&/^(date|time|year)$/i.test(r))){if(r=String(r),i==="auto"&&(i=(!e.bandwidth||e.interval)&&!/[↑↓→←]/.test(r)),!i)return r;if(i===!0){const a=ac(e);a&&(i=/x$/.test(t)||o==="center"?/x$/.test(t)===a<0?"left":"right":a<0?"up":"down")}switch(i){case"left":return`\u2190 ${r}`;case"right":return`${r} \u2192`;case"up":return n==="right"?`${r} \u2191`:`\u2191 ${r}`;case"down":return n==="right"?`${r} \u2193`:`\u2193 ${r}`}return r}}function Ru(t="auto"){return lt(t)?!1:typeof t=="boolean"?t:Ot(t,"labelArrow",["auto","up","right","down","left"])}function Tu(t){return At(t.domain())}function Iu(t,e){if(e==null)return e;const n=t(e);if(!n)throw new Error(`scale not found: ${e}`);return n}function T0(t,{opacity:e,...n}={}){if(!We(t)&&!mc(t))throw new Error(`swatches legend requires ordinal or threshold color scale (not ${t.type})`);return Bu(t,n,(r,o,i,a)=>r.append("svg").attr("width",i).attr("height",a).attr("fill",o.scale).attr("fill-opacity",ht(e)[1]).append("rect").attr("width","100%").attr("height","100%"))}function I0(t,{fill:e=t.hint?.fill!==void 0?t.hint.fill:"none",fillOpacity:n=1,stroke:r=t.hint?.stroke!==void 0?t.hint.stroke:lt(e)?"currentColor":"none",strokeOpacity:o=1,strokeWidth:i=1.5,r:a=4.5,...l}={},s){const[c,u]=Mt(e),[f,h]=Mt(r),d=Iu(s,c),p=Iu(s,f),m=a*a*Math.PI;return n=ht(n)[1],o=ht(o)[1],i=ht(i)[1],Bu(t,l,($,y,g,x)=>$.append("svg").attr("viewBox","-8 -8 16 16").attr("width",g).attr("height",x).attr("fill",c==="color"?v=>d.scale(v):u).attr("fill-opacity",n).attr("stroke",f==="color"?v=>p.scale(v):h).attr("stroke-opacity",o).attr("stroke-width",i).append("path").attr("d",v=>{const b=Qt();return t.scale(v).draw(b,m),b}))}function Bu(t,e={},n){let{columns:r,tickFormat:o,fontVariant:i=Nc(t),swatchSize:a=15,swatchWidth:l=a,swatchHeight:s=a,marginLeft:c=0,className:u,style:f,width:h}=e;const d=Dr(e);u=Yr(u),o=Ji(t.scale,t.domain,void 0,o);const p=U("div",d).attr("class",`${u}-swatches ${u}-swatches-${r!=null?"columns":"wrap"}`);let m;return r!=null?(m=`:where(.${u}-swatches-columns .${u}-swatch) { + display: flex; + align-items: center; + break-inside: avoid; + padding-bottom: 1px; +} +:where(.${u}-swatches-columns .${u}-swatch::before) { + flex-shrink: 0; +} +:where(.${u}-swatches-columns .${u}-swatch-label) { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +}`,p.style("columns",r).selectAll().data(t.domain).enter().append("div").attr("class",`${u}-swatch`).call(n,t,l,s).call($=>$.append("div").attr("class",`${u}-swatch-label`).attr("title",o).text(o))):(m=`:where(.${u}-swatches-wrap) { + display: flex; + align-items: center; + min-height: 33px; + flex-wrap: wrap; +} +:where(.${u}-swatches-wrap .${u}-swatch) { + display: inline-flex; + align-items: center; + margin-right: 1em; +}`,p.selectAll().data(t.domain).enter().append("span").attr("class",`${u}-swatch`).call(n,t,l,s).append(function(){return this.ownerDocument.createTextNode(o.apply(this,arguments))})),p.call($=>$.insert("style","*").text(`:where(.${u}-swatches) { + font-family: system-ui, sans-serif; + font-size: 10px; + margin-bottom: 0.5em; +} +:where(.${u}-swatch > svg) { + margin-right: 0.5em; + overflow: visible; +} +${m}`)).style("margin-left",c?`${+c}px`:null).style("width",h===void 0?null:`${+h}px`).style("font-variant",pt(i,"normal")).call(Fi,f).node()}const Ur=new Map([["symbol",I0],["color",Wu],["opacity",j0]]);function B0(t={}){for(const[e,n]of Ur){const r=t[e];if(Te(r)){const o=Dr(t);let i;if(e==="symbol"){const{fill:a,stroke:l=a===void 0&&Te(t.color)?"color":void 0}=t;i={fill:a,stroke:l}}return n(Li(e,r,i),ea(o,r,t),a=>Te(t[a])?Li(a,t[a]):null)}}throw new Error("unknown legend type; no scale found")}function W0(t,e,n={}){return(r,o)=>{if(!Ur.has(r))throw new Error(`unknown legend type: ${r}`);if(r in t)return Ur.get(r)(t[r],ea(e,n[r],o),i=>t[i])}}function ea({className:t,...e},{label:n,ticks:r,tickFormat:o}={},i){return Km(i,{className:t,...e},{label:n,ticks:r,tickFormat:o})}function Wu(t,{legend:e=!0,...n}){if(e===!0&&(e=t.type==="ordinal"?"swatches":"ramp"),t.domain!==void 0)switch(`${e}`.toLowerCase()){case"swatches":return T0(t,n);case"ramp":return r0(t,n);default:throw new Error(`unknown legend type: ${e}`)}}function j0({type:t,interpolate:e,...n},{legend:r=!0,color:o=On(0,0,0),...i}){if(!e)throw new Error(`${t} opacity scales are not supported`);if(r===!0&&(r="ramp"),`${r}`.toLowerCase()!=="ramp")throw new Error(`${r} opacity legends are not supported`);return Wu({type:t,...n,interpolate:F0(o)},{legend:r,...i})}function F0(t){const{r:e,g:n,b:r}=On(t)||On(0,0,0);return o=>`rgba(${e},${n},${r},${o})`}function D0(t,e,n){const r=[];for(const[o,i]of Ur){const a=n[o];if(a?.legend&&o in t){const l=i(t[o],ea(e,t[o],a),s=>t[s]);l!=null&&r.push(l)}}return r}function Zr(t={}){return ds(t)?t:{...t,x:D}}function Kr(t={}){return ps(t)?t:{...t,y:D}}function ju(t,e){if(e.length===1)return{data:t,facets:e};const n=Bn(t),r=new Uint8Array(n);let o=0;for(const l of e)for(const s of l)r[s]&&++o,r[s]=1;if(o===0)return{data:t,facets:e};t=In(t);const i=t[ls]=new Uint32Array(n+o);e=e.map(l=>In(l,Uint32Array));let a=n;r.fill(0);for(const l of e)for(let s=0,c=l.length;s{({data:m,facets:$}=ju(m,$));const g=t==null?void 0:u(zr(V(m,t),y?.[n])),x=V(m,e,Float64Array),v=V(m,s),b=i&&i(m,g,x,v),w=Bn(m),k=h(new Float64Array(w)),M=p(new Float64Array(w)),A=[];for(const z of $){const S=g?Array.from(Ce(z,L=>g[L]).values()):[z];if(b)for(const L of S)L.sort(b);for(const L of S){let C=0,E=0;a&&L.reverse();for(const O of L){const R=x[O];R<0?C=M[O]=(k[O]=C)+R:R>0?E=M[O]=(k[O]=E)+R:M[O]=k[O]=E}}A.push(S)}return o&&o(A,k,M,v),{data:m,facets:$}}),c,f,d]}function G0(t){if(t!=null){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"expand":case"normalize":return V0;case"center":case"silhouette":return H0;case"wiggle":return Yu}throw new Error(`unknown offset: ${t}`)}}function qu(t,e){let n=0,r=0;for(const o of t){const i=e[o];ir&&(r=i)}return[n,r]}function V0(t,e,n){for(const r of t)for(const o of r){const[i,a]=qu(o,n);for(const l of o){const s=1/(a-i||1);e[l]=s*(e[l]-i),n[l]=s*(n[l]-i)}}}function H0(t,e,n){for(const r of t){for(const o of r){const[i,a]=qu(o,n);for(const l of o){const s=(a+i)/2;e[l]-=s,n[l]-=s}}Pu(r,e,n)}Xu(t,e,n)}function Yu(t,e,n,r){for(const o of t){const i=new Ro;let a=0;for(const l of o){let s=-1;const c=l.map(d=>Math.abs(n[d]-e[d])),u=l.map(d=>{s=r?r[d]:++s;const p=n[d]-e[d],m=i.has(s)?p-i.get(s):0;return i.set(s,p),m}),f=[0,...Zp(u)];for(const d of l)e[d]+=a,n[d]+=a;const h=qt(c);h&&(a-=qt(c,(d,p)=>(u[p]/2+f[p])*d)/h)}Pu(o,e,n)}Xu(t,e,n)}function Pu(t,e,n){const r=Nt(t,o=>Nt(o,i=>e[i]));for(const o of t)for(const i of o)e[i]-=r,n[i]-=r}function Xu(t,e,n){const r=t.length;if(r===1)return;const o=t.map(l=>l.flat()),i=o.map(l=>(Nt(l,s=>e[s])+zt(l,s=>n[s]))/2),a=Nt(i);for(let l=0;l(o,i)=>t(r[o],r[i])}function K0(t){return(e,n,r,o)=>(i,a)=>t(o[i],o[a])}function Q0(t){return to(t,(e,n,r,o)=>Io(ne(e),i=>qt(i,a=>r[a]),i=>o[i]))}function J0(t){return to(t,(e,n,r,o)=>Io(ne(e),i=>n[Bo(i,a=>r[a])],i=>o[i]))}function _u(t){return to(t,(e,n,r,o)=>{const i=ne(e),a=Io(i,f=>n[Bo(f,h=>r[h])],f=>o[f]),l=Ln(i,f=>qt(f,h=>r[h]),f=>o[f]),s=[],c=[];let u=0;for(const f of a)u<0?(u+=l.get(f),s.push(f)):(u-=l.get(f),c.push(f));return c.reverse().concat(s)})}function Gu(t){return e=>{const n=V(e,t);return(r,o)=>Rt(n[r],n[o])}}function t$(t){return e=>te(e)?(n,r)=>t(e[n],e[r]):(n,r)=>t(e.get(n),e.get(r))}function e$(t){return to(Rt,()=>t)}function to(t,e){return(n,r,o,i)=>{if(!i)throw new Error("missing channel: z");const a=new Ro(e(n,r,o,i).map((l,s)=>[l,s]));return(l,s)=>t(a.get(i[l]),a.get(i[s]))}}const n$={ariaLabel:"rect"};let eo=class extends et{constructor(e,n={}){const{x1:r,y1:o,x2:i,y2:a}=n;super(e,{x1:{value:r,scale:"x",type:r!=null&&i==null?"band":void 0,optional:!0},y1:{value:o,scale:"y",type:o!=null&&a==null?"band":void 0,optional:!0},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0}},n,n$),na(this,n),ra(this,n)}render(e,n,r,o,i){const{x:a,y:l}=n;let{x1:s,y1:c,x2:u,y2:f}=r;const{marginTop:h,marginRight:d,marginBottom:p,marginLeft:m,width:$,height:y}=o,{projection:g}=i,{insetTop:x,insetRight:v,insetBottom:b,insetLeft:w}=this,{rx:k,ry:M,rx1y1:A,rx1y2:z,rx2y1:S,rx2y2:L}=this;(s||u)&&!g&&Vt(a)&&(s=u=null),(c||f)&&!g&&Vt(l)&&(c=f=null);const C=a?.bandwidth?a.bandwidth():0,E=l?.bandwidth?l.bandwidth():0;return U("svg:g",i).call(ot,this,o,i).call(tt,this,{},0,0).call(O=>O.selectAll().data(e).enter().call(A||z||S||L?R=>R.append("path").call(Q,this).call(oa,s&&u?N=>s[N]+(u[N]s[N]+w:m+w,c&&f?N=>c[N]+(f[N]c[N]+x:h+x,s&&u?N=>u[N]-(u[N]s[N]+C-v:$-d-v,c&&f?N=>f[N]-(f[N]c[N]+E-b:y-p-b,this).call(ut,this,r):R=>R.append("rect").call(Q,this).attr("x",s?u?N=>Math.min(s[N],u[N])+w:N=>s[N]+w:m+w).attr("y",c?f?N=>Math.min(c[N],f[N])+x:N=>c[N]+x:h+x).attr("width",s?u?N=>Math.max(0,Math.abs(u[N]-s[N])+C-w-v):C-w-v:$-d-m-v-w).attr("height",c?f?N=>Math.max(0,Math.abs(c[N]-f[N])+E-x-b):E-x-b:y-h-p-x-b).call(q,"rx",k).call(q,"ry",M).call(ut,this,r))).node()}};function na(t,{inset:e=0,insetTop:n=e,insetRight:r=e,insetBottom:o=e,insetLeft:i=e}={}){t.insetTop=rt(n),t.insetRight=rt(r),t.insetBottom=rt(o),t.insetLeft=rt(i)}function ra(t,{r:e,rx:n,ry:r,rx1:o=e,ry1:i=e,rx2:a=e,ry2:l=e,rx1y1:s=o!==void 0?+o:i!==void 0?+i:0,rx1y2:c=o!==void 0?+o:l!==void 0?+l:0,rx2y1:u=a!==void 0?+a:i!==void 0?+i:0,rx2y2:f=a!==void 0?+a:l!==void 0?+l:0}={}){s||c||u||f?(t.rx1y1=s,t.rx1y2=c,t.rx2y1=u,t.rx2y2=f):(t.rx=pt(n,"auto"),t.ry=pt(r,"auto"))}function oa(t,e,n,r,o,i){const{rx1y1:a,rx1y2:l,rx2y1:s,rx2y2:c}=i;typeof e!="function"&&(e=xt(e)),typeof n!="function"&&(n=xt(n)),typeof r!="function"&&(r=xt(r)),typeof o!="function"&&(o=xt(o));const u=Math.max(Math.abs(a+s),Math.abs(l+c)),f=Math.max(Math.abs(a+l),Math.abs(s+c));t.attr("d",h=>{const d=e(h),p=n(h),m=r(h),$=o(h),y=d>m,g=p>$,x=y?m:d,v=y?d:m,b=g?$:p,w=g?p:$,k=Math.min(1,(v-x)/u,(w-b)/f),M=k*(y?g?c:s:g?l:a),A=k*(y?g?l:a:g?c:s),z=k*(y?g?a:l:g?s:c),S=k*(y?g?s:c:g?a:l);return`M${x},${b+ro(M,S)}A${M},${M} 0 0 ${M<0?0:1} ${x+no(M,S)},${b}H${v-no(A,z)}A${A},${A} 0 0 ${A<0?0:1} ${v},${b+ro(A,z)}V${w-ro(z,A)}A${z},${z} 0 0 ${z<0?0:1} ${v-no(z,A)},${w}H${x+no(S,M)}A${S},${S} 0 0 ${S<0?0:1} ${x},${w-ro(S,M)}Z`})}function no(t,e){return e<0?t:Math.abs(t)}function ro(t,e){return e<0?Math.abs(t):t}function ia(t,e){return new eo(t,Dc(qc(e)))}function oo(t,e={}){return Ke(e)||(e={...e,y:gt,x2:D,interval:1}),new eo(t,Qr(qc(Zr(e))))}function io(t,e={}){return Ke(e)||(e={...e,x:gt,y2:D,interval:1}),new eo(t,Jr(Dc(Kr(e))))}const r$={ariaLabel:"frame",fill:"none",stroke:"currentColor",clip:!1},o$={ariaLabel:"frame",fill:null,stroke:"currentColor",strokeLinecap:"square",clip:!1};let Vu=class extends et{constructor(e={}){const{anchor:n=null}=e;super(Rn,void 0,e,n==null?r$:o$),this.anchor=hs(n,"anchor",["top","right","bottom","left"]),na(this,e),n||ra(this,e)}render(e,n,r,o,i){const{marginTop:a,marginRight:l,marginBottom:s,marginLeft:c,width:u,height:f}=o,{anchor:h,insetTop:d,insetRight:p,insetBottom:m,insetLeft:$}=this,{rx:y,ry:g,rx1y1:x,rx1y2:v,rx2y1:b,rx2y2:w}=this,k=c+$,M=u-l-p,A=a+d,z=f-s-m;return U(h?"svg:line":x||v||b||w?"svg:path":"svg:rect",i).datum(0).call(ot,this,o,i).call(Q,this).call(ut,this,r).call(tt,this,{}).call(h==="left"?S=>S.attr("x1",k).attr("x2",k).attr("y1",A).attr("y2",z):h==="right"?S=>S.attr("x1",M).attr("x2",M).attr("y1",A).attr("y2",z):h==="top"?S=>S.attr("x1",k).attr("x2",M).attr("y1",A).attr("y2",A):h==="bottom"?S=>S.attr("x1",k).attr("x2",M).attr("y1",z).attr("y2",z):x||v||b||w?S=>S.call(oa,k,A,M,z,this):S=>S.attr("x",k).attr("y",A).attr("width",M-k).attr("height",z-A).attr("rx",y).attr("ry",g)).node()}};function aa(t){return new Vu(t)}const la={ariaLabel:"tip",fill:"var(--plot-background)",stroke:"currentColor"},i$=new Set(["geometry","href","src","ariaLabel","scales"]);let Hu=class extends et{constructor(e,n={}){n.tip&&(n={...n,tip:!1}),n.title===void 0&&oe(e)&&vs(e)&&(n={...n,title:D});const{x:r,y:o,x1:i,x2:a,y1:l,y2:s,anchor:c,preferredAnchor:u="bottom",monospace:f,fontFamily:h=f?"ui-monospace, monospace":void 0,fontSize:d,fontStyle:p,fontVariant:m,fontWeight:$,lineHeight:y=1,lineWidth:g=20,frameAnchor:x,format:v,textAnchor:b="start",textOverflow:w,textPadding:k=8,title:M,pointerSize:A=12,pathFilter:z="drop-shadow(0 3px 4px rgba(0,0,0,0.2))"}=n;super(e,{x:{value:i!=null&&a!=null?null:r,scale:"x",optional:!0},y:{value:l!=null&&s!=null?null:o,scale:"y",optional:!0},x1:{value:i,scale:"x",optional:a==null},y1:{value:l,scale:"y",optional:s==null},x2:{value:a,scale:"x",optional:i==null},y2:{value:s,scale:"y",optional:l==null},title:{value:M,optional:!0}},n,la),this.anchor=Qo(c,"anchor"),this.preferredAnchor=Qo(u,"preferredAnchor"),this.frameAnchor=jn(x),this.textAnchor=pt(b,"middle"),this.textPadding=+k,this.pointerSize=+A,this.pathFilter=kt(z),this.lineHeight=+y,this.lineWidth=+g,this.textOverflow=Uc(w),this.monospace=!!f,this.fontFamily=kt(h),this.fontSize=rt(d),this.fontStyle=kt(p),this.fontVariant=kt(m),this.fontWeight=kt($);for(const S in la)S in this.channels&&(this[S]=la[S]);this.splitLines=tu(this),this.clipLine=eu(this),this.format=typeof v=="string"||typeof v=="function"?{title:v}:{...v}}render(e,n,r,o,i){const a=this,{x:l,y:s,fx:c,fy:u}=n,{ownerSVGElement:f,document:h}=i,{anchor:d,monospace:p,lineHeight:m,lineWidth:$}=this,{textPadding:y,pointerSize:g,pathFilter:x}=this,{marginTop:v,marginLeft:b}=o,{x1:w,y1:k,x2:M,y2:A,x:z=w??M,y:S=k??A}=r,L=c?c(e.fx)-b:0,C=u?u(e.fy)-v:0,[E,O]=Ht(this,o),R=Oc(r,E),N=Cc(r,O),F=p?Ui:Hi,T=F(fn);let B,j;"title"in r?(B=Zu.call(this,{title:r.channels.title},n),j=c$):(B=Zu.call(this,r.channels,n),j=u$);const I=U("svg:g",i).call(ot,this,o,i).call(Qc,this).call(tt,this,{x:z&&l,y:S&&s}).call(G=>G.selectAll().data(e).enter().append("g").attr("transform",X=>`translate(${Math.round(R(X))},${Math.round(N(X))})`).call(Q,this).call(X=>X.append("path").attr("filter",x)).call(X=>X.append("text").each(function(W){const P=de(this);this.setAttribute("fill","currentColor"),this.setAttribute("fill-opacity",1),this.setAttribute("stroke","none");const _=j.call(a,W,e,B,n,r);if(typeof _=="string")for(const Z of a.splitLines(_))Y(P,{value:a.clipLine(Z)});else{const Z=new Set;for(const K of _){const{label:nt=""}=K;nt&&Z.has(nt)||(Z.add(nt),Y(P,K))}}})));function Y(G,{label:X,value:W,color:P,opacity:_}){X??="",W??="";const Z=P!=null||_!=null;let K,nt=$*100;const[ft]=hn(X,nt,F,T);if(ft>=0)X=X.slice(0,ft).trimEnd()+fn,K=W.trim(),W="";else{(X||!W&&!Z)&&(W=" "+W);const[dt]=hn(W,nt-F(X),F,T);dt>=0&&(K=W.trim(),W=W.slice(0,dt).trimEnd()+fn)}const at=G.append("tspan").attr("x",0).attr("dy",`${m}em`).text("\u200B");X&&at.append("tspan").attr("font-weight","bold").text(X),W&&at.append(()=>h.createTextNode(W)),Z&&at.append("tspan").text(" \u25A0").attr("fill",P).attr("fill-opacity",_).style("user-select","none"),K&&at.append("title").text(K)}function H(){const{width:G,height:X}=o.facet??o;I.selectChildren().each(function(W){let{x:P,width:_,height:Z}=this.getBBox();_=Math.round(_),Z=Math.round(Z);let K=d;if(K===void 0){const at=R(W)+L,dt=N(W)+C,mt=at+_+g+y*20,Ee=dt+Z+g+y*20;K=mt&&bt?Ee&&Oe?a.preferredAnchor:Oe?"bottom":"top":Ee&&Oe?mt?"left":"right":(mt||bt)&&(Ee||Oe)?`${Oe?"bottom":"top"}-${mt?"left":"right"}`:a.preferredAnchor}const nt=this.firstChild,ft=this.lastChild;if(nt.setAttribute("d",s$(K,g,y,_,Z)),P)for(const at of ft.childNodes)at.setAttribute("x",-P);ft.setAttribute("y",`${+a$(K,ft.childNodes.length,m).toFixed(6)}em`),ft.setAttribute("transform",`translate(${l$(K,g,y,_,Z)})`)}),I.attr("visibility",null)}return e.length&&(I.attr("visibility","hidden"),f.isConnected?Promise.resolve().then(H):typeof requestAnimationFrame<"u"&&requestAnimationFrame(H)),I.node()}};function Uu(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Wt(e,n)),new Hu(t,{...r,x:e,y:n})}function a$(t,e,n){return/^top(?:-|$)/.test(t)?.94-n:-.29-e*n}function l$(t,e,n,r,o){switch(t){case"middle":return[-r/2,o/2];case"top-left":return[n,e+n];case"top":return[-r/2,e/2+n];case"top-right":return[-r-n,e+n];case"right":return[-e/2-r-n,o/2];case"bottom-left":return[n,-e-n];case"bottom":return[-r/2,-e/2-n];case"bottom-right":return[-r-n,-e-n];case"left":return[n+e/2,o/2]}}function s$(t,e,n,r,o){const i=r+n*2,a=o+n*2;switch(t){case"middle":return`M${-i/2},${-a/2}h${i}v${a}h${-i}z`;case"top-left":return`M0,0l${e},${e}h${i-e}v${a}h${-i}z`;case"top":return`M0,0l${e/2},${e/2}h${(i-e)/2}v${a}h${-i}v${-a}h${(i-e)/2}z`;case"top-right":return`M0,0l${-e},${e}h${e-i}v${a}h${i}z`;case"right":return`M0,0l${-e/2},${-e/2}v${e/2-a/2}h${-i}v${a}h${i}v${e/2-a/2}z`;case"bottom-left":return`M0,0l${e},${-e}h${i-e}v${-a}h${-i}z`;case"bottom":return`M0,0l${e/2},${-e/2}h${(i-e)/2}v${-a}h${-i}v${a}h${(i-e)/2}z`;case"bottom-right":return`M0,0l${-e},${-e}h${e-i}v${-a}h${i}z`;case"left":return`M0,0l${e/2},${-e/2}v${e/2-a/2}h${i}v${a}h${-i}v${e/2-a/2}z`}}function Zu(t,e){const n={};let r=this.format;r=Ku(r,t,"x"),r=Ku(r,t,"y"),this.format=r;for(const o in r){const i=r[o];if(!(i===null||i===!1))if(o==="fx"||o==="fy")n[o]=!0;else{const a=gi(t,o);a&&(n[o]=a)}}for(const o in t){if(o in n||o in r||i$.has(o)||(o==="x"||o==="y")&&t.geometry)continue;const i=gi(t,o);if(i){if(i.scale==null&&i.defaultScale==="color")continue;n[o]=i}}this.facet&&(e.fx&&!("fx"in r)&&(n.fx=!0),e.fy&&!("fy"in r)&&(n.fy=!0));for(const o in n){const i=this.format[o];if(typeof i=="string"){const a=n[o]?.value??e[o]?.domain()??[];this.format[o]=(At(a)?zo:To)(i)}else if(i===void 0||i===!0){const a=e[o];this.format[o]=a?.bandwidth?Ji(a,a.domain()):an}}return n}function Ku(t,e,n){if(!(n in t))return t;const r=`${n}1`,o=`${n}2`;if((r in t||!(r in e))&&(o in t||!(o in e)))return t;const i=Object.entries(t),a=t[n];return i.splice(i.findIndex(([l])=>l===n)+1,0,[r,a],[o,a]),Object.fromEntries(i)}function c$(t,e,{title:n}){return this.format.title(n.value[t],t)}function*u$(t,e,n,r,o){for(const i in n){if(i==="fx"||i==="fy"){yield{label:ao(r,n,i),value:this.format[i](e[i],t)};continue}if(i==="x1"&&"x2"in n||i==="y1"&&"y2"in n)continue;const a=n[i];if(i==="x2"&&"x1"in n)yield{label:Ju(r,n,"x"),value:Qu(this.format.x2,n.x1,a,t)};else if(i==="y2"&&"y1"in n)yield{label:Ju(r,n,"y"),value:Qu(this.format.y2,n.y1,a,t)};else{const l=a.value[t],s=a.scale;if(!vt(l)&&s==null)continue;yield{label:ao(r,n,i),value:this.format[i](l,t),color:s==="color"?o[i][t]:null,opacity:s==="opacity"?o[i][t]:null}}}}function Qu(t,e,n,r){return n.hint?.length?`${t(n.value[r]-e.value[r],r)}`:`${t(e.value[r],r)}\u2013${t(n.value[r],r)}`}function Ju(t,e,n){const r=ao(t,e,`${n}1`,n),o=ao(t,e,`${n}2`,n);return r===o?r:`${r}\u2013${o}`}function ao(t,e,n,r=n){const o=e[n],i=t[o?.scale??n];return String(i?.label??o?.label??r)}function tf(t={}){const{facet:e,style:n,title:r,subtitle:o,caption:i,ariaLabel:a,ariaDescription:l}=t,s=Yr(t.className),c=t.marks===void 0?[]:nf(t.marks);c.push(...g$(c));const u=m$(e,t),f=new Map;for(const T of c){const B=of(T,u,t);B&&f.set(T,B)}const h=new Map;u&&Jn(h,[u],t),Jn(h,f,t);const d=nf($$(c,h,t));for(const T of d){const B=of(T,u,t);B&&f.set(T,B)}c.unshift(...d);let p=pg(h,t);if(p!==void 0){const T=u?Ti(p,u):void 0;for(const j of c){if(j.facet===null||j.facet==="super")continue;const I=f.get(j);I!==void 0&&(I.facetsIndex=j.fx!=null||j.fy!=null?Ti(p,I):T)}const B=new Set;for(const{facetsIndex:j}of f.values())j?.forEach((I,Y)=>{I?.length>0&&B.add(Y)});p.forEach(0j.empty=!B.has(I):j=>j.empty=!1);for(const j of c)if(j.facet==="exclude"){const I=f.get(j);I!==void 0&&(I.facetsIndex=gg(I.facetsIndex))}}for(const T of st.keys())Te(t[T])&&T!=="fx"&&T!=="fy"&&h.set(T,[]);const m=new Map;for(const T of c){if(m.has(T))throw new Error("duplicate mark; each mark must be unique");const{facetsIndex:B,channels:j}=f.get(T)??{},{data:I,facets:Y,channels:H}=T.initialize(B,j,t);sa(H,t),m.set(T,{data:I,facets:Y,channels:H})}const $=Mi(Jn(h,m,t),t),y=e0($,c,t);ag($,y);const g=ic($),{fx:x,fy:v}=g,b=x||v?lc($,y):y,w=x||v?A$(g,y):y,k=Dr(t),M=k.document,A=Hl("svg").call(M.documentElement);let z=A;k.ownerSVGElement=A,k.className=s,k.projection=Lg(t,b),k.filterFacets=(T,B)=>Ti(p,{channels:B,groups:Si(T,B)}),k.getMarkState=T=>{const B=m.get(T),j=f.get(T);return{...B,channels:{...B.channels,...j?.channels}}},k.dispatchValue=T=>{z.value!==T&&(z.value=T,z.dispatchEvent(new Event("input",{bubbles:!0})))};const S=new Set;for(const[T,B]of m)if(T.initializer!=null){const j=T.facet==="super"?w:b,I=T.initializer(B.data,B.facets,B.channels,g,j,k);if(I.data!==void 0&&(B.data=I.data),I.facets!==void 0&&(B.facets=I.facets),I.channels!==void 0){const{fx:Y,fy:H,...G}=I.channels;p$(G),Object.assign(B.channels,G);for(const X of Object.values(G)){const{scale:W}=X;W!=null&&!ty(st.get(W))&&(rf(X,t),S.add(W))}(Y!=null||H!=null)&&f.set(T,!0)}}if(S.size){const T=new Map;Jn(T,m,t,Y=>S.has(Y)),Jn(h,m,t,Y=>S.has(Y));const B=M$(Mi(T,t),$),{scales:j,...I}=ic(B);Object.assign($,B),Object.assign(g,I),Object.assign(g.scales,j)}let L,C;p!==void 0&&(L={x:x?.domain(),y:v?.domain()},p=mg(p,L),C=yg(x,v,y));for(const[T,B]of m)B.values=T.scale(B.channels,g,k);const{width:E,height:O}=y;de(A).attr("class",s).attr("fill","currentColor").attr("font-family","system-ui, sans-serif").attr("font-size",10).attr("text-anchor","middle").attr("width",E).attr("height",O).attr("viewBox",`0 0 ${E} ${O}`).attr("aria-label",a).attr("aria-description",l).call(T=>T.append("style").text(`:where(.${s}) { + --plot-background: white; + display: block; + height: auto; + height: intrinsic; + max-width: 100%; +} +:where(.${s} text), +:where(.${s} tspan) { + white-space: pre; +}`)).call(Fi,n);for(const T of c){const{channels:B,values:j,facets:I}=m.get(T);if(p===void 0||T.facet==="super"){let Y=null;if(I&&(Y=I[0],Y=T.filter(Y,B,j),Y.length===0))continue;const H=T.render(Y,g,j,w,k);if(H==null)continue;A.appendChild(H)}else{let Y;for(const H of p){if(!(T.facetAnchor?.(p,L,H)??!H.empty))continue;let G=null;if(I){const W=f.has(T);if(G=I[W?H.i:0],G=T.filter(G,B,j),G.length===0)continue;!W&&G===I[0]&&(G=Ie(G)),G.fx=H.x,G.fy=H.y,G.fi=H.i}const X=T.render(G,g,j,b,k);if(X!=null){(Y??=de(A).append("g")).append(()=>X).datum(H);for(const W of["aria-label","aria-description","aria-hidden","transform"])X.hasAttribute(W)&&(Y.attr(W,X.getAttribute(W)),X.removeAttribute(W))}}Y?.selectChildren().attr("transform",C)}}const R=D0($,k,t),{figure:N=r!=null||o!=null||i!=null||R.length>0}=t;N&&(z=M.createElement("figure"),z.className=`${s}-figure`,z.style.maxWidth="initial",r!=null&&z.append(ef(M,r,"h2")),o!=null&&z.append(ef(M,o,"h3")),z.append(...R,A),i!=null&&z.append(f$(M,i)),"value"in A&&(z.value=A.value,delete A.value)),z.scale=dg(g.scales),z.legend=W0($,k,t);const F=Py();return F>0&&de(A).append("text").attr("x",E).attr("y",20).attr("dy","-1em").attr("text-anchor","end").attr("font-family","initial").text("\u26A0\uFE0F").append("title").text(`${F.toLocaleString("en-US")} warning${F===1?"":"s"}. Please check the console.`),z}function ef(t,e,n){if(e.ownerDocument)return e;const r=t.createElement(n);return r.append(e),r}function f$(t,e){const n=t.createElement("figcaption");return n.append(e),n}function nf(t){return t.flat(1/0).filter(e=>e!=null).map(h$)}function h$(t){return typeof t.render=="function"?t:new d$(t)}let d$=class extends et{constructor(e){if(typeof e!="function")throw new TypeError("invalid mark; missing render function");super(),this.render=e}render(){}};function sa(t,e){for(const n in t)rf(t[n],e);return t}function rf(t,e){const{scale:n,transform:r=!0}=t;if(n==null||!r)return;const{type:o,percent:i,interval:a,transform:l=i?s=>s==null?NaN:s*100:gs(a,o)}=e[n]??{};l!=null&&(t.value=J(t.value,l),t.transform=!1)}function p$(t){for(const e in t)js(e,t[e])}function Jn(t,e,n,r=Dm){for(const{channels:o}of e.values())for(const i in o){const a=o[i],{scale:l}=a;if(l!=null&&r(l))if(l==="projection"){if(!Eg(n)){const s=n.x?.domain===void 0,c=n.y?.domain===void 0;if(s||c){const[u,f]=Cg(a);s&&ca(t,"x",u),c&&ca(t,"y",f)}}}else ca(t,l,a)}return t}function ca(t,e,n){const r=t.get(e);r!==void 0?r.push(n):t.set(e,[n])}function m$(t,e){if(t==null)return;const{x:n,y:r}=t;if(n==null&&r==null)return;const o=Ze(t.data);if(o==null)throw new Error("missing facet data");const i={};n!=null&&(i.fx=Xn(o,{value:n,scale:"fx"})),r!=null&&(i.fy=Xn(o,{value:r,scale:"fy"})),sa(i,e);const a=Si(o,i);return{channels:i,groups:a,data:t.data}}function of(t,e,n){if(t.facet===null||t.facet==="super")return;const{fx:r,fy:o}=t;if(r!=null||o!=null){const s=Ze(t.data??r??o);if(s===void 0)throw new Error(`missing facet data in ${t.ariaLabel}`);if(s===null)return;const c={};return r!=null&&(c.fx=Xn(s,{value:r,scale:"fx"})),o!=null&&(c.fy=Xn(s,{value:o,scale:"fy"})),sa(c,n),{channels:c,groups:Si(s,c)}}if(e===void 0)return;const{channels:i,groups:a,data:l}=e;if(t.facet!=="auto"||t.data===l)return{channels:i,groups:a};l.length>0&&(a.size>1||a.size===1&&i.fx&&i.fy&&[...a][0][1].size>1)&&Bn(Ze(t.data))===Bn(l)&&ce(`Warning: the ${t.ariaLabel} mark appears to use faceted data, but isn\u2019t faceted. The mark data has the same length as the facet data and the mark facet option is "auto", but the mark data and facet data are distinct. If this mark should be faceted, set the mark facet option to true; otherwise, suppress this warning by setting the mark facet option to false.`)}function y$(t,e={}){return Lt({...e,x:null,y:null},(n,r,o,i,a,l)=>l.getMarkState(t))}function g$(t){const e=[];for(const n of t){let r=n.tip;if(r){r===!0?r={}:typeof r=="string"&&(r={pointer:r});let{pointer:o,preferredAnchor:i}=r;o=/^x$/i.test(o)?Yi:/^y$/i.test(o)?Pr:qi,r=o(y$(n,r)),r.title=null,i===void 0&&(r.preferredAnchor=o===Pr?"left":"bottom");const a=Uu(n.data,r);a.facet=n.facet,a.facetAnchor=n.facetAnchor,e.push(a)}}return e}function $$(t,e,n){let{projection:r,x:o={},y:i={},fx:a={},fy:l={},axis:s,grid:c,facet:u={},facet:{axis:f=s,grid:h}=u,x:{axis:d=s,grid:p=d===null?null:c}=o,y:{axis:m=s,grid:$=m===null?null:c}=i,fx:{axis:y=f,grid:g=y===null?null:h}=a,fy:{axis:x=f,grid:v=x===null?null:h}=l}=n;(r||!Te(o)&&!af("x",t))&&(d=p=null),(r||!Te(i)&&!af("y",t))&&(m=$=null),e.has("fx")||(y=g=null),e.has("fy")||(x=v=null),d===void 0&&(d=!co(t,"x")),m===void 0&&(m=!co(t,"y")),y===void 0&&(y=!co(t,"fx")),x===void 0&&(x=!co(t,"fy")),d===!0&&(d="bottom"),m===!0&&(m="left"),y===!0&&(y=d==="top"||d===null?"bottom":"top"),x===!0&&(x=m==="right"||m===null?"left":"right");const b=[];return so(b,v,ku,l),lo(b,x,$u,"right","left",u,l),so(b,g,Au,a),lo(b,y,vu,"top","bottom",u,a),so(b,$,bu,i),lo(b,m,Ki,"left","right",n,i),so(b,p,Mu,o),lo(b,d,Qi,"bottom","top",n,o),b}function lo(t,e,n,r,o,i,a){if(!e)return;const l=v$(e);a=x$(l?r:e,i,a);const{line:s}=a;(n===Ki||n===Qi)&&s&&!nn(s)&&t.push(aa(w$(a))),t.push(n(a)),l&&t.push(n({...a,anchor:o,label:null}))}function so(t,e,n,r){!e||nn(e)||t.push(n(b$(e,r)))}function v$(t){return/^\s*both\s*$/i.test(t)}function x$(t,e,{line:n=e.line,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:l,tickRotate:s,fontVariant:c,ariaLabel:u,ariaDescription:f,label:h=e.label,labelAnchor:d,labelArrow:p=e.labelArrow,labelOffset:m}){return{anchor:t,line:n,ticks:r,tickSize:o,tickSpacing:i,tickPadding:a,tickFormat:l,tickRotate:s,fontVariant:c,ariaLabel:u,ariaDescription:f,label:h,labelAnchor:d,labelArrow:p,labelOffset:m}}function w$(t){const{anchor:e,line:n}=t;return{anchor:e,facetAnchor:e+"-empty",stroke:n===!0?void 0:n}}function b$(t,{stroke:e=Wn(t)?t:void 0,ticks:n=k$(t)?t:void 0,tickSpacing:r,ariaLabel:o,ariaDescription:i}){return{stroke:e,ticks:n,tickSpacing:r,ariaLabel:o,ariaDescription:i}}function k$(t){switch(typeof t){case"number":return!0;case"string":return!Wn(t)}return oe(t)||typeof t?.range=="function"}function co(t,e){const n=`${e}-axis `;return t.some(r=>r.ariaLabel?.startsWith(n))}function af(t,e){for(const n of e)for(const r in n.channels){const{scale:o}=n.channels[r];if(o===t||o==="projection")return!0}return!1}function M$(t,e){for(const n in t){const r=t[n],o=e[n];r.label===void 0&&o&&(r.label=o.label)}return t}function A$({fx:t,fy:e},n){const{marginTop:r,marginRight:o,marginBottom:i,marginLeft:a,width:l,height:s}=Ai(n),c=t&&lf(t),u=e&&lf(e);return{marginTop:e?u[0]:r,marginRight:t?l-c[1]:o,marginBottom:e?s-u[1]:i,marginLeft:t?c[0]:a,inset:{marginTop:n.marginTop,marginRight:n.marginRight,marginBottom:n.marginBottom,marginLeft:n.marginLeft},width:l,height:s}}function lf(t){const e=t.domain();if(e.length===0)return[0,t.bandwidth()];let n=t(e[0]),r=t(e[e.length-1]);return r{const K=zr(V(P,g),Z?.[x]),nt=V(P,M),ft=V(P,I),at=V(P,Y),dt=hi(s,{z:nt,fill:ft,stroke:at}),mt=[],bt=[],Ee=K&&b([]),Oe=nt&&j([]),Fh=ft&&G([]),Dh=at&&W([]),Xa=t&&f([]),qh=t&&d([]),_a=e&&m([]),Yh=e&&y([]),Ph=C$(t,e,P);let Xh=0;for(const Pe of s)Pe.initialize(P);a&&a.initialize(P),i&&i.initialize(P);for(const Pe of _){const Ga=[];for(const Xe of s)Xe.scope("facet",Pe);a&&a.scope("facet",Pe),i&&i.scope("facet",Pe);for(const[Xe,_h]of Be(Pe,dt))for(const[Gh,sr]of Be(_h,K))for(const[Dt,Zt]of Ph(sr))if(dt&&(Zt.z=Xe),!(i&&!i.reduce(Dt,Zt))){Ga.push(Xh++),bt.push(o.reduceIndex(Dt,P,Zt)),K&&Ee.push(Gh),nt&&Oe.push(dt===nt?Xe:nt[(Dt.length>0?Dt:sr)[0]]),ft&&Fh.push(dt===ft?Xe:ft[(Dt.length>0?Dt:sr)[0]]),at&&Dh.push(dt===at?Xe:at[(Dt.length>0?Dt:sr)[0]]),Xa&&(Xa.push(Zt.x1),qh.push(Zt.x2)),_a&&(_a.push(Zt.y1),Yh.push(Zt.y2));for(const Vh of s)Vh.reduce(Dt,Zt);a&&a.reduce(Dt,Zt)}mt.push(Ga)}return Rs(mt,a,l),{data:bt,facets:mt}}),...!ve(s,"x")&&(u?{x1:u,x2:h,x:Lr(u,h)}:{x:w,x1:S,x2:L}),...!ve(s,"y")&&(p?{y1:p,y2:$,y:Lr(p,$)}:{y:k,y1:C,y2:E}),...v&&{[x]:v},...Object.fromEntries(s.map(({name:P,output:_})=>[P,_]))}}function pa({cumulative:t,domain:e,thresholds:n,interval:r,...o},i){return[o,{cumulative:t,domain:e,thresholds:n,interval:r,...i}]}function uo(t,{cumulative:e,domain:n,thresholds:r,interval:o},i){return t={...tn(t)},t.domain===void 0&&(t.domain=n),t.cumulative===void 0&&(t.cumulative=e),t.thresholds===void 0&&(t.thresholds=r),t.interval===void 0&&(t.interval=o),t.value===void 0&&(t.value=i),t.thresholds=ff(t.thresholds,t.interval),t}function z$(t){let{x:e,y:n}=t;return e=uo(e,t),n=uo(n,t),[e.value,n.value]=Wt(e.value,n.value),{x:e,y:n}}function uf(t){if(t==null)return;const{value:e,cumulative:n,domain:r=yt,thresholds:o}=t,i=a=>{let l=V(a,e),s;if(At(l)||O$(o)){l=J(l,fs,Float64Array);let[u,f]=typeof r=="function"?r(l):r,h=typeof o=="function"&&!Je(o)?o(l,u,f):o;typeof h=="number"&&(h=gm(u,f,h)),Je(h)&&(r===yt&&(u=h.floor(u),f=h.offset(h.floor(f))),h=h.range(u,h.offset(f))),s=h}else{l=St(l);let[u,f]=typeof r=="function"?r(l):r,h=typeof o=="function"&&!Je(o)?o(l,u,f):o;if(typeof h=="number")if(r===yt){let d=$m(u,f,h);if(isFinite(d))if(d>0){let p=Math.round(u/d),m=Math.round(f/d);p*d<=u||--p,m*d>f||++m;let $=m-p+1;h=new Float64Array($);for(let y=0;y<$;++y)h[y]=(p+y)*d}else if(d<0){d=-d;let p=Math.round(u*d),m=Math.round(f*d);p/d<=u||--p,m/d>f||++m;let $=m-p+1;h=new Float64Array($);for(let y=0;y<$;++y)h[y]=(p+y)/d}else h=[u];else h=[u]}else h=Oo(u,f,h);else Je(h)&&(r===yt&&(u=h.floor(u),f=h.offset(h.floor(f))),h=h.range(u,h.offset(f)));s=h}const c=[];if(s.length===1)c.push([s[0],s[0]]);else for(let u=1;u0?N$:ma)(c,s,l),c};return i.label=_t(e),i}function ff(t,e,n=mf){if(t===void 0)return e===void 0?n:Qe(e);if(typeof t=="string"){switch(t.toLowerCase()){case"freedman-diaconis":return ym;case"scott":return Zl;case"sturges":return Ul;case"auto":return mf}return br(t)}return t}function S$(t,e){return Ss(t,e,hf)}function hf(t,e,n){return ui(t,e,n,df)}function df(t,e,n){return fi(t,e,n,pf)}function pf(t,e){return Nr(t,e,E$)}function E$(t){switch(`${t}`.toLowerCase()){case"x":return T$;case"x1":return B$;case"x2":return W$;case"y":return I$;case"y1":return j$;case"y2":return F$;case"z":return Bs}throw new Error(`invalid bin reduce: ${t}`)}function mf(t,e,n){return Math.min(200,Zl(t,e,n))}function O$(t){return Pm(t)||oe(t)&&At(t)}function C$(t,e,n){const r=t?.(n),o=e?.(n);return r&&o?function*(i){const a=r.bin(i);for(const[l,[s,c]]of r.entries()){const u=o.bin(a[l]);for(const[f,[h,d]]of o.entries())yield[u[f],{data:n,x1:s,y1:h,x2:c,y2:d}]}}:r?function*(i){const a=r.bin(i);for(const[l,[s,c]]of r.entries())yield[a[l],{data:n,x1:s,x2:c}]}:function*(i){const a=o.bin(i);for(const[l,[s,c]]of o.entries())yield[a[l],{data:n,y1:s,y2:c}]}}function ma(t,e,n){return e=St(e),r=>{const o=t.map(()=>[]);for(const i of r)o[vm(e,n[i])-1]?.push(i);return o}}function N$(t,e,n){const r=ma(t,e,n);return o=>{const i=r(o);for(let a=1,l=i.length;a{const i=r(o);for(let a=i.length-2;a>=0;--a){const l=i[a+1],s=i[a];for(const c of l)s.push(c)}return i}}function yf(t,e){const n=(+t+ +e)/2;return t instanceof Date?new Date(n):n}const T$={reduceIndex(t,e,{x1:n,x2:r}){return yf(n,r)}},I$={reduceIndex(t,e,{y1:n,y2:r}){return yf(n,r)}},B$={reduceIndex(t,e,{x1:n}){return n}},W$={reduceIndex(t,e,{x2:n}){return n}},j$={reduceIndex(t,e,{y1:n}){return n}},F$={reduceIndex(t,e,{y2:n}){return n}},D$={ariaLabel:"area",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};let fo=class extends et{constructor(e,n={}){const{x1:r,y1:o,x2:i,y2:a,z:l,curve:s,tension:c}=n;super(e,{x1:{value:r,scale:"x"},y1:{value:o,scale:"y"},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0},z:{value:$e(n),optional:!0}},n,D$),this.z=l,this.curve=ua(s,c)}filter(e){return e}render(e,n,r,o,i){const{x1:a,y1:l,x2:s=a,y2:c=l}=r;return U("svg:g",i).call(ot,this,o,i).call(tt,this,n,0,0).call(u=>u.selectAll().data(Ac(e,[a,l,s,c],this,r)).enter().append("path").call(Q,this).call(qr,this,r).attr("d",jo().curve(this.curve).defined(f=>f>=0).x0(f=>a[f]).y0(f=>l[f]).x1(f=>s[f]).y1(f=>c[f]))).node()}};function ya(t,e){return e===void 0?$n(t,{x:Mr,y:Tn}):new fo(t,e)}function tr(t,e){const{y:n=gt,...r}=ha(e);return new fo(t,Qr(Zr({...r,y1:n,y2:void 0})))}function $n(t,e){const{x:n=gt,...r}=fa(e);return new fo(t,Jr(Kr({...r,x1:n,x2:void 0})))}const q$={ariaLabel:"link",fill:"none",stroke:"currentColor",strokeMiterlimit:1};let gf=class extends et{constructor(e,n={}){const{x1:r,y1:o,x2:i,y2:a,curve:l,tension:s}=n;super(e,{x1:{value:r,scale:"x"},y1:{value:o,scale:"y"},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0}},n,q$),this.curve=sf(l,s),sn(this,n)}project(e,n,r){this.curve!==gn&&super.project(e,n,r)}render(e,n,r,o,i){const{x1:a,y1:l,x2:s=a,y2:c=l}=r,{curve:u}=this;return U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(f=>f.selectAll().data(e).enter().append("path").call(Q,this).attr("d",u===gn&&i.projection?Y$(i.projection,a,l,s,c):h=>{const d=Qt(),p=u(d);return p.lineStart(),p.point(a[h],l[h]),p.point(s[h],c[h]),p.lineEnd(),d}).call(ut,this,r).call(Zn,this,r,i)).node()}};function Y$(t,e,n,r,o){const i=Kt(t);return e=St(e),n=St(n),r=St(r),o=St(o),a=>i({type:"LineString",coordinates:[[e[a],n[a]],[r[a],o[a]]]})}function $f(t,{x:e,x1:n,x2:r,y:o,y1:i,y2:a,...l}={}){return[n,r]=ho(e,n,r),[i,a]=ho(o,i,a),new gf(t,{...l,x1:n,x2:r,y1:i,y2:a})}function ho(t,e,n){if(t===void 0){if(e===void 0){if(n!==void 0)return[n]}else if(n===void 0)return[e]}else{if(e===void 0)return n===void 0?[t]:[t,n];if(n===void 0)return[t,e]}return[e,n]}const P$={ariaLabel:"arrow",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:1,strokeWidth:1.5};let vf=class extends et{constructor(e,n={}){const{x1:r,y1:o,x2:i,y2:a,bend:l=0,headAngle:s=60,headLength:c=8,inset:u=0,insetStart:f=u,insetEnd:h=u,sweep:d}=n;super(e,{x1:{value:r,scale:"x"},y1:{value:o,scale:"y"},x2:{value:i,scale:"x",optional:!0},y2:{value:a,scale:"y",optional:!0}},n,P$),this.bend=l===!0?22.5:Math.max(-90,Math.min(90,l)),this.headAngle=+s,this.headLength=+c,this.insetStart=+f,this.insetEnd=+h,this.sweep=X$(d)}render(e,n,r,o,i){const{x1:a,y1:l,x2:s=a,y2:c=l,SW:u}=r,{strokeWidth:f,bend:h,headAngle:d,headLength:p,insetStart:m,insetEnd:$}=this,y=u?v=>u[v]:xt(f===void 0?1:f),g=d*Xr/2,x=p/1.5;return U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(v=>v.selectAll().data(e).enter().append("path").call(Q,this).attr("d",b=>{let w=a[b],k=l[b],M=s[b],A=c[b];const z=Math.hypot(M-w,A-k);if(z<=m+$)return null;let S=Math.atan2(A-k,M-w);const L=Math.min(x*y(b),z/3),C=this.sweep(w,k,M,A)*h*Xr,E=Math.hypot(z/Math.tan(C),z)/2;if(m||$)if(E<1e5){const H=Math.sign(C),[G,X]=_$([w,k],[M,A],E,H);if(m&&([w,k]=xf([G,X,E],[w,k,m],-H*Math.sign(m))),$){const[W,P]=xf([G,X,E],[M,A,$],H*Math.sign($));S+=Math.atan2(P-X,W-G)-Math.atan2(A-X,M-G),M=W,A=P}}else{const H=M-w,G=A-k,X=Math.hypot(H,G);m&&(w+=H/X*m,k+=G/X*m),$&&(M-=H/X*$,A-=G/X*$)}const O=S+C,R=O+g,N=O-g,F=M-L*Math.cos(R),T=A-L*Math.sin(R),B=M-L*Math.cos(N),j=A-L*Math.sin(N),I=E<1e5?`A${E},${E} 0,0,${C>0?1:0} `:"L",Y=L?`M${F},${T}L${M},${A}L${B},${j}`:"";return`M${w},${k}${I}${M},${A}${Y}`}).call(ut,this,r)).node()}};function X$(t=1){if(typeof t=="number")return xt(Math.sign(t));if(typeof t=="function")return(e,n,r,o)=>Math.sign(t(e,n,r,o));switch(Ot(t,"sweep",["+x","-x","+y","-y"])){case"+x":return(e,n,r)=>cr(e,r);case"-x":return(e,n,r)=>_e(e,r);case"+y":return(e,n,r,o)=>cr(n,o);case"-y":return(e,n,r,o)=>_e(n,o)}}function _$([t,e],[n,r],o,i){const a=n-t,l=r-e,s=Math.hypot(a,l),c=i*Math.sqrt(o*o-s*s/4)/s;return[(t+n)/2-l*c,(e+r)/2+a*c]}function xf([t,e,n],[r,o,i],a){const l=r-t,s=o-e,c=Math.hypot(l,s),u=(l*l+s*s-i*i+n*n)/(2*c),f=a*Math.sqrt(n*n-u*u);return[t+(l*u+s*f)/c,e+(s*u-l*f)/c]}function G$(t,{x:e,x1:n,x2:r,y:o,y1:i,y2:a,...l}={}){return[n,r]=ho(e,n,r),[i,a]=ho(o,i,a),new vf(t,{...l,x1:n,x2:r,y1:i,y2:a})}const V$={ariaLabel:"bar"};let ga=class extends et{constructor(e,n,r={},o=V$){super(e,n,r,o),na(this,r),ra(this,r)}render(e,n,r,o,i){const{rx:a,ry:l,rx1y1:s,rx1y2:c,rx2y1:u,rx2y2:f}=this,h=this._x(n,r,o),d=this._y(n,r,o),p=this._width(n,r,o),m=this._height(n,r,o);return U("svg:g",i).call(ot,this,o,i).call(this._transform,this,n).call($=>$.selectAll().data(e).enter().call(s||c||u||f?y=>y.append("path").call(Q,this).call(oa,h,d,wf(h,p),wf(d,m),this).call(ut,this,r):y=>y.append("rect").call(Q,this).attr("x",h).attr("width",p).attr("y",d).attr("height",m).call(q,"rx",a).call(q,"ry",l).call(ut,this,r))).node()}_x(e,{x:n},{marginLeft:r}){const{insetLeft:o}=this;return n?i=>n[i]+o:r+o}_y(e,{y:n},{marginTop:r}){const{insetTop:o}=this;return n?i=>n[i]+o:r+o}_width({x:e},{x:n},{marginRight:r,marginLeft:o,width:i}){const{insetLeft:a,insetRight:l}=this,s=n&&e?e.bandwidth():i-r-o;return Math.max(0,s-a-l)}_height({y:e},{y:n},{marginTop:r,marginBottom:o,height:i}){const{insetTop:a,insetBottom:l}=this,s=n&&e?e.bandwidth():i-r-o;return Math.max(0,s-a-l)}};function wf(t,e){return typeof t=="function"&&typeof e=="function"?n=>t(n)+e(n):typeof t=="function"?n=>t(n)+e:typeof e=="function"?n=>t+e(n):t+e}let $a=class extends ga{constructor(e,n={},r){const{x1:o,x2:i,y:a}=n;super(e,{x1:{value:o,scale:"x"},x2:{value:i,scale:"x"},y:{value:a,scale:"y",type:"band",optional:!0}},n,r)}_transform(e,n,{x:r}){e.call(tt,n,{x:r},0,0)}_x({x:e},{x1:n,x2:r},{marginLeft:o}){const{insetLeft:i}=this;return Vt(e)?o+i:a=>Math.min(n[a],r[a])+i}_width({x:e},{x1:n,x2:r},{marginRight:o,marginLeft:i,width:a}){const{insetLeft:l,insetRight:s}=this;return Vt(e)?a-o-i-l-s:c=>Math.max(0,Math.abs(r[c]-n[c])-l-s)}},va=class extends ga{constructor(e,n={},r){const{x:o,y1:i,y2:a}=n;super(e,{y1:{value:i,scale:"y"},y2:{value:a,scale:"y"},x:{value:o,scale:"x",type:"band",optional:!0}},n,r)}_transform(e,n,{y:r}){e.call(tt,n,{y:r},0,0)}_y({y:e},{y1:n,y2:r},{marginTop:o}){const{insetTop:i}=this;return Vt(e)?o+i:a=>Math.min(n[a],r[a])+i}_height({y:e},{y1:n,y2:r},{marginTop:o,marginBottom:i,height:a}){const{insetTop:l,insetBottom:s}=this;return Vt(e)?a-o-i-l-s:c=>Math.max(0,Math.abs(r[c]-n[c])-l-s)}};function De(t,e={}){return Ke(e)||(e={...e,y:gt,x2:D}),new $a(t,Qr(Gi(Zr(e))))}function qe(t,e={}){return Ke(e)||(e={...e,x:gt,y2:D}),new va(t,Jr(Vi(Kr(e))))}const H$={ariaLabel:"cell"};let po=class extends ga{constructor(e,{x:n,y:r,...o}={}){super(e,{x:{value:n,scale:"x",type:"band",optional:!0},y:{value:r,scale:"y",type:"band",optional:!0}},o,H$)}_transform(e,n){e.call(tt,n,{},0,0)}};function vn(t,{x:e,y:n,...r}={}){return[e,n]=Wt(e,n),new po(t,{...r,x:e,y:n})}function U$(t,{x:e=gt,fill:n,stroke:r,...o}={}){return n===void 0&&Mt(r)[0]===void 0&&(n=D),new po(t,{...o,x:e,fill:n,stroke:r})}function Z$(t,{y:e=gt,fill:n,stroke:r,...o}={}){return n===void 0&&Mt(r)[0]===void 0&&(n=D),new po(t,{...o,y:e,fill:n,stroke:r})}const K$={ariaLabel:"dot",fill:"none",stroke:"currentColor",strokeWidth:1.5};function xa(t){return t.sort===void 0&&t.reverse===void 0?Ls({channel:"-r"},t):t}let mo=class extends et{constructor(e,n={}){const{x:r,y:o,r:i,rotate:a,symbol:l=So,frameAnchor:s}=n,[c,u]=ht(a,0),[f,h]=oy(l),[d,p]=ht(i,f==null?3:4.5);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},r:{value:d,scale:"r",filter:Jt,optional:!0},rotate:{value:c,optional:!0},symbol:{value:f,scale:"auto",optional:!0}},xa(n),K$),this.r=p,this.rotate=u,this.symbol=h,this.frameAnchor=jn(s);const{channels:m}=this,{symbol:$}=m;if($){const{fill:y,stroke:g}=m;$.hint={fill:y?y.value===$.value?"color":"currentColor":this.fill??"currentColor",stroke:g?g.value===$.value?"color":"currentColor":this.stroke??"none"}}}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,r:u,rotate:f,symbol:h}=r,{r:d,rotate:p,symbol:m}=this,[$,y]=Ht(this,o),g=m===So,x=u?void 0:d*d*Math.PI;return vr(d)&&(e=[]),U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a,y:c&&l}).call(v=>v.selectAll().data(e).enter().append(g?"circle":"path").call(Q,this).call(g?b=>{b.attr("cx",s?w=>s[w]:$).attr("cy",c?w=>c[w]:y).attr("r",u?w=>u[w]:d)}:b=>{b.attr("transform",cn`translate(${s?w=>s[w]:$},${c?w=>c[w]:y})${f?w=>` rotate(${f[w]})`:p?` rotate(${p})`:""}`).attr("d",u&&h?w=>{const k=Qt();return h[w].draw(k,u[w]*u[w]*Math.PI),k}:u?w=>{const k=Qt();return m.draw(k,u[w]*u[w]*Math.PI),k}:h?w=>{const k=Qt();return h[w].draw(k,x),k}:(()=>{const w=Qt();return m.draw(w,x),w})())}).call(ut,this,r)).node()}};function Le(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Wt(e,n)),new mo(t,{...r,x:e,y:n})}function Q$(t,{x:e=D,...n}={}){return new mo(t,Pc({...n,x:e}))}function J$(t,{y:e=D,...n}={}){return new mo(t,Yc({...n,y:e}))}function tv(t,e){return Le(t,{...e,symbol:"circle"})}function ev(t,e){return Le(t,{...e,symbol:"hexagon"})}const nv={ariaLabel:"line",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};let yo=class extends et{constructor(e,n={}){const{x:r,y:o,z:i,curve:a,tension:l}=n;super(e,{x:{value:r,scale:"x"},y:{value:o,scale:"y"},z:{value:$e(n),optional:!0}},n,nv),this.z=i,this.curve=sf(a,l),sn(this,n)}filter(e){return e}project(e,n,r){this.curve!==gn&&super.project(e,n,r)}render(e,n,r,o,i){const{x:a,y:l}=r,{curve:s}=this;return U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(c=>c.selectAll().data(Ac(e,[a,l],this,r)).enter().append("path").call(Q,this).call(qr,this,r).call(l0,this,r,i).attr("d",s===gn&&i.projection?rv(i.projection,a,l):xm().curve(s).defined(u=>u>=0).x(u=>a[u]).y(u=>l[u]))).node()}};function rv(t,e,n){const r=Kt(t);return e=St(e),n=St(n),o=>{let i=[];const a=[i];for(const l of o)l===-1?(i=[],a.push(i)):i.push([e[l],n[l]]);return r({type:"MultiLineString",coordinates:a})}}function go(t,{x:e,y:n,...r}={}){return[e,n]=Wt(e,n),new yo(t,{...r,x:e,y:n})}function er(t,{x:e=D,y:n=gt,...r}={}){return new yo(t,ha({...r,x:e,y:n}))}function nr(t,{x:e=gt,y:n=D,...r}={}){return new yo(t,fa({...r,x:e,y:n}))}function bf(t,e){e=iv(e);const{x:n,y:r,color:o,size:i}=e,a=$o(t,n),l=$o(t,r),s=$o(t,o),c=$o(t,i);let{fx:u,fy:f,x:{value:h,reduce:d,zero:p,...m},y:{value:$,reduce:y,zero:g,...x},color:{value:v,color:b,reduce:w},size:{value:k,reduce:M},mark:A}=e;if(d===void 0&&(d=y==null&&h==null&&k==null&&$!=null?"count":null),y===void 0&&(y=d==null&&$==null&&k==null&&h!=null?"count":null),M===void 0&&k==null&&w==null&&d==null&&y==null&&(h==null||ct(a))&&($==null||ct(l))&&(M="count"),p===void 0&&(p=vo(d)?!0:void 0),g===void 0&&(g=vo(y)?!0:void 0),h==null&&$==null)throw new Error("must specify x or y");if(d!=null&&$==null)throw new Error("reducing x requires y");if(y!=null&&h==null)throw new Error("reducing y requires x");A===void 0&&(A=k!=null||M!=null?"dot":vo(d)||vo(y)||w!=null?"bar":h!=null&&$!=null?ct(a)||ct(l)||d==null&&y==null&&!rr(a)&&!rr(l)?"dot":"line":h!=null||$!=null?"rule":null);let z,S,L;switch(A){case"dot":L=Le,S="stroke";break;case"line":L=a&&l||d!=null||y!=null?g||y!=null||a&&rr(a)?nr:p||d!=null||l&&rr(l)?er:go:a?er:nr,S="stroke",Mf(s)&&(z=null);break;case"area":L=!(g||y!=null)&&(p||d!=null||l&&rr(l))?tr:$n,S="fill",Mf(s)&&(z=null);break;case"rule":L=a?we:be,S="stroke";break;case"bar":L=d!=null?ct(l)?kf(d)&&a&&ct(a)?vn:De:oo:y!=null?ct(a)?kf(y)&&l&&ct(l)?vn:qe:io:w!=null||M!=null?a&&ct(a)&&l&&ct(l)?vn:a&&ct(a)?qe:l&&ct(l)?De:ia:a&&en(a)&&!(l&&en(l))?De:l&&en(l)&&!(a&&en(a))?qe:vn,S="fill";break;default:throw new Error(`invalid mark: ${A}`)}let C={fx:u,fy:f,x:a??void 0,y:l??void 0,[S]:s??b,z,r:c??void 0,tip:!0},E,O={[S]:w??void 0,r:M??void 0};if(d!=null&&y!=null)throw new Error("cannot reduce both x and y");return y!=null?(O.y=y,E=ct(a)?Yn:Me):d!=null?(O.x=d,E=ct(l)?Pn:Ae):(w!=null||M!=null)&&(a&&l?E=ct(a)&&ct(l)?ci:ct(a)?Ae:ct(l)?Me:Fe:a?E=ct(a)?Yn:Me:l&&(E=ct(l)?Pn:Ae)),(E===Fe||E===Me)&&(C.x={value:a,...m}),(E===Fe||E===Ae)&&(C.y={value:l,...x}),p===void 0&&(p=a&&!(E===Fe||E===Me)&&(L===De||L===tr||L===oo||L===be)),g===void 0&&(g=l&&!(E===Fe||E===Ae)&&(L===qe||L===$n||L===io||L===we)),{fx:u??null,fy:f??null,x:{value:h??null,reduce:d??null,zero:!!p,...m},y:{value:$??null,reduce:y??null,zero:!!g,...x},color:{value:v??null,reduce:w??null,...b!==void 0&&{color:b}},size:{value:k??null,reduce:M??null},mark:A,markImpl:Af[L],markOptions:C,transformImpl:Af[E],transformOptions:O,colorMode:S}}function ov(t,e){const n=bf(t,e),{fx:r,fy:o,x:{zero:i},y:{zero:a},markOptions:l,transformOptions:s,colorMode:c}=n,u=wa[n.markImpl],f=wa[n.transformImpl],h=r!=null||o!=null?aa({strokeOpacity:.1}):null,d=[i?we([0]):null,a?be([0]):null],p=u(t,f?f(s,l):l);return c==="stroke"?It(h,d,p):It(h,p,d)}function rr(t){let e,n;for(const r of t){if(r==null)continue;if(e===void 0){e=r;continue}const o=Math.sign(cr(e,r));if(o){if(n!==void 0&&o!==n)return!1;e=r,n=o}}return!0}function iv({x:t,y:e,color:n,size:r,fx:o,fy:i,mark:a}={}){return Xt(t)||(t=xn(t)),Xt(e)||(e=xn(e)),Xt(n)||(n=Wn(n)?{color:n}:xn(n)),Xt(r)||(r=xn(r)),Xt(o)&&({value:o}=xn(o)),Xt(i)&&({value:i}=xn(i)),a!=null&&(a=`${a}`.toLowerCase()),{x:t,y:e,color:n,size:r,fx:o,fy:i,mark:a}}function $o(t,e){const n=V(t,e.value);return n&&(n.label=_t(e.value)),n}function xn(t){return av(t)?{reduce:t}:{value:t}}function vo(t){return/^(?:distinct|count|sum|proportion)$/i.test(t)}function kf(t){return/^(?:first|last|mode)$/i.test(t)}function av(t){if(t==null)return!1;if(typeof t.reduceIndex=="function"||typeof t.reduce=="function"&&Tt(t)||/^p\d{2}$/i.test(t))return!0;switch(`${t}`.toLowerCase()){case"first":case"last":case"count":case"distinct":case"sum":case"proportion":case"proportion-facet":case"deviation":case"min":case"min-index":case"max":case"max-index":case"mean":case"median":case"variance":case"mode":return!0}return!1}function Mf(t){return t?new zn(t).size>t.length>>1:!1}const wa={dot:Le,line:go,lineX:er,lineY:nr,areaX:tr,areaY:$n,ruleX:we,ruleY:be,barX:De,barY:qe,rect:ia,rectX:oo,rectY:io,cell:vn,bin:Fe,binX:Me,binY:Ae,group:ci,groupX:Yn,groupY:Pn},Af=Object.fromEntries(Object.entries(wa).map(([t,e])=>[e,t]));function ba(t,e={}){let{x:n,x1:r,x2:o}=e;n===void 0&&r===void 0&&o===void 0&&(e={...e,x:n=D});const i={};return n!=null&&(i.x=t),r!=null&&(i.x1=t),o!=null&&(i.x2=t),Ut(i,e)}function ka(t,e={}){let{y:n,y1:r,y2:o}=e;n===void 0&&r===void 0&&o===void 0&&(e={...e,y:n=D});const i={};return n!=null&&(i.y=t),r!=null&&(i.y1=t),o!=null&&(i.y2=t),Ut(i,e)}function Ut(t={},e={}){const n=$e(e),r=Object.entries(t).map(([o,i])=>{const a=ys(o,e);if(a==null)throw new Error(`missing channel: ${o}`);const[l,s]=Ct(a);return{key:o,input:a,output:l,setOutput:s,map:lv(i)}});return{...jt(e,(o,i)=>{const a=V(o,n),l=r.map(({input:c})=>V(o,c)),s=r.map(({setOutput:c})=>c(new Array(o.length)));for(const c of i)for(const u of a?Ce(c,f=>a[f]).values():[c])r.forEach(({map:f},h)=>f.mapIndex(u,l[h],s[h]));return{data:o,facets:i}}),...Object.fromEntries(r.map(({key:o,output:i})=>[o,i]))}}function lv(t){if(t==null)throw new Error("missing map");if(typeof t.mapIndex=="function")return t;if(typeof t.map=="function"&&Tt(t))return sv(t);if(typeof t=="function")return Ma(Zo(t));switch(`${t}`.toLowerCase()){case"cumsum":return uv;case"rank":return Ma((e,n)=>Kl(e,r=>n[r]));case"quantile":return Ma((e,n)=>cv(e,r=>n[r]))}throw new Error(`invalid map: ${t}`)}function sv(t){return console.warn("deprecated map interface; implement mapIndex instead."),{mapIndex:t.map.bind(t)}}function cv(t,e){const n=wm(t,e)-1;return Kl(t,e).map(r=>r/n)}function Ma(t){return{mapIndex(e,n,r){const o=t(e,n);if(o.length!==e.length)throw new Error("map function returned a mismatched length");for(let i=0,a=e.length;i0))throw new Error(`invalid k: ${e}`);return mv(n)(e,dv(o,e),i)}function dv(t="middle",e){switch(`${t}`.toLowerCase()){case"middle":return e-1>>1;case"start":return 0;case"end":return e-1}throw new Error(`invalid anchor: ${t}`)}function pv(t){switch(`${t}`.toLowerCase()){case"centered":return"middle";case"leading":return"start";case"trailing":return"end"}throw new Error(`invalid shift: ${t}`)}function mv(t="mean"){if(typeof t=="string"){if(/^p\d{2}$/i.test(t))return wo(Ho(t));switch(t.toLowerCase()){case"deviation":return wo(fr);case"max":return bo((e,n)=>zt(e,r=>n[r]));case"mean":return yv;case"median":return wo(Sn);case"min":return bo((e,n)=>Nt(e,r=>n[r]));case"mode":return bo((e,n)=>al(e,r=>n[r]));case"sum":return Lf;case"variance":return wo(ll);case"difference":return vv;case"ratio":return xv;case"first":return wv;case"last":return bv}}if(typeof t!="function")throw new Error(`invalid reduce: ${t}`);return bo(Zo(t))}function wo(t){return(e,n,r)=>r?{mapIndex(o,i,a){const l=c=>i[c]==null?NaN:+i[c];let s=0;for(let c=0;ci[s]==null?NaN:+i[s];for(let s=-n;s<0;++s)a[o[s+n]]=t(Ie(o,0,s+e),l);for(let s=0,c=o.length-n;sr?{mapIndex(o,i,a){let l=0;for(let s=0;s=n;--o){const i=t[e[o]];if(vt(i))return i}}function zf(t,e,n,r){for(let o=n+r;n=n;--o){let i=t[e[o]];if(i!==null&&!isNaN(i=+i))return i}}function vv(t,e,n){return n?{mapIndex(r,o,i){for(let a=0,l=r.length-t;aur(o)+e*(fr(o)||0),strict:n,anchor:r})}const Av={ariaLabel:"tick",fill:null,stroke:"currentColor"};let Ef=class extends et{constructor(e,n,r){super(e,n,r,Av),sn(this,r)}render(e,n,r,o,i){return U("svg:g",i).call(ot,this,o,i).call(this._transform,this,n).call(a=>a.selectAll().data(e).enter().append("line").call(Q,this).attr("x1",this._x1(n,r,o)).attr("x2",this._x2(n,r,o)).attr("y1",this._y1(n,r,o)).attr("y2",this._y2(n,r,o)).call(ut,this,r).call(Zn,this,r,i)).node()}},Of=class extends Ef{constructor(e,n={}){const{x:r,y:o,inset:i=0,insetTop:a=i,insetBottom:l=i}=n;super(e,{x:{value:r,scale:"x"},y:{value:o,scale:"y",type:"band",optional:!0}},n),this.insetTop=rt(a),this.insetBottom=rt(l)}_transform(e,n,{x:r}){e.call(tt,n,{x:r},wt,0)}_x1(e,{x:n}){return r=>n[r]}_x2(e,{x:n}){return r=>n[r]}_y1({y:e},{y:n},{marginTop:r}){const{insetTop:o}=this;return n&&e?i=>n[i]+o:r+o}_y2({y:e},{y:n},{height:r,marginBottom:o}){const{insetBottom:i}=this;return n&&e?a=>n[a]+e.bandwidth()-i:r-o-i}},Cf=class extends Ef{constructor(e,n={}){const{x:r,y:o,inset:i=0,insetRight:a=i,insetLeft:l=i}=n;super(e,{y:{value:o,scale:"y"},x:{value:r,scale:"x",type:"band",optional:!0}},n),this.insetRight=rt(a),this.insetLeft=rt(l)}_transform(e,n,{y:r}){e.call(tt,n,{y:r},0,wt)}_x1({x:e},{x:n},{marginLeft:r}){const{insetLeft:o}=this;return n&&e?i=>n[i]+o:r+o}_x2({x:e},{x:n},{width:r,marginRight:o}){const{insetRight:i}=this;return n&&e?a=>n[a]+e.bandwidth()-i:r-o-i}_y1(e,{y:n}){return r=>n[r]}_y2(e,{y:n}){return r=>n[r]}};function Nf(t,{x:e=D,...n}={}){return new Of(t,{...n,x:e})}function Rf(t,{y:e=D,...n}={}){return new Cf(t,{...n,y:e})}function Lv(t,{x:e=D,y:n=null,r,fill:o="#ccc",fillOpacity:i,stroke:a="currentColor",strokeOpacity:l,strokeWidth:s=2,sort:c,...u}={}){const f=n!=null?Pn:si;return It(be(t,f({x1:Aa,x2:La},{x:e,y:n,stroke:a,strokeOpacity:l,...u})),De(t,f({x1:"p25",x2:"p75"},{x:e,y:n,fill:o,fillOpacity:i,...u})),Nf(t,f({x:"p50"},{x:e,y:n,stroke:a,strokeOpacity:l,strokeWidth:s,sort:c,...u})),Le(t,Ut({x:Tf},{x:e,y:n,z:n,r,stroke:a,strokeOpacity:l,...u})))}function zv(t,{y:e=D,x:n=null,r,fill:o="#ccc",fillOpacity:i,stroke:a="currentColor",strokeOpacity:l,strokeWidth:s=2,sort:c,...u}={}){const f=n!=null?Yn:si;return It(we(t,f({y1:Aa,y2:La},{x:n,y:e,stroke:a,strokeOpacity:l,...u})),qe(t,f({y1:"p25",y2:"p75"},{x:n,y:e,fill:o,fillOpacity:i,...u})),Rf(t,f({y:"p50"},{x:n,y:e,stroke:a,strokeOpacity:l,strokeWidth:s,sort:c,...u})),Le(t,Ut({y:Tf},{x:n,y:e,z:n,r,stroke:a,strokeOpacity:l,...u})))}function Tf(t){const e=Aa(t),n=La(t);return t.map(r=>rn?r:NaN)}function Aa(t){const e=If(t)*2.5-Bf(t)*1.5;return Nt(t,n=>n>=e?n:NaN)}function La(t){const e=Bf(t)*2.5-If(t)*1.5;return zt(t,n=>n<=e?n:NaN)}function If(t){return An(t,.25)}function Bf(t){return An(t,.75)}const Sv={ariaLabel:"raster",stroke:null,pixelSize:1};function wn(t,e){const n=+t;if(isNaN(n))throw new Error(`invalid ${e}: ${t}`);return n}function Wf(t,e){const n=Math.floor(t);if(isNaN(n))throw new Error(`invalid ${e}: ${t}`);return n}let jf=class extends et{constructor(e,n,r={},o){let{width:i,height:a,x:l,y:s,x1:c=l==null?0:void 0,y1:u=s==null?0:void 0,x2:f=l==null?i:void 0,y2:h=s==null?a:void 0,pixelSize:d=o.pixelSize,blur:p=0,interpolate:m}=r;if(i!=null&&(i=Wf(i,"width")),a!=null&&(a=Wf(a,"height")),c!=null&&(c=wn(c,"x1")),u!=null&&(u=wn(u,"y1")),f!=null&&(f=wn(f,"x2")),h!=null&&(h=wn(h,"y2")),l==null&&(c==null||f==null))throw new Error("missing x");if(s==null&&(u==null||h==null))throw new Error("missing y");e!=null&&i!=null&&a!=null&&(l===void 0&&c!=null&&f!=null&&(l=Wv(c,f,i)),s===void 0&&u!=null&&h!=null&&(s=jv(u,h,i,a))),super(e,{x:{value:l,scale:"x",optional:!0},y:{value:s,scale:"y",optional:!0},x1:{value:c==null?null:[c],scale:"x",optional:!0,filter:null},y1:{value:u==null?null:[u],scale:"y",optional:!0,filter:null},x2:{value:f==null?null:[f],scale:"x",optional:!0,filter:null},y2:{value:h==null?null:[h],scale:"y",optional:!0,filter:null},...n},r,o),this.width=i,this.height=a,this.pixelSize=wn(d,"pixelSize"),this.blur=wn(p,"blur"),this.interpolate=l==null||s==null?null:Ov(m)}};class Ff extends jf{constructor(e,n={}){const{imageRendering:r}=n;if(e==null){const{fill:o,fillOpacity:i}=n;ht(i)[0]!==void 0&&(n=za("fillOpacity",n)),Mt(o)[0]!==void 0&&(n=za("fill",n))}super(e,void 0,n,Sv),this.imageRendering=pt(r,"auto")}scale(e,{color:n,...r},o){return super.scale(e,r,o)}render(e,n,r,o,i){const a=n[r.channels.fill?.scale]??(O=>O),{x:l,y:s}=r,{document:c}=i,[u,f,h,d]=qf(r,o,i),p=h-u,m=d-f,{pixelSize:$,width:y=Math.round(Math.abs(p)/$),height:g=Math.round(Math.abs(m)/$)}=this,x=y*g;let{fill:v,fillOpacity:b}=r,w=0;if(this.interpolate){const O=y/p,R=g/m,N=J(l,T=>(T-u)*O,Float64Array),F=J(s,T=>(T-f)*R,Float64Array);v&&(v=this.interpolate(e,y,g,N,F,v)),b&&(b=this.interpolate(e,y,g,N,F,b))}else this.data==null&&e&&(w=e.fi*x);const k=c.createElement("canvas");k.width=y,k.height=g;const M=k.getContext("2d"),A=M.createImageData(y,g),z=A.data;let{r:S,g:L,b:C}=On(this.fill)??{r:0,g:0,b:0},E=(this.fillOpacity??1)*255;for(let O=0;O0&&bm(A,this.blur),M.putImageData(A,0,0),U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(O=>O.append("image").attr("transform",`translate(${u},${f}) scale(${Math.sign(h-u)},${Math.sign(d-f)})`).attr("width",Math.abs(p)).attr("height",Math.abs(m)).attr("preserveAspectRatio","none").call(q,"image-rendering",this.imageRendering).call(Q,this).attr("xlink:href",k.toDataURL())).node()}}function Df(t,e,n){arguments.length<3&&(n=e,e=null);let{x:r,y:o,[t]:i,...a}=n;return r===void 0&&o===void 0&&_m(e)&&(r=Mr,o=Tn,i===void 0&&(i=qm)),[e,{...a,x:r,y:o,[t]:i}]}function Ev(){const[t,e]=Df("fill",...arguments);return new Ff(t,t==null||e.fill!==void 0||e.fillOpacity!==void 0?e:{...e,fill:D})}function qf({x1:t,y1:e,x2:n,y2:r},o,{projection:i}){const{width:a,height:l,marginTop:s,marginRight:c,marginBottom:u,marginLeft:f}=o;return[t&&i==null?t[0]:f,e&&i==null?e[0]:s,n&&i==null?n[0]:a-c,r&&i==null?r[0]:l-u]}function Yf({x1:t,y1:e,x2:n,y2:r},o,i,a){const l={};return t&&(l.x1=t),e&&(l.y1=e),n&&(l.x2=n),r&&(l.y2=r),qf(mi(l,o),i,a)}function za(t,e={}){const{[t]:n}=e;if(typeof n!="function")throw new Error(`invalid ${t}: not a function`);return Lt({...e,[t]:void 0},function(r,o,i,a,l,s){const{x:c,y:u}=a;if(!c)throw new Error("missing scale: x");if(!u)throw new Error("missing scale: y");const[f,h,d,p]=Yf(i,a,l,s),m=d-f,$=p-h,{pixelSize:y}=this,{width:g=Math.round(Math.abs(m)/y),height:x=Math.round(Math.abs($)/y)}=e,v=new Array(g*x*(o?o.length:1)),b=m/g,w=$/x;let k=0;for(const M of o??[void 0])for(let A=.5;A=e||o[l]<0||o[l]>=n||(a[Math.floor(o[l])*e+Math.floor(r[l])]=i[l]);return a}function Pf({random:t=Eo(42)}={}){return(e,n,r,o,i,a)=>{const{points:l,triangles:s,hull:c}=Ge.from(e,d=>o[d],d=>i[d]),u=new a.constructor(n*r).fill(NaN),f=new Uint8Array(n*r),h=Bv(a,t);for(let d=0;d=n||R<0||R>=r)continue;const N=O+.5,F=R+.5,T=Math.sign(S),B=(b-w)*(N-x)+(F-w)*(x-g);if(B*T<0)continue;const j=(w-v)*(N-x)+(F-w)*(y-x);if(j*T<0)continue;const I=S-(B+j);if(I*T<0)continue;const Y=O+n*R;u[Y]=h(L,B/S,C,j/S,E,I/S,O,R),f[Y]=1}}return Cv(u,f,o,i,a,n,r,c,e,h),u}}function Cv(t,e,n,r,o,i,a,l,s,c){n=Float64Array.from(l,d=>n[s[d]]),r=Float64Array.from(l,d=>r[s[d]]),o=Array.from(l,d=>o[s[d]]);const u=n.length,f=Array.from({length:u},(d,p)=>Rv(p,n,r));let h=0;for(let d=0;d0&&c>0?s/(s+c):+(s>c)}function or(t,e,n,r){return t*r-n*e}function Rv(t,e,n){const r=e.length,o=e.at(t-2),i=n.at(t-2),a=e.at(t-1),l=n.at(t-1),s=e[t],c=n[t],u=e.at(t+1-r),f=n.at(t+1-r),h=a-s,d=l-c,p=o-a,m=i-l,$=s-u,y=c-f,g=Math.hypot(h,d),x=Math.hypot(p,m),v=Math.hypot($,y);return(b,w)=>{const k=b-a,M=w-l,A=b-s,z=w-c;return or(k,M,A,z)>-1e-6&&or(k,M,h,d)*x-or(k,M,p,m)*g>-1e-6&&or(A,z,$,y)*g-or(A,z,h,d)*v<=0}}function Xf(t,e,n,r,o,i){const a=new i.constructor(e*n),l=Ge.from(t,u=>r[u],u=>o[u]);let s,c;for(let u=.5,f=0;u{const c=new s.constructor(o*i),u=Ge.from(r,p=>a[p],p=>l[p]);let f,h,d;for(let p=.5,m=0;pe&&v{const c=t(l,s);return cs.map(c=>c.value),label:_t(r)};for(const s in i)o[s]==="value"&&(o[s]=l)}if(e==null){if(r==null)throw new Error("missing contour value");o=za("value",{value:r,...o}),r=null}else{let{interpolate:l}=o;r===void 0&&(r=D),l===void 0&&(o.interpolate="nearest")}super(e,{value:{value:r,optional:!0}},Fv(o),Gf);const a={geometry:{value:D}};for(const l in this.channels){const s=this.channels[l],{scale:c}=s;c==="x"||c==="y"||l==="value"||(a[l]=s,delete this.channels[l])}this.contourChannels=a,this.smooth=!!n}filter(e,{x:n,y:r,value:o,...i},a){return super.filter(e,i,a)}render(e,n,r,o,i){const{geometry:a}=r,l=Kt();return U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(s=>{s.selectAll().data(e).enter().append("path").call(Q,this).attr("d",c=>l(a[c])).call(ut,this,r)}).node()}};function Fv({thresholds:t,interval:e,...n}){return t=ff(t,e,Ul),Lt(n,function(r,o,i,a,l,s){const[c,u,f,h]=Yf(i,a,l,s),d=f-c,p=h-u,{pixelSize:m,width:$=Math.round(Math.abs(d)/m),height:y=Math.round(Math.abs(p)/m)}=this,g=$/d,x=y/p,v=i.value.value,b=[];if(this.interpolate){const{x:z,y:S}=Hn(i,a,s),L=J(z,R=>(R-c)*g,Float64Array),C=J(S,R=>(R-u)*x,Float64Array),E=[i.x,i.y,i.value],O=[L,C,v];for(const R of o){const N=this.filter(R,E,O);b.push(this.interpolate(N,$,y,L,C,v))}}else if(o){const z=$*y,S=o.length;for(let L=0;L0)for(const z of b)km({data:z,width:$,height:y},this.blur);const w=Dv(t,v,...Yv(b));if(w===null)throw new Error(`unsupported thresholds: ${t}`);const{contour:k}=Mm().size([$,y]).smooth(this.smooth),M=[],A=[];for(const z of b)A.push(Mn(M.length,M.push(...J(w,S=>k(z,S)))));for(const{coordinates:z}of M)for(const S of z)for(const L of S)for(const C of L)C[0]=C[0]/g+c,C[1]=C[1]/x+u;return{data:M,facets:A,channels:Ws(this.contourChannels,M)}})}function Dv(t,e,n,r){if(typeof t?.range=="function")return t.range(t.floor(n),r);if(typeof t=="function"&&(t=t(e,n,r)),typeof t!="number")return ee(t);const o=Oo(...Am(n,r,t),t);for(;o[o.length-1]>=r;)o.pop();for(;o[1]Nt(e,Hf)),zt(t,e=>zt(e,Hf))]}function Hf(t){return isFinite(t)?t:NaN}function Pv(t,e){return Ea(qi,t,e)}function Xv(t,e={}){return Ea(Yi,t,e)}function _v(t,e={}){return Ea(Pr,t,e)}function Ea(t,e,n={}){const{x:r,y:o,maxRadius:i}=n,a=t({px:r,py:o,maxRadius:i}),l=[];r!=null&&l.push(we(e,Zf("x",{...a,inset:-6},n))),o!=null&&l.push(be(e,Zf("y",{...a,inset:-6},n))),r!=null&&l.push(un(e,Kf("x",{...a,dy:9,frameAnchor:"bottom",lineAnchor:"top"},n))),o!=null&&l.push(un(e,Kf("y",{...a,dx:-9,frameAnchor:"left",textAnchor:"end"},n)));for(const s of l)s.ariaLabel=`crosshair ${s.ariaLabel}`;return It(...l)}function Uf(t,{channels:e,...n},{facet:r,facetAnchor:o,fx:i,fy:a,[t]:l,channels:s,transform:c,initializer:u}){return{...n,facet:r,facetAnchor:o,fx:i,fy:a,[t]:l,channels:{...e,...s},transform:c,initializer:Gv(t,u)}}function Gv(t,e){return e==null?e:function(n,r,{x:o,y:i,px:a,py:l,...s},...c){const{channels:{x:u,y:f,...h}={},...d}=e.call(this,n,r,{...s,x:a,y:l},...c);return{channels:{...h,...u&&{px:u,...t==="x"&&{x:u}},...f&&{py:f,...t==="y"&&{y:f}}},...d}}}function Zf(t,e,n){const{color:r="currentColor",opacity:o=.2,ruleStroke:i=r,ruleStrokeOpacity:a=o,ruleStrokeWidth:l}=n;return{...Uf(t,e,n),stroke:i,strokeOpacity:a,strokeWidth:l}}function Kf(t,e,n){const{color:r="currentColor",textFill:o=r,textFillOpacity:i,textStroke:a="var(--plot-background)",textStrokeOpacity:l,textStrokeWidth:s=5}=n;return{...Uf(t,e,Vv(t,n)),fill:o,fillOpacity:i,stroke:a,strokeOpacity:l,strokeWidth:s}}function Vv(t,e){return Lt(e,(n,r,o)=>({channels:{text:{value:gi(o,t)?.value}}}))}const Hv={ariaLabel:"delaunay link",fill:"none",stroke:"currentColor",strokeMiterlimit:1},Uv={ariaLabel:"delaunay mesh",fill:null,stroke:"currentColor",strokeOpacity:.2},Zv={ariaLabel:"hull",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeMiterlimit:1},Kv={ariaLabel:"voronoi",fill:"none",stroke:"currentColor",strokeMiterlimit:1},Qv={ariaLabel:"voronoi mesh",fill:null,stroke:"currentColor",strokeOpacity:.2};let Jv=class extends et{constructor(e,n={}){const{x:r,y:o,z:i,curve:a,tension:l}=n;super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},z:{value:i,optional:!0}},n,Hv),this.curve=ua(a,l),sn(this,n)}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,z:u}=r,{curve:f}=this,[h,d]=Ht(this,o),p=s?g=>s[g]:xt(h),m=c?g=>c[g]:xt(d),$=this;function y(g){let x=-1;const v=[],b={};for(const E in r)b[E]=[];const w=[],k=[],M=[],A=[];function z(E,O){E=g[E],O=g[O],v.push(++x),w[x]=p(E),M[x]=m(E),k[x]=p(O),A[x]=m(O);for(const R in r)b[R].push(r[R][O])}const{halfedges:S,hull:L,triangles:C}=Ge.from(g,p,m);for(let E=0;EE&&z(C[E],C[O])}for(let E=0;E{const O=Qt(),R=f(O);return R.lineStart(),R.point(w[E],M[E]),R.point(k[E],A[E]),R.lineEnd(),O}).call(ut,$,b).call(Zn,$,b,i)}return U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a,y:c&&l}).call(u?g=>g.selectAll().data(Ce(e,x=>u[x]).values()).enter().append("g").each(y):g=>g.datum(e).each(y)).node()}},Oa=class extends et{constructor(e,n={},r,o=({z:i})=>i){const{x:i,y:a}=n;super(e,{x:{value:i,scale:"x",optional:!0},y:{value:a,scale:"y",optional:!0},z:{value:o(n),optional:!0}},n,r)}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,z:u}=r,[f,h]=Ht(this,o),d=s?y=>s[y]:xt(f),p=c?y=>c[y]:xt(h),m=this;function $(y){const g=Ge.from(y,d,p);de(this).append("path").datum(y[0]).call(Q,m).attr("d",m._render(g,o)).call(ut,m,r)}return U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a,y:c&&l}).call(u?y=>y.selectAll().data(Ce(e,g=>u[g]).values()).enter().append("g").each($):y=>y.datum(e).each($)).node()}};class tx extends Oa{constructor(e,n={}){super(e,n,Uv),this.fill="none"}_render(e){return e.render()}}class ex extends Oa{constructor(e,n={}){super(e,n,Zv,$e)}_render(e){return e.renderHull()}}class nx extends et{constructor(e,n={}){const{x:r,y:o,z:i}=n;super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},z:{value:i,optional:!0}},Lt(n,function(a,l,s,c,u,f){let{x:h,y:d,z:p}=s;({x:h,y:d}=Hn(s,c,f)),p=p?.value;const m=new Array((h??d).length).fill(null),[$,y]=Ht(this,u),g=h?v=>h[v]:xt($),x=d?v=>d[v]:xt(y);for(let v of l){h&&(v=v.filter(b=>vt(g(b)))),d&&(v=v.filter(b=>vt(x(b))));for(const[,b]of Be(v,p)){const w=Ge.from(b,g,x),k=Qf(w,u);for(let M=0,A=b.length;M{f.selectAll().data(e).enter().append("path").call(Q,this).attr("d",h=>u[h]).call(ut,this,r)}).node()}}class rx extends Oa{constructor(e,n){super(e,n,Qv),this.fill="none"}_render(e,n){return Qf(e,n).render()}}function Qf(t,e){const{width:n,height:r,marginTop:o,marginRight:i,marginBottom:a,marginLeft:l}=e;return t.voronoi([l,o,n-i,r-a])}function ir(t,e,{x:n,y:r,...o}={}){return[n,r]=Wt(n,r),new t(e,{...o,x:n,y:r})}function ox(t,e){return ir(Jv,t,e)}function ix(t,e){return ir(tx,t,e)}function ax(t,e){return ir(ex,t,e)}function lx(t,{x:e,y:n,initializer:r,...o}={}){return ir(nx,t,{...jt({...o,x:e,y:n},ju),initializer:r})}function sx(t,e){return ir(rx,t,e)}const cx={ariaLabel:"density",fill:"none",stroke:"currentColor",strokeMiterlimit:1};let Jf=class extends et{constructor(e,{x:n,y:r,z:o,weight:i,fill:a,stroke:l,...s}={}){const c=th(a)&&(a="currentColor",!0),u=th(l)&&(l="currentColor",!0);super(e,{x:{value:n,scale:"x",optional:!0},y:{value:r,scale:"y",optional:!0},z:{value:$e({z:o,fill:a,stroke:l}),optional:!0},weight:{value:i,optional:!0}},hx({...s,fill:a,stroke:l},c,u),cx),c&&(this.fill=void 0),u&&(this.stroke=void 0),this.z=o}filter(e){return e}render(e,n,r,o,i){const{contours:a}=r,l=Kt();return U("svg:g",i).call(ot,this,o,i).call(tt,this,{}).call(s=>s.selectAll().data(e).enter().append("path").call(Q,this).call(ut,this,r).attr("d",c=>l(a[c]))).node()}};function ux(t,{x:e,y:n,...r}={}){return[e,n]=Wt(e,n),new Jf(t,{...r,x:e,y:n})}const fx=new Set(["x","y","z","weight"]);function hx(t,e,n){let{bandwidth:r,thresholds:o}=t;return r=r===void 0?20:+r,o=o===void 0?20:typeof o?.[Symbol.iterator]=="function"?St(o):+o,Lt(t,function(i,a,l,s,c,u){const f=l.weight?St(l.weight.value):null,h=l.z?.value,{z:d}=this,[p,m]=Ht(this,c),{width:$,height:y}=c,{x:g,y:x}=Hn(l,s,u),v=Object.fromEntries(Object.entries(l).filter(([L])=>!fx.has(L)).map(([L,C])=>[L,{...C,value:[]}])),b=e&&[],w=n&&[],k=Lm().x(g?L=>g[L]:p).y(x?L=>x[L]:m).weight(f?L=>f[L]:1).size([$,y]).bandwidth(r),M=[];for(const L of a){const C=[];M.push(C);for(const E of h?ji(L,h,d):[L]){const O=k.contours(E);C.push([E,O])}}let A=o;if(!(A instanceof kr)){let L=0;for(const C of M)for(const[,E]of C){const O=E.max;O>L&&(L=O)}A=Float64Array.from({length:o-1},(C,E)=>L*100*(E+1)/o)}const z=[],S=[];for(const L of M){const C=[];z.push(C);for(const[E,O]of L)for(const R of A){C.push(S.length),S.push(O(R/100)),b&&b.push(R),w&&w.push(R);for(const N in v)v[N].value.push(l[N].value[E[0]])}}return b&&b.push(0),w&&w.push(0),{data:i,facets:z,channels:{...v,...b&&{fill:{value:b,scale:"color"}},...w&&{stroke:{value:w,scale:"color"}},contours:{value:S}}}})}function th(t){return/^density$/i.test(t)}function dx(t,e){return eh("x",t,e)}function px(t,e){return eh("y",t,e)}function eh(t,e,{x1:n,x2:r,y1:o,y2:i,x:a=n===void 0&&r===void 0?t==="y"?gt:D:void 0,y:l=o===void 0&&i===void 0?t==="x"?gt:D:void 0,fill:s,positiveFill:c="#3ca951",negativeFill:u="#4269d0",fillOpacity:f=1,positiveFillOpacity:h=f,negativeFillOpacity:d=f,stroke:p,strokeOpacity:m,z:$=Mt(p)[0],clip:y,tip:g,render:x,...v}={}){return[n,r]=nh(a,n,r),[o,i]=nh(l,o,i),n===r&&o===i&&(t==="y"?o=he(0):n=he(0)),{tip:g}=je({tip:g},t==="y"?"x":"y"),It(lt(c)?null:Object.assign(ya(e,{x1:n,x2:r,y1:o,y2:i,z:$,fill:c,fillOpacity:h,render:ln(x,rh(t,!0)),clip:y,...v}),{ariaLabel:"positive difference"}),lt(u)?null:Object.assign(ya(e,{x1:n,x2:r,y1:o,y2:i,z:$,fill:u,fillOpacity:d,render:ln(x,rh(t,!1)),clip:y,...v}),{ariaLabel:"negative difference"}),go(e,{x:r,y:i,z:$,stroke:p,strokeOpacity:m,tip:g,clip:!0,...v}))}function nh(t,e,n){return e===void 0&&n===void 0?e=n=he(t):e===void 0?(n=he(n),e=t===void 0?n:he(t)):n===void 0?(e=he(e),n=t===void 0?e:he(t)):(e=he(e),n=he(n)),[e,n]}function he(t){let e;const{value:n,label:r=_t(n)}=tn(t);return{transform:o=>e||(e=V(o,n)),label:r}}function rh(t,e){const n=t==="x"?"y":"x",r=`${n}1`,o=`${n}2`,i=`${t}1`,a=`${t}2`;return(l,s,c,u,f,h)=>{const{[r]:d,[o]:p}=c,m=new Float32Array(d.length),$=new Float32Array(p.length),y=u[t==="y"?"height":"width"];(e===ac(s[t])<0?m:$).fill(y);const g=h(l,s,{...c,[o]:d,[a]:$},u,f),x=h(l,s,{...c,[r]:p,[i]:m},u,f),v=g.querySelector("g")??g,b=x.querySelector("g")??x;for(let w=0;v.firstChild;w+=2){const k=kc(),M=U("svg:clipPath",f).attr("id",k).node();M.appendChild(v.firstChild),b.childNodes[w].setAttribute("clip-path",`url(#${k})`),b.insertBefore(M,b.childNodes[w])}return x}}function oh({geometry:t=D,...e}={}){const n=on(r=>V(r,t));return Lt({...e,x:null,y:null,geometry:{transform:n}},(r,o,i,a,l,{projection:s})=>{const c=n(r),u=c.length,f=new Float64Array(u),h=new Float64Array(u),d=Kt(s);for(let p=0;pV(o,t)),r=on(o=>V(n(o),zm));return{...e,x:{transform:o=>Float64Array.from(r(o),([i])=>i)},y:{transform:o=>Float64Array.from(r(o),([,i])=>i)},geometry:{transform:n}}}const yx={ariaLabel:"geo",fill:"none",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};let ih=class extends et{constructor(e,n={}){const[r,o]=ht(n.r,3);super(e,{x:{value:n.tip?n.x:null,scale:"x",optional:!0},y:{value:n.tip?n.y:null,scale:"y",optional:!0},r:{value:r,scale:"r",filter:Jt,optional:!0},geometry:{value:n.geometry,scale:"projection"}},xa(n),yx),this.r=o}render(e,n,r,o,i){const{geometry:a,r:l}=r,s=Kt(i.projection??gx(n)),{r:c}=this;return vr(c)?e=[]:c!==void 0&&s.pointRadius(c),U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(u=>{u.selectAll().data(e).enter().append("path").call(Q,this).attr("d",l?f=>s.pointRadius(l[f])(a[f]):f=>s(a[f])).call(ut,this,r)}).node()}};function gx({x:t,y:e}){if(t||e)return t??=n=>n,e??=n=>n,mr({point(n,r){this.stream.point(t(n),e(r))}})}function Ca(t,e={}){return e.tip&&e.x===void 0&&e.y===void 0?e=oh(e):e.geometry===void 0&&(e={...e,geometry:D}),new ih(t,e)}function $x({strokeWidth:t=1.5,...e}={}){return Ca({type:"Sphere"},{strokeWidth:t,...e})}function vx({strokeOpacity:t=.1,...e}={}){return Ca(Sm(),{strokeOpacity:t,...e})}const ar=.5,lr=0;function xx(t={fill:"count"},{binWidth:e,...n}={}){const{z:r}=n;return e=e===void 0?20:rt(e),t=Es(t,n),ve(t,"fill")&&(n.channels={...n.channels,fill:{value:[]}}),n.symbol===void 0&&(n.symbol="hexagon"),n.r===void 0&&!ve(t,"r")&&(n.r=e/2),Lt(n,(o,i,a,l,s,c)=>{let{x:u,y:f,z:h,fill:d,stroke:p,symbol:m}=a;if(u===void 0)throw new Error("missing channel: x");if(f===void 0)throw new Error("missing channel: y");({x:u,y:f}=Hn(a,l,c)),h=h?h.value:V(o,r),d=d?.value,p=p?.value,m=m?.value;const $=hi(t,{z:h,fill:d,stroke:p,symbol:m}),y=h&&[],g=d&&[],x=p&&[],v=m&&[],b=[],w=[],k=[];let M=-1;for(const L of t)L.initialize(o);for(const L of i){const C=[];for(const E of t)E.scope("facet",L);for(const[E,O]of Be(L,$))for(const{index:R,extent:N}of wx(o,O,u,f,e)){C.push(++M),w.push(N.x),k.push(N.y),h&&y.push($===h?E:h[R[0]]),d&&g.push($===d?E:d[R[0]]),p&&x.push($===p?E:p[R[0]]),m&&v.push($===m?E:m[R[0]]);for(const F of t)F.reduce(R,N)}b.push(C)}const A=a.x.scale,z=a.y.scale,S={x:{value:w,source:l[A]?{value:J(w,l[A].invert),scale:A}:null},y:{value:k,source:l[z]?{value:J(k,l[z].invert),scale:z}:null},...h&&{z:{value:y}},...d&&{fill:{value:g,scale:"auto"}},...p&&{stroke:{value:x,scale:"auto"}},...m&&{symbol:{value:v,scale:"auto"}},...Object.fromEntries(t.map(({name:L,output:C})=>[L,{scale:"auto",label:C.label,radius:L==="r"?e/2:void 0,value:C.transform()}]))};return{data:o,facets:b,channels:S}})}function wx(t,e,n,r,o){const i=o*(1.5/Ms),a=new Map;for(const l of e){let s=n[l],c=r[l];if(isNaN(s)||isNaN(c))continue;let u=Math.round(c=(c-lr)/i),f=Math.round(s=(s-ar)/o-(u&1)/2),h=c-u;if(Math.abs(h)*3>1){let m=s-f,$=f+(sg*g+x*x&&(f=$+(u&1?1:-1)/2,u=y)}const d=`${f},${u}`;let p=a.get(d);p===void 0&&(p={index:[],extent:{data:t,x:(f+(u&1)/2)*o+ar,y:u*i+lr}},a.set(d,p)),p.index.push(l)}return a.values()}const bx={ariaLabel:"hexgrid",fill:"none",stroke:"currentColor",strokeOpacity:.1};function kx(t){return new ah(t)}class ah extends et{constructor({binWidth:e=20,clip:n=!0,...r}={}){super(Rn,void 0,{clip:n,...r},bx),this.binWidth=rt(e)}render(e,n,r,o,i){const{binWidth:a}=this,{marginTop:l,marginRight:s,marginBottom:c,marginLeft:u,width:f,height:h}=o,d=u-ar,p=f-s-ar,m=l-lr,$=h-c-lr,y=a/2,g=y*As,x=g/2,v=y*2,b=g*1.5,w=Math.floor(d/v),k=Math.ceil(p/v),M=Math.floor((m+x)/b),A=Math.ceil(($-x)/b)+1,z=`m0,${ze(-g)}l${ze(y)},${ze(x)}v${ze(g)}l${ze(-y)},${ze(x)}`;let S=z;for(let L=M;LL.append("path").call(Q,this).call(ut,this,r).attr("d",S)).node()}}function ze(t){return Math.round(t*1e3)/1e3}const Mx={ariaLabel:"image",fill:null,stroke:null};function Ax(t){return/^\.*\//.test(t)}function Lx(t){return/^(blob|data|file|http|https):/i.test(t)}function zx(t){return typeof t=="string"&&(Ax(t)||Lx(t))?[void 0,t]:[t,void 0]}class lh extends et{constructor(e,n={}){let{x:r,y:o,r:i,width:a,height:l,rotate:s,src:c,preserveAspectRatio:u,crossOrigin:f,frameAnchor:h,imageRendering:d}=n;i==null&&(i=void 0),i===void 0&&a===void 0&&l===void 0?a=l=16:a===void 0&&l!==void 0?a=l:l===void 0&&a!==void 0&&(l=a);const[p,m]=zx(c),[$,y]=ht(i),[g,x]=ht(a,y!==void 0?y*2:void 0),[v,b]=ht(l,y!==void 0?y*2:void 0),[w,k]=ht(s,0);super(e,{x:{value:r,scale:"x",optional:!0},y:{value:o,scale:"y",optional:!0},r:{value:$,scale:"r",filter:Jt,optional:!0},width:{value:g,filter:Jt,optional:!0},height:{value:v,filter:Jt,optional:!0},rotate:{value:w,optional:!0},src:{value:p,optional:!0}},xa(n),Mx),this.src=m,this.width=x,this.rotate=k,this.height=b,this.r=y,this.preserveAspectRatio=pt(u,"xMidYMid"),this.crossOrigin=kt(f),this.frameAnchor=jn(h),this.imageRendering=pt(d,"auto")}render(e,n,r,o,i){const{x:a,y:l}=n,{x:s,y:c,width:u,height:f,r:h,rotate:d,src:p}=r,{r:m,width:$,height:y,rotate:g}=this,[x,v]=Ht(this,o);return U("svg:g",i).call(ot,this,o,i).call(tt,this,{x:s&&a,y:c&&l}).call(b=>b.selectAll().data(e).enter().append("image").call(Q,this).attr("x",sh(s,u,h,x,$,m)).attr("y",sh(c,f,h,v,y,m)).attr("width",u?w=>u[w]:$!==void 0?$:h?w=>h[w]*2:m*2).attr("height",f?w=>f[w]:y!==void 0?y:h?w=>h[w]*2:m*2).attr("transform",d?w=>`rotate(${d[w]})`:g?`rotate(${g})`:null).attr("transform-origin",d||g?cn`${s?w=>s[w]:x}px ${c?w=>c[w]:v}px`:null).call(q,"href",p?w=>p[w]:this.src).call(q,"preserveAspectRatio",this.preserveAspectRatio).call(q,"crossorigin",this.crossOrigin).call(q,"image-rendering",this.imageRendering).call(q,"clip-path",h?w=>`circle(${h[w]}px)`:m!==void 0?`circle(${m}px)`:null).call(ut,this,r)).node()}}function sh(t,e,n,r,o,i){return e&&t?a=>t[a]-e[a]/2:e?a=>r-e[a]/2:t&&o!==void 0?a=>t[a]-o/2:o!==void 0?r-o/2:n&&t?a=>t[a]-n[a]:n?a=>r-n[a]:t?a=>t[a]-i:r-i}function Sx(t,{x:e,y:n,...r}={}){return r.frameAnchor===void 0&&([e,n]=Wt(e,n)),new lh(t,{...r,x:e,y:n})}function Ex(t,e,n){var r=1e-8,o=e-1,i=n-1,a=0,l,s,c,u,f,h,d,p,m,$,y;if(t<=0)return 0;if(t>=1)return 1;for(e>=1&&n>=1?(c=t<.5?t:1-t,u=Math.sqrt(-2*Math.log(c)),d=(2.30753+u*.27061)/(1+u*(.99229+u*.04481))-u,t<.5&&(d=-d),p=(d*d-3)/6,m=2/(1/(2*e-1)+1/(2*n-1)),$=d*Math.sqrt(p+m)/m-(1/(2*n-1)-1/(2*e-1))*(p+5/6-2/(3*m)),d=e/(e+n*Math.exp(2*$))):(l=Math.log(e/(e+n)),s=Math.log(n/(e+n)),u=Math.exp(e*l)/e,f=Math.exp(n*s)/n,$=u+f,t=1&&(d=.5*(d+u+1)),Math.abs(u)0)break}return d}function Ox(t,e,n){var r=t===0||t===1?0:Math.exp(bn(e+n)-bn(e)-bn(n)+e*Math.log(t)+n*Math.log(1-t));return t<0||t>1?!1:t<(e+1)/(e+n+2)?r*ch(t,e,n)/e:1-r*ch(1-t,n,e)/n}function ch(t,e,n){var r=1e-30,o=1,i=e+n,a=e+1,l=e-1,s=1,c=1-i*t/a,u,f,h,d;for(Math.abs(c).5?n:-n}const Nx={ariaLabel:"linear-regression",fill:"currentColor",fillOpacity:.1,stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:1};let uh=class extends et{constructor(e,n={}){const{x:r,y:o,z:i,ci:a=.95,precision:l=4}=n;if(super(e,{x:{value:r,scale:"x"},y:{value:o,scale:"y"},z:{value:$e(n),optional:!0}},n,Nx),this.z=i,this.ci=+a,this.precision=+l,!(0<=this.ci&&this.ci<1))throw new Error(`invalid ci; not in [0, 1): ${a}`);if(!(this.precision>0))throw new Error(`invalid precision: ${l}`)}render(e,n,r,o,i){const{x:a,y:l,z:s}=r,{ci:c}=this;return U("svg:g",i).call(ot,this,o,i).call(tt,this,n).call(u=>u.selectAll().data(s?ji(e,s,this.z):[e]).enter().call(f=>f.append("path").attr("fill","none").call(Q,this).call(qr,this,{...r,fill:null,fillOpacity:null}).attr("d",h=>this._renderLine(h,a,l)).call(c&&!nn(this.fill)?h=>h.select(Rx).attr("stroke","none").call(Q,this).call(qr,this,{...r,stroke:null,strokeOpacity:null,strokeWidth:null}).attr("d",d=>this._renderBand(d,a,l)):()=>{}))).node()}};function Rx(){return this.parentNode.insertBefore(this.ownerDocument.createElementNS(Ne.svg,"path"),this)}let Tx=class extends uh{constructor(e,n){super(e,n)}_renderBand(e,n,r){const{ci:o,precision:i}=this,[a,l]=yt(e,u=>r[u]),s=ko(e,r,n),c=fh(e,r,n,(1-o)/2,s);return jo().y(u=>u).x0(u=>c(u,-1)).x1(u=>c(u,1))(Mn(a,l-i/2,i).concat(l))}_renderLine(e,n,r){const[o,i]=yt(e,l=>r[l]),a=ko(e,r,n);return`M${a(o)},${o}L${a(i)},${i}`}},Ix=class extends uh{constructor(e,n){super(e,n)}_renderBand(e,n,r){const{ci:o,precision:i}=this,[a,l]=yt(e,u=>n[u]),s=ko(e,n,r),c=fh(e,n,r,(1-o)/2,s);return jo().x(u=>u).y0(u=>c(u,-1)).y1(u=>c(u,1))(Mn(a,l-i/2,i).concat(l))}_renderLine(e,n,r){const[o,i]=yt(e,l=>n[l]),a=ko(e,n,r);return`M${o},${a(o)}L${i},${a(i)}`}};function Bx(t,{y:e=gt,x:n=D,stroke:r,fill:o=lt(r)?"currentColor":r,...i}={}){return new Tx(t,ha({...i,x:n,y:e,fill:o,stroke:r}))}function Wx(t,{x:e=gt,y:n=D,stroke:r,fill:o=lt(r)?"currentColor":r,...i}={}){return new Ix(t,fa({...i,x:e,y:n,fill:o,stroke:r}))}function ko(t,e,n){let r=0,o=0,i=0,a=0;for(const u of t){const f=e[u],h=n[u];r+=f,o+=h,i+=f*h,a+=f*f}const l=t.length,s=(l*i-r*o)/(l*a-r*r),c=(o-s*r)/l;return u=>s*u+c}function fh(t,e,n,r,o){const i=qt(t,u=>e[u])/t.length;let a=0,l=0;for(const u of t)a+=(e[u]-i)**2,l+=(n[u]-o(e[u]))**2;const s=Math.sqrt(l/(t.length-2)),c=Cx(r,t.length-2);return(u,f)=>{const h=o(u),d=s*Math.sqrt(1/t.length+(u-i)**2/a);return h+f*c*d}}function Na({path:t=D,delimiter:e,frameAnchor:n,treeLayout:r=yr,treeSort:o,treeSeparation:i,treeAnchor:a,treeFilter:l,...s}={}){a=Ra(a),o=dh(o),l!=null&&(l=Ia(l)),n===void 0&&(n=a.frameAnchor);const c=mh(e),u=kh(s,Ia),[f,h]=Ct(),[d,p]=Ct();return{x:f,y:d,frameAnchor:n,...jt(s,(m,$)=>{const y=c(V(m,t)),g=h([]),x=p([]);let v=-1;const b=[],w=[],k=Ql().path(z=>y[z]),M=te(m)?z=>z.data=m[z.data]:z=>z.data=m.get(z.data),A=r();A.nodeSize&&A.nodeSize([1,1]),A.separation&&i!==void 0&&A.separation(i??Vo);for(const z of u)z[Ao]=z[wh]([]);for(const z of $){const S=[],L=k(z.filter(C=>y[C]!=null)).each(M);o!=null&&L.sort(o),A(L);for(const C of L.descendants())if(!(l!=null&&!l(C))){S.push(++v),b[v]=C.data,a.position(C,v,g,x);for(const E of u)E[Ao][v]=E[bh](C)}w.push(S)}return{data:b,facets:w}}),...Object.fromEntries(u)}}function hh({path:t=D,delimiter:e,curve:n="bump-x",stroke:r="#555",strokeWidth:o=1.5,strokeOpacity:i=.5,treeLayout:a=yr,treeSort:l,treeSeparation:s,treeAnchor:c,treeFilter:u,...f}={}){c=Ra(c),l=dh(l),u!=null&&(u=$h(u)),f={curve:n,stroke:r,strokeWidth:o,strokeOpacity:i,...f};const h=mh(e),d=kh(f,$h),[p,m]=Ct(),[$,y]=Ct(),[g,x]=Ct(),[v,b]=Ct();return{x1:p,x2:$,y1:g,y2:v,...jt(f,(w,k)=>{const M=h(V(w,t)),A=m([]),z=y([]),S=x([]),L=b([]);let C=-1;const E=[],O=[],R=Ql().path(F=>M[F]),N=a();N.nodeSize&&N.nodeSize([1,1]),N.separation&&s!==void 0&&N.separation(s??Vo);for(const F of d)F[Ao]=F[wh]([]);for(const F of k){const T=[],B=R(F.filter(j=>M[j]!=null)).each(j=>j.data=w[j.data]);l!=null&&B.sort(l),N(B);for(const{source:j,target:I}of B.links())if(!(u!=null&&!u(I,j))){T.push(++C),E[C]=I.data,c.position(j,C,A,S),c.position(I,C,z,L);for(const Y of d)Y[Ao][C]=Y[bh](I,j)}O.push(T)}return{data:E,facets:O}}),...Object.fromEntries(d)}}function Ra(t="left"){switch(`${t}`.trim().toLowerCase()){case"left":return jx;case"right":return Fx}throw new Error(`invalid tree anchor: ${t}`)}const jx={frameAnchor:"left",dx:6,position({x:t,y:e},n,r,o){r[n]=e,o[n]=-t}},Fx={frameAnchor:"right",dx:-6,position({x:t,y:e},n,r,o){r[n]=-e,o[n]=-t}};function dh(t){return t==null||typeof t=="function"?t:`${t}`.trim().toLowerCase().startsWith("node:")?ph(Ia(t)):ph(Dx(t))}function ph(t){return(e,n)=>Rt(t(e),t(n))}function Dx(t){return e=>e.data?.[t]}function mh(t="/"){if(t=`${t}`,t==="/")return n=>n;if(t.length!==1)throw new Error("delimiter must be exactly one character");const e=t.charCodeAt(0);return n=>n.map(r=>qx(r,e))}const Ta=92,yh=47;function qx(t,e){if(e===Ta)throw new Error("delimiter cannot be backslash");let n=!1;for(let r=0,o=t.length;rn==null?void 0:t(n)}function Xx(t){let e=t.length;for(;--e>0&&!_x(t,e););return Yx(t.slice(e+1))}function _x(t,e){if(t[e]==="/"){let n=0;for(;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}const wh=2,bh=3,Ao=4;function kh(t,e){const n=[];for(const r in t){const o=t[r],i=e(o);i!==void 0&&n.push([r,...Ct(o),i])}return n}function Mh(t,{fill:e,stroke:n,strokeWidth:r,strokeOpacity:o,strokeLinejoin:i,strokeLinecap:a,strokeMiterlimit:l,strokeDasharray:s,strokeDashoffset:c,marker:u,markerStart:f=u,markerEnd:h=u,dot:d=lt(f)&<(h),text:p="node:name",textStroke:m="var(--plot-background)",title:$="node:path",dx:y,dy:g,textAnchor:x,treeLayout:v=yr,textLayout:b=v===yr||v===Jl?"mirrored":"normal",tip:w,...k}={}){if(y===void 0&&(y=Ra(k.treeAnchor).dx),x!==void 0)throw new Error("textAnchor is not a configurable tree option");b=Ot(b,"textLayout",["mirrored","normal"]);function M(A){return un(t,Na({treeLayout:v,text:p,fill:e===void 0?"currentColor":e,stroke:m,dx:y,dy:g,title:$,...A,...k}))}return It($f(t,hh({treeLayout:v,markerStart:f,markerEnd:h,stroke:n!==void 0?n:e===void 0?"node:internal":e,strokeWidth:r,strokeOpacity:o,strokeLinejoin:i,strokeLinecap:a,strokeMiterlimit:l,strokeDasharray:s,strokeDashoffset:c,...k})),d?Le(t,Na({treeLayout:v,fill:e===void 0?"node:internal":e,title:$,tip:w,...k})):null,p!=null?b==="mirrored"?[M({textAnchor:"start",treeFilter:"node:external"}),M({textAnchor:"end",treeFilter:"node:internal",dx:-y})]:M():null)}function Gx(t,e){return Mh(t,{...e,treeLayout:Jl})}const Ah={ariaLabel:"waffle"};class Lh extends $a{constructor(e,{unit:n=1,gap:r=1,round:o,render:i,multiple:a,...l}={}){super(e,{...l,render:ln(i,Sh("x"))},Ah),this.unit=Math.max(0,n),this.gap=+r,this.round=Eh(o),this.multiple=Oh(a)}}class zh extends va{constructor(e,{unit:n=1,gap:r=1,round:o,render:i,multiple:a,...l}={}){super(e,{...l,render:ln(i,Sh("y"))},Ah),this.unit=Math.max(0,n),this.gap=+r,this.round=Eh(o),this.multiple=Oh(a)}}function Sh(t){return function(e,n,r,o,i){const{unit:a,gap:l,rx:s,ry:c,round:u}=this,{document:f}=i,h=r.channels[`${t}1`].value,d=r.channels[`${t}2`].value,p=this[t==="y"?"_width":"_height"](n,r,o),m=this[t==="y"?"_x":"_y"](n,r,o),$=a*Vx(n.scales[t]),{multiple:y=Math.max(1,Math.floor(Math.sqrt(p/$)))}=this,g=Math.min(p/y,$*y),x=$*y,v=t==="y"?([S,L])=>[S*g,-L*x]:([S,L])=>[L*x,S*g],b=(p-y*g)/2,w=typeof m=="function"?S=>m(S)+b:m+b,k=n[t](0),M=Yg(),A=f.createElementNS(Ne.svg,"pattern");A.setAttribute("width",t==="y"?g:x),A.setAttribute("height",t==="y"?x:g),A.setAttribute("patternUnits","userSpaceOnUse");const z=A.appendChild(f.createElementNS(Ne.svg,"rect"));return z.setAttribute("x",l/2),z.setAttribute("y",l/2),z.setAttribute("width",(t==="y"?g:x)-l),z.setAttribute("height",(t==="y"?x:g)-l),s!=null&&z.setAttribute("rx",s),c!=null&&z.setAttribute("ry",c),U("svg:g",i).call(ot,this,o,i).call(this._transform,this,n).call(S=>S.selectAll().data(e).enter().append(()=>A.cloneNode(!0)).attr("id",L=>`${M}-${L}`).select("rect").call(Q,this).call(ut,this,r)).call(S=>S.selectAll().data(e).enter().append("path").attr("transform",t==="y"?cn`translate(${w},${k})`:cn`translate(${k},${w})`).attr("d",L=>`M${Da(u(h[L]/a),u(d[L]/a),y).map(v).join("L")}Z`).attr("fill",L=>`url(#${M}-${L})`).attr("stroke",this.stroke==null?null:L=>`url(#${M}-${L})`)).node()}}function Da(t,e,n){if(t<0||e<0){const r=Math.ceil(-Math.min(t,e)/n);return Da(t+r*n,e+r*n,n).map(([o,i])=>[o,i-r])}return en-1?[]:[[Math.ceil(t%n),Math.floor(t/n)],[n,Math.floor(t/n)]],[n,Math.floor(e/n)],[Math.ceil(e%n),Math.floor(e/n)],[Math.ceil(e%n),Math.floor(e/n)+e%1],[Math.floor(e%n),Math.floor(e/n)+e%1],...e%n<1?[]:[[Math.floor(e%n),Math.ceil(e/n)],[0,Math.ceil(e/n)]]]}function Eh(t){if(t===void 0||t===!1)return Number;if(t===!0)return Math.round;if(typeof t!="function")throw new Error(`invalid round: ${t}`);return t}function Oh(t){return t===void 0?void 0:Math.max(1,Math.floor(t))}function Vx({domain:t,range:e}){return Ch(e)/Ch(t)}function Ch(t){const[e,n]=yt(t);return n-e}function Hx(t,e={}){return Ke(e)||(e={...e,y:gt,x2:D}),new Lh(t,Qr(Gi(Zr(e))))}function Ux(t,e={}){return Ke(e)||(e={...e,x:gt,y2:D}),new zh(t,Jr(Vi(Kr(e))))}const Zx=({marginLeft:t})=>[1,t],Kx=({width:t,marginRight:e})=>[-1,t-e],Qx=({width:t,marginLeft:e,marginRight:n})=>[0,(e+t-n)/2],Jx=({marginTop:t})=>[1,t],t1=({height:t,marginBottom:e})=>[-1,t-e],e1=({height:t,marginTop:e,marginBottom:n})=>[0,(e+t-n)/2];function Nh(t){return typeof t=="string"?{anchor:t}:t}function n1(t={},e={}){arguments.length===1&&([t,e]=Rh(t));let{anchor:n="left",padding:r=1,r:o=e.r}=Nh(t);switch(`${n}`.toLowerCase()){case"left":n=Zx;break;case"right":n=Kx;break;case"middle":n=Qx;break;default:throw new Error(`unknown dodge anchor: ${n}`)}return Th("x","y",n,rt(r),o,e)}function r1(t={},e={}){arguments.length===1&&([t,e]=Rh(t));let{anchor:n="bottom",padding:r=1,r:o=e.r}=Nh(t);switch(`${n}`.toLowerCase()){case"top":n=Jx;break;case"bottom":n=t1;break;case"middle":n=e1;break;default:throw new Error(`unknown dodge anchor: ${n}`)}return Th("y","x",n,rt(r),o,e)}function Rh(t){const{anchor:e,padding:n,...r}=t,{r:o}=r;return[{anchor:e,padding:n,r:o},r]}function Th(t,e,n,r,o,i){if(o!=null&&typeof o!="number"){let{channels:a,sort:l,reverse:s}=i;a=Jo(a),a?.r===void 0&&(i={...i,channels:{...a,r:{value:o,scale:"r"}}}),l===void 0&&s===void 0&&(i.sort={channel:"-r"})}return Lt(i,function(a,l,s,c,u,f){let{[e]:h,r:d}=s;if(!s[e])throw new Error(`missing channel: ${e}`);({[e]:h}=Hn(s,c,f));const p=d?void 0:o!==void 0?rt(o):this.r!==void 0?this.r:3;d&&(d=V(d.value,c[d.scale]||D,Float64Array));let[m,$]=n(u);const y=m?i1:o1,g=new Float64Array(h.length),x=d?v=>d[v]:()=>p;for(let v of l){const b=Cm();v=v.filter(d?k=>$r(h[k])&&Jt(d[k]):k=>$r(h[k]));const w=new Float64Array(2*v.length+2);for(const k of v){const M=x(k),A=m?M+r:0,z=h[k]-M,S=h[k]+M;let L=2;b.queryInterval(z-r,S+r,([,,E])=>{const O=g[E]-A,R=h[k]-h[E],N=r+(d?d[k]+d[E]:2*p),F=Math.sqrt(N*N-R*R);w[L++]=O-F,w[L++]=O+F});let C=w.slice(0,L);m&&(C=C.filter(E=>E>=0));t:for(const E of C.sort(y)){for(let O=0;Ot(e,r=>n[r]))}const s1={mapIndex(t,e,n){const[r,o]=yt(t,a=>e[a]),i=o-r;for(const a of t)n[a]=e[a]===null?NaN:(e[a]-r)/i}},Ih=Lo((t,e)=>{for(let n=0;n{for(let n=t.length-1;n>=0;--n){const r=e[t[n]];if(vt(r))return r}}),u1={mapIndex(t,e,n){const r=ur(t,i=>e[i]),o=fr(t,i=>e[i]);for(const i of t)n[i]=e[i]===null?NaN:o?(e[i]-r)/o:0}},f1=kn(zt),h1=kn(ur),d1=kn(Sn),p1=kn(Nt),m1=kn(qt);function y1(t,e){return Bh("x",t,e)}function g1(t,e){return Bh("y",t,e)}function Bh(t,e,n={}){let r,o=1;if(typeof e=="number")o=e,r=(c,u)=>+c+u;else{if(typeof e=="string"){const c=e.startsWith("-")?-1:1;[e,o]=Po(e.replace(/^[+-]/,"")),o*=c}e=Sr(e),r=(c,u)=>e.offset(c,u)}const i=`${t}1`,a=`${t}2`,l=Ut({[i]:c=>c.map(u=>r(u,o)),[a]:c=>c},n),s=l[a].transform;return l[a].transform=()=>{const c=s(),[u,f]=yt(c);return c.domain=o<0?[u,r(f,o)]:[r(u,o),f],c},l}function $1(t,e={}){if(typeof t=="string")switch(t.toLowerCase()){case"first":return Wh(e);case"last":return jh(e)}if(typeof t=="function")return Se(null,t,e);let n,r;for(n in t){if(r!==void 0)throw new Error("ambiguous selector; multiple inputs");r=v1(t[n])}if(r===void 0)throw new Error(`invalid selector: ${t}`);return Se(n,r,e)}function v1(t){if(typeof t=="function")return t;switch(`${t}`.toLowerCase()){case"min":return Ya;case"max":return Pa}throw new Error(`unknown selector: ${t}`)}function Wh(t){return Se(null,M1,t)}function jh(t){return Se(null,A1,t)}function x1(t){return Se("x",Ya,t)}function w1(t){return Se("y",Ya,t)}function b1(t){return Se("x",Pa,t)}function k1(t){return Se("y",Pa,t)}function*M1(t){yield t[0]}function*A1(t){yield t[t.length-1]}function*Ya(t,e){yield Em(t,n=>e[n])}function*Pa(t,e){yield Bo(t,n=>e[n])}function Se(t,e,n){if(t!=null){if(n[t]==null)throw new Error(`missing channel: ${t}`);t=n[t]}const r=$e(n);return jt(n,(o,i)=>{const a=V(o,r),l=V(o,t),s=[];for(const c of i){const u=[];for(const f of a?Ce(c,h=>a[h]).values():[c])for(const h of e(f,l))u.push(h);s.push(u)}return{data:o,facets:s}})}et.prototype.plot=function({marks:t=[],...e}={}){return tf({...e,marks:[...t,this]})};export{fo as Area,vf as Arrow,$a as BarX,va as BarY,po as Cell,Vf as Contour,Jf as Density,mo as Dot,Vu as Frame,ih as Geo,ah as Hexgrid,lh as Image,yo as Line,gf as Link,et as Mark,Ff as Raster,eo as Rect,_c as RuleX,Gc as RuleY,Gr as Text,Of as TickX,Cf as TickY,Hu as Tip,Vr as Vector,Lh as WaffleX,zh as WaffleY,ya as area,tr as areaX,$n as areaY,G$ as arrow,ov as auto,bf as autoSpec,vu as axisFx,$u as axisFy,Qi as axisX,Ki as axisY,De as barX,qe as barY,Fe as bin,Me as binX,Ae as binY,Ye as bollinger,kv as bollingerX,Mv as bollingerY,Lv as boxX,zv as boxY,vn as cell,U$ as cellX,Z$ as cellY,oh as centroid,tv as circle,Gx as cluster,Ct as column,qv as contour,Pv as crosshair,Xv as crosshairX,_v as crosshairY,ox as delaunayLink,ix as delaunayMesh,ux as density,dx as differenceX,px as differenceY,n1 as dodgeX,r1 as dodgeY,Le as dot,Q$ as dotX,J$ as dotY,iy as filter,xy as find,bc as formatIsoDate,Wg as formatMonth,wc as formatNumber,jg as formatWeekday,aa as frame,Ca as geo,mx as geoCentroid,vx as graticule,Au as gridFx,ku as gridFy,Mu as gridX,bu as gridY,ci as group,Yn as groupX,Pn as groupY,si as groupZ,ev as hexagon,xx as hexbin,kx as hexgrid,ax as hull,D as identity,Sx as image,gt as indexOf,Lt as initializer,Xf as interpolateNearest,Sa as interpolateNone,Pf as interpolatorBarycentric,_f as interpolatorRandomWalk,B0 as legend,go as line,er as lineX,nr as lineY,Bx as linearRegressionX,Wx as linearRegressionY,$f as link,Ut as map,ba as mapX,ka as mapY,It as marks,qa as normalize,a1 as normalizeX,l1 as normalizeY,$s as numberInterval,tf as plot,qi as pointer,Yi as pointerX,Pr as pointerY,Ev as raster,ia as rect,oo as rectX,io as rectY,ay as reverse,we as ruleX,be as ruleY,hg as scale,$1 as select,Wh as selectFirst,jh as selectLast,b1 as selectMaxX,k1 as selectMaxY,x1 as selectMinX,w1 as selectMinY,y1 as shiftX,g1 as shiftY,ly as shuffle,Ls as sort,$x as sphere,M0 as spike,Fu as stackX,q0 as stackX1,Y0 as stackX2,Du as stackY,P0 as stackY1,X0 as stackY2,un as text,Zc as textX,Kc as textY,Nf as tickX,Rf as tickY,Xo as timeInterval,Uu as tip,jt as transform,Mh as tree,hh as treeLink,Na as treeNode,br as utcInterval,V as valueof,fu as vector,hu as vectorX,du as vectorY,lx as voronoi,sx as voronoiMesh,Hx as waffleX,Ux as waffleY,xo as window,fv as windowX,hv as windowY}; diff --git a/docs/_node/binary-search-bounds@2.0.5/index.990a1c6d.js b/docs/_node/binary-search-bounds@2.0.5/index.990a1c6d.js new file mode 100644 index 0000000..293a65f --- /dev/null +++ b/docs/_node/binary-search-bounds@2.0.5/index.990a1c6d.js @@ -0,0 +1 @@ +function e(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}function d(o,i,n,r,t){for(var a=t+1;r<=t;){var v=r+t>>>1,u=o[v],c=n!==void 0?n(u,i):u-i;c>=0?(a=v,t=v-1):r=v+1}return a}function l(o,i,n,r,t){for(var a=t+1;r<=t;){var v=r+t>>>1,u=o[v],c=n!==void 0?n(u,i):u-i;c>0?(a=v,t=v-1):r=v+1}return a}function p(o,i,n,r,t){for(var a=r-1;r<=t;){var v=r+t>>>1,u=o[v],c=n!==void 0?n(u,i):u-i;c<0?(a=v,r=v+1):t=v-1}return a}function g(o,i,n,r,t){for(var a=r-1;r<=t;){var v=r+t>>>1,u=o[v],c=n!==void 0?n(u,i):u-i;c<=0?(a=v,r=v+1):t=v-1}return a}function s(o,i,n,r,t){for(;r<=t;){var a=r+t>>>1,v=o[a],u=n!==void 0?n(v,i):v-i;if(u===0)return a;u<=0?r=a+1:t=a-1}return-1}function f(o,i,n,r,t,a){return typeof n=="function"?a(o,i,n,r===void 0?0:r|0,t===void 0?o.length-1:t|0):a(o,i,void 0,n===void 0?0:n|0,r===void 0?o.length-1:r|0)}var h={ge:function(o,i,n,r,t){return f(o,i,n,r,t,d)},gt:function(o,i,n,r,t){return f(o,i,n,r,t,l)},lt:function(o,i,n,r,t){return f(o,i,n,r,t,p)},le:function(o,i,n,r,t){return f(o,i,n,r,t,g)},eq:function(o,i,n,r,t){return f(o,i,n,r,t,s)}},j=e(h);export{j as default}; diff --git a/docs/_node/d3-array@3.2.4/index.f89e3560.js b/docs/_node/d3-array@3.2.4/index.f89e3560.js new file mode 100644 index 0000000..17d6acc --- /dev/null +++ b/docs/_node/d3-array@3.2.4/index.f89e3560.js @@ -0,0 +1 @@ +import{InternMap as P,InternSet as y}from"../internmap@2.0.3/index.4106013c.js";import{InternMap as Fn,InternSet as Rn}from"../internmap@2.0.3/index.4106013c.js";function m(t,n){return t==null||n==null?NaN:tn?1:t>=n?0:NaN}function Q(t,n){return t==null||n==null?NaN:nt?1:n>=t?0:NaN}function D(t){let n,r,o;t.length!==2?(n=m,r=(a,l)=>m(t(a),l),o=(a,l)=>t(a)-l):(n=t===m||t===Q?t:vt,r=t,o=t);function e(a,l,i=0,h=a.length){if(i>>1;r(a[s],l)<0?i=s+1:h=s}while(i>>1;r(a[s],l)<=0?i=s+1:h=s}while(ii&&o(a[s-1],l)>-o(a[s],l)?s-1:s}return{left:e,center:u,right:f}}function vt(){return 0}function F(t){return t===null?NaN:+t}function*wt(t,n){if(n===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let o of t)(o=n(o,++r,t))!=null&&(o=+o)>=o&&(yield o)}}const V=D(m),W=V.right,Mt=V.left,At=D(F).center;var X=W;function xt(t,n){if(!((n=+n)>=0))throw new RangeError("invalid r");let r=t.length;if(!((r=Math.floor(r))>=0))throw new RangeError("invalid length");if(!r||!n)return t;const o=G(n),e=t.slice();return o(t,e,0,r,1),o(e,t,0,r,1),o(t,e,0,r,1),t}const bt=Y(G),Et=Y(Nt);function Y(t){return function(n,r,o=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((o=+o)>=0))throw new RangeError("invalid ry");let{data:e,width:f,height:u}=n;if(!((f=Math.floor(f))>=0))throw new RangeError("invalid width");if(!((u=Math.floor(u!==void 0?u:e.length/f))>=0))throw new RangeError("invalid height");if(!f||!u||!r&&!o)return n;const a=r&&t(r),l=o&&t(o),i=e.slice();return a&&l?($(a,i,e,f,u),$(a,e,i,f,u),$(a,i,e,f,u),v(l,e,i,f,u),v(l,i,e,f,u),v(l,e,i,f,u)):a?($(a,e,i,f,u),$(a,i,e,f,u),$(a,e,i,f,u)):l&&(v(l,e,i,f,u),v(l,i,e,f,u),v(l,e,i,f,u)),n}}function $(t,n,r,o,e){for(let f=0,u=o*e;f{e<<=2,f<<=2,u<<=2,n(r,o,e+0,f+0,u),n(r,o,e+1,f+1,u),n(r,o,e+2,f+2,u),n(r,o,e+3,f+3,u)}}function G(t){const n=Math.floor(t);if(n===t)return St(t);const r=t-n,o=2*t+1;return(e,f,u,a,l)=>{if(!((a-=l)>=u))return;let i=n*f[u];const h=l*n,s=h+l;for(let c=u,d=u+h;c{if(!((f-=u)>=e))return;let a=t*o[e];const l=u*t;for(let i=e,h=e+l;i=o&&++r;else{let o=-1;for(let e of t)(e=n(e,++o,t))!=null&&(e=+e)>=e&&++r}return r}function qt(t){return t.length|0}function It(t){return!(t>0)}function Ft(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function Rt(t){return n=>t(...n)}function Tt(...t){const n=typeof t[t.length-1]=="function"&&Rt(t.pop());t=t.map(Ft);const r=t.map(qt),o=t.length-1,e=new Array(o+1).fill(0),f=[];if(o<0||r.some(It))return f;for(;;){f.push(e.map((a,l)=>t[l][a]));let u=o;for(;++e[u]===r[u];){if(u===0)return n?f.map(n):f;e[u--]=0}}}function kt(t,n){var r=0,o=0;return Float64Array.from(t,n===void 0?e=>r+=+e||0:e=>r+=+n(e,o++,t)||0)}function Z(t,n){let r=0,o,e=0,f=0;if(n===void 0)for(let u of t)u!=null&&(u=+u)>=u&&(o=u-e,e+=o/++r,f+=o*(u-e));else{let u=-1;for(let a of t)(a=n(a,++u,t))!=null&&(a=+a)>=a&&(o=a-e,e+=o/++r,f+=o*(a-e))}if(r>1)return f/(r-1)}function tt(t,n){const r=Z(t,n);return r&&Math.sqrt(r)}function T(t,n){let r,o;if(n===void 0)for(const e of t)e!=null&&(r===void 0?e>=e&&(r=o=e):(r>e&&(r=e),o=f&&(r=o=f):(r>f&&(r=f),o0){for(u=n[--r];r>0&&(o=u,e=n[--r],u=o+e,f=e-(u-o),!f););r>0&&(f<0&&n[r-1]<0||f>0&&n[r-1]>0)&&(e=f*2,o=u+e,e==o-u&&(u=o))}return u}};function _t(t,n){const r=new L;if(n===void 0)for(let o of t)(o=+o)&&r.add(o);else{let o=-1;for(let e of t)(e=+n(e,++o,t))&&r.add(e)}return+r}function jt(t,n){const r=new L;let o=-1;return Float64Array.from(t,n===void 0?e=>r.add(+e||0):e=>r.add(+n(e,++o,t)||0))}function w(t){return t}function nt(t,...n){return M(t,w,w,n)}function rt(t,...n){return M(t,Array.from,w,n)}function et(t,n){for(let r=1,o=n.length;re.pop().map(([f,u])=>[...e,f,u]));return t}function Ot(t,...n){return et(rt(t,...n),n)}function Ut(t,n,...r){return et(ft(t,n,...r),r)}function ot(t,n,...r){return M(t,w,n,r)}function ft(t,n,...r){return M(t,Array.from,n,r)}function Dt(t,...n){return M(t,w,ut,n)}function Gt(t,...n){return M(t,Array.from,ut,n)}function ut(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function M(t,n,r,o){return function e(f,u){if(u>=o.length)return r(f);const a=new P,l=o[u++];let i=-1;for(const h of f){const s=l(h,++i,f),c=a.get(s);c?c.push(h):a.set(s,[h])}for(const[h,s]of a)a.set(h,e(s,u));return n(a)}(t,0)}function at(t,n){return Array.from(n,r=>t[r])}function z(t,...n){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[r]=n;if(r&&r.length!==2||n.length>1){const o=Uint32Array.from(t,(e,f)=>f);return n.length>1?(n=n.map(e=>t.map(e)),o.sort((e,f)=>{for(const u of n){const a=A(u[e],u[f]);if(a)return a}})):(r=t.map(r),o.sort((e,f)=>A(r[e],r[f]))),at(t,o)}return t.sort(C(r))}function C(t=m){if(t===m)return A;if(typeof t!="function")throw new TypeError("compare is not a function");return(n,r)=>{const o=t(n,r);return o||o===0?o:(t(r,r)===0)-(t(n,n)===0)}}function A(t,n){return(t==null||!(t>=t))-(n==null||!(n>=n))||(tn?1:0)}function Lt(t,n,r){return(n.length!==2?z(ot(t,n,r),([o,e],[f,u])=>m(e,u)||m(o,f)):z(nt(t,r),([o,e],[f,u])=>n(e,u)||m(o,f))).map(([o])=>o)}var zt=Array.prototype,Ct=zt.slice;function B(t){return()=>t}const Bt=Math.sqrt(50),Ht=Math.sqrt(10),Jt=Math.sqrt(2);function k(t,n,r){const o=(n-t)/Math.max(0,r),e=Math.floor(Math.log10(o)),f=o/Math.pow(10,e),u=f>=Bt?10:f>=Ht?5:f>=Jt?2:1;let a,l,i;return e<0?(i=Math.pow(10,-e)/u,a=Math.round(t*i),l=Math.round(n*i),a/in&&--l,i=-i):(i=Math.pow(10,e)*u,a=Math.round(t/i),l=Math.round(n/i),a*in&&--l),l0))return[];if(t===n)return[t];const o=n=e))return[];const a=f-e+1,l=new Array(a);if(o)if(u<0)for(let i=0;i0?(t=Math.floor(t/e)*e,n=Math.ceil(n/e)*e):e<0&&(t=Math.ceil(t*e)/e,n=Math.floor(n*e)/e),o=e}}function st(t){return Math.max(1,Math.ceil(Math.log(R(t))/Math.LN2)+1)}function ct(){var t=w,n=T,r=st;function o(e){Array.isArray(e)||(e=Array.from(e));var f,u=e.length,a,l,i=new Array(u);for(f=0;f=c)if(q>=c&&n===T){const g=x(s,c,I);isFinite(g)&&(g>0?c=(Math.floor(c/g)+1)*g:g<0&&(c=(Math.ceil(c*-g)+1)/-g))}else d.pop()}for(var p=d.length,b=0,E=p;d[b]<=s;)++b;for(;d[E-1]>c;)--E;(b||E0?d[f-1]:s,U.x1=f0)for(f=0;f=o)&&(r=o);else{let o=-1;for(let e of t)(e=n(e,++o,t))!=null&&(r=e)&&(r=e)}return r}function J(t,n){let r,o=-1,e=-1;if(n===void 0)for(const f of t)++e,f!=null&&(r=f)&&(r=f,o=e);else for(let f of t)(f=n(f,++e,t))!=null&&(r=f)&&(r=f,o=e);return o}function _(t,n){let r;if(n===void 0)for(const o of t)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let e of t)(e=n(e,++o,t))!=null&&(r>e||r===void 0&&e>=e)&&(r=e)}return r}function K(t,n){let r,o=-1,e=-1;if(n===void 0)for(const f of t)++e,f!=null&&(r>f||r===void 0&&f>=f)&&(r=f,o=e);else for(let f of t)(f=n(f,++e,t))!=null&&(r>f||r===void 0&&f>=f)&&(r=f,o=e);return o}function j(t,n,r=0,o=1/0,e){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),o=Math.floor(Math.min(t.length-1,o)),!(r<=n&&n<=o))return t;for(e=e===void 0?A:C(e);o>r;){if(o-r>600){const l=o-r+1,i=n-r+1,h=Math.log(l),s=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*s*(l-s)/l)*(i-l/2<0?-1:1),d=Math.max(r,Math.floor(n-i*s/l+c)),p=Math.min(o,Math.floor(n+(l-i)*s/l+c));j(t,n,d,p,e)}const f=t[n];let u=r,a=o;for(S(t,r,n),e(t[o],f)>0&&S(t,r,o);u0;)--a}e(t[r],f)===0?S(t,r,a):(++a,S(t,a,o)),a<=n&&(r=a+1),n<=a&&(o=a-1)}return t}function S(t,n,r){const o=t[n];t[n]=t[r],t[r]=o}function ht(t,n=m){let r,o=!1;if(n.length===1){let e;for(const f of t){const u=n(f);(o?m(u,e)>0:m(u,u)===0)&&(r=f,e=u,o=!0)}}else for(const e of t)(o?n(e,r)>0:n(e,e)===0)&&(r=e,o=!0);return r}function O(t,n,r){if(t=Float64Array.from(wt(t,r)),!(!(o=t.length)||isNaN(n=+n))){if(n<=0||o<2)return _(t);if(n>=1)return H(t);var o,e=(o-1)*n,f=Math.floor(e),u=H(j(t,f).subarray(0,f+1)),a=_(t.subarray(f+1));return u+(a-u)*(e-f)}}function Pt(t,n,r=F){if(!(!(o=t.length)||isNaN(n=+n))){if(n<=0||o<2)return+r(t[0],0,t);if(n>=1)return+r(t[o-1],o-1,t);var o,e=(o-1)*n,f=Math.floor(e),u=+r(t[f],f,t),a=+r(t[f+1],f+1,t);return u+(a-u)*(e-f)}}function dt(t,n,r=F){if(!isNaN(n=+n)){if(o=Float64Array.from(t,(a,l)=>F(r(t[l],l,t))),n<=0)return K(o);if(n>=1)return J(o);var o,e=Uint32Array.from(t,(a,l)=>l),f=o.length-1,u=Math.floor(f*n);return j(e,u,0,f,(a,l)=>A(o[a],o[l])),u=ht(e.subarray(0,u+1),a=>o[a]),u>=0?u:-1}}function Qt(t,n,r){const o=R(t),e=O(t,.75)-O(t,.25);return o&&e?Math.ceil((r-n)/(2*e*Math.pow(o,-1/3))):1}function Vt(t,n,r){const o=R(t),e=tt(t);return o&&e?Math.ceil((r-n)*Math.cbrt(o)/(3.49*e)):1}function Wt(t,n){let r=0,o=0;if(n===void 0)for(let e of t)e!=null&&(e=+e)>=e&&(++r,o+=e);else{let e=-1;for(let f of t)(f=n(f,++e,t))!=null&&(f=+f)>=f&&(++r,o+=f)}if(r)return o/r}function Xt(t,n){return O(t,.5,n)}function Yt(t,n){return dt(t,.5,n)}function*Zt(t){for(const n of t)yield*n}function tn(t){return Array.from(Zt(t))}function nn(t,n){const r=new P;if(n===void 0)for(let f of t)f!=null&&f>=f&&r.set(f,(r.get(f)||0)+1);else{let f=-1;for(let u of t)(u=n(u,++f,t))!=null&&u>=u&&r.set(u,(r.get(u)||0)+1)}let o,e=0;for(const[f,u]of r)u>e&&(e=u,o=f);return o}function rn(t,n=en){const r=[];let o,e=!1;for(const f of t)e&&r.push(n(o,f)),o=f,e=!0;return r}function en(t,n){return[t,n]}function on(t,n,r){t=+t,n=+n,r=(e=arguments.length)<2?(n=t,t=0,1):e<3?1:+r;for(var o=-1,e=Math.max(0,Math.ceil((n-t)/r))|0,f=new Array(e);++on(r[a],r[l]);let f,u;return t=Uint32Array.from(r,(a,l)=>l),t.sort(n===m?(a,l)=>A(r[a],r[l]):C(e)),t.forEach((a,l)=>{const i=e(a,f===void 0?a:f);i>=0?((f===void 0||i>0)&&(f=a,u=l),o[a]=u):o[a]=NaN}),o}function un(t,n=m){let r,o=!1;if(n.length===1){let e;for(const f of t){const u=n(f);(o?m(u,e)<0:m(u,u)===0)&&(r=f,e=u,o=!0)}}else for(const e of t)(o?n(e,r)<0:n(e,e)===0)&&(r=e,o=!0);return r}function mt(t,n=m){if(n.length===1)return K(t,n);let r,o=-1,e=-1;for(const f of t)++e,(o<0?n(f,f)===0:n(f,r)<0)&&(r=f,o=e);return o}function an(t,n=m){if(n.length===1)return J(t,n);let r,o=-1,e=-1;for(const f of t)++e,(o<0?n(f,f)===0:n(f,r)>0)&&(r=f,o=e);return o}function ln(t,n){const r=mt(t,n);return r<0?void 0:r}var sn=pt(Math.random);function pt(t){return function(n,r=0,o=n.length){let e=o-(r=+r);for(;e;){const f=t()*e--|0,u=n[e+r];n[e+r]=n[f+r],n[f+r]=u}return n}}function cn(t,n){let r=0;if(n===void 0)for(let o of t)(o=+o)&&(r+=o);else{let o=-1;for(let e of t)(e=+n(e,++o,t))&&(r+=e)}return r}function gt(t){if(!(f=t.length))return[];for(var n=-1,r=_(t,hn),o=new Array(r);++nn(r,o,t))}function $n(t,n,r){if(typeof n!="function")throw new TypeError("reducer is not a function");const o=t[Symbol.iterator]();let e,f,u=-1;if(arguments.length<3){if({done:e,value:r}=o.next(),e)return;++u}for(;{done:e,value:f}=o.next(),!e;)r=n(r,f,++u,t);return r}function vn(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function wn(t,...n){t=new y(t);for(const r of n)for(const o of r)t.delete(o);return t}function Mn(t,n){const r=n[Symbol.iterator](),o=new y;for(const e of t){if(o.has(e))return!1;let f,u;for(;({value:f,done:u}=r.next())&&!u;){if(Object.is(e,f))return!1;o.add(f)}}return!0}function An(t,...n){t=new y(t),n=n.map(xn);t:for(const r of t)for(const o of n)if(!o.has(r)){t.delete(r);continue t}return t}function xn(t){return t instanceof y?t:new y(t)}function yt(t,n){const r=t[Symbol.iterator](),o=new Set;for(const e of n){const f=$t(e);if(o.has(f))continue;let u,a;for(;{value:u,done:a}=r.next();){if(a)return!1;const l=$t(u);if(o.add(l),Object.is(f,l))break}}return!0}function $t(t){return t!==null&&typeof t=="object"?t.valueOf():t}function bn(t,n){return yt(n,t)}function En(...t){const n=new y;for(const r of t)for(const o of r)n.add(o);return n}export{L as Adder,Fn as InternMap,Rn as InternSet,m as ascending,ct as bin,X as bisect,At as bisectCenter,Mt as bisectLeft,W as bisectRight,D as bisector,xt as blur,bt as blur2,Et as blurImage,R as count,Tt as cross,kt as cumsum,Q as descending,tt as deviation,wn as difference,Mn as disjoint,mn as every,T as extent,jt as fcumsum,gn as filter,Ot as flatGroup,Ut as flatRollup,_t as fsum,ht as greatest,an as greatestIndex,nt as group,Lt as groupSort,rt as groups,ct as histogram,Dt as index,Gt as indexes,An as intersection,un as least,mt as leastIndex,yn as map,H as max,J as maxIndex,Wt as mean,Xt as median,Yt as medianIndex,tn as merge,_ as min,K as minIndex,nn as mode,lt as nice,rn as pairs,at as permute,O as quantile,dt as quantileIndex,Pt as quantileSorted,j as quickselect,on as range,fn as rank,$n as reduce,vn as reverse,ot as rollup,ft as rollups,ln as scan,sn as shuffle,pt as shuffler,pn as some,z as sort,bn as subset,cn as sum,yt as superset,Qt as thresholdFreedmanDiaconis,Vt as thresholdScott,st as thresholdSturges,x as tickIncrement,Kt as tickStep,it as ticks,gt as transpose,En as union,Z as variance,dn as zip}; diff --git a/docs/_node/d3-axis@3.0.0/index.34ded868.js b/docs/_node/d3-axis@3.0.0/index.34ded868.js new file mode 100644 index 0000000..b0073e9 --- /dev/null +++ b/docs/_node/d3-axis@3.0.0/index.34ded868.js @@ -0,0 +1 @@ +function N(t){return t}var w=1,_=2,S=3,h=4,B=1e-6;function O(t){return"translate("+t+",0)"}function R(t){return"translate(0,"+t+")"}function T(t){return r=>+t(r)}function j(t,r){return r=Math.max(0,t.bandwidth()-r*2)/2,t.round()&&(r=Math.round(r)),s=>+t(s)+r}function q(){return!this.__axis}function F(t,r){var s=[],p=null,V=null,l=6,a=6,z=3,i=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===w||t===h?-1:1,k=t===h||t===_?"x":"y",H=t===w||t===S?O:R;function e(n){var I=p??(r.ticks?r.ticks.apply(r,s):r.domain()),L=V??(r.tickFormat?r.tickFormat.apply(r,s):N),P=Math.max(l,0)+z,b=r.range(),x=+b[0]+i,y=+b[b.length-1]+i,A=(r.bandwidth?j:T)(r.copy(),i),m=n.selection?n.selection():n,f=m.selectAll(".domain").data([null]),o=m.selectAll(".tick").data(I,r).order(),C=o.exit(),M=o.enter().append("g").attr("class","tick"),g=o.select("line"),d=o.select("text");f=f.merge(f.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),o=o.merge(M),g=g.merge(M.append("line").attr("stroke","currentColor").attr(k+"2",u*l)),d=d.merge(M.append("text").attr("fill","currentColor").attr(k,u*P).attr("dy",t===w?"0em":t===S?"0.71em":"0.32em")),n!==m&&(f=f.transition(n),o=o.transition(n),g=g.transition(n),d=d.transition(n),C=C.transition(n).attr("opacity",B).attr("transform",function(c){return isFinite(c=A(c))?H(c+i):this.getAttribute("transform")}),M.attr("opacity",B).attr("transform",function(c){var v=this.parentNode.__axis;return H((v&&isFinite(v=v(c))?v:A(c))+i)})),C.remove(),f.attr("d",t===h||t===_?a?"M"+u*a+","+x+"H"+i+"V"+y+"H"+u*a:"M"+i+","+x+"V"+y:a?"M"+x+","+u*a+"V"+i+"H"+y+"V"+u*a:"M"+x+","+i+"H"+y),o.attr("opacity",1).attr("transform",function(c){return H(A(c)+i)}),g.attr(k+"2",u*l),d.attr(k,u*P).text(L),m.filter(q).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===_?"start":t===h?"end":"middle"),m.each(function(){this.__axis=A})}return e.scale=function(n){return arguments.length?(r=n,e):r},e.ticks=function(){return s=Array.from(arguments),e},e.tickArguments=function(n){return arguments.length?(s=n==null?[]:Array.from(n),e):s.slice()},e.tickValues=function(n){return arguments.length?(p=n==null?null:Array.from(n),e):p&&p.slice()},e.tickFormat=function(n){return arguments.length?(V=n,e):V},e.tickSize=function(n){return arguments.length?(l=a=+n,e):l},e.tickSizeInner=function(n){return arguments.length?(l=+n,e):l},e.tickSizeOuter=function(n){return arguments.length?(a=+n,e):a},e.tickPadding=function(n){return arguments.length?(z=+n,e):z},e.offset=function(n){return arguments.length?(i=+n,e):i},e}function D(t){return F(w,t)}function E(t){return F(_,t)}function G(t){return F(S,t)}function X(t){return F(h,t)}export{G as axisBottom,X as axisLeft,E as axisRight,D as axisTop}; diff --git a/docs/_node/d3-brush@3.0.0/index.1c3fc471.js b/docs/_node/d3-brush@3.0.0/index.1c3fc471.js new file mode 100644 index 0000000..73e3186 --- /dev/null +++ b/docs/_node/d3-brush@3.0.0/index.1c3fc471.js @@ -0,0 +1 @@ +import{dispatch as At}from"../d3-dispatch@3.0.1/index.be49ca5f.js";import{dragDisable as Et,dragEnable as Kt}from"../d3-drag@3.0.0/index.8e5f73cc.js";import{interpolate as Tt}from"../d3-interpolate@3.0.1/index.7ed7c7fe.js";import{select as H,pointer as pt}from"../d3-selection@3.0.0/index.13204b25.js";import{interrupt as mt}from"../d3-transition@3.0.1/index.d140d658.js";var et=t=>()=>t;function Vt(t,{sourceEvent:k,target:q,selection:G,mode:P,dispatch:j}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:k,enumerable:!0,configurable:!0},target:{value:q,enumerable:!0,configurable:!0},selection:{value:G,enumerable:!0,configurable:!0},mode:{value:P,enumerable:!0,configurable:!0},_:{value:j}})}function Pt(t){t.stopImmediatePropagation()}function nt(t){t.preventDefault(),t.stopImmediatePropagation()}var dt={name:"drag"},rt={name:"space"},N={name:"handle"},O={name:"center"};const{abs:bt,max:_,min:x}=Math;function vt(t){return[+t[0],+t[1]]}function st(t){return[vt(t[0]),vt(t[1])]}var W={name:"x",handles:["w","e"].map(Q),input:function(t,k){return t==null?null:[[+t[0],k[0][1]],[+t[1],k[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},$={name:"y",handles:["n","s"].map(Q),input:function(t,k){return t==null?null:[[k[0][0],+t[0]],[k[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},St={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Q),input:function(t){return t==null?null:st(t)},output:function(t){return t}},V={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},yt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},gt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Ct={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},It={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Q(t){return{type:t}}function Xt(t){return!t.ctrlKey&&!t.button}function jt(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Bt(){return navigator.maxTouchPoints||"ontouchstart"in this}function ut(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Dt(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Mt(t){var k=t.__brush;return k?k.dim.output(k.selection):null}function Nt(){return at(W)}function Ot(){return at($)}function qt(){return at(St)}function at(t){var k=jt,q=Xt,G=Bt,P=!0,j=At("start","brush","end"),K=6,J;function p(e){var n=e.property("__brush",xt).selectAll(".overlay").data([Q("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",V.overlay).merge(n).each(function(){var r=ut(this).extent;H(this).attr("x",r[0][0]).attr("y",r[0][1]).attr("width",r[1][0]-r[0][0]).attr("height",r[1][1]-r[0][1])}),e.selectAll(".selection").data([Q("selection")]).enter().append("rect").attr("class","selection").attr("cursor",V.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var u=e.selectAll(".handle").data(t.handles,function(r){return r.type});u.exit().remove(),u.enter().append("rect").attr("class",function(r){return"handle handle--"+r.type}).attr("cursor",function(r){return V[r.type]}),e.each(M).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",it).filter(G).on("touchstart.brush",it).on("touchmove.brush",wt).on("touchend.brush touchcancel.brush",_t).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.move=function(e,n,u){e.tween?e.on("start.brush",function(r){B(this,arguments).beforestart().start(r)}).on("interrupt.brush end.brush",function(r){B(this,arguments).end(r)}).tween("brush",function(){var r=this,a=r.__brush,o=B(r,arguments),z=a.selection,T=t.input(typeof n=="function"?n.apply(this,arguments):n,a.extent),l=Tt(z,T);function E(i){a.selection=i===1&&T===null?null:l(i),M.call(r),o.brush()}return z!==null&&T!==null?E:E(1)}):e.each(function(){var r=this,a=arguments,o=r.__brush,z=t.input(typeof n=="function"?n.apply(r,a):n,o.extent),T=B(r,a).beforestart();mt(r),o.selection=z===null?null:z,M.call(r),T.start(u).brush(u).end(u)})},p.clear=function(e,n){p.move(e,null,n)};function M(){var e=H(this),n=ut(this).selection;n?(e.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),e.selectAll(".handle").style("display",null).attr("x",function(u){return u.type[u.type.length-1]==="e"?n[1][0]-K/2:n[0][0]-K/2}).attr("y",function(u){return u.type[0]==="s"?n[1][1]-K/2:n[0][1]-K/2}).attr("width",function(u){return u.type==="n"||u.type==="s"?n[1][0]-n[0][0]+K:K}).attr("height",function(u){return u.type==="e"||u.type==="w"?n[1][1]-n[0][1]+K:K})):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function B(e,n,u){var r=e.__brush.emitter;return r&&(!u||!r.clean)?r:new ot(e,n,u)}function ot(e,n,u){this.that=e,this.args=n,this.state=e.__brush,this.active=0,this.clean=u}ot.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(e,n){return this.starting?(this.starting=!1,this.emit("start",e,n)):this.emit("brush",e),this},brush:function(e,n){return this.emit("brush",e,n),this},end:function(e,n){return--this.active===0&&(delete this.state.emitter,this.emit("end",e,n)),this},emit:function(e,n,u){var r=H(this.that).datum();j.call(e,this.that,new Vt(e,{sourceEvent:n,target:p,selection:t.output(this.state.selection),mode:u,dispatch:j}),r)}};function it(e){if(J&&!e.touches||!q.apply(this,arguments))return;var n=this,u=e.target.__data__.type,r=(P&&e.metaKey?u="overlay":u)==="selection"?dt:P&&e.altKey?O:N,a=t===$?null:Ct[u],o=t===W?null:It[u],z=ut(n),T=z.extent,l=z.selection,E=T[0][0],i,m,S=T[0][1],d,b,C=T[1][0],v,y,I=T[1][1],g,w,c=0,h=0,tt,R=a&&o&&P&&e.shiftKey,U,Z,A=Array.from(e.touches||[e],s=>{const f=s.identifier;return s=pt(s,n),s.point0=s.slice(),s.identifier=f,s});mt(n);var L=B(n,arguments,!0).beforestart();if(u==="overlay"){l&&(tt=!0);const s=[A[0],A[1]||A[0]];z.selection=l=[[i=t===$?E:x(s[0][0],s[1][0]),d=t===W?S:x(s[0][1],s[1][1])],[v=t===$?C:_(s[0][0],s[1][0]),g=t===W?I:_(s[0][1],s[1][1])]],A.length>1&&D(e)}else i=l[0][0],d=l[0][1],v=l[1][0],g=l[1][1];m=i,b=d,y=v,w=g;var lt=H(n).attr("pointer-events","none"),Y=lt.selectAll(".overlay").attr("cursor",V[u]);if(e.touches)L.moved=ht,L.ended=ft;else{var ct=H(e.view).on("mousemove.brush",ht,!0).on("mouseup.brush",ft,!0);P&&ct.on("keydown.brush",kt,!0).on("keyup.brush",zt,!0),Et(e.view)}M.call(n),L.start(e,r.name);function ht(s){for(const f of s.changedTouches||[s])for(const F of A)F.identifier===f.identifier&&(F.cur=pt(f,n));if(R&&!U&&!Z&&A.length===1){const f=A[0];bt(f.cur[0]-f[0])>bt(f.cur[1]-f[1])?Z=!0:U=!0}for(const f of A)f.cur&&(f[0]=f.cur[0],f[1]=f.cur[1]);tt=!0,nt(s),D(s)}function D(s){const f=A[0],F=f.point0;var X;switch(c=f[0]-F[0],h=f[1]-F[1],r){case rt:case dt:{a&&(c=_(E-i,x(C-v,c)),m=i+c,y=v+c),o&&(h=_(S-d,x(I-g,h)),b=d+h,w=g+h);break}case N:{A[1]?(a&&(m=_(E,x(C,A[0][0])),y=_(E,x(C,A[1][0])),a=1),o&&(b=_(S,x(I,A[0][1])),w=_(S,x(I,A[1][1])),o=1)):(a<0?(c=_(E-i,x(C-i,c)),m=i+c,y=v):a>0&&(c=_(E-v,x(C-v,c)),m=i,y=v+c),o<0?(h=_(S-d,x(I-d,h)),b=d+h,w=g):o>0&&(h=_(S-g,x(I-g,h)),b=d,w=g+h));break}case O:{a&&(m=_(E,x(C,i-c*a)),y=_(E,x(C,v+c*a))),o&&(b=_(S,x(I,d-h*o)),w=_(S,x(I,g+h*o)));break}}y0&&(i=m-c),o<0?g=w-h:o>0&&(d=b-h),r=rt,Y.attr("cursor",V.selection),D(s));break}default:return}nt(s)}function zt(s){switch(s.keyCode){case 16:{R&&(U=Z=R=!1,D(s));break}case 18:{r===O&&(a<0?v=y:a>0&&(i=m),o<0?g=w:o>0&&(d=b),r=N,D(s));break}case 32:{r===rt&&(s.altKey?(a&&(v=y-c*a,i=m+c*a),o&&(g=w-h*o,d=b+h*o),r=O):(a<0?v=y:a>0&&(i=m),o<0?g=w:o>0&&(d=b),r=N),Y.attr("cursor",V[u]),D(s));break}default:return}nt(s)}}function wt(e){B(this,arguments).moved(e)}function _t(e){B(this,arguments).ended(e)}function xt(){var e=this.__brush||{selection:null};return e.extent=st(k.apply(this,arguments)),e.dim=t,e}return p.extent=function(e){return arguments.length?(k=typeof e=="function"?e:et(st(e)),p):k},p.filter=function(e){return arguments.length?(q=typeof e=="function"?e:et(!!e),p):q},p.touchable=function(e){return arguments.length?(G=typeof e=="function"?e:et(!!e),p):G},p.handleSize=function(e){return arguments.length?(K=+e,p):K},p.keyModifiers=function(e){return arguments.length?(P=!!e,p):P},p.on=function(){var e=j.on.apply(j,arguments);return e===j?p:e},p}export{qt as brush,Mt as brushSelection,Nt as brushX,Ot as brushY}; diff --git a/docs/_node/d3-chord@3.0.1/index.9b04aad8.js b/docs/_node/d3-chord@3.0.1/index.9b04aad8.js new file mode 100644 index 0000000..331ef74 --- /dev/null +++ b/docs/_node/d3-chord@3.0.1/index.9b04aad8.js @@ -0,0 +1 @@ +import{path as H}from"../d3-path@3.1.0/index.c2b3c473.js";var I=Math.abs,T=Math.cos,w=Math.sin,O=Math.PI,q=O/2,R=O*2,S=Math.max,j=1e-12;function D(s,y){return Array.from({length:y-s},(h,p)=>s+p)}function J(s){return function(y,h){return s(y.source.value+y.target.value,h.source.value+h.target.value)}}function P(){return F(!1,!1)}function Q(){return F(!1,!0)}function k(){return F(!0,!1)}function F(s,y){var h=0,p=null,A=null,m=null;function f(u){var t=u.length,a=new Array(t),r=D(0,t),g=new Array(t*t),M=new Array(t),i=0,v;u=Float64Array.from({length:t*t},y?(l,n)=>u[n%t][n/t|0]:(l,n)=>u[n/t|0][n%t]);for(let l=0;lp(a[n],a[c]));for(const n of r){const c=l;if(s){const d=D(~t+1,t).filter(e=>e<0?u[~e*t+n]:u[n*t+e]);A&&d.sort((e,o)=>A(e<0?-u[~e*t+n]:u[n*t+e],o<0?-u[~o*t+n]:u[n*t+o]));for(const e of d)if(e<0){const o=g[~e*t+n]||(g[~e*t+n]={source:null,target:null});o.target={index:n,startAngle:l,endAngle:l+=u[~e*t+n]*i,value:u[~e*t+n]}}else{const o=g[n*t+e]||(g[n*t+e]={source:null,target:null});o.source={index:n,startAngle:l,endAngle:l+=u[n*t+e]*i,value:u[n*t+e]}}M[n]={index:n,startAngle:c,endAngle:l,value:a[n]}}else{const d=D(0,t).filter(e=>u[n*t+e]||u[e*t+n]);A&&d.sort((e,o)=>A(u[n*t+e],u[n*t+o]));for(const e of d){let o;if(nj&&(I(c-n)>i*2+j?c>n?(n+=i,c-=i):(n-=i,c+=i):n=c=(n+c)/2,I(o-e)>i*2+j?o>e?(e+=i,o-=i):(e-=i,o+=i):e=o=(e+o)/2),t.moveTo(l*T(n),l*w(n)),t.arc(0,0,l,n,c),n!==e||c!==o)if(s){var C=+s.apply(this,arguments),b=d-C,G=(e+o)/2;t.quadraticCurveTo(0,0,b*T(e),b*w(e)),t.lineTo(d*T(G),d*w(G)),t.lineTo(b*T(o),b*w(o))}else t.quadraticCurveTo(0,0,d*T(e),d*w(e)),t.arc(0,0,d,e,o);if(t.quadraticCurveTo(0,0,l*T(n),l*w(n)),t.closePath(),r)return t=null,r+""||null}return s&&(a.headRadius=function(r){return arguments.length?(s=typeof r=="function"?r:x(+r),a):s}),a.radius=function(r){return arguments.length?(p=A=typeof r=="function"?r:x(+r),a):p},a.sourceRadius=function(r){return arguments.length?(p=typeof r=="function"?r:x(+r),a):p},a.targetRadius=function(r){return arguments.length?(A=typeof r=="function"?r:x(+r),a):A},a.startAngle=function(r){return arguments.length?(m=typeof r=="function"?r:x(+r),a):m},a.endAngle=function(r){return arguments.length?(f=typeof r=="function"?r:x(+r),a):f},a.padAngle=function(r){return arguments.length?(u=typeof r=="function"?r:x(+r),a):u},a.source=function(r){return arguments.length?(y=r,a):y},a.target=function(r){return arguments.length?(h=r,a):h},a.context=function(r){return arguments.length?(t=r??null,a):t},a}function W(){return E()}function X(){return E(V)}export{P as chord,k as chordDirected,Q as chordTranspose,W as ribbon,X as ribbonArrow}; diff --git a/docs/_node/d3-color@3.1.0/index.e8c126ff.js b/docs/_node/d3-color@3.1.0/index.e8c126ff.js new file mode 100644 index 0000000..dc55ce5 --- /dev/null +++ b/docs/_node/d3-color@3.1.0/index.e8c126ff.js @@ -0,0 +1 @@ +function m(t,i,r){t.prototype=i.prototype=r,r.constructor=t}function x(t,i){var r=Object.create(t.prototype);for(var n in i)r[n]=i[n];return r}function b(){}var d=.7,$=1/d,N="\\s*([+-]?\\d+)\\s*",M="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bt=/^#([0-9a-f]{3,8})$/,dt=new RegExp(`^rgb\\(${N},${N},${N}\\)$`),ft=new RegExp(`^rgb\\(${c},${c},${c}\\)$`),wt=new RegExp(`^rgba\\(${N},${N},${N},${M}\\)$`),yt=new RegExp(`^rgba\\(${c},${c},${c},${M}\\)$`),mt=new RegExp(`^hsl\\(${M},${c},${c}\\)$`),$t=new RegExp(`^hsla\\(${M},${c},${c},${M}\\)$`),L={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};m(b,q,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:F,formatHex:F,formatHex8:Nt,formatHsl:kt,formatRgb:G,toString:G});function F(){return this.rgb().formatHex()}function Nt(){return this.rgb().formatHex8()}function kt(){return Y(this).formatHsl()}function G(){return this.rgb().formatRgb()}function q(t){var i,r;return t=(t+"").trim().toLowerCase(),(i=bt.exec(t))?(r=i[1].length,i=parseInt(i[1],16),r===6?J(i):r===3?new a(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?H(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?H(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=dt.exec(t))?new a(i[1],i[2],i[3],1):(i=ft.exec(t))?new a(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=wt.exec(t))?H(i[1],i[2],i[3],i[4]):(i=yt.exec(t))?H(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=mt.exec(t))?X(i[1],i[2]/100,i[3]/100,1):(i=$t.exec(t))?X(i[1],i[2]/100,i[3]/100,i[4]):L.hasOwnProperty(t)?J(L[t]):t==="transparent"?new a(NaN,NaN,NaN,0):null}function J(t){return new a(t>>16&255,t>>8&255,t&255,1)}function H(t,i,r,n){return n<=0&&(t=i=r=NaN),new a(t,i,r,n)}function I(t){return t instanceof b||(t=q(t)),t?(t=t.rgb(),new a(t.r,t.g,t.b,t.opacity)):new a}function K(t,i,r,n){return arguments.length===1?I(t):new a(t,i,r,n??1)}function a(t,i,r,n){this.r=+t,this.g=+i,this.b=+r,this.opacity=+n}m(a,K,x(b,{brighter(t){return t=t==null?$:Math.pow($,t),new a(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?d:Math.pow(d,t),new a(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new a(f(this.r),f(this.g),f(this.b),R(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Q,formatHex:Q,formatHex8:xt,formatRgb:T,toString:T}));function Q(){return`#${w(this.r)}${w(this.g)}${w(this.b)}`}function xt(){return`#${w(this.r)}${w(this.g)}${w(this.b)}${w((isNaN(this.opacity)?1:this.opacity)*255)}`}function T(){const t=R(this.opacity);return`${t===1?"rgb(":"rgba("}${f(this.r)}, ${f(this.g)}, ${f(this.b)}${t===1?")":`, ${t})`}`}function R(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function f(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function w(t){return t=f(t),(t<16?"0":"")+t.toString(16)}function X(t,i,r,n){return n<=0?t=i=r=NaN:r<=0||r>=1?t=i=NaN:i<=0&&(t=NaN),new o(t,i,r,n)}function Y(t){if(t instanceof o)return new o(t.h,t.s,t.l,t.opacity);if(t instanceof b||(t=q(t)),!t)return new o;if(t instanceof o)return t;t=t.rgb();var i=t.r/255,r=t.g/255,n=t.b/255,e=Math.min(i,r,n),s=Math.max(i,r,n),h=NaN,u=s-e,p=(s+e)/2;return u?(i===s?h=(r-n)/u+(r0&&p<1?0:h,new o(h,u,p,t.opacity)}function _(t,i,r,n){return arguments.length===1?Y(t):new o(t,i,r,n??1)}function o(t,i,r,n){this.h=+t,this.s=+i,this.l=+r,this.opacity=+n}m(o,_,x(b,{brighter(t){return t=t==null?$:Math.pow($,t),new o(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?d:Math.pow(d,t),new o(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*i,e=2*r-n;return new a(O(t>=240?t-240:t+120,e,n),O(t,e,n),O(t<120?t+240:t-120,e,n),this.opacity)},clamp(){return new o(U(this.h),E(this.s),E(this.l),R(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=R(this.opacity);return`${t===1?"hsl(":"hsla("}${U(this.h)}, ${E(this.s)*100}%, ${E(this.l)*100}%${t===1?")":`, ${t})`}`}}));function U(t){return t=(t||0)%360,t<0?t+360:t}function E(t){return Math.max(0,Math.min(1,t||0))}function O(t,i,r){return(t<60?i+(r-i)*t/60:t<180?r:t<240?i+(r-i)*(240-t)/60:i)*255}const V=Math.PI/180,W=180/Math.PI,j=18,Z=.96422,tt=1,it=.82521,rt=4/29,k=6/29,nt=3*k*k,Mt=k*k*k;function et(t){if(t instanceof l)return new l(t.l,t.a,t.b,t.opacity);if(t instanceof g)return ot(t);t instanceof a||(t=I(t));var i=A(t.r),r=A(t.g),n=A(t.b),e=P((.2225045*i+.7168786*r+.0606169*n)/tt),s,h;return i===r&&r===n?s=h=e:(s=P((.4360747*i+.3850649*r+.1430804*n)/Z),h=P((.0139322*i+.0971045*r+.7141733*n)/it)),new l(116*e-16,500*(s-e),200*(e-h),t.opacity)}function vt(t,i){return new l(t,0,0,i??1)}function at(t,i,r,n){return arguments.length===1?et(t):new l(t,i,r,n??1)}function l(t,i,r,n){this.l=+t,this.a=+i,this.b=+r,this.opacity=+n}m(l,at,x(b,{brighter(t){return new l(this.l+j*(t??1),this.a,this.b,this.opacity)},darker(t){return new l(this.l-j*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,i=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return i=Z*S(i),t=tt*S(t),r=it*S(r),new a(z(3.1338561*i-1.6168667*t-.4906146*r),z(-.9787684*i+1.9161415*t+.033454*r),z(.0719453*i-.2289914*t+1.4052427*r),this.opacity)}}));function P(t){return t>Mt?Math.pow(t,1/3):t/nt+rt}function S(t){return t>k?t*t*t:nt*(t-rt)}function z(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function A(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function st(t){if(t instanceof g)return new g(t.h,t.c,t.l,t.opacity);if(t instanceof l||(t=et(t)),t.a===0&&t.b===0)return new g(NaN,0()=>n;function K(n,e){for(var f=-1,g=e.length,h;++fg!=s>g&&f<(i-r)*(g-o)/(s-o)+r&&(h=-h)}return h}function R(n,e,f){var g;return T(n,e,f)&&W(n[g=+(n[0]===e[0])],f[g],e[g])}function T(n,e,f){return(e[0]-n[0])*(f[1]-n[1])===(f[0]-n[0])*(e[1]-n[1])}function W(n,e,f){return n<=e&&e<=f||f<=e&&e<=n}function X(){}var S=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function k(){var n=1,e=1,f=V,g=p;function h(r){var o=f(r);if(Array.isArray(o))o=o.slice().sort(H);else{const c=B(r,Z);for(o=C(...Y(c[0],c[1],o),o);o[o.length-1]>=c[1];)o.pop();for(;o[1]E(r,c))}function E(r,o){const c=o==null?NaN:+o;if(isNaN(c))throw new Error(`invalid value: ${o}`);var i=[],s=[];return y(r,c,function(a){g(a,r,c),J(a)>0?i.push([a]):s.push(a)}),s.forEach(function(a){for(var v=0,x=i.length,d;v=o,S[t<<2].forEach(l);++a0&&s0&&a=0&&c>=0))throw new Error("invalid size");return n=o,e=c,h},h.thresholds=function(r){return arguments.length?(f=typeof r=="function"?r:Array.isArray(r)?L(O.call(r)):L(r),h):f},h.smooth=function(r){return arguments.length?(g=r?p:X,h):g===p},h}function Z(n){return isFinite(n)?n:NaN}function P(n,e){return n==null?!1:+n>=e}function q(n){return n==null||isNaN(n=+n)?-1/0:n}function U(n,e,f,g){const h=g-e,E=f-e,y=isFinite(h)||isFinite(E)?h/E:Math.sign(h)/Math.sign(E);return isNaN(y)?n:n+y-.5}function I(n){return n[0]}function nn(n){return n[1]}function tn(){return 1}function rn(){var n=I,e=nn,f=tn,g=960,h=500,E=20,y=2,N=E*3,p=g+N*2>>y,r=h+N*2>>y,o=L(20);function c(t){var w=new Float32Array(p*r),l=Math.pow(2,-y),b=-1;for(const j of t){var A=(n(j,++b,t)+N)*l,m=(e(j,b,t)+N)*l,z=+f(j,b,t);if(z&&A>=0&&A=0&&mA*b))(w).map((A,m)=>(A.value=+l[m],s(A)))}i.contours=function(t){var w=c(t),l=k().size([p,r]),b=Math.pow(2,2*y),A=m=>{m=+m;var z=s(l.contour(w,m*b));return z.value=m,z};return Object.defineProperty(A,"max",{get:()=>D(w)/b}),A};function s(t){return t.coordinates.forEach(a),t}function a(t){t.forEach(v)}function v(t){t.forEach(x)}function x(t){t[0]=t[0]*Math.pow(2,y)-N,t[1]=t[1]*Math.pow(2,y)-N}function d(){return N=E*3,p=g+N*2>>y,r=h+N*2>>y,i}return i.x=function(t){return arguments.length?(n=typeof t=="function"?t:L(+t),i):n},i.y=function(t){return arguments.length?(e=typeof t=="function"?t:L(+t),i):e},i.weight=function(t){return arguments.length?(f=typeof t=="function"?t:L(+t),i):f},i.size=function(t){if(!arguments.length)return[g,h];var w=+t[0],l=+t[1];if(!(w>=0&&l>=0))throw new Error("invalid size");return g=w,h=l,d()},i.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return y=Math.floor(Math.log(t)/Math.LN2),d()},i.thresholds=function(t){return arguments.length?(o=typeof t=="function"?t:Array.isArray(t)?L(O.call(t)):L(t),i):o},i.bandwidth=function(t){if(!arguments.length)return Math.sqrt(E*(E+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return E=(Math.sqrt(4*t*t+1)-1)/2,d()},i}export{rn as contourDensity,k as contours}; diff --git a/docs/_node/d3-delaunay@6.0.4/index.1771ba9f.js b/docs/_node/d3-delaunay@6.0.4/index.1771ba9f.js new file mode 100644 index 0000000..405bd4c --- /dev/null +++ b/docs/_node/d3-delaunay@6.0.4/index.1771ba9f.js @@ -0,0 +1 @@ +import Z from"../delaunator@5.0.1/index.70ae1478.js";class p{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,i){t=+t,e=+e,i=+i;const n=t+i,s=e;if(i<0)throw new Error("negative radius");this._x1===null?this._+=`M${n},${s}`:(Math.abs(this._x1-n)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+n+","+s),i&&(this._+=`A${i},${i},0,1,1,${t-i},${e}A${i},${i},0,1,1,${this._x1=n},${this._y1=s}`)}rect(t,e,i,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+i}v${+n}h${-i}Z`}value(){return this._||null}}class S{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class q{constructor(t,[e,i,n,s]=[0,0,960,500]){if(!((n=+n)>=(e=+e))||!((s=+s)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=n,this.xmin=e,this.ymax=s,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:i},vectors:n}=this;let s,l;const r=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let f=0,_=0,y=i.length,x,k;f1;)s-=2;for(let l=2;l0){if(e>=this.ymax)return null;(l=(this.ymax-e)/n)0){if(t>=this.xmax)return null;(l=(this.xmax-t)/i)this.xmax?2:0)|(ethis.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e1e-10)return!1}return!0}function N(m,t,e){return[m+Math.sin(m+t)*e,t+Math.cos(m-t)*e]}class j{static from(t,e=O,i=J,n){return new j("length"in t?Q(t,e,i,n):Float64Array.from(R(t,e,i,n)))}constructor(t){this._delaunator=new Z(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&K(t)){this.collinear=Int32Array.from({length:e.length/2},(c,g)=>g).sort((c,g)=>e[2*c]-e[2*g]||e[2*c+1]-e[2*g+1]);const h=this.collinear[0],o=this.collinear[this.collinear.length-1],a=[e[2*h],e[2*h+1],e[2*o],e[2*o+1]],u=1e-8*Math.hypot(a[3]-a[1],a[2]-a[0]);for(let c=0,g=e.length/2;c0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=n[0],l[n[0]]=1,n.length===2&&(l[n[1]]=0,this.triangles[1]=n[1],this.triangles[2]=n[1]))}voronoi(t){return new q(this,t)}*neighbors(t){const{inedges:e,hull:i,_hullIndex:n,halfedges:s,triangles:l,collinear:r}=this;if(r){const u=r.indexOf(t);u>0&&(yield r[u-1]),u=0&&s!==i&&s!==n;)i=s;return s}_step(t,e,i){const{inedges:n,hull:s,_hullIndex:l,halfedges:r,triangles:h,points:o}=this;if(n[t]===-1||!o.length)return(t+1)%(o.length>>1);let a=t,u=T(e-o[t*2],2)+T(i-o[t*2+1],2);const c=n[t];let g=c;do{let d=h[g];const f=T(e-o[d*2],2)+T(i-o[d*2+1],2);if(f{}};function u(){for(var r=0,i=arguments.length,t={},n;r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}o.prototype=u.prototype={constructor:o,on:function(r,i){var t=this._,n=h(r+"",t),e,a=-1,l=n.length;if(arguments.length<2){for(;++a0)for(var t=new Array(e),n=0,e,a;n()=>n;function P(n,{sourceEvent:o,subject:i,target:s,identifier:f,active:m,x:h,y:x,dx:w,dy:v,dispatch:g}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:f,enumerable:!0,configurable:!0},active:{value:m,enumerable:!0,configurable:!0},x:{value:h,enumerable:!0,configurable:!0},y:{value:x,enumerable:!0,configurable:!0},dx:{value:w,enumerable:!0,configurable:!0},dy:{value:v,enumerable:!0,configurable:!0},_:{value:g}})}P.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function J(n){return!n.ctrlKey&&!n.button}function L(){return this.parentNode}function Q(n,o){return o??{x:n.x,y:n.y}}function R(){return navigator.maxTouchPoints||"ontouchstart"in this}function C(){var n=J,o=L,i=Q,s=R,f={},m=W("start","drag","end"),h=0,x,w,v,g,j=0;function u(e){e.on("mousedown.drag",B).filter(s).on("touchstart.drag",H).on("touchmove.drag",K,Z).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function B(e,t){if(!(g||!n.call(this,e,t))){var r=S(this,o.call(this,e,t),e,t,"mouse");r&&(E(e.view).on("mousemove.drag",F,y).on("mouseup.drag",G,y),q(e.view),M(e),v=!1,x=e.clientX,w=e.clientY,r("start",e))}}function F(e){if(p(e),!v){var t=e.clientX-x,r=e.clientY-w;v=t*t+r*r>j}f.mouse("drag",e)}function G(e){E(e.view).on("mousemove.drag mouseup.drag",null),A(e.view,v),p(e),f.mouse("end",e)}function H(e,t){if(n.call(this,e,t)){var r=e.changedTouches,a=o.call(this,e,t),c=r.length,d,b;for(d=0;d9999?"+"+i(r,6):i(r,4)}function O(r){var a=r.getUTCHours(),e=r.getUTCMinutes(),n=r.getUTCSeconds(),s=r.getUTCMilliseconds();return isNaN(r)?"Invalid Date":H(r.getUTCFullYear())+"-"+i(r.getUTCMonth()+1,2)+"-"+i(r.getUTCDate(),2)+(s?"T"+i(a,2)+":"+i(e,2)+":"+i(n,2)+"."+i(s,3)+"Z":n?"T"+i(a,2)+":"+i(e,2)+":"+i(n,2)+"Z":e||a?"T"+i(a,2)+":"+i(e,2)+"Z":"")}function $(r){var a=new RegExp('["'+r+` +\r]`),e=r.charCodeAt(0);function n(t,o){var f,c,u=s(t,function(d,l){if(f)return f(d,l-1);c=d,f=o?E(d,o):V(d)});return u.columns=c||[],u}function s(t,o){var f=[],c=t.length,u=0,d=0,l,A=c<=0,p=!1;t.charCodeAt(c-1)===C&&--c,t.charCodeAt(c-1)===N&&--c;function D(){if(A)return T;if(p)return p=!1,B;var h,F=u,w;if(t.charCodeAt(F)===j){for(;u++=c?A=!0:(w=t.charCodeAt(u++))===C?p=!0:w===N&&(p=!0,t.charCodeAt(u)===C&&++u),t.slice(F+1,h-1).replace(/""/g,'"')}for(;u+e;function b(e){return e*e}function w(e){return e*(2-e)}function I(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function k(e){return e*e*e}function q(e){return--e*e*e+1}function O(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var f=3,y=function e(t){t=+t;function n(a){return Math.pow(a,t)}return n.exponent=e,n}(f),Q=function e(t){t=+t;function n(a){return 1-Math.pow(1-a,t)}return n.exponent=e,n}(f),l=function e(t){t=+t;function n(a){return((a*=2)<=1?Math.pow(a,t):2-Math.pow(2-a,t))/2}return n.exponent=e,n}(f),x=Math.PI,v=x/2;function S(e){return+e==1?1:1-Math.cos(e*v)}function L(e){return Math.sin(e*v)}function d(e){return(1-Math.cos(x*e))/2}function r(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function g(e){return r(1-+e)}function j(e){return 1-r(e)}function B(e){return((e*=2)<=1?r(1-e):2-r(e-1))/2}function z(e){return 1-Math.sqrt(1-e*e)}function A(e){return Math.sqrt(1- --e*e)}function C(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var h=.36363636363636365,D=6/11,F=8/11,G=3/4,H=9/11,J=10/11,K=15/16,N=21/22,R=63/64,o=1/h/h;function T(e){return 1-c(1-e)}function c(e){return(e=+e)s(t,r).then(e=>new DOMParser().parseFromString(e,n))}var P=a("application/xml"),T=a("text/html"),y=a("image/svg+xml");export{v as blob,g as buffer,p as csv,w as dsv,T as html,b as image,E as json,y as svg,s as text,d as tsv,P as xml}; diff --git a/docs/_node/d3-force@3.0.0/index.952bd793.js b/docs/_node/d3-force@3.0.0/index.952bd793.js new file mode 100644 index 0000000..1990b94 --- /dev/null +++ b/docs/_node/d3-force@3.0.0/index.952bd793.js @@ -0,0 +1 @@ +import{quadtree as S}from"../d3-quadtree@3.0.1/index.e9fed2eb.js";import{dispatch as I}from"../d3-dispatch@3.0.1/index.be49ca5f.js";import{timer as T}from"../d3-timer@3.0.1/index.0ee6092b.js";function F(n,o){var f,v=1;n==null&&(n=0),o==null&&(o=0);function x(){var c,s=f.length,t,h=0,r=0;for(c=0;cd.index){var b=i-w.x-w.vx,C=m-w.y-w.vy,j=b*b+C*C;ji+A||qm+A||kr.r&&(r.r=r[y].r)}function h(){if(o){var r,y=o.length,z;for(f=new Array(y),r=0;r[o(N,q,s),N])),l;for(e=0,t=new Array(a);e(n=(1664525*n+1013904223)%4294967296)/4294967296}function Y(n){return n.x}function G(n){return n.y}var H=10,K=Math.PI*(3-Math.sqrt(5));function Q(n){var o,f=1,v=.001,x=1-Math.pow(v,1/300),c=0,s=.6,t=new Map,h=T(z),r=I("tick","end"),y=X();n==null&&(n=[]);function z(){d(),r.call("tick",o),f1?(e==null?t.delete(u):t.set(u,m(e)),o):t.get(u)},find:function(u,e,a){var g=0,p=n.length,l,N,q,k,w;for(a==null?a=1/0:a*=a,g=0;g1?(r.on(u,e),o):r.on(u)}}}function U(){var n,o,f,v,x=M(-30),c,s=1,t=1/0,h=.81;function r(i){var m,u=n.length,e=S(n,Y,G).visitAfter(z);for(v=i,m=0;m=t)){(i.data!==o||i.next)&&(a===0&&(a=D(f),l+=a*a),g===0&&(g=D(f),l+=g*g),l=1e21?i.toLocaleString("en").replace(/,/g,""):i.toString(10)}function z(i,r){if((n=(i=r?i.toExponential(r-1):i.toExponential()).indexOf("e"))<0)return null;var n,o=i.slice(0,n);return[o.length>1?o[0]+o.slice(2):o,+i.slice(n+1)]}function M(i){return i=z(Math.abs(i)),i?i[1]:NaN}function W(i,r){return function(n,o){for(var e=n.length,s=[],m=0,l=i[0],y=0;e>0&&l>0&&(y+l+1>o&&(l=Math.max(1,o-y)),s.push(n.substring(e-=l,e+l)),!((y+=l+1)>o));)l=i[m=(m+1)%i.length];return s.reverse().join(r)}}function _(i){return function(r){return r.replace(/[0-9]/g,function(n){return i[+n]})}}var ii=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function A(i){if(!(r=ii.exec(i)))throw new Error("invalid format: "+i);var r;return new N({fill:r[1],align:r[2],sign:r[3],symbol:r[4],zero:r[5],width:r[6],comma:r[7],precision:r[8]&&r[8].slice(1),trim:r[9],type:r[10]})}A.prototype=N.prototype;function N(i){this.fill=i.fill===void 0?" ":i.fill+"",this.align=i.align===void 0?">":i.align+"",this.sign=i.sign===void 0?"-":i.sign+"",this.symbol=i.symbol===void 0?"":i.symbol+"",this.zero=!!i.zero,this.width=i.width===void 0?void 0:+i.width,this.comma=!!i.comma,this.precision=i.precision===void 0?void 0:+i.precision,this.trim=!!i.trim,this.type=i.type===void 0?"":i.type+""}N.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ri(i){i:for(var r=i.length,n=1,o=-1,e;n0&&(o=0);break}return o>0?i.slice(0,o)+i.slice(e+1):i}var G;function ti(i,r){var n=z(i,r);if(!n)return i+"";var o=n[0],e=n[1],s=e-(G=Math.max(-8,Math.min(8,Math.floor(e/3)))*3)+1,m=o.length;return s===m?o:s>m?o+new Array(s-m+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+z(i,Math.max(0,r+s-1))[0]}function T(i,r){var n=z(i,r);if(!n)return i+"";var o=n[0],e=n[1];return e<0?"0."+new Array(-e).join("0")+o:o.length>e+1?o.slice(0,e+1)+"."+o.slice(e+1):o+new Array(e-o.length+2).join("0")}var Y={"%":(i,r)=>(i*100).toFixed(r),b:i=>Math.round(i).toString(2),c:i=>i+"",d:V,e:(i,r)=>i.toExponential(r),f:(i,r)=>i.toFixed(r),g:(i,r)=>i.toPrecision(r),o:i=>Math.round(i).toString(8),p:(i,r)=>T(i*100,r),r:T,s:ti,X:i=>Math.round(i).toString(16).toUpperCase(),x:i=>Math.round(i).toString(16)};function Z(i){return i}var q=Array.prototype.map,D=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function I(i){var r=i.grouping===void 0||i.thousands===void 0?Z:W(q.call(i.grouping,Number),i.thousands+""),n=i.currency===void 0?"":i.currency[0]+"",o=i.currency===void 0?"":i.currency[1]+"",e=i.decimal===void 0?".":i.decimal+"",s=i.numerals===void 0?Z:_(q.call(i.numerals,String)),m=i.percent===void 0?"%":i.percent+"",l=i.minus===void 0?"\u2212":i.minus+"",y=i.nan===void 0?"NaN":i.nan+"";function F(a){a=A(a);var b=a.fill,x=a.align,u=a.sign,w=a.symbol,p=a.zero,$=a.width,E=a.comma,d=a.precision,L=a.trim,c=a.type;c==="n"?(E=!0,c="g"):Y[c]||(d===void 0&&(d=12),L=!0,c="g"),(p||b==="0"&&x==="=")&&(p=!0,b="0",x="=");var J=w==="$"?n:w==="#"&&/[boxX]/.test(c)?"0"+c.toLowerCase():"",K=w==="$"?o:/[%p]/.test(c)?m:"",C=Y[c],Q=/[defgprs%]/.test(c);d=d===void 0?6:/[gprs]/.test(c)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d));function X(t){var g=J,h=K,v,B,S;if(c==="c")h=C(t)+h,t="";else{t=+t;var k=t<0||1/t<0;if(t=isNaN(t)?y:C(Math.abs(t),d),L&&(t=ri(t)),k&&+t==0&&u!=="+"&&(k=!1),g=(k?u==="("?u:l:u==="-"||u==="("?"":u)+g,h=(c==="s"?D[8+G/3]:"")+h+(k&&u==="("?")":""),Q){for(v=-1,B=t.length;++vS||S>57){h=(S===46?e+t.slice(v+1):t.slice(v))+h,t=t.slice(0,v);break}}}E&&!p&&(t=r(t,1/0));var j=g.length+t.length+h.length,f=j<$?new Array($-j+1).join(b):"";switch(E&&p&&(t=r(f+t,f.length?$-h.length:1/0),f=""),x){case"<":t=g+t+h+f;break;case"=":t=g+f+t+h;break;case"^":t=f.slice(0,j=f.length>>1)+g+t+h+f.slice(j);break;default:t=f+g+t+h;break}return s(t)}return X.toString=function(){return a+""},X}function H(a,b){var x=F((a=A(a),a.type="f",a)),u=Math.max(-8,Math.min(8,Math.floor(M(b)/3)))*3,w=Math.pow(10,-u),p=D[8+u/3];return function($){return x(w*$)+p}}return{format:F,formatPrefix:H}}var P,O,R;U({thousands:",",grouping:[3],currency:["$",""]});function U(i){return P=I(i),O=P.format,R=P.formatPrefix,P}function oi(i){return Math.max(0,-M(Math.abs(i)))}function ni(i,r){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(M(r)/3)))*3-M(Math.abs(i)))}function ei(i,r){return i=Math.abs(i),r=Math.abs(r)-i,Math.max(0,M(r)-M(i))+1}export{N as FormatSpecifier,O as format,U as formatDefaultLocale,I as formatLocale,R as formatPrefix,A as formatSpecifier,oi as precisionFixed,ni as precisionPrefix,ei as precisionRound}; diff --git a/docs/_node/d3-geo@3.1.1/index.75f0ca91.js b/docs/_node/d3-geo@3.1.1/index.75f0ca91.js new file mode 100644 index 0000000..a445554 --- /dev/null +++ b/docs/_node/d3-geo@3.1.1/index.75f0ca91.js @@ -0,0 +1 @@ +import{Adder as Y,merge as Rr,range as xn}from"../d3-array@3.2.4/index.f89e3560.js";var _=1e-6,jn=1e-12,z=Math.PI,T=z/2,Qn=z/4,O=z*2,F=180/z,N=z/180,C=Math.abs,_n=Math.atan,I=Math.atan2,x=Math.cos,nt=Math.ceil,Ar=Math.exp,Ht=Math.hypot,tt=Math.log,Ft=Math.pow,y=Math.sin,on=Math.sign||function(n){return n>0?1:n<0?-1:0},k=Math.sqrt,Gt=Math.tan;function zr(n){return n>1?0:n<-1?z:Math.acos(n)}function J(n){return n>1?T:n<-1?-T:Math.asin(n)}function Cr(n){return(n=y(n/2))*n}function D(){}function rt(n,t){n&&Pr.hasOwnProperty(n.type)&&Pr[n.type](n,t)}var br={Feature:function(n,t){rt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=x(t),a=y(t),u=Bt*a,l=Tt*o+u*x(i),p=u*r*y(i);et.add(I(p,l)),Lt=n,Tt=o,Bt=a}function Ue(n){return it=new Y,un(n,ln),it*2}function ot(n){return[I(n[1],n[0]),J(n[2])]}function yn(n){var t=n[0],e=n[1],r=x(e);return[r*x(t),r*y(t),y(e)]}function ut(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Nn(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Wt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function at(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function ct(n){var t=k(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}var L,nn,B,tn,Sn,Gr,Dr,Rn,qn,dn,$n,vn={point:Xt,lineStart:Tr,lineEnd:Br,polygonStart:function(){vn.point=Wr,vn.lineStart=Ze,vn.lineEnd=Ve,qn=new Y,ln.polygonStart()},polygonEnd:function(){ln.polygonEnd(),vn.point=Xt,vn.lineStart=Tr,vn.lineEnd=Br,et<0?(L=-(B=180),nn=-(tn=90)):qn>_?tn=90:qn<-_&&(nn=-90),$n[0]=L,$n[1]=B},sphere:function(){L=-(B=180),nn=-(tn=90)}};function Xt(n,t){dn.push($n=[L=n,B=n]),ttn&&(tn=t)}function Lr(n,t){var e=yn([n*N,t*N]);if(Rn){var r=Nn(Rn,e),i=[r[1],-r[0],0],o=Nn(i,r);ct(o),o=ot(o);var a=n-Sn,u=a>0?1:-1,l=o[0]*F*u,p,c=C(a)>180;c^(u*Sntn&&(tn=p)):(l=(l+360)%360-180,c^(u*Sntn&&(tn=t))),c?nrn(L,B)&&(B=n):rn(n,B)>rn(L,B)&&(L=n):B>=L?(nB&&(B=n)):n>Sn?rn(L,n)>rn(L,B)&&(B=n):rn(n,B)>rn(L,B)&&(L=n)}else dn.push($n=[L=n,B=n]);ttn&&(tn=t),Rn=e,Sn=n}function Tr(){vn.point=Lr}function Br(){$n[0]=L,$n[1]=B,vn.point=Xt,Rn=null}function Wr(n,t){if(Rn){var e=n-Sn;qn.add(C(e)>180?e+(e>0?360:-360):e)}else Gr=n,Dr=t;ln.point(n,t),Lr(n,t)}function Ze(){ln.lineStart()}function Ve(){Wr(Gr,Dr),ln.lineEnd(),C(qn)>_&&(L=-(B=180)),$n[0]=L,$n[1]=B,Rn=null}function rn(n,t){return(t-=n)<0?t+360:t}function Ke(n,t){return n[0]-t[0]}function Xr(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:trn(r[0],r[1])&&(r[1]=i[1]),rn(i[0],r[1])>rn(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=o.length-1,t=0,r=o[e];t<=e;r=i,++t)i=o[t],(u=rn(r[1],i[0]))>a&&(a=u,L=i[0],B=r[1])}return dn=$n=null,L===1/0||nn===1/0?[[NaN,NaN],[NaN,NaN]]:[[L,nn],[B,tn]]}var Hn,lt,ft,st,pt,gt,ht,$t,kt,Yt,Ot,kr,Yr,U,Z,V,an={sphere:D,point:It,lineStart:Or,lineEnd:Ir,polygonStart:function(){an.lineStart=ri,an.lineEnd=ei},polygonEnd:function(){an.lineStart=Or,an.lineEnd=Ir}};function It(n,t){n*=N,t*=N;var e=x(t);Fn(e*x(n),e*y(n),y(t))}function Fn(n,t,e){++Hn,ft+=(n-ft)/Hn,st+=(t-st)/Hn,pt+=(e-pt)/Hn}function Or(){an.point=ni}function ni(n,t){n*=N,t*=N;var e=x(t);U=e*x(n),Z=e*y(n),V=y(t),an.point=ti,Fn(U,Z,V)}function ti(n,t){n*=N,t*=N;var e=x(t),r=e*x(n),i=e*y(n),o=y(t),a=I(k((a=Z*o-V*i)*a+(a=V*r-U*o)*a+(a=U*i-Z*r)*a),U*r+Z*i+V*o);lt+=a,gt+=a*(U+(U=r)),ht+=a*(Z+(Z=i)),$t+=a*(V+(V=o)),Fn(U,Z,V)}function Ir(){an.point=It}function ri(){an.point=ii}function ei(){Jr(kr,Yr),an.point=It}function ii(n,t){kr=n,Yr=t,n*=N,t*=N,an.point=Jr;var e=x(t);U=e*x(n),Z=e*y(n),V=y(t),Fn(U,Z,V)}function Jr(n,t){n*=N,t*=N;var e=x(t),r=e*x(n),i=e*y(n),o=y(t),a=Z*o-V*i,u=V*r-U*o,l=U*i-Z*r,p=Ht(a,u,l),c=J(p),s=p&&-c/p;kt.add(s*a),Yt.add(s*u),Ot.add(s*l),lt+=c,gt+=c*(U+(U=r)),ht+=c*(Z+(Z=i)),$t+=c*(V+(V=o)),Fn(U,Z,V)}function oi(n){Hn=lt=ft=st=pt=gt=ht=$t=0,kt=new Y,Yt=new Y,Ot=new Y,un(n,an);var t=+kt,e=+Yt,r=+Ot,i=Ht(t,e,r);return iz&&(n-=Math.round(n/O)*O),[n,t]}Ut.invert=Ut;function Zt(n,t,e){return(n%=O)?t||e?Jt(Zr(n),Vr(t,e)):Zr(n):t||e?Vr(t,e):Ut}function Ur(n){return function(t,e){return t+=n,C(t)>z&&(t-=Math.round(t/O)*O),[t,e]}}function Zr(n){var t=Ur(n);return t.invert=Ur(-n),t}function Vr(n,t){var e=x(n),r=y(n),i=x(t),o=y(t);function a(u,l){var p=x(l),c=x(u)*p,s=y(u)*p,f=y(l),g=f*e+c*r;return[I(s*i-g*o,c*e-f*r),J(g*i+s*o)]}return a.invert=function(u,l){var p=x(l),c=x(u)*p,s=y(u)*p,f=y(l),g=f*i-s*o;return[I(s*i+f*o,c*e+g*r),J(g*e-c*r)]},a}function Kr(n){n=Zt(n[0]*N,n[1]*N,n.length>2?n[2]*N:0);function t(e){return e=n(e[0]*N,e[1]*N),e[0]*=F,e[1]*=F,e}return t.invert=function(e){return e=n.invert(e[0]*N,e[1]*N),e[0]*=F,e[1]*=F,e},t}function Qr(n,t,e,r,i,o){if(e){var a=x(t),u=y(t),l=r*e;i==null?(i=t+r*O,o=t-l/2):(i=ne(a,i),o=ne(a,o),(r>0?io)&&(i+=r*O));for(var p,c=i;r>0?c>o:c1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function vt(n,t){return C(n[0]-t[0])<_&&C(n[1]-t[1])<_}function dt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function re(n,t,e,r,i){var o=[],a=[],u,l;if(n.forEach(function(h){if(!((E=h.length-1)<=0)){var E,m=h[0],S=h[E],w;if(vt(m,S)){if(!m[2]&&!S[2]){for(i.lineStart(),u=0;u=0;--u)i.point((s=c[u])[0],s[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,g=!g}while(!f.v);i.lineEnd()}}}function ee(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e=0?1:-1,G=q*j,A=G>z,K=m*R;if(l.add(I(K*q*y(G),S*P+K*x(G))),a+=A?j+q*O:j,A^h>=e^v>=e){var W=Nn(yn(g),yn($));ct(W);var H=Nn(o,W);ct(H);var d=(A^j>=0?-1:1)*J(H[2]);(r>d||r===d&&(W[0]||W[1]))&&(u+=A^j>=0?1:-1)}}return(a<-_||a<_&&l<-jn)^u&1}function oe(n,t,e,r){return function(i){var o=t(i),a=te(),u=t(a),l=!1,p,c,s,f={point:g,lineStart:E,lineEnd:m,polygonStart:function(){f.point=S,f.lineStart=w,f.lineEnd=$,c=[],p=[]},polygonEnd:function(){f.point=g,f.lineStart=E,f.lineEnd=m,c=Rr(c);var v=ie(p,r);c.length?(l||(i.polygonStart(),l=!0),re(c,ci,v,e,i)):v&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function g(v,M){n(v,M)&&i.point(v,M)}function h(v,M){o.point(v,M)}function E(){f.point=h,o.lineStart()}function m(){f.point=g,o.lineEnd()}function S(v,M){s.push([v,M]),u.point(v,M)}function w(){u.lineStart(),s=[]}function $(){S(s[0][0],s[0][1]),u.lineEnd();var v=u.clean(),M=a.result(),R,P=M.length,j,q,G;if(s.pop(),p.push(s),s=null,!!P){if(v&1){if(q=M[0],(j=q.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),R=0;R1&&v&2&&M.push(M.pop().concat(M.shift())),c.push(M.filter(ai))}}return f}}function ai(n){return n.length>1}function ci(n,t){return((n=n.x)[0]<0?n[1]-T-_:T-n[1])-((t=t.x)[0]<0?t[1]-T-_:T-t[1])}var Kt=oe(function(){return!0},li,si,[-z,-T]);function li(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(o,a){var u=o>0?z:-z,l=C(o-t);C(l-z)<_?(n.point(t,e=(e+a)/2>0?T:-T),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(u,e),n.point(o,e),i=0):r!==u&&l>=z&&(C(t-r)<_&&(t-=r*_),C(o-u)<_&&(o-=u*_),e=fi(t,e,o,a),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(u,e),i=0),n.point(t=o,e=a),r=u},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function fi(n,t,e,r){var i,o,a=y(n-e);return C(a)>_?_n((y(t)*(o=x(r))*y(e)-y(r)*(i=x(t))*y(n))/(i*o*a)):(t+r)/2}function si(n,t,e,r){var i;if(n==null)i=e*T,r.point(-z,i),r.point(0,i),r.point(z,i),r.point(z,0),r.point(z,-i),r.point(0,-i),r.point(-z,-i),r.point(-z,0),r.point(-z,i);else if(C(n[0]-t[0])>_){var o=n[0]0,i=C(t)>_;function o(c,s,f,g){Qr(g,n,e,f,c,s)}function a(c,s){return x(c)*x(s)>t}function u(c){var s,f,g,h,E;return{lineStart:function(){h=g=!1,E=1},point:function(m,S){var w=[m,S],$,v=a(m,S),M=r?v?0:p(m,S):v?p(m+(m<0?z:-z),S):0;if(!s&&(h=g=v)&&c.lineStart(),v!==g&&($=l(s,w),(!$||vt(s,$)||vt(w,$))&&(w[2]=1)),v!==g)E=0,v?(c.lineStart(),$=l(w,s),c.point($[0],$[1])):($=l(s,w),c.point($[0],$[1],2),c.lineEnd()),s=$;else if(i&&s&&r^v){var R;!(M&f)&&(R=l(w,s,!0))&&(E=0,r?(c.lineStart(),c.point(R[0][0],R[0][1]),c.point(R[1][0],R[1][1]),c.lineEnd()):(c.point(R[1][0],R[1][1]),c.lineEnd(),c.lineStart(),c.point(R[0][0],R[0][1],3)))}v&&(!s||!vt(s,w))&&c.point(w[0],w[1]),s=w,g=v,f=M},lineEnd:function(){g&&c.lineEnd(),s=null},clean:function(){return E|(h&&g)<<1}}}function l(c,s,f){var g=yn(c),h=yn(s),E=[1,0,0],m=Nn(g,h),S=ut(m,m),w=m[0],$=S-w*w;if(!$)return!f&&c;var v=t*S/$,M=-t*w/$,R=Nn(E,m),P=at(E,v),j=at(m,M);Wt(P,j);var q=R,G=ut(P,q),A=ut(q,q),K=G*G-A*(ut(P,P)-1);if(!(K<0)){var W=k(K),H=at(q,(-G-W)/A);if(Wt(H,P),H=ot(H),!f)return H;var d=c[0],b=s[0],X=c[1],Q=s[1],en;b0^H[1]<(C(H[0]-d)<_?X:Q):X<=H[1]&&H[1]<=Q:Pn>z^(d<=H[0]&&H[0]<=b)){var hn=at(q,(-G+W)/A);return Wt(hn,P),[H,ot(hn)]}}}function p(c,s){var f=r?n:z-n,g=0;return c<-f?g|=1:c>f&&(g|=2),s<-f?g|=4:s>f&&(g|=8),g}return oe(a,u,o,r?[0,-n]:[-z,n-z])}function pi(n,t,e,r,i,o){var a=n[0],u=n[1],l=t[0],p=t[1],c=0,s=1,f=l-a,g=p-u,h;if(h=e-a,!(!f&&h>0)){if(h/=f,f<0){if(h0){if(h>s)return;h>c&&(c=h)}if(h=i-a,!(!f&&h<0)){if(h/=f,f<0){if(h>s)return;h>c&&(c=h)}else if(f>0){if(h0)){if(h/=g,g<0){if(h0){if(h>s)return;h>c&&(c=h)}if(h=o-u,!(!g&&h<0)){if(h/=g,g<0){if(h>s)return;h>c&&(c=h)}else if(g>0){if(h0&&(n[0]=a+c*f,n[1]=u+c*g),s<1&&(t[0]=a+s*f,t[1]=u+s*g),!0}}}}}var Gn=1e9,mt=-Gn;function Et(n,t,e,r){function i(p,c){return n<=p&&p<=e&&t<=c&&c<=r}function o(p,c,s,f){var g=0,h=0;if(p==null||(g=a(p,s))!==(h=a(c,s))||l(p,c)<0^s>0)do f.point(g===0||g===3?n:e,g>1?r:t);while((g=(g+s+4)%4)!==h);else f.point(c[0],c[1])}function a(p,c){return C(p[0]-n)<_?c>0?0:3:C(p[0]-e)<_?c>0?2:1:C(p[1]-t)<_?c>0?1:0:c>0?3:2}function u(p,c){return l(p.x,c.x)}function l(p,c){var s=a(p,1),f=a(c,1);return s!==f?s-f:s===0?c[1]-p[1]:s===1?p[0]-c[0]:s===2?p[1]-c[1]:c[0]-p[0]}return function(p){var c=p,s=te(),f,g,h,E,m,S,w,$,v,M,R,P={point:j,lineStart:K,lineEnd:W,polygonStart:G,polygonEnd:A};function j(d,b){i(d,b)&&c.point(d,b)}function q(){for(var d=0,b=0,X=g.length;br&&(Kn-En)*(r-hn)>(wn-hn)*(n-En)&&++d:wn<=r&&(Kn-En)*(r-hn)<(wn-hn)*(n-En)&&--d;return d}function G(){c=s,f=[],g=[],R=!0}function A(){var d=q(),b=R&&d,X=(f=Rr(f)).length;(b||X)&&(p.polygonStart(),b&&(p.lineStart(),o(null,null,1,p),p.lineEnd()),X&&re(f,u,d,o,p),p.polygonEnd()),c=p,f=g=h=null}function K(){P.point=H,g&&g.push(h=[]),M=!0,v=!1,w=$=NaN}function W(){f&&(H(E,m),S&&v&&s.rejoin(),f.push(s.result())),P.point=j,v&&c.lineEnd()}function H(d,b){var X=i(d,b);if(g&&h.push([d,b]),M)E=d,m=b,S=X,M=!1,X&&(c.lineStart(),c.point(d,b));else if(X&&v)c.point(d,b);else{var Q=[w=Math.max(mt,Math.min(Gn,w)),$=Math.max(mt,Math.min(Gn,$))],en=[d=Math.max(mt,Math.min(Gn,d)),b=Math.max(mt,Math.min(Gn,b))];pi(Q,en,n,t,e,r)?(v||(c.lineStart(),c.point(Q[0],Q[1])),c.point(en[0],en[1]),X||c.lineEnd(),R=!1):X&&(c.lineStart(),c.point(d,b),R=!1)}w=d,$=b,v=X}return P}}function gi(){var n=0,t=0,e=960,r=500,i,o,a;return a={stream:function(u){return i&&o===u?i:i=Et(n,t,e,r)(o=u)},extent:function(u){return arguments.length?(n=+u[0][0],t=+u[0][1],e=+u[1][0],r=+u[1][1],i=o=null,a):[[n,t],[e,r]]}}}var Qt,nr,yt,St,zn={sphere:D,point:D,lineStart:hi,lineEnd:D,polygonStart:D,polygonEnd:D};function hi(){zn.point=vi,zn.lineEnd=$i}function $i(){zn.point=zn.lineEnd=D}function vi(n,t){n*=N,t*=N,nr=n,yt=y(t),St=x(t),zn.point=di}function di(n,t){n*=N,t*=N;var e=y(t),r=x(t),i=C(n-nr),o=x(i),a=y(i),u=r*a,l=St*e-yt*r*o,p=yt*e+St*r*o;Qt.add(I(k(u*u+l*l),p)),nr=n,yt=e,St=r}function ae(n){return Qt=new Y,un(n,zn),+Qt}var tr=[null,null],mi={type:"LineString",coordinates:tr};function Mt(n,t){return tr[0]=n,tr[1]=t,ae(mi)}var ce={Feature:function(n,t){return wt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r0&&(i=Mt(n[o],n[o-1]),i>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))_}).map(f)).concat(xn(nt(o/p)*p,i,p).filter(function($){return C($%s)>_}).map(g))}return S.lines=function(){return w().map(function($){return{type:"LineString",coordinates:$}})},S.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(E(a).slice(1),h(e).reverse().slice(1),E(u).reverse().slice(1))]}},S.extent=function($){return arguments.length?S.extentMajor($).extentMinor($):S.extentMinor()},S.extentMajor=function($){return arguments.length?(r=+$[0][0],e=+$[1][0],u=+$[0][1],a=+$[1][1],r>e&&($=r,r=e,e=$),u>a&&($=u,u=a,a=$),S.precision(m)):[[r,u],[e,a]]},S.extentMinor=function($){return arguments.length?(t=+$[0][0],n=+$[1][0],o=+$[0][1],i=+$[1][1],t>n&&($=t,t=n,n=$),o>i&&($=o,o=i,i=$),S.precision(m)):[[t,o],[n,i]]},S.step=function($){return arguments.length?S.stepMajor($).stepMinor($):S.stepMinor()},S.stepMajor=function($){return arguments.length?(c=+$[0],s=+$[1],S):[c,s]},S.stepMinor=function($){return arguments.length?(l=+$[0],p=+$[1],S):[l,p]},S.precision=function($){return arguments.length?(m=+$,f=he(o,i,90),g=$e(t,n,m),h=he(u,a,90),E=$e(r,e,m),S):m},S.extentMajor([[-180,-90+_],[180,90-_]]).extentMinor([[-180,-80-_],[180,80+_]])}function Si(){return ve()()}function Mi(n,t){var e=n[0]*N,r=n[1]*N,i=t[0]*N,o=t[1]*N,a=x(r),u=y(r),l=x(o),p=y(o),c=a*x(e),s=a*y(e),f=l*x(i),g=l*y(i),h=2*J(k(Cr(o-r)+a*l*Cr(i-e))),E=y(h),m=h?function(S){var w=y(S*=h)/E,$=y(h-S)/E,v=$*c+w*f,M=$*s+w*g,R=$*u+w*p;return[I(M,v)*F,I(R,k(v*v+M*M))*F]}:function(){return[e*F,r*F]};return m.distance=h,m}var Dn=n=>n,rr=new Y,er=new Y,de,me,ir,or,mn={point:D,lineStart:D,lineEnd:D,polygonStart:function(){mn.lineStart=wi,mn.lineEnd=_i},polygonEnd:function(){mn.lineStart=mn.lineEnd=mn.point=D,rr.add(C(er)),er=new Y},result:function(){var n=rr/2;return rr=new Y,n}};function wi(){mn.point=xi}function xi(n,t){mn.point=Ee,de=ir=n,me=or=t}function Ee(n,t){er.add(or*n-ir*t),ir=n,or=t}function _i(){Ee(de,me)}var ye=mn,Cn=1/0,xt=Cn,Ln=-Cn,_t=Ln,Ni={point:Ri,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var n=[[Cn,xt],[Ln,_t]];return Ln=_t=-(xt=Cn=1/0),n}};function Ri(n,t){nLn&&(Ln=n),t_t&&(_t=t)}var Nt=Ni,ur=0,ar=0,Tn=0,Rt=0,At=0,bn=0,cr=0,lr=0,Bn=0,Se,Me,fn,sn,cn={point:Mn,lineStart:we,lineEnd:xe,polygonStart:function(){cn.lineStart=Ci,cn.lineEnd=bi},polygonEnd:function(){cn.point=Mn,cn.lineStart=we,cn.lineEnd=xe},result:function(){var n=Bn?[cr/Bn,lr/Bn]:bn?[Rt/bn,At/bn]:Tn?[ur/Tn,ar/Tn]:[NaN,NaN];return ur=ar=Tn=Rt=At=bn=cr=lr=Bn=0,n}};function Mn(n,t){ur+=n,ar+=t,++Tn}function we(){cn.point=Ai}function Ai(n,t){cn.point=zi,Mn(fn=n,sn=t)}function zi(n,t){var e=n-fn,r=t-sn,i=k(e*e+r*r);Rt+=i*(fn+n)/2,At+=i*(sn+t)/2,bn+=i,Mn(fn=n,sn=t)}function xe(){cn.point=Mn}function Ci(){cn.point=Pi}function bi(){_e(Se,Me)}function Pi(n,t){cn.point=_e,Mn(Se=fn=n,Me=sn=t)}function _e(n,t){var e=n-fn,r=t-sn,i=k(e*e+r*r);Rt+=i*(fn+n)/2,At+=i*(sn+t)/2,bn+=i,i=sn*n-fn*t,cr+=i*(fn+n),lr+=i*(sn+t),Bn+=i*3,Mn(fn=n,sn=t)}var Ne=cn;function Re(n){this._context=n}Re.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:{this._context.moveTo(n,t),this._point=1;break}case 1:{this._context.lineTo(n,t);break}default:{this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,O);break}}},result:D};var fr=new Y,sr,Ae,ze,Wn,Xn,zt={point:D,lineStart:function(){zt.point=ji},lineEnd:function(){sr&&Ce(Ae,ze),zt.point=D},polygonStart:function(){sr=!0},polygonEnd:function(){sr=null},result:function(){var n=+fr;return fr=new Y,n}};function ji(n,t){zt.point=Ce,Ae=Wn=n,ze=Xn=t}function Ce(n,t){Wn-=n,Xn-=t,fr.add(k(Wn*Wn+Xn*Xn)),Wn=n,Xn=t}var be=zt;let Pe,Ct,je,qe,He=class{constructor(t){this._append=t==null?Fe:qi(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:{this._append`M${t},${e}`,this._point=1;break}case 1:{this._append`L${t},${e}`;break}default:{if(this._append`M${t},${e}`,this._radius!==je||this._append!==Ct){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,je=r,Ct=this._append,qe=this._,this._=i}this._+=qe;break}}}result(){const t=this._;return this._="",t.length?t:null}};function Fe(n){let t=1;this._+=n[0];for(const e=n.length;t=0))throw new RangeError(`invalid digits: ${n}`);if(t>15)return Fe;if(t!==Pe){const e=10**t;Pe=t,Ct=function(r){let i=1;this._+=r[0];for(const o=r.length;i=0))throw new RangeError(`invalid digits: ${u}`);e=l}return t===null&&(o=new He(e)),a},a.projection(n).digits(e).context(t)}function Fi(n){return{stream:kn(n)}}function kn(n){return function(t){var e=new pr;for(var r in n)e[r]=n[r];return e.stream=t,e}}function pr(){}pr.prototype={constructor:pr,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function gr(n,t,e){var r=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),r!=null&&n.clipExtent(null),un(e,n.stream(Nt)),t(Nt.result()),r!=null&&n.clipExtent(r),n}function bt(n,t,e){return gr(n,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),u=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(o-a*(r[1][1]+r[0][1]))/2;n.scale(150*a).translate([u,l])},e)}function hr(n,t,e){return bt(n,[[0,0],t],e)}function $r(n,t,e){return gr(n,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),a=(i-o*(r[1][0]+r[0][0]))/2,u=-o*r[0][1];n.scale(150*o).translate([a,u])},e)}function vr(n,t,e){return gr(n,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),a=-o*r[0][0],u=(i-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([a,u])},e)}var Ge=16,Gi=x(30*N);function De(n,t){return+t?Li(n,t):Di(n)}function Di(n){return kn({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function Li(n,t){function e(r,i,o,a,u,l,p,c,s,f,g,h,E,m){var S=p-r,w=c-i,$=S*S+w*w;if($>4*t&&E--){var v=a+f,M=u+g,R=l+h,P=k(v*v+M*M+R*R),j=J(R/=P),q=C(C(R)-1)<_||C(o-s)<_?(o+s)/2:I(M,v),G=n(q,j),A=G[0],K=G[1],W=A-r,H=K-i,d=w*W-S*H;(d*d/$>t||C((S*W+w*H)/$-.5)>.3||a*f+u*g+l*h2?d[2]%360*N:0,W()):[u*F,l*F,p*F]},A.angle=function(d){return arguments.length?(s=d%360*N,W()):s*F},A.reflectX=function(d){return arguments.length?(f=d?-1:1,W()):f<0},A.reflectY=function(d){return arguments.length?(g=d?-1:1,W()):g<0},A.precision=function(d){return arguments.length?(R=De(P,M=d*d),H()):k(M)},A.fitExtent=function(d,b){return bt(A,d,b)},A.fitSize=function(d,b){return hr(A,d,b)},A.fitWidth=function(d,b){return $r(A,d,b)},A.fitHeight=function(d,b){return vr(A,d,b)};function W(){var d=Le(e,0,0,f,g,s).apply(null,t(o,a)),b=Le(e,r-d[0],i-d[1],f,g,s);return c=Zt(u,l,p),P=Jt(t,b),j=Jt(c,P),R=De(P,M),H()}function H(){return q=G=null,A}return function(){return t=n.apply(this,arguments),A.invert=t.invert&&K,W()}}function mr(n){var t=0,e=z/3,r=dr(n),i=r(t,e);return i.parallels=function(o){return arguments.length?r(t=o[0]*N,e=o[1]*N):[t*F,e*F]},i}function Xi(n){var t=x(n);function e(r,i){return[r*t,y(i)/t]}return e.invert=function(r,i){return[r/t,J(i*t)]},e}function Te(n,t){var e=y(n),r=(e+y(t))/2;if(C(r)<_)return Xi(n);var i=1+e*(2*r-e),o=k(i)/r;function a(u,l){var p=k(i-2*r*y(l))/r;return[p*y(u*=r),o-p*x(u)]}return a.invert=function(u,l){var p=o-l,c=I(u,C(p))*on(p);return p*r<0&&(c-=z*on(u)*on(p)),[c/r,J((i-(u*u+p*p)*r*r)/(2*r))]},a}function Pt(){return mr(Te).scale(155.424).center([0,33.6442])}function Be(){return Pt().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ki(n){var t=n.length;return{point:function(e,r){for(var i=-1;++i=.12&&m<.234&&E>=-.425&&E<-.214?i:m>=.166&&m<.234&&E>=-.214&&E<-.115?a:e).invert(f)},c.stream=function(f){return n&&t===f?n:n=ki([e.stream(t=f),i.stream(f),a.stream(f)])},c.precision=function(f){return arguments.length?(e.precision(f),i.precision(f),a.precision(f),s()):e.precision()},c.scale=function(f){return arguments.length?(e.scale(f),i.scale(f*.35),a.scale(f),c.translate(e.translate())):e.scale()},c.translate=function(f){if(!arguments.length)return e.translate();var g=e.scale(),h=+f[0],E=+f[1];return r=e.translate(f).clipExtent([[h-.455*g,E-.238*g],[h+.455*g,E+.238*g]]).stream(p),o=i.translate([h-.307*g,E+.201*g]).clipExtent([[h-.425*g+_,E+.12*g+_],[h-.214*g-_,E+.234*g-_]]).stream(p),u=a.translate([h-.205*g,E+.212*g]).clipExtent([[h-.214*g+_,E+.166*g+_],[h-.115*g-_,E+.234*g-_]]).stream(p),s()},c.fitExtent=function(f,g){return bt(c,f,g)},c.fitSize=function(f,g){return hr(c,f,g)},c.fitWidth=function(f,g){return $r(c,f,g)},c.fitHeight=function(f,g){return vr(c,f,g)};function s(){return n=t=null,c}return c.scale(1070)}function We(n){return function(t,e){var r=x(t),i=x(e),o=n(r*i);return o===1/0?[2,0]:[o*i*y(t),o*y(e)]}}function Yn(n){return function(t,e){var r=k(t*t+e*e),i=n(r),o=y(i),a=x(i);return[I(t*o,r*a),J(r&&e*o/r)]}}var Er=We(function(n){return k(2/(1+n))});Er.invert=Yn(function(n){return 2*J(n/2)});function Oi(){return pn(Er).scale(124.75).clipAngle(180-.001)}var yr=We(function(n){return(n=zr(n))&&n/y(n)});yr.invert=Yn(function(n){return n});function Ii(){return pn(yr).scale(79.4188).clipAngle(180-.001)}function On(n,t){return[n,tt(Gt((T+t)/2))]}On.invert=function(n,t){return[n,2*_n(Ar(t))-T]};function Ji(){return Xe(On).scale(961/O)}function Xe(n){var t=pn(n),e=t.center,r=t.scale,i=t.translate,o=t.clipExtent,a=null,u,l,p;t.scale=function(s){return arguments.length?(r(s),c()):r()},t.translate=function(s){return arguments.length?(i(s),c()):i()},t.center=function(s){return arguments.length?(e(s),c()):e()},t.clipExtent=function(s){return arguments.length?(s==null?a=u=l=p=null:(a=+s[0][0],u=+s[0][1],l=+s[1][0],p=+s[1][1]),c()):a==null?null:[[a,u],[l,p]]};function c(){var s=z*r(),f=t(Kr(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-s,f[1]-s],[f[0]+s,f[1]+s]]:n===On?[[Math.max(f[0]-s,a),u],[Math.min(f[0]+s,l),p]]:[[a,Math.max(f[1]-s,u)],[l,Math.min(f[1]+s,p)]])}return c()}function jt(n){return Gt((T+n)/2)}function ke(n,t){var e=x(n),r=n===t?y(n):tt(e/x(t))/tt(jt(t)/jt(n)),i=e*Ft(jt(n),r)/r;if(!r)return On;function o(a,u){i>0?u<-T+_&&(u=-T+_):u>T-_&&(u=T-_);var l=i/Ft(jt(u),r);return[l*y(r*a),i-l*x(r*a)]}return o.invert=function(a,u){var l=i-u,p=on(r)*k(a*a+l*l),c=I(a,C(l))*on(l);return l*r<0&&(c-=z*on(a)*on(l)),[c/r,2*_n(Ft(i/p,1/r))-T]},o}function Ui(){return mr(ke).scale(109.5).parallels([30,30])}function In(n,t){return[n,t]}In.invert=In;function Zi(){return pn(In).scale(152.63)}function Ye(n,t){var e=x(n),r=n===t?y(n):(e-x(t))/(t-n),i=e/r+n;if(C(r)<_)return In;function o(a,u){var l=i-u,p=r*a;return[l*y(p),i-l*x(p)]}return o.invert=function(a,u){var l=i-u,p=I(a,C(l))*on(l);return l*r<0&&(p-=z*on(a)*on(l)),[p/r,i-on(r)*k(a*a+l*l)]},o}function Vi(){return mr(Ye).scale(131.154).center([0,13.9389])}var Jn=1.340264,Un=-.081106,Zn=893e-6,Vn=.003796,qt=k(3)/2,Ki=12;function Sr(n,t){var e=J(qt*y(t)),r=e*e,i=r*r*r;return[n*x(e)/(qt*(Jn+3*Un*r+i*(7*Zn+9*Vn*r))),e*(Jn+Un*r+i*(Zn+Vn*r))]}Sr.invert=function(n,t){for(var e=t,r=e*e,i=r*r*r,o=0,a,u,l;o_&&--r>0);return[n/(.8707+(o=e*e)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),e]};function ro(){return pn(wr).scale(175.295)}function xr(n,t){return[x(t)*y(n),y(t)]}xr.invert=Yn(J);function eo(){return pn(xr).scale(249.5).clipAngle(90+_)}function _r(n,t){var e=x(t),r=1+x(n)*e;return[e*y(n)/r,y(t)/r]}_r.invert=Yn(function(n){return 2*_n(n)});function io(){return pn(_r).scale(250).clipAngle(142)}function Nr(n,t){return[tt(Gt((T+t)/2)),-n]}Nr.invert=function(n,t){return[-t,2*_n(Ar(n))-T]};function oo(){var n=Xe(Nr),t=n.center,e=n.rotate;return n.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},n.rotate=function(r){return arguments.length?e([r[0],r[1],r.length>2?r[2]+90:90]):(r=e(),[r[0],r[1],r[2]-90])},e([0,0,90]).scale(159.155)}export{Be as geoAlbers,Yi as geoAlbersUsa,Ue as geoArea,Oi as geoAzimuthalEqualArea,Er as geoAzimuthalEqualAreaRaw,Ii as geoAzimuthalEquidistant,yr as geoAzimuthalEquidistantRaw,Qe as geoBounds,oi as geoCentroid,ui as geoCircle,Kt as geoClipAntimeridian,ue as geoClipCircle,gi as geoClipExtent,Et as geoClipRectangle,Ui as geoConicConformal,ke as geoConicConformalRaw,Pt as geoConicEqualArea,Te as geoConicEqualAreaRaw,Vi as geoConicEquidistant,Ye as geoConicEquidistantRaw,yi as geoContains,Mt as geoDistance,Qi as geoEqualEarth,Sr as geoEqualEarthRaw,Zi as geoEquirectangular,In as geoEquirectangularRaw,no as geoGnomonic,Mr as geoGnomonicRaw,ve as geoGraticule,Si as geoGraticule10,to as geoIdentity,Mi as geoInterpolate,ae as geoLength,Ji as geoMercator,On as geoMercatorRaw,ro as geoNaturalEarth1,wr as geoNaturalEarth1Raw,eo as geoOrthographic,xr as geoOrthographicRaw,Hi as geoPath,pn as geoProjection,dr as geoProjectionMutator,Kr as geoRotation,io as geoStereographic,_r as geoStereographicRaw,un as geoStream,Fi as geoTransform,oo as geoTransverseMercator,Nr as geoTransverseMercatorRaw}; diff --git a/docs/_node/d3-hierarchy@3.1.2/index.0a013d9a.js b/docs/_node/d3-hierarchy@3.1.2/index.0a013d9a.js new file mode 100644 index 0000000..14d8be7 --- /dev/null +++ b/docs/_node/d3-hierarchy@3.1.2/index.0a013d9a.js @@ -0,0 +1 @@ +function sn(n,r){return n.parent===r.parent?1:2}function pn(n){return n.reduce(dn,0)/n.length}function dn(n,r){return n+r.x}function gn(n){return 1+n.reduce(vn,0)}function vn(n,r){return Math.max(n,r.y)}function yn(n){for(var r;r=n.children;)n=r[0];return n}function xn(n){for(var r;r=n.children;)n=r[r.length-1];return n}function mn(){var n=sn,r=1,t=1,e=!1;function u(i){var f,l=0;i.eachAfter(function(o){var p=o.children;p?(o.x=pn(p),o.y=gn(p)):(o.x=f?l+=n(o,f):0,o.y=0,f=o)});var c=yn(i),a=xn(i),h=c.x-n(c,a)/2,s=a.x+n(a,c)/2;return i.eachAfter(e?function(o){o.x=(o.x-i.x)*r,o.y=(i.y-o.y)*t}:function(o){o.x=(o.x-h)/(s-h)*r,o.y=(1-(i.y?o.y/i.y:1))*t})}return u.separation=function(i){return arguments.length?(n=i,u):n},u.size=function(i){return arguments.length?(e=!1,r=+i[0],t=+i[1],u):e?null:[r,t]},u.nodeSize=function(i){return arguments.length?(e=!0,r=+i[0],t=+i[1],u):e?[r,t]:null},u}function $n(n){var r=0,t=n.children,e=t&&t.length;if(!e)r=1;else for(;--e>=0;)r+=t[e].value;n.value=r}function wn(){return this.eachAfter($n)}function Bn(n,r){let t=-1;for(const e of this)n.call(r,e,++t,this);return this}function _n(n,r){for(var t=this,e=[t],u,i,f=-1;t=e.pop();)if(n.call(r,t,++f,this),u=t.children)for(i=u.length-1;i>=0;--i)e.push(u[i]);return this}function An(n,r){for(var t=this,e=[t],u=[],i,f,l,c=-1;t=e.pop();)if(u.push(t),i=t.children)for(f=0,l=i.length;f=0;)t+=e[u].value;r.value=t})}function kn(n){return this.eachBefore(function(r){r.children&&r.children.sort(n)})}function En(n){for(var r=this,t=Sn(r,n),e=[r];r!==t;)r=r.parent,e.push(r);for(var u=e.length;n!==t;)e.splice(u,0,n),n=n.parent;return e}function Sn(n,r){if(n===r)return n;var t=n.ancestors(),e=r.ancestors(),u=null;for(n=t.pop(),r=e.pop();n===r;)u=n,n=t.pop(),r=e.pop();return u}function qn(){for(var n=this,r=[n];n=n.parent;)r.push(n);return r}function bn(){return Array.from(this)}function In(){var n=[];return this.eachBefore(function(r){r.children||n.push(r)}),n}function Dn(){var n=this,r=[];return n.each(function(t){t!==n&&r.push({source:t.parent,target:t})}),r}function*jn(){var n=this,r,t=[n],e,u,i;do for(r=t.reverse(),t=[];n=r.pop();)if(yield n,e=n.children)for(u=0,i=e.length;u=0;--l)u.push(i=f[l]=new k(f[l])),i.parent=e,i.depth=e.depth+1;return t.eachBefore(Q)}function Rn(){return C(this).eachBefore(Tn)}function Nn(n){return n.children}function On(n){return Array.isArray(n)?n[1]:null}function Tn(n){n.data.value!==void 0&&(n.value=n.data.value),n.data=n.data.data}function Q(n){var r=0;do n.height=r;while((n=n.parent)&&n.height<++r)}function k(n){this.data=n,this.depth=this.height=0,this.parent=null}k.prototype=C.prototype={constructor:k,count:wn,each:Bn,eachAfter:An,eachBefore:_n,find:Mn,sum:zn,sort:kn,path:En,ancestors:qn,descendants:bn,leaves:In,links:Dn,copy:Rn,[Symbol.iterator]:jn};function D(n){return n==null?null:U(n)}function U(n){if(typeof n!="function")throw new Error;return n}function E(){return 0}function q(n){return function(){return n}}function K(){let n=1;return()=>(n=(1664525*n+1013904223)%4294967296)/4294967296}function Cn(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function Kn(n,r){let t=n.length,e,u;for(;t;)u=r()*t--|0,e=n[t],n[t]=n[u],n[u]=e;return n}function Ln(n){return X(n,K())}function X(n,r){for(var t=0,e=(n=Kn(Array.from(n),r)).length,u=[],i,f;t0&&t*t>e*e+u*u}function L(n,r){for(var t=0;t1e-6?(z+Math.sqrt(z*z-4*S*J))/(2*S):J/z);return{x:e+B+M*T,y:u+_+A*T,r:T}}function V(n,r,t){var e=n.x-r.x,u,i,f=n.y-r.y,l,c,a=e*e+f*f;a?(i=r.r+t.r,i*=i,c=n.r+t.r,c*=c,i>c?(u=(a+c-i)/(2*a),l=Math.sqrt(Math.max(0,c/a-u*u)),t.x=n.x-u*e-l*f,t.y=n.y-u*f+l*e):(u=(a+i-c)/(2*a),l=Math.sqrt(Math.max(0,i/a-u*u)),t.x=r.x+u*e-l*f,t.y=r.y+u*f+l*e)):(t.x=r.x+t.r,t.y=r.y)}function nn(n,r){var t=n.r+r.r-1e-6,e=r.x-n.x,u=r.y-n.y;return t>0&&t*t>e*e+u*u}function rn(n){var r=n._,t=n.next._,e=r.r+t.r,u=(r.x*t.r+t.x*r.r)/e,i=(r.y*t.r+t.y*r.r)/e;return u*u+i*i}function R(n){this._=n,this.next=null,this.previous=null}function tn(n,r){if(!(i=(n=Cn(n)).length))return 0;var t,e,u,i,f,l,c,a,h,s,o;if(t=n[0],t.x=0,t.y=0,!(i>1))return t.r;if(e=n[1],t.x=-e.r,e.x=t.r,e.y=0,!(i>2))return t.r+e.r;V(e,t,u=n[2]),t=new R(t),e=new R(e),u=new R(u),t.next=u.previous=e,e.next=t.previous=u,u.next=e.previous=t;n:for(c=3;cVn(t($,m,u))),x=y.map(fn),w=new Set(y).add("");for(const $ of x)w.has($)||(w.add($),y.push($),x.push(fn($)),i.push(W));f=($,m)=>y[m],l=($,m)=>x[m]}for(h=0,c=i.length;h=0&&(p=i[y],p.data===W);--y)p.data=null}if(s.parent=Un,s.eachBefore(function(y){y.depth=y.parent.depth+1,--c}).eachBefore(Q),s.parent=null,c>0)throw new Error("cycle");return s}return e.id=function(u){return arguments.length?(n=D(u),e):n},e.parentId=function(u){return arguments.length?(r=D(u),e):r},e.path=function(u){return arguments.length?(t=D(u),e):t},e}function Vn(n){n=`${n}`;let r=n.length;return F(n,r-1)&&!F(n,r-2)&&(n=n.slice(0,-1)),n[0]==="/"?n:`/${n}`}function fn(n){let r=n.length;if(r<2)return"";for(;--r>1&&!F(n,r););return n.slice(0,r)}function F(n,r){if(n[r]==="/"){let t=0;for(;r>0&&n[--r]==="\\";)++t;if(!(t&1))return!0}return!1}function nr(n,r){return n.parent===r.parent?1:2}function G(n){var r=n.children;return r?r[0]:n.t}function H(n){var r=n.children;return r?r[r.length-1]:n.t}function rr(n,r,t){var e=t/(r.i-n.i);r.c-=e,r.s+=t,n.c+=e,r.z+=t,r.m+=t}function tr(n){for(var r=0,t=0,e=n.children,u=e.length,i;--u>=0;)i=e[u],i.z+=r,i.m+=r,r+=i.s+(t+=i.c)}function er(n,r,t){return n.a.parent===r.parent?n.a:t}function N(n,r){this._=n,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=r}N.prototype=Object.create(k.prototype);function ur(n){for(var r=new N(n,0),t,e=[r],u,i,f,l;t=e.pop();)if(i=t._.children)for(t.children=new Array(l=i.length),f=l-1;f>=0;--f)e.push(u=t.children[f]=new N(i[f],f)),u.parent=t;return(r.parent=new N(null,0)).children=[r],r}function ir(){var n=nr,r=1,t=1,e=null;function u(a){var h=ur(a);if(h.eachAfter(i),h.parent.m=-h.z,h.eachBefore(f),e)a.eachBefore(c);else{var s=a,o=a,p=a;a.eachBefore(function(x){x.xo.x&&(o=x),x.depth>p.depth&&(p=x)});var d=s===o?1:n(s,o)/2,g=d-s.x,v=r/(o.x+d+g),y=t/(p.depth||1);a.eachBefore(function(x){x.x=(x.x+g)*v,x.y=x.depth*y})}return a}function i(a){var h=a.children,s=a.parent.children,o=a.i?s[a.i-1]:null;if(h){tr(a);var p=(h[0].z+h[h.length-1].z)/2;o?(a.z=o.z+n(a._,o._),a.m=a.z-p):a.z=p}else o&&(a.z=o.z+n(a._,o._));a.parent.A=l(a,o,a.parent.A||s[0])}function f(a){a._.x=a.z+a.parent.m,a.m+=a.parent.m}function l(a,h,s){if(h){for(var o=a,p=a,d=h,g=o.parent.children[0],v=o.m,y=p.m,x=d.m,w=g.m,$;d=H(d),o=G(o),d&&o;)g=G(g),p=H(p),p.a=a,$=d.z+x-o.z-v+n(d._,o._),$>0&&(rr(er(d,a,s),a,$),v+=$,y+=$),x+=d.m,v+=o.m,w+=g.m,y+=p.m;d&&!H(p)&&(p.t=d,p.m+=x-y),o&&!G(g)&&(g.t=o,g.m+=v-w,s=a)}return s}function c(a){a.x*=r,a.y=a.depth*t}return u.separation=function(a){return arguments.length?(n=a,u):n},u.size=function(a){return arguments.length?(e=!1,r=+a[0],t=+a[1],u):e?null:[r,t]},u.nodeSize=function(a){return arguments.length?(e=!0,r=+a[0],t=+a[1],u):e?[r,t]:null},u}function O(n,r,t,e,u){for(var i=n.children,f,l=-1,c=i.length,a=n.value&&(u-t)/n.value;++lx&&(x=a),B=v*v*m,w=Math.max(x/B,B/y),w>$){v-=a;break}$=w}f.push(c={value:v,dice:p1?e:1)},t}(cn);function or(){var n=ln,r=!1,t=1,e=1,u=[0],i=E,f=E,l=E,c=E,a=E;function h(o){return o.x0=o.y0=0,o.x1=t,o.y1=e,o.eachBefore(s),u=[0],r&&o.eachBefore(on),o}function s(o){var p=u[o.depth],d=o.x0+p,g=o.y0+p,v=o.x1-p,y=o.y1-p;v=o-1){var x=i[s];x.x0=d,x.y0=g,x.x1=v,x.y1=y;return}for(var w=a[s],$=p/2+w,m=s+1,B=o-1;m>>1;a[M]<$?m=M+1:B=M}$-a[m-1]y-g){var S=p?(d*A+v*_)/p:v;h(s,m,_,d,g,S,y),h(m,o,A,S,g,v,y)}else{var z=p?(g*A+y*_)/p:y;h(s,m,_,d,g,v,z),h(m,o,A,d,z,v,y)}}}function fr(n,r,t,e,u){(n.depth&1?O:I)(n,r,t,e,u)}var cr=function n(r){function t(e,u,i,f,l){if((c=e._squarify)&&c.ratio===r)for(var c,a,h,s,o=-1,p,d=c.length,g=e.value;++o1?e:1)},t}(cn);export{k as Node,mn as cluster,C as hierarchy,Jn as pack,Ln as packEnclose,Gn as packSiblings,Qn as partition,Zn as stratify,ir as tree,or as treemap,ar as treemapBinary,I as treemapDice,cr as treemapResquarify,O as treemapSlice,fr as treemapSliceDice,ln as treemapSquarify}; diff --git a/docs/_node/d3-interpolate@3.0.1/index.7ed7c7fe.js b/docs/_node/d3-interpolate@3.0.1/index.7ed7c7fe.js new file mode 100644 index 0000000..10f28a7 --- /dev/null +++ b/docs/_node/d3-interpolate@3.0.1/index.7ed7c7fe.js @@ -0,0 +1 @@ +import{rgb as R,color as I,hsl as O,lab as L,hcl as E,cubehelix as V}from"../d3-color@3.1.0/index.e8c126ff.js";function z(t,n,r,e,a){var i=t*t,u=i*t;return((1-3*t+3*i-u)*n+(4-6*i+3*u)*r+(1+3*t+3*i-3*u)*e+u*a)/6}function Q(t){var n=t.length-1;return function(r){var e=r<=0?r=0:r>=1?(r=1,n-1):Math.floor(r*n),a=t[e],i=t[e+1],u=e>0?t[e-1]:2*a-i,o=e()=>t;function K(t,n){return function(r){return t+r*n}}function fn(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(e){return Math.pow(t+e*n,r)}}function d(t,n){var r=n-t;return r?K(t,r>180||r<-180?r-360*Math.round(r/360):r):$(isNaN(t)?n:t)}function cn(t){return(t=+t)==1?h:function(n,r){return r-n?fn(n,r,t):$(isNaN(n)?r:n)}}function h(t,n){var r=n-t;return r?K(t,r):$(isNaN(t)?n:t)}var Y=function t(n){var r=cn(n);function e(a,i){var u=r((a=R(a)).r,(i=R(i)).r),o=r(a.g,i.g),s=r(a.b,i.b),c=h(a.opacity,i.opacity);return function(f){return a.r=u(f),a.g=o(f),a.b=s(f),a.opacity=c(f),a+""}}return e.gamma=t,e}(1);function P(t){return function(n){var r=n.length,e=new Array(r),a=new Array(r),i=new Array(r),u,o;for(u=0;ur&&(i=n.slice(r,i),o[u]?o[u]+=i:o[++u]=i),(e=e[0])===(a=a[0])?o[u]?o[u]+=a:o[++u]=a:(o[++u]=null,s.push({i:u,x:y(e,a)})),r=D.lastIndex;return r180?f+=360:f-c>180&&(c+=360),p.push({i:l.push(a(l)+"rotate(",null,e)-2,x:y(c,f)})):f&&l.push(a(l)+"rotate("+f+e)}function o(c,f,l,p){c!==f?p.push({i:l.push(a(l)+"skewX(",null,e)-2,x:y(c,f)}):f&&l.push(a(l)+"skewX("+f+e)}function s(c,f,l,p,v,M){if(c!==l||f!==p){var g=v.push(a(v)+"scale(",null,",",null,")");M.push({i:g-4,x:y(c,l)},{i:g-2,x:y(f,p)})}else(l!==1||p!==1)&&v.push(a(v)+"scale("+l+","+p+")")}return function(c,f){var l=[],p=[];return c=t(c),f=t(f),i(c.translateX,c.translateY,f.translateX,f.translateY,l,p),u(c.rotate,f.rotate,l,p),o(c.skewX,f.skewX,l,p),s(c.scaleX,c.scaleY,f.scaleX,f.scaleY,l,p),c=f=null,function(v){for(var M=-1,g=p.length,x;++M=0))throw new Error(`invalid digits: ${$}`);if(t>15)return A;const h=10**t;return function(s){this._+=s[0];for(let i=1,_=s.length;i<_;++i)this._+=Math.round(arguments[i]*h)/h+s[i]}}class d{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?A:C(t)}moveTo(t,h){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+h}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,h){this._append`L${this._x1=+t},${this._y1=+h}`}quadraticCurveTo(t,h,s,i){this._append`Q${+t},${+h},${this._x1=+s},${this._y1=+i}`}bezierCurveTo(t,h,s,i,_,e){this._append`C${+t},${+h},${+s},${+i},${this._x1=+_},${this._y1=+e}`}arcTo(t,h,s,i,_){if(t=+t,h=+h,s=+s,i=+i,_=+_,_<0)throw new Error(`negative radius: ${_}`);let e=this._x1,u=this._y1,p=s-t,r=i-h,n=e-t,o=u-h,a=n*n+o*o;if(this._x1===null)this._append`M${this._x1=t},${this._y1=h}`;else if(a>l)if(!(Math.abs(o*p-r*n)>l)||!_)this._append`L${this._x1=t},${this._y1=h}`;else{let x=s-e,y=i-u,w=p*p+r*r,m=x*x+y*y,g=Math.sqrt(w),v=Math.sqrt(a),b=_*Math.tan((c-Math.acos((w+a-m)/(2*g*v)))/2),M=b/v,T=b/g;Math.abs(M-1)>l&&this._append`L${t+M*n},${h+M*o}`,this._append`A${_},${_},0,0,${+(o*x>n*y)},${this._x1=t+T*p},${this._y1=h+T*r}`}}arc(t,h,s,i,_,e){if(t=+t,h=+h,s=+s,e=!!e,s<0)throw new Error(`negative radius: ${s}`);let u=s*Math.cos(i),p=s*Math.sin(i),r=t+u,n=h+p,o=1^e,a=e?i-_:_-i;this._x1===null?this._append`M${r},${n}`:(Math.abs(this._x1-r)>l||Math.abs(this._y1-n)>l)&&this._append`L${r},${n}`,s&&(a<0&&(a=a%f+f),a>q?this._append`A${s},${s},0,1,${o},${t-u},${h-p}A${s},${s},0,1,${o},${this._x1=r},${this._y1=n}`:a>l&&this._append`A${s},${s},0,${+(a>=c)},${o},${this._x1=t+s*Math.cos(_)},${this._y1=h+s*Math.sin(_)}`)}rect(t,h,s,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+h}h${s=+s}v${+i}h${-s}Z`}toString(){return this._}}function L(){return new d}L.prototype=d.prototype;function E($=3){return new d(+$)}export{d as Path,L as path,E as pathRound}; diff --git a/docs/_node/d3-polygon@3.0.1/index.b64a6d51.js b/docs/_node/d3-polygon@3.0.1/index.b64a6d51.js new file mode 100644 index 0000000..8978218 --- /dev/null +++ b/docs/_node/d3-polygon@3.0.1/index.b64a6d51.js @@ -0,0 +1 @@ +function a(n){for(var o=-1,t=n.length,r,l=n[t-1],u=0;++o1&&y(n[t[r-2]],n[t[r-1]],n[l])<=0;)--r;t[r++]=l}return t.slice(0,r)}function A(n){if((t=n.length)<3)return null;var o,t,r=new Array(t),l=new Array(t);for(o=0;o=0;--o)e.push(n[r[u[o]][2]]);for(o=+h;ou!=h>u&&l<(f-g)*(u-e)/(h-e)+g&&(s=!s),f=g,h=e;return s}function w(n){for(var o=-1,t=n.length,r=n[t-1],l,u,f=r[0],h=r[1],g=0;++o=(_=(u+a)/2))?u=_:a=_,(c=r>=(f=(o+l)/2))?o=f:l=f,i=h,!(h=h[v=c<<1|w]))return i[v]=s,n;if(x=+n._x.call(null,h.data),y=+n._y.call(null,h.data),t===x&&r===y)return s.next=h,i?i[v]=s:n._root=s,n;do i=i?i[v]=new Array(4):n._root=new Array(4),(w=t>=(_=(u+a)/2))?u=_:a=_,(c=r>=(f=(o+l)/2))?o=f:l=f;while((v=c<<1|w)===(g=(y>=f)<<1|x>=_));return i[g]=h,i[v]=s,n}function z(n){var t,r,e=n.length,i,h,s=new Array(e),u=new Array(e),o=1/0,a=1/0,l=-1/0,_=-1/0;for(r=0;rl&&(l=i),h_&&(_=h));if(o>l||a>_)return this;for(this.cover(o,a).cover(l,_),r=0;rn||n>=i||e>t||t>=h;)switch(a=(tl||(u=y.y0)>_||(o=y.x1)=v)<<1|n>=c)&&(y=f[f.length-1],f[f.length-1]=f[f.length-1-w],f[f.length-1-w]=y)}else{var g=n-+this._x.call(null,x.data),$=t-+this._y.call(null,x.data),m=g*g+$*$;if(m=(f=(s+o)/2))?s=f:o=f,(w=_>=(x=(u+a)/2))?u=x:a=x,t=r,!(r=r[c=w<<1|y]))return this;if(!r.length)break;(t[c+1&3]||t[c+2&3]||t[c+3&3])&&(e=t,v=c)}for(;r.data!==n;)if(i=r,!(r=r.next))return this;return(h=r.next)&&delete r.next,i?(h?i.next=h:delete i.next,this):t?(h?t[c]=h:delete t[c],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(e?e[v]=r:this._root=r),this):(this._root=h,this)}function E(n){for(var t=0,r=n.length;t1);return n+r*c*Math.sqrt(-2*Math.log(e)/e)}}return u.source=a,u}(l),L=function a(t){var u=M.source(t);function n(){var r=u.apply(this,arguments);return function(){return Math.exp(r())}}return n.source=a,n}(l),w=function a(t){function u(n){return(n=+n)<=0?()=>0:function(){for(var r=0,o=n;o>1;--o)r+=t();return r+o*t()}}return u.source=a,u}(l),P=function a(t){var u=w.source(t);function n(r){if((r=+r)==0)return t;var o=u(r);return function(){return o()/r}}return n.source=a,n}(l),b=function a(t){function u(n){return function(){return-Math.log1p(-t())/n}}return u.source=a,u}(l),q=function a(t){function u(n){if((n=+n)<0)throw new RangeError("invalid alpha");return n=1/-n,function(){return Math.pow(1-t(),n)}}return u.source=a,u}(l),y=function a(t){function u(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+n)}}return u.source=a,u}(l),$=function a(t){function u(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return n===0?()=>1/0:n===1?()=>1:(n=Math.log1p(-n),function(){return 1+Math.floor(Math.log1p(-t())/n)})}return u.source=a,u}(l),d=function a(t){var u=M.source(t)();function n(r,o){if((r=+r)<0)throw new RangeError("invalid k");if(r===0)return()=>0;if(o=o==null?1:+o,r===1)return()=>-Math.log1p(-t())*o;var e=(r<1?r+1:r)-1/3,c=1/(3*Math.sqrt(e)),f=r<1?()=>Math.pow(t(),1/r):()=>1;return function(){do{do var i=u(),s=1+c*i;while(s<=0);s*=s*s;var v=1-t()}while(v>=1-.0331*i*i*i*i&&Math.log(v)>=.5*i*i+e*(1-s+Math.log(s)));return e*s*f()*o}}return n.source=a,n}(l),E=function a(t){var u=d.source(t);function n(r,o){var e=u(r),c=u(o);return function(){var f=e();return f===0?0:f/(f+c())}}return n.source=a,n}(l),B=function a(t){var u=$.source(t),n=E.source(t);function r(o,e){return o=+o,(e=+e)>=1?()=>o:e<=0?()=>0:function(){for(var c=0,f=o,i=e;f*i>16&&f*(1-i)>16;){var s=Math.floor((f+1)*i),v=n(s,f-s+1)();v<=i?(c+=s,f-=s,i=(i-v)/(1-v)):(f=s-1,i/=v)}for(var m=i<.5,x=m?i:1-i,g=u(x),p=g(),h=0;p<=f;++h)p+=g();return c+(m?h:f-h)}}return r.source=a,r}(l),N=function a(t){function u(n,r,o){var e;return(n=+n)==0?e=c=>-Math.log(c):(n=1/n,e=c=>Math.pow(c,n)),r=r==null?0:+r,o=o==null?1:+o,function(){return r+o*e(-Math.log1p(-t()))}}return u.source=a,u}(l),k=function a(t){function u(n,r){return n=n==null?0:+n,r=r==null?1:+r,function(){return n+r*Math.tan(Math.PI*t())}}return u.source=a,u}(l),C=function a(t){function u(n,r){return n=n==null?0:+n,r=r==null?1:+r,function(){var o=t();return n+r*Math.log(o/(1-o))}}return u.source=a,u}(l),H=function a(t){var u=d.source(t),n=B.source(t);function r(o){return function(){for(var e=0,c=o;c>16;){var f=Math.floor(.875*c),i=u(f)();if(i>c)return e+n(f-1,c/i)();e+=f,c-=i}for(var s=-Math.log1p(-t()),v=0;s<=c;++v)s-=Math.log1p(-t());return e+v}}return r.source=a,r}(l);const R=23283064365386963e-26;function U(a=Math.random()){let t=(0<=a&&a<1?a/R:Math.abs(a))|0;return()=>(t=1664525*t+1013904223|0,R*(t>>>0))}export{P as randomBates,y as randomBernoulli,E as randomBeta,B as randomBinomial,k as randomCauchy,b as randomExponential,d as randomGamma,$ as randomGeometric,I as randomInt,w as randomIrwinHall,U as randomLcg,L as randomLogNormal,C as randomLogistic,M as randomNormal,q as randomPareto,H as randomPoisson,G as randomUniform,N as randomWeibull}; diff --git a/docs/_node/d3-scale-chromatic@3.1.0/index.7961cbed.js b/docs/_node/d3-scale-chromatic@3.1.0/index.7961cbed.js new file mode 100644 index 0000000..ef1dfe0 --- /dev/null +++ b/docs/_node/d3-scale-chromatic@3.1.0/index.7961cbed.js @@ -0,0 +1 @@ +import{interpolateRgbBasis as V,interpolateCubehelixLong as o}from"../d3-interpolate@3.0.1/index.7ed7c7fe.js";import{cubehelix as c,rgb as W}from"../d3-color@3.1.0/index.e8c126ff.js";function e(f){for(var d=f.length/6|0,b=new Array(d),r=0;rV(f[f.length-1]),m=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(e),X=a(m),h=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(e),Z=a(h),i=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(e),_=a(i),p=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(e),ff=a(p),l=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(e),ef=a(l),$=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(e),af=a($),u=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(e),df=a(u),v=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(e),cf=a(v),M=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(e),bf=a(M),y=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(e),rf=a(y),w=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(e),tf=a(w),A=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(e),nf=a(A),B=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(e),sf=a(B),P=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(e),of=a(P),G=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(e),mf=a(G),R=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(e),hf=a(R),Y=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(e),pf=a(Y),g=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(e),lf=a(g),x=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(e),$f=a(x),O=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(e),uf=a(O),S=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(e),vf=a(S),C=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(e),Mf=a(C),I=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(e),yf=a(I),D=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(e),wf=a(D),T=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(e),Af=a(T),k=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(e),Bf=a(k),L=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(e),Pf=a(L);function Gf(f){return f=Math.max(0,Math.min(1,f)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-f*(35.34-f*(2381.73-f*(6402.7-f*(7024.72-f*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+f*(170.73+f*(52.82-f*(131.46-f*(176.58-f*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+f*(442.36-f*(2482.43-f*(6167.24-f*(6614.94-f*2475.67)))))))+")"}var Rf=o(c(300,.5,0),c(-240,.5,1)),Yf=o(c(-100,.75,.35),c(80,1.5,.8)),gf=o(c(260,.75,.35),c(80,1.5,.8)),t=c();function xf(f){(f<0||f>1)&&(f-=Math.floor(f));var d=Math.abs(f-.5);return t.h=360*f-100,t.s=1.5-1.5*d,t.l=.8-.9*d,t+""}var n=W(),Of=Math.PI/3,Sf=Math.PI*2/3;function Cf(f){var d;return f=(.5-f)*Math.PI,n.r=255*(d=Math.sin(f))*d,n.g=255*(d=Math.sin(f+Of))*d,n.b=255*(d=Math.sin(f+Sf))*d,n+""}function If(f){return f=Math.max(0,Math.min(1,f)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+f*(1172.33-f*(10793.56-f*(33300.12-f*(38394.49-f*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+f*(557.33+f*(1225.33-f*(3574.96-f*(1073.77+f*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+f*(3211.1-f*(15327.97-f*(27814-f*(22569.18-f*6838.66)))))))+")"}function s(f){var d=f.length;return function(b){return f[Math.max(0,Math.min(d-1,Math.floor(b*d)))]}}var Df=s(e("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Tf=s(e("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),kf=s(e("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Lf=s(e("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));export{Mf as interpolateBlues,X as interpolateBrBG,rf as interpolateBuGn,tf as interpolateBuPu,Gf as interpolateCividis,gf as interpolateCool,Rf as interpolateCubehelixDefault,nf as interpolateGnBu,yf as interpolateGreens,wf as interpolateGreys,kf as interpolateInferno,Tf as interpolateMagma,sf as interpolateOrRd,Pf as interpolateOranges,Z as interpolatePRGn,_ as interpolatePiYG,Lf as interpolatePlasma,mf as interpolatePuBu,of as interpolatePuBuGn,ff as interpolatePuOr,hf as interpolatePuRd,Af as interpolatePurples,xf as interpolateRainbow,ef as interpolateRdBu,af as interpolateRdGy,pf as interpolateRdPu,df as interpolateRdYlBu,cf as interpolateRdYlGn,Bf as interpolateReds,Cf as interpolateSinebow,bf as interpolateSpectral,If as interpolateTurbo,Df as interpolateViridis,Yf as interpolateWarm,$f as interpolateYlGn,lf as interpolateYlGnBu,uf as interpolateYlOrBr,vf as interpolateYlOrRd,q as schemeAccent,C as schemeBlues,m as schemeBrBG,y as schemeBuGn,w as schemeBuPu,j as schemeCategory10,z as schemeDark2,A as schemeGnBu,I as schemeGreens,D as schemeGreys,E as schemeObservable10,B as schemeOrRd,L as schemeOranges,h as schemePRGn,F as schemePaired,H as schemePastel1,J as schemePastel2,i as schemePiYG,G as schemePuBu,P as schemePuBuGn,p as schemePuOr,R as schemePuRd,T as schemePurples,l as schemeRdBu,$ as schemeRdGy,Y as schemeRdPu,u as schemeRdYlBu,v as schemeRdYlGn,k as schemeReds,K as schemeSet1,N as schemeSet2,Q as schemeSet3,M as schemeSpectral,U as schemeTableau10,x as schemeYlGn,g as schemeYlGnBu,O as schemeYlOrBr,S as schemeYlOrRd}; diff --git a/docs/_node/d3-scale@4.0.2/index.61617510.js b/docs/_node/d3-scale@4.0.2/index.61617510.js new file mode 100644 index 0000000..ded7da5 --- /dev/null +++ b/docs/_node/d3-scale@4.0.2/index.61617510.js @@ -0,0 +1 @@ +import{InternMap as J,range as An,bisect as b,tickStep as qn,ticks as O,tickIncrement as Dn,ascending as K,quantileSorted as In,quantile as Rn}from"../d3-array@3.2.4/index.f89e3560.js";import{interpolateNumber as Fn,interpolate as T,interpolateRound as E,piecewise as On}from"../d3-interpolate@3.0.1/index.7ed7c7fe.js";import{formatSpecifier as V,precisionFixed as Tn,precisionRound as En,precisionPrefix as Pn,formatPrefix as Ln,format as X}from"../d3-format@3.1.0/index.75f84505.js";import{timeSecond as Bn,timeMinute as Yn,timeHour as Cn,timeDay as Qn,timeWeek as Un,timeMonth as zn,timeYear as Hn,timeTickInterval as Wn,timeTicks as jn,utcSecond as Gn,utcMinute as Jn,utcHour as Kn,utcDay as Vn,utcWeek as Xn,utcMonth as Zn,utcYear as _n,utcTickInterval as nt,utcTicks as tt}from"../d3-time@3.1.0/index.8fcc123e.js";import{timeFormat as rt,utcFormat as et}from"../d3-time-format@4.1.0/index.20c5f3ca.js";function M(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n);break}return this}function x(n,t){switch(arguments.length){case 0:break;case 1:{typeof n=="function"?this.interpolator(n):this.range(n);break}default:{this.domain(n),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const P=Symbol("implicit");function L(){var n=new J,t=[],a=[],r=P;function u(e){let i=n.get(e);if(i===void 0){if(r!==P)return r;n.set(e,i=t.push(e)-1)}return a[i%a.length]}return u.domain=function(e){if(!arguments.length)return t.slice();t=[],n=new J;for(const i of e)n.has(i)||n.set(i,t.push(i)-1);return u},u.range=function(e){return arguments.length?(a=Array.from(e),u):a.slice()},u.unknown=function(e){return arguments.length?(r=e,u):r},u.copy=function(){return L(t,a).unknown(r)},M.apply(u,arguments),u}function B(){var n=L().unknown(void 0),t=n.domain,a=n.range,r=0,u=1,e,i,l=!1,s=0,o=0,g=.5;delete n.unknown;function f(){var c=t().length,p=ut&&(a=n,n=t,t=a),function(r){return Math.max(n,Math.min(t,r))}}function ot(n,t,a){var r=n[0],u=n[1],e=t[0],i=t[1];return u2?ct:ot,s=o=null,f}function f(c){return c==null||isNaN(c=+c)?e:(s||(s=l(n.map(r),t,a)))(r(i(c)))}return f.invert=function(c){return i(u((o||(o=l(t,n.map(r),Fn)))(c)))},f.domain=function(c){return arguments.length?(n=Array.from(c,D),g()):n.slice()},f.range=function(c){return arguments.length?(t=Array.from(c),g()):t.slice()},f.rangeRound=function(c){return t=Array.from(c),a=E,g()},f.clamp=function(c){return arguments.length?(i=c?!0:y,g()):i!==y},f.interpolate=function(c){return arguments.length?(a=c,g()):a},f.unknown=function(c){return arguments.length?(e=c,f):e},function(c,p){return r=c,u=p,g()}}function C(){return I()(y,y)}function nn(n,t,a,r){var u=qn(n,t,a),e;switch(r=V(r??",f"),r.type){case"s":{var i=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(e=Pn(u,i))&&(r.precision=e),Ln(r,i)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(e=En(u,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=e-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(e=Tn(u))&&(r.precision=e-(r.type==="%")*2);break}}return X(r)}function N(n){var t=n.domain;return n.ticks=function(a){var r=t();return O(r[0],r[r.length-1],a??10)},n.tickFormat=function(a,r){var u=t();return nn(u[0],u[u.length-1],a??10,r)},n.nice=function(a){a==null&&(a=10);var r=t(),u=0,e=r.length-1,i=r[u],l=r[e],s,o,g=10;for(l0;){if(o=Dn(i,l,a),o===s)return r[u]=i,r[e]=l,t(r);if(o>0)i=Math.floor(i/o)*o,l=Math.ceil(l/o)*o;else if(o<0)i=Math.ceil(i*o)/o,l=Math.floor(l*o)/o;else break;s=o}return n},n}function tn(){var n=C();return n.copy=function(){return S(n,tn())},M.apply(n,arguments),N(n)}function rn(n){var t;function a(r){return r==null||isNaN(r=+r)?t:r}return a.invert=a,a.domain=a.range=function(r){return arguments.length?(n=Array.from(r,D),a):n.slice()},a.unknown=function(r){return arguments.length?(t=r,a):t},a.copy=function(){return rn(n).unknown(t)},n=arguments.length?Array.from(n,D):[0,1],N(a)}function en(n,t){n=n.slice();var a=0,r=n.length-1,u=n[a],e=n[r],i;return eMath.pow(n,t)}function mt(n){return n===Math.E?Math.log:n===10&&Math.log10||n===2&&Math.log2||(n=Math.log(n),t=>Math.log(t)/n)}function on(n){return(t,a)=>-n(-t,a)}function Q(n){const t=n(un,an),a=t.domain;let r=10,u,e;function i(){return u=mt(r),e=gt(r),a()[0]<0?(u=on(u),e=on(e),n(lt,st)):n(un,an),t}return t.base=function(l){return arguments.length?(r=+l,i()):r},t.domain=function(l){return arguments.length?(a(l),i()):a()},t.ticks=l=>{const s=a();let o=s[0],g=s[s.length-1];const f=g0){for(;c<=p;++c)for(d=1;dg)break;v.push(m)}}else for(;c<=p;++c)for(d=r-1;d>=1;--d)if(m=c>0?d/e(-c):d*e(c),!(mg)break;v.push(m)}v.length*2{if(l==null&&(l=10),s==null&&(s=r===10?"s":","),typeof s!="function"&&(!(r%1)&&(s=V(s)).precision==null&&(s.trim=!0),s=X(s)),l===1/0)return s;const o=Math.max(1,r*l/t.ticks().length);return g=>{let f=g/e(Math.round(u(g)));return f*ra(en(a(),{floor:l=>e(Math.floor(u(l))),ceil:l=>e(Math.ceil(u(l)))})),t}function cn(){const n=Q(I()).domain([1,10]);return n.copy=()=>S(n,cn()).base(n.base()),M.apply(n,arguments),n}function ln(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function sn(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function U(n){var t=1,a=n(ln(t),sn(t));return a.constant=function(r){return arguments.length?n(ln(t=+r),sn(t)):t},N(a)}function fn(){var n=U(I());return n.copy=function(){return S(n,fn()).constant(n.constant())},M.apply(n,arguments)}function gn(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function pt(n){return n<0?-Math.sqrt(-n):Math.sqrt(n)}function ht(n){return n<0?-n*n:n*n}function z(n){var t=n(y,y),a=1;function r(){return a===1?n(y,y):a===.5?n(pt,ht):n(gn(a),gn(1/a))}return t.exponent=function(u){return arguments.length?(a=+u,r()):a},N(t)}function H(){var n=z(I());return n.copy=function(){return S(n,H()).exponent(n.exponent())},M.apply(n,arguments),n}function dt(){return H.apply(null,arguments).exponent(.5)}function mn(n){return Math.sign(n)*n*n}function yt(n){return Math.sign(n)*Math.sqrt(Math.abs(n))}function pn(){var n=C(),t=[0,1],a=!1,r;function u(e){var i=yt(n(e));return isNaN(i)?r:a?Math.round(i):i}return u.invert=function(e){return n.invert(mn(e))},u.domain=function(e){return arguments.length?(n.domain(e),u):n.domain()},u.range=function(e){return arguments.length?(n.range((t=Array.from(e,D)).map(mn)),u):t.slice()},u.rangeRound=function(e){return u.range(e).round(!0)},u.round=function(e){return arguments.length?(a=!!e,u):a},u.clamp=function(e){return arguments.length?(n.clamp(e),u):n.clamp()},u.unknown=function(e){return arguments.length?(r=e,u):r},u.copy=function(){return pn(n.domain(),t).round(a).clamp(n.clamp()).unknown(r)},M.apply(u,arguments),N(u)}function hn(){var n=[],t=[],a=[],r;function u(){var i=0,l=Math.max(1,t.length);for(a=new Array(l-1);++i0?a[l-1]:n[0],l=a?[r[a-1],t]:[r[o-1],r[o]]},i.unknown=function(s){return arguments.length&&(e=s),i},i.thresholds=function(){return r.slice()},i.copy=function(){return dn().domain([n,t]).range(u).unknown(e)},M.apply(N(i),arguments)}function yn(){var n=[.5],t=[0,1],a,r=1;function u(e){return e!=null&&e<=e?t[b(n,e,0,r)]:a}return u.domain=function(e){return arguments.length?(n=Array.from(e),r=Math.min(n.length,t.length-1),u):n.slice()},u.range=function(e){return arguments.length?(t=Array.from(e),r=Math.min(n.length,t.length-1),u):t.slice()},u.invertExtent=function(e){var i=t.indexOf(e);return[n[i-1],n[i]]},u.unknown=function(e){return arguments.length?(a=e,u):a},u.copy=function(){return yn().domain(n).range(t).unknown(a)},M.apply(u,arguments)}function vt(n){return new Date(n)}function Mt(n){return n instanceof Date?+n:+new Date(+n)}function W(n,t,a,r,u,e,i,l,s,o){var g=C(),f=g.invert,c=g.domain,p=o(".%L"),d=o(":%S"),m=o("%I:%M"),k=o("%I %p"),v=o("%a %d"),A=o("%b %d"),q=o("%B"),bn=o("%Y");function Sn(h){return(s(h)t(u/(n.length-1)))},a.quantiles=function(r){return Array.from({length:r+1},(u,e)=>Rn(n,e/r))},a.copy=function(){return wn(t).domain(n)},x.apply(a,arguments)}function F(){var n=0,t=.5,a=1,r=1,u,e,i,l,s,o=y,g,f=!1,c;function p(m){return isNaN(m=+m)?c:(m=.5+((m=+g(m))-e)*(r*m=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),w.hasOwnProperty(n)?{space:w[n],local:t}:t}function F(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===$&&n.documentElement.namespaceURI===$?n.createElement(t):n.createElementNS(e,t)}}function J(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function d(t){var n=A(t);return(n.local?J:F)(n)}function Q(){}function x(t){return t==null?Q:function(){return this.querySelector(t)}}function W(t){typeof t!="function"&&(t=x(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r=y&&(y=m+1);!(P=L[y])&&++y=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function At(t){t||(t=xt);function n(p,_){return p&&_?t(p.__data__,_.__data__):!p-!_}for(var e=this._groups,i=e.length,r=new Array(i),o=0;on?1:t>=n?0:NaN}function St(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function bt(){return Array.from(this)}function Et(){for(var t=this._groups,n=0,e=t.length;n1?this.each((n==null?Rt:typeof n=="function"?It:Vt)(t,n,e??"")):R(this.node(),t)}function R(t,n){return t.style.getPropertyValue(n)||S(t).getComputedStyle(t,null).getPropertyValue(n)}function Ht(t){return function(){delete this[t]}}function Ut(t,n){return function(){this[t]=n}}function Xt(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Gt(t,n){return arguments.length>1?this.each((n==null?Ht:typeof n=="function"?Xt:Ut)(t,n)):this.node()[t]}function V(t){return t.trim().split(/^|\s+/)}function b(t){return t.classList||new I(t)}function I(t){this._node=t,this._names=V(t.getAttribute("class")||"")}I.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function j(t,n){for(var e=b(t),i=-1,r=n.length;++i=0&&(e=n.slice(i+1),n=n.slice(0,i)),{type:n,name:e}})}function vn(t){return function(){var n=this.__on;if(n){for(var e=0,i=-1,r=n.length,o;ez(e,n))}function Pn(t){return typeof t=="string"?new f([document.querySelectorAll(t)],[document.documentElement]):new f([q(t)],E)}export{Cn as create,d as creator,Y as local,M as matcher,A as namespace,w as namespaces,z as pointer,Bn as pointers,G as select,Pn as selectAll,Nn as selection,x as selector,T as selectorAll,R as style,S as window}; diff --git a/docs/_node/d3-shape@3.2.0/index.b551bc1c.js b/docs/_node/d3-shape@3.2.0/index.b551bc1c.js new file mode 100644 index 0000000..59aa693 --- /dev/null +++ b/docs/_node/d3-shape@3.2.0/index.b551bc1c.js @@ -0,0 +1 @@ +import{Path as $n}from"../d3-path@3.1.0/index.c2b3c473.js";function f(t){return function(){return t}}const Rt=Math.abs,w=Math.atan2,X=Math.cos,kn=Math.max,H=Math.min,A=Math.sin,d=Math.sqrt,S=1e-12,D=Math.PI,et=D/2,F=2*D;function wn(t){return t>1?0:t<-1?D:Math.acos(t)}function zt(t){return t>=1?et:t<=-1?-et:Math.asin(t)}function Z(t){let n=3;return t.digits=function(i){if(!arguments.length)return n;if(i==null)n=null;else{const e=Math.floor(i);if(!(e>=0))throw new RangeError(`invalid digits: ${i}`);n=e}return t},()=>new $n(n)}function Sn(t){return t.innerRadius}function Nn(t){return t.outerRadius}function En(t){return t.startAngle}function An(t){return t.endAngle}function Pn(t){return t&&t.padAngle}function Mn(t,n,i,e,h,o,a,s){var _=i-t,r=e-n,c=a-h,u=s-o,l=u*_-c*r;if(!(l*lm*m+L*L&&(q=R,Y=P),{cx:q,cy:Y,x01:-c,y01:-u,x11:q*(h/N-1),y11:Y*(h/N-1)}}function Cn(){var t=Sn,n=Nn,i=f(0),e=null,h=En,o=An,a=Pn,s=null,_=Z(r);function r(){var c,u,l=+t.apply(this,arguments),x=+n.apply(this,arguments),v=h.apply(this,arguments)-et,g=o.apply(this,arguments)-et,$=Rt(g-v),p=g>v;if(s||(s=c=_()),xS))s.moveTo(0,0);else if($>F-S)s.moveTo(x*X(v),x*A(v)),s.arc(0,0,x,v,g,!p),l>S&&(s.moveTo(l*X(g),l*A(g)),s.arc(0,0,l,g,v,p));else{var k=v,b=g,T=v,N=g,E=$,B=$,q=a.apply(this,arguments)/2,Y=q>S&&(e?+e.apply(this,arguments):d(l*l+x*x)),R=H(Rt(x-l)/2,+i.apply(this,arguments)),P=R,M=R,y,m;if(Y>S){var L=zt(Y/l*A(q)),K=zt(Y/x*A(q));(E-=L*2)>S?(L*=p?1:-1,T+=L,N-=L):(E=0,T=N=(v+g)/2),(B-=K*2)>S?(K*=p?1:-1,k+=K,b-=K):(B=0,k=b=(v+g)/2)}var W=x*X(k),j=x*A(k),J=l*X(N),tt=l*A(N);if(R>S){var nt=x*X(b),it=x*A(b),yt=l*X(T),xt=l*A(T),z;if($S?M>S?(y=st(yt,xt,W,j,x,M,p),m=st(nt,it,J,tt,x,M,p),s.moveTo(y.cx+y.x01,y.cy+y.y01),MS)||!(E>S)?s.lineTo(J,tt):P>S?(y=st(J,tt,nt,it,l,-P,p),m=st(W,j,yt,xt,l,-P,p),s.lineTo(y.cx+y.x01,y.cy+y.y01),P=x;--v)s.point(b[v],T[v]);s.lineEnd(),s.areaEnd()}p&&(b[l]=+t($,l,u),T[l]=+n($,l,u),s.point(e?+e($,l,u):b[l],i?+i($,l,u):T[l]))}if(k)return s=null,k+""||null}function c(){return bt().defined(h).curve(a).context(o)}return r.x=function(u){return arguments.length?(t=typeof u=="function"?u:f(+u),e=null,r):t},r.x0=function(u){return arguments.length?(t=typeof u=="function"?u:f(+u),r):t},r.x1=function(u){return arguments.length?(e=u==null?null:typeof u=="function"?u:f(+u),r):e},r.y=function(u){return arguments.length?(n=typeof u=="function"?u:f(+u),i=null,r):n},r.y0=function(u){return arguments.length?(n=typeof u=="function"?u:f(+u),r):n},r.y1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:f(+u),r):i},r.lineX0=r.lineY0=function(){return c().x(t).y(n)},r.lineY1=function(){return c().x(t).y(i)},r.lineX1=function(){return c().x(e).y(n)},r.defined=function(u){return arguments.length?(h=typeof u=="function"?u:f(!!u),r):h},r.curve=function(u){return arguments.length?(a=u,o!=null&&(s=a(o)),r):a},r.context=function(u){return arguments.length?(u==null?o=s=null:s=a(o=u),r):o},r}function Rn(t,n){return nt?1:n>=t?0:NaN}function zn(t){return t}function Xn(){var t=zn,n=Rn,i=null,e=f(0),h=f(F),o=f(0);function a(s){var _,r=(s=ot(s)).length,c,u,l=0,x=new Array(r),v=new Array(r),g=+e.apply(this,arguments),$=Math.min(F,Math.max(-F,h.apply(this,arguments)-g)),p,k=Math.min(Math.abs($)/r,o.apply(this,arguments)),b=k*($<0?-1:1),T;for(_=0;_0&&(l+=T);for(n!=null?x.sort(function(N,E){return n(v[N],v[E])}):i!=null&&x.sort(function(N,E){return i(s[N],s[E])}),_=0,u=l?($-r*b)/l:0;_0?T*u:0)+b,v[c]={data:s[c],index:_,value:T,startAngle:g,endAngle:p,padAngle:k};return v}return a.value=function(s){return arguments.length?(t=typeof s=="function"?s:f(+s),a):t},a.sortValues=function(s){return arguments.length?(n=s,i=null,a):n},a.sort=function(s){return arguments.length?(i=s,n=null,a):i},a.startAngle=function(s){return arguments.length?(e=typeof s=="function"?s:f(+s),a):e},a.endAngle=function(s){return arguments.length?(h=typeof s=="function"?s:f(+s),a):h},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:f(+s),a):o},a}var qt=$t(ht);function Yt(t){this._curve=t}Yt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};function $t(t){function n(i){return new Yt(t(i))}return n._curve=t,n}function Q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(i){return arguments.length?n($t(i)):n()._curve},t}function Dt(){return Q(bt().curve(qt))}function Ft(){var t=Bt().curve(qt),n=t.curve,i=t.lineX0,e=t.lineX1,h=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Q(i())},delete t.lineX0,t.lineEndAngle=function(){return Q(e())},delete t.lineX1,t.lineInnerRadius=function(){return Q(h())},delete t.lineY0,t.lineOuterRadius=function(){return Q(o())},delete t.lineY1,t.curve=function(a){return arguments.length?n($t(a)):n()._curve},t}function U(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}let It=class{constructor(n,i){this._context=n,this._x=i}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,i){switch(n=+n,i=+i,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,i,n,i):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+i)/2,n,this._y0,n,i);break}}this._x0=n,this._y0=i}},Bn=class{constructor(n){this._context=n}lineStart(){this._point=0}lineEnd(){}point(n,i){if(n=+n,i=+i,this._point===0)this._point=1;else{const e=U(this._x0,this._y0),h=U(this._x0,this._y0=(this._y0+i)/2),o=U(n,this._y0),a=U(n,i);this._context.moveTo(...e),this._context.bezierCurveTo(...h,...o,...a)}this._x0=n,this._y0=i}};function Lt(t){return new It(t,!0)}function Wt(t){return new It(t,!1)}function qn(t){return new Bn(t)}function Yn(t){return t.source}function Dn(t){return t.target}function at(t){let n=Yn,i=Dn,e=dt,h=Tt,o=null,a=null,s=Z(_);function _(){let r;const c=On.call(arguments),u=n.apply(this,c),l=i.apply(this,c);if(o==null&&(a=t(r=s())),a.lineStart(),c[0]=u,a.point(+e.apply(this,c),+h.apply(this,c)),c[0]=l,a.point(+e.apply(this,c),+h.apply(this,c)),a.lineEnd(),r)return a=null,r+""||null}return _.source=function(r){return arguments.length?(n=r,_):n},_.target=function(r){return arguments.length?(i=r,_):i},_.x=function(r){return arguments.length?(e=typeof r=="function"?r:f(+r),_):e},_.y=function(r){return arguments.length?(h=typeof r=="function"?r:f(+r),_):h},_.context=function(r){return arguments.length?(r==null?o=a=null:a=t(o=r),_):o},_}function Fn(){return at(Lt)}function In(){return at(Wt)}function Ln(){const t=at(qn);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Wn=d(3);var jt={draw(t,n){const i=d(n+H(n/28,.75))*.59436,e=i/2,h=e*Wn;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-h,-e),t.lineTo(h,e),t.moveTo(-h,e),t.lineTo(h,-e)}},rt={draw(t,n){const i=d(n/D);t.moveTo(i,0),t.arc(0,0,i,0,F)}},Ht={draw(t,n){const i=d(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}};const Vt=d(1/3),jn=Vt*2;var Gt={draw(t,n){const i=d(n/jn),e=i*Vt;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Zt={draw(t,n){const i=d(n)*.62625;t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Qt={draw(t,n){const i=d(n-H(n/7,2))*.87559;t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},Ut={draw(t,n){const i=d(n),e=-i/2;t.rect(e,e,i,i)}},Kt={draw(t,n){const i=d(n)*.4431;t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}};const Hn=.8908130915292852,Jt=A(D/10)/A(7*D/10),Vn=A(F/10)*Jt,Gn=-X(F/10)*Jt;var tn={draw(t,n){const i=d(n*Hn),e=Vn*i,h=Gn*i;t.moveTo(0,-i),t.lineTo(e,h);for(let o=1;o<5;++o){const a=F*o/5,s=X(a),_=A(a);t.lineTo(_*i,-s*i),t.lineTo(s*e-_*h,_*e+s*h)}t.closePath()}};const kt=d(3);var nn={draw(t,n){const i=-d(n/(kt*3));t.moveTo(0,i*2),t.lineTo(-kt*i,-i),t.lineTo(kt*i,-i),t.closePath()}};const Zn=d(3);var en={draw(t,n){const i=d(n)*.6824,e=i/2,h=i*Zn/2;t.moveTo(0,-i),t.lineTo(h,e),t.lineTo(-h,e),t.closePath()}};const C=-.5,O=d(3)/2,wt=1/d(12),Qn=(wt/2+1)*3;var sn={draw(t,n){const i=d(n/Qn),e=i/2,h=i*wt,o=e,a=i*wt+i,s=-o,_=a;t.moveTo(e,h),t.lineTo(o,a),t.lineTo(s,_),t.lineTo(C*e-O*h,O*e+C*h),t.lineTo(C*o-O*a,O*o+C*a),t.lineTo(C*s-O*_,O*s+C*_),t.lineTo(C*e+O*h,C*h-O*e),t.lineTo(C*o+O*a,C*a-O*o),t.lineTo(C*s+O*_,C*_-O*s),t.closePath()}},St={draw(t,n){const i=d(n-H(n/6,1.7))*.6189;t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}};const on=[rt,Ht,Gt,Ut,tn,nn,sn],Un=[rt,Qt,St,en,jt,Kt,Zt];function Kn(t,n){let i=null,e=Z(h);t=typeof t=="function"?t:f(t||rt),n=typeof n=="function"?n:f(n===void 0?64:+n);function h(){let o;if(i||(i=o=e()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),o)return i=null,o+""||null}return h.type=function(o){return arguments.length?(t=typeof o=="function"?o:f(o),h):t},h.size=function(o){return arguments.length?(n=typeof o=="function"?o:f(+o),h):n},h.context=function(o){return arguments.length?(i=o??null,h):i},h}function I(){}function _t(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function ct(t){this._context=t}ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:_t(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_t(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function Jn(t){return new ct(t)}function hn(t){this._context=t}hn.prototype={areaStart:I,areaEnd:I,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:_t(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function ti(t){return new hn(t)}function an(t){this._context=t}an.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:_t(this,t,n);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function ni(t){return new an(t)}function rn(t,n){this._basis=new ct(t),this._beta=n}rn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e=t[0],h=n[0],o=t[i]-e,a=n[i]-h,s=-1,_;++s<=i;)_=s/i,this._basis.point(this._beta*t[s]+(1-this._beta)*(e+_*o),this._beta*n[s]+(1-this._beta)*(h+_*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var ii=function t(n){function i(e){return n===1?new ct(e):new rn(e,n)}return i.beta=function(e){return t(+e)},i}(.85);function ut(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ut(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:ut(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ei=function t(n){function i(e){return new Nt(e,n)}return i.tension=function(e){return t(+e)},i}(0);function Et(t,n){this._context=t,this._k=(1-n)/6}Et.prototype={areaStart:I,areaEnd:I,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:ut(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var si=function t(n){function i(e){return new Et(e,n)}return i.tension=function(e){return t(+e)},i}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ut(this,t,n);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var oi=function t(n){function i(e){return new At(e,n)}return i.tension=function(e){return t(+e)},i}(0);function Pt(t,n,i){var e=t._x1,h=t._y1,o=t._x2,a=t._y2;if(t._l01_a>S){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,_=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/_,h=(h*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/_}if(t._l23_a>S){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*r+t._x1*t._l23_2a-n*t._l12_2a)/c,a=(a*r+t._y1*t._l23_2a-i*t._l12_2a)/c}t._context.bezierCurveTo(e,h,o,a,t._x2,t._y2)}function _n(t,n){this._context=t,this._alpha=n}_n.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Pt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var hi=function t(n){function i(e){return n?new _n(e,n):new Nt(e,0)}return i.alpha=function(e){return t(+e)},i}(.5);function cn(t,n){this._context=t,this._alpha=n}cn.prototype={areaStart:I,areaEnd:I,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Pt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ai=function t(n){function i(e){return n?new cn(e,n):new Et(e,0)}return i.alpha=function(e){return t(+e)},i}(.5);function un(t,n){this._context=t,this._alpha=n}un.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pt(this,t,n);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ri=function t(n){function i(e){return n?new un(e,n):new At(e,0)}return i.alpha=function(e){return t(+e)},i}(.5);function ln(t){this._context=t}ln.prototype={areaStart:I,areaEnd:I,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function _i(t){return new ln(t)}function fn(t){return t<0?-1:1}function yn(t,n,i){var e=t._x1-t._x0,h=n-t._x1,o=(t._y1-t._y0)/(e||h<0&&-0),a=(i-t._y1)/(h||e<0&&-0),s=(o*h+a*e)/(e+h);return(fn(o)+fn(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function xn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Mt(t,n,i){var e=t._x0,h=t._y0,o=t._x1,a=t._y1,s=(o-e)/3;t._context.bezierCurveTo(e+s,h+s*n,o-s,a-s*i,o,a)}function lt(t){this._context=t}lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Mt(this,this._t0,xn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(t=+t,n=+n,!(t===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Mt(this,xn(this,i=yn(this,t,n)),i);break;default:Mt(this,this._t0,i=yn(this,t,n));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}};function pn(t){this._context=new vn(t)}(pn.prototype=Object.create(lt.prototype)).point=function(t,n){lt.prototype.point.call(this,n,t)};function vn(t){this._context=t}vn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,h,o){this._context.bezierCurveTo(n,t,e,i,o,h)}};function ci(t){return new lt(t)}function ui(t){return new pn(t)}function mn(t){this._context=t}mn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),i===2)this._context.lineTo(t[1],n[1]);else for(var e=gn(t),h=gn(n),o=0,a=1;a=0;--n)h[n]=(a[n]-h[n+1])/o[n];for(o[i-1]=(t[i]+h[i-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}break}}this._x=t,this._y=n}};function fi(t){return new ft(t,.5)}function yi(t){return new ft(t,0)}function xi(t){return new ft(t,1)}function V(t,n){if((a=t.length)>1)for(var i=1,e,h,o=t[n[0]],a,s=o.length;i=0;)i[n]=n;return i}function pi(t,n){return t[n]}function vi(t){const n=[];return n.key=t,n}function mi(){var t=f([]),n=G,i=V,e=pi;function h(o){var a=Array.from(t.apply(this,arguments),vi),s,_=a.length,r=-1,c;for(const u of o)for(s=0,++r;s<_;++s)(a[s][r]=[0,+e(u,a[s].key,r,o)]).data=u;for(s=0,c=ot(n(a));s<_;++s)a[c[s]].index=s;return i(a,c),a}return h.keys=function(o){return arguments.length?(t=typeof o=="function"?o:f(Array.from(o)),h):t},h.value=function(o){return arguments.length?(e=typeof o=="function"?o:f(+o),h):e},h.order=function(o){return arguments.length?(n=o==null?G:typeof o=="function"?o:f(Array.from(o)),h):n},h.offset=function(o){return arguments.length?(i=o??V,h):i},h}function gi(t,n){if((e=t.length)>0){for(var i,e,h=0,o=t[0].length,a;h0)for(var i,e=0,h,o,a,s,_,r=t[n[0]].length;e0?(h[0]=a,h[1]=a+=o):o<0?(h[1]=s,h[0]=s+=o):(h[0]=0,h[1]=o)}function Ti(t,n){if((h=t.length)>0){for(var i=0,e=t[n[0]],h,o=e.length;i0)||!((o=(h=t[n[0]]).length)>0))){for(var i=0,e=1,h,o,a;eo&&(o=h,i=n);return i}function Tn(t){var n=t.map(bn);return G(t).sort(function(i,e){return n[i]-n[e]})}function bn(t){for(var n=0,i=-1,e=t.length,h;++i53)return null;"w"in r||(r.w=1),"Z"in r?(f=V(S(r.y,0,1)),g=f.getUTCDay(),f=g>4||g===0?Z.ceil(f):Z(f),f=P.offset(f,(r.V-1)*7),r.y=f.getUTCFullYear(),r.m=f.getUTCMonth(),r.d=f.getUTCDate()+(r.w+6)%7):(f=b(S(r.y,0,1)),g=f.getDay(),f=g>4||g===0?W.ceil(f):W(f),f=Q.offset(f,(r.V-1)*7),r.y=f.getFullYear(),r.m=f.getMonth(),r.d=f.getDate()+(r.w+6)%7)}else("W"in r||"U"in r)&&("w"in r||(r.w="u"in r?r.u%7:"W"in r?1:0),g="Z"in r?V(S(r.y,0,1)).getUTCDay():b(S(r.y,0,1)).getDay(),r.m=0,r.d="W"in r?(r.w+6)%7+r.W*7-(g+5)%7:r.w+r.U*7-(g+6)%7);return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,V(r)):b(r)}}function A(i,o,c,r){for(var s=0,f=o.length,g=c.length,h,D;s=g)return-1;if(h=o.charCodeAt(s++),h===37){if(h=o.charAt(s++),D=Tn[h in I?o.charAt(s++):h],!D||(r=D(i,c,r))<0)return-1}else if(h!=c.charCodeAt(r++))return-1}return r}function Dn(i,o,c){var r=an.exec(o.slice(c));return r?(i.p=fn.get(r[0].toLowerCase()),c+r[0].length):-1}function Cn(i,o,c){var r=gn.exec(o.slice(c));return r?(i.w=hn.get(r[0].toLowerCase()),c+r[0].length):-1}function Mn(i,o,c){var r=ln.exec(o.slice(c));return r?(i.w=sn.get(r[0].toLowerCase()),c+r[0].length):-1}function Un(i,o,c){var r=mn.exec(o.slice(c));return r?(i.m=vn.get(r[0].toLowerCase()),c+r[0].length):-1}function xn(i,o,c){var r=yn.exec(o.slice(c));return r?(i.m=dn.get(r[0].toLowerCase()),c+r[0].length):-1}function wn(i,o,c){return A(i,e,o,c)}function Sn(i,o,c){return A(i,t,o,c)}function pn(i,o,c){return A(i,u,o,c)}function Fn(i){return L[i.getDay()]}function Ln(i){return m[i.getDay()]}function Yn(i){return H[i.getMonth()]}function Hn(i){return Y[i.getMonth()]}function An(i){return y[+(i.getHours()>=12)]}function Zn(i){return 1+~~(i.getMonth()/3)}function Wn(i){return L[i.getUTCDay()]}function bn(i){return m[i.getUTCDay()]}function Vn(i){return H[i.getUTCMonth()]}function $n(i){return Y[i.getUTCMonth()]}function jn(i){return y[+(i.getUTCHours()>=12)]}function qn(i){return 1+~~(i.getUTCMonth()/3)}return{format:function(i){var o=d(i+="",v);return o.toString=function(){return i},o},parse:function(i){var o=q(i+="",!1);return o.toString=function(){return i},o},utcFormat:function(i){var o=d(i+="",T);return o.toString=function(){return i},o},utcParse:function(i){var o=q(i+="",!0);return o.toString=function(){return i},o}}}var I={"-":"",_:" ",0:"0"},l=/^\s*\d+/,Qn=/^%/,Xn=/[\\^$*+?|[\]().{}]/g;function a(n,e,t){var u=n<0?"-":"",y=(u?-n:n)+"",m=y.length;return u+(m[e.toLowerCase(),t]))}function On(n,e,t){var u=l.exec(e.slice(t,t+1));return u?(n.w=+u[0],t+u[0].length):-1}function Nn(n,e,t){var u=l.exec(e.slice(t,t+1));return u?(n.u=+u[0],t+u[0].length):-1}function Bn(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.U=+u[0],t+u[0].length):-1}function Gn(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.V=+u[0],t+u[0].length):-1}function kn(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.W=+u[0],t+u[0].length):-1}function O(n,e,t){var u=l.exec(e.slice(t,t+4));return u?(n.y=+u[0],t+u[0].length):-1}function N(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.y=+u[0]+(+u[0]>68?1900:2e3),t+u[0].length):-1}function zn(n,e,t){var u=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(t,t+6));return u?(n.Z=u[1]?0:-(u[2]+(u[3]||"00")),t+u[0].length):-1}function En(n,e,t){var u=l.exec(e.slice(t,t+1));return u?(n.q=u[0]*3-3,t+u[0].length):-1}function Rn(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.m=u[0]-1,t+u[0].length):-1}function B(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.d=+u[0],t+u[0].length):-1}function _n(n,e,t){var u=l.exec(e.slice(t,t+3));return u?(n.m=0,n.d=+u[0],t+u[0].length):-1}function G(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.H=+u[0],t+u[0].length):-1}function Kn(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.M=+u[0],t+u[0].length):-1}function ne(n,e,t){var u=l.exec(e.slice(t,t+2));return u?(n.S=+u[0],t+u[0].length):-1}function ee(n,e,t){var u=l.exec(e.slice(t,t+3));return u?(n.L=+u[0],t+u[0].length):-1}function te(n,e,t){var u=l.exec(e.slice(t,t+6));return u?(n.L=Math.floor(u[0]/1e3),t+u[0].length):-1}function re(n,e,t){var u=Qn.exec(e.slice(t,t+1));return u?t+u[0].length:-1}function ue(n,e,t){var u=l.exec(e.slice(t));return u?(n.Q=+u[0],t+u[0].length):-1}function ie(n,e,t){var u=l.exec(e.slice(t));return u?(n.s=+u[0],t+u[0].length):-1}function k(n,e){return a(n.getDate(),e,2)}function oe(n,e){return a(n.getHours(),e,2)}function ce(n,e){return a(n.getHours()%12||12,e,2)}function ae(n,e){return a(1+Q.count(M(n),n),e,3)}function z(n,e){return a(n.getMilliseconds(),e,3)}function fe(n,e){return z(n,e)+"000"}function le(n,e){return a(n.getMonth()+1,e,2)}function se(n,e){return a(n.getMinutes(),e,2)}function ge(n,e){return a(n.getSeconds(),e,2)}function he(n){var e=n.getDay();return e===0?7:e}function ye(n,e){return a(Jn.count(M(n)-1,n),e,2)}function E(n){var e=n.getDay();return e>=4||e===0?U(n):U.ceil(n)}function de(n,e){return n=E(n),a(U.count(M(n),n)+(M(n).getDay()===4),e,2)}function me(n){return n.getDay()}function ve(n,e){return a(W.count(M(n)-1,n),e,2)}function Te(n,e){return a(n.getFullYear()%100,e,2)}function De(n,e){return n=E(n),a(n.getFullYear()%100,e,2)}function Ce(n,e){return a(n.getFullYear()%1e4,e,4)}function Me(n,e){var t=n.getDay();return n=t>=4||t===0?U(n):U.ceil(n),a(n.getFullYear()%1e4,e,4)}function Ue(n){var e=n.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+a(e/60|0,"0",2)+a(e%60,"0",2)}function R(n,e){return a(n.getUTCDate(),e,2)}function xe(n,e){return a(n.getUTCHours(),e,2)}function we(n,e){return a(n.getUTCHours()%12||12,e,2)}function Se(n,e){return a(1+P.count(x(n),n),e,3)}function _(n,e){return a(n.getUTCMilliseconds(),e,3)}function pe(n,e){return _(n,e)+"000"}function Fe(n,e){return a(n.getUTCMonth()+1,e,2)}function Le(n,e){return a(n.getUTCMinutes(),e,2)}function Ye(n,e){return a(n.getUTCSeconds(),e,2)}function He(n){var e=n.getUTCDay();return e===0?7:e}function Ae(n,e){return a(Pn.count(x(n)-1,n),e,2)}function K(n){var e=n.getUTCDay();return e>=4||e===0?w(n):w.ceil(n)}function Ze(n,e){return n=K(n),a(w.count(x(n),n)+(x(n).getUTCDay()===4),e,2)}function We(n){return n.getUTCDay()}function be(n,e){return a(Z.count(x(n)-1,n),e,2)}function Ve(n,e){return a(n.getUTCFullYear()%100,e,2)}function $e(n,e){return n=K(n),a(n.getUTCFullYear()%100,e,2)}function je(n,e){return a(n.getUTCFullYear()%1e4,e,4)}function qe(n,e){var t=n.getUTCDay();return n=t>=4||t===0?w(n):w.ceil(n),a(n.getUTCFullYear()%1e4,e,4)}function Je(){return"+0000"}function nn(){return"%"}function en(n){return+n}function tn(n){return Math.floor(+n/1e3)}var C,rn,un,$,j;on({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function on(n){return C=X(n),rn=C.format,un=C.parse,$=C.utcFormat,j=C.utcParse,C}var cn="%Y-%m-%dT%H:%M:%S.%LZ";function Pe(n){return n.toISOString()}var Qe=Date.prototype.toISOString?Pe:$(cn),Xe=Qe;function Ie(n){var e=new Date(n);return isNaN(e)?null:e}var Oe=+new Date("2000-01-01T00:00:00.000Z")?Ie:j(cn),Ne=Oe;export{Xe as isoFormat,Ne as isoParse,rn as timeFormat,on as timeFormatDefaultLocale,X as timeFormatLocale,un as timeParse,$ as utcFormat,j as utcParse}; diff --git a/docs/_node/d3-time@3.1.0/index.8fcc123e.js b/docs/_node/d3-time@3.1.0/index.8fcc123e.js new file mode 100644 index 0000000..eb7e60a --- /dev/null +++ b/docs/_node/d3-time@3.1.0/index.8fcc123e.js @@ -0,0 +1 @@ +import{bisector as re,tickStep as K}from"../d3-array@3.2.4/index.f89e3560.js";const w=new Date,k=new Date;function o(e,t,n,F){function u(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return u.floor=s=>(e(s=new Date(+s)),s),u.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),u.round=s=>{const a=u(s),i=u.ceil(s);return s-a(t(s=new Date(+s),a==null?1:Math.floor(a)),s),u.range=(s,a,i)=>{const h=[];if(s=u.ceil(s),i=i==null?1:Math.floor(i),!(s0))return h;let r;do h.push(r=new Date(+s)),t(s,i),e(s);while(ro(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,i)=>{if(a>=a)if(i<0)for(;++i<=0;)for(;t(a,-1),!s(a););else for(;--i>=0;)for(;t(a,1),!s(a););}),n&&(u.count=(s,a)=>(w.setTime(+s),k.setTime(+a),e(w),e(k),Math.floor(n(w,k))),u.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?u.filter(F?a=>F(a)%s===0:a=>u.count(0,a)%s===0):u)),u}const U=o(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);U.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?o(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):U);const L=U.range,m=1e3,l=6e4,M=36e5,D=864e5,W=6048e5,N=2592e6,x=31536e6,d=o(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*m)},(e,t)=>(t-e)/m,e=>e.getUTCSeconds()),B=d.range,O=o(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*m)},(e,t)=>{e.setTime(+e+t*l)},(e,t)=>(t-e)/l,e=>e.getMinutes()),le=O.range,p=o(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*l)},(e,t)=>(t-e)/l,e=>e.getUTCMinutes()),ge=p.range,z=o(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*m-e.getMinutes()*l)},(e,t)=>{e.setTime(+e+t*M)},(e,t)=>(t-e)/M,e=>e.getHours()),ce=z.range,I=o(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*M)},(e,t)=>(t-e)/M,e=>e.getUTCHours()),Te=I.range,b=o(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*l)/D,e=>e.getDate()-1),me=b.range,E=o(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/D,e=>e.getUTCDate()-1),Me=E.range,j=o(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/D,e=>Math.floor(e/D)),de=j.range;function f(e){return o(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*l)/W)}const Y=f(0),G=f(1),J=f(2),P=f(3),Q=f(4),R=f(5),V=f(6),X=Y.range,fe=G.range,ye=J.range,he=P.range,Ce=Q.range,Ue=R.range,De=V.range;function y(e){return o(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/W)}const H=y(0),Z=y(1),_=y(2),ee=y(3),te=y(4),se=y(5),ae=y(6),ne=H.range,Fe=Z.range,$e=_.range,Ye=ee.range,He=te.range,Se=se.range,ve=ae.range,q=o(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),we=q.range,A=o(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),ke=A.range,S=o(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());S.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:o(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const We=S.range,v=o(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());v.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:o(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const xe=v.range;function ue(e,t,n,F,u,s){const a=[[d,1,m],[d,5,5*m],[d,15,15*m],[d,30,30*m],[s,1,l],[s,5,5*l],[s,15,15*l],[s,30,30*l],[u,1,M],[u,3,3*M],[u,6,6*M],[u,12,12*M],[F,1,D],[F,2,2*D],[n,1,W],[t,1,N],[t,3,3*N],[e,1,x]];function i(r,g,T){const C=gie).right(a,C);if(c===a.length)return e.every(K(r/x,g/x,T));if(c===0)return U.every(Math.max(K(r,g,T),1));const[$,oe]=a[C/a[c-1][2]=0&&n._call.call(void 0,t),n=n._next;--o}function I(){e=(h=c.now())+p,o=l=0;try{F()}finally{o=0,$(),e=0}}function A(){var n=c.now(),t=n-h;t>d&&(p-=t,h=n)}function $(){for(var n,t=w,i,r=1/0;t;)t._call?(r>t._time&&(r=t._time),n=t,t=t._next):(i=t._next,t._next=null,t=n?n._next=i:w=i);u=n,x(r)}function x(n){if(!o){l&&(l=clearTimeout(l));var t=n-e;t>24?(n<1/0&&(l=setTimeout(I,n-c.now()-p)),s&&(s=clearInterval(s))):(s||(h=c.now(),s=setInterval(A,d)),o=1,T(I))}}function D(n,t,i){var r=new f;return t=t==null?0:+t,r.restart(_=>{r.stop(),n(_+t)},t,i),r}function E(n,t,i){var r=new f,_=t;return t==null?(r.restart(n,t,i),r):(r._restart=r.restart,r.restart=function(j,m,a){m=+m,a=a==null?v():+a,r._restart(function k(y){y+=_,r._restart(k,_+=m,a),j(y)},m,a)},r.restart(n,t,i),r)}export{E as interval,v as now,D as timeout,b as timer,F as timerFlush}; diff --git a/docs/_node/d3-transition@3.0.1/index.d140d658.js b/docs/_node/d3-transition@3.0.1/index.d140d658.js new file mode 100644 index 0000000..11f88e2 --- /dev/null +++ b/docs/_node/d3-transition@3.0.1/index.d140d658.js @@ -0,0 +1 @@ +import{namespace as N,matcher as U,selector as X,selectorAll as q,selection as y,style as g}from"../d3-selection@3.0.0/index.13204b25.js";import{dispatch as F}from"../d3-dispatch@3.0.1/index.be49ca5f.js";import{timer as H,timeout as P,now as J}from"../d3-timer@3.0.1/index.0ee6092b.js";import{interpolateNumber as K,interpolateRgb as z,interpolateString as L,interpolateTransformSvg as Q,interpolateTransformCss as W}from"../d3-interpolate@3.0.1/index.7ed7c7fe.js";import{color as k}from"../d3-color@3.1.0/index.e8c126ff.js";import{easeCubicInOut as Y}from"../d3-ease@3.0.1/index.09153f73.js";var Z=F("start","end","cancel","interrupt"),tt=[],O=0,x=1,E=2,$=3,R=4,T=5,A=6;function b(t,n,e,r,i,u){var o=t.__transition;if(!o)t.__transition={};else if(e in o)return;nt(t,e,{name:n,index:r,group:i,on:Z,tween:tt,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:O})}function C(t,n){var e=p(t,n);if(e.state>O)throw new Error("too late; already scheduled");return e}function _(t,n){var e=p(t,n);if(e.state>$)throw new Error("too late; already running");return e}function p(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function nt(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=H(u,0,e.time);function u(l){e.state=x,e.timer.restart(o,e.delay,e.time),e.delay<=l&&o(l-e.delay)}function o(l){var f,v,h,c;if(e.state!==x)return s();for(f in r)if(c=r[f],c.name===e.name){if(c.state===$)return P(o);c.state===R?(c.state=A,c.timer.stop(),c.on.call("interrupt",t,t.__data__,c.index,c.group),delete r[f]):+fE&&r.state=0&&(n=n.slice(0,e)),!n||n==="start"})}function zt(t,n,e){var r,i,u=Pt(n)?C:_;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}function kt(t,n){var e=this._id;return arguments.length<2?p(this.node(),e).on.on(t):this.each(zt(e,t,n))}function Ot(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Rt(){return this.on("end.remove",Ot(this._id))}function Vt(t){var n=this._name,e=this._id;typeof t!="function"&&(t=X(t));for(var r=this._groups,i=r.length,u=new Array(i),o=0;ox&&r.name===n)return new d([[t]],un,n,+i)}return null}export{an as active,V as interrupt,D as transition}; diff --git a/docs/_node/d3-zoom@3.0.0/index.0e732a91.js b/docs/_node/d3-zoom@3.0.0/index.0e732a91.js new file mode 100644 index 0000000..ad28c95 --- /dev/null +++ b/docs/_node/d3-zoom@3.0.0/index.0e732a91.js @@ -0,0 +1 @@ +import{dispatch as et}from"../d3-dispatch@3.0.1/index.be49ca5f.js";import{dragDisable as ot,dragEnable as it}from"../d3-drag@3.0.0/index.8e5f73cc.js";import{interpolateZoom as rt}from"../d3-interpolate@3.0.1/index.7ed7c7fe.js";import{select as D,pointer as T}from"../d3-selection@3.0.0/index.13204b25.js";import{interrupt as O}from"../d3-transition@3.0.1/index.d140d658.js";var K=e=>()=>e;function ut(e,{sourceEvent:m,target:f,transform:_,dispatch:k}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:m,enumerable:!0,configurable:!0},target:{value:f,enumerable:!0,configurable:!0},transform:{value:_,enumerable:!0,configurable:!0},_:{value:k}})}function z(e,m,f){this.k=e,this.x=m,this.y=f}z.prototype={constructor:z,scale:function(e){return e===1?this:new z(this.k*e,this.x,this.y)},translate:function(e,m){return e===0&m===0?this:new z(this.k,this.x+this.k*e,this.y+this.k*m)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var S=new z(1,0,0);R.prototype=z.prototype;function R(e){for(;!e.__zoom;)if(!(e=e.parentNode))return S;return e.__zoom}function W(e){e.stopImmediatePropagation()}function B(e){e.preventDefault(),e.stopImmediatePropagation()}function st(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function at(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function U(){return this.__zoom||S}function ht(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ct(){return navigator.maxTouchPoints||"ontouchstart"in this}function mt(e,m,f){var _=e.invertX(m[0][0])-f[0][0],k=e.invertX(m[1][0])-f[1][0],v=e.invertY(m[0][1])-f[0][1],l=e.invertY(m[1][1])-f[1][1];return e.translate(k>_?(_+k)/2:Math.min(0,_)||Math.max(0,k),l>v?(v+l)/2:Math.min(0,v)||Math.max(0,l))}function lt(){var e=st,m=at,f=mt,_=ht,k=ct,v=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],P=250,q=rt,E=et("start","zoom","end"),M,G,Y,A=500,C=150,I=0,j=10;function u(t){t.property("__zoom",U).on("wheel.zoom",F,{passive:!1}).on("mousedown.zoom",J).on("dblclick.zoom",Z).filter(k).on("touchstart.zoom",$).on("touchmove.zoom",tt).on("touchend.zoom touchcancel.zoom",nt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}u.transform=function(t,o,n,i){var r=t.selection?t.selection():t;r.property("__zoom",U),t!==r?L(t,o,n,i):r.interrupt().each(function(){x(this,arguments).event(i).start().zoom(null,typeof o=="function"?o.apply(this,arguments):o).end()})},u.scaleBy=function(t,o,n,i){u.scaleTo(t,function(){var r=this.__zoom.k,s=typeof o=="function"?o.apply(this,arguments):o;return r*s},n,i)},u.scaleTo=function(t,o,n,i){u.transform(t,function(){var r=m.apply(this,arguments),s=this.__zoom,a=n==null?H(r):typeof n=="function"?n.apply(this,arguments):n,h=s.invert(a),c=typeof o=="function"?o.apply(this,arguments):o;return f(X(V(s,c),a,h),r,l)},n,i)},u.translateBy=function(t,o,n,i){u.transform(t,function(){return f(this.__zoom.translate(typeof o=="function"?o.apply(this,arguments):o,typeof n=="function"?n.apply(this,arguments):n),m.apply(this,arguments),l)},null,i)},u.translateTo=function(t,o,n,i,r){u.transform(t,function(){var s=m.apply(this,arguments),a=this.__zoom,h=i==null?H(s):typeof i=="function"?i.apply(this,arguments):i;return f(S.translate(h[0],h[1]).scale(a.k).translate(typeof o=="function"?-o.apply(this,arguments):-o,typeof n=="function"?-n.apply(this,arguments):-n),s,l)},i,r)};function V(t,o){return o=Math.max(v[0],Math.min(v[1],o)),o===t.k?t:new z(o,t.x,t.y)}function X(t,o,n){var i=o[0]-n[0]*t.k,r=o[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new z(t.k,i,r)}function H(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function L(t,o,n,i){t.on("start.zoom",function(){x(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(i).end()}).tween("zoom",function(){var r=this,s=arguments,a=x(r,s).event(i),h=m.apply(r,s),c=n==null?H(h):typeof n=="function"?n.apply(r,s):n,d=Math.max(h[1][0]-h[0][0],h[1][1]-h[0][1]),p=r.__zoom,g=typeof o=="function"?o.apply(r,s):o,w=q(p.invert(c).concat(d/p.k),g.invert(c).concat(d/g.k));return function(y){if(y===1)y=g;else{var b=w(y),N=d/b[2];y=new z(N,c[0]-b[0]*N,c[1]-b[1]*N)}a.zoom(null,y)}})}function x(t,o,n){return!n&&t.__zooming||new Q(t,o)}function Q(t,o){this.that=t,this.args=o,this.active=0,this.sourceEvent=null,this.extent=m.apply(t,o),this.taps=0}Q.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,o){return this.mouse&&t!=="mouse"&&(this.mouse[1]=o.invert(this.mouse[0])),this.touch0&&t!=="touch"&&(this.touch0[1]=o.invert(this.touch0[0])),this.touch1&&t!=="touch"&&(this.touch1[1]=o.invert(this.touch1[0])),this.that.__zoom=o,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var o=D(this.that).datum();E.call(t,this.that,new ut(t,{sourceEvent:this.sourceEvent,target:u,type:t,transform:this.that.__zoom,dispatch:E}),o)}};function F(t,...o){if(!e.apply(this,arguments))return;var n=x(this,o).event(t),i=this.__zoom,r=Math.max(v[0],Math.min(v[1],i.k*Math.pow(2,_.apply(this,arguments)))),s=T(t);if(n.wheel)(n.mouse[0][0]!==s[0]||n.mouse[0][1]!==s[1])&&(n.mouse[1]=i.invert(n.mouse[0]=s)),clearTimeout(n.wheel);else{if(i.k===r)return;n.mouse=[s,i.invert(s)],O(this),n.start()}B(t),n.wheel=setTimeout(a,C),n.zoom("mouse",f(X(V(i,r),n.mouse[0],n.mouse[1]),n.extent,l));function a(){n.wheel=null,n.end()}}function J(t,...o){if(Y||!e.apply(this,arguments))return;var n=t.currentTarget,i=x(this,o,!0).event(t),r=D(t.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",d,!0),s=T(t,n),a=t.clientX,h=t.clientY;ot(t.view),W(t),i.mouse=[s,this.__zoom.invert(s)],O(this),i.start();function c(p){if(B(p),!i.moved){var g=p.clientX-a,w=p.clientY-h;i.moved=g*g+w*w>I}i.event(p).zoom("mouse",f(X(i.that.__zoom,i.mouse[0]=T(p,n),i.mouse[1]),i.extent,l))}function d(p){r.on("mousemove.zoom mouseup.zoom",null),it(p.view,i.moved),B(p),i.event(p).end()}}function Z(t,...o){if(e.apply(this,arguments)){var n=this.__zoom,i=T(t.changedTouches?t.changedTouches[0]:t,this),r=n.invert(i),s=n.k*(t.shiftKey?.5:2),a=f(X(V(n,s),i,r),m.apply(this,o),l);B(t),P>0?D(this).transition().duration(P).call(L,a,i,t):D(this).call(u.transform,a,i,t)}}function $(t,...o){if(e.apply(this,arguments)){var n=t.touches,i=n.length,r=x(this,o,t.changedTouches.length===i).event(t),s,a,h,c;for(W(t),a=0;a>1;if(s>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*s-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(s)),this._hullPrev=new Uint32Array(s),this._hullNext=new Uint32Array(s),this._hullTri=new Uint32Array(s),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(s),this._dists=new Float64Array(s),this.update()}update(){const{coords:t,_hullPrev:s,_hullNext:n,_hullTri:a,_hullHash:e}=this,i=t.length>>1;let l=1/0,u=1/0,g=-1/0,A=-1/0;for(let r=0;rg&&(g=f),_>A&&(A=_),this._ids[r]=r}const b=(l+g)/2,k=(u+A)/2;let o,d,y;for(let r=0,f=1/0;r0&&(d=r,f=_)}let x=t[2*d],L=t[2*d+1],q=1/0;for(let r=0;rw&&(r[f++]=m,w=z)}this.hull=r.subarray(0,f),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(N(U,p,x,L,P,E)<0){const r=d,f=x,_=L;d=y,x=P,L=E,y=r,P=f,E=_}const I=V(U,p,x,L,P,E);this._cx=I.x,this._cy=I.y;for(let r=0;r0&&Math.abs(m-f)<=G&&Math.abs(z-_)<=G||(f=m,_=z,w===o||w===d||w===y))continue;let T=0;for(let B=0,J=this._hashKey(m,z);B=0;)if(c=S,c===T){c=-1;break}if(c===-1)continue;let K=this._addTriangle(c,w,n[c],-1,-1,a[c]);a[w]=this._legalize(K+2),a[c]=K,F++;let M=n[c];for(;S=n[M],N(m,z,t[2*M],t[2*M+1],t[2*S],t[2*S+1])<0;)K=this._addTriangle(M,w,S,a[w],-1,a[M]),a[w]=this._legalize(K+2),n[M]=M,F--,M=S;if(c===T)for(;S=s[c],N(m,z,t[2*S],t[2*S+1],t[2*c],t[2*c+1])<0;)K=this._addTriangle(S,w,c,-1,a[c],a[S]),this._legalize(K+2),a[S]=K,n[c]=c,F--,c=S;this._hullStart=s[w]=c,n[c]=s[M]=w,n[w]=M,e[this._hashKey(m,z)]=w,e[this._hashKey(t[2*c],t[2*c+1])]=c}this.hull=new Uint32Array(F);for(let r=0,f=this._hullStart;r0?3-s:1+s)/4}function C(h,t,s,n){const a=h-s,e=t-n;return a*a+e*e}function Q(h,t,s,n,a,e,i,l){const u=h-i,g=t-l,A=s-i,b=n-l,k=a-i,o=e-l,d=u*u+g*g,y=A*A+b*b,U=k*k+o*o;return u*(b*U-y*o)-g*(A*U-y*k)+d*(A*o-b*k)<0}function R(h,t,s,n,a,e){const i=s-h,l=n-t,u=a-h,g=e-t,A=i*i+l*l,b=u*u+g*g,k=.5/(i*g-l*u),o=(g*A-l*b)*k,d=(i*b-u*A)*k;return o*o+d*d}function V(h,t,s,n,a,e){const i=s-h,l=n-t,u=a-h,g=e-t,A=i*i+l*l,b=u*u+g*g,k=.5/(i*g-l*u),o=h+(g*A-l*b)*k,d=t+(i*b-u*A)*k;return{x:o,y:d}}function v(h,t,s,n){if(n-s<=20)for(let a=s+1;a<=n;a++){const e=h[a],i=t[e];let l=a-1;for(;l>=s&&t[h[l]]>i;)h[l+1]=h[l--];h[l+1]=e}else{const a=s+n>>1;let e=s+1,i=n;H(h,a,e),t[h[s]]>t[h[n]]&&H(h,s,n),t[h[e]]>t[h[n]]&&H(h,e,n),t[h[s]]>t[h[e]]&&H(h,s,e);const l=h[e],u=t[l];for(;;){do e++;while(t[h[e]]u);if(i=i-s?(v(h,t,e,n),v(h,t,s,i-1)):(v(h,t,s,i-1),v(h,t,e,n))}}function H(h,t,s){const n=h[t];h[t]=h[s],h[s]=n}function X(h){return h[0]}function W(h){return h[1]}export{D as default}; diff --git a/docs/_node/internmap@2.0.3/index.4106013c.js b/docs/_node/internmap@2.0.3/index.4106013c.js new file mode 100644 index 0000000..af16ab8 --- /dev/null +++ b/docs/_node/internmap@2.0.3/index.4106013c.js @@ -0,0 +1 @@ +class c extends Map{constructor(e,s=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:s}}),e!=null)for(const[n,o]of e)this.set(n,o)}get(e){return super.get(r(this,e))}has(e){return super.has(r(this,e))}set(e,s){return super.set(u(this,e),s)}delete(e){return super.delete(i(this,e))}}class h extends Set{constructor(e,s=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:s}}),e!=null)for(const n of e)this.add(n)}has(e){return super.has(r(this,e))}add(e){return super.add(u(this,e))}delete(e){return super.delete(i(this,e))}}function r({_intern:t,_key:e},s){const n=e(s);return t.has(n)?t.get(n):s}function u({_intern:t,_key:e},s){const n=e(s);return t.has(n)?t.get(n):(t.set(n,s),s)}function i({_intern:t,_key:e},s){const n=e(s);return t.has(n)&&(s=t.get(n),t.delete(n)),s}function a(t){return t!==null&&typeof t=="object"?t.valueOf():t}export{c as InternMap,h as InternSet}; diff --git a/docs/_node/interval-tree-1d@1.0.4/index.f507a53c.js b/docs/_node/interval-tree-1d@1.0.4/index.f507a53c.js new file mode 100644 index 0000000..1d3bacf --- /dev/null +++ b/docs/_node/interval-tree-1d@1.0.4/index.f507a53c.js @@ -0,0 +1 @@ +import*as E from"../binary-search-bounds@2.0.5/index.990a1c6d.js";function F(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function N(t){return t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var S=N(E),a=S,u=0,f=1,v=2,B=M;function P(t,i,r,n,h){this.mid=t,this.left=i,this.right=r,this.leftPoints=n,this.rightPoints=h,this.count=(i?i.count:0)+(r?r.count:0)+n.length}var g=P.prototype;function p(t,i){t.mid=i.mid,t.left=i.left,t.right=i.right,t.leftPoints=i.leftPoints,t.rightPoints=i.rightPoints,t.count=i.count}function w(t,i){var r=l(i);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function I(t,i){var r=t.intervals([]);r.push(i),w(t,r)}function j(t,i){var r=t.intervals([]),n=r.indexOf(i);return n<0?u:(r.splice(n,1),w(t,r),f)}g.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},g.insert=function(t){var i=this.count-this.leftPoints.length;if(this.count+=1,t[1]3*(i+1)?I(this,t):this.left.insert(t):this.left=l([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(i+1)?I(this,t):this.right.insert(t):this.right=l([t]);else{var r=a.ge(this.leftPoints,t,d),n=a.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(n,0,t)}},g.remove=function(t){var i=this.count-this.leftPoints;if(t[1]3*(i-1))return j(this,t);var n=this.left.remove(t);return n===v?(this.left=null,this.count-=1,f):(n===f&&(this.count-=1),n)}else if(t[0]>this.mid){if(!this.right)return u;var h=this.left?this.left.count:0;if(4*h>3*(i-1))return j(this,t);var n=this.right.remove(t);return n===v?(this.right=null,this.count-=1,f):(n===f&&(this.count-=1),n)}else{if(this.count===1)return this.leftPoints[0]===t?v:u;if(this.leftPoints.length===1&&this.leftPoints[0]===t){if(this.left&&this.right){for(var o=this,e=this.left;e.right;)o=e,e=e.right;if(o===this)e.right=this.right;else{var s=this.left,n=this.right;o.count-=e.count,o.right=e.left,e.left=s,e.right=n}p(this,e),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?p(this,this.left):p(this,this.right);return f}for(var s=a.ge(this.leftPoints,t,d);s=0&&t[n][1]>=i;--n){var h=r(t[n]);if(h)return h}}function D(t,i){for(var r=0;rthis.mid){if(this.right){var r=this.right.queryPoint(t,i);if(r)return r}return b(this.rightPoints,t,i)}else return D(this.leftPoints,i)},g.queryInterval=function(t,i,r){if(tthis.mid&&this.right){var n=this.right.queryInterval(t,i,r);if(n)return n}return ithis.mid?b(this.rightPoints,t,r):D(this.leftPoints,r)};function C(t,i){return t-i}function d(t,i){var r=t[0]-i[0];return r||t[1]-i[1]}function m(t,i){var r=t[1]-i[1];return r||t[0]-i[0]}function l(t){if(t.length===0)return null;for(var i=[],r=0;r>1],h=[],o=[],e=[],r=0;r9999?`+${r(t,6)}`:r(t,4)}function r(t,e){return`${t}`.padStart(e,"0")}const n=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function c(t,e){return n.test(t+="")?new Date(t):typeof e=="function"?e(t):e}export{a as format,c as parse}; diff --git a/docs/_node/robust-predicates@3.0.2/index.bdc459cc.js b/docs/_node/robust-predicates@3.0.2/index.bdc459cc.js new file mode 100644 index 0000000..ddd85ee --- /dev/null +++ b/docs/_node/robust-predicates@3.0.2/index.bdc459cc.js @@ -0,0 +1 @@ +const at=11102230246251565e-32,b=134217729,u0=(3+8*at)*at;function et(S,A,J,z,Z){let C,Q,V,d,o=A[0],i=z[0],$=0,a=0;i>o==i>-o?(C=o,o=A[++$]):(C=i,i=z[++a]);let e=0;if($o==i>-o?(Q=o+C,V=C-(Q-o),o=A[++$]):(Q=i+C,V=C-(Q-i),i=z[++a]),C=Q,V!==0&&(Z[e++]=V);$o==i>-o?(Q=C+o,d=Q-C,V=C-(Q-d)+(o-d),o=A[++$]):(Q=C+i,d=Q-C,V=C-(Q-d)+(i-d),i=z[++a]),C=Q,V!==0&&(Z[e++]=V);for(;$=n||-G>=n||($=S-W,V=S-(W+$)+($-Z),$=J-Y,o=J-(Y+$)+($-Z),$=A-F,d=A-(F+$)+($-C),$=z-w,i=z-(w+$)+($-C),V===0&&d===0&&o===0&&i===0)||(n=Pn*Q+u0*Math.abs(G),G+=W*i+w*V-(F*o+Y*d),G>=n||-G>=n))return G;O=V*w,a=b*V,e=a-(a-V),v=V-e,a=b*w,t=a-(a-w),c=w-t,h=v*c-(O-e*t-v*t-e*c),U=d*Y,a=b*d,e=a-(a-d),v=d-e,a=b*Y,t=a-(a-Y),c=Y-t,m=v*c-(U-e*t-v*t-e*c),u=h-m,$=h-u,mt[0]=h-(u+$)+($-m),H=O+u,$=H-O,l=O-(H-$)+(u-$),u=l-U,$=l-u,mt[1]=l-(u+$)+($-U),P=H+u,$=P-H,mt[2]=H-(P-$)+(u-$),mt[3]=P;const f=et(4,qt,4,mt,E0);O=W*i,a=b*W,e=a-(a-W),v=W-e,a=b*i,t=a-(a-i),c=i-t,h=v*c-(O-e*t-v*t-e*c),U=F*o,a=b*F,e=a-(a-F),v=F-e,a=b*o,t=a-(a-o),c=o-t,m=v*c-(U-e*t-v*t-e*c),u=h-m,$=h-u,mt[0]=h-(u+$)+($-m),H=O+u,$=H-O,l=O-(H-$)+(u-$),u=l-U,$=l-u,mt[1]=l-(u+$)+($-U),P=H+u,$=P-H,mt[2]=H-(P-$)+(u-$),mt[3]=P;const M=et(f,E0,4,mt,k0);O=V*i,a=b*V,e=a-(a-V),v=V-e,a=b*i,t=a-(a-i),c=i-t,h=v*c-(O-e*t-v*t-e*c),U=d*o,a=b*d,e=a-(a-d),v=d-e,a=b*o,t=a-(a-o),c=o-t,m=v*c-(U-e*t-v*t-e*c),u=h-m,$=h-u,mt[0]=h-(u+$)+($-m),H=O+u,$=H-O,l=O-(H-$)+(u-$),u=l-U,$=l-u,mt[1]=l-(u+$)+($-U),P=H+u,$=P-H,mt[2]=H-(P-$)+(u-$),mt[3]=P;const x=et(M,k0,4,mt,B0);return B0[x-1]}function Rn(S,A,J,z,Z,C){const Q=(A-C)*(J-Z),V=(S-Z)*(z-C),d=Q-V,o=Math.abs(Q+V);return Math.abs(d)>=Hn*o?d:-Qn(S,A,J,z,Z,C,o)}function On(S,A,J,z,Z,C){return(A-C)*(J-Z)-(S-Z)*(z-C)}const Tn=(7+56*at)*at,Un=(3+28*at)*at,xn=(26+288*at)*at*at,Et=N(4),kt=N(4),Bt=N(4),tn=N(4),nn=N(4),sn=N(4),rn=N(4),cn=N(4),on=N(4),y0=N(8),H0=N(8),_0=N(8),jt=N(4),f0=N(8),en=N(8),Ht=N(8),t0=N(12);let n0=N(192),P0=N(192);function Vt(S,A,J){S=et(S,n0,A,J,P0);const z=n0;return n0=P0,P0=z,S}function Q0(S,A,J,z,Z,C,Q,V){let d,o,i,$,a,e,v,t,c,u,H,l,O,h,U;return S===0?A===0?(Q[0]=0,V[0]=0,1):(U=-A,u=U*J,o=b*U,i=o-(o-U),$=U-i,o=b*J,a=o-(o-J),e=J-a,Q[0]=$*e-(u-i*a-$*a-i*e),Q[1]=u,u=A*Z,o=b*A,i=o-(o-A),$=A-i,o=b*Z,a=o-(o-Z),e=Z-a,V[0]=$*e-(u-i*a-$*a-i*e),V[1]=u,2):A===0?(u=S*z,o=b*S,i=o-(o-S),$=S-i,o=b*z,a=o-(o-z),e=z-a,Q[0]=$*e-(u-i*a-$*a-i*e),Q[1]=u,U=-S,u=U*C,o=b*U,i=o-(o-U),$=U-i,o=b*C,a=o-(o-C),e=C-a,V[0]=$*e-(u-i*a-$*a-i*e),V[1]=u,2):(u=S*z,o=b*S,i=o-(o-S),$=S-i,o=b*z,a=o-(o-z),e=z-a,H=$*e-(u-i*a-$*a-i*e),l=A*J,o=b*A,i=o-(o-A),$=A-i,o=b*J,a=o-(o-J),e=J-a,O=$*e-(l-i*a-$*a-i*e),v=H-O,d=H-v,Q[0]=H-(v+d)+(d-O),t=u+v,d=t-u,c=u-(t-d)+(v-d),v=c-l,d=c-v,Q[1]=c-(v+d)+(d-l),h=t+v,d=h-t,Q[2]=t-(h-d)+(v-d),Q[3]=h,u=A*Z,o=b*A,i=o-(o-A),$=A-i,o=b*Z,a=o-(o-Z),e=Z-a,H=$*e-(u-i*a-$*a-i*e),l=S*C,o=b*S,i=o-(o-S),$=S-i,o=b*C,a=o-(o-C),e=C-a,O=$*e-(l-i*a-$*a-i*e),v=H-O,d=H-v,V[0]=H-(v+d)+(d-O),t=u+v,d=t-u,c=u-(t-d)+(v-d),v=c-l,d=c-v,V[1]=c-(v+d)+(d-l),h=t+v,d=h-t,V[2]=t-(h-d)+(v-d),V[3]=h,4)}function s0(S,A,J,z,Z){let C,Q,V,d,o,i,$,a,e,v,t,c,u;return t=A*J,Q=b*A,V=Q-(Q-A),d=A-V,Q=b*J,o=Q-(Q-J),i=J-o,c=d*i-(t-V*o-d*o-V*i),Q=b*z,o=Q-(Q-z),i=z-o,$=c*z,Q=b*c,V=Q-(Q-c),d=c-V,jt[0]=d*i-($-V*o-d*o-V*i),a=t*z,Q=b*t,V=Q-(Q-t),d=t-V,v=d*i-(a-V*o-d*o-V*i),e=$+v,C=e-$,jt[1]=$-(e-C)+(v-C),u=a+e,jt[2]=e-(u-a),jt[3]=u,S=Vt(S,4,jt),Z!==0&&(Q=b*Z,o=Q-(Q-Z),i=Z-o,$=c*Z,Q=b*c,V=Q-(Q-c),d=c-V,jt[0]=d*i-($-V*o-d*o-V*i),a=t*Z,Q=b*t,V=Q-(Q-t),d=t-V,v=d*i-(a-V*o-d*o-V*i),e=$+v,C=e-$,jt[1]=$-(e-C)+(v-C),u=a+e,jt[2]=e-(u-a),jt[3]=u,S=Vt(S,4,jt)),S}function Vn(S,A,J,z,Z,C,Q,V,d,o,i,$,a){let e,v,t,c,u,H,l,O,h,U,m,P,W,Y,F,w,G,n,f,M,x,s,p,r;const g=S-o,R=z-o,_=Q-o,y=A-i,j=Z-i,X=V-i,L=J-$,D=C-$,K=d-$;M=R*X,P=b*R,W=P-(P-R),Y=R-W,P=b*X,F=P-(P-X),w=X-F,x=Y*w-(M-W*F-Y*F-W*w),s=_*j,P=b*_,W=P-(P-_),Y=_-W,P=b*j,F=P-(P-j),w=j-F,p=Y*w-(s-W*F-Y*F-W*w),G=x-p,m=x-G,Et[0]=x-(G+m)+(m-p),n=M+G,m=n-M,f=M-(n-m)+(G-m),G=f-s,m=f-G,Et[1]=f-(G+m)+(m-s),r=n+G,m=r-n,Et[2]=n-(r-m)+(G-m),Et[3]=r,M=_*y,P=b*_,W=P-(P-_),Y=_-W,P=b*y,F=P-(P-y),w=y-F,x=Y*w-(M-W*F-Y*F-W*w),s=g*X,P=b*g,W=P-(P-g),Y=g-W,P=b*X,F=P-(P-X),w=X-F,p=Y*w-(s-W*F-Y*F-W*w),G=x-p,m=x-G,kt[0]=x-(G+m)+(m-p),n=M+G,m=n-M,f=M-(n-m)+(G-m),G=f-s,m=f-G,kt[1]=f-(G+m)+(m-s),r=n+G,m=r-n,kt[2]=n-(r-m)+(G-m),kt[3]=r,M=g*j,P=b*g,W=P-(P-g),Y=g-W,P=b*j,F=P-(P-j),w=j-F,x=Y*w-(M-W*F-Y*F-W*w),s=R*y,P=b*R,W=P-(P-R),Y=R-W,P=b*y,F=P-(P-y),w=y-F,p=Y*w-(s-W*F-Y*F-W*w),G=x-p,m=x-G,Bt[0]=x-(G+m)+(m-p),n=M+G,m=n-M,f=M-(n-m)+(G-m),G=f-s,m=f-G,Bt[1]=f-(G+m)+(m-s),r=n+G,m=r-n,Bt[2]=n-(r-m)+(G-m),Bt[3]=r,e=et(et(T(4,Et,L,f0),f0,T(4,kt,D,en),en,Ht),Ht,T(4,Bt,K,f0),f0,n0);let I=$0(e,n0),E=Un*a;if(I>=E||-I>=E||(m=S-g,v=S-(g+m)+(m-o),m=z-R,t=z-(R+m)+(m-o),m=Q-_,c=Q-(_+m)+(m-o),m=A-y,u=A-(y+m)+(m-i),m=Z-j,H=Z-(j+m)+(m-i),m=V-X,l=V-(X+m)+(m-i),m=J-L,O=J-(L+m)+(m-$),m=C-D,h=C-(D+m)+(m-$),m=d-K,U=d-(K+m)+(m-$),v===0&&t===0&&c===0&&u===0&&H===0&&l===0&&O===0&&h===0&&U===0)||(E=xn*a+u0*Math.abs(I),I+=L*(R*l+X*t-(j*c+_*H))+O*(R*X-j*_)+D*(_*u+y*c-(X*v+g*l))+h*(_*y-X*g)+K*(g*H+j*v-(y*t+R*u))+U*(g*j-y*R),I>=E||-I>=E))return I;const k=Q0(v,u,R,j,_,X,tn,nn),B=Q0(t,H,_,X,g,y,sn,rn),rt=Q0(c,l,g,y,R,j,cn,on),ct=et(B,sn,rt,on,y0);e=Vt(e,T(ct,y0,L,Ht),Ht);const nt=et(rt,cn,k,nn,H0);e=Vt(e,T(nt,H0,D,Ht),Ht);const st=et(k,tn,B,rn,_0);return e=Vt(e,T(st,_0,K,Ht),Ht),O!==0&&(e=Vt(e,T(4,Et,O,t0),t0),e=Vt(e,T(ct,y0,O,Ht),Ht)),h!==0&&(e=Vt(e,T(4,kt,h,t0),t0),e=Vt(e,T(nt,H0,h,Ht),Ht)),U!==0&&(e=Vt(e,T(4,Bt,U,t0),t0),e=Vt(e,T(st,_0,U,Ht),Ht)),v!==0&&(H!==0&&(e=s0(e,v,H,K,U)),l!==0&&(e=s0(e,-v,l,D,h))),t!==0&&(l!==0&&(e=s0(e,t,l,L,O)),u!==0&&(e=s0(e,-t,u,K,U))),c!==0&&(u!==0&&(e=s0(e,c,u,D,h)),H!==0&&(e=s0(e,-c,H,L,O))),n0[e-1]}function dn(S,A,J,z,Z,C,Q,V,d,o,i,$){const a=S-o,e=z-o,v=Q-o,t=A-i,c=Z-i,u=V-i,H=J-$,l=C-$,O=d-$,h=e*u,U=v*c,m=v*t,P=a*u,W=a*c,Y=e*t,F=H*(h-U)+l*(m-P)+O*(W-Y),w=(Math.abs(h)+Math.abs(U))*Math.abs(H)+(Math.abs(m)+Math.abs(P))*Math.abs(l)+(Math.abs(W)+Math.abs(Y))*Math.abs(O),G=Tn*w;return F>G||-F>G?F:Vn(S,A,J,z,Z,C,Q,V,d,o,i,$,w)}function jn(S,A,J,z,Z,C,Q,V,d,o,i,$){const a=S-o,e=z-o,v=Q-o,t=A-i,c=Z-i,u=V-i,H=J-$,l=C-$,O=d-$;return a*(c*O-l*u)+e*(u*H-O*t)+v*(t*l-H*c)}const Wn=(10+96*at)*at,Sn=(4+48*at)*at,An=(44+576*at)*at*at,Lt=N(4),Nt=N(4),Yt=N(4),Wt=N(4),St=N(4),At=N(4),vt=N(4),yt=N(4),R0=N(8),O0=N(8),T0=N(8),U0=N(8),x0=N(8),V0=N(8),i0=N(8),b0=N(8),h0=N(8),zt=N(4),Xt=N(4),Ft=N(4),q=N(8),tt=N(16),ut=N(16),$t=N(16),ot=N(32),wt=N(32),it=N(48),_t=N(64);let r0=N(1152),d0=N(1152);function bt(S,A,J){S=et(S,r0,A,J,d0);const z=r0;return r0=d0,d0=z,S}function Cn(S,A,J,z,Z,C,Q,V,d){let o,i,$,a,e,v,t,c,u,H,l,O,h,U,m,P,W,Y,F,w,G,n,f,M,x,s,p,r,g,R,_,y,j,X,L;const D=S-Q,K=J-Q,I=Z-Q,E=A-V,k=z-V,B=C-V;_=K*B,f=b*K,M=f-(f-K),x=K-M,f=b*B,s=f-(f-B),p=B-s,y=x*p-(_-M*s-x*s-M*p),j=I*k,f=b*I,M=f-(f-I),x=I-M,f=b*k,s=f-(f-k),p=k-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,Lt[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,Lt[1]=R-(r+n)+(n-j),L=g+r,n=L-g,Lt[2]=g-(L-n)+(r-n),Lt[3]=L,_=I*E,f=b*I,M=f-(f-I),x=I-M,f=b*E,s=f-(f-E),p=E-s,y=x*p-(_-M*s-x*s-M*p),j=D*B,f=b*D,M=f-(f-D),x=D-M,f=b*B,s=f-(f-B),p=B-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,Nt[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,Nt[1]=R-(r+n)+(n-j),L=g+r,n=L-g,Nt[2]=g-(L-n)+(r-n),Nt[3]=L,_=D*k,f=b*D,M=f-(f-D),x=D-M,f=b*k,s=f-(f-k),p=k-s,y=x*p-(_-M*s-x*s-M*p),j=K*E,f=b*K,M=f-(f-K),x=K-M,f=b*E,s=f-(f-E),p=E-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,Yt[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,Yt[1]=R-(r+n)+(n-j),L=g+r,n=L-g,Yt[2]=g-(L-n)+(r-n),Yt[3]=L,o=et(et(et(T(T(4,Lt,D,q),q,D,tt),tt,T(T(4,Lt,E,q),q,E,ut),ut,ot),ot,et(T(T(4,Nt,K,q),q,K,tt),tt,T(T(4,Nt,k,q),q,k,ut),ut,wt),wt,_t),_t,et(T(T(4,Yt,I,q),q,I,tt),tt,T(T(4,Yt,B,q),q,B,ut),ut,ot),ot,r0);let rt=$0(o,r0),ct=Sn*d;if(rt>=ct||-rt>=ct||(n=S-D,i=S-(D+n)+(n-Q),n=A-E,e=A-(E+n)+(n-V),n=J-K,$=J-(K+n)+(n-Q),n=z-k,v=z-(k+n)+(n-V),n=Z-I,a=Z-(I+n)+(n-Q),n=C-B,t=C-(B+n)+(n-V),i===0&&$===0&&a===0&&e===0&&v===0&&t===0)||(ct=An*d+u0*Math.abs(rt),rt+=(D*D+E*E)*(K*t+B*$-(k*a+I*v))+2*(D*i+E*e)*(K*B-k*I)+((K*K+k*k)*(I*e+E*a-(B*i+D*t))+2*(K*$+k*v)*(I*E-B*D))+((I*I+B*B)*(D*v+k*i-(E*$+K*e))+2*(I*a+B*t)*(D*k-E*K)),rt>=ct||-rt>=ct))return rt;if(($!==0||v!==0||a!==0||t!==0)&&(_=D*D,f=b*D,M=f-(f-D),x=D-M,y=x*x-(_-M*M-(M+M)*x),j=E*E,f=b*E,M=f-(f-E),x=E-M,X=x*x-(j-M*M-(M+M)*x),r=y+X,n=r-y,Wt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,Wt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,Wt[2]=g-(L-n)+(r-n),Wt[3]=L),(a!==0||t!==0||i!==0||e!==0)&&(_=K*K,f=b*K,M=f-(f-K),x=K-M,y=x*x-(_-M*M-(M+M)*x),j=k*k,f=b*k,M=f-(f-k),x=k-M,X=x*x-(j-M*M-(M+M)*x),r=y+X,n=r-y,St[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,St[1]=R-(r-n)+(j-n),L=g+r,n=L-g,St[2]=g-(L-n)+(r-n),St[3]=L),(i!==0||e!==0||$!==0||v!==0)&&(_=I*I,f=b*I,M=f-(f-I),x=I-M,y=x*x-(_-M*M-(M+M)*x),j=B*B,f=b*B,M=f-(f-B),x=B-M,X=x*x-(j-M*M-(M+M)*x),r=y+X,n=r-y,At[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,At[1]=R-(r-n)+(j-n),L=g+r,n=L-g,At[2]=g-(L-n)+(r-n),At[3]=L),i!==0&&(c=T(4,Lt,i,R0),o=bt(o,gt(T(c,R0,2*D,tt),tt,T(T(4,At,i,q),q,k,ut),ut,T(T(4,St,i,q),q,-B,$t),$t,ot,it),it)),e!==0&&(u=T(4,Lt,e,O0),o=bt(o,gt(T(u,O0,2*E,tt),tt,T(T(4,St,e,q),q,I,ut),ut,T(T(4,At,e,q),q,-K,$t),$t,ot,it),it)),$!==0&&(H=T(4,Nt,$,T0),o=bt(o,gt(T(H,T0,2*K,tt),tt,T(T(4,Wt,$,q),q,B,ut),ut,T(T(4,At,$,q),q,-E,$t),$t,ot,it),it)),v!==0&&(l=T(4,Nt,v,U0),o=bt(o,gt(T(l,U0,2*k,tt),tt,T(T(4,At,v,q),q,D,ut),ut,T(T(4,Wt,v,q),q,-I,$t),$t,ot,it),it)),a!==0&&(O=T(4,Yt,a,x0),o=bt(o,gt(T(O,x0,2*I,tt),tt,T(T(4,St,a,q),q,E,ut),ut,T(T(4,Wt,a,q),q,-k,$t),$t,ot,it),it)),t!==0&&(h=T(4,Yt,t,V0),o=bt(o,gt(T(h,V0,2*B,tt),tt,T(T(4,Wt,t,q),q,K,ut),ut,T(T(4,St,t,q),q,-D,$t),$t,ot,it),it)),i!==0||e!==0){if($!==0||v!==0||a!==0||t!==0?(_=$*B,f=b*$,M=f-(f-$),x=$-M,f=b*B,s=f-(f-B),p=B-s,y=x*p-(_-M*s-x*s-M*p),j=K*t,f=b*K,M=f-(f-K),x=K-M,f=b*t,s=f-(f-t),p=t-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,vt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,vt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,vt[2]=g-(L-n)+(r-n),vt[3]=L,_=a*-k,f=b*a,M=f-(f-a),x=a-M,f=b*-k,s=f-(f- -k),p=-k-s,y=x*p-(_-M*s-x*s-M*p),j=I*-v,f=b*I,M=f-(f-I),x=I-M,f=b*-v,s=f-(f- -v),p=-v-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,yt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,yt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,yt[2]=g-(L-n)+(r-n),yt[3]=L,m=et(4,vt,4,yt,b0),_=$*t,f=b*$,M=f-(f-$),x=$-M,f=b*t,s=f-(f-t),p=t-s,y=x*p-(_-M*s-x*s-M*p),j=a*v,f=b*a,M=f-(f-a),x=a-M,f=b*v,s=f-(f-v),p=v-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,Xt[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,Xt[1]=R-(r+n)+(n-j),L=g+r,n=L-g,Xt[2]=g-(L-n)+(r-n),Xt[3]=L,Y=4):(b0[0]=0,m=1,Xt[0]=0,Y=1),i!==0){const nt=T(m,b0,i,$t);o=bt(o,et(T(c,R0,i,tt),tt,T(nt,$t,2*D,ot),ot,it),it);const st=T(Y,Xt,i,q);o=bt(o,gt(T(st,q,2*D,tt),tt,T(st,q,i,ut),ut,T(nt,$t,i,ot),ot,wt,_t),_t),v!==0&&(o=bt(o,T(T(4,At,i,q),q,v,tt),tt)),t!==0&&(o=bt(o,T(T(4,St,-i,q),q,t,tt),tt))}if(e!==0){const nt=T(m,b0,e,$t);o=bt(o,et(T(u,O0,e,tt),tt,T(nt,$t,2*E,ot),ot,it),it);const st=T(Y,Xt,e,q);o=bt(o,gt(T(st,q,2*E,tt),tt,T(st,q,e,ut),ut,T(nt,$t,e,ot),ot,wt,_t),_t)}}if($!==0||v!==0){if(a!==0||t!==0||i!==0||e!==0?(_=a*E,f=b*a,M=f-(f-a),x=a-M,f=b*E,s=f-(f-E),p=E-s,y=x*p-(_-M*s-x*s-M*p),j=I*e,f=b*I,M=f-(f-I),x=I-M,f=b*e,s=f-(f-e),p=e-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,vt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,vt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,vt[2]=g-(L-n)+(r-n),vt[3]=L,w=-B,G=-t,_=i*w,f=b*i,M=f-(f-i),x=i-M,f=b*w,s=f-(f-w),p=w-s,y=x*p-(_-M*s-x*s-M*p),j=D*G,f=b*D,M=f-(f-D),x=D-M,f=b*G,s=f-(f-G),p=G-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,yt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,yt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,yt[2]=g-(L-n)+(r-n),yt[3]=L,P=et(4,vt,4,yt,h0),_=a*e,f=b*a,M=f-(f-a),x=a-M,f=b*e,s=f-(f-e),p=e-s,y=x*p-(_-M*s-x*s-M*p),j=i*t,f=b*i,M=f-(f-i),x=i-M,f=b*t,s=f-(f-t),p=t-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,Ft[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,Ft[1]=R-(r+n)+(n-j),L=g+r,n=L-g,Ft[2]=g-(L-n)+(r-n),Ft[3]=L,F=4):(h0[0]=0,P=1,Ft[0]=0,F=1),$!==0){const nt=T(P,h0,$,$t);o=bt(o,et(T(H,T0,$,tt),tt,T(nt,$t,2*K,ot),ot,it),it);const st=T(F,Ft,$,q);o=bt(o,gt(T(st,q,2*K,tt),tt,T(st,q,$,ut),ut,T(nt,$t,$,ot),ot,wt,_t),_t),t!==0&&(o=bt(o,T(T(4,Wt,$,q),q,t,tt),tt)),e!==0&&(o=bt(o,T(T(4,At,-$,q),q,e,tt),tt))}if(v!==0){const nt=T(P,h0,v,$t);o=bt(o,et(T(l,U0,v,tt),tt,T(nt,$t,2*k,ot),ot,it),it);const st=T(F,Ft,v,q);o=bt(o,gt(T(st,q,2*k,tt),tt,T(st,q,v,ut),ut,T(nt,$t,v,ot),ot,wt,_t),_t)}}if(a!==0||t!==0){if(i!==0||e!==0||$!==0||v!==0?(_=i*k,f=b*i,M=f-(f-i),x=i-M,f=b*k,s=f-(f-k),p=k-s,y=x*p-(_-M*s-x*s-M*p),j=D*v,f=b*D,M=f-(f-D),x=D-M,f=b*v,s=f-(f-v),p=v-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,vt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,vt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,vt[2]=g-(L-n)+(r-n),vt[3]=L,w=-E,G=-e,_=$*w,f=b*$,M=f-(f-$),x=$-M,f=b*w,s=f-(f-w),p=w-s,y=x*p-(_-M*s-x*s-M*p),j=K*G,f=b*K,M=f-(f-K),x=K-M,f=b*G,s=f-(f-G),p=G-s,X=x*p-(j-M*s-x*s-M*p),r=y+X,n=r-y,yt[0]=y-(r-n)+(X-n),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R+j,n=r-R,yt[1]=R-(r-n)+(j-n),L=g+r,n=L-g,yt[2]=g-(L-n)+(r-n),yt[3]=L,U=et(4,vt,4,yt,i0),_=i*v,f=b*i,M=f-(f-i),x=i-M,f=b*v,s=f-(f-v),p=v-s,y=x*p-(_-M*s-x*s-M*p),j=$*e,f=b*$,M=f-(f-$),x=$-M,f=b*e,s=f-(f-e),p=e-s,X=x*p-(j-M*s-x*s-M*p),r=y-X,n=y-r,zt[0]=y-(r+n)+(n-X),g=_+r,n=g-_,R=_-(g-n)+(r-n),r=R-j,n=R-r,zt[1]=R-(r+n)+(n-j),L=g+r,n=L-g,zt[2]=g-(L-n)+(r-n),zt[3]=L,W=4):(i0[0]=0,U=1,zt[0]=0,W=1),a!==0){const nt=T(U,i0,a,$t);o=bt(o,et(T(O,x0,a,tt),tt,T(nt,$t,2*I,ot),ot,it),it);const st=T(W,zt,a,q);o=bt(o,gt(T(st,q,2*I,tt),tt,T(st,q,a,ut),ut,T(nt,$t,a,ot),ot,wt,_t),_t),e!==0&&(o=bt(o,T(T(4,St,a,q),q,e,tt),tt)),v!==0&&(o=bt(o,T(T(4,Wt,-a,q),q,v,tt),tt))}if(t!==0){const nt=T(U,i0,t,$t);o=bt(o,et(T(h,V0,t,tt),tt,T(nt,$t,2*B,ot),ot,it),it);const st=T(W,zt,t,q);o=bt(o,gt(T(st,q,2*B,tt),tt,T(st,q,t,ut),ut,T(nt,$t,t,ot),ot,wt,_t),_t)}}return r0[o-1]}function Ln(S,A,J,z,Z,C,Q,V){const d=S-Q,o=J-Q,i=Z-Q,$=A-V,a=z-V,e=C-V,v=o*e,t=i*a,c=d*d+$*$,u=i*$,H=d*e,l=o*o+a*a,O=d*a,h=o*$,U=i*i+e*e,m=c*(v-t)+l*(u-H)+U*(O-h),P=(Math.abs(v)+Math.abs(t))*c+(Math.abs(u)+Math.abs(H))*l+(Math.abs(O)+Math.abs(h))*U,W=Wn*P;return m>W||-m>W?m:Cn(S,A,J,z,Z,C,Q,V,P)}function Nn(S,A,J,z,Z,C,Q,V){const d=S-Q,o=A-V,i=J-Q,$=z-V,a=Z-Q,e=C-V,v=d*$-i*o,t=i*e-a*$,c=a*o-d*e,u=d*d+o*o,H=i*i+$*$,l=a*a+e*e;return u*t+H*c+l*v}const Yn=(16+224*at)*at,wn=(5+72*at)*at,Zn=(71+1408*at)*at*at,Pt=N(4),Qt=N(4),Rt=N(4),Jt=N(4),Dt=N(4),Ot=N(4),Tt=N(4),Kt=N(4),Ut=N(4),Gt=N(4),j0=N(24),W0=N(24),S0=N(24),A0=N(24),C0=N(24),L0=N(24),N0=N(24),Y0=N(24),w0=N(24),Z0=N(24),c0=N(1152),M0=N(1152),o0=N(1152),p0=N(1152),an=N(1152),z0=N(2304),X0=N(2304),un=N(3456),$n=N(5760),fn=N(8),bn=N(8),hn=N(8),zn=N(16),l0=N(24),Zt=N(48),F0=N(48),g0=N(96),It=N(192),Mn=N(384),pn=N(384),ln=N(384),Xn=N(768);function dt(S,A,J,z,Z,C,Q){return gt(T(4,S,z,fn),fn,T(4,A,Z,bn),bn,T(4,J,C,hn),hn,zn,Q)}function e0(S,A,J,z,Z,C,Q,V,d,o,i,$){const a=et(et(S,A,J,z,Zt),Zt,v0(et(Z,C,Q,V,F0),F0),F0,g0);return gt(T(T(a,g0,d,It),It,d,Mn),Mn,T(T(a,g0,o,It),It,o,pn),pn,T(T(a,g0,i,It),It,i,ln),ln,Xn,$)}function Fn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v){let t,c,u,H,l,O,h,U,m,P,W,Y,F,w;P=S*Z,c=b*S,u=c-(c-S),H=S-u,c=b*Z,l=c-(c-Z),O=Z-l,W=H*O-(P-u*l-H*l-u*O),Y=z*A,c=b*z,u=c-(c-z),H=z-u,c=b*A,l=c-(c-A),O=A-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Pt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Pt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Pt[2]=U-(w-t)+(h-t),Pt[3]=w,P=z*V,c=b*z,u=c-(c-z),H=z-u,c=b*V,l=c-(c-V),O=V-l,W=H*O-(P-u*l-H*l-u*O),Y=Q*Z,c=b*Q,u=c-(c-Q),H=Q-u,c=b*Z,l=c-(c-Z),O=Z-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Qt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Qt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Qt[2]=U-(w-t)+(h-t),Qt[3]=w,P=Q*i,c=b*Q,u=c-(c-Q),H=Q-u,c=b*i,l=c-(c-i),O=i-l,W=H*O-(P-u*l-H*l-u*O),Y=o*V,c=b*o,u=c-(c-o),H=o-u,c=b*V,l=c-(c-V),O=V-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Rt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Rt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Rt[2]=U-(w-t)+(h-t),Rt[3]=w,P=o*e,c=b*o,u=c-(c-o),H=o-u,c=b*e,l=c-(c-e),O=e-l,W=H*O-(P-u*l-H*l-u*O),Y=a*i,c=b*a,u=c-(c-a),H=a-u,c=b*i,l=c-(c-i),O=i-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Jt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Jt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Jt[2]=U-(w-t)+(h-t),Jt[3]=w,P=a*A,c=b*a,u=c-(c-a),H=a-u,c=b*A,l=c-(c-A),O=A-l,W=H*O-(P-u*l-H*l-u*O),Y=S*e,c=b*S,u=c-(c-S),H=S-u,c=b*e,l=c-(c-e),O=e-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Dt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Dt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Dt[2]=U-(w-t)+(h-t),Dt[3]=w,P=S*V,c=b*S,u=c-(c-S),H=S-u,c=b*V,l=c-(c-V),O=V-l,W=H*O-(P-u*l-H*l-u*O),Y=Q*A,c=b*Q,u=c-(c-Q),H=Q-u,c=b*A,l=c-(c-A),O=A-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Ot[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Ot[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Ot[2]=U-(w-t)+(h-t),Ot[3]=w,P=z*i,c=b*z,u=c-(c-z),H=z-u,c=b*i,l=c-(c-i),O=i-l,W=H*O-(P-u*l-H*l-u*O),Y=o*Z,c=b*o,u=c-(c-o),H=o-u,c=b*Z,l=c-(c-Z),O=Z-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Tt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Tt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Tt[2]=U-(w-t)+(h-t),Tt[3]=w,P=Q*e,c=b*Q,u=c-(c-Q),H=Q-u,c=b*e,l=c-(c-e),O=e-l,W=H*O-(P-u*l-H*l-u*O),Y=a*V,c=b*a,u=c-(c-a),H=a-u,c=b*V,l=c-(c-V),O=V-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Kt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Kt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Kt[2]=U-(w-t)+(h-t),Kt[3]=w,P=o*A,c=b*o,u=c-(c-o),H=o-u,c=b*A,l=c-(c-A),O=A-l,W=H*O-(P-u*l-H*l-u*O),Y=S*i,c=b*S,u=c-(c-S),H=S-u,c=b*i,l=c-(c-i),O=i-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Ut[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Ut[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Ut[2]=U-(w-t)+(h-t),Ut[3]=w,P=a*Z,c=b*a,u=c-(c-a),H=a-u,c=b*Z,l=c-(c-Z),O=Z-l,W=H*O-(P-u*l-H*l-u*O),Y=z*e,c=b*z,u=c-(c-z),H=z-u,c=b*e,l=c-(c-e),O=e-l,F=H*O-(Y-u*l-H*l-u*O),h=W-F,t=W-h,Gt[0]=W-(h+t)+(t-F),U=P+h,t=U-P,m=P-(U-t)+(h-t),h=m-Y,t=m-h,Gt[1]=m-(h+t)+(t-Y),w=U+h,t=w-U,Gt[2]=U-(w-t)+(h-t),Gt[3]=w;const G=dt(Pt,Qt,Ot,d,J,-C,j0),n=dt(Qt,Rt,Tt,$,C,-d,W0),f=dt(Rt,Jt,Kt,v,d,-$,S0),M=dt(Jt,Dt,Ut,J,$,-v,A0),x=dt(Dt,Pt,Gt,C,v,-J,C0),s=dt(Pt,Tt,Ut,$,J,C,L0),p=dt(Qt,Kt,Gt,v,C,d,N0),r=dt(Rt,Ut,Ot,J,d,$,Y0),g=dt(Jt,Gt,Tt,C,$,v,w0),R=dt(Dt,Ot,Kt,d,v,J,Z0),_=gt(e0(f,S0,p,N0,g,w0,n,W0,S,A,J,c0),c0,e0(M,A0,r,Y0,R,Z0,f,S0,z,Z,C,M0),M0,gt(e0(x,C0,g,w0,s,L0,M,A0,Q,V,d,o0),o0,e0(G,j0,R,Z0,p,N0,x,C0,o,i,$,p0),p0,e0(n,W0,s,L0,r,Y0,G,j0,a,e,v,an),an,X0,un),un,z0,$n);return $n[_-1]}const gn=N(96),mn=N(96),vn=N(96),yn=N(1152);function m0(S,A,J,z,Z,C,Q,V,d,o){const i=dt(S,A,J,z,Z,C,l0);return gt(T(T(i,l0,Q,Zt),Zt,Q,gn),gn,T(T(i,l0,V,Zt),Zt,V,mn),mn,T(T(i,l0,d,Zt),Zt,d,vn),vn,It,o)}function Jn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v,t){let c,u,H,l,O,h,U,m,P,W,Y,F,w,G,n,f,M,x,s,p,r,g,R,_,y,j,X,L,D,K,I;const E=S-a,k=z-a,B=Q-a,rt=o-a,ct=A-e,nt=Z-e,st=V-e,ft=i-e,ht=J-v,Mt=C-v,pt=d-v,lt=$-v;L=E*nt,p=b*E,r=p-(p-E),g=E-r,p=b*nt,R=p-(p-nt),_=nt-R,D=g*_-(L-r*R-g*R-r*_),K=k*ct,p=b*k,r=p-(p-k),g=k-r,p=b*ct,R=p-(p-ct),_=ct-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Pt[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Pt[1]=X-(y+s)+(s-K),c=j+y,s=c-j,Pt[2]=j-(c-s)+(y-s),Pt[3]=c,L=k*st,p=b*k,r=p-(p-k),g=k-r,p=b*st,R=p-(p-st),_=st-R,D=g*_-(L-r*R-g*R-r*_),K=B*nt,p=b*B,r=p-(p-B),g=B-r,p=b*nt,R=p-(p-nt),_=nt-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Qt[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Qt[1]=X-(y+s)+(s-K),u=j+y,s=u-j,Qt[2]=j-(u-s)+(y-s),Qt[3]=u,L=B*ft,p=b*B,r=p-(p-B),g=B-r,p=b*ft,R=p-(p-ft),_=ft-R,D=g*_-(L-r*R-g*R-r*_),K=rt*st,p=b*rt,r=p-(p-rt),g=rt-r,p=b*st,R=p-(p-st),_=st-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Rt[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Rt[1]=X-(y+s)+(s-K),H=j+y,s=H-j,Rt[2]=j-(H-s)+(y-s),Rt[3]=H,L=rt*ct,p=b*rt,r=p-(p-rt),g=rt-r,p=b*ct,R=p-(p-ct),_=ct-R,D=g*_-(L-r*R-g*R-r*_),K=E*ft,p=b*E,r=p-(p-E),g=E-r,p=b*ft,R=p-(p-ft),_=ft-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Ut[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Ut[1]=X-(y+s)+(s-K),l=j+y,s=l-j,Ut[2]=j-(l-s)+(y-s),Ut[3]=l,L=E*st,p=b*E,r=p-(p-E),g=E-r,p=b*st,R=p-(p-st),_=st-R,D=g*_-(L-r*R-g*R-r*_),K=B*ct,p=b*B,r=p-(p-B),g=B-r,p=b*ct,R=p-(p-ct),_=ct-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Ot[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Ot[1]=X-(y+s)+(s-K),O=j+y,s=O-j,Ot[2]=j-(O-s)+(y-s),Ot[3]=O,L=k*ft,p=b*k,r=p-(p-k),g=k-r,p=b*ft,R=p-(p-ft),_=ft-R,D=g*_-(L-r*R-g*R-r*_),K=rt*nt,p=b*rt,r=p-(p-rt),g=rt-r,p=b*nt,R=p-(p-nt),_=nt-R,I=g*_-(K-r*R-g*R-r*_),y=D-I,s=D-y,Tt[0]=D-(y+s)+(s-I),j=L+y,s=j-L,X=L-(j-s)+(y-s),y=X-K,s=X-y,Tt[1]=X-(y+s)+(s-K),h=j+y,s=h-j,Tt[2]=j-(h-s)+(y-s),Tt[3]=h;const a0=et(et(v0(m0(Qt,Rt,Tt,lt,Mt,-pt,E,ct,ht,c0),c0),c0,m0(Rt,Ut,Ot,ht,pt,lt,k,nt,Mt,M0),M0,z0),z0,et(v0(m0(Ut,Pt,Tt,Mt,lt,ht,B,st,pt,o0),o0),o0,m0(Pt,Qt,Ot,pt,ht,-Mt,rt,ft,lt,p0),p0,X0),X0,yn);let xt=$0(a0,yn),Ct=wn*t;if(xt>=Ct||-xt>=Ct||(s=S-E,U=S-(E+s)+(s-a),s=A-ct,Y=A-(ct+s)+(s-e),s=J-ht,n=J-(ht+s)+(s-v),s=z-k,m=z-(k+s)+(s-a),s=Z-nt,F=Z-(nt+s)+(s-e),s=C-Mt,f=C-(Mt+s)+(s-v),s=Q-B,P=Q-(B+s)+(s-a),s=V-st,w=V-(st+s)+(s-e),s=d-pt,M=d-(pt+s)+(s-v),s=o-rt,W=o-(rt+s)+(s-a),s=i-ft,G=i-(ft+s)+(s-e),s=$-lt,x=$-(lt+s)+(s-v),U===0&&Y===0&&n===0&&m===0&&F===0&&f===0&&P===0&&w===0&&M===0&&W===0&&G===0&&x===0))return xt;Ct=Zn*t+u0*Math.abs(xt);const J0=E*F+nt*U-(ct*m+k*Y),D0=k*w+st*m-(nt*P+B*F),K0=B*G+ft*P-(st*W+rt*w),G0=rt*Y+ct*W-(ft*U+E*G),I0=E*w+st*U-(ct*P+B*Y),q0=k*G+ft*m-(nt*W+rt*F);return xt+=(k*k+nt*nt+Mt*Mt)*(pt*G0+lt*I0+ht*K0+(M*l+x*O+n*H))+(rt*rt+ft*ft+lt*lt)*(ht*D0-Mt*I0+pt*J0+(n*u-f*O+M*c))-((E*E+ct*ct+ht*ht)*(Mt*K0-pt*q0+lt*D0+(f*H-M*h+x*u))+(B*B+st*st+pt*pt)*(lt*J0+ht*q0+Mt*G0+(x*c+n*h+f*l)))+2*((k*m+nt*F+Mt*f)*(pt*l+lt*O+ht*H)+(rt*W+ft*G+lt*x)*(ht*u-Mt*O+pt*c)-((E*U+ct*Y+ht*n)*(Mt*H-pt*h+lt*u)+(B*P+st*w+pt*M)*(lt*c+ht*h+Mt*l))),xt>=Ct||-xt>=Ct?xt:Fn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v)}function Dn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v){const t=S-a,c=z-a,u=Q-a,H=o-a,l=A-e,O=Z-e,h=V-e,U=i-e,m=J-v,P=C-v,W=d-v,Y=$-v,F=t*O,w=c*l,G=F-w,n=c*h,f=u*O,M=n-f,x=u*U,s=H*h,p=x-s,r=H*l,g=t*U,R=r-g,_=t*h,y=u*l,j=_-y,X=c*U,L=H*O,D=X-L,K=t*t+l*l+m*m,I=c*c+O*O+P*P,E=u*u+h*h+W*W,k=H*H+U*U+Y*Y,B=E*(Y*G+m*D+P*R)-k*(m*M-P*j+W*G)+(K*(P*p-W*D+Y*M)-I*(W*R+Y*j+m*p)),rt=Math.abs(m),ct=Math.abs(P),nt=Math.abs(W),st=Math.abs(Y),ft=Math.abs(F)+Math.abs(w),ht=Math.abs(n)+Math.abs(f),Mt=Math.abs(x)+Math.abs(s),pt=Math.abs(r)+Math.abs(g),lt=Math.abs(_)+Math.abs(y),a0=Math.abs(X)+Math.abs(L),xt=(Mt*ct+a0*nt+ht*st)*K+(pt*nt+lt*st+Mt*rt)*I+(ft*st+a0*rt+pt*ct)*E+(ht*rt+lt*ct+ft*nt)*k,Ct=Yn*xt;return B>Ct||-B>Ct?B:-Jn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v,xt)}function Kn(S,A,J,z,Z,C,Q,V,d,o,i,$,a,e,v){const t=S-a,c=z-a,u=Q-a,H=o-a,l=A-e,O=Z-e,h=V-e,U=i-e,m=J-v,P=C-v,W=d-v,Y=$-v,F=t*O-c*l,w=c*h-u*O,G=u*U-H*h,n=H*l-t*U,f=t*h-u*l,M=c*U-H*O,x=m*w-P*f+W*F,s=P*G-W*M+Y*w,p=W*n+Y*f+m*G,r=Y*F+m*M+P*n,g=t*t+l*l+m*m,R=c*c+O*O+P*P,_=u*u+h*h+W*W,y=H*H+U*U+Y*Y;return _*r-y*x+(g*s-R*p)}export{Ln as incircle,Nn as incirclefast,Dn as insphere,Kn as inspherefast,Rn as orient2d,On as orient2dfast,dn as orient3d,jn as orient3dfast}; diff --git a/docs/_npm/d3-dsv@3.0.1/407f7a1f.js b/docs/_npm/d3-dsv@3.0.1/407f7a1f.js new file mode 100644 index 0000000..c18ad52 --- /dev/null +++ b/docs/_npm/d3-dsv@3.0.1/407f7a1f.js @@ -0,0 +1,7 @@ +/** + * Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2. + * Original file: /npm/d3-dsv@3.0.1/src/index.js + * + * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files + */ +var r={},n={};function t(r){return new Function("d","return {"+r.map((function(r,n){return JSON.stringify(r)+": d["+n+'] || ""'})).join(",")+"}")}function e(r){var n=Object.create(null),t=[];return r.forEach((function(r){for(var e in r)e in n||t.push(n[e]=e)})),t}function o(r,n){var t=r+"",e=t.length;return e9999?"+"+o(n,6):o(n,4))+"-"+o(r.getUTCMonth()+1,2)+"-"+o(r.getUTCDate(),2)+(u?"T"+o(t,2)+":"+o(e,2)+":"+o(a,2)+"."+o(u,3)+"Z":a?"T"+o(t,2)+":"+o(e,2)+":"+o(a,2)+"Z":e||t?"T"+o(t,2)+":"+o(e,2)+"Z":"")}function u(o){var u=new RegExp('["'+o+"\n\r]"),i=o.charCodeAt(0);function f(t,e){var o,a=[],u=t.length,f=0,c=0,s=u<=0,l=!1;function d(){if(s)return n;if(l)return l=!1,r;var e,o,a=f;if(34===t.charCodeAt(a)){for(;f++=u?s=!0:10===(o=t.charCodeAt(f++))?l=!0:13===o&&(l=!0,10===t.charCodeAt(f)&&++f),t.slice(a+1,e-1).replace(/""/g,'"')}for(;fie(e,"name",{value:t,configurable:!0});import{Inspector as j,Runtime as le}from"./runtime.56d81cb2.js";import{Generators as $,resize as ce,FileAttachment as de,Mutable as pe}from"./stdlib.831f6193.js";var ue=Object.defineProperty,A=n((e,t)=>ue(e,"name",{value:t,configurable:!0}),"o$2");const B=document.createElement("template");B.innerHTML='',O();function O(){for(const e of document.querySelectorAll("pre:not([data-copy=none])")){const t=e.parentNode;if(t.classList.contains("observablehq-pre-container"))continue;const r=t.insertBefore(document.createElement("div"),e);r.className="observablehq-pre-container",Object.assign(r.dataset,e.dataset),r.appendChild(B.content.cloneNode(!0).firstChild).addEventListener("click",D),r.appendChild(e)}}n(O,"r$2"),A(O,"enableCopyButtons");async function D({currentTarget:e}){await navigator.clipboard.writeText(e.nextElementSibling.textContent.trim());const[t]=e.getAnimations({subtree:!0});t&&(t.currentTime=0),e.classList.add("observablehq-pre-copied"),e.addEventListener("animationend",()=>e.classList.remove("observablehq-pre-copied"),{once:!0})}n(D,"c$3"),A(D,"copy");var me=Object.defineProperty,S=n((e,t)=>me(e,"name",{value:t,configurable:!0}),"s$2");const c=document.querySelector("#observablehq-sidebar-toggle");if(c){let e=c.indeterminate;const t=S(()=>matchMedia("(min-width: calc(640px + 6rem + 272px))").matches,"match");c.onclick=()=>{const o=t();e?(c.checked=!o,e=!1):c.checked===o&&(e=!0),c.indeterminate=e,e?sessionStorage.removeItem("observablehq-sidebar"):sessionStorage.setItem("observablehq-sidebar",c.checked)},addEventListener("keydown",o=>{o.code==="Escape"&&!t()&&(!c.indeterminate&&c.checked&&(o.target===document.body||o.target===c)||o.target?.closest("#observablehq-sidebar"))&&c.click()}),addEventListener("keypress",o=>{o.code==="KeyB"&&(o.metaKey||o.altKey)&&!o.ctrlKey&&(o.target===document.body||o.target===c||o.target?.closest("#observablehq-sidebar"))&&(c.click(),o.preventDefault())});const r=`Toggle sidebar ${/Mac|iPhone/.test(navigator.platform)?/Firefox/.test(navigator.userAgent)?"\u2325":"\u2318":"Alt-"}B`;for(const o of document.querySelectorAll("#observablehq-sidebar-toggle, label[for='observablehq-sidebar-toggle']"))o.title=r}function R(e){e.detail>1&&e.preventDefault()}n(R,"l$4"),S(R,"preventDoubleClick");function I(){sessionStorage.setItem(`observablehq-sidebar:${this.firstElementChild.textContent}`,this.open)}n(I,"c$2"),S(I,"persistOpen");for(const e of document.querySelectorAll("#observablehq-sidebar summary"))e.onmousedown=R,e.parentElement.ontoggle=I;var fe=Object.defineProperty,P=n((e,t)=>fe(e,"name",{value:t,configurable:!0}),"l$3");const x=document.querySelector("#observablehq-toc");if(x){const e=x.appendChild(document.createElement("div"));e.classList.add("observablehq-secondary-link-highlight");const t=document.querySelector("#observablehq-main"),r=Array.from(t.querySelectorAll(x.dataset.selector)).reverse(),o=x.querySelectorAll(".observablehq-secondary-link"),m=P(()=>{for(const a of o)a.classList.remove("observablehq-secondary-link-active");if(location.hash)for(const a of r){const f=encodeURI(`#${a.id}`);if(f===location.hash){const h=a.getBoundingClientRect().top;if(0=innerHeight*.5)continue;const f=a.querySelector("a[href]")?.hash;for(const h of o)if(h.querySelector("a[href]")?.hash===f)return h.classList.add("observablehq-secondary-link-active"),h;break}},"relink"),g=P(()=>{const a=m();e.style.cssText=a?`top: ${a.offsetTop}px; height: ${a.offsetHeight}px;`:""},"intersected"),y=new IntersectionObserver(g,{rootMargin:"0px 0px -50% 0px"});for(const a of r)y.observe(a)}var he=Object.defineProperty,T=n((e,t)=>he(e,"name",{value:t,configurable:!0}),"r$1");function M(e,t){const r=document.createElement("div");if(new j(r).fulfilled(e),t)for(const o of t){let m=r;for(const g of o)m=m?.childNodes[g];m?.dispatchEvent(new Event("mouseup"))}return r}n(M,"f$2"),T(M,"inspect");function z(e){const t=document.createElement("div");return new j(t).rejected(e),t.classList.add("observablehq--error"),t}n(z,"l$2"),T(z,"inspectError");var be=Object.defineProperty,s=n((e,t)=>be(e,"name",{value:t,configurable:!0}),"o");const ve=s(()=>import("../_npm/lodash@4.17.21/_esm.js").then(e=>e.default),"_"),ge=s(()=>import("../_npm/arquero@6.0.1/_esm.js"),"aq"),ye=s(()=>import("../_npm/apache-arrow@17.0.0/_esm.js"),"Arrow"),qe=s(()=>import("../_npm/d3@7.9.0/_esm.js"),"d3"),$e=s(()=>import("./stdlib/dot.js").then(e=>e.default),"dot"),we=s(()=>import("../_npm/@duckdb/duckdb-wasm@1.28.0/_esm.js"),"duckdb"),_e=s(()=>import("./stdlib/duckdb.js").then(e=>e.DuckDBClient),"DuckDBClient"),xe=s(()=>import("../_npm/echarts@5.5.1/dist/echarts.esm.min.js._esm.js"),"echarts"),ke=s(()=>import("../_npm/htl@0.3.1/_esm.js"),"htl"),Ce=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.html),"html"),Le=s(()=>import("../_npm/htl@0.3.1/_esm.js").then(e=>e.svg),"svg"),Ee=s(()=>import("./stdlib/inputs.js"),"Inputs"),Se=s(()=>import("../_npm/leaflet@1.9.4/_esm.js"),"L"),Ne=s(()=>import("../_npm/mapbox-gl@3.6.0/_esm.js").then(e=>e.default),"mapboxgl"),je=s(()=>import("./stdlib/mermaid.js").then(e=>e.default),"mermaid"),Ae=s(()=>import("../_npm/@observablehq/plot@0.6.16/_esm.js"),"Plot"),Be=s(()=>import("../_npm/react@18.3.1/_esm.js"),"React"),Oe=s(()=>import("../_npm/react-dom@18.3.1/_esm.js"),"ReactDOM"),De=s(()=>import("./stdlib/duckdb.js").then(e=>e.sql),"sql"),Re=s(()=>import("./stdlib/sqlite.js").then(e=>e.default),"SQLite"),Ie=s(()=>import("./stdlib/sqlite.js").then(e=>e.SQLiteDatabaseClient),"SQLiteDatabaseClient"),Pe=s(()=>import("./stdlib/tex.js").then(e=>e.default),"tex"),Te=s(()=>import("../_npm/topojson-client@3.1.0/_esm.js"),"topojson"),Me=s(()=>import("./stdlib/vgplot.js").then(e=>e.default()),"vg"),ze=s(()=>import("./stdlib/vega-lite.js").then(e=>e.default),"vl");var Qe=Object.freeze({__proto__:null,Arrow:ye,DuckDBClient:_e,Inputs:Ee,L:Se,Plot:Ae,React:Be,ReactDOM:Oe,SQLite:Re,SQLiteDatabaseClient:Ie,_:ve,aq:ge,d3:qe,dot:$e,duckdb:we,echarts:xe,htl:ke,html:Ce,mapboxgl:Ne,mermaid:je,sql:De,svg:Le,tex:Pe,topojson:Te,vg:Me,vl:ze}),He=Object.defineProperty,l=n((e,t)=>He(e,"name",{value:t,configurable:!0}),"e");const Ve=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/aapl.csv"),!0),"aapl"),Ke=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/alphabet.csv"),!0),"alphabet"),Fe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/cars.csv"),!0),"cars"),Ge=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/citywages.csv"),!0),"citywages"),Je=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/diamonds.csv"),!0),"diamonds"),Ue=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/flare.csv"),!0),"flare"),Ze=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/industries.csv"),!0),"industries"),We=l(()=>Q(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/miserables.json")),"miserables"),Xe=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/olympians.csv"),!0),"olympians"),Ye=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/penguins.csv"),!0),"penguins"),et=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/pizza.csv"),!0),"pizza"),tt=l(()=>d(import.meta.resolve("../_npm/@observablehq/sample-datasets@1.0.1/weather.csv"),!0),"weather");async function Q(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.json()}n(Q,"w$1"),l(Q,"json");async function H(e){const t=await fetch(e);if(!t.ok)throw new Error(`unable to fetch ${e}: status ${t.status}`);return t.text()}n(H,"y"),l(H,"text");async function d(e,t){const[r,o]=await Promise.all([H(e),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]);return o.csvParse(r,t&&o.autoType)}n(d,"t"),l(d,"csv");var ot=Object.freeze({__proto__:null,aapl:Ve,alphabet:Ke,cars:Fe,citywages:Ge,diamonds:Je,flare:Ue,industries:Ze,miserables:We,olympians:Xe,penguins:Ye,pizza:et,weather:tt}),rt=Object.defineProperty,i=n((e,t)=>rt(e,"name",{value:t,configurable:!0}),"i");const nt={now:()=>$.now(),width:()=>$.width(document.querySelector("main")),dark:()=>$.dark(),resize:()=>ce,FileAttachment:()=>de,Generators:()=>$,Mutable:()=>pe,...Qe,...ot},st=new le(nt),V=st.module(),N=new Map,k=X(document.body);function K(e){const{id:t,mode:r,inputs:o=[],outputs:m=[],body:g}=e,y=[];N.set(t,{cell:e,variables:y});const a=k.get(t),f=te(a);a._nodes=[],r===void 0&&(a._expanded=[]),f&&a._nodes.push(f);const h=i(()=>G(a,f),"pending"),q=i(b=>J(a,b),"rejected"),u=V.variable({_node:a.parentNode,pending:h,rejected:q},{shadow:{}});if(o.includes("display")||o.includes("view")){let b=-1;const L=r==="jsx"?F:w,se=r==="inline"?Z:r==="jsx"?U:W,E=new u.constructor(2,u._module);if(E.define(o.filter(p=>p!=="display"&&p!=="view"),()=>{let p=u._version;return _=>{if(pb&&L(a),b=p,se(a,_),_}}),u._shadow.set("display",E),o.includes("view")){const p=new u.constructor(2,u._module,null,{shadow:{}});p._shadow.set("display",E),p.define(["display"],_=>ae=>$.input(_(ae))),u._shadow.set("view",p)}}u.define(m.length?`cell ${t}`:null,o,g),y.push(u);for(const b of m)y.push(V.variable(!0).define(b,[`cell ${t}`],L=>L[b]))}n(K,"$"),i(K,"define");function F(){}n(F,"z"),i(F,"noop");function w(e){e._expanded&&(e._expanded=e._nodes.map(oe)),e._nodes.forEach(t=>t.remove()),e._nodes.length=0}n(w,"p"),i(w,"clear");function G(e,t){e._error&&(e._error=!1,w(e),t&&v(e,t))}n(G,"C"),i(G,"reset");function J(e,t){console.error(t),e._error=!0,w(e),v(e,z(t))}n(J,"F"),i(J,"reject");function U(e,t){return(e._root??=import("../_npm/react-dom@18.3.1/_esm.js").then(({createRoot:r})=>{const o=document.createElement("DIV");return[o,r(o)]})).then(([r,o])=>{r.parentNode||(e._nodes.push(r),e.parentNode.insertBefore(r,e)),o.render(t)})}n(U,"H"),i(U,"displayJsx");function v(e,t){if(t.nodeType===11){let r;for(;r=t.firstChild;)e._nodes.push(r),e.parentNode.insertBefore(r,e)}else e._nodes.push(t),e.parentNode.insertBefore(t,e)}n(v,"a"),i(v,"displayNode");function Z(e,t){if(C(t))v(e,t);else if(typeof t=="string"||!t?.[Symbol.iterator])v(e,document.createTextNode(t));else for(const r of t)v(e,C(r)?r:document.createTextNode(r))}n(Z,"J"),i(Z,"displayInline");function W(e,t){v(e,C(t)?t:M(t,e._expanded[e._nodes.length]))}n(W,"P"),i(W,"displayBlock");function at(e){w(k.get(e)),N.get(e).variables.forEach(t=>t.delete()),N.delete(e)}n(at,"Q"),i(at,"undefine");function C(e){return e instanceof Node&&e instanceof e.constructor}n(C,"N"),i(C,"isNode");function X(e){const t=new Map,r=document.createNodeIterator(e,128,null);let o;for(;o=r.nextNode();)Y(o)&&t.set(o.data.slice(1,-1),o);return t}n(X,"v"),i(X,"findRoots");function Y(e){return e.nodeType===8&&/^:[0-9a-f]{8}(?:-\d+)?:$/.test(e.data)}n(Y,"K"),i(Y,"isRoot");function ee(e){return e.nodeType===1&&e.tagName==="OBSERVABLEHQ-LOADING"}n(ee,"U"),i(ee,"isLoading");function te(e){const t=e.previousSibling;return t&&ee(t)?t:null}n(te,"B"),i(te,"findLoading");function it(e,t){t==null?k.delete(e):k.set(e,t)}n(it,"W"),i(it,"registerRoot");function oe(e){if(e.nodeType!==1||!e.classList.contains("observablehq"))return;const t=e.querySelectorAll(".observablehq--expanded");if(t.length)return Array.from(t,r=>re(e,r))}n(oe,"X"),i(oe,"getExpanded");function re(e,t){const r=[];for(;t!==e;)r.push(ne(t)),t=t.parentNode;return r.reverse()}n(re,"Y"),i(re,"getNodePath");function ne(e){return Array.prototype.indexOf.call(e.parentNode.childNodes,e)}n(ne,"Z"),i(ne,"getChildIndex");export{K as define}; diff --git a/docs/_observablehq/runtime.56d81cb2.js b/docs/_observablehq/runtime.56d81cb2.js new file mode 100644 index 0000000..60f24c6 --- /dev/null +++ b/docs/_observablehq/runtime.56d81cb2.js @@ -0,0 +1,7 @@ +var Ft=Object.defineProperty;var r=(e,t)=>Ft(e,"name",{value:t,configurable:!0});var B,H;import{FileAttachments as Rt,Library as Ut}from"./stdlib.831f6193.js";var zt=Object.defineProperty,Bt=r((e,t)=>zt(e,"name",{value:t,configurable:!0}),"c$7");function A(e,t,n){n=n||{};var i=e.ownerDocument,l=i.defaultView.CustomEvent;typeof l=="function"?l=new l(t,{detail:n}):(l=i.createEvent("Event"),l.initEvent(t,!1,!1),l.detail=n),e.dispatchEvent(l)}r(A,"o$c"),Bt(A,"dispatch");var Ht=Object.defineProperty,be=r((e,t)=>Ht(e,"name",{value:t,configurable:!0}),"r$7");function ee(e){return Array.isArray(e)||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array}r(ee,"o$b"),be(ee,"isarray");function te(e){return e===(e|0)+""}r(te,"s$4"),be(te,"isindex");var Vt=Object.defineProperty,Yt=r((e,t)=>Vt(e,"name",{value:t,configurable:!0}),"n$8");function g(e){const t=document.createElement("span");return t.className="observablehq--cellname",t.textContent=`${e} = `,t}r(g,"c$6"),Yt(g,"inspectName");var Gt=Object.defineProperty,Jt=r((e,t)=>Gt(e,"name",{value:t,configurable:!0}),"t$8");const Kt=Symbol.prototype.toString;function j(e){return Kt.call(e)}r(j,"e$6"),Jt(j,"formatSymbol");var Zt=Object.defineProperty,ne=r((e,t)=>Zt(e,"name",{value:t,configurable:!0}),"n$6");const{getOwnPropertySymbols:Xt,prototype:{hasOwnProperty:Qt}}=Object,{toStringTag:Wt}=Symbol,ve={},k=Xt;function L(e,t){return Qt.call(e,t)}r(L,"i$5"),ne(L,"isown");function V(e){return e[Wt]||e.constructor&&e.constructor.name||"Object"}r(V,"l$1"),ne(V,"tagof");function _(e,t){try{const n=e[t];return n&&n.constructor,n}catch{return ve}}r(_,"y$2"),ne(_,"valueof");var en=Object.defineProperty,tn=r((e,t)=>en(e,"name",{value:t,configurable:!0}),"i$4");const nn=[{symbol:"@@__IMMUTABLE_INDEXED__@@",name:"Indexed",modifier:!0},{symbol:"@@__IMMUTABLE_KEYED__@@",name:"Keyed",modifier:!0},{symbol:"@@__IMMUTABLE_LIST__@@",name:"List",arrayish:!0},{symbol:"@@__IMMUTABLE_MAP__@@",name:"Map"},{symbol:"@@__IMMUTABLE_ORDERED__@@",name:"Ordered",modifier:!0,prefix:!0},{symbol:"@@__IMMUTABLE_RECORD__@@",name:"Record"},{symbol:"@@__IMMUTABLE_SET__@@",name:"Set",arrayish:!0,setish:!0},{symbol:"@@__IMMUTABLE_STACK__@@",name:"Stack",arrayish:!0}];function re(e){try{let t=nn.filter(({symbol:o})=>e[o]===!0);if(!t.length)return;const n=t.find(o=>!o.modifier),i=n.name==="Map"&&t.find(o=>o.modifier&&o.prefix),l=t.some(o=>o.arrayish),a=t.some(o=>o.setish);return{name:`${i?i.name:""}${n.name}`,symbols:t,arrayish:l&&!a,setish:a}}catch{return null}}r(re,"y$1"),tn(re,"immutableName");var rn=Object.defineProperty,b=r((e,t)=>rn(e,"name",{value:t,configurable:!0}),"i$3");const{getPrototypeOf:ie,getOwnPropertyDescriptors:on}=Object,ye=ie({});function oe(e,t,n,i){let l=ee(e),a,o,s,u;e instanceof Map?e instanceof e.constructor?(a=`Map(${e.size})`,o=ge):(a="Map()",o=P):e instanceof Set?e instanceof e.constructor?(a=`Set(${e.size})`,o=$e):(a="Set()",o=P):l?(a=`${e.constructor.name}(${e.length})`,o=Ce):(u=re(e))?(a=`Immutable.${u.name}${u.name==="Record"?"":`(${e.size})`}`,l=u.arrayish,o=u.arrayish?Ee:u.setish?we:Se):i?(a=V(e),o=xe):(a=V(e),o=P);const c=document.createElement("span");c.className="observablehq--expanded",n&&c.appendChild(g(n));const p=c.appendChild(document.createElement("a"));p.innerHTML=` + + `,p.appendChild(document.createTextNode(`${a}${l?" [":" {"}`)),p.addEventListener("mouseup",function(d){d.stopPropagation(),D(c,Y(e,null,n,i))}),o=o(e);for(let d=0;!(s=o.next()).done&&d<20;++d)c.appendChild(s.value);if(!s.done){const d=c.appendChild(document.createElement("a"));d.className="observablehq--field",d.style.display="block",d.appendChild(document.createTextNode(" \u2026 more")),d.addEventListener("mouseup",function(S){S.stopPropagation(),c.insertBefore(s.value,c.lastChild.previousSibling);for(let O=0;!(s=o.next()).done&&O<19;++O)c.insertBefore(s.value,c.lastChild.previousSibling);s.done&&c.removeChild(c.lastChild.previousSibling),A(c,"load")})}return c.appendChild(document.createTextNode(l?"]":"}")),c}r(oe,"F$2"),b(oe,"inspectExpanded");function*ge(e){for(const[t,n]of e)yield Ne(t,n);yield*P(e)}r(ge,"A$3"),b(ge,"iterateMap");function*$e(e){for(const t of e)yield se(t);yield*P(e)}r($e,"B$1"),b($e,"iterateSet");function*we(e){for(const t of e)yield se(t)}r(we,"D$5"),b(we,"iterateImSet");function*Ce(e){for(let t=0,n=e.length;t ")),n.appendChild(h(t)),n}r(Ne,"J$1"),b(Ne,"formatMapField");function se(e){const t=document.createElement("div");return t.className="observablehq--field",t.appendChild(document.createTextNode(" ")),t.appendChild(h(e)),t}r(se,"k$2"),b(se,"formatSetField");var an=Object.defineProperty,v=r((e,t)=>an(e,"name",{value:t,configurable:!0}),"a$3");function le(e){const t=window.getSelection();return t.type==="Range"&&(t.containsNode(e,!0)||e.contains(t.anchorNode)||e.contains(t.focusNode))}r(le,"q$1"),v(le,"hasSelection");function Y(e,t,n,i){let l=ee(e),a,o,s,u;if(e instanceof Map?e instanceof e.constructor?(a=`Map(${e.size})`,o=Oe):(a="Map()",o=q):e instanceof Set?e instanceof e.constructor?(a=`Set(${e.size})`,o=je):(a="Set()",o=q):l?(a=`${e.constructor.name}(${e.length})`,o=Me):(u=re(e))?(a=`Immutable.${u.name}${u.name==="Record"?"":`(${e.size})`}`,l=u.arrayish,o=u.arrayish?qe:u.setish?Pe:Te):(a=V(e),o=q),t){const d=document.createElement("span");return d.className="observablehq--shallow",n&&d.appendChild(g(n)),d.appendChild(document.createTextNode(a)),d.addEventListener("mouseup",function(S){le(d)||(S.stopPropagation(),D(d,Y(e)))}),d}const c=document.createElement("span");c.className="observablehq--collapsed",n&&c.appendChild(g(n));const p=c.appendChild(document.createElement("a"));p.innerHTML=` + + `,p.appendChild(document.createTextNode(`${a}${l?" [":" {"}`)),c.addEventListener("mouseup",function(d){le(c)||(d.stopPropagation(),D(c,oe(e,null,n,i)))},!0),o=o(e);for(let d=0;!(s=o.next()).done&&d<20;++d)d>0&&c.appendChild(document.createTextNode(", ")),c.appendChild(s.value);return s.done||c.appendChild(document.createTextNode(", \u2026")),c.appendChild(document.createTextNode(l?"]":"}")),c}r(Y,"E"),v(Y,"inspectCollapsed");function*Oe(e){for(const[t,n]of e)yield Ae(t,n);yield*q(e)}r(Oe,"F$1"),v(Oe,"iterateMap");function*je(e){for(const t of e)yield h(t,!0);yield*q(e)}r(je,"I$2"),v(je,"iterateSet");function*Pe(e){for(const t of e)yield h(t,!0)}r(Pe,"L$3"),v(Pe,"iterateImSet");function*qe(e){let t=-1,n=0;for(const i=e.size;nt+1&&(yield I(n-t-1)),yield h(e.get(n),!0),t=n;n>t+1&&(yield I(n-t-1))}r(qe,"A$2"),v(qe,"iterateImArray");function*Me(e){let t=-1,n=0;for(const i=e.length;nt+1&&(yield I(n-t-1)),yield h(_(e,n),!0),t=n);n>t+1&&(yield I(n-t-1));for(const i in e)!te(i)&&L(e,i)&&(yield M(i,_(e,i),"observablehq--key"));for(const i of k(e))yield M(j(i),_(e,i),"observablehq--symbol")}r(Me,"D$4"),v(Me,"iterateArray");function*q(e){for(const t in e)L(e,t)&&(yield M(t,_(e,t),"observablehq--key"));for(const t of k(e))yield M(j(t),_(e,t),"observablehq--symbol")}r(q,"u$2"),v(q,"iterateObject");function*Te(e){for(const[t,n]of e)yield M(t,n,"observablehq--key")}r(Te,"O$3"),v(Te,"iterateImObject");function I(e){const t=document.createElement("span");return t.className="observablehq--empty",t.textContent=e===1?"empty":`empty \xD7 ${e}`,t}r(I,"h$3"),v(I,"formatEmpty");function M(e,t,n){const i=document.createDocumentFragment(),l=i.appendChild(document.createElement("span"));return l.className=n,l.textContent=e,i.appendChild(document.createTextNode(": ")),i.appendChild(h(t,!0)),i}r(M,"m$1"),v(M,"formatField");function Ae(e,t){const n=document.createDocumentFragment();return n.appendChild(h(e,!0)),n.appendChild(document.createTextNode(" => ")),n.appendChild(h(t,!0)),n}r(Ae,"P$2"),v(Ae,"formatMapField");var sn=Object.defineProperty,ce=r((e,t)=>sn(e,"name",{value:t,configurable:!0}),"i$2");function ke(e,t){if(e instanceof Date||(e=new Date(+e)),isNaN(e))return typeof t=="function"?t(e):t;const n=e.getUTCHours(),i=e.getUTCMinutes(),l=e.getUTCSeconds(),a=e.getUTCMilliseconds();return`${Le(e.getUTCFullYear())}-${w(e.getUTCMonth()+1,2)}-${w(e.getUTCDate(),2)}${n||i||l||a?`T${w(n,2)}:${w(i,2)}${l||a?`:${w(l,2)}${a?`.${w(a,3)}`:""}`:""}Z`:""}`}r(ke,"c$4"),ce(ke,"format");function Le(e){return e<0?`-${w(-e,6)}`:e>9999?`+${w(e,6)}`:w(e,4)}r(Le,"f$6"),ce(Le,"formatYear");function w(e,t){return`${e}`.padStart(t,"0")}r(w,"t$7"),ce(w,"pad");var ln=Object.defineProperty,cn=r((e,t)=>ln(e,"name",{value:t,configurable:!0}),"t$6");const un=/^(?:[-+]\d{2})?\d{4}(?:-\d{2}(?:-\d{2})?)?(?:T\d{2}:\d{2}(?::\d{2}(?:\.\d{3})?)?(?:Z|[-+]\d{2}:?\d{2})?)?$/;function dn(e,t){return un.test(e+="")?new Date(e):typeof t=="function"?t(e):t}r(dn,"r$5"),cn(dn,"parse");var fn=Object.defineProperty,pn=r((e,t)=>fn(e,"name",{value:t,configurable:!0}),"r$4");function Ie(e){return ke(e,"Invalid Date")}r(Ie,"f$5"),pn(Ie,"formatDate");var mn=Object.defineProperty,hn=r((e,t)=>mn(e,"name",{value:t,configurable:!0}),"t$5"),_n=Error.prototype.toString;function De(e){return e.stack||_n.call(e)}r(De,"e$4"),hn(De,"formatError");var bn=Object.defineProperty,vn=r((e,t)=>bn(e,"name",{value:t,configurable:!0}),"r$3"),yn=RegExp.prototype.toString;function Fe(e){return yn.call(e)}r(Fe,"g$1"),vn(Fe,"formatRegExp");var gn=Object.defineProperty,G=r((e,t)=>gn(e,"name",{value:t,configurable:!0}),"s$1");const ue=20;function Re(e,t,n,i){if(t===!1){if(fe(e,/["\n]/g)<=fe(e,/`|\${/g)){const c=document.createElement("span");i&&c.appendChild(g(i));const p=c.appendChild(document.createElement("span"));return p.className="observablehq--string",p.textContent=JSON.stringify(e),c}const o=e.split(` +`);if(o.length>ue&&!n){const c=document.createElement("div");i&&c.appendChild(g(i));const p=c.appendChild(document.createElement("span"));p.className="observablehq--string",p.textContent="`"+de(o.slice(0,ue).join(` +`));const d=c.appendChild(document.createElement("span")),S=o.length-ue;return d.textContent=`Show ${S} truncated line${S>1?"s":""}`,d.className="observablehq--string-expand",d.addEventListener("mouseup",function(O){O.stopPropagation(),D(c,h(e,t,!0,i))}),c}const s=document.createElement("span");i&&s.appendChild(g(i));const u=s.appendChild(document.createElement("span"));return u.className=`observablehq--string${n?" observablehq--expanded":""}`,u.textContent="`"+de(e)+"`",s}const l=document.createElement("span");i&&l.appendChild(g(i));const a=l.appendChild(document.createElement("span"));return a.className="observablehq--string",a.textContent=JSON.stringify(e.length>100?`${e.slice(0,50)}\u2026${e.slice(-49)}`:e),l}r(Re,"g"),G(Re,"formatString");function de(e){return e.replace(/[\\`\x00-\x09\x0b-\x19]|\${/g,Ue)}r(de,"h$2"),G(de,"templatify");function Ue(e){var t=e.charCodeAt(0);switch(t){case 8:return"\\b";case 9:return"\\t";case 11:return"\\v";case 12:return"\\f";case 13:return"\\r"}return t<16?"\\x0"+t.toString(16):t<32?"\\x"+t.toString(16):"\\"+e}r(Ue,"$$2"),G(Ue,"templatifyChar");function fe(e,t){for(var n=0;t.exec(e);)++n;return n}r(fe,"C$2"),G(fe,"count");var $n=Object.defineProperty,ze=r((e,t)=>$n(e,"name",{value:t,configurable:!0}),"a$1"),wn=Function.prototype.toString,Cn={prefix:"async \u0192"},En={prefix:"async \u0192*"},Be={prefix:"class"},xn={prefix:"\u0192"},Sn={prefix:"\u0192*"};function He(e,t){var n,i,l=wn.call(e);switch(e.constructor&&e.constructor.name){case"AsyncFunction":n=Cn;break;case"AsyncGeneratorFunction":n=En;break;case"GeneratorFunction":n=Sn;break;default:n=/^class\b/.test(l)?Be:xn;break}return n===Be?T(n,"",t):(i=/^(?:async\s*)?(\w+)\s*=>/.exec(l))?T(n,"("+i[1]+")",t):(i=/^(?:async\s*)?\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(l))?T(n,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):(i=/^(?:async\s*)?function(?:\s*\*)?(?:\s*\w+)?\s*\(\s*(\w+(?:\s*,\s*\w+)*)?\s*\)/.exec(l))?T(n,i[1]?"("+i[1].replace(/\s*,\s*/g,", ")+")":"()",t):T(n,"(\u2026)",t)}r(He,"y"),ze(He,"inspectFunction");function T(e,t,n){var i=document.createElement("span");i.className="observablehq--function",n&&i.appendChild(g(n));var l=i.appendChild(document.createElement("span"));return l.className="observablehq--keyword",l.textContent=e.prefix,i.appendChild(document.createTextNode(t)),i}r(T,"c$3"),ze(T,"formatFunction");var Nn=Object.defineProperty,Ve=r((e,t)=>Nn(e,"name",{value:t,configurable:!0}),"c$2");const{prototype:{toString:On}}=Object;function h(e,t,n,i,l){let a=typeof e;switch(a){case"boolean":case"undefined":{e+="";break}case"number":{e=e===0&&1/e<0?"-0":e+"";break}case"bigint":{e=e+"n";break}case"symbol":{e=j(e);break}case"function":return He(e,i);case"string":return Re(e,t,n,i);default:{if(e===null){a=null,e="null";break}if(e instanceof Date){a="date",e=Ie(e);break}if(e===ve){a="forbidden",e="[forbidden]";break}switch(On.call(e)){case"[object RegExp]":{a="regexp",e=Fe(e);break}case"[object Error]":case"[object DOMException]":{a="error",e=De(e);break}default:return(n?oe:Y)(e,t,i,l)}break}}const o=document.createElement("span");i&&o.appendChild(g(i));const s=o.appendChild(document.createElement("span"));return s.className=`observablehq--${a}`,s.textContent=e,o}r(h,"$$1"),Ve(h,"inspect");function D(e,t){e.classList.contains("observablehq--inspect")&&t.classList.add("observablehq--inspect"),e.parentNode.replaceChild(t,e),A(t,"load")}r(D,"z$2"),Ve(D,"replace");var jn=Object.defineProperty,Ye=r((e,t)=>jn(e,"name",{value:t,configurable:!0}),"n$2");const Pn=/\s+\(\d+:\d+\)$/m,Ge=(B=class{constructor(t){if(!t)throw new Error("invalid node");this._node=t,t.classList.add("observablehq")}pending(){const{_node:t}=this;t.classList.remove("observablehq--error"),t.classList.add("observablehq--running")}fulfilled(t,n){const{_node:i}=this;if((!Je(t)||t.parentNode&&t.parentNode!==i)&&(t=h(t,!1,i.firstChild&&i.firstChild.classList&&i.firstChild.classList.contains("observablehq--expanded"),n),t.classList.add("observablehq--inspect")),i.classList.remove("observablehq--running","observablehq--error"),i.firstChild!==t)if(i.firstChild){for(;i.lastChild!==i.firstChild;)i.removeChild(i.lastChild);i.replaceChild(t,i.firstChild)}else i.appendChild(t);A(i,"update")}rejected(t,n){const{_node:i}=this;for(i.classList.remove("observablehq--running"),i.classList.add("observablehq--error");i.lastChild;)i.removeChild(i.lastChild);var l=document.createElement("div");l.className="observablehq--inspect",n&&l.appendChild(g(n)),l.appendChild(document.createTextNode((t+"").replace(Pn,""))),i.appendChild(l),A(i,"error",{error:t})}},r(B,"o"),B);Ye(Ge,"Inspector");let pe=Ge;pe.into=function(e){if(typeof e=="string"&&(e=document.querySelector(e),e==null))throw new Error("container not found");return function(){return new pe(e.appendChild(document.createElement("div")))}};function Je(e){return(e instanceof Element||e instanceof Text)&&e instanceof e.constructor}r(Je,"p$2"),Ye(Je,"isnode");var qn=Object.defineProperty,Mn=r((e,t)=>qn(e,"name",{value:t,configurable:!0}),"o$4");const Ke=(H=class extends Error{constructor(t,n){super(t),this.input=n}},r(H,"e"),H);Mn(Ke,"RuntimeError");let C=Ke;C.prototype.name="RuntimeError";var Tn=Object.defineProperty,An=r((e,t)=>Tn(e,"name",{value:t,configurable:!0}),"t$4");function Ze(e){return e&&typeof e.next=="function"&&typeof e.return=="function"}r(Ze,"f$1"),An(Ze,"generatorish");var kn=Object.defineProperty,Ln=r((e,t)=>kn(e,"name",{value:t,configurable:!0}),"t$3");function J(e){return()=>e}r(J,"e$2"),Ln(J,"constant");var In=Object.defineProperty,Dn=r((e,t)=>In(e,"name",{value:t,configurable:!0}),"n$1");function F(e){return e}r(F,"o$3"),Dn(F,"identity");var Fn=Object.defineProperty,Rn=r((e,t)=>Fn(e,"name",{value:t,configurable:!0}),"t$2");function Xe(e){return()=>{throw e}}r(Xe,"h$1"),Rn(Xe,"rethrow");const Un=Array.prototype,zn=Un.map;var Bn=Object.defineProperty,Hn=r((e,t)=>Bn(e,"name",{value:t,configurable:!0}),"o$1");function E(){}r(E,"e"),Hn(E,"noop");var Vn=Object.defineProperty,m=r((e,t)=>Vn(e,"name",{value:t,configurable:!0}),"r");const me=1,R=2,K=3,U=Symbol("no-observer");function N(e,t,n,i){n||(n=U),Object.defineProperties(this,{_observer:{value:n,writable:!0},_definition:{value:Z,writable:!0},_duplicate:{value:void 0,writable:!0},_duplicates:{value:void 0,writable:!0},_indegree:{value:NaN,writable:!0},_inputs:{value:[],writable:!0},_invalidate:{value:E,writable:!0},_module:{value:t},_name:{value:null,writable:!0},_outputs:{value:new Set,writable:!0},_promise:{value:Promise.resolve(void 0),writable:!0},_reachable:{value:n!==U,writable:!0},_rejector:{value:tt(this)},_shadow:{value:Qe(t,i)},_type:{value:e},_value:{value:void 0,writable:!0},_version:{value:0,writable:!0}})}r(N,"h"),m(N,"Variable"),Object.defineProperties(N.prototype,{_pending:{value:at,writable:!0,configurable:!0},_fulfilled:{value:st,writable:!0,configurable:!0},_rejected:{value:lt,writable:!0,configurable:!0},_resolve:{value:rt,writable:!0,configurable:!0},define:{value:nt,writable:!0,configurable:!0},delete:{value:ot,writable:!0,configurable:!0},import:{value:it,writable:!0,configurable:!0}});function Qe(e,t){return t?.shadow?new Map(Object.entries(t.shadow).map(([n,i])=>[n,new N(R,e).define([],i)])):null}r(Qe,"x$2"),m(Qe,"initShadow");function We(e){e._module._runtime._dirty.add(e),e._outputs.add(this)}r(We,"S$1"),m(We,"variable_attach");function et(e){e._module._runtime._dirty.add(e),e._outputs.delete(this)}r(et,"j"),m(et,"variable_detach");function Z(){throw Z}r(Z,"f"),m(Z,"variable_undefined");function x(){throw x}r(x,"b"),m(x,"variable_stale");function tt(e){return t=>{throw t===x?t:t===Z?new C(`${e._name} is not defined`,e._name):t instanceof Error&&t.message?new C(t.message,e._name):new C(`${e._name} could not be resolved`,e._name)}}r(tt,"O$2"),m(tt,"variable_rejector");function he(e){return()=>{throw new C(`${e} is defined more than once`)}}r(he,"w$1"),m(he,"variable_duplicate");function nt(e,t,n){switch(arguments.length){case 1:{n=e,e=t=null;break}case 2:{n=t,typeof e=="string"?t=null:(t=e,e=null);break}}return X.call(this,e==null?null:String(e),t==null?[]:zn.call(t,this._resolve,this),typeof n=="function"?n:J(n))}r(nt,"P$1"),m(nt,"variable_define");function rt(e){return this._shadow?.get(e)??this._module._resolve(e)}r(rt,"I$1"),m(rt,"variable_resolve");function X(e,t,n){const i=this._module._scope,l=this._module._runtime;if(this._inputs.forEach(et,this),t.forEach(We,this),this._inputs=t,this._definition=n,this._value=void 0,n===E?l._variables.delete(this):l._variables.add(this),e!==this._name||i.get(e)!==this){let a,o;if(this._name)if(this._outputs.size)i.delete(this._name),o=this._module._resolve(this._name),o._outputs=this._outputs,this._outputs=new Set,o._outputs.forEach(function(s){s._inputs[s._inputs.indexOf(this)]=o},this),o._outputs.forEach(l._updates.add,l._updates),l._dirty.add(o).add(this),i.set(this._name,o);else if((o=i.get(this._name))===this)i.delete(this._name);else if(o._type===K)o._duplicates.delete(this),this._duplicate=void 0,o._duplicates.size===1&&(o=o._duplicates.keys().next().value,a=i.get(this._name),o._outputs=a._outputs,a._outputs=new Set,o._outputs.forEach(function(s){s._inputs[s._inputs.indexOf(a)]=o}),o._definition=o._duplicate,o._duplicate=void 0,l._dirty.add(a).add(o),l._updates.add(o),i.set(this._name,o));else throw new Error;if(this._outputs.size)throw new Error;e&&((o=i.get(e))?o._type===K?(this._definition=he(e),this._duplicate=n,o._duplicates.add(this)):o._type===R?(this._outputs=o._outputs,o._outputs=new Set,this._outputs.forEach(function(s){s._inputs[s._inputs.indexOf(o)]=this},this),l._dirty.add(o).add(this),i.set(e,this)):(o._duplicate=o._definition,this._duplicate=n,a=new N(K,this._module),a._name=e,a._definition=this._definition=o._definition=he(e),a._outputs=o._outputs,o._outputs=new Set,a._outputs.forEach(function(s){s._inputs[s._inputs.indexOf(o)]=a}),a._duplicates=new Set([this,o]),l._dirty.add(o).add(a),l._updates.add(o).add(a),i.set(e,a)):i.set(e,this)),this._name=e}return this._version>0&&++this._version,l._updates.add(this),l._compute(),this}r(X,"c"),m(X,"variable_defineImpl");function it(e,t,n){return arguments.length<3&&(n=t,t=e),X.call(this,String(t),[n._resolve(String(e))],F)}r(it,"T$1"),m(it,"variable_import");function ot(){return X.call(this,null,[],E)}r(ot,"k$1"),m(ot,"variable_delete");function at(){this._observer.pending&&this._observer.pending()}r(at,"z$1"),m(at,"variable_pending");function st(e){this._observer.fulfilled&&this._observer.fulfilled(e,this._name)}r(st,"L$2"),m(st,"variable_fulfilled");function lt(e){this._observer.rejected&&this._observer.rejected(e,this._name)}r(lt,"M$2"),m(lt,"variable_rejected");var Yn=Object.defineProperty,y=r((e,t)=>Yn(e,"name",{value:t,configurable:!0}),"n");const ct=Symbol("variable"),ut=Symbol("invalidation"),dt=Symbol("visibility");function z(e,t=[]){Object.defineProperties(this,{_runtime:{value:e},_scope:{value:new Map},_builtins:{value:new Map([["@variable",ct],["invalidation",ut],["visibility",dt],...t])},_source:{value:null,writable:!0}})}r(z,"M$1"),y(z,"Module"),Object.defineProperties(z.prototype,{_resolve:{value:vt,writable:!0,configurable:!0},redefine:{value:ft,writable:!0,configurable:!0},define:{value:pt,writable:!0,configurable:!0},derive:{value:bt,writable:!0,configurable:!0},import:{value:mt,writable:!0,configurable:!0},value:{value:_t,writable:!0,configurable:!0},variable:{value:ht,writable:!0,configurable:!0},builtin:{value:yt,writable:!0,configurable:!0}});function ft(e){const t=this._scope.get(e);if(!t)throw new C(`${e} is not defined`);if(t._type===K)throw new C(`${e} is defined more than once`);return t.define.apply(t,arguments)}r(ft,"O$1"),y(ft,"module_redefine");function pt(){const e=new N(me,this);return e.define.apply(e,arguments)}r(pt,"V$1"),y(pt,"module_define");function mt(){const e=new N(me,this);return e.import.apply(e,arguments)}r(mt,"Y$1"),y(mt,"module_import");function ht(e,t){return new N(me,this,e,t)}r(ht,"$"),y(ht,"module_variable");async function _t(e){let t=this._scope.get(e);if(!t)throw new C(`${e} is not defined`);if(t._observer===U){t=this.variable(!0).define([e],F);try{return await Q(this._runtime,t)}finally{t.delete()}}else return Q(this._runtime,t)}r(_t,"A$1"),y(_t,"module_value");async function Q(e,t){await e._compute();try{return await t._promise}catch(n){if(n===x)return Q(e,t);throw n}}r(Q,"p"),y(Q,"module_revalue");function bt(e,t){const n=new Map,i=new Set,l=[];function a(s){let u=n.get(s);return u||(u=new z(s._runtime,s._builtins),u._source=s,n.set(s,u),l.push([u,s]),i.add(s),u)}r(a,"v"),y(a,"alias");const o=a(this);for(const s of e){const{alias:u,name:c}=typeof s=="object"?s:{name:s};o.import(c,u??c,t)}for(const s of i)for(const[u,c]of s._scope)if(c._definition===F){if(s===this&&o._scope.has(u))continue;const p=c._inputs[0]._module;p._source&&a(p)}for(const[s,u]of l)for(const[c,p]of u._scope){const d=s._scope.get(c);if(!(d&&d._type!==R))if(p._definition===F){const S=p._inputs[0],O=S._module;s.import(S._name,c,n.get(O)||O)}else s.define(c,p._inputs.map(gt),p._definition)}return o}r(bt,"C$1"),y(bt,"module_derive");function vt(e){let t=this._scope.get(e),n;if(!t)if(t=new N(R,this),this._builtins.has(e))t.define(e,J(this._builtins.get(e)));else if(this._runtime._builtin._scope.has(e))t.import(e,this._runtime._builtin);else{try{n=this._runtime._global(e)}catch(i){return t.define(e,Xe(i))}n===void 0?this._scope.set(t._name=e,t):t.define(e,J(n))}return t}r(vt,"R$1"),y(vt,"module_resolve");function yt(e,t){this._builtins.set(e,t)}r(yt,"D$1"),y(yt,"module_builtin");function gt(e){return e._name}r(gt,"N"),y(gt,"variable_name");var Gn=Object.defineProperty,f=r((e,t)=>Gn(e,"name",{value:t,configurable:!0}),"o");const Jn=typeof requestAnimationFrame=="function"?requestAnimationFrame:typeof setImmediate=="function"?setImmediate:e=>setTimeout(e,0);function _e(e=new Ut,t=Dt){const n=this.module();if(Object.defineProperties(this,{_dirty:{value:new Set},_updates:{value:new Set},_precomputes:{value:[],writable:!0},_computing:{value:null,writable:!0},_init:{value:null,writable:!0},_modules:{value:new Map},_variables:{value:new Set},_disposed:{value:!1,writable:!0},_builtin:{value:n},_global:{value:t}}),e)for(const i in e)new N(R,n).define(i,[],e[i])}r(_e,"k"),f(_e,"Runtime"),Object.defineProperties(_e.prototype,{_precompute:{value:Ct,writable:!0,configurable:!0},_compute:{value:Et,writable:!0,configurable:!0},_computeSoon:{value:xt,writable:!0,configurable:!0},_computeNow:{value:St,writable:!0,configurable:!0},dispose:{value:$t,writable:!0,configurable:!0},module:{value:wt,writable:!0,configurable:!0},fileAttachments:{value:Rt,writable:!0,configurable:!0}});function $t(){this._computing=Promise.resolve(),this._disposed=!0,this._variables.forEach(e=>{e._invalidate(),e._version=NaN})}r($t,"q"),f($t,"runtime_dispose");function wt(e,t=E){let n;if(e===void 0)return(n=this._init)?(this._init=null,n):new z(this);if(n=this._modules.get(e),n)return n;this._init=n=new z(this),this._modules.set(e,n);try{e(this,t)}finally{this._init=null}return n}r(wt,"A"),f(wt,"runtime_module");function Ct(e){this._precomputes.push(e),this._compute()}r(Ct,"O"),f(Ct,"runtime_precompute");function Et(){return this._computing||(this._computing=this._computeSoon())}r(Et,"T"),f(Et,"runtime_compute");function xt(){return new Promise(Jn).then(()=>this._disposed?void 0:this._computeNow())}r(xt,"F"),f(xt,"runtime_computeSoon");async function St(){let e=[],t,n,i=this._precomputes;if(i.length){this._precomputes=[];for(const a of i)a();await Nt(3)}t=new Set(this._dirty),t.forEach(function(a){a._inputs.forEach(t.add,t);const o=It(a);o>a._reachable?this._updates.add(a):o{});return t}r(Nt,"x"),f(Nt,"runtime_defer");function Ot(e){const t=new Set(e._inputs);for(const n of t){if(n===e)return!0;n._inputs.forEach(t.add,t)}return!1}r(Ot,"L"),f(Ot,"variable_circular");function jt(e){++e._indegree}r(jt,"R"),f(jt,"variable_increment");function Pt(e){--e._indegree}r(Pt,"V"),f(Pt,"variable_decrement");function qt(e){return e._promise.catch(e._rejector)}r(qt,"z"),f(qt,"variable_value");function W(e){return new Promise(function(t){e._invalidate=t})}r(W,"d"),f(W,"variable_invalidator");function Mt(e,t){let n=typeof IntersectionObserver=="function"&&t._observer&&t._observer._node,i=!n,l=E,a=E,o,s;return n&&(s=new IntersectionObserver(([u])=>(i=u.isIntersecting)&&(o=null,l())),s.observe(n),e.then(()=>(s.disconnect(),s=null,a()))),function(u){return i?Promise.resolve(u):s?(o||(o=new Promise((c,p)=>(l=c,a=p))),o.then(()=>u)):Promise.reject()}}r(Mt,"C"),f(Mt,"variable_intersector");function Tt(e){e._invalidate(),e._invalidate=E,e._pending();const t=e._value,n=++e._version;let i=null;const l=e._promise=(e._inputs.length?Promise.all(e._inputs.map(qt)).then(a):new Promise(s=>s(e._definition.call(t)))).then(o);function a(s){if(e._version!==n)throw x;for(let u=0,c=s.length;u{e._value=s,e._fulfilled(s)},s=>{s===x||e._version!==n||(e._value=void 0,e._rejected(s))})}r(Tt,"Y"),f(Tt,"variable_compute");function At(e,t,n){const i=e._module._runtime;let l;function a(u){return new Promise(c=>c(n.next(l))).then(({done:c,value:p})=>c?void 0:Promise.resolve(p).then(u))}r(a,"r"),f(a,"compute");function o(){const u=a(c=>{if(e._version!==t)throw x;return l=c,s(c,u).then(()=>i._precompute(o)),e._fulfilled(c),c});u.catch(c=>{c===x||e._version!==t||(s(void 0,u),e._rejected(c))})}r(o,"_"),f(o,"recompute");function s(u,c){return e._value=u,e._promise=c,e._outputs.forEach(i._updates.add,i._updates),i._compute()}return r(s,"i"),f(s,"postcompute"),a(u=>{if(e._version!==t)throw x;return l=u,i._precompute(o),u})}r(At,"B"),f(At,"variable_generate");function kt(e,t){e._invalidate(),e._invalidate=E,e._pending(),++e._version,e._indegree=NaN,(e._promise=Promise.reject(t)).catch(E),e._value=void 0,e._rejected(t)}r(kt,"D"),f(kt,"variable_error");function Lt(e){return function(){e.return()}}r(Lt,"G"),f(Lt,"variable_return");function It(e){if(e._observer!==U)return!0;const t=new Set(e._outputs);for(const n of t){if(n._observer!==U)return!0;n._outputs.forEach(t.add,t)}return!1}r(It,"H"),f(It,"variable_reachable");function Dt(e){return globalThis[e]}r(Dt,"J"),f(Dt,"window_global");export{pe as Inspector,_e as Runtime,C as RuntimeError}; diff --git a/docs/_observablehq/stdlib.831f6193.js b/docs/_observablehq/stdlib.831f6193.js new file mode 100644 index 0000000..69af854 --- /dev/null +++ b/docs/_observablehq/stdlib.831f6193.js @@ -0,0 +1 @@ +var S=Object.defineProperty;var i=(t,e)=>S(t,"name",{value:e,configurable:!0});var f,m,d,D=Object.defineProperty,u=i((t,e)=>D(t,"name",{value:e,configurable:!0}),"o$3");const v=new Map;function P(t,e){const r=new URL(t,location).href;if(e==null)v.delete(r);else{const{path:n,mimeType:a,lastModified:o}=e,s=new w(new URL(n,location).href,t.split("/").pop(),a,o);v.set(r,s)}}i(P,"y"),u(P,"registerFile");function b(t,e=location){if(new.target!==void 0)throw new TypeError("FileAttachment is not a constructor");const r=v.get(new URL(t,e).href);if(!r)throw new Error(`File not found: ${t}`);return r}i(b,"h"),u(b,"FileAttachment");async function c(t){const e=await fetch(await t.url());if(!e.ok)throw new Error(`Unable to load file: ${t.name}`);return e}i(c,"n$1"),u(c,"remote_fetch");const O=(f=class{constructor(e,r="application/octet-stream",n){Object.defineProperties(this,{name:{value:`${e}`,enumerable:!0},mimeType:{value:`${r}`,enumerable:!0},lastModified:{value:+n,enumerable:!0}})}async blob(){return(await c(this)).blob()}async arrayBuffer(){return(await c(this)).arrayBuffer()}async text(e){return e===void 0?(await c(this)).text():new TextDecoder(e).decode(await this.arrayBuffer())}async json(){return(await c(this)).json()}async stream(){return(await c(this)).body}async dsv({delimiter:e=",",array:r=!1,typed:n=!1}={}){const[a,o]=await Promise.all([this.text(),import("../_npm/d3-dsv@3.0.1/407f7a1f.js")]),s=o.dsvFormat(e);return(r?s.parseRows:s.parse)(a,n&&o.autoType)}async csv(e){return this.dsv({...e,delimiter:","})}async tsv(e){return this.dsv({...e,delimiter:" "})}async image(e){const r=await this.url();return new Promise((n,a)=>{const o=new Image;new URL(r,document.baseURI).origin!==new URL(location).origin&&(o.crossOrigin="anonymous"),Object.assign(o,e),o.onload=()=>n(o),o.onerror=()=>a(new Error(`Unable to load file: ${this.name}`)),o.src=r})}async arrow(){const[e,r]=await Promise.all([import("../_npm/apache-arrow@17.0.0/_esm.js"),c(this)]);return e.tableFromIPC(r)}async arquero(e){let r,n;switch(this.mimeType){case"application/json":r=this.text(),n="fromJSON";break;case"text/tab-separated-values":e?.delimiter===void 0&&(e={...e,delimiter:" "});case"text/csv":r=this.text(),n="fromCSV";break;default:if(/\.arrow$/i.test(this.name))r=this.arrow(),n="fromArrow";else if(/\.parquet$/i.test(this.name))r=this.parquet(),n="fromArrow";else throw new Error(`unable to determine Arquero loader: ${this.name}`);break}const[a,o]=await Promise.all([import("../_npm/arquero@6.0.1/_esm.js"),r]);return a[n](o,e)}async parquet(){const[e,r,n]=await Promise.all([import("../_npm/apache-arrow@17.0.0/_esm.js"),import("../_npm/parquet-wasm@0.6.1/_esm.js").then(async a=>(await a.default(import.meta.resolve("../_npm/parquet-wasm@0.6.1/esm/parquet_wasm_bg.wasm")),a)),this.arrayBuffer()]);return e.tableFromIPC(r.readParquet(new Uint8Array(n)).intoIPCStream())}async sqlite(){const[{SQLiteDatabaseClient:e},r]=await Promise.all([import("./stdlib/sqlite.js"),this.arrayBuffer()]);return e.open(r)}async zip(){const[{ZipArchive:e},r]=await Promise.all([import("./stdlib/zip.js"),this.arrayBuffer()]);return e.from(r)}async xml(e="application/xml"){return new DOMParser().parseFromString(await this.text(),e)}async html(){return this.xml("text/html")}async xlsx(){const[{Workbook:e},r]=await Promise.all([import("./stdlib/xlsx.js"),this.arrayBuffer()]);return e.load(r)}},i(f,"f"),f);u(O,"AbstractFile");let j=O;const x=(m=class extends j{constructor(e,r,n,a){super(r,n,a),Object.defineProperty(this,"href",{value:e})}async url(){return this.href}},i(m,"w"),m);u(x,"FileAttachmentImpl");let w=x;Object.defineProperty(w,"name",{value:"FileAttachment"}),b.prototype=w.prototype;var _=Object.defineProperty,N=i((t,e)=>_(t,"name",{value:e,configurable:!0}),"r$3");async function*l(t){let e,r,n=!1;const a=t(o=>(r=o,e?(e(o),e=null):n=!0,o));if(a!=null&&typeof a!="function")throw new Error(typeof a.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield n?(n=!1,r):new Promise(o=>e=o)}finally{a?.()}}i(l,"u"),N(l,"observe");var V=Object.defineProperty,A=i((t,e)=>V(t,"name",{value:e,configurable:!0}),"o$2");function F(){return l(t=>{let e;const r=matchMedia("(prefers-color-scheme: dark)"),n=A(()=>{const a=getComputedStyle(document.body).getPropertyValue("color-scheme")==="dark";e!==a&&t(e=a)},"changed");return n(),r.addEventListener("change",n),()=>r.removeEventListener("change",n)})}i(F,"m"),A(F,"dark");var G=Object.defineProperty,y=i((t,e)=>G(t,"name",{value:e,configurable:!0}),"e$2");function k(t){return l(e=>{const r=E(t);let n=g(t);const a=y(()=>e(g(t)),"inputted");return t.addEventListener(r,a),n!==void 0&&e(n),()=>t.removeEventListener(r,a)})}i(k,"o$1"),y(k,"input");function g(t){switch(t.type){case"range":case"number":return t.valueAsNumber;case"date":return t.valueAsDate;case"checkbox":return t.checked;case"file":return t.multiple?t.files:t.files[0];case"select-multiple":return Array.from(t.selectedOptions,e=>e.value);default:return t.value}}i(g,"a"),y(g,"valueof");function E(t){switch(t.type){case"button":case"submit":case"checkbox":return"click";case"file":return"change";default:return"input"}}i(E,"f$2"),y(E,"eventof");var J=Object.defineProperty,Q=i((t,e)=>J(t,"name",{value:e,configurable:!0}),"e$1");async function*L(){for(;;)yield Date.now()}i(L,"i$3"),Q(L,"now");var W=Object.defineProperty,Z=i((t,e)=>W(t,"name",{value:e,configurable:!0}),"r$2");async function*q(t){let e;const r=[],n=t(a=>(r.push(a),e&&(e(r.shift()),e=null),a));if(n!=null&&typeof n!="function")throw new Error(typeof n.then=="function"?"async initializers are not supported":"initializer returned something, but not a dispose function");try{for(;;)yield r.length?r.shift():new Promise(a=>e=a)}finally{n?.()}}i(q,"l"),Z(q,"queue");var H=Object.defineProperty,K=i((t,e)=>H(t,"name",{value:e,configurable:!0}),"i$2");function R(t,e){return l(r=>{let n;const a=new ResizeObserver(([o])=>{const s=o.contentRect.width;s!==n&&r(n=s)});return a.observe(t,e),()=>a.disconnect()})}i(R,"d"),K(R,"width");var X=Object.freeze({__proto__:null,dark:F,input:k,now:L,observe:l,queue:q,width:R}),Y=Object.defineProperty,ee=i((t,e)=>Y(t,"name",{value:e,configurable:!0}),"r$1");function z(t){let e;return Object.defineProperty(l(r=>{e=r,t!==void 0&&e(t)}),"value",{get:()=>t,set:r=>void e(t=r)})}i(z,"f$1"),ee(z,"Mutable");var te=Object.defineProperty,U=i((t,e)=>te(t,"name",{value:e,configurable:!0}),"r");function C(t,e){const r=document.createElement("div");r.style.position="relative",t.length!==1&&(r.style.height="100%");let n=0,a=0,o;const s=new ResizeObserver(async([T])=>{const{width:p,height:I}=T.contentRect;if(t.length===1&&p===o)return;o=p;const $=++n,h=p>0?await t(p,I):null;if(!(a>$)){for(a=$;r.lastChild;)r.lastChild.remove();h!=null&&(t.length!==1&&B(h)&&(h.style.position="absolute"),r.append(h))}});return s.observe(r),e?.then(()=>s.disconnect()),r}i(C,"p"),U(C,"resize");function B(t){return typeof t=="object"&&t.nodeType===1}i(B,"v"),U(B,"isElement");var re=Object.defineProperty,ne=i((t,e)=>re(t,"name",{value:e,configurable:!0}),"o");const M=(d=class{},i(d,"e"),d);ne(M,"Library");let ae=M;const ie=void 0;export{j as AbstractFile,b as FileAttachment,ie as FileAttachments,X as Generators,ae as Library,z as Mutable,P as registerFile,C as resize}; diff --git a/docs/_observablehq/theme-air,near-midnight.e68849dc.css b/docs/_observablehq/theme-air,near-midnight.e68849dc.css new file mode 100644 index 0000000..5078878 --- /dev/null +++ b/docs/_observablehq/theme-air,near-midnight.e68849dc.css @@ -0,0 +1 @@ +:root{--monospace: Menlo, Consolas, monospace;--monospace-font: 14px/1.5 var(--monospace);--serif: "Source Serif Pro", "Iowan Old Style", "Apple Garamond", "Palatino Linotype", "Times New Roman", "Droid Serif", Times, serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sans-serif: -apple-system, BlinkMacSystemFont, "avenir next", avenir, helvetica, "helvetica neue", ubuntu, roboto, noto, "segoe ui", arial, sans-serif;--theme-blue: #4269d0;--theme-green: #3ca951;--theme-red: #ff725c;--theme-yellow: #efb118}html{-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:var(--theme-background);color:var(--theme-foreground)}body{font:17px/1.5 var(--serif);margin:0}a[href]{color:var(--theme-foreground-focus)}h1,h2,h3,h4,h5,h6{color:var(--theme-foreground-alt);font-weight:700;line-height:1.15;margin-top:0;margin-bottom:.25rem;scroll-margin-top:1rem;text-wrap:balance}h2+p,h3+p,h4+p,h2+table,h3+table,h4+table{margin-top:0}h1+h2{color:var(--theme-foreground);font-size:20px;font-style:italic;font-weight:400;margin-bottom:1rem}a[href]{text-decoration:none}a[href]:hover,a[href]:focus{text-decoration:underline}h1 code,h2 code,h3 code,h4 code,h5 code,h6 code{font-size:90%}pre{line-height:1.5}pre,code,tt{font-family:var(--monospace);font-size:14px}img{max-width:calc(100vw - 28px)}p,table,figure,figcaption,h1,h2,h3,h4,h5,h6,.katex-display{max-width:640px}blockquote,ol,ul{max-width:600px}blockquote{margin:1rem 1.5rem}ul ol{padding-left:28px}hr{height:1px;margin:1rem 0;padding:1rem 0;border:none;background:no-repeat center/100% 1px linear-gradient(to right,var(--theme-foreground-faintest),var(--theme-foreground-faintest))}pre{background-color:var(--theme-background-alt);border-radius:4px;margin:1rem -1rem;max-width:960px;min-height:1.5em;padding:.5rem 1rem;overflow-x:auto;box-sizing:border-box}input:not([type]),input[type=email],input[type=number],input[type=password],input[type=range],input[type=search],input[type=tel],input[type=text],input[type=url]{width:240px}input,canvas,button{vertical-align:middle}button,input,textarea{accent-color:var(--theme-blue)}table{width:100%;border-collapse:collapse;font:13px/1.2 var(--sans-serif)}table pre,table code,table tt{font-size:inherit;line-height:inherit}th>pre:only-child,td>pre:only-child{margin:0;padding:0}th{color:var(--theme-foreground);text-align:left;vertical-align:bottom}td{color:var(--theme-foreground-alt);vertical-align:top}th,td{padding:3px 6.5px 3px 0}th:last-child,td:last-child{padding-right:0}tr:not(:last-child){border-bottom:solid 1px var(--theme-foreground-faintest)}thead tr{border-bottom:solid 1px var(--theme-foreground-fainter)}figure,table{margin:1rem 0}figure img{max-width:100%}figure>h2,figure>h3{font-family:var(--sans-serif)}figure>h2{font-size:20px}figure>h3{font-size:16px;font-weight:400}figcaption{font:small var(--sans-serif);color:var(--theme-foreground-muted)}a[href].observablehq-header-anchor{color:inherit}:root{--font-big: 700 32px/1 var(--sans-serif);--font-small: 14px var(--sans-serif)}.big{font:var(--font-big)}.small{font:var(--font-small)}.red{color:var(--theme-red)}.yellow{color:var(--theme-yellow)}.green{color:var(--theme-green)}.blue{color:var(--theme-blue)}.muted{color:var(--theme-foreground-muted)}.observablehq--draft>h1:first-of-type:after{content:" [DRAFT]";color:var(--theme-foreground-muted)}:root{--theme-caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M5 7L8.125 9.5L11.25 7' stroke='black' stroke-width='1.5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");--theme-toggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m10.5,11 2.5-3-2.5-3 M6,8h7' fill='none' stroke='black' stroke-width='2'/%3E%3Crect x='2' y='2' fill='currentColor' height='12' rx='0.5' width='2'/%3E%3C/svg%3E");--theme-magnifier: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath stroke='currentColor' stroke-width='2' fill='none' d='M15,15L10.5,10.5a3,3 0 1,0 -6 -6a3,3 0 1,0 6 6'%3E%3C/path%3E%3C/svg%3E")}#observablehq-main,#observablehq-header,#observablehq-footer{margin:1rem auto;max-width:1152px}#observablehq-main{min-height:calc(100vh - 20rem);position:relative;z-index:0}#observablehq-footer{display:block;margin-top:10rem;font:12px var(--sans-serif);color:var(--theme-foreground-faint)}#observablehq-footer nav{display:grid;max-width:640px;grid-template-columns:1fr 1fr;column-gap:1rem;margin-bottom:1rem}#observablehq-footer nav a{display:flex;flex-direction:column;border:1px solid var(--theme-foreground-fainter);border-radius:8px;padding:1rem;line-height:1rem;text-decoration:none}#observablehq-footer nav a span{font-size:14px}#observablehq-footer nav a:hover span{text-decoration:underline}#observablehq-footer nav a:hover{border-color:var(--theme-foreground-focus)}#observablehq-footer nav a[rel=prev]{grid-column:1;align-items:start}#observablehq-footer nav a[rel=next]{grid-column:2;align-items:end}#observablehq-footer nav a:before{color:var(--theme-foreground-faint)}#observablehq-footer nav a[rel=prev]:before{content:"Previous page"}#observablehq-footer nav a[rel=next]:before{content:"Next page"}#observablehq-center{margin:1rem 2rem}#observablehq-sidebar{position:fixed;background:var(--theme-background-alt);color:var(--theme-foreground-muted);font:14px var(--sans-serif);visibility:hidden;font-weight:500;width:272px;z-index:2;top:0;bottom:0;left:-272px;box-sizing:border-box;padding:0 .5rem 1rem;overflow-y:auto}#observablehq-sidebar ol,#observablehq-toc ol{list-style:none;margin:0;padding:0}#observablehq-sidebar>ol,#observablehq-sidebar>details,#observablehq-sidebar>section{position:relative;padding-bottom:.5rem;margin:.5rem 0;border-bottom:solid 1px var(--theme-foreground-faintest)}#observablehq-sidebar>ol:first-child{position:sticky;top:0;z-index:1;background:var(--theme-background-alt);font-size:16px;font-weight:700;padding-top:1rem;padding-left:.5rem;margin:0;margin-left:-.5rem;color:var(--theme-foreground)}#observablehq-sidebar>ol:last-child,#observablehq-sidebar>details:last-child,#observablehq-sidebar>section:last-child{border-bottom:none}#observablehq-sidebar summary{font-weight:700;color:var(--theme-foreground);cursor:default}#observablehq-sidebar summary::-webkit-details-marker,#observablehq-sidebar summary::marker{display:none}#observablehq-sidebar details summary:after{position:absolute;right:0;width:1rem;height:1rem;background:var(--theme-foreground-muted);content:"";-webkit-mask:var(--theme-caret);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask:var(--theme-caret);mask-repeat:no-repeat;mask-position:center;padding:.5rem;transition:transform .25s ease;transform:rotate(-90deg);transform-origin:50% 50%}#observablehq-sidebar details summary:hover:after{color:var(--theme-foreground)}#observablehq-sidebar details[open] summary:after{transform:rotate(0)}#observablehq-sidebar-toggle{position:fixed;appearance:none;background:none;top:0;left:0;height:100%;width:2rem;display:flex;align-items:center;justify-content:center;cursor:e-resize;margin:0;color:var(--theme-foreground-muted);z-index:1}#observablehq-sidebar-close{position:absolute;top:1rem;right:0;width:2rem;height:2.2rem;display:flex;align-items:center;justify-content:center;color:var(--theme-foreground-muted);cursor:w-resize;z-index:2}#observablehq-sidebar-toggle:before,#observablehq-sidebar-close:before{content:"";width:1rem;height:1rem;background:currentColor;-webkit-mask:var(--theme-toggle);mask:var(--theme-toggle)}#observablehq-sidebar-close:before{transform:scaleX(-1)}#observablehq-sidebar summary,.observablehq-link a{display:flex;padding:.5rem 1rem .5rem 1.5rem;margin-left:-.5rem;align-items:center}#observablehq-sidebar summary a{flex-grow:1;color:inherit}#observablehq-sidebar summary.observablehq-link{padding:0;margin-left:0}#observablehq-sidebar details summary:hover,.observablehq-link-active a,.observablehq-link a:hover{background:var(--theme-background)}.observablehq-link a:hover{color:var(--theme-foreground-focus)}#observablehq-toc{display:none;position:fixed;color:var(--theme-foreground-muted);font:400 14px var(--sans-serif);z-index:1;top:0;right:0;bottom:0;overflow-y:auto}#observablehq-toc nav{width:192px;margin:2rem 0;padding:0 1rem;box-sizing:border-box;border-left:solid 1px var(--theme-foreground-faintest)}#observablehq-toc div{font-weight:700;color:var(--theme-foreground);margin-bottom:.5rem}.observablehq-secondary-link a{display:block;padding:.25rem 0}.observablehq-link:not(.observablehq-link-active) a[href]:not(:hover),.observablehq-secondary-link:not(.observablehq-secondary-link-active) a[href]:not(:hover){color:inherit}.observablehq-link-active,.observablehq-secondary-link-active{position:relative}.observablehq-link-active:before,.observablehq-secondary-link-highlight{content:"";position:absolute;width:3px;background:var(--theme-foreground-focus)}.observablehq-link-active:before{top:0;bottom:0;left:-.5rem}.observablehq-secondary-link-highlight{left:1px;top:2rem;height:0;transition:top .15s ease,height .15s ease}#observablehq-sidebar{transition:visibility .15s 0ms,left .15s 0ms ease}#observablehq-sidebar:focus-within,#observablehq-sidebar-toggle:checked~#observablehq-sidebar{left:0;visibility:initial;box-shadow:0 0 8px 4px #0000001a;transition:visibility 0ms 0ms,left .15s 0ms ease}#observablehq-sidebar-backdrop{display:none;position:fixed;inset:0;z-index:2}#observablehq-sidebar-backdrop:has(~#observablehq-sidebar:focus-within),#observablehq-sidebar-toggle:checked~#observablehq-sidebar-backdrop{display:initial}@media (prefers-color-scheme: dark){#observablehq-sidebar:focus-within,#observablehq-sidebar-toggle:checked~#observablehq-sidebar{box-shadow:0 0 8px 4px #00000080}}@media (min-width: calc(912px + 6rem)){#observablehq-sidebar{transition:none!important}#observablehq-sidebar-toggle:checked~#observablehq-sidebar-backdrop{display:none}#observablehq-sidebar-toggle:checked~#observablehq-sidebar,#observablehq-sidebar-toggle:indeterminate~#observablehq-sidebar{left:0;visibility:initial;box-shadow:none;border-right:solid 1px var(--theme-foreground-faintest)}#observablehq-sidebar-toggle:checked~#observablehq-center,#observablehq-sidebar-toggle:indeterminate~#observablehq-center{padding-left:calc(272px + 1rem);padding-right:1rem}}@media (min-width: calc(832px + 6rem)){#observablehq-toc~#observablehq-center{padding-right:calc(192px + 1rem)}#observablehq-toc{display:block}}@media (min-width: calc(912px + 6rem)){#observablehq-sidebar-toggle:checked~#observablehq-toc,#observablehq-sidebar-toggle:indeterminate~#observablehq-toc{display:none}}@media (min-width: calc(1104px + 6rem)){#observablehq-sidebar-toggle:checked~#observablehq-toc,#observablehq-sidebar-toggle:indeterminate~#observablehq-toc,#observablehq-toc{display:block}#observablehq-sidebar-toggle:checked~#observablehq-toc~#observablehq-center,#observablehq-sidebar-toggle:indeterminate~#observablehq-toc~#observablehq-center,#observablehq-toc~#observablehq-center{padding-right:calc(192px + 1rem)}}.observablehq-pre-container{position:relative;margin:1rem -1rem;max-width:960px}.observablehq-pre-container:after{position:absolute;top:0;right:0;height:21px;font:12px var(--sans-serif);color:var(--theme-foreground-muted);background:linear-gradient(to right,transparent,var(--theme-background-alt) 40%);padding:.5rem .5rem .5rem 1.5rem}.observablehq-pre-container[data-language]:after{content:attr(data-language)}.observablehq-pre-container pre{padding-right:4rem;margin:0;max-width:none}.observablehq-pre-copy{position:absolute;top:0;right:0;background:none;color:transparent;border:none;border-radius:4px;padding:0 8px;margin:4px;height:29px;cursor:pointer;z-index:1;display:flex;align-items:center}.observablehq-pre-copied:before{content:"Copied!";position:absolute;right:calc(100% + .25rem);background:linear-gradient(to right,transparent,var(--theme-background-alt) 10%);color:var(--theme-green);font:var(--font-small);padding:4px 8px 4px 16px;pointer-events:none;animation-name:observablehq-pre-copied;animation-duration:.25s;animation-direction:alternate;animation-iteration-count:2}@keyframes observablehq-pre-copied{0%{opacity:0;transform:translate(.5rem)}50%{opacity:1}to{transform:translate(0)}}.observablehq-pre-container[data-copy] .observablehq-pre-copy,.observablehq-pre-container:hover .observablehq-pre-copy,.observablehq-pre-container .observablehq-pre-copy:focus{background:var(--theme-background-alt);color:var(--theme-foreground-faint)}.observablehq-pre-container .observablehq-pre-copy:hover{color:var(--theme-foreground-muted)}.observablehq-pre-container .observablehq-pre-copy:active{color:var(--theme-foreground);background:var(--theme-foreground-faintest)}#observablehq-sidebar.observablehq-search-results>ol:not(:first-child),#observablehq-sidebar.observablehq-search-results>details,#observablehq-sidebar.observablehq-search-results>section{display:none}#observablehq-search{position:relative;padding:.5rem 0 0;display:flex;align-items:center}#observablehq-search input{padding:6px 4px 6px 2.2em;width:100%;border:none;border-radius:4px;background-color:var(--theme-background);font-size:13.3px;height:28px}#observablehq-search input::placeholder{color:var(--theme-foreground-faint)}#observablehq-search:before{position:absolute;left:.5rem;content:"";width:1rem;height:1rem;background:currentColor;-webkit-mask:var(--theme-magnifier);mask:var(--theme-magnifier);pointer-events:none}#observablehq-search:after{position:absolute;right:6px;content:attr(data-shortcut);pointer-events:none}#observablehq-search:focus-within:after{content:""}#observablehq-search-results{--relevance-width: 32px;position:absolute;overflow-y:auto;top:6.5rem;left:0;right:.5rem;bottom:0}#observablehq-search-results a span{max-width:184px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#observablehq-search-results div{text-align:right;font-size:10px;margin:.5em}#observablehq-search-results li{position:relative;display:flex;align-items:center}#observablehq-search-results a{flex-grow:1}#observablehq-search-results li:after,#observablehq-search-results a span:after{content:"";width:var(--relevance-width);height:4px;position:absolute;top:14px;right:.5em;border-radius:2px;background:var(--theme-foreground-muted)}#observablehq-search-results li.observablehq-link-active:after{background:var(--theme-foreground-focus)}#observablehq-search-results a span:after{background:var(--theme-foreground-faintest)}#observablehq-search-results li[data-score="0"]:after{width:calc(var(--relevance-width) * .125)}#observablehq-search-results li[data-score="1"]:after{width:calc(var(--relevance-width) * .25)}#observablehq-search-results li[data-score="2"]:after{width:calc(var(--relevance-width) * .4375)}#observablehq-search-results li[data-score="3"]:after{width:calc(var(--relevance-width) * .625)}#observablehq-search-results li[data-score="4"]:after{width:calc(var(--relevance-width) * .8125)}@media print{#observablehq-center{padding-left:1em!important}#observablehq-sidebar,#observablehq-footer{display:none!important}}#observablehq-center{container-type:inline-size}.grid{margin:1rem 0;display:grid;gap:1rem;grid-auto-rows:1fr}.grid svg{overflow:visible}.grid figure{margin:0}.grid>*>p:first-child{margin-top:0}.grid>*>p:last-child{margin-bottom:0}@container (min-width: 640px){.grid-cols-2,.grid-cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-2 .grid-colspan-2,.grid-cols-2 .grid-colspan-3,.grid-cols-2 .grid-colspan-4,.grid-cols-4 .grid-colspan-2,.grid-cols-4 .grid-colspan-3,.grid-cols-4 .grid-colspan-4{grid-column:span 2}}@container (min-width: 720px){.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-3 .grid-colspan-2{grid-column:span 2}.grid-cols-3 .grid-colspan-3{grid-column:span 3}}@container (min-width: 1080px){.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-4 .grid-colspan-3{grid-column:span 3}.grid-cols-4 .grid-colspan-4{grid-column:span 4}}.grid-rowspan-2{grid-row:span 2}.grid-rowspan-3{grid-row:span 3}.grid-rowspan-4{grid-row:span 4}.note,.tip,.warning,.caution{border-left:solid 1px;border-radius:0 4px 4px 0;padding:1rem 2rem;margin:1rem 0;box-sizing:border-box;max-width:640px}.note:before,.tip:before,.warning:before,.caution:before{display:block;margin-bottom:1rem;font-weight:700}.note{border-left-color:var(--theme-foreground-fainter);background-color:var(--theme-background-alt)}.note:before{content:"Note";color:var(--theme-foreground-muted)}.tip{border-left-color:var(--theme-green);background-color:color-mix(in srgb,var(--theme-green),var(--theme-background) 90%)}.tip:before{content:"Tip";color:var(--theme-green)}.warning{border-left-color:var(--theme-yellow);background-color:color-mix(in srgb,var(--theme-yellow),var(--theme-background) 90%)}.warning:before{content:"Warning";color:var(--theme-yellow)}.caution{border-left-color:var(--theme-red);background-color:color-mix(in srgb,var(--theme-red),var(--theme-background) 90%)}.caution:before{content:"Caution";color:var(--theme-red)}.note[label]:before,.tip[label]:before,.warning[label]:before,.caution[label]:before{content:attr(label)}.note>:first-child,.tip>:first-child,.warning>:first-child,.caution>:first-child{margin-top:0}.note>:last-child,.tip>:last-child,.warning>:last-child,.caution>:last-child{margin-bottom:0}.card{background:var(--theme-background-alt);border:solid 1px var(--theme-foreground-faintest);border-radius:.75rem;padding:1rem;margin:1rem 0;font:14px var(--sans-serif)}.grid>.card,.card figure{margin:0}.card h2,.card h3{font-size:inherit}.card h2{font-weight:500;font-size:15px}.card h3{font-weight:400;color:var(--theme-foreground-muted)}.card h2~svg,.card h3~svg,.card h2~p,.card h3~p{margin-top:1rem}.observablehq--block:empty{margin:0}@keyframes observablehq-loading{0%{transform:rotate(0)}to{transform:rotate(360deg)}}observablehq-loading{font:var(--monospace-font);color:var(--theme-foreground-muted);display:inline-block;transform-origin:.32em 55%;animation-name:observablehq-loading;animation-timing-function:linear;animation-duration:1s;animation-iteration-count:infinite}observablehq-loading:before{content:"\21bb"}.observablehq--block observablehq-loading{display:block}.observablehq--block{margin:1rem 0}.observablehq--block .observablehq,.observablehq--block .observablehq--inspect{display:block}.observablehq--collapsed,.observablehq--expanded.observablehq--inspect a{cursor:pointer}.observablehq--caret{margin-right:4px;vertical-align:baseline}.observablehq--field{text-indent:-1rem;margin-left:1rem}.observablehq--inspect{font:var(--monospace-font);overflow-x:auto;white-space:pre}.observablehq--inspect.observablehq--import{white-space:normal}.observablehq--inspect::-webkit-scrollbar{display:none}.observablehq--error .observablehq--inspect{word-break:break-all;white-space:pre-wrap}.observablehq--string-expand{margin-left:6px;padding:2px 6px;border-radius:2px;font-size:80%;background:var(--theme-background-alt);cursor:pointer;vertical-align:middle}.observablehq--keyword,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:var(--syntax-keyword)}.observablehq--symbol,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--syntax-entity)}.observablehq--index,.observablehq--key,.hljs-attr,.hljs-attribute,.hljs-meta,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:var(--syntax-constant)}.observablehq--regexp,.observablehq--string,.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:var(--syntax-string)}.observablehq--null,.observablehq--undefined,.hljs-built_in,.hljs-literal,.hljs-symbol{color:var(--syntax-variable)}.observablehq--prototype-key,.observablehq--empty,.hljs-comment,.hljs-formula{color:var(--syntax-comment)}.observablehq--bigint,.observablehq--boolean,.observablehq--date,.observablehq--forbidden,.observablehq--number,.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:var(--syntax-entity-tag)}.hljs-subst{color:var(--syntax-storage-modifier-import)}.hljs-section{color:var(--syntax-markup-heading);font-weight:700}.hljs-bullet{color:var(--syntax-markup-list)}.hljs-emphasis{color:var(--syntax-markup-italic);font-style:italic}.hljs-strong{color:var(--syntax-markup-bold);font-weight:700}.hljs-addition{color:var(--syntax-markup-inserted);background-color:var(--syntax-markup-inserted-background)}.hljs-deletion{color:var(--syntax-markup-deleted);background-color:var(--syntax-markup-deleted-background)}.observablehq--empty{font-style:oblique}.observablehq--error{color:var(--syntax-keyword)}.plot-d6a7b5{--plot-background: var(--theme-background)}p .plot-d6a7b5{display:inline-block}@media (prefers-color-scheme: light){:root{--syntax-keyword: #d73a49;--syntax-entity: #6f42c1;--syntax-constant: #005cc5;--syntax-string: #032f62;--syntax-variable: #e36209;--syntax-comment: var(--theme-foreground-muted);--syntax-entity-tag: #22863a;--syntax-storage-modifier-import: #24292e;--syntax-markup-heading: #005cc5;--syntax-markup-list: #735c0f;--syntax-markup-italic: #24292e;--syntax-markup-bold: #24292e;--syntax-markup-inserted: #22863a;--syntax-markup-inserted-background: #f0fff4;--syntax-markup-deleted: #b31d28;--syntax-markup-deleted-background: #ffeef0}}@media (prefers-color-scheme: light){:root{--theme-background-b: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-a));--theme-background: var(--theme-background-a);--theme-background-alt: var(--theme-background-b);--theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-a));--theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-a));--theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-a));--theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-a));--theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-a));color-scheme:light}}@media (prefers-color-scheme: light){:root{--theme-foreground: #1b1e23;--theme-foreground-focus: #3b5fc0;--theme-background-a: #ffffff}}@media (prefers-color-scheme: dark){:root{--syntax-keyword: #ff7b72;--syntax-entity: #d2a8ff;--syntax-constant: #79c0ff;--syntax-string: #a5d6ff;--syntax-variable: #ffa657;--syntax-comment: var(--theme-foreground-muted);--syntax-entity-tag: #7ee787;--syntax-storage-modifier-import: #c9d1d9;--syntax-markup-heading: #1f6feb;--syntax-markup-list: #f2cc60;--syntax-markup-italic: #c9d1d9;--syntax-markup-bold: #c9d1d9;--syntax-markup-inserted: #aff5b4;--syntax-markup-inserted-background: #033a16;--syntax-markup-deleted: #ffdcd7;--syntax-markup-deleted-background: #67060c}}@media (prefers-color-scheme: dark){:root{--theme-background-a: color-mix(in srgb, var(--theme-foreground) 4%, var(--theme-background-b));--theme-background: var(--theme-background-a);--theme-background-alt: var(--theme-background-b);--theme-foreground-alt: color-mix(in srgb, var(--theme-foreground) 90%, var(--theme-background-b));--theme-foreground-muted: color-mix(in srgb, var(--theme-foreground) 60%, var(--theme-background-b));--theme-foreground-faint: color-mix(in srgb, var(--theme-foreground) 50%, var(--theme-background-b));--theme-foreground-fainter: color-mix(in srgb, var(--theme-foreground) 30%, var(--theme-background-b));--theme-foreground-faintest: color-mix(in srgb, var(--theme-foreground) 14%, var(--theme-background-b));color-scheme:dark}}@media (prefers-color-scheme: dark){:root{--theme-foreground: #dfdfd6;--theme-foreground-focus: oklch(.712564 .257662 265.758);--theme-background-b: #161616}} diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..99e1da4 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,57 @@ + + + +The Pudding: Data + + + + + + + + + + + + + +
+
+
+

The Pudding: Data

+
+

Next steps

+

This page is for sharing data analysis and visual prototypes. Use the sidebar to navigate. Please reach out to The Pudding team if you have any questions. Thanks!

+

-Russell

+ +
+ +
diff --git a/docs/visuals/demo.html b/docs/visuals/demo.html new file mode 100644 index 0000000..a8ea32a --- /dev/null +++ b/docs/visuals/demo.html @@ -0,0 +1,108 @@ + + + +Demo | The Pudding: Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Demo

+

Simply use markdown to render content. You can inline js code to insert charts. The code block below:

+
const scatterData = FileAttachment("../data/loaders/test.csv").csv();
+import scatter from "../components/scatter.js";
+scatter(scatterData, {x: "year", y: "amount", height: 400 })
+
+

Produces this:

+
+
+
+
+ +
diff --git a/docs/visuals/tutorial.html b/docs/visuals/tutorial.html new file mode 100644 index 0000000..be3f5d3 --- /dev/null +++ b/docs/visuals/tutorial.html @@ -0,0 +1,64 @@ + + + +Tutorial | The Pudding: Data + + + + + + + + + + + + + + +
+
+

Tutorial

+

A quick tutorial of where to put things.

+

Data

+

Raw

+

Put raw data in the src/data/raw directory. You can use this directly and/or transform it via loaders.

+

Loaders

+

Create data processing/transforming files in the src/data/loaders directory. This can do the heavy lifting to generate visual-ready data.

+

Components

+

Create reusable functions and chart code in the src/components directory.

+

Visuals

+

Pages (like this) go in the src/visuals directory. Technically you can put markdown files for pages anywhere, but to keep it simple you can put them here.

+

You can use the js code snippet markdown to call run different loaders and components. There are a few Observable Framework-centric things here, so be sure to check out the docs.

+
```js
+// code here
+```
+
+
+ +
diff --git a/observablehq.config.js b/observablehq.config.js index 99a081f..48039b6 100644 --- a/observablehq.config.js +++ b/observablehq.config.js @@ -1,34 +1,6 @@ // See https://observablehq.com/framework/config for documentation. export default { - // The project’s title; used in the sidebar and webpage titles. title: "The Pudding: Data", - - // The pages and sections in the sidebar. If you don’t specify this option, - // all pages will be listed in alphabetical order. Listing pages explicitly - // lets you organize them into sections and have unlisted pages. - // pages: [ - // { - // name: "Examples", - // pages: [ - // {name: "Dashboard", path: "/example-dashboard"}, - // {name: "Report", path: "/example-report"} - // ] - // } - // ], - - // The path to the source root. root: "src", - - // Some additional configuration options and their defaults: - // theme: "default", // try "light", "dark", "slate", etc. - // header: "", // what to show in the header (HTML) - // footer: "Built with Observable.", // what to show in the footer (HTML) - // sidebar: true, // whether to show the sidebar - // toc: true, // whether to show the table of contents - // pager: true, // whether to show previous & next links in the footer - // output: "dist", // path to the output root for build - // search: true, // activate search - // linkify: true, // convert URLs in Markdown to links - // typographer: false, // smart quotes and other typographic improvements - // cleanUrls: true, // drop .html from URLs + output: "docs", };