@carbon/charts-react 1.14.2 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(J,ae){typeof exports=="object"&&typeof module<"u"?ae(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ae):(J=typeof globalThis<"u"?globalThis:J||self,ae(J.ChartsReact={},J.React))})(this,function(J,ae){"use strict";var YV=Object.defineProperty;var XV=(J,ae,Bn)=>ae in J?YV(J,ae,{enumerable:!0,configurable:!0,writable:!0,value:Bn}):J[ae]=Bn;var hh=(J,ae,Bn)=>(XV(J,typeof ae!="symbol"?ae+"":ae,Bn),Bn);var Bn=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Bn||{}),fh=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(fh||{}),ph=(e=>(e.UPDATE="model-update",e))(ph||{}),mh=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(mh||{}),gh=(e=>(e.UPDATE="zoom-bar-update",e.SELECTION_START="zoom-bar-selection-start",e.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",e.SELECTION_END="zoom-bar-selection-end",e))(gh||{}),vh=(e=>(e.CHANGE="zoom-domain-change",e))(vh||{}),yh=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(yh||{}),xh=(e=>(e.LABEL_MOUSEOVER="axis-label-mouseover",e.LABEL_MOUSEMOVE="axis-label-mousemove",e.LABEL_CLICK="axis-label-click",e.LABEL_MOUSEOUT="axis-label-mouseout",e.LABEL_FOCUS="axis-label-focus",e.LABEL_BLUR="axis-label-blur",e.RENDER_COMPLETE="axis-render-complete",e))(xh||{}),bh=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(bh||{}),Eh=(e=>(e.WORD_MOUSEOVER="wordcloud-word-mouseover",e.WORD_MOUSEMOVE="wordcloud-word-mousemove",e.WORD_CLICK="wordcloud-word-click",e.WORD_MOUSEOUT="wordcloud-word-mouseout",e))(Eh||{}),_h=(e=>(e.SLICE_MOUSEOVER="pie-slice-mouseover",e.SLICE_MOUSEMOVE="pie-slice-mousemove",e.SLICE_CLICK="pie-slice-click",e.SLICE_MOUSEOUT="pie-slice-mouseout",e))(_h||{}),wh=(e=>(e.ARC_MOUSEOVER="gauge-arc-mouseover",e.ARC_MOUSEMOVE="gauge-arc-mousemove",e.ARC_CLICK="gauge-arc-click",e.ARC_MOUSEOUT="gauge-arc-mouseout",e))(wh||{}),Sh=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Sh||{}),Oh=(e=>(e.BOX_MOUSEOVER="box-mouseover",e.BOX_MOUSEMOVE="box-mousemove",e.BOX_CLICK="box-click",e.BOX_MOUSEOUT="box-mouseout",e.OUTLIER_MOUSEOVER="outlier-mouseover",e.OUTLIER_MOUSEMOVE="outlier-mousemove",e.OUTLIER_CLICK="outlier-click",e.OUTLIER_MOUSEOUT="outlier-mouseout",e))(Oh||{}),Th=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Th||{}),Mh=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Mh||{}),Ch=(e=>(e.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",e.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",e.X_AXIS_CLICK="radar-x-axis-click",e.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",e))(Ch||{}),Ah=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Ah||{}),$h=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))($h||{}),bi=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(bi||{}),Lh=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(Lh||{}),Rh=(e=>(e.ITEM_HOVER="legend-item-onhover",e.ITEM_CLICK="legend-item-onclick",e.ITEM_MOUSEOUT="legend-item-onmouseout",e.ITEMS_UPDATE="legend-items-update",e))(Rh||{}),kh=(e=>(e.CIRCLE_MOUSEOVER="circle-leaf-mouseover",e.CIRCLE_CLICK="circle-leaf-click",e.CIRCLE_MOUSEOUT="circle-leaf-mouseout",e.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",e))(kh||{}),Dh=(e=>(e.NODE_MOUSEOVER="alluvial-node-mouseover",e.NODE_CLICK="alluvial-node-click",e.NODE_MOUSEOUT="alluvial-node-mouseout",e.NODE_MOUSEMOVE="alluvial-node-mousemove",e.LINE_MOUSEOVER="alluvial-line-mouseover",e.LINE_CLICK="alluvial-line-click",e.LINE_MOUSEOUT="alluvial-line-mouseout",e.LINE_MOUSEMOVE="alluvial-line-mousemove",e))(Dh||{}),Ih=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Ih||{}),Nh=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(Nh||{}),Ir=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(Ir||{});const W0=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Dh,Area:bh,Axis:xh,Bar:Sh,Boxplot:Oh,CanvasZoom:yh,Chart:Bn,Choropleth:Ir,CirclePack:kh,Gauge:wh,Heatmap:Nh,Legend:Rh,Line:Mh,Meter:Ih,Modal:fh,Model:ph,Pie:_h,Radar:Ch,Scatter:Th,Threshold:Lh,Toolbar:mh,Tooltip:bi,Tree:Ah,Treemap:$h,WordCloud:Eh,ZoomBar:gh,ZoomDomain:vh},Symbol.toStringTag,{value:"Module"})),O=W0;var rt=(e=>(e.HTML="html",e.SVG="svg",e))(rt||{}),Ko=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(Ko||{}),at=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(at||{}),z=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(z||{}),rn=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(rn||{}),Fe=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Fe||{}),ee=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(ee||{}),tt=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(tt||{}),Ei=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Ei||{}),Kt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Kt||{}),_i=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(_i||{}),Qo=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(Qo||{}),Nt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(Nt||{}),ut=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(ut||{}),Nr=(e=>(e.CENTER="center",e))(Nr||{}),Vs=(e=>(e.LEFT="left",e.RIGHT="right",e))(Vs||{}),Qt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Qt||{}),mn=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(mn||{}),gn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(gn||{}),Pr=(e=>(e.SEMI="semi",e.FULL="full",e))(Pr||{}),Jo=(e=>(e.UP="up",e.DOWN="down",e))(Jo||{}),Hs=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(Hs||{}),Fs=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Fs||{}),De=(e=>(e.SCATTER="scatter",e.LINE="line",e.SIMPLE_BAR="simple-bar",e.STACKED_BAR="stacked-bar",e.GROUPED_BAR="grouped-bar",e.AREA="area",e.STACKED_AREA="stacked-area",e))(De||{}),Ct=(e=>(e.EXPORT_CSV="Export as CSV",e.EXPORT_PNG="Export as PNG",e.EXPORT_JPG="Export as JPG",e.ZOOM_IN="Zoom in",e.ZOOM_OUT="Zoom out",e.RESET_ZOOM="Reset zoom",e.MAKE_FULLSCREEN="Make fullscreen",e.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Ct||{}),tl=(e=>(e.LEFT="left",e.RIGHT="right",e))(tl||{}),Jt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Jt||{}),zs=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(zs||{}),wi=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(wi||{}),Gs=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(Gs||{}),vn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(vn||{});function nr(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function q0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function el(e){let t,n,r;e.length!==2?(t=nr,n=(o,l)=>nr(e(o),l),r=(o,l)=>e(o)-l):(t=e===nr||e===q0?e:Y0,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function Y0(){return 0}function X0(e){return e===null?NaN:+e}function*Z0(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}const K0=el(nr).right;el(X0).center;const nl=K0;function Q0(e,t){let n=0;if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&++n}return n}function ze(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let s of e)(s=t(s,++i,e))!=null&&(n===void 0?s>=s&&(n=r=s):(n>s&&(n=s),r<s&&(r=s)))}return[n,r]}class rr{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const s=n[i],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[r++]=o),t=a}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n=this._n,r,i,s,a=0;if(n>0){for(a=t[--n];n>0&&(r=a,i=t[--n],a=r+i,s=i-(a-r),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(i=s*2,r=a+i,i==r-a&&(a=r))}return a}}class Ph extends Map{constructor(t,n=ey){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Uh(this,t))}has(t){return super.has(Uh(this,t))}set(t,n){return super.set(J0(this,t),n)}delete(t){return super.delete(ty(this,t))}}function Uh({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function J0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ty({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ey(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ny(e){return e}function ry(e=nr){if(e===nr)return Bh;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Bh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var iy=Array.prototype,sy=iy.slice;function rl(e){return()=>e}const ay=Math.sqrt(50),oy=Math.sqrt(10),ly=Math.sqrt(2);function js(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),s=r/Math.pow(10,i),a=s>=ay?10:s>=oy?5:s>=ly?2:1;let o,l,c;return i<0?(c=Math.pow(10,-i)/a,o=Math.round(e*c),l=Math.round(t*c),o/c<e&&++o,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,o=Math.round(e/c),l=Math.round(t/c),o*c<e&&++o,l*c>t&&--l),l<o&&.5<=n&&n<2?js(e,t,n*2):[o,l,c]}function Ws(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,s,a]=r?js(t,e,n):js(e,t,n);if(!(s>=i))return[];const o=s-i+1,l=new Array(o);if(r)if(a<0)for(let c=0;c<o;++c)l[c]=(s-c)/-a;else for(let c=0;c<o;++c)l[c]=(s-c)*a;else if(a<0)for(let c=0;c<o;++c)l[c]=(i+c)/-a;else for(let c=0;c<o;++c)l[c]=(i+c)*a;return l}function Ur(e,t,n){return t=+t,e=+e,n=+n,js(e,t,n)[2]}function il(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Ur(t,e,n):Ur(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function cy(e,t,n){let r;for(;;){const i=Ur(e,t,n);if(i===r||i===0||!isFinite(i))return[e,t];i>0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function uy(e){return Math.max(1,Math.ceil(Math.log(Q0(e))/Math.LN2)+1)}function hy(){var e=ny,t=ze,n=uy;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const x=h,w=+f;if(t===ze&&([d,h]=cy(d,h,w)),f=Ws(d,h,w),f[0]<=d&&(l=Ur(d,h,w)),f[f.length-1]>=h)if(x>=h&&t===ze){const _=Ur(d,h,w);isFinite(_)&&(_>0?h=(Math.floor(h/_)+1)*_:_<0&&(h=(Math.ceil(h*-_)+1)/-_))}else f.pop()}for(var p=f.length,v=0,m=p;f[v]<=d;)++v;for(;f[m-1]>h;)--m;(v||m<p)&&(f=f.slice(v,m),p=m-v);var y=new Array(p+1),g;for(s=0;s<=p;++s)g=y[s]=[],g.x0=s>0?f[s-1]:d,g.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&y[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const x=Math.floor((d-o)*l);y[Math.min(p,x+(f[x]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&y[nl(f,o,0,p)].push(i[s]);return y}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:rl(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:rl([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:rl(Array.isArray(i)?sy.call(i):i),r):n},r}function ir(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function Vn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function Vh(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?Bh:ry(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));Vh(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(Si(e,n,t),i(e[r],s)>0&&Si(e,n,r);a<o;){for(Si(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?Si(e,n,o):(++o,Si(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function Si(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function sl(e,t,n){if(e=Float64Array.from(Z0(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Vn(e);if(t>=1)return ir(e);var r,i=(r-1)*t,s=Math.floor(i),a=ir(Vh(e,s).subarray(0,s+1)),o=Vn(e.subarray(s+1));return a+(o-a)*(i-s)}}function*dy(e){for(const t of e)yield*t}function Hh(e){return Array.from(dy(e))}function fy(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(i);++r<i;)s[r]=e+r*n;return s}function py(e){return e}var qs=1,Ys=2,al=3,Oi=4,Fh=1e-6;function my(e){return"translate("+e+",0)"}function gy(e){return"translate(0,"+e+")"}function vy(e){return t=>+e(t)}function yy(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function xy(){return!this.__axis}function Xs(e,t){var n=[],r=null,i=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=e===qs||e===Oi?-1:1,u=e===Oi||e===Ys?"x":"y",d=e===qs||e===al?my:gy;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),v=i??(t.tickFormat?t.tickFormat.apply(t,n):py),m=Math.max(s,0)+o,y=t.range(),g=+y[0]+l,x=+y[y.length-1]+l,w=(t.bandwidth?yy:vy)(t.copy(),l),_=f.selection?f.selection():f,S=_.selectAll(".domain").data([null]),A=_.selectAll(".tick").data(p,t).order(),D=A.exit(),k=A.enter().append("g").attr("class","tick"),R=A.select("line"),T=A.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(k),R=R.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),T=T.merge(k.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===qs?"0em":e===al?"0.71em":"0.32em")),f!==_&&(S=S.transition(f),A=A.transition(f),R=R.transition(f),T=T.transition(f),D=D.transition(f).attr("opacity",Fh).attr("transform",function(H){return isFinite(H=w(H))?d(H+l):this.getAttribute("transform")}),k.attr("opacity",Fh).attr("transform",function(H){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(H))?P:w(H))+l)})),D.remove(),S.attr("d",e===Oi||e===Ys?a?"M"+c*a+","+g+"H"+l+"V"+x+"H"+c*a:"M"+l+","+g+"V"+x:a?"M"+g+","+c*a+"V"+l+"H"+x+"V"+c*a:"M"+g+","+l+"H"+x),A.attr("opacity",1).attr("transform",function(H){return d(w(H)+l)}),R.attr(u+"2",c*s),T.attr(u,c*m).text(v),_.filter(xy).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ys?"start":e===Oi?"end":"middle"),_.each(function(){this.__axis=w})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function by(e){return Xs(qs,e)}function Ey(e){return Xs(Ys,e)}function ol(e){return Xs(al,e)}function zh(e){return Xs(Oi,e)}var _y={value:()=>{}};function ll(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Zs(n)}function Zs(e){this._=e}function wy(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Zs.prototype=ll.prototype={constructor:Zs,on:function(e,t){var n=this._,r=wy(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Sy(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=Gh(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Gh(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Zs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Sy(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Gh(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=_y,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var cl="http://www.w3.org/1999/xhtml";const jh={svg:"http://www.w3.org/2000/svg",xhtml:cl,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ks(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),jh.hasOwnProperty(t)?{space:jh[t],local:e}:e}function Oy(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===cl&&t.documentElement.namespaceURI===cl?t.createElement(e):t.createElementNS(n,e)}}function Ty(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wh(e){var t=Ks(e);return(t.local?Ty:Oy)(t)}function My(){}function ul(e){return e==null?My:function(){return this.querySelector(e)}}function Cy(e){typeof e!="function"&&(e=ul(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=new Array(a),l,c,u=0;u<a;++u)(l=s[u])&&(c=e.call(l,l.__data__,u,s))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new Se(r,this._parents)}function Ay(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function $y(){return[]}function qh(e){return e==null?$y:function(){return this.querySelectorAll(e)}}function Ly(e){return function(){return Ay(e.apply(this,arguments))}}function Ry(e){typeof e=="function"?e=Ly(e):e=qh(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var a=t[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&(r.push(e.call(l,l.__data__,c,a)),i.push(l));return new Se(r,i)}function Yh(e){return function(){return this.matches(e)}}function Xh(e){return function(t){return t.matches(e)}}var ky=Array.prototype.find;function Dy(e){return function(){return ky.call(this.children,e)}}function Iy(){return this.firstElementChild}function Ny(e){return this.select(e==null?Iy:Dy(typeof e=="function"?e:Xh(e)))}var Py=Array.prototype.filter;function Uy(){return Array.from(this.children)}function By(e){return function(){return Py.call(this.children,e)}}function Vy(e){return this.selectAll(e==null?Uy:By(typeof e=="function"?e:Xh(e)))}function Hy(e){typeof e!="function"&&(e=Yh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new Se(r,this._parents)}function Zh(e){return new Array(e.length)}function Fy(){return new Se(this._enter||this._groups.map(Zh),this._parents)}function Qs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Qs.prototype={constructor:Qs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function zy(e){return function(){return e}}function Gy(e,t,n,r,i,s){for(var a=0,o,l=t.length,c=s.length;a<c;++a)(o=t[a])?(o.__data__=s[a],r[a]=o):n[a]=new Qs(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function jy(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new Qs(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function Wy(e){return e.__data__}function qy(e,t){if(!arguments.length)return Array.from(this,Wy);var n=t?jy:Gy,r=this._parents,i=this._groups;typeof e!="function"&&(e=zy(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Yy(e.call(u,u&&u.__data__,c,r)),p=f.length,v=o[c]=new Array(p),m=a[c]=new Array(p),y=l[c]=new Array(h);n(u,d,v,m,y,f,t);for(var g=0,x=0,w,_;g<p;++g)if(w=v[g]){for(g>=x&&(x=g+1);!(_=m[x])&&++x<p;);w._next=_||null}}return a=new Se(a,r),a._enter=o,a._exit=l,a}function Yy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Xy(){return new Se(this._exit||this._groups.map(Zh),this._parents)}function Zy(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function Ky(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new Se(o,this._parents)}function Qy(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],a;--i>=0;)(a=r[i])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function Jy(e){e||(e=t1);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Se(i,this._parents).order()}function t1(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function e1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function n1(){return Array.from(this)}function r1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var a=r[i];if(a)return a}return null}function i1(){let e=0;for(const t of this)++e;return e}function s1(){return!this.node()}function a1(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,a=i.length,o;s<a;++s)(o=i[s])&&e.call(o,o.__data__,s,i);return this}function o1(e){return function(){this.removeAttribute(e)}}function l1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function c1(e,t){return function(){this.setAttribute(e,t)}}function u1(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function h1(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function d1(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function f1(e,t){var n=Ks(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?l1:o1:typeof t=="function"?n.local?d1:h1:n.local?u1:c1)(n,t))}function Kh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function p1(e){return function(){this.style.removeProperty(e)}}function m1(e,t,n){return function(){this.style.setProperty(e,t,n)}}function g1(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function v1(e,t,n){return arguments.length>1?this.each((t==null?p1:typeof t=="function"?g1:m1)(e,t,n??"")):Br(this.node(),e)}function Br(e,t){return e.style.getPropertyValue(t)||Kh(e).getComputedStyle(e,null).getPropertyValue(t)}function y1(e){return function(){delete this[e]}}function x1(e,t){return function(){this[e]=t}}function b1(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function E1(e,t){return arguments.length>1?this.each((t==null?y1:typeof t=="function"?b1:x1)(e,t)):this.node()[e]}function Qh(e){return e.trim().split(/^|\s+/)}function hl(e){return e.classList||new Jh(e)}function Jh(e){this._node=e,this._names=Qh(e.getAttribute("class")||"")}Jh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function td(e,t){for(var n=hl(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ed(e,t){for(var n=hl(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function _1(e){return function(){td(this,e)}}function w1(e){return function(){ed(this,e)}}function S1(e,t){return function(){(t.apply(this,arguments)?td:ed)(this,e)}}function O1(e,t){var n=Qh(e+"");if(arguments.length<2){for(var r=hl(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?S1:t?_1:w1)(n,t))}function T1(){this.textContent=""}function M1(e){return function(){this.textContent=e}}function C1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function A1(e){return arguments.length?this.each(e==null?T1:(typeof e=="function"?C1:M1)(e)):this.node().textContent}function $1(){this.innerHTML=""}function L1(e){return function(){this.innerHTML=e}}function R1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function k1(e){return arguments.length?this.each(e==null?$1:(typeof e=="function"?R1:L1)(e)):this.node().innerHTML}function D1(){this.nextSibling&&this.parentNode.appendChild(this)}function I1(){return this.each(D1)}function N1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function P1(){return this.each(N1)}function U1(e){var t=typeof e=="function"?e:Wh(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function B1(){return null}function V1(e,t){var n=typeof e=="function"?e:Wh(e),r=t==null?B1:typeof t=="function"?t:ul(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function H1(){var e=this.parentNode;e&&e.removeChild(this)}function F1(){return this.each(H1)}function z1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function G1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function j1(e){return this.select(e?G1:z1)}function W1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function q1(e){return function(t){e.call(this,t,this.__data__)}}function Y1(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function X1(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function Z1(e,t,n){return function(){var r=this.__on,i,s=q1(t);if(r){for(var a=0,o=r.length;a<o;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function K1(e,t,n){var r=Y1(e+""),i,s=r.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<s;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?Z1:X1,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function nd(e,t,n){var r=Kh(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Q1(e,t){return function(){return nd(this,e,t)}}function J1(e,t){return function(){return nd(this,e,t.apply(this,arguments))}}function tx(e,t){return this.each((typeof t=="function"?J1:Q1)(e,t))}function*ex(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,a;i<s;++i)(a=r[i])&&(yield a)}var rd=[null];function Se(e,t){this._groups=e,this._parents=t}function Ti(){return new Se([[document.documentElement]],rd)}function nx(){return this}Se.prototype=Ti.prototype={constructor:Se,select:Cy,selectAll:Ry,selectChild:Ny,selectChildren:Vy,filter:Hy,data:qy,enter:Fy,exit:Xy,join:Zy,merge:Ky,selection:nx,order:Qy,sort:Jy,call:e1,nodes:n1,node:r1,size:i1,empty:s1,each:a1,attr:f1,style:v1,property:E1,classed:O1,text:A1,html:k1,raise:I1,lower:P1,append:U1,insert:V1,remove:F1,clone:j1,datum:W1,on:K1,dispatch:tx,[Symbol.iterator]:ex};function I(e){return typeof e=="string"?new Se([[document.querySelector(e)]],[document.documentElement]):new Se([[e]],rd)}function rx(e){let t;for(;t=e.sourceEvent;)e=t;return e}function sr(e,t){if(e=rx(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const dl={capture:!0,passive:!1};function fl(e){e.preventDefault(),e.stopImmediatePropagation()}function ix(e){var t=e.document.documentElement,n=I(e).on("dragstart.drag",fl,dl);"onselectstart"in t?n.on("selectstart.drag",fl,dl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sx(e,t){var n=e.document.documentElement,r=I(e).on("dragstart.drag",null);t&&(r.on("click.drag",fl,dl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function pl(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function id(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mi(){}var Ci=.7,Js=1/Ci,Vr="\\s*([+-]?\\d+)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ax=/^#([0-9a-f]{3,8})$/,ox=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),lx=new RegExp(`^rgb\\(${sn},${sn},${sn}\\)$`),cx=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${Ai}\\)$`),ux=new RegExp(`^rgba\\(${sn},${sn},${sn},${Ai}\\)$`),hx=new RegExp(`^hsl\\(${Ai},${sn},${sn}\\)$`),dx=new RegExp(`^hsla\\(${Ai},${sn},${sn},${Ai}\\)$`),sd={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};pl(Mi,yn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ad,formatHex:ad,formatHex8:fx,formatHsl:px,formatRgb:od,toString:od});function ad(){return this.rgb().formatHex()}function fx(){return this.rgb().formatHex8()}function px(){return dd(this).formatHsl()}function od(){return this.rgb().formatRgb()}function yn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ax.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?ld(t):n===3?new ve(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ta(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ta(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ox.exec(e))?new ve(t[1],t[2],t[3],1):(t=lx.exec(e))?new ve(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=cx.exec(e))?ta(t[1],t[2],t[3],t[4]):(t=ux.exec(e))?ta(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hx.exec(e))?hd(t[1],t[2]/100,t[3]/100,1):(t=dx.exec(e))?hd(t[1],t[2]/100,t[3]/100,t[4]):sd.hasOwnProperty(e)?ld(sd[e]):e==="transparent"?new ve(NaN,NaN,NaN,0):null}function ld(e){return new ve(e>>16&255,e>>8&255,e&255,1)}function ta(e,t,n,r){return r<=0&&(e=t=n=NaN),new ve(e,t,n,r)}function mx(e){return e instanceof Mi||(e=yn(e)),e?(e=e.rgb(),new ve(e.r,e.g,e.b,e.opacity)):new ve}function ml(e,t,n,r){return arguments.length===1?mx(e):new ve(e,t,n,r??1)}function ve(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}pl(ve,ml,id(Mi,{brighter(e){return e=e==null?Js:Math.pow(Js,e),new ve(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ci:Math.pow(Ci,e),new ve(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ve(ar(this.r),ar(this.g),ar(this.b),ea(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:cd,formatHex:cd,formatHex8:gx,formatRgb:ud,toString:ud}));function cd(){return`#${or(this.r)}${or(this.g)}${or(this.b)}`}function gx(){return`#${or(this.r)}${or(this.g)}${or(this.b)}${or((isNaN(this.opacity)?1:this.opacity)*255)}`}function ud(){const e=ea(this.opacity);return`${e===1?"rgb(":"rgba("}${ar(this.r)}, ${ar(this.g)}, ${ar(this.b)}${e===1?")":`, ${e})`}`}function ea(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ar(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function or(e){return e=ar(e),(e<16?"0":"")+e.toString(16)}function hd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ge(e,t,n,r)}function dd(e){if(e instanceof Ge)return new Ge(e.h,e.s,e.l,e.opacity);if(e instanceof Mi||(e=yn(e)),!e)return new Ge;if(e instanceof Ge)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),a=NaN,o=s-i,l=(s+i)/2;return o?(t===s?a=(n-r)/o+(n<r)*6:n===s?a=(r-t)/o+2:a=(t-n)/o+4,o/=l<.5?s+i:2-s-i,a*=60):o=l>0&&l<1?0:a,new Ge(a,o,l,e.opacity)}function gl(e,t,n,r){return arguments.length===1?dd(e):new Ge(e,t,n,r??1)}function Ge(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}pl(Ge,gl,id(Mi,{brighter(e){return e=e==null?Js:Math.pow(Js,e),new Ge(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ci:Math.pow(Ci,e),new Ge(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new ve(vl(e>=240?e-240:e+120,i,r),vl(e,i,r),vl(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ge(fd(this.h),na(this.s),na(this.l),ea(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 e=ea(this.opacity);return`${e===1?"hsl(":"hsla("}${fd(this.h)}, ${na(this.s)*100}%, ${na(this.l)*100}%${e===1?")":`, ${e})`}`}}));function fd(e){return e=(e||0)%360,e<0?e+360:e}function na(e){return Math.max(0,Math.min(1,e||0))}function vl(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const yl=e=>()=>e;function vx(e,t){return function(n){return e+n*t}}function yx(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function xx(e){return(e=+e)==1?pd:function(t,n){return n-t?yx(t,n,e):yl(isNaN(t)?n:t)}}function pd(e,t){var n=t-e;return n?vx(e,n):yl(isNaN(e)?t:e)}const ra=function e(t){var n=xx(t);function r(i,s){var a=n((i=ml(i)).r,(s=ml(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=pd(i.opacity,s.opacity);return function(u){return i.r=a(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r}(1);function bx(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(s){for(i=0;i<n;++i)r[i]=e[i]*(1-s)+t[i]*s;return r}}function Ex(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _x(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),s=new Array(n),a;for(a=0;a<r;++a)i[a]=$i(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<r;++a)s[a]=i[a](o);return s}}function wx(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Oe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Sx(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=$i(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var xl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bl=new RegExp(xl.source,"g");function Ox(e){return function(){return e}}function Tx(e){return function(t){return e(t)+""}}function md(e,t){var n=xl.lastIndex=bl.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=xl.exec(e))&&(i=bl.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,l.push({i:a,x:Oe(r,i)})),n=bl.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?Tx(l[0].x):Ox(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function $i(e,t){var n=typeof t,r;return t==null||n==="boolean"?yl(t):(n==="number"?Oe:n==="string"?(r=yn(t))?(t=r,ra):md:t instanceof yn?ra:t instanceof Date?wx:Ex(t)?bx:Array.isArray(t)?_x:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Sx:Oe)(e,t)}function gd(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var vd=180/Math.PI,El={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yd(e,t,n,r,i,s){var a,o,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*vd,skewX:Math.atan(l)*vd,scaleX:a,scaleY:o}}var ia;function Mx(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?El:yd(t.a,t.b,t.c,t.d,t.e,t.f)}function Cx(e){return e==null||(ia||(ia=document.createElementNS("http://www.w3.org/2000/svg","g")),ia.setAttribute("transform",e),!(e=ia.transform.baseVal.consolidate()))?El:(e=e.matrix,yd(e.a,e.b,e.c,e.d,e.e,e.f))}function xd(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var v=f.push("translate(",null,t,null,n);p.push({i:v-4,x:Oe(c,d)},{i:v-2,x:Oe(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:Oe(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:Oe(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var v=f.push(i(f)+"scale(",null,",",null,")");p.push({i:v-4,x:Oe(c,d)},{i:v-2,x:Oe(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,v=h.length,m;++p<v;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var Ax=xd(Mx,"px, ","px)","deg)"),$x=xd(Cx,", ",")",")");function Lx(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var Hr=0,Li=0,Ri=0,bd=1e3,sa,ki,aa=0,lr=0,oa=0,Di=typeof performance=="object"&&performance.now?performance:Date,Ed=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _l(){return lr||(Ed(Rx),lr=Di.now()+oa)}function Rx(){lr=0}function la(){this._call=this._time=this._next=null}la.prototype=_d.prototype={constructor:la,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_l():+n)+(t==null?0:+t),!this._next&&ki!==this&&(ki?ki._next=this:sa=this,ki=this),this._call=e,this._time=n,wl()},stop:function(){this._call&&(this._call=null,this._time=1/0,wl())}};function _d(e,t,n){var r=new la;return r.restart(e,t,n),r}function kx(){_l(),++Hr;for(var e=sa,t;e;)(t=lr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Hr}function wd(){lr=(aa=Di.now())+oa,Hr=Li=0;try{kx()}finally{Hr=0,Ix(),lr=0}}function Dx(){var e=Di.now(),t=e-aa;t>bd&&(oa-=t,aa=e)}function Ix(){for(var e,t=sa,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:sa=n);ki=e,wl(r)}function wl(e){if(!Hr){Li&&(Li=clearTimeout(Li));var t=e-lr;t>24?(e<1/0&&(Li=setTimeout(wd,e-Di.now()-oa)),Ri&&(Ri=clearInterval(Ri))):(Ri||(aa=Di.now(),Ri=setInterval(Dx,bd)),Hr=1,Ed(wd))}}function Sd(e,t,n){var r=new la;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Nx=ll("start","end","cancel","interrupt"),Px=[],Od=0,Td=1,Sl=2,ca=3,Md=4,Ol=5,ua=6;function ha(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Ux(e,n,{name:t,index:r,group:i,on:Nx,tween:Px,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Od})}function Tl(e,t){var n=je(e,t);if(n.state>Od)throw new Error("too late; already scheduled");return n}function an(e,t){var n=je(e,t);if(n.state>ca)throw new Error("too late; already running");return n}function je(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ux(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=_d(s,0,n.time);function s(c){n.state=Td,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==Td)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===ca)return Sd(a);f.state===Md?(f.state=ua,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=ua,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Sd(function(){n.state===ca&&(n.state=Md,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Sl,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Sl){for(n.state=ca,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Ol,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===Ol&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ua,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Ml(e,t){var n=e.__transition,r,i,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){s=!1;continue}i=r.state>Sl&&r.state<Ol,r.state=ua,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function Bx(e){return this.each(function(){Ml(this,e)})}function Vx(e,t){var n,r;return function(){var i=an(this,e),s=i.tween;if(s!==n){r=n=s;for(var a=0,o=r.length;a<o;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function Hx(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=an(this,e),a=s.tween;if(a!==r){i=(r=a).slice();for(var o={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=o;break}l===c&&i.push(o)}s.tween=i}}function Fx(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=je(this.node(),n).tween,i=0,s=r.length,a;i<s;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Vx:Hx)(n,e,t))}function Cl(e,t,n){var r=e._id;return e.each(function(){var i=an(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return je(i,r).value[t]}}function Cd(e,t){var n;return(typeof t=="number"?Oe:t instanceof yn?ra:(n=yn(t))?(t=n,ra):md)(e,t)}function zx(e){return function(){this.removeAttribute(e)}}function Gx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jx(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttribute(e);return a===i?null:a===r?s:s=t(r=a,n)}}function Wx(e,t,n){var r,i=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?s:s=t(r=a,n)}}function qx(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function Yx(e,t,n){var r,i,s;return function(){var a,o=n(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=o+"",a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o)))}}function Xx(e,t){var n=Ks(e),r=n==="transform"?$x:Cd;return this.attrTween(e,typeof t=="function"?(n.local?Yx:qx)(n,r,Cl(this,"attr."+e,t)):t==null?(n.local?Gx:zx)(n):(n.local?Wx:jx)(n,r,t))}function Zx(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Kx(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Qx(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&Kx(e,s)),n}return i._value=t,i}function Jx(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&Zx(e,s)),n}return i._value=t,i}function tb(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ks(e);return this.tween(n,(r.local?Qx:Jx)(r,t))}function eb(e,t){return function(){Tl(this,e).delay=+t.apply(this,arguments)}}function nb(e,t){return t=+t,function(){Tl(this,e).delay=t}}function rb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eb:nb)(t,e)):je(this.node(),t).delay}function ib(e,t){return function(){an(this,e).duration=+t.apply(this,arguments)}}function sb(e,t){return t=+t,function(){an(this,e).duration=t}}function ab(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ib:sb)(t,e)):je(this.node(),t).duration}function ob(e,t){if(typeof t!="function")throw new Error;return function(){an(this,e).ease=t}}function lb(e){var t=this._id;return arguments.length?this.each(ob(t,e)):je(this.node(),t).ease}function cb(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;an(this,e).ease=n}}function ub(e){if(typeof e!="function")throw new Error;return this.each(cb(this._id,e))}function hb(e){typeof e!="function"&&(e=Yh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],a=s.length,o=r[i]=[],l,c=0;c<a;++c)(l=s[c])&&e.call(l,l.__data__,c,s)&&o.push(l);return new xn(r,this._parents,this._name,this._id)}function db(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new xn(a,this._parents,this._name,this._id)}function fb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function pb(e,t,n){var r,i,s=fb(t)?Tl:an;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function mb(e,t){var n=this._id;return arguments.length<2?je(this.node(),n).on.on(e):this.each(pb(n,e,t))}function gb(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function vb(){return this.on("end.remove",gb(this._id))}function yb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ul(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,ha(c[h],t,n,h,c,je(u,n)));return new xn(s,this._parents,t,n)}function xb(e){var t=this._name,n=this._id;typeof e!="function"&&(e=qh(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=je(u,n),v=0,m=h.length;v<m;++v)(f=h[v])&&ha(f,t,n,v,h,p);s.push(h),a.push(u)}return new xn(s,a,t,n)}var bb=Ti.prototype.constructor;function Eb(){return new bb(this._groups,this._parents)}function _b(e,t){var n,r,i;return function(){var s=Br(this,e),a=(this.style.removeProperty(e),Br(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Ad(e){return function(){this.style.removeProperty(e)}}function wb(e,t,n){var r,i=n+"",s;return function(){var a=Br(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function Sb(e,t,n){var r,i,s;return function(){var a=Br(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Br(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function Ob(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=an(this,e),c=l.on,u=l.value[s]==null?o||(o=Ad(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function Tb(e,t,n){var r=(e+="")=="transform"?Ax:Cd;return t==null?this.styleTween(e,_b(e,r)).on("end.style."+e,Ad(e)):typeof t=="function"?this.styleTween(e,Sb(e,r,Cl(this,"style."+e,t))).each(Ob(this._id,e)):this.styleTween(e,wb(e,r,t),n).on("end.style."+e,null)}function Mb(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Cb(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Mb(e,a,n)),r}return s._value=t,s}function Ab(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Cb(e,t,n??""))}function $b(e){return function(){this.textContent=e}}function Lb(e){return function(){var t=e(this);this.textContent=t??""}}function Rb(e){return this.tween("text",typeof e=="function"?Lb(Cl(this,"text",e)):$b(e==null?"":e+""))}function kb(e){return function(t){this.textContent=e.call(this,t)}}function Db(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&kb(i)),t}return r._value=e,r}function Ib(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Db(e))}function Nb(){for(var e=this._name,t=this._id,n=$d(),r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)if(l=a[c]){var u=je(l,t);ha(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new xn(r,this._parents,e,n)}function Pb(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--i===0&&s()}};n.each(function(){var c=an(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),i===0&&s()})}var Ub=0;function xn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function $d(){return++Ub}var bn=Ti.prototype;xn.prototype={constructor:xn,select:yb,selectAll:xb,selectChild:bn.selectChild,selectChildren:bn.selectChildren,filter:hb,merge:db,selection:Eb,transition:Nb,call:bn.call,nodes:bn.nodes,node:bn.node,size:bn.size,empty:bn.empty,each:bn.each,on:mb,attr:Xx,attrTween:tb,style:Tb,styleTween:Ab,text:Rb,textTween:Ib,remove:vb,tween:Fx,delay:rb,duration:ab,ease:lb,easeVarying:ub,end:Pb,[Symbol.iterator]:bn[Symbol.iterator]};const Bb=e=>+e;function Ld(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Vb={time:null,delay:0,duration:250,ease:Ld};function Hb(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Fb(e){var t,n;e instanceof xn?(t=e._id,e=e._name):(t=$d(),(n=Vb).time=_l(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var a=r[s],o=a.length,l,c=0;c<o;++c)(l=a[c])&&ha(l,e,t,c,a,n||Hb(l,t));return new xn(r,this._parents,e,t)}Ti.prototype.interrupt=Bx,Ti.prototype.transition=Fb;const Al=e=>()=>e;function zb(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function Gb(e){e.stopImmediatePropagation()}function $l(e){e.preventDefault(),e.stopImmediatePropagation()}var Rd={name:"drag"},Ll={name:"space"},Fr={name:"handle"},zr={name:"center"};const{abs:kd,max:oe,min:le}=Math;function Dd(e){return[+e[0],+e[1]]}function Id(e){return[Dd(e[0]),Dd(e[1])]}var da={name:"x",handles:["w","e"].map(fa),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},Rl={name:"y",handles:["n","s"].map(fa),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},En={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"},Nd={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Pd={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},jb={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Wb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function fa(e){return{type:e}}function qb(e){return!e.ctrlKey&&!e.button}function Yb(){var e=this.ownerSVGElement||this;return 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]]}function Xb(){return navigator.maxTouchPoints||"ontouchstart"in this}function kl(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Zb(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function Ud(){return Kb(da)}function Kb(e){var t=Yb,n=qb,r=Xb,i=!0,s=ll("start","brush","end"),a=6,o;function l(m){var y=m.property("__brush",v).selectAll(".overlay").data([fa("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",En.overlay).merge(y).each(function(){var x=kl(this).extent;I(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),m.selectAll(".selection").data([fa("selection")]).enter().append("rect").attr("class","selection").attr("cursor",En.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var g=m.selectAll(".handle").data(e.handles,function(x){return x.type});g.exit().remove(),g.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return En[x.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,y,g){m.tween?m.on("start.brush",function(x){u(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){u(this,arguments).end(x)}).tween("brush",function(){var x=this,w=x.__brush,_=u(x,arguments),S=w.selection,A=e.input(typeof y=="function"?y.apply(this,arguments):y,w.extent),D=$i(S,A);function k(R){w.selection=R===1&&A===null?null:D(R),c.call(x),_.brush()}return S!==null&&A!==null?k:k(1)}):m.each(function(){var x=this,w=arguments,_=x.__brush,S=e.input(typeof y=="function"?y.apply(x,w):y,_.extent),A=u(x,w).beforestart();Ml(x),_.selection=S===null?null:S,c.call(x),A.start(g).brush(g).end(g)})},l.clear=function(m,y){l.move(m,null,y)};function c(){var m=I(this),y=kl(this).selection;y?(m.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(g){return g.type[g.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(g){return g.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(g){return g.type==="n"||g.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(g){return g.type==="e"||g.type==="w"?y[1][1]-y[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,y,g){var x=m.__brush.emitter;return x&&(!g||!x.clean)?x:new d(m,y,g)}function d(m,y,g){this.that=m,this.args=y,this.state=m.__brush,this.active=0,this.clean=g}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,y){return this.starting?(this.starting=!1,this.emit("start",m,y)):this.emit("brush",m),this},brush:function(m,y){return this.emit("brush",m,y),this},end:function(m,y){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,y)),this},emit:function(m,y,g){var x=I(this.that).datum();s.call(m,this.that,new zb(m,{sourceEvent:y,target:l,selection:e.output(this.state.selection),mode:g,dispatch:s}),x)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var y=this,g=m.target.__data__.type,x=(i&&m.metaKey?g="overlay":g)==="selection"?Rd:i&&m.altKey?zr:Fr,w=e===Rl?null:jb[g],_=e===da?null:Wb[g],S=kl(y),A=S.extent,D=S.selection,k=A[0][0],R,T,H=A[0][1],P,V,E=A[1][0],L,$,U=A[1][1],B,X,Y=0,st=0,nt,ft=w&&_&&i&&m.shiftKey,_t,K,et=Array.from(m.touches||[m],it=>{const Dt=it.identifier;return it=sr(it,y),it.point0=it.slice(),it.identifier=Dt,it});Ml(y);var gt=u(y,arguments,!0).beforestart();if(g==="overlay"){D&&(nt=!0);const it=[et[0],et[1]||et[0]];S.selection=D=[[R=e===Rl?k:le(it[0][0],it[1][0]),P=e===da?H:le(it[0][1],it[1][1])],[L=e===Rl?E:oe(it[0][0],it[1][0]),B=e===da?U:oe(it[0][1],it[1][1])]],et.length>1&&kt(m)}else R=D[0][0],P=D[0][1],L=D[1][0],B=D[1][1];T=R,V=P,$=L,X=B;var q=I(y).attr("pointer-events","none"),Q=q.selectAll(".overlay").attr("cursor",En[g]);if(m.touches)gt.moved=G,gt.ended=yt;else{var ot=I(m.view).on("mousemove.brush",G,!0).on("mouseup.brush",yt,!0);i&&ot.on("keydown.brush",Ht,!0).on("keyup.brush",Ft,!0),ix(m.view)}c.call(y),gt.start(m,x.name);function G(it){for(const Dt of it.changedTouches||[it])for(const He of et)He.identifier===Dt.identifier&&(He.cur=sr(Dt,y));if(ft&&!_t&&!K&&et.length===1){const Dt=et[0];kd(Dt.cur[0]-Dt[0])>kd(Dt.cur[1]-Dt[1])?K=!0:_t=!0}for(const Dt of et)Dt.cur&&(Dt[0]=Dt.cur[0],Dt[1]=Dt.cur[1]);nt=!0,$l(it),kt(it)}function kt(it){const Dt=et[0],He=Dt.point0;var we;switch(Y=Dt[0]-He[0],st=Dt[1]-He[1],x){case Ll:case Rd:{w&&(Y=oe(k-R,le(E-L,Y)),T=R+Y,$=L+Y),_&&(st=oe(H-P,le(U-B,st)),V=P+st,X=B+st);break}case Fr:{et[1]?(w&&(T=oe(k,le(E,et[0][0])),$=oe(k,le(E,et[1][0])),w=1),_&&(V=oe(H,le(U,et[0][1])),X=oe(H,le(U,et[1][1])),_=1)):(w<0?(Y=oe(k-R,le(E-R,Y)),T=R+Y,$=L):w>0&&(Y=oe(k-L,le(E-L,Y)),T=R,$=L+Y),_<0?(st=oe(H-P,le(U-P,st)),V=P+st,X=B):_>0&&(st=oe(H-B,le(U-B,st)),V=P,X=B+st));break}case zr:{w&&(T=oe(k,le(E,R-Y*w)),$=oe(k,le(E,L+Y*w))),_&&(V=oe(H,le(U,P-st*_)),X=oe(H,le(U,B+st*_)));break}}$<T&&(w*=-1,we=R,R=L,L=we,we=T,T=$,$=we,g in Nd&&Q.attr("cursor",En[g=Nd[g]])),X<V&&(_*=-1,we=P,P=B,B=we,we=V,V=X,X=we,g in Pd&&Q.attr("cursor",En[g=Pd[g]])),S.selection&&(D=S.selection),_t&&(T=D[0][0],$=D[1][0]),K&&(V=D[0][1],X=D[1][1]),(D[0][0]!==T||D[0][1]!==V||D[1][0]!==$||D[1][1]!==X)&&(S.selection=[[T,V],[$,X]],c.call(y),gt.brush(it,x.name))}function yt(it){if(Gb(it),it.touches){if(it.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else sx(it.view,nt),ot.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),Q.attr("cursor",En.overlay),S.selection&&(D=S.selection),Zb(D)&&(S.selection=null,c.call(y)),gt.end(it,x.name)}function Ht(it){switch(it.keyCode){case 16:{ft=w&&_;break}case 18:{x===Fr&&(w&&(L=$-Y*w,R=T+Y*w),_&&(B=X-st*_,P=V+st*_),x=zr,kt(it));break}case 32:{(x===Fr||x===zr)&&(w<0?L=$-Y:w>0&&(R=T-Y),_<0?B=X-st:_>0&&(P=V-st),x=Ll,Q.attr("cursor",En.selection),kt(it));break}default:return}$l(it)}function Ft(it){switch(it.keyCode){case 16:{ft&&(_t=K=ft=!1,kt(it));break}case 18:{x===zr&&(w<0?L=$:w>0&&(R=T),_<0?B=X:_>0&&(P=V),x=Fr,kt(it));break}case 32:{x===Ll&&(it.altKey?(w&&(L=$-Y*w,R=T+Y*w),_&&(B=X-st*_,P=V+st*_),x=zr):(w<0?L=$:w>0&&(R=T),_<0?B=X:_>0&&(P=V),x=Fr),Q.attr("cursor",En[g]),kt(it));break}default:return}$l(it)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function v(){var m=this.__brush||{selection:null};return m.extent=Id(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:Al(Id(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:Al(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:Al(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const Dl=Math.PI,Il=2*Dl,cr=1e-6,Qb=Il-cr;function Bd(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Jb(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Bd;const n=10**t;return function(r){this._+=r[0];for(let i=1,s=r.length;i<s;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Nl=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Bd:Jb(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>cr)if(!(Math.abs(d*l-c*u)>cr)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,v=l*l+c*c,m=f*f+p*p,y=Math.sqrt(v),g=Math.sqrt(h),x=s*Math.tan((Dl-Math.acos((v+h-m)/(2*y*g)))/2),w=x/g,_=x/y;Math.abs(w-1)>cr&&this._append`L${t+w*u},${n+w*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>cr||Math.abs(this._y1-u)>cr)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%Il+Il),h>Qb?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>cr&&this._append`A${r},${r},0,${+(h>=Dl)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Vd(){return new Nl}Vd.prototype=Nl.prototype;function tE(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function pa(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Gr(e){return e=pa(Math.abs(e)),e?e[1]:NaN}function eE(e,t){return function(n,r){for(var i=n.length,s=[],a=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),s.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function nE(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var rE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ii(e){if(!(t=rE.exec(e)))throw new Error("invalid format: "+e);var t;return new Pl({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ii.prototype=Pl.prototype;function Pl(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Pl.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 iE(e){t:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break t;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Hd;function sE(e,t){var n=pa(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(Hd=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return s===a?r:s>a?r+new Array(s-a+1).join("0"):s>0?r.slice(0,s)+"."+r.slice(s):"0."+new Array(1-s).join("0")+pa(e,Math.max(0,t+s-1))[0]}function Fd(e,t){var n=pa(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const zd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:tE,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fd(e*100,t),r:Fd,s:sE,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gd(e){return e}var jd=Array.prototype.map,Wd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function aE(e){var t=e.grouping===void 0||e.thousands===void 0?Gd:eE(jd.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Gd:nE(jd.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Ii(d);var h=d.fill,f=d.align,p=d.sign,v=d.symbol,m=d.zero,y=d.width,g=d.comma,x=d.precision,w=d.trim,_=d.type;_==="n"?(g=!0,_="g"):zd[_]||(x===void 0&&(x=12),w=!0,_="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A=v==="$"?r:/[%p]/.test(_)?a:"",D=zd[_],k=/[defgprs%]/.test(_);x=x===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function R(T){var H=S,P=A,V,E,L;if(_==="c")P=D(T)+P,T="";else{T=+T;var $=T<0||1/T<0;if(T=isNaN(T)?l:D(Math.abs(T),x),w&&(T=iE(T)),$&&+T==0&&p!=="+"&&($=!1),H=($?p==="("?p:o:p==="-"||p==="("?"":p)+H,P=(_==="s"?Wd[8+Hd/3]:"")+P+($&&p==="("?")":""),k){for(V=-1,E=T.length;++V<E;)if(L=T.charCodeAt(V),48>L||L>57){P=(L===46?i+T.slice(V+1):T.slice(V))+P,T=T.slice(0,V);break}}}g&&!m&&(T=t(T,1/0));var U=H.length+T.length+P.length,B=U<y?new Array(y-U+1).join(h):"";switch(g&&m&&(T=t(B+T,B.length?y-P.length:1/0),B=""),f){case"<":T=H+T+P+B;break;case"=":T=H+B+T+P;break;case"^":T=B.slice(0,U=B.length>>1)+H+T+P+B.slice(U);break;default:T=B+H+T+P;break}return s(T)}return R.toString=function(){return d+""},R}function u(d,h){var f=c((d=Ii(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Gr(h)/3)))*3,v=Math.pow(10,-p),m=Wd[8+p/3];return function(y){return f(v*y)+m}}return{format:c,formatPrefix:u}}var ma,Ul,qd;oE({thousands:",",grouping:[3],currency:["$",""]});function oE(e){return ma=aE(e),Ul=ma.format,qd=ma.formatPrefix,ma}function lE(e){return Math.max(0,-Gr(Math.abs(e)))}function cE(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gr(t)/3)))*3-Gr(Math.abs(e)))}function uE(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gr(t)-Gr(e))+1}var At=1e-6,Yd=1e-12,xt=Math.PI,ye=xt/2,Xd=xt/4,Te=xt*2,fe=180/xt,qt=xt/180,$t=Math.abs,Zd=Math.atan,ur=Math.atan2,Rt=Math.cos,hE=Math.exp,dE=Math.log,Mt=Math.sin,Hn=Math.sign||function(e){return e>0?1:e<0?-1:0},We=Math.sqrt,fE=Math.tan;function pE(e){return e>1?0:e<-1?xt:Math.acos(e)}function _n(e){return e>1?ye:e<-1?-ye:Math.asin(e)}function Ie(){}function ga(e,t){e&&Qd.hasOwnProperty(e.type)&&Qd[e.type](e,t)}var Kd={Feature:function(e,t){ga(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)ga(n[r].geometry,t)}},Qd={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){Bl(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Bl(n[r],t,0)},Polygon:function(e,t){Jd(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)Jd(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)ga(n[r],t)}};function Bl(e,t,n){var r=-1,i=e.length-n,s;for(t.lineStart();++r<i;)s=e[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function Jd(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)Bl(e[n],t,1);t.polygonEnd()}function jr(e,t){e&&Kd.hasOwnProperty(e.type)?Kd[e.type](e,t):ga(e,t)}function Vl(e){return[ur(e[1],e[0]),_n(e[2])]}function Wr(e){var t=e[0],n=e[1],r=Rt(n);return[r*Rt(t),r*Mt(t),Mt(n)]}function va(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ya(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Hl(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function xa(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Fl(e){var t=We(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function zl(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return r=t.invert(r,i),r&&e.invert(r[0],r[1])}),n}function Gl(e,t){return $t(e)>xt&&(e-=Math.round(e/Te)*Te),[e,t]}Gl.invert=Gl;function tf(e,t,n){return(e%=Te)?t||n?zl(nf(e),rf(t,n)):nf(e):t||n?rf(t,n):Gl}function ef(e){return function(t,n){return t+=e,$t(t)>xt&&(t-=Math.round(t/Te)*Te),[t,n]}}function nf(e){var t=ef(e);return t.invert=ef(-e),t}function rf(e,t){var n=Rt(e),r=Mt(e),i=Rt(t),s=Mt(t);function a(o,l){var c=Rt(l),u=Rt(o)*c,d=Mt(o)*c,h=Mt(l),f=h*n+u*r;return[ur(d*i-f*s,u*n-h*r),_n(f*i+d*s)]}return a.invert=function(o,l){var c=Rt(l),u=Rt(o)*c,d=Mt(o)*c,h=Mt(l),f=h*i-d*s;return[ur(d*i+h*s,u*n+f*r),_n(f*n-u*r)]},a}function mE(e){e=tf(e[0]*qt,e[1]*qt,e.length>2?e[2]*qt:0);function t(n){return n=e(n[0]*qt,n[1]*qt),n[0]*=fe,n[1]*=fe,n}return t.invert=function(n){return n=e.invert(n[0]*qt,n[1]*qt),n[0]*=fe,n[1]*=fe,n},t}function gE(e,t,n,r,i,s){if(n){var a=Rt(t),o=Mt(t),l=r*n;i==null?(i=t+r*Te,s=t-l/2):(i=sf(a,i),s=sf(a,s),(r>0?i<s:i>s)&&(i+=r*Te));for(var c,u=i;r>0?u>s:u<s;u-=l)c=Vl([a,-o*Rt(u),-o*Mt(u)]),e.point(c[0],c[1])}}function sf(e,t){t=Wr(t),t[0]-=e,Fl(t);var n=pE(-t[1]);return((-t[2]<0?-n:n)+Te-At)%Te}function af(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Ie,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ba(e,t){return $t(e[0]-t[0])<At&&$t(e[1]-t[1])<At}function Ea(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function of(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((v=p.length-1)<=0)){var v,m=p[0],y=p[v],g;if(ba(m,y)){if(!m[2]&&!y[2]){for(i.lineStart(),o=0;o<v;++o)i.point((m=p[o])[0],m[1]);i.lineEnd();return}y[0]+=2*At}s.push(g=new Ea(m,p,null,!0)),a.push(g.o=new Ea(m,null,g,!1)),s.push(g=new Ea(y,p,null,!1)),a.push(g.o=new Ea(y,null,g,!0))}}),!!s.length){for(a.sort(t),lf(s),lf(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function lf(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}function jl(e){return $t(e[0])<=xt?e[0]:Hn(e[0])*(($t(e[0])+xt)%Te-xt)}function vE(e,t){var n=jl(t),r=t[1],i=Mt(r),s=[Mt(n),-Rt(n),0],a=0,o=0,l=new rr;i===1?r=ye+At:i===-1&&(r=-ye-At);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=jl(f),v=f[1]/2+Xd,m=Mt(v),y=Rt(v),g=0;g<h;++g,p=w,m=S,y=A,f=x){var x=d[g],w=jl(x),_=x[1]/2+Xd,S=Mt(_),A=Rt(_),D=w-p,k=D>=0?1:-1,R=k*D,T=R>xt,H=m*S;if(l.add(ur(H*k*Mt(R),y*A+H*Rt(R))),a+=T?D+k*Te:D,T^p>=n^w>=n){var P=ya(Wr(f),Wr(x));Fl(P);var V=ya(s,P);Fl(V);var E=(T^D>=0?-1:1)*_n(V[2]);(r>E||r===E&&(P[0]||P[1]))&&(o+=T^D>=0?1:-1)}}return(a<-At||a<At&&l<-Yd)^o&1}function cf(e,t,n,r){return function(i){var s=t(i),a=af(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:v,lineEnd:m,polygonStart:function(){h.point=y,h.lineStart=g,h.lineEnd=x,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=v,h.lineEnd=m,u=Hh(u);var w=vE(c,r);u.length?(l||(i.polygonStart(),l=!0),of(u,xE,w,n,i)):w&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function f(w,_){e(w,_)&&i.point(w,_)}function p(w,_){s.point(w,_)}function v(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function y(w,_){d.push([w,_]),o.point(w,_)}function g(){o.lineStart(),d=[]}function x(){y(d[0][0],d[0][1]),o.lineEnd();var w=o.clean(),_=a.result(),S,A=_.length,D,k,R;if(d.pop(),c.push(d),d=null,!!A){if(w&1){if(k=_[0],(D=k.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),S=0;S<D;++S)i.point((R=k[S])[0],R[1]);i.lineEnd()}return}A>1&&w&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(yE))}}return h}}function yE(e){return e.length>1}function xE(e,t){return((e=e.x)[0]<0?e[1]-ye-At:ye-e[1])-((t=t.x)[0]<0?t[1]-ye-At:ye-t[1])}const uf=cf(function(){return!0},bE,_E,[-xt,-ye]);function bE(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?xt:-xt,l=$t(s-t);$t(l-xt)<At?(e.point(t,n=(n+a)/2>0?ye:-ye),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=xt&&($t(t-r)<At&&(t-=r*At),$t(s-o)<At&&(s-=o*At),n=EE(t,n,s,a),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),i=0),e.point(t=s,n=a),r=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}}function EE(e,t,n,r){var i,s,a=Mt(e-n);return $t(a)>At?Zd((Mt(t)*(s=Rt(r))*Mt(n)-Mt(r)*(i=Rt(t))*Mt(e))/(i*s*a)):(t+r)/2}function _E(e,t,n,r){var i;if(e==null)i=n*ye,r.point(-xt,i),r.point(0,i),r.point(xt,i),r.point(xt,0),r.point(xt,-i),r.point(0,-i),r.point(-xt,-i),r.point(-xt,0),r.point(-xt,i);else if($t(e[0]-t[0])>At){var s=e[0]<t[0]?xt:-xt;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function wE(e){var t=Rt(e),n=6*qt,r=t>0,i=$t(t)>At;function s(u,d,h,f){gE(f,e,n,h,u,d)}function a(u,d){return Rt(u)*Rt(d)>t}function o(u){var d,h,f,p,v;return{lineStart:function(){p=f=!1,v=1},point:function(m,y){var g=[m,y],x,w=a(m,y),_=r?w?0:c(m,y):w?c(m+(m<0?xt:-xt),y):0;if(!d&&(p=f=w)&&u.lineStart(),w!==f&&(x=l(d,g),(!x||ba(d,x)||ba(g,x))&&(g[2]=1)),w!==f)v=0,w?(u.lineStart(),x=l(g,d),u.point(x[0],x[1])):(x=l(d,g),u.point(x[0],x[1],2),u.lineEnd()),d=x;else if(i&&d&&r^w){var S;!(_&h)&&(S=l(g,d,!0))&&(v=0,r?(u.lineStart(),u.point(S[0][0],S[0][1]),u.point(S[1][0],S[1][1]),u.lineEnd()):(u.point(S[1][0],S[1][1]),u.lineEnd(),u.lineStart(),u.point(S[0][0],S[0][1],3)))}w&&(!d||!ba(d,g))&&u.point(g[0],g[1]),d=g,f=w,h=_},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return v|(p&&f)<<1}}}function l(u,d,h){var f=Wr(u),p=Wr(d),v=[1,0,0],m=ya(f,p),y=va(m,m),g=m[0],x=y-g*g;if(!x)return!h&&u;var w=t*y/x,_=-t*g/x,S=ya(v,m),A=xa(v,w),D=xa(m,_);Hl(A,D);var k=S,R=va(A,k),T=va(k,k),H=R*R-T*(va(A,A)-1);if(!(H<0)){var P=We(H),V=xa(k,(-R-P)/T);if(Hl(V,A),V=Vl(V),!h)return V;var E=u[0],L=d[0],$=u[1],U=d[1],B;L<E&&(B=E,E=L,L=B);var X=L-E,Y=$t(X-xt)<At,st=Y||X<At;if(!Y&&U<$&&(B=$,$=U,U=B),st?Y?$+U>0^V[1]<($t(V[0]-E)<At?$:U):$<=V[1]&&V[1]<=U:X>xt^(E<=V[0]&&V[0]<=L)){var nt=xa(k,(-R+P)/T);return Hl(nt,A),[V,Vl(nt)]}}}function c(u,d){var h=r?e:xt-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return cf(a,o,s,r?[0,-e]:[-xt,e-xt])}function SE(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var Ni=1e9,_a=-Ni;function OE(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return $t(c[0]-e)<At?u>0?0:3:$t(c[0]-n)<At?u>0?2:1:$t(c[1]-t)<At?u>0?1:0:u>0?3:2}function o(c,u){return l(c.x,u.x)}function l(c,u){var d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=af(),h,f,p,v,m,y,g,x,w,_,S,A={point:D,lineStart:H,lineEnd:P,polygonStart:R,polygonEnd:T};function D(E,L){i(E,L)&&u.point(E,L)}function k(){for(var E=0,L=0,$=f.length;L<$;++L)for(var U=f[L],B=1,X=U.length,Y=U[0],st,nt,ft=Y[0],_t=Y[1];B<X;++B)st=ft,nt=_t,Y=U[B],ft=Y[0],_t=Y[1],nt<=r?_t>r&&(ft-st)*(r-nt)>(_t-nt)*(e-st)&&++E:_t<=r&&(ft-st)*(r-nt)<(_t-nt)*(e-st)&&--E;return E}function R(){u=d,h=[],f=[],S=!0}function T(){var E=k(),L=S&&E,$=(h=Hh(h)).length;(L||$)&&(c.polygonStart(),L&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),$&&of(h,o,E,s,c),c.polygonEnd()),u=c,h=f=p=null}function H(){A.point=V,f&&f.push(p=[]),_=!0,w=!1,g=x=NaN}function P(){h&&(V(v,m),y&&w&&d.rejoin(),h.push(d.result())),A.point=D,w&&u.lineEnd()}function V(E,L){var $=i(E,L);if(f&&p.push([E,L]),_)v=E,m=L,y=$,_=!1,$&&(u.lineStart(),u.point(E,L));else if($&&w)u.point(E,L);else{var U=[g=Math.max(_a,Math.min(Ni,g)),x=Math.max(_a,Math.min(Ni,x))],B=[E=Math.max(_a,Math.min(Ni,E)),L=Math.max(_a,Math.min(Ni,L))];SE(U,B,e,t,n,r)?(w||(u.lineStart(),u.point(U[0],U[1])),u.point(B[0],B[1]),$||u.lineEnd(),S=!1):$&&(u.lineStart(),u.point(E,L),S=!1)}g=E,x=L,w=$}return A}}const Wl=e=>e;var ql=new rr,Yl=new rr,hf,df,Xl,Zl,Fn={point:Ie,lineStart:Ie,lineEnd:Ie,polygonStart:function(){Fn.lineStart=TE,Fn.lineEnd=CE},polygonEnd:function(){Fn.lineStart=Fn.lineEnd=Fn.point=Ie,ql.add($t(Yl)),Yl=new rr},result:function(){var e=ql/2;return ql=new rr,e}};function TE(){Fn.point=ME}function ME(e,t){Fn.point=ff,hf=Xl=e,df=Zl=t}function ff(e,t){Yl.add(Zl*e-Xl*t),Xl=e,Zl=t}function CE(){ff(hf,df)}const pf=Fn;var qr=1/0,wa=qr,Pi=-qr,Sa=Pi,AE={point:$E,lineStart:Ie,lineEnd:Ie,polygonStart:Ie,polygonEnd:Ie,result:function(){var e=[[qr,wa],[Pi,Sa]];return Pi=Sa=-(wa=qr=1/0),e}};function $E(e,t){e<qr&&(qr=e),e>Pi&&(Pi=e),t<wa&&(wa=t),t>Sa&&(Sa=t)}const Oa=AE;var Kl=0,Ql=0,Ui=0,Ta=0,Ma=0,Yr=0,Jl=0,tc=0,Bi=0,mf,gf,on,ln,qe={point:hr,lineStart:vf,lineEnd:yf,polygonStart:function(){qe.lineStart=kE,qe.lineEnd=DE},polygonEnd:function(){qe.point=hr,qe.lineStart=vf,qe.lineEnd=yf},result:function(){var e=Bi?[Jl/Bi,tc/Bi]:Yr?[Ta/Yr,Ma/Yr]:Ui?[Kl/Ui,Ql/Ui]:[NaN,NaN];return Kl=Ql=Ui=Ta=Ma=Yr=Jl=tc=Bi=0,e}};function hr(e,t){Kl+=e,Ql+=t,++Ui}function vf(){qe.point=LE}function LE(e,t){qe.point=RE,hr(on=e,ln=t)}function RE(e,t){var n=e-on,r=t-ln,i=We(n*n+r*r);Ta+=i*(on+e)/2,Ma+=i*(ln+t)/2,Yr+=i,hr(on=e,ln=t)}function yf(){qe.point=hr}function kE(){qe.point=IE}function DE(){xf(mf,gf)}function IE(e,t){qe.point=xf,hr(mf=on=e,gf=ln=t)}function xf(e,t){var n=e-on,r=t-ln,i=We(n*n+r*r);Ta+=i*(on+e)/2,Ma+=i*(ln+t)/2,Yr+=i,i=ln*e-on*t,Jl+=i*(on+e),tc+=i*(ln+t),Bi+=i*3,hr(on=e,ln=t)}const bf=qe;function Ef(e){this._context=e}Ef.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Te);break}}},result:Ie};var ec=new rr,nc,_f,wf,Vi,Hi,Ca={point:Ie,lineStart:function(){Ca.point=NE},lineEnd:function(){nc&&Sf(_f,wf),Ca.point=Ie},polygonStart:function(){nc=!0},polygonEnd:function(){nc=null},result:function(){var e=+ec;return ec=new rr,e}};function NE(e,t){Ca.point=Sf,_f=Vi=e,wf=Hi=t}function Sf(e,t){Vi-=e,Hi-=t,ec.add(We(Vi*Vi+Hi*Hi)),Vi=e,Hi=t}const Of=Ca;let Tf,Aa,Mf,Cf;class Af{constructor(t){this._append=t==null?$f:PE(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,n){switch(this._point){case 0:{this._append`M${t},${n}`,this._point=1;break}case 1:{this._append`L${t},${n}`;break}default:{if(this._append`M${t},${n}`,this._radius!==Mf||this._append!==Aa){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`,Mf=r,Aa=this._append,Cf=this._,this._=i}this._+=Cf;break}}}result(){const t=this._;return this._="",t.length?t:null}}function $f(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function PE(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return $f;if(t!==Tf){const n=10**t;Tf=t,Aa=function(i){let s=1;this._+=i[0];for(const a=i.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+i[s]}}return Aa}function UE(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),jr(o,i(s))),s.result()}return a.area=function(o){return jr(o,i(pf)),pf.result()},a.measure=function(o){return jr(o,i(Of)),Of.result()},a.bounds=function(o){return jr(o,i(Oa)),Oa.result()},a.centroid=function(o){return jr(o,i(bf)),bf.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,Wl):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new Af(n)):new Ef(t=o),typeof r!="function"&&s.pointRadius(r),a):t},a.pointRadius=function(o){return arguments.length?(r=typeof o=="function"?o:(s.pointRadius(+o),+o),a):r},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const l=Math.floor(o);if(!(l>=0))throw new RangeError(`invalid digits: ${o}`);n=l}return t===null&&(s=new Af(n)),a},a.projection(e).digits(n).context(t)}function rc(e){return function(t){var n=new ic;for(var r in e)n[r]=e[r];return n.stream=t,n}}function ic(){}ic.prototype={constructor:ic,point:function(e,t){this.stream.point(e,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 sc(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),jr(n,e.stream(Oa)),t(Oa.result()),r!=null&&e.clipExtent(r),e}function Lf(e,t,n){return sc(e,function(r){var i=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),s/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,l=+t[0][1]+(s-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,l])},n)}function BE(e,t,n){return Lf(e,[[0,0],t],n)}function VE(e,t,n){return sc(e,function(r){var i=+t,s=i/(r[1][0]-r[0][0]),a=(i-s*(r[1][0]+r[0][0]))/2,o=-s*r[0][1];e.scale(150*s).translate([a,o])},n)}function HE(e,t,n){return sc(e,function(r){var i=+t,s=i/(r[1][1]-r[0][1]),a=-s*r[0][0],o=(i-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Rf=16,FE=Rt(30*qt);function kf(e,t){return+t?GE(e,t):zE(e)}function zE(e){return rc({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function GE(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,v,m){var y=c-r,g=u-i,x=y*y+g*g;if(x>4*t&&v--){var w=a+h,_=o+f,S=l+p,A=We(w*w+_*_+S*S),D=_n(S/=A),k=$t($t(S)-1)<At||$t(s-d)<At?(s+d)/2:ur(_,w),R=e(k,D),T=R[0],H=R[1],P=T-r,V=H-i,E=g*P-y*V;(E*E/x>t||$t((y*P+g*V)/x-.5)>.3||a*h+o*f+l*p<FE)&&(n(r,i,s,a,o,l,T,H,k,w/=A,_/=A,S,v,m),m.point(T,H),n(T,H,k,w,_,S,c,u,d,h,f,p,v,m))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,v,m={point:y,lineStart:g,lineEnd:w,polygonStart:function(){r.polygonStart(),m.lineStart=_},polygonEnd:function(){r.polygonEnd(),m.lineStart=g}};function y(D,k){D=e(D,k),r.point(D[0],D[1])}function g(){d=NaN,m.point=x,r.lineStart()}function x(D,k){var R=Wr([D,k]),T=e(D,k);n(d,h,u,f,p,v,d=T[0],h=T[1],u=D,f=R[0],p=R[1],v=R[2],Rf,r),r.point(d,h)}function w(){m.point=y,r.lineEnd()}function _(){g(),m.point=S,m.lineEnd=A}function S(D,k){x(i=D,k),s=d,a=h,o=f,l=p,c=v,m.point=x}function A(){n(d,h,u,f,p,v,s,a,i,o,l,c,Rf,r),m.lineEnd=w,w()}return m}}var jE=rc({point:function(e,t){this.stream.point(e*qt,t*qt)}});function WE(e){return rc({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function qE(e,t,n,r,i){function s(a,o){return a*=r,o*=i,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*r,(n-o)/e*i]},s}function Df(e,t,n,r,i,s){if(!s)return qE(e,t,n,r,i);var a=Rt(s),o=Mt(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(v,m){return v*=r,m*=i,[l*v-c*m+t,n-c*v-l*m]}return p.invert=function(v,m){return[r*(u*v-d*m+h),i*(f-d*v-u*m)]},p}function $a(e){return If(function(){return e})()}function If(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,v=uf,m=null,y,g,x,w=Wl,_=.5,S,A,D,k,R;function T(E){return D(E[0]*qt,E[1]*qt)}function H(E){return E=D.invert(E[0],E[1]),E&&[E[0]*fe,E[1]*fe]}T.stream=function(E){return k&&R===E?k:k=jE(WE(u)(v(S(w(R=E)))))},T.preclip=function(E){return arguments.length?(v=E,p=void 0,V()):v},T.postclip=function(E){return arguments.length?(w=E,m=y=g=x=null,V()):w},T.clipAngle=function(E){return arguments.length?(v=+E?wE(p=E*qt):(p=null,uf),V()):p*fe},T.clipExtent=function(E){return arguments.length?(w=E==null?(m=y=g=x=null,Wl):OE(m=+E[0][0],y=+E[0][1],g=+E[1][0],x=+E[1][1]),V()):m==null?null:[[m,y],[g,x]]},T.scale=function(E){return arguments.length?(n=+E,P()):n},T.translate=function(E){return arguments.length?(r=+E[0],i=+E[1],P()):[r,i]},T.center=function(E){return arguments.length?(s=E[0]%360*qt,a=E[1]%360*qt,P()):[s*fe,a*fe]},T.rotate=function(E){return arguments.length?(o=E[0]%360*qt,l=E[1]%360*qt,c=E.length>2?E[2]%360*qt:0,P()):[o*fe,l*fe,c*fe]},T.angle=function(E){return arguments.length?(d=E%360*qt,P()):d*fe},T.reflectX=function(E){return arguments.length?(h=E?-1:1,P()):h<0},T.reflectY=function(E){return arguments.length?(f=E?-1:1,P()):f<0},T.precision=function(E){return arguments.length?(S=kf(A,_=E*E),V()):We(_)},T.fitExtent=function(E,L){return Lf(T,E,L)},T.fitSize=function(E,L){return BE(T,E,L)},T.fitWidth=function(E,L){return VE(T,E,L)},T.fitHeight=function(E,L){return HE(T,E,L)};function P(){var E=Df(n,0,0,h,f,d).apply(null,t(s,a)),L=Df(n,r-E[0],i-E[1],h,f,d);return u=tf(o,l,c),A=zl(t,L),D=zl(u,A),S=kf(A,_),V()}function V(){return k=R=null,T}return function(){return t=e.apply(this,arguments),T.invert=t.invert&&H,P()}}function Nf(e){var t=0,n=xt/3,r=If(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*qt,n=s[1]*qt):[t*fe,n*fe]},i}function YE(e){var t=Rt(e);function n(r,i){return[r*t,Mt(i)/t]}return n.invert=function(r,i){return[r/t,_n(i*t)]},n}function XE(e,t){var n=Mt(e),r=(n+Mt(t))/2;if($t(r)<At)return YE(e);var i=1+n*(2*r-n),s=We(i)/r;function a(o,l){var c=We(i-2*r*Mt(l))/r;return[c*Mt(o*=r),s-c*Rt(o)]}return a.invert=function(o,l){var c=s-l,u=ur(o,$t(c))*Hn(c);return c*r<0&&(u-=xt*Hn(o)*Hn(c)),[u/r,_n((i-(o*o+c*c)*r*r)/(2*r))]},a}function Pf(){return Nf(XE).scale(155.424).center([0,33.6442])}function ZE(){return Pf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ac(e,t){return[e,dE(fE((ye+t)/2))]}ac.invert=function(e,t){return[e,2*Zd(hE(t))-ye]};function KE(){return QE(ac).scale(961/Te)}function QE(e){var t=$a(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=xt*r(),h=t(mE(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===ac?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function La(e,t){return[e,t]}La.invert=La;function JE(){return $a(La).scale(152.63)}function t_(e,t){var n=Rt(e),r=e===t?Mt(e):(n-Rt(t))/(t-e),i=n/r+e;if($t(r)<At)return La;function s(a,o){var l=i-o,c=r*a;return[l*Mt(c),i-l*Rt(c)]}return s.invert=function(a,o){var l=i-o,c=ur(a,$t(l))*Hn(l);return l*r<0&&(c-=xt*Hn(a)*Hn(l)),[c/r,i-Hn(r)*We(a*a+l*l)]},s}function e_(){return Nf(t_).scale(131.154).center([0,13.9389])}var Fi=1.340264,zi=-.081106,Gi=893e-6,ji=.003796,Ra=We(3)/2,n_=12;function Uf(e,t){var n=_n(Ra*Mt(t)),r=n*n,i=r*r*r;return[e*Rt(n)/(Ra*(Fi+3*zi*r+i*(7*Gi+9*ji*r))),n*(Fi+zi*r+i*(Gi+ji*r))]}Uf.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<n_&&(o=n*(Fi+zi*r+i*(Gi+ji*r))-t,l=Fi+3*zi*r+i*(7*Gi+9*ji*r),n-=a=o/l,r=n*n,i=r*r*r,!($t(a)<Yd));++s);return[Ra*e*(Fi+3*zi*r+i*(7*Gi+9*ji*r))/Rt(n),_n(Mt(n)/Ra)]};function r_(){return $a(Uf).scale(177.158)}function Bf(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),t*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}Bf.invert=function(e,t){var n=t,r=25,i;do{var s=n*n,a=s*s;n-=i=(n*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-t)/(1.007226+s*(.015085*3+a*(-.044475*7+.028874*9*s-.005916*11*a)))}while($t(i)>At&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function i_(){return $a(Bf).scale(175.295)}function s_(e,t){return e.parent===t.parent?1:2}function a_(e){return e.reduce(o_,0)/e.length}function o_(e,t){return e+t.x}function l_(e){return 1+e.reduce(c_,0)}function c_(e,t){return Math.max(e,t.y)}function u_(e){for(var t;t=e.children;)e=t[0];return e}function h_(e){for(var t;t=e.children;)e=t[t.length-1];return e}function d_(){var e=s_,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=a_(f),h.y=l_(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=u_(s),c=h_(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function f_(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function p_(){return this.eachAfter(f_)}function m_(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function g_(e,t){for(var n=this,r=[n],i,s,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(s=i.length-1;s>=0;--s)r.push(i[s]);return this}function v_(e,t){for(var n=this,r=[n],i=[],s,a,o,l=-1;n=r.pop();)if(i.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)r.push(s[a]);for(;n=i.pop();)e.call(t,n,++l,this);return this}function y_(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function x_(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function b_(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function E_(e){for(var t=this,n=__(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function __(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function w_(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function S_(){return Array.from(this)}function O_(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function T_(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*M_(){var e=this,t,n=[e],r,i,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,s=r.length;i<s;++i)n.push(r[i]);while(n.length)}function Wi(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=$_)):t===void 0&&(t=A_);for(var n=new qi(e),r,i=[n],s,a,o,l;r=i.pop();)if((a=t(r.data))&&(l=(a=Array.from(a)).length))for(r.children=a,o=l-1;o>=0;--o)i.push(s=a[o]=new qi(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(R_)}function C_(){return Wi(this).eachBefore(L_)}function A_(e){return e.children}function $_(e){return Array.isArray(e)?e[1]:null}function L_(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function R_(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function qi(e){this.data=e,this.depth=this.height=0,this.parent=null}qi.prototype=Wi.prototype={constructor:qi,count:p_,each:m_,eachAfter:v_,eachBefore:g_,find:y_,sum:x_,sort:b_,path:E_,ancestors:w_,descendants:S_,leaves:O_,links:T_,copy:C_,[Symbol.iterator]:M_};function k_(e){return e==null?null:Vf(e)}function Vf(e){if(typeof e!="function")throw new Error;return e}function dr(){return 0}function Xr(e){return function(){return e}}const D_=1664525,I_=1013904223,Hf=4294967296;function N_(){let e=1;return()=>(e=(D_*e+I_)%Hf)/Hf}function P_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function U_(e,t){let n=e.length,r,i;for(;n;)i=t()*n--|0,r=e[n],e[n]=e[i],e[i]=r;return e}function B_(e,t){for(var n=0,r=(e=U_(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&Ff(a,s)?++n:(a=H_(i=V_(i,s)),n=0);return a}function V_(e,t){var n,r;if(oc(t,e))return[t];for(n=0;n<e.length;++n)if(ka(t,e[n])&&oc(Yi(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(ka(Yi(e[n],e[r]),t)&&ka(Yi(e[n],t),e[r])&&ka(Yi(e[r],t),e[n])&&oc(zf(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function ka(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function Ff(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function oc(e,t){for(var n=0;n<t.length;++n)if(!Ff(e,t[n]))return!1;return!0}function H_(e){switch(e.length){case 1:return F_(e[0]);case 2:return Yi(e[0],e[1]);case 3:return zf(e[0],e[1],e[2])}}function F_(e){return{x:e.x,y:e.y,r:e.r}}function Yi(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function zf(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,v=i-u,m=l-s,y=d-s,g=r*r+i*i-s*s,x=g-a*a-o*o+l*l,w=g-c*c-u*u+d*d,_=f*p-h*v,S=(p*w-v*x)/(_*2)-r,A=(v*m-p*y)/_,D=(f*x-h*w)/(_*2)-i,k=(h*y-f*m)/_,R=A*A+k*k-1,T=2*(s+S*A+D*k),H=S*S+D*D-s*s,P=-(Math.abs(R)>1e-6?(T+Math.sqrt(T*T-4*R*H))/(2*R):H/T);return{x:r+S+A*P,y:i+D+k*P,r:P}}function Gf(e,t,n){var r=e.x-t.x,i,s,a=e.y-t.y,o,l,c=r*r+a*a;c?(s=t.r+n.r,s*=s,l=e.r+n.r,l*=l,s>l?(i=(c+l-s)/(2*c),o=Math.sqrt(Math.max(0,l/c-i*i)),n.x=e.x-i*r-o*a,n.y=e.y-i*a+o*r):(i=(c+s-l)/(2*c),o=Math.sqrt(Math.max(0,s/c-i*i)),n.x=t.x+i*r-o*a,n.y=t.y+i*a+o*r)):(n.x=t.x+n.r,n.y=t.y)}function jf(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Wf(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,s=(t.y*n.r+n.y*t.r)/r;return i*i+s*s}function Da(e){this._=e,this.next=null,this.previous=null}function z_(e,t){if(!(s=(e=P_(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;Gf(r,n,i=e[2]),n=new Da(n),r=new Da(r),i=new Da(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){Gf(n._,r._,i=e[l]),i=new Da(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(jf(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(jf(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Wf(n);(i=i.next)!==r;)(o=Wf(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=B_(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function G_(e){return Math.sqrt(e.value)}function j_(){var e=null,t=1,n=1,r=dr;function i(s){const a=N_();return s.x=t/2,s.y=n/2,e?s.eachBefore(qf(e)).eachAfter(lc(r,.5,a)).eachBefore(Yf(1)):s.eachBefore(qf(G_)).eachAfter(lc(dr,1,a)).eachAfter(lc(r,s.r/Math.min(t,n),a)).eachBefore(Yf(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=k_(s),i):e},i.size=function(s){return arguments.length?(t=+s[0],n=+s[1],i):[t,n]},i.padding=function(s){return arguments.length?(r=typeof s=="function"?s:Xr(+s),i):r},i}function qf(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function lc(e,t,n){return function(r){if(i=r.children){var i,s,a=i.length,o=e(r)*t||0,l;if(o)for(s=0;s<a;++s)i[s].r+=o;if(l=z_(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function Yf(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function W_(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function q_(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(r-t)/e.value;++o<l;)a=s[o],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function Y_(e,t){return e.parent===t.parent?1:2}function cc(e){var t=e.children;return t?t[0]:e.t}function uc(e){var t=e.children;return t?t[t.length-1]:e.t}function X_(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function Z_(e){for(var t=0,n=0,r=e.children,i=r.length,s;--i>=0;)s=r[i],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function K_(e,t,n){return e.a.parent===t.parent?e.a:n}function Ia(e,t){this._=e,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=t}Ia.prototype=Object.create(qi.prototype);function Q_(e){for(var t=new Ia(e,0),n,r=[t],i,s,a,o;n=r.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)r.push(i=n.children[a]=new Ia(s[a],a)),i.parent=n;return(t.parent=new Ia(null,0)).children=[t],t}function J_(){var e=Y_,t=1,n=1,r=null;function i(c){var u=Q_(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(g){g.x<d.x&&(d=g),g.x>h.x&&(h=g),g.depth>f.depth&&(f=g)});var p=d===h?1:e(d,h)/2,v=p-d.x,m=t/(h.x+p+v),y=n/(f.depth||1);c.eachBefore(function(g){g.x=(g.x+v)*m,g.y=g.depth*y})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){Z_(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,v=h.parent.children[0],m=h.m,y=f.m,g=p.m,x=v.m,w;p=uc(p),h=cc(h),p&&h;)v=cc(v),f=uc(f),f.a=c,w=p.z+g-h.z-m+e(p._,h._),w>0&&(X_(K_(p,c,d),c,w),m+=w,y+=w),g+=p.m,m+=h.m,x+=v.m,y+=f.m;p&&!uc(f)&&(f.t=p,f.m+=g-y),h&&!cc(v)&&(v.t=h,v.m+=m-x,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function tw(e,t,n,r,i){for(var s=e.children,a,o=-1,l=s.length,c=e.value&&(i-n)/e.value;++o<l;)a=s[o],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var ew=(1+Math.sqrt(5))/2;function nw(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,v=t.value,m,y,g,x,w,_,S;u<h;){f=i-n,p=s-r;do m=o[d++].value;while(!m&&d<h);for(y=g=m,_=Math.max(p/f,f/p)/(v*e),S=m*m*_,w=Math.max(g/S,S/y);d<h;++d){if(m+=c=o[d].value,c<y&&(y=c),c>g&&(g=c),S=m*m*_,x=Math.max(g/S,S/y),x>w){m-=c;break}w=x}a.push(l={value:m,dice:f<p,children:o.slice(u,d)}),l.dice?q_(l,n,r,i,v?r+=p*m/v:s):tw(l,n,r,v?n+=f*m/v:i,s),v-=m,u=d}return a}const rw=function e(t){function n(r,i,s,a,o){nw(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(ew);function iw(){var e=rw,t=!1,n=1,r=1,i=[0],s=dr,a=dr,o=dr,l=dr,c=dr;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(W_),h}function d(h){var f=i[h.depth],p=h.x0+f,v=h.y0+f,m=h.x1-f,y=h.y1-f;m<p&&(p=m=(p+m)/2),y<v&&(v=y=(v+y)/2),h.x0=p,h.y0=v,h.x1=m,h.y1=y,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,v+=a(h)-f,m-=o(h)-f,y-=l(h)-f,m<p&&(p=m=(p+m)/2),y<v&&(v=y=(v+y)/2),e(h,p,v,m,y))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=Vf(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Xr(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:Xr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:Xr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:Xr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:Xr(+h),u):c},u}function Zr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Xf=Symbol("implicit");function Na(){var e=new Ph,t=[],n=[],r=Xf;function i(s){let a=e.get(s);if(a===void 0){if(r!==Xf)return r;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return i.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Ph;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(s){return arguments.length?(n=Array.from(s),i):n.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.copy=function(){return Na(t,n).unknown(r)},Zr.apply(i,arguments),i}function Xi(){var e=Na().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,v=f?r:i;s=(v-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(v-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var m=fy(h).map(function(y){return p+s*y});return n(f?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Xi(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Zr.apply(d(),arguments)}function sw(e){return function(){return e}}function aw(e){return+e}var Zf=[0,1];function Kr(e){return e}function hc(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sw(isNaN(t)?NaN:.5)}function ow(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function lw(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=hc(i,r),s=n(a,s)):(r=hc(r,i),s=n(s,a)),function(o){return s(r(o))}}function cw(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),s=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=hc(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var l=nl(e,o,1,r)-1;return s[l](i[l](o))}}function dc(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Kf(){var e=Zf,t=Zf,n=$i,r,i,s,a=Kr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Kr&&(a=ow(e[0],e[h-1])),o=h>2?cw:lw,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),Oe)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,aw),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=gd,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Kr,u()):a!==Kr},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function Qf(){return Kf()(Kr,Kr)}function uw(e,t,n,r){var i=il(e,t,n),s;switch(r=Ii(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=cE(i,a))&&(r.precision=s),qd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=uE(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=lE(i))&&(r.precision=s-(r.type==="%")*2);break}}return Ul(r)}function Jf(e){var t=e.domain;return e.ticks=function(n){var r=t();return Ws(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return uw(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,s=r.length-1,a=r[i],o=r[s],l,c,u=10;for(o<a&&(c=a,a=o,o=c,c=i,i=s,s=c);u-- >0;){if(c=Ur(a,o,n),c===l)return r[i]=a,r[s]=o,t(r);if(c>0)a=Math.floor(a/c)*c,o=Math.ceil(o/c)*c;else if(c<0)a=Math.ceil(a*c)/c,o=Math.floor(o*c)/c;else break;l=c}return e},e}function Ye(){var e=Qf();return e.copy=function(){return dc(e,Ye())},Zr.apply(e,arguments),Jf(e)}function tp(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],s=e[r],a;return s<i&&(a=n,n=r,r=a,a=i,i=s,s=a),e[n]=t.floor(i),e[r]=t.ceil(s),e}function ep(e){return Math.log(e)}function np(e){return Math.exp(e)}function hw(e){return-Math.log(-e)}function dw(e){return-Math.exp(-e)}function fw(e){return isFinite(e)?+("1e"+e):e<0?0:e}function pw(e){return e===10?fw:e===Math.E?Math.exp:t=>Math.pow(e,t)}function mw(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function rp(e){return(t,n)=>-e(-t,n)}function gw(e){const t=e(ep,np),n=t.domain;let r=10,i,s;function a(){return i=mw(r),s=pw(r),n()[0]<0?(i=rp(i),s=rp(s),e(hw,dw)):e(ep,np),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,v;const m=o==null?10:+o;let y=[];if(!(r%1)&&f-h<m){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(v=h<0?p/s(-h):p*s(h),!(v<c)){if(v>u)break;y.push(v)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(v=h>0?p/s(-h):p*s(h),!(v<c)){if(v>u)break;y.push(v)}y.length*2<m&&(y=Ws(c,u,m))}else y=Ws(h,f,Math.min(f-h,m)).map(s);return d?y.reverse():y},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ii(l)).precision==null&&(l.trim=!0),l=Ul(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(tp(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function ip(){const e=gw(Kf()).domain([1,10]);return e.copy=()=>dc(e,ip()).base(e.base()),Zr.apply(e,arguments),e}function fc(){var e=0,t=1,n=1,r=[.5],i=[0,1],s;function a(l){return l!=null&&l<=l?i[nl(r,l,0,n)]:s}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(s=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return fc().domain([e,t]).range(i).unknown(s)},Zr.apply(Jf(a),arguments)}const pc=new Date,mc=new Date;function te(e,t,n,r){function i(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return i.floor=s=>(e(s=new Date(+s)),s),i.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),i.round=s=>{const a=i(s),o=i.ceil(s);return s-a<o-s?a:o},i.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,o)=>{const l=[];if(s=i.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let c;do l.push(c=new Date(+s)),t(s,o),e(s);while(c<s&&s<a);return l},i.filter=s=>te(a=>{if(a>=a)for(;e(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;t(a,-1),!s(a););else for(;--o>=0;)for(;t(a,1),!s(a););}),n&&(i.count=(s,a)=>(pc.setTime(+s),mc.setTime(+a),e(pc),e(mc),Math.floor(n(pc,mc))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Pa=te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Pa.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?te(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Pa),Pa.range;const wn=1e3,Ne=wn*60,Sn=Ne*60,On=Sn*24,gc=On*7,sp=On*30,vc=On*365,Qr=te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCSeconds());Qr.range;const yc=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wn)},(e,t)=>{e.setTime(+e+t*Ne)},(e,t)=>(t-e)/Ne,e=>e.getMinutes());yc.range,te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ne)},(e,t)=>(t-e)/Ne,e=>e.getUTCMinutes()).range;const xc=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wn-e.getMinutes()*Ne)},(e,t)=>{e.setTime(+e+t*Sn)},(e,t)=>(t-e)/Sn,e=>e.getHours());xc.range,te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Sn)},(e,t)=>(t-e)/Sn,e=>e.getUTCHours()).range;const Zi=te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ne)/On,e=>e.getDate()-1);Zi.range;const bc=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/On,e=>e.getUTCDate()-1);bc.range,te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/On,e=>Math.floor(e/On)).range;function fr(e){return te(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())*Ne)/gc)}const Ua=fr(0),Ba=fr(1),vw=fr(2),yw=fr(3),Jr=fr(4),xw=fr(5),bw=fr(6);Ua.range,Ba.range,vw.range,yw.range,Jr.range,xw.range,bw.range;function pr(e){return te(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)/gc)}const ap=pr(0),Va=pr(1),Ew=pr(2),_w=pr(3),ti=pr(4),ww=pr(5),Sw=pr(6);ap.range,Va.range,Ew.range,_w.range,ti.range,ww.range,Sw.range;const Ec=te(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());Ec.range,te(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()).range;const Tn=te(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());Tn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(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)}),Tn.range;const mr=te(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());mr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(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)}),mr.range;function Ow(e,t,n,r,i,s){const a=[[Qr,1,wn],[Qr,5,5*wn],[Qr,15,15*wn],[Qr,30,30*wn],[s,1,Ne],[s,5,5*Ne],[s,15,15*Ne],[s,30,30*Ne],[i,1,Sn],[i,3,3*Sn],[i,6,6*Sn],[i,12,12*Sn],[r,1,On],[r,2,2*On],[n,1,gc],[t,1,sp],[t,3,3*sp],[e,1,vc]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=el(([,,m])=>m).right(a,h);if(f===a.length)return e.every(il(c/vc,u/vc,d));if(f===0)return Pa.every(Math.max(il(c,u,d),1));const[p,v]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(v)}return[o,l]}const[Tw,Mw]=Ow(Tn,Ec,Ua,Zi,xc,yc);function _c(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function wc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ki(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Cw(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,s=e.days,a=e.shortDays,o=e.months,l=e.shortMonths,c=Qi(i),u=Ji(i),d=Qi(s),h=Ji(s),f=Qi(a),p=Ji(a),v=Qi(o),m=Ji(o),y=Qi(l),g=Ji(l),x={a:$,A:U,b:B,B:X,c:null,d:dp,e:dp,f:Kw,g:oS,G:cS,H:Yw,I:Xw,j:Zw,L:fp,m:Qw,M:Jw,p:Y,q:st,Q:xp,s:bp,S:tS,u:eS,U:nS,V:rS,w:iS,W:sS,x:null,X:null,y:aS,Y:lS,Z:uS,"%":yp},w={a:nt,A:ft,b:_t,B:K,c:null,d:mp,e:mp,f:pS,g:SS,G:TS,H:hS,I:dS,j:fS,L:gp,m:mS,M:gS,p:et,q:gt,Q:xp,s:bp,S:vS,u:yS,U:xS,V:bS,w:ES,W:_S,x:null,X:null,y:wS,Y:OS,Z:MS,"%":yp},_={a:R,A:T,b:H,B:P,c:V,d:up,e:up,f:Gw,g:cp,G:lp,H:hp,I:hp,j:Vw,L:zw,m:Bw,M:Hw,p:k,q:Uw,Q:Ww,s:qw,S:Fw,u:kw,U:Dw,V:Iw,w:Rw,W:Nw,x:E,X:L,y:cp,Y:lp,Z:Pw,"%":jw};x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),w.x=S(n,w),w.X=S(r,w),w.c=S(t,w);function S(q,Q){return function(ot){var G=[],kt=-1,yt=0,Ht=q.length,Ft,it,Dt;for(ot instanceof Date||(ot=new Date(+ot));++kt<Ht;)q.charCodeAt(kt)===37&&(G.push(q.slice(yt,kt)),(it=op[Ft=q.charAt(++kt)])!=null?Ft=q.charAt(++kt):it=Ft==="e"?" ":"0",(Dt=Q[Ft])&&(Ft=Dt(ot,it)),G.push(Ft),yt=kt+1);return G.push(q.slice(yt,kt)),G.join("")}}function A(q,Q){return function(ot){var G=Ki(1900,void 0,1),kt=D(G,q,ot+="",0),yt,Ht;if(kt!=ot.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(Q&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(yt=wc(Ki(G.y,0,1)),Ht=yt.getUTCDay(),yt=Ht>4||Ht===0?Va.ceil(yt):Va(yt),yt=bc.offset(yt,(G.V-1)*7),G.y=yt.getUTCFullYear(),G.m=yt.getUTCMonth(),G.d=yt.getUTCDate()+(G.w+6)%7):(yt=_c(Ki(G.y,0,1)),Ht=yt.getDay(),yt=Ht>4||Ht===0?Ba.ceil(yt):Ba(yt),yt=Zi.offset(yt,(G.V-1)*7),G.y=yt.getFullYear(),G.m=yt.getMonth(),G.d=yt.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),Ht="Z"in G?wc(Ki(G.y,0,1)).getUTCDay():_c(Ki(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(Ht+5)%7:G.w+G.U*7-(Ht+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,wc(G)):_c(G)}}function D(q,Q,ot,G){for(var kt=0,yt=Q.length,Ht=ot.length,Ft,it;kt<yt;){if(G>=Ht)return-1;if(Ft=Q.charCodeAt(kt++),Ft===37){if(Ft=Q.charAt(kt++),it=_[Ft in op?Q.charAt(kt++):Ft],!it||(G=it(q,ot,G))<0)return-1}else if(Ft!=ot.charCodeAt(G++))return-1}return G}function k(q,Q,ot){var G=c.exec(Q.slice(ot));return G?(q.p=u.get(G[0].toLowerCase()),ot+G[0].length):-1}function R(q,Q,ot){var G=f.exec(Q.slice(ot));return G?(q.w=p.get(G[0].toLowerCase()),ot+G[0].length):-1}function T(q,Q,ot){var G=d.exec(Q.slice(ot));return G?(q.w=h.get(G[0].toLowerCase()),ot+G[0].length):-1}function H(q,Q,ot){var G=y.exec(Q.slice(ot));return G?(q.m=g.get(G[0].toLowerCase()),ot+G[0].length):-1}function P(q,Q,ot){var G=v.exec(Q.slice(ot));return G?(q.m=m.get(G[0].toLowerCase()),ot+G[0].length):-1}function V(q,Q,ot){return D(q,t,Q,ot)}function E(q,Q,ot){return D(q,n,Q,ot)}function L(q,Q,ot){return D(q,r,Q,ot)}function $(q){return a[q.getDay()]}function U(q){return s[q.getDay()]}function B(q){return l[q.getMonth()]}function X(q){return o[q.getMonth()]}function Y(q){return i[+(q.getHours()>=12)]}function st(q){return 1+~~(q.getMonth()/3)}function nt(q){return a[q.getUTCDay()]}function ft(q){return s[q.getUTCDay()]}function _t(q){return l[q.getUTCMonth()]}function K(q){return o[q.getUTCMonth()]}function et(q){return i[+(q.getUTCHours()>=12)]}function gt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var Q=S(q+="",x);return Q.toString=function(){return q},Q},parse:function(q){var Q=A(q+="",!1);return Q.toString=function(){return q},Q},utcFormat:function(q){var Q=S(q+="",w);return Q.toString=function(){return q},Q},utcParse:function(q){var Q=A(q+="",!0);return Q.toString=function(){return q},Q}}}var op={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,Aw=/^%/,$w=/[\\^$*+?|[\]().{}]/g;function Ot(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(t)+i:i)}function Lw(e){return e.replace($w,"\\$&")}function Qi(e){return new RegExp("^(?:"+e.map(Lw).join("|")+")","i")}function Ji(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Rw(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kw(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Dw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Iw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function lp(e,t,n){var r=ne.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function cp(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Pw(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Uw(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Bw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function up(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Vw(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function hp(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Hw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Fw(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zw(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Gw(e,t,n){var r=ne.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jw(e,t,n){var r=Aw.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ww(e,t,n){var r=ne.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function qw(e,t,n){var r=ne.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function dp(e,t){return Ot(e.getDate(),t,2)}function Yw(e,t){return Ot(e.getHours(),t,2)}function Xw(e,t){return Ot(e.getHours()%12||12,t,2)}function Zw(e,t){return Ot(1+Zi.count(Tn(e),e),t,3)}function fp(e,t){return Ot(e.getMilliseconds(),t,3)}function Kw(e,t){return fp(e,t)+"000"}function Qw(e,t){return Ot(e.getMonth()+1,t,2)}function Jw(e,t){return Ot(e.getMinutes(),t,2)}function tS(e,t){return Ot(e.getSeconds(),t,2)}function eS(e){var t=e.getDay();return t===0?7:t}function nS(e,t){return Ot(Ua.count(Tn(e)-1,e),t,2)}function pp(e){var t=e.getDay();return t>=4||t===0?Jr(e):Jr.ceil(e)}function rS(e,t){return e=pp(e),Ot(Jr.count(Tn(e),e)+(Tn(e).getDay()===4),t,2)}function iS(e){return e.getDay()}function sS(e,t){return Ot(Ba.count(Tn(e)-1,e),t,2)}function aS(e,t){return Ot(e.getFullYear()%100,t,2)}function oS(e,t){return e=pp(e),Ot(e.getFullYear()%100,t,2)}function lS(e,t){return Ot(e.getFullYear()%1e4,t,4)}function cS(e,t){var n=e.getDay();return e=n>=4||n===0?Jr(e):Jr.ceil(e),Ot(e.getFullYear()%1e4,t,4)}function uS(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ot(t/60|0,"0",2)+Ot(t%60,"0",2)}function mp(e,t){return Ot(e.getUTCDate(),t,2)}function hS(e,t){return Ot(e.getUTCHours(),t,2)}function dS(e,t){return Ot(e.getUTCHours()%12||12,t,2)}function fS(e,t){return Ot(1+bc.count(mr(e),e),t,3)}function gp(e,t){return Ot(e.getUTCMilliseconds(),t,3)}function pS(e,t){return gp(e,t)+"000"}function mS(e,t){return Ot(e.getUTCMonth()+1,t,2)}function gS(e,t){return Ot(e.getUTCMinutes(),t,2)}function vS(e,t){return Ot(e.getUTCSeconds(),t,2)}function yS(e){var t=e.getUTCDay();return t===0?7:t}function xS(e,t){return Ot(ap.count(mr(e)-1,e),t,2)}function vp(e){var t=e.getUTCDay();return t>=4||t===0?ti(e):ti.ceil(e)}function bS(e,t){return e=vp(e),Ot(ti.count(mr(e),e)+(mr(e).getUTCDay()===4),t,2)}function ES(e){return e.getUTCDay()}function _S(e,t){return Ot(Va.count(mr(e)-1,e),t,2)}function wS(e,t){return Ot(e.getUTCFullYear()%100,t,2)}function SS(e,t){return e=vp(e),Ot(e.getUTCFullYear()%100,t,2)}function OS(e,t){return Ot(e.getUTCFullYear()%1e4,t,4)}function TS(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ti(e):ti.ceil(e),Ot(e.getUTCFullYear()%1e4,t,4)}function MS(){return"+0000"}function yp(){return"%"}function xp(e){return+e}function bp(e){return Math.floor(+e/1e3)}var ei,Ep;CS({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 CS(e){return ei=Cw(e),Ep=ei.format,ei.parse,ei.utcFormat,ei.utcParse,ei}function AS(e){return new Date(e)}function $S(e){return e instanceof Date?+e:+new Date(+e)}function _p(e,t,n,r,i,s,a,o,l,c){var u=Qf(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),v=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),g=c("%b %d"),x=c("%B"),w=c("%Y");function _(S){return(l(S)<S?f:o(S)<S?p:a(S)<S?v:s(S)<S?m:r(S)<S?i(S)<S?y:g:n(S)<S?x:w)(S)}return u.invert=function(S){return new Date(d(S))},u.domain=function(S){return arguments.length?h(Array.from(S,$S)):h().map(AS)},u.ticks=function(S){var A=h();return e(A[0],A[A.length-1],S??10)},u.tickFormat=function(S,A){return A==null?_:c(A)},u.nice=function(S){var A=h();return(!S||typeof S.range!="function")&&(S=t(A[0],A[A.length-1],S??10)),S?h(tp(A,S)):u},u.copy=function(){return dc(u,_p(e,t,n,r,i,s,a,o,l,c))},u}function wp(){return Zr.apply(_p(Tw,Mw,Tn,Ec,Ua,Zi,xc,yc,Qr,Ep).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mt(e){return function(){return e}}const Sp=Math.abs,ce=Math.atan2,gr=Math.cos,LS=Math.max,Sc=Math.min,cn=Math.sin,ni=Math.sqrt,ue=1e-12,ts=Math.PI,Ha=ts/2,Fa=2*ts;function RS(e){return e>1?0:e<-1?ts:Math.acos(e)}function Op(e){return e>=1?Ha:e<=-1?-Ha:Math.asin(e)}function za(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Nl(t)}function kS(e){return e.innerRadius}function DS(e){return e.outerRadius}function IS(e){return e.startAngle}function NS(e){return e.endAngle}function PS(e){return e&&e.padAngle}function US(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<ue))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Ga(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/ni(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,v=r+d,m=(h+p)/2,y=(f+v)/2,g=p-h,x=v-f,w=g*g+x*x,_=i-s,S=h*v-p*f,A=(x<0?-1:1)*ni(LS(0,_*_*w-S*S)),D=(S*x-g*A)/w,k=(-S*g-x*A)/w,R=(S*x+g*A)/w,T=(-S*g+x*A)/w,H=D-m,P=k-y,V=R-m,E=T-y;return H*H+P*P>V*V+E*E&&(D=R,k=T),{cx:D,cy:k,x01:-u,y01:-d,x11:D*(i/_-1),y11:k*(i/_-1)}}function es(){var e=kS,t=DS,n=mt(0),r=null,i=IS,s=NS,a=PS,o=null,l=za(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-Ha,v=s.apply(this,arguments)-Ha,m=Sp(v-p),y=v>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>ue))o.moveTo(0,0);else if(m>Fa-ue)o.moveTo(f*gr(p),f*cn(p)),o.arc(0,0,f,p,v,!y),h>ue&&(o.moveTo(h*gr(v),h*cn(v)),o.arc(0,0,h,v,p,y));else{var g=p,x=v,w=p,_=v,S=m,A=m,D=a.apply(this,arguments)/2,k=D>ue&&(r?+r.apply(this,arguments):ni(h*h+f*f)),R=Sc(Sp(f-h)/2,+n.apply(this,arguments)),T=R,H=R,P,V;if(k>ue){var E=Op(k/h*cn(D)),L=Op(k/f*cn(D));(S-=E*2)>ue?(E*=y?1:-1,w+=E,_-=E):(S=0,w=_=(p+v)/2),(A-=L*2)>ue?(L*=y?1:-1,g+=L,x-=L):(A=0,g=x=(p+v)/2)}var $=f*gr(g),U=f*cn(g),B=h*gr(_),X=h*cn(_);if(R>ue){var Y=f*gr(x),st=f*cn(x),nt=h*gr(w),ft=h*cn(w),_t;if(m<ts)if(_t=US($,U,nt,ft,Y,st,B,X)){var K=$-_t[0],et=U-_t[1],gt=Y-_t[0],q=st-_t[1],Q=1/cn(RS((K*gt+et*q)/(ni(K*K+et*et)*ni(gt*gt+q*q)))/2),ot=ni(_t[0]*_t[0]+_t[1]*_t[1]);T=Sc(R,(h-ot)/(Q-1)),H=Sc(R,(f-ot)/(Q+1))}else T=H=0}A>ue?H>ue?(P=Ga(nt,ft,$,U,f,H,y),V=Ga(Y,st,B,X,f,H,y),o.moveTo(P.cx+P.x01,P.cy+P.y01),H<R?o.arc(P.cx,P.cy,H,ce(P.y01,P.x01),ce(V.y01,V.x01),!y):(o.arc(P.cx,P.cy,H,ce(P.y01,P.x01),ce(P.y11,P.x11),!y),o.arc(0,0,f,ce(P.cy+P.y11,P.cx+P.x11),ce(V.cy+V.y11,V.cx+V.x11),!y),o.arc(V.cx,V.cy,H,ce(V.y11,V.x11),ce(V.y01,V.x01),!y))):(o.moveTo($,U),o.arc(0,0,f,g,x,!y)):o.moveTo($,U),!(h>ue)||!(S>ue)?o.lineTo(B,X):T>ue?(P=Ga(B,X,Y,st,h,-T,y),V=Ga($,U,nt,ft,h,-T,y),o.lineTo(P.cx+P.x01,P.cy+P.y01),T<R?o.arc(P.cx,P.cy,T,ce(P.y01,P.x01),ce(V.y01,V.x01),!y):(o.arc(P.cx,P.cy,T,ce(P.y01,P.x01),ce(P.y11,P.x11),!y),o.arc(0,0,h,ce(P.cy+P.y11,P.cx+P.x11),ce(V.cy+V.y11,V.cx+V.x11),y),o.arc(V.cx,V.cy,T,ce(V.y11,V.x11),ce(V.y01,V.x01),!y))):o.arc(0,0,h,_,w,y)}if(o.closePath(),u)return o=null,u+""||null}return c.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-ts/2;return[gr(d)*u,cn(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:mt(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:mt(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:mt(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:mt(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:mt(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:mt(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:mt(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var BS=Array.prototype.slice;function ja(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tp(e){this._context=e}Tp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Wa(e){return new Tp(e)}function Oc(e){return e[0]}function Tc(e){return e[1]}function ns(e,t){var n=mt(!0),r=null,i=Wa,s=null,a=za(o);e=typeof e=="function"?e:e===void 0?Oc:mt(e),t=typeof t=="function"?t:t===void 0?Tc:mt(t);function o(l){var c,u=(l=ja(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:mt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:mt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:mt(!!l),o):n},o.curve=function(l){return arguments.length?(i=l,r!=null&&(s=i(r)),o):i},o.context=function(l){return arguments.length?(l==null?r=s=null:s=i(r=l),o):r},o}function Mc(e,t,n){var r=null,i=mt(!0),s=null,a=Wa,o=null,l=za(c);e=typeof e=="function"?e:e===void 0?Oc:mt(+e),t=typeof t=="function"?t:mt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Tc:mt(+n);function c(d){var h,f,p,v=(d=ja(d)).length,m,y=!1,g,x=new Array(v),w=new Array(v);for(s==null&&(o=a(g=l())),h=0;h<=v;++h){if(!(h<v&&i(m=d[h],h,d))===y)if(y=!y)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(x[p],w[p]);o.lineEnd(),o.areaEnd()}y&&(x[h]=+e(m,h,d),w[h]=+t(m,h,d),o.point(r?+r(m,h,d):x[h],n?+n(m,h,d):w[h]))}if(g)return o=null,g+""||null}function u(){return ns().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:mt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:mt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:mt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:mt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:mt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:mt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:mt(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function VS(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function HS(e){return e}function FS(){var e=HS,t=VS,n=null,r=mt(0),i=mt(Fa),s=mt(0);function a(o){var l,c=(o=ja(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),v=+r.apply(this,arguments),m=Math.min(Fa,Math.max(-Fa,i.apply(this,arguments)-v)),y,g=Math.min(Math.abs(m)/c,s.apply(this,arguments)),x=g*(m<0?-1:1),w;for(l=0;l<c;++l)(w=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=w);for(t!=null?f.sort(function(_,S){return t(p[_],p[S])}):n!=null&&f.sort(function(_,S){return n(o[_],o[S])}),l=0,d=h?(m-c*x)/h:0;l<c;++l,v=y)u=f[l],w=p[u],y=v+(w>0?w*d:0)+x,p[u]={data:o[u],index:l,value:w,startAngle:v,endAngle:y,padAngle:g};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:mt(+o),a):e},a.sortValues=function(o){return arguments.length?(t=o,n=null,a):t},a.sort=function(o){return arguments.length?(n=o,t=null,a):n},a.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:mt(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:mt(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:mt(+o),a):s},a}var zS=Cp(Wa);function Mp(e){this._curve=e}Mp.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Cp(e){function t(n){return new Mp(e(n))}return t._curve=e,t}function GS(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Cp(n)):t()._curve},e}function jS(){return GS(ns().curve(zS))}class WS{constructor(t,n){this._context=t,this._x=n}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(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:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function qS(e){return new WS(e,!0)}function YS(e){return e.source}function XS(e){return e.target}function ZS(e){let t=YS,n=XS,r=Oc,i=Tc,s=null,a=null,o=za(l);function l(){let c;const u=BS.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:mt(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:mt(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function KS(){return ZS(qS)}function zn(){}function qa(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ya(e){this._context=e}Ya.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:qa(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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:qa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QS(e){return new Ya(e)}function Ap(e){this._context=e}Ap.prototype={areaStart:zn,areaEnd:zn,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:qa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JS(e){return new Ap(e)}function $p(e){this._context=e}$p.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:qa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function tO(e){return new $p(e)}function Lp(e,t){this._basis=new Ya(e),this._beta=t}Lp.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],s=e[n]-r,a=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*s),this._beta*t[o]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const eO=function e(t){function n(r){return t===1?new Ya(r):new Lp(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Xa(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Cc(e,t){this._context=e,this._k=(1-t)/6}Cc.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:Xa(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Xa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const nO=function e(t){function n(r){return new Cc(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ac(e,t){this._context=e,this._k=(1-t)/6}Ac.prototype={areaStart:zn,areaEnd:zn,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Xa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rO=function e(t){function n(r){return new Ac(r,t)}return n.tension=function(r){return e(+r)},n}(0);function $c(e,t){this._context=e,this._k=(1-t)/6}$c.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(e,t){switch(e=+e,t=+t,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:Xa(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const iO=function e(t){function n(r){return new $c(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Lc(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>ue){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ue){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);s=(s*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,s,a,e._x2,e._y2)}function Rp(e,t){this._context=e,this._alpha=t}Rp.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Lc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sO=function e(t){function n(r){return t?new Rp(r,t):new Cc(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function kp(e,t){this._context=e,this._alpha=t}kp.prototype={areaStart:zn,areaEnd:zn,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Lc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const aO=function e(t){function n(r){return t?new kp(r,t):new Ac(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Dp(e,t){this._context=e,this._alpha=t}Dp.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Lc(this,e,t);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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const oO=function e(t){function n(r){return t?new Dp(r,t):new $c(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Ip(e){this._context=e}Ip.prototype={areaStart:zn,areaEnd:zn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Np(e){return new Ip(e)}function Pp(e){return e<0?-1:1}function Up(e,t,n){var r=e._x1-e._x0,i=t-e._x1,s=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),o=(s*i+a*r)/(r+i);return(Pp(s)+Pp(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Bp(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Rc(e,t,n){var r=e._x0,i=e._y0,s=e._x1,a=e._y1,o=(s-r)/3;e._context.bezierCurveTo(r+o,i+o*t,s-o,a-o*n,s,a)}function Za(e){this._context=e}Za.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:Rc(this,this._t0,Bp(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Rc(this,Bp(this,n=Up(this,e,t)),n);break;default:Rc(this,this._t0,n=Up(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Vp(e){this._context=new Hp(e)}(Vp.prototype=Object.create(Za.prototype)).point=function(e,t){Za.prototype.point.call(this,t,e)};function Hp(e){this._context=e}Hp.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,s){this._context.bezierCurveTo(t,e,r,n,s,i)}};function lO(e){return new Za(e)}function cO(e){return new Vp(e)}function Fp(e){this._context=e}Fp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=zp(e),i=zp(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(r[0][s],i[0][s],r[1][s],i[1][s],e[a],t[a]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function zp(e){var t,n=e.length-1,r,i=new Array(n),s=new Array(n),a=new Array(n);for(i[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/s[t-1],s[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/s[t];for(s[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-i[t+1];return[i,s]}function uO(e){return new Fp(e)}function Ka(e,t){this._context=e,this._t=t}Ka.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function hO(e){return new Ka(e,.5)}function dO(e){return new Ka(e,0)}function fO(e){return new Ka(e,1)}function Gp(e,t){if((a=e.length)>1)for(var n=1,r,i,s=e[t[0]],a,o=s.length;n<a;++n)for(i=s,s=e[t[n]],r=0;r<o;++r)s[r][1]+=s[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function jp(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function pO(e,t){return e[t]}function mO(e){const t=[];return t.key=e,t}function kc(){var e=mt([]),t=jp,n=Gp,r=pO;function i(s){var a=Array.from(e.apply(this,arguments),mO),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=ja(t(a));o<l;++o)a[u[o]].index=o;return n(a,u),a}return i.keys=function(s){return arguments.length?(e=typeof s=="function"?s:mt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:mt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?jp:typeof s=="function"?s:mt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??Gp,i):n},i}function gO(e,t){if((l=e.length)>0)for(var n,r=0,i,s,a,o,l,c=e[t[0]].length;r<c;++r)for(a=o=0,n=0;n<l;++n)(s=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=a,i[1]=a+=s):s<0?(i[1]=o,i[0]=o+=s):(i[0]=0,i[1]=s)}function rs(e,t,n){this.k=e,this.x=t,this.y=n}rs.prototype={constructor:rs,scale:function(e){return e===1?this:new rs(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new rs(this.k,this.x+this.k*e,this.y+this.k*t)},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+")"}},rs.prototype;function Dc(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function is(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function ss(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?yO(o,d=>d.test(a)):vO(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function vO(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function yO(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function xO(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}function Tt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}let bO={};function Qa(){return bO}function as(e,t){var n,r,i,s;const a=Qa(),o=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??a.weekStartsOn??((s=(i=a.locale)==null?void 0:i.options)==null?void 0:s.weekStartsOn)??0,l=Tt(e),c=l.getDay(),u=(c<o?7:0)+c-o;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}const EO={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_O=(e,t,n)=>{let r;const i=EO[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},wO={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},SO=(e,t,n,r)=>wO[e],OO={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},TO={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},MO={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},CO={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},AO={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},$O={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},LO=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},RO={ordinalNumber:LO,era:is({values:OO,defaultWidth:"wide"}),quarter:is({values:TO,defaultWidth:"wide",argumentCallback:e=>e-1}),month:is({values:MO,defaultWidth:"wide"}),day:is({values:CO,defaultWidth:"wide"}),dayPeriod:is({values:AO,defaultWidth:"wide",formattingValues:$O,defaultFormattingWidth:"wide"})},kO=/^(\d+)(th|st|nd|rd)?/i,DO=/\d+/i,IO={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},NO={any:[/^b/i,/^(a|c)/i]},PO={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UO={any:[/1/i,/2/i,/3/i,/4/i]},BO={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},VO={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},HO={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},FO={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},zO={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},GO={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jO={ordinalNumber:xO({matchPattern:kO,parsePattern:DO,valueCallback:e=>parseInt(e,10)}),era:ss({matchPatterns:IO,defaultMatchWidth:"wide",parsePatterns:NO,defaultParseWidth:"any"}),quarter:ss({matchPatterns:PO,defaultMatchWidth:"wide",parsePatterns:UO,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ss({matchPatterns:BO,defaultMatchWidth:"wide",parsePatterns:VO,defaultParseWidth:"any"}),day:ss({matchPatterns:HO,defaultMatchWidth:"wide",parsePatterns:FO,defaultParseWidth:"any"}),dayPeriod:ss({matchPatterns:zO,defaultMatchWidth:"any",parsePatterns:GO,defaultParseWidth:"any"})},WO={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},qO={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},YO={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},XO={date:Dc({formats:WO,defaultWidth:"full"}),time:Dc({formats:qO,defaultWidth:"full"}),dateTime:Dc({formats:YO,defaultWidth:"full"})},Wp={code:"en-US",formatDistance:_O,formatLong:XO,formatRelative:SO,localize:RO,match:jO,options:{weekStartsOn:0,firstWeekContainsDate:1}};var ZO=typeof global=="object"&&global&&global.Object===Object&&global;const qp=ZO;var KO=typeof self=="object"&&self&&self.Object===Object&&self,QO=qp||KO||Function("return this")();const Xe=QO;var JO=Xe.Symbol;const Pe=JO;var Yp=Object.prototype,tT=Yp.hasOwnProperty,eT=Yp.toString,os=Pe?Pe.toStringTag:void 0;function nT(e){var t=tT.call(e,os),n=e[os];try{e[os]=void 0;var r=!0}catch{}var i=eT.call(e);return r&&(t?e[os]=n:delete e[os]),i}var rT=Object.prototype,iT=rT.toString;function sT(e){return iT.call(e)}var aT="[object Null]",oT="[object Undefined]",Xp=Pe?Pe.toStringTag:void 0;function vr(e){return e==null?e===void 0?oT:aT:Xp&&Xp in Object(e)?nT(e):sT(e)}function un(e){return e!=null&&typeof e=="object"}var lT="[object Symbol]";function Ja(e){return typeof e=="symbol"||un(e)&&vr(e)==lT}function Zp(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var cT=Array.isArray;const re=cT;var uT=1/0,Kp=Pe?Pe.prototype:void 0,Qp=Kp?Kp.toString:void 0;function Jp(e){if(typeof e=="string")return e;if(re(e))return Zp(e,Jp)+"";if(Ja(e))return Qp?Qp.call(e):"";var t=e+"";return t=="0"&&1/e==-uT?"-0":t}function Ue(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ic(e){return e}var hT="[object AsyncFunction]",dT="[object Function]",fT="[object GeneratorFunction]",pT="[object Proxy]";function Nc(e){if(!Ue(e))return!1;var t=vr(e);return t==dT||t==fT||t==hT||t==pT}var mT=Xe["__core-js_shared__"];const Pc=mT;var tm=function(){var e=/[^.]+$/.exec(Pc&&Pc.keys&&Pc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gT(e){return!!tm&&tm in e}var vT=Function.prototype,yT=vT.toString;function yr(e){if(e!=null){try{return yT.call(e)}catch{}try{return e+""}catch{}}return""}var xT=/[\\^$.*+?()[\]{}|]/g,bT=/^\[object .+?Constructor\]$/,ET=Function.prototype,_T=Object.prototype,wT=ET.toString,ST=_T.hasOwnProperty,OT=RegExp("^"+wT.call(ST).replace(xT,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TT(e){if(!Ue(e)||gT(e))return!1;var t=Nc(e)?OT:bT;return t.test(yr(e))}function MT(e,t){return e==null?void 0:e[t]}function xr(e,t){var n=MT(e,t);return TT(n)?n:void 0}var CT=xr(Xe,"WeakMap");const Uc=CT;var em=Object.create,AT=function(){function e(){}return function(t){if(!Ue(t))return{};if(em)return em(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const $T=AT;function LT(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function RT(){}function nm(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var kT=800,DT=16,IT=Date.now;function NT(e){var t=0,n=0;return function(){var r=IT(),i=DT-(r-n);if(n=r,i>0){if(++t>=kT)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function PT(e){return function(){return e}}var UT=function(){try{var e=xr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const to=UT;var BT=to?function(e,t){return to(e,"toString",{configurable:!0,enumerable:!1,value:PT(t),writable:!0})}:Ic,VT=NT(BT);const HT=VT;function FT(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function zT(e,t,n,r){for(var i=e.length,s=n+(r?1:-1);r?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function GT(e){return e!==e}function jT(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function WT(e,t,n){return t===t?jT(e,t,n):zT(e,GT,n)}function qT(e,t){var n=e==null?0:e.length;return!!n&&WT(e,t,0)>-1}var YT=9007199254740991,XT=/^(?:0|[1-9]\d*)$/;function Bc(e,t){var n=typeof e;return t=t??YT,!!t&&(n=="number"||n!="symbol"&&XT.test(e))&&e>-1&&e%1==0&&e<t}function eo(e,t,n){t=="__proto__"&&to?to(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ls(e,t){return e===t||e!==e&&t!==t}var ZT=Object.prototype,KT=ZT.hasOwnProperty;function rm(e,t,n){var r=e[t];(!(KT.call(e,t)&&ls(r,n))||n===void 0&&!(t in e))&&eo(e,t,n)}function cs(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=r?r(n[o],e[o],o,n,e):void 0;l===void 0&&(l=e[o]),i?eo(n,o,l):rm(n,o,l)}return n}var im=Math.max;function QT(e,t,n){return t=im(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=im(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),LT(e,this,o)}}function sm(e,t){return HT(QT(e,t,Ic),e+"")}var JT=9007199254740991;function Vc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=JT}function br(e){return e!=null&&Vc(e.length)&&!Nc(e)}function am(e,t,n){if(!Ue(n))return!1;var r=typeof t;return(r=="number"?br(n)&&Bc(t,n.length):r=="string"&&t in n)?ls(n[t],e):!1}function tM(e){return sm(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,a&&am(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var o=n[r];o&&e(t,o,r,s)}return t})}var eM=Object.prototype;function no(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||eM;return e===n}function nM(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var rM="[object Arguments]";function om(e){return un(e)&&vr(e)==rM}var lm=Object.prototype,iM=lm.hasOwnProperty,sM=lm.propertyIsEnumerable,aM=om(function(){return arguments}())?om:function(e){return un(e)&&iM.call(e,"callee")&&!sM.call(e,"callee")};const ri=aM;function oM(){return!1}var cm=typeof J=="object"&&J&&!J.nodeType&&J,um=cm&&typeof module=="object"&&module&&!module.nodeType&&module,lM=um&&um.exports===cm,hm=lM?Xe.Buffer:void 0,cM=hm?hm.isBuffer:void 0,uM=cM||oM;const ii=uM;var hM="[object Arguments]",dM="[object Array]",fM="[object Boolean]",pM="[object Date]",mM="[object Error]",gM="[object Function]",vM="[object Map]",yM="[object Number]",xM="[object Object]",bM="[object RegExp]",EM="[object Set]",_M="[object String]",wM="[object WeakMap]",SM="[object ArrayBuffer]",OM="[object DataView]",TM="[object Float32Array]",MM="[object Float64Array]",CM="[object Int8Array]",AM="[object Int16Array]",$M="[object Int32Array]",LM="[object Uint8Array]",RM="[object Uint8ClampedArray]",kM="[object Uint16Array]",DM="[object Uint32Array]",Bt={};Bt[TM]=Bt[MM]=Bt[CM]=Bt[AM]=Bt[$M]=Bt[LM]=Bt[RM]=Bt[kM]=Bt[DM]=!0,Bt[hM]=Bt[dM]=Bt[SM]=Bt[fM]=Bt[OM]=Bt[pM]=Bt[mM]=Bt[gM]=Bt[vM]=Bt[yM]=Bt[xM]=Bt[bM]=Bt[EM]=Bt[_M]=Bt[wM]=!1;function IM(e){return un(e)&&Vc(e.length)&&!!Bt[vr(e)]}function Hc(e){return function(t){return e(t)}}var dm=typeof J=="object"&&J&&!J.nodeType&&J,us=dm&&typeof module=="object"&&module&&!module.nodeType&&module,NM=us&&us.exports===dm,Fc=NM&&qp.process,PM=function(){try{var e=us&&us.require&&us.require("util").types;return e||Fc&&Fc.binding&&Fc.binding("util")}catch{}}();const si=PM;var fm=si&&si.isTypedArray,UM=fm?Hc(fm):IM;const ro=UM;var BM=Object.prototype,VM=BM.hasOwnProperty;function pm(e,t){var n=re(e),r=!n&&ri(e),i=!n&&!r&&ii(e),s=!n&&!r&&!i&&ro(e),a=n||r||i||s,o=a?nM(e.length,String):[],l=o.length;for(var c in e)(t||VM.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Bc(c,l)))&&o.push(c);return o}function mm(e,t){return function(n){return e(t(n))}}var HM=mm(Object.keys,Object);const FM=HM;var zM=Object.prototype,GM=zM.hasOwnProperty;function gm(e){if(!no(e))return FM(e);var t=[];for(var n in Object(e))GM.call(e,n)&&n!="constructor"&&t.push(n);return t}function hs(e){return br(e)?pm(e):gm(e)}function jM(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var WM=Object.prototype,qM=WM.hasOwnProperty;function YM(e){if(!Ue(e))return jM(e);var t=no(e),n=[];for(var r in e)r=="constructor"&&(t||!qM.call(e,r))||n.push(r);return n}function ds(e){return br(e)?pm(e,!0):YM(e)}var XM=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ZM=/^\w*$/;function zc(e,t){if(re(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ja(e)?!0:ZM.test(e)||!XM.test(e)||t!=null&&e in Object(t)}var KM=xr(Object,"create");const fs=KM;function QM(){this.__data__=fs?fs(null):{},this.size=0}function JM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var tC="__lodash_hash_undefined__",eC=Object.prototype,nC=eC.hasOwnProperty;function rC(e){var t=this.__data__;if(fs){var n=t[e];return n===tC?void 0:n}return nC.call(t,e)?t[e]:void 0}var iC=Object.prototype,sC=iC.hasOwnProperty;function aC(e){var t=this.__data__;return fs?t[e]!==void 0:sC.call(t,e)}var oC="__lodash_hash_undefined__";function lC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=fs&&t===void 0?oC:t,this}function Er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Er.prototype.clear=QM,Er.prototype.delete=JM,Er.prototype.get=rC,Er.prototype.has=aC,Er.prototype.set=lC;function cC(){this.__data__=[],this.size=0}function io(e,t){for(var n=e.length;n--;)if(ls(e[n][0],t))return n;return-1}var uC=Array.prototype,hC=uC.splice;function dC(e){var t=this.__data__,n=io(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():hC.call(t,n,1),--this.size,!0}function fC(e){var t=this.__data__,n=io(t,e);return n<0?void 0:t[n][1]}function pC(e){return io(this.__data__,e)>-1}function mC(e,t){var n=this.__data__,r=io(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Mn.prototype.clear=cC,Mn.prototype.delete=dC,Mn.prototype.get=fC,Mn.prototype.has=pC,Mn.prototype.set=mC;var gC=xr(Xe,"Map");const ps=gC;function vC(){this.size=0,this.__data__={hash:new Er,map:new(ps||Mn),string:new Er}}function yC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function so(e,t){var n=e.__data__;return yC(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xC(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t}function bC(e){return so(this,e).get(e)}function EC(e){return so(this,e).has(e)}function _C(e,t){var n=so(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Cn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cn.prototype.clear=vC,Cn.prototype.delete=xC,Cn.prototype.get=bC,Cn.prototype.has=EC,Cn.prototype.set=_C;var wC="Expected a function";function Gc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(wC);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Gc.Cache||Cn),n}Gc.Cache=Cn;var SC=500;function OC(e){var t=Gc(e,function(r){return n.size===SC&&n.clear(),r}),n=t.cache;return t}var TC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MC=/\\(\\)?/g,CC=OC(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(TC,function(n,r,i,s){t.push(i?s.replace(MC,"$1"):r||n)}),t});const AC=CC;function ms(e){return e==null?"":Jp(e)}function vm(e,t){return re(e)?e:zc(e,t)?[e]:AC(ms(e))}var $C=1/0;function ao(e){if(typeof e=="string"||Ja(e))return e;var t=e+"";return t=="0"&&1/e==-$C?"-0":t}function ym(e,t){t=vm(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ao(t[n++])];return n&&n==r?e:void 0}function wt(e,t,n){var r=e==null?void 0:ym(e,t);return r===void 0?n:r}function jc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var xm=Pe?Pe.isConcatSpreadable:void 0;function LC(e){return re(e)||ri(e)||!!(xm&&e&&e[xm])}function oo(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=LC),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?oo(o,t-1,n,r,i):jc(i,o):r||(i[i.length]=o)}return i}var RC=mm(Object.getPrototypeOf,Object);const Wc=RC;var kC="[object Object]",DC=Function.prototype,IC=Object.prototype,bm=DC.toString,NC=IC.hasOwnProperty,PC=bm.call(Object);function UC(e){if(!un(e)||vr(e)!=kC)return!1;var t=Wc(e);if(t===null)return!0;var n=NC.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&bm.call(n)==PC}function BC(){this.__data__=new Mn,this.size=0}function VC(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function HC(e){return this.__data__.get(e)}function FC(e){return this.__data__.has(e)}var zC=200;function GC(e,t){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!ps||r.length<zC-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cn(r)}return n.set(e,t),this.size=n.size,this}function Ze(e){var t=this.__data__=new Mn(e);this.size=t.size}Ze.prototype.clear=BC,Ze.prototype.delete=VC,Ze.prototype.get=HC,Ze.prototype.has=FC,Ze.prototype.set=GC;function jC(e,t){return e&&cs(t,hs(t),e)}function WC(e,t){return e&&cs(t,ds(t),e)}var Em=typeof J=="object"&&J&&!J.nodeType&&J,_m=Em&&typeof module=="object"&&module&&!module.nodeType&&module,qC=_m&&_m.exports===Em,wm=qC?Xe.Buffer:void 0,Sm=wm?wm.allocUnsafe:void 0;function Om(e,t){if(t)return e.slice();var n=e.length,r=Sm?Sm(n):new e.constructor(n);return e.copy(r),r}function YC(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function Tm(){return[]}var XC=Object.prototype,ZC=XC.propertyIsEnumerable,Mm=Object.getOwnPropertySymbols,KC=Mm?function(e){return e==null?[]:(e=Object(e),YC(Mm(e),function(t){return ZC.call(e,t)}))}:Tm;const qc=KC;function QC(e,t){return cs(e,qc(e),t)}var JC=Object.getOwnPropertySymbols,tA=JC?function(e){for(var t=[];e;)jc(t,qc(e)),e=Wc(e);return t}:Tm;const Cm=tA;function eA(e,t){return cs(e,Cm(e),t)}function Am(e,t,n){var r=t(e);return re(e)?r:jc(r,n(e))}function Yc(e){return Am(e,hs,qc)}function nA(e){return Am(e,ds,Cm)}var rA=xr(Xe,"DataView");const Xc=rA;var iA=xr(Xe,"Promise");const Zc=iA;var sA=xr(Xe,"Set");const ai=sA;var $m="[object Map]",aA="[object Object]",Lm="[object Promise]",Rm="[object Set]",km="[object WeakMap]",Dm="[object DataView]",oA=yr(Xc),lA=yr(ps),cA=yr(Zc),uA=yr(ai),hA=yr(Uc),_r=vr;(Xc&&_r(new Xc(new ArrayBuffer(1)))!=Dm||ps&&_r(new ps)!=$m||Zc&&_r(Zc.resolve())!=Lm||ai&&_r(new ai)!=Rm||Uc&&_r(new Uc)!=km)&&(_r=function(e){var t=vr(e),n=t==aA?e.constructor:void 0,r=n?yr(n):"";if(r)switch(r){case oA:return Dm;case lA:return $m;case cA:return Lm;case uA:return Rm;case hA:return km}return t});const oi=_r;var dA=Object.prototype,fA=dA.hasOwnProperty;function pA(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&fA.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var mA=Xe.Uint8Array;const lo=mA;function Kc(e){var t=new e.constructor(e.byteLength);return new lo(t).set(new lo(e)),t}function gA(e,t){var n=t?Kc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var vA=/\w*$/;function yA(e){var t=new e.constructor(e.source,vA.exec(e));return t.lastIndex=e.lastIndex,t}var Im=Pe?Pe.prototype:void 0,Nm=Im?Im.valueOf:void 0;function xA(e){return Nm?Object(Nm.call(e)):{}}function Pm(e,t){var n=t?Kc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var bA="[object Boolean]",EA="[object Date]",_A="[object Map]",wA="[object Number]",SA="[object RegExp]",OA="[object Set]",TA="[object String]",MA="[object Symbol]",CA="[object ArrayBuffer]",AA="[object DataView]",$A="[object Float32Array]",LA="[object Float64Array]",RA="[object Int8Array]",kA="[object Int16Array]",DA="[object Int32Array]",IA="[object Uint8Array]",NA="[object Uint8ClampedArray]",PA="[object Uint16Array]",UA="[object Uint32Array]";function BA(e,t,n){var r=e.constructor;switch(t){case CA:return Kc(e);case bA:case EA:return new r(+e);case AA:return gA(e,n);case $A:case LA:case RA:case kA:case DA:case IA:case NA:case PA:case UA:return Pm(e,n);case _A:return new r;case wA:case TA:return new r(e);case SA:return yA(e);case OA:return new r;case MA:return xA(e)}}function Um(e){return typeof e.constructor=="function"&&!no(e)?$T(Wc(e)):{}}var VA="[object Map]";function HA(e){return un(e)&&oi(e)==VA}var Bm=si&&si.isMap,FA=Bm?Hc(Bm):HA;const zA=FA;var GA="[object Set]";function jA(e){return un(e)&&oi(e)==GA}var Vm=si&&si.isSet,WA=Vm?Hc(Vm):jA;const qA=WA;var YA=1,XA=2,ZA=4,Hm="[object Arguments]",KA="[object Array]",QA="[object Boolean]",JA="[object Date]",t2="[object Error]",Fm="[object Function]",e2="[object GeneratorFunction]",n2="[object Map]",r2="[object Number]",zm="[object Object]",i2="[object RegExp]",s2="[object Set]",a2="[object String]",o2="[object Symbol]",l2="[object WeakMap]",c2="[object ArrayBuffer]",u2="[object DataView]",h2="[object Float32Array]",d2="[object Float64Array]",f2="[object Int8Array]",p2="[object Int16Array]",m2="[object Int32Array]",g2="[object Uint8Array]",v2="[object Uint8ClampedArray]",y2="[object Uint16Array]",x2="[object Uint32Array]",Pt={};Pt[Hm]=Pt[KA]=Pt[c2]=Pt[u2]=Pt[QA]=Pt[JA]=Pt[h2]=Pt[d2]=Pt[f2]=Pt[p2]=Pt[m2]=Pt[n2]=Pt[r2]=Pt[zm]=Pt[i2]=Pt[s2]=Pt[a2]=Pt[o2]=Pt[g2]=Pt[v2]=Pt[y2]=Pt[x2]=!0,Pt[t2]=Pt[Fm]=Pt[l2]=!1;function co(e,t,n,r,i,s){var a,o=t&YA,l=t&XA,c=t&ZA;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Ue(e))return e;var u=re(e);if(u){if(a=pA(e),!o)return nm(e,a)}else{var d=oi(e),h=d==Fm||d==e2;if(ii(e))return Om(e,o);if(d==zm||d==Hm||h&&!i){if(a=l||h?{}:Um(e),!o)return l?eA(e,WC(a,e)):QC(e,jC(a,e))}else{if(!Pt[d])return i?e:{};a=BA(e,d,o)}}s||(s=new Ze);var f=s.get(e);if(f)return f;s.set(e,a),qA(e)?e.forEach(function(m){a.add(co(m,t,n,m,e,s))}):zA(e)&&e.forEach(function(m,y){a.set(y,co(m,t,n,y,e,s))});var p=c?l?nA:Yc:l?ds:hs,v=u?void 0:p(e);return FT(v||e,function(m,y){v&&(y=m,m=e[y]),rm(a,y,co(m,t,n,y,e,s))}),a}var b2=1,E2=4;function An(e){return co(e,b2|E2)}var _2="__lodash_hash_undefined__";function w2(e){return this.__data__.set(e,_2),this}function S2(e){return this.__data__.has(e)}function gs(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Cn;++t<n;)this.add(e[t])}gs.prototype.add=gs.prototype.push=w2,gs.prototype.has=S2;function Gm(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function jm(e,t){return e.has(t)}var O2=1,T2=2;function Wm(e,t,n,r,i,s){var a=n&O2,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&T2?new gs:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],v=t[d];if(r)var m=a?r(v,p,d,t,e,s):r(p,v,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!Gm(t,function(y,g){if(!jm(f,g)&&(p===y||i(p,y,n,r,s)))return f.push(g)})){h=!1;break}}else if(!(p===v||i(p,v,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function M2(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Qc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var C2=1,A2=2,$2="[object Boolean]",L2="[object Date]",R2="[object Error]",k2="[object Map]",D2="[object Number]",I2="[object RegExp]",N2="[object Set]",P2="[object String]",U2="[object Symbol]",B2="[object ArrayBuffer]",V2="[object DataView]",qm=Pe?Pe.prototype:void 0,Jc=qm?qm.valueOf:void 0;function H2(e,t,n,r,i,s,a){switch(n){case V2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case B2:return!(e.byteLength!=t.byteLength||!s(new lo(e),new lo(t)));case $2:case L2:case D2:return ls(+e,+t);case R2:return e.name==t.name&&e.message==t.message;case I2:case P2:return e==t+"";case k2:var o=M2;case N2:var l=r&C2;if(o||(o=Qc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=A2,a.set(e,t);var u=Wm(o(e),o(t),r,i,s,a);return a.delete(e),u;case U2:if(Jc)return Jc.call(e)==Jc.call(t)}return!1}var F2=1,z2=Object.prototype,G2=z2.hasOwnProperty;function j2(e,t,n,r,i,s){var a=n&F2,o=Yc(e),l=o.length,c=Yc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:G2.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var v=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<l;){h=o[d];var y=e[h],g=t[h];if(r)var x=a?r(g,y,h,t,e,s):r(y,g,h,e,t,s);if(!(x===void 0?y===g||i(y,g,n,r,s):x)){v=!1;break}m||(m=h=="constructor")}if(v&&!m){var w=e.constructor,_=t.constructor;w!=_&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return s.delete(e),s.delete(t),v}var W2=1,Ym="[object Arguments]",Xm="[object Array]",uo="[object Object]",q2=Object.prototype,Zm=q2.hasOwnProperty;function Y2(e,t,n,r,i,s){var a=re(e),o=re(t),l=a?Xm:oi(e),c=o?Xm:oi(t);l=l==Ym?uo:l,c=c==Ym?uo:c;var u=l==uo,d=c==uo,h=l==c;if(h&&ii(e)){if(!ii(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Ze),a||ro(e)?Wm(e,t,n,r,i,s):H2(e,t,l,n,r,i,s);if(!(n&W2)){var f=u&&Zm.call(e,"__wrapped__"),p=d&&Zm.call(t,"__wrapped__");if(f||p){var v=f?e.value():e,m=p?t.value():t;return s||(s=new Ze),i(v,m,n,r,s)}}return h?(s||(s=new Ze),j2(e,t,n,r,i,s)):!1}function ho(e,t,n,r,i){return e===t?!0:e==null||t==null||!un(e)&&!un(t)?e!==e&&t!==t:Y2(e,t,n,r,ho,i)}var X2=1,Z2=2;function K2(e,t,n,r){var i=n.length,s=i,a=!r;if(e==null)return!s;for(e=Object(e);i--;){var o=n[i];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=n[i];var l=o[0],c=e[l],u=o[1];if(a&&o[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Ze;if(r)var h=r(c,u,l,e,t,d);if(!(h===void 0?ho(u,c,X2|Z2,r,d):h))return!1}}return!0}function Km(e){return e===e&&!Ue(e)}function Q2(e){for(var t=hs(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Km(i)]}return t}function Qm(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function J2(e){var t=Q2(e);return t.length==1&&t[0][2]?Qm(t[0][0],t[0][1]):function(n){return n===e||K2(n,e,t)}}function t$(e,t){return e!=null&&t in Object(e)}function e$(e,t,n){t=vm(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=ao(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&Vc(i)&&Bc(a,i)&&(re(e)||ri(e)))}function n$(e,t){return e!=null&&e$(e,t,t$)}var r$=1,i$=2;function s$(e,t){return zc(e)&&Km(t)?Qm(ao(e),t):function(n){var r=wt(n,e);return r===void 0&&r===t?n$(n,e):ho(t,r,r$|i$)}}function a$(e){return function(t){return t==null?void 0:t[e]}}function o$(e){return function(t){return ym(t,e)}}function l$(e){return zc(e)?a$(ao(e)):o$(e)}function fo(e){return typeof e=="function"?e:e==null?Ic:typeof e=="object"?re(e)?s$(e[0],e[1]):J2(e):l$(e)}function c$(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[e?o:++i];if(n(s[l],l,s)===!1)break}return t}}var u$=c$();const Jm=u$;function tu(e,t,n){(n!==void 0&&!ls(e[t],n)||n===void 0&&!(t in e))&&eo(e,t,n)}function eu(e){return un(e)&&br(e)}function nu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function h$(e){return cs(e,ds(e))}function d$(e,t,n,r,i,s,a){var o=nu(e,n),l=nu(t,n),c=a.get(l);if(c){tu(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=re(l),f=!h&&ii(l),p=!h&&!f&&ro(l);u=l,h||f||p?re(o)?u=o:eu(o)?u=nm(o):f?(d=!1,u=Om(l,!0)):p?(d=!1,u=Pm(l,!0)):u=[]:UC(l)||ri(l)?(u=o,ri(o)?u=h$(o):(!Ue(o)||Nc(o))&&(u=Um(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),tu(e,n,u)}function tg(e,t,n,r,i){e!==t&&Jm(t,function(s,a){if(i||(i=new Ze),Ue(s))d$(e,t,a,n,tg,r,i);else{var o=r?r(nu(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),tu(e,a,o)}},ds)}function f$(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function p$(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var m$="[object Map]",g$="[object Set]",v$=Object.prototype,y$=v$.hasOwnProperty;function Ke(e){if(e==null)return!0;if(br(e)&&(re(e)||typeof e=="string"||typeof e.splice=="function"||ii(e)||ro(e)||ri(e)))return!e.length;var t=oi(e);if(t==m$||t==g$)return!e.size;if(no(e))return!gm(e).length;for(var n in e)if(y$.call(e,n))return!1;return!0}var x$=tM(function(e,t,n){tg(e,t,n)});const lt=x$;var b$=1/0,E$=ai&&1/Qc(new ai([,-0]))[1]==b$?function(e){return new ai(e)}:RT;const _$=E$;var w$=200;function eg(e,t,n){var r=-1,i=qT,s=e.length,a=!0,o=[],l=o;if(n)a=!1,i=f$;else if(s>=w$){var c=t?null:_$(e);if(c)return Qc(c);a=!1,i=jm,l=new gs}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var S$=sm(function(e){var t=p$(e);return eu(t)&&(t=void 0),eg(oo(e,1,eu,!0),fo(t))});const O$=S$;function vs(e){return e&&e.length?eg(e):[]}const xe="cds",$n={opacity:{unselected:.05,selected:.4}},Gn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},li={duration:1e3,ease:Ld,zoomLevel:3},ci={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},ng={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Be={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},T$={defaultBins:10},Wt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},Ln={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},ie={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Ut={radiusOffset:-15,innerRadius:2,padAngle:.007,hoverArc:{outerRadiusOffset:3},xOffset:30,yOffset:20,yOffsetCallout:10,callout:{minSliceDegree:5,offsetX:15,offsetY:12,horizontalLineLength:8,textMargin:2}},wr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Qe={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},rg={minCellDividerDimension:16,chartPadding:.5},ig={default:{size:24}},M$={horizontalOffset:10},sg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},Me={height:{[rn.GRAPH_VIEW]:32,[rn.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},C$=[{type:Jt.RADIUS,name:"Radius"},{type:Jt.AREA,name:"Poor area"},{type:Jt.AREA,name:"Satisfactory area"},{type:Jt.AREA,name:"Great area"},{type:Jt.QUARTILE,name:"Quartiles"}],ui={type:Fe.END_LINE,threshold:16,numCharacter:14},A$={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG"}}},$$={enabled:!0,position:Ei.BOTTOM,clickable:!0,truncation:ui,alignment:Kt.LEFT,order:null,additionalItems:[]},L$={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},R$={enabled:!0},ag={enabled:!0,showTotal:!0,truncation:ui,groupLabel:"Group"},og={top:{visible:!0,includeZero:!0,truncation:ui},bottom:{visible:!0,includeZero:!0,truncation:ui},left:{visible:!0,includeZero:!0,truncation:ui},right:{visible:!0,includeZero:!0,truncation:ui}},po={addSpaceOnEdges:1,showDayName:!1,localeObject:Wp,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}};let lg=!1;try{lg=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const he={width:null,height:null,resizable:!0,theme:Ko.WHITE,tooltip:ag,legend:$$,locale:A$,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:Ct.SHOW_AS_DATATABLE},...lg?[{type:Ct.MAKE_FULLSCREEN}]:[],{type:Ct.EXPORT_CSV},{type:Ct.EXPORT_PNG},{type:Ct.EXPORT_JPG}]}},cg=lt({},he,{thematic:{projection:vn.geoNaturalEarth1}}),ys=lt({},he,{axes:og,timeScale:po,grid:L$,ruler:R$,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:rn.GRAPH_VIEW}}}),Sr=lt({},ys,{bars:{maxWidth:16,spacingFactor:.25},timeScale:lt(po,{addSpaceOnEdges:1})}),k$=lt({},Sr,{}),D$=lt({},Sr,{}),I$=lt({},Sr,{bars:lt({},Sr.bars,{dividerSize:1.5})}),N$=lt({},Sr,{}),ru=lt({},ys,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),P$=ru,ug=lt({},ru,{points:{radius:3,filled:!1,enabled:!0}}),hg=lt({},ug,{timeScale:lt(po,{addSpaceOnEdges:0})}),U$=hg,B$=lt({},ys,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:e=>{const t=Math.min(e.width,e.height);return[t*3/400,t*25/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:Jt.RADIUS,name:"Radius"}]}}),V$=lt({},ys,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Jt.AREA,name:"Poor area"},{type:Jt.AREA,name:"Satisfactory area"},{type:Jt.AREA,name:"Great area"},{type:Jt.QUARTILE,name:"Quartiles"}]}}),H$=lt({},Sr,{bars:{dividerSize:1.5},timeScale:lt(po,{addSpaceOnEdges:0})}),F$=lt({},he,{tooltip:lt({},ag,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:e=>{const t=Math.min(e.width,e.height);return[t*20/400,t*75/400]},wordMapsTo:"word"}}),dg=lt({},he,{pie:{labels:{formatter:null,enabled:!0},alignment:Kt.LEFT,sortFunction:null,valueMapsTo:"value"}}),z$=lt({},he,{legend:{enabled:!1},gauge:{type:Pr.SEMI,arcWidth:16,deltaArrow:{size:e=>e/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:e=>e/8,valueFontSize:e=>e/2.5,numberFormatter:e=>Number(e.toFixed(2))%1!==0?e.toFixed(2).toLocaleString():e.toFixed().toLocaleString(),alignment:Kt.LEFT}}),G$=lt({},dg,{donut:{center:{numberFontSize:e=>`${Math.min(e/100*24,24)}px`,titleFontSize:e=>`${Math.min(e/100*15,15)}px`,titleYPosition:e=>Math.min(e/80*20,20),numberFormatter:e=>Math.floor(e).toLocaleString()},alignment:Kt.LEFT}}),fg=lt({},he,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),j$=lt({},fg,{legend:{enabled:!0}}),W$=lt({},he,{radar:{axes:{angle:"key",value:"value"},alignment:Kt.LEFT},tooltip:{gridline:{enabled:!0}}}),q$=lt({},Sr,{comboChartTypes:[]}),Y$=lt({tree:{type:Qo.TREE}},he,{}),X$=lt({},he,{data:lt(he.data,{groupMapsTo:"name"})}),Z$=lt({},he,ci,{data:lt(he.data,{groupMapsTo:"name"})}),K$=lt({},he,{alluvial:{data:lt(he.data,{groupMapsTo:"source"}),nodeAlignment:Kt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),Q$=lt({},he,{axes:og,heatmap:{divider:{state:wi.AUTO},colorLegend:{type:"linear"}}}),J$=lt({},cg,{choropleth:{colorLegend:{type:"linear"}}}),It={alluvialChart:K$,areaChart:hg,axisChart:ys,boxplotChart:N$,bubbleChart:B$,bulletChart:V$,chart:he,circlePackChart:Z$,choroplethChart:J$,comboChart:q$,donutChart:G$,gaugeChart:z$,groupedBarChart:D$,heatmapChart:Q$,histogramChart:H$,lineChart:ug,lollipopChart:P$,meterChart:fg,pieChart:dg,proportionalMeterChart:j$,radarChart:W$,scatterChart:ru,simpleBarChart:k$,stackedAreaChart:U$,stackedBarChart:I$,thematicChart:cg,treeChart:Y$,treemapChart:X$,wordCloudChart:F$};function tL(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=sr(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function zt(e,t){var n;const r=An(e),i=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete r.toolbar.controls,i.length===0&&delete r.axes;for(const s in r.axes)if(i.includes(s)){const a=t.axes[s];if((a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format"),a.mapsTo==null){const l=a.scaleType;l==null?a.mapsTo="value":l===tt.TIME?a.mapsTo="date":l===tt.LABELS&&(a.mapsTo="key")}}else delete r.axes[s];return su(r,t),lt(r,t)}function Rn(e){if(!e)return;const t=/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/,n=e.getAttribute("transform").match(t);if(!n)return null;if(n[0]){const r=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:r[0],ty:r[1]}}return null}function xs(e){const t=/\(([^)]+)\)/.exec(e);if(t&&t.length>1){const n=t[1].split(",");if(n.length>1)return{x:parseFloat(n[0]),y:parseFloat(n[1])}}return{x:0,y:0}}function iu(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function bs(e,t,n){if(n>e.length)return e;if(t===Fe.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Fe.FRONT_LINE)return"..."+e.substr(-n);if(t===Fe.END_LINE)return e.substr(0,n)+"..."}function su(e,t){const n=b(e,"legend","additionalItems"),r=b(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=C$.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=O$(a,r,"name")}}const b=(e,...t)=>{let n=e;if(n){for(const r of t)if(n[r]!==null&&n[r]!==void 0)n=n[r];else return null;return n}return null},pg=(e,t)=>t===ee.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,pe=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=pg(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function kn(e,t,n){return n===ee.VERTICAL?[e,t]:[t,e]}const mg=6048e5,eL=864e5,gg=6e4,vg=36e5;function yg(e){const t=Tt(e);return t.setHours(0,0,0,0),t}function xg(e){const t=Tt(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function bg(e,t){const n=yg(e),r=yg(t),i=+n-xg(n),s=+r-xg(r);return Math.round((i-s)/eL)}function Je(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function nL(e){const t=Tt(e),n=Je(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function rL(e){const t=Tt(e);return bg(t,nL(t))+1}function mo(e){return as(e,{weekStartsOn:1})}function Eg(e){const t=Tt(e),n=t.getFullYear(),r=Je(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=mo(r),s=Je(e,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const a=mo(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function iL(e){const t=Eg(e),n=Je(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),mo(n)}function sL(e){const t=Tt(e),n=+mo(t)-+iL(t);return Math.round(n/mg)+1}function _g(e,t){var n,r,i,s;const a=Tt(e),o=a.getFullYear(),l=Qa(),c=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??((s=(i=l.locale)==null?void 0:i.options)==null?void 0:s.firstWeekContainsDate)??1,u=Je(e,0);u.setFullYear(o+1,0,c),u.setHours(0,0,0,0);const d=as(u,t),h=Je(e,0);h.setFullYear(o,0,c),h.setHours(0,0,0,0);const f=as(h,t);return a.getTime()>=d.getTime()?o+1:a.getTime()>=f.getTime()?o:o-1}function aL(e,t){var n,r,i,s;const a=Qa(),o=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??((s=(i=a.locale)==null?void 0:i.options)==null?void 0:s.firstWeekContainsDate)??1,l=_g(e,t),c=Je(e,0);return c.setFullYear(l,0,o),c.setHours(0,0,0,0),as(c,t)}function oL(e,t){const n=Tt(e),r=+as(n,t)-+aL(n,t);return Math.round(r/mg)+1}function Lt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const jn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Lt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Lt(n+1,2)},d(e,t){return Lt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Lt(e.getHours()%12||12,t.length)},H(e,t){return Lt(e.getHours(),t.length)},m(e,t){return Lt(e.getMinutes(),t.length)},s(e,t){return Lt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Lt(i,t.length)}},hi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wg={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return jn.y(e,t)},Y:function(e,t,n,r){const i=_g(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Lt(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Lt(s,t.length)},R:function(e,t){const n=Eg(e);return Lt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Lt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Lt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Lt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return jn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Lt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=oL(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Lt(i,t.length)},I:function(e,t,n){const r=sL(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Lt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):jn.d(e,t)},D:function(e,t,n){const r=rL(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Lt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Lt(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Lt(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Lt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=hi.noon:r===0?i=hi.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=hi.evening:r>=12?i=hi.afternoon:r>=4?i=hi.morning:i=hi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return jn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):jn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Lt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Lt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):jn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):jn.s(e,t)},S:function(e,t){return jn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Og(r);case"XXXX":case"XX":return Or(r);case"XXXXX":case"XXX":default:return Or(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Og(r);case"xxxx":case"xx":return Or(r);case"xxxxx":case"xxx":default:return Or(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Sg(r,":");case"OOOO":default:return"GMT"+Or(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Sg(r,":");case"zzzz":default:return"GMT"+Or(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Lt(r,t.length)},T:function(e,t,n){const r=e.getTime();return Lt(r,t.length)}};function Sg(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Lt(s,2)}function Og(e,t){return e%60===0?(e>0?"-":"+")+Lt(Math.abs(e)/60,2):Or(e,t)}function Or(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Lt(Math.trunc(r/60),2),s=Lt(r%60,2);return n+i+t+s}const Tg=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Mg=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},lL=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Tg(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Tg(r,t)).replace("{{time}}",Mg(i,t))},cL={p:Mg,P:lL},uL=/^D+$/,hL=/^Y+$/,dL=["D","DD","YY","YYYY"];function fL(e){return uL.test(e)}function pL(e){return hL.test(e)}function mL(e,t,n){const r=gL(e,t,n);if(console.warn(r),dL.includes(e))throw new RangeError(r)}function gL(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function vL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function yL(e){if(!vL(e)&&typeof e!="number")return!1;const t=Tt(e);return!isNaN(Number(t))}const xL=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bL=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,EL=/^'([^]*?)'?$/,_L=/''/g,wL=/[a-zA-Z]/;function au(e,t,n){var r,i,s,a,o,l,c,u;const d=Qa(),h=(n==null?void 0:n.locale)??d.locale??Wp,f=(n==null?void 0:n.firstWeekContainsDate)??((i=(r=n==null?void 0:n.locale)==null?void 0:r.options)==null?void 0:i.firstWeekContainsDate)??d.firstWeekContainsDate??((a=(s=d.locale)==null?void 0:s.options)==null?void 0:a.firstWeekContainsDate)??1,p=(n==null?void 0:n.weekStartsOn)??((l=(o=n==null?void 0:n.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??d.weekStartsOn??((u=(c=d.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,v=Tt(e);if(!yL(v))throw new RangeError("Invalid time value");let m=t.match(bL).map(g=>{const x=g[0];if(x==="p"||x==="P"){const w=cL[x];return w(g,h.formatLong)}return g}).join("").match(xL).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const x=g[0];if(x==="'")return{isToken:!1,value:SL(g)};if(wg[x])return{isToken:!0,value:g};if(x.match(wL))throw new RangeError("Format string contains an unescaped latin alphabet character `"+x+"`");return{isToken:!1,value:g}});h.localize.preprocessor&&(m=h.localize.preprocessor(v,m));const y={firstWeekContainsDate:f,weekStartsOn:p,locale:h};return m.map(g=>{if(!g.isToken)return g.value;const x=g.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&pL(x)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&fL(x))&&mL(x,t,String(e));const w=wg[x[0]];return w(v,x,h.localize,y)}).join("")}function SL(e){const t=e.match(EL);return t?t[1].replace(_L,"'"):e}var Cg=(e=>(e["15seconds"]="15seconds",e.minute="minute",e["30minutes"]="30minutes",e.hourly="hourly",e.daily="daily",e.weekly="weekly",e.monthly="monthly",e.quarterly="quarterly",e.yearly="yearly",e))(Cg||{});const ou=[["15seconds",15*1e3],["minute",60*1e3],["30minutes",30*60*1e3],["hourly",60*60*1e3],["daily",24*60*60*1e3],["monthly",30*24*60*60*1e3],["quarterly",3*30*24*60*60*1e3],["yearly",12*30*24*60*60*1e3]];function Ag(e,t,n,r,i){const s=t===0,a=Number(au(new Date(e),"c"))===2,o=Number(au(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||vo(e)||Es(e,l)||Wn(e);case"minute":return s||vo(e)||Es(e,l)||Wn(e);case"30minutes":return s||vo(e)||Es(e,l)||Wn(e);case"hourly":return s||vo(e)||Es(e,l)||Wn(e);case"daily":return i?s||a||Wn(e):s||Es(e,l)||Wn(e);case"weekly":return s||a||Wn(e);case"monthly":return s||Wn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function lu(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=b(i,"timeIntervalFormats")[o],u=b(c,"primary"),d=b(c,"secondary"),h=Ag(e,t,n,r,a);let f=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:v,optionsObject:m}=s,y=m[r].type,g=m[r][h?"primary":"secondary"][f];if(r==="quarterly"||!g){const x=au(l,f,{locale:p}).split("").map(w=>{let _=Number(w);return w!==" "&&!Number.isNaN(_)?_.toLocaleString(v):w});return s[y](l,v,{},x.join(""))}else return s[y](l,v,g)}function go(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function OL(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function TL(e){const t=ou.reduce((n,[,r],i)=>{const s=ou[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return ou[t][0]}function cu(e,t){if(Cg[t])return t;if(e.length===1)return"15seconds";const n=OL(e),r=Vn(n);return TL(r)}function vo(e){const{s:t,m:n,H:r}=go(e);return r===0&&n===0&&t===0}function Es(e,t){const n=go(e).M,r=go(t).M;return n!==r}function Wn(e){const{M:t,d:n,s:r,m:i,H:s}=go(e);return t===1&&n===1&&s===0&&i===0&&r===0}function $g(e){return e===void 0?"":e.toISOString()}function Lg(e){const t=ze(e,r=>r.value),n=Ye().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}function Rg(e,t){const n=b(t,"gradient","colors"),r=!Ke(n);let i=b(t,"pairing","option");const s=Lg(e),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const l=a==="diverge"?17:11;for(let c=1;c<l+1;c++)o.push(`fill-${a}-${i}-${c}`)}return fc().domain(s).range(o)}var dt=(e=>(e.GRAPHICS_DOCUMENT="graphics-document",e.GRAPHICS_OBJECT="graphics-object",e.GRAPHICS_SYMBOL="graphics-symbol",e.GROUP="group",e.DOCUMENT="document",e.CHECKBOX="checkbox",e.BUTTON="button",e.MENU="menu",e.MENU_ITEM="menuitem",e.IMG="img",e))(dt||{});function ML(e,t){return e&&Jm(e,t,hs)}function CL(e,t){return function(n,r){if(n==null)return n;if(!br(n))return e(n,r);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s<i)&&r(a[s],s,a)!==!1;);return n}}var AL=CL(ML);const uu=AL;function $L(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function LL(e,t,n,r){return uu(e,function(i,s,a){t(r,i,n(i),a)}),r}function RL(e,t){return function(n,r){var i=re(n)?$L:LL,s=t?t():{};return i(n,e,fo(r),s)}}function kL(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r}var DL=Object.prototype,IL=DL.hasOwnProperty,NL=RL(function(e,t,n){IL.call(e,n)?e[n].push(t):eo(e,n,[t])});const PL=NL;function UL(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}let hn=class{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=b(r,"locale"),o=b(r,"tabularRepModal","tableHeadingFormatter"),l=b(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===tt.TIME&&(d=h=>s(h,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(h=>{d&&(h[1]=d(h[1]));for(let f in h){let p=h[f];typeof p=="number"&&(h[f]=a(p,i))}return h})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=b(n,"data"),a=b(n,"axes");return t&&(r=r.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const l=a[o].mapsTo,c=a[o].scaleType;if((c===tt.LINEAR||c===tt.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===tt.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Wt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(s=>r.find(a=>a.name===s[i]&&a.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(An(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return b(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Wt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(n=>n.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(n=>n.name)}aggregateBinDataByGroup(t){return PL(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[r],{groupMapsTo:a}=n.data,{bins:o=T$.defaultBins}=s,l=Array.isArray(o),c=hy().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,v=this.aggregateBinDataByGroup(f);d.forEach(m=>{h.push({group:m,key:p,value:v[m]||0,bin:f.x0})})}),{bins:c,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getActiveDataGroupNames(),{bins:i}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:i});return kc().keys(r)(s).map((a,o)=>Object.keys(a).filter(l=>!isNaN(l)).map(l=>{const c=a[l];return c[n]=r[o],c}))}getGroupedData(t){const n=this.getDisplayData(t),r={},{groupMapsTo:i}=this.getOptions().data;return n.map(s=>{const a=s[i];r[a]!==null&&r[a]!==void 0?r[a].push(s):r[a]=[s]}),Object.keys(r).map(s=>({name:s,data:r[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const r=this.getOptions(),i=this.getDisplayData(n);let s;t?s=t.map(l=>`${l.x0}:${l.x1}`):s=vs(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?$g(l[c]):l[c]&&typeof l[c].toString=="function"?l[c].toString():l[c]}));const a=this.services.cartesianScales.domainAxisPosition,o=r.axes[a].scaleType;return o===tt.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===tt.LOG||o===tt.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?$g(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const l=kL(o.map(c=>[c.sharedStackKey,0]));o.forEach(c=>{a.forEach(u=>{l[c.sharedStackKey]+=c[u]})}),o.forEach(c=>{a.forEach(u=>{const d=l[c.sharedStackKey];l[c.sharedStackKey]?c[u]=c[u]/d*100:c[u]=0})})}return(r?kc().offset(gO):kc()).keys(a)(o).map((l,c)=>Object.keys(l).filter(u=>!isNaN(u)).map(u=>{const d=l[u];return d[s]=a[c],d}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();su(n,t),this.set({options:lt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(O.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Wt.items.status,i=this.getDataGroups(),s=i.some(c=>c.status===r),a=i.filter(c=>c.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((c,u)=>{i[u].status=n});else{const c=i.findIndex(u=>u.name===t);i[c].status=i[c].status===r?n:r}else i.forEach((c,u)=>{i[u].status=c.name===t?n:r});const o=i.filter(c=>c.status===n),l=this.getOptions();i.some(c=>c.status===r)?l.data.selectedGroups=o.map(c=>c.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(O.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=b(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=b(s,"label");if(c===null){const d=b(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const t=this.getTabularDataArray().map(s=>s.map(a=>`"${(a==="–"?"–":a).split(/[,;'"`]/).map(o=>UL(o)).join("")}"`)).map(s=>s.join(",")).join(`
|
|
2
2
|
`),n=this.getOptions();let r="myChart";const i=b(n,"fileDownload","fileName");typeof i=="function"?r=i("csv"):typeof i=="string"&&(r=i),this.services.files.downloadCSV(t,`${r}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=Wt.items.status,s=this.getOptions(),a=vs(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(l=>a.includes(l))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=b(t,"color","scale");Object.keys(n).forEach(r=>{this.allDataGroups.includes(r)||console.warn(`"${r}" does not exist in data groups.`)}),this.allDataGroups.filter(r=>n[r]).forEach(r=>this.colorScale[r]=n[r])}setColorClassNames(){const t=b(this.getOptions(),"color","pairing");let n=b(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=b(t,"option");const i=ng.pairingOptions,s=n>5?14:n,a=`${s}-color`;r=r<=i[a]?r:1;const o=this.allDataGroups.map((l,c)=>`${s}-${r}-${c%14+1}`);this.colorClassNames=Na().range(o).domain(this.allDataGroups)}},Tr=class extends hn{constructor(t){super(t),this.axisFlavor=Gs.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),r=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return r&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(s=>{const a=i[s];t.scales[a]?i[s]={position:a,label:t.getScaleLabel(a),identifier:b(n,"axes",a,"mapsTo")}:i[s]=null}),i}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{primaryDomain:i,primaryRange:s,secondaryDomain:a,secondaryRange:o}=this.assignRangeAndDomains(),{number:l,code:c}=b(this.getOptions(),"locale"),u=["Group",i.label,s.label,...a?[a.label]:[],...o?[o.label]:[]],d=t.map(h=>[h[r],h[i.identifier]===null?"–":h[i.identifier],h[s.identifier]===null||isNaN(h[s.identifier])?"–":l(h[s.identifier],c),...a?[h[a.identifier]===null?"–":h[a.identifier]]:[],...o?[h[o.identifier]===null||isNaN(h[o.identifier])?"–":h[o.identifier]]:[]]);return super.formatTable({headers:u,cells:d})}setData(t){let n;if(t&&(n=super.setData(t),b(this.getOptions(),"zoomBar",z.TOP,"enabled"))){const r=b(this.getOptions(),"zoomBar",z.TOP,"data");this.setZoomBarData(r)}return n}setZoomBarData(t){const n=t?this.sanitize(An(t)):this.getDisplayData();let r=n;const{cartesianScales:i}=this.services;if(n&&i.domainAxisPosition&&i.rangeAxisPosition){const s=i.getDomainIdentifier(),a=i.getRangeIdentifier();let o=n.map(l=>l[s].getTime());o=vs(o).sort(),r=o.map(l=>{let c=0;const u={};return n.forEach(d=>{d[s].getTime()===l&&(c+=d[a])}),u[s]=new Date(l),u[a]=c,u})}this.set({zoomBarData:r})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const r=[];return Object.keys(z).forEach(i=>{const s=z[i],a=n.axes[s];if(a&&a.scaleType===tt.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&r.push(o)}}),r.length>0&&t.forEach(i=>{r.forEach(s=>{b(i,s,"getTime")===null&&(i[s]=new Date(i[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}},BL=class extends Tr{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale");t.sort((a,o)=>a.source.localeCompare(o.source));const i=["Source","Target","Value"],s=[...t.map(a=>[a.source,a.target,n(a.value,r)])];return super.formatTable({headers:i,cells:s})}},VL=class extends Tr{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:sl(t,.25),q_50:sl(t,.5),q_75:sl(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getGroupedData(),i=[];for(const{name:s,data:a}of r){const o=this.services.cartesianScales.getRangeIdentifier(),l=a.map(x=>x[o]).sort(nr),c={[n]:s,counts:l,quartiles:this.getBoxQuartiles(l),outliers:null,whiskers:null},u=c.quartiles.q_25,d=c.quartiles.q_75,h=(d-u)*1.5,f=u-h,p=d+h,v=[],m=[];for(const x of l)x<f||x>p?v.push(x):m.push(x);c.outliers=v;const y=Vn(m),g=ir(m);c.whiskers={min:y||Vn([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75]),max:g||ir([c.quartiles.q_25,c.quartiles.q_50,c.quartiles.q_75])},i.push(c)}return i}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this.getBoxplotData(),{number:i,code:s}=b(t,"locale"),a=["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],o=[...r.map(l=>{let c=b(l,"outliers");return(c===null||c.length===0)&&(c=["–"]),[l[n],b(l,"whiskers","min")!==null?i(b(l,"whiskers","min"),s):"–",b(l,"quartiles","q_25")!==null?i(b(l,"quartiles","q_25"),s):"–",b(l,"quartiles","q_50")!==null?i(b(l,"quartiles","q_50"),s):"–",b(l,"quartiles","q_75")!==null?i(b(l,"quartiles","q_75"),s):"–",b(l,"whiskers","max")!==null?i(b(l,"whiskers","max"),s):"–",b(l,"quartiles","q_75")!==null&&b(l,"quartiles","q_25")!==null?(i(b(l,"quartiles","q_75")-b(l,"quartiles","q_25")),s):"–",c.map(u=>i(u,s)).join(",")]})];return super.formatTable({headers:a,cells:o})}setColorClassNames(){const t=b(this.getOptions(),"color","pairing");let n=b(t,"option");const r=ng.pairingOptions;n=n<=r["1-color"]?n:1;const i=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=Na().range(i).domain(this.allDataGroups)}},HL=class extends Tr{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let r=t.ranges.length-1;r>0;r--){const i=t.ranges[r];if(t.value>=i)return n=r,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.services.cartesianScales.getRangeIdentifier(),{number:s,code:a}=b(n,"locale"),o=b(n,"bullet","performanceAreaTitles"),l=["Title","Group","Value","Target","Percentage","Performance"],c=[...t.map(u=>[u.title,u[r],u.value===null?"–":s(u.value,a),b(u,"marker")===null?"–":s(u.marker,a),b(u,"marker")===null?"–":`${s(Math.floor(u[i]/u.marker*100),a)}%`,o[this.getMatchingRangeIndexForDatapoint(u)]])];return super.formatTable({headers:l,cells:c})}},FL=class extends hn{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if(Ke(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!Ke(n)&&!Ke(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(r=>{this._matrix[r.properties.NAME]=r}),n.forEach(r=>{this._matrix[r.name]?this._matrix[r.name].value=r.value||null:console.warn(`Data point ${r} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Country ID","Country Name","Value"],s=[...t.map(a=>[a.id===null?"–":a.id,a.name,n(a.value,r)])];return super.formatTable({headers:i,cells:s})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=b(this.getOptions(),"color");this._colorScale=Rg(this.getDisplayData(),t)}},zL=class extends hn{constructor(t){super(t),this.parentNode=!1,this.set({depth:2},{skipUpdate:!0})}setData(t){super.setData(t),this.setDataGroups(),t.length===1&&(this.parentNode=!0),this.setZoom()}setOptions(t){const n=this.getOptions(),r=lt({},t,this.getZoomOptions(t));su(n,r);const i=this.getHierarchyLevel(),s=b(n,"circlePack","hierarchyLevel");this.set({options:lt(n,r),depth:s&&s<4?s:i})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),r=t||this.getOptions(),i=n.length===1&&b(n,0,"children")?b(n,0,"children"):n;let s=this.getHierarchyLevel();return i.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),b(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Jt.ZOOM,name:"Click to zoom"}]}}:null}setZoom(t){this.setOptions(this.getZoomOptions(t))}updateHierarchyLevel(t){this.set({depth:t})}getHierarchyLevel(){return this.get("depth")}hasParentNode(){return this.parentNode}setDataGroups(){const t=this.getData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=t.map(s=>{const a=s[r];return this.setChildrenDataGroup(s,a)});this.set({data:i},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(r=>this.setChildrenDataGroup(r,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["–",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=b(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}},GL=class extends hn{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(r=>{r.key&&r.key!==r.group&&(r.group=r.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{valueMapsTo:i}=n.pie,{number:s,code:a}=b(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"–":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((n,r)=>r.value-n.value)}},jL=class extends hn{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,{number:i,code:s}=b(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}},WL=class extends Tr{constructor(t){super(t),this.axisFlavor=Gs.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=b(this.getOptions(),"axes");if(b(n,"left","scaleType")&&b(n,"left","scaleType")!==tt.LABELS||b(n,"right","scaleType")&&b(n,"right","scaleType")!==tt.LABELS||b(n,"top","scaleType")&&b(n,"top","scaleType")!==tt.LABELS||b(n,"bottom","scaleType")&&b(n,"bottom","scaleType")!==tt.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=ze(this.getDisplayData(),r=>r.value),n=Ye().domain(t).nice().domain();if(n[0]>0)n[0]=0;else if(n[0]===0&&n[1]===0)return[0,1];return n[0]<0&&n[1]>0&&(Math.abs(n[0])>n[1]?n[1]=Math.abs(n[0]):n[0]=-n[1]),n}getFillColor(t){return this._colorScale(t)}getUniqueDomain(){if(Ke(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getDomainIdentifier(),i=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[r])))}return this._domains}getUniqueRanges(){if(Ke(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,r=n.getRangeIdentifier(),i=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(i);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[r])))}return this._ranges}getMatrix(){if(Ke(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=An(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[r]][a[i]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(An(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){Ke(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const l={value:this._matrix[a][o].value,index:this._matrix[a][o].index};l[r]=a,l[i]=o,s.push(l)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:r}=this.assignRangeAndDomains(),{number:i,code:s}=b(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"–":l[n.identifier],l[r.identifier]===null?"–":l[r.identifier],i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=b(t,"color","gradient","colors"),r=!Ke(n);let i=b(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(i<1&&i>4&&a==="mono"||i<1&&i>2&&a==="diverge")&&(i=1);const o=r?n:[];if(!r){const c=a==="diverge"?17:11;for(let u=1;u<c+1;u++)o.push(`fill-${a}-${i}-${u}`)}this._colorScale=fc().domain(s).range(o);const l=b(this.getOptions(),"color");this._colorScale=Rg(this.getDisplayData(),l)}},qL=class extends Tr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=b(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[wt(t,"bins.rangeLabel")||"Range",...s.map(l=>wt(l,`0.${n}`))],o=[...wt(s,0).map((l,c)=>[`${r(Number(wt(l,"data.x0")),i)} – ${r(Number(wt(l,"data.x1")),i)}`,...s.map(u=>r(wt(u[c],`data.${wt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}},YL=class extends hn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,r)=>n+r.value,0)}getFillColor(t){const n=this.getOptions(),r=b(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=b(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=b(t,"meter","proportional")?r:r>100?100:r,s=b(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=i&&i<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getStatus(),s=b(n,"meter","proportional"),{number:a,code:o}=b(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],a(d.value,o),...i?[i]:[]]]}else u=b(s,"total")||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{const f=h.value,p=Number((h.value/u*100).toFixed(2));return[h[r],a(f,o),a(p,o)+" %"]})];return super.formatTable({headers:l,cells:c})}},XL=class extends Tr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=b(t,"radar","axes"),{number:s,code:a}=b(t,"locale"),o=b(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>b(u,"data",h,i)!==null?s(b(u,"data",h,i),a):"–")])];return super.formatTable({headers:l,cells:c})}},ZL=class extends hn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"–"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}},KL=class extends hn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,n(o.value,r)])}):b(a.name)!==null&&b(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}},QL=class extends hn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=b(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}};var JL=/\s/;function tR(e){for(var t=e.length;t--&&JL.test(e.charAt(t)););return t}var eR=/^\s+/;function nR(e){return e&&e.slice(0,tR(e)+1).replace(eR,"")}var kg=NaN,rR=/^[-+]0x[0-9a-f]+$/i,iR=/^0b[01]+$/i,sR=/^0o[0-7]+$/i,aR=parseInt;function _s(e){if(typeof e=="number")return e;if(Ja(e))return kg;if(Ue(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ue(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nR(e);var n=iR.test(e);return n||sR.test(e)?aR(e.slice(2),n?2:8):rR.test(e)?kg:+e}var oR=function(){return Xe.Date.now()};const hu=oR;var lR="Expected a function",cR=Math.max,uR=Math.min;function yo(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(lR);t=_s(t)||0,Ue(n)&&(u=!!n.leading,d="maxWait"in n,s=d?cR(_s(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(S){var A=r,D=i;return r=i=void 0,c=S,a=e.apply(D,A),a}function p(S){return c=S,o=setTimeout(y,t),u?f(S):a}function v(S){var A=S-l,D=S-c,k=t-A;return d?uR(k,s-D):k}function m(S){var A=S-l,D=S-c;return l===void 0||A>=t||A<0||d&&D>=s}function y(){var S=hu();if(m(S))return g(S);o=setTimeout(y,v(S))}function g(S){return o=void 0,h&&r?f(S):(r=i=void 0,a)}function x(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function w(){return o===void 0?a:g(hu())}function _(){var S=hu(),A=m(S);if(r=arguments,i=this,l=S,A){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(y,t),f(l)}return o===void 0&&(o=setTimeout(y,t)),a}return _.cancel=x,_.flush=w,_}function hR(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),r=n.createElement("base"),i=n.createElement("a");return n.head.appendChild(r),n.body.appendChild(i),t&&(r.href=t),i.href=e,i.href}const dR=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Dn(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function xo(e,t){const n=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return n?parseFloat(n.replace("px","")):0}function fR(e){const t=xo(e,"border-left-width"),n=xo(e,"border-right-width");return e.clientWidth+t+n}function pR(e){const t=xo(e,"border-top-width"),n=xo(e,"border-bottom-width");return e.clientHeight+t+n}function Dg(e,t={}){const n=t.width||fR(e),r=t.height||pR(e);return{width:n,height:r}}function mR(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Ce=16384;function gR(e){(e.width>Ce||e.height>Ce)&&(e.width>Ce&&e.height>Ce?e.width>e.height?(e.height*=Ce/e.width,e.width=Ce):(e.width*=Ce/e.height,e.height=Ce):e.width>Ce?(e.height*=Ce/e.width,e.width=Ce):(e.width*=Ce/e.height,e.height=Ce))}function bo(e){return new Promise((t,n)=>{const r=new Image;r.decode=()=>t(r),r.onload=()=>t(r),r.onerror=n,r.crossOrigin="anonymous",r.decoding="async",r.src=e})}async function vR(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function yR(e,t,n){const r="http://www.w3.org/2000/svg",i=document.createElementNS(r,"svg"),s=document.createElementNS(r,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${n}`),i.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),i.appendChild(s),s.appendChild(e),vR(i)}const be=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||be(n,t)};function xR(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function bR(e){return Dn(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function ER(e,t,n){const r=`.${e}:${t}`,i=n.cssText?xR(n):bR(n);return document.createTextNode(`${r}{${i}}`)}function Ig(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=dR();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(ER(s,n,r)),t.appendChild(a)}function _R(e,t){Ig(e,t,":before"),Ig(e,t,":after")}const Ng="application/font-woff",Pg="image/jpeg",wR={woff:Ng,woff2:Ng,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Pg,jpeg:Pg,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function SR(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function du(e){const t=SR(e).toLowerCase();return wR[t]||""}function OR(e){return e.split(/,/)[1]}function fu(e){return e.search(/^(data:)/)!==-1}function Ug(e,t){return`data:${t};base64,${e}`}async function Bg(e,t,n){const r=await fetch(e,t);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const i=await r.blob();return new Promise((s,a)=>{const o=new FileReader;o.onerror=a,o.onloadend=()=>{try{s(n({res:r,result:o.result}))}catch(l){a(l)}},o.readAsDataURL(i)})}const pu={};function TR(e,t,n){let r=e.replace(/\?.*/,"");return n&&(r=e),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),t?`[${t}]${r}`:r}async function mu(e,t,n){const r=TR(e,t,n.includeQueryParams);if(pu[r]!=null)return pu[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await Bg(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),OR(o)));i=Ug(s,t)}catch(s){i=n.imagePlaceholder||"";let a=`Failed to fetch resource: ${e}`;s&&(a=typeof s=="string"?s:s.message),a&&console.warn(a)}return pu[r]=i,i}async function MR(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):bo(t)}async function CR(e,t){if(e.currentSrc){const s=document.createElement("canvas"),a=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,a==null||a.drawImage(e,0,0,s.width,s.height);const o=s.toDataURL();return bo(o)}const n=e.poster,r=du(n),i=await mu(n,r,t);return bo(i)}async function AR(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await Eo(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function $R(e,t){return be(e,HTMLCanvasElement)?MR(e):be(e,HTMLVideoElement)?CR(e,t):be(e,HTMLIFrameElement)?AR(e):e.cloneNode(!1)}const LR=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function RR(e,t,n){var r,i;let s=[];return LR(e)&&e.assignedNodes?s=Dn(e.assignedNodes()):be(e,HTMLIFrameElement)&&!((r=e.contentDocument)===null||r===void 0)&&r.body?s=Dn(e.contentDocument.body.childNodes):s=Dn(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||be(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>Eo(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function kR(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):Dn(r).forEach(i=>{let s=r.getPropertyValue(i);i==="font-size"&&s.endsWith("px")&&(s=`${Math.floor(parseFloat(s.substring(0,s.length-2)))-.1}px`),be(e,HTMLIFrameElement)&&i==="display"&&s==="inline"&&(s="block"),i==="d"&&t.getAttribute("d")&&(s=`path(${t.getAttribute("d")})`),n.setProperty(i,s,r.getPropertyPriority(i))})}function DR(e,t){be(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),be(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function IR(e,t){if(be(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function NR(e,t){return be(t,Element)&&(kR(e,t),_R(e,t),DR(e,t),IR(e,t)),t}async function PR(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const a=n[s].getAttribute("xlink:href");if(a){const o=e.querySelector(a),l=document.querySelector(a);!o&&l&&!r[a]&&(r[a]=await Eo(l,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function Eo(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>$R(r,t)).then(r=>RR(e,r,t)).then(r=>NR(e,r)).then(r=>PR(r,t))}const Vg=/url\((['"]?)([^'"]+?)\1\)/g,UR=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,BR=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function VR(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function HR(e){const t=[];return e.replace(Vg,(n,r,i)=>(t.push(i),n)),t.filter(n=>!fu(n))}async function FR(e,t,n,r,i){try{const s=n?hR(t,n):t,a=du(t);let o;if(i){const l=await i(s);o=Ug(l,a)}else o=await mu(s,a,r);return e.replace(VR(t),`$1${o}$3`)}catch{}return e}function zR(e,{preferredFontFormat:t}){return t?e.replace(BR,n=>{for(;;){const[r,,i]=UR.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Hg(e){return e.search(Vg)!==-1}async function Fg(e,t,n){if(!Hg(e))return e;const r=zR(e,n);return HR(r).reduce((i,s)=>i.then(a=>FR(a,s,t,n)),Promise.resolve(r))}async function _o(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Fg(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function GR(e,t){await _o("background",e,t)||await _o("background-image",e,t),await _o("mask",e,t)||await _o("mask-image",e,t)}async function jR(e,t){const n=be(e,HTMLImageElement);if(!(n&&!fu(e.src))&&!(be(e,SVGImageElement)&&!fu(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await mu(r,du(r),t);await new Promise((s,a)=>{e.onload=s,e.onerror=a;const o=e;o.decode&&(o.decode=s),o.loading==="lazy"&&(o.loading="eager"),n?(e.srcset="",e.src=i):e.href.baseVal=i})}async function WR(e,t){const n=Dn(e.childNodes).map(r=>zg(r,t));await Promise.all(n).then(()=>e)}async function zg(e,t){be(e,Element)&&(await GR(e,t),await jR(e,t),await WR(e,t))}function qR(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const r=t.style;return r!=null&&Object.keys(r).forEach(i=>{n[i]=r[i]}),e}const Gg={};async function jg(e){let t=Gg[e];if(t!=null)return t;const n=await(await fetch(e)).text();return t={url:e,cssText:n},Gg[e]=t,t}async function Wg(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,i=(n.match(/url\([^)]+\)/g)||[]).map(async s=>{let a=s.replace(r,"$1");return a.startsWith("https://")||(a=new URL(a,e.url).href),Bg(a,t.fetchRequestInit,({result:o})=>(n=n.replace(s,`url(${o})`),[s,o]))});return Promise.all(i).then(()=>n)}function qg(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let r=e.replace(n,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const l=i.exec(r);if(l===null)break;t.push(l[0])}r=r.replace(i,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,a="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(a,"gi");for(;;){let l=s.exec(r);if(l===null){if(l=o.exec(r),l===null)break;s.lastIndex=o.lastIndex}else o.lastIndex=s.lastIndex;t.push(l[0])}return t}async function YR(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{Dn(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=jg(l).then(u=>Wg(u,t)).then(u=>qg(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(jg(i.href).then(o=>Wg(o,t)).then(o=>qg(o).forEach(l=>{a.insertRule(l,i.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",s)}}),Promise.all(r).then(()=>(e.forEach(i=>{if("cssRules"in i)try{Dn(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function XR(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Hg(t.style.getPropertyValue("src")))}async function ZR(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Dn(e.ownerDocument.styleSheets),r=await YR(n,t);return XR(r)}async function KR(e,t){const n=await ZR(e,t);return(await Promise.all(n.map(r=>{const i=r.parentStyleSheet?r.parentStyleSheet.href:null;return Fg(r.cssText,i,t)}))).join(`
|
|
3
3
|
`)}async function QR(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await KR(e,t);if(n){const r=document.createElement("style"),i=document.createTextNode(n);r.appendChild(i),e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}}async function JR(e,t={}){const{width:n,height:r}=Dg(e,t),i=await Eo(e,t,!0);return await QR(i,t),await zg(i,t),qR(i,t),await yR(i,n,r)}async function Yg(e,t={}){const{width:n,height:r}=Dg(e,t),i=await JR(e,t),s=await bo(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||mR(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||gR(a),a.style.width=`${c}`,a.style.height=`${u}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,a.width,a.height)),o.drawImage(s,0,0,a.width,a.height),a}async function tk(e,t={}){return(await Yg(e,t)).toDataURL()}async function ek(e,t={}){return(await Yg(e,t)).toDataURL("image/jpeg",t.quality||1)}class In{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const nk="DONT_STYLE_ME_css_styles_verifier";let N=class dh extends In{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=I(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],v=parseFloat(p);p&&v>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=v)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:b(t.node(),"width","baseVal","value"),height:b(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*281474976710656).toString(16)}addMainContainer(){const t=this.model.getOptions(),n=b(t,"style","prefix"),r=I(this.getHolder()).append("div").classed(`${xe}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",nk),this.mainContainer=r.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:r,theme:i}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r),I(this.getHolder()).classed(`${xe}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=I(r);i.classed("filled",!0),ek(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var a;let o="myChart";const l=b(n,"fileDownload","fileName");typeof l=="function"?o=l("jpg"):typeof l=="string"&&(o=l),(a=t.services.files)==null||a.downloadImage(s,`${o}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=I(r);i.classed("filled",!0),tk(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var a;let o="myChart";const l=b(n,"fileDownload","fileName");typeof l=="function"?o=l("png"):typeof l=="string"&&(o=l),(a=t.services.files)==null||a.downloadImage(s,`${o}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}isFullScreenMode(){return I(this.getHolder()).classed("fullscreen")}toggleFullscreen(){const t=this.getHolder();I(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{const t=I(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=dh.getSVGElementSize(I(this.mainContainer),{useBBox:!0}),n=I(this.mainContainer).attr("class"),r=I(this.mainContainer).selectAll(`.${n} > svg`);let i=0;r.nodes().forEach(function(s){i+=Number(dh.getSVGElementSize(I(s),{useBBox:!0}).height)}),i<=t?I(this.mainContainer).attr("height",i):I(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&I(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(O.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(O.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=yo(()=>{var s;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(s=this.services.events)==null||s.dispatchEvent(O.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}},gu=class z0 extends In{static appendOrUpdateLinearGradient(t){let n=t.svg.select(`defs linearGradient#${t.id}`);n.empty()&&(n=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),n.selectAll("stop").remove(),n.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",r=>r.offset).style("stop-color",r=>r.color).style("stop-opacity",r=>r.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const r=t[0]<0&&t[1]>0;let i=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return r&&(i=[{offset:"0%",color:n,opacity:"0.6"},{offset:z0.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),i}};function Xg(e){const t=rk(Zg(e),360);return qn(t,[0,10])||qn(t,[350,0])?{textAnchor:mn.START,dominantBaseline:gn.MIDDLE}:qn(t,[10,80])?{textAnchor:mn.START,dominantBaseline:gn.HANGING}:qn(t,[80,100])?{textAnchor:mn.MIDDLE,dominantBaseline:gn.HANGING}:qn(t,[100,170])?{textAnchor:mn.END,dominantBaseline:gn.HANGING}:qn(t,[170,190])?{textAnchor:mn.END,dominantBaseline:gn.MIDDLE}:qn(t,[190,260])?{textAnchor:mn.END,dominantBaseline:gn.BASELINE}:qn(t,[260,280])?{textAnchor:mn.MIDDLE,dominantBaseline:gn.BASELINE}:{textAnchor:mn.START,dominantBaseline:gn.BASELINE}}function rk(e,t){return(e%t+t)%t}function qn(e,[t,n]){return e>=t&&e<=n}function Zg(e){return e*(180/Math.PI)}function Yt(e,t,n={x:0,y:0}){const r=t*Math.cos(e)+n.x,i=t*Math.sin(e)+n.y;return{x:isNaN(r)?0:r,y:isNaN(i)?0:i}}function ik(e,t){return t*Math.sin(e-Math.PI/2)}function Kg(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function sk(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function vu(e,t){let n=0;if(t===void 0)for(let r of e)(r=+r)&&(n+=r);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function ak(e){return e.depth}function ok(e,t){return t-1-e.height}function Qg(e,t){return e.sourceLinks.length?e.depth:t-1}function wo(e){return function(){return e}}function Jg(e,t){return So(e.source,t.source)||e.index-t.index}function tv(e,t){return So(e.target,t.target)||e.index-t.index}function So(e,t){return e.y0-t.y0}function yu(e){return e.value}function lk(e){return e.index}function ck(e){return e.nodes}function uk(e){return e.links}function ev(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function nv({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function hk(){let e=0,t=0,n=1,r=1,i=24,s=8,a,o=lk,l=Qg,c,u,d=ck,h=uk,f=6;function p(){const E={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return v(E),m(E),y(E),g(E),_(E),nv(E),E}p.update=function(E){return nv(E),E},p.nodeId=function(E){return arguments.length?(o=typeof E=="function"?E:wo(E),p):o},p.nodeAlign=function(E){return arguments.length?(l=typeof E=="function"?E:wo(E),p):l},p.nodeSort=function(E){return arguments.length?(c=E,p):c},p.nodeWidth=function(E){return arguments.length?(i=+E,p):i},p.nodePadding=function(E){return arguments.length?(s=a=+E,p):s},p.nodes=function(E){return arguments.length?(d=typeof E=="function"?E:wo(E),p):d},p.links=function(E){return arguments.length?(h=typeof E=="function"?E:wo(E),p):h},p.linkSort=function(E){return arguments.length?(u=E,p):u},p.size=function(E){return arguments.length?(e=t=0,n=+E[0],r=+E[1],p):[n-e,r-t]},p.extent=function(E){return arguments.length?(e=+E[0][0],n=+E[1][0],t=+E[0][1],r=+E[1][1],p):[[e,t],[n,r]]},p.iterations=function(E){return arguments.length?(f=+E,p):f};function v({nodes:E,links:L}){for(const[U,B]of E.entries())B.index=U,B.sourceLinks=[],B.targetLinks=[];const $=new Map(E.map((U,B)=>[o(U,B,E),U]));for(const[U,B]of L.entries()){B.index=U;let{source:X,target:Y}=B;typeof X!="object"&&(X=B.source=ev($,X)),typeof Y!="object"&&(Y=B.target=ev($,Y)),X.sourceLinks.push(B),Y.targetLinks.push(B)}if(u!=null)for(const{sourceLinks:U,targetLinks:B}of E)U.sort(u),B.sort(u)}function m({nodes:E}){for(const L of E)L.value=L.fixedValue===void 0?Math.max(vu(L.sourceLinks,yu),vu(L.targetLinks,yu)):L.fixedValue}function y({nodes:E}){const L=E.length;let $=new Set(E),U=new Set,B=0;for(;$.size;){for(const X of $){X.depth=B;for(const{target:Y}of X.sourceLinks)U.add(Y)}if(++B>L)throw new Error("circular link");$=U,U=new Set}}function g({nodes:E}){const L=E.length;let $=new Set(E),U=new Set,B=0;for(;$.size;){for(const X of $){X.height=B;for(const{source:Y}of X.targetLinks)U.add(Y)}if(++B>L)throw new Error("circular link");$=U,U=new Set}}function x({nodes:E}){const L=Kg(E,B=>B.depth)+1,$=(n-e-i)/(L-1),U=new Array(L);for(const B of E){const X=Math.max(0,Math.min(L-1,Math.floor(l.call(null,B,L))));B.layer=X,B.x0=e+X*$,B.x1=B.x0+i,U[X]?U[X].push(B):U[X]=[B]}if(c)for(const B of U)B.sort(c);return U}function w(E){const L=sk(E,$=>(r-t-($.length-1)*a)/vu($,yu));for(const $ of E){let U=t;for(const B of $){B.y0=U,B.y1=U+B.value*L,U=B.y1+a;for(const X of B.sourceLinks)X.width=X.value*L}U=(r-U+a)/($.length+1);for(let B=0;B<$.length;++B){const X=$[B];X.y0+=U*(B+1),X.y1+=U*(B+1)}H($)}}function _(E){const L=x(E);a=Math.min(s,(r-t)/(Kg(L,$=>$.length)-1)),w(L);for(let $=0;$<f;++$){const U=Math.pow(.99,$),B=Math.max(1-U,($+1)/f);A(L,U,B),S(L,U,B)}}function S(E,L,$){for(let U=1,B=E.length;U<B;++U){const X=E[U];for(const Y of X){let st=0,nt=0;for(const{source:_t,value:K}of Y.targetLinks){let et=K*(Y.layer-_t.layer);st+=P(_t,Y)*et,nt+=et}if(!(nt>0))continue;let ft=(st/nt-Y.y0)*L;Y.y0+=ft,Y.y1+=ft,T(Y)}c===void 0&&X.sort(So),D(X,$)}}function A(E,L,$){for(let U=E.length,B=U-2;B>=0;--B){const X=E[B];for(const Y of X){let st=0,nt=0;for(const{target:_t,value:K}of Y.sourceLinks){let et=K*(_t.layer-Y.layer);st+=V(Y,_t)*et,nt+=et}if(!(nt>0))continue;let ft=(st/nt-Y.y0)*L;Y.y0+=ft,Y.y1+=ft,T(Y)}c===void 0&&X.sort(So),D(X,$)}}function D(E,L){const $=E.length>>1,U=E[$];R(E,U.y0-a,$-1,L),k(E,U.y1+a,$+1,L),R(E,r,E.length-1,L),k(E,t,0,L)}function k(E,L,$,U){for(;$<E.length;++$){const B=E[$],X=(L-B.y0)*U;X>1e-6&&(B.y0+=X,B.y1+=X),L=B.y1+a}}function R(E,L,$,U){for(;$>=0;--$){const B=E[$],X=(B.y1-L)*U;X>1e-6&&(B.y0-=X,B.y1-=X),L=B.y0-a}}function T({sourceLinks:E,targetLinks:L}){if(u===void 0){for(const{source:{sourceLinks:$}}of L)$.sort(tv);for(const{target:{targetLinks:$}}of E)$.sort(Jg)}}function H(E){if(u===void 0)for(const{sourceLinks:L,targetLinks:$}of E)L.sort(tv),$.sort(Jg)}function P(E,L){let $=E.y0-(E.sourceLinks.length-1)*a/2;for(const{target:U,width:B}of E.sourceLinks){if(U===L)break;$+=B+a}for(const{source:U,width:B}of L.targetLinks){if(U===E)break;$-=B}return $}function V(E,L){let $=L.y0-(L.targetLinks.length-1)*a/2;for(const{source:U,width:B}of L.targetLinks){if(U===E)break;$+=B+a}for(const{target:U,width:B}of E.sourceLinks){if(U===L)break;$-=B}return $}return p}var xu=Math.PI,bu=2*xu,Mr=1e-6,dk=bu-Mr;function Eu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function rv(){return new Eu}Eu.prototype=rv.prototype={constructor:Eu,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,s){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+s)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var s=this._x1,a=this._y1,o=n-e,l=r-t,c=s-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Mr)if(!(Math.abs(u*o-l*c)>Mr)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-s,f=r-a,p=o*o+l*l,v=h*h+f*f,m=Math.sqrt(p),y=Math.sqrt(d),g=i*Math.tan((xu-Math.acos((p+d-v)/(2*m*y)))/2),x=g/y,w=g/m;Math.abs(x-1)>Mr&&(this._+="L"+(e+x*c)+","+(t+x*u)),this._+="A"+i+","+i+",0,0,"+ +(u*h>c*f)+","+(this._x1=e+w*o)+","+(this._y1=t+w*l)}},arc:function(e,t,n,r,i,s){e=+e,t=+t,n=+n,s=!!s;var a=n*Math.cos(r),o=n*Math.sin(r),l=e+a,c=t+o,u=1^s,d=s?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Mr||Math.abs(this._y1-c)>Mr)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%bu+bu),d>dk?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>Mr&&(this._+="A"+n+","+n+",0,"+ +(d>=xu)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function iv(e){return function(){return e}}function fk(e){return e[0]}function pk(e){return e[1]}var mk=Array.prototype.slice;function gk(e){return e.source}function vk(e){return e.target}function yk(e){var t=gk,n=vk,r=fk,i=pk,s=null;function a(){var o,l=mk.call(arguments),c=t.apply(this,l),u=n.apply(this,l);if(s||(s=o=rv()),e(s,+r.apply(this,(l[0]=c,l)),+i.apply(this,l),+r.apply(this,(l[0]=u,l)),+i.apply(this,l)),o)return s=null,o+""||null}return a.source=function(o){return arguments.length?(t=o,a):t},a.target=function(o){return arguments.length?(n=o,a):n},a.x=function(o){return arguments.length?(r=typeof o=="function"?o:iv(+o),a):r},a.y=function(o){return arguments.length?(i=typeof o=="function"?o:iv(+o),a):i},a.context=function(o){return arguments.length?(s=o??null,a):s},a}function xk(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function bk(){return yk(xk)}function Ek(e){return[e.source.x1,e.y0]}function _k(e){return[e.target.x0,e.y1]}function wk(){return bk().source(Ek).target(_k)}function sv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Sk(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Ok={value:function(){}};function av(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Oo(n)}function Oo(e){this._=e}function Tk(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Oo.prototype=av.prototype={constructor:Oo,on:function(e,t){var n=this._,r=Tk(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=Mk(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=ov(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ov(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Oo(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Mk(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ov(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ok,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const Ck=Sk(Object.freeze(Object.defineProperty({__proto__:null,dispatch:av},Symbol.toStringTag,{value:"Module"}))).dispatch,_u=Math.PI/180,Ak={archimedean:cv,rectangular:Vk},ws=64,To=2048;var $k=function(){var e=[256,256],t=Lk,n=Rk,r=kk,i=lv,s=lv,a=Dk,o=Ik,l=cv,c=[],u=1/0,d=Ck("word","end"),h=null,f=Math.random,p={},v=Fk;p.canvas=function(g){return arguments.length?(v=Yn(g),p):v},p.start=function(){var g=m(v()),x=Hk((e[0]>>5)*e[1]),w=null,_=c.length,S=-1,A=[],D=c.map(function(R,T){return R.text=t.call(this,R,T),R.font=n.call(this,R,T),R.style=i.call(this,R,T),R.weight=s.call(this,R,T),R.rotate=a.call(this,R,T),R.size=~~r.call(this,R,T),R.padding=o.call(this,R,T),R}).sort(function(R,T){return T.size-R.size});return h&&clearInterval(h),h=setInterval(k,0),k(),p;function k(){for(var R=Date.now();Date.now()-R<u&&++S<_&&h;){var T=D[S];T.x=e[0]*(f()+.5)>>1,T.y=e[1]*(f()+.5)>>1,Nk(g,T,D,S),T.hasText&&y(x,T,w)&&(A.push(T),d.call("word",p,T),w?Uk(w,T):w=[{x:T.x+T.x0,y:T.y+T.y0},{x:T.x+T.x1,y:T.y+T.y1}],T.x-=e[0]>>1,T.y-=e[1]>>1)}S>=_&&(p.stop(),d.call("end",p,A,w))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const g of c)delete g.sprite;return p};function m(g){const x=g.getContext("2d",{willReadFrequently:!0});g.width=g.height=1;const w=Math.sqrt(x.getImageData(0,0,1,1).data.length>>2);return g.width=(ws<<5)/w,g.height=To/w,x.fillStyle=x.strokeStyle="red",{context:x,ratio:w}}function y(g,x,w){e[0],e[1];for(var _=x.x,S=x.y,A=Math.sqrt(e[0]*e[0]+e[1]*e[1]),D=l(e),k=f()<.5?1:-1,R=-k,T,H,P;(T=D(R+=k))&&(H=~~T[0],P=~~T[1],!(Math.min(Math.abs(H),Math.abs(P))>=A));)if(x.x=_+H,x.y=S+P,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!w||Bk(x,w))&&!Pk(x,g,e[0])){for(var V=x.sprite,E=x.width>>5,L=e[0]>>5,$=x.x-(E<<4),U=$&127,B=32-U,X=x.y1-x.y0,Y=(x.y+x.y0)*L+($>>5),st,nt=0;nt<X;nt++){st=0;for(var ft=0;ft<=E;ft++)g[Y+ft]|=st<<B|(ft<E?(st=V[nt*E+ft])>>>U:0);Y+=L}return!0}return!1}return p.timeInterval=function(g){return arguments.length?(u=g??1/0,p):u},p.words=function(g){return arguments.length?(c=g,p):c},p.size=function(g){return arguments.length?(e=[+g[0],+g[1]],p):e},p.font=function(g){return arguments.length?(n=Yn(g),p):n},p.fontStyle=function(g){return arguments.length?(i=Yn(g),p):i},p.fontWeight=function(g){return arguments.length?(s=Yn(g),p):s},p.rotate=function(g){return arguments.length?(a=Yn(g),p):a},p.text=function(g){return arguments.length?(t=Yn(g),p):t},p.spiral=function(g){return arguments.length?(l=Ak[g]||g,p):l},p.fontSize=function(g){return arguments.length?(r=Yn(g),p):r},p.padding=function(g){return arguments.length?(o=Yn(g),p):o},p.random=function(g){return arguments.length?(f=g,p):f},p.on=function(){var g=d.on.apply(d,arguments);return g===d?p:g},p};function Lk(e){return e.text}function Rk(){return"serif"}function lv(){return"normal"}function kk(e){return Math.sqrt(e.value)}function Dk(){return(~~(random()*6)-3)*30}function Ik(){return 1}function Nk(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(ws<<5)/s,To/s);var a=0,o=0,l=0,c=n.length;for(--r;++r<c;){t=n[r],i.save(),i.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;const T=i.measureText(t.text),H=-Math.floor(T.width/2);let P=(T.width+1)*s,V=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*_u),d=Math.cos(t.rotate*_u),h=P*d,f=P*u,p=V*d,v=V*u;P=Math.max(Math.abs(h+v),Math.abs(h-v))+31>>5<<5,V=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else P=P+31>>5<<5;if(V>l&&(l=V),a+P>=ws<<5&&(a=0,o+=l,l=0),o+V>=To)break;i.translate((a+(P>>1))/s,(o+(V>>1))/s),t.rotate&&i.rotate(t.rotate*_u),i.fillText(t.text,H,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,H,0)),i.restore(),t.width=P,t.height=V,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=V>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(ws<<5)/s,To/s).data,y=[];--r>=0;)if(t=n[r],!!t.hasText){for(var g=t.width,x=g>>5,w=t.y1-t.y0,_=0;_<w*x;_++)y[_]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var S=0,A=-1,D=0;D<w;D++){for(var _=0;_<g;_++){var k=x*D+(_>>5),R=m[(o+D)*(ws<<5)+(a+_)<<2]?1<<31-_%32:0;y[k]|=R,S|=R}S?A=D:(t.y0++,w--,D--,o++)}t.y1=t.y0+A,t.sprite=y.slice(0,(t.y1-t.y0)*x)}}}function Pk(e,t,n){n>>=5;for(var r=e.sprite,i=e.width>>5,s=e.x-(i<<4),a=s&127,o=32-a,l=e.y1-e.y0,c=(e.y+e.y0)*n+(s>>5),u,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function Uk(e,t){var n=e[0],r=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>r.x&&(r.x=t.x+t.x1),t.y+t.y1>r.y&&(r.y=t.y+t.y1)}function Bk(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0<t[1].x&&e.y+e.y1>t[0].y&&e.y+e.y0<t[1].y}function cv(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Vk(e){var t=4,n=t*e[0]/e[1],r=0,i=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:r+=n;break;case 1:i+=t;break;case 2:r-=n;break;default:i-=t;break}return[r,i]}}function Hk(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function Fk(){return document.createElement("canvas")}function Yn(e){return typeof e=="function"?e:function(){return e}}const zk=sv($k);function Gk(e,t,n,r){var i=-1,s=e==null?0:e.length;for(r&&s&&(n=e[++i]);++i<s;)n=t(n,e[i],i,e);return n}function jk(e){return function(t){return e==null?void 0:e[t]}}var Wk={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qk=jk(Wk);const Yk=qk;var Xk=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zk="\\u0300-\\u036f",Kk="\\ufe20-\\ufe2f",Qk="\\u20d0-\\u20ff",Jk=Zk+Kk+Qk,tD="["+Jk+"]",eD=RegExp(tD,"g");function nD(e){return e=ms(e),e&&e.replace(Xk,Yk).replace(eD,"")}var rD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function iD(e){return e.match(rD)||[]}var sD=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function aD(e){return sD.test(e)}var uv="\\ud800-\\udfff",oD="\\u0300-\\u036f",lD="\\ufe20-\\ufe2f",cD="\\u20d0-\\u20ff",uD=oD+lD+cD,hv="\\u2700-\\u27bf",dv="a-z\\xdf-\\xf6\\xf8-\\xff",hD="\\xac\\xb1\\xd7\\xf7",dD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fD="\\u2000-\\u206f",pD=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fv="A-Z\\xc0-\\xd6\\xd8-\\xde",mD="\\ufe0e\\ufe0f",pv=hD+dD+fD+pD,mv="['’]",gv="["+pv+"]",gD="["+uD+"]",vv="\\d+",vD="["+hv+"]",yv="["+dv+"]",xv="[^"+uv+pv+vv+hv+dv+fv+"]",yD="\\ud83c[\\udffb-\\udfff]",xD="(?:"+gD+"|"+yD+")",bD="[^"+uv+"]",bv="(?:\\ud83c[\\udde6-\\uddff]){2}",Ev="[\\ud800-\\udbff][\\udc00-\\udfff]",di="["+fv+"]",ED="\\u200d",_v="(?:"+yv+"|"+xv+")",_D="(?:"+di+"|"+xv+")",wv="(?:"+mv+"(?:d|ll|m|re|s|t|ve))?",Sv="(?:"+mv+"(?:D|LL|M|RE|S|T|VE))?",Ov=xD+"?",Tv="["+mD+"]?",wD="(?:"+ED+"(?:"+[bD,bv,Ev].join("|")+")"+Tv+Ov+")*",SD="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",OD="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",TD=Tv+Ov+wD,MD="(?:"+[vD,bv,Ev].join("|")+")"+TD,CD=RegExp([di+"?"+yv+"+"+wv+"(?="+[gv,di,"$"].join("|")+")",_D+"+"+Sv+"(?="+[gv,di+_v,"$"].join("|")+")",di+"?"+_v+"+"+wv,di+"+"+Sv,OD,SD,vv,MD].join("|"),"g");function AD(e){return e.match(CD)||[]}function $D(e,t,n){return e=ms(e),t=n?void 0:t,t===void 0?aD(e)?AD(e):iD(e):e.match(t)||[]}var LD="['’]",RD=RegExp(LD,"g");function Mv(e){return function(t){return Gk($D(nD(t).replace(RD,"")),e,"")}}function kD(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Cv(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=_s(n),n=n===n?n:0),t!==void 0&&(t=_s(t),t=t===t?t:0),kD(_s(e),t,n)}function DD(e,t){var n=-1,r=br(e)?Array(e.length):[];return uu(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function ID(e,t){var n=re(e)?Zp:DD;return n(e,fo(t))}var ND=1/0;function PD(e,t){return oo(ID(e,t),ND)}function Av(e,t){return ho(e,t)}var UD=Mv(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const fi=UD;function BD(e,t){var n;return uu(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function VD(e,t,n){var r=re(e)?Gm:BD;return n&&am(e,t,n)&&(t=void 0),r(e,fo(t))}let bt=class{constructor(t,n,r){if(this.type="",this.renderType=rt.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=b(this.model.getOptions(),"style","prefix");this.id=`${i}--${this.configs.id}`}this.parent||this.setParent(I(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){var n;const r=this.parent;if(this.parent=t,!(r&&r.node()===t.node())&&this.type){const i=b(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${xe}--${i}--${this.type}`,!0),r&&r.classed(`${xe}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=b(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=N.appendOrSelect(this.parent,`${this.renderType===rt.SVG?"svg":"div"}${r}.${xe}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const a=I(`#${s}`).select("rect");a.size()!==0&&parseFloat(a.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?lt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}};/*! @license DOMPurify 3.0.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.8/LICENSE */const{entries:$v,setPrototypeOf:Lv,isFrozen:HD,getPrototypeOf:FD,getOwnPropertyDescriptor:wu}=Object;let{freeze:me,seal:tn,create:Rv}=Object,{apply:Su,construct:Ou}=typeof Reflect<"u"&&Reflect;me||(me=function(e){return e}),tn||(tn=function(e){return e}),Su||(Su=function(e,t,n){return e.apply(t,n)}),Ou||(Ou=function(e,t){return new e(...t)});const Mo=Ve(Array.prototype.forEach),kv=Ve(Array.prototype.pop),Ss=Ve(Array.prototype.push),Co=Ve(String.prototype.toLowerCase),Tu=Ve(String.prototype.toString),zD=Ve(String.prototype.match),Os=Ve(String.prototype.replace),GD=Ve(String.prototype.indexOf),jD=Ve(String.prototype.trim),Ae=Ve(RegExp.prototype.test),Ts=WD(TypeError);function Ve(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Su(e,t,r)}}function WD(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ou(e,n)}}function Et(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Co;Lv&&Lv(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(HD(t)||(t[r]=s),i=s)}e[i]=!0}return e}function qD(e){for(let t=0;t<e.length;t++)wu(e,t)===void 0&&(e[t]=null);return e}function Cr(e){const t=Rv(null);for(const[n,r]of $v(e))wu(e,n)!==void 0&&(Array.isArray(r)?t[n]=qD(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Cr(r):t[n]=r);return t}function Ao(e,t){for(;e!==null;){const r=wu(e,t);if(r){if(r.get)return Ve(r.get);if(typeof r.value=="function")return Ve(r.value)}e=FD(e)}function n(r){return console.warn("fallback value for",r),null}return n}const Dv=me(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mu=me(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Cu=me(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YD=me(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Au=me(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),XD=me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Iv=me(["#text"]),Nv=me(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$u=me(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Pv=me(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$o=me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ZD=tn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),KD=tn(/<%[\w\W]*|[\w\W]*%>/gm),QD=tn(/\${[\w\W]*}/gm),JD=tn(/^data-[\-\w.\u00B7-\uFFFF]/),tI=tn(/^aria-[\-\w]+$/),Uv=tn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),eI=tn(/^(?:\w+script|data):/i),nI=tn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Bv=tn(/^html$/i);var Vv=Object.freeze({__proto__:null,MUSTACHE_EXPR:ZD,ERB_EXPR:KD,TMPLIT_EXPR:QD,DATA_ATTR:JD,ARIA_ATTR:tI,IS_ALLOWED_URI:Uv,IS_SCRIPT_OR_DATA:eI,ATTR_WHITESPACE:nI,DOCTYPE_NAME:Bv});const rI=function(){return typeof window>"u"?null:window},iI=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function Hv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:rI();const t=M=>Hv(M);if(t.version="3.0.8",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=e,p=l.prototype,v=Ao(p,"cloneNode"),m=Ao(p,"nextSibling"),y=Ao(p,"childNodes"),g=Ao(p,"parentNode");if(typeof a=="function"){const M=n.createElement("template");M.content&&M.content.ownerDocument&&(n=M.content.ownerDocument)}let x,w="";const{implementation:_,createNodeIterator:S,createDocumentFragment:A,getElementsByTagName:D}=n,{importNode:k}=r;let R={};t.isSupported=typeof $v=="function"&&typeof g=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:T,ERB_EXPR:H,TMPLIT_EXPR:P,DATA_ATTR:V,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:L,ATTR_WHITESPACE:$}=Vv;let{IS_ALLOWED_URI:U}=Vv,B=null;const X=Et({},[...Dv,...Mu,...Cu,...Au,...Iv]);let Y=null;const st=Et({},[...Nv,...$u,...Pv,...$o]);let nt=Object.seal(Rv(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ft=null,_t=null,K=!0,et=!0,gt=!1,q=!0,Q=!1,ot=!1,G=!1,kt=!1,yt=!1,Ht=!1,Ft=!1,it=!0,Dt=!1;const He="user-content-";let we=!0,$r=!1,pn={},Qn=null;const Fo=Et({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rs=null;const ks=Et({},["audio","video","img","source","image","track"]);let Pn=null;const zo=Et({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Lr="http://www.w3.org/1998/Math/MathML",Rr="http://www.w3.org/2000/svg",Re="http://www.w3.org/1999/xhtml";let Jn=Re,Ds=!1,Is=null;const oh=Et({},[Lr,Rr,Re],Tu);let kr=null;const lh=["application/xhtml+xml","text/html"],ch="text/html";let Xt=null,Un=null;const tr=n.createElement("form"),xi=function(M){return M instanceof RegExp||M instanceof Function},Dr=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Un&&Un===M)){if((!M||typeof M!="object")&&(M={}),M=Cr(M),kr=lh.indexOf(M.PARSER_MEDIA_TYPE)===-1?ch:M.PARSER_MEDIA_TYPE,Xt=kr==="application/xhtml+xml"?Tu:Co,B="ALLOWED_TAGS"in M?Et({},M.ALLOWED_TAGS,Xt):X,Y="ALLOWED_ATTR"in M?Et({},M.ALLOWED_ATTR,Xt):st,Is="ALLOWED_NAMESPACES"in M?Et({},M.ALLOWED_NAMESPACES,Tu):oh,Pn="ADD_URI_SAFE_ATTR"in M?Et(Cr(zo),M.ADD_URI_SAFE_ATTR,Xt):zo,Rs="ADD_DATA_URI_TAGS"in M?Et(Cr(ks),M.ADD_DATA_URI_TAGS,Xt):ks,Qn="FORBID_CONTENTS"in M?Et({},M.FORBID_CONTENTS,Xt):Fo,ft="FORBID_TAGS"in M?Et({},M.FORBID_TAGS,Xt):{},_t="FORBID_ATTR"in M?Et({},M.FORBID_ATTR,Xt):{},pn="USE_PROFILES"in M?M.USE_PROFILES:!1,K=M.ALLOW_ARIA_ATTR!==!1,et=M.ALLOW_DATA_ATTR!==!1,gt=M.ALLOW_UNKNOWN_PROTOCOLS||!1,q=M.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=M.SAFE_FOR_TEMPLATES||!1,ot=M.WHOLE_DOCUMENT||!1,yt=M.RETURN_DOM||!1,Ht=M.RETURN_DOM_FRAGMENT||!1,Ft=M.RETURN_TRUSTED_TYPE||!1,kt=M.FORCE_BODY||!1,it=M.SANITIZE_DOM!==!1,Dt=M.SANITIZE_NAMED_PROPS||!1,we=M.KEEP_CONTENT!==!1,$r=M.IN_PLACE||!1,U=M.ALLOWED_URI_REGEXP||Uv,Jn=M.NAMESPACE||Re,nt=M.CUSTOM_ELEMENT_HANDLING||{},M.CUSTOM_ELEMENT_HANDLING&&xi(M.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(nt.tagNameCheck=M.CUSTOM_ELEMENT_HANDLING.tagNameCheck),M.CUSTOM_ELEMENT_HANDLING&&xi(M.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(nt.attributeNameCheck=M.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),M.CUSTOM_ELEMENT_HANDLING&&typeof M.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(nt.allowCustomizedBuiltInElements=M.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(et=!1),Ht&&(yt=!0),pn&&(B=Et({},Iv),Y=[],pn.html===!0&&(Et(B,Dv),Et(Y,Nv)),pn.svg===!0&&(Et(B,Mu),Et(Y,$u),Et(Y,$o)),pn.svgFilters===!0&&(Et(B,Cu),Et(Y,$u),Et(Y,$o)),pn.mathMl===!0&&(Et(B,Au),Et(Y,Pv),Et(Y,$o))),M.ADD_TAGS&&(B===X&&(B=Cr(B)),Et(B,M.ADD_TAGS,Xt)),M.ADD_ATTR&&(Y===st&&(Y=Cr(Y)),Et(Y,M.ADD_ATTR,Xt)),M.ADD_URI_SAFE_ATTR&&Et(Pn,M.ADD_URI_SAFE_ATTR,Xt),M.FORBID_CONTENTS&&(Qn===Fo&&(Qn=Cr(Qn)),Et(Qn,M.FORBID_CONTENTS,Xt)),we&&(B["#text"]=!0),ot&&Et(B,["html","head","body"]),B.table&&(Et(B,["tbody"]),delete ft.tbody),M.TRUSTED_TYPES_POLICY){if(typeof M.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof M.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=M.TRUSTED_TYPES_POLICY,w=x.createHTML("")}else x===void 0&&(x=iI(f,i)),x!==null&&typeof w=="string"&&(w=x.createHTML(""));me&&me(M),Un=M}},Ns=Et({},["mi","mo","mn","ms","mtext"]),Go=Et({},["foreignobject","desc","title","annotation-xml"]),jo=Et({},["title","style","font","a","script"]),Wo=Et({},[...Mu,...Cu,...YD]),Ps=Et({},[...Au,...XD]),qo=function(M){let j=g(M);(!j||!j.tagName)&&(j={namespaceURI:Jn,tagName:"template"});const F=Co(M.tagName),ht=Co(j.tagName);return Is[M.namespaceURI]?M.namespaceURI===Rr?j.namespaceURI===Re?F==="svg":j.namespaceURI===Lr?F==="svg"&&(ht==="annotation-xml"||Ns[ht]):!!Wo[F]:M.namespaceURI===Lr?j.namespaceURI===Re?F==="math":j.namespaceURI===Rr?F==="math"&&Go[ht]:!!Ps[F]:M.namespaceURI===Re?j.namespaceURI===Rr&&!Go[ht]||j.namespaceURI===Lr&&!Ns[ht]?!1:!Ps[F]&&(jo[F]||!Wo[F]):!!(kr==="application/xhtml+xml"&&Is[M.namespaceURI]):!1},er=function(M){Ss(t.removed,{element:M});try{M.parentNode.removeChild(M)}catch{M.remove()}},Us=function(M,j){try{Ss(t.removed,{attribute:j.getAttributeNode(M),from:j})}catch{Ss(t.removed,{attribute:null,from:j})}if(j.removeAttribute(M),M==="is"&&!Y[M])if(yt||Ht)try{er(j)}catch{}else try{j.setAttribute(M,"")}catch{}},Bs=function(M){let j=null,F=null;if(kt)M="<remove></remove>"+M;else{const pt=zD(M,/^[\r\n\t ]+/);F=pt&&pt[0]}kr==="application/xhtml+xml"&&Jn===Re&&(M='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+M+"</body></html>");const ht=x?x.createHTML(M):M;if(Jn===Re)try{j=new h().parseFromString(ht,kr)}catch{}if(!j||!j.documentElement){j=_.createDocument(Jn,"template",null);try{j.documentElement.innerHTML=Ds?w:ht}catch{}}const vt=j.body||j.documentElement;return M&&F&&vt.insertBefore(n.createTextNode(F),vt.childNodes[0]||null),Jn===Re?D.call(j,ot?"html":"body")[0]:ot?j.documentElement:vt},Yo=function(M){return S.call(M.ownerDocument||M,M,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null)},uh=function(M){return M instanceof d&&(typeof M.nodeName!="string"||typeof M.textContent!="string"||typeof M.removeChild!="function"||!(M.attributes instanceof u)||typeof M.removeAttribute!="function"||typeof M.setAttribute!="function"||typeof M.namespaceURI!="string"||typeof M.insertBefore!="function"||typeof M.hasChildNodes!="function")},Xo=function(M){return typeof o=="function"&&M instanceof o},nn=function(M,j,F){R[M]&&Mo(R[M],ht=>{ht.call(t,j,F,Un)})},C=function(M){let j=null;if(nn("beforeSanitizeElements",M,null),uh(M))return er(M),!0;const F=Xt(M.nodeName);if(nn("uponSanitizeElement",M,{tagName:F,allowedTags:B}),M.hasChildNodes()&&!Xo(M.firstElementChild)&&Ae(/<[/\w]/g,M.innerHTML)&&Ae(/<[/\w]/g,M.textContent))return er(M),!0;if(!B[F]||ft[F]){if(!ft[F]&&Z(F)&&(nt.tagNameCheck instanceof RegExp&&Ae(nt.tagNameCheck,F)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(F)))return!1;if(we&&!Qn[F]){const ht=g(M)||M.parentNode,vt=y(M)||M.childNodes;if(vt&&ht){const pt=vt.length;for(let Zt=pt-1;Zt>=0;--Zt)ht.insertBefore(v(vt[Zt],!0),m(M))}}return er(M),!0}return M instanceof l&&!qo(M)||(F==="noscript"||F==="noembed"||F==="noframes")&&Ae(/<\/no(script|embed|frames)/i,M.innerHTML)?(er(M),!0):(Q&&M.nodeType===3&&(j=M.textContent,Mo([T,H,P],ht=>{j=Os(j,ht," ")}),M.textContent!==j&&(Ss(t.removed,{element:M.cloneNode()}),M.textContent=j)),nn("afterSanitizeElements",M,null),!1)},W=function(M,j,F){if(it&&(j==="id"||j==="name")&&(F in n||F in tr))return!1;if(!(et&&!_t[j]&&Ae(V,j))&&!(K&&Ae(E,j))){if(!Y[j]||_t[j]){if(!(Z(M)&&(nt.tagNameCheck instanceof RegExp&&Ae(nt.tagNameCheck,M)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(M))&&(nt.attributeNameCheck instanceof RegExp&&Ae(nt.attributeNameCheck,j)||nt.attributeNameCheck instanceof Function&&nt.attributeNameCheck(j))||j==="is"&&nt.allowCustomizedBuiltInElements&&(nt.tagNameCheck instanceof RegExp&&Ae(nt.tagNameCheck,F)||nt.tagNameCheck instanceof Function&&nt.tagNameCheck(F))))return!1}else if(!Pn[j]&&!Ae(U,Os(F,$,""))&&!((j==="src"||j==="xlink:href"||j==="href")&&M!=="script"&&GD(F,"data:")===0&&Rs[M])&&!(gt&&!Ae(L,Os(F,$,"")))&&F)return!1}return!0},Z=function(M){return M.indexOf("-")>0},ct=function(M){nn("beforeSanitizeAttributes",M,null);const{attributes:j}=M;if(!j)return;const F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Y};let ht=j.length;for(;ht--;){const vt=j[ht],{name:pt,namespaceURI:Zt,value:de}=vt,ke=Xt(pt);let jt=pt==="value"?de:jD(de);if(F.attrName=ke,F.attrValue=jt,F.keepAttr=!0,F.forceKeepAttr=void 0,nn("uponSanitizeAttribute",M,F),jt=F.attrValue,F.forceKeepAttr||(Us(pt,M),!F.keepAttr))continue;if(!q&&Ae(/\/>/i,jt)){Us(pt,M);continue}Q&&Mo([T,H,P],qV=>{jt=Os(jt,qV," ")});const F0=Xt(M.nodeName);if(W(F0,ke,jt)){if(Dt&&(ke==="id"||ke==="name")&&(Us(pt,M),jt=He+jt),x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Zt)switch(f.getAttributeType(F0,ke)){case"TrustedHTML":{jt=x.createHTML(jt);break}case"TrustedScriptURL":{jt=x.createScriptURL(jt);break}}try{Zt?M.setAttributeNS(Zt,pt,jt):M.setAttribute(pt,jt),kv(t.removed)}catch{}}}nn("afterSanitizeAttributes",M,null)},St=function M(j){let F=null;const ht=Yo(j);for(nn("beforeSanitizeShadowDOM",j,null);F=ht.nextNode();)nn("uponSanitizeShadowNode",F,null),!C(F)&&(F.content instanceof s&&M(F.content),ct(F));nn("afterSanitizeShadowDOM",j,null)};return t.sanitize=function(M){let j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=null,ht=null,vt=null,pt=null;if(Ds=!M,Ds&&(M="<!-->"),typeof M!="string"&&!Xo(M))if(typeof M.toString=="function"){if(M=M.toString(),typeof M!="string")throw Ts("dirty is not a string, aborting")}else throw Ts("toString is not a function");if(!t.isSupported)return M;if(G||Dr(j),t.removed=[],typeof M=="string"&&($r=!1),$r){if(M.nodeName){const ke=Xt(M.nodeName);if(!B[ke]||ft[ke])throw Ts("root node is forbidden and cannot be sanitized in-place")}}else if(M instanceof o)F=Bs("<!---->"),ht=F.ownerDocument.importNode(M,!0),ht.nodeType===1&&ht.nodeName==="BODY"||ht.nodeName==="HTML"?F=ht:F.appendChild(ht);else{if(!yt&&!Q&&!ot&&M.indexOf("<")===-1)return x&&Ft?x.createHTML(M):M;if(F=Bs(M),!F)return yt?null:Ft?w:""}F&&kt&&er(F.firstChild);const Zt=Yo($r?M:F);for(;vt=Zt.nextNode();)C(vt)||(vt.content instanceof s&&St(vt.content),ct(vt));if($r)return M;if(yt){if(Ht)for(pt=A.call(F.ownerDocument);F.firstChild;)pt.appendChild(F.firstChild);else pt=F;return(Y.shadowroot||Y.shadowrootmode)&&(pt=k.call(r,pt,!0)),pt}let de=ot?F.outerHTML:F.innerHTML;return ot&&B["!doctype"]&&F.ownerDocument&&F.ownerDocument.doctype&&F.ownerDocument.doctype.name&&Ae(Bv,F.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+F.ownerDocument.doctype.name+`>
|
|
4
|
-
`+de),Q&&Mo([T,H,P],ke=>{de=Os(de,ke," ")}),x&&Ft?x.createHTML(de):de},t.setConfig=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dr(M),G=!0},t.clearConfig=function(){Un=null,G=!1},t.isValidAttribute=function(M,j,F){Un||Dr({});const ht=Xt(M),vt=Xt(j);return W(ht,vt,F)},t.addHook=function(M,j){typeof j=="function"&&(R[M]=R[M]||[],Ss(R[M],j))},t.removeHook=function(M){if(R[M])return kv(R[M])},t.removeHooks=function(M){R[M]&&(R[M]=[])},t.removeAllHooks=function(){R={}},t}var Lu=Hv();const Lo=e=>Lu.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),sI=e=>Lu.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),dn=e=>Lu.sanitize(e,{ALLOWED_TAGS:[]}),Fv=class G0 extends bt{constructor(){super(...arguments),this.type="toolbar",this.renderType=rt.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(O.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(O.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label","chart toolbar");if(b(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:r,overflowMenuItemList:i}=this.getControlConfigs();i&&r.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(r,l=>l.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;a.merge(s).classed("disabled",l=>l.shouldBeDisabled()).attr("aria-disabled",l=>l.shouldBeDisabled()).attr("aria-label",l=>l.title).html(l=>`
|
|
4
|
+
`+de),Q&&Mo([T,H,P],ke=>{de=Os(de,ke," ")}),x&&Ft?x.createHTML(de):de},t.setConfig=function(){let M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Dr(M),G=!0},t.clearConfig=function(){Un=null,G=!1},t.isValidAttribute=function(M,j,F){Un||Dr({});const ht=Xt(M),vt=Xt(j);return W(ht,vt,F)},t.addHook=function(M,j){typeof j=="function"&&(R[M]=R[M]||[],Ss(R[M],j))},t.removeHook=function(M){if(R[M])return kv(R[M])},t.removeHooks=function(M){R[M]&&(R[M]=[])},t.removeAllHooks=function(){R={}},t}var Lu=Hv();const Lo=e=>Lu.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),sI=e=>Lu.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),dn=e=>Lu.sanitize(e,{ALLOWED_TAGS:[]}),Fv=class G0 extends bt{constructor(){super(...arguments),this.type="toolbar",this.renderType=rt.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(O.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(O.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label","chart toolbar");if(b(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:r,overflowMenuItemList:i}=this.getControlConfigs();i&&r.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(r,l=>l.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;a.merge(s).classed("disabled",l=>l.shouldBeDisabled()).attr("role","button").attr("aria-disabled",l=>l.shouldBeDisabled()).attr("aria-label",l=>l.title).html(l=>`
|
|
5
5
|
<button
|
|
6
6
|
class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
|
|
7
7
|
aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${dn(l.id)}`)}" aria-label="${dn(l.title)}">
|