@carbon/charts-vue 1.10.6 → 1.11.0

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 CHANGED
@@ -1,17 +1,17 @@
1
- (function(rt,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],mt):(rt=typeof globalThis<"u"?globalThis:rt||self,mt(rt.ChartsVue={},rt.Vue))})(this,function(rt,mt){"use strict";function yn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $v(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ka(e){let t,n,i;e.length!==2?(t=yn,n=(o,c)=>yn(e(o),c),i=(o,c)=>e(o)-c):(t=e===yn||e===$v?e:Av,n=e,i=e);function r(o,c,l=0,u=o.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(o[d],c)<0?l=d+1:u=d}while(l<u)}return l}function s(o,c,l=0,u=o.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(o[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function a(o,c,l=0,u=o.length){const d=r(o,c,l,u-1);return d>l&&i(o[d-1],c)>-i(o[d],c)?d-1:d}return{left:r,center:a,right:s}}function Av(){return 0}function Lv(e){return e===null?NaN:+e}function*Dv(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&(yield i)}}const kv=ka(yn).right;ka(Lv).center;const Ra=kv;function Rv(e,t){let n=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&++n;else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(r=+r)>=r&&++n}return n}function xe(e,t){let n,i;if(t===void 0)for(const r of e)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));else{let r=-1;for(let s of e)(s=t(s,++r,e))!=null&&(n===void 0?s>=s&&(n=i=s):(n>s&&(n=s),i<s&&(i=s)))}return[n,i]}class _n{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const s=n[r],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[i++]=o),t=a}return n[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let n=this._n,i,r,s,a=0;if(n>0){for(a=t[--n];n>0&&(i=a,r=t[--n],a=i+r,s=r-(a-i),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(r=s*2,i=a+r,r==i-a&&(a=i))}return a}}class Dc extends Map{constructor(t,n=Nv){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(kc(this,t))}has(t){return super.has(kc(this,t))}set(t,n){return super.set(Iv(this,t),n)}delete(t){return super.delete(Pv(this,t))}}function kc({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function Iv({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}function Pv({_intern:e,_key:t},n){const i=t(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}function Nv(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Uv(e){return e}function Bv(e=yn){if(e===yn)return Rc;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||i===0?i:(e(n,n)===0)-(e(t,t)===0)}}function Rc(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Vv=Array.prototype,Hv=Vv.slice;function Ia(e){return()=>e}const Fv=Math.sqrt(50),Gv=Math.sqrt(10),zv=Math.sqrt(2);function Br(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),a=s>=Fv?10:s>=Gv?5:s>=zv?2:1;let o,c,l;return r<0?(l=Math.pow(10,-r)/a,o=Math.round(e*l),c=Math.round(t*l),o/l<e&&++o,c/l>t&&--c,l=-l):(l=Math.pow(10,r)*a,o=Math.round(e/l),c=Math.round(t/l),o*l<e&&++o,c*l>t&&--c),c<o&&.5<=n&&n<2?Br(e,t,n*2):[o,c,l]}function Vr(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const i=t<e,[r,s,a]=i?Br(t,e,n):Br(e,t,n);if(!(s>=r))return[];const o=s-r+1,c=new Array(o);if(i)if(a<0)for(let l=0;l<o;++l)c[l]=(s-l)/-a;else for(let l=0;l<o;++l)c[l]=(s-l)*a;else if(a<0)for(let l=0;l<o;++l)c[l]=(r+l)/-a;else for(let l=0;l<o;++l)c[l]=(r+l)*a;return c}function Wn(e,t,n){return t=+t,e=+e,n=+n,Br(e,t,n)[2]}function Pa(e,t,n){t=+t,e=+e,n=+n;const i=t<e,r=i?Wn(t,e,n):Wn(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}function jv(e,t,n){let i;for(;;){const r=Wn(e,t,n);if(r===i||r===0||!isFinite(r))return[e,t];r>0?(e=Math.floor(e/r)*r,t=Math.ceil(t/r)*r):r<0&&(e=Math.ceil(e*r)/r,t=Math.floor(t*r)/r),i=r}}function Wv(e){return Math.max(1,Math.ceil(Math.log(Rv(e))/Math.LN2)+1)}function qv(){var e=Uv,t=xe,n=Wv;function i(r){Array.isArray(r)||(r=Array.from(r));var s,a=r.length,o,c,l=new Array(a);for(s=0;s<a;++s)l[s]=e(r[s],s,r);var u=t(l),d=u[0],h=u[1],f=n(l,d,h);if(!Array.isArray(f)){const b=h,O=+f;if(t===xe&&([d,h]=jv(d,h,O)),f=Vr(d,h,O),f[0]<=d&&(c=Wn(d,h,O)),f[f.length-1]>=h)if(b>=h&&t===xe){const E=Wn(d,h,O);isFinite(E)&&(E>0?h=(Math.floor(h/E)+1)*E:E<0&&(h=(Math.ceil(h*-E)+1)/-E))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),x;for(s=0;s<=p;++s)x=v[s]=[],x.x0=s>0?f[s-1]:d,x.x1=s<p?f[s]:h;if(isFinite(c)){if(c>0)for(s=0;s<a;++s)(o=l[s])!=null&&d<=o&&o<=h&&v[Math.min(p,Math.floor((o-d)/c))].push(r[s]);else if(c<0){for(s=0;s<a;++s)if((o=l[s])!=null&&d<=o&&o<=h){const b=Math.floor((d-o)*c);v[Math.min(p,b+(f[b]<=o))].push(r[s])}}}else for(s=0;s<a;++s)(o=l[s])!=null&&d<=o&&o<=h&&v[Ra(f,o,0,p)].push(r[s]);return v}return i.value=function(r){return arguments.length?(e=typeof r=="function"?r:Ia(r),i):e},i.domain=function(r){return arguments.length?(t=typeof r=="function"?r:Ia([r[0],r[1]]),i):t},i.thresholds=function(r){return arguments.length?(n=typeof r=="function"?r:Ia(Array.isArray(r)?Hv.call(r):r),i):n},i}function xn(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function cn(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Ic(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=r===void 0?Rc:Bv(r);i>n;){if(i-n>600){const c=i-n+1,l=t-n+1,u=Math.log(c),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(c-d)/c)*(l-c/2<0?-1:1),f=Math.max(n,Math.floor(t-l*d/c+h)),p=Math.min(i,Math.floor(t+(c-l)*d/c+h));Ic(e,t,f,p,r)}const s=e[t];let a=n,o=i;for(Li(e,n,t),r(e[i],s)>0&&Li(e,n,i);a<o;){for(Li(e,a,o),++a,--o;r(e[a],s)<0;)++a;for(;r(e[o],s)>0;)--o}r(e[n],s)===0?Li(e,n,o):(++o,Li(e,o,i)),o<=t&&(n=o+1),t<=o&&(i=o-1)}return e}function Li(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function Na(e,t,n){if(e=Float64Array.from(Dv(e,n)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return cn(e);if(t>=1)return xn(e);var i,r=(i-1)*t,s=Math.floor(r),a=xn(Ic(e,s).subarray(0,s+1)),o=cn(e.subarray(s+1));return a+(o-a)*(r-s)}}function*Yv(e){for(const t of e)yield*t}function Pc(e){return Array.from(Yv(e))}function Xv(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(r);++i<r;)s[i]=e+i*n;return s}function Zv(e){return e}var Hr=1,Fr=2,Ua=3,Di=4,Nc=1e-6;function Kv(e){return"translate("+e+",0)"}function Qv(e){return"translate(0,"+e+")"}function Jv(e){return t=>+e(t)}function t0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function e0(){return!this.__axis}function Gr(e,t){var n=[],i=null,r=null,s=6,a=6,o=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=e===Hr||e===Di?-1:1,u=e===Di||e===Fr?"x":"y",d=e===Hr||e===Ua?Kv:Qv;function h(f){var p=i??(t.ticks?t.ticks.apply(t,n):t.domain()),g=r??(t.tickFormat?t.tickFormat.apply(t,n):Zv),m=Math.max(s,0)+o,v=t.range(),x=+v[0]+c,b=+v[v.length-1]+c,O=(t.bandwidth?t0:Jv)(t.copy(),c),E=f.selection?f.selection():f,T=E.selectAll(".domain").data([null]),S=E.selectAll(".tick").data(p,t).order(),A=S.exit(),D=S.enter().append("g").attr("class","tick"),L=S.select("line"),C=S.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(D),L=L.merge(D.append("line").attr("stroke","currentColor").attr(u+"2",l*s)),C=C.merge(D.append("text").attr("fill","currentColor").attr(u,l*m).attr("dy",e===Hr?"0em":e===Ua?"0.71em":"0.32em")),f!==E&&(T=T.transition(f),S=S.transition(f),L=L.transition(f),C=C.transition(f),A=A.transition(f).attr("opacity",Nc).attr("transform",function(B){return isFinite(B=O(B))?d(B+c):this.getAttribute("transform")}),D.attr("opacity",Nc).attr("transform",function(B){var _=this.parentNode.__axis;return d((_&&isFinite(_=_(B))?_:O(B))+c)})),A.remove(),T.attr("d",e===Di||e===Fr?a?"M"+l*a+","+x+"H"+c+"V"+b+"H"+l*a:"M"+c+","+x+"V"+b:a?"M"+x+","+l*a+"V"+c+"H"+b+"V"+l*a:"M"+x+","+c+"H"+b),S.attr("opacity",1).attr("transform",function(B){return d(O(B)+c)}),L.attr(u+"2",l*s),C.attr(u,l*m).text(g),E.filter(e0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fr?"start":e===Di?"end":"middle"),E.each(function(){this.__axis=O})}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?(i=f==null?null:Array.from(f),h):i&&i.slice()},h.tickFormat=function(f){return arguments.length?(r=f,h):r},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?(c=+f,h):c},h}function n0(e){return Gr(Hr,e)}function i0(e){return Gr(Fr,e)}function Ba(e){return Gr(Ua,e)}function Uc(e){return Gr(Di,e)}var r0={value:()=>{}};function Va(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new zr(n)}function zr(e){this._=e}function s0(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}zr.prototype=Va.prototype={constructor:zr,on:function(e,t){var n=this._,i=s0(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((r=(e=i[s]).type)&&(r=a0(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(r=(e=i[s]).type)n[r]=Bc(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Bc(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new zr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,r=s.length;i<r;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,s=i.length;r<s;++r)i[r].value.apply(t,n)}};function a0(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function Bc(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=r0,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ha="http://www.w3.org/1999/xhtml";const Vc={svg:"http://www.w3.org/2000/svg",xhtml:Ha,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Vc.hasOwnProperty(t)?{space:Vc[t],local:e}:e}function o0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ha&&t.documentElement.namespaceURI===Ha?t.createElement(e):t.createElementNS(n,e)}}function l0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hc(e){var t=jr(e);return(t.local?l0:o0)(t)}function c0(){}function Fa(e){return e==null?c0:function(){return this.querySelector(e)}}function u0(e){typeof e!="function"&&(e=Fa(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=new Array(a),c,l,u=0;u<a;++u)(c=s[u])&&(l=e.call(c,c.__data__,u,s))&&("__data__"in c&&(l.__data__=c.__data__),o[u]=l);return new ce(i,this._parents)}function h0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function d0(){return[]}function Fc(e){return e==null?d0:function(){return this.querySelectorAll(e)}}function f0(e){return function(){return h0(e.apply(this,arguments))}}function p0(e){typeof e=="function"?e=f0(e):e=Fc(e);for(var t=this._groups,n=t.length,i=[],r=[],s=0;s<n;++s)for(var a=t[s],o=a.length,c,l=0;l<o;++l)(c=a[l])&&(i.push(e.call(c,c.__data__,l,a)),r.push(c));return new ce(i,r)}function Gc(e){return function(){return this.matches(e)}}function zc(e){return function(t){return t.matches(e)}}var m0=Array.prototype.find;function g0(e){return function(){return m0.call(this.children,e)}}function v0(){return this.firstElementChild}function y0(e){return this.select(e==null?v0:g0(typeof e=="function"?e:zc(e)))}var _0=Array.prototype.filter;function x0(){return Array.from(this.children)}function b0(e){return function(){return _0.call(this.children,e)}}function w0(e){return this.selectAll(e==null?x0:b0(typeof e=="function"?e:zc(e)))}function E0(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=[],c,l=0;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s)&&o.push(c);return new ce(i,this._parents)}function jc(e){return new Array(e.length)}function S0(){return new ce(this._enter||this._groups.map(jc),this._parents)}function Wr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wr.prototype={constructor:Wr,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 O0(e){return function(){return e}}function T0(e,t,n,i,r,s){for(var a=0,o,c=t.length,l=s.length;a<l;++a)(o=t[a])?(o.__data__=s[a],i[a]=o):n[a]=new Wr(e,s[a]);for(;a<c;++a)(o=t[a])&&(r[a]=o)}function C0(e,t,n,i,r,s,a){var o,c,l=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(c=t[o])&&(h[o]=f=a.call(c,c.__data__,o,t)+"",l.has(f)?r[o]=c:l.set(f,c));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(c=l.get(f))?(i[o]=c,c.__data__=s[o],l.delete(f)):n[o]=new Wr(e,s[o]);for(o=0;o<u;++o)(c=t[o])&&l.get(h[o])===c&&(r[o]=c)}function M0(e){return e.__data__}function $0(e,t){if(!arguments.length)return Array.from(this,M0);var n=t?C0:T0,i=this._parents,r=this._groups;typeof e!="function"&&(e=O0(e));for(var s=r.length,a=new Array(s),o=new Array(s),c=new Array(s),l=0;l<s;++l){var u=i[l],d=r[l],h=d.length,f=A0(e.call(u,u&&u.__data__,l,i)),p=f.length,g=o[l]=new Array(p),m=a[l]=new Array(p),v=c[l]=new Array(h);n(u,d,g,m,v,f,t);for(var x=0,b=0,O,E;x<p;++x)if(O=g[x]){for(x>=b&&(b=x+1);!(E=m[b])&&++b<p;);O._next=E||null}}return a=new ce(a,i),a._enter=o,a._exit=c,a}function A0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function L0(){return new ce(this._exit||this._groups.map(jc),this._parents)}function D0(e,t,n){var i=this.enter(),r=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function k0(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,r=n.length,s=i.length,a=Math.min(r,s),o=new Array(r),c=0;c<a;++c)for(var l=n[c],u=i[c],d=l.length,h=o[c]=new Array(d),f,p=0;p<d;++p)(f=l[p]||u[p])&&(h[p]=f);for(;c<r;++c)o[c]=n[c];return new ce(o,this._parents)}function R0(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],r=i.length-1,s=i[r],a;--r>=0;)(a=i[r])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function I0(e){e||(e=P0);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var a=n[s],o=a.length,c=r[s]=new Array(o),l,u=0;u<o;++u)(l=a[u])&&(c[u]=l);c.sort(t)}return new ce(r,this._parents).order()}function P0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function N0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function U0(){return Array.from(this)}function B0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],r=0,s=i.length;r<s;++r){var a=i[r];if(a)return a}return null}function V0(){let e=0;for(const t of this)++e;return e}function H0(){return!this.node()}function F0(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var r=t[n],s=0,a=r.length,o;s<a;++s)(o=r[s])&&e.call(o,o.__data__,s,r);return this}function G0(e){return function(){this.removeAttribute(e)}}function z0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function j0(e,t){return function(){this.setAttribute(e,t)}}function W0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function q0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Y0(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 X0(e,t){var n=jr(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?z0:G0:typeof t=="function"?n.local?Y0:q0:n.local?W0:j0)(n,t))}function Wc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Z0(e){return function(){this.style.removeProperty(e)}}function K0(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Q0(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function J0(e,t,n){return arguments.length>1?this.each((t==null?Z0:typeof t=="function"?Q0:K0)(e,t,n??"")):qn(this.node(),e)}function qn(e,t){return e.style.getPropertyValue(t)||Wc(e).getComputedStyle(e,null).getPropertyValue(t)}function ty(e){return function(){delete this[e]}}function ey(e,t){return function(){this[e]=t}}function ny(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function iy(e,t){return arguments.length>1?this.each((t==null?ty:typeof t=="function"?ny:ey)(e,t)):this.node()[e]}function qc(e){return e.trim().split(/^|\s+/)}function Ga(e){return e.classList||new Yc(e)}function Yc(e){this._node=e,this._names=qc(e.getAttribute("class")||"")}Yc.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 Xc(e,t){for(var n=Ga(e),i=-1,r=t.length;++i<r;)n.add(t[i])}function Zc(e,t){for(var n=Ga(e),i=-1,r=t.length;++i<r;)n.remove(t[i])}function ry(e){return function(){Xc(this,e)}}function sy(e){return function(){Zc(this,e)}}function ay(e,t){return function(){(t.apply(this,arguments)?Xc:Zc)(this,e)}}function oy(e,t){var n=qc(e+"");if(arguments.length<2){for(var i=Ga(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?ay:t?ry:sy)(n,t))}function ly(){this.textContent=""}function cy(e){return function(){this.textContent=e}}function uy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function hy(e){return arguments.length?this.each(e==null?ly:(typeof e=="function"?uy:cy)(e)):this.node().textContent}function dy(){this.innerHTML=""}function fy(e){return function(){this.innerHTML=e}}function py(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function my(e){return arguments.length?this.each(e==null?dy:(typeof e=="function"?py:fy)(e)):this.node().innerHTML}function gy(){this.nextSibling&&this.parentNode.appendChild(this)}function vy(){return this.each(gy)}function yy(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _y(){return this.each(yy)}function xy(e){var t=typeof e=="function"?e:Hc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function by(){return null}function wy(e,t){var n=typeof e=="function"?e:Hc(e),i=t==null?by:typeof t=="function"?t:Fa(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Ey(){var e=this.parentNode;e&&e.removeChild(this)}function Sy(){return this.each(Ey)}function Oy(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ty(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cy(e){return this.select(e?Ty:Oy)}function My(e){return arguments.length?this.property("__data__",e):this.node().__data__}function $y(e){return function(t){e.call(this,t,this.__data__)}}function Ay(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Ly(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,r=t.length,s;n<r;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function Dy(e,t,n){return function(){var i=this.__on,r,s=$y(t);if(i){for(var a=0,o=i.length;a<o;++a)if((r=i[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=t;return}}this.addEventListener(e.type,s,n),r={type:e.type,name:e.name,value:t,listener:s,options:n},i?i.push(r):this.__on=[r]}}function ky(e,t,n){var i=Ay(e+""),r,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,l=o.length,u;c<l;++c)for(r=0,u=o[c];r<s;++r)if((a=i[r]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?Dy:Ly,r=0;r<s;++r)this.each(o(i[r],t,n));return this}function Kc(e,t,n){var i=Wc(e),r=i.CustomEvent;typeof r=="function"?r=new r(t,n):(r=i.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Ry(e,t){return function(){return Kc(this,e,t)}}function Iy(e,t){return function(){return Kc(this,e,t.apply(this,arguments))}}function Py(e,t){return this.each((typeof t=="function"?Iy:Ry)(e,t))}function*Ny(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],r=0,s=i.length,a;r<s;++r)(a=i[r])&&(yield a)}var Qc=[null];function ce(e,t){this._groups=e,this._parents=t}function ki(){return new ce([[document.documentElement]],Qc)}function Uy(){return this}ce.prototype=ki.prototype={constructor:ce,select:u0,selectAll:p0,selectChild:y0,selectChildren:w0,filter:E0,data:$0,enter:S0,exit:L0,join:D0,merge:k0,selection:Uy,order:R0,sort:I0,call:N0,nodes:U0,node:B0,size:V0,empty:H0,each:F0,attr:X0,style:J0,property:iy,classed:oy,text:hy,html:my,raise:vy,lower:_y,append:xy,insert:wy,remove:Sy,clone:Cy,datum:My,on:ky,dispatch:Py,[Symbol.iterator]:Ny};function P(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],Qc)}function By(e){let t;for(;t=e.sourceEvent;)e=t;return e}function bn(e,t){if(e=By(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const za={capture:!0,passive:!1};function ja(e){e.preventDefault(),e.stopImmediatePropagation()}function Vy(e){var t=e.document.documentElement,n=P(e).on("dragstart.drag",ja,za);"onselectstart"in t?n.on("selectstart.drag",ja,za):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Hy(e,t){var n=e.document.documentElement,i=P(e).on("dragstart.drag",null);t&&(i.on("click.drag",ja,za),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Wa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jc(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ri(){}var Ii=.7,qr=1/Ii,Yn="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fy=/^#([0-9a-f]{3,8})$/,Gy=new RegExp(`^rgb\\(${Yn},${Yn},${Yn}\\)$`),zy=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),jy=new RegExp(`^rgba\\(${Yn},${Yn},${Yn},${Pi}\\)$`),Wy=new RegExp(`^rgba\\(${Le},${Le},${Le},${Pi}\\)$`),qy=new RegExp(`^hsl\\(${Pi},${Le},${Le}\\)$`),Yy=new RegExp(`^hsla\\(${Pi},${Le},${Le},${Pi}\\)$`),tu={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};Wa(Ri,Ge,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eu,formatHex:eu,formatHex8:Xy,formatHsl:Zy,formatRgb:nu,toString:nu});function eu(){return this.rgb().formatHex()}function Xy(){return this.rgb().formatHex8()}function Zy(){return ou(this).formatHsl()}function nu(){return this.rgb().formatRgb()}function Ge(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Fy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?iu(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Yr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Yr(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=Gy.exec(e))?new ie(t[1],t[2],t[3],1):(t=zy.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jy.exec(e))?Yr(t[1],t[2],t[3],t[4]):(t=Wy.exec(e))?Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qy.exec(e))?au(t[1],t[2]/100,t[3]/100,1):(t=Yy.exec(e))?au(t[1],t[2]/100,t[3]/100,t[4]):tu.hasOwnProperty(e)?iu(tu[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function iu(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function Yr(e,t,n,i){return i<=0&&(e=t=n=NaN),new ie(e,t,n,i)}function Ky(e){return e instanceof Ri||(e=Ge(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function qa(e,t,n,i){return arguments.length===1?Ky(e):new ie(e,t,n,i??1)}function ie(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Wa(ie,qa,Jc(Ri,{brighter(e){return e=e==null?qr:Math.pow(qr,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(wn(this.r),wn(this.g),wn(this.b),Xr(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:ru,formatHex:ru,formatHex8:Qy,formatRgb:su,toString:su}));function ru(){return`#${En(this.r)}${En(this.g)}${En(this.b)}`}function Qy(){return`#${En(this.r)}${En(this.g)}${En(this.b)}${En((isNaN(this.opacity)?1:this.opacity)*255)}`}function su(){const e=Xr(this.opacity);return`${e===1?"rgb(":"rgba("}${wn(this.r)}, ${wn(this.g)}, ${wn(this.b)}${e===1?")":`, ${e})`}`}function Xr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function En(e){return e=wn(e),(e<16?"0":"")+e.toString(16)}function au(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new be(e,t,n,i)}function ou(e){if(e instanceof be)return new be(e.h,e.s,e.l,e.opacity);if(e instanceof Ri||(e=Ge(e)),!e)return new be;if(e instanceof be)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),s=Math.max(t,n,i),a=NaN,o=s-r,c=(s+r)/2;return o?(t===s?a=(n-i)/o+(n<i)*6:n===s?a=(i-t)/o+2:a=(t-n)/o+4,o/=c<.5?s+r:2-s-r,a*=60):o=c>0&&c<1?0:a,new be(a,o,c,e.opacity)}function Ya(e,t,n,i){return arguments.length===1?ou(e):new be(e,t,n,i??1)}function be(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Wa(be,Ya,Jc(Ri,{brighter(e){return e=e==null?qr:Math.pow(qr,e),new be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new be(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new ie(Xa(e>=240?e-240:e+120,r,i),Xa(e,r,i),Xa(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new be(lu(this.h),Zr(this.s),Zr(this.l),Xr(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=Xr(this.opacity);return`${e===1?"hsl(":"hsla("}${lu(this.h)}, ${Zr(this.s)*100}%, ${Zr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lu(e){return e=(e||0)%360,e<0?e+360:e}function Zr(e){return Math.max(0,Math.min(1,e||0))}function Xa(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 Za=e=>()=>e;function Jy(e,t){return function(n){return e+n*t}}function t1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function e1(e){return(e=+e)==1?cu:function(t,n){return n-t?t1(t,n,e):Za(isNaN(t)?n:t)}}function cu(e,t){var n=t-e;return n?Jy(e,n):Za(isNaN(e)?t:e)}const Kr=function e(t){var n=e1(t);function i(r,s){var a=n((r=qa(r)).r,(s=qa(s)).r),o=n(r.g,s.g),c=n(r.b,s.b),l=cu(r.opacity,s.opacity);return function(u){return r.r=a(u),r.g=o(u),r.b=c(u),r.opacity=l(u),r+""}}return i.gamma=e,i}(1);function n1(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=e[r]*(1-s)+t[r]*s;return i}}function i1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function r1(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,r=new Array(i),s=new Array(n),a;for(a=0;a<i;++a)r[a]=Ni(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<i;++a)s[a]=r[a](o);return s}}function s1(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function ue(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function a1(e,t){var n={},i={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Ni(e[r],t[r]):i[r]=t[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var Ka=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qa=new RegExp(Ka.source,"g");function o1(e){return function(){return e}}function l1(e){return function(t){return e(t)+""}}function uu(e,t){var n=Ka.lastIndex=Qa.lastIndex=0,i,r,s,a=-1,o=[],c=[];for(e=e+"",t=t+"";(i=Ka.exec(e))&&(r=Qa.exec(t));)(s=r.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,c.push({i:a,x:ue(i,r)})),n=Qa.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?c[0]?l1(c[0].x):o1(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)o[(d=c[u]).i]=d.x(l);return o.join("")})}function Ni(e,t){var n=typeof t,i;return t==null||n==="boolean"?Za(t):(n==="number"?ue:n==="string"?(i=Ge(t))?(t=i,Kr):uu:t instanceof Ge?Kr:t instanceof Date?s1:i1(t)?n1:Array.isArray(t)?r1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?a1:ue)(e,t)}function hu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var du=180/Math.PI,Ja={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fu(e,t,n,i,r,s){var a,o,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*i)&&(n-=e*c,i-=t*c),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,c/=o),e*i<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:s,rotate:Math.atan2(t,e)*du,skewX:Math.atan(c)*du,scaleX:a,scaleY:o}}var Qr;function c1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ja:fu(t.a,t.b,t.c,t.d,t.e,t.f)}function u1(e){return e==null||(Qr||(Qr=document.createElementNS("http://www.w3.org/2000/svg","g")),Qr.setAttribute("transform",e),!(e=Qr.transform.baseVal.consolidate()))?Ja:(e=e.matrix,fu(e.a,e.b,e.c,e.d,e.e,e.f))}function pu(e,t,n,i){function r(l){return l.length?l.pop()+" ":""}function s(l,u,d,h,f,p){if(l!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ue(l,d)},{i:g-2,x:ue(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(l,u,d,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:ue(l,u)})):u&&d.push(r(d)+"rotate("+u+i)}function o(l,u,d,h){l!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:ue(l,u)}):u&&d.push(r(d)+"skewX("+u+i)}function c(l,u,d,h,f,p){if(l!==d||u!==h){var g=f.push(r(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ue(l,d)},{i:g-2,x:ue(u,h)})}else(d!==1||h!==1)&&f.push(r(f)+"scale("+d+","+h+")")}return function(l,u){var d=[],h=[];return l=e(l),u=e(u),s(l.translateX,l.translateY,u.translateX,u.translateY,d,h),a(l.rotate,u.rotate,d,h),o(l.skewX,u.skewX,d,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,d,h),l=u=null,function(f){for(var p=-1,g=h.length,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var h1=pu(c1,"px, ","px)","deg)"),d1=pu(u1,", ",")",")");function f1(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e(i/(t-1));return n}var Xn=0,Ui=0,Bi=0,mu=1e3,Jr,Vi,ts=0,Sn=0,es=0,Hi=typeof performance=="object"&&performance.now?performance:Date,gu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function to(){return Sn||(gu(p1),Sn=Hi.now()+es)}function p1(){Sn=0}function ns(){this._call=this._time=this._next=null}ns.prototype=vu.prototype={constructor:ns,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?to():+n)+(t==null?0:+t),!this._next&&Vi!==this&&(Vi?Vi._next=this:Jr=this,Vi=this),this._call=e,this._time=n,eo()},stop:function(){this._call&&(this._call=null,this._time=1/0,eo())}};function vu(e,t,n){var i=new ns;return i.restart(e,t,n),i}function m1(){to(),++Xn;for(var e=Jr,t;e;)(t=Sn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Xn}function yu(){Sn=(ts=Hi.now())+es,Xn=Ui=0;try{m1()}finally{Xn=0,v1(),Sn=0}}function g1(){var e=Hi.now(),t=e-ts;t>mu&&(es-=t,ts=e)}function v1(){for(var e,t=Jr,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jr=n);Vi=e,eo(i)}function eo(e){if(!Xn){Ui&&(Ui=clearTimeout(Ui));var t=e-Sn;t>24?(e<1/0&&(Ui=setTimeout(yu,e-Hi.now()-es)),Bi&&(Bi=clearInterval(Bi))):(Bi||(ts=Hi.now(),Bi=setInterval(g1,mu)),Xn=1,gu(yu))}}function _u(e,t,n){var i=new ns;return t=t==null?0:+t,i.restart(r=>{i.stop(),e(r+t)},t,n),i}var y1=Va("start","end","cancel","interrupt"),_1=[],xu=0,bu=1,no=2,is=3,wu=4,io=5,rs=6;function ss(e,t,n,i,r,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;x1(e,n,{name:t,index:i,group:r,on:y1,tween:_1,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:xu})}function ro(e,t){var n=we(e,t);if(n.state>xu)throw new Error("too late; already scheduled");return n}function De(e,t){var n=we(e,t);if(n.state>is)throw new Error("too late; already running");return n}function we(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function x1(e,t,n){var i=e.__transition,r;i[t]=n,n.timer=vu(s,0,n.time);function s(l){n.state=bu,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var u,d,h,f;if(n.state!==bu)return c();for(u in i)if(f=i[u],f.name===n.name){if(f.state===is)return _u(a);f.state===wu?(f.state=rs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[u]):+u<t&&(f.state=rs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[u])}if(_u(function(){n.state===is&&(n.state=wu,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=no,n.on.call("start",e,e.__data__,n.index,n.group),n.state===no){for(n.state=is,r=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))&&(r[++d]=f);r.length=d+1}}function o(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=io,1),d=-1,h=r.length;++d<h;)r[d].call(e,u);n.state===io&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=rs,n.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function so(e,t){var n=e.__transition,i,r,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){s=!1;continue}r=i.state>no&&i.state<io,i.state=rs,i.timer.stop(),i.on.call(r?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}s&&delete e.__transition}}function b1(e){return this.each(function(){so(this,e)})}function w1(e,t){var n,i;return function(){var r=De(this,e),s=r.tween;if(s!==n){i=n=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}r.tween=i}}function E1(e,t,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=De(this,e),a=s.tween;if(a!==i){r=(i=a).slice();for(var o={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=o;break}c===l&&r.push(o)}s.tween=r}}function S1(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=we(this.node(),n).tween,r=0,s=i.length,a;r<s;++r)if((a=i[r]).name===e)return a.value;return null}return this.each((t==null?w1:E1)(n,e,t))}function ao(e,t,n){var i=e._id;return e.each(function(){var r=De(this,i);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return we(r,i).value[t]}}function Eu(e,t){var n;return(typeof t=="number"?ue:t instanceof Ge?Kr:(n=Ge(t))?(t=n,Kr):uu)(e,t)}function O1(e){return function(){this.removeAttribute(e)}}function T1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C1(e,t,n){var i,r=n+"",s;return function(){var a=this.getAttribute(e);return a===r?null:a===i?s:s=t(i=a,n)}}function M1(e,t,n){var i,r=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===i?s:s=t(i=a,n)}}function $1(e,t,n){var i,r,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=o+"",a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o)))}}function A1(e,t,n){var i,r,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=o+"",a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o)))}}function L1(e,t){var n=jr(e),i=n==="transform"?d1:Eu;return this.attrTween(e,typeof t=="function"?(n.local?A1:$1)(n,i,ao(this,"attr."+e,t)):t==null?(n.local?T1:O1)(n):(n.local?M1:C1)(n,i,t))}function D1(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function k1(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function R1(e,t){var n,i;function r(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&k1(e,s)),n}return r._value=t,r}function I1(e,t){var n,i;function r(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&D1(e,s)),n}return r._value=t,r}function P1(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 i=jr(e);return this.tween(n,(i.local?R1:I1)(i,t))}function N1(e,t){return function(){ro(this,e).delay=+t.apply(this,arguments)}}function U1(e,t){return t=+t,function(){ro(this,e).delay=t}}function B1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?N1:U1)(t,e)):we(this.node(),t).delay}function V1(e,t){return function(){De(this,e).duration=+t.apply(this,arguments)}}function H1(e,t){return t=+t,function(){De(this,e).duration=t}}function F1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?V1:H1)(t,e)):we(this.node(),t).duration}function G1(e,t){if(typeof t!="function")throw new Error;return function(){De(this,e).ease=t}}function z1(e){var t=this._id;return arguments.length?this.each(G1(t,e)):we(this.node(),t).ease}function j1(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;De(this,e).ease=n}}function W1(e){if(typeof e!="function")throw new Error;return this.each(j1(this._id,e))}function q1(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=[],c,l=0;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s)&&o.push(c);return new ze(i,this._parents,this._name,this._id)}function Y1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,r=n.length,s=Math.min(i,r),a=new Array(i),o=0;o<s;++o)for(var c=t[o],l=n[o],u=c.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=c[f]||l[f])&&(d[f]=h);for(;o<i;++o)a[o]=t[o];return new ze(a,this._parents,this._name,this._id)}function X1(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 Z1(e,t,n){var i,r,s=X1(t)?ro:De;return function(){var a=s(this,e),o=a.on;o!==i&&(r=(i=o).copy()).on(t,n),a.on=r}}function K1(e,t){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(e):this.each(Z1(n,e,t))}function Q1(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function J1(){return this.on("end.remove",Q1(this._id))}function t_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fa(e));for(var i=this._groups,r=i.length,s=new Array(r),a=0;a<r;++a)for(var o=i[a],c=o.length,l=s[a]=new Array(c),u,d,h=0;h<c;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),l[h]=d,ss(l[h],t,n,h,l,we(u,n)));return new ze(s,this._parents,t,n)}function e_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fc(e));for(var i=this._groups,r=i.length,s=[],a=[],o=0;o<r;++o)for(var c=i[o],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var h=e.call(u,u.__data__,d,c),f,p=we(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&ss(f,t,n,g,h,p);s.push(h),a.push(u)}return new ze(s,a,t,n)}var n_=ki.prototype.constructor;function i_(){return new n_(this._groups,this._parents)}function r_(e,t){var n,i,r;return function(){var s=qn(this,e),a=(this.style.removeProperty(e),qn(this,e));return s===a?null:s===n&&a===i?r:r=t(n=s,i=a)}}function Su(e){return function(){this.style.removeProperty(e)}}function s_(e,t,n){var i,r=n+"",s;return function(){var a=qn(this,e);return a===r?null:a===i?s:s=t(i=a,n)}}function a_(e,t,n){var i,r,s;return function(){var a=qn(this,e),o=n(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),qn(this,e))),a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o))}}function o_(e,t){var n,i,r,s="style."+t,a="end."+s,o;return function(){var c=De(this,e),l=c.on,u=c.value[s]==null?o||(o=Su(t)):void 0;(l!==n||r!==u)&&(i=(n=l).copy()).on(a,r=u),c.on=i}}function l_(e,t,n){var i=(e+="")=="transform"?h1:Eu;return t==null?this.styleTween(e,r_(e,i)).on("end.style."+e,Su(e)):typeof t=="function"?this.styleTween(e,a_(e,i,ao(this,"style."+e,t))).each(o_(this._id,e)):this.styleTween(e,s_(e,i,t),n).on("end.style."+e,null)}function c_(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function u_(e,t,n){var i,r;function s(){var a=t.apply(this,arguments);return a!==r&&(i=(r=a)&&c_(e,a,n)),i}return s._value=t,s}function h_(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,u_(e,t,n??""))}function d_(e){return function(){this.textContent=e}}function f_(e){return function(){var t=e(this);this.textContent=t??""}}function p_(e){return this.tween("text",typeof e=="function"?f_(ao(this,"text",e)):d_(e==null?"":e+""))}function m_(e){return function(t){this.textContent=e.call(this,t)}}function g_(e){var t,n;function i(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&m_(r)),t}return i._value=e,i}function v_(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,g_(e))}function y_(){for(var e=this._name,t=this._id,n=Ou(),i=this._groups,r=i.length,s=0;s<r;++s)for(var a=i[s],o=a.length,c,l=0;l<o;++l)if(c=a[l]){var u=we(c,t);ss(c,e,n,l,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ze(i,this._parents,e,n)}function __(){var e,t,n=this,i=n._id,r=n.size();return new Promise(function(s,a){var o={value:a},c={value:function(){--r===0&&s()}};n.each(function(){var l=De(this,i),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),l.on=t}),r===0&&s()})}var x_=0;function ze(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Ou(){return++x_}var je=ki.prototype;ze.prototype={constructor:ze,select:t_,selectAll:e_,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:q1,merge:Y1,selection:i_,transition:y_,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:K1,attr:L1,attrTween:P1,style:l_,styleTween:h_,text:p_,textTween:v_,remove:J1,tween:S1,delay:B1,duration:F1,ease:z1,easeVarying:W1,end:__,[Symbol.iterator]:je[Symbol.iterator]};const b_=e=>+e;function Tu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var w_={time:null,delay:0,duration:250,ease:Tu};function E_(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 S_(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=Ou(),(n=w_).time=to(),e=e==null?null:e+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var a=i[s],o=a.length,c,l=0;l<o;++l)(c=a[l])&&ss(c,e,t,l,a,n||E_(c,t));return new ze(i,this._parents,e,t)}ki.prototype.interrupt=b1,ki.prototype.transition=S_;const oo=e=>()=>e;function O_(e,{sourceEvent:t,target:n,selection:i,mode:r,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:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function T_(e){e.stopImmediatePropagation()}function lo(e){e.preventDefault(),e.stopImmediatePropagation()}var Cu={name:"drag"},co={name:"space"},Zn={name:"handle"},Kn={name:"center"};const{abs:Mu,max:Yt,min:Xt}=Math;function $u(e){return[+e[0],+e[1]]}function Au(e){return[$u(e[0]),$u(e[1])]}var as={name:"x",handles:["w","e"].map(os),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]]}},uo={name:"y",handles:["n","s"].map(os),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]]}},We={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"},Lu={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Du={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},C_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},M_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function os(e){return{type:e}}function $_(e){return!e.ctrlKey&&!e.button}function A_(){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 L_(){return navigator.maxTouchPoints||"ontouchstart"in this}function ho(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function D_(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function ku(){return k_(as)}function k_(e){var t=A_,n=$_,i=L_,r=!0,s=Va("start","brush","end"),a=6,o;function c(m){var v=m.property("__brush",g).selectAll(".overlay").data([os("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",We.overlay).merge(v).each(function(){var b=ho(this).extent;P(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),m.selectAll(".selection").data([os("selection")]).enter().append("rect").attr("class","selection").attr("cursor",We.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(e.handles,function(b){return b.type});x.exit().remove(),x.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return We[b.type]}),m.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).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)")}c.move=function(m,v,x){m.tween?m.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,O=b.__brush,E=u(b,arguments),T=O.selection,S=e.input(typeof v=="function"?v.apply(this,arguments):v,O.extent),A=Ni(T,S);function D(L){O.selection=L===1&&S===null?null:A(L),l.call(b),E.brush()}return T!==null&&S!==null?D:D(1)}):m.each(function(){var b=this,O=arguments,E=b.__brush,T=e.input(typeof v=="function"?v.apply(b,O):v,E.extent),S=u(b,O).beforestart();so(b),E.selection=T===null?null:T,l.call(b),S.start(x).brush(x).end(x)})},c.clear=function(m,v){c.move(m,null,v)};function l(){var m=P(this),v=ho(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?v[1][1]-v[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,v,x){var b=m.__brush.emitter;return b&&(!x||!b.clean)?b:new d(m,v,x)}function d(m,v,x){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=x}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,x){var b=P(this.that).datum();s.call(m,this.that,new O_(m,{sourceEvent:v,target:c,selection:e.output(this.state.selection),mode:x,dispatch:s}),b)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,x=m.target.__data__.type,b=(r&&m.metaKey?x="overlay":x)==="selection"?Cu:r&&m.altKey?Kn:Zn,O=e===uo?null:C_[x],E=e===as?null:M_[x],T=ho(v),S=T.extent,A=T.selection,D=S[0][0],L,C,B=S[0][1],_,$,y=S[1][0],k,R,U=S[1][1],N,G,z=0,F=0,Q,j=O&&E&&r&&m.shiftKey,X,ot,tt=Array.from(m.touches||[m],et=>{const Lt=et.identifier;return et=bn(et,v),et.point0=et.slice(),et.identifier=Lt,et});so(v);var lt=u(v,arguments,!0).beforestart();if(x==="overlay"){A&&(Q=!0);const et=[tt[0],tt[1]||tt[0]];T.selection=A=[[L=e===uo?D:Xt(et[0][0],et[1][0]),_=e===as?B:Xt(et[0][1],et[1][1])],[k=e===uo?y:Yt(et[0][0],et[1][0]),N=e===as?U:Yt(et[0][1],et[1][1])]],tt.length>1&&xt(m)}else L=A[0][0],_=A[0][1],k=A[1][0],N=A[1][1];C=L,$=_,R=k,G=N;var W=P(v).attr("pointer-events","none"),q=W.selectAll(".overlay").attr("cursor",We[x]);if(m.touches)lt.moved=H,lt.ended=pt;else{var Y=P(m.view).on("mousemove.brush",H,!0).on("mouseup.brush",pt,!0);r&&Y.on("keydown.brush",zt,!0).on("keyup.brush",qt,!0),Vy(m.view)}l.call(v),lt.start(m,b.name);function H(et){for(const Lt of et.changedTouches||[et])for(const jn of tt)jn.identifier===Lt.identifier&&(jn.cur=bn(Lt,v));if(j&&!X&&!ot&&tt.length===1){const Lt=tt[0];Mu(Lt.cur[0]-Lt[0])>Mu(Lt.cur[1]-Lt[1])?ot=!0:X=!0}for(const Lt of tt)Lt.cur&&(Lt[0]=Lt.cur[0],Lt[1]=Lt.cur[1]);Q=!0,lo(et),xt(et)}function xt(et){const Lt=tt[0],jn=Lt.point0;var Fe;switch(z=Lt[0]-jn[0],F=Lt[1]-jn[1],b){case co:case Cu:{O&&(z=Yt(D-L,Xt(y-k,z)),C=L+z,R=k+z),E&&(F=Yt(B-_,Xt(U-N,F)),$=_+F,G=N+F);break}case Zn:{tt[1]?(O&&(C=Yt(D,Xt(y,tt[0][0])),R=Yt(D,Xt(y,tt[1][0])),O=1),E&&($=Yt(B,Xt(U,tt[0][1])),G=Yt(B,Xt(U,tt[1][1])),E=1)):(O<0?(z=Yt(D-L,Xt(y-L,z)),C=L+z,R=k):O>0&&(z=Yt(D-k,Xt(y-k,z)),C=L,R=k+z),E<0?(F=Yt(B-_,Xt(U-_,F)),$=_+F,G=N):E>0&&(F=Yt(B-N,Xt(U-N,F)),$=_,G=N+F));break}case Kn:{O&&(C=Yt(D,Xt(y,L-z*O)),R=Yt(D,Xt(y,k+z*O))),E&&($=Yt(B,Xt(U,_-F*E)),G=Yt(B,Xt(U,N+F*E)));break}}R<C&&(O*=-1,Fe=L,L=k,k=Fe,Fe=C,C=R,R=Fe,x in Lu&&q.attr("cursor",We[x=Lu[x]])),G<$&&(E*=-1,Fe=_,_=N,N=Fe,Fe=$,$=G,G=Fe,x in Du&&q.attr("cursor",We[x=Du[x]])),T.selection&&(A=T.selection),X&&(C=A[0][0],R=A[1][0]),ot&&($=A[0][1],G=A[1][1]),(A[0][0]!==C||A[0][1]!==$||A[1][0]!==R||A[1][1]!==G)&&(T.selection=[[C,$],[R,G]],l.call(v),lt.brush(et,b.name))}function pt(et){if(T_(et),et.touches){if(et.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else Hy(et.view,Q),Y.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),q.attr("cursor",We.overlay),T.selection&&(A=T.selection),D_(A)&&(T.selection=null,l.call(v)),lt.end(et,b.name)}function zt(et){switch(et.keyCode){case 16:{j=O&&E;break}case 18:{b===Zn&&(O&&(k=R-z*O,L=C+z*O),E&&(N=G-F*E,_=$+F*E),b=Kn,xt(et));break}case 32:{(b===Zn||b===Kn)&&(O<0?k=R-z:O>0&&(L=C-z),E<0?N=G-F:E>0&&(_=$-F),b=co,q.attr("cursor",We.selection),xt(et));break}default:return}lo(et)}function qt(et){switch(et.keyCode){case 16:{j&&(X=ot=j=!1,xt(et));break}case 18:{b===Kn&&(O<0?k=R:O>0&&(L=C),E<0?N=G:E>0&&(_=$),b=Zn,xt(et));break}case 32:{b===co&&(et.altKey?(O&&(k=R-z*O,L=C+z*O),E&&(N=G-F*E,_=$+F*E),b=Kn):(O<0?k=R:O>0&&(L=C),E<0?N=G:E>0&&(_=$),b=Zn),q.attr("cursor",We[x]),xt(et));break}default:return}lo(et)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=Au(t.apply(this,arguments)),m.dim=e,m}return c.extent=function(m){return arguments.length?(t=typeof m=="function"?m:oo(Au(m)),c):t},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:oo(!!m),c):n},c.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:oo(!!m),c):i},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(r=!!m,c):r},c.on=function(){var m=s.on.apply(s,arguments);return m===s?c:m},c}const fo=Math.PI,po=2*fo,On=1e-6,R_=po-On;function Ru(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function I_(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ru;const n=10**t;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}let P_=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ru:I_(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,i,r){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,n,i,r,s,a){this._append`C${+t},${+n},${+i},${+r},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,i,r,s){if(t=+t,n=+n,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,c=i-t,l=r-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>On)if(!(Math.abs(d*c-l*u)>On)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=i-a,p=r-o,g=c*c+l*l,m=f*f+p*p,v=Math.sqrt(g),x=Math.sqrt(h),b=s*Math.tan((fo-Math.acos((g+h-m)/(2*v*x)))/2),O=b/x,E=b/v;Math.abs(O-1)>On&&this._append`L${t+O*u},${n+O*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+E*c},${this._y1=n+E*l}`}}arc(t,n,i,r,s,a){if(t=+t,n=+n,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(r),c=i*Math.sin(r),l=t+o,u=n+c,d=1^a,h=a?r-s:s-r;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>On||Math.abs(this._y1-u)>On)&&this._append`L${l},${u}`,i&&(h<0&&(h=h%po+po),h>R_?this._append`A${i},${i},0,1,${d},${t-o},${n-c}A${i},${i},0,1,${d},${this._x1=l},${this._y1=u}`:h>On&&this._append`A${i},${i},0,${+(h>=fo)},${d},${this._x1=t+i*Math.cos(s)},${this._y1=n+i*Math.sin(s)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function N_(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Qn(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function U_(e,t){return function(n,i){for(var r=n.length,s=[],a=0,o=e[0],c=0;r>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),s.push(n.substring(r-=o,r+o)),!((c+=o+1)>i));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function B_(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var V_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fi(e){if(!(t=V_.exec(e)))throw new Error("invalid format: "+e);var t;return new mo({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]})}Fi.prototype=mo.prototype;function mo(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+""}mo.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 H_(e){t:for(var t=e.length,n=1,i=-1,r;n<t;++n)switch(e[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+e[n])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var Iu;function F_(e,t){var n=ls(e,t);if(!n)return e+"";var i=n[0],r=n[1],s=r-(Iu=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+ls(e,Math.max(0,t+s-1))[0]}function Pu(e,t){var n=ls(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Nu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:N_,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)=>Pu(e*100,t),r:Pu,s:F_,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Uu(e){return e}var Bu=Array.prototype.map,Vu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function G_(e){var t=e.grouping===void 0||e.thousands===void 0?Uu:U_(Bu.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Uu:B_(Bu.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Fi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,x=d.comma,b=d.precision,O=d.trim,E=d.type;E==="n"?(x=!0,E="g"):Nu[E]||(b===void 0&&(b=12),O=!0,E="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var T=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",S=g==="$"?i:/[%p]/.test(E)?a:"",A=Nu[E],D=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function L(C){var B=T,_=S,$,y,k;if(E==="c")_=A(C)+_,C="";else{C=+C;var R=C<0||1/C<0;if(C=isNaN(C)?c:A(Math.abs(C),b),O&&(C=H_(C)),R&&+C==0&&p!=="+"&&(R=!1),B=(R?p==="("?p:o:p==="-"||p==="("?"":p)+B,_=(E==="s"?Vu[8+Iu/3]:"")+_+(R&&p==="("?")":""),D){for($=-1,y=C.length;++$<y;)if(k=C.charCodeAt($),48>k||k>57){_=(k===46?r+C.slice($+1):C.slice($))+_,C=C.slice(0,$);break}}}x&&!m&&(C=t(C,1/0));var U=B.length+C.length+_.length,N=U<v?new Array(v-U+1).join(h):"";switch(x&&m&&(C=t(N+C,N.length?v-_.length:1/0),N=""),f){case"<":C=B+C+_+N;break;case"=":C=B+N+C+_;break;case"^":C=N.slice(0,U=N.length>>1)+B+C+_+N.slice(U);break;default:C=N+B+C+_;break}return s(C)}return L.toString=function(){return d+""},L}function u(d,h){var f=l((d=Fi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Qn(h)/3)))*3,g=Math.pow(10,-p),m=Vu[8+p/3];return function(v){return f(g*v)+m}}return{format:l,formatPrefix:u}}var cs,go,Hu;z_({thousands:",",grouping:[3],currency:["$",""]});function z_(e){return cs=G_(e),go=cs.format,Hu=cs.formatPrefix,cs}function j_(e){return Math.max(0,-Qn(Math.abs(e)))}function W_(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qn(t)/3)))*3-Qn(Math.abs(e)))}function q_(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qn(t)-Qn(e))+1}var vt=1e-6,Fu=1e-12,ut=Math.PI,re=ut/2,Gu=ut/4,he=ut*2,Jt=180/ut,Rt=ut/180,yt=Math.abs,zu=Math.atan,Tn=Math.atan2,bt=Math.cos,Y_=Math.exp,X_=Math.log,gt=Math.sin,un=Math.sign||function(e){return e>0?1:e<0?-1:0},Ee=Math.sqrt,Z_=Math.tan;function K_(e){return e>1?0:e<-1?ut:Math.acos(e)}function qe(e){return e>1?re:e<-1?-re:Math.asin(e)}function pe(){}function us(e,t){e&&Wu.hasOwnProperty(e.type)&&Wu[e.type](e,t)}var ju={Feature:function(e,t){us(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)us(n[i].geometry,t)}},Wu={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,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){vo(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)vo(n[i],t,0)},Polygon:function(e,t){qu(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)qu(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)us(n[i],t)}};function vo(e,t,n){var i=-1,r=e.length-n,s;for(t.lineStart();++i<r;)s=e[i],t.point(s[0],s[1],s[2]);t.lineEnd()}function qu(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)vo(e[n],t,1);t.polygonEnd()}function Jn(e,t){e&&ju.hasOwnProperty(e.type)?ju[e.type](e,t):us(e,t)}function yo(e){return[Tn(e[1],e[0]),qe(e[2])]}function ti(e){var t=e[0],n=e[1],i=bt(n);return[i*bt(t),i*gt(t),gt(n)]}function hs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ds(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 _o(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function fs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function xo(e){var t=Ee(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function bo(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return i=t.invert(i,r),i&&e.invert(i[0],i[1])}),n}function wo(e,t){return yt(e)>ut&&(e-=Math.round(e/he)*he),[e,t]}wo.invert=wo;function Yu(e,t,n){return(e%=he)?t||n?bo(Zu(e),Ku(t,n)):Zu(e):t||n?Ku(t,n):wo}function Xu(e){return function(t,n){return t+=e,yt(t)>ut&&(t-=Math.round(t/he)*he),[t,n]}}function Zu(e){var t=Xu(e);return t.invert=Xu(-e),t}function Ku(e,t){var n=bt(e),i=gt(e),r=bt(t),s=gt(t);function a(o,c){var l=bt(c),u=bt(o)*l,d=gt(o)*l,h=gt(c),f=h*n+u*i;return[Tn(d*r-f*s,u*n-h*i),qe(f*r+d*s)]}return a.invert=function(o,c){var l=bt(c),u=bt(o)*l,d=gt(o)*l,h=gt(c),f=h*r-d*s;return[Tn(d*r+h*s,u*n+f*i),qe(f*n-u*i)]},a}function Q_(e){e=Yu(e[0]*Rt,e[1]*Rt,e.length>2?e[2]*Rt:0);function t(n){return n=e(n[0]*Rt,n[1]*Rt),n[0]*=Jt,n[1]*=Jt,n}return t.invert=function(n){return n=e.invert(n[0]*Rt,n[1]*Rt),n[0]*=Jt,n[1]*=Jt,n},t}function J_(e,t,n,i,r,s){if(n){var a=bt(t),o=gt(t),c=i*n;r==null?(r=t+i*he,s=t-c/2):(r=Qu(a,r),s=Qu(a,s),(i>0?r<s:r>s)&&(r+=i*he));for(var l,u=r;i>0?u>s:u<s;u-=c)l=yo([a,-o*bt(u),-o*gt(u)]),e.point(l[0],l[1])}}function Qu(e,t){t=ti(t),t[0]-=e,xo(t);var n=K_(-t[1]);return((-t[2]<0?-n:n)+he-vt)%he}function Ju(){var e=[],t;return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:pe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ps(e,t){return yt(e[0]-t[0])<vt&&yt(e[1]-t[1])<vt}function ms(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function th(e,t,n,i,r){var s=[],a=[],o,c;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],x;if(ps(m,v)){if(!m[2]&&!v[2]){for(r.lineStart(),o=0;o<g;++o)r.point((m=p[o])[0],m[1]);r.lineEnd();return}v[0]+=2*vt}s.push(x=new ms(m,p,null,!0)),a.push(x.o=new ms(m,null,x,!1)),s.push(x=new ms(v,p,null,!1)),a.push(x.o=new ms(v,null,x,!0))}}),!!s.length){for(a.sort(t),eh(s),eh(a),o=0,c=a.length;o<c;++o)a[o].e=n=!n;for(var l=s[0],u,d;;){for(var h=l,f=!0;h.v;)if((h=h.n)===l)return;u=h.z,r.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,c=u.length;o<c;++o)r.point((d=u[o])[0],d[1]);else i(h.x,h.n.x,1,r);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)r.point((d=u[o])[0],d[1]);else i(h.x,h.p.x,-1,r);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);r.lineEnd()}}}function eh(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function Eo(e){return yt(e[0])<=ut?e[0]:un(e[0])*((yt(e[0])+ut)%he-ut)}function tx(e,t){var n=Eo(t),i=t[1],r=gt(i),s=[gt(n),-bt(n),0],a=0,o=0,c=new _n;r===1?i=re+vt:r===-1&&(i=-re-vt);for(var l=0,u=e.length;l<u;++l)if(h=(d=e[l]).length)for(var d,h,f=d[h-1],p=Eo(f),g=f[1]/2+Gu,m=gt(g),v=bt(g),x=0;x<h;++x,p=O,m=T,v=S,f=b){var b=d[x],O=Eo(b),E=b[1]/2+Gu,T=gt(E),S=bt(E),A=O-p,D=A>=0?1:-1,L=D*A,C=L>ut,B=m*T;if(c.add(Tn(B*D*gt(L),v*S+B*bt(L))),a+=C?A+D*he:A,C^p>=n^O>=n){var _=ds(ti(f),ti(b));xo(_);var $=ds(s,_);xo($);var y=(C^A>=0?-1:1)*qe($[2]);(i>y||i===y&&(_[0]||_[1]))&&(o+=C^A>=0?1:-1)}}return(a<-vt||a<vt&&c<-Fu)^o&1}function nh(e,t,n,i){return function(r){var s=t(r),a=Ju(),o=t(a),c=!1,l,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=x,h.lineEnd=b,u=[],l=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=Pc(u);var O=tx(l,i);u.length?(c||(r.polygonStart(),c=!0),th(u,nx,O,n,r)):O&&(c||(r.polygonStart(),c=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),c&&(r.polygonEnd(),c=!1),u=l=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(O,E){e(O,E)&&r.point(O,E)}function p(O,E){s.point(O,E)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(O,E){d.push([O,E]),o.point(O,E)}function x(){o.lineStart(),d=[]}function b(){v(d[0][0],d[0][1]),o.lineEnd();var O=o.clean(),E=a.result(),T,S=E.length,A,D,L;if(d.pop(),l.push(d),d=null,!!S){if(O&1){if(D=E[0],(A=D.length-1)>0){for(c||(r.polygonStart(),c=!0),r.lineStart(),T=0;T<A;++T)r.point((L=D[T])[0],L[1]);r.lineEnd()}return}S>1&&O&2&&E.push(E.pop().concat(E.shift())),u.push(E.filter(ex))}}return h}}function ex(e){return e.length>1}function nx(e,t){return((e=e.x)[0]<0?e[1]-re-vt:re-e[1])-((t=t.x)[0]<0?t[1]-re-vt:re-t[1])}const ih=nh(function(){return!0},ix,sx,[-ut,-re]);function ix(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(s,a){var o=s>0?ut:-ut,c=yt(s-t);yt(c-ut)<vt?(e.point(t,n=(n+a)/2>0?re:-re),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),r=0):i!==o&&c>=ut&&(yt(t-i)<vt&&(t-=i*vt),yt(s-o)<vt&&(s-=o*vt),n=rx(t,n,s,a),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(o,n),r=0),e.point(t=s,n=a),i=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}function rx(e,t,n,i){var r,s,a=gt(e-n);return yt(a)>vt?zu((gt(t)*(s=bt(i))*gt(n)-gt(i)*(r=bt(t))*gt(e))/(r*s*a)):(t+i)/2}function sx(e,t,n,i){var r;if(e==null)r=n*re,i.point(-ut,r),i.point(0,r),i.point(ut,r),i.point(ut,0),i.point(ut,-r),i.point(0,-r),i.point(-ut,-r),i.point(-ut,0),i.point(-ut,r);else if(yt(e[0]-t[0])>vt){var s=e[0]<t[0]?ut:-ut;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(t[0],t[1])}function ax(e){var t=bt(e),n=6*Rt,i=t>0,r=yt(t)>vt;function s(u,d,h,f){J_(f,e,n,h,u,d)}function a(u,d){return bt(u)*bt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var x=[m,v],b,O=a(m,v),E=i?O?0:l(m,v):O?l(m+(m<0?ut:-ut),v):0;if(!d&&(p=f=O)&&u.lineStart(),O!==f&&(b=c(d,x),(!b||ps(d,b)||ps(x,b))&&(x[2]=1)),O!==f)g=0,O?(u.lineStart(),b=c(x,d),u.point(b[0],b[1])):(b=c(d,x),u.point(b[0],b[1],2),u.lineEnd()),d=b;else if(r&&d&&i^O){var T;!(E&h)&&(T=c(x,d,!0))&&(g=0,i?(u.lineStart(),u.point(T[0][0],T[0][1]),u.point(T[1][0],T[1][1]),u.lineEnd()):(u.point(T[1][0],T[1][1]),u.lineEnd(),u.lineStart(),u.point(T[0][0],T[0][1],3)))}O&&(!d||!ps(d,x))&&u.point(x[0],x[1]),d=x,f=O,h=E},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function c(u,d,h){var f=ti(u),p=ti(d),g=[1,0,0],m=ds(f,p),v=hs(m,m),x=m[0],b=v-x*x;if(!b)return!h&&u;var O=t*v/b,E=-t*x/b,T=ds(g,m),S=fs(g,O),A=fs(m,E);_o(S,A);var D=T,L=hs(S,D),C=hs(D,D),B=L*L-C*(hs(S,S)-1);if(!(B<0)){var _=Ee(B),$=fs(D,(-L-_)/C);if(_o($,S),$=yo($),!h)return $;var y=u[0],k=d[0],R=u[1],U=d[1],N;k<y&&(N=y,y=k,k=N);var G=k-y,z=yt(G-ut)<vt,F=z||G<vt;if(!z&&U<R&&(N=R,R=U,U=N),F?z?R+U>0^$[1]<(yt($[0]-y)<vt?R:U):R<=$[1]&&$[1]<=U:G>ut^(y<=$[0]&&$[0]<=k)){var Q=fs(D,(-L+_)/C);return _o(Q,S),[$,yo(Q)]}}}function l(u,d){var h=i?e:ut-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return nh(a,o,s,i?[0,-e]:[-ut,e-ut])}function ox(e,t,n,i,r,s){var a=e[0],o=e[1],c=t[0],l=t[1],u=0,d=1,h=c-a,f=l-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=r-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=i-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 Gi=1e9,gs=-Gi;function lx(e,t,n,i){function r(l,u){return e<=l&&l<=n&&t<=u&&u<=i}function s(l,u,d,h){var f=0,p=0;if(l==null||(f=a(l,d))!==(p=a(u,d))||c(l,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?i:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(l,u){return yt(l[0]-e)<vt?u>0?0:3:yt(l[0]-n)<vt?u>0?2:1:yt(l[1]-t)<vt?u>0?1:0:u>0?3:2}function o(l,u){return c(l.x,u.x)}function c(l,u){var d=a(l,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-l[1]:d===1?l[0]-u[0]:d===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,d=Ju(),h,f,p,g,m,v,x,b,O,E,T,S={point:A,lineStart:B,lineEnd:_,polygonStart:L,polygonEnd:C};function A(y,k){r(y,k)&&u.point(y,k)}function D(){for(var y=0,k=0,R=f.length;k<R;++k)for(var U=f[k],N=1,G=U.length,z=U[0],F,Q,j=z[0],X=z[1];N<G;++N)F=j,Q=X,z=U[N],j=z[0],X=z[1],Q<=i?X>i&&(j-F)*(i-Q)>(X-Q)*(e-F)&&++y:X<=i&&(j-F)*(i-Q)<(X-Q)*(e-F)&&--y;return y}function L(){u=d,h=[],f=[],T=!0}function C(){var y=D(),k=T&&y,R=(h=Pc(h)).length;(k||R)&&(l.polygonStart(),k&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),R&&th(h,o,y,s,l),l.polygonEnd()),u=l,h=f=p=null}function B(){S.point=$,f&&f.push(p=[]),E=!0,O=!1,x=b=NaN}function _(){h&&($(g,m),v&&O&&d.rejoin(),h.push(d.result())),S.point=A,O&&u.lineEnd()}function $(y,k){var R=r(y,k);if(f&&p.push([y,k]),E)g=y,m=k,v=R,E=!1,R&&(u.lineStart(),u.point(y,k));else if(R&&O)u.point(y,k);else{var U=[x=Math.max(gs,Math.min(Gi,x)),b=Math.max(gs,Math.min(Gi,b))],N=[y=Math.max(gs,Math.min(Gi,y)),k=Math.max(gs,Math.min(Gi,k))];ox(U,N,e,t,n,i)?(O||(u.lineStart(),u.point(U[0],U[1])),u.point(N[0],N[1]),R||u.lineEnd(),T=!1):R&&(u.lineStart(),u.point(y,k),T=!1)}x=y,b=k,O=R}return S}}const So=e=>e;var Oo=new _n,To=new _n,rh,sh,Co,Mo,hn={point:pe,lineStart:pe,lineEnd:pe,polygonStart:function(){hn.lineStart=cx,hn.lineEnd=hx},polygonEnd:function(){hn.lineStart=hn.lineEnd=hn.point=pe,Oo.add(yt(To)),To=new _n},result:function(){var e=Oo/2;return Oo=new _n,e}};function cx(){hn.point=ux}function ux(e,t){hn.point=ah,rh=Co=e,sh=Mo=t}function ah(e,t){To.add(Mo*e-Co*t),Co=e,Mo=t}function hx(){ah(rh,sh)}const oh=hn;var ei=1/0,vs=ei,zi=-ei,ys=zi,dx={point:fx,lineStart:pe,lineEnd:pe,polygonStart:pe,polygonEnd:pe,result:function(){var e=[[ei,vs],[zi,ys]];return zi=ys=-(vs=ei=1/0),e}};function fx(e,t){e<ei&&(ei=e),e>zi&&(zi=e),t<vs&&(vs=t),t>ys&&(ys=t)}const _s=dx;var $o=0,Ao=0,ji=0,xs=0,bs=0,ni=0,Lo=0,Do=0,Wi=0,lh,ch,ke,Re,Se={point:Cn,lineStart:uh,lineEnd:hh,polygonStart:function(){Se.lineStart=gx,Se.lineEnd=vx},polygonEnd:function(){Se.point=Cn,Se.lineStart=uh,Se.lineEnd=hh},result:function(){var e=Wi?[Lo/Wi,Do/Wi]:ni?[xs/ni,bs/ni]:ji?[$o/ji,Ao/ji]:[NaN,NaN];return $o=Ao=ji=xs=bs=ni=Lo=Do=Wi=0,e}};function Cn(e,t){$o+=e,Ao+=t,++ji}function uh(){Se.point=px}function px(e,t){Se.point=mx,Cn(ke=e,Re=t)}function mx(e,t){var n=e-ke,i=t-Re,r=Ee(n*n+i*i);xs+=r*(ke+e)/2,bs+=r*(Re+t)/2,ni+=r,Cn(ke=e,Re=t)}function hh(){Se.point=Cn}function gx(){Se.point=yx}function vx(){dh(lh,ch)}function yx(e,t){Se.point=dh,Cn(lh=ke=e,ch=Re=t)}function dh(e,t){var n=e-ke,i=t-Re,r=Ee(n*n+i*i);xs+=r*(ke+e)/2,bs+=r*(Re+t)/2,ni+=r,r=Re*e-ke*t,Lo+=r*(ke+e),Do+=r*(Re+t),Wi+=r*3,Cn(ke=e,Re=t)}const fh=Se;function ph(e){this._context=e}ph.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,he);break}}},result:pe};var ko=new _n,Ro,mh,gh,qi,Yi,ws={point:pe,lineStart:function(){ws.point=_x},lineEnd:function(){Ro&&vh(mh,gh),ws.point=pe},polygonStart:function(){Ro=!0},polygonEnd:function(){Ro=null},result:function(){var e=+ko;return ko=new _n,e}};function _x(e,t){ws.point=vh,mh=qi=e,gh=Yi=t}function vh(e,t){qi-=e,Yi-=t,ko.add(Ee(qi*qi+Yi*Yi)),qi=e,Yi=t}const yh=ws;let _h,Es,xh,bh;class wh{constructor(t){this._append=t==null?Eh:xx(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!==xh||this._append!==Es){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,xh=i,Es=this._append,bh=this._,this._=r}this._+=bh;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Eh(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function xx(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Eh;if(t!==_h){const n=10**t;_h=t,Es=function(r){let s=1;this._+=r[0];for(const a=r.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+r[s]}}return Es}function bx(e,t){let n=3,i=4.5,r,s;function a(o){return o&&(typeof i=="function"&&s.pointRadius(+i.apply(this,arguments)),Jn(o,r(s))),s.result()}return a.area=function(o){return Jn(o,r(oh)),oh.result()},a.measure=function(o){return Jn(o,r(yh)),yh.result()},a.bounds=function(o){return Jn(o,r(_s)),_s.result()},a.centroid=function(o){return Jn(o,r(fh)),fh.result()},a.projection=function(o){return arguments.length?(r=o==null?(e=null,So):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new wh(n)):new ph(t=o),typeof i!="function"&&s.pointRadius(i),a):t},a.pointRadius=function(o){return arguments.length?(i=typeof o=="function"?o:(s.pointRadius(+o),+o),a):i},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const c=Math.floor(o);if(!(c>=0))throw new RangeError(`invalid digits: ${o}`);n=c}return t===null&&(s=new wh(n)),a},a.projection(e).digits(n).context(t)}function Io(e){return function(t){var n=new Po;for(var i in e)n[i]=e[i];return n.stream=t,n}}function Po(){}Po.prototype={constructor:Po,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 No(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),Jn(n,e.stream(_s)),t(_s.result()),i!=null&&e.clipExtent(i),e}function Sh(e,t,n){return No(e,function(i){var r=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(r/(i[1][0]-i[0][0]),s/(i[1][1]-i[0][1])),o=+t[0][0]+(r-a*(i[1][0]+i[0][0]))/2,c=+t[0][1]+(s-a*(i[1][1]+i[0][1]))/2;e.scale(150*a).translate([o,c])},n)}function wx(e,t,n){return Sh(e,[[0,0],t],n)}function Ex(e,t,n){return No(e,function(i){var r=+t,s=r/(i[1][0]-i[0][0]),a=(r-s*(i[1][0]+i[0][0]))/2,o=-s*i[0][1];e.scale(150*s).translate([a,o])},n)}function Sx(e,t,n){return No(e,function(i){var r=+t,s=r/(i[1][1]-i[0][1]),a=-s*i[0][0],o=(r-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Oh=16,Ox=bt(30*Rt);function Th(e,t){return+t?Cx(e,t):Tx(e)}function Tx(e){return Io({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Cx(e,t){function n(i,r,s,a,o,c,l,u,d,h,f,p,g,m){var v=l-i,x=u-r,b=v*v+x*x;if(b>4*t&&g--){var O=a+h,E=o+f,T=c+p,S=Ee(O*O+E*E+T*T),A=qe(T/=S),D=yt(yt(T)-1)<vt||yt(s-d)<vt?(s+d)/2:Tn(E,O),L=e(D,A),C=L[0],B=L[1],_=C-i,$=B-r,y=x*_-v*$;(y*y/b>t||yt((v*_+x*$)/b-.5)>.3||a*h+o*f+c*p<Ox)&&(n(i,r,s,a,o,c,C,B,D,O/=S,E/=S,T,g,m),m.point(C,B),n(C,B,D,O,E,T,l,u,d,h,f,p,g,m))}}return function(i){var r,s,a,o,c,l,u,d,h,f,p,g,m={point:v,lineStart:x,lineEnd:O,polygonStart:function(){i.polygonStart(),m.lineStart=E},polygonEnd:function(){i.polygonEnd(),m.lineStart=x}};function v(A,D){A=e(A,D),i.point(A[0],A[1])}function x(){d=NaN,m.point=b,i.lineStart()}function b(A,D){var L=ti([A,D]),C=e(A,D);n(d,h,u,f,p,g,d=C[0],h=C[1],u=A,f=L[0],p=L[1],g=L[2],Oh,i),i.point(d,h)}function O(){m.point=v,i.lineEnd()}function E(){x(),m.point=T,m.lineEnd=S}function T(A,D){b(r=A,D),s=d,a=h,o=f,c=p,l=g,m.point=b}function S(){n(d,h,u,f,p,g,s,a,r,o,c,l,Oh,i),m.lineEnd=O,O()}return m}}var Mx=Io({point:function(e,t){this.stream.point(e*Rt,t*Rt)}});function $x(e){return Io({point:function(t,n){var i=e(t,n);return this.stream.point(i[0],i[1])}})}function Ax(e,t,n,i,r){function s(a,o){return a*=i,o*=r,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*i,(n-o)/e*r]},s}function Ch(e,t,n,i,r,s){if(!s)return Ax(e,t,n,i,r);var a=bt(s),o=gt(s),c=a*e,l=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,m){return g*=i,m*=r,[c*g-l*m+t,n-l*g-c*m]}return p.invert=function(g,m){return[i*(u*g-d*m+h),r*(f-d*g-u*m)]},p}function Ss(e){return Mh(function(){return e})()}function Mh(e){var t,n=150,i=480,r=250,s=0,a=0,o=0,c=0,l=0,u,d=0,h=1,f=1,p=null,g=ih,m=null,v,x,b,O=So,E=.5,T,S,A,D,L;function C(y){return A(y[0]*Rt,y[1]*Rt)}function B(y){return y=A.invert(y[0],y[1]),y&&[y[0]*Jt,y[1]*Jt]}C.stream=function(y){return D&&L===y?D:D=Mx($x(u)(g(T(O(L=y)))))},C.preclip=function(y){return arguments.length?(g=y,p=void 0,$()):g},C.postclip=function(y){return arguments.length?(O=y,m=v=x=b=null,$()):O},C.clipAngle=function(y){return arguments.length?(g=+y?ax(p=y*Rt):(p=null,ih),$()):p*Jt},C.clipExtent=function(y){return arguments.length?(O=y==null?(m=v=x=b=null,So):lx(m=+y[0][0],v=+y[0][1],x=+y[1][0],b=+y[1][1]),$()):m==null?null:[[m,v],[x,b]]},C.scale=function(y){return arguments.length?(n=+y,_()):n},C.translate=function(y){return arguments.length?(i=+y[0],r=+y[1],_()):[i,r]},C.center=function(y){return arguments.length?(s=y[0]%360*Rt,a=y[1]%360*Rt,_()):[s*Jt,a*Jt]},C.rotate=function(y){return arguments.length?(o=y[0]%360*Rt,c=y[1]%360*Rt,l=y.length>2?y[2]%360*Rt:0,_()):[o*Jt,c*Jt,l*Jt]},C.angle=function(y){return arguments.length?(d=y%360*Rt,_()):d*Jt},C.reflectX=function(y){return arguments.length?(h=y?-1:1,_()):h<0},C.reflectY=function(y){return arguments.length?(f=y?-1:1,_()):f<0},C.precision=function(y){return arguments.length?(T=Th(S,E=y*y),$()):Ee(E)},C.fitExtent=function(y,k){return Sh(C,y,k)},C.fitSize=function(y,k){return wx(C,y,k)},C.fitWidth=function(y,k){return Ex(C,y,k)},C.fitHeight=function(y,k){return Sx(C,y,k)};function _(){var y=Ch(n,0,0,h,f,d).apply(null,t(s,a)),k=Ch(n,i-y[0],r-y[1],h,f,d);return u=Yu(o,c,l),S=bo(t,k),A=bo(u,S),T=Th(S,E),$()}function $(){return D=L=null,C}return function(){return t=e.apply(this,arguments),C.invert=t.invert&&B,_()}}function $h(e){var t=0,n=ut/3,i=Mh(e),r=i(t,n);return r.parallels=function(s){return arguments.length?i(t=s[0]*Rt,n=s[1]*Rt):[t*Jt,n*Jt]},r}function Lx(e){var t=bt(e);function n(i,r){return[i*t,gt(r)/t]}return n.invert=function(i,r){return[i/t,qe(r*t)]},n}function Dx(e,t){var n=gt(e),i=(n+gt(t))/2;if(yt(i)<vt)return Lx(e);var r=1+n*(2*i-n),s=Ee(r)/i;function a(o,c){var l=Ee(r-2*i*gt(c))/i;return[l*gt(o*=i),s-l*bt(o)]}return a.invert=function(o,c){var l=s-c,u=Tn(o,yt(l))*un(l);return l*i<0&&(u-=ut*un(o)*un(l)),[u/i,qe((r-(o*o+l*l)*i*i)/(2*i))]},a}function Ah(){return $h(Dx).scale(155.424).center([0,33.6442])}function kx(){return Ah().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Uo(e,t){return[e,X_(Z_((re+t)/2))]}Uo.invert=function(e,t){return[e,2*zu(Y_(t))-re]};function Rx(){return Ix(Uo).scale(961/he)}function Ix(e){var t=Ss(e),n=t.center,i=t.scale,r=t.translate,s=t.clipExtent,a=null,o,c,l;t.scale=function(d){return arguments.length?(i(d),u()):i()},t.translate=function(d){return arguments.length?(r(d),u()):r()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=c=l=null:(a=+d[0][0],o=+d[0][1],c=+d[1][0],l=+d[1][1]),u()):a==null?null:[[a,o],[c,l]]};function u(){var d=ut*i(),h=t(Q_(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Uo?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,c),l]]:[[a,Math.max(h[1]-d,o)],[c,Math.min(h[1]+d,l)]])}return u()}function Os(e,t){return[e,t]}Os.invert=Os;function Px(){return Ss(Os).scale(152.63)}function Nx(e,t){var n=bt(e),i=e===t?gt(e):(n-bt(t))/(t-e),r=n/i+e;if(yt(i)<vt)return Os;function s(a,o){var c=r-o,l=i*a;return[c*gt(l),r-c*bt(l)]}return s.invert=function(a,o){var c=r-o,l=Tn(a,yt(c))*un(c);return c*i<0&&(l-=ut*un(a)*un(c)),[l/i,r-un(i)*Ee(a*a+c*c)]},s}function Ux(){return $h(Nx).scale(131.154).center([0,13.9389])}var Xi=1.340264,Zi=-.081106,Ki=893e-6,Qi=.003796,Ts=Ee(3)/2,Bx=12;function Lh(e,t){var n=qe(Ts*gt(t)),i=n*n,r=i*i*i;return[e*bt(n)/(Ts*(Xi+3*Zi*i+r*(7*Ki+9*Qi*i))),n*(Xi+Zi*i+r*(Ki+Qi*i))]}Lh.invert=function(e,t){for(var n=t,i=n*n,r=i*i*i,s=0,a,o,c;s<Bx&&(o=n*(Xi+Zi*i+r*(Ki+Qi*i))-t,c=Xi+3*Zi*i+r*(7*Ki+9*Qi*i),n-=a=o/c,i=n*n,r=i*i*i,!(yt(a)<Fu));++s);return[Ts*e*(Xi+3*Zi*i+r*(7*Ki+9*Qi*i))/bt(n),qe(gt(n)/Ts)]};function Vx(){return Ss(Lh).scale(177.158)}function Dh(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),t*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}Dh.invert=function(e,t){var n=t,i=25,r;do{var s=n*n,a=s*s;n-=r=(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(yt(r)>vt&&--i>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Hx(){return Ss(Dh).scale(175.295)}function Fx(e,t){return e.parent===t.parent?1:2}function Gx(e){return e.reduce(zx,0)/e.length}function zx(e,t){return e+t.x}function jx(e){return 1+e.reduce(Wx,0)}function Wx(e,t){return Math.max(e,t.y)}function qx(e){for(var t;t=e.children;)e=t[0];return e}function Yx(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Xx(){var e=Fx,t=1,n=1,i=!1;function r(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=Gx(f),h.y=jx(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var c=qx(s),l=Yx(s),u=c.x-e(c,l)/2,d=l.x+e(l,c)/2;return s.eachAfter(i?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 r.separation=function(s){return arguments.length?(e=s,r):e},r.size=function(s){return arguments.length?(i=!1,t=+s[0],n=+s[1],r):i?null:[t,n]},r.nodeSize=function(s){return arguments.length?(i=!0,t=+s[0],n=+s[1],r):i?[t,n]:null},r}function Zx(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function Kx(){return this.eachAfter(Zx)}function Qx(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function Jx(e,t){for(var n=this,i=[n],r,s,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(s=r.length-1;s>=0;--s)i.push(r[s]);return this}function tb(e,t){for(var n=this,i=[n],r=[],s,a,o,c=-1;n=i.pop();)if(r.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)i.push(s[a]);for(;n=r.pop();)e.call(t,n,++c,this);return this}function eb(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function nb(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function ib(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function rb(e){for(var t=this,n=sb(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function sb(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ab(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function ob(){return Array.from(this)}function lb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function cb(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*ub(){var e=this,t,n=[e],i,r,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,s=i.length;r<s;++r)n.push(i[r]);while(n.length)}function Ji(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=fb)):t===void 0&&(t=db);for(var n=new tr(e),i,r=[n],s,a,o,c;i=r.pop();)if((a=t(i.data))&&(c=(a=Array.from(a)).length))for(i.children=a,o=c-1;o>=0;--o)r.push(s=a[o]=new tr(a[o])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(mb)}function hb(){return Ji(this).eachBefore(pb)}function db(e){return e.children}function fb(e){return Array.isArray(e)?e[1]:null}function pb(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function mb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function tr(e){this.data=e,this.depth=this.height=0,this.parent=null}tr.prototype=Ji.prototype={constructor:tr,count:Kx,each:Qx,eachAfter:tb,eachBefore:Jx,find:eb,sum:nb,sort:ib,path:rb,ancestors:ab,descendants:ob,leaves:lb,links:cb,copy:hb,[Symbol.iterator]:ub};function gb(e){return e==null?null:kh(e)}function kh(e){if(typeof e!="function")throw new Error;return e}function Mn(){return 0}function ii(e){return function(){return e}}const vb=1664525,yb=1013904223,Rh=4294967296;function _b(){let e=1;return()=>(e=(vb*e+yb)%Rh)/Rh}function xb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bb(e,t){let n=e.length,i,r;for(;n;)r=t()*n--|0,i=e[n],e[n]=e[r],e[r]=i;return e}function wb(e,t){for(var n=0,i=(e=bb(Array.from(e),t)).length,r=[],s,a;n<i;)s=e[n],a&&Ih(a,s)?++n:(a=Sb(r=Eb(r,s)),n=0);return a}function Eb(e,t){var n,i;if(Bo(t,e))return[t];for(n=0;n<e.length;++n)if(Cs(t,e[n])&&Bo(er(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(i=n+1;i<e.length;++i)if(Cs(er(e[n],e[i]),t)&&Cs(er(e[n],t),e[i])&&Cs(er(e[i],t),e[n])&&Bo(Ph(e[n],e[i],t),e))return[e[n],e[i],t];throw new Error}function Cs(e,t){var n=e.r-t.r,i=t.x-e.x,r=t.y-e.y;return n<0||n*n<i*i+r*r}function Ih(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Bo(e,t){for(var n=0;n<t.length;++n)if(!Ih(e,t[n]))return!1;return!0}function Sb(e){switch(e.length){case 1:return Ob(e[0]);case 2:return er(e[0],e[1]);case 3:return Ph(e[0],e[1],e[2])}}function Ob(e){return{x:e.x,y:e.y,r:e.r}}function er(e,t){var n=e.x,i=e.y,r=e.r,s=t.x,a=t.y,o=t.r,c=s-n,l=a-i,u=o-r,d=Math.sqrt(c*c+l*l);return{x:(n+s+c/d*u)/2,y:(i+a+l/d*u)/2,r:(d+r+o)/2}}function Ph(e,t,n){var i=e.x,r=e.y,s=e.r,a=t.x,o=t.y,c=t.r,l=n.x,u=n.y,d=n.r,h=i-a,f=i-l,p=r-o,g=r-u,m=c-s,v=d-s,x=i*i+r*r-s*s,b=x-a*a-o*o+c*c,O=x-l*l-u*u+d*d,E=f*p-h*g,T=(p*O-g*b)/(E*2)-i,S=(g*m-p*v)/E,A=(f*b-h*O)/(E*2)-r,D=(h*v-f*m)/E,L=S*S+D*D-1,C=2*(s+T*S+A*D),B=T*T+A*A-s*s,_=-(Math.abs(L)>1e-6?(C+Math.sqrt(C*C-4*L*B))/(2*L):B/C);return{x:i+T+S*_,y:r+A+D*_,r:_}}function Nh(e,t,n){var i=e.x-t.x,r,s,a=e.y-t.y,o,c,l=i*i+a*a;l?(s=t.r+n.r,s*=s,c=e.r+n.r,c*=c,s>c?(r=(l+c-s)/(2*l),o=Math.sqrt(Math.max(0,c/l-r*r)),n.x=e.x-r*i-o*a,n.y=e.y-r*a+o*i):(r=(l+s-c)/(2*l),o=Math.sqrt(Math.max(0,s/l-r*r)),n.x=t.x+r*i-o*a,n.y=t.y+r*a+o*i)):(n.x=t.x+n.r,n.y=t.y)}function Uh(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Bh(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,s=(t.y*n.r+n.y*t.r)/i;return r*r+s*s}function Ms(e){this._=e,this.next=null,this.previous=null}function Tb(e,t){if(!(s=(e=xb(e)).length))return 0;var n,i,r,s,a,o,c,l,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(s>2))return n.r+i.r;Nh(i,n,r=e[2]),n=new Ms(n),i=new Ms(i),r=new Ms(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;t:for(c=3;c<s;++c){Nh(n._,i._,r=e[c]),r=new Ms(r),l=i.next,u=n.previous,d=i._.r,h=n._.r;do if(d<=h){if(Uh(l._,r._)){i=l,n.next=i,i.previous=n,--c;continue t}d+=l._.r,l=l.next}else{if(Uh(u._,r._)){n=u,n.next=i,i.previous=n,--c;continue t}h+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=n,r.next=i,n.next=i.previous=i=r,a=Bh(n);(r=r.next)!==i;)(o=Bh(r))<a&&(n=r,a=o);i=n.next}for(n=[i._],r=i;(r=r.next)!==i;)n.push(r._);for(r=wb(n,t),c=0;c<s;++c)n=e[c],n.x-=r.x,n.y-=r.y;return r.r}function Cb(e){return Math.sqrt(e.value)}function Mb(){var e=null,t=1,n=1,i=Mn;function r(s){const a=_b();return s.x=t/2,s.y=n/2,e?s.eachBefore(Vh(e)).eachAfter(Vo(i,.5,a)).eachBefore(Hh(1)):s.eachBefore(Vh(Cb)).eachAfter(Vo(Mn,1,a)).eachAfter(Vo(i,s.r/Math.min(t,n),a)).eachBefore(Hh(Math.min(t,n)/(2*s.r))),s}return r.radius=function(s){return arguments.length?(e=gb(s),r):e},r.size=function(s){return arguments.length?(t=+s[0],n=+s[1],r):[t,n]},r.padding=function(s){return arguments.length?(i=typeof s=="function"?s:ii(+s),r):i},r}function Vh(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Vo(e,t,n){return function(i){if(r=i.children){var r,s,a=r.length,o=e(i)*t||0,c;if(o)for(s=0;s<a;++s)r[s].r+=o;if(c=Tb(r,n),o)for(s=0;s<a;++s)r[s].r-=o;i.r=c+o}}}function Hh(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 $b(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 Ab(e,t,n,i,r){for(var s=e.children,a,o=-1,c=s.length,l=e.value&&(i-t)/e.value;++o<c;)a=s[o],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*l}function Lb(e,t){return e.parent===t.parent?1:2}function Ho(e){var t=e.children;return t?t[0]:e.t}function Fo(e){var t=e.children;return t?t[t.length-1]:e.t}function Db(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function kb(e){for(var t=0,n=0,i=e.children,r=i.length,s;--r>=0;)s=i[r],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function Rb(e,t,n){return e.a.parent===t.parent?e.a:n}function $s(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}$s.prototype=Object.create(tr.prototype);function Ib(e){for(var t=new $s(e,0),n,i=[t],r,s,a,o;n=i.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)i.push(r=n.children[a]=new $s(s[a],a)),r.parent=n;return(t.parent=new $s(null,0)).children=[t],t}function Pb(){var e=Lb,t=1,n=1,i=null;function r(l){var u=Ib(l);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),i)l.eachBefore(c);else{var d=l,h=l,f=l;l.eachBefore(function(x){x.x<d.x&&(d=x),x.x>h.x&&(h=x),x.depth>f.depth&&(f=x)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);l.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*v})}return l}function s(l){var u=l.children,d=l.parent.children,h=l.i?d[l.i-1]:null;if(u){kb(l);var f=(u[0].z+u[u.length-1].z)/2;h?(l.z=h.z+e(l._,h._),l.m=l.z-f):l.z=f}else h&&(l.z=h.z+e(l._,h._));l.parent.A=o(l,h,l.parent.A||d[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function o(l,u,d){if(u){for(var h=l,f=l,p=u,g=h.parent.children[0],m=h.m,v=f.m,x=p.m,b=g.m,O;p=Fo(p),h=Ho(h),p&&h;)g=Ho(g),f=Fo(f),f.a=l,O=p.z+x-h.z-m+e(p._,h._),O>0&&(Db(Rb(p,l,d),l,O),m+=O,v+=O),x+=p.m,m+=h.m,b+=g.m,v+=f.m;p&&!Fo(f)&&(f.t=p,f.m+=x-v),h&&!Ho(g)&&(g.t=h,g.m+=m-b,d=l)}return d}function c(l){l.x*=t,l.y=l.depth*n}return r.separation=function(l){return arguments.length?(e=l,r):e},r.size=function(l){return arguments.length?(i=!1,t=+l[0],n=+l[1],r):i?null:[t,n]},r.nodeSize=function(l){return arguments.length?(i=!0,t=+l[0],n=+l[1],r):i?[t,n]:null},r}function Nb(e,t,n,i,r){for(var s=e.children,a,o=-1,c=s.length,l=e.value&&(r-n)/e.value;++o<c;)a=s[o],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*l}var Ub=(1+Math.sqrt(5))/2;function Bb(e,t,n,i,r,s){for(var a=[],o=t.children,c,l,u=0,d=0,h=o.length,f,p,g=t.value,m,v,x,b,O,E,T;u<h;){f=r-n,p=s-i;do m=o[d++].value;while(!m&&d<h);for(v=x=m,E=Math.max(p/f,f/p)/(g*e),T=m*m*E,O=Math.max(x/T,T/v);d<h;++d){if(m+=l=o[d].value,l<v&&(v=l),l>x&&(x=l),T=m*m*E,b=Math.max(x/T,T/v),b>O){m-=l;break}O=b}a.push(c={value:m,dice:f<p,children:o.slice(u,d)}),c.dice?Ab(c,n,i,r,g?i+=p*m/g:s):Nb(c,n,i,g?n+=f*m/g:r,s),g-=m,u=d}return a}const Vb=function e(t){function n(i,r,s,a,o){Bb(t,i,r,s,a,o)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(Ub);function Hb(){var e=Vb,t=!1,n=1,i=1,r=[0],s=Mn,a=Mn,o=Mn,c=Mn,l=Mn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=i,h.eachBefore(d),r=[0],t&&h.eachBefore($b),h}function d(h){var f=r[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=r[h.depth+1]=s(h)/2,p+=l(h)-f,g+=a(h)-f,m-=o(h)-f,v-=c(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],i=+h[1],u):[n,i]},u.tile=function(h){return arguments.length?(e=kh(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:ii(+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:ii(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:ii(+h),u):o},u.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:ii(+h),u):c},u.paddingLeft=function(h){return arguments.length?(l=typeof h=="function"?h:ii(+h),u):l},u}function ri(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Fh=Symbol("implicit");function As(){var e=new Dc,t=[],n=[],i=Fh;function r(s){let a=e.get(s);if(a===void 0){if(i!==Fh)return i;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return r.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Dc;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return As(t,n).unknown(i)},ri.apply(r,arguments),r}function nr(){var e=As().unknown(void 0),t=e.domain,n=e.range,i=0,r=1,s,a,o=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var h=t().length,f=r<i,p=f?r:i,g=f?i:r;s=(g-p)/Math.max(1,h-c+l*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-c))*u,a=s*(1-c),o&&(p=Math.round(p),a=Math.round(a));var m=Xv(h).map(function(v){return p+s*v});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?([i,r]=h,i=+i,r=+r,d()):[i,r]},e.rangeRound=function(h){return[i,r]=h,i=+i,r=+r,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?(c=Math.min(1,l=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(l=+h,d()):l},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return nr(t(),[i,r]).round(o).paddingInner(c).paddingOuter(l).align(u)},ri.apply(d(),arguments)}function Fb(e){return function(){return e}}function Gb(e){return+e}var Gh=[0,1];function si(e){return e}function Go(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Fb(isNaN(t)?NaN:.5)}function zb(e,t){var n;return e>t&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}function jb(e,t,n){var i=e[0],r=e[1],s=t[0],a=t[1];return r<i?(i=Go(r,i),s=n(a,s)):(i=Go(i,r),s=n(s,a)),function(o){return s(i(o))}}function Wb(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),s=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=Go(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var c=Ra(e,o,1,i)-1;return s[c](r[c](o))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zh(){var e=Gh,t=Gh,n=Ni,i,r,s,a=si,o,c,l;function u(){var h=Math.min(e.length,t.length);return a!==si&&(a=zb(e[0],e[h-1])),o=h>2?Wb:jb,c=l=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=o(e.map(i),t,n)))(i(a(h)))}return d.invert=function(h){return a(r((l||(l=o(t,e.map(i),ue)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Gb),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=hu,u()},d.clamp=function(h){return arguments.length?(a=h?!0:si,u()):a!==si},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 i=h,r=f,u()}}function jh(){return zh()(si,si)}function qb(e,t,n,i){var r=Pa(e,t,n),s;switch(i=Fi(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(s=W_(r,a))&&(i.precision=s),Hu(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=q_(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=j_(r))&&(i.precision=s-(i.type==="%")*2);break}}return go(i)}function Wh(e){var t=e.domain;return e.ticks=function(n){var i=t();return Vr(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return qb(r[0],r[r.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=t(),r=0,s=i.length-1,a=i[r],o=i[s],c,l,u=10;for(o<a&&(l=a,a=o,o=l,l=r,r=s,s=l);u-- >0;){if(l=Wn(a,o,n),l===c)return i[r]=a,i[s]=o,t(i);if(l>0)a=Math.floor(a/l)*l,o=Math.ceil(o/l)*l;else if(l<0)a=Math.ceil(a*l)/l,o=Math.floor(o*l)/l;else break;c=l}return e},e}function Oe(){var e=jh();return e.copy=function(){return zo(e,Oe())},ri.apply(e,arguments),Wh(e)}function qh(e,t){e=e.slice();var n=0,i=e.length-1,r=e[n],s=e[i],a;return s<r&&(a=n,n=i,i=a,a=r,r=s,s=a),e[n]=t.floor(r),e[i]=t.ceil(s),e}function Yh(e){return Math.log(e)}function Xh(e){return Math.exp(e)}function Yb(e){return-Math.log(-e)}function Xb(e){return-Math.exp(-e)}function Zb(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Kb(e){return e===10?Zb:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Qb(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 Zh(e){return(t,n)=>-e(-t,n)}function Jb(e){const t=e(Yh,Xh),n=t.domain;let i=10,r,s;function a(){return r=Qb(i),s=Kb(i),n()[0]<0?(r=Zh(r),s=Zh(s),e(Yb,Xb)):e(Yh,Xh),t}return t.base=function(o){return arguments.length?(i=+o,a()):i},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let h=r(l),f=r(u),p,g;const m=o==null?10:+o;let v=[];if(!(i%1)&&f-h<m){if(h=Math.floor(h),f=Math.ceil(f),l>0){for(;h<=f;++h)for(p=1;p<i;++p)if(g=h<0?p/s(-h):p*s(h),!(g<l)){if(g>u)break;v.push(g)}}else for(;h<=f;++h)for(p=i-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<l)){if(g>u)break;v.push(g)}v.length*2<m&&(v=Vr(l,u,m))}else v=Vr(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=Fi(c)).precision==null&&(c.trim=!0),c=go(c)),o===1/0)return c;const l=Math.max(1,i*o/t.ticks().length);return u=>{let d=u/s(Math.round(r(u)));return d*i<i-.5&&(d*=i),d<=l?c(u):""}},t.nice=()=>n(qh(n(),{floor:o=>s(Math.floor(r(o))),ceil:o=>s(Math.ceil(r(o)))})),t}function Kh(){const e=Jb(zh()).domain([1,10]);return e.copy=()=>zo(e,Kh()).base(e.base()),ri.apply(e,arguments),e}function jo(){var e=0,t=1,n=1,i=[.5],r=[0,1],s;function a(c){return c!=null&&c<=c?r[Ra(i,c,0,n)]:s}function o(){var c=-1;for(i=new Array(n);++c<n;)i[c]=((c+1)*t-(c-n)*e)/(n+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},a.range=function(c){return arguments.length?(n=(r=Array.from(c)).length-1,o()):r.slice()},a.invertExtent=function(c){var l=r.indexOf(c);return l<0?[NaN,NaN]:l<1?[e,i[0]]:l>=n?[i[n-1],t]:[i[l-1],i[l]]},a.unknown=function(c){return arguments.length&&(s=c),a},a.thresholds=function(){return i.slice()},a.copy=function(){return jo().domain([e,t]).range(r).unknown(s)},ri.apply(Wh(a),arguments)}const Wo=new Date,qo=new Date;function Pt(e,t,n,i){function r(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(e(s=new Date(+s)),s),r.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),r.round=s=>{const a=r(s),o=r.ceil(s);return s-a<o-s?a:o},r.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),r.range=(s,a,o)=>{const c=[];if(s=r.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return c;let l;do c.push(l=new Date(+s)),t(s,o),e(s);while(l<s&&s<a);return c},r.filter=s=>Pt(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&&(r.count=(s,a)=>(Wo.setTime(+s),qo.setTime(+a),e(Wo),e(qo),Math.floor(n(Wo,qo))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?a=>i(a)%s===0:a=>r.count(0,a)%s===0):r)),r}const Ls=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ls.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ls),Ls.range;const Ye=1e3,me=Ye*60,Xe=me*60,Ze=Xe*24,Yo=Ze*7,Qh=Ze*30,Xo=Ze*365,ai=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ye)},(e,t)=>(t-e)/Ye,e=>e.getUTCSeconds());ai.range;const Zo=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ye)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getMinutes());Zo.range,Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCMinutes()).range;const Ko=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ye-e.getMinutes()*me)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getHours());Ko.range,Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getUTCHours()).range;const ir=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*me)/Ze,e=>e.getDate()-1);ir.range;const Qo=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>e.getUTCDate()-1);Qo.range,Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>Math.floor(e/Ze)).range;function $n(e){return Pt(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())*me)/Yo)}const Ds=$n(0),ks=$n(1),tw=$n(2),ew=$n(3),oi=$n(4),nw=$n(5),iw=$n(6);Ds.range,ks.range,tw.range,ew.range,oi.range,nw.range,iw.range;function An(e){return Pt(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)/Yo)}const Jh=An(0),Rs=An(1),rw=An(2),sw=An(3),li=An(4),aw=An(5),ow=An(6);Jh.range,Rs.range,rw.range,sw.range,li.range,aw.range,ow.range;const Jo=Pt(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());Jo.range,Pt(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 Ke=Pt(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());Ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)}),Ke.range;const Ln=Pt(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());Ln.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)}),Ln.range;function lw(e,t,n,i,r,s){const a=[[ai,1,Ye],[ai,5,5*Ye],[ai,15,15*Ye],[ai,30,30*Ye],[s,1,me],[s,5,5*me],[s,15,15*me],[s,30,30*me],[r,1,Xe],[r,3,3*Xe],[r,6,6*Xe],[r,12,12*Xe],[i,1,Ze],[i,2,2*Ze],[n,1,Yo],[t,1,Qh],[t,3,3*Qh],[e,1,Xo]];function o(l,u,d){const h=u<l;h&&([l,u]=[u,l]);const f=d&&typeof d.range=="function"?d:c(l,u,d),p=f?f.range(l,+u+1):[];return h?p.reverse():p}function c(l,u,d){const h=Math.abs(u-l)/d,f=ka(([,,m])=>m).right(a,h);if(f===a.length)return e.every(Pa(l/Xo,u/Xo,d));if(f===0)return Ls.every(Math.max(Pa(l,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,c]}const[cw,uw]=lw(Ke,Jo,Ds,ir,Ko,Zo);function tl(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 el(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 rr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function hw(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,s=e.days,a=e.shortDays,o=e.months,c=e.shortMonths,l=sr(r),u=ar(r),d=sr(s),h=ar(s),f=sr(a),p=ar(a),g=sr(o),m=ar(o),v=sr(c),x=ar(c),b={a:R,A:U,b:N,B:G,c:null,d:sd,e:sd,f:Rw,g:zw,G:Ww,H:Lw,I:Dw,j:kw,L:ad,m:Iw,M:Pw,p:z,q:F,Q:dd,s:fd,S:Nw,u:Uw,U:Bw,V:Vw,w:Hw,W:Fw,x:null,X:null,y:Gw,Y:jw,Z:qw,"%":hd},O={a:Q,A:j,b:X,B:ot,c:null,d:ld,e:ld,f:Kw,g:oE,G:cE,H:Yw,I:Xw,j:Zw,L:cd,m:Qw,M:Jw,p:tt,q:lt,Q:dd,s:fd,S:tE,u:eE,U:nE,V:iE,w:rE,W:sE,x:null,X:null,y:aE,Y:lE,Z:uE,"%":hd},E={a:L,A:C,b:B,B:_,c:$,d:id,e:id,f:Cw,g:nd,G:ed,H:rd,I:rd,j:Ew,L:Tw,m:ww,M:Sw,p:D,q:bw,Q:$w,s:Aw,S:Ow,u:gw,U:vw,V:yw,w:mw,W:_w,x:y,X:k,y:nd,Y:ed,Z:xw,"%":Mw};b.x=T(n,b),b.X=T(i,b),b.c=T(t,b),O.x=T(n,O),O.X=T(i,O),O.c=T(t,O);function T(W,q){return function(Y){var H=[],xt=-1,pt=0,zt=W.length,qt,et,Lt;for(Y instanceof Date||(Y=new Date(+Y));++xt<zt;)W.charCodeAt(xt)===37&&(H.push(W.slice(pt,xt)),(et=td[qt=W.charAt(++xt)])!=null?qt=W.charAt(++xt):et=qt==="e"?" ":"0",(Lt=q[qt])&&(qt=Lt(Y,et)),H.push(qt),pt=xt+1);return H.push(W.slice(pt,xt)),H.join("")}}function S(W,q){return function(Y){var H=rr(1900,void 0,1),xt=A(H,W,Y+="",0),pt,zt;if(xt!=Y.length)return null;if("Q"in H)return new Date(H.Q);if("s"in H)return new Date(H.s*1e3+("L"in H?H.L:0));if(q&&!("Z"in H)&&(H.Z=0),"p"in H&&(H.H=H.H%12+H.p*12),H.m===void 0&&(H.m="q"in H?H.q:0),"V"in H){if(H.V<1||H.V>53)return null;"w"in H||(H.w=1),"Z"in H?(pt=el(rr(H.y,0,1)),zt=pt.getUTCDay(),pt=zt>4||zt===0?Rs.ceil(pt):Rs(pt),pt=Qo.offset(pt,(H.V-1)*7),H.y=pt.getUTCFullYear(),H.m=pt.getUTCMonth(),H.d=pt.getUTCDate()+(H.w+6)%7):(pt=tl(rr(H.y,0,1)),zt=pt.getDay(),pt=zt>4||zt===0?ks.ceil(pt):ks(pt),pt=ir.offset(pt,(H.V-1)*7),H.y=pt.getFullYear(),H.m=pt.getMonth(),H.d=pt.getDate()+(H.w+6)%7)}else("W"in H||"U"in H)&&("w"in H||(H.w="u"in H?H.u%7:"W"in H?1:0),zt="Z"in H?el(rr(H.y,0,1)).getUTCDay():tl(rr(H.y,0,1)).getDay(),H.m=0,H.d="W"in H?(H.w+6)%7+H.W*7-(zt+5)%7:H.w+H.U*7-(zt+6)%7);return"Z"in H?(H.H+=H.Z/100|0,H.M+=H.Z%100,el(H)):tl(H)}}function A(W,q,Y,H){for(var xt=0,pt=q.length,zt=Y.length,qt,et;xt<pt;){if(H>=zt)return-1;if(qt=q.charCodeAt(xt++),qt===37){if(qt=q.charAt(xt++),et=E[qt in td?q.charAt(xt++):qt],!et||(H=et(W,Y,H))<0)return-1}else if(qt!=Y.charCodeAt(H++))return-1}return H}function D(W,q,Y){var H=l.exec(q.slice(Y));return H?(W.p=u.get(H[0].toLowerCase()),Y+H[0].length):-1}function L(W,q,Y){var H=f.exec(q.slice(Y));return H?(W.w=p.get(H[0].toLowerCase()),Y+H[0].length):-1}function C(W,q,Y){var H=d.exec(q.slice(Y));return H?(W.w=h.get(H[0].toLowerCase()),Y+H[0].length):-1}function B(W,q,Y){var H=v.exec(q.slice(Y));return H?(W.m=x.get(H[0].toLowerCase()),Y+H[0].length):-1}function _(W,q,Y){var H=g.exec(q.slice(Y));return H?(W.m=m.get(H[0].toLowerCase()),Y+H[0].length):-1}function $(W,q,Y){return A(W,t,q,Y)}function y(W,q,Y){return A(W,n,q,Y)}function k(W,q,Y){return A(W,i,q,Y)}function R(W){return a[W.getDay()]}function U(W){return s[W.getDay()]}function N(W){return c[W.getMonth()]}function G(W){return o[W.getMonth()]}function z(W){return r[+(W.getHours()>=12)]}function F(W){return 1+~~(W.getMonth()/3)}function Q(W){return a[W.getUTCDay()]}function j(W){return s[W.getUTCDay()]}function X(W){return c[W.getUTCMonth()]}function ot(W){return o[W.getUTCMonth()]}function tt(W){return r[+(W.getUTCHours()>=12)]}function lt(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var q=T(W+="",b);return q.toString=function(){return W},q},parse:function(W){var q=S(W+="",!1);return q.toString=function(){return W},q},utcFormat:function(W){var q=T(W+="",O);return q.toString=function(){return W},q},utcParse:function(W){var q=S(W+="",!0);return q.toString=function(){return W},q}}}var td={"-":"",_:" ",0:"0"},Ht=/^\s*\d+/,dw=/^%/,fw=/[\\^$*+?|[\]().{}]/g;function dt(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(t)+r:r)}function pw(e){return e.replace(fw,"\\$&")}function sr(e){return new RegExp("^(?:"+e.map(pw).join("|")+")","i")}function ar(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function mw(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function gw(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function vw(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function yw(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function _w(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function ed(e,t,n){var i=Ht.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function nd(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function xw(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function bw(e,t,n){var i=Ht.exec(t.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function ww(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function id(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Ew(e,t,n){var i=Ht.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function rd(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Sw(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Ow(e,t,n){var i=Ht.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Tw(e,t,n){var i=Ht.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Cw(e,t,n){var i=Ht.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Mw(e,t,n){var i=dw.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function $w(e,t,n){var i=Ht.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Aw(e,t,n){var i=Ht.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function sd(e,t){return dt(e.getDate(),t,2)}function Lw(e,t){return dt(e.getHours(),t,2)}function Dw(e,t){return dt(e.getHours()%12||12,t,2)}function kw(e,t){return dt(1+ir.count(Ke(e),e),t,3)}function ad(e,t){return dt(e.getMilliseconds(),t,3)}function Rw(e,t){return ad(e,t)+"000"}function Iw(e,t){return dt(e.getMonth()+1,t,2)}function Pw(e,t){return dt(e.getMinutes(),t,2)}function Nw(e,t){return dt(e.getSeconds(),t,2)}function Uw(e){var t=e.getDay();return t===0?7:t}function Bw(e,t){return dt(Ds.count(Ke(e)-1,e),t,2)}function od(e){var t=e.getDay();return t>=4||t===0?oi(e):oi.ceil(e)}function Vw(e,t){return e=od(e),dt(oi.count(Ke(e),e)+(Ke(e).getDay()===4),t,2)}function Hw(e){return e.getDay()}function Fw(e,t){return dt(ks.count(Ke(e)-1,e),t,2)}function Gw(e,t){return dt(e.getFullYear()%100,t,2)}function zw(e,t){return e=od(e),dt(e.getFullYear()%100,t,2)}function jw(e,t){return dt(e.getFullYear()%1e4,t,4)}function Ww(e,t){var n=e.getDay();return e=n>=4||n===0?oi(e):oi.ceil(e),dt(e.getFullYear()%1e4,t,4)}function qw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+dt(t/60|0,"0",2)+dt(t%60,"0",2)}function ld(e,t){return dt(e.getUTCDate(),t,2)}function Yw(e,t){return dt(e.getUTCHours(),t,2)}function Xw(e,t){return dt(e.getUTCHours()%12||12,t,2)}function Zw(e,t){return dt(1+Qo.count(Ln(e),e),t,3)}function cd(e,t){return dt(e.getUTCMilliseconds(),t,3)}function Kw(e,t){return cd(e,t)+"000"}function Qw(e,t){return dt(e.getUTCMonth()+1,t,2)}function Jw(e,t){return dt(e.getUTCMinutes(),t,2)}function tE(e,t){return dt(e.getUTCSeconds(),t,2)}function eE(e){var t=e.getUTCDay();return t===0?7:t}function nE(e,t){return dt(Jh.count(Ln(e)-1,e),t,2)}function ud(e){var t=e.getUTCDay();return t>=4||t===0?li(e):li.ceil(e)}function iE(e,t){return e=ud(e),dt(li.count(Ln(e),e)+(Ln(e).getUTCDay()===4),t,2)}function rE(e){return e.getUTCDay()}function sE(e,t){return dt(Rs.count(Ln(e)-1,e),t,2)}function aE(e,t){return dt(e.getUTCFullYear()%100,t,2)}function oE(e,t){return e=ud(e),dt(e.getUTCFullYear()%100,t,2)}function lE(e,t){return dt(e.getUTCFullYear()%1e4,t,4)}function cE(e,t){var n=e.getUTCDay();return e=n>=4||n===0?li(e):li.ceil(e),dt(e.getUTCFullYear()%1e4,t,4)}function uE(){return"+0000"}function hd(){return"%"}function dd(e){return+e}function fd(e){return Math.floor(+e/1e3)}var ci,pd;hE({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 hE(e){return ci=hw(e),pd=ci.format,ci.parse,ci.utcFormat,ci.utcParse,ci}function dE(e){return new Date(e)}function fE(e){return e instanceof Date?+e:+new Date(+e)}function md(e,t,n,i,r,s,a,o,c,l){var u=jh(),d=u.invert,h=u.domain,f=l(".%L"),p=l(":%S"),g=l("%I:%M"),m=l("%I %p"),v=l("%a %d"),x=l("%b %d"),b=l("%B"),O=l("%Y");function E(T){return(c(T)<T?f:o(T)<T?p:a(T)<T?g:s(T)<T?m:i(T)<T?r(T)<T?v:x:n(T)<T?b:O)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?h(Array.from(T,fE)):h().map(dE)},u.ticks=function(T){var S=h();return e(S[0],S[S.length-1],T??10)},u.tickFormat=function(T,S){return S==null?E:l(S)},u.nice=function(T){var S=h();return(!T||typeof T.range!="function")&&(T=t(S[0],S[S.length-1],T??10)),T?h(qh(S,T)):u},u.copy=function(){return zo(u,md(e,t,n,i,r,s,a,o,c,l))},u}function gd(){return ri.apply(md(cw,uw,Ke,Jo,Ds,ir,Ko,Zo,ai,pd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ct(e){return function(){return e}}const vd=Math.abs,Zt=Math.atan2,Dn=Math.cos,pE=Math.max,nl=Math.min,Ie=Math.sin,ui=Math.sqrt,Kt=1e-12,or=Math.PI,Is=or/2,Ps=2*or;function mE(e){return e>1?0:e<-1?or:Math.acos(e)}function yd(e){return e>=1?Is:e<=-1?-Is:Math.asin(e)}function Ns(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new P_(t)}function gE(e){return e.innerRadius}function vE(e){return e.outerRadius}function yE(e){return e.startAngle}function _E(e){return e.endAngle}function xE(e){return e&&e.padAngle}function bE(e,t,n,i,r,s,a,o){var c=n-e,l=i-t,u=a-r,d=o-s,h=d*c-u*l;if(!(h*h<Kt))return h=(u*(t-s)-d*(e-r))/h,[e+h*c,t+h*l]}function Us(e,t,n,i,r,s,a){var o=e-n,c=t-i,l=(a?s:-s)/ui(o*o+c*c),u=l*c,d=-l*o,h=e+u,f=t+d,p=n+u,g=i+d,m=(h+p)/2,v=(f+g)/2,x=p-h,b=g-f,O=x*x+b*b,E=r-s,T=h*g-p*f,S=(b<0?-1:1)*ui(pE(0,E*E*O-T*T)),A=(T*b-x*S)/O,D=(-T*x-b*S)/O,L=(T*b+x*S)/O,C=(-T*x+b*S)/O,B=A-m,_=D-v,$=L-m,y=C-v;return B*B+_*_>$*$+y*y&&(A=L,D=C),{cx:A,cy:D,x01:-u,y01:-d,x11:A*(r/E-1),y11:D*(r/E-1)}}function lr(){var e=gE,t=vE,n=ct(0),i=null,r=yE,s=_E,a=xE,o=null,c=Ns(l);function l(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=r.apply(this,arguments)-Is,g=s.apply(this,arguments)-Is,m=vd(g-p),v=g>p;if(o||(o=u=c()),f<h&&(d=f,f=h,h=d),!(f>Kt))o.moveTo(0,0);else if(m>Ps-Kt)o.moveTo(f*Dn(p),f*Ie(p)),o.arc(0,0,f,p,g,!v),h>Kt&&(o.moveTo(h*Dn(g),h*Ie(g)),o.arc(0,0,h,g,p,v));else{var x=p,b=g,O=p,E=g,T=m,S=m,A=a.apply(this,arguments)/2,D=A>Kt&&(i?+i.apply(this,arguments):ui(h*h+f*f)),L=nl(vd(f-h)/2,+n.apply(this,arguments)),C=L,B=L,_,$;if(D>Kt){var y=yd(D/h*Ie(A)),k=yd(D/f*Ie(A));(T-=y*2)>Kt?(y*=v?1:-1,O+=y,E-=y):(T=0,O=E=(p+g)/2),(S-=k*2)>Kt?(k*=v?1:-1,x+=k,b-=k):(S=0,x=b=(p+g)/2)}var R=f*Dn(x),U=f*Ie(x),N=h*Dn(E),G=h*Ie(E);if(L>Kt){var z=f*Dn(b),F=f*Ie(b),Q=h*Dn(O),j=h*Ie(O),X;if(m<or)if(X=bE(R,U,Q,j,z,F,N,G)){var ot=R-X[0],tt=U-X[1],lt=z-X[0],W=F-X[1],q=1/Ie(mE((ot*lt+tt*W)/(ui(ot*ot+tt*tt)*ui(lt*lt+W*W)))/2),Y=ui(X[0]*X[0]+X[1]*X[1]);C=nl(L,(h-Y)/(q-1)),B=nl(L,(f-Y)/(q+1))}else C=B=0}S>Kt?B>Kt?(_=Us(Q,j,R,U,f,B,v),$=Us(z,F,N,G,f,B,v),o.moveTo(_.cx+_.x01,_.cy+_.y01),B<L?o.arc(_.cx,_.cy,B,Zt(_.y01,_.x01),Zt($.y01,$.x01),!v):(o.arc(_.cx,_.cy,B,Zt(_.y01,_.x01),Zt(_.y11,_.x11),!v),o.arc(0,0,f,Zt(_.cy+_.y11,_.cx+_.x11),Zt($.cy+$.y11,$.cx+$.x11),!v),o.arc($.cx,$.cy,B,Zt($.y11,$.x11),Zt($.y01,$.x01),!v))):(o.moveTo(R,U),o.arc(0,0,f,x,b,!v)):o.moveTo(R,U),!(h>Kt)||!(T>Kt)?o.lineTo(N,G):C>Kt?(_=Us(N,G,z,F,h,-C,v),$=Us(R,U,Q,j,h,-C,v),o.lineTo(_.cx+_.x01,_.cy+_.y01),C<L?o.arc(_.cx,_.cy,C,Zt(_.y01,_.x01),Zt($.y01,$.x01),!v):(o.arc(_.cx,_.cy,C,Zt(_.y01,_.x01),Zt(_.y11,_.x11),!v),o.arc(0,0,h,Zt(_.cy+_.y11,_.cx+_.x11),Zt($.cy+$.y11,$.cx+$.x11),v),o.arc($.cx,$.cy,C,Zt($.y11,$.x11),Zt($.y01,$.x01),!v))):o.arc(0,0,h,E,O,v)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-or/2;return[Dn(d)*u,Ie(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ct(+u),l):n},l.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:ct(+u),l):i},l.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:ct(+u),l):r},l.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ct(+u),l):s},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ct(+u),l):a},l.context=function(u){return arguments.length?(o=u??null,l):o},l}var wE=Array.prototype.slice;function Bs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _d(e){this._context=e}_d.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 Vs(e){return new _d(e)}function il(e){return e[0]}function rl(e){return e[1]}function cr(e,t){var n=ct(!0),i=null,r=Vs,s=null,a=Ns(o);e=typeof e=="function"?e:e===void 0?il:ct(e),t=typeof t=="function"?t:t===void 0?rl:ct(t);function o(c){var l,u=(c=Bs(c)).length,d,h=!1,f;for(i==null&&(s=r(f=a())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,l,c),+t(d,l,c));if(f)return s=null,f+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:ct(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:ct(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:ct(!!c),o):n},o.curve=function(c){return arguments.length?(r=c,i!=null&&(s=r(i)),o):r},o.context=function(c){return arguments.length?(c==null?i=s=null:s=r(i=c),o):i},o}function sl(e,t,n){var i=null,r=ct(!0),s=null,a=Vs,o=null,c=Ns(l);e=typeof e=="function"?e:e===void 0?il:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?rl:ct(+n);function l(d){var h,f,p,g=(d=Bs(d)).length,m,v=!1,x,b=new Array(g),O=new Array(g);for(s==null&&(o=a(x=c())),h=0;h<=g;++h){if(!(h<g&&r(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(b[p],O[p]);o.lineEnd(),o.areaEnd()}v&&(b[h]=+e(m,h,d),O[h]=+t(m,h,d),o.point(i?+i(m,h,d):b[h],n?+n(m,h,d):O[h]))}if(x)return o=null,x+""||null}function u(){return cr().defined(r).curve(a).context(s)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),i=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),l):e},l.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:ct(+d),l):i},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(i).y(t)},l.defined=function(d){return arguments.length?(r=typeof d=="function"?d:ct(!!d),l):r},l.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),l):a},l.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),l):s},l}function EE(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function SE(e){return e}function OE(){var e=SE,t=EE,n=null,i=ct(0),r=ct(Ps),s=ct(0);function a(o){var c,l=(o=Bs(o)).length,u,d,h=0,f=new Array(l),p=new Array(l),g=+i.apply(this,arguments),m=Math.min(Ps,Math.max(-Ps,r.apply(this,arguments)-g)),v,x=Math.min(Math.abs(m)/l,s.apply(this,arguments)),b=x*(m<0?-1:1),O;for(c=0;c<l;++c)(O=p[f[c]=c]=+e(o[c],c,o))>0&&(h+=O);for(t!=null?f.sort(function(E,T){return t(p[E],p[T])}):n!=null&&f.sort(function(E,T){return n(o[E],o[T])}),c=0,d=h?(m-l*b)/h:0;c<l;++c,g=v)u=f[c],O=p[u],v=g+(O>0?O*d:0)+b,p[u]={data:o[u],index:c,value:O,startAngle:g,endAngle:v,padAngle:x};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+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?(i=typeof o=="function"?o:ct(+o),a):i},a.endAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),a):r},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ct(+o),a):s},a}var TE=bd(Vs);function xd(e){this._curve=e}xd.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 bd(e){function t(n){return new xd(e(n))}return t._curve=e,t}function CE(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(bd(n)):t()._curve},e}function ME(){return CE(cr().curve(TE))}class $E{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 AE(e){return new $E(e,!0)}function LE(e){return e.source}function DE(e){return e.target}function kE(e){let t=LE,n=DE,i=il,r=rl,s=null,a=null,o=Ns(c);function c(){let l;const u=wE.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(l=o())),a.lineStart(),u[0]=d,a.point(+i.apply(this,u),+r.apply(this,u)),u[0]=h,a.point(+i.apply(this,u),+r.apply(this,u)),a.lineEnd(),l)return a=null,l+""||null}return c.source=function(l){return arguments.length?(t=l,c):t},c.target=function(l){return arguments.length?(n=l,c):n},c.x=function(l){return arguments.length?(i=typeof l=="function"?l:ct(+l),c):i},c.y=function(l){return arguments.length?(r=typeof l=="function"?l:ct(+l),c):r},c.context=function(l){return arguments.length?(l==null?s=a=null:a=e(s=l),c):s},c}function RE(){return kE(AE)}function dn(){}function Hs(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 Fs(e){this._context=e}Fs.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:Hs(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:Hs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function IE(e){return new Fs(e)}function wd(e){this._context=e}wd.prototype={areaStart:dn,areaEnd:dn,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:Hs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PE(e){return new wd(e)}function Ed(e){this._context=e}Ed.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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Hs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NE(e){return new Ed(e)}function Sd(e,t){this._basis=new Fs(e),this._beta=t}Sd.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 i=e[0],r=t[0],s=e[n]-i,a=t[n]-r,o=-1,c;++o<=n;)c=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+c*s),this._beta*t[o]+(1-this._beta)*(r+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const UE=function e(t){function n(i){return t===1?new Fs(i):new Sd(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function Gs(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 al(e,t){this._context=e,this._k=(1-t)/6}al.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:Gs(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:Gs(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 BE=function e(t){function n(i){return new al(i,t)}return n.tension=function(i){return e(+i)},n}(0);function ol(e,t){this._context=e,this._k=(1-t)/6}ol.prototype={areaStart:dn,areaEnd:dn,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:Gs(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 VE=function e(t){function n(i){return new ol(i,t)}return n.tension=function(i){return e(+i)},n}(0);function ll(e,t){this._context=e,this._k=(1-t)/6}ll.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:Gs(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 HE=function e(t){function n(i){return new ll(i,t)}return n.tension=function(i){return e(+i)},n}(0);function cl(e,t,n){var i=e._x1,r=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Kt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,r=(r*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Kt){var l=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*l+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,s,a,e._x2,e._y2)}function Od(e,t){this._context=e,this._alpha=t}Od.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 FE=function e(t){function n(i){return t?new Od(i,t):new al(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Td(e,t){this._context=e,this._alpha=t}Td.prototype={areaStart:dn,areaEnd:dn,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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 GE=function e(t){function n(i){return t?new Td(i,t):new ol(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Cd(e,t){this._context=e,this._alpha=t}Cd.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 zE=function e(t){function n(i){return t?new Cd(i,t):new ll(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Md(e){this._context=e}Md.prototype={areaStart:dn,areaEnd:dn,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 $d(e){return new Md(e)}function Ad(e){return e<0?-1:1}function Ld(e,t,n){var i=e._x1-e._x0,r=t-e._x1,s=(e._y1-e._y0)/(i||r<0&&-0),a=(n-e._y1)/(r||i<0&&-0),o=(s*r+a*i)/(i+r);return(Ad(s)+Ad(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Dd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ul(e,t,n){var i=e._x0,r=e._y0,s=e._x1,a=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,r+o*t,s-o,a-o*n,s,a)}function zs(e){this._context=e}zs.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:ul(this,this._t0,Dd(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,ul(this,Dd(this,n=Ld(this,e,t)),n);break;default:ul(this,this._t0,n=Ld(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kd(e){this._context=new Rd(e)}(kd.prototype=Object.create(zs.prototype)).point=function(e,t){zs.prototype.point.call(this,t,e)};function Rd(e){this._context=e}Rd.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,i,r,s){this._context.bezierCurveTo(t,e,i,n,s,r)}};function jE(e){return new zs(e)}function WE(e){return new kd(e)}function Id(e){this._context=e}Id.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 i=Pd(e),r=Pd(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[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 Pd(e){var t,n=e.length-1,i,r=new Array(n),s=new Array(n),a=new Array(n);for(r[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)r[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(r[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)i=r[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(r[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)r[t]=(a[t]-r[t+1])/s[t];for(s[n-1]=(e[n]+r[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-r[t+1];return[r,s]}function qE(e){return new Id(e)}function js(e,t){this._context=e,this._t=t}js.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 YE(e){return new js(e,.5)}function XE(e){return new js(e,0)}function ZE(e){return new js(e,1)}function Nd(e,t){if((a=e.length)>1)for(var n=1,i,r,s=e[t[0]],a,o=s.length;n<a;++n)for(r=s,s=e[t[n]],i=0;i<o;++i)s[i][1]+=s[i][0]=isNaN(r[i][1])?r[i][0]:r[i][1]}function Ud(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function KE(e,t){return e[t]}function QE(e){const t=[];return t.key=e,t}function hl(){var e=ct([]),t=Ud,n=Nd,i=KE;function r(s){var a=Array.from(e.apply(this,arguments),QE),o,c=a.length,l=-1,u;for(const d of s)for(o=0,++l;o<c;++o)(a[o][l]=[0,+i(d,a[o].key,l,s)]).data=d;for(o=0,u=Bs(t(a));o<c;++o)a[u[o]].index=o;return n(a,u),a}return r.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ct(Array.from(s)),r):e},r.value=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),r):i},r.order=function(s){return arguments.length?(t=s==null?Ud:typeof s=="function"?s:ct(Array.from(s)),r):t},r.offset=function(s){return arguments.length?(n=s??Nd,r):n},r}function JE(e,t){if((c=e.length)>0)for(var n,i=0,r,s,a,o,c,l=e[t[0]].length;i<l;++i)for(a=o=0,n=0;n<c;++n)(s=(r=e[t[n]][i])[1]-r[0])>0?(r[0]=a,r[1]=a+=s):s<0?(r[1]=o,r[0]=o+=s):(r[0]=0,r[1]=s)}function ur(e,t,n){this.k=e,this.x=t,this.y=n}ur.prototype={constructor:ur,scale:function(e){return e===1?this:new ur(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ur(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+")"}},ur.prototype;var Bd=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Bd||{}),Vd=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Vd||{}),Hd=(e=>(e.UPDATE="model-update",e))(Hd||{}),Fd=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Fd||{}),Gd=(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))(Gd||{}),zd=(e=>(e.CHANGE="zoom-domain-change",e))(zd||{}),jd=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(jd||{}),Wd=(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))(Wd||{}),qd=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(qd||{}),Yd=(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))(Yd||{}),Xd=(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))(Xd||{}),Zd=(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))(Zd||{}),Kd=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Kd||{}),Qd=(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))(Qd||{}),Jd=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Jd||{}),tf=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(tf||{}),ef=(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))(ef||{}),nf=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(nf||{}),rf=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(rf||{}),hr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(hr||{}),sf=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(sf||{}),af=(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))(af||{}),of=(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))(of||{}),lf=(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))(lf||{}),cf=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(cf||{}),uf=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(uf||{}),hi=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(hi||{});const tS=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:lf,Area:qd,Axis:Wd,Bar:Kd,Boxplot:Qd,CanvasZoom:jd,Chart:Bd,Choropleth:hi,CirclePack:of,Gauge:Zd,Heatmap:uf,Legend:af,Line:tf,Meter:cf,Modal:Vd,Model:Hd,Pie:Xd,Radar:ef,Scatter:Jd,Threshold:sf,Toolbar:Fd,Tooltip:hr,Tree:nf,Treemap:rf,WordCloud:Yd,ZoomBar:Gd,ZoomDomain:zd},Symbol.toStringTag,{value:"Module"})),M=tS;var K=(e=>(e.HTML="html",e.SVG="svg",e))(K||{}),hf=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(hf||{}),J=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(J||{}),V=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(V||{}),Pe=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Pe||{}),Te=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Te||{}),Ft=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Ft||{}),Z=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Z||{}),dr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(dr||{}),Nt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Nt||{}),fr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(fr||{}),dl=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(dl||{}),St=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(St||{}),it=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(it||{}),di=(e=>(e.CENTER="center",e))(di||{}),Ws=(e=>(e.LEFT="left",e.RIGHT="right",e))(Ws||{}),Ut=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Ut||{}),Qe=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Qe||{}),Je=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Je||{}),fi=(e=>(e.SEMI="semi",e.FULL="full",e))(fi||{}),fl=(e=>(e.UP="up",e.DOWN="down",e))(fl||{}),qs=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(qs||{}),Ys=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Ys||{}),ge=(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))(ge||{}),Dt=(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.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Dt||{}),pl=(e=>(e.LEFT="left",e.RIGHT="right",e))(pl||{}),Bt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Bt||{}),Xs=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(Xs||{}),pr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(pr||{}),Zs=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(Zs||{}),tn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(tn||{});function ml(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}function mr(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;r=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[c]||e.values[o]}var l=e.argumentCallback?e.argumentCallback(t):t;return r[l]}}function gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;var a=s[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?nS(o,function(d){return d.test(a)}):eS(o,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function eS(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function nS(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function iS(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],s=t.match(e.parsePattern);if(!s)return null;var a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=t.slice(r.length);return{value:a,rest:o}}}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Vt(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function st(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ft(e){st(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ks(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Qs(e,t){st(2,arguments);var n=ft(e).getTime(),i=Vt(t);return new Date(n+i)}var rS={};function Js(){return rS}function gl(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function sS(e){return st(1,arguments),e instanceof Date||Ks(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function aS(e){if(st(1,arguments),!sS(e)&&typeof e!="number")return!1;var t=ft(e);return!isNaN(Number(t))}function oS(e,t){st(2,arguments);var n=Vt(t);return Qs(e,-n)}var lS=864e5;function cS(e){st(1,arguments);var t=ft(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/lS)+1}function ta(e){st(1,arguments);var t=1,n=ft(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function df(e){st(1,arguments);var t=ft(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=ta(i),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=ta(s);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function uS(e){st(1,arguments);var t=df(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=ta(n);return i}var hS=6048e5;function dS(e){st(1,arguments);var t=ft(e),n=ta(t).getTime()-uS(t).getTime();return Math.round(n/hS)+1}function ea(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=Js(),d=Vt((n=(i=(r=(s=t==null?void 0:t.weekStartsOn)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ft(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function ff(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=ft(e),d=u.getUTCFullYear(),h=Js(),f=Vt((n=(i=(r=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var g=ea(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var v=ea(m,t);return u.getTime()>=g.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function fS(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=Js(),d=Vt((n=(i=(r=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=ff(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=ea(f,t);return p}var pS=6048e5;function mS(e,t){st(1,arguments);var n=ft(e),i=ea(n,t).getTime()-fS(n,t).getTime();return Math.round(i/pS)+1}function _t(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var gS={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return _t(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):_t(n+1,2)},d:function(e,t){return _t(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return _t(e.getUTCHours()%12||12,t.length)},H:function(e,t){return _t(e.getUTCHours(),t.length)},m:function(e,t){return _t(e.getUTCMinutes(),t.length)},s:function(e,t){return _t(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return _t(r,t.length)}};const fn=gS;var pi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},vS={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return fn.y(e,t)},Y:function(e,t,n,i){var r=ff(e,i),s=r>0?r:1-r;if(t==="YY"){var a=s%100;return _t(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):_t(s,t.length)},R:function(e,t){var n=df(e);return _t(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return _t(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return _t(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return _t(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return fn.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return _t(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=mS(e,i);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},I:function(e,t,n){var i=dS(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):fn.d(e,t)},D:function(e,t,n){var i=cS(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_t(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,i){var r=e.getUTCDay(),s=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return _t(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});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"})}},c:function(e,t,n,i){var r=e.getUTCDay(),s=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return _t(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=i===0?7:i;switch(t){case"i":return String(r);case"ii":return _t(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),r=i/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){var i=e.getUTCHours(),r;switch(i===12?r=pi.noon:i===0?r=pi.midnight:r=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),r;switch(i>=17?r=pi.evening:i>=12?r=pi.afternoon:i>=4?r=pi.morning:r=pi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):fn.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):fn.s(e,t)},S:function(e,t){return fn.S(e,t)},X:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return mf(s);case"XXXX":case"XX":return kn(s);case"XXXXX":case"XXX":default:return kn(s,":")}},x:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"x":return mf(s);case"xxxx":case"xx":return kn(s);case"xxxxx":case"xxx":default:return kn(s,":")}},O:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pf(s,":");case"OOOO":default:return"GMT"+kn(s,":")}},z:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pf(s,":");case"zzzz":default:return"GMT"+kn(s,":")}},t:function(e,t,n,i){var r=i._originalDate||e,s=Math.floor(r.getTime()/1e3);return _t(s,t.length)},T:function(e,t,n,i){var r=i._originalDate||e,s=r.getTime();return _t(s,t.length)}};function pf(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),s=i%60;if(s===0)return n+String(r);var a=t||"";return n+String(r)+a+_t(s,2)}function mf(e,t){if(e%60===0){var n=e>0?"-":"+";return n+_t(Math.abs(e)/60,2)}return kn(e,t)}function kn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),s=_t(Math.floor(r/60),2),a=_t(r%60,2);return i+s+n+a}const yS=vS;var gf=function(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"})}},vf=function(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"})}},_S=function(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return gf(e,t);var s;switch(i){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}}",gf(i,t)).replace("{{time}}",vf(r,t))},xS={p:vf,P:_S};const bS=xS;var wS=["D","DD"],ES=["YY","YYYY"];function SS(e){return wS.indexOf(e)!==-1}function OS(e){return ES.indexOf(e)!==-1}function yf(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var TS={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"}},CS=function(e,t,n){var i,r=TS[e];return typeof r=="string"?i=r:t===1?i=r.one:i=r.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const MS=CS;var $S={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},AS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},LS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DS={date:ml({formats:$S,defaultWidth:"full"}),time:ml({formats:AS,defaultWidth:"full"}),dateTime:ml({formats:LS,defaultWidth:"full"})};const kS=DS;var RS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},IS=function(e,t,n,i){return RS[e]};const PS=IS;var NS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},US={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},BS={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"]},VS={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"]},HS={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"}},FS={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"}},GS=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},zS={ordinalNumber:GS,era:mr({values:NS,defaultWidth:"wide"}),quarter:mr({values:US,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:mr({values:BS,defaultWidth:"wide"}),day:mr({values:VS,defaultWidth:"wide"}),dayPeriod:mr({values:HS,defaultWidth:"wide",formattingValues:FS,defaultFormattingWidth:"wide"})};const jS=zS;var WS=/^(\d+)(th|st|nd|rd)?/i,qS=/\d+/i,YS={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},XS={any:[/^b/i,/^(a|c)/i]},ZS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KS={any:[/1/i,/2/i,/3/i,/4/i]},QS={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},JS={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]},tO={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},eO={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]},nO={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},iO={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}},rO={ordinalNumber:iS({matchPattern:WS,parsePattern:qS,valueCallback:function(e){return parseInt(e,10)}}),era:gr({matchPatterns:YS,defaultMatchWidth:"wide",parsePatterns:XS,defaultParseWidth:"any"}),quarter:gr({matchPatterns:ZS,defaultMatchWidth:"wide",parsePatterns:KS,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:gr({matchPatterns:QS,defaultMatchWidth:"wide",parsePatterns:JS,defaultParseWidth:"any"}),day:gr({matchPatterns:tO,defaultMatchWidth:"wide",parsePatterns:eO,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:nO,defaultMatchWidth:"any",parsePatterns:iO,defaultParseWidth:"any"})},sO={code:"en-US",formatDistance:MS,formatLong:kS,formatRelative:PS,localize:jS,match:rO,options:{weekStartsOn:0,firstWeekContainsDate:1}};const _f=sO;var aO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,oO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lO=/^'([^]*?)'?$/,cO=/''/g,uO=/[a-zA-Z]/;function mi(e,t,n){var i,r,s,a,o,c,l,u,d,h,f,p,g,m,v,x,b,O;st(2,arguments);var E=String(t),T=Js(),S=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:_f,A=Vt((s=(a=(o=(c=n==null?void 0:n.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(l=n.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&a!==void 0?a:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Vt((f=(p=(g=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(v=n.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&g!==void 0?g:T.weekStartsOn)!==null&&p!==void 0?p:(b=T.locale)===null||b===void 0||(O=b.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&f!==void 0?f:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var L=ft(e);if(!aS(L))throw new RangeError("Invalid time value");var C=gl(L),B=oS(L,C),_={firstWeekContainsDate:A,weekStartsOn:D,locale:S,_originalDate:L},$=E.match(oO).map(function(y){var k=y[0];if(k==="p"||k==="P"){var R=bS[k];return R(y,S.formatLong)}return y}).join("").match(aO).map(function(y){if(y==="''")return"'";var k=y[0];if(k==="'")return hO(y);var R=yS[k];if(R)return!(n!=null&&n.useAdditionalWeekYearTokens)&&OS(y)&&yf(y,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&SS(y)&&yf(y,t,String(e)),R(B,y,S.localize,_);if(k.match(uO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return y}).join("");return $}function hO(e){var t=e.match(lO);return t?t[1].replace(cO,"'"):e}const te="cds",Ne={opacity:{unselected:.05,selected:.4}},gi={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},vi={duration:1e3,ease:Tu,zoomLevel:3},Rn={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},vl={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},de={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},xf={defaultBins:10},kt={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}},Ue={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Gt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Et={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}},pn={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},ve={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},yl={minCellDividerDimension:16,chartPadding:.5},_l={default:{size:24}},bf={horizontalOffset:10},xl={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}},dO={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},se={height:{[Pe.GRAPH_VIEW]:32,[Pe.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},wf=[{type:Bt.RADIUS,name:"Radius"},{type:Bt.AREA,name:"Poor area"},{type:Bt.AREA,name:"Satisfactory area"},{type:Bt.AREA,name:"Great area"},{type:Bt.QUARTILE,name:"Quartiles"}];var fO=typeof global=="object"&&global&&global.Object===Object&&global;const Ef=fO;var pO=typeof self=="object"&&self&&self.Object===Object&&self,mO=Ef||pO||Function("return this")();const Ce=mO;var gO=Ce.Symbol;const ye=gO;var Sf=Object.prototype,vO=Sf.hasOwnProperty,yO=Sf.toString,vr=ye?ye.toStringTag:void 0;function _O(e){var t=vO.call(e,vr),n=e[vr];try{e[vr]=void 0;var i=!0}catch{}var r=yO.call(e);return i&&(t?e[vr]=n:delete e[vr]),r}var xO=Object.prototype,bO=xO.toString;function wO(e){return bO.call(e)}var EO="[object Null]",SO="[object Undefined]",Of=ye?ye.toStringTag:void 0;function In(e){return e==null?e===void 0?SO:EO:Of&&Of in Object(e)?_O(e):wO(e)}function Be(e){return e!=null&&typeof e=="object"}var OO="[object Symbol]";function na(e){return typeof e=="symbol"||Be(e)&&In(e)==OO}function Tf(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var TO=Array.isArray;const jt=TO;var CO=1/0,Cf=ye?ye.prototype:void 0,Mf=Cf?Cf.toString:void 0;function $f(e){if(typeof e=="string")return e;if(jt(e))return Tf(e,$f)+"";if(na(e))return Mf?Mf.call(e):"";var t=e+"";return t=="0"&&1/e==-CO?"-0":t}function _e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function bl(e){return e}var MO="[object AsyncFunction]",$O="[object Function]",AO="[object GeneratorFunction]",LO="[object Proxy]";function wl(e){if(!_e(e))return!1;var t=In(e);return t==$O||t==AO||t==MO||t==LO}var DO=Ce["__core-js_shared__"];const El=DO;var Af=function(){var e=/[^.]+$/.exec(El&&El.keys&&El.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function kO(e){return!!Af&&Af in e}var RO=Function.prototype,IO=RO.toString;function Pn(e){if(e!=null){try{return IO.call(e)}catch{}try{return e+""}catch{}}return""}var PO=/[\\^$.*+?()[\]{}|]/g,NO=/^\[object .+?Constructor\]$/,UO=Function.prototype,BO=Object.prototype,VO=UO.toString,HO=BO.hasOwnProperty,FO=RegExp("^"+VO.call(HO).replace(PO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function GO(e){if(!_e(e)||kO(e))return!1;var t=wl(e)?FO:NO;return t.test(Pn(e))}function zO(e,t){return e==null?void 0:e[t]}function Nn(e,t){var n=zO(e,t);return GO(n)?n:void 0}var jO=Nn(Ce,"WeakMap");const Sl=jO;var Lf=Object.create,WO=function(){function e(){}return function(t){if(!_e(t))return{};if(Lf)return Lf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const qO=WO;function YO(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 XO(){}function Df(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}var ZO=800,KO=16,QO=Date.now;function JO(e){var t=0,n=0;return function(){var i=QO(),r=KO-(i-n);if(n=i,r>0){if(++t>=ZO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function tT(e){return function(){return e}}var eT=function(){try{var e=Nn(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ia=eT;var nT=ia?function(e,t){return ia(e,"toString",{configurable:!0,enumerable:!1,value:tT(t),writable:!0})}:bl,iT=JO(nT);const rT=iT;function sT(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function aT(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function oT(e){return e!==e}function lT(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}function cT(e,t,n){return t===t?lT(e,t,n):aT(e,oT,n)}function uT(e,t){var n=e==null?0:e.length;return!!n&&cT(e,t,0)>-1}var hT=9007199254740991,dT=/^(?:0|[1-9]\d*)$/;function Ol(e,t){var n=typeof e;return t=t??hT,!!t&&(n=="number"||n!="symbol"&&dT.test(e))&&e>-1&&e%1==0&&e<t}function ra(e,t,n){t=="__proto__"&&ia?ia(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yr(e,t){return e===t||e!==e&&t!==t}var fT=Object.prototype,pT=fT.hasOwnProperty;function kf(e,t,n){var i=e[t];(!(pT.call(e,t)&&yr(i,n))||n===void 0&&!(t in e))&&ra(e,t,n)}function _r(e,t,n,i){var r=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],c=i?i(n[o],e[o],o,n,e):void 0;c===void 0&&(c=e[o]),r?ra(n,o,c):kf(n,o,c)}return n}var Rf=Math.max;function mT(e,t,n){return t=Rf(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=Rf(i.length-t,0),a=Array(s);++r<s;)a[r]=i[t+r];r=-1;for(var o=Array(t+1);++r<t;)o[r]=i[r];return o[t]=n(a),YO(e,this,o)}}function If(e,t){return rT(mT(e,t,bl),e+"")}var gT=9007199254740991;function Tl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gT}function Un(e){return e!=null&&Tl(e.length)&&!wl(e)}function Pf(e,t,n){if(!_e(n))return!1;var i=typeof t;return(i=="number"?Un(n)&&Ol(t,n.length):i=="string"&&t in n)?yr(n[t],e):!1}function vT(e){return If(function(t,n){var i=-1,r=n.length,s=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(r--,s):void 0,a&&Pf(n[0],n[1],a)&&(s=r<3?void 0:s,r=1),t=Object(t);++i<r;){var o=n[i];o&&e(t,o,i,s)}return t})}var yT=Object.prototype;function sa(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yT;return e===n}function _T(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var xT="[object Arguments]";function Nf(e){return Be(e)&&In(e)==xT}var Uf=Object.prototype,bT=Uf.hasOwnProperty,wT=Uf.propertyIsEnumerable,ET=Nf(function(){return arguments}())?Nf:function(e){return Be(e)&&bT.call(e,"callee")&&!wT.call(e,"callee")};const yi=ET;function ST(){return!1}var Bf=typeof rt=="object"&&rt&&!rt.nodeType&&rt,Vf=Bf&&typeof module=="object"&&module&&!module.nodeType&&module,OT=Vf&&Vf.exports===Bf,Hf=OT?Ce.Buffer:void 0,TT=Hf?Hf.isBuffer:void 0,CT=TT||ST;const _i=CT;var MT="[object Arguments]",$T="[object Array]",AT="[object Boolean]",LT="[object Date]",DT="[object Error]",kT="[object Function]",RT="[object Map]",IT="[object Number]",PT="[object Object]",NT="[object RegExp]",UT="[object Set]",BT="[object String]",VT="[object WeakMap]",HT="[object ArrayBuffer]",FT="[object DataView]",GT="[object Float32Array]",zT="[object Float64Array]",jT="[object Int8Array]",WT="[object Int16Array]",qT="[object Int32Array]",YT="[object Uint8Array]",XT="[object Uint8ClampedArray]",ZT="[object Uint16Array]",KT="[object Uint32Array]",Mt={};Mt[GT]=Mt[zT]=Mt[jT]=Mt[WT]=Mt[qT]=Mt[YT]=Mt[XT]=Mt[ZT]=Mt[KT]=!0,Mt[MT]=Mt[$T]=Mt[HT]=Mt[AT]=Mt[FT]=Mt[LT]=Mt[DT]=Mt[kT]=Mt[RT]=Mt[IT]=Mt[PT]=Mt[NT]=Mt[UT]=Mt[BT]=Mt[VT]=!1;function QT(e){return Be(e)&&Tl(e.length)&&!!Mt[In(e)]}function Cl(e){return function(t){return e(t)}}var Ff=typeof rt=="object"&&rt&&!rt.nodeType&&rt,xr=Ff&&typeof module=="object"&&module&&!module.nodeType&&module,JT=xr&&xr.exports===Ff,Ml=JT&&Ef.process,tC=function(){try{var e=xr&&xr.require&&xr.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}();const xi=tC;var Gf=xi&&xi.isTypedArray,eC=Gf?Cl(Gf):QT;const aa=eC;var nC=Object.prototype,iC=nC.hasOwnProperty;function zf(e,t){var n=jt(e),i=!n&&yi(e),r=!n&&!i&&_i(e),s=!n&&!i&&!r&&aa(e),a=n||i||r||s,o=a?_T(e.length,String):[],c=o.length;for(var l in e)(t||iC.call(e,l))&&!(a&&(l=="length"||r&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ol(l,c)))&&o.push(l);return o}function jf(e,t){return function(n){return e(t(n))}}var rC=jf(Object.keys,Object);const sC=rC;var aC=Object.prototype,oC=aC.hasOwnProperty;function Wf(e){if(!sa(e))return sC(e);var t=[];for(var n in Object(e))oC.call(e,n)&&n!="constructor"&&t.push(n);return t}function br(e){return Un(e)?zf(e):Wf(e)}function lC(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var cC=Object.prototype,uC=cC.hasOwnProperty;function hC(e){if(!_e(e))return lC(e);var t=sa(e),n=[];for(var i in e)i=="constructor"&&(t||!uC.call(e,i))||n.push(i);return n}function wr(e){return Un(e)?zf(e,!0):hC(e)}var dC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fC=/^\w*$/;function $l(e,t){if(jt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||na(e)?!0:fC.test(e)||!dC.test(e)||t!=null&&e in Object(t)}var pC=Nn(Object,"create");const Er=pC;function mC(){this.__data__=Er?Er(null):{},this.size=0}function gC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vC="__lodash_hash_undefined__",yC=Object.prototype,_C=yC.hasOwnProperty;function xC(e){var t=this.__data__;if(Er){var n=t[e];return n===vC?void 0:n}return _C.call(t,e)?t[e]:void 0}var bC=Object.prototype,wC=bC.hasOwnProperty;function EC(e){var t=this.__data__;return Er?t[e]!==void 0:wC.call(t,e)}var SC="__lodash_hash_undefined__";function OC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Er&&t===void 0?SC:t,this}function Bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Bn.prototype.clear=mC,Bn.prototype.delete=gC,Bn.prototype.get=xC,Bn.prototype.has=EC,Bn.prototype.set=OC;function TC(){this.__data__=[],this.size=0}function oa(e,t){for(var n=e.length;n--;)if(yr(e[n][0],t))return n;return-1}var CC=Array.prototype,MC=CC.splice;function $C(e){var t=this.__data__,n=oa(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():MC.call(t,n,1),--this.size,!0}function AC(e){var t=this.__data__,n=oa(t,e);return n<0?void 0:t[n][1]}function LC(e){return oa(this.__data__,e)>-1}function DC(e,t){var n=this.__data__,i=oa(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}en.prototype.clear=TC,en.prototype.delete=$C,en.prototype.get=AC,en.prototype.has=LC,en.prototype.set=DC;var kC=Nn(Ce,"Map");const Sr=kC;function RC(){this.size=0,this.__data__={hash:new Bn,map:new(Sr||en),string:new Bn}}function IC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function la(e,t){var n=e.__data__;return IC(t)?n[typeof t=="string"?"string":"hash"]:n.map}function PC(e){var t=la(this,e).delete(e);return this.size-=t?1:0,t}function NC(e){return la(this,e).get(e)}function UC(e){return la(this,e).has(e)}function BC(e,t){var n=la(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}nn.prototype.clear=RC,nn.prototype.delete=PC,nn.prototype.get=NC,nn.prototype.has=UC,nn.prototype.set=BC;var VC="Expected a function";function Al(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VC);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var a=e.apply(this,i);return n.cache=s.set(r,a)||s,a};return n.cache=new(Al.Cache||nn),n}Al.Cache=nn;var HC=500;function FC(e){var t=Al(e,function(i){return n.size===HC&&n.clear(),i}),n=t.cache;return t}var GC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zC=/\\(\\)?/g,jC=FC(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(GC,function(n,i,r,s){t.push(r?s.replace(zC,"$1"):i||n)}),t});const WC=jC;function Or(e){return e==null?"":$f(e)}function qf(e,t){return jt(e)?e:$l(e,t)?[e]:WC(Or(e))}var qC=1/0;function ca(e){if(typeof e=="string"||na(e))return e;var t=e+"";return t=="0"&&1/e==-qC?"-0":t}function Yf(e,t){t=qf(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[ca(t[n++])];return n&&n==i?e:void 0}function Ot(e,t,n){var i=e==null?void 0:Yf(e,t);return i===void 0?n:i}function Ll(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var Xf=ye?ye.isConcatSpreadable:void 0;function YC(e){return jt(e)||yi(e)||!!(Xf&&e&&e[Xf])}function ua(e,t,n,i,r){var s=-1,a=e.length;for(n||(n=YC),r||(r=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?ua(o,t-1,n,i,r):Ll(r,o):i||(r[r.length]=o)}return r}var XC=jf(Object.getPrototypeOf,Object);const Dl=XC;var ZC="[object Object]",KC=Function.prototype,QC=Object.prototype,Zf=KC.toString,JC=QC.hasOwnProperty,tM=Zf.call(Object);function eM(e){if(!Be(e)||In(e)!=ZC)return!1;var t=Dl(e);if(t===null)return!0;var n=JC.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zf.call(n)==tM}function nM(){this.__data__=new en,this.size=0}function iM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function rM(e){return this.__data__.get(e)}function sM(e){return this.__data__.has(e)}var aM=200;function oM(e,t){var n=this.__data__;if(n instanceof en){var i=n.__data__;if(!Sr||i.length<aM-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new nn(i)}return n.set(e,t),this.size=n.size,this}function Me(e){var t=this.__data__=new en(e);this.size=t.size}Me.prototype.clear=nM,Me.prototype.delete=iM,Me.prototype.get=rM,Me.prototype.has=sM,Me.prototype.set=oM;function lM(e,t){return e&&_r(t,br(t),e)}function cM(e,t){return e&&_r(t,wr(t),e)}var Kf=typeof rt=="object"&&rt&&!rt.nodeType&&rt,Qf=Kf&&typeof module=="object"&&module&&!module.nodeType&&module,uM=Qf&&Qf.exports===Kf,Jf=uM?Ce.Buffer:void 0,tp=Jf?Jf.allocUnsafe:void 0;function ep(e,t){if(t)return e.slice();var n=e.length,i=tp?tp(n):new e.constructor(n);return e.copy(i),i}function hM(e,t){for(var n=-1,i=e==null?0:e.length,r=0,s=[];++n<i;){var a=e[n];t(a,n,e)&&(s[r++]=a)}return s}function np(){return[]}var dM=Object.prototype,fM=dM.propertyIsEnumerable,ip=Object.getOwnPropertySymbols,pM=ip?function(e){return e==null?[]:(e=Object(e),hM(ip(e),function(t){return fM.call(e,t)}))}:np;const kl=pM;function mM(e,t){return _r(e,kl(e),t)}var gM=Object.getOwnPropertySymbols,vM=gM?function(e){for(var t=[];e;)Ll(t,kl(e)),e=Dl(e);return t}:np;const rp=vM;function yM(e,t){return _r(e,rp(e),t)}function sp(e,t,n){var i=t(e);return jt(e)?i:Ll(i,n(e))}function Rl(e){return sp(e,br,kl)}function _M(e){return sp(e,wr,rp)}var xM=Nn(Ce,"DataView");const Il=xM;var bM=Nn(Ce,"Promise");const Pl=bM;var wM=Nn(Ce,"Set");const bi=wM;var ap="[object Map]",EM="[object Object]",op="[object Promise]",lp="[object Set]",cp="[object WeakMap]",up="[object DataView]",SM=Pn(Il),OM=Pn(Sr),TM=Pn(Pl),CM=Pn(bi),MM=Pn(Sl),Vn=In;(Il&&Vn(new Il(new ArrayBuffer(1)))!=up||Sr&&Vn(new Sr)!=ap||Pl&&Vn(Pl.resolve())!=op||bi&&Vn(new bi)!=lp||Sl&&Vn(new Sl)!=cp)&&(Vn=function(e){var t=In(e),n=t==EM?e.constructor:void 0,i=n?Pn(n):"";if(i)switch(i){case SM:return up;case OM:return ap;case TM:return op;case CM:return lp;case MM:return cp}return t});const wi=Vn;var $M=Object.prototype,AM=$M.hasOwnProperty;function LM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&AM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var DM=Ce.Uint8Array;const ha=DM;function Nl(e){var t=new e.constructor(e.byteLength);return new ha(t).set(new ha(e)),t}function kM(e,t){var n=t?Nl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var RM=/\w*$/;function IM(e){var t=new e.constructor(e.source,RM.exec(e));return t.lastIndex=e.lastIndex,t}var hp=ye?ye.prototype:void 0,dp=hp?hp.valueOf:void 0;function PM(e){return dp?Object(dp.call(e)):{}}function fp(e,t){var n=t?Nl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var NM="[object Boolean]",UM="[object Date]",BM="[object Map]",VM="[object Number]",HM="[object RegExp]",FM="[object Set]",GM="[object String]",zM="[object Symbol]",jM="[object ArrayBuffer]",WM="[object DataView]",qM="[object Float32Array]",YM="[object Float64Array]",XM="[object Int8Array]",ZM="[object Int16Array]",KM="[object Int32Array]",QM="[object Uint8Array]",JM="[object Uint8ClampedArray]",t$="[object Uint16Array]",e$="[object Uint32Array]";function n$(e,t,n){var i=e.constructor;switch(t){case jM:return Nl(e);case NM:case UM:return new i(+e);case WM:return kM(e,n);case qM:case YM:case XM:case ZM:case KM:case QM:case JM:case t$:case e$:return fp(e,n);case BM:return new i;case VM:case GM:return new i(e);case HM:return IM(e);case FM:return new i;case zM:return PM(e)}}function pp(e){return typeof e.constructor=="function"&&!sa(e)?qO(Dl(e)):{}}var i$="[object Map]";function r$(e){return Be(e)&&wi(e)==i$}var mp=xi&&xi.isMap,s$=mp?Cl(mp):r$;const a$=s$;var o$="[object Set]";function l$(e){return Be(e)&&wi(e)==o$}var gp=xi&&xi.isSet,c$=gp?Cl(gp):l$;const u$=c$;var h$=1,d$=2,f$=4,vp="[object Arguments]",p$="[object Array]",m$="[object Boolean]",g$="[object Date]",v$="[object Error]",yp="[object Function]",y$="[object GeneratorFunction]",_$="[object Map]",x$="[object Number]",_p="[object Object]",b$="[object RegExp]",w$="[object Set]",E$="[object String]",S$="[object Symbol]",O$="[object WeakMap]",T$="[object ArrayBuffer]",C$="[object DataView]",M$="[object Float32Array]",$$="[object Float64Array]",A$="[object Int8Array]",L$="[object Int16Array]",D$="[object Int32Array]",k$="[object Uint8Array]",R$="[object Uint8ClampedArray]",I$="[object Uint16Array]",P$="[object Uint32Array]",Tt={};Tt[vp]=Tt[p$]=Tt[T$]=Tt[C$]=Tt[m$]=Tt[g$]=Tt[M$]=Tt[$$]=Tt[A$]=Tt[L$]=Tt[D$]=Tt[_$]=Tt[x$]=Tt[_p]=Tt[b$]=Tt[w$]=Tt[E$]=Tt[S$]=Tt[k$]=Tt[R$]=Tt[I$]=Tt[P$]=!0,Tt[v$]=Tt[yp]=Tt[O$]=!1;function da(e,t,n,i,r,s){var a,o=t&h$,c=t&d$,l=t&f$;if(n&&(a=r?n(e,i,r,s):n(e)),a!==void 0)return a;if(!_e(e))return e;var u=jt(e);if(u){if(a=LM(e),!o)return Df(e,a)}else{var d=wi(e),h=d==yp||d==y$;if(_i(e))return ep(e,o);if(d==_p||d==vp||h&&!r){if(a=c||h?{}:pp(e),!o)return c?yM(e,cM(a,e)):mM(e,lM(a,e))}else{if(!Tt[d])return r?e:{};a=n$(e,d,o)}}s||(s=new Me);var f=s.get(e);if(f)return f;s.set(e,a),u$(e)?e.forEach(function(m){a.add(da(m,t,n,m,e,s))}):a$(e)&&e.forEach(function(m,v){a.set(v,da(m,t,n,v,e,s))});var p=l?c?_M:Rl:c?wr:br,g=u?void 0:p(e);return sT(g||e,function(m,v){g&&(v=m,m=e[v]),kf(a,v,da(m,t,n,v,e,s))}),a}var N$=1,U$=4;function B$(e){return da(e,N$|U$)}var V$="__lodash_hash_undefined__";function H$(e){return this.__data__.set(e,V$),this}function F$(e){return this.__data__.has(e)}function Tr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new nn;++t<n;)this.add(e[t])}Tr.prototype.add=Tr.prototype.push=H$,Tr.prototype.has=F$;function xp(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function bp(e,t){return e.has(t)}var G$=1,z$=2;function wp(e,t,n,i,r,s){var a=n&G$,o=e.length,c=t.length;if(o!=c&&!(a&&c>o))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=n&z$?new Tr:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(i)var m=a?i(g,p,d,t,e,s):i(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!xp(t,function(v,x){if(!bp(f,x)&&(p===v||r(p,v,n,i,s)))return f.push(x)})){h=!1;break}}else if(!(p===g||r(p,g,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function j$(e){var t=-1,n=Array(e.size);return e.forEach(function(i,r){n[++t]=[r,i]}),n}function Ul(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var W$=1,q$=2,Y$="[object Boolean]",X$="[object Date]",Z$="[object Error]",K$="[object Map]",Q$="[object Number]",J$="[object RegExp]",t2="[object Set]",e2="[object String]",n2="[object Symbol]",i2="[object ArrayBuffer]",r2="[object DataView]",Ep=ye?ye.prototype:void 0,Bl=Ep?Ep.valueOf:void 0;function s2(e,t,n,i,r,s,a){switch(n){case r2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case i2:return!(e.byteLength!=t.byteLength||!s(new ha(e),new ha(t)));case Y$:case X$:case Q$:return yr(+e,+t);case Z$:return e.name==t.name&&e.message==t.message;case J$:case e2:return e==t+"";case K$:var o=j$;case t2:var c=i&W$;if(o||(o=Ul),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;i|=q$,a.set(e,t);var u=wp(o(e),o(t),i,r,s,a);return a.delete(e),u;case n2:if(Bl)return Bl.call(e)==Bl.call(t)}return!1}var a2=1,o2=Object.prototype,l2=o2.hasOwnProperty;function c2(e,t,n,i,r,s){var a=n&a2,o=Rl(e),c=o.length,l=Rl(t),u=l.length;if(c!=u&&!a)return!1;for(var d=c;d--;){var h=o[d];if(!(a?h in t:l2.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<c;){h=o[d];var v=e[h],x=t[h];if(i)var b=a?i(x,v,h,t,e,s):i(v,x,h,e,t,s);if(!(b===void 0?v===x||r(v,x,n,i,s):b)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var O=e.constructor,E=t.constructor;O!=E&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(e),s.delete(t),g}var u2=1,Sp="[object Arguments]",Op="[object Array]",fa="[object Object]",h2=Object.prototype,Tp=h2.hasOwnProperty;function d2(e,t,n,i,r,s){var a=jt(e),o=jt(t),c=a?Op:wi(e),l=o?Op:wi(t);c=c==Sp?fa:c,l=l==Sp?fa:l;var u=c==fa,d=l==fa,h=c==l;if(h&&_i(e)){if(!_i(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Me),a||aa(e)?wp(e,t,n,i,r,s):s2(e,t,c,n,i,r,s);if(!(n&u2)){var f=u&&Tp.call(e,"__wrapped__"),p=d&&Tp.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new Me),r(g,m,n,i,s)}}return h?(s||(s=new Me),c2(e,t,n,i,r,s)):!1}function pa(e,t,n,i,r){return e===t?!0:e==null||t==null||!Be(e)&&!Be(t)?e!==e&&t!==t:d2(e,t,n,i,pa,r)}var f2=1,p2=2;function m2(e,t,n,i){var r=n.length,s=r,a=!i;if(e==null)return!s;for(e=Object(e);r--;){var o=n[r];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<s;){o=n[r];var c=o[0],l=e[c],u=o[1];if(a&&o[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Me;if(i)var h=i(l,u,c,e,t,d);if(!(h===void 0?pa(u,l,f2|p2,i,d):h))return!1}}return!0}function Cp(e){return e===e&&!_e(e)}function g2(e){for(var t=br(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,Cp(r)]}return t}function Mp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function v2(e){var t=g2(e);return t.length==1&&t[0][2]?Mp(t[0][0],t[0][1]):function(n){return n===e||m2(n,e,t)}}function y2(e,t){return e!=null&&t in Object(e)}function _2(e,t,n){t=qf(t,e);for(var i=-1,r=t.length,s=!1;++i<r;){var a=ca(t[i]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++i!=r?s:(r=e==null?0:e.length,!!r&&Tl(r)&&Ol(a,r)&&(jt(e)||yi(e)))}function x2(e,t){return e!=null&&_2(e,t,y2)}var b2=1,w2=2;function E2(e,t){return $l(e)&&Cp(t)?Mp(ca(e),t):function(n){var i=Ot(n,e);return i===void 0&&i===t?x2(n,e):pa(t,i,b2|w2)}}function S2(e){return function(t){return t==null?void 0:t[e]}}function O2(e){return function(t){return Yf(t,e)}}function T2(e){return $l(e)?S2(ca(e)):O2(e)}function ma(e){return typeof e=="function"?e:e==null?bl:typeof e=="object"?jt(e)?E2(e[0],e[1]):v2(e):T2(e)}function C2(e){return function(t,n,i){for(var r=-1,s=Object(t),a=i(t),o=a.length;o--;){var c=a[e?o:++r];if(n(s[c],c,s)===!1)break}return t}}var M2=C2();const $p=M2;function Vl(e,t,n){(n!==void 0&&!yr(e[t],n)||n===void 0&&!(t in e))&&ra(e,t,n)}function Hl(e){return Be(e)&&Un(e)}function Fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function $2(e){return _r(e,wr(e))}function A2(e,t,n,i,r,s,a){var o=Fl(e,n),c=Fl(t,n),l=a.get(c);if(l){Vl(e,n,l);return}var u=s?s(o,c,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=jt(c),f=!h&&_i(c),p=!h&&!f&&aa(c);u=c,h||f||p?jt(o)?u=o:Hl(o)?u=Df(o):f?(d=!1,u=ep(c,!0)):p?(d=!1,u=fp(c,!0)):u=[]:eM(c)||yi(c)?(u=o,yi(o)?u=$2(o):(!_e(o)||wl(o))&&(u=pp(c))):d=!1}d&&(a.set(c,u),r(u,c,i,s,a),a.delete(c)),Vl(e,n,u)}function Ap(e,t,n,i,r){e!==t&&$p(t,function(s,a){if(r||(r=new Me),_e(s))A2(e,t,a,n,Ap,i,r);else{var o=i?i(Fl(e,a),s,a+"",e,t,r):void 0;o===void 0&&(o=s),Vl(e,a,o)}},wr)}function L2(e,t,n){for(var i=-1,r=e==null?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function D2(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var k2="[object Map]",R2="[object Set]",I2=Object.prototype,P2=I2.hasOwnProperty;function $e(e){if(e==null)return!0;if(Un(e)&&(jt(e)||typeof e=="string"||typeof e.splice=="function"||_i(e)||aa(e)||yi(e)))return!e.length;var t=wi(e);if(t==k2||t==R2)return!e.size;if(sa(e))return!Wf(e).length;for(var n in e)if(P2.call(e,n))return!1;return!0}var N2=vT(function(e,t,n){Ap(e,t,n)});const nt=N2;var U2=1/0,B2=bi&&1/Ul(new bi([,-0]))[1]==U2?function(e){return new bi(e)}:XO;const V2=B2;var H2=200;function Lp(e,t,n){var i=-1,r=uT,s=e.length,a=!0,o=[],c=o;if(n)a=!1,r=L2;else if(s>=H2){var l=t?null:V2(e);if(l)return Ul(l);a=!1,r=bp,c=new Tr}else c=t?[]:o;t:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue t;t&&c.push(d),o.push(u)}else r(c,d,n)||(c!==o&&c.push(d),o.push(u))}return o}var F2=If(function(e){var t=D2(e);return Hl(t)&&(t=void 0),Lp(ua(e,1,Hl,!0),ma(t))});const G2=F2;function z2(e){return e&&e.length?Lp(e):[]}const rn=B$,Cr=z2;function j2(e,t,n){let i=null;return(...r)=>{const s=this;s.mousePosition=bn(r[0],n),clearTimeout(i),i=setTimeout(function(){e.apply(s,r)},t)}}function At(e,t){var n;const i=rn(e),r=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete i.toolbar.controls,r.length===0&&delete i.axes;for(const s in i.axes)if(r.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://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"),a.mapsTo==null){const c=a.scaleType;c==null?a.mapsTo="value":c===Z.TIME?a.mapsTo="date":c===Z.LABELS&&(a.mapsTo="key")}}else delete i.axes[s];return Gl(i,t),nt(i,t)}function sn(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 i=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:i[0],ty:i[1]}}return null}function Mr(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 Dp(e,t,n="value"){const i=e/t.reduce((r,s)=>r+s[n],0)*100;return i%1!==0?parseFloat(i.toFixed(1)):i}function $r(e,t,n){if(n>e.length)return e;if(t===Te.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Te.FRONT_LINE)return"..."+e.substr(-n);if(t===Te.END_LINE)return e.substr(0,n)+"..."}function Gl(e,t){const n=w(e,"legend","additionalItems"),i=w(t,"legend","additionalItems");if(n&&i){const r=i.map(o=>o.type),s=n.map(o=>o.type),a=wf.filter(o=>s.includes(o.type)&&!r.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=G2(a,i,"name")}}const w=(e,...t)=>{let n=e;if(n){for(const i of t)if(n[i]!==null&&n[i]!==void 0)n=n[i];else return null;return n}return null},kp=(e,t)=>t===Ft.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ee=(e,t)=>{const{x0:n,x1:i,y0:r,y1:s}=kp(e,t);return`M${n},${r}L${n},${s}L${i},${s}L${i},${r}L${n},${r}`};function an(e,t,n){return n===Ft.VERTICAL?[e,t]:[t,e]}const Ei={type:Te.END_LINE,threshold:16,numCharacter:14},W2={enabled:!0,position:dr.BOTTOM,clickable:!0,truncation:Ei,alignment:Nt.LEFT,order:null,additionalItems:[]},Rp={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Ip={enabled:!0},zl={enabled:!0,showTotal:!0,truncation:Ei,groupLabel:"Group"},Pp={top:{visible:!0,includeZero:!0,truncation:Ei},bottom:{visible:!0,includeZero:!0,truncation:Ei},left:{visible:!0,includeZero:!0,truncation:Ei},right:{visible:!0,includeZero:!0,truncation:Ei}},Ar={addSpaceOnEdges:1,showDayName:!1,localeObject:_f,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"}}},q2=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Qt={width:null,height:null,resizable:!0,theme:hf.WHITE,tooltip:zl,legend:W2,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:Dt.SHOW_AS_DATATABLE},...q2?[{type:Dt.MAKE_FULLSCREEN}]:[],{type:Dt.EXPORT_CSV},{type:Dt.EXPORT_PNG},{type:Dt.EXPORT_JPG}]}},Np=nt({},Qt,{thematic:{projection:tn.geoNaturalEarth1}}),Lr=nt({},Qt,{axes:Pp,timeScale:Ar,grid:Rp,ruler:Ip,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Pe.GRAPH_VIEW}}}),Hn=nt({},Lr,{bars:{maxWidth:16,spacingFactor:.25},timeScale:nt(Ar,{addSpaceOnEdges:1})}),Y2=nt({},Hn,{}),X2=nt({},Hn,{}),Z2=nt({},Hn,{bars:nt({},Hn.bars,{dividerSize:1.5})}),K2=nt({},Hn,{}),jl=nt({},Lr,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Q2=jl,Up=nt({},jl,{points:{radius:3,filled:!1,enabled:!0}}),Bp=nt({},Up,{timeScale:nt(Ar,{addSpaceOnEdges:0})}),J2=Bp,tA=nt({},Lr,{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:Bt.RADIUS,name:"Radius"}]}}),eA=nt({},Lr,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Bt.AREA,name:"Poor area"},{type:Bt.AREA,name:"Satisfactory area"},{type:Bt.AREA,name:"Great area"},{type:Bt.QUARTILE,name:"Quartiles"}]}}),nA=nt({},Hn,{bars:{dividerSize:1.5},timeScale:nt(Ar,{addSpaceOnEdges:0})}),iA=nt({},Qt,{tooltip:nt({},zl,{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"}}),Vp=nt({},Qt,{pie:{labels:{formatter:null,enabled:!0},alignment:Nt.LEFT,sortFunction:null,valueMapsTo:"value"}}),rA=nt({},Qt,{legend:{enabled:!1},gauge:{type:fi.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:Nt.LEFT}}),sA=nt({},Vp,{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:Nt.LEFT}}),Hp=nt({},Qt,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),aA=nt({},Hp,{legend:{enabled:!0}}),oA=nt({},Qt,{radar:{axes:{angle:"key",value:"value"},alignment:Nt.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),lA=nt({},Hn,{comboChartTypes:[]}),cA=nt({tree:{type:dl.TREE}},Qt,{}),uA=nt({},Qt,{data:nt(Qt.data,{groupMapsTo:"name"})}),hA=nt({},Qt,Rn,{data:nt(Qt.data,{groupMapsTo:"name"})}),dA=nt({},Qt,{alluvial:{data:nt(Qt.data,{groupMapsTo:"source"}),nodeAlignment:Nt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),fA=nt({},Qt,{axes:Pp,heatmap:{divider:{state:pr.AUTO},colorLegend:{type:"linear"}}}),pA=nt({},Np,{choropleth:{colorLegend:{type:"linear"}}}),wt={alluvialChart:dA,areaChart:Bp,axisChart:Lr,boxplotChart:K2,bubbleChart:tA,bulletChart:eA,chart:Qt,circlePackChart:hA,choroplethChart:pA,comboChart:lA,donutChart:sA,gaugeChart:rA,groupedBarChart:X2,heatmapChart:fA,histogramChart:nA,lineChart:Up,lollipopChart:Q2,meterChart:Hp,pieChart:Vp,proportionalMeterChart:aA,radarChart:oA,scatterChart:jl,simpleBarChart:Y2,stackedAreaChart:J2,stackedBarChart:Z2,thematicChart:Np,treeChart:cA,treemapChart:uA,wordCloudChart:iA},Fp=Object.freeze(Object.defineProperty({__proto__:null,alluvial:ve,area:Ne,axis:gi,baseTooltip:zl,boxplot:de,canvasZoomSettings:vi,carbonPrefix:te,circlePack:Rn,color:vl,defaultLegendAdditionalItems:wf,grid:Rp,heatmap:yl,histogram:xf,legend:kt,lines:Ue,meter:Gt,options:wt,pie:Et,radar:pn,ruler:Ip,spacers:_l,timeScale:Ar,toolbar:dO,tooltips:bf,transitions:xl,zoomBar:se},Symbol.toStringTag,{value:"Module"})),Wl=[["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 Gp(e,t,n,i,r){const s=t===0,a=Number(mi(new Date(e),"c"))===2,o=Number(mi(new Date(e),"q"))===1,c=t!==0?n[t-1]:null;switch(i){case"15seconds":return s||va(e)||Dr(e,c)||Fn(e);case"minute":return s||va(e)||Dr(e,c)||Fn(e);case"30minutes":return s||va(e)||Dr(e,c)||Fn(e);case"hourly":return s||va(e)||Dr(e,c)||Fn(e);case"daily":return r?s||a||Fn(e):s||Dr(e,c)||Fn(e);case"monthly":return s||Fn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${i} is not a valid time interval.`)}}function ql(e,t,n,i,r){const s=r.showDayName,a=i==="daily"&&s?"weekly":i,o=new Date(e),c=w(r,"timeIntervalFormats")[a],l=w(c,"primary"),u=w(c,"secondary");let d=Gp(e,t,n,i,s)?l:u;i==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=r.localeObject;return mi(o,d,{locale:h})}function ga(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function mA(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function gA(e){const t=Wl.reduce((n,[,i],r)=>{const s=Wl[n][1],a=Math.abs(s-e),o=Math.abs(i-e);return a<o?n:r},0);return Wl[t][0]}function Yl(e){if(e.length===1)return"15seconds";const t=mA(e),n=cn(t);return gA(n)}function va(e){const{s:t,m:n,H:i}=ga(e);return i===0&&n===0&&t===0}function Dr(e,t){const n=ga(e).M,i=ga(t).M;return n!==i}function Fn(e){const{M:t,d:n,s:i,m:r,H:s}=ga(e);return t===1&&n===1&&s===0&&r===0&&i===0}function zp(e){return e===void 0?"":e.toISOString()}var vA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function jp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}};/*! dom-to-image-more 26-04-2023 */(function(e,t){(function(n){const i=function(){let S=0;return{escape:function(_){return _.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")},isDataUrl:function(_){return _.search(/^(data:)/)!==-1},canvasToBlob:function(_){return _.toBlob?new Promise(function($){_.toBlob($)}):function($){return new Promise(function(y){var k=f($.toDataURL().split(",")[1]),R=k.length,U=new Uint8Array(R);for(let N=0;N<R;N++)U[N]=k.charCodeAt(N);y(new Blob([U],{type:"image/png"}))})}(_)},resolveUrl:function(_,$){var y=document.implementation.createHTMLDocument(),k=y.createElement("base"),R=(y.head.appendChild(k),y.createElement("a"));return y.body.appendChild(R),k.href=$,R.href=_,R.href},getAndEncode:function(_){let $=u.impl.urlCache.find(function(y){return y.url===_});return $||($={url:_,promise:null},u.impl.urlCache.push($)),$.promise===null&&(u.impl.options.cacheBust&&(_+=(/\?/.test(_)?"&":"?")+new Date().getTime()),$.promise=new Promise(function(y){const k=u.impl.options.httpTimeout,R=new XMLHttpRequest;R.onreadystatechange=function(){if(R.readyState===4)if(R.status!==200)U?y(U):G(`cannot fetch resource: ${_}, status: `+R.status);else{const z=new FileReader;z.onloadend=function(){y(z.result)},z.readAsDataURL(R.response)}},R.ontimeout=function(){U?y(U):G(`timeout of ${k}ms occured while fetching resource: `+_)},R.responseType="blob",R.timeout=k,u.impl.options.useCredentials&&(R.withCredentials=!0),R.open("GET",_,!0),R.send();let U;var N;function G(z){console.error(z),y("")}u.impl.options.imagePlaceholder&&(N=u.impl.options.imagePlaceholder.split(/,/))&&N[1]&&(U=N[1])})),$.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+S++},delay:function(_){return function($){return new Promise(function(y){setTimeout(function(){y($)},_)})}},asArray:function(_){var $=[],y=_.length;for(let k=0;k<y;k++)$.push(_[k]);return $},escapeXhtml:function(_){return _.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(_){return _!=="data:,"?new Promise(function($,y){const k=new Image;u.impl.options.useCredentials&&(k.crossOrigin="use-credentials"),k.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){$(k)}):$(k)},k.onerror=y,k.src=_}):Promise.resolve()},width:function(_){var $=B(_,"width");if(!isNaN($))return $;var $=B(_,"border-left-width"),y=B(_,"border-right-width");return _.scrollWidth+$+y},height:function(_){var $=B(_,"height");if(!isNaN($))return $;var $=B(_,"border-top-width"),y=B(_,"border-bottom-width");return _.scrollHeight+$+y},getWindow:A,isElement:C,isElementHostForOpenShadowRoot:function(_){return C(_)&&_.shadowRoot!==null},isShadowRoot:D,isInShadowRoot:L,isHTMLElement:function(_){return _ instanceof A(_).HTMLElement},isHTMLCanvasElement:function(_){return _ instanceof A(_).HTMLCanvasElement},isHTMLInputElement:function(_){return _ instanceof A(_).HTMLInputElement},isHTMLImageElement:function(_){return _ instanceof A(_).HTMLImageElement},isHTMLLinkElement:function(_){return _ instanceof A(_).HTMLLinkElement},isHTMLScriptElement:function(_){return _ instanceof A(_).HTMLScriptElement},isHTMLStyleElement:function(_){return _ instanceof A(_).HTMLStyleElement},isHTMLTextAreaElement:function(_){return _ instanceof A(_).HTMLTextAreaElement},isShadowSlotElement:function(_){return L(_)&&_ instanceof A(_).HTMLSlotElement},isSVGElement:function(_){return _ instanceof A(_).SVGElement},isSVGRectElement:function(_){return _ instanceof A(_).SVGRectElement},isDimensionMissing:function(_){return isNaN(_)||_<=0}};function A(_){return _=_?_.ownerDocument:void 0,(_?_.defaultView:void 0)||n||window}function D(_){return _ instanceof A(_).ShadowRoot}function L(_){return _!==null&&Object.prototype.hasOwnProperty.call(_,"getRootNode")&&D(_.getRootNode())}function C(_){return _ instanceof A(_).Element}function B(_,$){if(_.nodeType===d){let y=h(_).getPropertyValue($);if(y.slice(-2)==="px")return y=y.slice(0,-2),parseFloat(y)}return NaN}}(),r=function(){const S=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(C,B,_){return A(C)?Promise.resolve(C).then(D).then(function($){let y=Promise.resolve(C);return $.forEach(function(k){y=y.then(function(R){return L(R,k,B,_)})}),y}):Promise.resolve(C)},shouldProcess:A,impl:{readUrls:D,inline:L}};function A(C){return C.search(S)!==-1}function D(C){for(var B,_=[];(B=S.exec(C))!==null;)_.push(B[1]);return _.filter(function($){return!i.isDataUrl($)})}function L(C,B,_,$){return Promise.resolve(B).then(function(y){return _?i.resolveUrl(y,_):y}).then($||i.getAndEncode).then(function(y){return C.replace((k=B,new RegExp(`(url\\(['"]?)(${i.escape(k)})(['"]?\\))`,"g")),`$1${y}$3`);var k})}}(),s={resolveAll:function(){return a().then(function(S){return Promise.all(S.map(function(A){return A.resolve()}))}).then(function(S){return S.join(`
2
- `)})},impl:{readAll:a}};function a(){return Promise.resolve(i.asArray(document.styleSheets)).then(function(A){const D=[];return A.forEach(function(L){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(L),"cssRules"))try{i.asArray(L.cssRules||[]).forEach(D.push.bind(D))}catch(C){console.error("domtoimage: Error while reading CSS rules from "+L.href,C.toString())}}),D}).then(function(A){return A.filter(function(D){return D.type===CSSRule.FONT_FACE_RULE}).filter(function(D){return r.shouldProcess(D.style.getPropertyValue("src"))})}).then(function(A){return A.map(S)});function S(A){return{resolve:function(){var D=(A.parentStyleSheet||{}).href;return r.inlineAll(A.cssText,D)},src:function(){return A.style.getPropertyValue("src")}}}}const o={inlineAll:function S(A){if(!i.isElement(A))return Promise.resolve(A);return D(A).then(function(){return i.isHTMLImageElement(A)?c(A).inline():Promise.all(i.asArray(A.childNodes).map(function(L){return S(L)}))});function D(L){const C=["background","background-image"],B=C.map(function(_){const $=L.style.getPropertyValue(_),y=L.style.getPropertyPriority(_);return $?r.inlineAll($).then(function(k){L.style.setProperty(_,k,y)}):Promise.resolve()});return Promise.all(B).then(function(){return L})}},impl:{newImage:c}};function c(S){return{inline:function(A){return i.isDataUrl(S.src)?Promise.resolve():Promise.resolve(S.src).then(A||i.getAndEncode).then(function(D){return new Promise(function(L){S.onload=L,S.onerror=L,S.src=D})})}}}const l={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict"},u={toSvg:p,toPng:function(S,A){return g(S,A).then(function(D){return D.toDataURL()})},toJpeg:function(S,A){return g(S,A).then(function(D){return D.toDataURL("image/jpeg",(A?A.quality:void 0)||1)})},toBlob:function(S,A){return g(S,A).then(i.canvasToBlob)},toPixelData:function(S,A){return g(S,A).then(function(D){return D.getContext("2d").getImageData(0,0,i.width(S),i.height(S)).data})},toCanvas:g,impl:{fontFaces:s,images:o,util:i,inliner:r,urlCache:[],options:{}}},d=(e.exports=u,(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1),h=(n!==void 0?n.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,f=(n!==void 0?n.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function p(S,A){u.impl.util.getWindow(S);var D=A=A||{};D.copyDefaultStyles===void 0?u.impl.options.copyDefaultStyles=l.copyDefaultStyles:u.impl.options.copyDefaultStyles=D.copyDefaultStyles,D.imagePlaceholder===void 0?u.impl.options.imagePlaceholder=l.imagePlaceholder:u.impl.options.imagePlaceholder=D.imagePlaceholder,D.cacheBust===void 0?u.impl.options.cacheBust=l.cacheBust:u.impl.options.cacheBust=D.cacheBust,D.useCredentials===void 0?u.impl.options.useCredentials=l.useCredentials:u.impl.options.useCredentials=D.useCredentials,D.httpTimeout===void 0?u.impl.options.httpTimeout=l.httpTimeout:u.impl.options.httpTimeout=D.httpTimeout,D.styleCaching===void 0?u.impl.options.styleCaching=l.styleCaching:u.impl.options.styleCaching=D.styleCaching;let L=[];return Promise.resolve(S).then(function(C){if(C.nodeType===d)return C;var B=C,_=C.parentNode,$=document.createElement("span");return _.replaceChild($,B),$.append(C),L.push({parent:_,child:B,wrapper:$}),$}).then(function(C){return function B(_,$,y,k){const R=$.filter;if(_===m||i.isHTMLScriptElement(_)||i.isHTMLStyleElement(_)||i.isHTMLLinkElement(_)||y!==null&&R&&!R(_))return Promise.resolve();return Promise.resolve(_).then(U).then(function(F){return G(F,N(_))}).then(function(F){return z(F,_)});function U(F){return i.isHTMLCanvasElement(F)?i.makeImage(F.toDataURL()):F.cloneNode(!1)}function N(F){return i.isElementHostForOpenShadowRoot(F)?F.shadowRoot:F}function G(F,Q){const j=tt(Q);let X=Promise.resolve();if(j.length!==0){const lt=h(ot(Q));i.asArray(j).forEach(function(W){X=X.then(function(){return B(W,$,lt).then(function(q){q&&F.appendChild(q)})})})}return X.then(function(){return F});function ot(lt){return i.isShadowRoot(lt)?lt.host:lt}function tt(lt){return i.isShadowSlotElement(lt)?lt.assignedNodes():lt.childNodes}}function z(F,Q){return!i.isElement(F)||i.isShadowSlotElement(Q)?Promise.resolve(F):Promise.resolve().then(j).then(X).then(ot).then(tt).then(function(){return F});function j(){function lt(q,Y){Y.font=q.font,Y.fontFamily=q.fontFamily,Y.fontFeatureSettings=q.fontFeatureSettings,Y.fontKerning=q.fontKerning,Y.fontSize=q.fontSize,Y.fontStretch=q.fontStretch,Y.fontStyle=q.fontStyle,Y.fontVariant=q.fontVariant,Y.fontVariantCaps=q.fontVariantCaps,Y.fontVariantEastAsian=q.fontVariantEastAsian,Y.fontVariantLigatures=q.fontVariantLigatures,Y.fontVariantNumeric=q.fontVariantNumeric,Y.fontVariationSettings=q.fontVariationSettings,Y.fontWeight=q.fontWeight}function W(q,Y){const H=h(q);H.cssText?(Y.style.cssText=H.cssText,lt(H,Y.style)):(b($,q,H,y,Y),y===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(xt=>Y.style.removeProperty(xt)),["left","right","top","bottom"].forEach(xt=>{Y.style.getPropertyValue(xt)&&Y.style.setProperty(xt,"0px")})))}W(Q,F)}function X(){const lt=i.uid();function W(q){const Y=h(Q,q),H=Y.getPropertyValue("content");if(H!==""&&H!=="none"){let xt=function(){const qt=`.${lt}:`+q,et=(Y.cssText?Lt:jn)();return document.createTextNode(qt+`{${et}}`);function Lt(){return`${Y.cssText} content: ${H};`}function jn(){return i.asArray(Y).map(Fe).join("; ")+";";function Fe(Lc){const cH=Y.getPropertyValue(Lc),uH=Y.getPropertyPriority(Lc)?" !important":"";return Lc+": "+cH+uH}}};const pt=F.getAttribute("class")||"",zt=(F.setAttribute("class",pt+" "+lt),document.createElement("style"));zt.appendChild(xt()),F.appendChild(zt)}}[":before",":after"].forEach(function(q){W(q)})}function ot(){i.isHTMLTextAreaElement(Q)&&(F.innerHTML=Q.value),i.isHTMLInputElement(Q)&&F.setAttribute("value",Q.value)}function tt(){i.isSVGElement(F)&&(F.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.isSVGRectElement(F))&&["width","height"].forEach(function(lt){const W=F.getAttribute(lt);W&&F.style.setProperty(lt,W)})}}}(C,A,null)}).then(v).then(x).then(function(C){A.bgcolor&&(C.style.backgroundColor=A.bgcolor),A.width&&(C.style.width=A.width+"px"),A.height&&(C.style.height=A.height+"px"),A.style&&Object.keys(A.style).forEach(function(_){C.style[_]=A.style[_]});let B=null;return typeof A.onclone=="function"&&(B=A.onclone(C)),Promise.resolve(B).then(function(){return C})}).then(function(C){let B=A.width||i.width(C),_=A.height||i.height(C);return Promise.resolve(C).then(function($){return $.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString($)}).then(i.escapeXhtml).then(function($){var y=(i.isDimensionMissing(B)?' width="100%"':` width="${B}"`)+(i.isDimensionMissing(_)?' height="100%"':` height="${_}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(i.isDimensionMissing(B)?"":` width="${B}"`)+(i.isDimensionMissing(_)?"":` height="${_}"`)}><foreignObject${y}>${$}</foreignObject></svg>`}).then(function($){return"data:image/svg+xml;charset=utf-8,"+$})}).then(function(C){for(;0<L.length;){var B=L.pop();B.parent.replaceChild(B.child,B.wrapper)}return C}).then(function(C){return u.impl.urlCache=[],function(){m&&(document.body.removeChild(m),m=null),O&&clearTimeout(O),O=setTimeout(()=>{O=null,E={}},2e4)}(),C})}function g(S,A){return p(S,A=A||{}).then(i.makeImage).then(function(D){var L=typeof A.scale!="number"?1:A.scale,C=function(_,$){let y=A.width||i.width(_),k=A.height||i.height(_);return i.isDimensionMissing(y)&&(y=i.isDimensionMissing(k)?300:2*k),i.isDimensionMissing(k)&&(k=y/2),_=document.createElement("canvas"),_.width=y*$,_.height=k*$,A.bgcolor&&(($=_.getContext("2d")).fillStyle=A.bgcolor,$.fillRect(0,0,_.width,_.height)),_}(S,L),B=C.getContext("2d");return B.msImageSmoothingEnabled=!1,B.imageSmoothingEnabled=!1,D&&(B.scale(L,L),B.drawImage(D,0,0)),C})}let m=null;function v(S){return s.resolveAll().then(function(A){var D;return A!==""&&(D=document.createElement("style"),S.appendChild(D),D.appendChild(document.createTextNode(A))),S})}function x(S){return o.inlineAll(S).then(function(){return S})}function b(S,A,D,L,C){const B=u.impl.options.copyDefaultStyles?function($,R){var R=function(N){var G=[];do if(N.nodeType===d){var z=N.tagName;if(G.push(z),T.includes(z))break}while(N=N.parentNode,N);return G}(R),k=function(N){return($.styleCaching!=="relaxed"?N:N.filter((G,z,F)=>z===0||z===F.length-1)).join(">")}(R);if(E[k])return E[k];var U=function(){if(m)return m.contentWindow;var N=document.characterSet||"UTF-8",G=document.doctype,G=G?(`<!DOCTYPE ${z(G.name)} ${z(G.publicId)} `+z(G.systemId)).trim()+">":"";return(m=document.createElement("iframe")).id="domtoimage-sandbox-"+i.uid(),m.style.visibility="hidden",m.style.position="fixed",document.body.appendChild(m),function(F,Q,j,X){try{return F.contentWindow.document.write(Q+`<html><head><meta charset='${j}'><title>${X}</title></head><body></body></html>`),F.contentWindow}catch{}var ot=document.createElement("meta");ot.setAttribute("charset",j);try{var tt=document.implementation.createHTMLDocument(X),lt=(tt.head.appendChild(ot),Q+tt.documentElement.outerHTML);return F.setAttribute("srcdoc",lt),F.contentWindow}catch{}return F.contentDocument.head.appendChild(ot),F.contentDocument.title=X,F.contentWindow}(m,G,N,"domtoimage-sandbox");function z(F){var Q;return F?((Q=document.createElement("div")).innerText=F,Q.innerHTML):""}}(),R=function(N,G){let z=N.body;do{var F=G.pop(),F=N.createElement(F);z.appendChild(F),z=F}while(0<G.length);return z.textContent="​",z}(U.document,R),U=function(N,G){const z={},F=N.getComputedStyle(G);return i.asArray(F).forEach(function(Q){z[Q]=Q==="width"||Q==="height"?"auto":F.getPropertyValue(Q)}),z}(U,R);return function(N){do{var G=N.parentElement;G!==null&&G.removeChild(N),N=G}while(N&&N.tagName!=="BODY")}(R),E[k]=U}(S,A):{},_=C.style;i.asArray(D).forEach(function($){var y,k=D.getPropertyValue($),R=B[$],U=L?L.getPropertyValue($):void 0;(k!==R||L&&k!==U)&&(R=D.getPropertyPriority($),U=_,k=k,R=R,y=0<=["background-clip"].indexOf($=$),R?(U.setProperty($,k,R),y&&U.setProperty("-webkit-"+$,k,R)):(U.setProperty($,k),y&&U.setProperty("-webkit-"+$,k)))})}let O=null,E={};const T=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]})(vA)})(Wp);var yA=Wp.exports;const qp=jp(yA);function Yp(e){const t=xe(e,i=>i.value),n=Oe().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 Xp(e,t){const n=w(t,"gradient","colors"),i=!$e(n);let r=w(t,"pairing","option");const s=Yp(e),a=s[0]<0&&s[1]>0?"diverge":"mono";(r<1&&r>4&&a==="mono"||r<1&&r>2&&a==="diverge")&&(r=1);const o=i?n:[];if(!i){const c=a==="diverge"?17:11;for(let l=1;l<c+1;l++)o.push(`fill-${a}-${r}-${l}`)}return jo().domain(s).range(o)}var at=(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))(at||{});function _A(e,t){return e&&$p(e,t,br)}function xA(e,t){return function(n,i){if(n==null)return n;if(!Un(n))return e(n,i);for(var r=n.length,s=t?r:-1,a=Object(n);(t?s--:++s<r)&&i(a[s],s,a)!==!1;);return n}}var bA=xA(_A);const Xl=bA;function wA(e,t,n,i){for(var r=-1,s=e==null?0:e.length;++r<s;){var a=e[r];t(i,a,n(a),e)}return i}function EA(e,t,n,i){return Xl(e,function(r,s,a){t(i,r,n(r),a)}),i}function SA(e,t){return function(n,i){var r=jt(n)?wA:EA,s=t?t():{};return r(n,e,ma(i),s)}}function OA(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}var TA=Object.prototype,CA=TA.hasOwnProperty,MA=SA(function(e,t,n){CA.call(e,n)?e[n].push(t):ra(e,n,[t])});const $A=MA;class Ve{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let i=this.getData();const r=this.getDataGroups(),{groupMapsTo:s}=w(n,"data"),a=w(n,"axes");return t&&(i=i.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const c=a[o].mapsTo,l=a[o].scaleType;if((l===Z.LINEAR||l===Z.LOG)&&(i=i.map(u=>({...u,[c]:u[c]===null?u[c]:Number(u[c])}))),c&&a[o].domain)if(l===Z.LABELS)i=i.filter(u=>a[o].domain.includes(u[c]));else{const[u,d]=a[o].domain;i=i.filter(h=>!(c in h)||h[c]>=u&&h[c]<=d)}}),i.filter(o=>r.find(c=>c.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=kt.items.status,i=this.getDataGroups(t),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(s=>i.find(a=>a.name===s[r]&&a.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(rn(t)),i=this.generateDataGroups(n);return this.set({data:n,dataGroups:i}),n}getDataGroups(t){return w(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=kt.items.status;return this.getDataGroups(t).filter(i=>i.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 $A(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),i=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[i],{groupMapsTo:a}=n.data,{bins:o=xf.defaultBins}=s,c=Array.isArray(o),l=qv().value(f=>f[r]).thresholds(o)(t);if(c)l[l.length-1].x1=o[o.length-1];else{const f=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+f}const u=c?[o[0],o[o.length-1]]:[l[0].x0,l[l.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return l.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(m=>{h.push({group:m,key:p,value:g[m]||0,bin:f.x0})})}),{bins:l,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:r});return hl().keys(i)(s).map((a,o)=>Object.keys(a).filter(c=>!isNaN(c)).map(c=>{const l=a[c];return l[n]=i[o],l}))}getGroupedData(t){const n=this.getDisplayData(t),i={},{groupMapsTo:r}=this.getOptions().data;return n.map(s=>{const a=s[r];i[a]!==null&&i[a]!==void 0?i[a].push(s):i[a]=[s]}),Object.keys(i).map(s=>({name:s,data:i[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const i=this.getOptions(),r=this.getDisplayData(n);let s;t?s=t.map(c=>`${c.x0}-${c.x1}`):s=Cr(r.map(c=>{const l=this.services.cartesianScales.getDomainIdentifier(c);return c[l]instanceof Date?zp(c[l]):c[l]&&typeof c[l].toString=="function"?c[l].toString():c[l]}));const a=this.services.cartesianScales.domainAxisPosition,o=i.axes[a].scaleType;return o===Z.TIME?s.sort((c,l)=>{const u=new Date(c),d=new Date(l);return u-d}):(o===Z.LOG||o===Z.LINEAR)&&s.sort((c,l)=>c-l),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(c=>{const[l,u]=c.split("-"),d={x0:l,x1:u},h=t.find(f=>f.x0.toString()===l.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[r]===f).length}),d}):o.map(c=>{const l={sharedStackKey:c};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[r]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?zp(f[p])===c:f[p].toString()===c)}),h=this.services.cartesianScales.getRangeIdentifier(l);l[u]=d?d[h]:null}),l})}getStackedData({percentage:t=!1,groups:n=null,divergent:i=!1}){const r=this.getOptions(),{groupMapsTo:s}=r.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=OA(o.map(l=>[l.sharedStackKey,0]));o.forEach(l=>{a.forEach(u=>{c[l.sharedStackKey]+=l[u]})}),o.forEach(l=>{a.forEach(u=>{const d=c[l.sharedStackKey];c[l.sharedStackKey]?l[u]=l[u]/d*100:l[u]=0})})}return(i?hl().offset(JE):hl()).keys(a)(o).map((c,l)=>Object.keys(c).filter(u=>!isNaN(u)).map(u=>{const d=c[u];return d[s]=a[l],d}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const i=Object.assign({skipUpdate:!1,animate:!0},n);i.skipUpdate||this.update(i.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();Gl(n,t),this.set({options:nt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(M.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:i}=kt.items.status,r=this.getDataGroups(),s=r.some(l=>l.status===i),a=r.filter(l=>l.status===n);if(s)if(a.length===1&&a[0].name===t)r.forEach((l,u)=>{r[u].status=n});else{const l=r.findIndex(u=>u.name===t);r[l].status=r[l].status===i?n:i}else r.forEach((l,u)=>{r[u].status=l.name===t?n:i});const o=r.filter(l=>l.status===n),c=this.getOptions();r.some(l=>l.status===i)?c.data.selectedGroups=o.map(l=>l.name):c.data.selectedGroups=[],this.services.events.dispatchEvent(M.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(t,n,i,r){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,i,r):r}getFillColor(t,n,i){const r=this.getOptions(),s=w(this.colorScale,t);return r.getFillColor?r.getFillColor(t,n,i,s):s}getStrokeColor(t,n,i){const r=this.getOptions(),s=w(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,n,i,s):s}isUserProvidedColorScaleValid(){const t=w(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(i=>Object.keys(t).includes(i.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let i=t.originalClassName;return t.classNameTypes.forEach(r=>i=t.originalClassName?`${i} ${r}-${n}`:`${r}-${n}`),i||""}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://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:i,labels:r}=t;return i.forEach(s=>{s.data.forEach((a,o)=>{let c;const l=w(s,"label");if(l===null){const d=w(r,o);d?c=d:c="Ungrouped"}else c=l;const u={group:c,key:r[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(r=>r.map(s=>`"${s==="&ndash;"?"–":s}"`));let n="",i="";t.forEach(function(r,s){i=r.join(","),n+=s<t.length?i+`
3
- `:i}),this.services.files.downloadCSV(n,"myChart.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:i,DISABLED:r}=kt.items.status,s=this.getOptions(),a=Cr(t.map(c=>c[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=c=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(c)?i:r;return a.map(c=>({name:c,status:o(c)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=w(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=w(this.getOptions(),"color","pairing");let n=w(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let i=w(t,"option");const r=vl.pairingOptions,s=n>5?14:n,a=`${s}-color`;i=i<=r[a]?i:1;const o=this.allDataGroups.map((c,l)=>`${s}-${i}-${l%14+1}`);this.colorClassNames=As().range(o).domain(this.allDataGroups)}}let Gn=class extends Ve{constructor(t){super(t),this.axisFlavor=Zs.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),i=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return i&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach(s=>{const a=r[s];t.scales[a]?r[s]={position:a,label:t.getScaleLabel(a),identifier:w(n,"axes",a,"mapsTo")}:r[s]=null}),r}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,{cartesianScales:r}=this.services,{primaryDomain:s,primaryRange:a,secondaryDomain:o,secondaryRange:c}=this.assignRangeAndDomains(),l=r.getDomainAxisScaleType();let u;return l===Z.TIME&&(u=d=>mi(d,"MMM d, yyyy")),[["Group",s.label,a.label,...o?[o.label]:[],...c?[c.label]:[]],...t.map(d=>[d[i],d[s.identifier]===null?"&ndash;":u?u(d[s.identifier]):d[s.identifier],d[a.identifier]===null||isNaN(d[a.identifier])?"&ndash;":d[a.identifier].toLocaleString(),...o?[d[o.identifier]===null?"&ndash;":d[o.identifier]]:[],...c?[d[c.identifier]===null||isNaN(d[c.identifier])?"&ndash;":d[c.identifier]]:[]])]}setData(t){let n;if(t&&(n=super.setData(t),w(this.getOptions(),"zoomBar",V.TOP,"enabled"))){const i=w(this.getOptions(),"zoomBar",V.TOP,"data");this.setZoomBarData(i)}return n}setZoomBarData(t){const n=t?this.sanitize(rn(t)):this.getDisplayData();let i=n;const{cartesianScales:r}=this.services;if(n&&r.domainAxisPosition&&r.rangeAxisPosition){const s=r.getDomainIdentifier(),a=r.getRangeIdentifier();let o=n.map(c=>c[s].getTime());o=Cr(o).sort(),i=o.map(c=>{let l=0;const u={};return n.forEach(d=>{d[s].getTime()===c&&(l+=d[a])}),u[s]=new Date(c),u[a]=l,u})}this.set({zoomBarData:i})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const i=[];return Object.keys(V).forEach(r=>{const s=V[r],a=n.axes[s];if(a&&a.scaleType===Z.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&i.push(o)}}),i.length>0&&t.forEach(r=>{i.forEach(s=>{w(r,s,"getTime")===null&&(r[s]=new Date(r[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}},AA=class extends Gn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData();return t.sort((n,i)=>n.source.localeCompare(i.source)),[["Source","Target","Value"],...t.map(n=>[n.source,n.target,n.value])]}},LA=class extends Gn{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:Na(t,.25),q_50:Na(t,.5),q_75:Na(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getGroupedData(),r=[];for(const{name:s,data:a}of i){const o=this.services.cartesianScales.getRangeIdentifier(),c=a.map(b=>b[o]).sort(yn),l={[n]:s,counts:c,quartiles:this.getBoxQuartiles(c),outliers:null,whiskers:null},u=l.quartiles.q_25,d=l.quartiles.q_75,h=(d-u)*1.5,f=u-h,p=d+h,g=[],m=[];for(const b of c)b<f||b>p?g.push(b):m.push(b);l.outliers=g;const v=cn(m),x=xn(m);l.whiskers={min:v||cn([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75]),max:x||xn([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75])},r.push(l)}return r}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getBoxplotData();return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...i.map(r=>{let s=w(r,"outliers");return(s===null||s.length===0)&&(s=["&ndash;"]),[r[n],w(r,"whiskers","min")!==null?w(r,"whiskers","min").toLocaleString():"&ndash;",w(r,"quartiles","q_25")!==null?w(r,"quartiles","q_25").toLocaleString():"&ndash;",w(r,"quartiles","q_50")!==null?w(r,"quartiles","q_50").toLocaleString():"&ndash;",w(r,"quartiles","q_75")!==null?w(r,"quartiles","q_75").toLocaleString():"&ndash;",w(r,"whiskers","max")!==null?w(r,"whiskers","max").toLocaleString():"&ndash;",w(r,"quartiles","q_75")!==null&&w(r,"quartiles","q_25")!==null?(w(r,"quartiles","q_75")-w(r,"quartiles","q_25")).toLocaleString():"&ndash;",s.map(a=>a.toLocaleString()).join(",")]})]}setColorClassNames(){const t=w(this.getOptions(),"color","pairing");let n=w(t,"option");const i=vl.pairingOptions;n=n<=i["1-color"]?n:1;const r=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=As().range(r).domain(this.allDataGroups)}},DA=class extends Gn{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let i=t.ranges.length-1;i>0;i--){const r=t.ranges[i];if(t.value>=r)return n=i,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier(),s=w(n,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...t.map(a=>[a.title,a[i],a.value===null?"&ndash;":a.value,w(a,"marker")===null?"&ndash;":a.marker,w(a,"marker")===null?"&ndash;":`${Math.floor(a[r]/a.marker*100)}%`,s[this.getMatchingRangeIndexForDatapoint(a)]])]}},kA=class extends Ve{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if($e(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!$e(n)&&!$e(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(i=>{this._matrix[i.properties.NAME]=i}),n.forEach(i=>{this._matrix[i.name]?this._matrix[i.name].value=i.value||null:console.warn(`Data point ${i} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData();return[["Country ID","Country Name","Value"],...t.map(n=>[n.id===null?"&ndash;":n.id,n.name,n.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=w(this.getOptions(),"color");this._colorScale=Xp(this.getDisplayData(),t)}},RA=class extends Ve{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(),i=nt({},t,this.getZoomOptions(t));Gl(n,i);const r=this.getHierarchyLevel(),s=w(n,"circlePack","hierarchyLevel");this.set({options:nt(n,i),depth:s&&s<4?s:r})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),i=t||this.getOptions(),r=n.length===1&&w(n,0,"children")?w(n,0,"children"):n;let s=this.getHierarchyLevel();return r.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),w(i,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Bt.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:i}=n.data,r=t.map(s=>{const a=s[i];return this.setChildrenDataGroup(s,a)});this.set({data:r},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(i=>this.setChildrenDataGroup(i,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent","Value"]];return t.forEach(i=>{let r=i.value?i.value:0;i.children&&(r+=this.getChildrenDatums(i.children,i.name,n,0)),n.push(["&ndash;",i.name,r])}),n}getChildrenDatums(t,n,i=[],r=0){const s=n;return t.forEach(a=>{const o=a.name;let c=0;if(a.children)a.children.length>0&&(typeof a.value=="number"&&(r+=a.value),c+=this.getChildrenDatums(a.children,o,i,c),i.push([o,s,c]),r+=c);else{let l=0;typeof a.value=="number"&&(l=a.value,r+=a.value),i.push([a.name,s,l])}}),r}},IA=class extends Ve{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(i=>{i.key&&i.key!==i.group&&(i.group=i.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data;return[["Group","Value"],...t.map(r=>[r[i],r.value===null?"&ndash;":r.value.toLocaleString()])]}sanitize(t){return this.getTabularData(t).sort((n,i)=>i.value-n.value)}},PA=class extends Ve{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data;return[["Group","Value"],...t.map(r=>[r[i],r.value===null?"&ndash;":r.value.toLocaleString()])]}},NA=class extends Gn{constructor(t){super(t),this.axisFlavor=Zs.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=w(this.getOptions(),"axes");if(w(n,"left","scaleType")&&w(n,"left","scaleType")!==Z.LABELS||w(n,"right","scaleType")&&w(n,"right","scaleType")!==Z.LABELS||w(n,"top","scaleType")&&w(n,"top","scaleType")!==Z.LABELS||w(n,"bottom","scaleType")&&w(n,"bottom","scaleType")!==Z.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=xe(this.getDisplayData(),i=>i.value),n=Oe().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($e(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,i=n.getDomainIdentifier(),r=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(r);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[i])))}return this._domains}getUniqueRanges(){if($e(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,i=n.getRangeIdentifier(),r=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(r);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[i])))}return this._ranges}getMatrix(){if($e(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=rn(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[i]][a[r]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(rn(t)),i=this.generateDataGroups(n);return this.set({data:n,dataGroups:i}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){$e(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const c={value:this._matrix[a][o].value,index:this._matrix[a][o].index};c[i]=a,c[r]=o,s.push(c)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:i}=this.assignRangeAndDomains();return[[n.label,i.label,"Value"],...t.map(r=>[r[n.identifier]===null?"&ndash;":r[n.identifier],r[i.identifier]===null?"&ndash;":r[i.identifier].toLocaleString(),r.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=w(t,"color","gradient","colors"),i=!$e(n);let r=w(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(r<1&&r>4&&a==="mono"||r<1&&r>2&&a==="diverge")&&(r=1);const o=i?n:[];if(!i){const l=a==="diverge"?17:11;for(let u=1;u<l+1;u++)o.push(`fill-${a}-${r}-${u}`)}this._colorScale=jo().domain(s).range(o);const c=w(this.getOptions(),"color");this._colorScale=Xp(this.getDisplayData(),c)}},UA=class extends Gn{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getBinnedStackedData();return[[Ot(t,"bins.rangeLabel")||"Range",...i.map(r=>Ot(r,`0.${n}`))],...Ot(i,0).map((r,s)=>[`${Ot(r,"data.x0")} – ${Ot(r,"data.x1")}`,...i.map(a=>Ot(a[s],`data.${Ot(a[s],n)}`))])]}},BA=class extends Ve{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,i)=>n+i.value,0)}getFillColor(t){const n=this.getOptions(),i=w(n,"color","scale"),r=this.getStatus();return i||!r?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=w(this.getDisplayData()),{value:i}=n?n.reduce((a,o)=>({value:a.value+o.value})):0,r=w(t,"meter","proportional")?i:i>100?100:i,s=w(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=r&&r<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getStatus(),s=w(n,"meter","proportional");let a=[],o;if(s===null){o=100;const c=t[0];a=[["Group","Value",...r?["Status"]:[]],[c[i],c.value,...r?[r]:[]]]}else o=w(s,"total")||this.getMaximumDomain(t),a=[["Group","Value","Percentage of total"],...t.map(l=>[l[i],l.value,(l.value/o*100).toFixed(2)+" %"])];return a}},VA=class extends Gn{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:i,value:r}=w(t,"radar","axes"),s=w(n,"0","data").map(a=>a[i]);return[["Group",...s],...n.map(a=>[a.name,...s.map((o,c)=>w(a,"data",c,r)!==null?w(a,"data",c,r).toLocaleString():"&ndash;")])]}},HA=class extends Ve{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent"]];return t.forEach(i=>{this.getChildrenDatums(i,n),n.push([i.name,"&ndash;"])}),n}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(i=>{this.getChildrenDatums(i,n),n.push([i.name,t.name])})}};class FA extends Ve{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Group","Value"]];return t.forEach(i=>{Array.isArray(i.children)?i.children.forEach(r=>{n.push([r.name,i.name,r.value])}):w(i.name)!==null&&w(i.value)&&n.push(["–",i.name,i.value])}),n}}let GA=class extends Ve{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:i,wordMapsTo:r}=n.wordCloud,{groupMapsTo:s}=n.data;return[[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],...t.map(a=>[a[r],a[s],a[i]])]}};var zA=/\s/;function jA(e){for(var t=e.length;t--&&zA.test(e.charAt(t)););return t}var WA=/^\s+/;function qA(e){return e&&e.slice(0,jA(e)+1).replace(WA,"")}var Zp=0/0,YA=/^[-+]0x[0-9a-f]+$/i,XA=/^0b[01]+$/i,ZA=/^0o[0-7]+$/i,KA=parseInt;function kr(e){if(typeof e=="number")return e;if(na(e))return Zp;if(_e(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_e(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qA(e);var n=XA.test(e);return n||ZA.test(e)?KA(e.slice(2),n?2:8):YA.test(e)?Zp:+e}var QA=function(){return Ce.Date.now()};const Zl=QA;var JA="Expected a function",tL=Math.max,eL=Math.min;function ya(e,t,n){var i,r,s,a,o,c,l=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(JA);t=kr(t)||0,_e(n)&&(u=!!n.leading,d="maxWait"in n,s=d?tL(kr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(T){var S=i,A=r;return i=r=void 0,l=T,a=e.apply(A,S),a}function p(T){return l=T,o=setTimeout(v,t),u?f(T):a}function g(T){var S=T-c,A=T-l,D=t-S;return d?eL(D,s-A):D}function m(T){var S=T-c,A=T-l;return c===void 0||S>=t||S<0||d&&A>=s}function v(){var T=Zl();if(m(T))return x(T);o=setTimeout(v,g(T))}function x(T){return o=void 0,h&&i?f(T):(i=r=void 0,a)}function b(){o!==void 0&&clearTimeout(o),l=0,i=c=r=o=void 0}function O(){return o===void 0?a:x(Zl())}function E(){var T=Zl(),S=m(T);if(i=arguments,r=this,c=T,S){if(o===void 0)return p(c);if(d)return clearTimeout(o),o=setTimeout(v,t),f(c)}return o===void 0&&(o=setTimeout(v,t)),a}return E.cancel=b,E.flush=O,E}let on=class{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}};const nL="DONT_STYLE_ME_css_styles_verifier";class I extends on{constructor(t,n){super(t,n),this.chartID=""}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=P(t));const i={width:0,height:0},r=h=>{h&&Object.keys(i).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>i[f]&&(""+p).indexOf("%")===-1&&(i[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,c,l,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),c={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(l=a.getBoundingClientRect(),u={width:l.width,height:l.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(r(s),i.width>0&&i.height>0))return i;if(n.useClientDimensions&&(r(d),i.width>0&&i.height>0))return d;if(n.useBBox&&(r(c),i.width>0&&i.height>0))return c;if(n.useBoundingRect&&(r(u),i.width>0&&i.height>0))return u}try{const h={width:w(t.node(),"width","baseVal","value"),height:w(t.node(),"height","baseVal","value")};r(h)}catch{r(d),r(c),r(s)}return i}static appendOrSelect(t,n){const i=t.select(`${n}`);if(i.empty()){let r=n.split("#"),s,a;return r.length===2?(s=r[0],r=r[1].split("."),a=r[0]):(r=n.split("."),s=r[0]),t.append(s).attr("id",a).attr("class",r.slice(1).join(" "))}return i}init(){this.styleHolderElement(),this.initializeID(),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=w(t,"style","prefix"),i=P(this.getHolder()).append("div").classed(`${te}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");i.append("g").attr("class",nL),this.mainContainer=i.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:i,theme:r}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),i!==this.height&&(t.style.height=i,this.height=i),P(this.getHolder()).classed(`${te}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.getHolder(),i=P(n);i.classed("filled",!0),qp.toJpeg(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:r=>!(r.classList&&r.classList.contains("cds--cc--toolbar"))}).then(function(r){var s;(s=t.services.files)==null||s.downloadImage(r,"myChart.jpg"),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.getHolder(),i=P(n);i.classed("filled",!0),qp.toPng(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:r=>!(r.classList&&r.classList.contains("cds--cc--toolbar"))}).then(function(r){var s;(s=t.services.files)==null||s.downloadImage(r,"myChart.png"),i.classed("filled",!1)}).catch(function(r){console.error("oops, something went wrong!",r)})}toggleFullscreen(){const t=this.getHolder();P(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=P(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=I.getSVGElementSize(P(this.mainContainer),{useBBox:!0}),n=P(this.mainContainer).attr("class"),i=P(this.mainContainer).selectAll(`.${n} > svg`);let r=0;i.nodes().forEach(function(s){r+=Number(I.getSVGElementSize(P(s),{useBBox:!0}).height)}),r<=t?P(this.mainContainer).attr("height",r):P(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&P(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(M.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(M.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,i=t.clientHeight;const r=ya(()=>{var s;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(i-t.clientHeight)>1)&&(n=t.clientWidth,i=t.clientHeight,(s=this.services.events)==null||s.dispatchEvent(M.Chart.RESIZE))},12.5);new ResizeObserver(r).observe(t)}}let Kl=class Mv extends on{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",i=>i.offset).style("stop-color",i=>i.color).style("stop-opacity",i=>i.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const i=t[0]<0&&t[1]>0;let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return i&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:Mv.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};function Kp(e){const t=iL(Qp(e),360);return mn(t,[0,10])||mn(t,[350,0])?{textAnchor:Qe.START,dominantBaseline:Je.MIDDLE}:mn(t,[10,80])?{textAnchor:Qe.START,dominantBaseline:Je.HANGING}:mn(t,[80,100])?{textAnchor:Qe.MIDDLE,dominantBaseline:Je.HANGING}:mn(t,[100,170])?{textAnchor:Qe.END,dominantBaseline:Je.HANGING}:mn(t,[170,190])?{textAnchor:Qe.END,dominantBaseline:Je.MIDDLE}:mn(t,[190,260])?{textAnchor:Qe.END,dominantBaseline:Je.BASELINE}:mn(t,[260,280])?{textAnchor:Qe.MIDDLE,dominantBaseline:Je.BASELINE}:{textAnchor:Qe.START,dominantBaseline:Je.BASELINE}}function iL(e,t){return(e%t+t)%t}function mn(e,[t,n]){return e>=t&&e<=n}function Qp(e){return e*(180/Math.PI)}function It(e,t,n={x:0,y:0}){const i=t*Math.cos(e)+n.x,r=t*Math.sin(e)+n.y;return{x:isNaN(i)?0:i,y:isNaN(r)?0:r}}function rL(e,t){return t*Math.sin(e-Math.PI/2)}function Jp(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function sL(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Ql(e,t){let n=0;if(t===void 0)for(let i of e)(i=+i)&&(n+=i);else{let i=-1;for(let r of e)(r=+t(r,++i,e))&&(n+=r)}return n}function aL(e){return e.depth}function oL(e,t){return t-1-e.height}function tm(e,t){return e.sourceLinks.length?e.depth:t-1}function _a(e){return function(){return e}}function em(e,t){return xa(e.source,t.source)||e.index-t.index}function nm(e,t){return xa(e.target,t.target)||e.index-t.index}function xa(e,t){return e.y0-t.y0}function Jl(e){return e.value}function lL(e){return e.index}function cL(e){return e.nodes}function uL(e){return e.links}function im(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function rm({nodes:e}){for(const t of e){let n=t.y0,i=n;for(const r of t.sourceLinks)r.y0=n+r.width/2,n+=r.width;for(const r of t.targetLinks)r.y1=i+r.width/2,i+=r.width}}function hL(){let e=0,t=0,n=1,i=1,r=24,s=8,a,o=lL,c=tm,l,u,d=cL,h=uL,f=6;function p(){const y={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return g(y),m(y),v(y),x(y),E(y),rm(y),y}p.update=function(y){return rm(y),y},p.nodeId=function(y){return arguments.length?(o=typeof y=="function"?y:_a(y),p):o},p.nodeAlign=function(y){return arguments.length?(c=typeof y=="function"?y:_a(y),p):c},p.nodeSort=function(y){return arguments.length?(l=y,p):l},p.nodeWidth=function(y){return arguments.length?(r=+y,p):r},p.nodePadding=function(y){return arguments.length?(s=a=+y,p):s},p.nodes=function(y){return arguments.length?(d=typeof y=="function"?y:_a(y),p):d},p.links=function(y){return arguments.length?(h=typeof y=="function"?y:_a(y),p):h},p.linkSort=function(y){return arguments.length?(u=y,p):u},p.size=function(y){return arguments.length?(e=t=0,n=+y[0],i=+y[1],p):[n-e,i-t]},p.extent=function(y){return arguments.length?(e=+y[0][0],n=+y[1][0],t=+y[0][1],i=+y[1][1],p):[[e,t],[n,i]]},p.iterations=function(y){return arguments.length?(f=+y,p):f};function g({nodes:y,links:k}){for(const[U,N]of y.entries())N.index=U,N.sourceLinks=[],N.targetLinks=[];const R=new Map(y.map((U,N)=>[o(U,N,y),U]));for(const[U,N]of k.entries()){N.index=U;let{source:G,target:z}=N;typeof G!="object"&&(G=N.source=im(R,G)),typeof z!="object"&&(z=N.target=im(R,z)),G.sourceLinks.push(N),z.targetLinks.push(N)}if(u!=null)for(const{sourceLinks:U,targetLinks:N}of y)U.sort(u),N.sort(u)}function m({nodes:y}){for(const k of y)k.value=k.fixedValue===void 0?Math.max(Ql(k.sourceLinks,Jl),Ql(k.targetLinks,Jl)):k.fixedValue}function v({nodes:y}){const k=y.length;let R=new Set(y),U=new Set,N=0;for(;R.size;){for(const G of R){G.depth=N;for(const{target:z}of G.sourceLinks)U.add(z)}if(++N>k)throw new Error("circular link");R=U,U=new Set}}function x({nodes:y}){const k=y.length;let R=new Set(y),U=new Set,N=0;for(;R.size;){for(const G of R){G.height=N;for(const{source:z}of G.targetLinks)U.add(z)}if(++N>k)throw new Error("circular link");R=U,U=new Set}}function b({nodes:y}){const k=Jp(y,N=>N.depth)+1,R=(n-e-r)/(k-1),U=new Array(k);for(const N of y){const G=Math.max(0,Math.min(k-1,Math.floor(c.call(null,N,k))));N.layer=G,N.x0=e+G*R,N.x1=N.x0+r,U[G]?U[G].push(N):U[G]=[N]}if(l)for(const N of U)N.sort(l);return U}function O(y){const k=sL(y,R=>(i-t-(R.length-1)*a)/Ql(R,Jl));for(const R of y){let U=t;for(const N of R){N.y0=U,N.y1=U+N.value*k,U=N.y1+a;for(const G of N.sourceLinks)G.width=G.value*k}U=(i-U+a)/(R.length+1);for(let N=0;N<R.length;++N){const G=R[N];G.y0+=U*(N+1),G.y1+=U*(N+1)}B(R)}}function E(y){const k=b(y);a=Math.min(s,(i-t)/(Jp(k,R=>R.length)-1)),O(k);for(let R=0;R<f;++R){const U=Math.pow(.99,R),N=Math.max(1-U,(R+1)/f);S(k,U,N),T(k,U,N)}}function T(y,k,R){for(let U=1,N=y.length;U<N;++U){const G=y[U];for(const z of G){let F=0,Q=0;for(const{source:X,value:ot}of z.targetLinks){let tt=ot*(z.layer-X.layer);F+=_(X,z)*tt,Q+=tt}if(!(Q>0))continue;let j=(F/Q-z.y0)*k;z.y0+=j,z.y1+=j,C(z)}l===void 0&&G.sort(xa),A(G,R)}}function S(y,k,R){for(let U=y.length,N=U-2;N>=0;--N){const G=y[N];for(const z of G){let F=0,Q=0;for(const{target:X,value:ot}of z.sourceLinks){let tt=ot*(X.layer-z.layer);F+=$(z,X)*tt,Q+=tt}if(!(Q>0))continue;let j=(F/Q-z.y0)*k;z.y0+=j,z.y1+=j,C(z)}l===void 0&&G.sort(xa),A(G,R)}}function A(y,k){const R=y.length>>1,U=y[R];L(y,U.y0-a,R-1,k),D(y,U.y1+a,R+1,k),L(y,i,y.length-1,k),D(y,t,0,k)}function D(y,k,R,U){for(;R<y.length;++R){const N=y[R],G=(k-N.y0)*U;G>1e-6&&(N.y0+=G,N.y1+=G),k=N.y1+a}}function L(y,k,R,U){for(;R>=0;--R){const N=y[R],G=(N.y1-k)*U;G>1e-6&&(N.y0-=G,N.y1-=G),k=N.y0-a}}function C({sourceLinks:y,targetLinks:k}){if(u===void 0){for(const{source:{sourceLinks:R}}of k)R.sort(nm);for(const{target:{targetLinks:R}}of y)R.sort(em)}}function B(y){if(u===void 0)for(const{sourceLinks:k,targetLinks:R}of y)k.sort(nm),R.sort(em)}function _(y,k){let R=y.y0-(y.sourceLinks.length-1)*a/2;for(const{target:U,width:N}of y.sourceLinks){if(U===k)break;R+=N+a}for(const{source:U,width:N}of k.targetLinks){if(U===y)break;R-=N}return R}function $(y,k){let R=k.y0-(k.targetLinks.length-1)*a/2;for(const{source:U,width:N}of k.targetLinks){if(U===y)break;R+=N+a}for(const{target:U,width:N}of y.sourceLinks){if(U===k)break;R-=N}return R}return p}var tc=Math.PI,ec=2*tc,zn=1e-6,dL=ec-zn;function nc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function sm(){return new nc}nc.prototype=sm.prototype={constructor:nc,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,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,s){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var s=this._x1,a=this._y1,o=n-e,c=i-t,l=s-e,u=a-t,d=l*l+u*u;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>zn)if(!(Math.abs(u*o-c*l)>zn)||!r)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-s,f=i-a,p=o*o+c*c,g=h*h+f*f,m=Math.sqrt(p),v=Math.sqrt(d),x=r*Math.tan((tc-Math.acos((p+d-g)/(2*m*v)))/2),b=x/v,O=x/m;Math.abs(b-1)>zn&&(this._+="L"+(e+b*l)+","+(t+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>l*f)+","+(this._x1=e+O*o)+","+(this._y1=t+O*c)}},arc:function(e,t,n,i,r,s){e=+e,t=+t,n=+n,s=!!s;var a=n*Math.cos(i),o=n*Math.sin(i),c=e+a,l=t+o,u=1^s,d=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+l:(Math.abs(this._x1-c)>zn||Math.abs(this._y1-l)>zn)&&(this._+="L"+c+","+l),n&&(d<0&&(d=d%ec+ec),d>dL?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):d>zn&&(this._+="A"+n+","+n+",0,"+ +(d>=tc)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};function am(e){return function(){return e}}function fL(e){return e[0]}function pL(e){return e[1]}var mL=Array.prototype.slice;function gL(e){return e.source}function vL(e){return e.target}function yL(e){var t=gL,n=vL,i=fL,r=pL,s=null;function a(){var o,c=mL.call(arguments),l=t.apply(this,c),u=n.apply(this,c);if(s||(s=o=sm()),e(s,+i.apply(this,(c[0]=l,c)),+r.apply(this,c),+i.apply(this,(c[0]=u,c)),+r.apply(this,c)),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?(i=typeof o=="function"?o:am(+o),a):i},a.y=function(o){return arguments.length?(r=typeof o=="function"?o:am(+o),a):r},a.context=function(o){return arguments.length?(s=o??null,a):s},a}function _L(e,t,n,i,r){e.moveTo(t,n),e.bezierCurveTo(t=(t+i)/2,n,t,r,i,r)}function xL(){return yL(_L)}function bL(e){return[e.source.x1,e.y0]}function wL(e){return[e.target.x0,e.y1]}function EL(){return xL().source(bL).target(wL)}function SL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function OL(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){if(this instanceof i){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(t,r);return new s}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}var TL={value:function(){}};function om(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ba(n)}function ba(e){this._=e}function CL(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ba.prototype=om.prototype={constructor:ba,on:function(e,t){var n=this._,i=CL(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((r=(e=i[s]).type)&&(r=ML(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(r=(e=i[s]).type)n[r]=lm(n[r],e.name,t);else if(t==null)for(r in n)n[r]=lm(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ba(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,r=s.length;i<r;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,s=i.length;r<s;++r)i[r].value.apply(t,n)}};function ML(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function lm(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=TL,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var $L=OL(Object.freeze(Object.defineProperty({__proto__:null,dispatch:om},Symbol.toStringTag,{value:"Module"}))).dispatch,ic=Math.PI/180,Rr=64,wa=2048,AL=function(){var e=[256,256],t=LL,n=DL,i=kL,r=cm,s=cm,a=RL,o=IL,c=um,l=[],u=1/0,d=$L("word","end"),h=null,f=Math.random,p={},g=FL;p.canvas=function(x){return arguments.length?(g=gn(x),p):g},p.start=function(){var x=m(g()),b=HL((e[0]>>5)*e[1]),O=null,E=l.length,T=-1,S=[],A=l.map(function(L,C){return L.text=t.call(this,L,C),L.font=n.call(this,L,C),L.style=r.call(this,L,C),L.weight=s.call(this,L,C),L.rotate=a.call(this,L,C),L.size=~~i.call(this,L,C),L.padding=o.call(this,L,C),L}).sort(function(L,C){return C.size-L.size});return h&&clearInterval(h),h=setInterval(D,0),D(),p;function D(){for(var L=Date.now();Date.now()-L<u&&++T<E&&h;){var C=A[T];C.x=e[0]*(f()+.5)>>1,C.y=e[1]*(f()+.5)>>1,PL(x,C,A,T),C.hasText&&v(b,C,O)&&(S.push(C),d.call("word",p,C),O?UL(O,C):O=[{x:C.x+C.x0,y:C.y+C.y0},{x:C.x+C.x1,y:C.y+C.y1}],C.x-=e[0]>>1,C.y-=e[1]>>1)}T>=E&&(p.stop(),d.call("end",p,S,O))}},p.stop=function(){return h&&(clearInterval(h),h=null),p};function m(x){x.width=x.height=1;var b=Math.sqrt(x.getContext("2d").getImageData(0,0,1,1).data.length>>2);x.width=(Rr<<5)/b,x.height=wa/b;var O=x.getContext("2d");return O.fillStyle=O.strokeStyle="red",O.textAlign="center",{context:O,ratio:b}}function v(x,b,O){e[0],e[1];for(var E=b.x,T=b.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),A=c(e),D=f()<.5?1:-1,L=-D,C,B,_;(C=A(L+=D))&&(B=~~C[0],_=~~C[1],!(Math.min(Math.abs(B),Math.abs(_))>=S));)if(b.x=E+B,b.y=T+_,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>e[0]||b.y+b.y1>e[1])&&(!O||!NL(b,x,e[0]))&&(!O||BL(b,O))){for(var $=b.sprite,y=b.width>>5,k=e[0]>>5,R=b.x-(y<<4),U=R&127,N=32-U,G=b.y1-b.y0,z=(b.y+b.y0)*k+(R>>5),F,Q=0;Q<G;Q++){F=0;for(var j=0;j<=y;j++)x[z+j]|=F<<N|(j<y?(F=$[Q*y+j])>>>U:0);z+=k}return delete b.sprite,!0}return!1}return p.timeInterval=function(x){return arguments.length?(u=x??1/0,p):u},p.words=function(x){return arguments.length?(l=x,p):l},p.size=function(x){return arguments.length?(e=[+x[0],+x[1]],p):e},p.font=function(x){return arguments.length?(n=gn(x),p):n},p.fontStyle=function(x){return arguments.length?(r=gn(x),p):r},p.fontWeight=function(x){return arguments.length?(s=gn(x),p):s},p.rotate=function(x){return arguments.length?(a=gn(x),p):a},p.text=function(x){return arguments.length?(t=gn(x),p):t},p.spiral=function(x){return arguments.length?(c=GL[x]||x,p):c},p.fontSize=function(x){return arguments.length?(i=gn(x),p):i},p.padding=function(x){return arguments.length?(o=gn(x),p):o},p.random=function(x){return arguments.length?(f=x,p):f},p.on=function(){var x=d.on.apply(d,arguments);return x===d?p:x},p};function LL(e){return e.text}function DL(){return"serif"}function cm(){return"normal"}function kL(e){return Math.sqrt(e.value)}function RL(){return(~~(Math.random()*6)-3)*30}function IL(){return 1}function PL(e,t,n,i){if(!t.sprite){var r=e.context,s=e.ratio;r.clearRect(0,0,(Rr<<5)/s,wa/s);var a=0,o=0,c=0,l=n.length;for(--i;++i<l;){t=n[i],r.save(),r.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;var u=r.measureText(t.text+"m").width*s,d=t.size<<1;if(t.rotate){var h=Math.sin(t.rotate*ic),f=Math.cos(t.rotate*ic),p=u*f,g=u*h,m=d*f,v=d*h;u=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,d=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else u=u+31>>5<<5;if(d>c&&(c=d),a+u>=Rr<<5&&(a=0,o+=c,c=0),o+d>=wa)break;r.translate((a+(u>>1))/s,(o+(d>>1))/s),t.rotate&&r.rotate(t.rotate*ic),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=u,t.height=d,t.xoff=a,t.yoff=o,t.x1=u>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=u}for(var x=r.getImageData(0,0,(Rr<<5)/s,wa/s).data,b=[];--i>=0;)if(t=n[i],!!t.hasText){for(var u=t.width,O=u>>5,d=t.y1-t.y0,E=0;E<d*O;E++)b[E]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var T=0,S=-1,A=0;A<d;A++){for(var E=0;E<u;E++){var D=O*A+(E>>5),L=x[(o+A)*(Rr<<5)+(a+E)<<2]?1<<31-E%32:0;b[D]|=L,T|=L}T?S=A:(t.y0++,d--,A--,o++)}t.y1=t.y0+S,t.sprite=b.slice(0,(t.y1-t.y0)*O)}}}function NL(e,t,n){n>>=5;for(var i=e.sprite,r=e.width>>5,s=e.x-(r<<4),a=s&127,o=32-a,c=e.y1-e.y0,l=(e.y+e.y0)*n+(s>>5),u,d=0;d<c;d++){u=0;for(var h=0;h<=r;h++)if((u<<o|(h<r?(u=i[d*r+h])>>>a:0))&t[l+h])return!0;l+=n}return!1}function UL(e,t){var n=e[0],i=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>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function BL(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 um(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function VL(e){var t=4,n=t*e[0]/e[1],i=0,r=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:i+=n;break;case 1:r+=t;break;case 2:i-=n;break;default:r-=t;break}return[i,r]}}function HL(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function FL(){return document.createElement("canvas")}function gn(e){return typeof e=="function"?e:function(){return e}}var GL={archimedean:um,rectangular:VL};const zL=SL(AL);function jL(e,t,n,i){var r=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function WL(e){return function(t){return e==null?void 0:e[t]}}var qL={À:"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"},YL=WL(qL);const XL=YL;var ZL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,KL="\\u0300-\\u036f",QL="\\ufe20-\\ufe2f",JL="\\u20d0-\\u20ff",tD=KL+QL+JL,eD="["+tD+"]",nD=RegExp(eD,"g");function iD(e){return e=Or(e),e&&e.replace(ZL,XL).replace(nD,"")}var rD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function sD(e){return e.match(rD)||[]}var aD=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function oD(e){return aD.test(e)}var hm="\\ud800-\\udfff",lD="\\u0300-\\u036f",cD="\\ufe20-\\ufe2f",uD="\\u20d0-\\u20ff",hD=lD+cD+uD,dm="\\u2700-\\u27bf",fm="a-z\\xdf-\\xf6\\xf8-\\xff",dD="\\xac\\xb1\\xd7\\xf7",fD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pD="\\u2000-\\u206f",mD=" \\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",pm="A-Z\\xc0-\\xd6\\xd8-\\xde",gD="\\ufe0e\\ufe0f",mm=dD+fD+pD+mD,gm="['’]",vm="["+mm+"]",vD="["+hD+"]",ym="\\d+",yD="["+dm+"]",_m="["+fm+"]",xm="[^"+hm+mm+ym+dm+fm+pm+"]",_D="\\ud83c[\\udffb-\\udfff]",xD="(?:"+vD+"|"+_D+")",bD="[^"+hm+"]",bm="(?:\\ud83c[\\udde6-\\uddff]){2}",wm="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+pm+"]",wD="\\u200d",Em="(?:"+_m+"|"+xm+")",ED="(?:"+Si+"|"+xm+")",Sm="(?:"+gm+"(?:d|ll|m|re|s|t|ve))?",Om="(?:"+gm+"(?:D|LL|M|RE|S|T|VE))?",Tm=xD+"?",Cm="["+gD+"]?",SD="(?:"+wD+"(?:"+[bD,bm,wm].join("|")+")"+Cm+Tm+")*",OD="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",TD="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",CD=Cm+Tm+SD,MD="(?:"+[yD,bm,wm].join("|")+")"+CD,$D=RegExp([Si+"?"+_m+"+"+Sm+"(?="+[vm,Si,"$"].join("|")+")",ED+"+"+Om+"(?="+[vm,Si+Em,"$"].join("|")+")",Si+"?"+Em+"+"+Sm,Si+"+"+Om,TD,OD,ym,MD].join("|"),"g");function AD(e){return e.match($D)||[]}function LD(e,t,n){return e=Or(e),t=n?void 0:t,t===void 0?oD(e)?AD(e):sD(e):e.match(t)||[]}var DD="['’]",kD=RegExp(DD,"g");function Mm(e){return function(t){return jL(LD(iD(t).replace(kD,"")),e,"")}}function RD(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function $m(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=kr(n),n=n===n?n:0),t!==void 0&&(t=kr(t),t=t===t?t:0),RD(kr(e),t,n)}function ID(e,t){var n=-1,i=Un(e)?Array(e.length):[];return Xl(e,function(r,s,a){i[++n]=t(r,s,a)}),i}function PD(e,t){var n=jt(e)?Tf:ID;return n(e,ma(t))}var ND=1/0;function UD(e,t){return ua(PD(e,t),ND)}function Am(e,t){return pa(e,t)}var BD=Mm(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const Oi=BD;function VD(e,t){var n;return Xl(e,function(i,r,s){return n=t(i,r,s),!n}),!!n}function HD(e,t,n){var i=jt(e)?xp:VD;return n&&Pf(e,t,n)&&(t=void 0),i(e,ma(t))}class ht{constructor(t,n,i){if(this.type="",this.renderType=K.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,i&&(this.configs=i,this.configs.id)){const r=w(this.model.getOptions(),"style","prefix");this.id=`${r}--${this.configs.id}`}this.parent||this.setParent(P(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 i=this.parent;if(this.parent=t,!(i&&i.node()===t.node())&&this.type){const r=w(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${te}--${r}--${this.type}`,!0),i&&i.classed(`${te}--${r}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=w(this.model.getOptions(),"style","prefix"),i=this.id?`#${this.id}`:"",r=I.appendOrSelect(this.parent,`${this.renderType===K.SVG?"svg":"div"}${i}.${te}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const a=P(`#${s}`).select("rect");a.size()!==0&&parseFloat(a.attr("height"))>0&&r.attr("clip-path",`url(#${s})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?nt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const Lm=class extends ht{constructor(){super(...arguments),this.type="toolbar",this.renderType=K.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(M.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(M.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(w(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:i,overflowMenuItemList:r}=this.getControlConfigs();r&&i.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(i,c=>c.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),o=this;a.merge(s).classed("disabled",c=>c.shouldBeDisabled()).attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
1
+ (function(rt,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],mt):(rt=typeof globalThis<"u"?globalThis:rt||self,mt(rt.ChartsVue={},rt.Vue))})(this,function(rt,mt){"use strict";function _n(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Av(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ka(e){let t,n,i;e.length!==2?(t=_n,n=(o,c)=>_n(e(o),c),i=(o,c)=>e(o)-c):(t=e===_n||e===Av?e:Lv,n=e,i=e);function r(o,c,l=0,u=o.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(o[d],c)<0?l=d+1:u=d}while(l<u)}return l}function s(o,c,l=0,u=o.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(o[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function a(o,c,l=0,u=o.length){const d=r(o,c,l,u-1);return d>l&&i(o[d-1],c)>-i(o[d],c)?d-1:d}return{left:r,center:a,right:s}}function Lv(){return 0}function Dv(e){return e===null?NaN:+e}function*kv(e,t){if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(i=+i)>=i&&(yield i)}}const Rv=ka(_n).right;ka(Dv).center;const Ra=Rv;function Iv(e,t){let n=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&++n;else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(r=+r)>=r&&++n}return n}function xe(e,t){let n,i;if(t===void 0)for(const r of e)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));else{let r=-1;for(let s of e)(s=t(s,++r,e))!=null&&(n===void 0?s>=s&&(n=i=s):(n>s&&(n=s),i<s&&(i=s)))}return[n,i]}class xn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let i=0;for(let r=0;r<this._n&&r<32;r++){const s=n[r],a=t+s,o=Math.abs(t)<Math.abs(s)?t-(a-s):s-(a-t);o&&(n[i++]=o),t=a}return n[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let n=this._n,i,r,s,a=0;if(n>0){for(a=t[--n];n>0&&(i=a,r=t[--n],a=i+r,s=r-(a-i),!s););n>0&&(s<0&&t[n-1]<0||s>0&&t[n-1]>0)&&(r=s*2,i=a+r,r==i-a&&(a=i))}return a}}class Dc extends Map{constructor(t,n=Uv){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(kc(this,t))}has(t){return super.has(kc(this,t))}set(t,n){return super.set(Pv(this,t),n)}delete(t){return super.delete(Nv(this,t))}}function kc({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):n}function Pv({_intern:e,_key:t},n){const i=t(n);return e.has(i)?e.get(i):(e.set(i,n),n)}function Nv({_intern:e,_key:t},n){const i=t(n);return e.has(i)&&(n=e.get(i),e.delete(i)),n}function Uv(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Bv(e){return e}function Hv(e=_n){if(e===_n)return Rc;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const i=e(t,n);return i||i===0?i:(e(n,n)===0)-(e(t,t)===0)}}function Rc(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Vv=Array.prototype,Fv=Vv.slice;function Ia(e){return()=>e}const Gv=Math.sqrt(50),zv=Math.sqrt(10),jv=Math.sqrt(2);function Br(e,t,n){const i=(t-e)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),a=s>=Gv?10:s>=zv?5:s>=jv?2:1;let o,c,l;return r<0?(l=Math.pow(10,-r)/a,o=Math.round(e*l),c=Math.round(t*l),o/l<e&&++o,c/l>t&&--c,l=-l):(l=Math.pow(10,r)*a,o=Math.round(e/l),c=Math.round(t/l),o*l<e&&++o,c*l>t&&--c),c<o&&.5<=n&&n<2?Br(e,t,n*2):[o,c,l]}function Hr(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const i=t<e,[r,s,a]=i?Br(t,e,n):Br(e,t,n);if(!(s>=r))return[];const o=s-r+1,c=new Array(o);if(i)if(a<0)for(let l=0;l<o;++l)c[l]=(s-l)/-a;else for(let l=0;l<o;++l)c[l]=(s-l)*a;else if(a<0)for(let l=0;l<o;++l)c[l]=(r+l)/-a;else for(let l=0;l<o;++l)c[l]=(r+l)*a;return c}function qn(e,t,n){return t=+t,e=+e,n=+n,Br(e,t,n)[2]}function Pa(e,t,n){t=+t,e=+e,n=+n;const i=t<e,r=i?qn(t,e,n):qn(e,t,n);return(i?-1:1)*(r<0?1/-r:r)}function qv(e,t,n){let i;for(;;){const r=qn(e,t,n);if(r===i||r===0||!isFinite(r))return[e,t];r>0?(e=Math.floor(e/r)*r,t=Math.ceil(t/r)*r):r<0&&(e=Math.ceil(e*r)/r,t=Math.floor(t*r)/r),i=r}}function Wv(e){return Math.max(1,Math.ceil(Math.log(Iv(e))/Math.LN2)+1)}function Yv(){var e=Bv,t=xe,n=Wv;function i(r){Array.isArray(r)||(r=Array.from(r));var s,a=r.length,o,c,l=new Array(a);for(s=0;s<a;++s)l[s]=e(r[s],s,r);var u=t(l),d=u[0],h=u[1],f=n(l,d,h);if(!Array.isArray(f)){const b=h,O=+f;if(t===xe&&([d,h]=qv(d,h,O)),f=Hr(d,h,O),f[0]<=d&&(c=qn(d,h,O)),f[f.length-1]>=h)if(b>=h&&t===xe){const E=qn(d,h,O);isFinite(E)&&(E>0?h=(Math.floor(h/E)+1)*E:E<0&&(h=(Math.ceil(h*-E)+1)/-E))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),x;for(s=0;s<=p;++s)x=v[s]=[],x.x0=s>0?f[s-1]:d,x.x1=s<p?f[s]:h;if(isFinite(c)){if(c>0)for(s=0;s<a;++s)(o=l[s])!=null&&d<=o&&o<=h&&v[Math.min(p,Math.floor((o-d)/c))].push(r[s]);else if(c<0){for(s=0;s<a;++s)if((o=l[s])!=null&&d<=o&&o<=h){const b=Math.floor((d-o)*c);v[Math.min(p,b+(f[b]<=o))].push(r[s])}}}else for(s=0;s<a;++s)(o=l[s])!=null&&d<=o&&o<=h&&v[Ra(f,o,0,p)].push(r[s]);return v}return i.value=function(r){return arguments.length?(e=typeof r=="function"?r:Ia(r),i):e},i.domain=function(r){return arguments.length?(t=typeof r=="function"?r:Ia([r[0],r[1]]),i):t},i.thresholds=function(r){return arguments.length?(n=typeof r=="function"?r:Ia(Array.isArray(r)?Fv.call(r):r),i):n},i}function bn(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function cn(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Ic(e,t,n=0,i=1/0,r){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),i=Math.floor(Math.min(e.length-1,i)),!(n<=t&&t<=i))return e;for(r=r===void 0?Rc:Hv(r);i>n;){if(i-n>600){const c=i-n+1,l=t-n+1,u=Math.log(c),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(c-d)/c)*(l-c/2<0?-1:1),f=Math.max(n,Math.floor(t-l*d/c+h)),p=Math.min(i,Math.floor(t+(c-l)*d/c+h));Ic(e,t,f,p,r)}const s=e[t];let a=n,o=i;for(Li(e,n,t),r(e[i],s)>0&&Li(e,n,i);a<o;){for(Li(e,a,o),++a,--o;r(e[a],s)<0;)++a;for(;r(e[o],s)>0;)--o}r(e[n],s)===0?Li(e,n,o):(++o,Li(e,o,i)),o<=t&&(n=o+1),t<=o&&(i=o-1)}return e}function Li(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function Na(e,t,n){if(e=Float64Array.from(kv(e,n)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return cn(e);if(t>=1)return bn(e);var i,r=(i-1)*t,s=Math.floor(r),a=bn(Ic(e,s).subarray(0,s+1)),o=cn(e.subarray(s+1));return a+(o-a)*(r-s)}}function*Xv(e){for(const t of e)yield*t}function Pc(e){return Array.from(Xv(e))}function Zv(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((t-e)/n))|0,s=new Array(r);++i<r;)s[i]=e+i*n;return s}function Kv(e){return e}var Vr=1,Fr=2,Ua=3,Di=4,Nc=1e-6;function Qv(e){return"translate("+e+",0)"}function Jv(e){return"translate(0,"+e+")"}function t0(e){return t=>+e(t)}function e0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function n0(){return!this.__axis}function Gr(e,t){var n=[],i=null,r=null,s=6,a=6,o=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=e===Vr||e===Di?-1:1,u=e===Di||e===Fr?"x":"y",d=e===Vr||e===Ua?Qv:Jv;function h(f){var p=i??(t.ticks?t.ticks.apply(t,n):t.domain()),g=r??(t.tickFormat?t.tickFormat.apply(t,n):Kv),m=Math.max(s,0)+o,v=t.range(),x=+v[0]+c,b=+v[v.length-1]+c,O=(t.bandwidth?e0:t0)(t.copy(),c),E=f.selection?f.selection():f,T=E.selectAll(".domain").data([null]),S=E.selectAll(".tick").data(p,t).order(),A=S.exit(),D=S.enter().append("g").attr("class","tick"),L=S.select("line"),C=S.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(D),L=L.merge(D.append("line").attr("stroke","currentColor").attr(u+"2",l*s)),C=C.merge(D.append("text").attr("fill","currentColor").attr(u,l*m).attr("dy",e===Vr?"0em":e===Ua?"0.71em":"0.32em")),f!==E&&(T=T.transition(f),S=S.transition(f),L=L.transition(f),C=C.transition(f),A=A.transition(f).attr("opacity",Nc).attr("transform",function(B){return isFinite(B=O(B))?d(B+c):this.getAttribute("transform")}),D.attr("opacity",Nc).attr("transform",function(B){var _=this.parentNode.__axis;return d((_&&isFinite(_=_(B))?_:O(B))+c)})),A.remove(),T.attr("d",e===Di||e===Fr?a?"M"+l*a+","+x+"H"+c+"V"+b+"H"+l*a:"M"+c+","+x+"V"+b:a?"M"+x+","+l*a+"V"+c+"H"+b+"V"+l*a:"M"+x+","+c+"H"+b),S.attr("opacity",1).attr("transform",function(B){return d(O(B)+c)}),L.attr(u+"2",l*s),C.attr(u,l*m).text(g),E.filter(n0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Fr?"start":e===Di?"end":"middle"),E.each(function(){this.__axis=O})}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?(i=f==null?null:Array.from(f),h):i&&i.slice()},h.tickFormat=function(f){return arguments.length?(r=f,h):r},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?(c=+f,h):c},h}function i0(e){return Gr(Vr,e)}function r0(e){return Gr(Fr,e)}function Ba(e){return Gr(Ua,e)}function Uc(e){return Gr(Di,e)}var s0={value:()=>{}};function Ha(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new zr(n)}function zr(e){this._=e}function a0(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}zr.prototype=Ha.prototype={constructor:zr,on:function(e,t){var n=this._,i=a0(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((r=(e=i[s]).type)&&(r=o0(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(r=(e=i[s]).type)n[r]=Bc(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Bc(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new zr(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,r=s.length;i<r;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,s=i.length;r<s;++r)i[r].value.apply(t,n)}};function o0(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function Bc(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=s0,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Va="http://www.w3.org/1999/xhtml";const Hc={svg:"http://www.w3.org/2000/svg",xhtml:Va,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function jr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hc.hasOwnProperty(t)?{space:Hc[t],local:e}:e}function l0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Va&&t.documentElement.namespaceURI===Va?t.createElement(e):t.createElementNS(n,e)}}function c0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vc(e){var t=jr(e);return(t.local?c0:l0)(t)}function u0(){}function Fa(e){return e==null?u0:function(){return this.querySelector(e)}}function h0(e){typeof e!="function"&&(e=Fa(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=new Array(a),c,l,u=0;u<a;++u)(c=s[u])&&(l=e.call(c,c.__data__,u,s))&&("__data__"in c&&(l.__data__=c.__data__),o[u]=l);return new ce(i,this._parents)}function d0(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function f0(){return[]}function Fc(e){return e==null?f0:function(){return this.querySelectorAll(e)}}function p0(e){return function(){return d0(e.apply(this,arguments))}}function m0(e){typeof e=="function"?e=p0(e):e=Fc(e);for(var t=this._groups,n=t.length,i=[],r=[],s=0;s<n;++s)for(var a=t[s],o=a.length,c,l=0;l<o;++l)(c=a[l])&&(i.push(e.call(c,c.__data__,l,a)),r.push(c));return new ce(i,r)}function Gc(e){return function(){return this.matches(e)}}function zc(e){return function(t){return t.matches(e)}}var g0=Array.prototype.find;function v0(e){return function(){return g0.call(this.children,e)}}function y0(){return this.firstElementChild}function _0(e){return this.select(e==null?y0:v0(typeof e=="function"?e:zc(e)))}var x0=Array.prototype.filter;function b0(){return Array.from(this.children)}function w0(e){return function(){return x0.call(this.children,e)}}function E0(e){return this.selectAll(e==null?b0:w0(typeof e=="function"?e:zc(e)))}function S0(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=[],c,l=0;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s)&&o.push(c);return new ce(i,this._parents)}function jc(e){return new Array(e.length)}function O0(){return new ce(this._enter||this._groups.map(jc),this._parents)}function qr(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}qr.prototype={constructor:qr,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 T0(e){return function(){return e}}function C0(e,t,n,i,r,s){for(var a=0,o,c=t.length,l=s.length;a<l;++a)(o=t[a])?(o.__data__=s[a],i[a]=o):n[a]=new qr(e,s[a]);for(;a<c;++a)(o=t[a])&&(r[a]=o)}function M0(e,t,n,i,r,s,a){var o,c,l=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(c=t[o])&&(h[o]=f=a.call(c,c.__data__,o,t)+"",l.has(f)?r[o]=c:l.set(f,c));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(c=l.get(f))?(i[o]=c,c.__data__=s[o],l.delete(f)):n[o]=new qr(e,s[o]);for(o=0;o<u;++o)(c=t[o])&&l.get(h[o])===c&&(r[o]=c)}function $0(e){return e.__data__}function A0(e,t){if(!arguments.length)return Array.from(this,$0);var n=t?M0:C0,i=this._parents,r=this._groups;typeof e!="function"&&(e=T0(e));for(var s=r.length,a=new Array(s),o=new Array(s),c=new Array(s),l=0;l<s;++l){var u=i[l],d=r[l],h=d.length,f=L0(e.call(u,u&&u.__data__,l,i)),p=f.length,g=o[l]=new Array(p),m=a[l]=new Array(p),v=c[l]=new Array(h);n(u,d,g,m,v,f,t);for(var x=0,b=0,O,E;x<p;++x)if(O=g[x]){for(x>=b&&(b=x+1);!(E=m[b])&&++b<p;);O._next=E||null}}return a=new ce(a,i),a._enter=o,a._exit=c,a}function L0(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function D0(){return new ce(this._exit||this._groups.map(jc),this._parents)}function k0(e,t,n){var i=this.enter(),r=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function R0(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,r=n.length,s=i.length,a=Math.min(r,s),o=new Array(r),c=0;c<a;++c)for(var l=n[c],u=i[c],d=l.length,h=o[c]=new Array(d),f,p=0;p<d;++p)(f=l[p]||u[p])&&(h[p]=f);for(;c<r;++c)o[c]=n[c];return new ce(o,this._parents)}function I0(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],r=i.length-1,s=i[r],a;--r>=0;)(a=i[r])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function P0(e){e||(e=N0);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var a=n[s],o=a.length,c=r[s]=new Array(o),l,u=0;u<o;++u)(l=a[u])&&(c[u]=l);c.sort(t)}return new ce(r,this._parents).order()}function N0(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function U0(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function B0(){return Array.from(this)}function H0(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],r=0,s=i.length;r<s;++r){var a=i[r];if(a)return a}return null}function V0(){let e=0;for(const t of this)++e;return e}function F0(){return!this.node()}function G0(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var r=t[n],s=0,a=r.length,o;s<a;++s)(o=r[s])&&e.call(o,o.__data__,s,r);return this}function z0(e){return function(){this.removeAttribute(e)}}function j0(e){return function(){this.removeAttributeNS(e.space,e.local)}}function q0(e,t){return function(){this.setAttribute(e,t)}}function W0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Y0(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function X0(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 Z0(e,t){var n=jr(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?j0:z0:typeof t=="function"?n.local?X0:Y0:n.local?W0:q0)(n,t))}function qc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function K0(e){return function(){this.style.removeProperty(e)}}function Q0(e,t,n){return function(){this.style.setProperty(e,t,n)}}function J0(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function ty(e,t,n){return arguments.length>1?this.each((t==null?K0:typeof t=="function"?J0:Q0)(e,t,n??"")):Wn(this.node(),e)}function Wn(e,t){return e.style.getPropertyValue(t)||qc(e).getComputedStyle(e,null).getPropertyValue(t)}function ey(e){return function(){delete this[e]}}function ny(e,t){return function(){this[e]=t}}function iy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ry(e,t){return arguments.length>1?this.each((t==null?ey:typeof t=="function"?iy:ny)(e,t)):this.node()[e]}function Wc(e){return e.trim().split(/^|\s+/)}function Ga(e){return e.classList||new Yc(e)}function Yc(e){this._node=e,this._names=Wc(e.getAttribute("class")||"")}Yc.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 Xc(e,t){for(var n=Ga(e),i=-1,r=t.length;++i<r;)n.add(t[i])}function Zc(e,t){for(var n=Ga(e),i=-1,r=t.length;++i<r;)n.remove(t[i])}function sy(e){return function(){Xc(this,e)}}function ay(e){return function(){Zc(this,e)}}function oy(e,t){return function(){(t.apply(this,arguments)?Xc:Zc)(this,e)}}function ly(e,t){var n=Wc(e+"");if(arguments.length<2){for(var i=Ga(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?oy:t?sy:ay)(n,t))}function cy(){this.textContent=""}function uy(e){return function(){this.textContent=e}}function hy(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function dy(e){return arguments.length?this.each(e==null?cy:(typeof e=="function"?hy:uy)(e)):this.node().textContent}function fy(){this.innerHTML=""}function py(e){return function(){this.innerHTML=e}}function my(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function gy(e){return arguments.length?this.each(e==null?fy:(typeof e=="function"?my:py)(e)):this.node().innerHTML}function vy(){this.nextSibling&&this.parentNode.appendChild(this)}function yy(){return this.each(vy)}function _y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xy(){return this.each(_y)}function by(e){var t=typeof e=="function"?e:Vc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wy(){return null}function Ey(e,t){var n=typeof e=="function"?e:Vc(e),i=t==null?wy:typeof t=="function"?t:Fa(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Sy(){var e=this.parentNode;e&&e.removeChild(this)}function Oy(){return this.each(Sy)}function Ty(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Cy(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function My(e){return this.select(e?Cy:Ty)}function $y(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Ay(e){return function(t){e.call(this,t,this.__data__)}}function Ly(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Dy(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,r=t.length,s;n<r;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function ky(e,t,n){return function(){var i=this.__on,r,s=Ay(t);if(i){for(var a=0,o=i.length;a<o;++a)if((r=i[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=t;return}}this.addEventListener(e.type,s,n),r={type:e.type,name:e.name,value:t,listener:s,options:n},i?i.push(r):this.__on=[r]}}function Ry(e,t,n){var i=Ly(e+""),r,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var c=0,l=o.length,u;c<l;++c)for(r=0,u=o[c];r<s;++r)if((a=i[r]).type===u.type&&a.name===u.name)return u.value}return}for(o=t?ky:Dy,r=0;r<s;++r)this.each(o(i[r],t,n));return this}function Kc(e,t,n){var i=qc(e),r=i.CustomEvent;typeof r=="function"?r=new r(t,n):(r=i.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Iy(e,t){return function(){return Kc(this,e,t)}}function Py(e,t){return function(){return Kc(this,e,t.apply(this,arguments))}}function Ny(e,t){return this.each((typeof t=="function"?Py:Iy)(e,t))}function*Uy(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],r=0,s=i.length,a;r<s;++r)(a=i[r])&&(yield a)}var Qc=[null];function ce(e,t){this._groups=e,this._parents=t}function ki(){return new ce([[document.documentElement]],Qc)}function By(){return this}ce.prototype=ki.prototype={constructor:ce,select:h0,selectAll:m0,selectChild:_0,selectChildren:E0,filter:S0,data:A0,enter:O0,exit:D0,join:k0,merge:R0,selection:By,order:I0,sort:P0,call:U0,nodes:B0,node:H0,size:V0,empty:F0,each:G0,attr:Z0,style:ty,property:ry,classed:ly,text:dy,html:gy,raise:yy,lower:xy,append:by,insert:Ey,remove:Oy,clone:My,datum:$y,on:Ry,dispatch:Ny,[Symbol.iterator]:Uy};function P(e){return typeof e=="string"?new ce([[document.querySelector(e)]],[document.documentElement]):new ce([[e]],Qc)}function Hy(e){let t;for(;t=e.sourceEvent;)e=t;return e}function wn(e,t){if(e=Hy(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const za={capture:!0,passive:!1};function ja(e){e.preventDefault(),e.stopImmediatePropagation()}function Vy(e){var t=e.document.documentElement,n=P(e).on("dragstart.drag",ja,za);"onselectstart"in t?n.on("selectstart.drag",ja,za):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fy(e,t){var n=e.document.documentElement,i=P(e).on("dragstart.drag",null);t&&(i.on("click.drag",ja,za),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function qa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Jc(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Ri(){}var Ii=.7,Wr=1/Ii,Yn="\\s*([+-]?\\d+)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Le="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Gy=/^#([0-9a-f]{3,8})$/,zy=new RegExp(`^rgb\\(${Yn},${Yn},${Yn}\\)$`),jy=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),qy=new RegExp(`^rgba\\(${Yn},${Yn},${Yn},${Pi}\\)$`),Wy=new RegExp(`^rgba\\(${Le},${Le},${Le},${Pi}\\)$`),Yy=new RegExp(`^hsl\\(${Pi},${Le},${Le}\\)$`),Xy=new RegExp(`^hsla\\(${Pi},${Le},${Le},${Pi}\\)$`),tu={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};qa(Ri,Ge,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eu,formatHex:eu,formatHex8:Zy,formatHsl:Ky,formatRgb:nu,toString:nu});function eu(){return this.rgb().formatHex()}function Zy(){return this.rgb().formatHex8()}function Ky(){return ou(this).formatHsl()}function nu(){return this.rgb().formatRgb()}function Ge(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Gy.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?iu(t):n===3?new ie(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Yr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Yr(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=zy.exec(e))?new ie(t[1],t[2],t[3],1):(t=jy.exec(e))?new ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qy.exec(e))?Yr(t[1],t[2],t[3],t[4]):(t=Wy.exec(e))?Yr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Yy.exec(e))?au(t[1],t[2]/100,t[3]/100,1):(t=Xy.exec(e))?au(t[1],t[2]/100,t[3]/100,t[4]):tu.hasOwnProperty(e)?iu(tu[e]):e==="transparent"?new ie(NaN,NaN,NaN,0):null}function iu(e){return new ie(e>>16&255,e>>8&255,e&255,1)}function Yr(e,t,n,i){return i<=0&&(e=t=n=NaN),new ie(e,t,n,i)}function Qy(e){return e instanceof Ri||(e=Ge(e)),e?(e=e.rgb(),new ie(e.r,e.g,e.b,e.opacity)):new ie}function Wa(e,t,n,i){return arguments.length===1?Qy(e):new ie(e,t,n,i??1)}function ie(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}qa(ie,Wa,Jc(Ri,{brighter(e){return e=e==null?Wr:Math.pow(Wr,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ie(En(this.r),En(this.g),En(this.b),Xr(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:ru,formatHex:ru,formatHex8:Jy,formatRgb:su,toString:su}));function ru(){return`#${Sn(this.r)}${Sn(this.g)}${Sn(this.b)}`}function Jy(){return`#${Sn(this.r)}${Sn(this.g)}${Sn(this.b)}${Sn((isNaN(this.opacity)?1:this.opacity)*255)}`}function su(){const e=Xr(this.opacity);return`${e===1?"rgb(":"rgba("}${En(this.r)}, ${En(this.g)}, ${En(this.b)}${e===1?")":`, ${e})`}`}function Xr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function En(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Sn(e){return e=En(e),(e<16?"0":"")+e.toString(16)}function au(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new be(e,t,n,i)}function ou(e){if(e instanceof be)return new be(e.h,e.s,e.l,e.opacity);if(e instanceof Ri||(e=Ge(e)),!e)return new be;if(e instanceof be)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),s=Math.max(t,n,i),a=NaN,o=s-r,c=(s+r)/2;return o?(t===s?a=(n-i)/o+(n<i)*6:n===s?a=(i-t)/o+2:a=(t-n)/o+4,o/=c<.5?s+r:2-s-r,a*=60):o=c>0&&c<1?0:a,new be(a,o,c,e.opacity)}function Ya(e,t,n,i){return arguments.length===1?ou(e):new be(e,t,n,i??1)}function be(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}qa(be,Ya,Jc(Ri,{brighter(e){return e=e==null?Wr:Math.pow(Wr,e),new be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new be(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,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new ie(Xa(e>=240?e-240:e+120,r,i),Xa(e,r,i),Xa(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new be(lu(this.h),Zr(this.s),Zr(this.l),Xr(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=Xr(this.opacity);return`${e===1?"hsl(":"hsla("}${lu(this.h)}, ${Zr(this.s)*100}%, ${Zr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lu(e){return e=(e||0)%360,e<0?e+360:e}function Zr(e){return Math.max(0,Math.min(1,e||0))}function Xa(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 Za=e=>()=>e;function t1(e,t){return function(n){return e+n*t}}function e1(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function n1(e){return(e=+e)==1?cu:function(t,n){return n-t?e1(t,n,e):Za(isNaN(t)?n:t)}}function cu(e,t){var n=t-e;return n?t1(e,n):Za(isNaN(e)?t:e)}const Kr=function e(t){var n=n1(t);function i(r,s){var a=n((r=Wa(r)).r,(s=Wa(s)).r),o=n(r.g,s.g),c=n(r.b,s.b),l=cu(r.opacity,s.opacity);return function(u){return r.r=a(u),r.g=o(u),r.b=c(u),r.opacity=l(u),r+""}}return i.gamma=e,i}(1);function i1(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=e[r]*(1-s)+t[r]*s;return i}}function r1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function s1(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,r=new Array(i),s=new Array(n),a;for(a=0;a<i;++a)r[a]=Ni(e[a],t[a]);for(;a<n;++a)s[a]=t[a];return function(o){for(a=0;a<i;++a)s[a]=r[a](o);return s}}function a1(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function ue(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function o1(e,t){var n={},i={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Ni(e[r],t[r]):i[r]=t[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var Ka=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qa=new RegExp(Ka.source,"g");function l1(e){return function(){return e}}function c1(e){return function(t){return e(t)+""}}function uu(e,t){var n=Ka.lastIndex=Qa.lastIndex=0,i,r,s,a=-1,o=[],c=[];for(e=e+"",t=t+"";(i=Ka.exec(e))&&(r=Qa.exec(t));)(s=r.index)>n&&(s=t.slice(n,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(r=r[0])?o[a]?o[a]+=r:o[++a]=r:(o[++a]=null,c.push({i:a,x:ue(i,r)})),n=Qa.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?c[0]?c1(c[0].x):l1(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)o[(d=c[u]).i]=d.x(l);return o.join("")})}function Ni(e,t){var n=typeof t,i;return t==null||n==="boolean"?Za(t):(n==="number"?ue:n==="string"?(i=Ge(t))?(t=i,Kr):uu:t instanceof Ge?Kr:t instanceof Date?a1:r1(t)?i1:Array.isArray(t)?s1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?o1:ue)(e,t)}function hu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var du=180/Math.PI,Ja={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fu(e,t,n,i,r,s){var a,o,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*i)&&(n-=e*c,i-=t*c),(o=Math.sqrt(n*n+i*i))&&(n/=o,i/=o,c/=o),e*i<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:r,translateY:s,rotate:Math.atan2(t,e)*du,skewX:Math.atan(c)*du,scaleX:a,scaleY:o}}var Qr;function u1(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ja:fu(t.a,t.b,t.c,t.d,t.e,t.f)}function h1(e){return e==null||(Qr||(Qr=document.createElementNS("http://www.w3.org/2000/svg","g")),Qr.setAttribute("transform",e),!(e=Qr.transform.baseVal.consolidate()))?Ja:(e=e.matrix,fu(e.a,e.b,e.c,e.d,e.e,e.f))}function pu(e,t,n,i){function r(l){return l.length?l.pop()+" ":""}function s(l,u,d,h,f,p){if(l!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ue(l,d)},{i:g-2,x:ue(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(l,u,d,h){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),h.push({i:d.push(r(d)+"rotate(",null,i)-2,x:ue(l,u)})):u&&d.push(r(d)+"rotate("+u+i)}function o(l,u,d,h){l!==u?h.push({i:d.push(r(d)+"skewX(",null,i)-2,x:ue(l,u)}):u&&d.push(r(d)+"skewX("+u+i)}function c(l,u,d,h,f,p){if(l!==d||u!==h){var g=f.push(r(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ue(l,d)},{i:g-2,x:ue(u,h)})}else(d!==1||h!==1)&&f.push(r(f)+"scale("+d+","+h+")")}return function(l,u){var d=[],h=[];return l=e(l),u=e(u),s(l.translateX,l.translateY,u.translateX,u.translateY,d,h),a(l.rotate,u.rotate,d,h),o(l.skewX,u.skewX,d,h),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,d,h),l=u=null,function(f){for(var p=-1,g=h.length,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var d1=pu(u1,"px, ","px)","deg)"),f1=pu(h1,", ",")",")");function p1(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e(i/(t-1));return n}var Xn=0,Ui=0,Bi=0,mu=1e3,Jr,Hi,ts=0,On=0,es=0,Vi=typeof performance=="object"&&performance.now?performance:Date,gu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function to(){return On||(gu(m1),On=Vi.now()+es)}function m1(){On=0}function ns(){this._call=this._time=this._next=null}ns.prototype=vu.prototype={constructor:ns,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?to():+n)+(t==null?0:+t),!this._next&&Hi!==this&&(Hi?Hi._next=this:Jr=this,Hi=this),this._call=e,this._time=n,eo()},stop:function(){this._call&&(this._call=null,this._time=1/0,eo())}};function vu(e,t,n){var i=new ns;return i.restart(e,t,n),i}function g1(){to(),++Xn;for(var e=Jr,t;e;)(t=On-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Xn}function yu(){On=(ts=Vi.now())+es,Xn=Ui=0;try{g1()}finally{Xn=0,y1(),On=0}}function v1(){var e=Vi.now(),t=e-ts;t>mu&&(es-=t,ts=e)}function y1(){for(var e,t=Jr,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Jr=n);Hi=e,eo(i)}function eo(e){if(!Xn){Ui&&(Ui=clearTimeout(Ui));var t=e-On;t>24?(e<1/0&&(Ui=setTimeout(yu,e-Vi.now()-es)),Bi&&(Bi=clearInterval(Bi))):(Bi||(ts=Vi.now(),Bi=setInterval(v1,mu)),Xn=1,gu(yu))}}function _u(e,t,n){var i=new ns;return t=t==null?0:+t,i.restart(r=>{i.stop(),e(r+t)},t,n),i}var _1=Ha("start","end","cancel","interrupt"),x1=[],xu=0,bu=1,no=2,is=3,wu=4,io=5,rs=6;function ss(e,t,n,i,r,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;b1(e,n,{name:t,index:i,group:r,on:_1,tween:x1,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:xu})}function ro(e,t){var n=we(e,t);if(n.state>xu)throw new Error("too late; already scheduled");return n}function De(e,t){var n=we(e,t);if(n.state>is)throw new Error("too late; already running");return n}function we(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function b1(e,t,n){var i=e.__transition,r;i[t]=n,n.timer=vu(s,0,n.time);function s(l){n.state=bu,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var u,d,h,f;if(n.state!==bu)return c();for(u in i)if(f=i[u],f.name===n.name){if(f.state===is)return _u(a);f.state===wu?(f.state=rs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[u]):+u<t&&(f.state=rs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[u])}if(_u(function(){n.state===is&&(n.state=wu,n.timer.restart(o,n.delay,n.time),o(l))}),n.state=no,n.on.call("start",e,e.__data__,n.index,n.group),n.state===no){for(n.state=is,r=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))&&(r[++d]=f);r.length=d+1}}function o(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=io,1),d=-1,h=r.length;++d<h;)r[d].call(e,u);n.state===io&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=rs,n.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function so(e,t){var n=e.__transition,i,r,s=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){s=!1;continue}r=i.state>no&&i.state<io,i.state=rs,i.timer.stop(),i.on.call(r?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}s&&delete e.__transition}}function w1(e){return this.each(function(){so(this,e)})}function E1(e,t){var n,i;return function(){var r=De(this,e),s=r.tween;if(s!==n){i=n=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}r.tween=i}}function S1(e,t,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=De(this,e),a=s.tween;if(a!==i){r=(i=a).slice();for(var o={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=o;break}c===l&&r.push(o)}s.tween=r}}function O1(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=we(this.node(),n).tween,r=0,s=i.length,a;r<s;++r)if((a=i[r]).name===e)return a.value;return null}return this.each((t==null?E1:S1)(n,e,t))}function ao(e,t,n){var i=e._id;return e.each(function(){var r=De(this,i);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return we(r,i).value[t]}}function Eu(e,t){var n;return(typeof t=="number"?ue:t instanceof Ge?Kr:(n=Ge(t))?(t=n,Kr):uu)(e,t)}function T1(e){return function(){this.removeAttribute(e)}}function C1(e){return function(){this.removeAttributeNS(e.space,e.local)}}function M1(e,t,n){var i,r=n+"",s;return function(){var a=this.getAttribute(e);return a===r?null:a===i?s:s=t(i=a,n)}}function $1(e,t,n){var i,r=n+"",s;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===i?s:s=t(i=a,n)}}function A1(e,t,n){var i,r,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=o+"",a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o)))}}function L1(e,t,n){var i,r,s;return function(){var a,o=n(this),c;return o==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=o+"",a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o)))}}function D1(e,t){var n=jr(e),i=n==="transform"?f1:Eu;return this.attrTween(e,typeof t=="function"?(n.local?L1:A1)(n,i,ao(this,"attr."+e,t)):t==null?(n.local?C1:T1)(n):(n.local?$1:M1)(n,i,t))}function k1(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function R1(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function I1(e,t){var n,i;function r(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&R1(e,s)),n}return r._value=t,r}function P1(e,t){var n,i;function r(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&k1(e,s)),n}return r._value=t,r}function N1(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 i=jr(e);return this.tween(n,(i.local?I1:P1)(i,t))}function U1(e,t){return function(){ro(this,e).delay=+t.apply(this,arguments)}}function B1(e,t){return t=+t,function(){ro(this,e).delay=t}}function H1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?U1:B1)(t,e)):we(this.node(),t).delay}function V1(e,t){return function(){De(this,e).duration=+t.apply(this,arguments)}}function F1(e,t){return t=+t,function(){De(this,e).duration=t}}function G1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?V1:F1)(t,e)):we(this.node(),t).duration}function z1(e,t){if(typeof t!="function")throw new Error;return function(){De(this,e).ease=t}}function j1(e){var t=this._id;return arguments.length?this.each(z1(t,e)):we(this.node(),t).ease}function q1(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;De(this,e).ease=n}}function W1(e){if(typeof e!="function")throw new Error;return this.each(q1(this._id,e))}function Y1(e){typeof e!="function"&&(e=Gc(e));for(var t=this._groups,n=t.length,i=new Array(n),r=0;r<n;++r)for(var s=t[r],a=s.length,o=i[r]=[],c,l=0;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s)&&o.push(c);return new ze(i,this._parents,this._name,this._id)}function X1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,r=n.length,s=Math.min(i,r),a=new Array(i),o=0;o<s;++o)for(var c=t[o],l=n[o],u=c.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=c[f]||l[f])&&(d[f]=h);for(;o<i;++o)a[o]=t[o];return new ze(a,this._parents,this._name,this._id)}function Z1(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 K1(e,t,n){var i,r,s=Z1(t)?ro:De;return function(){var a=s(this,e),o=a.on;o!==i&&(r=(i=o).copy()).on(t,n),a.on=r}}function Q1(e,t){var n=this._id;return arguments.length<2?we(this.node(),n).on.on(e):this.each(K1(n,e,t))}function J1(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function t_(){return this.on("end.remove",J1(this._id))}function e_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fa(e));for(var i=this._groups,r=i.length,s=new Array(r),a=0;a<r;++a)for(var o=i[a],c=o.length,l=s[a]=new Array(c),u,d,h=0;h<c;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),l[h]=d,ss(l[h],t,n,h,l,we(u,n)));return new ze(s,this._parents,t,n)}function n_(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fc(e));for(var i=this._groups,r=i.length,s=[],a=[],o=0;o<r;++o)for(var c=i[o],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var h=e.call(u,u.__data__,d,c),f,p=we(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&ss(f,t,n,g,h,p);s.push(h),a.push(u)}return new ze(s,a,t,n)}var i_=ki.prototype.constructor;function r_(){return new i_(this._groups,this._parents)}function s_(e,t){var n,i,r;return function(){var s=Wn(this,e),a=(this.style.removeProperty(e),Wn(this,e));return s===a?null:s===n&&a===i?r:r=t(n=s,i=a)}}function Su(e){return function(){this.style.removeProperty(e)}}function a_(e,t,n){var i,r=n+"",s;return function(){var a=Wn(this,e);return a===r?null:a===i?s:s=t(i=a,n)}}function o_(e,t,n){var i,r,s;return function(){var a=Wn(this,e),o=n(this),c=o+"";return o==null&&(c=o=(this.style.removeProperty(e),Wn(this,e))),a===c?null:a===i&&c===r?s:(r=c,s=t(i=a,o))}}function l_(e,t){var n,i,r,s="style."+t,a="end."+s,o;return function(){var c=De(this,e),l=c.on,u=c.value[s]==null?o||(o=Su(t)):void 0;(l!==n||r!==u)&&(i=(n=l).copy()).on(a,r=u),c.on=i}}function c_(e,t,n){var i=(e+="")=="transform"?d1:Eu;return t==null?this.styleTween(e,s_(e,i)).on("end.style."+e,Su(e)):typeof t=="function"?this.styleTween(e,o_(e,i,ao(this,"style."+e,t))).each(l_(this._id,e)):this.styleTween(e,a_(e,i,t),n).on("end.style."+e,null)}function u_(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function h_(e,t,n){var i,r;function s(){var a=t.apply(this,arguments);return a!==r&&(i=(r=a)&&u_(e,a,n)),i}return s._value=t,s}function d_(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,h_(e,t,n??""))}function f_(e){return function(){this.textContent=e}}function p_(e){return function(){var t=e(this);this.textContent=t??""}}function m_(e){return this.tween("text",typeof e=="function"?p_(ao(this,"text",e)):f_(e==null?"":e+""))}function g_(e){return function(t){this.textContent=e.call(this,t)}}function v_(e){var t,n;function i(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&g_(r)),t}return i._value=e,i}function y_(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,v_(e))}function __(){for(var e=this._name,t=this._id,n=Ou(),i=this._groups,r=i.length,s=0;s<r;++s)for(var a=i[s],o=a.length,c,l=0;l<o;++l)if(c=a[l]){var u=we(c,t);ss(c,e,n,l,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ze(i,this._parents,e,n)}function x_(){var e,t,n=this,i=n._id,r=n.size();return new Promise(function(s,a){var o={value:a},c={value:function(){--r===0&&s()}};n.each(function(){var l=De(this,i),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(c)),l.on=t}),r===0&&s()})}var b_=0;function ze(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Ou(){return++b_}var je=ki.prototype;ze.prototype={constructor:ze,select:e_,selectAll:n_,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:Y1,merge:X1,selection:r_,transition:__,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:Q1,attr:D1,attrTween:N1,style:c_,styleTween:d_,text:m_,textTween:y_,remove:t_,tween:O1,delay:H1,duration:G1,ease:j1,easeVarying:W1,end:x_,[Symbol.iterator]:je[Symbol.iterator]};const w_=e=>+e;function Tu(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var E_={time:null,delay:0,duration:250,ease:Tu};function S_(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 O_(e){var t,n;e instanceof ze?(t=e._id,e=e._name):(t=Ou(),(n=E_).time=to(),e=e==null?null:e+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var a=i[s],o=a.length,c,l=0;l<o;++l)(c=a[l])&&ss(c,e,t,l,a,n||S_(c,t));return new ze(i,this._parents,e,t)}ki.prototype.interrupt=w1,ki.prototype.transition=O_;const oo=e=>()=>e;function T_(e,{sourceEvent:t,target:n,selection:i,mode:r,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:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:s}})}function C_(e){e.stopImmediatePropagation()}function lo(e){e.preventDefault(),e.stopImmediatePropagation()}var Cu={name:"drag"},co={name:"space"},Zn={name:"handle"},Kn={name:"center"};const{abs:Mu,max:Yt,min:Xt}=Math;function $u(e){return[+e[0],+e[1]]}function Au(e){return[$u(e[0]),$u(e[1])]}var as={name:"x",handles:["w","e"].map(os),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]]}},uo={name:"y",handles:["n","s"].map(os),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]]}},qe={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"},Lu={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Du={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},M_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},$_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function os(e){return{type:e}}function A_(e){return!e.ctrlKey&&!e.button}function L_(){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 D_(){return navigator.maxTouchPoints||"ontouchstart"in this}function ho(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function k_(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function ku(){return R_(as)}function R_(e){var t=L_,n=A_,i=D_,r=!0,s=Ha("start","brush","end"),a=6,o;function c(m){var v=m.property("__brush",g).selectAll(".overlay").data([os("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",qe.overlay).merge(v).each(function(){var b=ho(this).extent;P(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),m.selectAll(".selection").data([os("selection")]).enter().append("rect").attr("class","selection").attr("cursor",qe.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=m.selectAll(".handle").data(e.handles,function(b){return b.type});x.exit().remove(),x.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return qe[b.type]}),m.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).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)")}c.move=function(m,v,x){m.tween?m.on("start.brush",function(b){u(this,arguments).beforestart().start(b)}).on("interrupt.brush end.brush",function(b){u(this,arguments).end(b)}).tween("brush",function(){var b=this,O=b.__brush,E=u(b,arguments),T=O.selection,S=e.input(typeof v=="function"?v.apply(this,arguments):v,O.extent),A=Ni(T,S);function D(L){O.selection=L===1&&S===null?null:A(L),l.call(b),E.brush()}return T!==null&&S!==null?D:D(1)}):m.each(function(){var b=this,O=arguments,E=b.__brush,T=e.input(typeof v=="function"?v.apply(b,O):v,E.extent),S=u(b,O).beforestart();so(b),E.selection=T===null?null:T,l.call(b),S.start(x).brush(x).end(x)})},c.clear=function(m,v){c.move(m,null,v)};function l(){var m=P(this),v=ho(this).selection;v?(m.selectAll(".selection").style("display",null).attr("x",v[0][0]).attr("y",v[0][1]).attr("width",v[1][0]-v[0][0]).attr("height",v[1][1]-v[0][1]),m.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?v[1][1]-v[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,v,x){var b=m.__brush.emitter;return b&&(!x||!b.clean)?b:new d(m,v,x)}function d(m,v,x){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=x}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,x){var b=P(this.that).datum();s.call(m,this.that,new T_(m,{sourceEvent:v,target:c,selection:e.output(this.state.selection),mode:x,dispatch:s}),b)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,x=m.target.__data__.type,b=(r&&m.metaKey?x="overlay":x)==="selection"?Cu:r&&m.altKey?Kn:Zn,O=e===uo?null:M_[x],E=e===as?null:$_[x],T=ho(v),S=T.extent,A=T.selection,D=S[0][0],L,C,B=S[0][1],_,$,y=S[1][0],k,R,U=S[1][1],N,G,z=0,F=0,Q,j=O&&E&&r&&m.shiftKey,X,ot,tt=Array.from(m.touches||[m],et=>{const Lt=et.identifier;return et=wn(et,v),et.point0=et.slice(),et.identifier=Lt,et});so(v);var lt=u(v,arguments,!0).beforestart();if(x==="overlay"){A&&(Q=!0);const et=[tt[0],tt[1]||tt[0]];T.selection=A=[[L=e===uo?D:Xt(et[0][0],et[1][0]),_=e===as?B:Xt(et[0][1],et[1][1])],[k=e===uo?y:Yt(et[0][0],et[1][0]),N=e===as?U:Yt(et[0][1],et[1][1])]],tt.length>1&&xt(m)}else L=A[0][0],_=A[0][1],k=A[1][0],N=A[1][1];C=L,$=_,R=k,G=N;var q=P(v).attr("pointer-events","none"),W=q.selectAll(".overlay").attr("cursor",qe[x]);if(m.touches)lt.moved=V,lt.ended=pt;else{var Y=P(m.view).on("mousemove.brush",V,!0).on("mouseup.brush",pt,!0);r&&Y.on("keydown.brush",zt,!0).on("keyup.brush",Wt,!0),Vy(m.view)}l.call(v),lt.start(m,b.name);function V(et){for(const Lt of et.changedTouches||[et])for(const jn of tt)jn.identifier===Lt.identifier&&(jn.cur=wn(Lt,v));if(j&&!X&&!ot&&tt.length===1){const Lt=tt[0];Mu(Lt.cur[0]-Lt[0])>Mu(Lt.cur[1]-Lt[1])?ot=!0:X=!0}for(const Lt of tt)Lt.cur&&(Lt[0]=Lt.cur[0],Lt[1]=Lt.cur[1]);Q=!0,lo(et),xt(et)}function xt(et){const Lt=tt[0],jn=Lt.point0;var Fe;switch(z=Lt[0]-jn[0],F=Lt[1]-jn[1],b){case co:case Cu:{O&&(z=Yt(D-L,Xt(y-k,z)),C=L+z,R=k+z),E&&(F=Yt(B-_,Xt(U-N,F)),$=_+F,G=N+F);break}case Zn:{tt[1]?(O&&(C=Yt(D,Xt(y,tt[0][0])),R=Yt(D,Xt(y,tt[1][0])),O=1),E&&($=Yt(B,Xt(U,tt[0][1])),G=Yt(B,Xt(U,tt[1][1])),E=1)):(O<0?(z=Yt(D-L,Xt(y-L,z)),C=L+z,R=k):O>0&&(z=Yt(D-k,Xt(y-k,z)),C=L,R=k+z),E<0?(F=Yt(B-_,Xt(U-_,F)),$=_+F,G=N):E>0&&(F=Yt(B-N,Xt(U-N,F)),$=_,G=N+F));break}case Kn:{O&&(C=Yt(D,Xt(y,L-z*O)),R=Yt(D,Xt(y,k+z*O))),E&&($=Yt(B,Xt(U,_-F*E)),G=Yt(B,Xt(U,N+F*E)));break}}R<C&&(O*=-1,Fe=L,L=k,k=Fe,Fe=C,C=R,R=Fe,x in Lu&&W.attr("cursor",qe[x=Lu[x]])),G<$&&(E*=-1,Fe=_,_=N,N=Fe,Fe=$,$=G,G=Fe,x in Du&&W.attr("cursor",qe[x=Du[x]])),T.selection&&(A=T.selection),X&&(C=A[0][0],R=A[1][0]),ot&&($=A[0][1],G=A[1][1]),(A[0][0]!==C||A[0][1]!==$||A[1][0]!==R||A[1][1]!==G)&&(T.selection=[[C,$],[R,G]],l.call(v),lt.brush(et,b.name))}function pt(et){if(C_(et),et.touches){if(et.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else Fy(et.view,Q),Y.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),W.attr("cursor",qe.overlay),T.selection&&(A=T.selection),k_(A)&&(T.selection=null,l.call(v)),lt.end(et,b.name)}function zt(et){switch(et.keyCode){case 16:{j=O&&E;break}case 18:{b===Zn&&(O&&(k=R-z*O,L=C+z*O),E&&(N=G-F*E,_=$+F*E),b=Kn,xt(et));break}case 32:{(b===Zn||b===Kn)&&(O<0?k=R-z:O>0&&(L=C-z),E<0?N=G-F:E>0&&(_=$-F),b=co,W.attr("cursor",qe.selection),xt(et));break}default:return}lo(et)}function Wt(et){switch(et.keyCode){case 16:{j&&(X=ot=j=!1,xt(et));break}case 18:{b===Kn&&(O<0?k=R:O>0&&(L=C),E<0?N=G:E>0&&(_=$),b=Zn,xt(et));break}case 32:{b===co&&(et.altKey?(O&&(k=R-z*O,L=C+z*O),E&&(N=G-F*E,_=$+F*E),b=Kn):(O<0?k=R:O>0&&(L=C),E<0?N=G:E>0&&(_=$),b=Zn),W.attr("cursor",qe[x]),xt(et));break}default:return}lo(et)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=Au(t.apply(this,arguments)),m.dim=e,m}return c.extent=function(m){return arguments.length?(t=typeof m=="function"?m:oo(Au(m)),c):t},c.filter=function(m){return arguments.length?(n=typeof m=="function"?m:oo(!!m),c):n},c.touchable=function(m){return arguments.length?(i=typeof m=="function"?m:oo(!!m),c):i},c.handleSize=function(m){return arguments.length?(a=+m,c):a},c.keyModifiers=function(m){return arguments.length?(r=!!m,c):r},c.on=function(){var m=s.on.apply(s,arguments);return m===s?c:m},c}const fo=Math.PI,po=2*fo,Tn=1e-6,I_=po-Tn;function Ru(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function P_(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ru;const n=10**t;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}let N_=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ru:P_(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,i,r){this._append`Q${+t},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(t,n,i,r,s,a){this._append`C${+t},${+n},${+i},${+r},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,i,r,s){if(t=+t,n=+n,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,c=i-t,l=r-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>Tn)if(!(Math.abs(d*c-l*u)>Tn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=i-a,p=r-o,g=c*c+l*l,m=f*f+p*p,v=Math.sqrt(g),x=Math.sqrt(h),b=s*Math.tan((fo-Math.acos((g+h-m)/(2*v*x)))/2),O=b/x,E=b/v;Math.abs(O-1)>Tn&&this._append`L${t+O*u},${n+O*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+E*c},${this._y1=n+E*l}`}}arc(t,n,i,r,s,a){if(t=+t,n=+n,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(r),c=i*Math.sin(r),l=t+o,u=n+c,d=1^a,h=a?r-s:s-r;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Tn||Math.abs(this._y1-u)>Tn)&&this._append`L${l},${u}`,i&&(h<0&&(h=h%po+po),h>I_?this._append`A${i},${i},0,1,${d},${t-o},${n-c}A${i},${i},0,1,${d},${this._x1=l},${this._y1=u}`:h>Tn&&this._append`A${i},${i},0,${+(h>=fo)},${d},${this._x1=t+i*Math.cos(s)},${this._y1=n+i*Math.sin(s)}`)}rect(t,n,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}};function U_(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ls(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Qn(e){return e=ls(Math.abs(e)),e?e[1]:NaN}function B_(e,t){return function(n,i){for(var r=n.length,s=[],a=0,o=e[0],c=0;r>0&&o>0&&(c+o+1>i&&(o=Math.max(1,i-c)),s.push(n.substring(r-=o,r+o)),!((c+=o+1)>i));)o=e[a=(a+1)%e.length];return s.reverse().join(t)}}function H_(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var V_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fi(e){if(!(t=V_.exec(e)))throw new Error("invalid format: "+e);var t;return new mo({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]})}Fi.prototype=mo.prototype;function mo(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+""}mo.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 F_(e){t:for(var t=e.length,n=1,i=-1,r;n<t;++n)switch(e[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+e[n])break t;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(r+1):e}var Iu;function G_(e,t){var n=ls(e,t);if(!n)return e+"";var i=n[0],r=n[1],s=r-(Iu=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+ls(e,Math.max(0,t+s-1))[0]}function Pu(e,t){var n=ls(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Nu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:U_,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)=>Pu(e*100,t),r:Pu,s:G_,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Uu(e){return e}var Bu=Array.prototype.map,Hu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function z_(e){var t=e.grouping===void 0||e.thousands===void 0?Uu:B_(Bu.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",s=e.numerals===void 0?Uu:H_(Bu.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Fi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,x=d.comma,b=d.precision,O=d.trim,E=d.type;E==="n"?(x=!0,E="g"):Nu[E]||(b===void 0&&(b=12),O=!0,E="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var T=g==="$"?n:g==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",S=g==="$"?i:/[%p]/.test(E)?a:"",A=Nu[E],D=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function L(C){var B=T,_=S,$,y,k;if(E==="c")_=A(C)+_,C="";else{C=+C;var R=C<0||1/C<0;if(C=isNaN(C)?c:A(Math.abs(C),b),O&&(C=F_(C)),R&&+C==0&&p!=="+"&&(R=!1),B=(R?p==="("?p:o:p==="-"||p==="("?"":p)+B,_=(E==="s"?Hu[8+Iu/3]:"")+_+(R&&p==="("?")":""),D){for($=-1,y=C.length;++$<y;)if(k=C.charCodeAt($),48>k||k>57){_=(k===46?r+C.slice($+1):C.slice($))+_,C=C.slice(0,$);break}}}x&&!m&&(C=t(C,1/0));var U=B.length+C.length+_.length,N=U<v?new Array(v-U+1).join(h):"";switch(x&&m&&(C=t(N+C,N.length?v-_.length:1/0),N=""),f){case"<":C=B+C+_+N;break;case"=":C=B+N+C+_;break;case"^":C=N.slice(0,U=N.length>>1)+B+C+_+N.slice(U);break;default:C=N+B+C+_;break}return s(C)}return L.toString=function(){return d+""},L}function u(d,h){var f=l((d=Fi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(Qn(h)/3)))*3,g=Math.pow(10,-p),m=Hu[8+p/3];return function(v){return f(g*v)+m}}return{format:l,formatPrefix:u}}var cs,go,Vu;j_({thousands:",",grouping:[3],currency:["$",""]});function j_(e){return cs=z_(e),go=cs.format,Vu=cs.formatPrefix,cs}function q_(e){return Math.max(0,-Qn(Math.abs(e)))}function W_(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qn(t)/3)))*3-Qn(Math.abs(e)))}function Y_(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qn(t)-Qn(e))+1}var vt=1e-6,Fu=1e-12,ut=Math.PI,re=ut/2,Gu=ut/4,he=ut*2,Jt=180/ut,Rt=ut/180,yt=Math.abs,zu=Math.atan,Cn=Math.atan2,bt=Math.cos,X_=Math.exp,Z_=Math.log,gt=Math.sin,un=Math.sign||function(e){return e>0?1:e<0?-1:0},Ee=Math.sqrt,K_=Math.tan;function Q_(e){return e>1?0:e<-1?ut:Math.acos(e)}function We(e){return e>1?re:e<-1?-re:Math.asin(e)}function pe(){}function us(e,t){e&&qu.hasOwnProperty(e.type)&&qu[e.type](e,t)}var ju={Feature:function(e,t){us(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,i=-1,r=n.length;++i<r;)us(n[i].geometry,t)}},qu={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,i=-1,r=n.length;++i<r;)e=n[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){vo(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)vo(n[i],t,0)},Polygon:function(e,t){Wu(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,i=-1,r=n.length;++i<r;)Wu(n[i],t)},GeometryCollection:function(e,t){for(var n=e.geometries,i=-1,r=n.length;++i<r;)us(n[i],t)}};function vo(e,t,n){var i=-1,r=e.length-n,s;for(t.lineStart();++i<r;)s=e[i],t.point(s[0],s[1],s[2]);t.lineEnd()}function Wu(e,t){var n=-1,i=e.length;for(t.polygonStart();++n<i;)vo(e[n],t,1);t.polygonEnd()}function Jn(e,t){e&&ju.hasOwnProperty(e.type)?ju[e.type](e,t):us(e,t)}function yo(e){return[Cn(e[1],e[0]),We(e[2])]}function ti(e){var t=e[0],n=e[1],i=bt(n);return[i*bt(t),i*gt(t),gt(n)]}function hs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ds(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 _o(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function fs(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function xo(e){var t=Ee(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function bo(e,t){function n(i,r){return i=e(i,r),t(i[0],i[1])}return e.invert&&t.invert&&(n.invert=function(i,r){return i=t.invert(i,r),i&&e.invert(i[0],i[1])}),n}function wo(e,t){return yt(e)>ut&&(e-=Math.round(e/he)*he),[e,t]}wo.invert=wo;function Yu(e,t,n){return(e%=he)?t||n?bo(Zu(e),Ku(t,n)):Zu(e):t||n?Ku(t,n):wo}function Xu(e){return function(t,n){return t+=e,yt(t)>ut&&(t-=Math.round(t/he)*he),[t,n]}}function Zu(e){var t=Xu(e);return t.invert=Xu(-e),t}function Ku(e,t){var n=bt(e),i=gt(e),r=bt(t),s=gt(t);function a(o,c){var l=bt(c),u=bt(o)*l,d=gt(o)*l,h=gt(c),f=h*n+u*i;return[Cn(d*r-f*s,u*n-h*i),We(f*r+d*s)]}return a.invert=function(o,c){var l=bt(c),u=bt(o)*l,d=gt(o)*l,h=gt(c),f=h*r-d*s;return[Cn(d*r+h*s,u*n+f*i),We(f*n-u*i)]},a}function J_(e){e=Yu(e[0]*Rt,e[1]*Rt,e.length>2?e[2]*Rt:0);function t(n){return n=e(n[0]*Rt,n[1]*Rt),n[0]*=Jt,n[1]*=Jt,n}return t.invert=function(n){return n=e.invert(n[0]*Rt,n[1]*Rt),n[0]*=Jt,n[1]*=Jt,n},t}function tx(e,t,n,i,r,s){if(n){var a=bt(t),o=gt(t),c=i*n;r==null?(r=t+i*he,s=t-c/2):(r=Qu(a,r),s=Qu(a,s),(i>0?r<s:r>s)&&(r+=i*he));for(var l,u=r;i>0?u>s:u<s;u-=c)l=yo([a,-o*bt(u),-o*gt(u)]),e.point(l[0],l[1])}}function Qu(e,t){t=ti(t),t[0]-=e,xo(t);var n=Q_(-t[1]);return((-t[2]<0?-n:n)+he-vt)%he}function Ju(){var e=[],t;return{point:function(n,i,r){t.push([n,i,r])},lineStart:function(){e.push(t=[])},lineEnd:pe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ps(e,t){return yt(e[0]-t[0])<vt&&yt(e[1]-t[1])<vt}function ms(e,t,n,i){this.x=e,this.z=t,this.o=n,this.e=i,this.v=!1,this.n=this.p=null}function th(e,t,n,i,r){var s=[],a=[],o,c;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],x;if(ps(m,v)){if(!m[2]&&!v[2]){for(r.lineStart(),o=0;o<g;++o)r.point((m=p[o])[0],m[1]);r.lineEnd();return}v[0]+=2*vt}s.push(x=new ms(m,p,null,!0)),a.push(x.o=new ms(m,null,x,!1)),s.push(x=new ms(v,p,null,!1)),a.push(x.o=new ms(v,null,x,!0))}}),!!s.length){for(a.sort(t),eh(s),eh(a),o=0,c=a.length;o<c;++o)a[o].e=n=!n;for(var l=s[0],u,d;;){for(var h=l,f=!0;h.v;)if((h=h.n)===l)return;u=h.z,r.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,c=u.length;o<c;++o)r.point((d=u[o])[0],d[1]);else i(h.x,h.n.x,1,r);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)r.point((d=u[o])[0],d[1]);else i(h.x,h.p.x,-1,r);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);r.lineEnd()}}}function eh(e){if(t=e.length){for(var t,n=0,i=e[0],r;++n<t;)i.n=r=e[n],r.p=i,i=r;i.n=r=e[0],r.p=i}}function Eo(e){return yt(e[0])<=ut?e[0]:un(e[0])*((yt(e[0])+ut)%he-ut)}function ex(e,t){var n=Eo(t),i=t[1],r=gt(i),s=[gt(n),-bt(n),0],a=0,o=0,c=new xn;r===1?i=re+vt:r===-1&&(i=-re-vt);for(var l=0,u=e.length;l<u;++l)if(h=(d=e[l]).length)for(var d,h,f=d[h-1],p=Eo(f),g=f[1]/2+Gu,m=gt(g),v=bt(g),x=0;x<h;++x,p=O,m=T,v=S,f=b){var b=d[x],O=Eo(b),E=b[1]/2+Gu,T=gt(E),S=bt(E),A=O-p,D=A>=0?1:-1,L=D*A,C=L>ut,B=m*T;if(c.add(Cn(B*D*gt(L),v*S+B*bt(L))),a+=C?A+D*he:A,C^p>=n^O>=n){var _=ds(ti(f),ti(b));xo(_);var $=ds(s,_);xo($);var y=(C^A>=0?-1:1)*We($[2]);(i>y||i===y&&(_[0]||_[1]))&&(o+=C^A>=0?1:-1)}}return(a<-vt||a<vt&&c<-Fu)^o&1}function nh(e,t,n,i){return function(r){var s=t(r),a=Ju(),o=t(a),c=!1,l,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=x,h.lineEnd=b,u=[],l=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=Pc(u);var O=ex(l,i);u.length?(c||(r.polygonStart(),c=!0),th(u,ix,O,n,r)):O&&(c||(r.polygonStart(),c=!0),r.lineStart(),n(null,null,1,r),r.lineEnd()),c&&(r.polygonEnd(),c=!1),u=l=null},sphere:function(){r.polygonStart(),r.lineStart(),n(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function f(O,E){e(O,E)&&r.point(O,E)}function p(O,E){s.point(O,E)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(O,E){d.push([O,E]),o.point(O,E)}function x(){o.lineStart(),d=[]}function b(){v(d[0][0],d[0][1]),o.lineEnd();var O=o.clean(),E=a.result(),T,S=E.length,A,D,L;if(d.pop(),l.push(d),d=null,!!S){if(O&1){if(D=E[0],(A=D.length-1)>0){for(c||(r.polygonStart(),c=!0),r.lineStart(),T=0;T<A;++T)r.point((L=D[T])[0],L[1]);r.lineEnd()}return}S>1&&O&2&&E.push(E.pop().concat(E.shift())),u.push(E.filter(nx))}}return h}}function nx(e){return e.length>1}function ix(e,t){return((e=e.x)[0]<0?e[1]-re-vt:re-e[1])-((t=t.x)[0]<0?t[1]-re-vt:re-t[1])}const ih=nh(function(){return!0},rx,ax,[-ut,-re]);function rx(e){var t=NaN,n=NaN,i=NaN,r;return{lineStart:function(){e.lineStart(),r=1},point:function(s,a){var o=s>0?ut:-ut,c=yt(s-t);yt(c-ut)<vt?(e.point(t,n=(n+a)/2>0?re:-re),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),r=0):i!==o&&c>=ut&&(yt(t-i)<vt&&(t-=i*vt),yt(s-o)<vt&&(s-=o*vt),n=sx(t,n,s,a),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(o,n),r=0),e.point(t=s,n=a),i=o},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-r}}}function sx(e,t,n,i){var r,s,a=gt(e-n);return yt(a)>vt?zu((gt(t)*(s=bt(i))*gt(n)-gt(i)*(r=bt(t))*gt(e))/(r*s*a)):(t+i)/2}function ax(e,t,n,i){var r;if(e==null)r=n*re,i.point(-ut,r),i.point(0,r),i.point(ut,r),i.point(ut,0),i.point(ut,-r),i.point(0,-r),i.point(-ut,-r),i.point(-ut,0),i.point(-ut,r);else if(yt(e[0]-t[0])>vt){var s=e[0]<t[0]?ut:-ut;r=n*s/2,i.point(-s,r),i.point(0,r),i.point(s,r)}else i.point(t[0],t[1])}function ox(e){var t=bt(e),n=6*Rt,i=t>0,r=yt(t)>vt;function s(u,d,h,f){tx(f,e,n,h,u,d)}function a(u,d){return bt(u)*bt(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var x=[m,v],b,O=a(m,v),E=i?O?0:l(m,v):O?l(m+(m<0?ut:-ut),v):0;if(!d&&(p=f=O)&&u.lineStart(),O!==f&&(b=c(d,x),(!b||ps(d,b)||ps(x,b))&&(x[2]=1)),O!==f)g=0,O?(u.lineStart(),b=c(x,d),u.point(b[0],b[1])):(b=c(d,x),u.point(b[0],b[1],2),u.lineEnd()),d=b;else if(r&&d&&i^O){var T;!(E&h)&&(T=c(x,d,!0))&&(g=0,i?(u.lineStart(),u.point(T[0][0],T[0][1]),u.point(T[1][0],T[1][1]),u.lineEnd()):(u.point(T[1][0],T[1][1]),u.lineEnd(),u.lineStart(),u.point(T[0][0],T[0][1],3)))}O&&(!d||!ps(d,x))&&u.point(x[0],x[1]),d=x,f=O,h=E},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function c(u,d,h){var f=ti(u),p=ti(d),g=[1,0,0],m=ds(f,p),v=hs(m,m),x=m[0],b=v-x*x;if(!b)return!h&&u;var O=t*v/b,E=-t*x/b,T=ds(g,m),S=fs(g,O),A=fs(m,E);_o(S,A);var D=T,L=hs(S,D),C=hs(D,D),B=L*L-C*(hs(S,S)-1);if(!(B<0)){var _=Ee(B),$=fs(D,(-L-_)/C);if(_o($,S),$=yo($),!h)return $;var y=u[0],k=d[0],R=u[1],U=d[1],N;k<y&&(N=y,y=k,k=N);var G=k-y,z=yt(G-ut)<vt,F=z||G<vt;if(!z&&U<R&&(N=R,R=U,U=N),F?z?R+U>0^$[1]<(yt($[0]-y)<vt?R:U):R<=$[1]&&$[1]<=U:G>ut^(y<=$[0]&&$[0]<=k)){var Q=fs(D,(-L+_)/C);return _o(Q,S),[$,yo(Q)]}}}function l(u,d){var h=i?e:ut-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return nh(a,o,s,i?[0,-e]:[-ut,e-ut])}function lx(e,t,n,i,r,s){var a=e[0],o=e[1],c=t[0],l=t[1],u=0,d=1,h=c-a,f=l-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=r-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=i-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 Gi=1e9,gs=-Gi;function cx(e,t,n,i){function r(l,u){return e<=l&&l<=n&&t<=u&&u<=i}function s(l,u,d,h){var f=0,p=0;if(l==null||(f=a(l,d))!==(p=a(u,d))||c(l,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?i:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(l,u){return yt(l[0]-e)<vt?u>0?0:3:yt(l[0]-n)<vt?u>0?2:1:yt(l[1]-t)<vt?u>0?1:0:u>0?3:2}function o(l,u){return c(l.x,u.x)}function c(l,u){var d=a(l,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-l[1]:d===1?l[0]-u[0]:d===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,d=Ju(),h,f,p,g,m,v,x,b,O,E,T,S={point:A,lineStart:B,lineEnd:_,polygonStart:L,polygonEnd:C};function A(y,k){r(y,k)&&u.point(y,k)}function D(){for(var y=0,k=0,R=f.length;k<R;++k)for(var U=f[k],N=1,G=U.length,z=U[0],F,Q,j=z[0],X=z[1];N<G;++N)F=j,Q=X,z=U[N],j=z[0],X=z[1],Q<=i?X>i&&(j-F)*(i-Q)>(X-Q)*(e-F)&&++y:X<=i&&(j-F)*(i-Q)<(X-Q)*(e-F)&&--y;return y}function L(){u=d,h=[],f=[],T=!0}function C(){var y=D(),k=T&&y,R=(h=Pc(h)).length;(k||R)&&(l.polygonStart(),k&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),R&&th(h,o,y,s,l),l.polygonEnd()),u=l,h=f=p=null}function B(){S.point=$,f&&f.push(p=[]),E=!0,O=!1,x=b=NaN}function _(){h&&($(g,m),v&&O&&d.rejoin(),h.push(d.result())),S.point=A,O&&u.lineEnd()}function $(y,k){var R=r(y,k);if(f&&p.push([y,k]),E)g=y,m=k,v=R,E=!1,R&&(u.lineStart(),u.point(y,k));else if(R&&O)u.point(y,k);else{var U=[x=Math.max(gs,Math.min(Gi,x)),b=Math.max(gs,Math.min(Gi,b))],N=[y=Math.max(gs,Math.min(Gi,y)),k=Math.max(gs,Math.min(Gi,k))];lx(U,N,e,t,n,i)?(O||(u.lineStart(),u.point(U[0],U[1])),u.point(N[0],N[1]),R||u.lineEnd(),T=!1):R&&(u.lineStart(),u.point(y,k),T=!1)}x=y,b=k,O=R}return S}}const So=e=>e;var Oo=new xn,To=new xn,rh,sh,Co,Mo,hn={point:pe,lineStart:pe,lineEnd:pe,polygonStart:function(){hn.lineStart=ux,hn.lineEnd=dx},polygonEnd:function(){hn.lineStart=hn.lineEnd=hn.point=pe,Oo.add(yt(To)),To=new xn},result:function(){var e=Oo/2;return Oo=new xn,e}};function ux(){hn.point=hx}function hx(e,t){hn.point=ah,rh=Co=e,sh=Mo=t}function ah(e,t){To.add(Mo*e-Co*t),Co=e,Mo=t}function dx(){ah(rh,sh)}const oh=hn;var ei=1/0,vs=ei,zi=-ei,ys=zi,fx={point:px,lineStart:pe,lineEnd:pe,polygonStart:pe,polygonEnd:pe,result:function(){var e=[[ei,vs],[zi,ys]];return zi=ys=-(vs=ei=1/0),e}};function px(e,t){e<ei&&(ei=e),e>zi&&(zi=e),t<vs&&(vs=t),t>ys&&(ys=t)}const _s=fx;var $o=0,Ao=0,ji=0,xs=0,bs=0,ni=0,Lo=0,Do=0,qi=0,lh,ch,ke,Re,Se={point:Mn,lineStart:uh,lineEnd:hh,polygonStart:function(){Se.lineStart=vx,Se.lineEnd=yx},polygonEnd:function(){Se.point=Mn,Se.lineStart=uh,Se.lineEnd=hh},result:function(){var e=qi?[Lo/qi,Do/qi]:ni?[xs/ni,bs/ni]:ji?[$o/ji,Ao/ji]:[NaN,NaN];return $o=Ao=ji=xs=bs=ni=Lo=Do=qi=0,e}};function Mn(e,t){$o+=e,Ao+=t,++ji}function uh(){Se.point=mx}function mx(e,t){Se.point=gx,Mn(ke=e,Re=t)}function gx(e,t){var n=e-ke,i=t-Re,r=Ee(n*n+i*i);xs+=r*(ke+e)/2,bs+=r*(Re+t)/2,ni+=r,Mn(ke=e,Re=t)}function hh(){Se.point=Mn}function vx(){Se.point=_x}function yx(){dh(lh,ch)}function _x(e,t){Se.point=dh,Mn(lh=ke=e,ch=Re=t)}function dh(e,t){var n=e-ke,i=t-Re,r=Ee(n*n+i*i);xs+=r*(ke+e)/2,bs+=r*(Re+t)/2,ni+=r,r=Re*e-ke*t,Lo+=r*(ke+e),Do+=r*(Re+t),qi+=r*3,Mn(ke=e,Re=t)}const fh=Se;function ph(e){this._context=e}ph.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,he);break}}},result:pe};var ko=new xn,Ro,mh,gh,Wi,Yi,ws={point:pe,lineStart:function(){ws.point=xx},lineEnd:function(){Ro&&vh(mh,gh),ws.point=pe},polygonStart:function(){Ro=!0},polygonEnd:function(){Ro=null},result:function(){var e=+ko;return ko=new xn,e}};function xx(e,t){ws.point=vh,mh=Wi=e,gh=Yi=t}function vh(e,t){Wi-=e,Yi-=t,ko.add(Ee(Wi*Wi+Yi*Yi)),Wi=e,Yi=t}const yh=ws;let _h,Es,xh,bh;class wh{constructor(t){this._append=t==null?Eh:bx(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!==xh||this._append!==Es){const i=this._radius,r=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,xh=i,Es=this._append,bh=this._,this._=r}this._+=bh;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Eh(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function bx(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Eh;if(t!==_h){const n=10**t;_h=t,Es=function(r){let s=1;this._+=r[0];for(const a=r.length;s<a;++s)this._+=Math.round(arguments[s]*n)/n+r[s]}}return Es}function wx(e,t){let n=3,i=4.5,r,s;function a(o){return o&&(typeof i=="function"&&s.pointRadius(+i.apply(this,arguments)),Jn(o,r(s))),s.result()}return a.area=function(o){return Jn(o,r(oh)),oh.result()},a.measure=function(o){return Jn(o,r(yh)),yh.result()},a.bounds=function(o){return Jn(o,r(_s)),_s.result()},a.centroid=function(o){return Jn(o,r(fh)),fh.result()},a.projection=function(o){return arguments.length?(r=o==null?(e=null,So):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new wh(n)):new ph(t=o),typeof i!="function"&&s.pointRadius(i),a):t},a.pointRadius=function(o){return arguments.length?(i=typeof o=="function"?o:(s.pointRadius(+o),+o),a):i},a.digits=function(o){if(!arguments.length)return n;if(o==null)n=null;else{const c=Math.floor(o);if(!(c>=0))throw new RangeError(`invalid digits: ${o}`);n=c}return t===null&&(s=new wh(n)),a},a.projection(e).digits(n).context(t)}function Io(e){return function(t){var n=new Po;for(var i in e)n[i]=e[i];return n.stream=t,n}}function Po(){}Po.prototype={constructor:Po,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 No(e,t,n){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),Jn(n,e.stream(_s)),t(_s.result()),i!=null&&e.clipExtent(i),e}function Sh(e,t,n){return No(e,function(i){var r=t[1][0]-t[0][0],s=t[1][1]-t[0][1],a=Math.min(r/(i[1][0]-i[0][0]),s/(i[1][1]-i[0][1])),o=+t[0][0]+(r-a*(i[1][0]+i[0][0]))/2,c=+t[0][1]+(s-a*(i[1][1]+i[0][1]))/2;e.scale(150*a).translate([o,c])},n)}function Ex(e,t,n){return Sh(e,[[0,0],t],n)}function Sx(e,t,n){return No(e,function(i){var r=+t,s=r/(i[1][0]-i[0][0]),a=(r-s*(i[1][0]+i[0][0]))/2,o=-s*i[0][1];e.scale(150*s).translate([a,o])},n)}function Ox(e,t,n){return No(e,function(i){var r=+t,s=r/(i[1][1]-i[0][1]),a=-s*i[0][0],o=(r-s*(i[1][1]+i[0][1]))/2;e.scale(150*s).translate([a,o])},n)}var Oh=16,Tx=bt(30*Rt);function Th(e,t){return+t?Mx(e,t):Cx(e)}function Cx(e){return Io({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Mx(e,t){function n(i,r,s,a,o,c,l,u,d,h,f,p,g,m){var v=l-i,x=u-r,b=v*v+x*x;if(b>4*t&&g--){var O=a+h,E=o+f,T=c+p,S=Ee(O*O+E*E+T*T),A=We(T/=S),D=yt(yt(T)-1)<vt||yt(s-d)<vt?(s+d)/2:Cn(E,O),L=e(D,A),C=L[0],B=L[1],_=C-i,$=B-r,y=x*_-v*$;(y*y/b>t||yt((v*_+x*$)/b-.5)>.3||a*h+o*f+c*p<Tx)&&(n(i,r,s,a,o,c,C,B,D,O/=S,E/=S,T,g,m),m.point(C,B),n(C,B,D,O,E,T,l,u,d,h,f,p,g,m))}}return function(i){var r,s,a,o,c,l,u,d,h,f,p,g,m={point:v,lineStart:x,lineEnd:O,polygonStart:function(){i.polygonStart(),m.lineStart=E},polygonEnd:function(){i.polygonEnd(),m.lineStart=x}};function v(A,D){A=e(A,D),i.point(A[0],A[1])}function x(){d=NaN,m.point=b,i.lineStart()}function b(A,D){var L=ti([A,D]),C=e(A,D);n(d,h,u,f,p,g,d=C[0],h=C[1],u=A,f=L[0],p=L[1],g=L[2],Oh,i),i.point(d,h)}function O(){m.point=v,i.lineEnd()}function E(){x(),m.point=T,m.lineEnd=S}function T(A,D){b(r=A,D),s=d,a=h,o=f,c=p,l=g,m.point=b}function S(){n(d,h,u,f,p,g,s,a,r,o,c,l,Oh,i),m.lineEnd=O,O()}return m}}var $x=Io({point:function(e,t){this.stream.point(e*Rt,t*Rt)}});function Ax(e){return Io({point:function(t,n){var i=e(t,n);return this.stream.point(i[0],i[1])}})}function Lx(e,t,n,i,r){function s(a,o){return a*=i,o*=r,[t+e*a,n-e*o]}return s.invert=function(a,o){return[(a-t)/e*i,(n-o)/e*r]},s}function Ch(e,t,n,i,r,s){if(!s)return Lx(e,t,n,i,r);var a=bt(s),o=gt(s),c=a*e,l=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,m){return g*=i,m*=r,[c*g-l*m+t,n-l*g-c*m]}return p.invert=function(g,m){return[i*(u*g-d*m+h),r*(f-d*g-u*m)]},p}function Ss(e){return Mh(function(){return e})()}function Mh(e){var t,n=150,i=480,r=250,s=0,a=0,o=0,c=0,l=0,u,d=0,h=1,f=1,p=null,g=ih,m=null,v,x,b,O=So,E=.5,T,S,A,D,L;function C(y){return A(y[0]*Rt,y[1]*Rt)}function B(y){return y=A.invert(y[0],y[1]),y&&[y[0]*Jt,y[1]*Jt]}C.stream=function(y){return D&&L===y?D:D=$x(Ax(u)(g(T(O(L=y)))))},C.preclip=function(y){return arguments.length?(g=y,p=void 0,$()):g},C.postclip=function(y){return arguments.length?(O=y,m=v=x=b=null,$()):O},C.clipAngle=function(y){return arguments.length?(g=+y?ox(p=y*Rt):(p=null,ih),$()):p*Jt},C.clipExtent=function(y){return arguments.length?(O=y==null?(m=v=x=b=null,So):cx(m=+y[0][0],v=+y[0][1],x=+y[1][0],b=+y[1][1]),$()):m==null?null:[[m,v],[x,b]]},C.scale=function(y){return arguments.length?(n=+y,_()):n},C.translate=function(y){return arguments.length?(i=+y[0],r=+y[1],_()):[i,r]},C.center=function(y){return arguments.length?(s=y[0]%360*Rt,a=y[1]%360*Rt,_()):[s*Jt,a*Jt]},C.rotate=function(y){return arguments.length?(o=y[0]%360*Rt,c=y[1]%360*Rt,l=y.length>2?y[2]%360*Rt:0,_()):[o*Jt,c*Jt,l*Jt]},C.angle=function(y){return arguments.length?(d=y%360*Rt,_()):d*Jt},C.reflectX=function(y){return arguments.length?(h=y?-1:1,_()):h<0},C.reflectY=function(y){return arguments.length?(f=y?-1:1,_()):f<0},C.precision=function(y){return arguments.length?(T=Th(S,E=y*y),$()):Ee(E)},C.fitExtent=function(y,k){return Sh(C,y,k)},C.fitSize=function(y,k){return Ex(C,y,k)},C.fitWidth=function(y,k){return Sx(C,y,k)},C.fitHeight=function(y,k){return Ox(C,y,k)};function _(){var y=Ch(n,0,0,h,f,d).apply(null,t(s,a)),k=Ch(n,i-y[0],r-y[1],h,f,d);return u=Yu(o,c,l),S=bo(t,k),A=bo(u,S),T=Th(S,E),$()}function $(){return D=L=null,C}return function(){return t=e.apply(this,arguments),C.invert=t.invert&&B,_()}}function $h(e){var t=0,n=ut/3,i=Mh(e),r=i(t,n);return r.parallels=function(s){return arguments.length?i(t=s[0]*Rt,n=s[1]*Rt):[t*Jt,n*Jt]},r}function Dx(e){var t=bt(e);function n(i,r){return[i*t,gt(r)/t]}return n.invert=function(i,r){return[i/t,We(r*t)]},n}function kx(e,t){var n=gt(e),i=(n+gt(t))/2;if(yt(i)<vt)return Dx(e);var r=1+n*(2*i-n),s=Ee(r)/i;function a(o,c){var l=Ee(r-2*i*gt(c))/i;return[l*gt(o*=i),s-l*bt(o)]}return a.invert=function(o,c){var l=s-c,u=Cn(o,yt(l))*un(l);return l*i<0&&(u-=ut*un(o)*un(l)),[u/i,We((r-(o*o+l*l)*i*i)/(2*i))]},a}function Ah(){return $h(kx).scale(155.424).center([0,33.6442])}function Rx(){return Ah().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Uo(e,t){return[e,Z_(K_((re+t)/2))]}Uo.invert=function(e,t){return[e,2*zu(X_(t))-re]};function Ix(){return Px(Uo).scale(961/he)}function Px(e){var t=Ss(e),n=t.center,i=t.scale,r=t.translate,s=t.clipExtent,a=null,o,c,l;t.scale=function(d){return arguments.length?(i(d),u()):i()},t.translate=function(d){return arguments.length?(r(d),u()):r()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=c=l=null:(a=+d[0][0],o=+d[0][1],c=+d[1][0],l=+d[1][1]),u()):a==null?null:[[a,o],[c,l]]};function u(){var d=ut*i(),h=t(J_(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Uo?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,c),l]]:[[a,Math.max(h[1]-d,o)],[c,Math.min(h[1]+d,l)]])}return u()}function Os(e,t){return[e,t]}Os.invert=Os;function Nx(){return Ss(Os).scale(152.63)}function Ux(e,t){var n=bt(e),i=e===t?gt(e):(n-bt(t))/(t-e),r=n/i+e;if(yt(i)<vt)return Os;function s(a,o){var c=r-o,l=i*a;return[c*gt(l),r-c*bt(l)]}return s.invert=function(a,o){var c=r-o,l=Cn(a,yt(c))*un(c);return c*i<0&&(l-=ut*un(a)*un(c)),[l/i,r-un(i)*Ee(a*a+c*c)]},s}function Bx(){return $h(Ux).scale(131.154).center([0,13.9389])}var Xi=1.340264,Zi=-.081106,Ki=893e-6,Qi=.003796,Ts=Ee(3)/2,Hx=12;function Lh(e,t){var n=We(Ts*gt(t)),i=n*n,r=i*i*i;return[e*bt(n)/(Ts*(Xi+3*Zi*i+r*(7*Ki+9*Qi*i))),n*(Xi+Zi*i+r*(Ki+Qi*i))]}Lh.invert=function(e,t){for(var n=t,i=n*n,r=i*i*i,s=0,a,o,c;s<Hx&&(o=n*(Xi+Zi*i+r*(Ki+Qi*i))-t,c=Xi+3*Zi*i+r*(7*Ki+9*Qi*i),n-=a=o/c,i=n*n,r=i*i*i,!(yt(a)<Fu));++s);return[Ts*e*(Xi+3*Zi*i+r*(7*Ki+9*Qi*i))/bt(n),We(gt(n)/Ts)]};function Vx(){return Ss(Lh).scale(177.158)}function Dh(e,t){var n=t*t,i=n*n;return[e*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),t*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}Dh.invert=function(e,t){var n=t,i=25,r;do{var s=n*n,a=s*s;n-=r=(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(yt(r)>vt&&--i>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Fx(){return Ss(Dh).scale(175.295)}function Gx(e,t){return e.parent===t.parent?1:2}function zx(e){return e.reduce(jx,0)/e.length}function jx(e,t){return e+t.x}function qx(e){return 1+e.reduce(Wx,0)}function Wx(e,t){return Math.max(e,t.y)}function Yx(e){for(var t;t=e.children;)e=t[0];return e}function Xx(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Zx(){var e=Gx,t=1,n=1,i=!1;function r(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=zx(f),h.y=qx(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var c=Yx(s),l=Xx(s),u=c.x-e(c,l)/2,d=l.x+e(l,c)/2;return s.eachAfter(i?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 r.separation=function(s){return arguments.length?(e=s,r):e},r.size=function(s){return arguments.length?(i=!1,t=+s[0],n=+s[1],r):i?null:[t,n]},r.nodeSize=function(s){return arguments.length?(i=!0,t=+s[0],n=+s[1],r):i?[t,n]:null},r}function Kx(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function Qx(){return this.eachAfter(Kx)}function Jx(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function tb(e,t){for(var n=this,i=[n],r,s,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(s=r.length-1;s>=0;--s)i.push(r[s]);return this}function eb(e,t){for(var n=this,i=[n],r=[],s,a,o,c=-1;n=i.pop();)if(r.push(n),s=n.children)for(a=0,o=s.length;a<o;++a)i.push(s[a]);for(;n=r.pop();)e.call(t,n,++c,this);return this}function nb(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function ib(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function rb(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function sb(e){for(var t=this,n=ab(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function ab(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ob(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function lb(){return Array.from(this)}function cb(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function ub(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*hb(){var e=this,t,n=[e],i,r,s;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,s=i.length;r<s;++r)n.push(i[r]);while(n.length)}function Ji(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=pb)):t===void 0&&(t=fb);for(var n=new tr(e),i,r=[n],s,a,o,c;i=r.pop();)if((a=t(i.data))&&(c=(a=Array.from(a)).length))for(i.children=a,o=c-1;o>=0;--o)r.push(s=a[o]=new tr(a[o])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(gb)}function db(){return Ji(this).eachBefore(mb)}function fb(e){return e.children}function pb(e){return Array.isArray(e)?e[1]:null}function mb(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function gb(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function tr(e){this.data=e,this.depth=this.height=0,this.parent=null}tr.prototype=Ji.prototype={constructor:tr,count:Qx,each:Jx,eachAfter:eb,eachBefore:tb,find:nb,sum:ib,sort:rb,path:sb,ancestors:ob,descendants:lb,leaves:cb,links:ub,copy:db,[Symbol.iterator]:hb};function vb(e){return e==null?null:kh(e)}function kh(e){if(typeof e!="function")throw new Error;return e}function $n(){return 0}function ii(e){return function(){return e}}const yb=1664525,_b=1013904223,Rh=4294967296;function xb(){let e=1;return()=>(e=(yb*e+_b)%Rh)/Rh}function bb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wb(e,t){let n=e.length,i,r;for(;n;)r=t()*n--|0,i=e[n],e[n]=e[r],e[r]=i;return e}function Eb(e,t){for(var n=0,i=(e=wb(Array.from(e),t)).length,r=[],s,a;n<i;)s=e[n],a&&Ih(a,s)?++n:(a=Ob(r=Sb(r,s)),n=0);return a}function Sb(e,t){var n,i;if(Bo(t,e))return[t];for(n=0;n<e.length;++n)if(Cs(t,e[n])&&Bo(er(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(i=n+1;i<e.length;++i)if(Cs(er(e[n],e[i]),t)&&Cs(er(e[n],t),e[i])&&Cs(er(e[i],t),e[n])&&Bo(Ph(e[n],e[i],t),e))return[e[n],e[i],t];throw new Error}function Cs(e,t){var n=e.r-t.r,i=t.x-e.x,r=t.y-e.y;return n<0||n*n<i*i+r*r}function Ih(e,t){var n=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Bo(e,t){for(var n=0;n<t.length;++n)if(!Ih(e,t[n]))return!1;return!0}function Ob(e){switch(e.length){case 1:return Tb(e[0]);case 2:return er(e[0],e[1]);case 3:return Ph(e[0],e[1],e[2])}}function Tb(e){return{x:e.x,y:e.y,r:e.r}}function er(e,t){var n=e.x,i=e.y,r=e.r,s=t.x,a=t.y,o=t.r,c=s-n,l=a-i,u=o-r,d=Math.sqrt(c*c+l*l);return{x:(n+s+c/d*u)/2,y:(i+a+l/d*u)/2,r:(d+r+o)/2}}function Ph(e,t,n){var i=e.x,r=e.y,s=e.r,a=t.x,o=t.y,c=t.r,l=n.x,u=n.y,d=n.r,h=i-a,f=i-l,p=r-o,g=r-u,m=c-s,v=d-s,x=i*i+r*r-s*s,b=x-a*a-o*o+c*c,O=x-l*l-u*u+d*d,E=f*p-h*g,T=(p*O-g*b)/(E*2)-i,S=(g*m-p*v)/E,A=(f*b-h*O)/(E*2)-r,D=(h*v-f*m)/E,L=S*S+D*D-1,C=2*(s+T*S+A*D),B=T*T+A*A-s*s,_=-(Math.abs(L)>1e-6?(C+Math.sqrt(C*C-4*L*B))/(2*L):B/C);return{x:i+T+S*_,y:r+A+D*_,r:_}}function Nh(e,t,n){var i=e.x-t.x,r,s,a=e.y-t.y,o,c,l=i*i+a*a;l?(s=t.r+n.r,s*=s,c=e.r+n.r,c*=c,s>c?(r=(l+c-s)/(2*l),o=Math.sqrt(Math.max(0,c/l-r*r)),n.x=e.x-r*i-o*a,n.y=e.y-r*a+o*i):(r=(l+s-c)/(2*l),o=Math.sqrt(Math.max(0,s/l-r*r)),n.x=t.x+r*i-o*a,n.y=t.y+r*a+o*i)):(n.x=t.x+n.r,n.y=t.y)}function Uh(e,t){var n=e.r+t.r-1e-6,i=t.x-e.x,r=t.y-e.y;return n>0&&n*n>i*i+r*r}function Bh(e){var t=e._,n=e.next._,i=t.r+n.r,r=(t.x*n.r+n.x*t.r)/i,s=(t.y*n.r+n.y*t.r)/i;return r*r+s*s}function Ms(e){this._=e,this.next=null,this.previous=null}function Cb(e,t){if(!(s=(e=bb(e)).length))return 0;var n,i,r,s,a,o,c,l,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(i=e[1],n.x=-i.r,i.x=n.r,i.y=0,!(s>2))return n.r+i.r;Nh(i,n,r=e[2]),n=new Ms(n),i=new Ms(i),r=new Ms(r),n.next=r.previous=i,i.next=n.previous=r,r.next=i.previous=n;t:for(c=3;c<s;++c){Nh(n._,i._,r=e[c]),r=new Ms(r),l=i.next,u=n.previous,d=i._.r,h=n._.r;do if(d<=h){if(Uh(l._,r._)){i=l,n.next=i,i.previous=n,--c;continue t}d+=l._.r,l=l.next}else{if(Uh(u._,r._)){n=u,n.next=i,i.previous=n,--c;continue t}h+=u._.r,u=u.previous}while(l!==u.next);for(r.previous=n,r.next=i,n.next=i.previous=i=r,a=Bh(n);(r=r.next)!==i;)(o=Bh(r))<a&&(n=r,a=o);i=n.next}for(n=[i._],r=i;(r=r.next)!==i;)n.push(r._);for(r=Eb(n,t),c=0;c<s;++c)n=e[c],n.x-=r.x,n.y-=r.y;return r.r}function Mb(e){return Math.sqrt(e.value)}function $b(){var e=null,t=1,n=1,i=$n;function r(s){const a=xb();return s.x=t/2,s.y=n/2,e?s.eachBefore(Hh(e)).eachAfter(Ho(i,.5,a)).eachBefore(Vh(1)):s.eachBefore(Hh(Mb)).eachAfter(Ho($n,1,a)).eachAfter(Ho(i,s.r/Math.min(t,n),a)).eachBefore(Vh(Math.min(t,n)/(2*s.r))),s}return r.radius=function(s){return arguments.length?(e=vb(s),r):e},r.size=function(s){return arguments.length?(t=+s[0],n=+s[1],r):[t,n]},r.padding=function(s){return arguments.length?(i=typeof s=="function"?s:ii(+s),r):i},r}function Hh(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ho(e,t,n){return function(i){if(r=i.children){var r,s,a=r.length,o=e(i)*t||0,c;if(o)for(s=0;s<a;++s)r[s].r+=o;if(c=Cb(r,n),o)for(s=0;s<a;++s)r[s].r-=o;i.r=c+o}}}function Vh(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 Ab(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 Lb(e,t,n,i,r){for(var s=e.children,a,o=-1,c=s.length,l=e.value&&(i-t)/e.value;++o<c;)a=s[o],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*l}function Db(e,t){return e.parent===t.parent?1:2}function Vo(e){var t=e.children;return t?t[0]:e.t}function Fo(e){var t=e.children;return t?t[t.length-1]:e.t}function kb(e,t,n){var i=n/(t.i-e.i);t.c-=i,t.s+=n,e.c+=i,t.z+=n,t.m+=n}function Rb(e){for(var t=0,n=0,i=e.children,r=i.length,s;--r>=0;)s=i[r],s.z+=t,s.m+=t,t+=s.s+(n+=s.c)}function Ib(e,t,n){return e.a.parent===t.parent?e.a:n}function $s(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}$s.prototype=Object.create(tr.prototype);function Pb(e){for(var t=new $s(e,0),n,i=[t],r,s,a,o;n=i.pop();)if(s=n._.children)for(n.children=new Array(o=s.length),a=o-1;a>=0;--a)i.push(r=n.children[a]=new $s(s[a],a)),r.parent=n;return(t.parent=new $s(null,0)).children=[t],t}function Nb(){var e=Db,t=1,n=1,i=null;function r(l){var u=Pb(l);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),i)l.eachBefore(c);else{var d=l,h=l,f=l;l.eachBefore(function(x){x.x<d.x&&(d=x),x.x>h.x&&(h=x),x.depth>f.depth&&(f=x)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);l.eachBefore(function(x){x.x=(x.x+g)*m,x.y=x.depth*v})}return l}function s(l){var u=l.children,d=l.parent.children,h=l.i?d[l.i-1]:null;if(u){Rb(l);var f=(u[0].z+u[u.length-1].z)/2;h?(l.z=h.z+e(l._,h._),l.m=l.z-f):l.z=f}else h&&(l.z=h.z+e(l._,h._));l.parent.A=o(l,h,l.parent.A||d[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function o(l,u,d){if(u){for(var h=l,f=l,p=u,g=h.parent.children[0],m=h.m,v=f.m,x=p.m,b=g.m,O;p=Fo(p),h=Vo(h),p&&h;)g=Vo(g),f=Fo(f),f.a=l,O=p.z+x-h.z-m+e(p._,h._),O>0&&(kb(Ib(p,l,d),l,O),m+=O,v+=O),x+=p.m,m+=h.m,b+=g.m,v+=f.m;p&&!Fo(f)&&(f.t=p,f.m+=x-v),h&&!Vo(g)&&(g.t=h,g.m+=m-b,d=l)}return d}function c(l){l.x*=t,l.y=l.depth*n}return r.separation=function(l){return arguments.length?(e=l,r):e},r.size=function(l){return arguments.length?(i=!1,t=+l[0],n=+l[1],r):i?null:[t,n]},r.nodeSize=function(l){return arguments.length?(i=!0,t=+l[0],n=+l[1],r):i?[t,n]:null},r}function Ub(e,t,n,i,r){for(var s=e.children,a,o=-1,c=s.length,l=e.value&&(r-n)/e.value;++o<c;)a=s[o],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*l}var Bb=(1+Math.sqrt(5))/2;function Hb(e,t,n,i,r,s){for(var a=[],o=t.children,c,l,u=0,d=0,h=o.length,f,p,g=t.value,m,v,x,b,O,E,T;u<h;){f=r-n,p=s-i;do m=o[d++].value;while(!m&&d<h);for(v=x=m,E=Math.max(p/f,f/p)/(g*e),T=m*m*E,O=Math.max(x/T,T/v);d<h;++d){if(m+=l=o[d].value,l<v&&(v=l),l>x&&(x=l),T=m*m*E,b=Math.max(x/T,T/v),b>O){m-=l;break}O=b}a.push(c={value:m,dice:f<p,children:o.slice(u,d)}),c.dice?Lb(c,n,i,r,g?i+=p*m/g:s):Ub(c,n,i,g?n+=f*m/g:r,s),g-=m,u=d}return a}const Vb=function e(t){function n(i,r,s,a,o){Hb(t,i,r,s,a,o)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n}(Bb);function Fb(){var e=Vb,t=!1,n=1,i=1,r=[0],s=$n,a=$n,o=$n,c=$n,l=$n;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=i,h.eachBefore(d),r=[0],t&&h.eachBefore(Ab),h}function d(h){var f=r[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=r[h.depth+1]=s(h)/2,p+=l(h)-f,g+=a(h)-f,m-=o(h)-f,v-=c(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],i=+h[1],u):[n,i]},u.tile=function(h){return arguments.length?(e=kh(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:ii(+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:ii(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:ii(+h),u):o},u.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:ii(+h),u):c},u.paddingLeft=function(h){return arguments.length?(l=typeof h=="function"?h:ii(+h),u):l},u}function ri(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const Fh=Symbol("implicit");function As(){var e=new Dc,t=[],n=[],i=Fh;function r(s){let a=e.get(s);if(a===void 0){if(i!==Fh)return i;e.set(s,a=t.push(s)-1)}return n[a%n.length]}return r.domain=function(s){if(!arguments.length)return t.slice();t=[],e=new Dc;for(const a of s)e.has(a)||e.set(a,t.push(a)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return As(t,n).unknown(i)},ri.apply(r,arguments),r}function nr(){var e=As().unknown(void 0),t=e.domain,n=e.range,i=0,r=1,s,a,o=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var h=t().length,f=r<i,p=f?r:i,g=f?i:r;s=(g-p)/Math.max(1,h-c+l*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-c))*u,a=s*(1-c),o&&(p=Math.round(p),a=Math.round(a));var m=Zv(h).map(function(v){return p+s*v});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?([i,r]=h,i=+i,r=+r,d()):[i,r]},e.rangeRound=function(h){return[i,r]=h,i=+i,r=+r,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?(c=Math.min(1,l=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(l=+h,d()):l},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return nr(t(),[i,r]).round(o).paddingInner(c).paddingOuter(l).align(u)},ri.apply(d(),arguments)}function Gb(e){return function(){return e}}function zb(e){return+e}var Gh=[0,1];function si(e){return e}function Go(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Gb(isNaN(t)?NaN:.5)}function jb(e,t){var n;return e>t&&(n=e,e=t,t=n),function(i){return Math.max(e,Math.min(t,i))}}function qb(e,t,n){var i=e[0],r=e[1],s=t[0],a=t[1];return r<i?(i=Go(r,i),s=n(a,s)):(i=Go(i,r),s=n(s,a)),function(o){return s(i(o))}}function Wb(e,t,n){var i=Math.min(e.length,t.length)-1,r=new Array(i),s=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)r[a]=Go(e[a],e[a+1]),s[a]=n(t[a],t[a+1]);return function(o){var c=Ra(e,o,1,i)-1;return s[c](r[c](o))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function zh(){var e=Gh,t=Gh,n=Ni,i,r,s,a=si,o,c,l;function u(){var h=Math.min(e.length,t.length);return a!==si&&(a=jb(e[0],e[h-1])),o=h>2?Wb:qb,c=l=null,d}function d(h){return h==null||isNaN(h=+h)?s:(c||(c=o(e.map(i),t,n)))(i(a(h)))}return d.invert=function(h){return a(r((l||(l=o(t,e.map(i),ue)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,zb),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=hu,u()},d.clamp=function(h){return arguments.length?(a=h?!0:si,u()):a!==si},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 i=h,r=f,u()}}function jh(){return zh()(si,si)}function Yb(e,t,n,i){var r=Pa(e,t,n),s;switch(i=Fi(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(s=W_(r,a))&&(i.precision=s),Vu(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=Y_(r,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=q_(r))&&(i.precision=s-(i.type==="%")*2);break}}return go(i)}function qh(e){var t=e.domain;return e.ticks=function(n){var i=t();return Hr(i[0],i[i.length-1],n??10)},e.tickFormat=function(n,i){var r=t();return Yb(r[0],r[r.length-1],n??10,i)},e.nice=function(n){n==null&&(n=10);var i=t(),r=0,s=i.length-1,a=i[r],o=i[s],c,l,u=10;for(o<a&&(l=a,a=o,o=l,l=r,r=s,s=l);u-- >0;){if(l=qn(a,o,n),l===c)return i[r]=a,i[s]=o,t(i);if(l>0)a=Math.floor(a/l)*l,o=Math.ceil(o/l)*l;else if(l<0)a=Math.ceil(a*l)/l,o=Math.floor(o*l)/l;else break;c=l}return e},e}function Oe(){var e=jh();return e.copy=function(){return zo(e,Oe())},ri.apply(e,arguments),qh(e)}function Wh(e,t){e=e.slice();var n=0,i=e.length-1,r=e[n],s=e[i],a;return s<r&&(a=n,n=i,i=a,a=r,r=s,s=a),e[n]=t.floor(r),e[i]=t.ceil(s),e}function Yh(e){return Math.log(e)}function Xh(e){return Math.exp(e)}function Xb(e){return-Math.log(-e)}function Zb(e){return-Math.exp(-e)}function Kb(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Qb(e){return e===10?Kb:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Jb(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 Zh(e){return(t,n)=>-e(-t,n)}function tw(e){const t=e(Yh,Xh),n=t.domain;let i=10,r,s;function a(){return r=Jb(i),s=Qb(i),n()[0]<0?(r=Zh(r),s=Zh(s),e(Xb,Zb)):e(Yh,Xh),t}return t.base=function(o){return arguments.length?(i=+o,a()):i},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let h=r(l),f=r(u),p,g;const m=o==null?10:+o;let v=[];if(!(i%1)&&f-h<m){if(h=Math.floor(h),f=Math.ceil(f),l>0){for(;h<=f;++h)for(p=1;p<i;++p)if(g=h<0?p/s(-h):p*s(h),!(g<l)){if(g>u)break;v.push(g)}}else for(;h<=f;++h)for(p=i-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<l)){if(g>u)break;v.push(g)}v.length*2<m&&(v=Hr(l,u,m))}else v=Hr(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=Fi(c)).precision==null&&(c.trim=!0),c=go(c)),o===1/0)return c;const l=Math.max(1,i*o/t.ticks().length);return u=>{let d=u/s(Math.round(r(u)));return d*i<i-.5&&(d*=i),d<=l?c(u):""}},t.nice=()=>n(Wh(n(),{floor:o=>s(Math.floor(r(o))),ceil:o=>s(Math.ceil(r(o)))})),t}function Kh(){const e=tw(zh()).domain([1,10]);return e.copy=()=>zo(e,Kh()).base(e.base()),ri.apply(e,arguments),e}function jo(){var e=0,t=1,n=1,i=[.5],r=[0,1],s;function a(c){return c!=null&&c<=c?r[Ra(i,c,0,n)]:s}function o(){var c=-1;for(i=new Array(n);++c<n;)i[c]=((c+1)*t-(c-n)*e)/(n+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},a.range=function(c){return arguments.length?(n=(r=Array.from(c)).length-1,o()):r.slice()},a.invertExtent=function(c){var l=r.indexOf(c);return l<0?[NaN,NaN]:l<1?[e,i[0]]:l>=n?[i[n-1],t]:[i[l-1],i[l]]},a.unknown=function(c){return arguments.length&&(s=c),a},a.thresholds=function(){return i.slice()},a.copy=function(){return jo().domain([e,t]).range(r).unknown(s)},ri.apply(qh(a),arguments)}const qo=new Date,Wo=new Date;function Pt(e,t,n,i){function r(s){return e(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(e(s=new Date(+s)),s),r.ceil=s=>(e(s=new Date(s-1)),t(s,1),e(s),s),r.round=s=>{const a=r(s),o=r.ceil(s);return s-a<o-s?a:o},r.offset=(s,a)=>(t(s=new Date(+s),a==null?1:Math.floor(a)),s),r.range=(s,a,o)=>{const c=[];if(s=r.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return c;let l;do c.push(l=new Date(+s)),t(s,o),e(s);while(l<s&&s<a);return c},r.filter=s=>Pt(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&&(r.count=(s,a)=>(qo.setTime(+s),Wo.setTime(+a),e(qo),e(Wo),Math.floor(n(qo,Wo))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?a=>i(a)%s===0:a=>r.count(0,a)%s===0):r)),r}const Ls=Pt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ls.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Pt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ls),Ls.range;const Ye=1e3,me=Ye*60,Xe=me*60,Ze=Xe*24,Yo=Ze*7,Qh=Ze*30,Xo=Ze*365,ai=Pt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ye)},(e,t)=>(t-e)/Ye,e=>e.getUTCSeconds());ai.range;const Zo=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ye)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getMinutes());Zo.range,Pt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCMinutes()).range;const Ko=Pt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ye-e.getMinutes()*me)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getHours());Ko.range,Pt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Xe)},(e,t)=>(t-e)/Xe,e=>e.getUTCHours()).range;const ir=Pt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*me)/Ze,e=>e.getDate()-1);ir.range;const Qo=Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>e.getUTCDate()-1);Qo.range,Pt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ze,e=>Math.floor(e/Ze)).range;function An(e){return Pt(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())*me)/Yo)}const Ds=An(0),ks=An(1),ew=An(2),nw=An(3),oi=An(4),iw=An(5),rw=An(6);Ds.range,ks.range,ew.range,nw.range,oi.range,iw.range,rw.range;function Ln(e){return Pt(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)/Yo)}const Jh=Ln(0),Rs=Ln(1),sw=Ln(2),aw=Ln(3),li=Ln(4),ow=Ln(5),lw=Ln(6);Jh.range,Rs.range,sw.range,aw.range,li.range,ow.range,lw.range;const Jo=Pt(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());Jo.range,Pt(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 Ke=Pt(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());Ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)}),Ke.range;const Dn=Pt(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());Dn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Pt(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)}),Dn.range;function cw(e,t,n,i,r,s){const a=[[ai,1,Ye],[ai,5,5*Ye],[ai,15,15*Ye],[ai,30,30*Ye],[s,1,me],[s,5,5*me],[s,15,15*me],[s,30,30*me],[r,1,Xe],[r,3,3*Xe],[r,6,6*Xe],[r,12,12*Xe],[i,1,Ze],[i,2,2*Ze],[n,1,Yo],[t,1,Qh],[t,3,3*Qh],[e,1,Xo]];function o(l,u,d){const h=u<l;h&&([l,u]=[u,l]);const f=d&&typeof d.range=="function"?d:c(l,u,d),p=f?f.range(l,+u+1):[];return h?p.reverse():p}function c(l,u,d){const h=Math.abs(u-l)/d,f=ka(([,,m])=>m).right(a,h);if(f===a.length)return e.every(Pa(l/Xo,u/Xo,d));if(f===0)return Ls.every(Math.max(Pa(l,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,c]}const[uw,hw]=cw(Ke,Jo,Ds,ir,Ko,Zo);function tl(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 el(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 rr(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function dw(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,s=e.days,a=e.shortDays,o=e.months,c=e.shortMonths,l=sr(r),u=ar(r),d=sr(s),h=ar(s),f=sr(a),p=ar(a),g=sr(o),m=ar(o),v=sr(c),x=ar(c),b={a:R,A:U,b:N,B:G,c:null,d:sd,e:sd,f:Iw,g:jw,G:Ww,H:Dw,I:kw,j:Rw,L:ad,m:Pw,M:Nw,p:z,q:F,Q:dd,s:fd,S:Uw,u:Bw,U:Hw,V:Vw,w:Fw,W:Gw,x:null,X:null,y:zw,Y:qw,Z:Yw,"%":hd},O={a:Q,A:j,b:X,B:ot,c:null,d:ld,e:ld,f:Qw,g:lE,G:uE,H:Xw,I:Zw,j:Kw,L:cd,m:Jw,M:tE,p:tt,q:lt,Q:dd,s:fd,S:eE,u:nE,U:iE,V:rE,w:sE,W:aE,x:null,X:null,y:oE,Y:cE,Z:hE,"%":hd},E={a:L,A:C,b:B,B:_,c:$,d:id,e:id,f:Mw,g:nd,G:ed,H:rd,I:rd,j:Sw,L:Cw,m:Ew,M:Ow,p:D,q:ww,Q:Aw,s:Lw,S:Tw,u:vw,U:yw,V:_w,w:gw,W:xw,x:y,X:k,y:nd,Y:ed,Z:bw,"%":$w};b.x=T(n,b),b.X=T(i,b),b.c=T(t,b),O.x=T(n,O),O.X=T(i,O),O.c=T(t,O);function T(q,W){return function(Y){var V=[],xt=-1,pt=0,zt=q.length,Wt,et,Lt;for(Y instanceof Date||(Y=new Date(+Y));++xt<zt;)q.charCodeAt(xt)===37&&(V.push(q.slice(pt,xt)),(et=td[Wt=q.charAt(++xt)])!=null?Wt=q.charAt(++xt):et=Wt==="e"?" ":"0",(Lt=W[Wt])&&(Wt=Lt(Y,et)),V.push(Wt),pt=xt+1);return V.push(q.slice(pt,xt)),V.join("")}}function S(q,W){return function(Y){var V=rr(1900,void 0,1),xt=A(V,q,Y+="",0),pt,zt;if(xt!=Y.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(W&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(pt=el(rr(V.y,0,1)),zt=pt.getUTCDay(),pt=zt>4||zt===0?Rs.ceil(pt):Rs(pt),pt=Qo.offset(pt,(V.V-1)*7),V.y=pt.getUTCFullYear(),V.m=pt.getUTCMonth(),V.d=pt.getUTCDate()+(V.w+6)%7):(pt=tl(rr(V.y,0,1)),zt=pt.getDay(),pt=zt>4||zt===0?ks.ceil(pt):ks(pt),pt=ir.offset(pt,(V.V-1)*7),V.y=pt.getFullYear(),V.m=pt.getMonth(),V.d=pt.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),zt="Z"in V?el(rr(V.y,0,1)).getUTCDay():tl(rr(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(zt+5)%7:V.w+V.U*7-(zt+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,el(V)):tl(V)}}function A(q,W,Y,V){for(var xt=0,pt=W.length,zt=Y.length,Wt,et;xt<pt;){if(V>=zt)return-1;if(Wt=W.charCodeAt(xt++),Wt===37){if(Wt=W.charAt(xt++),et=E[Wt in td?W.charAt(xt++):Wt],!et||(V=et(q,Y,V))<0)return-1}else if(Wt!=Y.charCodeAt(V++))return-1}return V}function D(q,W,Y){var V=l.exec(W.slice(Y));return V?(q.p=u.get(V[0].toLowerCase()),Y+V[0].length):-1}function L(q,W,Y){var V=f.exec(W.slice(Y));return V?(q.w=p.get(V[0].toLowerCase()),Y+V[0].length):-1}function C(q,W,Y){var V=d.exec(W.slice(Y));return V?(q.w=h.get(V[0].toLowerCase()),Y+V[0].length):-1}function B(q,W,Y){var V=v.exec(W.slice(Y));return V?(q.m=x.get(V[0].toLowerCase()),Y+V[0].length):-1}function _(q,W,Y){var V=g.exec(W.slice(Y));return V?(q.m=m.get(V[0].toLowerCase()),Y+V[0].length):-1}function $(q,W,Y){return A(q,t,W,Y)}function y(q,W,Y){return A(q,n,W,Y)}function k(q,W,Y){return A(q,i,W,Y)}function R(q){return a[q.getDay()]}function U(q){return s[q.getDay()]}function N(q){return c[q.getMonth()]}function G(q){return o[q.getMonth()]}function z(q){return r[+(q.getHours()>=12)]}function F(q){return 1+~~(q.getMonth()/3)}function Q(q){return a[q.getUTCDay()]}function j(q){return s[q.getUTCDay()]}function X(q){return c[q.getUTCMonth()]}function ot(q){return o[q.getUTCMonth()]}function tt(q){return r[+(q.getUTCHours()>=12)]}function lt(q){return 1+~~(q.getUTCMonth()/3)}return{format:function(q){var W=T(q+="",b);return W.toString=function(){return q},W},parse:function(q){var W=S(q+="",!1);return W.toString=function(){return q},W},utcFormat:function(q){var W=T(q+="",O);return W.toString=function(){return q},W},utcParse:function(q){var W=S(q+="",!0);return W.toString=function(){return q},W}}}var td={"-":"",_:" ",0:"0"},Vt=/^\s*\d+/,fw=/^%/,pw=/[\\^$*+?|[\]().{}]/g;function dt(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(t)+r:r)}function mw(e){return e.replace(pw,"\\$&")}function sr(e){return new RegExp("^(?:"+e.map(mw).join("|")+")","i")}function ar(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function gw(e,t,n){var i=Vt.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function vw(e,t,n){var i=Vt.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function yw(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function _w(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function xw(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function ed(e,t,n){var i=Vt.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function nd(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function bw(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ww(e,t,n){var i=Vt.exec(t.slice(n,n+1));return i?(e.q=i[0]*3-3,n+i[0].length):-1}function Ew(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function id(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function Sw(e,t,n){var i=Vt.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function rd(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function Ow(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function Tw(e,t,n){var i=Vt.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function Cw(e,t,n){var i=Vt.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function Mw(e,t,n){var i=Vt.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function $w(e,t,n){var i=fw.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function Aw(e,t,n){var i=Vt.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function Lw(e,t,n){var i=Vt.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function sd(e,t){return dt(e.getDate(),t,2)}function Dw(e,t){return dt(e.getHours(),t,2)}function kw(e,t){return dt(e.getHours()%12||12,t,2)}function Rw(e,t){return dt(1+ir.count(Ke(e),e),t,3)}function ad(e,t){return dt(e.getMilliseconds(),t,3)}function Iw(e,t){return ad(e,t)+"000"}function Pw(e,t){return dt(e.getMonth()+1,t,2)}function Nw(e,t){return dt(e.getMinutes(),t,2)}function Uw(e,t){return dt(e.getSeconds(),t,2)}function Bw(e){var t=e.getDay();return t===0?7:t}function Hw(e,t){return dt(Ds.count(Ke(e)-1,e),t,2)}function od(e){var t=e.getDay();return t>=4||t===0?oi(e):oi.ceil(e)}function Vw(e,t){return e=od(e),dt(oi.count(Ke(e),e)+(Ke(e).getDay()===4),t,2)}function Fw(e){return e.getDay()}function Gw(e,t){return dt(ks.count(Ke(e)-1,e),t,2)}function zw(e,t){return dt(e.getFullYear()%100,t,2)}function jw(e,t){return e=od(e),dt(e.getFullYear()%100,t,2)}function qw(e,t){return dt(e.getFullYear()%1e4,t,4)}function Ww(e,t){var n=e.getDay();return e=n>=4||n===0?oi(e):oi.ceil(e),dt(e.getFullYear()%1e4,t,4)}function Yw(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+dt(t/60|0,"0",2)+dt(t%60,"0",2)}function ld(e,t){return dt(e.getUTCDate(),t,2)}function Xw(e,t){return dt(e.getUTCHours(),t,2)}function Zw(e,t){return dt(e.getUTCHours()%12||12,t,2)}function Kw(e,t){return dt(1+Qo.count(Dn(e),e),t,3)}function cd(e,t){return dt(e.getUTCMilliseconds(),t,3)}function Qw(e,t){return cd(e,t)+"000"}function Jw(e,t){return dt(e.getUTCMonth()+1,t,2)}function tE(e,t){return dt(e.getUTCMinutes(),t,2)}function eE(e,t){return dt(e.getUTCSeconds(),t,2)}function nE(e){var t=e.getUTCDay();return t===0?7:t}function iE(e,t){return dt(Jh.count(Dn(e)-1,e),t,2)}function ud(e){var t=e.getUTCDay();return t>=4||t===0?li(e):li.ceil(e)}function rE(e,t){return e=ud(e),dt(li.count(Dn(e),e)+(Dn(e).getUTCDay()===4),t,2)}function sE(e){return e.getUTCDay()}function aE(e,t){return dt(Rs.count(Dn(e)-1,e),t,2)}function oE(e,t){return dt(e.getUTCFullYear()%100,t,2)}function lE(e,t){return e=ud(e),dt(e.getUTCFullYear()%100,t,2)}function cE(e,t){return dt(e.getUTCFullYear()%1e4,t,4)}function uE(e,t){var n=e.getUTCDay();return e=n>=4||n===0?li(e):li.ceil(e),dt(e.getUTCFullYear()%1e4,t,4)}function hE(){return"+0000"}function hd(){return"%"}function dd(e){return+e}function fd(e){return Math.floor(+e/1e3)}var ci,pd;dE({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 dE(e){return ci=dw(e),pd=ci.format,ci.parse,ci.utcFormat,ci.utcParse,ci}function fE(e){return new Date(e)}function pE(e){return e instanceof Date?+e:+new Date(+e)}function md(e,t,n,i,r,s,a,o,c,l){var u=jh(),d=u.invert,h=u.domain,f=l(".%L"),p=l(":%S"),g=l("%I:%M"),m=l("%I %p"),v=l("%a %d"),x=l("%b %d"),b=l("%B"),O=l("%Y");function E(T){return(c(T)<T?f:o(T)<T?p:a(T)<T?g:s(T)<T?m:i(T)<T?r(T)<T?v:x:n(T)<T?b:O)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?h(Array.from(T,pE)):h().map(fE)},u.ticks=function(T){var S=h();return e(S[0],S[S.length-1],T??10)},u.tickFormat=function(T,S){return S==null?E:l(S)},u.nice=function(T){var S=h();return(!T||typeof T.range!="function")&&(T=t(S[0],S[S.length-1],T??10)),T?h(Wh(S,T)):u},u.copy=function(){return zo(u,md(e,t,n,i,r,s,a,o,c,l))},u}function gd(){return ri.apply(md(uw,hw,Ke,Jo,Ds,ir,Ko,Zo,ai,pd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function ct(e){return function(){return e}}const vd=Math.abs,Zt=Math.atan2,kn=Math.cos,mE=Math.max,nl=Math.min,Ie=Math.sin,ui=Math.sqrt,Kt=1e-12,or=Math.PI,Is=or/2,Ps=2*or;function gE(e){return e>1?0:e<-1?or:Math.acos(e)}function yd(e){return e>=1?Is:e<=-1?-Is:Math.asin(e)}function Ns(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);t=i}return e},()=>new N_(t)}function vE(e){return e.innerRadius}function yE(e){return e.outerRadius}function _E(e){return e.startAngle}function xE(e){return e.endAngle}function bE(e){return e&&e.padAngle}function wE(e,t,n,i,r,s,a,o){var c=n-e,l=i-t,u=a-r,d=o-s,h=d*c-u*l;if(!(h*h<Kt))return h=(u*(t-s)-d*(e-r))/h,[e+h*c,t+h*l]}function Us(e,t,n,i,r,s,a){var o=e-n,c=t-i,l=(a?s:-s)/ui(o*o+c*c),u=l*c,d=-l*o,h=e+u,f=t+d,p=n+u,g=i+d,m=(h+p)/2,v=(f+g)/2,x=p-h,b=g-f,O=x*x+b*b,E=r-s,T=h*g-p*f,S=(b<0?-1:1)*ui(mE(0,E*E*O-T*T)),A=(T*b-x*S)/O,D=(-T*x-b*S)/O,L=(T*b+x*S)/O,C=(-T*x+b*S)/O,B=A-m,_=D-v,$=L-m,y=C-v;return B*B+_*_>$*$+y*y&&(A=L,D=C),{cx:A,cy:D,x01:-u,y01:-d,x11:A*(r/E-1),y11:D*(r/E-1)}}function lr(){var e=vE,t=yE,n=ct(0),i=null,r=_E,s=xE,a=bE,o=null,c=Ns(l);function l(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=r.apply(this,arguments)-Is,g=s.apply(this,arguments)-Is,m=vd(g-p),v=g>p;if(o||(o=u=c()),f<h&&(d=f,f=h,h=d),!(f>Kt))o.moveTo(0,0);else if(m>Ps-Kt)o.moveTo(f*kn(p),f*Ie(p)),o.arc(0,0,f,p,g,!v),h>Kt&&(o.moveTo(h*kn(g),h*Ie(g)),o.arc(0,0,h,g,p,v));else{var x=p,b=g,O=p,E=g,T=m,S=m,A=a.apply(this,arguments)/2,D=A>Kt&&(i?+i.apply(this,arguments):ui(h*h+f*f)),L=nl(vd(f-h)/2,+n.apply(this,arguments)),C=L,B=L,_,$;if(D>Kt){var y=yd(D/h*Ie(A)),k=yd(D/f*Ie(A));(T-=y*2)>Kt?(y*=v?1:-1,O+=y,E-=y):(T=0,O=E=(p+g)/2),(S-=k*2)>Kt?(k*=v?1:-1,x+=k,b-=k):(S=0,x=b=(p+g)/2)}var R=f*kn(x),U=f*Ie(x),N=h*kn(E),G=h*Ie(E);if(L>Kt){var z=f*kn(b),F=f*Ie(b),Q=h*kn(O),j=h*Ie(O),X;if(m<or)if(X=wE(R,U,Q,j,z,F,N,G)){var ot=R-X[0],tt=U-X[1],lt=z-X[0],q=F-X[1],W=1/Ie(gE((ot*lt+tt*q)/(ui(ot*ot+tt*tt)*ui(lt*lt+q*q)))/2),Y=ui(X[0]*X[0]+X[1]*X[1]);C=nl(L,(h-Y)/(W-1)),B=nl(L,(f-Y)/(W+1))}else C=B=0}S>Kt?B>Kt?(_=Us(Q,j,R,U,f,B,v),$=Us(z,F,N,G,f,B,v),o.moveTo(_.cx+_.x01,_.cy+_.y01),B<L?o.arc(_.cx,_.cy,B,Zt(_.y01,_.x01),Zt($.y01,$.x01),!v):(o.arc(_.cx,_.cy,B,Zt(_.y01,_.x01),Zt(_.y11,_.x11),!v),o.arc(0,0,f,Zt(_.cy+_.y11,_.cx+_.x11),Zt($.cy+$.y11,$.cx+$.x11),!v),o.arc($.cx,$.cy,B,Zt($.y11,$.x11),Zt($.y01,$.x01),!v))):(o.moveTo(R,U),o.arc(0,0,f,x,b,!v)):o.moveTo(R,U),!(h>Kt)||!(T>Kt)?o.lineTo(N,G):C>Kt?(_=Us(N,G,z,F,h,-C,v),$=Us(R,U,Q,j,h,-C,v),o.lineTo(_.cx+_.x01,_.cy+_.y01),C<L?o.arc(_.cx,_.cy,C,Zt(_.y01,_.x01),Zt($.y01,$.x01),!v):(o.arc(_.cx,_.cy,C,Zt(_.y01,_.x01),Zt(_.y11,_.x11),!v),o.arc(0,0,h,Zt(_.cy+_.y11,_.cx+_.x11),Zt($.cy+$.y11,$.cx+$.x11),v),o.arc($.cx,$.cy,C,Zt($.y11,$.x11),Zt($.y01,$.x01),!v))):o.arc(0,0,h,E,O,v)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+r.apply(this,arguments)+ +s.apply(this,arguments))/2-or/2;return[kn(d)*u,Ie(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ct(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ct(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:ct(+u),l):n},l.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:ct(+u),l):i},l.startAngle=function(u){return arguments.length?(r=typeof u=="function"?u:ct(+u),l):r},l.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:ct(+u),l):s},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ct(+u),l):a},l.context=function(u){return arguments.length?(o=u??null,l):o},l}var EE=Array.prototype.slice;function Bs(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _d(e){this._context=e}_d.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 Hs(e){return new _d(e)}function il(e){return e[0]}function rl(e){return e[1]}function cr(e,t){var n=ct(!0),i=null,r=Hs,s=null,a=Ns(o);e=typeof e=="function"?e:e===void 0?il:ct(e),t=typeof t=="function"?t:t===void 0?rl:ct(t);function o(c){var l,u=(c=Bs(c)).length,d,h=!1,f;for(i==null&&(s=r(f=a())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,l,c),+t(d,l,c));if(f)return s=null,f+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:ct(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:ct(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:ct(!!c),o):n},o.curve=function(c){return arguments.length?(r=c,i!=null&&(s=r(i)),o):r},o.context=function(c){return arguments.length?(c==null?i=s=null:s=r(i=c),o):i},o}function sl(e,t,n){var i=null,r=ct(!0),s=null,a=Hs,o=null,c=Ns(l);e=typeof e=="function"?e:e===void 0?il:ct(+e),t=typeof t=="function"?t:ct(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?rl:ct(+n);function l(d){var h,f,p,g=(d=Bs(d)).length,m,v=!1,x,b=new Array(g),O=new Array(g);for(s==null&&(o=a(x=c())),h=0;h<=g;++h){if(!(h<g&&r(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(b[p],O[p]);o.lineEnd(),o.areaEnd()}v&&(b[h]=+e(m,h,d),O[h]=+t(m,h,d),o.point(i?+i(m,h,d):b[h],n?+n(m,h,d):O[h]))}if(x)return o=null,x+""||null}function u(){return cr().defined(r).curve(a).context(s)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),i=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:ct(+d),l):e},l.x1=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:ct(+d),l):i},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:ct(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:ct(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(i).y(t)},l.defined=function(d){return arguments.length?(r=typeof d=="function"?d:ct(!!d),l):r},l.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),l):a},l.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),l):s},l}function SE(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function OE(e){return e}function TE(){var e=OE,t=SE,n=null,i=ct(0),r=ct(Ps),s=ct(0);function a(o){var c,l=(o=Bs(o)).length,u,d,h=0,f=new Array(l),p=new Array(l),g=+i.apply(this,arguments),m=Math.min(Ps,Math.max(-Ps,r.apply(this,arguments)-g)),v,x=Math.min(Math.abs(m)/l,s.apply(this,arguments)),b=x*(m<0?-1:1),O;for(c=0;c<l;++c)(O=p[f[c]=c]=+e(o[c],c,o))>0&&(h+=O);for(t!=null?f.sort(function(E,T){return t(p[E],p[T])}):n!=null&&f.sort(function(E,T){return n(o[E],o[T])}),c=0,d=h?(m-l*b)/h:0;c<l;++c,g=v)u=f[c],O=p[u],v=g+(O>0?O*d:0)+b,p[u]={data:o[u],index:c,value:O,startAngle:g,endAngle:v,padAngle:x};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:ct(+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?(i=typeof o=="function"?o:ct(+o),a):i},a.endAngle=function(o){return arguments.length?(r=typeof o=="function"?o:ct(+o),a):r},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:ct(+o),a):s},a}var CE=bd(Hs);function xd(e){this._curve=e}xd.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 bd(e){function t(n){return new xd(e(n))}return t._curve=e,t}function ME(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(bd(n)):t()._curve},e}function $E(){return ME(cr().curve(CE))}class AE{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 LE(e){return new AE(e,!0)}function DE(e){return e.source}function kE(e){return e.target}function RE(e){let t=DE,n=kE,i=il,r=rl,s=null,a=null,o=Ns(c);function c(){let l;const u=EE.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(l=o())),a.lineStart(),u[0]=d,a.point(+i.apply(this,u),+r.apply(this,u)),u[0]=h,a.point(+i.apply(this,u),+r.apply(this,u)),a.lineEnd(),l)return a=null,l+""||null}return c.source=function(l){return arguments.length?(t=l,c):t},c.target=function(l){return arguments.length?(n=l,c):n},c.x=function(l){return arguments.length?(i=typeof l=="function"?l:ct(+l),c):i},c.y=function(l){return arguments.length?(r=typeof l=="function"?l:ct(+l),c):r},c.context=function(l){return arguments.length?(l==null?s=a=null:a=e(s=l),c):s},c}function IE(){return RE(LE)}function dn(){}function Vs(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 Fs(e){this._context=e}Fs.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:Vs(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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PE(e){return new Fs(e)}function wd(e){this._context=e}wd.prototype={areaStart:dn,areaEnd:dn,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:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function NE(e){return new wd(e)}function Ed(e){this._context=e}Ed.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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Vs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function UE(e){return new Ed(e)}function Sd(e,t){this._basis=new Fs(e),this._beta=t}Sd.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 i=e[0],r=t[0],s=e[n]-i,a=t[n]-r,o=-1,c;++o<=n;)c=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+c*s),this._beta*t[o]+(1-this._beta)*(r+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const BE=function e(t){function n(i){return t===1?new Fs(i):new Sd(i,t)}return n.beta=function(i){return e(+i)},n}(.85);function Gs(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 al(e,t){this._context=e,this._k=(1-t)/6}al.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:Gs(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:Gs(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 HE=function e(t){function n(i){return new al(i,t)}return n.tension=function(i){return e(+i)},n}(0);function ol(e,t){this._context=e,this._k=(1-t)/6}ol.prototype={areaStart:dn,areaEnd:dn,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:Gs(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 VE=function e(t){function n(i){return new ol(i,t)}return n.tension=function(i){return e(+i)},n}(0);function ll(e,t){this._context=e,this._k=(1-t)/6}ll.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:Gs(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 FE=function e(t){function n(i){return new ll(i,t)}return n.tension=function(i){return e(+i)},n}(0);function cl(e,t,n){var i=e._x1,r=e._y1,s=e._x2,a=e._y2;if(e._l01_a>Kt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,r=(r*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Kt){var l=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*l+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,s,a,e._x2,e._y2)}function Od(e,t){this._context=e,this._alpha=t}Od.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 GE=function e(t){function n(i){return t?new Od(i,t):new al(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Td(e,t){this._context=e,this._alpha=t}Td.prototype={areaStart:dn,areaEnd:dn,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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 zE=function e(t){function n(i){return t?new Td(i,t):new ol(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Cd(e,t){this._context=e,this._alpha=t}Cd.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,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:cl(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 jE=function e(t){function n(i){return t?new Cd(i,t):new ll(i,0)}return n.alpha=function(i){return e(+i)},n}(.5);function Md(e){this._context=e}Md.prototype={areaStart:dn,areaEnd:dn,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 $d(e){return new Md(e)}function Ad(e){return e<0?-1:1}function Ld(e,t,n){var i=e._x1-e._x0,r=t-e._x1,s=(e._y1-e._y0)/(i||r<0&&-0),a=(n-e._y1)/(r||i<0&&-0),o=(s*r+a*i)/(i+r);return(Ad(s)+Ad(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function Dd(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ul(e,t,n){var i=e._x0,r=e._y0,s=e._x1,a=e._y1,o=(s-i)/3;e._context.bezierCurveTo(i+o,r+o*t,s-o,a-o*n,s,a)}function zs(e){this._context=e}zs.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:ul(this,this._t0,Dd(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,ul(this,Dd(this,n=Ld(this,e,t)),n);break;default:ul(this,this._t0,n=Ld(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function kd(e){this._context=new Rd(e)}(kd.prototype=Object.create(zs.prototype)).point=function(e,t){zs.prototype.point.call(this,t,e)};function Rd(e){this._context=e}Rd.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,i,r,s){this._context.bezierCurveTo(t,e,i,n,s,r)}};function qE(e){return new zs(e)}function WE(e){return new kd(e)}function Id(e){this._context=e}Id.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 i=Pd(e),r=Pd(t),s=0,a=1;a<n;++s,++a)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[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 Pd(e){var t,n=e.length-1,i,r=new Array(n),s=new Array(n),a=new Array(n);for(r[0]=0,s[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)r[t]=1,s[t]=4,a[t]=4*e[t]+2*e[t+1];for(r[n-1]=2,s[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)i=r[t]/s[t-1],s[t]-=i,a[t]-=i*a[t-1];for(r[n-1]=a[n-1]/s[n-1],t=n-2;t>=0;--t)r[t]=(a[t]-r[t+1])/s[t];for(s[n-1]=(e[n]+r[n-1])/2,t=0;t<n-1;++t)s[t]=2*e[t+1]-r[t+1];return[r,s]}function YE(e){return new Id(e)}function js(e,t){this._context=e,this._t=t}js.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 XE(e){return new js(e,.5)}function ZE(e){return new js(e,0)}function KE(e){return new js(e,1)}function Nd(e,t){if((a=e.length)>1)for(var n=1,i,r,s=e[t[0]],a,o=s.length;n<a;++n)for(r=s,s=e[t[n]],i=0;i<o;++i)s[i][1]+=s[i][0]=isNaN(r[i][1])?r[i][0]:r[i][1]}function Ud(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function QE(e,t){return e[t]}function JE(e){const t=[];return t.key=e,t}function hl(){var e=ct([]),t=Ud,n=Nd,i=QE;function r(s){var a=Array.from(e.apply(this,arguments),JE),o,c=a.length,l=-1,u;for(const d of s)for(o=0,++l;o<c;++o)(a[o][l]=[0,+i(d,a[o].key,l,s)]).data=d;for(o=0,u=Bs(t(a));o<c;++o)a[u[o]].index=o;return n(a,u),a}return r.keys=function(s){return arguments.length?(e=typeof s=="function"?s:ct(Array.from(s)),r):e},r.value=function(s){return arguments.length?(i=typeof s=="function"?s:ct(+s),r):i},r.order=function(s){return arguments.length?(t=s==null?Ud:typeof s=="function"?s:ct(Array.from(s)),r):t},r.offset=function(s){return arguments.length?(n=s??Nd,r):n},r}function tS(e,t){if((c=e.length)>0)for(var n,i=0,r,s,a,o,c,l=e[t[0]].length;i<l;++i)for(a=o=0,n=0;n<c;++n)(s=(r=e[t[n]][i])[1]-r[0])>0?(r[0]=a,r[1]=a+=s):s<0?(r[1]=o,r[0]=o+=s):(r[0]=0,r[1]=s)}function ur(e,t,n){this.k=e,this.x=t,this.y=n}ur.prototype={constructor:ur,scale:function(e){return e===1?this:new ur(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ur(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+")"}},ur.prototype;var Bd=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))(Bd||{}),Hd=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Hd||{}),Vd=(e=>(e.UPDATE="model-update",e))(Vd||{}),Fd=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e))(Fd||{}),Gd=(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))(Gd||{}),zd=(e=>(e.CHANGE="zoom-domain-change",e))(zd||{}),jd=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(jd||{}),qd=(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))(qd||{}),Wd=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Wd||{}),Yd=(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))(Yd||{}),Xd=(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))(Xd||{}),Zd=(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))(Zd||{}),Kd=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Kd||{}),Qd=(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))(Qd||{}),Jd=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Jd||{}),tf=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(tf||{}),ef=(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))(ef||{}),nf=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(nf||{}),rf=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(rf||{}),hr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(hr||{}),sf=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(sf||{}),af=(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))(af||{}),of=(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))(of||{}),lf=(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))(lf||{}),cf=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(cf||{}),uf=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(uf||{}),hi=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(hi||{});const eS=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:lf,Area:Wd,Axis:qd,Bar:Kd,Boxplot:Qd,CanvasZoom:jd,Chart:Bd,Choropleth:hi,CirclePack:of,Gauge:Zd,Heatmap:uf,Legend:af,Line:tf,Meter:cf,Modal:Hd,Model:Vd,Pie:Xd,Radar:ef,Scatter:Jd,Threshold:sf,Toolbar:Fd,Tooltip:hr,Tree:nf,Treemap:rf,WordCloud:Yd,ZoomBar:Gd,ZoomDomain:zd},Symbol.toStringTag,{value:"Module"})),M=eS;var K=(e=>(e.HTML="html",e.SVG="svg",e))(K||{}),hf=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(hf||{}),J=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(J||{}),H=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(H||{}),Pe=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(Pe||{}),Te=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Te||{}),Ft=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Ft||{}),Z=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Z||{}),dr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(dr||{}),Nt=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Nt||{}),fr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(fr||{}),dl=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(dl||{}),St=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(St||{}),it=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(it||{}),di=(e=>(e.CENTER="center",e))(di||{}),qs=(e=>(e.LEFT="left",e.RIGHT="right",e))(qs||{}),Ut=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Ut||{}),Qe=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(Qe||{}),Je=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(Je||{}),fi=(e=>(e.SEMI="semi",e.FULL="full",e))(fi||{}),fl=(e=>(e.UP="up",e.DOWN="down",e))(fl||{}),Ws=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(Ws||{}),Ys=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(Ys||{}),ge=(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))(ge||{}),Dt=(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.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(Dt||{}),pl=(e=>(e.LEFT="left",e.RIGHT="right",e))(pl||{}),Bt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Bt||{}),Xs=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(Xs||{}),pr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(pr||{}),Zs=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(Zs||{}),tn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(tn||{});function ml(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}function mr(e){return function(t,n){var i=n!=null&&n.context?String(n.context):"standalone",r;if(i==="formatting"&&e.formattingValues){var s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;r=e.formattingValues[a]||e.formattingValues[s]}else{var o=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[c]||e.values[o]}var l=e.argumentCallback?e.argumentCallback(t):t;return r[l]}}function gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,r=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;var a=s[0],o=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?iS(o,function(d){return d.test(a)}):nS(o,function(d){return d.test(a)}),l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;var u=t.slice(a.length);return{value:l,rest:u}}}function nS(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function iS(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function rS(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var r=i[0],s=t.match(e.parsePattern);if(!s)return null;var a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;var o=t.slice(r.length);return{value:a,rest:o}}}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Ht(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function st(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ft(e){st(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ks(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Qs(e,t){st(2,arguments);var n=ft(e).getTime(),i=Ht(t);return new Date(n+i)}var sS={};function Js(){return sS}function gl(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function aS(e){return st(1,arguments),e instanceof Date||Ks(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function oS(e){if(st(1,arguments),!aS(e)&&typeof e!="number")return!1;var t=ft(e);return!isNaN(Number(t))}function lS(e,t){st(2,arguments);var n=Ht(t);return Qs(e,-n)}var cS=864e5;function uS(e){st(1,arguments);var t=ft(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),r=n-i;return Math.floor(r/cS)+1}function ta(e){st(1,arguments);var t=1,n=ft(e),i=n.getUTCDay(),r=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}function df(e){st(1,arguments);var t=ft(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var r=ta(i),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var a=ta(s);return t.getTime()>=r.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function hS(e){st(1,arguments);var t=df(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=ta(n);return i}var dS=6048e5;function fS(e){st(1,arguments);var t=ft(e),n=ta(t).getTime()-hS(t).getTime();return Math.round(n/dS)+1}function ea(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=Js(),d=Ht((n=(i=(r=(s=t==null?void 0:t.weekStartsOn)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.weekStartsOn)!==null&&r!==void 0?r:u.weekStartsOn)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ft(e),f=h.getUTCDay(),p=(f<d?7:0)+f-d;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function ff(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=ft(e),d=u.getUTCFullYear(),h=Js(),f=Ht((n=(i=(r=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:h.firstWeekContainsDate)!==null&&i!==void 0?i:(c=h.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,f),p.setUTCHours(0,0,0,0);var g=ea(p,t),m=new Date(0);m.setUTCFullYear(d,0,f),m.setUTCHours(0,0,0,0);var v=ea(m,t);return u.getTime()>=g.getTime()?d+1:u.getTime()>=v.getTime()?d:d-1}function pS(e,t){var n,i,r,s,a,o,c,l;st(1,arguments);var u=Js(),d=Ht((n=(i=(r=(s=t==null?void 0:t.firstWeekContainsDate)!==null&&s!==void 0?s:t==null||(a=t.locale)===null||a===void 0||(o=a.options)===null||o===void 0?void 0:o.firstWeekContainsDate)!==null&&r!==void 0?r:u.firstWeekContainsDate)!==null&&i!==void 0?i:(c=u.locale)===null||c===void 0||(l=c.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&n!==void 0?n:1),h=ff(e,t),f=new Date(0);f.setUTCFullYear(h,0,d),f.setUTCHours(0,0,0,0);var p=ea(f,t);return p}var mS=6048e5;function gS(e,t){st(1,arguments);var n=ft(e),i=ea(n,t).getTime()-pS(n,t).getTime();return Math.round(i/mS)+1}function _t(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var vS={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return _t(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):_t(n+1,2)},d:function(e,t){return _t(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/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:function(e,t){return _t(e.getUTCHours()%12||12,t.length)},H:function(e,t){return _t(e.getUTCHours(),t.length)},m:function(e,t){return _t(e.getUTCMinutes(),t.length)},s:function(e,t){return _t(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),r=Math.floor(i*Math.pow(10,n-3));return _t(r,t.length)}};const fn=vS;var pi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},yS={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),r=i>0?i:1-i;return n.ordinalNumber(r,{unit:"year"})}return fn.y(e,t)},Y:function(e,t,n,i){var r=ff(e,i),s=r>0?r:1-r;if(t==="YY"){var a=s%100;return _t(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):_t(s,t.length)},R:function(e,t){var n=df(e);return _t(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return _t(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return _t(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return _t(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return fn.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return _t(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var r=gS(e,i);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):_t(r,t.length)},I:function(e,t,n){var i=fS(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):_t(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):fn.d(e,t)},D:function(e,t,n){var i=uS(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):_t(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,n,i){var r=e.getUTCDay(),s=(r-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return _t(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});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"})}},c:function(e,t,n,i){var r=e.getUTCDay(),s=(r-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return _t(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),r=i===0?7:i;switch(t){case"i":return String(r);case"ii":return _t(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),r=i/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){var i=e.getUTCHours(),r;switch(i===12?r=pi.noon:i===0?r=pi.midnight:r=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),r;switch(i>=17?r=pi.evening:i>=12?r=pi.afternoon:i>=4?r=pi.morning:r=pi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return fn.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):fn.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):_t(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):fn.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):fn.s(e,t)},S:function(e,t){return fn.S(e,t)},X:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return mf(s);case"XXXX":case"XX":return Rn(s);case"XXXXX":case"XXX":default:return Rn(s,":")}},x:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"x":return mf(s);case"xxxx":case"xx":return Rn(s);case"xxxxx":case"xxx":default:return Rn(s,":")}},O:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+pf(s,":");case"OOOO":default:return"GMT"+Rn(s,":")}},z:function(e,t,n,i){var r=i._originalDate||e,s=r.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+pf(s,":");case"zzzz":default:return"GMT"+Rn(s,":")}},t:function(e,t,n,i){var r=i._originalDate||e,s=Math.floor(r.getTime()/1e3);return _t(s,t.length)},T:function(e,t,n,i){var r=i._originalDate||e,s=r.getTime();return _t(s,t.length)}};function pf(e,t){var n=e>0?"-":"+",i=Math.abs(e),r=Math.floor(i/60),s=i%60;if(s===0)return n+String(r);var a=t||"";return n+String(r)+a+_t(s,2)}function mf(e,t){if(e%60===0){var n=e>0?"-":"+";return n+_t(Math.abs(e)/60,2)}return Rn(e,t)}function Rn(e,t){var n=t||"",i=e>0?"-":"+",r=Math.abs(e),s=_t(Math.floor(r/60),2),a=_t(r%60,2);return i+s+n+a}const _S=yS;var gf=function(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"})}},vf=function(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"})}},xS=function(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],r=n[2];if(!r)return gf(e,t);var s;switch(i){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}}",gf(i,t)).replace("{{time}}",vf(r,t))},bS={p:vf,P:xS};const wS=bS;var ES=["D","DD"],SS=["YY","YYYY"];function OS(e){return ES.indexOf(e)!==-1}function TS(e){return SS.indexOf(e)!==-1}function yf(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var CS={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"}},MS=function(e,t,n){var i,r=CS[e];return typeof r=="string"?i=r:t===1?i=r.one:i=r.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};const $S=MS;var AS={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},LS={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},DS={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},kS={date:ml({formats:AS,defaultWidth:"full"}),time:ml({formats:LS,defaultWidth:"full"}),dateTime:ml({formats:DS,defaultWidth:"full"})};const RS=kS;var IS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},PS=function(e,t,n,i){return IS[e]};const NS=PS;var US={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},BS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},HS={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"]},VS={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"]},FS={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"}},GS={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"}},zS=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},jS={ordinalNumber:zS,era:mr({values:US,defaultWidth:"wide"}),quarter:mr({values:BS,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:mr({values:HS,defaultWidth:"wide"}),day:mr({values:VS,defaultWidth:"wide"}),dayPeriod:mr({values:FS,defaultWidth:"wide",formattingValues:GS,defaultFormattingWidth:"wide"})};const qS=jS;var WS=/^(\d+)(th|st|nd|rd)?/i,YS=/\d+/i,XS={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},ZS={any:[/^b/i,/^(a|c)/i]},KS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},QS={any:[/1/i,/2/i,/3/i,/4/i]},JS={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},tO={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]},eO={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},nO={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]},iO={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},rO={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}},sO={ordinalNumber:rS({matchPattern:WS,parsePattern:YS,valueCallback:function(e){return parseInt(e,10)}}),era:gr({matchPatterns:XS,defaultMatchWidth:"wide",parsePatterns:ZS,defaultParseWidth:"any"}),quarter:gr({matchPatterns:KS,defaultMatchWidth:"wide",parsePatterns:QS,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:gr({matchPatterns:JS,defaultMatchWidth:"wide",parsePatterns:tO,defaultParseWidth:"any"}),day:gr({matchPatterns:eO,defaultMatchWidth:"wide",parsePatterns:nO,defaultParseWidth:"any"}),dayPeriod:gr({matchPatterns:iO,defaultMatchWidth:"any",parsePatterns:rO,defaultParseWidth:"any"})},aO={code:"en-US",formatDistance:$S,formatLong:RS,formatRelative:NS,localize:qS,match:sO,options:{weekStartsOn:0,firstWeekContainsDate:1}};const _f=aO;var oO=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,lO=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,cO=/^'([^]*?)'?$/,uO=/''/g,hO=/[a-zA-Z]/;function mi(e,t,n){var i,r,s,a,o,c,l,u,d,h,f,p,g,m,v,x,b,O;st(2,arguments);var E=String(t),T=Js(),S=(i=(r=n==null?void 0:n.locale)!==null&&r!==void 0?r:T.locale)!==null&&i!==void 0?i:_f,A=Ht((s=(a=(o=(c=n==null?void 0:n.firstWeekContainsDate)!==null&&c!==void 0?c:n==null||(l=n.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&o!==void 0?o:T.firstWeekContainsDate)!==null&&a!==void 0?a:(d=T.locale)===null||d===void 0||(h=d.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&s!==void 0?s:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var D=Ht((f=(p=(g=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(v=n.locale)===null||v===void 0||(x=v.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&g!==void 0?g:T.weekStartsOn)!==null&&p!==void 0?p:(b=T.locale)===null||b===void 0||(O=b.options)===null||O===void 0?void 0:O.weekStartsOn)!==null&&f!==void 0?f:0);if(!(D>=0&&D<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!S.localize)throw new RangeError("locale must contain localize property");if(!S.formatLong)throw new RangeError("locale must contain formatLong property");var L=ft(e);if(!oS(L))throw new RangeError("Invalid time value");var C=gl(L),B=lS(L,C),_={firstWeekContainsDate:A,weekStartsOn:D,locale:S,_originalDate:L},$=E.match(lO).map(function(y){var k=y[0];if(k==="p"||k==="P"){var R=wS[k];return R(y,S.formatLong)}return y}).join("").match(oO).map(function(y){if(y==="''")return"'";var k=y[0];if(k==="'")return dO(y);var R=_S[k];if(R)return!(n!=null&&n.useAdditionalWeekYearTokens)&&TS(y)&&yf(y,t,String(e)),!(n!=null&&n.useAdditionalDayOfYearTokens)&&OS(y)&&yf(y,t,String(e)),R(B,y,S.localize,_);if(k.match(hO))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return y}).join("");return $}function dO(e){var t=e.match(cO);return t?t[1].replace(uO,"'"):e}const te="cds",Ne={opacity:{unselected:.05,selected:.4}},gi={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},vi={duration:1e3,ease:Tu,zoomLevel:3},In={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},vl={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},de={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},xf={defaultBins:10},kt={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}},Ue={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},Gt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Et={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}},pn={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},ve={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},yl={minCellDividerDimension:16,chartPadding:.5},_l={default:{size:24}},bf={horizontalOffset:10},xl={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}},fO={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},se={height:{[Pe.GRAPH_VIEW]:32,[Pe.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},wf=[{type:Bt.RADIUS,name:"Radius"},{type:Bt.AREA,name:"Poor area"},{type:Bt.AREA,name:"Satisfactory area"},{type:Bt.AREA,name:"Great area"},{type:Bt.QUARTILE,name:"Quartiles"}];var pO=typeof global=="object"&&global&&global.Object===Object&&global;const Ef=pO;var mO=typeof self=="object"&&self&&self.Object===Object&&self,gO=Ef||mO||Function("return this")();const Ce=gO;var vO=Ce.Symbol;const ye=vO;var Sf=Object.prototype,yO=Sf.hasOwnProperty,_O=Sf.toString,vr=ye?ye.toStringTag:void 0;function xO(e){var t=yO.call(e,vr),n=e[vr];try{e[vr]=void 0;var i=!0}catch{}var r=_O.call(e);return i&&(t?e[vr]=n:delete e[vr]),r}var bO=Object.prototype,wO=bO.toString;function EO(e){return wO.call(e)}var SO="[object Null]",OO="[object Undefined]",Of=ye?ye.toStringTag:void 0;function Pn(e){return e==null?e===void 0?OO:SO:Of&&Of in Object(e)?xO(e):EO(e)}function Be(e){return e!=null&&typeof e=="object"}var TO="[object Symbol]";function na(e){return typeof e=="symbol"||Be(e)&&Pn(e)==TO}function Tf(e,t){for(var n=-1,i=e==null?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}var CO=Array.isArray;const jt=CO;var MO=1/0,Cf=ye?ye.prototype:void 0,Mf=Cf?Cf.toString:void 0;function $f(e){if(typeof e=="string")return e;if(jt(e))return Tf(e,$f)+"";if(na(e))return Mf?Mf.call(e):"";var t=e+"";return t=="0"&&1/e==-MO?"-0":t}function _e(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function bl(e){return e}var $O="[object AsyncFunction]",AO="[object Function]",LO="[object GeneratorFunction]",DO="[object Proxy]";function wl(e){if(!_e(e))return!1;var t=Pn(e);return t==AO||t==LO||t==$O||t==DO}var kO=Ce["__core-js_shared__"];const El=kO;var Af=function(){var e=/[^.]+$/.exec(El&&El.keys&&El.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function RO(e){return!!Af&&Af in e}var IO=Function.prototype,PO=IO.toString;function Nn(e){if(e!=null){try{return PO.call(e)}catch{}try{return e+""}catch{}}return""}var NO=/[\\^$.*+?()[\]{}|]/g,UO=/^\[object .+?Constructor\]$/,BO=Function.prototype,HO=Object.prototype,VO=BO.toString,FO=HO.hasOwnProperty,GO=RegExp("^"+VO.call(FO).replace(NO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zO(e){if(!_e(e)||RO(e))return!1;var t=wl(e)?GO:UO;return t.test(Nn(e))}function jO(e,t){return e==null?void 0:e[t]}function Un(e,t){var n=jO(e,t);return zO(n)?n:void 0}var qO=Un(Ce,"WeakMap");const Sl=qO;var Lf=Object.create,WO=function(){function e(){}return function(t){if(!_e(t))return{};if(Lf)return Lf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const YO=WO;function XO(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 ZO(){}function Df(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}var KO=800,QO=16,JO=Date.now;function tT(e){var t=0,n=0;return function(){var i=JO(),r=QO-(i-n);if(n=i,r>0){if(++t>=KO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function eT(e){return function(){return e}}var nT=function(){try{var e=Un(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ia=nT;var iT=ia?function(e,t){return ia(e,"toString",{configurable:!0,enumerable:!1,value:eT(t),writable:!0})}:bl,rT=tT(iT);const sT=rT;function aT(e,t){for(var n=-1,i=e==null?0:e.length;++n<i&&t(e[n],n,e)!==!1;);return e}function oT(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function lT(e){return e!==e}function cT(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}function uT(e,t,n){return t===t?cT(e,t,n):oT(e,lT,n)}function hT(e,t){var n=e==null?0:e.length;return!!n&&uT(e,t,0)>-1}var dT=9007199254740991,fT=/^(?:0|[1-9]\d*)$/;function Ol(e,t){var n=typeof e;return t=t??dT,!!t&&(n=="number"||n!="symbol"&&fT.test(e))&&e>-1&&e%1==0&&e<t}function ra(e,t,n){t=="__proto__"&&ia?ia(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yr(e,t){return e===t||e!==e&&t!==t}var pT=Object.prototype,mT=pT.hasOwnProperty;function kf(e,t,n){var i=e[t];(!(mT.call(e,t)&&yr(i,n))||n===void 0&&!(t in e))&&ra(e,t,n)}function _r(e,t,n,i){var r=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],c=i?i(n[o],e[o],o,n,e):void 0;c===void 0&&(c=e[o]),r?ra(n,o,c):kf(n,o,c)}return n}var Rf=Math.max;function gT(e,t,n){return t=Rf(t===void 0?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=Rf(i.length-t,0),a=Array(s);++r<s;)a[r]=i[t+r];r=-1;for(var o=Array(t+1);++r<t;)o[r]=i[r];return o[t]=n(a),XO(e,this,o)}}function If(e,t){return sT(gT(e,t,bl),e+"")}var vT=9007199254740991;function Tl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vT}function Bn(e){return e!=null&&Tl(e.length)&&!wl(e)}function Pf(e,t,n){if(!_e(n))return!1;var i=typeof t;return(i=="number"?Bn(n)&&Ol(t,n.length):i=="string"&&t in n)?yr(n[t],e):!1}function yT(e){return If(function(t,n){var i=-1,r=n.length,s=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(s=e.length>3&&typeof s=="function"?(r--,s):void 0,a&&Pf(n[0],n[1],a)&&(s=r<3?void 0:s,r=1),t=Object(t);++i<r;){var o=n[i];o&&e(t,o,i,s)}return t})}var _T=Object.prototype;function sa(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||_T;return e===n}function xT(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}var bT="[object Arguments]";function Nf(e){return Be(e)&&Pn(e)==bT}var Uf=Object.prototype,wT=Uf.hasOwnProperty,ET=Uf.propertyIsEnumerable,ST=Nf(function(){return arguments}())?Nf:function(e){return Be(e)&&wT.call(e,"callee")&&!ET.call(e,"callee")};const yi=ST;function OT(){return!1}var Bf=typeof rt=="object"&&rt&&!rt.nodeType&&rt,Hf=Bf&&typeof module=="object"&&module&&!module.nodeType&&module,TT=Hf&&Hf.exports===Bf,Vf=TT?Ce.Buffer:void 0,CT=Vf?Vf.isBuffer:void 0,MT=CT||OT;const _i=MT;var $T="[object Arguments]",AT="[object Array]",LT="[object Boolean]",DT="[object Date]",kT="[object Error]",RT="[object Function]",IT="[object Map]",PT="[object Number]",NT="[object Object]",UT="[object RegExp]",BT="[object Set]",HT="[object String]",VT="[object WeakMap]",FT="[object ArrayBuffer]",GT="[object DataView]",zT="[object Float32Array]",jT="[object Float64Array]",qT="[object Int8Array]",WT="[object Int16Array]",YT="[object Int32Array]",XT="[object Uint8Array]",ZT="[object Uint8ClampedArray]",KT="[object Uint16Array]",QT="[object Uint32Array]",Mt={};Mt[zT]=Mt[jT]=Mt[qT]=Mt[WT]=Mt[YT]=Mt[XT]=Mt[ZT]=Mt[KT]=Mt[QT]=!0,Mt[$T]=Mt[AT]=Mt[FT]=Mt[LT]=Mt[GT]=Mt[DT]=Mt[kT]=Mt[RT]=Mt[IT]=Mt[PT]=Mt[NT]=Mt[UT]=Mt[BT]=Mt[HT]=Mt[VT]=!1;function JT(e){return Be(e)&&Tl(e.length)&&!!Mt[Pn(e)]}function Cl(e){return function(t){return e(t)}}var Ff=typeof rt=="object"&&rt&&!rt.nodeType&&rt,xr=Ff&&typeof module=="object"&&module&&!module.nodeType&&module,tC=xr&&xr.exports===Ff,Ml=tC&&Ef.process,eC=function(){try{var e=xr&&xr.require&&xr.require("util").types;return e||Ml&&Ml.binding&&Ml.binding("util")}catch{}}();const xi=eC;var Gf=xi&&xi.isTypedArray,nC=Gf?Cl(Gf):JT;const aa=nC;var iC=Object.prototype,rC=iC.hasOwnProperty;function zf(e,t){var n=jt(e),i=!n&&yi(e),r=!n&&!i&&_i(e),s=!n&&!i&&!r&&aa(e),a=n||i||r||s,o=a?xT(e.length,String):[],c=o.length;for(var l in e)(t||rC.call(e,l))&&!(a&&(l=="length"||r&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Ol(l,c)))&&o.push(l);return o}function jf(e,t){return function(n){return e(t(n))}}var sC=jf(Object.keys,Object);const aC=sC;var oC=Object.prototype,lC=oC.hasOwnProperty;function qf(e){if(!sa(e))return aC(e);var t=[];for(var n in Object(e))lC.call(e,n)&&n!="constructor"&&t.push(n);return t}function br(e){return Bn(e)?zf(e):qf(e)}function cC(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var uC=Object.prototype,hC=uC.hasOwnProperty;function dC(e){if(!_e(e))return cC(e);var t=sa(e),n=[];for(var i in e)i=="constructor"&&(t||!hC.call(e,i))||n.push(i);return n}function wr(e){return Bn(e)?zf(e,!0):dC(e)}var fC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pC=/^\w*$/;function $l(e,t){if(jt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||na(e)?!0:pC.test(e)||!fC.test(e)||t!=null&&e in Object(t)}var mC=Un(Object,"create");const Er=mC;function gC(){this.__data__=Er?Er(null):{},this.size=0}function vC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yC="__lodash_hash_undefined__",_C=Object.prototype,xC=_C.hasOwnProperty;function bC(e){var t=this.__data__;if(Er){var n=t[e];return n===yC?void 0:n}return xC.call(t,e)?t[e]:void 0}var wC=Object.prototype,EC=wC.hasOwnProperty;function SC(e){var t=this.__data__;return Er?t[e]!==void 0:EC.call(t,e)}var OC="__lodash_hash_undefined__";function TC(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Er&&t===void 0?OC:t,this}function Hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Hn.prototype.clear=gC,Hn.prototype.delete=vC,Hn.prototype.get=bC,Hn.prototype.has=SC,Hn.prototype.set=TC;function CC(){this.__data__=[],this.size=0}function oa(e,t){for(var n=e.length;n--;)if(yr(e[n][0],t))return n;return-1}var MC=Array.prototype,$C=MC.splice;function AC(e){var t=this.__data__,n=oa(t,e);if(n<0)return!1;var i=t.length-1;return n==i?t.pop():$C.call(t,n,1),--this.size,!0}function LC(e){var t=this.__data__,n=oa(t,e);return n<0?void 0:t[n][1]}function DC(e){return oa(this.__data__,e)>-1}function kC(e,t){var n=this.__data__,i=oa(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}function en(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}en.prototype.clear=CC,en.prototype.delete=AC,en.prototype.get=LC,en.prototype.has=DC,en.prototype.set=kC;var RC=Un(Ce,"Map");const Sr=RC;function IC(){this.size=0,this.__data__={hash:new Hn,map:new(Sr||en),string:new Hn}}function PC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function la(e,t){var n=e.__data__;return PC(t)?n[typeof t=="string"?"string":"hash"]:n.map}function NC(e){var t=la(this,e).delete(e);return this.size-=t?1:0,t}function UC(e){return la(this,e).get(e)}function BC(e){return la(this,e).has(e)}function HC(e,t){var n=la(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}function nn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}nn.prototype.clear=IC,nn.prototype.delete=NC,nn.prototype.get=UC,nn.prototype.has=BC,nn.prototype.set=HC;var VC="Expected a function";function Al(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(VC);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var a=e.apply(this,i);return n.cache=s.set(r,a)||s,a};return n.cache=new(Al.Cache||nn),n}Al.Cache=nn;var FC=500;function GC(e){var t=Al(e,function(i){return n.size===FC&&n.clear(),i}),n=t.cache;return t}var zC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jC=/\\(\\)?/g,qC=GC(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zC,function(n,i,r,s){t.push(r?s.replace(jC,"$1"):i||n)}),t});const WC=qC;function Or(e){return e==null?"":$f(e)}function Wf(e,t){return jt(e)?e:$l(e,t)?[e]:WC(Or(e))}var YC=1/0;function ca(e){if(typeof e=="string"||na(e))return e;var t=e+"";return t=="0"&&1/e==-YC?"-0":t}function Yf(e,t){t=Wf(t,e);for(var n=0,i=t.length;e!=null&&n<i;)e=e[ca(t[n++])];return n&&n==i?e:void 0}function Ot(e,t,n){var i=e==null?void 0:Yf(e,t);return i===void 0?n:i}function Ll(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}var Xf=ye?ye.isConcatSpreadable:void 0;function XC(e){return jt(e)||yi(e)||!!(Xf&&e&&e[Xf])}function ua(e,t,n,i,r){var s=-1,a=e.length;for(n||(n=XC),r||(r=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?ua(o,t-1,n,i,r):Ll(r,o):i||(r[r.length]=o)}return r}var ZC=jf(Object.getPrototypeOf,Object);const Dl=ZC;var KC="[object Object]",QC=Function.prototype,JC=Object.prototype,Zf=QC.toString,tM=JC.hasOwnProperty,eM=Zf.call(Object);function nM(e){if(!Be(e)||Pn(e)!=KC)return!1;var t=Dl(e);if(t===null)return!0;var n=tM.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zf.call(n)==eM}function iM(){this.__data__=new en,this.size=0}function rM(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function sM(e){return this.__data__.get(e)}function aM(e){return this.__data__.has(e)}var oM=200;function lM(e,t){var n=this.__data__;if(n instanceof en){var i=n.__data__;if(!Sr||i.length<oM-1)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new nn(i)}return n.set(e,t),this.size=n.size,this}function Me(e){var t=this.__data__=new en(e);this.size=t.size}Me.prototype.clear=iM,Me.prototype.delete=rM,Me.prototype.get=sM,Me.prototype.has=aM,Me.prototype.set=lM;function cM(e,t){return e&&_r(t,br(t),e)}function uM(e,t){return e&&_r(t,wr(t),e)}var Kf=typeof rt=="object"&&rt&&!rt.nodeType&&rt,Qf=Kf&&typeof module=="object"&&module&&!module.nodeType&&module,hM=Qf&&Qf.exports===Kf,Jf=hM?Ce.Buffer:void 0,tp=Jf?Jf.allocUnsafe:void 0;function ep(e,t){if(t)return e.slice();var n=e.length,i=tp?tp(n):new e.constructor(n);return e.copy(i),i}function dM(e,t){for(var n=-1,i=e==null?0:e.length,r=0,s=[];++n<i;){var a=e[n];t(a,n,e)&&(s[r++]=a)}return s}function np(){return[]}var fM=Object.prototype,pM=fM.propertyIsEnumerable,ip=Object.getOwnPropertySymbols,mM=ip?function(e){return e==null?[]:(e=Object(e),dM(ip(e),function(t){return pM.call(e,t)}))}:np;const kl=mM;function gM(e,t){return _r(e,kl(e),t)}var vM=Object.getOwnPropertySymbols,yM=vM?function(e){for(var t=[];e;)Ll(t,kl(e)),e=Dl(e);return t}:np;const rp=yM;function _M(e,t){return _r(e,rp(e),t)}function sp(e,t,n){var i=t(e);return jt(e)?i:Ll(i,n(e))}function Rl(e){return sp(e,br,kl)}function xM(e){return sp(e,wr,rp)}var bM=Un(Ce,"DataView");const Il=bM;var wM=Un(Ce,"Promise");const Pl=wM;var EM=Un(Ce,"Set");const bi=EM;var ap="[object Map]",SM="[object Object]",op="[object Promise]",lp="[object Set]",cp="[object WeakMap]",up="[object DataView]",OM=Nn(Il),TM=Nn(Sr),CM=Nn(Pl),MM=Nn(bi),$M=Nn(Sl),Vn=Pn;(Il&&Vn(new Il(new ArrayBuffer(1)))!=up||Sr&&Vn(new Sr)!=ap||Pl&&Vn(Pl.resolve())!=op||bi&&Vn(new bi)!=lp||Sl&&Vn(new Sl)!=cp)&&(Vn=function(e){var t=Pn(e),n=t==SM?e.constructor:void 0,i=n?Nn(n):"";if(i)switch(i){case OM:return up;case TM:return ap;case CM:return op;case MM:return lp;case $M:return cp}return t});const wi=Vn;var AM=Object.prototype,LM=AM.hasOwnProperty;function DM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&LM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var kM=Ce.Uint8Array;const ha=kM;function Nl(e){var t=new e.constructor(e.byteLength);return new ha(t).set(new ha(e)),t}function RM(e,t){var n=t?Nl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var IM=/\w*$/;function PM(e){var t=new e.constructor(e.source,IM.exec(e));return t.lastIndex=e.lastIndex,t}var hp=ye?ye.prototype:void 0,dp=hp?hp.valueOf:void 0;function NM(e){return dp?Object(dp.call(e)):{}}function fp(e,t){var n=t?Nl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var UM="[object Boolean]",BM="[object Date]",HM="[object Map]",VM="[object Number]",FM="[object RegExp]",GM="[object Set]",zM="[object String]",jM="[object Symbol]",qM="[object ArrayBuffer]",WM="[object DataView]",YM="[object Float32Array]",XM="[object Float64Array]",ZM="[object Int8Array]",KM="[object Int16Array]",QM="[object Int32Array]",JM="[object Uint8Array]",t$="[object Uint8ClampedArray]",e$="[object Uint16Array]",n$="[object Uint32Array]";function i$(e,t,n){var i=e.constructor;switch(t){case qM:return Nl(e);case UM:case BM:return new i(+e);case WM:return RM(e,n);case YM:case XM:case ZM:case KM:case QM:case JM:case t$:case e$:case n$:return fp(e,n);case HM:return new i;case VM:case zM:return new i(e);case FM:return PM(e);case GM:return new i;case jM:return NM(e)}}function pp(e){return typeof e.constructor=="function"&&!sa(e)?YO(Dl(e)):{}}var r$="[object Map]";function s$(e){return Be(e)&&wi(e)==r$}var mp=xi&&xi.isMap,a$=mp?Cl(mp):s$;const o$=a$;var l$="[object Set]";function c$(e){return Be(e)&&wi(e)==l$}var gp=xi&&xi.isSet,u$=gp?Cl(gp):c$;const h$=u$;var d$=1,f$=2,p$=4,vp="[object Arguments]",m$="[object Array]",g$="[object Boolean]",v$="[object Date]",y$="[object Error]",yp="[object Function]",_$="[object GeneratorFunction]",x$="[object Map]",b$="[object Number]",_p="[object Object]",w$="[object RegExp]",E$="[object Set]",S$="[object String]",O$="[object Symbol]",T$="[object WeakMap]",C$="[object ArrayBuffer]",M$="[object DataView]",$$="[object Float32Array]",A$="[object Float64Array]",L$="[object Int8Array]",D$="[object Int16Array]",k$="[object Int32Array]",R$="[object Uint8Array]",I$="[object Uint8ClampedArray]",P$="[object Uint16Array]",N$="[object Uint32Array]",Tt={};Tt[vp]=Tt[m$]=Tt[C$]=Tt[M$]=Tt[g$]=Tt[v$]=Tt[$$]=Tt[A$]=Tt[L$]=Tt[D$]=Tt[k$]=Tt[x$]=Tt[b$]=Tt[_p]=Tt[w$]=Tt[E$]=Tt[S$]=Tt[O$]=Tt[R$]=Tt[I$]=Tt[P$]=Tt[N$]=!0,Tt[y$]=Tt[yp]=Tt[T$]=!1;function da(e,t,n,i,r,s){var a,o=t&d$,c=t&f$,l=t&p$;if(n&&(a=r?n(e,i,r,s):n(e)),a!==void 0)return a;if(!_e(e))return e;var u=jt(e);if(u){if(a=DM(e),!o)return Df(e,a)}else{var d=wi(e),h=d==yp||d==_$;if(_i(e))return ep(e,o);if(d==_p||d==vp||h&&!r){if(a=c||h?{}:pp(e),!o)return c?_M(e,uM(a,e)):gM(e,cM(a,e))}else{if(!Tt[d])return r?e:{};a=i$(e,d,o)}}s||(s=new Me);var f=s.get(e);if(f)return f;s.set(e,a),h$(e)?e.forEach(function(m){a.add(da(m,t,n,m,e,s))}):o$(e)&&e.forEach(function(m,v){a.set(v,da(m,t,n,v,e,s))});var p=l?c?xM:Rl:c?wr:br,g=u?void 0:p(e);return aT(g||e,function(m,v){g&&(v=m,m=e[v]),kf(a,v,da(m,t,n,v,e,s))}),a}var U$=1,B$=4;function H$(e){return da(e,U$|B$)}var V$="__lodash_hash_undefined__";function F$(e){return this.__data__.set(e,V$),this}function G$(e){return this.__data__.has(e)}function Tr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new nn;++t<n;)this.add(e[t])}Tr.prototype.add=Tr.prototype.push=F$,Tr.prototype.has=G$;function xp(e,t){for(var n=-1,i=e==null?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}function bp(e,t){return e.has(t)}var z$=1,j$=2;function wp(e,t,n,i,r,s){var a=n&z$,o=e.length,c=t.length;if(o!=c&&!(a&&c>o))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=n&j$?new Tr:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(i)var m=a?i(g,p,d,t,e,s):i(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!xp(t,function(v,x){if(!bp(f,x)&&(p===v||r(p,v,n,i,s)))return f.push(x)})){h=!1;break}}else if(!(p===g||r(p,g,n,i,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function q$(e){var t=-1,n=Array(e.size);return e.forEach(function(i,r){n[++t]=[r,i]}),n}function Ul(e){var t=-1,n=Array(e.size);return e.forEach(function(i){n[++t]=i}),n}var W$=1,Y$=2,X$="[object Boolean]",Z$="[object Date]",K$="[object Error]",Q$="[object Map]",J$="[object Number]",t2="[object RegExp]",e2="[object Set]",n2="[object String]",i2="[object Symbol]",r2="[object ArrayBuffer]",s2="[object DataView]",Ep=ye?ye.prototype:void 0,Bl=Ep?Ep.valueOf:void 0;function a2(e,t,n,i,r,s,a){switch(n){case s2:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case r2:return!(e.byteLength!=t.byteLength||!s(new ha(e),new ha(t)));case X$:case Z$:case J$:return yr(+e,+t);case K$:return e.name==t.name&&e.message==t.message;case t2:case n2:return e==t+"";case Q$:var o=q$;case e2:var c=i&W$;if(o||(o=Ul),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;i|=Y$,a.set(e,t);var u=wp(o(e),o(t),i,r,s,a);return a.delete(e),u;case i2:if(Bl)return Bl.call(e)==Bl.call(t)}return!1}var o2=1,l2=Object.prototype,c2=l2.hasOwnProperty;function u2(e,t,n,i,r,s){var a=n&o2,o=Rl(e),c=o.length,l=Rl(t),u=l.length;if(c!=u&&!a)return!1;for(var d=c;d--;){var h=o[d];if(!(a?h in t:c2.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<c;){h=o[d];var v=e[h],x=t[h];if(i)var b=a?i(x,v,h,t,e,s):i(v,x,h,e,t,s);if(!(b===void 0?v===x||r(v,x,n,i,s):b)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var O=e.constructor,E=t.constructor;O!=E&&"constructor"in e&&"constructor"in t&&!(typeof O=="function"&&O instanceof O&&typeof E=="function"&&E instanceof E)&&(g=!1)}return s.delete(e),s.delete(t),g}var h2=1,Sp="[object Arguments]",Op="[object Array]",fa="[object Object]",d2=Object.prototype,Tp=d2.hasOwnProperty;function f2(e,t,n,i,r,s){var a=jt(e),o=jt(t),c=a?Op:wi(e),l=o?Op:wi(t);c=c==Sp?fa:c,l=l==Sp?fa:l;var u=c==fa,d=l==fa,h=c==l;if(h&&_i(e)){if(!_i(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Me),a||aa(e)?wp(e,t,n,i,r,s):a2(e,t,c,n,i,r,s);if(!(n&h2)){var f=u&&Tp.call(e,"__wrapped__"),p=d&&Tp.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new Me),r(g,m,n,i,s)}}return h?(s||(s=new Me),u2(e,t,n,i,r,s)):!1}function pa(e,t,n,i,r){return e===t?!0:e==null||t==null||!Be(e)&&!Be(t)?e!==e&&t!==t:f2(e,t,n,i,pa,r)}var p2=1,m2=2;function g2(e,t,n,i){var r=n.length,s=r,a=!i;if(e==null)return!s;for(e=Object(e);r--;){var o=n[r];if(a&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<s;){o=n[r];var c=o[0],l=e[c],u=o[1];if(a&&o[2]){if(l===void 0&&!(c in e))return!1}else{var d=new Me;if(i)var h=i(l,u,c,e,t,d);if(!(h===void 0?pa(u,l,p2|m2,i,d):h))return!1}}return!0}function Cp(e){return e===e&&!_e(e)}function v2(e){for(var t=br(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,Cp(r)]}return t}function Mp(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function y2(e){var t=v2(e);return t.length==1&&t[0][2]?Mp(t[0][0],t[0][1]):function(n){return n===e||g2(n,e,t)}}function _2(e,t){return e!=null&&t in Object(e)}function x2(e,t,n){t=Wf(t,e);for(var i=-1,r=t.length,s=!1;++i<r;){var a=ca(t[i]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++i!=r?s:(r=e==null?0:e.length,!!r&&Tl(r)&&Ol(a,r)&&(jt(e)||yi(e)))}function b2(e,t){return e!=null&&x2(e,t,_2)}var w2=1,E2=2;function S2(e,t){return $l(e)&&Cp(t)?Mp(ca(e),t):function(n){var i=Ot(n,e);return i===void 0&&i===t?b2(n,e):pa(t,i,w2|E2)}}function O2(e){return function(t){return t==null?void 0:t[e]}}function T2(e){return function(t){return Yf(t,e)}}function C2(e){return $l(e)?O2(ca(e)):T2(e)}function ma(e){return typeof e=="function"?e:e==null?bl:typeof e=="object"?jt(e)?S2(e[0],e[1]):y2(e):C2(e)}function M2(e){return function(t,n,i){for(var r=-1,s=Object(t),a=i(t),o=a.length;o--;){var c=a[e?o:++r];if(n(s[c],c,s)===!1)break}return t}}var $2=M2();const $p=$2;function Hl(e,t,n){(n!==void 0&&!yr(e[t],n)||n===void 0&&!(t in e))&&ra(e,t,n)}function Vl(e){return Be(e)&&Bn(e)}function Fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function A2(e){return _r(e,wr(e))}function L2(e,t,n,i,r,s,a){var o=Fl(e,n),c=Fl(t,n),l=a.get(c);if(l){Hl(e,n,l);return}var u=s?s(o,c,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=jt(c),f=!h&&_i(c),p=!h&&!f&&aa(c);u=c,h||f||p?jt(o)?u=o:Vl(o)?u=Df(o):f?(d=!1,u=ep(c,!0)):p?(d=!1,u=fp(c,!0)):u=[]:nM(c)||yi(c)?(u=o,yi(o)?u=A2(o):(!_e(o)||wl(o))&&(u=pp(c))):d=!1}d&&(a.set(c,u),r(u,c,i,s,a),a.delete(c)),Hl(e,n,u)}function Ap(e,t,n,i,r){e!==t&&$p(t,function(s,a){if(r||(r=new Me),_e(s))L2(e,t,a,n,Ap,i,r);else{var o=i?i(Fl(e,a),s,a+"",e,t,r):void 0;o===void 0&&(o=s),Hl(e,a,o)}},wr)}function D2(e,t,n){for(var i=-1,r=e==null?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function k2(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var R2="[object Map]",I2="[object Set]",P2=Object.prototype,N2=P2.hasOwnProperty;function $e(e){if(e==null)return!0;if(Bn(e)&&(jt(e)||typeof e=="string"||typeof e.splice=="function"||_i(e)||aa(e)||yi(e)))return!e.length;var t=wi(e);if(t==R2||t==I2)return!e.size;if(sa(e))return!qf(e).length;for(var n in e)if(N2.call(e,n))return!1;return!0}var U2=yT(function(e,t,n){Ap(e,t,n)});const nt=U2;var B2=1/0,H2=bi&&1/Ul(new bi([,-0]))[1]==B2?function(e){return new bi(e)}:ZO;const V2=H2;var F2=200;function Lp(e,t,n){var i=-1,r=hT,s=e.length,a=!0,o=[],c=o;if(n)a=!1,r=D2;else if(s>=F2){var l=t?null:V2(e);if(l)return Ul(l);a=!1,r=bp,c=new Tr}else c=t?[]:o;t:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue t;t&&c.push(d),o.push(u)}else r(c,d,n)||(c!==o&&c.push(d),o.push(u))}return o}var G2=If(function(e){var t=k2(e);return Vl(t)&&(t=void 0),Lp(ua(e,1,Vl,!0),ma(t))});const z2=G2;function j2(e){return e&&e.length?Lp(e):[]}const rn=H$,Cr=j2;function q2(e,t,n){let i=null;return(...r)=>{const s=this;s.mousePosition=wn(r[0],n),clearTimeout(i),i=setTimeout(function(){e.apply(s,r)},t)}}function At(e,t){var n;const i=rn(e),r=Object.keys(t.axes||{});(n=t==null?void 0:t.toolbar)!=null&&n.controls&&delete i.toolbar.controls,r.length===0&&delete i.axes;for(const s in i.axes)if(r.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://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format"),a.mapsTo==null){const c=a.scaleType;c==null?a.mapsTo="value":c===Z.TIME?a.mapsTo="date":c===Z.LABELS&&(a.mapsTo="key")}}else delete i.axes[s];return Gl(i,t),nt(i,t)}function sn(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 i=n[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:i[0],ty:i[1]}}return null}function Mr(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 Dp(e,t,n="value"){const i=e/t.reduce((r,s)=>r+s[n],0)*100;return i%1!==0?parseFloat(i.toFixed(1)):i}function $r(e,t,n){if(n>e.length)return e;if(t===Te.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Te.FRONT_LINE)return"..."+e.substr(-n);if(t===Te.END_LINE)return e.substr(0,n)+"..."}function Gl(e,t){const n=w(e,"legend","additionalItems"),i=w(t,"legend","additionalItems");if(n&&i){const r=i.map(o=>o.type),s=n.map(o=>o.type),a=wf.filter(o=>s.includes(o.type)&&!r.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=z2(a,i,"name")}}const w=(e,...t)=>{let n=e;if(n){for(const i of t)if(n[i]!==null&&n[i]!==void 0)n=n[i];else return null;return n}return null},kp=(e,t)=>t===Ft.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ee=(e,t)=>{const{x0:n,x1:i,y0:r,y1:s}=kp(e,t);return`M${n},${r}L${n},${s}L${i},${s}L${i},${r}L${n},${r}`};function an(e,t,n){return n===Ft.VERTICAL?[e,t]:[t,e]}const Ei={type:Te.END_LINE,threshold:16,numCharacter:14},W2={enabled:!0,position:dr.BOTTOM,clickable:!0,truncation:Ei,alignment:Nt.LEFT,order:null,additionalItems:[]},Rp={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Ip={enabled:!0},zl={enabled:!0,showTotal:!0,truncation:Ei,groupLabel:"Group"},Pp={top:{visible:!0,includeZero:!0,truncation:Ei},bottom:{visible:!0,includeZero:!0,truncation:Ei},left:{visible:!0,includeZero:!0,truncation:Ei},right:{visible:!0,includeZero:!0,truncation:Ei}},Ar={addSpaceOnEdges:1,showDayName:!1,localeObject:_f,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"}}},Y2=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),Qt={width:null,height:null,resizable:!0,theme:hf.WHITE,tooltip:zl,legend:W2,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:Dt.SHOW_AS_DATATABLE},...Y2?[{type:Dt.MAKE_FULLSCREEN}]:[],{type:Dt.EXPORT_CSV},{type:Dt.EXPORT_PNG},{type:Dt.EXPORT_JPG}]}},Np=nt({},Qt,{thematic:{projection:tn.geoNaturalEarth1}}),Lr=nt({},Qt,{axes:Pp,timeScale:Ar,grid:Rp,ruler:Ip,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:Pe.GRAPH_VIEW}}}),Fn=nt({},Lr,{bars:{maxWidth:16,spacingFactor:.25},timeScale:nt(Ar,{addSpaceOnEdges:1})}),X2=nt({},Fn,{}),Z2=nt({},Fn,{}),K2=nt({},Fn,{bars:nt({},Fn.bars,{dividerSize:1.5})}),Q2=nt({},Fn,{}),jl=nt({},Lr,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),J2=jl,Up=nt({},jl,{points:{radius:3,filled:!1,enabled:!0}}),Bp=nt({},Up,{timeScale:nt(Ar,{addSpaceOnEdges:0})}),tA=Bp,eA=nt({},Lr,{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:Bt.RADIUS,name:"Radius"}]}}),nA=nt({},Lr,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Bt.AREA,name:"Poor area"},{type:Bt.AREA,name:"Satisfactory area"},{type:Bt.AREA,name:"Great area"},{type:Bt.QUARTILE,name:"Quartiles"}]}}),iA=nt({},Fn,{bars:{dividerSize:1.5},timeScale:nt(Ar,{addSpaceOnEdges:0})}),rA=nt({},Qt,{tooltip:nt({},zl,{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"}}),Hp=nt({},Qt,{pie:{labels:{formatter:null,enabled:!0},alignment:Nt.LEFT,sortFunction:null,valueMapsTo:"value"}}),sA=nt({},Qt,{legend:{enabled:!1},gauge:{type:fi.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:Nt.LEFT}}),aA=nt({},Hp,{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:Nt.LEFT}}),Vp=nt({},Qt,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),oA=nt({},Vp,{legend:{enabled:!0}}),lA=nt({},Qt,{radar:{axes:{angle:"key",value:"value"},alignment:Nt.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:e=>e??"N/A"}}),cA=nt({},Fn,{comboChartTypes:[]}),uA=nt({tree:{type:dl.TREE}},Qt,{}),hA=nt({},Qt,{data:nt(Qt.data,{groupMapsTo:"name"})}),dA=nt({},Qt,In,{data:nt(Qt.data,{groupMapsTo:"name"})}),fA=nt({},Qt,{alluvial:{data:nt(Qt.data,{groupMapsTo:"source"}),nodeAlignment:Nt.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),pA=nt({},Qt,{axes:Pp,heatmap:{divider:{state:pr.AUTO},colorLegend:{type:"linear"}}}),mA=nt({},Np,{choropleth:{colorLegend:{type:"linear"}}}),wt={alluvialChart:fA,areaChart:Bp,axisChart:Lr,boxplotChart:Q2,bubbleChart:eA,bulletChart:nA,chart:Qt,circlePackChart:dA,choroplethChart:mA,comboChart:cA,donutChart:aA,gaugeChart:sA,groupedBarChart:Z2,heatmapChart:pA,histogramChart:iA,lineChart:Up,lollipopChart:J2,meterChart:Vp,pieChart:Hp,proportionalMeterChart:oA,radarChart:lA,scatterChart:jl,simpleBarChart:X2,stackedAreaChart:tA,stackedBarChart:K2,thematicChart:Np,treeChart:uA,treemapChart:hA,wordCloudChart:rA},Fp=Object.freeze(Object.defineProperty({__proto__:null,alluvial:ve,area:Ne,axis:gi,baseTooltip:zl,boxplot:de,canvasZoomSettings:vi,carbonPrefix:te,circlePack:In,color:vl,defaultLegendAdditionalItems:wf,grid:Rp,heatmap:yl,histogram:xf,legend:kt,lines:Ue,meter:Gt,options:wt,pie:Et,radar:pn,ruler:Ip,spacers:_l,timeScale:Ar,toolbar:fO,tooltips:bf,transitions:xl,zoomBar:se},Symbol.toStringTag,{value:"Module"}));var Gp=(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))(Gp||{});const ql=[["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 zp(e,t,n,i,r){const s=t===0,a=Number(mi(new Date(e),"c"))===2,o=Number(mi(new Date(e),"q"))===1,c=t!==0?n[t-1]:null;switch(i){case"15seconds":return s||va(e)||Dr(e,c)||mn(e);case"minute":return s||va(e)||Dr(e,c)||mn(e);case"30minutes":return s||va(e)||Dr(e,c)||mn(e);case"hourly":return s||va(e)||Dr(e,c)||mn(e);case"daily":return r?s||a||mn(e):s||Dr(e,c)||mn(e);case"weekly":return s||a||mn(e);case"monthly":return s||mn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${i} is not a valid time interval.`)}}function Wl(e,t,n,i,r){const s=r.showDayName,a=i==="daily"&&s?"weekly":i,o=new Date(e),c=w(r,"timeIntervalFormats")[a],l=w(c,"primary"),u=w(c,"secondary");let d=zp(e,t,n,i,s)?l:u;i==="15seconds"&&o.getMilliseconds()!==0&&(d=d.replace("pp","h:mm:ss.SSS a"));const h=r.localeObject;return mi(o,d,{locale:h})}function ga(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function gA(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function vA(e){const t=ql.reduce((n,[,i],r)=>{const s=ql[n][1],a=Math.abs(s-e),o=Math.abs(i-e);return a<o?n:r},0);return ql[t][0]}function Yl(e,t){if(Gp[t])return t;if(e.length===1)return"15seconds";const n=gA(e),i=cn(n);return vA(i)}function va(e){const{s:t,m:n,H:i}=ga(e);return i===0&&n===0&&t===0}function Dr(e,t){const n=ga(e).M,i=ga(t).M;return n!==i}function mn(e){const{M:t,d:n,s:i,m:r,H:s}=ga(e);return t===1&&n===1&&s===0&&r===0&&i===0}function jp(e){return e===void 0?"":e.toISOString()}var yA=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}};/*! dom-to-image-more 26-04-2023 */(function(e,t){(function(n){const i=function(){let S=0;return{escape:function(_){return _.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")},isDataUrl:function(_){return _.search(/^(data:)/)!==-1},canvasToBlob:function(_){return _.toBlob?new Promise(function($){_.toBlob($)}):function($){return new Promise(function(y){var k=f($.toDataURL().split(",")[1]),R=k.length,U=new Uint8Array(R);for(let N=0;N<R;N++)U[N]=k.charCodeAt(N);y(new Blob([U],{type:"image/png"}))})}(_)},resolveUrl:function(_,$){var y=document.implementation.createHTMLDocument(),k=y.createElement("base"),R=(y.head.appendChild(k),y.createElement("a"));return y.body.appendChild(R),k.href=$,R.href=_,R.href},getAndEncode:function(_){let $=u.impl.urlCache.find(function(y){return y.url===_});return $||($={url:_,promise:null},u.impl.urlCache.push($)),$.promise===null&&(u.impl.options.cacheBust&&(_+=(/\?/.test(_)?"&":"?")+new Date().getTime()),$.promise=new Promise(function(y){const k=u.impl.options.httpTimeout,R=new XMLHttpRequest;R.onreadystatechange=function(){if(R.readyState===4)if(R.status!==200)U?y(U):G(`cannot fetch resource: ${_}, status: `+R.status);else{const z=new FileReader;z.onloadend=function(){y(z.result)},z.readAsDataURL(R.response)}},R.ontimeout=function(){U?y(U):G(`timeout of ${k}ms occured while fetching resource: `+_)},R.responseType="blob",R.timeout=k,u.impl.options.useCredentials&&(R.withCredentials=!0),R.open("GET",_,!0),R.send();let U;var N;function G(z){console.error(z),y("")}u.impl.options.imagePlaceholder&&(N=u.impl.options.imagePlaceholder.split(/,/))&&N[1]&&(U=N[1])})),$.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+S++},delay:function(_){return function($){return new Promise(function(y){setTimeout(function(){y($)},_)})}},asArray:function(_){var $=[],y=_.length;for(let k=0;k<y;k++)$.push(_[k]);return $},escapeXhtml:function(_){return _.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(_){return _!=="data:,"?new Promise(function($,y){const k=new Image;u.impl.options.useCredentials&&(k.crossOrigin="use-credentials"),k.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame(function(){$(k)}):$(k)},k.onerror=y,k.src=_}):Promise.resolve()},width:function(_){var $=B(_,"width");if(!isNaN($))return $;var $=B(_,"border-left-width"),y=B(_,"border-right-width");return _.scrollWidth+$+y},height:function(_){var $=B(_,"height");if(!isNaN($))return $;var $=B(_,"border-top-width"),y=B(_,"border-bottom-width");return _.scrollHeight+$+y},getWindow:A,isElement:C,isElementHostForOpenShadowRoot:function(_){return C(_)&&_.shadowRoot!==null},isShadowRoot:D,isInShadowRoot:L,isHTMLElement:function(_){return _ instanceof A(_).HTMLElement},isHTMLCanvasElement:function(_){return _ instanceof A(_).HTMLCanvasElement},isHTMLInputElement:function(_){return _ instanceof A(_).HTMLInputElement},isHTMLImageElement:function(_){return _ instanceof A(_).HTMLImageElement},isHTMLLinkElement:function(_){return _ instanceof A(_).HTMLLinkElement},isHTMLScriptElement:function(_){return _ instanceof A(_).HTMLScriptElement},isHTMLStyleElement:function(_){return _ instanceof A(_).HTMLStyleElement},isHTMLTextAreaElement:function(_){return _ instanceof A(_).HTMLTextAreaElement},isShadowSlotElement:function(_){return L(_)&&_ instanceof A(_).HTMLSlotElement},isSVGElement:function(_){return _ instanceof A(_).SVGElement},isSVGRectElement:function(_){return _ instanceof A(_).SVGRectElement},isDimensionMissing:function(_){return isNaN(_)||_<=0}};function A(_){return _=_?_.ownerDocument:void 0,(_?_.defaultView:void 0)||n||window}function D(_){return _ instanceof A(_).ShadowRoot}function L(_){return _!==null&&Object.prototype.hasOwnProperty.call(_,"getRootNode")&&D(_.getRootNode())}function C(_){return _ instanceof A(_).Element}function B(_,$){if(_.nodeType===d){let y=h(_).getPropertyValue($);if(y.slice(-2)==="px")return y=y.slice(0,-2),parseFloat(y)}return NaN}}(),r=function(){const S=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(C,B,_){return A(C)?Promise.resolve(C).then(D).then(function($){let y=Promise.resolve(C);return $.forEach(function(k){y=y.then(function(R){return L(R,k,B,_)})}),y}):Promise.resolve(C)},shouldProcess:A,impl:{readUrls:D,inline:L}};function A(C){return C.search(S)!==-1}function D(C){for(var B,_=[];(B=S.exec(C))!==null;)_.push(B[1]);return _.filter(function($){return!i.isDataUrl($)})}function L(C,B,_,$){return Promise.resolve(B).then(function(y){return _?i.resolveUrl(y,_):y}).then($||i.getAndEncode).then(function(y){return C.replace((k=B,new RegExp(`(url\\(['"]?)(${i.escape(k)})(['"]?\\))`,"g")),`$1${y}$3`);var k})}}(),s={resolveAll:function(){return a().then(function(S){return Promise.all(S.map(function(A){return A.resolve()}))}).then(function(S){return S.join(`
2
+ `)})},impl:{readAll:a}};function a(){return Promise.resolve(i.asArray(document.styleSheets)).then(function(A){const D=[];return A.forEach(function(L){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(L),"cssRules"))try{i.asArray(L.cssRules||[]).forEach(D.push.bind(D))}catch(C){console.error("domtoimage: Error while reading CSS rules from "+L.href,C.toString())}}),D}).then(function(A){return A.filter(function(D){return D.type===CSSRule.FONT_FACE_RULE}).filter(function(D){return r.shouldProcess(D.style.getPropertyValue("src"))})}).then(function(A){return A.map(S)});function S(A){return{resolve:function(){var D=(A.parentStyleSheet||{}).href;return r.inlineAll(A.cssText,D)},src:function(){return A.style.getPropertyValue("src")}}}}const o={inlineAll:function S(A){if(!i.isElement(A))return Promise.resolve(A);return D(A).then(function(){return i.isHTMLImageElement(A)?c(A).inline():Promise.all(i.asArray(A.childNodes).map(function(L){return S(L)}))});function D(L){const C=["background","background-image"],B=C.map(function(_){const $=L.style.getPropertyValue(_),y=L.style.getPropertyPriority(_);return $?r.inlineAll($).then(function(k){L.style.setProperty(_,k,y)}):Promise.resolve()});return Promise.all(B).then(function(){return L})}},impl:{newImage:c}};function c(S){return{inline:function(A){return i.isDataUrl(S.src)?Promise.resolve():Promise.resolve(S.src).then(A||i.getAndEncode).then(function(D){return new Promise(function(L){S.onload=L,S.onerror=L,S.src=D})})}}}const l={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict"},u={toSvg:p,toPng:function(S,A){return g(S,A).then(function(D){return D.toDataURL()})},toJpeg:function(S,A){return g(S,A).then(function(D){return D.toDataURL("image/jpeg",(A?A.quality:void 0)||1)})},toBlob:function(S,A){return g(S,A).then(i.canvasToBlob)},toPixelData:function(S,A){return g(S,A).then(function(D){return D.getContext("2d").getImageData(0,0,i.width(S),i.height(S)).data})},toCanvas:g,impl:{fontFaces:s,images:o,util:i,inliner:r,urlCache:[],options:{}}},d=(e.exports=u,(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1),h=(n!==void 0?n.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,f=(n!==void 0?n.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function p(S,A){u.impl.util.getWindow(S);var D=A=A||{};D.copyDefaultStyles===void 0?u.impl.options.copyDefaultStyles=l.copyDefaultStyles:u.impl.options.copyDefaultStyles=D.copyDefaultStyles,D.imagePlaceholder===void 0?u.impl.options.imagePlaceholder=l.imagePlaceholder:u.impl.options.imagePlaceholder=D.imagePlaceholder,D.cacheBust===void 0?u.impl.options.cacheBust=l.cacheBust:u.impl.options.cacheBust=D.cacheBust,D.useCredentials===void 0?u.impl.options.useCredentials=l.useCredentials:u.impl.options.useCredentials=D.useCredentials,D.httpTimeout===void 0?u.impl.options.httpTimeout=l.httpTimeout:u.impl.options.httpTimeout=D.httpTimeout,D.styleCaching===void 0?u.impl.options.styleCaching=l.styleCaching:u.impl.options.styleCaching=D.styleCaching;let L=[];return Promise.resolve(S).then(function(C){if(C.nodeType===d)return C;var B=C,_=C.parentNode,$=document.createElement("span");return _.replaceChild($,B),$.append(C),L.push({parent:_,child:B,wrapper:$}),$}).then(function(C){return function B(_,$,y,k){const R=$.filter;if(_===m||i.isHTMLScriptElement(_)||i.isHTMLStyleElement(_)||i.isHTMLLinkElement(_)||y!==null&&R&&!R(_))return Promise.resolve();return Promise.resolve(_).then(U).then(function(F){return G(F,N(_))}).then(function(F){return z(F,_)});function U(F){return i.isHTMLCanvasElement(F)?i.makeImage(F.toDataURL()):F.cloneNode(!1)}function N(F){return i.isElementHostForOpenShadowRoot(F)?F.shadowRoot:F}function G(F,Q){const j=tt(Q);let X=Promise.resolve();if(j.length!==0){const lt=h(ot(Q));i.asArray(j).forEach(function(q){X=X.then(function(){return B(q,$,lt).then(function(W){W&&F.appendChild(W)})})})}return X.then(function(){return F});function ot(lt){return i.isShadowRoot(lt)?lt.host:lt}function tt(lt){return i.isShadowSlotElement(lt)?lt.assignedNodes():lt.childNodes}}function z(F,Q){return!i.isElement(F)||i.isShadowSlotElement(Q)?Promise.resolve(F):Promise.resolve().then(j).then(X).then(ot).then(tt).then(function(){return F});function j(){function lt(W,Y){Y.font=W.font,Y.fontFamily=W.fontFamily,Y.fontFeatureSettings=W.fontFeatureSettings,Y.fontKerning=W.fontKerning,Y.fontSize=W.fontSize,Y.fontStretch=W.fontStretch,Y.fontStyle=W.fontStyle,Y.fontVariant=W.fontVariant,Y.fontVariantCaps=W.fontVariantCaps,Y.fontVariantEastAsian=W.fontVariantEastAsian,Y.fontVariantLigatures=W.fontVariantLigatures,Y.fontVariantNumeric=W.fontVariantNumeric,Y.fontVariationSettings=W.fontVariationSettings,Y.fontWeight=W.fontWeight}function q(W,Y){const V=h(W);V.cssText?(Y.style.cssText=V.cssText,lt(V,Y.style)):(b($,W,V,y,Y),y===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(xt=>Y.style.removeProperty(xt)),["left","right","top","bottom"].forEach(xt=>{Y.style.getPropertyValue(xt)&&Y.style.setProperty(xt,"0px")})))}q(Q,F)}function X(){const lt=i.uid();function q(W){const Y=h(Q,W),V=Y.getPropertyValue("content");if(V!==""&&V!=="none"){let xt=function(){const Wt=`.${lt}:`+W,et=(Y.cssText?Lt:jn)();return document.createTextNode(Wt+`{${et}}`);function Lt(){return`${Y.cssText} content: ${V};`}function jn(){return i.asArray(Y).map(Fe).join("; ")+";";function Fe(Lc){const uV=Y.getPropertyValue(Lc),hV=Y.getPropertyPriority(Lc)?" !important":"";return Lc+": "+uV+hV}}};const pt=F.getAttribute("class")||"",zt=(F.setAttribute("class",pt+" "+lt),document.createElement("style"));zt.appendChild(xt()),F.appendChild(zt)}}[":before",":after"].forEach(function(W){q(W)})}function ot(){i.isHTMLTextAreaElement(Q)&&(F.innerHTML=Q.value),i.isHTMLInputElement(Q)&&F.setAttribute("value",Q.value)}function tt(){i.isSVGElement(F)&&(F.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.isSVGRectElement(F))&&["width","height"].forEach(function(lt){const q=F.getAttribute(lt);q&&F.style.setProperty(lt,q)})}}}(C,A,null)}).then(v).then(x).then(function(C){A.bgcolor&&(C.style.backgroundColor=A.bgcolor),A.width&&(C.style.width=A.width+"px"),A.height&&(C.style.height=A.height+"px"),A.style&&Object.keys(A.style).forEach(function(_){C.style[_]=A.style[_]});let B=null;return typeof A.onclone=="function"&&(B=A.onclone(C)),Promise.resolve(B).then(function(){return C})}).then(function(C){let B=A.width||i.width(C),_=A.height||i.height(C);return Promise.resolve(C).then(function($){return $.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString($)}).then(i.escapeXhtml).then(function($){var y=(i.isDimensionMissing(B)?' width="100%"':` width="${B}"`)+(i.isDimensionMissing(_)?' height="100%"':` height="${_}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(i.isDimensionMissing(B)?"":` width="${B}"`)+(i.isDimensionMissing(_)?"":` height="${_}"`)}><foreignObject${y}>${$}</foreignObject></svg>`}).then(function($){return"data:image/svg+xml;charset=utf-8,"+$})}).then(function(C){for(;0<L.length;){var B=L.pop();B.parent.replaceChild(B.child,B.wrapper)}return C}).then(function(C){return u.impl.urlCache=[],function(){m&&(document.body.removeChild(m),m=null),O&&clearTimeout(O),O=setTimeout(()=>{O=null,E={}},2e4)}(),C})}function g(S,A){return p(S,A=A||{}).then(i.makeImage).then(function(D){var L=typeof A.scale!="number"?1:A.scale,C=function(_,$){let y=A.width||i.width(_),k=A.height||i.height(_);return i.isDimensionMissing(y)&&(y=i.isDimensionMissing(k)?300:2*k),i.isDimensionMissing(k)&&(k=y/2),_=document.createElement("canvas"),_.width=y*$,_.height=k*$,A.bgcolor&&(($=_.getContext("2d")).fillStyle=A.bgcolor,$.fillRect(0,0,_.width,_.height)),_}(S,L),B=C.getContext("2d");return B.msImageSmoothingEnabled=!1,B.imageSmoothingEnabled=!1,D&&(B.scale(L,L),B.drawImage(D,0,0)),C})}let m=null;function v(S){return s.resolveAll().then(function(A){var D;return A!==""&&(D=document.createElement("style"),S.appendChild(D),D.appendChild(document.createTextNode(A))),S})}function x(S){return o.inlineAll(S).then(function(){return S})}function b(S,A,D,L,C){const B=u.impl.options.copyDefaultStyles?function($,R){var R=function(N){var G=[];do if(N.nodeType===d){var z=N.tagName;if(G.push(z),T.includes(z))break}while(N=N.parentNode,N);return G}(R),k=function(N){return($.styleCaching!=="relaxed"?N:N.filter((G,z,F)=>z===0||z===F.length-1)).join(">")}(R);if(E[k])return E[k];var U=function(){if(m)return m.contentWindow;var N=document.characterSet||"UTF-8",G=document.doctype,G=G?(`<!DOCTYPE ${z(G.name)} ${z(G.publicId)} `+z(G.systemId)).trim()+">":"";return(m=document.createElement("iframe")).id="domtoimage-sandbox-"+i.uid(),m.style.visibility="hidden",m.style.position="fixed",document.body.appendChild(m),function(F,Q,j,X){try{return F.contentWindow.document.write(Q+`<html><head><meta charset='${j}'><title>${X}</title></head><body></body></html>`),F.contentWindow}catch{}var ot=document.createElement("meta");ot.setAttribute("charset",j);try{var tt=document.implementation.createHTMLDocument(X),lt=(tt.head.appendChild(ot),Q+tt.documentElement.outerHTML);return F.setAttribute("srcdoc",lt),F.contentWindow}catch{}return F.contentDocument.head.appendChild(ot),F.contentDocument.title=X,F.contentWindow}(m,G,N,"domtoimage-sandbox");function z(F){var Q;return F?((Q=document.createElement("div")).innerText=F,Q.innerHTML):""}}(),R=function(N,G){let z=N.body;do{var F=G.pop(),F=N.createElement(F);z.appendChild(F),z=F}while(0<G.length);return z.textContent="​",z}(U.document,R),U=function(N,G){const z={},F=N.getComputedStyle(G);return i.asArray(F).forEach(function(Q){z[Q]=Q==="width"||Q==="height"?"auto":F.getPropertyValue(Q)}),z}(U,R);return function(N){do{var G=N.parentElement;G!==null&&G.removeChild(N),N=G}while(N&&N.tagName!=="BODY")}(R),E[k]=U}(S,A):{},_=C.style;i.asArray(D).forEach(function($){var y,k=D.getPropertyValue($),R=B[$],U=L?L.getPropertyValue($):void 0;(k!==R||L&&k!==U)&&(R=D.getPropertyPriority($),U=_,k=k,R=R,y=0<=["background-clip"].indexOf($=$),R?(U.setProperty($,k,R),y&&U.setProperty("-webkit-"+$,k,R)):(U.setProperty($,k),y&&U.setProperty("-webkit-"+$,k)))})}let O=null,E={};const T=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]})(yA)})(Wp);var _A=Wp.exports;const Yp=qp(_A);function Xp(e){const t=xe(e,i=>i.value),n=Oe().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 Zp(e,t){const n=w(t,"gradient","colors"),i=!$e(n);let r=w(t,"pairing","option");const s=Xp(e),a=s[0]<0&&s[1]>0?"diverge":"mono";(r<1&&r>4&&a==="mono"||r<1&&r>2&&a==="diverge")&&(r=1);const o=i?n:[];if(!i){const c=a==="diverge"?17:11;for(let l=1;l<c+1;l++)o.push(`fill-${a}-${r}-${l}`)}return jo().domain(s).range(o)}var at=(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))(at||{});function xA(e,t){return e&&$p(e,t,br)}function bA(e,t){return function(n,i){if(n==null)return n;if(!Bn(n))return e(n,i);for(var r=n.length,s=t?r:-1,a=Object(n);(t?s--:++s<r)&&i(a[s],s,a)!==!1;);return n}}var wA=bA(xA);const Xl=wA;function EA(e,t,n,i){for(var r=-1,s=e==null?0:e.length;++r<s;){var a=e[r];t(i,a,n(a),e)}return i}function SA(e,t,n,i){return Xl(e,function(r,s,a){t(i,r,n(r),a)}),i}function OA(e,t){return function(n,i){var r=jt(n)?EA:SA,s=t?t():{};return r(n,e,ma(i),s)}}function TA(e){for(var t=-1,n=e==null?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i}var CA=Object.prototype,MA=CA.hasOwnProperty,$A=OA(function(e,t,n){MA.call(e,n)?e[n].push(t):ra(e,n,[t])});const AA=$A;class He{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let i=this.getData();const r=this.getDataGroups(),{groupMapsTo:s}=w(n,"data"),a=w(n,"axes");return t&&(i=i.filter(o=>t.includes(o[s]))),a&&Object.keys(a).forEach(o=>{const c=a[o].mapsTo,l=a[o].scaleType;if((l===Z.LINEAR||l===Z.LOG)&&(i=i.map(u=>({...u,[c]:u[c]===null?u[c]:Number(u[c])}))),c&&a[o].domain)if(l===Z.LABELS)i=i.filter(u=>a[o].domain.includes(u[c]));else{const[u,d]=a[o].domain;i=i.filter(h=>!(c in h)||h[c]>=u&&h[c]<=d)}}),i.filter(o=>r.find(c=>c.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=kt.items.status,i=this.getDataGroups(t),{groupMapsTo:r}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(s=>i.find(a=>a.name===s[r]&&a.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(rn(t)),i=this.generateDataGroups(n);return this.set({data:n,dataGroups:i}),n}getDataGroups(t){return w(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(n=>t.includes(n.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=kt.items.status;return this.getDataGroups(t).filter(i=>i.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 AA(t,"group")}getBinConfigurations(){const t=this.getDisplayData(),n=this.getOptions(),i=this.services.cartesianScales.getMainXAxisPosition(),r=this.services.cartesianScales.getDomainIdentifier(),s=n.axes[i],{groupMapsTo:a}=n.data,{bins:o=xf.defaultBins}=s,c=Array.isArray(o),l=Yv().value(f=>f[r]).thresholds(o)(t);if(c)l[l.length-1].x1=o[o.length-1];else{const f=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+f}const u=c?[o[0],o[o.length-1]]:[l[0].x0,l[l.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return l.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(m=>{h.push({group:m,key:p,value:g[m]||0,bin:f.x0})})}),{bins:l,binsDomain:u}}getBinnedStackedData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getActiveDataGroupNames(),{bins:r}=this.getBinConfigurations(),s=this.getDataValuesGroupedByKeys({bins:r});return hl().keys(i)(s).map((a,o)=>Object.keys(a).filter(c=>!isNaN(c)).map(c=>{const l=a[c];return l[n]=i[o],l}))}getGroupedData(t){const n=this.getDisplayData(t),i={},{groupMapsTo:r}=this.getOptions().data;return n.map(s=>{const a=s[r];i[a]!==null&&i[a]!==void 0?i[a].push(s):i[a]=[s]}),Object.keys(i).map(s=>({name:s,data:i[s]}))}getStackKeys({bins:t=null,groups:n=null}={bins:null,groups:null}){const i=this.getOptions(),r=this.getDisplayData(n);let s;t?s=t.map(c=>`${c.x0}-${c.x1}`):s=Cr(r.map(c=>{const l=this.services.cartesianScales.getDomainIdentifier(c);return c[l]instanceof Date?jp(c[l]):c[l]&&typeof c[l].toString=="function"?c[l].toString():c[l]}));const a=this.services.cartesianScales.domainAxisPosition,o=i.axes[a].scaleType;return o===Z.TIME?s.sort((c,l)=>{const u=new Date(c),d=new Date(l);return u-d}):(o===Z.LOG||o===Z.LINEAR)&&s.sort((c,l)=>c-l),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(c=>{const[l,u]=c.split("-"),d={x0:l,x1:u},h=t.find(f=>f.x0.toString()===l.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[r]===f).length}),d}):o.map(c=>{const l={sharedStackKey:c};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[r]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?jp(f[p])===c:f[p].toString()===c)}),h=this.services.cartesianScales.getRangeIdentifier(l);l[u]=d?d[h]:null}),l})}getStackedData({percentage:t=!1,groups:n=null,divergent:i=!1}){const r=this.getOptions(),{groupMapsTo:s}=r.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=TA(o.map(l=>[l.sharedStackKey,0]));o.forEach(l=>{a.forEach(u=>{c[l.sharedStackKey]+=l[u]})}),o.forEach(l=>{a.forEach(u=>{const d=c[l.sharedStackKey];c[l.sharedStackKey]?l[u]=l[u]/d*100:l[u]=0})})}return(i?hl().offset(tS):hl()).keys(a)(o).map((c,l)=>Object.keys(c).filter(u=>!isNaN(u)).map(u=>{const d=c[u];return d[s]=a[l],d}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const i=Object.assign({skipUpdate:!1,animate:!0},n);i.skipUpdate||this.update(i.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();Gl(n,t),this.set({options:nt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(M.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:i}=kt.items.status,r=this.getDataGroups(),s=r.some(l=>l.status===i),a=r.filter(l=>l.status===n);if(s)if(a.length===1&&a[0].name===t)r.forEach((l,u)=>{r[u].status=n});else{const l=r.findIndex(u=>u.name===t);r[l].status=r[l].status===i?n:i}else r.forEach((l,u)=>{r[u].status=l.name===t?n:i});const o=r.filter(l=>l.status===n),c=this.getOptions();r.some(l=>l.status===i)?c.data.selectedGroups=o.map(l=>l.name):c.data.selectedGroups=[],this.services.events.dispatchEvent(M.Legend.ITEMS_UPDATE,{dataGroups:r}),this.set({dataGroups:r})}getIsFilled(t,n,i,r){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,i,r):r}getFillColor(t,n,i){const r=this.getOptions(),s=w(this.colorScale,t);return r.getFillColor?r.getFillColor(t,n,i,s):s}getStrokeColor(t,n,i){const r=this.getOptions(),s=w(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,n,i,s):s}isUserProvidedColorScaleValid(){const t=w(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(i=>Object.keys(t).includes(i.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let i=t.originalClassName;return t.classNameTypes.forEach(r=>i=t.originalClassName?`${i} ${r}-${n}`:`${r}-${n}`),i||""}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://carbon-design-system.github.io/carbon-charts/?path=/story/docs-tutorials--tabular-data-format");const n=[],{datasets:i,labels:r}=t;return i.forEach(s=>{s.data.forEach((a,o)=>{let c;const l=w(s,"label");if(l===null){const d=w(r,o);d?c=d:c="Ungrouped"}else c=l;const u={group:c,key:r[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(r=>r.map(s=>`"${s==="&ndash;"?"–":s}"`));let n="",i="";t.forEach(function(r,s){i=r.join(","),n+=s<t.length?i+`
3
+ `:i}),this.services.files.downloadCSV(n,"myChart.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:i,DISABLED:r}=kt.items.status,s=this.getOptions(),a=Cr(t.map(c=>c[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=c=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(c)?i:r;return a.map(c=>({name:c,status:o(c)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=w(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=w(this.getOptions(),"color","pairing");let n=w(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let i=w(t,"option");const r=vl.pairingOptions,s=n>5?14:n,a=`${s}-color`;i=i<=r[a]?i:1;const o=this.allDataGroups.map((c,l)=>`${s}-${i}-${l%14+1}`);this.colorClassNames=As().range(o).domain(this.allDataGroups)}}let Gn=class extends He{constructor(t){super(t),this.axisFlavor=Zs.DEFAULT}assignRangeAndDomains(){const{cartesianScales:t}=this.services,n=this.getOptions(),i=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return i&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach(s=>{const a=r[s];t.scales[a]?r[s]={position:a,label:t.getScaleLabel(a),identifier:w(n,"axes",a,"mapsTo")}:r[s]=null}),r}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,{cartesianScales:r}=this.services,{primaryDomain:s,primaryRange:a,secondaryDomain:o,secondaryRange:c}=this.assignRangeAndDomains(),l=r.getDomainAxisScaleType();let u;return l===Z.TIME&&(u=d=>mi(d,"MMM d, yyyy")),[["Group",s.label,a.label,...o?[o.label]:[],...c?[c.label]:[]],...t.map(d=>[d[i],d[s.identifier]===null?"&ndash;":u?u(d[s.identifier]):d[s.identifier],d[a.identifier]===null||isNaN(d[a.identifier])?"&ndash;":d[a.identifier].toLocaleString(),...o?[d[o.identifier]===null?"&ndash;":d[o.identifier]]:[],...c?[d[c.identifier]===null||isNaN(d[c.identifier])?"&ndash;":d[c.identifier]]:[]])]}setData(t){let n;if(t&&(n=super.setData(t),w(this.getOptions(),"zoomBar",H.TOP,"enabled"))){const i=w(this.getOptions(),"zoomBar",H.TOP,"data");this.setZoomBarData(i)}return n}setZoomBarData(t){const n=t?this.sanitize(rn(t)):this.getDisplayData();let i=n;const{cartesianScales:r}=this.services;if(n&&r.domainAxisPosition&&r.rangeAxisPosition){const s=r.getDomainIdentifier(),a=r.getRangeIdentifier();let o=n.map(c=>c[s].getTime());o=Cr(o).sort(),i=o.map(c=>{let l=0;const u={};return n.forEach(d=>{d[s].getTime()===c&&(l+=d[a])}),u[s]=new Date(c),u[a]=l,u})}this.set({zoomBarData:i})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){const n=this.getOptions();if(!n.axes)return t;const i=[];return Object.keys(H).forEach(r=>{const s=H[r],a=n.axes[s];if(a&&a.scaleType===Z.TIME){const o=a.mapsTo;(o!==null||o!==void 0)&&i.push(o)}}),i.length>0&&t.forEach(r=>{i.forEach(s=>{w(r,s,"getTime")===null&&(r[s]=new Date(r[s]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t),t}},LA=class extends Gn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData();return t.sort((n,i)=>n.source.localeCompare(i.source)),[["Source","Target","Value"],...t.map(n=>[n.source,n.target,n.value])]}},DA=class extends Gn{constructor(t){super(t)}getBoxQuartiles(t){return{q_25:Na(t,.25),q_50:Na(t,.5),q_75:Na(t,.75)}}getBoxplotData(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getGroupedData(),r=[];for(const{name:s,data:a}of i){const o=this.services.cartesianScales.getRangeIdentifier(),c=a.map(b=>b[o]).sort(_n),l={[n]:s,counts:c,quartiles:this.getBoxQuartiles(c),outliers:null,whiskers:null},u=l.quartiles.q_25,d=l.quartiles.q_75,h=(d-u)*1.5,f=u-h,p=d+h,g=[],m=[];for(const b of c)b<f||b>p?g.push(b):m.push(b);l.outliers=g;const v=cn(m),x=bn(m);l.whiskers={min:v||cn([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75]),max:x||bn([l.quartiles.q_25,l.quartiles.q_50,l.quartiles.q_75])},r.push(l)}return r}getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getBoxplotData();return[["Group","Minimum","Q1","Median","Q3","Maximum","IQR","Outlier(s)"],...i.map(r=>{let s=w(r,"outliers");return(s===null||s.length===0)&&(s=["&ndash;"]),[r[n],w(r,"whiskers","min")!==null?w(r,"whiskers","min").toLocaleString():"&ndash;",w(r,"quartiles","q_25")!==null?w(r,"quartiles","q_25").toLocaleString():"&ndash;",w(r,"quartiles","q_50")!==null?w(r,"quartiles","q_50").toLocaleString():"&ndash;",w(r,"quartiles","q_75")!==null?w(r,"quartiles","q_75").toLocaleString():"&ndash;",w(r,"whiskers","max")!==null?w(r,"whiskers","max").toLocaleString():"&ndash;",w(r,"quartiles","q_75")!==null&&w(r,"quartiles","q_25")!==null?(w(r,"quartiles","q_75")-w(r,"quartiles","q_25")).toLocaleString():"&ndash;",s.map(a=>a.toLocaleString()).join(",")]})]}setColorClassNames(){const t=w(this.getOptions(),"color","pairing");let n=w(t,"option");const i=vl.pairingOptions;n=n<=i["1-color"]?n:1;const r=this.allDataGroups.map(()=>`1-${n}-1`);this.colorClassNames=As().range(r).domain(this.allDataGroups)}},kA=class extends Gn{constructor(t){super(t)}getMatchingRangeIndexForDatapoint(t){let n;for(let i=t.ranges.length-1;i>0;i--){const r=t.ranges[i];if(t.value>=r)return n=i,n}return 0}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier(),s=w(n,"bullet","performanceAreaTitles");return[["Title","Group","Value","Target","Percentage","Performance"],...t.map(a=>[a.title,a[i],a.value===null?"&ndash;":a.value,w(a,"marker")===null?"&ndash;":a.marker,w(a,"marker")===null?"&ndash;":`${Math.floor(a[r]/a.marker*100)}%`,s[this.getMatchingRangeIndexForDatapoint(a)]])]}},RA=class extends He{constructor(t){super(t),this._colorScale=void 0,this._matrix={}}getFillColor(t){return this._colorScale(t)}getCombinedData(){if($e(this._matrix)){const t=this.getOptions(),n=this.getDisplayData();!$e(n)&&!$e(t.geoData.objects.countries)&&(t.geoData.objects.countries.geometries.forEach(i=>{this._matrix[i.properties.NAME]=i}),n.forEach(i=>{this._matrix[i.name]?this._matrix[i.name].value=i.value||null:console.warn(`Data point ${i} is missing geographical data.`)}))}return this._matrix}getTabularDataArray(){const t=this.getDisplayData();return[["Country ID","Country Name","Value"],...t.map(n=>[n.id===null?"&ndash;":n.id,n.name,n.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=w(this.getOptions(),"color");this._colorScale=Zp(this.getDisplayData(),t)}},IA=class extends He{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(),i=nt({},t,this.getZoomOptions(t));Gl(n,i);const r=this.getHierarchyLevel(),s=w(n,"circlePack","hierarchyLevel");this.set({options:nt(n,i),depth:s&&s<4?s:r})}getZoomOptions(t){if(!this.getDisplayData())return{};const n=this.getDisplayData(),i=t||this.getOptions(),r=n.length===1&&w(n,0,"children")?w(n,0,"children"):n;let s=this.getHierarchyLevel();return r.some(a=>{if(a.children&&a.children.some(o=>o.children))return s=3,!1}),w(i,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Bt.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:i}=n.data,r=t.map(s=>{const a=s[i];return this.setChildrenDataGroup(s,a)});this.set({data:r},{skipUpdate:!0})}setChildrenDataGroup(t,n){return t.children?{...t,dataGroupName:n,children:t.children.map(i=>this.setChildrenDataGroup(i,n))}:{...t,dataGroupName:n}}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent","Value"]];return t.forEach(i=>{let r=i.value?i.value:0;i.children&&(r+=this.getChildrenDatums(i.children,i.name,n,0)),n.push(["&ndash;",i.name,r])}),n}getChildrenDatums(t,n,i=[],r=0){const s=n;return t.forEach(a=>{const o=a.name;let c=0;if(a.children)a.children.length>0&&(typeof a.value=="number"&&(r+=a.value),c+=this.getChildrenDatums(a.children,o,i,c),i.push([o,s,c]),r+=c);else{let l=0;typeof a.value=="number"&&(l=a.value,r+=a.value),i.push([a.name,s,l])}}),r}},PA=class extends He{constructor(t){super(t)}getTabularData(t){const n=super.getTabularData(t);return t!==n&&n.forEach(i=>{i.key&&i.key!==i.group&&(i.group=i.key)}),n}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data;return[["Group","Value"],...t.map(r=>[r[i],r.value===null?"&ndash;":r.value.toLocaleString()])]}sanitize(t){return this.getTabularData(t).sort((n,i)=>i.value-n.value)}},NA=class extends He{constructor(t){super(t)}getDataGroups(){return super.getDataGroups().filter(t=>t.name!=="delta")}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data;return[["Group","Value"],...t.map(r=>[r[i],r.value===null?"&ndash;":r.value.toLocaleString()])]}},UA=class extends Gn{constructor(t){super(t),this.axisFlavor=Zs.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=w(this.getOptions(),"axes");if(w(n,"left","scaleType")&&w(n,"left","scaleType")!==Z.LABELS||w(n,"right","scaleType")&&w(n,"right","scaleType")!==Z.LABELS||w(n,"top","scaleType")&&w(n,"top","scaleType")!==Z.LABELS||w(n,"bottom","scaleType")&&w(n,"bottom","scaleType")!==Z.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=xe(this.getDisplayData(),i=>i.value),n=Oe().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($e(this._domains)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,i=n.getDomainIdentifier(),r=n.getMainXAxisPosition(),s=n.getCustomDomainValuesByposition(r);if(s)return s;this._domains=Array.from(new Set(t.map(a=>a[i])))}return this._domains}getUniqueRanges(){if($e(this._ranges)){const t=this.getDisplayData(),{cartesianScales:n}=this.services,i=n.getRangeIdentifier(),r=n.getMainYAxisPosition(),s=n.getCustomDomainValuesByposition(r);if(s)return s;this._ranges=Array.from(new Set(t.map(a=>a[i])))}return this._ranges}getMatrix(){if($e(this._matrix)){const t=this.getUniqueDomain(),n=this.getUniqueRanges(),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),s={};n.forEach(a=>{s[a]={value:null,index:-1}}),t.forEach(a=>{this._matrix[a]=rn(s)}),this.getDisplayData().forEach((a,o)=>{this._matrix[a[i]][a[r]]={value:a.value,index:o}})}return this._matrix}setData(t){const n=this.sanitize(rn(t)),i=this.generateDataGroups(n);return this.set({data:n,dataGroups:i}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){$e(this._matrix)&&this.getMatrix();const t=this.getUniqueDomain(),n=this.getUniqueRanges(),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier(),s=[];return t.forEach(a=>{n.forEach(o=>{const c={value:this._matrix[a][o].value,index:this._matrix[a][o].index};c[i]=a,c[r]=o,s.push(c)})}),s}getTabularDataArray(){const t=this.getDisplayData(),{primaryDomain:n,primaryRange:i}=this.assignRangeAndDomains();return[[n.label,i.label,"Value"],...t.map(r=>[r[n.identifier]===null?"&ndash;":r[n.identifier],r[i.identifier]===null?"&ndash;":r[i.identifier].toLocaleString(),r.value])]}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=w(t,"color","gradient","colors"),i=!$e(n);let r=w(t,"color","pairing","option");const s=this.getValueDomain(),a=s[0]<0&&s[1]>0?"diverge":"mono";(r<1&&r>4&&a==="mono"||r<1&&r>2&&a==="diverge")&&(r=1);const o=i?n:[];if(!i){const l=a==="diverge"?17:11;for(let u=1;u<l+1;u++)o.push(`fill-${a}-${r}-${u}`)}this._colorScale=jo().domain(s).range(o);const c=w(this.getOptions(),"color");this._colorScale=Zp(this.getDisplayData(),c)}},BA=class extends Gn{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this.getBinnedStackedData();return[[Ot(t,"bins.rangeLabel")||"Range",...i.map(r=>Ot(r,`0.${n}`))],...Ot(i,0).map((r,s)=>[`${Ot(r,"data.x0")} – ${Ot(r,"data.x1")}`,...i.map(a=>Ot(a[s],`data.${Ot(a[s],n)}`))])]}},HA=class extends He{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((n,i)=>n+i.value,0)}getFillColor(t){const n=this.getOptions(),i=w(n,"color","scale"),r=this.getStatus();return i||!r?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=w(this.getDisplayData()),{value:i}=n?n.reduce((a,o)=>({value:a.value+o.value})):0,r=w(t,"meter","proportional")?i:i>100?100:i,s=w(t,"meter","status","ranges");if(s){const a=s.filter(o=>o.range[0]<=r&&r<=o.range[1]);if(a.length>0)return a[0].status}return null}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getStatus(),s=w(n,"meter","proportional");let a=[],o;if(s===null){o=100;const c=t[0];a=[["Group","Value",...r?["Status"]:[]],[c[i],c.value,...r?[r]:[]]]}else o=w(s,"total")||this.getMaximumDomain(t),a=[["Group","Value","Percentage of total"],...t.map(l=>[l[i],l.value,(l.value/o*100).toFixed(2)+" %"])];return a}},VA=class extends Gn{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:i,value:r}=w(t,"radar","axes"),s=w(n,"0","data").map(a=>a[i]);return[["Group",...s],...n.map(a=>[a.name,...s.map((o,c)=>w(a,"data",c,r)!==null?w(a,"data",c,r).toLocaleString():"&ndash;")])]}},FA=class extends He{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Parent"]];return t.forEach(i=>{this.getChildrenDatums(i,n),n.push([i.name,"&ndash;"])}),n}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(i=>{this.getChildrenDatums(i,n),n.push([i.name,t.name])})}};class GA extends He{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=[["Child","Group","Value"]];return t.forEach(i=>{Array.isArray(i.children)?i.children.forEach(r=>{n.push([r.name,i.name,r.value])}):w(i.name)!==null&&w(i.value)&&n.push(["–",i.name,i.value])}),n}}let zA=class extends He{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:i,wordMapsTo:r}=n.wordCloud,{groupMapsTo:s}=n.data;return[[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],...t.map(a=>[a[r],a[s],a[i]])]}};var jA=/\s/;function qA(e){for(var t=e.length;t--&&jA.test(e.charAt(t)););return t}var WA=/^\s+/;function YA(e){return e&&e.slice(0,qA(e)+1).replace(WA,"")}var Kp=0/0,XA=/^[-+]0x[0-9a-f]+$/i,ZA=/^0b[01]+$/i,KA=/^0o[0-7]+$/i,QA=parseInt;function kr(e){if(typeof e=="number")return e;if(na(e))return Kp;if(_e(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=_e(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=YA(e);var n=ZA.test(e);return n||KA.test(e)?QA(e.slice(2),n?2:8):XA.test(e)?Kp:+e}var JA=function(){return Ce.Date.now()};const Zl=JA;var tL="Expected a function",eL=Math.max,nL=Math.min;function ya(e,t,n){var i,r,s,a,o,c,l=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(tL);t=kr(t)||0,_e(n)&&(u=!!n.leading,d="maxWait"in n,s=d?eL(kr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(T){var S=i,A=r;return i=r=void 0,l=T,a=e.apply(A,S),a}function p(T){return l=T,o=setTimeout(v,t),u?f(T):a}function g(T){var S=T-c,A=T-l,D=t-S;return d?nL(D,s-A):D}function m(T){var S=T-c,A=T-l;return c===void 0||S>=t||S<0||d&&A>=s}function v(){var T=Zl();if(m(T))return x(T);o=setTimeout(v,g(T))}function x(T){return o=void 0,h&&i?f(T):(i=r=void 0,a)}function b(){o!==void 0&&clearTimeout(o),l=0,i=c=r=o=void 0}function O(){return o===void 0?a:x(Zl())}function E(){var T=Zl(),S=m(T);if(i=arguments,r=this,c=T,S){if(o===void 0)return p(c);if(d)return clearTimeout(o),o=setTimeout(v,t),f(c)}return o===void 0&&(o=setTimeout(v,t)),a}return E.cancel=b,E.flush=O,E}let on=class{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}};const iL="DONT_STYLE_ME_css_styles_verifier";class I extends on{constructor(t,n){super(t,n),this.chartID=""}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=P(t));const i={width:0,height:0},r=h=>{h&&Object.keys(i).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>i[f]&&(""+p).indexOf("%")===-1&&(i[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,c,l,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),c={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(l=a.getBoundingClientRect(),u={width:l.width,height:l.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(r(s),i.width>0&&i.height>0))return i;if(n.useClientDimensions&&(r(d),i.width>0&&i.height>0))return d;if(n.useBBox&&(r(c),i.width>0&&i.height>0))return c;if(n.useBoundingRect&&(r(u),i.width>0&&i.height>0))return u}try{const h={width:w(t.node(),"width","baseVal","value"),height:w(t.node(),"height","baseVal","value")};r(h)}catch{r(d),r(c),r(s)}return i}static appendOrSelect(t,n){const i=t.select(`${n}`);if(i.empty()){let r=n.split("#"),s,a;return r.length===2?(s=r[0],r=r[1].split("."),a=r[0]):(r=n.split("."),s=r[0]),t.append(s).attr("id",a).attr("class",r.slice(1).join(" "))}return i}init(){this.styleHolderElement(),this.initializeID(),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=w(t,"style","prefix"),i=P(this.getHolder()).append("div").classed(`${te}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");i.append("g").attr("class",iL),this.mainContainer=i.node()}update(){this.styleHolderElement()}styleHolderElement(){const t=this.getHolder(),{width:n,height:i,theme:r}=this.model.getOptions();n!==this.width&&(t.style.width=n,this.width=n),i!==this.height&&(t.style.height=i,this.height=i),P(this.getHolder()).classed(`${te}--chart-holder`,!0).attr("data-carbon-theme",r)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.getHolder(),i=P(n);i.classed("filled",!0),Yp.toJpeg(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:r=>!(r.classList&&r.classList.contains("cds--cc--toolbar"))}).then(function(r){var s;(s=t.services.files)==null||s.downloadImage(r,"myChart.jpg"),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.getHolder(),i=P(n);i.classed("filled",!0),Yp.toPng(this.getMainContainer(),{bgcolor:typeof window<"u"?window.getComputedStyle(n).getPropertyValue("background-color"):void 0,quality:1,filter:r=>!(r.classList&&r.classList.contains("cds--cc--toolbar"))}).then(function(r){var s;(s=t.services.files)==null||s.downloadImage(r,"myChart.png"),i.classed("filled",!1)}).catch(function(r){console.error("oops, something went wrong!",r)})}toggleFullscreen(){const t=this.getHolder();P(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=P(this.getHolder()),n=t.classed("fullscreen");t.classed("fullscreen",!n)})}setSVGMaxHeight(){if(!this.model.getOptions().height){const{height:t}=I.getSVGElementSize(P(this.mainContainer),{useBBox:!0}),n=P(this.mainContainer).attr("class"),i=P(this.mainContainer).selectAll(`.${n} > svg`);let r=0;i.nodes().forEach(function(s){r+=Number(I.getSVGElementSize(P(s),{useBBox:!0}).height)}),r<=t?P(this.mainContainer).attr("height",r):P(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){const t=this.getHolder();t&&P(t).on("mouseover",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(M.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(M.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,i=t.clientHeight;const r=ya(()=>{var s;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(i-t.clientHeight)>1)&&(n=t.clientWidth,i=t.clientHeight,(s=this.services.events)==null||s.dispatchEvent(M.Chart.RESIZE))},12.5);new ResizeObserver(r).observe(t)}}let Kl=class $v extends on{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",i=>i.offset).style("stop-color",i=>i.color).style("stop-opacity",i=>i.opacity)}static getOffsetRatio(t){return(Math.abs(t[1])*100/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(t,n){const i=t[0]<0&&t[1]>0;let r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return i&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:$v.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};function Qp(e){const t=rL(Jp(e),360);return gn(t,[0,10])||gn(t,[350,0])?{textAnchor:Qe.START,dominantBaseline:Je.MIDDLE}:gn(t,[10,80])?{textAnchor:Qe.START,dominantBaseline:Je.HANGING}:gn(t,[80,100])?{textAnchor:Qe.MIDDLE,dominantBaseline:Je.HANGING}:gn(t,[100,170])?{textAnchor:Qe.END,dominantBaseline:Je.HANGING}:gn(t,[170,190])?{textAnchor:Qe.END,dominantBaseline:Je.MIDDLE}:gn(t,[190,260])?{textAnchor:Qe.END,dominantBaseline:Je.BASELINE}:gn(t,[260,280])?{textAnchor:Qe.MIDDLE,dominantBaseline:Je.BASELINE}:{textAnchor:Qe.START,dominantBaseline:Je.BASELINE}}function rL(e,t){return(e%t+t)%t}function gn(e,[t,n]){return e>=t&&e<=n}function Jp(e){return e*(180/Math.PI)}function It(e,t,n={x:0,y:0}){const i=t*Math.cos(e)+n.x,r=t*Math.sin(e)+n.y;return{x:isNaN(i)?0:i,y:isNaN(r)?0:r}}function sL(e,t){return t*Math.sin(e-Math.PI/2)}function tm(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function aL(e,t){let n;if(t===void 0)for(const i of e)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of e)(r=t(r,++i,e))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Ql(e,t){let n=0;if(t===void 0)for(let i of e)(i=+i)&&(n+=i);else{let i=-1;for(let r of e)(r=+t(r,++i,e))&&(n+=r)}return n}function oL(e){return e.depth}function lL(e,t){return t-1-e.height}function em(e,t){return e.sourceLinks.length?e.depth:t-1}function _a(e){return function(){return e}}function nm(e,t){return xa(e.source,t.source)||e.index-t.index}function im(e,t){return xa(e.target,t.target)||e.index-t.index}function xa(e,t){return e.y0-t.y0}function Jl(e){return e.value}function cL(e){return e.index}function uL(e){return e.nodes}function hL(e){return e.links}function rm(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function sm({nodes:e}){for(const t of e){let n=t.y0,i=n;for(const r of t.sourceLinks)r.y0=n+r.width/2,n+=r.width;for(const r of t.targetLinks)r.y1=i+r.width/2,i+=r.width}}function dL(){let e=0,t=0,n=1,i=1,r=24,s=8,a,o=cL,c=em,l,u,d=uL,h=hL,f=6;function p(){const y={nodes:d.apply(null,arguments),links:h.apply(null,arguments)};return g(y),m(y),v(y),x(y),E(y),sm(y),y}p.update=function(y){return sm(y),y},p.nodeId=function(y){return arguments.length?(o=typeof y=="function"?y:_a(y),p):o},p.nodeAlign=function(y){return arguments.length?(c=typeof y=="function"?y:_a(y),p):c},p.nodeSort=function(y){return arguments.length?(l=y,p):l},p.nodeWidth=function(y){return arguments.length?(r=+y,p):r},p.nodePadding=function(y){return arguments.length?(s=a=+y,p):s},p.nodes=function(y){return arguments.length?(d=typeof y=="function"?y:_a(y),p):d},p.links=function(y){return arguments.length?(h=typeof y=="function"?y:_a(y),p):h},p.linkSort=function(y){return arguments.length?(u=y,p):u},p.size=function(y){return arguments.length?(e=t=0,n=+y[0],i=+y[1],p):[n-e,i-t]},p.extent=function(y){return arguments.length?(e=+y[0][0],n=+y[1][0],t=+y[0][1],i=+y[1][1],p):[[e,t],[n,i]]},p.iterations=function(y){return arguments.length?(f=+y,p):f};function g({nodes:y,links:k}){for(const[U,N]of y.entries())N.index=U,N.sourceLinks=[],N.targetLinks=[];const R=new Map(y.map((U,N)=>[o(U,N,y),U]));for(const[U,N]of k.entries()){N.index=U;let{source:G,target:z}=N;typeof G!="object"&&(G=N.source=rm(R,G)),typeof z!="object"&&(z=N.target=rm(R,z)),G.sourceLinks.push(N),z.targetLinks.push(N)}if(u!=null)for(const{sourceLinks:U,targetLinks:N}of y)U.sort(u),N.sort(u)}function m({nodes:y}){for(const k of y)k.value=k.fixedValue===void 0?Math.max(Ql(k.sourceLinks,Jl),Ql(k.targetLinks,Jl)):k.fixedValue}function v({nodes:y}){const k=y.length;let R=new Set(y),U=new Set,N=0;for(;R.size;){for(const G of R){G.depth=N;for(const{target:z}of G.sourceLinks)U.add(z)}if(++N>k)throw new Error("circular link");R=U,U=new Set}}function x({nodes:y}){const k=y.length;let R=new Set(y),U=new Set,N=0;for(;R.size;){for(const G of R){G.height=N;for(const{source:z}of G.targetLinks)U.add(z)}if(++N>k)throw new Error("circular link");R=U,U=new Set}}function b({nodes:y}){const k=tm(y,N=>N.depth)+1,R=(n-e-r)/(k-1),U=new Array(k);for(const N of y){const G=Math.max(0,Math.min(k-1,Math.floor(c.call(null,N,k))));N.layer=G,N.x0=e+G*R,N.x1=N.x0+r,U[G]?U[G].push(N):U[G]=[N]}if(l)for(const N of U)N.sort(l);return U}function O(y){const k=aL(y,R=>(i-t-(R.length-1)*a)/Ql(R,Jl));for(const R of y){let U=t;for(const N of R){N.y0=U,N.y1=U+N.value*k,U=N.y1+a;for(const G of N.sourceLinks)G.width=G.value*k}U=(i-U+a)/(R.length+1);for(let N=0;N<R.length;++N){const G=R[N];G.y0+=U*(N+1),G.y1+=U*(N+1)}B(R)}}function E(y){const k=b(y);a=Math.min(s,(i-t)/(tm(k,R=>R.length)-1)),O(k);for(let R=0;R<f;++R){const U=Math.pow(.99,R),N=Math.max(1-U,(R+1)/f);S(k,U,N),T(k,U,N)}}function T(y,k,R){for(let U=1,N=y.length;U<N;++U){const G=y[U];for(const z of G){let F=0,Q=0;for(const{source:X,value:ot}of z.targetLinks){let tt=ot*(z.layer-X.layer);F+=_(X,z)*tt,Q+=tt}if(!(Q>0))continue;let j=(F/Q-z.y0)*k;z.y0+=j,z.y1+=j,C(z)}l===void 0&&G.sort(xa),A(G,R)}}function S(y,k,R){for(let U=y.length,N=U-2;N>=0;--N){const G=y[N];for(const z of G){let F=0,Q=0;for(const{target:X,value:ot}of z.sourceLinks){let tt=ot*(X.layer-z.layer);F+=$(z,X)*tt,Q+=tt}if(!(Q>0))continue;let j=(F/Q-z.y0)*k;z.y0+=j,z.y1+=j,C(z)}l===void 0&&G.sort(xa),A(G,R)}}function A(y,k){const R=y.length>>1,U=y[R];L(y,U.y0-a,R-1,k),D(y,U.y1+a,R+1,k),L(y,i,y.length-1,k),D(y,t,0,k)}function D(y,k,R,U){for(;R<y.length;++R){const N=y[R],G=(k-N.y0)*U;G>1e-6&&(N.y0+=G,N.y1+=G),k=N.y1+a}}function L(y,k,R,U){for(;R>=0;--R){const N=y[R],G=(N.y1-k)*U;G>1e-6&&(N.y0-=G,N.y1-=G),k=N.y0-a}}function C({sourceLinks:y,targetLinks:k}){if(u===void 0){for(const{source:{sourceLinks:R}}of k)R.sort(im);for(const{target:{targetLinks:R}}of y)R.sort(nm)}}function B(y){if(u===void 0)for(const{sourceLinks:k,targetLinks:R}of y)k.sort(im),R.sort(nm)}function _(y,k){let R=y.y0-(y.sourceLinks.length-1)*a/2;for(const{target:U,width:N}of y.sourceLinks){if(U===k)break;R+=N+a}for(const{source:U,width:N}of k.targetLinks){if(U===y)break;R-=N}return R}function $(y,k){let R=k.y0-(k.targetLinks.length-1)*a/2;for(const{source:U,width:N}of k.targetLinks){if(U===y)break;R+=N+a}for(const{target:U,width:N}of y.sourceLinks){if(U===k)break;R-=N}return R}return p}var tc=Math.PI,ec=2*tc,zn=1e-6,fL=ec-zn;function nc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function am(){return new nc}nc.prototype=am.prototype={constructor:nc,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,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,s){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var s=this._x1,a=this._y1,o=n-e,c=i-t,l=s-e,u=a-t,d=l*l+u*u;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>zn)if(!(Math.abs(u*o-c*l)>zn)||!r)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-s,f=i-a,p=o*o+c*c,g=h*h+f*f,m=Math.sqrt(p),v=Math.sqrt(d),x=r*Math.tan((tc-Math.acos((p+d-g)/(2*m*v)))/2),b=x/v,O=x/m;Math.abs(b-1)>zn&&(this._+="L"+(e+b*l)+","+(t+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>l*f)+","+(this._x1=e+O*o)+","+(this._y1=t+O*c)}},arc:function(e,t,n,i,r,s){e=+e,t=+t,n=+n,s=!!s;var a=n*Math.cos(i),o=n*Math.sin(i),c=e+a,l=t+o,u=1^s,d=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+c+","+l:(Math.abs(this._x1-c)>zn||Math.abs(this._y1-l)>zn)&&(this._+="L"+c+","+l),n&&(d<0&&(d=d%ec+ec),d>fL?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-o)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):d>zn&&(this._+="A"+n+","+n+",0,"+ +(d>=tc)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};function om(e){return function(){return e}}function pL(e){return e[0]}function mL(e){return e[1]}var gL=Array.prototype.slice;function vL(e){return e.source}function yL(e){return e.target}function _L(e){var t=vL,n=yL,i=pL,r=mL,s=null;function a(){var o,c=gL.call(arguments),l=t.apply(this,c),u=n.apply(this,c);if(s||(s=o=am()),e(s,+i.apply(this,(c[0]=l,c)),+r.apply(this,c),+i.apply(this,(c[0]=u,c)),+r.apply(this,c)),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?(i=typeof o=="function"?o:om(+o),a):i},a.y=function(o){return arguments.length?(r=typeof o=="function"?o:om(+o),a):r},a.context=function(o){return arguments.length?(s=o??null,a):s},a}function xL(e,t,n,i,r){e.moveTo(t,n),e.bezierCurveTo(t=(t+i)/2,n,t,r,i,r)}function bL(){return _L(xL)}function wL(e){return[e.source.x1,e.y0]}function EL(e){return[e.target.x0,e.y1]}function SL(){return bL().source(wL).target(EL)}function OL(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function TL(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){if(this instanceof i){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(t,r);return new s}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:function(){return e[i]}})}),n}var CL={value:function(){}};function lm(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ba(n)}function ba(e){this._=e}function ML(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ba.prototype=lm.prototype={constructor:ba,on:function(e,t){var n=this._,i=ML(e+"",n),r,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((r=(e=i[s]).type)&&(r=$L(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(r=(e=i[s]).type)n[r]=cm(n[r],e.name,t);else if(t==null)for(r in n)n[r]=cm(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ba(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,r=s.length;i<r;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,s=i.length;r<s;++r)i[r].value.apply(t,n)}};function $L(e,t){for(var n=0,i=e.length,r;n<i;++n)if((r=e[n]).name===t)return r.value}function cm(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=CL,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var AL=TL(Object.freeze(Object.defineProperty({__proto__:null,dispatch:lm},Symbol.toStringTag,{value:"Module"}))).dispatch,ic=Math.PI/180,Rr=64,wa=2048,LL=function(){var e=[256,256],t=DL,n=kL,i=RL,r=um,s=um,a=IL,o=PL,c=hm,l=[],u=1/0,d=AL("word","end"),h=null,f=Math.random,p={},g=GL;p.canvas=function(x){return arguments.length?(g=vn(x),p):g},p.start=function(){var x=m(g()),b=FL((e[0]>>5)*e[1]),O=null,E=l.length,T=-1,S=[],A=l.map(function(L,C){return L.text=t.call(this,L,C),L.font=n.call(this,L,C),L.style=r.call(this,L,C),L.weight=s.call(this,L,C),L.rotate=a.call(this,L,C),L.size=~~i.call(this,L,C),L.padding=o.call(this,L,C),L}).sort(function(L,C){return C.size-L.size});return h&&clearInterval(h),h=setInterval(D,0),D(),p;function D(){for(var L=Date.now();Date.now()-L<u&&++T<E&&h;){var C=A[T];C.x=e[0]*(f()+.5)>>1,C.y=e[1]*(f()+.5)>>1,NL(x,C,A,T),C.hasText&&v(b,C,O)&&(S.push(C),d.call("word",p,C),O?BL(O,C):O=[{x:C.x+C.x0,y:C.y+C.y0},{x:C.x+C.x1,y:C.y+C.y1}],C.x-=e[0]>>1,C.y-=e[1]>>1)}T>=E&&(p.stop(),d.call("end",p,S,O))}},p.stop=function(){return h&&(clearInterval(h),h=null),p};function m(x){x.width=x.height=1;var b=Math.sqrt(x.getContext("2d").getImageData(0,0,1,1).data.length>>2);x.width=(Rr<<5)/b,x.height=wa/b;var O=x.getContext("2d");return O.fillStyle=O.strokeStyle="red",O.textAlign="center",{context:O,ratio:b}}function v(x,b,O){e[0],e[1];for(var E=b.x,T=b.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),A=c(e),D=f()<.5?1:-1,L=-D,C,B,_;(C=A(L+=D))&&(B=~~C[0],_=~~C[1],!(Math.min(Math.abs(B),Math.abs(_))>=S));)if(b.x=E+B,b.y=T+_,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>e[0]||b.y+b.y1>e[1])&&(!O||!UL(b,x,e[0]))&&(!O||HL(b,O))){for(var $=b.sprite,y=b.width>>5,k=e[0]>>5,R=b.x-(y<<4),U=R&127,N=32-U,G=b.y1-b.y0,z=(b.y+b.y0)*k+(R>>5),F,Q=0;Q<G;Q++){F=0;for(var j=0;j<=y;j++)x[z+j]|=F<<N|(j<y?(F=$[Q*y+j])>>>U:0);z+=k}return delete b.sprite,!0}return!1}return p.timeInterval=function(x){return arguments.length?(u=x??1/0,p):u},p.words=function(x){return arguments.length?(l=x,p):l},p.size=function(x){return arguments.length?(e=[+x[0],+x[1]],p):e},p.font=function(x){return arguments.length?(n=vn(x),p):n},p.fontStyle=function(x){return arguments.length?(r=vn(x),p):r},p.fontWeight=function(x){return arguments.length?(s=vn(x),p):s},p.rotate=function(x){return arguments.length?(a=vn(x),p):a},p.text=function(x){return arguments.length?(t=vn(x),p):t},p.spiral=function(x){return arguments.length?(c=zL[x]||x,p):c},p.fontSize=function(x){return arguments.length?(i=vn(x),p):i},p.padding=function(x){return arguments.length?(o=vn(x),p):o},p.random=function(x){return arguments.length?(f=x,p):f},p.on=function(){var x=d.on.apply(d,arguments);return x===d?p:x},p};function DL(e){return e.text}function kL(){return"serif"}function um(){return"normal"}function RL(e){return Math.sqrt(e.value)}function IL(){return(~~(Math.random()*6)-3)*30}function PL(){return 1}function NL(e,t,n,i){if(!t.sprite){var r=e.context,s=e.ratio;r.clearRect(0,0,(Rr<<5)/s,wa/s);var a=0,o=0,c=0,l=n.length;for(--i;++i<l;){t=n[i],r.save(),r.font=t.style+" "+t.weight+" "+~~((t.size+1)/s)+"px "+t.font;var u=r.measureText(t.text+"m").width*s,d=t.size<<1;if(t.rotate){var h=Math.sin(t.rotate*ic),f=Math.cos(t.rotate*ic),p=u*f,g=u*h,m=d*f,v=d*h;u=Math.max(Math.abs(p+v),Math.abs(p-v))+31>>5<<5,d=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else u=u+31>>5<<5;if(d>c&&(c=d),a+u>=Rr<<5&&(a=0,o+=c,c=0),o+d>=wa)break;r.translate((a+(u>>1))/s,(o+(d>>1))/s),t.rotate&&r.rotate(t.rotate*ic),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=u,t.height=d,t.xoff=a,t.yoff=o,t.x1=u>>1,t.y1=d>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=u}for(var x=r.getImageData(0,0,(Rr<<5)/s,wa/s).data,b=[];--i>=0;)if(t=n[i],!!t.hasText){for(var u=t.width,O=u>>5,d=t.y1-t.y0,E=0;E<d*O;E++)b[E]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var T=0,S=-1,A=0;A<d;A++){for(var E=0;E<u;E++){var D=O*A+(E>>5),L=x[(o+A)*(Rr<<5)+(a+E)<<2]?1<<31-E%32:0;b[D]|=L,T|=L}T?S=A:(t.y0++,d--,A--,o++)}t.y1=t.y0+S,t.sprite=b.slice(0,(t.y1-t.y0)*O)}}}function UL(e,t,n){n>>=5;for(var i=e.sprite,r=e.width>>5,s=e.x-(r<<4),a=s&127,o=32-a,c=e.y1-e.y0,l=(e.y+e.y0)*n+(s>>5),u,d=0;d<c;d++){u=0;for(var h=0;h<=r;h++)if((u<<o|(h<r?(u=i[d*r+h])>>>a:0))&t[l+h])return!0;l+=n}return!1}function BL(e,t){var n=e[0],i=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>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function HL(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 hm(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function VL(e){var t=4,n=t*e[0]/e[1],i=0,r=0;return function(s){var a=s<0?-1:1;switch(Math.sqrt(1+4*a*s)-a&3){case 0:i+=n;break;case 1:r+=t;break;case 2:i-=n;break;default:r-=t;break}return[i,r]}}function FL(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function GL(){return document.createElement("canvas")}function vn(e){return typeof e=="function"?e:function(){return e}}var zL={archimedean:hm,rectangular:VL};const jL=OL(LL);function qL(e,t,n,i){var r=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function WL(e){return function(t){return e==null?void 0:e[t]}}var YL={À:"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"},XL=WL(YL);const ZL=XL;var KL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,QL="\\u0300-\\u036f",JL="\\ufe20-\\ufe2f",tD="\\u20d0-\\u20ff",eD=QL+JL+tD,nD="["+eD+"]",iD=RegExp(nD,"g");function rD(e){return e=Or(e),e&&e.replace(KL,ZL).replace(iD,"")}var sD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function aD(e){return e.match(sD)||[]}var oD=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function lD(e){return oD.test(e)}var dm="\\ud800-\\udfff",cD="\\u0300-\\u036f",uD="\\ufe20-\\ufe2f",hD="\\u20d0-\\u20ff",dD=cD+uD+hD,fm="\\u2700-\\u27bf",pm="a-z\\xdf-\\xf6\\xf8-\\xff",fD="\\xac\\xb1\\xd7\\xf7",pD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mD="\\u2000-\\u206f",gD=" \\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",mm="A-Z\\xc0-\\xd6\\xd8-\\xde",vD="\\ufe0e\\ufe0f",gm=fD+pD+mD+gD,vm="['’]",ym="["+gm+"]",yD="["+dD+"]",_m="\\d+",_D="["+fm+"]",xm="["+pm+"]",bm="[^"+dm+gm+_m+fm+pm+mm+"]",xD="\\ud83c[\\udffb-\\udfff]",bD="(?:"+yD+"|"+xD+")",wD="[^"+dm+"]",wm="(?:\\ud83c[\\udde6-\\uddff]){2}",Em="[\\ud800-\\udbff][\\udc00-\\udfff]",Si="["+mm+"]",ED="\\u200d",Sm="(?:"+xm+"|"+bm+")",SD="(?:"+Si+"|"+bm+")",Om="(?:"+vm+"(?:d|ll|m|re|s|t|ve))?",Tm="(?:"+vm+"(?:D|LL|M|RE|S|T|VE))?",Cm=bD+"?",Mm="["+vD+"]?",OD="(?:"+ED+"(?:"+[wD,wm,Em].join("|")+")"+Mm+Cm+")*",TD="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CD="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",MD=Mm+Cm+OD,$D="(?:"+[_D,wm,Em].join("|")+")"+MD,AD=RegExp([Si+"?"+xm+"+"+Om+"(?="+[ym,Si,"$"].join("|")+")",SD+"+"+Tm+"(?="+[ym,Si+Sm,"$"].join("|")+")",Si+"?"+Sm+"+"+Om,Si+"+"+Tm,CD,TD,_m,$D].join("|"),"g");function LD(e){return e.match(AD)||[]}function DD(e,t,n){return e=Or(e),t=n?void 0:t,t===void 0?lD(e)?LD(e):aD(e):e.match(t)||[]}var kD="['’]",RD=RegExp(kD,"g");function $m(e){return function(t){return qL(DD(rD(t).replace(RD,"")),e,"")}}function ID(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Am(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=kr(n),n=n===n?n:0),t!==void 0&&(t=kr(t),t=t===t?t:0),ID(kr(e),t,n)}function PD(e,t){var n=-1,i=Bn(e)?Array(e.length):[];return Xl(e,function(r,s,a){i[++n]=t(r,s,a)}),i}function ND(e,t){var n=jt(e)?Tf:PD;return n(e,ma(t))}var UD=1/0;function BD(e,t){return ua(ND(e,t),UD)}function Lm(e,t){return pa(e,t)}var HD=$m(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()});const Oi=HD;function VD(e,t){var n;return Xl(e,function(i,r,s){return n=t(i,r,s),!n}),!!n}function FD(e,t,n){var i=jt(e)?xp:VD;return n&&Pf(e,t,n)&&(t=void 0),i(e,ma(t))}class ht{constructor(t,n,i){if(this.type="",this.renderType=K.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,i&&(this.configs=i,this.configs.id)){const r=w(this.model.getOptions(),"style","prefix");this.id=`${r}--${this.configs.id}`}this.parent||this.setParent(P(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 i=this.parent;if(this.parent=t,!(i&&i.node()===t.node())&&this.type){const r=w(this.model.getOptions(),"style","prefix");(n=this.parent)==null||n.classed(`${te}--${r}--${this.type}`,!0),i&&i.classed(`${te}--${r}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={withinChartClip:!1}){if(this.type){const n=w(this.model.getOptions(),"style","prefix"),i=this.id?`#${this.id}`:"",r=I.appendOrSelect(this.parent,`${this.renderType===K.SVG?"svg":"div"}${i}.${te}--${n}--${this.type}`);if(t.withinChartClip){const s=this.model.get("chartClipId");if(s){const a=P(`#${s}`).select("rect");a.size()!==0&&parseFloat(a.attr("height"))>0&&r.attr("clip-path",`url(#${s})`)}}return r.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?nt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}const Dm=class extends ht{constructor(){super(...arguments),this.type="toolbar",this.renderType=K.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(M.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(M.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer().attr("role","toolbar").attr("aria-label",`chart-${this.services.domUtils.getChartID()} toolbar`);if(w(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:i,overflowMenuItemList:r}=this.getControlConfigs();r&&i.push(this.getOverflowButtonConfig());const s=n.selectAll("div.toolbar-control").data(i,c=>c.id);s.exit().remove();const a=s.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu").attr("role","button"),o=this;a.merge(s).classed("disabled",c=>c.shouldBeDisabled()).attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
4
4
  <button
5
5
  class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
6
6
  aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${c.id}`)}" aria-label="${c.title}">
7
7
  <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">
8
8
  ${c.iconSVG.content}
9
9
  </svg>
10
- </button>`).each(function(c,l){P(this).select("svg").style("will-change","transform").style("width",c.iconSVG.width!==void 0?c.iconSVG.width:"20px").style("height",c.iconSVG.height!==void 0?c.iconSVG.height:"20px"),P(this).select("button").on("click",u=>{c.shouldBeDisabled()||o.triggerFunctionAndEvent(c,u,this)}).on("keydown",u=>{u.key&&u.key==="Enter"||u.key===" "?(u.preventDefault(),o.triggerFunctionAndEvent(c,u,this)):u.key&&u.key==="ArrowLeft"?o.focusOnPreviousEnabledToolbarItem(l):u.key&&u.key==="ArrowRight"&&o.focusOnNextEnabledToolbarItem(l)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,r=>w(r,"id"));n.exit().remove();const i=n.enter().append("li").attr("id",r=>this.services.domUtils.generateElementIDString(`control-${r.id}`)).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);i.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),i.merge(n).classed("cds--overflow-menu-options__option--disabled",r=>r.shouldBeDisabled()).classed("cds--overflow-menu-options__option--disabled",r=>r.shouldBeDisabled()).attr("aria-disabled",r=>r.shouldBeDisabled()).selectAll("button").text(r=>r.text)}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),P(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(M.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(M.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let i=n.length;for(let r=t-1;r>=0;r--)if(!n[r].shouldBeDisabled()){i=r;break}if(i<n.length){const r=P(`button#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)}`).node();"focus"in r&&r.focus()}}focusOnNextEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let i=-1;for(let r=t+1;r<n.length;r++)if(!n[r].shouldBeDisabled()){i=r;break}if(i>-1){const r=P(`button#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)}`).node();"focus"in r&&r.focus()}}focusOnPreviousEnabledMenuItem(t){const n=this.getOverflowMenuItems();let i=n.length;for(let r=t-1;r>=0;r--)if(!n[r].shouldBeDisabled()){i=r;break}if(i<n.length){const r=P(`#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)} button`).node();"focus"in r&&r.focus()}}focusOnNextEnabledMenuItem(t){const n=this.getOverflowMenuItems();let i=-1;for(let r=t+1;r<n.length;r++)if(!n[r].shouldBeDisabled()){i=r;break}if(i>-1){const r=P(`#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)} button`).node();"focus"in r&&r.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const n=this;this.getOverflowMenuItems().forEach((i,r)=>{const s=P(`#${this.services.domUtils.generateElementIDString(`control-${i.id}`)}`);s!==null&&(s.on("click",()=>{n.triggerFunctionAndEvent(i,t,s.node()),n.updateOverflowMenu(!1)}),s.on("keydown",a=>{a&&a.key==="Enter"?n.triggerFunctionAndEvent(i,t,s.node()):a&&a.key==="ArrowUp"?n.focusOnPreviousEnabledMenuItem(r):a&&a.key==="ArrowDown"?n.focusOnNextEnabledMenuItem(r):a&&a.key==="Escape"&&n.updateOverflowMenu(!1),a.preventDefault()}))}),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,n,i){typeof t.shouldBeDisabled=="function"&&t.shouldBeDisabled()||(typeof t.clickFunction=="function"&&t.clickFunction(n),this.services.events.dispatchEvent(M.Toolbar.BUTTON_CLICK,{control:t,event:n,element:i}))}getControlConfigs(){const t=w(this.getOptions(),"toolbar","numberOfIcons")-1,n=w(this.getOptions(),"toolbar","controls"),i=[],r=[],s=[];return n.forEach(a=>{let o=null;a.type===Dt.CUSTOM?(w(a,"id")===null&&(a.id=`toolbar-button-${Lm.buttonID++}`),w(a,"shouldBeDisabled")===null&&(a.shouldBeDisabled=()=>!1),o=a):o=this.getControlConfigByType(a.type),o&&(o.text=a.text?a.text:a.type,o.id.indexOf("toolbar-export")!==-1?i.push(o):r.length<t?w(o,"iconSVG","content")===null?s.push(o):r.push(o):s.push(o))}),s.push(...i),s.length?{buttonList:r,overflowMenuItemList:s}:{buttonList:r}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();return n&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:()=>!1,iconSVG:{content:`<circle cx="16" cy="8" r="2"></circle>
10
+ </button>`).each(function(c,l){P(this).select("svg").style("will-change","transform").style("width",c.iconSVG.width!==void 0?c.iconSVG.width:"20px").style("height",c.iconSVG.height!==void 0?c.iconSVG.height:"20px"),P(this).select("button").on("click",u=>{c.shouldBeDisabled()||o.triggerFunctionAndEvent(c,u,this)}).on("keydown",u=>{u.key&&u.key==="Enter"||u.key===" "?(u.preventDefault(),o.triggerFunctionAndEvent(c,u,this)):u.key&&u.key==="ArrowLeft"?o.focusOnPreviousEnabledToolbarItem(l):u.key&&u.key==="ArrowRight"&&o.focusOnNextEnabledToolbarItem(l)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){const{overflowMenuItemList:t}=this.getControlConfigs(),n=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,r=>w(r,"id"));n.exit().remove();const i=n.enter().append("li").attr("id",r=>this.services.domUtils.generateElementIDString(`control-${r.id}`)).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);i.append("button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),i.merge(n).classed("cds--overflow-menu-options__option--disabled",r=>r.shouldBeDisabled()).classed("cds--overflow-menu-options__option--disabled",r=>r.shouldBeDisabled()).attr("aria-disabled",r=>r.shouldBeDisabled()).selectAll("button").text(r=>r.text)}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),P(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(M.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(M.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let i=n.length;for(let r=t-1;r>=0;r--)if(!n[r].shouldBeDisabled()){i=r;break}if(i<n.length){const r=P(`button#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)}`).node();"focus"in r&&r.focus()}}focusOnNextEnabledToolbarItem(t){const n=this.getToolbarButtonItems();let i=-1;for(let r=t+1;r<n.length;r++)if(!n[r].shouldBeDisabled()){i=r;break}if(i>-1){const r=P(`button#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)}`).node();"focus"in r&&r.focus()}}focusOnPreviousEnabledMenuItem(t){const n=this.getOverflowMenuItems();let i=n.length;for(let r=t-1;r>=0;r--)if(!n[r].shouldBeDisabled()){i=r;break}if(i<n.length){const r=P(`#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)} button`).node();"focus"in r&&r.focus()}}focusOnNextEnabledMenuItem(t){const n=this.getOverflowMenuItems();let i=-1;for(let r=t+1;r<n.length;r++)if(!n[r].shouldBeDisabled()){i=r;break}if(i>-1){const r=P(`#${this.services.domUtils.generateElementIDString(`control-${n[i].id}`)} button`).node();"focus"in r&&r.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);const n=this;this.getOverflowMenuItems().forEach((i,r)=>{const s=P(`#${this.services.domUtils.generateElementIDString(`control-${i.id}`)}`);s!==null&&(s.on("click",()=>{n.triggerFunctionAndEvent(i,t,s.node()),n.updateOverflowMenu(!1)}),s.on("keydown",a=>{a&&a.key==="Enter"?n.triggerFunctionAndEvent(i,t,s.node()):a&&a.key==="ArrowUp"?n.focusOnPreviousEnabledMenuItem(r):a&&a.key==="ArrowDown"?n.focusOnNextEnabledMenuItem(r):a&&a.key==="Escape"&&n.updateOverflowMenu(!1),a.preventDefault()}))}),n.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,n,i){typeof t.shouldBeDisabled=="function"&&t.shouldBeDisabled()||(typeof t.clickFunction=="function"&&t.clickFunction(n),this.services.events.dispatchEvent(M.Toolbar.BUTTON_CLICK,{control:t,event:n,element:i}))}getControlConfigs(){const t=w(this.getOptions(),"toolbar","numberOfIcons")-1,n=w(this.getOptions(),"toolbar","controls"),i=[],r=[],s=[];return n.forEach(a=>{let o=null;a.type===Dt.CUSTOM?(w(a,"id")===null&&(a.id=`toolbar-button-${Dm.buttonID++}`),w(a,"shouldBeDisabled")===null&&(a.shouldBeDisabled=()=>!1),o=a):o=this.getControlConfigByType(a.type),o&&(o.text=a.text?a.text:a.type,o.id.indexOf("toolbar-export")!==-1?i.push(o):r.length<t?w(o,"iconSVG","content")===null?s.push(o):r.push(o):s.push(o))}),s.push(...i),s.length?{buttonList:r,overflowMenuItemList:s}:{buttonList:r}}getToolbarButtonItems(){const{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();return n&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){const{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){return{id:"toolbar-overflow-menu",title:"More options",shouldBeDisabled:()=>!1,iconSVG:{content:`<circle cx="16" cy="8" r="2"></circle>
11
11
  <circle cx="16" cy="16" r="2"></circle>
12
12
  <circle cx="16" cy="24" r="2"></circle>`},clickFunction:t=>this.toggleOverflowMenu(t)}}getControlConfigByType(t){const n=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),i=this.model.getDisplayData();let r;switch(t){case Dt.ZOOM_IN:n&&(r={id:"toolbar-zoomIn",title:"Zoom in",shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case Dt.ZOOM_OUT:n&&(r={id:"toolbar-zoomOut",title:"Zoom out",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case Dt.RESET_ZOOM:n&&(r={id:"toolbar-resetZoom",title:"Reset zoom",shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case Dt.MAKE_FULLSCREEN:r={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:"Make fullscreen",shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case Dt.SHOW_AS_DATATABLE:r={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:"Show as table",shouldBeDisabled:()=>i.length===0,clickFunction:()=>this.services.events.dispatchEvent(M.Modal.SHOW)};break;case Dt.EXPORT_CSV:r={id:"toolbar-export-CSV",title:"Export as CSV",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case Dt.EXPORT_PNG:r={id:"toolbar-export-PNG",title:"Export as PNG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case Dt.EXPORT_JPG:r={id:"toolbar-export-JPG",title:"Export as JPG",shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return r}getControlIconByType(t){switch(t){case Dt.ZOOM_IN:return`<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>
13
13
  <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case Dt.ZOOM_OUT:return`<rect x="9" y="13" width="10" height="2"/>
14
- <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case Dt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case Dt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case Dt.EXPORT_CSV:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.EXPORT_JPG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};let Ir=Lm;Ir.buttonID=0;const Dm=class extends ht{constructor(t,n,i,r){super(t,n,r),this.type="layout",this.configs=r,this.children=i,this._instanceID=Dm.instanceID++,this.init()}init(){this.children.forEach(t=>{t.components.forEach(n=>{n.init()})})}getPreferedAndFixedSizeSum(){const t=this.parent;let n=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter(i=>{const r=w(i,"growth");return r===it.PREFERRED||r===it.FIXED}).each(function(i){n+=i.size}),n}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>w(t,"growth")===it.STRETCH).size()}render(t=!0){const n=this.parent,{width:i,height:r}=I.getHTMLElementSize(n.node()),s=this.configs.direction===St.ROW||this.configs.direction===St.ROW_REVERSE,a=w(this.model.getOptions(),"style","prefix"),o=n.classed(`${te}--${a}--layout-row`,this.configs.direction===St.ROW).classed(`${te}--${a}--layout-row-reverse`,this.configs.direction===St.ROW_REVERSE).classed(`${te}--${a}--layout-column`,this.configs.direction===St.COLUMN).classed(`${te}--${a}--layout-column-reverse`,this.configs.direction===St.COLUMN_REVERSE).classed(`${te}--${a}--layout-alignitems-center`,this.configs.alignItems===di.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,l=>l.id);o.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",l=>`layout-child layout-child-${this._instanceID} ${l.id}`).each(function(l){l.components.forEach(u=>{const d=P(this),h=w(l,"renderType")===K.SVG;u.setParent(h?I.appendOrSelect(d,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):d);const f=w(l,"growth");(f===it.PREFERRED||f===it.FIXED)&&u.render(t)})}),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(l){const u=w(l,"growth"),d=w(l,"renderType")===K.SVG?I.getSVGElementSize(P(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):I.getHTMLElementSize(this);if(u===it.PREFERRED){const h=s?d.width:d.height,f=s?i:r;l.size=h/f*100}}),o.exit().remove(),this.children.filter(l=>w(l,"growth")===it.STRETCH).forEach(l=>{l.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()});const c=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,l=>l.id);s?c.style("width",l=>`${l.size/100*i}px`).style("height","100%"):c.style("height",l=>`${l.size/100*r}px`).style("width","100%"),c.each(function(l){l.components.forEach(u=>{w(l,"growth")===it.STRETCH&&u.render(t)})})}setModel(t){super.setModel(t),this.children.forEach(n=>{n.components.forEach(i=>i.setModel(t))})}setServices(t){super.setServices(t),this.children.forEach(n=>{n.components.forEach(i=>i.setServices(t))})}destroy(){this.children.forEach(t=>{t.components.forEach(n=>n.destroy())})}};let ae=Dm;ae.instanceID=Math.floor(Math.random()*99999999999);class ln extends ht{constructor(){super(...arguments),this.type="spacer"}render(t=!0){this.getComponentContainer().style("width",`${this.configs.size||_l.default.size}px`).style("height",`${this.configs.size||_l.default.size}px`).attr("opacity",0)}}var FD={prefix:"bx",selectorTabbable:`
14
+ <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case Dt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case Dt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case Dt.EXPORT_CSV:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.EXPORT_JPG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case Dt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};let Ir=Dm;Ir.buttonID=0;const km=class extends ht{constructor(t,n,i,r){super(t,n,r),this.type="layout",this.configs=r,this.children=i,this._instanceID=km.instanceID++,this.init()}init(){this.children.forEach(t=>{t.components.forEach(n=>{n.init()})})}getPreferedAndFixedSizeSum(){const t=this.parent;let n=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter(i=>{const r=w(i,"growth");return r===it.PREFERRED||r===it.FIXED}).each(function(i){n+=i.size}),n}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>w(t,"growth")===it.STRETCH).size()}render(t=!0){const n=this.parent,{width:i,height:r}=I.getHTMLElementSize(n.node()),s=this.configs.direction===St.ROW||this.configs.direction===St.ROW_REVERSE,a=w(this.model.getOptions(),"style","prefix"),o=n.classed(`${te}--${a}--layout-row`,this.configs.direction===St.ROW).classed(`${te}--${a}--layout-row-reverse`,this.configs.direction===St.ROW_REVERSE).classed(`${te}--${a}--layout-column`,this.configs.direction===St.COLUMN).classed(`${te}--${a}--layout-column-reverse`,this.configs.direction===St.COLUMN_REVERSE).classed(`${te}--${a}--layout-alignitems-center`,this.configs.alignItems===di.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,l=>l.id);o.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",l=>`layout-child layout-child-${this._instanceID} ${l.id}`).each(function(l){l.components.forEach(u=>{const d=P(this),h=w(l,"renderType")===K.SVG;u.setParent(h?I.appendOrSelect(d,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):d);const f=w(l,"growth");(f===it.PREFERRED||f===it.FIXED)&&u.render(t)})}),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(l){const u=w(l,"growth"),d=w(l,"renderType")===K.SVG?I.getSVGElementSize(P(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):I.getHTMLElementSize(this);if(u===it.PREFERRED){const h=s?d.width:d.height,f=s?i:r;l.size=h/f*100}}),o.exit().remove(),this.children.filter(l=>w(l,"growth")===it.STRETCH).forEach(l=>{l.size=(100-+this.getPreferedAndFixedSizeSum())/+this.getNumOfStretchChildren()});const c=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,l=>l.id);s?c.style("width",l=>`${l.size/100*i}px`).style("height","100%"):c.style("height",l=>`${l.size/100*r}px`).style("width","100%"),c.each(function(l){l.components.forEach(u=>{w(l,"growth")===it.STRETCH&&u.render(t)})})}setModel(t){super.setModel(t),this.children.forEach(n=>{n.components.forEach(i=>i.setModel(t))})}setServices(t){super.setServices(t),this.children.forEach(n=>{n.components.forEach(i=>i.setServices(t))})}destroy(){this.children.forEach(t=>{t.components.forEach(n=>n.destroy())})}};let ae=km;ae.instanceID=Math.floor(Math.random()*99999999999);class ln extends ht{constructor(){super(...arguments),this.type="spacer"}render(t=!0){this.getComponentContainer().style("width",`${this.configs.size||_l.default.size}px`).style("height",`${this.configs.size||_l.default.size}px`).attr("opacity",0)}}var GD={prefix:"bx",selectorTabbable:`
15
15
  a[href], area[href], input:not([disabled]):not([tabindex='-1']),
16
16
  button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),
17
17
  textarea:not([disabled]):not([tabindex='-1']),
@@ -21,9 +21,9 @@
21
21
  button:not([disabled]),select:not([disabled]),
22
22
  textarea:not([disabled]),
23
23
  iframe, object, embed, *[tabindex], *[contenteditable=true]
24
- `},rc=FD;function km(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function GD(e,t,n){return t&&km(e.prototype,t),n&&km(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jD(e){return XD(e)||YD(e)||qD(e)||WD()}function WD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qD(e,t){if(e){if(typeof e=="string")return sc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sc(e,t)}}function YD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XD(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Rm(e){return e.reduce(function(t,n){return Array.isArray(n)?t.push.apply(t,jD(Rm(n))):t.push(n),t},[])}function ZD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Rm(t).reduce(function(i,r){return r(i)},function(){function i(){zD(this,i)}return GD(i)}())}function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function KD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Im(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function QD(e,t,n){return t&&Im(e.prototype,t),n&&Im(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JD(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oc(e,t)}function oc(e,t){return oc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},oc(e,t)}function tk(e){var t=nk();return function(){var n=Ea(e),i;if(t){var r=Ea(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ek(this,i)}}function ek(e,t){if(t&&(ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pm(e)}function Pm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ea(e)}function ik(e){var t=function(n){JD(r,n);var i=tk(r);function r(s){var a,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(KD(this,r),a=i.call(this,s,o),a.children=[],!s||s.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return a.element=s,a.options=Object.assign(Object.create(a.constructor.options),o),a.constructor.components.set(a.element,Pm(a)),a}return QD(r,[{key:"release",value:function(){for(var s=this.children.pop();s;s=this.children.pop())s.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(s,a){return this.components.get(s)||new this(s,a)}}]),r}(e);return t}function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function rk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function sk(e,t,n){return t&&Nm(e.prototype,t),n&&Nm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sa(){return typeof Reflect<"u"&&Reflect.get?Sa=Reflect.get:Sa=function(e,t,n){var i=ak(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Sa.apply(this,arguments)}function ak(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ti(e),e!==null););return e}function ok(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cc(e,t)}function cc(e,t){return cc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cc(e,t)}function lk(e){var t=hk();return function(){var n=Ti(e),i;if(t){var r=Ti(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return ck(this,i)}}function ck(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uk(e)}function uk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ti(e){return Ti=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ti(e)}function dk(e){var t=function(n){ok(r,n);var i=lk(r);function r(){var s;rk(this,r);for(var a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];return s=i.call.apply(i,[this].concat(o)),s.handles=new Set,s}return sk(r,[{key:"manage",value:function(s){return this.handles.add(s),s}},{key:"unmanage",value:function(s){return this.handles.delete(s),s}},{key:"release",value:function(){var s=this;return this.handles.forEach(function(a){a.release(),s.handles.delete(a)}),Sa(Ti(r.prototype),"release",this).call(this)}}]),r}(e);return t}function Pr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function fk(e){return vk(e)||gk(e)||mk(e)||pk()}function pk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mk(e,t){if(e){if(typeof e=="string")return hc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hc(e,t)}}function gk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vk(e){if(Array.isArray(e))return hc(e)}function hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function yk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _k(e,t,n){return t&&Um(e.prototype,t),n&&Um(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dc(e,t)}function dc(e,t){return dc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},dc(e,t)}function bk(e){var t=Sk();return function(){var n=Oa(e),i;if(t){var r=Oa(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return wk(this,i)}}function wk(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ek(e)}function Ek(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Oa(e){return Oa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(e)}function Ok(e){var t=function(n){xk(r,n);var i=bk(r);function r(){return yk(this,r),i.apply(this,arguments)}return _k(r,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var s=this,a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];var l=typeof o[0]=="string"?o.shift():void 0,u=Object(o[0])===o[0]&&typeof o[0]!="function"?o.shift():void 0,d=typeof o[0]=="function"?o.shift():void 0;if(typeof this.shouldStateBeChanged=="function"&&!this.shouldStateBeChanged(l,u)){d&&d(null,!0);return}var h={group:u&&u.group,state:l},f=[h.group,l].filter(Boolean).join("-").split("-").map(function(b){return b[0].toUpperCase()+b.substr(1)}).join(""),p=new CustomEvent(this.options["eventBefore".concat(f)],{bubbles:!0,cancelable:!0,detail:u}),g=u&&u.delegatorNode||this.element,m=!g.dispatchEvent(p);if(m){if(d){var v=new Error("Changing state (".concat(JSON.stringify(h),") has been canceled."));v.canceled=!0,d(v)}}else{var x=[l,u].filter(Boolean);this._changeState.apply(this,fk(x).concat([function(){g.dispatchEvent(new CustomEvent(s.options["eventAfter".concat(f)],{bubbles:!0,cancelable:!0,detail:u})),d&&d()}]))}}}]),r}(e);return t}function fc(e,t){var n=e.target,i=e.currentTarget;if(typeof n.matches=="function"){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var r=n.closest(t);if((i.nodeType===Node.DOCUMENT_NODE?i.documentElement:i).contains(r))return r}}}function Bm(e){if(!e||typeof e=="function")return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function Tk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ck(e,t,n){return t&&Vm(e.prototype,t),n&&Vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mc(e,t)}function mc(e,t){return mc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},mc(e,t)}function $k(e){var t=Dk();return function(){var n=Ta(e),i;if(t){var r=Ta(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Ak(this,i)}}function Ak(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lk(e)}function Lk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(e)}function kk(e){var t=function(n){Mk(r,n);var i=$k(r);function r(){return Tk(this,r),i.apply(this,arguments)}return Ck(r,[{key:"show",value:function(s,a){(!s||typeof s=="function")&&(a=s),this.changeState("shown",Bm(s),a)}},{key:"hide",value:function(s,a){(!s||typeof s=="function")&&(a=s),this.changeState("hidden",Bm(s),a)}}]),r}(e);return t}var Rk=[Ok,kk];const Ik=Rk;var Hm=function(){};process.env.NODE_ENV!=="production"&&(Hm=function(e,t,n){var i=arguments.length;n=new Array(i>2?i-2:0);for(var r=2;r<i;r++)n[r-2]=arguments[r];if(t===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var s=0,a="Warning: "+t.replace(/%s/g,function(){return n[s++]});typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}});var Pk=Hm;const Nk=jp(Pk);function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function Uk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Bk(e,t,n){return t&&Fm(e.prototype,t),n&&Fm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vc(e,t)}function vc(e,t){return vc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vc(e,t)}function Hk(e){var t=zk();return function(){var n=Ca(e),i;if(t){var r=Ca(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Fk(this,i)}}function Fk(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gk(e)}function Gk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function jk(e){var t=function(n){Vk(r,n);var i=Hk(r);function r(){return Uk(this,r),i.apply(this,arguments)}return Bk(r,null,[{key:"init",value:function(){var s=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=Object.assign(Object.create(this.options),o);if(!a||a.nodeType!==Node.ELEMENT_NODE&&a.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(a.nodeType===Node.ELEMENT_NODE&&a.matches(c.selectorInit))this.create(a,o);else{var l=c.initEventNames.map(function(u){return Pr(a,u,function(d){var h=fc(d,"[".concat(c.attribInitTarget,"]"));if(h){d.delegateTarget=h;var f=h.ownerDocument.querySelectorAll(h.getAttribute(c.attribInitTarget));if(f.length>1)throw new Error("Target widget must be unique.");if(f.length===1){h.tagName==="A"&&d.preventDefault();var p=s.create(f[0],o);typeof p.createdByLauncher=="function"&&p.createdByLauncher(d)}}})});return{release:function(){for(var u=l.pop();u;u=l.pop())u.release()}}}return""}}]),r.forLazyInit=!0,r}(e);return t}function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function Wk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function qk(e,t,n){return t&&Gm(e.prototype,t),n&&Gm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_c(e,t)}function Xk(e){var t=Qk();return function(){var n=Ma(e),i;if(t){var r=Ma(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Zk(this,i)}}function Zk(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kk(e)}function Kk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ma(e)}var Jk=function(e){Yk(n,e);var t=Xk(n);function n(i,r){var s;return Wk(this,n),s=t.call(this,i,r),s._handleFocusinListener=void 0,s._handleKeydownListener=void 0,s._handleFocusin=function(a){var o=s.element.querySelector(s.options.selectorModalContainer)||s.element;s.element.classList.contains(s.options.classVisible)&&!o.contains(a.target)&&s.options.selectorsFloatingMenus.every(function(c){return!fc(a,c)})&&s.element.querySelector(rc.selectorTabbable).focus()},s._hookCloseActions(),s}return qk(n,[{key:"createdByLauncher",value:function(i){this.show(i)}},{key:"shouldStateBeChanged",value:function(i){return i==="shown"?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(i,r,s){var a=this,o,c=function(){if(o&&(o=a.unmanage(o).release()),i==="shown"&&a.element.offsetWidth>0&&a.element.offsetHeight>0){a.previouslyFocusedNode=a.element.ownerDocument.activeElement;var d=a.element.querySelector(a.options.selectorPrimaryFocus)||a.element.querySelector(rc.selectorTabbable);d.focus(),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Nk(d,"Modals need to contain a focusable element by either using "+"`".concat(a.options.selectorPrimaryFocus,"` or settings.selectorTabbable."))}s()};if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),i==="shown"){var l="onfocusin"in this.element.ownerDocument.defaultView,u=l?"focusin":"focus";this._handleFocusinListener=this.manage(Pr(this.element.ownerDocument,u,this._handleFocusin,!l))}i==="hidden"?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):i==="shown"&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),o=this.manage(Pr(this.element,"transitionend",c))}},{key:"_hookCloseActions",value:function(){var i=this;this.manage(Pr(this.element,"click",function(r){var s=fc(r,i.options.selectorModalClose);s&&(r.delegateTarget=s),(s||r.target===i.element)&&i.hide(r)})),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Pr(this.element.ownerDocument.body,"keydown",function(r){r.which===27&&i.shouldStateBeChanged("hidden")&&(r.stopPropagation(),i.hide(r))}))}}],[{key:"options",get:function(){var i=rc.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(i,"--overflow-menu-options"),".".concat(i,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(i,"--modal-container"),classVisible:"is-visible",classBody:"".concat(i,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(ZD(ik,jk,Ik,dk));const tR=Jk;class $a extends ht{constructor(t,n,i){super(t,n,i),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),tR.create(this.modal.node()).show()},this.init()}addEventListeners(){this.services.events.addEventListener(M.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(M.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.model.getOptions(),n=w(t,"style","prefix"),i=this.model.getTabularDataArray();return`
24
+ `},rc=GD;function Rm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function zD(e,t,n){return t&&Rm(e.prototype,t),n&&Rm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qD(e){return ZD(e)||XD(e)||YD(e)||WD()}function WD(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YD(e,t){if(e){if(typeof e=="string")return sc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sc(e,t)}}function XD(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZD(e){if(Array.isArray(e))return sc(e)}function sc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Im(e){return e.reduce(function(t,n){return Array.isArray(n)?t.push.apply(t,qD(Im(n))):t.push(n),t},[])}function KD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Im(t).reduce(function(i,r){return r(i)},function(){function i(){jD(this,i)}return zD(i)}())}function ac(e){"@babel/helpers - typeof";return ac=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}function QD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function JD(e,t,n){return t&&Pm(e.prototype,t),n&&Pm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oc(e,t)}function oc(e,t){return oc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},oc(e,t)}function ek(e){var t=ik();return function(){var n=Ea(e),i;if(t){var r=Ea(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return nk(this,i)}}function nk(e,t){if(t&&(ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nm(e)}function Nm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ik(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ea(e){return Ea=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ea(e)}function rk(e){var t=function(n){tk(r,n);var i=ek(r);function r(s){var a,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(QD(this,r),a=i.call(this,s,o),a.children=[],!s||s.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return a.element=s,a.options=Object.assign(Object.create(a.constructor.options),o),a.constructor.components.set(a.element,Nm(a)),a}return JD(r,[{key:"release",value:function(){for(var s=this.children.pop();s;s=this.children.pop())s.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(s,a){return this.components.get(s)||new this(s,a)}}]),r}(e);return t}function lc(e){"@babel/helpers - typeof";return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function sk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ak(e,t,n){return t&&Um(e.prototype,t),n&&Um(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sa(){return typeof Reflect<"u"&&Reflect.get?Sa=Reflect.get:Sa=function(e,t,n){var i=ok(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}},Sa.apply(this,arguments)}function ok(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ti(e),e!==null););return e}function lk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cc(e,t)}function cc(e,t){return cc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},cc(e,t)}function ck(e){var t=dk();return function(){var n=Ti(e),i;if(t){var r=Ti(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return uk(this,i)}}function uk(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hk(e)}function hk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ti(e){return Ti=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ti(e)}function fk(e){var t=function(n){lk(r,n);var i=ck(r);function r(){var s;sk(this,r);for(var a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];return s=i.call.apply(i,[this].concat(o)),s.handles=new Set,s}return ak(r,[{key:"manage",value:function(s){return this.handles.add(s),s}},{key:"unmanage",value:function(s){return this.handles.delete(s),s}},{key:"release",value:function(){var s=this;return this.handles.forEach(function(a){a.release(),s.handles.delete(a)}),Sa(Ti(r.prototype),"release",this).call(this)}}]),r}(e);return t}function Pr(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function uc(e){"@babel/helpers - typeof";return uc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uc(e)}function pk(e){return yk(e)||vk(e)||gk(e)||mk()}function mk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gk(e,t){if(e){if(typeof e=="string")return hc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hc(e,t)}}function vk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yk(e){if(Array.isArray(e))return hc(e)}function hc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function xk(e,t,n){return t&&Bm(e.prototype,t),n&&Bm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dc(e,t)}function dc(e,t){return dc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},dc(e,t)}function wk(e){var t=Ok();return function(){var n=Oa(e),i;if(t){var r=Oa(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Ek(this,i)}}function Ek(e,t){if(t&&(uc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Sk(e)}function Sk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ok(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Oa(e){return Oa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(e)}function Tk(e){var t=function(n){bk(r,n);var i=wk(r);function r(){return _k(this,r),i.apply(this,arguments)}return xk(r,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var s=this,a=arguments.length,o=new Array(a),c=0;c<a;c++)o[c]=arguments[c];var l=typeof o[0]=="string"?o.shift():void 0,u=Object(o[0])===o[0]&&typeof o[0]!="function"?o.shift():void 0,d=typeof o[0]=="function"?o.shift():void 0;if(typeof this.shouldStateBeChanged=="function"&&!this.shouldStateBeChanged(l,u)){d&&d(null,!0);return}var h={group:u&&u.group,state:l},f=[h.group,l].filter(Boolean).join("-").split("-").map(function(b){return b[0].toUpperCase()+b.substr(1)}).join(""),p=new CustomEvent(this.options["eventBefore".concat(f)],{bubbles:!0,cancelable:!0,detail:u}),g=u&&u.delegatorNode||this.element,m=!g.dispatchEvent(p);if(m){if(d){var v=new Error("Changing state (".concat(JSON.stringify(h),") has been canceled."));v.canceled=!0,d(v)}}else{var x=[l,u].filter(Boolean);this._changeState.apply(this,pk(x).concat([function(){g.dispatchEvent(new CustomEvent(s.options["eventAfter".concat(f)],{bubbles:!0,cancelable:!0,detail:u})),d&&d()}]))}}}]),r}(e);return t}function fc(e,t){var n=e.target,i=e.currentTarget;if(typeof n.matches=="function"){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var r=n.closest(t);if((i.nodeType===Node.DOCUMENT_NODE?i.documentElement:i).contains(r))return r}}}function Hm(e){if(!e||typeof e=="function")return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function pc(e){"@babel/helpers - typeof";return pc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(e)}function Ck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Mk(e,t,n){return t&&Vm(e.prototype,t),n&&Vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $k(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mc(e,t)}function mc(e,t){return mc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},mc(e,t)}function Ak(e){var t=kk();return function(){var n=Ta(e),i;if(t){var r=Ta(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Lk(this,i)}}function Lk(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dk(e)}function Dk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(e)}function Rk(e){var t=function(n){$k(r,n);var i=Ak(r);function r(){return Ck(this,r),i.apply(this,arguments)}return Mk(r,[{key:"show",value:function(s,a){(!s||typeof s=="function")&&(a=s),this.changeState("shown",Hm(s),a)}},{key:"hide",value:function(s,a){(!s||typeof s=="function")&&(a=s),this.changeState("hidden",Hm(s),a)}}]),r}(e);return t}var Ik=[Tk,Rk];const Pk=Ik;var Fm=function(){};process.env.NODE_ENV!=="production"&&(Fm=function(e,t,n){var i=arguments.length;n=new Array(i>2?i-2:0);for(var r=2;r<i;r++)n[r-2]=arguments[r];if(t===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var s=0,a="Warning: "+t.replace(/%s/g,function(){return n[s++]});typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}});var Nk=Fm;const Uk=qp(Nk);function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function Bk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Hk(e,t,n){return t&&Gm(e.prototype,t),n&&Gm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vc(e,t)}function vc(e,t){return vc=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},vc(e,t)}function Fk(e){var t=jk();return function(){var n=Ca(e),i;if(t){var r=Ca(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Gk(this,i)}}function Gk(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zk(e)}function zk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ca(e){return Ca=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ca(e)}function qk(e){var t=function(n){Vk(r,n);var i=Fk(r);function r(){return Bk(this,r),i.apply(this,arguments)}return Hk(r,null,[{key:"init",value:function(){var s=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=Object.assign(Object.create(this.options),o);if(!a||a.nodeType!==Node.ELEMENT_NODE&&a.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(a.nodeType===Node.ELEMENT_NODE&&a.matches(c.selectorInit))this.create(a,o);else{var l=c.initEventNames.map(function(u){return Pr(a,u,function(d){var h=fc(d,"[".concat(c.attribInitTarget,"]"));if(h){d.delegateTarget=h;var f=h.ownerDocument.querySelectorAll(h.getAttribute(c.attribInitTarget));if(f.length>1)throw new Error("Target widget must be unique.");if(f.length===1){h.tagName==="A"&&d.preventDefault();var p=s.create(f[0],o);typeof p.createdByLauncher=="function"&&p.createdByLauncher(d)}}})});return{release:function(){for(var u=l.pop();u;u=l.pop())u.release()}}}return""}}]),r.forLazyInit=!0,r}(e);return t}function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yc(e)}function Wk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zm(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Yk(e,t,n){return t&&zm(e.prototype,t),n&&zm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_c(e,t)}function _c(e,t){return _c=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},_c(e,t)}function Zk(e){var t=Jk();return function(){var n=Ma(e),i;if(t){var r=Ma(this).constructor;i=Reflect.construct(n,arguments,r)}else i=n.apply(this,arguments);return Kk(this,i)}}function Kk(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qk(e)}function Qk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ma(e){return Ma=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ma(e)}var tR=function(e){Xk(n,e);var t=Zk(n);function n(i,r){var s;return Wk(this,n),s=t.call(this,i,r),s._handleFocusinListener=void 0,s._handleKeydownListener=void 0,s._handleFocusin=function(a){var o=s.element.querySelector(s.options.selectorModalContainer)||s.element;s.element.classList.contains(s.options.classVisible)&&!o.contains(a.target)&&s.options.selectorsFloatingMenus.every(function(c){return!fc(a,c)})&&s.element.querySelector(rc.selectorTabbable).focus()},s._hookCloseActions(),s}return Yk(n,[{key:"createdByLauncher",value:function(i){this.show(i)}},{key:"shouldStateBeChanged",value:function(i){return i==="shown"?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(i,r,s){var a=this,o,c=function(){if(o&&(o=a.unmanage(o).release()),i==="shown"&&a.element.offsetWidth>0&&a.element.offsetHeight>0){a.previouslyFocusedNode=a.element.ownerDocument.activeElement;var d=a.element.querySelector(a.options.selectorPrimaryFocus)||a.element.querySelector(rc.selectorTabbable);d.focus(),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&Uk(d,"Modals need to contain a focusable element by either using "+"`".concat(a.options.selectorPrimaryFocus,"` or settings.selectorTabbable."))}s()};if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),i==="shown"){var l="onfocusin"in this.element.ownerDocument.defaultView,u=l?"focusin":"focus";this._handleFocusinListener=this.manage(Pr(this.element.ownerDocument,u,this._handleFocusin,!l))}i==="hidden"?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):i==="shown"&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),o=this.manage(Pr(this.element,"transitionend",c))}},{key:"_hookCloseActions",value:function(){var i=this;this.manage(Pr(this.element,"click",function(r){var s=fc(r,i.options.selectorModalClose);s&&(r.delegateTarget=s),(s||r.target===i.element)&&i.hide(r)})),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Pr(this.element.ownerDocument.body,"keydown",function(r){r.which===27&&i.shouldStateBeChanged("hidden")&&(r.stopPropagation(),i.hide(r))}))}}],[{key:"options",get:function(){var i=rc.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(i,"--overflow-menu-options"),".".concat(i,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(i,"--modal-container"),classVisible:"is-visible",classBody:"".concat(i,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(KD(rk,qk,Pk,fk));const eR=tR;class $a extends ht{constructor(t,n,i){super(t,n,i),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),eR.create(this.modal.node()).show()},this.init()}addEventListeners(){this.services.events.addEventListener(M.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(M.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.model.getOptions(),n=w(t,"style","prefix"),i=this.model.getTabularDataArray();return`
27
27
  <div class="cds--modal-container cds--modal-container">
28
28
  <div class="cds--modal-header cds--modal-header">
29
29
  <p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">Tabular representation</p>
@@ -59,7 +59,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
59
  <div class="${te}--${n}-modal-footer-spacer"></div>
60
60
  <button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>
61
61
  </div>
62
- </div>`}render(t=!0){const n=this.model.getOptions();if(!this.isEventListenerAdded){const i=P(this.services.domUtils.getHolder()),r=w(n,"style","prefix");this.modal=I.appendOrSelect(i,`div.${te}--${r}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Nr extends ht{constructor(){super(...arguments),this.type="title",this.renderType=K.HTML}render(t=!0){const n=this.getComponentContainer(),i=w(this.getOptions(),"title"),r=n.selectAll("p.title").data([i]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html(s=>s),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const s=this;r.on("mouseover",function(a){s.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:r,content:r.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(M.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(M.Tooltip.HIDE)})}r.exit().remove()}truncateTitle(t,n){if(n<=0)return;const i=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const r=I.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-r);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(c){o.services.events.dispatchEvent(M.Tooltip.SHOW,{event:c,hoveredElement:t,content:i})}).on("mousemove",function(c){o.services.events.dispatchEvent(M.Tooltip.MOVE,{event:c})}).on("mouseout",function(){o.services.events.dispatchEvent(M.Tooltip.HIDE)})}}getMaxTitleWidth(){return I.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,i,r){const s=Math.floor((i+n)/2);return t.getSubStringLength(0,s)>r?this.getSubstringIndex(t,n,s,r):t.getSubStringLength(0,s)<r?t.getSubStringLength(0,s+1)>r?s:this.getSubstringIndex(t,s,i,r):s}}class xc extends ht{constructor(){super(...arguments),this.type="legend",this.renderType=K.HTML}render(t=!0){const n=this.getOptions(),i=w(n,"legend"),r=w(i,"alignment"),s=w(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=kt.items.status,c=a.some(x=>x.status===o),l=w(i,"order"),u=this.getComponentContainer().classed("center-aligned",r===Nt.CENTER).classed("right-aligned",r===Nt.RIGHT).classed(s,!0).classed("has-deactivated-items",c).attr("role",at.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));const d=u.selectAll("div.legend-item").data(a,x=>x.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(x){return x.status===kt.items.status.ACTIVE});const f=w(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=kt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",at.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(x,b)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${b}-title`)).attr("aria-checked",({status:x})=>x===kt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",x=>this.model.getColorClassName({classNameTypes:[J.BACKGROUND],dataGroupName:x.name,originalClassName:"checkbox"})).style("background",x=>x.status===kt.items.status.ACTIVE?this.model.getFillColor(x.name)||this.model.getStrokeColor(x.name):null).classed("active",function(x){return x.status===kt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=w(n,"legend","additionalItems");if(v&&a.length){const x=this,b=u.selectAll("div.additional-item").data(v);b.exit().remove();const O=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(S,A)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+A}-title`));O.selectAll("*").remove();let E,T=1;O.append("svg").classed("icon",!0).each(function(S){const A=P(this);!E||E!=S.type?(E=S.type,T=1):T++,x.addAdditionalItem(A,S,T)}),O.append("p").merge(O.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((i,r)=>n.indexOf(i.name)-n.indexOf(r.name)),n.length<t.length){const i=t.length-n.length;return t.slice(i).concat(t.slice(0,i))}return t}addAdditionalItem(t,n,i){const{width:r,height:s}=kt.area;if(n.type===Bt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${r}px`).style("height",`${s}px`),n.type===Bt.RADIUS){const{iconData:a,fill:o,stroke:c}=kt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",at.IMG).attr("aria-label","radius").attr("cx",l=>l.cx).attr("cy",l=>l.cy).attr("r",l=>l.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:c)}else if(n.type===Bt.LINE){const a=kt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${i}`,!0).attr("role",at.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",r).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===Bt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${i}`,!0).attr("role",at.IMG).attr("aria-label","area").attr("width",r).attr("height",s).style("fill",i>3&&!n.fill?kt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===Bt.SIZE){const{iconData:a,fill:o,stroke:c}=kt.size;t.attr("fill","none").attr("role",at.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",l=>l.width).attr("height",l=>l.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:c).style("stroke-width",1)}else if(n.type===Bt.QUARTILE){const{iconData:a}=kt.quartile;t.selectAll("rect").attr("role",at.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(o,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",o=>o.x).attr("y",o=>o.y).attr("width",o=>o.width).attr("height",o=>o.height)}else if(n.type===Bt.ZOOM){const{iconData:a,color:o}=w(Fp,"legend","zoom"),c=t.attr("role",at.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();c.append("g").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),c.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=w(this.getOptions(),"legend","truncation"),i=w(n,"type"),r=w(n,"threshold"),s=w(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),i!==Te.NONE?a.html(function(o){return o.name.length>r?$r(o.name,i,s):o.name}):a.html(o=>o.name)}addEventListeners(){const t=this,n=this.getComponentContainer(),i=this.getOptions(),r=w(i,"legend"),s=w(r,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(M.Legend.ITEM_HOVER,{hoveredElement:P(this)});const o=P(this);o.select("div.checkbox").classed("hovered",!0);const c=o.datum();c.name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:o,content:c.name})}).on("mousemove",function(a){P(this).datum().name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(M.Legend.ITEM_CLICK,{clickedElement:P(this)});const a=P(this).datum();t.model.toggleDataLabel(a.name)}).on("mouseout",function(){const a=P(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.HIDE),t.services.events.dispatchEvent(M.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(M.Legend.ITEM_HOVER,{hoveredElement:P(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(M.Legend.ITEM_MOUSEOUT,{hoveredElement:P(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=P(this),c=o.datum();c.name.length>s.threshold&&t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:o,content:c.name})})}}class zm extends ht{constructor(t,n,i){super(t,n,i),this.type="chart-clip",this.renderType=K.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const i=n.getMainXScale(),r=n.getMainYScale(),[s,a]=i.range(),[o,c]=r.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&l.attr("x",s).attr("y",c).attr("width",a-s).attr("height",o-c),this.chartClipPath.merge(l).lower()}}class eR extends zm{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",n).attr("height",i),this.chartClipPath.merge(r).lower()}}var Ci,Wt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Wt||(Wt={}));var jm=(Ci={},Ci[Wt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},Ci[Wt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},Ci[Wt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},Ci[Wt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},Ci),Wm=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Aa=function(){function e(t){t===void 0&&(t={}),this.positions=jm,this.positions=Object.assign({},jm,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,i={top:0,left:0};n.offsetParent;){var r=getComputedStyle(n.offsetParent);r.position==="static"&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(i.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(i.left+=parseInt(r.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+i.top,left:s.left-a.left+i.left}},e.prototype.findRelative=function(t,n,i){var r=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(r,s,n,i)},e.prototype.findAbsolute=function(t,n,i){var r=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(r,s,n,i)},e.prototype.findPosition=function(t,n,i,r){r===void 0&&(r=this.getAbsoluteOffset.bind(this));var s=r(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,i)},e.prototype.findPositionAt=function(t,n,i){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,i)},e.prototype.getPlacementBox=function(t,n){var i=t.offsetHeight+n.top,r=t.offsetWidth+n.left;return{top:n.top,bottom:i,left:n.left,right:r}},e.prototype.addOffset=function(t,n,i){return n===void 0&&(n=0),i===void 0&&(i=0),Object.assign({},t,{top:t.top+n,left:t.left+i})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,i,r,s){var a=this;r===void 0&&(r=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=i.map(function(c){var l=s(t,n,c),u=a.getPlacementBox(n,l),d=0,h=0,f=r();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:c,weight:v}});return o.sort(function(c,l){return l.weight-c.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,i,r){var s=this;r===void 0&&(r=this.defaultContainerFunction.bind(this));var a=function(o,c,l){return s.findPositionAt(t,c,l)};return this.findBestPlacement(null,n,i,r,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Wm.innerHeight,width:Wm.innerWidth}},e.prototype.calculatePosition=function(t,n,i,r){return this.positions[r]?this.positions[r](t,i,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new Aa;class bc extends ht{constructor(t,n,i){super(t,n,i),this.type="tooltip",this.renderType=K.HTML,this.isEventListenerAdded=!1,this.positionService=new Aa,this.handleShowTooltip=r=>{const s=r.detail.data||r.detail.items;let a;const o=this.formatItems(this.getItems(r));r.detail.content?a=`<div class="title-tooltip"><p>${r.detail.content}</p></div>`:a=this.getTooltipHTML(o);const c=I.appendOrSelect(this.tooltip,"div.content-box");if(w(this.getOptions(),"tooltip","customHTML"))if(r.detail.content){const l=`<div class="title-tooltip"><p>${r.detail.content}</p></div>`;c.html(l)}else c.html(this.model.getOptions().tooltip.customHTML(s,a));else c.html(a);c.selectAll(".datapoint-tooltip").each(function(l,u){const d=o[u];o[u]&&o[u].color&&P(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",d.color)}),this.positionTooltip(r),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(M.Tooltip.MOVE,t=>{this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(M.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(M.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(M.Chart.MOUSEOUT,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(M.Tooltip.MOVE,null),this.services.events.removeEventListener(M.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(M.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(M.Chart.MOUSEOUT,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),i=w(n,"tooltip","truncation","type"),r=w(n,"tooltip","truncation","threshold"),s=w(n,"tooltip","truncation","numCharacter");return i!==Te.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>r&&(a.label=$r(a.label,i,s)),a.value&&a.value.length>r&&(a.value=$r(a.value,i,s)),a}):t}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
62
+ </div>`}render(t=!0){const n=this.model.getOptions();if(!this.isEventListenerAdded){const i=P(this.services.domUtils.getHolder()),r=w(n,"style","prefix");this.modal=I.appendOrSelect(i,`div.${te}--${r}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","cds--modal cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-title").attr("aria-describedby","modal-description").attr("tabindex",-1)}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class Nr extends ht{constructor(){super(...arguments),this.type="title",this.renderType=K.HTML}render(t=!0){const n=this.getComponentContainer(),i=w(this.getOptions(),"title"),r=n.selectAll("p.title").data([i]);if(r.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(r).html(s=>s),r.node()&&r.node().offsetWidth<r.node().scrollWidth){const s=this;r.on("mouseover",function(a){s.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:r,content:r.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(M.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(M.Tooltip.HIDE)})}r.exit().remove()}truncateTitle(t,n){if(n<=0)return;const i=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const r=I.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-r);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(c){o.services.events.dispatchEvent(M.Tooltip.SHOW,{event:c,hoveredElement:t,content:i})}).on("mousemove",function(c){o.services.events.dispatchEvent(M.Tooltip.MOVE,{event:c})}).on("mouseout",function(){o.services.events.dispatchEvent(M.Tooltip.HIDE)})}}getMaxTitleWidth(){return I.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,i,r){const s=Math.floor((i+n)/2);return t.getSubStringLength(0,s)>r?this.getSubstringIndex(t,n,s,r):t.getSubStringLength(0,s)<r?t.getSubStringLength(0,s+1)>r?s:this.getSubstringIndex(t,s,i,r):s}}class xc extends ht{constructor(){super(...arguments),this.type="legend",this.renderType=K.HTML}render(t=!0){const n=this.getOptions(),i=w(n,"legend"),r=w(i,"alignment"),s=w(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=kt.items.status,c=a.some(x=>x.status===o),l=w(i,"order"),u=this.getComponentContainer().classed("center-aligned",r===Nt.CENTER).classed("right-aligned",r===Nt.RIGHT).classed(s,!0).classed("has-deactivated-items",c).attr("role",at.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));const d=u.selectAll("div.legend-item").data(a,x=>x.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(x){return x.status===kt.items.status.ACTIVE});const f=w(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=kt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",at.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(x,b)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${b}-title`)).attr("aria-checked",({status:x})=>x===kt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",x=>this.model.getColorClassName({classNameTypes:[J.BACKGROUND],dataGroupName:x.name,originalClassName:"checkbox"})).style("background",x=>x.status===kt.items.status.ACTIVE?this.model.getFillColor(x.name)||this.model.getStrokeColor(x.name):null).classed("active",function(x){return x.status===kt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=w(n,"legend","additionalItems");if(v&&a.length){const x=this,b=u.selectAll("div.additional-item").data(v);b.exit().remove();const O=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(S,A)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+A}-title`));O.selectAll("*").remove();let E,T=1;O.append("svg").classed("icon",!0).each(function(S){const A=P(this);!E||E!=S.type?(E=S.type,T=1):T++,x.addAdditionalItem(A,S,T)}),O.append("p").merge(O.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((i,r)=>n.indexOf(i.name)-n.indexOf(r.name)),n.length<t.length){const i=t.length-n.length;return t.slice(i).concat(t.slice(0,i))}return t}addAdditionalItem(t,n,i){const{width:r,height:s}=kt.area;if(n.type===Bt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${r}px`).style("height",`${s}px`),n.type===Bt.RADIUS){const{iconData:a,fill:o,stroke:c}=kt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",at.IMG).attr("aria-label","radius").attr("cx",l=>l.cx).attr("cy",l=>l.cy).attr("r",l=>l.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:c)}else if(n.type===Bt.LINE){const a=kt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${i}`,!0).attr("role",at.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",r).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===Bt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${i}`,!0).attr("role",at.IMG).attr("aria-label","area").attr("width",r).attr("height",s).style("fill",i>3&&!n.fill?kt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===Bt.SIZE){const{iconData:a,fill:o,stroke:c}=kt.size;t.attr("fill","none").attr("role",at.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",l=>l.width).attr("height",l=>l.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:c).style("stroke-width",1)}else if(n.type===Bt.QUARTILE){const{iconData:a}=kt.quartile;t.selectAll("rect").attr("role",at.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(o,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",o=>o.x).attr("y",o=>o.y).attr("width",o=>o.width).attr("height",o=>o.height)}else if(n.type===Bt.ZOOM){const{iconData:a,color:o}=w(Fp,"legend","zoom"),c=t.attr("role",at.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();c.append("g").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),c.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=w(this.getOptions(),"legend","truncation"),i=w(n,"type"),r=w(n,"threshold"),s=w(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),i!==Te.NONE?a.html(function(o){return o.name.length>r?$r(o.name,i,s):o.name}):a.html(o=>o.name)}addEventListeners(){const t=this,n=this.getComponentContainer(),i=this.getOptions(),r=w(i,"legend"),s=w(r,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(M.Legend.ITEM_HOVER,{hoveredElement:P(this)});const o=P(this);o.select("div.checkbox").classed("hovered",!0);const c=o.datum();c.name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:o,content:c.name})}).on("mousemove",function(a){P(this).datum().name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(M.Legend.ITEM_CLICK,{clickedElement:P(this)});const a=P(this).datum();t.model.toggleDataLabel(a.name)}).on("mouseout",function(){const a=P(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Te.NONE&&t.services.events.dispatchEvent(M.Tooltip.HIDE),t.services.events.dispatchEvent(M.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(M.Legend.ITEM_HOVER,{hoveredElement:P(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(M.Legend.ITEM_MOUSEOUT,{hoveredElement:P(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=P(this),c=o.datum();c.name.length>s.threshold&&t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:a,hoveredElement:o,content:c.name})})}}class jm extends ht{constructor(t,n,i){super(t,n,i),this.type="chart-clip",this.renderType=K.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const i=n.getMainXScale(),r=n.getMainYScale(),[s,a]=i.range(),[o,c]=r.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const l=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&l.attr("x",s).attr("y",c).attr("width",a-s).attr("height",o-c),this.chartClipPath.merge(l).lower()}}class nR extends jm{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const r=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);r.attr("x",0).attr("y",0).attr("width",n).attr("height",i),this.chartClipPath.merge(r).lower()}}var Ci,qt;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(qt||(qt={}));var qm=(Ci={},Ci[qt.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},Ci[qt.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},Ci[qt.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},Ci[qt.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},Ci),Wm=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Aa=function(){function e(t){t===void 0&&(t={}),this.positions=qm,this.positions=Object.assign({},qm,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,i={top:0,left:0};n.offsetParent;){var r=getComputedStyle(n.offsetParent);r.position==="static"&&r.marginLeft&&r.marginTop&&(parseInt(r.marginTop,10)&&(i.top+=parseInt(r.marginTop,10)),parseInt(r.marginLeft,10)&&(i.left+=parseInt(r.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+i.top,left:s.left-a.left+i.left}},e.prototype.findRelative=function(t,n,i){var r=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(r,s,n,i)},e.prototype.findAbsolute=function(t,n,i){var r=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(r,s,n,i)},e.prototype.findPosition=function(t,n,i,r){r===void 0&&(r=this.getAbsoluteOffset.bind(this));var s=r(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,i)},e.prototype.findPositionAt=function(t,n,i){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,i)},e.prototype.getPlacementBox=function(t,n){var i=t.offsetHeight+n.top,r=t.offsetWidth+n.left;return{top:n.top,bottom:i,left:n.left,right:r}},e.prototype.addOffset=function(t,n,i){return n===void 0&&(n=0),i===void 0&&(i=0),Object.assign({},t,{top:t.top+n,left:t.left+i})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,i,r,s){var a=this;r===void 0&&(r=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=i.map(function(c){var l=s(t,n,c),u=a.getPlacementBox(n,l),d=0,h=0,f=r();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:c,weight:v}});return o.sort(function(c,l){return l.weight-c.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,i,r){var s=this;r===void 0&&(r=this.defaultContainerFunction.bind(this));var a=function(o,c,l){return s.findPositionAt(t,c,l)};return this.findBestPlacement(null,n,i,r,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:Wm.innerHeight,width:Wm.innerWidth}},e.prototype.calculatePosition=function(t,n,i,r){return this.positions[r]?this.positions[r](t,i,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new Aa;class bc extends ht{constructor(t,n,i){super(t,n,i),this.type="tooltip",this.renderType=K.HTML,this.isEventListenerAdded=!1,this.positionService=new Aa,this.handleShowTooltip=r=>{const s=r.detail.data||r.detail.items;let a;const o=this.formatItems(this.getItems(r));r.detail.content?a=`<div class="title-tooltip"><p>${r.detail.content}</p></div>`:a=this.getTooltipHTML(o);const c=I.appendOrSelect(this.tooltip,"div.content-box");if(w(this.getOptions(),"tooltip","customHTML"))if(r.detail.content){const l=`<div class="title-tooltip"><p>${r.detail.content}</p></div>`;c.html(l)}else c.html(this.model.getOptions().tooltip.customHTML(s,a));else c.html(a);c.selectAll(".datapoint-tooltip").each(function(l,u){const d=o[u];o[u]&&o[u].color&&P(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",d.color)}),this.positionTooltip(r),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(M.Tooltip.MOVE,t=>{this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(M.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(M.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(M.Chart.MOUSEOUT,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(M.Tooltip.MOVE,null),this.services.events.removeEventListener(M.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(M.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(M.Chart.MOUSEOUT,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),i=w(n,"tooltip","truncation","type"),r=w(n,"tooltip","truncation","threshold"),s=w(n,"tooltip","truncation","numCharacter");return i!==Te.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>r&&(a.label=$r(a.label,i,s)),a.value&&a.value.length>r&&(a.value=$r(a.value,i,s)),a}):t}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
63
63
  <div class="datapoint-tooltip${n.bold?" bold":""}">
64
64
  ${n.class||n.color?`<div class="tooltip-color ${n.class}"></div>`:""}
65
65
  <div class="label">
@@ -68,17 +68,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
68
68
  </div>
69
69
  ${n.value===void 0||n.value===null?"":`<p class="value"/>${n.value}</p>`}
70
70
  </div>
71
- </li>`).join("")+"</ul>"}valueFormatter(t,n){const i=this.getOptions(),r=w(i,"tooltip","valueFormatter");if(r)return r(t,n);if(typeof t.getTime=="function")return mi(t,"MMM d, yyyy");try{if(typeof t=="string"&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return mi(Date.parse(t),"MMM d, yyyy")}catch{}return t.toLocaleString()}render(t=!0){const n=this.getOptions(),i=w(n,"tooltip","enabled");if(i){const r=P(this.services.domUtils.getHolder()),s=w(n,"style","prefix");this.tooltip=I.appendOrSelect(r,`div.${te}--${s}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!i&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}positionTooltip(t){const n=this.services.domUtils.getHolder(),i=this.tooltip.node(),r=this.getOptions(),s=w(r,"zoomBar","top","enabled");let a=w(t,"detail","mousePosition");if(!a)a=bn(w(t,"detail","event"),n);else{const h=w(r,"zoomBar","top","type"),f=se.height[h];s&&(a[1]+=f+se.spacerHeight)}const o=n.offsetWidth,c=n.offsetHeight;let l;a[0]/o>.9?l=Wt.LEFT:a[0]/o<.1?l=Wt.RIGHT:l=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},i,[Wt.RIGHT,Wt.LEFT,Wt.TOP,Wt.BOTTOM],()=>({top:void 0,left:void 0,width:o,height:c}));let{horizontalOffset:u}=bf;l===Wt.LEFT&&(u*=-1);const d=this.positionService.findPositionAt({left:a[0]+u,top:a[1]},i,l);this.positionService.setElement(i,d)}}const La=class extends ht{constructor(){super(...arguments),this.type="grid-brush",this.renderType=K.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,i=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const r=I.appendOrSelect(n,"svg.chart-grid-backdrop"),s=I.appendOrSelect(r,`g.${this.type}`),a=I.appendOrSelect(s,this.selectionSelector),{width:o,height:c}=I.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:l}=this.services,u=l.getMainXScaleType(),d=l.getMainXScale(),[h]=d.range();i.attr("transform",`translate(${h},0)`);const f=I.appendOrSelect(i,this.frontSelectionSelector);if(d&&u===Z.TIME){let p=this.model.get("zoomDomain");p===void 0&&(p=this.services.zoom.getDefaultZoomBarDomain(),p&&this.model.set({zoomDomain:p},{animate:!1}));const g=E=>{const T=E[1]-E[0];let S="0,"+T.toString();const A=Math.floor(c/La.DASH_LENGTH),D=A*La.DASH_LENGTH;for(let L=0;L<A;L++)S+=","+La.DASH_LENGTH;S+=","+(c-D),A%2===1&&(S+=",0"),S+=","+T.toString(),S+=","+c.toString(),f.attr("stroke-dasharray",S)},m=E=>{const T=E.selection;T===null||T[0]===T[1]||(f.attr("x",parseFloat(a.attr("x"))+parseFloat(r.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),g(T))},v=(E,T)=>{const S=gd().range([0,o]).domain(p);let A=[S.invert(E),S.invert(T)];A[0].valueOf()===A[1].valueOf()&&(A=this.services.zoom.getDefaultZoomBarDomain()),(p[0].valueOf()!==A[0].valueOf()||p[1].valueOf()!==A[1].valueOf())&&this.services.zoom.handleDomainChange(A)};let x;const b=E=>{const T=E.selection;T!==null&&(v(T[0],T[1]),s.call(x.move,null),f.style("display","none"))};c!=0&&o!=0&&(x=ku().extent([[0,0],[o-1,c]]).on("start brush end",m).on("end.brushed",b),s.call(x));const O=this.services.zoom.getZoomRatio();r.on("click",function(E){if(E.shiftKey){const T=this.services.domUtils.getHolder(),S=bn(s.node(),T)[0];let A=S-o*O/2;A<0&&(A=0);let D=S+o*O/2;D>o&&(D=o),v(A,D)}})}}};let qm=La;qm.DASH_LENGTH=4;class nR extends ht{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=K.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(Math.random()*99999999999),this.brush=ku(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(M.ZoomBar.UPDATE,this.render.bind(this));const t=w(this.getOptions(),"zoomBar",V.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const n=this.getComponentContainer(),i=this.services.zoom.isZoomBarLoading(V.TOP),r=this.services.zoom.isZoomBarLocked(V.TOP),s=w(this.getOptions(),"zoomBar",V.TOP,"type"),a=w(this.getOptions(),"axes",V.BOTTOM,"highlights"),o=se.height[s],{width:c}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(c===0)return;let l=0;const u=this.model.get("axesMargins");u&&u.left&&(l=u.left);const d=I.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(I.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",se.spacerHeight).attr("opacity",1).attr("fill","none"),s===Pe.GRAPH_VIEW?I.appendOrSelect(d,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",c-l).attr("height","100%").classed("zoom-bg-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):s===Pe.SLIDER_VIEW&&I.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",l).attr("y",o/2-1).attr("width",c-l).attr("height",2).classed("zoom-slider-bg-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),i){this.renderSkeleton(d,l,c);return}const{cartesianScales:h}=this.services,f=h.getMainXScale(),p=h.getMainYScale(),g=h.getMainXScaleType();if(f&&g===Z.TIME){let m=this.services.zoom.getZoomBarData();if($e(m)||m.length===1)return;this.xScale=f.copy(),this.yScale=p.copy();const v=this.services.zoom.getDefaultZoomBarDomain(m);m=this.compensateDataForDefaultDomain(m,v);const x=this.model.get("initialZoomDomain"),b=w(this.getOptions(),"zoomBar",V.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),b&&!(x&&x[0].valueOf()===b[0].valueOf()&&x[1].valueOf()===b[1].valueOf())?this.model.set({initialZoomDomain:nt([],b),zoomDomain:b?nt([],b):v},{skipUpdate:!0}):b===null&&x!==null&&this.model.set({initialZoomDomain:null,zoomDomain:nt([],v)},{skipUpdate:!0}),this.xScale.range([l,c]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(xe(m,T=>T.value));const O=this.model.get("zoomDomain");if(s===Pe.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",m,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",m,this.clipId),this.renderZoomBarBaseline(d,l,c),a)){const T=a.highlightStartMapsTo,S=a.highlightEndMapsTo,A=a.color,D=a.labelMapsTo;a.data.forEach((L,C)=>{I.appendOrSelect(d,`rect.highlight-${C}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(L[T])).attr("width",this.xScale(L[S])-this.xScale(L[T])).style("fill",A&&A.scale[L[D]]?A.scale[L[D]]:null).style("fill-opacity",.1).style("stroke",A&&A.scale[L[D]]?A.scale[L[D]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(O,l,c);const E=I.appendOrSelect(n,this.brushSelector).call(this.brush);if(O!==void 0)if(O[0].valueOf()===O[1].valueOf())E.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const T=O.map(S=>this.xScale(S));T[1]-T[0]<this.MIN_SELECTION_DIFF||(E.call(this.brush.move,T),this.updateBrushHandle(this.getComponentContainer(),T))}r&&(this.brush.filter(()=>!1),E.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,n,i){const r=o=>{const c=o.selection;c===null?this.handleBrushedEvent(o,t,this.xScale,this.xScale.range()):c[0]===c[1]||this.handleBrushedEvent(o,t,this.xScale,c)},s=w(this.getOptions(),"zoomBar",V.TOP,"type"),a=se.height[s];this.brush.extent([[n,0],[i,a]]).on("start brush end",null).on("start brush end",r)}handleBrushedEvent(t,n,i,r){const s=[i.invert(r[0]),i.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),t.sourceEvent!=null&&(t.sourceEvent.type==="mousemove"||t.sourceEvent.type==="mouseup"||t.sourceEvent.type==="mousedown"||t.sourceEvent.type==="touchstart"||t.sourceEvent.type==="touchmove"||t.sourceEvent.type==="touchend")){(n===void 0||n[0]!==s[0]||n[1]!==s[1])&&this.services.zoom.handleDomainChange(s,{dispatchEvent:!1});let a;t.type==="start"?a=M.ZoomBar.SELECTION_START:t.type==="brush"?a=M.ZoomBar.SELECTION_IN_PROGRESS:t.type==="end"&&(a=M.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(M.ZoomDomain.CHANGE,{newDomain:s})),this.services.events.dispatchEvent(a,{selection:r,newDomain:s})}}updateBrushHandle(t,n){const i=this,r=se.handleWidth,s=w(this.getOptions(),"zoomBar",V.TOP,"type"),a=se.height[s],o=-r/2,c=se.handleBarWidth,l=s===Pe.GRAPH_VIEW?se.handleBarHeight:6,u=-c/2,d=(a-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(f){if(f.type==="w")return Math.max(n[0]+o,i.maxSelectionRange[0]);if(f.type==="e")return Math.min(n[1]+o,i.maxSelectionRange[1]-r)}).attr("y",0).attr("width",r).attr("height",a).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",function(f){return"handle-bar handle-bar--"+f.type}),h.attr("x",function(f){if(f.type==="w")return Math.max(n[0]+u,i.maxSelectionRange[0]-o+u);if(f.type==="e")return Math.min(n[1]+u,i.maxSelectionRange[1]+o+u)}).attr("y",d).attr("width",c).attr("height",l).attr("cursor","ew-resize"),s===Pe.SLIDER_VIEW&&this.updateSliderSelectedArea(n),this.updateClipPath(t,this.clipId,n[0],0,n[1]-n[0],a)}updateSliderSelectedArea(t){const n=w(this.getOptions(),"zoomBar",V.TOP,"type"),i=se.height[n],r=this.getComponentContainer().select("svg.zoom-container");I.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",i/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,n,i,r){const{cartesianScales:s}=this.services,a=s.getMainXAxisPosition(),o=s.getMainYAxisPosition(),c=s.getMainXScaleType(),l=s.getMainYScaleType(),u=(v,x,b)=>O=>s.getValueFromScale(v,x,b,O),d=u(this.xScale,c,a),h=u(this.yScale,l,o),f=w(this.getOptions(),"zoomBar",V.TOP,"type"),p=se.height[f],g=sl().x(v=>d(v)).y0(p).y1(v=>p-h(v)),m=I.appendOrSelect(t,n).datum(i).attr("d",g);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(t,n,i,r,s,a){const o=I.appendOrSelect(t,"clipPath").attr("id",n);I.appendOrSelect(o,"rect").attr("x",i).attr("y",r).attr("width",s).attr("height",a)}compensateDataForDefaultDomain(t,n){if(!t||t.length<2)return;const i=rn(t),r=this.services.cartesianScales.getDomainIdentifier(),s=this.services.cartesianScales.getRangeIdentifier();if(Number(n[0])<Number(i[0][r])){const a={};a[r]=n[0],a[s]=0,i.unshift(a)}if(Number(n[1])>Number(i[i.length-1][r])){const a={};a[r]=n[1],a[s]=0,i.push(a)}return i}renderZoomBarBaseline(t,n,i,r=!1){const s=w(this.model.getOptions(),"zoomBar",V.TOP,"type"),a=se.height[s],o=cr()([[n,a],[i,a]]);I.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,n,i){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),I.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),w(this.getOptions(),"zoomBar",V.TOP,"type")===Pe.GRAPH_VIEW&&this.renderZoomBarBaseline(t,n,i,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(M.ZoomBar.UPDATE,this.render.bind(this))}}class iR extends ht{constructor(t,n){super(t,n),this.type="threshold",this.renderType=K.SVG,this.positionService=new Aa}render(t=!1){const n=w(this.getOptions(),"axes"),i=[];Object.keys(n).forEach(l=>{if(Object.values(V).includes(l)){const u=n[l];u.thresholds&&u.thresholds.length>0&&i.push({axisPosition:l,thresholds:u.thresholds,correspondingDatasets:u==null?void 0:u.correspondingDatasets,mapsTo:u==null?void 0:u.mapsTo})}});const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(i,l=>l.axisPosition);r.exit().attr("opacity",0).remove();const s=r.enter().append("g").merge(r);s.attr("class",l=>`axis-thresholds ${l.axisPosition}`);const a=s.selectAll("g.threshold-group").data(l=>l.thresholds.map(u=>(u.axisPosition=l.axisPosition,u.datum=this.constructDatumObj(l,u),u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(a).attr("class","threshold-group");const c=this;s.each(function({axisPosition:l}){const u=c.services.cartesianScales.getScaleByPosition(l),d=c.services.cartesianScales.getScaleTypeByPosition(l);let h=null,f=null;l===V.LEFT||l===V.RIGHT?(f=u,h=c.services.cartesianScales.getMainXScale()):(h=u,f=c.services.cartesianScales.getMainYScale());const p=d===Z.LABELS,[g,m]=h.range(),[v,x]=f.range(),{cartesianScales:b}=c.services,O=b.getOrientation(),E=L=>b.getDomainValue(L),T=L=>b.getRangeValue(L),[S,A]=an(E,T,O),D=P(this);l===V.TOP||l===V.BOTTOM?(D.selectAll("line.threshold-line").transition().call(L=>c.services.transitions.setupTransition({transition:L,name:"threshold-line-update",animate:t})).attr("y1",x).attr("y2",v).attr("x1",({datum:L})=>S(L)+(p?u.step()/2:0)).attr("x2",({datum:L})=>S(L)+(p?u.step()/2:0)).style("stroke",({fillColor:L})=>L),D.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:L})=>-S(L)).attr("width",Math.abs(v-x)).classed("rotate",!0)):(D.selectAll("line.threshold-line").transition().call(L=>c.services.transitions.setupTransition({transition:L,name:"threshold-line-update",animate:t})).attr("x1",g).attr("x2",m).attr("y1",({datum:L})=>A(L)+(p?u.step()/2:0)).attr("y2",({datum:L})=>A(L)+(p?u.step()/2:0)).style("stroke",({fillColor:L})=>L),D.selectAll("rect.threshold-hoverable-area").attr("x",g).attr("y",({datum:L})=>A(L)).attr("width",Math.abs(m-g)).classed("rotate",!1))}),this.services.events.addEventListener(M.Threshold.SHOW,l=>{this.setThresholdLabelPosition(l.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(M.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:n,axisPosition:i}=t,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(i)===Z.TIME){const s=[V.LEFT,V.RIGHT].includes(i),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),c=s?o:a,l=w(r,"timeScale"),u=Yl(c.ticks());return ql(n,0,c.ticks(),u,l)}return n.toLocaleString("en")}appendThresholdLabel(){const t=P(this.services.domUtils.getHolder()),n=w(this.getOptions(),"style","prefix");this.label=I.appendOrSelect(t,`div.${te}--${n}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:n}){const i=this.services.domUtils.getHolder(),r=bn(t,i),s=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html(`${n.label||"Threshold"}: ${s}`).style("background-color",n.fillColor);const a=this.label.node(),o=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},a,[Wt.RIGHT,Wt.LEFT,Wt.TOP,Wt.BOTTOM],()=>({top:void 0,left:void 0,width:i.offsetWidth,height:i.offsetHeight})),c=this.positionService.findPositionAt({left:r[0],top:r[1]},a,o);this.positionService.setElement(a,c)}constructDatumObj(t,n){const i={};return t.correspondingDatasets&&(i.group=w(t,"correspondingDatasets",0)),i[t.mapsTo]=n.value,i}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",function(n){P(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(M.Threshold.SHOW,{event:n,hoveredElement:P(this),datum:P(this).datum()})}).on("mouseout",function(n){P(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(M.Threshold.HIDE,{event:n,hoveredElement:P(this),datum:P(this).datum()})})}}class rR extends ht{constructor(t,n){super(t,n),this.type="highlight",this.renderType=K.SVG,this.positionService=new Aa,this.highlightStrokeWidth=1}render(t=!1){const n=w(this.getOptions(),"axes"),i=[];Object.keys(n).forEach(l=>{if(Object.values(V).includes(l)){const u=n[l];u.highlights&&u.highlights.data.length>0&&i.push({axisPosition:l,highlightStartMapsTo:u.highlights.highlightStartMapsTo,highlightEndMapsTo:u.highlights.highlightEndMapsTo,labelMapsTo:u.highlights.labelMapsTo,highlight:u.highlights.data,color:u.highlights.color})}});const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(i,l=>l.axisPosition);r.exit().attr("opacity",0).remove();const s=r.enter().append("g").merge(r);s.attr("class",l=>`axis-highlight ${l.axisPosition}`);const a=s.selectAll("g.highlight-group").data(l=>l.highlight.map(u=>(u.axisPosition=l.axisPosition,u.highlightStartMapsTo=l.highlightStartMapsTo,u.labelMapsTo=l.labelMapsTo,u.color=l.color,u.highlightEndMapsTo=l.highlightEndMapsTo,u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(a).attr("class","highlight-group");const c=this;s.each(function({axisPosition:l}){const u=c.services.cartesianScales.getMainXScale(),d=c.services.cartesianScales.getMainYScale(),[h,f]=u.range(),[p,g]=d.range(),{cartesianScales:m}=c.services,v=m.getOrientation(),x=S=>m.getDomainValue(S),b=S=>m.getRangeValue(S),[O,E]=an(x,b,v),T=P(this);l===V.TOP||l===V.BOTTOM?T.selectAll("rect.highlight-bar").transition().call(S=>c.services.transitions.setupTransition({transition:S,name:"highlight-bar-update",animate:t})).attr("y",Math.max(g+c.highlightStrokeWidth,0)).attr("height",Math.max(p-2*c.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:S,...A})=>O(A[S])).attr("width",({highlightStartMapsTo:S,highlightEndMapsTo:A,...D})=>Math.max(O(D[A])-O(D[S]),0)).style("stroke",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",c.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null):T.selectAll("rect.highlight-bar").transition().call(S=>c.services.transitions.setupTransition({transition:S,name:"highlight-bar-update",animate:t})).attr("x",h).attr("width",Math.max(f-h,0)).attr("y",({highlightEndMapsTo:S,...A})=>E(A[S])).attr("height",({highlightStartMapsTo:S,highlightEndMapsTo:A,...D})=>Math.max(E(D[S])-E(D[A]),0)).style("stroke",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",c.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null)})}}class Ym extends bc{getItems(t){if(t.detail.items)return t.detail.items;const n=t.detail.data;if(!n.length||!n[0])return[];const i=this.getOptions(),{cartesianScales:r}=this.services,s=r.getDomainIdentifier(),a=r.isDualAxes(),{groupMapsTo:o}=i.data,c=r.getDomainLabel();let l=r.getRangeLabel();const u=n[0][s];let d;if(n.length===1){const h=n[0],f=r.getRangeIdentifier(h);if(a){const g=r.getRangeAxisPosition({datum:h,groups:[h[o]]});l=r.getScaleLabel(g)}const p=h[f];d=[{label:c,value:u},...Array.isArray(p)&&p.length===2?[{label:"Start",value:p[0]},{label:"End",value:p[1]}]:[{label:l,value:h[f]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach(g=>d.push({label:g.label,value:g.value})),d.push({label:i.tooltip.groupLabel,value:h[o],color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:h[o]})})}else if(n.length>1&&(d=[{label:c,value:u}],d=d.concat(n.map(h=>{const f=h[r.getRangeIdentifier(h)];return{label:h[o],value:Array.isArray(f)&&f.length===2?`${f[0]} - ${f[1]}`:f,color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:h[o]})}}).sort((h,f)=>f.value-h.value)),!a&&w(i,"tooltip","showTotal")===!0)){const h=r.getRangeIdentifier();d.push({label:Ot(i,"tooltip.totalLabel")||"Total",value:n.reduce((f,p)=>f+p[h],0),bold:!0})}return d}}class sR extends ht{constructor(){super(...arguments),this.type="alluvial",this.renderType=K.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.html("");const{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0});if(i<1||r<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=w(this.getOptions(),"color","gradient","enabled");let c=ve.minNodePadding;s.alluvial.nodePadding>ve.minNodePadding&&(c=s.alluvial.nodePadding);const l=w(s,"alluvial","nodeAlignment");let u=tm;l===Nt.LEFT?u=aL:l===Nt.RIGHT&&(u=oL);const d=hL().nodeId(m=>m.name).nodeWidth(ve.nodeWidth).nodePadding(c).nodeAlign(u).extent([[2,30],[i-2,r]]);this.graph=d({nodes:s.alluvial.nodes.map(m=>Object.assign({},m)),links:a.map(m=>Object.assign({},m))}),this.graph.nodes=this.graph.nodes.filter(m=>m.value!==0);const h={};this.graph.nodes.forEach(m=>{const v=m.x0;m.category&&(h[v]=m==null?void 0:m.category)}),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(h)).join("g").attr("transform",m=>`translate(${m}, 0)`).append("text").attr("id",(m,v)=>this.services.domUtils.generateElementIDString(`alluvial-category-${v}`)).style("font-size","14px").text(m=>h[m]?h[m]:"").attr("y",20).attr("x",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-category-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0});let O=0;return m+O>=b&&(O=-b+4),O});const f=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(f.exit().remove(),o){const m=w(this.getOptions(),"color","scale");m&&f.enter().append("linearGradient").attr("id",v=>`${this.gradient_id}-link-${v.index}`).attr("gradientUnits","userSpaceOnUse").call(v=>v.append("stop").attr("offset","0%").attr("stop-color",x=>m[x.source.name])).call(v=>v.append("stop").attr("offset","100%").attr("stop-color",x=>m[x.target.name])),f.exit().remove()}f.enter().append("path").classed("link",!0).attr("d",EL()).attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-line-${m.index}`)).attr("class",m=>s.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:m.source.index,originalClassName:"link"})).style("stroke",m=>o?`url(#${this.gradient_id}-link-${m.index})`:this.model.getFillColor(m.source.name)).attr("stroke-width",m=>Math.max(1,m.width)).style("stroke-opacity",ve.opacity.default).attr("aria-label",m=>`${m.source.name} → ${m.target.name} (${m.value}${s.alluvial.units?" "+s.alluvial.units:""})`);const p=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-${m.index}`)).classed("node-group",!0).attr("transform",m=>`translate(${m.x0}, ${m.y0})`);p.append("rect").classed("node",!0).attr("height",m=>m.y1-m.y0).attr("width",m=>m.x1-m.x0).attr("fill","black");const g=p.append("g").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${m.index}`));g.append("text").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${m.index}`)).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text(m=>`${m.name} (${m.value})`).attr("aria-label",m=>`${m.name} (${m.value})`),g.append("rect").classed("node-text-bg",!0).attr("width",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-node-text-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0});return b+8}).attr("height",18).attr("stroke-width",2).lower(),g.attr("transform",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-node-text-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0}),O=(m.y1-m.y0)/2-9;let E=m.x1-m.x0;return m.x1>=b?E=E-(b+16):E+=4,`translate(${E}, ${O})`}),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const t=this.getOptions(),n=this,i=ya((r,s="mouseover")=>{const a=n.parent.selectAll("path.link").transition().call(o=>n.services.transitions.setupTransition({transition:o,name:"alluvial-links-mouse-highlight"}));s==="mouseout"?(P(r).lower(),a.style("stroke-opacity",ve.opacity.default)):a.style("stroke-opacity",function(){return r===this?(P(this).raise(),ve.opacity.selected):ve.opacity.unfocus})},33);this.parent.selectAll("path.link").on("mouseover",function(r,s){const a=P(this);i(this,"mouseover"),a.classed("link-hovered",!0);const o=getComputedStyle(this).getPropertyValue("stroke");n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEOVER,{event:r,element:a,datum:s}),n.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:s.target.name,value:s.value+(t.alluvial.units?` ${t.alluvial.units}`:""),color:o,labelIcon:n.getRightArrowIcon()}]})}).on("mousemove",function(r,s){n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEMOVE,{event:r,element:P(this),datum:s}),n.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){n.services.events.dispatchEvent(M.Alluvial.LINE_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);i(this,"mouseout"),a.classed("link-hovered",!1),n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEOUT,{event:r,element:a,datum:s}),n.services.events.dispatchEvent(M.Tooltip.HIDE,{event:r,hoveredElement:a})})}addNodeEventListener(){const t=this,n=ya((i=[],r="mouseover")=>{if(r==="mouseout"||i.length===0){t.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,s=>s.index).order().style("stroke-opacity",ve.opacity.default);return}t.parent.selectAll("path.link").transition().call(s=>this.services.transitions.setupTransition({transition:s,name:"alluvial-link-mouse-highlight"})).style("stroke-opacity",function(s){return i.some(a=>a===s.index)?(P(this).classed("link-hovered",!0).raise(),ve.opacity.selected):ve.opacity.unfocus})},66);t.parent.selectAll(".node-group").on("mouseover",function(i,r){const s=P(this),a=[];if(t.traverse({link:"sourceLinks",node:"target"},r,a),t.traverse({link:"targetLinks",node:"source"},r,a),a.length){const o=Mr(s.attr("transform"));if(s.attr("transform",`translate(${o.x-2}, ${o.y})`),s.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2===0){const l=t.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),u=t.parent.select(`g#${l}`),d=Mr(u.attr("transform"));u.attr("transform",`translate(${d.x+4},${d.y})`)}const c=t.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);t.parent.select(`text#${c}`).style("font-weight","bold"),n(a,"mouseover"),t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEOVER,{event:i,element:s,datum:r})}}).on("mousemove",function(i,r){t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEMOVE,{event:i,element:P(this),datum:r}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(M.Alluvial.NODE_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){const s=P(this),a=Mr(s.attr("transform"));if(s.classed("node-hovered",!1).attr("transform",`translate(${a.x+2}, ${a.y})`).select("rect.node").attr("width",ve.nodeWidth),r.x0-2===0){const c=t.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),l=t.parent.select(`g#${c}`),u=Mr(l.attr("transform"));l.attr("transform",`translate(${u.x-4},${u.y})`)}const o=t.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);t.parent.select(`text#${o}`).style("font-weight","normal"),n([],"mouseout"),t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEOUT,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:s})})}traverse(t,n,i=[]){n[t.link].map(r=>(i.push(r.index),r[t.node])).forEach(r=>this.traverse(t,r,i))}getRightArrowIcon(){return`
71
+ </li>`).join("")+"</ul>"}valueFormatter(t,n){const i=this.getOptions(),r=w(i,"tooltip","valueFormatter");if(r)return r(t,n);if(typeof t.getTime=="function")return mi(t,"MMM d, yyyy");try{if(typeof t=="string"&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t))return mi(Date.parse(t),"MMM d, yyyy")}catch{}return t.toLocaleString()}render(t=!0){const n=this.getOptions(),i=w(n,"tooltip","enabled");if(i){const r=P(this.services.domUtils.getHolder()),s=w(n,"style","prefix");this.tooltip=I.appendOrSelect(r,`div.${te}--${s}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!i&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}positionTooltip(t){const n=this.services.domUtils.getHolder(),i=this.tooltip.node(),r=this.getOptions(),s=w(r,"zoomBar","top","enabled");let a=w(t,"detail","mousePosition");if(!a)a=wn(w(t,"detail","event"),n);else{const h=w(r,"zoomBar","top","type"),f=se.height[h];s&&(a[1]+=f+se.spacerHeight)}const o=n.offsetWidth,c=n.offsetHeight;let l;a[0]/o>.9?l=qt.LEFT:a[0]/o<.1?l=qt.RIGHT:l=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},i,[qt.RIGHT,qt.LEFT,qt.TOP,qt.BOTTOM],()=>({top:void 0,left:void 0,width:o,height:c}));let{horizontalOffset:u}=bf;l===qt.LEFT&&(u*=-1);const d=this.positionService.findPositionAt({left:a[0]+u,top:a[1]},i,l);this.positionService.setElement(i,d)}}const La=class extends ht{constructor(){super(...arguments),this.type="grid-brush",this.renderType=K.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(t=!0){const n=this.parent,i=this.getComponentContainer();if(!n)throw new Error("SVG was not defined");const r=I.appendOrSelect(n,"svg.chart-grid-backdrop"),s=I.appendOrSelect(r,`g.${this.type}`),a=I.appendOrSelect(s,this.selectionSelector),{width:o,height:c}=I.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:l}=this.services,u=l.getMainXScaleType(),d=l.getMainXScale(),[h]=d.range();i.attr("transform",`translate(${h},0)`);const f=I.appendOrSelect(i,this.frontSelectionSelector);if(d&&u===Z.TIME){let p=this.model.get("zoomDomain");p===void 0&&(p=this.services.zoom.getDefaultZoomBarDomain(),p&&this.model.set({zoomDomain:p},{animate:!1}));const g=E=>{const T=E[1]-E[0];let S="0,"+T.toString();const A=Math.floor(c/La.DASH_LENGTH),D=A*La.DASH_LENGTH;for(let L=0;L<A;L++)S+=","+La.DASH_LENGTH;S+=","+(c-D),A%2===1&&(S+=",0"),S+=","+T.toString(),S+=","+c.toString(),f.attr("stroke-dasharray",S)},m=E=>{const T=E.selection;T===null||T[0]===T[1]||(f.attr("x",parseFloat(a.attr("x"))+parseFloat(r.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),g(T))},v=(E,T)=>{const S=gd().range([0,o]).domain(p);let A=[S.invert(E),S.invert(T)];A[0].valueOf()===A[1].valueOf()&&(A=this.services.zoom.getDefaultZoomBarDomain()),(p[0].valueOf()!==A[0].valueOf()||p[1].valueOf()!==A[1].valueOf())&&this.services.zoom.handleDomainChange(A)};let x;const b=E=>{const T=E.selection;T!==null&&(v(T[0],T[1]),s.call(x.move,null),f.style("display","none"))};c!=0&&o!=0&&(x=ku().extent([[0,0],[o-1,c]]).on("start brush end",m).on("end.brushed",b),s.call(x));const O=this.services.zoom.getZoomRatio();r.on("click",function(E){if(E.shiftKey){const T=this.services.domUtils.getHolder(),S=wn(s.node(),T)[0];let A=S-o*O/2;A<0&&(A=0);let D=S+o*O/2;D>o&&(D=o),v(A,D)}})}}};let Ym=La;Ym.DASH_LENGTH=4;class iR extends ht{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=K.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(Math.random()*99999999999),this.brush=ku(),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(M.ZoomBar.UPDATE,this.render.bind(this));const t=w(this.getOptions(),"zoomBar",H.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){const n=this.getComponentContainer(),i=this.services.zoom.isZoomBarLoading(H.TOP),r=this.services.zoom.isZoomBarLocked(H.TOP),s=w(this.getOptions(),"zoomBar",H.TOP,"type"),a=w(this.getOptions(),"axes",H.BOTTOM,"highlights"),o=se.height[s],{width:c}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(c===0)return;let l=0;const u=this.model.get("axesMargins");u&&u.left&&(l=u.left);const d=I.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);if(I.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",se.spacerHeight).attr("opacity",1).attr("fill","none"),s===Pe.GRAPH_VIEW?I.appendOrSelect(d,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",c-l).attr("height","100%").classed("zoom-bg-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):s===Pe.SLIDER_VIEW&&I.appendOrSelect(d,"rect.zoom-slider-bg").attr("x",l).attr("y",o/2-1).attr("width",c-l).attr("height",2).classed("zoom-slider-bg-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),i){this.renderSkeleton(d,l,c);return}const{cartesianScales:h}=this.services,f=h.getMainXScale(),p=h.getMainYScale(),g=h.getMainXScaleType();if(f&&g===Z.TIME){let m=this.services.zoom.getZoomBarData();if($e(m)||m.length===1)return;this.xScale=f.copy(),this.yScale=p.copy();const v=this.services.zoom.getDefaultZoomBarDomain(m);m=this.compensateDataForDefaultDomain(m,v);const x=this.model.get("initialZoomDomain"),b=w(this.getOptions(),"zoomBar",H.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),b&&!(x&&x[0].valueOf()===b[0].valueOf()&&x[1].valueOf()===b[1].valueOf())?this.model.set({initialZoomDomain:nt([],b),zoomDomain:b?nt([],b):v},{skipUpdate:!0}):b===null&&x!==null&&this.model.set({initialZoomDomain:null,zoomDomain:nt([],v)},{skipUpdate:!0}),this.xScale.range([l,c]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,o-6]).domain(xe(m,T=>T.value));const O=this.model.get("zoomDomain");if(s===Pe.GRAPH_VIEW&&(this.renderZoomBarArea(d,"path.zoom-graph-area-unselected",m,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(d,"path.zoom-graph-area",m,this.clipId),this.renderZoomBarBaseline(d,l,c),a)){const T=a.highlightStartMapsTo,S=a.highlightEndMapsTo,A=a.color,D=a.labelMapsTo;a.data.forEach((L,C)=>{I.appendOrSelect(d,`rect.highlight-${C}`).attr("height",o-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(L[T])).attr("width",this.xScale(L[S])-this.xScale(L[T])).style("fill",A&&A.scale[L[D]]?A.scale[L[D]]:null).style("fill-opacity",.1).style("stroke",A&&A.scale[L[D]]?A.scale[L[D]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(O,l,c);const E=I.appendOrSelect(n,this.brushSelector).call(this.brush);if(O!==void 0)if(O[0].valueOf()===O[1].valueOf())E.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{const T=O.map(S=>this.xScale(S));T[1]-T[0]<this.MIN_SELECTION_DIFF||(E.call(this.brush.move,T),this.updateBrushHandle(this.getComponentContainer(),T))}r&&(this.brush.filter(()=>!1),E.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,n,i){const r=o=>{const c=o.selection;c===null?this.handleBrushedEvent(o,t,this.xScale,this.xScale.range()):c[0]===c[1]||this.handleBrushedEvent(o,t,this.xScale,c)},s=w(this.getOptions(),"zoomBar",H.TOP,"type"),a=se.height[s];this.brush.extent([[n,0],[i,a]]).on("start brush end",null).on("start brush end",r)}handleBrushedEvent(t,n,i,r){const s=[i.invert(r[0]),i.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r),t.sourceEvent!=null&&(t.sourceEvent.type==="mousemove"||t.sourceEvent.type==="mouseup"||t.sourceEvent.type==="mousedown"||t.sourceEvent.type==="touchstart"||t.sourceEvent.type==="touchmove"||t.sourceEvent.type==="touchend")){(n===void 0||n[0]!==s[0]||n[1]!==s[1])&&this.services.zoom.handleDomainChange(s,{dispatchEvent:!1});let a;t.type==="start"?a=M.ZoomBar.SELECTION_START:t.type==="brush"?a=M.ZoomBar.SELECTION_IN_PROGRESS:t.type==="end"&&(a=M.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(M.ZoomDomain.CHANGE,{newDomain:s})),this.services.events.dispatchEvent(a,{selection:r,newDomain:s})}}updateBrushHandle(t,n){const i=this,r=se.handleWidth,s=w(this.getOptions(),"zoomBar",H.TOP,"type"),a=se.height[s],o=-r/2,c=se.handleBarWidth,l=s===Pe.GRAPH_VIEW?se.handleBarHeight:6,u=-c/2,d=(a-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(f){if(f.type==="w")return Math.max(n[0]+o,i.maxSelectionRange[0]);if(f.type==="e")return Math.min(n[1]+o,i.maxSelectionRange[1]-r)}).attr("y",0).attr("width",r).attr("height",a).attr("cursor","ew-resize").style("display",null);const h=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);h.enter().append("rect").attr("class",function(f){return"handle-bar handle-bar--"+f.type}),h.attr("x",function(f){if(f.type==="w")return Math.max(n[0]+u,i.maxSelectionRange[0]-o+u);if(f.type==="e")return Math.min(n[1]+u,i.maxSelectionRange[1]+o+u)}).attr("y",d).attr("width",c).attr("height",l).attr("cursor","ew-resize"),s===Pe.SLIDER_VIEW&&this.updateSliderSelectedArea(n),this.updateClipPath(t,this.clipId,n[0],0,n[1]-n[0],a)}updateSliderSelectedArea(t){const n=w(this.getOptions(),"zoomBar",H.TOP,"type"),i=se.height[n],r=this.getComponentContainer().select("svg.zoom-container");I.appendOrSelect(r,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",i/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,n,i,r){const{cartesianScales:s}=this.services,a=s.getMainXAxisPosition(),o=s.getMainYAxisPosition(),c=s.getMainXScaleType(),l=s.getMainYScaleType(),u=(v,x,b)=>O=>s.getValueFromScale(v,x,b,O),d=u(this.xScale,c,a),h=u(this.yScale,l,o),f=w(this.getOptions(),"zoomBar",H.TOP,"type"),p=se.height[f],g=sl().x(v=>d(v)).y0(p).y1(v=>p-h(v)),m=I.appendOrSelect(t,n).datum(i).attr("d",g);r&&m.attr("clip-path",`url(#${r})`)}updateClipPath(t,n,i,r,s,a){const o=I.appendOrSelect(t,"clipPath").attr("id",n);I.appendOrSelect(o,"rect").attr("x",i).attr("y",r).attr("width",s).attr("height",a)}compensateDataForDefaultDomain(t,n){if(!t||t.length<2)return;const i=rn(t),r=this.services.cartesianScales.getDomainIdentifier(),s=this.services.cartesianScales.getRangeIdentifier();if(Number(n[0])<Number(i[0][r])){const a={};a[r]=n[0],a[s]=0,i.unshift(a)}if(Number(n[1])>Number(i[i.length-1][r])){const a={};a[r]=n[1],a[s]=0,i.push(a)}return i}renderZoomBarBaseline(t,n,i,r=!1){const s=w(this.model.getOptions(),"zoomBar",H.TOP,"type"),a=se.height[s],o=cr()([[n,a],[i,a]]);I.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",r).style("stroke",r?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,n,i){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),I.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),w(this.getOptions(),"zoomBar",H.TOP,"type")===Pe.GRAPH_VIEW&&this.renderZoomBarBaseline(t,n,i,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(M.ZoomBar.UPDATE,this.render.bind(this))}}class rR extends ht{constructor(t,n){super(t,n),this.type="threshold",this.renderType=K.SVG,this.positionService=new Aa}render(t=!1){const n=w(this.getOptions(),"axes"),i=[];Object.keys(n).forEach(l=>{if(Object.values(H).includes(l)){const u=n[l];u.thresholds&&u.thresholds.length>0&&i.push({axisPosition:l,thresholds:u.thresholds,correspondingDatasets:u==null?void 0:u.correspondingDatasets,mapsTo:u==null?void 0:u.mapsTo})}});const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(i,l=>l.axisPosition);r.exit().attr("opacity",0).remove();const s=r.enter().append("g").merge(r);s.attr("class",l=>`axis-thresholds ${l.axisPosition}`);const a=s.selectAll("g.threshold-group").data(l=>l.thresholds.map(u=>(u.axisPosition=l.axisPosition,u.datum=this.constructDatumObj(l,u),u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("line").attr("class","threshold-line"),o.append("rect").attr("class","threshold-hoverable-area"),o.merge(a).attr("class","threshold-group");const c=this;s.each(function({axisPosition:l}){const u=c.services.cartesianScales.getScaleByPosition(l),d=c.services.cartesianScales.getScaleTypeByPosition(l);let h=null,f=null;l===H.LEFT||l===H.RIGHT?(f=u,h=c.services.cartesianScales.getMainXScale()):(h=u,f=c.services.cartesianScales.getMainYScale());const p=d===Z.LABELS,[g,m]=h.range(),[v,x]=f.range(),{cartesianScales:b}=c.services,O=b.getOrientation(),E=L=>b.getDomainValue(L),T=L=>b.getRangeValue(L),[S,A]=an(E,T,O),D=P(this);l===H.TOP||l===H.BOTTOM?(D.selectAll("line.threshold-line").transition().call(L=>c.services.transitions.setupTransition({transition:L,name:"threshold-line-update",animate:t})).attr("y1",x).attr("y2",v).attr("x1",({datum:L})=>S(L)+(p?u.step()/2:0)).attr("x2",({datum:L})=>S(L)+(p?u.step()/2:0)).style("stroke",({fillColor:L})=>L),D.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:L})=>-S(L)).attr("width",Math.abs(v-x)).classed("rotate",!0)):(D.selectAll("line.threshold-line").transition().call(L=>c.services.transitions.setupTransition({transition:L,name:"threshold-line-update",animate:t})).attr("x1",g).attr("x2",m).attr("y1",({datum:L})=>A(L)+(p?u.step()/2:0)).attr("y2",({datum:L})=>A(L)+(p?u.step()/2:0)).style("stroke",({fillColor:L})=>L),D.selectAll("rect.threshold-hoverable-area").attr("x",g).attr("y",({datum:L})=>A(L)).attr("width",Math.abs(m-g)).classed("rotate",!1))}),this.services.events.addEventListener(M.Threshold.SHOW,l=>{this.setThresholdLabelPosition(l.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(M.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){const{value:n,axisPosition:i}=t,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(i)===Z.TIME){const s=[H.LEFT,H.RIGHT].includes(i),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),c=s?o:a,l=w(r,"timeScale"),u=Yl(c.ticks(),w(l,"timeInterval"));return Wl(n,0,c.ticks(),u,l)}return n.toLocaleString("en")}appendThresholdLabel(){const t=P(this.services.domUtils.getHolder()),n=w(this.getOptions(),"style","prefix");this.label=I.appendOrSelect(t,`div.${te}--${n}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:n}){const i=this.services.domUtils.getHolder(),r=wn(t,i),s=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html(`${n.label||"Threshold"}: ${s}`).style("background-color",n.fillColor);const a=this.label.node(),o=this.positionService.findBestPlacementAt({left:r[0],top:r[1]},a,[qt.RIGHT,qt.LEFT,qt.TOP,qt.BOTTOM],()=>({top:void 0,left:void 0,width:i.offsetWidth,height:i.offsetHeight})),c=this.positionService.findPositionAt({left:r[0],top:r[1]},a,o);this.positionService.setElement(a,c)}constructDatumObj(t,n){const i={};return t.correspondingDatasets&&(i.group=w(t,"correspondingDatasets",0)),i[t.mapsTo]=n.value,i}addEventListeners(){const t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",function(n){P(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(M.Threshold.SHOW,{event:n,hoveredElement:P(this),datum:P(this).datum()})}).on("mouseout",function(n){P(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(M.Threshold.HIDE,{event:n,hoveredElement:P(this),datum:P(this).datum()})})}}class sR extends ht{constructor(t,n){super(t,n),this.type="highlight",this.renderType=K.SVG,this.positionService=new Aa,this.highlightStrokeWidth=1}render(t=!1){const n=w(this.getOptions(),"axes"),i=[];Object.keys(n).forEach(l=>{if(Object.values(H).includes(l)){const u=n[l];u.highlights&&u.highlights.data.length>0&&i.push({axisPosition:l,highlightStartMapsTo:u.highlights.highlightStartMapsTo,highlightEndMapsTo:u.highlights.highlightEndMapsTo,labelMapsTo:u.highlights.labelMapsTo,highlight:u.highlights.data,color:u.highlights.color})}});const r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(i,l=>l.axisPosition);r.exit().attr("opacity",0).remove();const s=r.enter().append("g").merge(r);s.attr("class",l=>`axis-highlight ${l.axisPosition}`);const a=s.selectAll("g.highlight-group").data(l=>l.highlight.map(u=>(u.axisPosition=l.axisPosition,u.highlightStartMapsTo=l.highlightStartMapsTo,u.labelMapsTo=l.labelMapsTo,u.color=l.color,u.highlightEndMapsTo=l.highlightEndMapsTo,u)));a.exit().attr("opacity",0).remove();const o=a.enter().append("g");o.append("rect").attr("class","highlight-bar"),o.append("line").attr("class","highlight-line"),o.merge(a).attr("class","highlight-group");const c=this;s.each(function({axisPosition:l}){const u=c.services.cartesianScales.getMainXScale(),d=c.services.cartesianScales.getMainYScale(),[h,f]=u.range(),[p,g]=d.range(),{cartesianScales:m}=c.services,v=m.getOrientation(),x=S=>m.getDomainValue(S),b=S=>m.getRangeValue(S),[O,E]=an(x,b,v),T=P(this);l===H.TOP||l===H.BOTTOM?T.selectAll("rect.highlight-bar").transition().call(S=>c.services.transitions.setupTransition({transition:S,name:"highlight-bar-update",animate:t})).attr("y",Math.max(g+c.highlightStrokeWidth,0)).attr("height",Math.max(p-2*c.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:S,...A})=>O(A[S])).attr("width",({highlightStartMapsTo:S,highlightEndMapsTo:A,...D})=>Math.max(O(D[A])-O(D[S]),0)).style("stroke",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",c.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null):T.selectAll("rect.highlight-bar").transition().call(S=>c.services.transitions.setupTransition({transition:S,name:"highlight-bar-update",animate:t})).attr("x",h).attr("width",Math.max(f-h,0)).attr("y",({highlightEndMapsTo:S,...A})=>E(A[S])).attr("height",({highlightStartMapsTo:S,highlightEndMapsTo:A,...D})=>Math.max(E(D[S])-E(D[A]),0)).style("stroke",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",c.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:S,labelMapsTo:A,...D})=>S&&S.scale[D[A]]?S.scale[D[A]]:null)})}}class Xm extends bc{getItems(t){if(t.detail.items)return t.detail.items;const n=t.detail.data;if(!n.length||!n[0])return[];const i=this.getOptions(),{cartesianScales:r}=this.services,s=r.getDomainIdentifier(),a=r.isDualAxes(),{groupMapsTo:o}=i.data,c=r.getDomainLabel();let l=r.getRangeLabel();const u=n[0][s];let d;if(n.length===1){const h=n[0],f=r.getRangeIdentifier(h);if(a){const g=r.getRangeAxisPosition({datum:h,groups:[h[o]]});l=r.getScaleLabel(g)}const p=h[f];d=[{label:c,value:u},...Array.isArray(p)&&p.length===2?[{label:"Start",value:p[0]},{label:"End",value:p[1]}]:[{label:l,value:h[f]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach(g=>d.push({label:g.label,value:g.value})),d.push({label:i.tooltip.groupLabel,value:h[o],color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:h[o]})})}else if(n.length>1&&(d=[{label:c,value:u}],d=d.concat(n.map(h=>{const f=h[r.getRangeIdentifier(h)];return{label:h[o],value:Array.isArray(f)&&f.length===2?`${f[0]} - ${f[1]}`:f,color:this.model.getFillColor(h[o]),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:h[o]})}}).sort((h,f)=>f.value-h.value)),!a&&w(i,"tooltip","showTotal")===!0)){const h=r.getRangeIdentifier();d.push({label:Ot(i,"tooltip.totalLabel")||"Total",value:n.reduce((f,p)=>f+p[h],0),bold:!0})}return d}}class aR extends ht{constructor(){super(...arguments),this.type="alluvial",this.renderType=K.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.html("");const{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0});if(i<1||r<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=w(this.getOptions(),"color","gradient","enabled");let c=ve.minNodePadding;s.alluvial.nodePadding>ve.minNodePadding&&(c=s.alluvial.nodePadding);const l=w(s,"alluvial","nodeAlignment");let u=em;l===Nt.LEFT?u=oL:l===Nt.RIGHT&&(u=lL);const d=dL().nodeId(m=>m.name).nodeWidth(ve.nodeWidth).nodePadding(c).nodeAlign(u).extent([[2,30],[i-2,r]]);this.graph=d({nodes:s.alluvial.nodes.map(m=>Object.assign({},m)),links:a.map(m=>Object.assign({},m))}),this.graph.nodes=this.graph.nodes.filter(m=>m.value!==0);const h={};this.graph.nodes.forEach(m=>{const v=m.x0;m.category&&(h[v]=m==null?void 0:m.category)}),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(h)).join("g").attr("transform",m=>`translate(${m}, 0)`).append("text").attr("id",(m,v)=>this.services.domUtils.generateElementIDString(`alluvial-category-${v}`)).style("font-size","14px").text(m=>h[m]?h[m]:"").attr("y",20).attr("x",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-category-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0});let O=0;return m+O>=b&&(O=-b+4),O});const f=n.append("g").attr("fill","none").selectAll("g").data(this.graph.links);if(f.exit().remove(),o){const m=w(this.getOptions(),"color","scale");m&&f.enter().append("linearGradient").attr("id",v=>`${this.gradient_id}-link-${v.index}`).attr("gradientUnits","userSpaceOnUse").call(v=>v.append("stop").attr("offset","0%").attr("stop-color",x=>m[x.source.name])).call(v=>v.append("stop").attr("offset","100%").attr("stop-color",x=>m[x.target.name])),f.exit().remove()}f.enter().append("path").classed("link",!0).attr("d",SL()).attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-line-${m.index}`)).attr("class",m=>s.alluvial.monochrome?this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:0,originalClassName:"link"}):this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:m.source.index,originalClassName:"link"})).style("stroke",m=>o?`url(#${this.gradient_id}-link-${m.index})`:this.model.getFillColor(m.source.name)).attr("stroke-width",m=>Math.max(1,m.width)).style("stroke-opacity",ve.opacity.default).attr("aria-label",m=>`${m.source.name} → ${m.target.name} (${m.value}${s.alluvial.units?" "+s.alluvial.units:""})`);const p=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-${m.index}`)).classed("node-group",!0).attr("transform",m=>`translate(${m.x0}, ${m.y0})`);p.append("rect").classed("node",!0).attr("height",m=>m.y1-m.y0).attr("width",m=>m.x1-m.x0).attr("fill","black");const g=p.append("g").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-title-${m.index}`));g.append("text").attr("id",m=>this.services.domUtils.generateElementIDString(`alluvial-node-text-${m.index}`)).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text(m=>`${m.name} (${m.value})`).attr("aria-label",m=>`${m.name} (${m.value})`),g.append("rect").classed("node-text-bg",!0).attr("width",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-node-text-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0});return b+8}).attr("height",18).attr("stroke-width",2).lower(),g.attr("transform",(m,v)=>{const x=this.services.domUtils.generateElementIDString(`alluvial-node-text-${v}`),{width:b}=I.getSVGElementSize(P(`text#${x}`),{useBBox:!0}),O=(m.y1-m.y0)/2-9;let E=m.x1-m.x0;return m.x1>=b?E=E-(b+16):E+=4,`translate(${E}, ${O})`}),this.addLineEventListener(),this.addNodeEventListener()}addLineEventListener(){const t=this.getOptions(),n=this,i=ya((r,s="mouseover")=>{const a=n.parent.selectAll("path.link").transition().call(o=>n.services.transitions.setupTransition({transition:o,name:"alluvial-links-mouse-highlight"}));s==="mouseout"?(P(r).lower(),a.style("stroke-opacity",ve.opacity.default)):a.style("stroke-opacity",function(){return r===this?(P(this).raise(),ve.opacity.selected):ve.opacity.unfocus})},33);this.parent.selectAll("path.link").on("mouseover",function(r,s){const a=P(this);i(this,"mouseover"),a.classed("link-hovered",!0);const o=getComputedStyle(this).getPropertyValue("stroke");n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEOVER,{event:r,element:a,datum:s}),n.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:s.target.name,value:s.value+(t.alluvial.units?` ${t.alluvial.units}`:""),color:o,labelIcon:n.getRightArrowIcon()}]})}).on("mousemove",function(r,s){n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEMOVE,{event:r,element:P(this),datum:s}),n.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){n.services.events.dispatchEvent(M.Alluvial.LINE_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);i(this,"mouseout"),a.classed("link-hovered",!1),n.services.events.dispatchEvent(M.Alluvial.LINE_MOUSEOUT,{event:r,element:a,datum:s}),n.services.events.dispatchEvent(M.Tooltip.HIDE,{event:r,hoveredElement:a})})}addNodeEventListener(){const t=this,n=ya((i=[],r="mouseover")=>{if(r==="mouseout"||i.length===0){t.parent.selectAll("path.link").classed("link-hovered",!1).data(this.graph.links,s=>s.index).order().style("stroke-opacity",ve.opacity.default);return}t.parent.selectAll("path.link").transition().call(s=>this.services.transitions.setupTransition({transition:s,name:"alluvial-link-mouse-highlight"})).style("stroke-opacity",function(s){return i.some(a=>a===s.index)?(P(this).classed("link-hovered",!0).raise(),ve.opacity.selected):ve.opacity.unfocus})},66);t.parent.selectAll(".node-group").on("mouseover",function(i,r){const s=P(this),a=[];if(t.traverse({link:"sourceLinks",node:"target"},r,a),t.traverse({link:"targetLinks",node:"source"},r,a),a.length){const o=Mr(s.attr("transform"));if(s.attr("transform",`translate(${o.x-2}, ${o.y})`),s.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2===0){const l=t.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),u=t.parent.select(`g#${l}`),d=Mr(u.attr("transform"));u.attr("transform",`translate(${d.x+4},${d.y})`)}const c=t.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);t.parent.select(`text#${c}`).style("font-weight","bold"),n(a,"mouseover"),t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEOVER,{event:i,element:s,datum:r})}}).on("mousemove",function(i,r){t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEMOVE,{event:i,element:P(this),datum:r}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(M.Alluvial.NODE_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){const s=P(this),a=Mr(s.attr("transform"));if(s.classed("node-hovered",!1).attr("transform",`translate(${a.x+2}, ${a.y})`).select("rect.node").attr("width",ve.nodeWidth),r.x0-2===0){const c=t.services.domUtils.generateElementIDString(`alluvial-node-title-${r.index}`),l=t.parent.select(`g#${c}`),u=Mr(l.attr("transform"));l.attr("transform",`translate(${u.x-4},${u.y})`)}const o=t.services.domUtils.generateElementIDString(`alluvial-node-text-${r.index}`);t.parent.select(`text#${o}`).style("font-weight","normal"),n([],"mouseout"),t.services.events.dispatchEvent(M.Alluvial.NODE_MOUSEOUT,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:s})})}traverse(t,n,i=[]){n[t.link].map(r=>(i.push(r.index),r[t.node])).forEach(r=>this.traverse(t,r,i))}getRightArrowIcon(){return`
72
72
  <svg xmlns="http://www.w3.org/2000/svg" class="arrow-right" width="32" height="32" viewBox="0 0 32 32">
73
73
  <polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>
74
74
  <rect width="32" height="32"/>
75
- </svg>`}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}class fe extends ht{constructor(){super(...arguments),this.type="grid",this.renderType=K.SVG}render(t=!0){const n=w(this.getOptions(),"grid","x","enabled"),i=w(this.getOptions(),"grid","y","enabled");this.drawBackdrop(n,i),!(!n&&!i)&&(n&&(I.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),i&&(I.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const n=this.parent,i=this.backdrop.attr("height"),r=this.services.cartesianScales.getMainXScale(),s=Ba(r).tickSizeInner(-i).tickSizeOuter(0);if(w(this.getOptions(),"grid","x","alignWithAxisTicks")){const o=this.services.cartesianScales.getDomainAxisPosition(),c=w(this.getOptions(),"axes",o,"ticks","values");c&&s.tickValues(c)}else{const o=w(this.getOptions(),"grid","x","numberOfTicks");s.ticks(o)}const a=n.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${i})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}drawYGrid(t){const n=this.parent,i=this.backdrop.attr("width"),r=this.services.cartesianScales.getMainYScale(),s=Uc(r).tickSizeInner(-i).tickSizeOuter(0);if(w(this.getOptions(),"grid","y","alignWithAxisTicks")){const o=this.services.cartesianScales.getRangeAxisPosition(),c=w(this.getOptions(),"axes",o,"ticks","values");c&&s.tickValues(c)}else{const o=w(this.getOptions(),"grid","y","numberOfTicks");s.ticks(o)}const a=n.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}getGridlineThreshold(t){const n=this.parent,i=n.selectAll(".x.grid .tick").nodes().sort((u,d)=>Number(sn(u).tx)-Number(sn(d).tx));let r=-1;if(!i.length)return;i.forEach(u=>{t[0]>=+sn(u).tx&&r++});const s=r+1<i.length?r+1:i.length,a=i[r],o=i[s];let c;if(!a)c=+sn(o).tx;else if(o)c=+sn(o).tx-+sn(a).tx;else{const u=n.select("rect.chart-grid-backdrop").node();c=I.getSVGElementSize(u).width-+sn(a).tx}const{threshold:l}=this.getOptions().tooltip.gridline;return c*l}getActiveGridline(t){const n=w(this.getOptions,"tooltip","gridline","threshold"),i=n||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter(function(){const r=sn(this),s={min:Number(r.tx)-i,max:Number(r.tx)+i};return s.min<=t[0]&&t[0]<=s.max})}drawBackdrop(t,n){const i=this.parent,r=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),[a,o]=r.range(),[c,l]=s.range();this.backdrop=I.appendOrSelect(i,"svg.chart-grid-backdrop");const u=I.appendOrSelect(this.backdrop,t||n?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(u).attr("x",a).attr("y",l).attr("width",Math.abs(o-a)).attr("height",Math.abs(c-l)).lower(),u.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class Xm extends ht{constructor(){super(...arguments),this.type="area",this.renderType=K.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999),this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-area"})).attr("opacity",i=>i.name!==n.datum().name?Ne.opacity.unselected:Ne.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Ne.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions();let r=[0,0];const{cartesianScales:s}=this.services,a=s.getOrientation(),o=sl().curve(this.services.curves.getD3Curve()).defined(E=>{const T=s.getRangeIdentifier();return E[T]!=null}),c=this.model.getGroupedData(this.configs.groups),l=w(i,"bounds"),u=l&&c&&c.length===1;!u&&l&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${c.length}`);let d=0;const h=(E,T)=>{w(i,"axes",E,"includeZero")===!1&&T[0]>0&&T[1]>0&&(d=T[0])},f=E=>u?s.getBoundedScaledValues(E)[0]:s.getRangeValue(d),p=E=>u?s.getBoundedScaledValues(E)[1]:s.getRangeValue(E);a===Ft.VERTICAL?(r=s.getMainYScale().domain(),h(s.getMainYAxisPosition(),r),o.x(E=>s.getDomainValue(E)).y0(E=>f(E)).y1(E=>p(E))):(r=s.getMainXScale().domain(),h(s.getMainXAxisPosition(),r),o.x0(E=>f(E)).x1(E=>p(E)).y(E=>s.getDomainValue(E)));const g=w(i,"color","gradient","enabled"),m=c&&c.length===1&&g;c.length>1&&g&&console.error("Gradients can only be enabled when having 1 single dataset");const v=n.selectAll("path.area").data(c,E=>E.name),x=P(this.services.domUtils.getMainContainer());if(v.exit().attr("opacity",0).remove(),!c.length)return;if(m){const E=x.select(`path.${this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:c[0].name})}`).node();let T;if(E)T=getComputedStyle(E,null).getPropertyValue("stroke");else{const S=w(this.model.getOptions(),"color","scale");if(S!==null){const A=Object.keys(S);T=S[A[0]]}}Kl.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${c[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Kl.getStops(r,T)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each(function(){this.parentNode.remove()});const b=this,O=v.enter().append("path");m?O.merge(v).style("fill",E=>`url(#${this.services.domUtils.generateElementIDString(`${E.name.replace(" ","")}_${this.gradient_id}`)})`).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:E.name,originalClassName:"area"})).attr("d",E=>{const{data:T}=E;return o(T)}):(O.attr("opacity",0).merge(v).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:E.name,originalClassName:"area"})).style("fill",E=>b.model.getFillColor(E.name)).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"area-update-enter",animate:t})).attr("opacity",u?1:Ne.opacity.selected).attr("d",E=>{const{data:T}=E;return o(T)}),u&&O.attr("fill-opacity",Ne.opacity.selected).style("stroke",E=>b.model.getStrokeColor(E.name)).style("stroke-dasharray","2, 2").attr("stroke-width",.7+"px"))}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Mi extends ht{constructor(){super(...arguments),this.type="line",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-line"})).attr("opacity",i=>i.name!==n.datum().name?Ue.opacity.unselected:Ue.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",Ue.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:i,curves:r}=this.services,s=f=>i.getDomainValue(f),a=f=>i.getRangeValue(f),[o,c]=an(s,a,i.getOrientation()),l=this.getOptions(),u=cr().x(o).y(c).curve(r.getD3Curve()).defined(f=>{const p=i.getRangeIdentifier(f);return f[p]!=null});let d=[];if(this.configs.stacked){const f=Object.keys(l.axes).some(g=>l.axes[g].percentage),{groupMapsTo:p}=l.data;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map(g=>{const m=this.services.cartesianScales.getDomainIdentifier(g),v=this.services.cartesianScales.getRangeIdentifier(g);return{name:w(g,0,p),data:g.map(x=>({[m]:x.data.sharedStackKey,[p]:x[p],[v]:x[1]})),hidden:!HD(g,x=>x[0]!==x[1])}})}else d=this.model.getGroupedData(this.configs.groups);const h=n.selectAll("path.line").data(d,f=>f.name);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("line",!0).attr("opacity",0).merge(h).data(d,f=>f.name).attr("class",f=>this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:f.name,originalClassName:"line"})).style("stroke",f=>this.model.getStrokeColor(f.name)).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",f=>{const{data:p}=f;return p.map(g=>{const m=this.services.cartesianScales.getRangeIdentifier(g);return g[m]}).join(",")}).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"line-update-enter",animate:t})).attr("opacity",f=>f.hidden?0:1).attr("d",f=>{const{data:p}=f;return u(p)})}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}const Zm=5;function aR(e,t){return e>t-Zm&&e<t+Zm}let vn=class extends ht{constructor(){super(...arguments),this.type="ruler",this.renderType=K.SVG,this.isXGridEnabled=w(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=w(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!0){const n=w(this.getOptions(),"ruler","enabled");this.drawBackdrop(),n&&!this.isEventListenerAdded?this.addBackdropEventListeners():!n&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[n,i]){const r=this.parent,s=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[c,l]=o.range(),u=s===Ft.HORIZONTAL?i:n,d=I.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),h=I.appendOrSelect(d,"line.ruler-line"),f=r.selectAll("[role=graphics-symbol]"),p=a.map(m=>({domainValue:this.services.cartesianScales.getDomainValue(m),originalData:m})).filter(m=>aR(m.domainValue,u));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map(m=>m.domainValue).join()===this.pointsWithinLine.map(m=>m.domainValue).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(M.Tooltip.MOVE,{mousePosition:[n,i]});this.pointsWithinLine=p;const g=this.pointsWithinLine.reduce((m,v)=>{if(m.length===0)return m.push(v),m;const x=m[0].domainValue,b=Math.abs(u-v.domainValue),O=Math.abs(u-x);return b>O||(b<O?m=[v]:m.push(v)),m},[]);if(g.length>0){const m=g.map(O=>O.originalData).filter(O=>{const E=this.services.cartesianScales.getRangeIdentifier(O);return O[E]!=null}),v=g.map(O=>O.domainValue),x=f.filter(O=>{const E=this.services.cartesianScales.getDomainValue(O);return v.includes(E)});this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Am(this.elementsToHighlight,x)&&this.hideRuler(),x.dispatch("mouseover"),this.elementsToHighlight=x,this.services.events.dispatchEvent(M.Tooltip.SHOW,{mousePosition:[n,i],hoveredElement:h,data:this.formatTooltipData(m)}),d.attr("opacity",1);const b=g[0];s==="horizontal"?h.attr("x1",l).attr("x2",c).attr("y1",b.domainValue).attr("y2",b.domainValue):h.attr("y1",l).attr("y2",c).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,n=I.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(M.Tooltip.HIDE),n.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,n=this.services.domUtils.getHolder(),i=this.model.getDisplayData();let r=function(s){const a=bn(s,t.parent.node());t.showRuler(s,a)};if(i.length>100){const s=i.length%50*12.5;r=j2(function(a){const{mousePosition:o}=this;t.showRuler(a,o)},s,n)}this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-grid-backdrop")}};class He extends ht{constructor(){super(...arguments),this.type="scatter",this.renderType=K.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-hover-scatter"})}).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})}).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call(r=>{var s;return(s=this.services.transitions)==null?void 0:s.setupTransition({transition:r,name:"legend-hover-scatter"})}).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"legend-mouseout-scatter"})}).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:n}=this.configs;n&&(t.addEventListener(M.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(M.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales are undefined.");const i=n.getDomainIdentifier(t),r=this.model.get("zoomDomain");return r!==void 0?t.filter(s=>s[i].getTime()>=r[0].getTime()&&s[i].getTime()<=r[1].getTime()):t}getScatterData(){const t=this.getOptions(),{stacked:n}=this.configs;let i;if(n){const r=Object.keys(t.axes).some(s=>t.axes[s].percentage);i=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else{const{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales are undefined.");i=this.model.getDisplayData(this.configs.groups).filter(s=>{const a=r.getRangeIdentifier(s);return s[a]!==void 0&&s[a]!==null})}return this.filterBasedOnZoomDomain(i)}render(t){if(!(w(this.getOptions(),"points","enabled")||w(this.getOptions(),"bubble","enabled")))return;const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,{cartesianScales:s}=this.services;if(!s)throw new Error("Services cartesianScales are undefined.");const a=s.getDomainIdentifier(),o=n.selectAll("circle.dot").data(this.getScatterData(),l=>`${l[r]}-${l[a]}`);o.exit().attr("opacity",0).remove();const c=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(c,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:n}=this.configs;if(!n)return!1;const{cartesianScales:i}=this.services;if(!i)throw new Error("Cartesian scales service is undefined");const r=i.getOrientation(),[s,a]=an(i.getHighestDomainThreshold(),i.getHighestRangeThreshold(),r),[o,c]=an(d=>i.getDomainValue(d),d=>i.getRangeValue(d),r),l=o(t),u=c(t);return a&&s?u<=a.scaleValue&&l>=s.scaleValue:a?u<=a.scaleValue:s?l>=s.scaleValue:!1}styleCircles(t,n){const i=this.getOptions(),{filled:r,fillOpacity:s}=i.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=i.data,c=f=>a.getDomainValue(f),l=f=>a.getRangeValue(f),[u,d]=an(c,l,a.getOrientation()),{fadeInOnChartHolderMouseover:h}=this.configs;t.raise().classed("dot",!0).attr("class",f=>{const p=a.getDomainIdentifier(f),g=this.model.getIsFilled(f[o],f[p],f,r)?[J.FILL,J.STROKE]:[J.STROKE];return this.model.getColorClassName({classNameTypes:g,dataGroupName:f[o],originalClassName:"dot"})||""}).classed("threshold-anomaly",f=>this.isDatapointThresholdAnomaly(f)).classed("filled",f=>{const p=a.getDomainIdentifier(f);return this.model.getIsFilled(f[o],f[p],f,r)}).classed("unfilled",f=>{const p=a.getDomainIdentifier(f);return!this.model.getIsFilled(f[o],f[p],f,r)}).transition().call(f=>{var p;return(p=this.services.transitions)==null?void 0:p.setupTransition({transition:f,name:"scatter-update-enter",animate:n})}).attr("cx",u).attr("cy",d).attr("r",i.points.radius).style("fill",f=>{const p=a.getDomainIdentifier(f);if(this.model.getIsFilled(f[o],f[p],f,r))return this.model.getFillColor(f[o],f[p],f)}).style("stroke",f=>{const p=a.getDomainIdentifier(f);return this.model.getStrokeColor(f[o],f[p],f)}).attr("fill-opacity",r?s:1).attr("opacity",h?0:1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",f=>{const p=a.getRangeIdentifier(f);return f[p]}),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:n}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",function(i,r){var s,a;const o=P(this);o.classed("hovered",!0).attr("class",c=>t.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:c[n],originalClassName:o.attr("class")})).style("fill",c=>{var l;const u=(l=t.services.cartesianScales)==null?void 0:l.getDomainIdentifier(c);return t.model.getFillColor(c[n],c[u],c)}).classed("unfilled",!1),(s=t.services.events)==null||s.dispatchEvent(M.Tooltip.SHOW,{event:i,hoveredElement:o,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),(a=t.services.events)==null||a.dispatchEvent(M.Scatter.SCATTER_MOUSEOVER,{event:i,element:o,datum:r})}).on("mousemove",function(i,r){var s,a;const o=P(this);(s=t.services.events)==null||s.dispatchEvent(M.Scatter.SCATTER_MOUSEMOVE,{event:i,element:o,datum:r}),(a=t.services.events)==null||a.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){var s;(s=t.services.events)==null||s.dispatchEvent(M.Scatter.SCATTER_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){var s,a,o;const c=P(this);if(c.classed("hovered",!1),!t.configs.filled){const{filled:l}=t.getOptions().points,u=(s=t.services.cartesianScales)==null?void 0:s.getDomainIdentifier(r),d=t.model.getIsFilled(r[n],r[u],r,l);c.classed("unfilled",!d).style("fill",h=>d||l?t.model.getFillColor(h[n],h[u],h):null)}(a=t.services.events)==null||a.dispatchEvent(M.Scatter.SCATTER_MOUSEOUT,{event:i,element:c,datum:r}),(o=t.services.events)==null||o.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:c})})}destroy(){var t;(t=this.parent)==null||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:n}=this.services;if(!n)throw new Error("Services events undefined");n.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),n.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),n.removeEventListener(M.Chart.MOUSEOVER,this.handleChartHolderOnHover),n.removeEventListener(M.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}let Km=class extends ht{constructor(t,n,i){super(t,n,i),this.type="axes",this.renderType=K.SVG,this.truncation={[V.LEFT]:!1,[V.RIGHT]:!1,[V.TOP]:!1,[V.BOTTOM]:!1},i&&(this.configs=i),this.margins=this.configs.margins}render(t=!0){const{position:n}=this.configs,i=this.getOptions(),r=w(i,"axes",n,"visible"),s=this.getComponentContainer(),{width:a,height:o}=I.getSVGElementSize(s,{useAttrs:!0}),c=I.appendOrSelect(s,`g.axis.${n}`);let l,u;if(n===V.BOTTOM||n===V.TOP?(l=this.configs.axes[V.LEFT]?this.margins.left:0,u=this.configs.axes[V.RIGHT]?a-this.margins.right:a):(l=o-this.margins.bottom,u=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefineds");const d=this.services.cartesianScales.getScaleByPosition(n);this.scaleType===Z.LABELS||this.scaleType===Z.LABELS_RATIO?d.rangeRound([l,u]):d.range([l,u]);let h;switch(n){case V.LEFT:h=Uc;break;case V.BOTTOM:h=Ba;break;case V.RIGHT:h=i0;break;case V.TOP:h=n0;break}c.attr("aria-label",`${n} axis`);const f=!c.select("g.ticks").empty();let p=I.appendOrSelect(c,"g.ticks");f||(p.attr("role",`${at.GRAPHICS_OBJECT} ${at.GROUP}`),p.attr("aria-label",`${n} ticks`));const g=I.appendOrSelect(c,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${n} ticks`),m=w(i,"axes",n),v=this.scaleType===Z.TIME||m.scaleType===Z.TIME,x=n===V.LEFT||n===V.RIGHT,b=this.model.get("zoomDomain");if(b&&v&&!x&&d.domain(b),!r){p.attr("aria-hidden",!0);return}const O=w(m,"scaleType"),E=w(i,"data","loading"),T=w(m,"ticks","number"),S=w(m,"ticks","values"),A=w(m,"truncation","type"),D=w(m,"truncation","threshold"),L=w(m,"truncation","numCharacter"),C=T!==null,B=w(i,"timeScale"),_=I.appendOrSelect(g,"g.tick"),$=I.appendOrSelect(_,"text").text("0"),y=I.getSVGElementSize($.node(),{useBBox:!0}).height;_.remove();const k=this.scaleType||m.scaleType||Z.LINEAR,R=h(d).tickSizeOuter(0);if(d.ticks){let j;if(C?j=T:(j=R.ticks.number,x&&(j=this.getNumberOfFittingTicks(o,y,R.ticks.verticalSpaceRatio))),d.ticks().length===1&&d.ticks()[0]===0&&(j=0),R.ticks(j),v)if(!d.ticks(j).length)R.tickValues([]);else{const X=w(i,"timeScale","addSpaceOnEdges"),ot=w(i,"axes",n,"domain"),tt=d.copy();X&&!ot&&tt.nice(j);const lt=tt.ticks(j);X&&lt.length>2&&!ot&&(lt.splice(lt.length-1,1),lt.splice(0,1)),R.tickValues(lt)}}let U;const N=w(m,"ticks","formatter");if(v){const j=Yl(R.tickValues());N===null?U=(X,ot)=>ql(X,ot,R.tickValues(),j,B):U=(X,ot)=>{const tt=ql(X,ot,R.tickValues(),j,B);return N(X,ot,tt)}}else N===null?k===Z.LINEAR&&(U=j=>j.toLocaleString()):U=N;R.tickFormat(U);const[G,z]=this.services.cartesianScales.getScaleByPosition(n).domain();let F;if(S){if(v)S.forEach((j,X)=>{j.getTime===void 0&&(S[X]=new Date(j))}),F=S.filter(j=>{const X=j.getTime();return X>=new Date(G).getTime()&&X<=new Date(z).getTime()});else if(O===Z.LABELS){const j=this.services.cartesianScales.getScaleByPosition(n).domain();F=S.filter(X=>j.includes(X))}else F=S.filter(j=>j>=G&&j<=z);R.tickValues(F)}switch(n){case V.LEFT:p.attr("transform",`translate(${this.margins.left}, 0)`);break;case V.BOTTOM:p.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case V.RIGHT:p.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case V.TOP:p.attr("transform",`translate(0, ${this.margins.top})`);break}const Q=this.model.isDataEmpty();if(m.title){const j=I.appendOrSelect(c,"text.axis-title").html(Q||E?"":m.title),X=w(m,"titleOrientation");let ot;switch(n){case V.LEFT:X===pl.RIGHT?j.attr("transform","rotate(90)").attr("y",0).attr("x",d.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):j.attr("transform","rotate(-90)").attr("y",0).attr("x",-(d.range()[0]/2)).attr("dy","0.75em").style("text-anchor","middle");break;case V.BOTTOM:j.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case V.RIGHT:X===pl.LEFT?j.attr("transform","rotate(-90)").attr("y",a).attr("x",-(d.range()[0]/2)).style("text-anchor","middle"):j.attr("transform","rotate(90)").attr("y",-a).attr("x",d.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case V.TOP:({height:ot}=I.getSVGElementSize(j,{useBBox:!0})),j.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${ot/2})`).style("text-anchor","middle");break}}if(v){const j=Yl(R.tickValues()),X=B.showDayName,ot=p;t&&(p=p.transition().call(tt=>this.services.transitions.setupTransition({transition:tt,name:"axis-update",animate:t}))),p=p.call(R),ot.selectAll(".tick").data(R.tickValues(),d).order().select("text").style("font-weight",(tt,lt)=>Gp(tt,lt,R.tickValues(),j,X)?"bold":"normal")}else!t||!f?p=p.call(R):p=p.transition().call(j=>this.services.transitions.setupTransition({transition:j,name:"axis-update",animate:t})).call(R);if(g.call(R),n===V.BOTTOM||n===V.TOP){let j=!1;const X=w(m,"ticks","rotation");if(X===Ys.ALWAYS)j=!0;else if(X===Ys.NEVER)j=!1;else if(!X||X===Ys.AUTO)if(d.step)j=g.selectAll("g.tick text").nodes().some(ot=>I.getSVGElementSize(ot,{useBBox:!0}).width>=d.step());else{j=!1;const ot=g.append("text").text("A"),tt=I.getSVGElementSize(ot.node(),{useBBox:!0}).width;let lt;g.selectAll("g.tick").each(function(){const W=P(this),q=parseFloat(w(sn(this),"tx"));q!==null&&lt+W.text().length*tt*.8>=q&&(j=!0),lt=q}),ot.remove()}j?(C||(R.ticks(this.getNumberOfFittingTicks(a,y,R.ticks.horizontalSpaceRatio)),g.call(R),p.call(R)),c.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",n===V.TOP?"start":"end")):c.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(E?c.attr("opacity",0):c.attr("opacity",1),p.selectAll("g.tick").attr("aria-label",j=>j),g.selectAll("g.tick").attr("aria-label",j=>j),A!==Te.NONE&&O===Z.LABELS&&!S){const j=this.services.cartesianScales.getScaleDomain(n);if(j.length>0){const X=s.select(`g.axis.${n} g.ticks g.tick`).html();c.selectAll("g.ticks g.tick").html(X);const ot=this;c.selectAll("g.tick text").data(j).text(function(tt){return tt.length>D?(ot.truncation[n]=!0,$r(tt,A,L)):tt}),this.getInvisibleAxisRef().selectAll("g.tick text").data(j).text(function(tt){return tt.length>D?$r(tt,A,L):tt}),c.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),c.selectAll("g.tick text").data(j)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,i=I.appendOrSelect(t,`g.axis.${n}`),r=this.getOptions(),s=w(r,"axes",n),a=w(s,"scaleType"),o=w(s,"truncation","threshold"),c=this;i.selectAll("g.tick text").on("mouseover",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOVER,{event:l,element:P(this),datum:u}),a===Z.LABELS&&u.length>o&&c.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,hoveredElement:P(this),content:u})}).on("mousemove",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEMOVE,{event:l,element:P(this),datum:u}),a===Z.LABELS&&u.length>o&&c.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_CLICK,{event:l,element:P(this),datum:u})}).on("mouseout",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOUT,{event:l,element:P(this),datum:u}),a===Z.LABELS&&c.services.events.dispatchEvent(M.Tooltip.HIDE)})}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,n,i){const r=Math.floor(t/(n*i));return $m(r,2,gi.ticks.number)}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;I.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}};class oR extends Km{constructor(t,n,i){super(t,n,i)}render(t=!0){super.render(t),super.destroy();const n=this.configs.position,i=this.getComponentContainer(),r=I.appendOrSelect(i,`g.axis.${n}`),s=this;r.selectAll("g.tick").each(function(a,o){const c=P(this);c.classed("tick-hover",!0).attr("tabindex",o===0?0:-1);const l=c.select("text"),{width:u,height:d}=I.getSVGElementSize(l,{useBBox:!0}),h=I.appendOrSelect(c,"rect.axis-holder");let f=0,p=0;switch(n){case V.LEFT:f=-u+Number(l.attr("x")),p=-(d/2);break;case V.RIGHT:f=Math.abs(Number(l.attr("x"))),p=-(d/2);break;case V.TOP:f=-(u/2),p=-d+Number(l.attr("y"))/2,s.truncation[n]&&(f=0,h.attr("transform","rotate(-45)"));break;case V.BOTTOM:f=-(u/2),p=d/2-2,s.truncation[n]&&(f=-u,h.attr("transform","rotate(-45)"));break}h.attr("x",f-gi.hover.rectanglePadding).attr("y",p).attr("width",u+gi.hover.rectanglePadding*2).attr("height",d).lower()}),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,i=I.appendOrSelect(t,`g.axis.${n}`),r=this.getOptions(),s=w(r,"axes",n),a=w(s,"scaleType"),o=w(s,"truncation","threshold"),c=this;i.selectAll("g.tick.tick-hover").on("mouseover",function(l){const u=P(this).select("text"),d=u.datum();c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOVER,{event:l,element:u,datum:d}),a===Z.LABELS&&d.length>o&&c.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,element:u,datum:d})}).on("mousemove",function(l){const u=P(this).select("text"),d=u.datum();c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEMOVE,{event:l,element:u,datum:d}),c.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_CLICK,{event:l,element:P(this).select("text"),datum:P(this).select("text").datum()})}).on("mouseout",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOUT,{event:l,element:P(this).select("text"),datum:P(this).select("text").datum()}),a===Z.LABELS&&c.services.events.dispatchEvent(M.Tooltip.HIDE)}).on("focus",function(l){const u={clientX:0,clientY:0};if(l.target){l.target.focus();const d=l.target.getBoundingClientRect();u.clientX=d.x,u.clientY=d.y}c.services.events.dispatchEvent(M.Axis.LABEL_FOCUS,{event:{...l,...u},element:P(this),datum:P(this).select("text").datum()})}).on("blur",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_BLUR,{event:l,element:P(this),datum:P(this).select("text").datum()})}).on("keydown",function(l){l.key&&l.key==="Escape"&&(c.services.events.dispatchEvent(M.Tooltip.HIDE),c.services.events.dispatchEvent(M.Axis.LABEL_BLUR,{event:l,element:P(this),datum:P(this).select("text").datum()})),n===V.LEFT||n===V.RIGHT?l.key&&l.key==="ArrowUp"?c.goNext(this,l):l.key&&l.key==="ArrowDown"&&c.goPrevious(this,l):l.key&&l.key==="ArrowLeft"?c.goPrevious(this,l):l.key&&l.key==="ArrowRight"&&c.goNext(this,l)})}goNext(t,n){t.nextElementSibling&&t.nextElementSibling.tagName!=="path"&&t.nextElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}goPrevious(t,n){t.previousElementSibling&&t.previousElementSibling.tagName!=="path"&&t.previousElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;I.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class oe extends ht{constructor(){super(...arguments),this.type="2D-axes",this.renderType=K.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const n={},i=Object.keys(V),r=w(this.getOptions(),"axes");i.forEach(a=>{r[V[a]]&&(n[V[a]]=!0)}),this.configs.axes=n,i.forEach(a=>{const o=V[a];if(this.configs.axes[o]&&!this.children[o]){const c={position:o,axes:this.configs.axes,margins:this.margins},l=this.model.axisFlavor===Zs.DEFAULT?new Km(this.model,this.services,c):new oR(this.model,this.services,c);l.setModel(this.model),l.setServices(this.services),l.setParent(this.parent),this.children[o]=l}}),Object.keys(this.children).forEach(a=>{this.children[a].render(t)});const s={};Object.keys(this.children).forEach(a=>{const o=this.children[a],c=o.configs.position,l=o.getInvisibleAxisRef(),{width:u,height:d}=I.getSVGElementSize(l,{useBBox:!0});let h;switch(o.getTitleRef().empty()?h=0:(h=I.getSVGElementSize(o.getTitleRef(),{useBBox:!0}).height,(c===V.LEFT||c===V.RIGHT)&&(h+=5)),c){case V.TOP:s.top=d+h;break;case V.BOTTOM:s.bottom=d+h;break;case V.LEFT:s.left=u+h;break;case V.RIGHT:s.right=u+h;break}}),this.services.events.dispatchEvent(M.Axis.RENDER_COMPLETE),Object.keys(s).some(a=>this.margins[a]!==s[a])&&(this.margins=Object.assign(this.margins,s),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(M.ZoomBar.UPDATE),Object.keys(this.children).forEach(a=>{const o=this.children[a];o.margins=this.margins}),this.render(!0))}}class ne extends ht{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const n=w(this.getOptions(),"data","loading");n?this.renderSkeleton(n):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===Ut.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===Ut.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===Ut.PIE)this.renderPieSkeleton(t);else if(this.configs.skeleton===Ut.DONUT)this.renderDonutSkeleton(t);else throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`)}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const n=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),n===Ft.VERTICAL&&this.drawYGrid(t),n===Ft.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const n=this.computeOuterRadius(),i=0;this.drawRing(n,i,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const n=this.computeOuterRadius(),i=this.computeInnerRadius();this.drawRing(n,i,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),n=this.services.cartesianScales.getMainYScale().range();this.xScale=Oe().domain([0,1]).range(t),this.yScale=Oe().domain([0,1]).range(n)}drawBackdrop(t){const n=this.parent,{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0});this.backdrop=I.appendOrSelect(n,"svg.chart-skeleton.DAII").attr("width",i).attr("height",r);const s=I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");s.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(s).attr("x",a).attr("y",o),s.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const n=+this.backdrop.attr("width"),i=w(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(i).map(o=>o*n),s=I.appendOrSelect(this.backdrop,"g.x.skeleton"),a=s.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",o=>o).attr("x2",o=>o).attr("y1",0).attr("y2","100%"),s.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const n=+this.backdrop.attr("height"),i=this.backdrop.attr("width"),r=w(this.getOptions(),"grid","y","numberOfTicks"),s=this.xScale.ticks(r).map(c=>c*n),a=I.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(s);o.enter().append("line").merge(o).attr("x1",0).attr("x2",i).attr("y1",c=>c).attr("y2",c=>c),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,n,i=!0){const r=this.parent,{width:s,height:a}=I.getSVGElementSize(r,{useAttrs:!0}),o=I.appendOrSelect(r,"svg.chart-skeleton").attr("width",s).attr("height",a),c=n===0?"pie":"donut",l=w(this.getOptions(),c,"alignment");I.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",s).attr("height",a).attr("fill","none");const u=lr().innerRadius(n).outerRadius(t).startAngle(0).endAngle(Math.PI*2),d=t+Math.abs(Et.radiusOffset),h=t+(Math.min(s,a)-t*2)/2,f=I.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${d}, ${h})`).attr("d",u).classed("shimmer-effect-areas",i).classed("empty-state-areas",!i).style("fill",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let p=t+Et.xOffset;l===Nt.CENTER?p=s/2:l===Nt.RIGHT&&(p=s-t-Et.xOffset);const g=t+Et.yOffset;f.attr("transform",`translate(${p}, ${g})`)}computeOuterRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,n)/2+Et.radiusOffset}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const n="stop-bg-shimmer",i="stop-shimmer",r=this.parent.select(".chart-skeleton"),{width:s}=I.getSVGElementSize(this.parent,{useAttrs:!0}),a=0,o=s,c=I.appendOrSelect(r,"defs").lower(),l=I.appendOrSelect(c,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",a-3*.2*s).attr("x2",o).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),u=`
75
+ </svg>`}destroy(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)}}class fe extends ht{constructor(){super(...arguments),this.type="grid",this.renderType=K.SVG}render(t=!0){const n=w(this.getOptions(),"grid","x","enabled"),i=w(this.getOptions(),"grid","y","enabled");this.drawBackdrop(n,i),!(!n&&!i)&&(n&&(I.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),i&&(I.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){const n=this.parent,i=this.backdrop.attr("height"),r=this.services.cartesianScales.getMainXScale(),s=Ba(r).tickSizeInner(-i).tickSizeOuter(0);if(w(this.getOptions(),"grid","x","alignWithAxisTicks")){const o=this.services.cartesianScales.getDomainAxisPosition(),c=w(this.getOptions(),"axes",o,"ticks","values");c&&s.tickValues(c)}else{const o=w(this.getOptions(),"grid","x","numberOfTicks");s.ticks(o)}const a=n.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${i})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}drawYGrid(t){const n=this.parent,i=this.backdrop.attr("width"),r=this.services.cartesianScales.getMainYScale(),s=Uc(r).tickSizeInner(-i).tickSizeOuter(0);if(w(this.getOptions(),"grid","y","alignWithAxisTicks")){const o=this.services.cartesianScales.getRangeAxisPosition(),c=w(this.getOptions(),"axes",o,"ticks","values");c&&s.tickValues(c)}else{const o=w(this.getOptions(),"grid","y","numberOfTicks");s.ticks(o)}const a=n.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?a.transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"grid-update",animate:t})).call(s):a.call(s),this.cleanGrid(a)}getGridlineThreshold(t){const n=this.parent,i=n.selectAll(".x.grid .tick").nodes().sort((u,d)=>Number(sn(u).tx)-Number(sn(d).tx));let r=-1;if(!i.length)return;i.forEach(u=>{t[0]>=+sn(u).tx&&r++});const s=r+1<i.length?r+1:i.length,a=i[r],o=i[s];let c;if(!a)c=+sn(o).tx;else if(o)c=+sn(o).tx-+sn(a).tx;else{const u=n.select("rect.chart-grid-backdrop").node();c=I.getSVGElementSize(u).width-+sn(a).tx}const{threshold:l}=this.getOptions().tooltip.gridline;return c*l}getActiveGridline(t){const n=w(this.getOptions,"tooltip","gridline","threshold"),i=n||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter(function(){const r=sn(this),s={min:Number(r.tx)-i,max:Number(r.tx)+i};return s.min<=t[0]&&t[0]<=s.max})}drawBackdrop(t,n){const i=this.parent,r=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),[a,o]=r.range(),[c,l]=s.range();this.backdrop=I.appendOrSelect(i,"svg.chart-grid-backdrop");const u=I.appendOrSelect(this.backdrop,t||n?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(u).attr("x",a).attr("y",l).attr("width",Math.abs(o-a)).attr("height",Math.abs(c-l)).lower(),u.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class Zm extends ht{constructor(){super(...arguments),this.type="area",this.renderType=K.SVG,this.gradient_id="gradient-id-"+Math.floor(Math.random()*99999999999),this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.area").transition("legend-hover-area").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-area"})).attr("opacity",i=>i.name!==n.datum().name?Ne.opacity.unselected:Ne.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Ne.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions();let r=[0,0];const{cartesianScales:s}=this.services,a=s.getOrientation(),o=sl().curve(this.services.curves.getD3Curve()).defined(E=>{const T=s.getRangeIdentifier();return E[T]!=null}),c=this.model.getGroupedData(this.configs.groups),l=w(i,"bounds"),u=l&&c&&c.length===1;!u&&l&&console.warn(`Bounds can only be shown when having 1 single datagroup, you've supplied ${c.length}`);let d=0;const h=(E,T)=>{w(i,"axes",E,"includeZero")===!1&&T[0]>0&&T[1]>0&&(d=T[0])},f=E=>u?s.getBoundedScaledValues(E)[0]:s.getRangeValue(d),p=E=>u?s.getBoundedScaledValues(E)[1]:s.getRangeValue(E);a===Ft.VERTICAL?(r=s.getMainYScale().domain(),h(s.getMainYAxisPosition(),r),o.x(E=>s.getDomainValue(E)).y0(E=>f(E)).y1(E=>p(E))):(r=s.getMainXScale().domain(),h(s.getMainXAxisPosition(),r),o.x0(E=>f(E)).x1(E=>p(E)).y(E=>s.getDomainValue(E)));const g=w(i,"color","gradient","enabled"),m=c&&c.length===1&&g;c.length>1&&g&&console.error("Gradients can only be enabled when having 1 single dataset");const v=n.selectAll("path.area").data(c,E=>E.name),x=P(this.services.domUtils.getMainContainer());if(v.exit().attr("opacity",0).remove(),!c.length)return;if(m){const E=x.select(`path.${this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:c[0].name})}`).node();let T;if(E)T=getComputedStyle(E,null).getPropertyValue("stroke");else{const S=w(this.model.getOptions(),"color","scale");if(S!==null){const A=Object.keys(S);T=S[A[0]]}}Kl.appendOrUpdateLinearGradient({svg:this.parent,id:this.services.domUtils.generateElementIDString(`${c[0].name.replace(" ","")}_${this.gradient_id}`),x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Kl.getStops(r,T)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each(function(){this.parentNode.remove()});const b=this,O=v.enter().append("path");m?O.merge(v).style("fill",E=>`url(#${this.services.domUtils.generateElementIDString(`${E.name.replace(" ","")}_${this.gradient_id}`)})`).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:E.name,originalClassName:"area"})).attr("d",E=>{const{data:T}=E;return o(T)}):(O.attr("opacity",0).merge(v).attr("class","area").attr("class",E=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:E.name,originalClassName:"area"})).style("fill",E=>b.model.getFillColor(E.name)).transition().call(E=>this.services.transitions.setupTransition({transition:E,name:"area-update-enter",animate:t})).attr("opacity",u?1:Ne.opacity.selected).attr("d",E=>{const{data:T}=E;return o(T)}),u&&O.attr("fill-opacity",Ne.opacity.selected).style("stroke",E=>b.model.getStrokeColor(E.name)).style("stroke-dasharray","2, 2").attr("stroke-width",.7+"px"))}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class Mi extends ht{constructor(){super(...arguments),this.type="line",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("path.line").transition("legend-hover-line").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-line"})).attr("opacity",i=>i.name!==n.datum().name?Ue.opacity.unselected:Ue.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",Ue.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),{cartesianScales:i,curves:r}=this.services,s=f=>i.getDomainValue(f),a=f=>i.getRangeValue(f),[o,c]=an(s,a,i.getOrientation()),l=this.getOptions(),u=cr().x(o).y(c).curve(r.getD3Curve()).defined(f=>{const p=i.getRangeIdentifier(f);return f[p]!=null});let d=[];if(this.configs.stacked){const f=Object.keys(l.axes).some(g=>l.axes[g].percentage),{groupMapsTo:p}=l.data;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map(g=>{const m=this.services.cartesianScales.getDomainIdentifier(g),v=this.services.cartesianScales.getRangeIdentifier(g);return{name:w(g,0,p),data:g.map(x=>({[m]:x.data.sharedStackKey,[p]:x[p],[v]:x[1]})),hidden:!FD(g,x=>x[0]!==x[1])}})}else d=this.model.getGroupedData(this.configs.groups);const h=n.selectAll("path.line").data(d,f=>f.name);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("line",!0).attr("opacity",0).merge(h).data(d,f=>f.name).attr("class",f=>this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:f.name,originalClassName:"line"})).style("stroke",f=>this.model.getStrokeColor(f.name)).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",f=>{const{data:p}=f;return p.map(g=>{const m=this.services.cartesianScales.getRangeIdentifier(g);return g[m]}).join(",")}).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"line-update-enter",animate:t})).attr("opacity",f=>f.hidden?0:1).attr("d",f=>{const{data:p}=f;return u(p)})}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}const Km=5;function oR(e,t){return e>t-Km&&e<t+Km}let yn=class extends ht{constructor(){super(...arguments),this.type="ruler",this.renderType=K.SVG,this.isXGridEnabled=w(this.getOptions(),"grid","x","enabled"),this.isYGridEnabled=w(this.getOptions(),"grid","y","enabled"),this.isEventListenerAdded=!1}render(t=!0){const n=w(this.getOptions(),"ruler","enabled");this.drawBackdrop(),n&&!this.isEventListenerAdded?this.addBackdropEventListeners():!n&&this.isEventListenerAdded&&this.removeBackdropEventListeners()}removeBackdropEventListeners(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)}formatTooltipData(t){return t}showRuler(t,[n,i]){const r=this.parent,s=this.services.cartesianScales.getOrientation(),a=this.model.getDisplayData(),o=this.services.cartesianScales.getRangeScale(),[c,l]=o.range(),u=s===Ft.HORIZONTAL?i:n,d=I.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),h=I.appendOrSelect(d,"line.ruler-line"),f=r.selectAll("[role=graphics-symbol]"),p=a.map(m=>({domainValue:this.services.cartesianScales.getDomainValue(m),originalData:m})).filter(m=>oR(m.domainValue,u));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map(m=>m.domainValue).join()===this.pointsWithinLine.map(m=>m.domainValue).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(M.Tooltip.MOVE,{mousePosition:[n,i]});this.pointsWithinLine=p;const g=this.pointsWithinLine.reduce((m,v)=>{if(m.length===0)return m.push(v),m;const x=m[0].domainValue,b=Math.abs(u-v.domainValue),O=Math.abs(u-x);return b>O||(b<O?m=[v]:m.push(v)),m},[]);if(g.length>0){const m=g.map(O=>O.originalData).filter(O=>{const E=this.services.cartesianScales.getRangeIdentifier(O);return O[E]!=null}),v=g.map(O=>O.domainValue),x=f.filter(O=>{const E=this.services.cartesianScales.getDomainValue(O);return v.includes(E)});this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Lm(this.elementsToHighlight,x)&&this.hideRuler(),x.dispatch("mouseover"),this.elementsToHighlight=x,this.services.events.dispatchEvent(M.Tooltip.SHOW,{mousePosition:[n,i],hoveredElement:h,data:this.formatTooltipData(m)}),d.attr("opacity",1);const b=g[0];s==="horizontal"?h.attr("x1",l).attr("x2",c).attr("y1",b.domainValue).attr("y2",b.domainValue):h.attr("y1",l).attr("y2",c).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()}hideRuler(){const t=this.parent,n=I.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(M.Tooltip.HIDE),n.attr("opacity",0)}addBackdropEventListeners(){this.isEventListenerAdded=!0;const t=this,n=this.services.domUtils.getHolder(),i=this.model.getDisplayData();let r=function(s){const a=wn(s,t.parent.node());t.showRuler(s,a)};if(i.length>100){const s=i.length%50*12.5;r=q2(function(a){const{mousePosition:o}=this;t.showRuler(a,o)},s,n)}this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))}drawBackdrop(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-grid-backdrop")}};class Ve extends ht{constructor(){super(...arguments),this.type="scatter",this.renderType=K.SVG,this.handleChartHolderOnHover=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-hover-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-hover-scatter"})}).attr("opacity",1)},this.handleChartHolderOnMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("chart-holder-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"chart-holder-mouseout-scatter"})}).attr("opacity",0)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-hover-scatter").call(r=>{var s;return(s=this.services.transitions)==null?void 0:s.setupTransition({transition:r,name:"legend-hover-scatter"})}).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle.dot").transition("legend-mouseout-scatter").call(t=>{var n;return(n=this.services.transitions)==null?void 0:n.setupTransition({transition:t,name:"legend-mouseout-scatter"})}).attr("opacity",1)}}init(){const{events:t}=this.services;if(!t)throw new Error("Services events are undefined.");t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut);const{fadeInOnChartHolderMouseover:n}=this.configs;n&&(t.addEventListener(M.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(M.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))}filterBasedOnZoomDomain(t){const{cartesianScales:n}=this.services;if(!n)throw new Error("Services cartesianScales are undefined.");const i=n.getDomainIdentifier(t),r=this.model.get("zoomDomain");return r!==void 0?t.filter(s=>s[i].getTime()>=r[0].getTime()&&s[i].getTime()<=r[1].getTime()):t}getScatterData(){const t=this.getOptions(),{stacked:n}=this.configs;let i;if(n){const r=Object.keys(t.axes).some(s=>t.axes[s].percentage);i=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else{const{cartesianScales:r}=this.services;if(!r)throw new Error("Services cartesianScales are undefined.");i=this.model.getDisplayData(this.configs.groups).filter(s=>{const a=r.getRangeIdentifier(s);return s[a]!==void 0&&s[a]!==null})}return this.filterBasedOnZoomDomain(i)}render(t){if(!(w(this.getOptions(),"points","enabled")||w(this.getOptions(),"bubble","enabled")))return;const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,{cartesianScales:s}=this.services;if(!s)throw new Error("Services cartesianScales are undefined.");const a=s.getDomainIdentifier(),o=n.selectAll("circle.dot").data(this.getScatterData(),l=>`${l[r]}-${l[a]}`);o.exit().attr("opacity",0).remove();const c=o.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(o);this.styleCircles(c,t),this.addEventListeners()}isDatapointThresholdAnomaly(t){const{handleThresholds:n}=this.configs;if(!n)return!1;const{cartesianScales:i}=this.services;if(!i)throw new Error("Cartesian scales service is undefined");const r=i.getOrientation(),[s,a]=an(i.getHighestDomainThreshold(),i.getHighestRangeThreshold(),r),[o,c]=an(d=>i.getDomainValue(d),d=>i.getRangeValue(d),r),l=o(t),u=c(t);return a&&s?u<=a.scaleValue&&l>=s.scaleValue:a?u<=a.scaleValue:s?l>=s.scaleValue:!1}styleCircles(t,n){const i=this.getOptions(),{filled:r,fillOpacity:s}=i.points,{cartesianScales:a}=this.services;if(!a)throw new Error("Cartesian scales service is undefined");const{groupMapsTo:o}=i.data,c=f=>a.getDomainValue(f),l=f=>a.getRangeValue(f),[u,d]=an(c,l,a.getOrientation()),{fadeInOnChartHolderMouseover:h}=this.configs;t.raise().classed("dot",!0).attr("class",f=>{const p=a.getDomainIdentifier(f),g=this.model.getIsFilled(f[o],f[p],f,r)?[J.FILL,J.STROKE]:[J.STROKE];return this.model.getColorClassName({classNameTypes:g,dataGroupName:f[o],originalClassName:"dot"})||""}).classed("threshold-anomaly",f=>this.isDatapointThresholdAnomaly(f)).classed("filled",f=>{const p=a.getDomainIdentifier(f);return this.model.getIsFilled(f[o],f[p],f,r)}).classed("unfilled",f=>{const p=a.getDomainIdentifier(f);return!this.model.getIsFilled(f[o],f[p],f,r)}).transition().call(f=>{var p;return(p=this.services.transitions)==null?void 0:p.setupTransition({transition:f,name:"scatter-update-enter",animate:n})}).attr("cx",u).attr("cy",d).attr("r",i.points.radius).style("fill",f=>{const p=a.getDomainIdentifier(f);if(this.model.getIsFilled(f[o],f[p],f,r))return this.model.getFillColor(f[o],f[p],f)}).style("stroke",f=>{const p=a.getDomainIdentifier(f);return this.model.getStrokeColor(f[o],f[p],f)}).attr("fill-opacity",r?s:1).attr("opacity",h?0:1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",f=>{const p=a.getRangeIdentifier(f);return f[p]}),this.addEventListeners()}getTooltipAdditionalItems(t){return null}addEventListeners(){const t=this,{groupMapsTo:n}=t.getOptions().data;if(!this.parent)throw new Error("Parent not defined");this.parent.selectAll("circle").on("mouseover",function(i,r){var s,a;const o=P(this);o.classed("hovered",!0).attr("class",c=>t.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:c[n],originalClassName:o.attr("class")})).style("fill",c=>{var l;const u=(l=t.services.cartesianScales)==null?void 0:l.getDomainIdentifier(c);return t.model.getFillColor(c[n],c[u],c)}).classed("unfilled",!1),(s=t.services.events)==null||s.dispatchEvent(M.Tooltip.SHOW,{event:i,hoveredElement:o,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),(a=t.services.events)==null||a.dispatchEvent(M.Scatter.SCATTER_MOUSEOVER,{event:i,element:o,datum:r})}).on("mousemove",function(i,r){var s,a;const o=P(this);(s=t.services.events)==null||s.dispatchEvent(M.Scatter.SCATTER_MOUSEMOVE,{event:i,element:o,datum:r}),(a=t.services.events)==null||a.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){var s;(s=t.services.events)==null||s.dispatchEvent(M.Scatter.SCATTER_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){var s,a,o;const c=P(this);if(c.classed("hovered",!1),!t.configs.filled){const{filled:l}=t.getOptions().points,u=(s=t.services.cartesianScales)==null?void 0:s.getDomainIdentifier(r),d=t.model.getIsFilled(r[n],r[u],r,l);c.classed("unfilled",!d).style("fill",h=>d||l?t.model.getFillColor(h[n],h[u],h):null)}(a=t.services.events)==null||a.dispatchEvent(M.Scatter.SCATTER_MOUSEOUT,{event:i,element:c,datum:r}),(o=t.services.events)==null||o.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:c})})}destroy(){var t;(t=this.parent)==null||t.selectAll("circle").on("mousemove",null).on("mouseout",null);const{events:n}=this.services;if(!n)throw new Error("Services events undefined");n.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),n.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),n.removeEventListener(M.Chart.MOUSEOVER,this.handleChartHolderOnHover),n.removeEventListener(M.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)}}let Qm=class extends ht{constructor(t,n,i){super(t,n,i),this.type="axes",this.renderType=K.SVG,this.truncation={[H.LEFT]:!1,[H.RIGHT]:!1,[H.TOP]:!1,[H.BOTTOM]:!1},i&&(this.configs=i),this.margins=this.configs.margins}render(t=!0){const{position:n}=this.configs,i=this.getOptions(),r=w(i,"axes",n,"visible"),s=this.getComponentContainer(),{width:a,height:o}=I.getSVGElementSize(s,{useAttrs:!0}),c=I.appendOrSelect(s,`g.axis.${n}`);let l,u;if(n===H.BOTTOM||n===H.TOP?(l=this.configs.axes[H.LEFT]?this.margins.left:0,u=this.configs.axes[H.RIGHT]?a-this.margins.right:a):(l=o-this.margins.bottom,u=this.margins.top),!this.services.cartesianScales)throw new Error("Services cartesianScales undefineds");const d=this.services.cartesianScales.getScaleByPosition(n);this.scaleType===Z.LABELS||this.scaleType===Z.LABELS_RATIO?d.rangeRound([l,u]):d.range([l,u]);let h;switch(n){case H.LEFT:h=Uc;break;case H.BOTTOM:h=Ba;break;case H.RIGHT:h=r0;break;case H.TOP:h=i0;break}c.attr("aria-label",`${n} axis`);const f=!c.select("g.ticks").empty();let p=I.appendOrSelect(c,"g.ticks");f||(p.attr("role",`${at.GRAPHICS_OBJECT} ${at.GROUP}`),p.attr("aria-label",`${n} ticks`));const g=I.appendOrSelect(c,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${n} ticks`),m=w(i,"axes",n),v=this.scaleType===Z.TIME||m.scaleType===Z.TIME,x=n===H.LEFT||n===H.RIGHT,b=this.model.get("zoomDomain");if(b&&v&&!x&&d.domain(b),!r){p.attr("aria-hidden",!0);return}const O=w(m,"scaleType"),E=w(i,"data","loading"),T=w(m,"ticks","number"),S=w(m,"ticks","values"),A=w(m,"truncation","type"),D=w(m,"truncation","threshold"),L=w(m,"truncation","numCharacter"),C=T!==null,B=w(i,"timeScale"),_=I.appendOrSelect(g,"g.tick"),$=I.appendOrSelect(_,"text").text("0"),y=I.getSVGElementSize($.node(),{useBBox:!0}).height;_.remove();const k=this.scaleType||m.scaleType||Z.LINEAR,R=h(d).tickSizeOuter(0);if(d.ticks){let j;if(C?j=T:(j=R.ticks.number,x&&(j=this.getNumberOfFittingTicks(o,y,R.ticks.verticalSpaceRatio))),d.ticks().length===1&&d.ticks()[0]===0&&(j=0),R.ticks(j),v)if(!d.ticks(j).length)R.tickValues([]);else{const X=w(i,"timeScale","addSpaceOnEdges"),ot=w(i,"axes",n,"domain"),tt=d.copy();X&&!ot&&tt.nice(j);const lt=tt.ticks(j);X&&lt.length>2&&!ot&&(lt.splice(lt.length-1,1),lt.splice(0,1)),R.tickValues(lt)}}let U;const N=w(m,"ticks","formatter");if(v){const j=Yl(R.tickValues(),w(i,"timeScale","timeInterval"));N===null?U=(X,ot)=>Wl(X,ot,R.tickValues(),j,B):U=(X,ot)=>{const tt=Wl(X,ot,R.tickValues(),j,B);return N(X,ot,tt)}}else N===null?k===Z.LINEAR&&(U=j=>j.toLocaleString()):U=N;R.tickFormat(U);const[G,z]=this.services.cartesianScales.getScaleByPosition(n).domain();let F;if(S){if(v)S.forEach((j,X)=>{j.getTime===void 0&&(S[X]=new Date(j))}),F=S.filter(j=>{const X=j.getTime();return X>=new Date(G).getTime()&&X<=new Date(z).getTime()});else if(O===Z.LABELS){const j=this.services.cartesianScales.getScaleByPosition(n).domain();F=S.filter(X=>j.includes(X))}else F=S.filter(j=>j>=G&&j<=z);R.tickValues(F)}switch(n){case H.LEFT:p.attr("transform",`translate(${this.margins.left}, 0)`);break;case H.BOTTOM:p.attr("transform",`translate(0, ${o-this.margins.bottom})`);break;case H.RIGHT:p.attr("transform",`translate(${a-this.margins.right}, 0)`);break;case H.TOP:p.attr("transform",`translate(0, ${this.margins.top})`);break}const Q=this.model.isDataEmpty();if(m.title){const j=I.appendOrSelect(c,"text.axis-title").html(Q||E?"":m.title),X=w(m,"titleOrientation");let ot;switch(n){case H.LEFT:X===pl.RIGHT?j.attr("transform","rotate(90)").attr("y",0).attr("x",d.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):j.attr("transform","rotate(-90)").attr("y",0).attr("x",-(d.range()[0]/2)).attr("dy","0.75em").style("text-anchor","middle");break;case H.BOTTOM:j.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${o+4})`).style("text-anchor","middle");break;case H.RIGHT:X===pl.LEFT?j.attr("transform","rotate(-90)").attr("y",a).attr("x",-(d.range()[0]/2)).style("text-anchor","middle"):j.attr("transform","rotate(90)").attr("y",-a).attr("x",d.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case H.TOP:({height:ot}=I.getSVGElementSize(j,{useBBox:!0})),j.attr("transform",`translate(${this.margins.left/2+d.range()[1]/2}, ${ot/2})`).style("text-anchor","middle");break}}if(v){const j=Yl(R.tickValues(),w(i,"timeScale","timeInterval")),X=B.showDayName,ot=p;t&&(p=p.transition().call(tt=>this.services.transitions.setupTransition({transition:tt,name:"axis-update",animate:t}))),p=p.call(R),ot.selectAll(".tick").data(R.tickValues(),d).order().select("text").style("font-weight",(tt,lt)=>zp(tt,lt,R.tickValues(),j,X)?"bold":"normal")}else!t||!f?p=p.call(R):p=p.transition().call(j=>this.services.transitions.setupTransition({transition:j,name:"axis-update",animate:t})).call(R);if(g.call(R),n===H.BOTTOM||n===H.TOP){let j=!1;const X=w(m,"ticks","rotation");if(X===Ys.ALWAYS)j=!0;else if(X===Ys.NEVER)j=!1;else if(!X||X===Ys.AUTO)if(d.step)j=g.selectAll("g.tick text").nodes().some(ot=>I.getSVGElementSize(ot,{useBBox:!0}).width>=d.step());else{j=!1;const ot=g.append("text").text("A"),tt=I.getSVGElementSize(ot.node(),{useBBox:!0}).width;let lt;g.selectAll("g.tick").each(function(){const q=P(this),W=parseFloat(w(sn(this),"tx"));W!==null&&lt+q.text().length*tt*.8>=W&&(j=!0),lt=W}),ot.remove()}j?(C||(R.ticks(this.getNumberOfFittingTicks(a,y,R.ticks.horizontalSpaceRatio)),g.call(R),p.call(R)),c.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",n===H.TOP?"start":"end")):c.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(E?c.attr("opacity",0):c.attr("opacity",1),p.selectAll("g.tick").attr("aria-label",j=>j),g.selectAll("g.tick").attr("aria-label",j=>j),A!==Te.NONE&&O===Z.LABELS&&!S){const j=this.services.cartesianScales.getScaleDomain(n);if(j.length>0){const X=s.select(`g.axis.${n} g.ticks g.tick`).html();c.selectAll("g.ticks g.tick").html(X);const ot=this;c.selectAll("g.tick text").data(j).text(function(tt){return tt.length>D?(ot.truncation[n]=!0,$r(tt,A,L)):tt}),this.getInvisibleAxisRef().selectAll("g.tick text").data(j).text(function(tt){return tt.length>D?$r(tt,A,L):tt}),c.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),c.selectAll("g.tick text").data(j)}}this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,i=I.appendOrSelect(t,`g.axis.${n}`),r=this.getOptions(),s=w(r,"axes",n),a=w(s,"scaleType"),o=w(s,"truncation","threshold"),c=this;i.selectAll("g.tick text").on("mouseover",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOVER,{event:l,element:P(this),datum:u}),a===Z.LABELS&&u.length>o&&c.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,hoveredElement:P(this),content:u})}).on("mousemove",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEMOVE,{event:l,element:P(this),datum:u}),a===Z.LABELS&&u.length>o&&c.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_CLICK,{event:l,element:P(this),datum:u})}).on("mouseout",function(l,u){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOUT,{event:l,element:P(this),datum:u}),a===Z.LABELS&&c.services.events.dispatchEvent(M.Tooltip.HIDE)})}getInvisibleAxisRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){const{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,n,i){const r=Math.floor(t/(n*i));return Am(r,2,gi.ticks.number)}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;I.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}};class lR extends Qm{constructor(t,n,i){super(t,n,i)}render(t=!0){super.render(t),super.destroy();const n=this.configs.position,i=this.getComponentContainer(),r=I.appendOrSelect(i,`g.axis.${n}`),s=this;r.selectAll("g.tick").each(function(a,o){const c=P(this);c.classed("tick-hover",!0).attr("tabindex",o===0?0:-1);const l=c.select("text"),{width:u,height:d}=I.getSVGElementSize(l,{useBBox:!0}),h=I.appendOrSelect(c,"rect.axis-holder");let f=0,p=0;switch(n){case H.LEFT:f=-u+Number(l.attr("x")),p=-(d/2);break;case H.RIGHT:f=Math.abs(Number(l.attr("x"))),p=-(d/2);break;case H.TOP:f=-(u/2),p=-d+Number(l.attr("y"))/2,s.truncation[n]&&(f=0,h.attr("transform","rotate(-45)"));break;case H.BOTTOM:f=-(u/2),p=d/2-2,s.truncation[n]&&(f=-u,h.attr("transform","rotate(-45)"));break}h.attr("x",f-gi.hover.rectanglePadding).attr("y",p).attr("width",u+gi.hover.rectanglePadding*2).attr("height",d).lower()}),this.addEventListeners()}addEventListeners(){const t=this.getComponentContainer(),{position:n}=this.configs,i=I.appendOrSelect(t,`g.axis.${n}`),r=this.getOptions(),s=w(r,"axes",n),a=w(s,"scaleType"),o=w(s,"truncation","threshold"),c=this;i.selectAll("g.tick.tick-hover").on("mouseover",function(l){const u=P(this).select("text"),d=u.datum();c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOVER,{event:l,element:u,datum:d}),a===Z.LABELS&&d.length>o&&c.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,element:u,datum:d})}).on("mousemove",function(l){const u=P(this).select("text"),d=u.datum();c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEMOVE,{event:l,element:u,datum:d}),c.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_CLICK,{event:l,element:P(this).select("text"),datum:P(this).select("text").datum()})}).on("mouseout",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_MOUSEOUT,{event:l,element:P(this).select("text"),datum:P(this).select("text").datum()}),a===Z.LABELS&&c.services.events.dispatchEvent(M.Tooltip.HIDE)}).on("focus",function(l){const u={clientX:0,clientY:0};if(l.target){l.target.focus();const d=l.target.getBoundingClientRect();u.clientX=d.x,u.clientY=d.y}c.services.events.dispatchEvent(M.Axis.LABEL_FOCUS,{event:{...l,...u},element:P(this),datum:P(this).select("text").datum()})}).on("blur",function(l){c.services.events.dispatchEvent(M.Axis.LABEL_BLUR,{event:l,element:P(this),datum:P(this).select("text").datum()})}).on("keydown",function(l){l.key&&l.key==="Escape"&&(c.services.events.dispatchEvent(M.Tooltip.HIDE),c.services.events.dispatchEvent(M.Axis.LABEL_BLUR,{event:l,element:P(this),datum:P(this).select("text").datum()})),n===H.LEFT||n===H.RIGHT?l.key&&l.key==="ArrowUp"?c.goNext(this,l):l.key&&l.key==="ArrowDown"&&c.goPrevious(this,l):l.key&&l.key==="ArrowLeft"?c.goPrevious(this,l):l.key&&l.key==="ArrowRight"&&c.goNext(this,l)})}goNext(t,n){t.nextElementSibling&&t.nextElementSibling.tagName!=="path"&&t.nextElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}goPrevious(t,n){t.previousElementSibling&&t.previousElementSibling.tagName!=="path"&&t.previousElementSibling.dispatchEvent(new Event("focus")),n.preventDefault()}destroy(){const t=this.getComponentContainer(),{position:n}=this.configs;I.appendOrSelect(t,`g.axis.${n}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class oe extends ht{constructor(){super(...arguments),this.type="2D-axes",this.renderType=K.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){const n={},i=Object.keys(H),r=w(this.getOptions(),"axes");i.forEach(a=>{r[H[a]]&&(n[H[a]]=!0)}),this.configs.axes=n,i.forEach(a=>{const o=H[a];if(this.configs.axes[o]&&!this.children[o]){const c={position:o,axes:this.configs.axes,margins:this.margins},l=this.model.axisFlavor===Zs.DEFAULT?new Qm(this.model,this.services,c):new lR(this.model,this.services,c);l.setModel(this.model),l.setServices(this.services),l.setParent(this.parent),this.children[o]=l}}),Object.keys(this.children).forEach(a=>{this.children[a].render(t)});const s={};Object.keys(this.children).forEach(a=>{const o=this.children[a],c=o.configs.position,l=o.getInvisibleAxisRef(),{width:u,height:d}=I.getSVGElementSize(l,{useBBox:!0});let h;switch(o.getTitleRef().empty()?h=0:(h=I.getSVGElementSize(o.getTitleRef(),{useBBox:!0}).height,(c===H.LEFT||c===H.RIGHT)&&(h+=5)),c){case H.TOP:s.top=d+h;break;case H.BOTTOM:s.bottom=d+h;break;case H.LEFT:s.left=u+h;break;case H.RIGHT:s.right=u+h;break}}),this.services.events.dispatchEvent(M.Axis.RENDER_COMPLETE),Object.keys(s).some(a=>this.margins[a]!==s[a])&&(this.margins=Object.assign(this.margins,s),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(M.ZoomBar.UPDATE),Object.keys(this.children).forEach(a=>{const o=this.children[a];o.margins=this.margins}),this.render(!0))}}class ne extends ht{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){const n=w(this.getOptions(),"data","loading");n?this.renderSkeleton(n):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===Ut.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===Ut.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===Ut.PIE)this.renderPieSkeleton(t);else if(this.configs.skeleton===Ut.DONUT)this.renderDonutSkeleton(t);else throw new Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`)}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){const n=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),n===Ft.VERTICAL&&this.drawYGrid(t),n===Ft.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){const n=this.computeOuterRadius(),i=0;this.drawRing(n,i,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){const n=this.computeOuterRadius(),i=this.computeInnerRadius();this.drawRing(n,i,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){const t=this.services.cartesianScales.getMainXScale().range(),n=this.services.cartesianScales.getMainYScale().range();this.xScale=Oe().domain([0,1]).range(t),this.yScale=Oe().domain([0,1]).range(n)}drawBackdrop(t){const n=this.parent,{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0});this.backdrop=I.appendOrSelect(n,"svg.chart-skeleton.DAII").attr("width",i).attr("height",r);const s=I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");s.attr("width","100%").attr("height","100%");const[a]=this.xScale.range(),[,o]=this.yScale.range();this.backdrop.merge(s).attr("x",a).attr("y",o),s.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){const n=+this.backdrop.attr("width"),i=w(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(i).map(o=>o*n),s=I.appendOrSelect(this.backdrop,"g.x.skeleton"),a=s.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",o=>o).attr("x2",o=>o).attr("y1",0).attr("y2","100%"),s.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){const n=+this.backdrop.attr("height"),i=this.backdrop.attr("width"),r=w(this.getOptions(),"grid","y","numberOfTicks"),s=this.xScale.ticks(r).map(c=>c*n),a=I.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(s);o.enter().append("line").merge(o).attr("x1",0).attr("x2",i).attr("y1",c=>c).attr("y2",c=>c),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,n,i=!0){const r=this.parent,{width:s,height:a}=I.getSVGElementSize(r,{useAttrs:!0}),o=I.appendOrSelect(r,"svg.chart-skeleton").attr("width",s).attr("height",a),c=n===0?"pie":"donut",l=w(this.getOptions(),c,"alignment");I.appendOrSelect(o,"rect.chart-skeleton-area-container").attr("width",s).attr("height",a).attr("fill","none");const u=lr().innerRadius(n).outerRadius(t).startAngle(0).endAngle(Math.PI*2),d=t+Math.abs(Et.radiusOffset),h=t+(Math.min(s,a)-t*2)/2,f=I.appendOrSelect(o,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${d}, ${h})`).attr("d",u).classed("shimmer-effect-areas",i).classed("empty-state-areas",!i).style("fill",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null);let p=t+Et.xOffset;l===Nt.CENTER?p=s/2:l===Nt.RIGHT&&(p=s-t-Et.xOffset);const g=t+Et.yOffset;f.attr("transform",`translate(${p}, ${g})`)}computeOuterRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,n)/2+Et.radiusOffset}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){const n="stop-bg-shimmer",i="stop-shimmer",r=this.parent.select(".chart-skeleton"),{width:s}=I.getSVGElementSize(this.parent,{useAttrs:!0}),a=0,o=s,c=I.appendOrSelect(r,"defs").lower(),l=I.appendOrSelect(c,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",a-3*.2*s).attr("x2",o).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),u=`
76
76
  <stop class="${n}" offset="${a}"></stop>
77
77
  <stop class="${i}" offset="${a+.2}"></stop>
78
78
  <stop class="${n}" offset="${a+2*.2}"></stop>
79
- `;l.html(u),d();function d(){l.attr("gradientTransform",`translate(${a-3*.2*s}, 0)`).transition().duration(2e3).delay(1e3).ease(b_).attr("gradientTransform",`translate(${o+3*.2*s}, 0)`).on("end",d)}}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class lR extends ht{constructor(){super(...arguments),this.type="boxplot",this.renderType=K.SVG}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[c,l]=a.range(),[u,d]=o.range(),h=l-c,f=u-d;if(h===0)return;const{cartesianScales:p}=this.services,g=p.getOrientation(),m=g===Ft.VERTICAL,[v,x]=an(C=>this.services.cartesianScales.getDomainValue(C),C=>this.services.cartesianScales.getRangeValue(C),g),b=Math.floor((m?h:f)/s.length),O=Math.min(b/2,16),E=this.model.getBoxplotData(),T=n.selectAll(".box-group").data(E);T.exit().remove();const S=T.enter().append("g").attr("class","box-group"),A=T.merge(S);S.append("path").merge(T.select("path.vertical-line.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"vertical-line start"})).attr("stroke-width",de.strokeWidth.default).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-verticalstartline",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r]),_=B,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.quartiles.q_25);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.vertical-line.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"vertical-line end"})).attr("stroke-width",de.strokeWidth.default).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-verticalendline",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r]),_=B,$=p.getRangeValue(C.whiskers.max),y=p.getRangeValue(C.quartiles.q_75);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.box")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],originalClassName:"box"})).attr("fill-opacity",de.box.opacity.default).attr("stroke-width",de.strokeWidth.default).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",C=>C[r]).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-quartiles",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(Math[m?"max":"min"](C.quartiles.q_75,C.quartiles.q_25)),y=$+Math.abs(p.getRangeValue(C.quartiles.q_75)-p.getRangeValue(C.quartiles.q_25));return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.whiskers.max);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.whisker.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"whisker start"})).attr("stroke-width",de.strokeWidth.thicker).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-startingwhisker",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/4,_=B+O/2,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.whiskers.min);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.median")).attr("fill","none").attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"median"})).attr("stroke-width",2).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-median",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(C.quartiles.q_50);return ee({x0:B,x1:_,y0:$,y1:$},g)}),S.append("path").merge(T.select("path.whisker.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"whisker end"})).attr("stroke-width",de.strokeWidth.thicker).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-endingwhisker",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/4,_=B+O/2,$=p.getRangeValue(C.whiskers.max),y=p.getRangeValue(C.whiskers.max);return ee({x0:B,x1:_,y0:$,y1:y},g)});const D=A.selectAll("circle.outlier").data(C=>C.outliers.map(B=>({min:C.whiskers.min,max:C.whiskers.max,[r]:C[r],value:B})));D.exit().remove();const L=D.enter().append("circle");D.merge(L).attr("r",de.circle.radius).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],originalClassName:"outlier"})).attr("fill-opacity",de.circle.opacity.default).attr("cx",v).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-circles",animate:t})).attr("cy",x),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data;this.parent.selectAll("path.highlight-area").on("mouseover",function(r,s){const a=P(this);P(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",de.box.opacity.hovered),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:n.tooltip.groupLabel,value:s[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP]})},{label:"Minimum",value:s.whiskers.min},{label:"Q1",value:s.quartiles.q_25},{label:"Median",value:s.quartiles.q_50},{label:"Q3",value:s.quartiles.q_75},{label:"Maximum",value:s.whiskers.max},{label:"IQR",value:s.quartiles.q_75-s.quartiles.q_25}]}),t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEOVER,{event:r,element:a,datum:s})}).on("mousemove",function(r,s){const a=P(this);t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEMOVE,{event:r,element:a,datum:s}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){t.services.events.dispatchEvent(M.Boxplot.BOX_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);P(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",de.box.opacity.default),t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEOUT,{event:r,element:a,datum:s}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:a})})}addCircleEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",function(s,a){const o=P(this);o.classed("hovered",!0).attr("fill-opacity",de.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:n.tooltip.groupLabel,value:a[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP]})},{label:"Outlier",value:a[r]}]}),t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEOVER,{event:s,element:o,datum:a})}).on("mousemove",function(s,a){const o=P(this);t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEMOVE,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){t.services.events.dispatchEvent(M.Boxplot.OUTLIER_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);o.classed("hovered",!1).attr("fill-opacity",de.circle.opacity.default),t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEOUT,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}}class $i extends ht{constructor(){super(...arguments),this.type="zero-line",this.renderType=K.SVG}render(t){const n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),i=this.services.cartesianScales.getScaleByPosition(n),[r,s]=i.domain(),a=r>0&&s<0||r<0&&s>0,o=this.getComponentContainer();if(!a){o.selectAll("line.domain").remove();return}const[c,l]=this.services.cartesianScales.getDomainScale().range();let u=+i(0)+.5;u||(u=i.range()[0]);const d=kp({x0:c,x1:l,y0:u,y1:u},this.services.cartesianScales.getOrientation());I.appendOrSelect(o,"line.domain").transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"zero-line-update",animate:t})).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}}class cR extends He{constructor(){super(...arguments),this.type="bubble",this.renderType=K.SVG}getRadiusScale(t){const n=this.getOptions(),{radiusMapsTo:i}=n.bubble,r=t.data(),s=r.map(l=>l[i]).filter(l=>l),a=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=s.length>0,c=o?xe(s):[1,1];return Oe().domain(c).range(o?n.bubble.radiusRange(a,r):[4,4])}styleCircles(t,n){const i=this.getOptions(),{radiusMapsTo:r}=i.bubble,s=this.getRadiusScale(t),{groupMapsTo:a}=i.data,{cartesianScales:o}=this.services,c=h=>o.getDomainValue(h),l=h=>o.getRangeValue(h),[u,d]=an(c,l,o.getOrientation());t.raise().classed("dot",!0).attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",h=>{const f=o.getRangeIdentifier(h);return h[f]}).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bubble-update-enter",animate:n})).attr("cx",u).attr("cy",d).attr("r",h=>s(h[r]||1)).attr("class",h=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:h[a],originalClassName:"dot"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[a],h[f],h)}).style("stroke",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getStrokeColor(h[a],h[f],h)}).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(t){const n=w(this.getOptions(),"bubble");return[{label:w(n,"radiusLabel"),value:t[w(n,"radiusMapsTo")]}]}}class uR extends ht{constructor(){super(...arguments),this.type="bullet",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-simple-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[c,l]=a.range(),[,u]=a.domain(),d=()=>{const g=[];s.forEach(v=>{v.ranges?v.ranges.forEach((x,b)=>{x!=null&&x<u&&g.push({datum:v,value:x,order:b+1})}):g.push({datum:v,order:1})});const m=I.appendOrSelect(r,"g.range-boxes").selectAll("path.range-box").data(g,v=>`${v[i]}-${v.order}`);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",v=>`range-box order-${v.order}`).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"bullet-range-box-update-enter",animate:t})).attr("d",v=>{let x,b,O,E;return v.order===1?(x=this.services.cartesianScales.getDomainValue(v.datum)-16/2,b=x+16,O=l-2,E=c+1):(x=this.services.cartesianScales.getDomainValue(v.datum)-16/2,b=x+16,O=this.services.cartesianScales.getRangeValue(v.value),E=l),ee({x0:x,x1:b,y0:O,y1:E},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},h=()=>{const g=I.appendOrSelect(r,"g.bars").selectAll("path.bar").data(s,m=>m[i]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("bar",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-bar-update-enter",animate:t})).attr("class",m=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:m[i],originalClassName:"bar"})).style("fill",m=>this.model.getFillColor(m[i])).attr("d",m=>{const v=this.services.cartesianScales.getDomainValue(m)-4,x=v+8,b=this.services.cartesianScales.getRangeValue(0)+1,O=this.services.cartesianScales.getRangeValue(m);return ee({x0:v,x1:x,y0:b,y1:O},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",m=>m.value)},f=()=>{const g=I.appendOrSelect(r,"g.markers").selectAll("path.marker").data(s.filter(m=>w(m,"marker")!==null),m=>m[i]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("marker",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-marker-update-enter",animate:t})).attr("d",m=>{const v=this.services.cartesianScales.getDomainValue(m)-12,x=v+24,b=this.services.cartesianScales.getRangeValue(m.marker);return ee({x0:v,x1:x,y0:b,y1:b},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},p=()=>{let g=[];s.filter(v=>w(v,"marker")!==null).forEach(v=>{const x=v.marker,b=v[o];g=g.concat([{datum:v,value:x*.25,barValue:b},{datum:v,value:x*.5,barValue:b},{datum:v,value:x*.75,barValue:b}])});const m=I.appendOrSelect(r,"g.quartiles").selectAll("path.quartile").data(g,v=>v[i]);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",v=>`quartile ${v.value<=v.barValue?"over-bar":""}`).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"bullet-quartile-update-enter",animate:t})).attr("d",({datum:v,value:x})=>{let b=4;v.ranges&&v.ranges.indexOf(x)!==-1&&(b=8);const O=this.services.cartesianScales.getDomainValue(v)-b/2,E=O+b,T=this.services.cartesianScales.getRangeValue(x);return ee({x0:O,x1:E,y0:T,y1:T},this.services.cartesianScales.getOrientation())}).attr("opacity",1)};d(),h(),f(),p(),this.addEventListeners()}addEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",function(s,a){const o=P(this);o.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:s,element:o,datum:a});const c=w(n,"bullet","performanceAreaTitles"),l=t.model.getMatchingRangeIndexForDatapoint(a);t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:n.tooltip.groupLabel||"Group",value:a[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:a[i]})},{label:"Value",value:a[r]},{label:"Target",value:a.marker},{label:"Percentage",value:`${Math.floor(a[r]/a.marker*100)}%`},{label:"Performance",value:c[l]}]})}).on("mousemove",function(s,a){t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:s,element:P(this),datum:a}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);o.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function hR(e){return e}function dR(e){if(e==null)return hR;var t,n,i=e.scale[0],r=e.scale[1],s=e.translate[0],a=e.translate[1];return function(o,c){c||(t=n=0);var l=2,u=o.length,d=new Array(u);for(d[0]=(t+=o[0])*i+s,d[1]=(n+=o[1])*r+a;l<u;)d[l]=o[l],++l;return d}}function fR(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function pR(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Qm(e,n)})}:Qm(e,t)}function Qm(e,t){var n=t.id,i=t.bbox,r=t.properties==null?{}:t.properties,s=wc(e,t);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function wc(e,t){var n=dR(e.transform),i=e.arcs;function r(u,d){d.length&&d.pop();for(var h=i[u<0?~u:u],f=0,p=h.length;f<p;++f)d.push(n(h[f],f));u<0&&fR(d,p)}function s(u){return n(u)}function a(u){for(var d=[],h=0,f=u.length;h<f;++h)r(u[h],d);return d.length<2&&d.push(d[0]),d}function o(u){for(var d=a(u);d.length<4;)d.push(d[0]);return d}function c(u){return u.map(o)}function l(u){var d=u.type,h;switch(d){case"GeometryCollection":return{type:d,geometries:u.geometries.map(l)};case"Point":h=s(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(s);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=c(u.arcs);break;case"MultiPolygon":h=u.arcs.map(c);break;default:return null}return{type:d,coordinates:h}}return l(t)}function mR(e,t){var n={},i={},r={},s=[],a=-1;t.forEach(function(l,u){var d=e.arcs[l<0?~l:l],h;d.length<3&&!d[1][0]&&!d[1][1]&&(h=t[++a],t[a]=l,t[u]=h)}),t.forEach(function(l){var u=o(l),d=u[0],h=u[1],f,p;if(f=r[d])if(delete r[f.end],f.push(l),f.end=h,p=i[h]){delete i[p.start];var g=p===f?f:f.concat(p);i[g.start=f.start]=r[g.end=p.end]=g}else i[f.start]=r[f.end]=f;else if(f=i[h])if(delete i[f.start],f.unshift(l),f.start=d,p=r[d]){delete r[p.end];var m=p===f?f:p.concat(f);i[m.start=p.start]=r[m.end=f.end]=m}else i[f.start]=r[f.end]=f;else f=[l],i[f.start=d]=r[f.end=h]=f});function o(l){var u=e.arcs[l<0?~l:l],d=u[0],h;return e.transform?(h=[0,0],u.forEach(function(f){h[0]+=f[0],h[1]+=f[1]})):h=u[u.length-1],l<0?[h,d]:[d,h]}function c(l,u){for(var d in l){var h=l[d];delete u[h.start],delete h.start,delete h.end,h.forEach(function(f){n[f<0?~f:f]=1}),s.push(h)}}return c(r,i),c(i,r),t.forEach(function(l){n[l<0?~l:l]||s.push([l])}),s}function gR(e){for(var t=-1,n=e.length,i,r=e[n-1],s=0;++t<n;)i=r,r=e[t],s+=i[0]*r[1]-i[1]*r[0];return Math.abs(s)}function vR(e){return wc(e,yR.apply(this,arguments))}function yR(e,t){var n={},i=[],r=[];t.forEach(s);function s(c){switch(c.type){case"GeometryCollection":c.geometries.forEach(s);break;case"Polygon":a(c.arcs);break;case"MultiPolygon":c.arcs.forEach(a);break}}function a(c){c.forEach(function(l){l.forEach(function(u){(n[u=u<0?~u:u]||(n[u]=[])).push(c)})}),i.push(c)}function o(c){return gR(wc(e,{type:"Polygon",arcs:[c]}).coordinates[0])}return i.forEach(function(c){if(!c._){var l=[],u=[c];for(c._=1,r.push(l);c=u.pop();)l.push(c),c.forEach(function(d){d.forEach(function(h){n[h<0?~h:h].forEach(function(f){f._||(f._=1,u.push(f))})})})}}),i.forEach(function(c){delete c._}),{type:"MultiPolygon",arcs:r.map(function(c){var l=[],u;if(c.forEach(function(g){g.forEach(function(m){m.forEach(function(v){n[v<0?~v:v].length<2&&l.push(v)})})}),l=mR(e,l),(u=l.length)>1)for(var d=1,h=o(l[0]),f,p;d<u;++d)(f=o(l[d]))>h&&(p=l[0],l[0]=l[d],l[d]=p,h=f);return l}).filter(function(c){return c.length>0})}}class _R extends vn{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=K.SVG}showRuler(t,[n,i]){const r=this.parent,s=this.model.getOptions(),{cartesianScales:a}=this.services,o=a.getOrientation(),c=a.getRangeScale(),[l,u]=c.range(),d=a.getDomainScale(),h=d.invert(o===Ft.VERTICAL?n:i),f=I.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),p=I.appendOrSelect(f,"line.ruler-line"),g=r.selectAll("[role=graphics-symbol]").filter(m=>{if(parseFloat(Ot(m,"data.x0"))<=h&&parseFloat(Ot(m,"data.x1"))>=h)return!0});if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Am(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;const m=P(g.nodes()[0]).datum(),v=parseFloat(Ot(m,"data.x0")),x=parseFloat(Ot(m,"data.x1")),b=this.model.getActiveDataGroupNames(),O=b.reverse().map(E=>({label:E,value:Ot(m,`data.${E}`),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:E})})).filter(E=>E.value!==0);if(O.length>0){this.services.events.dispatchEvent(M.Tooltip.SHOW,{mousePosition:[n,i],hoveredElement:p,items:[{label:Ot(s,"bins.rangeLabel")||"Range",value:`${v} – ${x}`},...O,...w(s,"tooltip","showTotal")===!0?[{label:Ot(s,"tooltip.totalLabel")||"Total",value:b.reduce((T,S)=>T+parseFloat(Ot(m,`data.${S}`)),0)}]:[]]}),f.attr("opacity",1);const E=d((v+x)/2);o==="horizontal"?p.attr("x1",u).attr("x2",l).attr("y1",E).attr("y2",E):p.attr("y1",u).attr("y2",l).attr("x1",E).attr("x2",E)}else this.hideRuler()}else this.hideRuler()}}class Da extends vn{formatTooltipData(t){return t.reverse()}}class Jm extends xc{constructor(t,n,i){super(t,n,i),this.type="color-legend",this.renderType=K.SVG,this.gradient_id=`gradient-id-${Math.floor(Math.random()*99999999999)}`,this.handleAxisCompleteEvent=()=>{const r=this.getComponentContainer(),{width:s}=I.getSVGElementSize(r,{useAttrs:!0}),a=w(this.getOptions(),"data","loading");if(s>kt.color.barWidth&&!a){const o=w(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:c}=this.services,l=c.getMainXScale().range();if(l[0]>1&&(r.select("g.legend").attr("transform",`translate(${l[0]}, 0)`),o)){const{width:u}=I.getSVGElementSize(r.select("g.legend-title").select("text"),{useBBox:!0}),d=l[0]-u-9;d>1?r.select("g.legend-title").attr("transform",`translate(${d}, 0)`):(r.select("g.legend").attr("transform",`translate(${l[0]}, 16)`),r.select("g.legend-title").attr("transform",`translate(${l[0]}, 0)`))}}else r.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=i.chartType}init(){this.chartType==="heatmap"&&this.services.events.addEventListener(M.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(t=!0){const n=this.getOptions(),i=this.getComponentContainer(),{width:r}=I.getSVGElementSize(i,{useAttrs:!0}),s=w(n,"color","gradient","colors"),a=w(n,this.chartType,"colorLegend","type");let o=w(n,"color","pairing","option");const c=w(n,"heatmap","colorLegend","title");if(w(this.getOptions(),"data","loading")){i.html("");return}const l=!$e(s),u=Yp(this.model.getDisplayData()),d=!(r<=kt.color.barWidth),h=d?kt.color.barWidth:r,f=I.appendOrSelect(i,"g.legend"),p=I.appendOrSelect(f,"g.legend-axis");if(c){const S=I.appendOrSelect(i,"g.legend-title");I.appendOrSelect(S,"text").text(c).attr("dy","0.7em"),f.attr("transform","translate(0, 16)")}const g=u[0]<0&&u[1]>0?"diverge":"mono";(o<1&&o>4&&g==="mono"||o<1&&o>2&&g==="diverge")&&(o=1);let m=[];const v=g==="diverge"?17:11;if(l)m=s;else for(let S=1;S<v+1;S++)m.push(a===Xs.LINEAR?`stop-color-${g}-${o}-${S}`:`fill-${g}-${o}-${S}`);const x=ue(u[0],u[1]),b=f1(x,3),O=Oe().domain(u).range([0,h]),E=Ba(O).tickSize(0).tickValues(b);let T;switch(a){case Xs.LINEAR:this.drawLinear(m,f,h);break;case Xs.QUANTIZE:T=this.drawQuantize(m,g,l,f,h),O.range([T,h]);break;default:throw Error("Entered color legend type is not supported.")}p.attr("transform",`translate(0,${kt.color.axisYTranslation})`).call(E),p.select(".domain").remove(),p.select("g.tick:last-of-type text").style("text-anchor",d?"middle":"end"),p.select("g.tick:first-of-type text").style("text-anchor",d&&this.chartType!=="choropleth"?"middle":"start")}drawLinear(t,n,i){const r=100/(t.length-1);I.appendOrSelect(n,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(t).enter().append("stop").attr("offset",(s,a)=>`${a*r}%`).attr("class",(s,a)=>t[a]).attr("stop-color",s=>s),I.appendOrSelect(n,"rect").attr("width",i).attr("height",kt.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(t,n,i,r,s){!i&&n==="diverge"&&t.splice(t.length/2,1);const a=nr().domain(t).range([0,s]);return I.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(a.domain()).join("rect").attr("x",o=>a(o)).attr("y",0).attr("width",Math.max(0,a.bandwidth()-1)).attr("height",kt.color.barHeight).attr("class",o=>o).attr("fill",o=>o),(!i&&n)==="mono"?a.bandwidth()-1:0}destroy(){this.chartType==="heatmap"&&this.services.events.removeEventListener(M.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class xR extends Nr{constructor(){super(...arguments),this.type="meter-title",this.renderType=K.SVG}render(t=!0){const n=w(this.model.getDisplayData(),0),i=this.getOptions(),r=this.getComponentContainer(),{groupMapsTo:s}=i.data;if(w(i,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const c=r.selectAll("text.meter-title").data([n[s]]);c.enter().append("text").classed("meter-title",!0).merge(c).attr("x",0).attr("y","1em").text(l=>l),c.exit().remove(),this.appendPercentage()}this.displayStatus();const a=this.getMaxTitleWidth(),o=I.appendOrSelect(r,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)}displayBreakdownTitle(){const t=this.getComponentContainer(),n=this.getOptions(),i=this.model.getMaximumDomain(this.model.getDisplayData()),r=w(n,"meter","proportional","total"),s=w(n,"meter","proportional","unit")?w(n,"meter","proportional","unit"):"";let a;if(i===r)a=null;else{const u=r!==null?r-i:i,d=w(n,"meter","proportional","breakdownFormatter");a=d!==null?d({datasetsTotal:i,total:r}):`${i} ${s} used (${u} ${s} available)`}const o=t.selectAll("text.proportional-meter-title").data([a]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text(u=>u),o.exit().remove();const c=this.getMaxTitleWidth(),l=I.appendOrSelect(t,"text.proportional-meter-title");c>0&&l.node().getComputedTextLength()>c&&this.truncateTitle(l,c)}displayTotal(){const t=this.getComponentContainer(),n=this.getOptions(),i=w(n,"meter","proportional","total"),r=i?w(n,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),s=w(n,"meter","proportional","unit")?w(n,"meter","proportional","unit"):"",a=w(n,"meter","proportional","totalFormatter"),o=a!==null?a(r):`${i} ${s} total`,c=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=c.width?c.width:this.parent.node().getAttribute("width"),u=t.selectAll("text.proportional-meter-total").data([o]);u.enter().append("text").classed("proportional-meter-total",!0).merge(u).attr("x",this.model.getStatus()&&typeof l!="string"?l-Gt.total.paddingRight:l).attr("y","1em").attr("text-anchor","end").text(d=>d),u.exit().remove()}displayStatus(){const t=this,n=this.getComponentContainer(),i=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),r=i.width?i.width:0,s=this.model.getStatus(),a=Gt.status.indicatorSize/2,o=I.appendOrSelect(n,"g.status-indicator").attr("class",s!==null?`status-indicator status--${s}`:"").attr("transform",`translate(${r-a}, 0)`),c=s?[s]:[],l=o.selectAll("circle.status").data(c);l.enter().append("circle").merge(l).attr("class","status").attr("r",a).attr("cx",0).attr("cy",8);const u=o.selectAll("path.innerFill").data(c);u.enter().append("path").merge(u).attr("d",t.getStatusIconPathString(s)).attr("transform",`translate(-${a}, 0)`).attr("class","innerFill"),u.exit().remove(),l.exit().remove()}appendPercentage(){const t=w(this.model.getDisplayData(),0,"value"),n=this.getComponentContainer(),i=I.appendOrSelect(n,"text.meter-title"),r=w(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")===!0?[t]:[],s=n.selectAll("text.percent-value").data(r),a=Gt.statusBar.paddingRight;s.enter().append("text").classed("percent-value",!0).merge(s).text(o=>`${o}%`).attr("x",+i.attr("x")+i.node().getComputedTextLength()+a).attr("y",i.attr("y")),s.exit().remove()}truncateTitle(t,n){super.truncateTitle(t,n);const i=I.appendOrSelect(this.parent,"tspan"),r=Gt.statusBar.paddingRight,s=Math.ceil(i.node().getComputedTextLength());I.appendOrSelect(this.parent,"text.percent-value").attr("x",+t.attr("x")+t.node().getComputedTextLength()+s+r)}getMaxTitleWidth(){const t=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=w(this.getOptions(),"meter","proportional"),i=t.width?t.width:this.parent.node().getBoundingClientRect().width;if(n!==null){const r=I.appendOrSelect(this.parent,"text.proportional-meter-total").node(),s=I.getSVGElementSize(r,{useBBox:!0}).width;return i-s-Gt.total.paddingLeft}else{const r=I.appendOrSelect(this.parent,"text.percent-value"),s=Gt.statusBar.paddingRight,a=r.node().getComputedTextLength(),o=I.appendOrSelect(this.parent,"g.status-indicator").node(),c=I.getSVGElementSize(o,{useBBox:!0}).width+Gt.status.paddingLeft;return i-a-s-c}}getStatusIconPathString(t){switch(t){case qs.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case qs.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case qs.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class Ec extends ht{getBarWidth(){const t=this.getOptions();if(t.bars.width)return t.bars.width;const n=this.model.getDisplayData().length,i=this.services.cartesianScales.getMainXScale(),r=I.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!i.step){const s=w(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,r*s/n)}return Math.min(t.bars.maxWidth,i.step()/2)}isOutsideZoomedDomain(t,n){if(this.model.getDisplayData().length<=1)return!1;const i=this.model.get("zoomDomain");if(i!==void 0){const r=this.services.cartesianScales.getDomainScale();return t<r(i[0])||n>r(i[1])}return!1}}class bR extends ht{constructor(){super(...arguments),this.type="circle-pack",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-circlepack"})).attr("opacity",i=>i.data.dataGroupName===n.datum().name?1:Rn.circles.fillOpacity)},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})).attr("opacity",1)}}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(i<1||r<1)return;let s=this.model.getDisplayData();const a=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),c=this.getOptions(),l=w(c,"canvasZoom","enabled");a&&w(s,0,"children")&&(s=w(s,0,"children"));const u=Ji({children:s}).sum(p=>p.value).sort((p,g)=>g.value-p.value),d=Mb().size([i,r]).padding(p=>p.depth>=1?Rn.padding.children+3:Rn.padding.mainGroup+3)(u).descendants().splice(1).filter(p=>p.depth<=o),h=n.selectAll("circle.node").data(d);h.exit().attr("width",0).attr("height",0).remove();const f=h.enter().append("circle").classed("node",!0);f.merge(h).attr("class",p=>{const g=l&&o===3?this.getZoomClass(p):"";return this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:p.data.dataGroupName,originalClassName:p.children?`node ${g}`:`node node-leaf ${g}`})}).style("fill",p=>this.model.getFillColor(p.data.dataGroupName)).style("stroke",p=>this.model.getFillColor(p.data.dataGroupName)).attr("cx",p=>p.x).attr("cy",p=>p.y).transition("circlepack-leaf-update-enter").call(p=>this.services.transitions.setupTransition({transition:p,name:"circlepack-leaf-update-enter"})).attr("r",p=>p.r).attr("opacity",1).attr("fill-opacity",Rn.circles.fillOpacity),l===!0&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,f,vi),this.setBackgroundListeners()),a||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(t){const n=t.map(i=>i.data);this.parent.selectAll("circle.node").filter(i=>n.some(r=>r===i.data)&&i.depth>1).style("stroke",i=>this.model.getFillColor(i.data.dataGroupName))}highlightChildren(t){const n=t.map(i=>i.data);this.parent.selectAll("circle.node").filter(i=>n.some(r=>r===i.data)&&i.depth>1).style("stroke",Rn.circles.hover.stroke)}getZoomClass(t){return this.model.getHierarchyLevel()===3&&this.focal&&(t.data===this.focal.data||this.focal.children.some(n=>n.data===t.data))?"focal":"non-focal"}addLegendListeners(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){P(this.services.domUtils.getMainContainer()).on("click",()=>null)}setBackgroundListeners(){const t=P(this.services.domUtils.getMainContainer()),n=this,i=this.parent.selectAll("circle.node"),r=w(Fp,"canvasZoomSettings");t.on("click",()=>{n.focal=null,n.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),n.services.canvasZoom.zoomOut(i,r)})}getZoomIcon(){return`
79
+ `;l.html(u),d();function d(){l.attr("gradientTransform",`translate(${a-3*.2*s}, 0)`).transition().duration(2e3).delay(1e3).ease(w_).attr("gradientTransform",`translate(${o+3*.2*s}, 0)`).on("end",d)}}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class cR extends ht{constructor(){super(...arguments),this.type="boxplot",this.renderType=K.SVG}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),[c,l]=a.range(),[u,d]=o.range(),h=l-c,f=u-d;if(h===0)return;const{cartesianScales:p}=this.services,g=p.getOrientation(),m=g===Ft.VERTICAL,[v,x]=an(C=>this.services.cartesianScales.getDomainValue(C),C=>this.services.cartesianScales.getRangeValue(C),g),b=Math.floor((m?h:f)/s.length),O=Math.min(b/2,16),E=this.model.getBoxplotData(),T=n.selectAll(".box-group").data(E);T.exit().remove();const S=T.enter().append("g").attr("class","box-group"),A=T.merge(S);S.append("path").merge(T.select("path.vertical-line.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"vertical-line start"})).attr("stroke-width",de.strokeWidth.default).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-verticalstartline",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r]),_=B,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.quartiles.q_25);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.vertical-line.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"vertical-line end"})).attr("stroke-width",de.strokeWidth.default).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-verticalendline",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r]),_=B,$=p.getRangeValue(C.whiskers.max),y=p.getRangeValue(C.quartiles.q_75);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.box")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],originalClassName:"box"})).attr("fill-opacity",de.box.opacity.default).attr("stroke-width",de.strokeWidth.default).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","box").attr("aria-label",C=>C[r]).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-quartiles",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(Math[m?"max":"min"](C.quartiles.q_75,C.quartiles.q_25)),y=$+Math.abs(p.getRangeValue(C.quartiles.q_75)-p.getRangeValue(C.quartiles.q_25));return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.whiskers.max);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.whisker.start")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"whisker start"})).attr("stroke-width",de.strokeWidth.thicker).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-startingwhisker",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/4,_=B+O/2,$=p.getRangeValue(C.whiskers.min),y=p.getRangeValue(C.whiskers.min);return ee({x0:B,x1:_,y0:$,y1:y},g)}),S.append("path").merge(T.select("path.median")).attr("fill","none").attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"median"})).attr("stroke-width",2).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-median",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/2,_=B+O,$=p.getRangeValue(C.quartiles.q_50);return ee({x0:B,x1:_,y0:$,y1:$},g)}),S.append("path").merge(T.select("path.whisker.end")).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.STROKE],originalClassName:"whisker end"})).attr("stroke-width",de.strokeWidth.thicker).attr("fill","none").transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-endingwhisker",animate:t})).attr("d",C=>{const B=p.getDomainValue(C[r])-O/4,_=B+O/2,$=p.getRangeValue(C.whiskers.max),y=p.getRangeValue(C.whiskers.max);return ee({x0:B,x1:_,y0:$,y1:y},g)});const D=A.selectAll("circle.outlier").data(C=>C.outliers.map(B=>({min:C.whiskers.min,max:C.whiskers.max,[r]:C[r],value:B})));D.exit().remove();const L=D.enter().append("circle");D.merge(L).attr("r",de.circle.radius).attr("class",()=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],originalClassName:"outlier"})).attr("fill-opacity",de.circle.opacity.default).attr("cx",v).transition().call(C=>this.services.transitions.setupTransition({transition:C,name:"boxplot-update-circles",animate:t})).attr("cy",x),this.addBoxEventListeners(),this.addCircleEventListeners()}addBoxEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data;this.parent.selectAll("path.highlight-area").on("mouseover",function(r,s){const a=P(this);P(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",de.box.opacity.hovered),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:n.tooltip.groupLabel,value:s[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP]})},{label:"Minimum",value:s.whiskers.min},{label:"Q1",value:s.quartiles.q_25},{label:"Median",value:s.quartiles.q_50},{label:"Q3",value:s.quartiles.q_75},{label:"Maximum",value:s.whiskers.max},{label:"IQR",value:s.quartiles.q_75-s.quartiles.q_25}]}),t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEOVER,{event:r,element:a,datum:s})}).on("mousemove",function(r,s){const a=P(this);t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEMOVE,{event:r,element:a,datum:s}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){t.services.events.dispatchEvent(M.Boxplot.BOX_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);P(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",de.box.opacity.default),t.services.events.dispatchEvent(M.Boxplot.BOX_MOUSEOUT,{event:r,element:a,datum:s}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:a})})}addCircleEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",function(s,a){const o=P(this);o.classed("hovered",!0).attr("fill-opacity",de.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:n.tooltip.groupLabel,value:a[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP]})},{label:"Outlier",value:a[r]}]}),t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEOVER,{event:s,element:o,datum:a})}).on("mousemove",function(s,a){const o=P(this);t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEMOVE,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){t.services.events.dispatchEvent(M.Boxplot.OUTLIER_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);o.classed("hovered",!1).attr("fill-opacity",de.circle.opacity.default),t.services.events.dispatchEvent(M.Boxplot.OUTLIER_MOUSEOUT,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}}class $i extends ht{constructor(){super(...arguments),this.type="zero-line",this.renderType=K.SVG}render(t){const n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),i=this.services.cartesianScales.getScaleByPosition(n),[r,s]=i.domain(),a=r>0&&s<0||r<0&&s>0,o=this.getComponentContainer();if(!a){o.selectAll("line.domain").remove();return}const[c,l]=this.services.cartesianScales.getDomainScale().range();let u=+i(0)+.5;u||(u=i.range()[0]);const d=kp({x0:c,x1:l,y0:u,y1:u},this.services.cartesianScales.getOrientation());I.appendOrSelect(o,"line.domain").transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"zero-line-update",animate:t})).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}}class uR extends Ve{constructor(){super(...arguments),this.type="bubble",this.renderType=K.SVG}getRadiusScale(t){const n=this.getOptions(),{radiusMapsTo:i}=n.bubble,r=t.data(),s=r.map(l=>l[i]).filter(l=>l),a=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=s.length>0,c=o?xe(s):[1,1];return Oe().domain(c).range(o?n.bubble.radiusRange(a,r):[4,4])}styleCircles(t,n){const i=this.getOptions(),{radiusMapsTo:r}=i.bubble,s=this.getRadiusScale(t),{groupMapsTo:a}=i.data,{cartesianScales:o}=this.services,c=h=>o.getDomainValue(h),l=h=>o.getRangeValue(h),[u,d]=an(c,l,o.getOrientation());t.raise().classed("dot",!0).attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",h=>{const f=o.getRangeIdentifier(h);return h[f]}).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bubble-update-enter",animate:n})).attr("cx",u).attr("cy",d).attr("r",h=>s(h[r]||1)).attr("class",h=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:h[a],originalClassName:"dot"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[a],h[f],h)}).style("stroke",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getStrokeColor(h[a],h[f],h)}).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)}getTooltipAdditionalItems(t){const n=w(this.getOptions(),"bubble");return[{label:w(n,"radiusLabel"),value:t[w(n,"radiusMapsTo")]}]}}class hR extends ht{constructor(){super(...arguments),this.type="bullet",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-simple-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getRangeScale(),o=this.services.cartesianScales.getRangeIdentifier(),[c,l]=a.range(),[,u]=a.domain(),d=()=>{const g=[];s.forEach(v=>{v.ranges?v.ranges.forEach((x,b)=>{x!=null&&x<u&&g.push({datum:v,value:x,order:b+1})}):g.push({datum:v,order:1})});const m=I.appendOrSelect(r,"g.range-boxes").selectAll("path.range-box").data(g,v=>`${v[i]}-${v.order}`);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",v=>`range-box order-${v.order}`).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"bullet-range-box-update-enter",animate:t})).attr("d",v=>{let x,b,O,E;return v.order===1?(x=this.services.cartesianScales.getDomainValue(v.datum)-16/2,b=x+16,O=l-2,E=c+1):(x=this.services.cartesianScales.getDomainValue(v.datum)-16/2,b=x+16,O=this.services.cartesianScales.getRangeValue(v.value),E=l),ee({x0:x,x1:b,y0:O,y1:E},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},h=()=>{const g=I.appendOrSelect(r,"g.bars").selectAll("path.bar").data(s,m=>m[i]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("bar",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-bar-update-enter",animate:t})).attr("class",m=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:m[i],originalClassName:"bar"})).style("fill",m=>this.model.getFillColor(m[i])).attr("d",m=>{const v=this.services.cartesianScales.getDomainValue(m)-4,x=v+8,b=this.services.cartesianScales.getRangeValue(0)+1,O=this.services.cartesianScales.getRangeValue(m);return ee({x0:v,x1:x,y0:b,y1:O},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",m=>m.value)},f=()=>{const g=I.appendOrSelect(r,"g.markers").selectAll("path.marker").data(s.filter(m=>w(m,"marker")!==null),m=>m[i]);g.exit().attr("opacity",0).remove(),g.enter().append("path").attr("opacity",0).merge(g).classed("marker",!0).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"bullet-marker-update-enter",animate:t})).attr("d",m=>{const v=this.services.cartesianScales.getDomainValue(m)-12,x=v+24,b=this.services.cartesianScales.getRangeValue(m.marker);return ee({x0:v,x1:x,y0:b,y1:b},this.services.cartesianScales.getOrientation())}).attr("opacity",1)},p=()=>{let g=[];s.filter(v=>w(v,"marker")!==null).forEach(v=>{const x=v.marker,b=v[o];g=g.concat([{datum:v,value:x*.25,barValue:b},{datum:v,value:x*.5,barValue:b},{datum:v,value:x*.75,barValue:b}])});const m=I.appendOrSelect(r,"g.quartiles").selectAll("path.quartile").data(g,v=>v[i]);m.exit().attr("opacity",0).remove(),m.enter().append("path").attr("opacity",0).merge(m).attr("class",v=>`quartile ${v.value<=v.barValue?"over-bar":""}`).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"bullet-quartile-update-enter",animate:t})).attr("d",({datum:v,value:x})=>{let b=4;v.ranges&&v.ranges.indexOf(x)!==-1&&(b=8);const O=this.services.cartesianScales.getDomainValue(v)-b/2,E=O+b,T=this.services.cartesianScales.getRangeValue(x);return ee({x0:O,x1:E,y0:T,y1:T},this.services.cartesianScales.getOrientation())}).attr("opacity",1)};d(),h(),f(),p(),this.addEventListeners()}addEventListeners(){const t=this,n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",function(s,a){const o=P(this);o.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:s,element:o,datum:a});const c=w(n,"bullet","performanceAreaTitles"),l=t.model.getMatchingRangeIndexForDatapoint(a);t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:n.tooltip.groupLabel||"Group",value:a[i],class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:a[i]})},{label:"Value",value:a[r]},{label:"Target",value:a.marker},{label:"Percentage",value:`${Math.floor(a[r]/a.marker*100)}%`},{label:"Performance",value:c[l]}]})}).on("mousemove",function(s,a){t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:s,element:P(this),datum:a}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);o.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:s,element:o,datum:a}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}function dR(e){return e}function fR(e){if(e==null)return dR;var t,n,i=e.scale[0],r=e.scale[1],s=e.translate[0],a=e.translate[1];return function(o,c){c||(t=n=0);var l=2,u=o.length,d=new Array(u);for(d[0]=(t+=o[0])*i+s,d[1]=(n+=o[1])*r+a;l<u;)d[l]=o[l],++l;return d}}function pR(e,t){for(var n,i=e.length,r=i-t;r<--i;)n=e[r],e[r++]=e[i],e[i]=n}function mR(e,t){return typeof t=="string"&&(t=e.objects[t]),t.type==="GeometryCollection"?{type:"FeatureCollection",features:t.geometries.map(function(n){return Jm(e,n)})}:Jm(e,t)}function Jm(e,t){var n=t.id,i=t.bbox,r=t.properties==null?{}:t.properties,s=wc(e,t);return n==null&&i==null?{type:"Feature",properties:r,geometry:s}:i==null?{type:"Feature",id:n,properties:r,geometry:s}:{type:"Feature",id:n,bbox:i,properties:r,geometry:s}}function wc(e,t){var n=fR(e.transform),i=e.arcs;function r(u,d){d.length&&d.pop();for(var h=i[u<0?~u:u],f=0,p=h.length;f<p;++f)d.push(n(h[f],f));u<0&&pR(d,p)}function s(u){return n(u)}function a(u){for(var d=[],h=0,f=u.length;h<f;++h)r(u[h],d);return d.length<2&&d.push(d[0]),d}function o(u){for(var d=a(u);d.length<4;)d.push(d[0]);return d}function c(u){return u.map(o)}function l(u){var d=u.type,h;switch(d){case"GeometryCollection":return{type:d,geometries:u.geometries.map(l)};case"Point":h=s(u.coordinates);break;case"MultiPoint":h=u.coordinates.map(s);break;case"LineString":h=a(u.arcs);break;case"MultiLineString":h=u.arcs.map(a);break;case"Polygon":h=c(u.arcs);break;case"MultiPolygon":h=u.arcs.map(c);break;default:return null}return{type:d,coordinates:h}}return l(t)}function gR(e,t){var n={},i={},r={},s=[],a=-1;t.forEach(function(l,u){var d=e.arcs[l<0?~l:l],h;d.length<3&&!d[1][0]&&!d[1][1]&&(h=t[++a],t[a]=l,t[u]=h)}),t.forEach(function(l){var u=o(l),d=u[0],h=u[1],f,p;if(f=r[d])if(delete r[f.end],f.push(l),f.end=h,p=i[h]){delete i[p.start];var g=p===f?f:f.concat(p);i[g.start=f.start]=r[g.end=p.end]=g}else i[f.start]=r[f.end]=f;else if(f=i[h])if(delete i[f.start],f.unshift(l),f.start=d,p=r[d]){delete r[p.end];var m=p===f?f:p.concat(f);i[m.start=p.start]=r[m.end=f.end]=m}else i[f.start]=r[f.end]=f;else f=[l],i[f.start=d]=r[f.end=h]=f});function o(l){var u=e.arcs[l<0?~l:l],d=u[0],h;return e.transform?(h=[0,0],u.forEach(function(f){h[0]+=f[0],h[1]+=f[1]})):h=u[u.length-1],l<0?[h,d]:[d,h]}function c(l,u){for(var d in l){var h=l[d];delete u[h.start],delete h.start,delete h.end,h.forEach(function(f){n[f<0?~f:f]=1}),s.push(h)}}return c(r,i),c(i,r),t.forEach(function(l){n[l<0?~l:l]||s.push([l])}),s}function vR(e){for(var t=-1,n=e.length,i,r=e[n-1],s=0;++t<n;)i=r,r=e[t],s+=i[0]*r[1]-i[1]*r[0];return Math.abs(s)}function yR(e){return wc(e,_R.apply(this,arguments))}function _R(e,t){var n={},i=[],r=[];t.forEach(s);function s(c){switch(c.type){case"GeometryCollection":c.geometries.forEach(s);break;case"Polygon":a(c.arcs);break;case"MultiPolygon":c.arcs.forEach(a);break}}function a(c){c.forEach(function(l){l.forEach(function(u){(n[u=u<0?~u:u]||(n[u]=[])).push(c)})}),i.push(c)}function o(c){return vR(wc(e,{type:"Polygon",arcs:[c]}).coordinates[0])}return i.forEach(function(c){if(!c._){var l=[],u=[c];for(c._=1,r.push(l);c=u.pop();)l.push(c),c.forEach(function(d){d.forEach(function(h){n[h<0?~h:h].forEach(function(f){f._||(f._=1,u.push(f))})})})}}),i.forEach(function(c){delete c._}),{type:"MultiPolygon",arcs:r.map(function(c){var l=[],u;if(c.forEach(function(g){g.forEach(function(m){m.forEach(function(v){n[v<0?~v:v].length<2&&l.push(v)})})}),l=gR(e,l),(u=l.length)>1)for(var d=1,h=o(l[0]),f,p;d<u;++d)(f=o(l[d]))>h&&(p=l[0],l[0]=l[d],l[d]=p,h=f);return l}).filter(function(c){return c.length>0})}}class xR extends yn{constructor(){super(...arguments),this.type="ruler-binned",this.renderType=K.SVG}showRuler(t,[n,i]){const r=this.parent,s=this.model.getOptions(),{cartesianScales:a}=this.services,o=a.getOrientation(),c=a.getRangeScale(),[l,u]=c.range(),d=a.getDomainScale(),h=d.invert(o===Ft.VERTICAL?n:i),f=I.appendOrSelect(r,"g.ruler").attr("aria-label","ruler"),p=I.appendOrSelect(f,"line.ruler-line"),g=r.selectAll("[role=graphics-symbol]").filter(m=>{if(parseFloat(Ot(m,"data.x0"))<=h&&parseFloat(Ot(m,"data.x1"))>=h)return!0});if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Lm(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;const m=P(g.nodes()[0]).datum(),v=parseFloat(Ot(m,"data.x0")),x=parseFloat(Ot(m,"data.x1")),b=this.model.getActiveDataGroupNames(),O=b.reverse().map(E=>({label:E,value:Ot(m,`data.${E}`),class:this.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:E})})).filter(E=>E.value!==0);if(O.length>0){this.services.events.dispatchEvent(M.Tooltip.SHOW,{mousePosition:[n,i],hoveredElement:p,items:[{label:Ot(s,"bins.rangeLabel")||"Range",value:`${v} – ${x}`},...O,...w(s,"tooltip","showTotal")===!0?[{label:Ot(s,"tooltip.totalLabel")||"Total",value:b.reduce((T,S)=>T+parseFloat(Ot(m,`data.${S}`)),0)}]:[]]}),f.attr("opacity",1);const E=d((v+x)/2);o==="horizontal"?p.attr("x1",u).attr("x2",l).attr("y1",E).attr("y2",E):p.attr("y1",u).attr("y2",l).attr("x1",E).attr("x2",E)}else this.hideRuler()}else this.hideRuler()}}class Da extends yn{formatTooltipData(t){return t.reverse()}}class tg extends xc{constructor(t,n,i){super(t,n,i),this.type="color-legend",this.renderType=K.SVG,this.gradient_id=`gradient-id-${Math.floor(Math.random()*99999999999)}`,this.handleAxisCompleteEvent=()=>{const r=this.getComponentContainer(),{width:s}=I.getSVGElementSize(r,{useAttrs:!0}),a=w(this.getOptions(),"data","loading");if(s>kt.color.barWidth&&!a){const o=w(this.getOptions(),"heatmap","colorLegend","title"),{cartesianScales:c}=this.services,l=c.getMainXScale().range();if(l[0]>1&&(r.select("g.legend").attr("transform",`translate(${l[0]}, 0)`),o)){const{width:u}=I.getSVGElementSize(r.select("g.legend-title").select("text"),{useBBox:!0}),d=l[0]-u-9;d>1?r.select("g.legend-title").attr("transform",`translate(${d}, 0)`):(r.select("g.legend").attr("transform",`translate(${l[0]}, 16)`),r.select("g.legend-title").attr("transform",`translate(${l[0]}, 0)`))}}else r.select("g.legend-title").attr("transform","translate(0, 0)")},this.chartType=i.chartType}init(){this.chartType==="heatmap"&&this.services.events.addEventListener(M.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}render(t=!0){const n=this.getOptions(),i=this.getComponentContainer(),{width:r}=I.getSVGElementSize(i,{useAttrs:!0}),s=w(n,"color","gradient","colors"),a=w(n,this.chartType,"colorLegend","type");let o=w(n,"color","pairing","option");const c=w(n,"heatmap","colorLegend","title");if(w(this.getOptions(),"data","loading")){i.html("");return}const l=!$e(s),u=Xp(this.model.getDisplayData()),d=!(r<=kt.color.barWidth),h=d?kt.color.barWidth:r,f=I.appendOrSelect(i,"g.legend"),p=I.appendOrSelect(f,"g.legend-axis");if(c){const S=I.appendOrSelect(i,"g.legend-title");I.appendOrSelect(S,"text").text(c).attr("dy","0.7em"),f.attr("transform","translate(0, 16)")}const g=u[0]<0&&u[1]>0?"diverge":"mono";(o<1&&o>4&&g==="mono"||o<1&&o>2&&g==="diverge")&&(o=1);let m=[];const v=g==="diverge"?17:11;if(l)m=s;else for(let S=1;S<v+1;S++)m.push(a===Xs.LINEAR?`stop-color-${g}-${o}-${S}`:`fill-${g}-${o}-${S}`);const x=ue(u[0],u[1]),b=p1(x,3),O=Oe().domain(u).range([0,h]),E=Ba(O).tickSize(0).tickValues(b);let T;switch(a){case Xs.LINEAR:this.drawLinear(m,f,h);break;case Xs.QUANTIZE:T=this.drawQuantize(m,g,l,f,h),O.range([T,h]);break;default:throw Error("Entered color legend type is not supported.")}p.attr("transform",`translate(0,${kt.color.axisYTranslation})`).call(E),p.select(".domain").remove(),p.select("g.tick:last-of-type text").style("text-anchor",d?"middle":"end"),p.select("g.tick:first-of-type text").style("text-anchor",d&&this.chartType!=="choropleth"?"middle":"start")}drawLinear(t,n,i){const r=100/(t.length-1);I.appendOrSelect(n,"linearGradient").attr("id",`${this.gradient_id}-legend`).selectAll("stop").data(t).enter().append("stop").attr("offset",(s,a)=>`${a*r}%`).attr("class",(s,a)=>t[a]).attr("stop-color",s=>s),I.appendOrSelect(n,"rect").attr("width",i).attr("height",kt.color.barHeight).style("fill",`url(#${this.gradient_id}-legend)`)}drawQuantize(t,n,i,r,s){!i&&n==="diverge"&&t.splice(t.length/2,1);const a=nr().domain(t).range([0,s]);return I.appendOrSelect(r,"g.quantized-rect").selectAll("rect").data(a.domain()).join("rect").attr("x",o=>a(o)).attr("y",0).attr("width",Math.max(0,a.bandwidth()-1)).attr("height",kt.color.barHeight).attr("class",o=>o).attr("fill",o=>o),(!i&&n)==="mono"?a.bandwidth()-1:0}destroy(){this.chartType==="heatmap"&&this.services.events.removeEventListener(M.Axis.RENDER_COMPLETE,this.handleAxisCompleteEvent)}}class bR extends Nr{constructor(){super(...arguments),this.type="meter-title",this.renderType=K.SVG}render(t=!0){const n=w(this.model.getDisplayData(),0),i=this.getOptions(),r=this.getComponentContainer(),{groupMapsTo:s}=i.data;if(w(i,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{const c=r.selectAll("text.meter-title").data([n[s]]);c.enter().append("text").classed("meter-title",!0).merge(c).attr("x",0).attr("y","1em").text(l=>l),c.exit().remove(),this.appendPercentage()}this.displayStatus();const a=this.getMaxTitleWidth(),o=I.appendOrSelect(r,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)}displayBreakdownTitle(){const t=this.getComponentContainer(),n=this.getOptions(),i=this.model.getMaximumDomain(this.model.getDisplayData()),r=w(n,"meter","proportional","total"),s=w(n,"meter","proportional","unit")?w(n,"meter","proportional","unit"):"";let a;if(i===r)a=null;else{const u=r!==null?r-i:i,d=w(n,"meter","proportional","breakdownFormatter");a=d!==null?d({datasetsTotal:i,total:r}):`${i} ${s} used (${u} ${s} available)`}const o=t.selectAll("text.proportional-meter-title").data([a]);o.enter().append("text").classed("proportional-meter-title",!0).merge(o).attr("x",0).attr("y","1em").text(u=>u),o.exit().remove();const c=this.getMaxTitleWidth(),l=I.appendOrSelect(t,"text.proportional-meter-title");c>0&&l.node().getComputedTextLength()>c&&this.truncateTitle(l,c)}displayTotal(){const t=this.getComponentContainer(),n=this.getOptions(),i=w(n,"meter","proportional","total"),r=i?w(n,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),s=w(n,"meter","proportional","unit")?w(n,"meter","proportional","unit"):"",a=w(n,"meter","proportional","totalFormatter"),o=a!==null?a(r):`${i} ${s} total`,c=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),l=c.width?c.width:this.parent.node().getAttribute("width"),u=t.selectAll("text.proportional-meter-total").data([o]);u.enter().append("text").classed("proportional-meter-total",!0).merge(u).attr("x",this.model.getStatus()&&typeof l!="string"?l-Gt.total.paddingRight:l).attr("y","1em").attr("text-anchor","end").text(d=>d),u.exit().remove()}displayStatus(){const t=this,n=this.getComponentContainer(),i=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),r=i.width?i.width:0,s=this.model.getStatus(),a=Gt.status.indicatorSize/2,o=I.appendOrSelect(n,"g.status-indicator").attr("class",s!==null?`status-indicator status--${s}`:"").attr("transform",`translate(${r-a}, 0)`),c=s?[s]:[],l=o.selectAll("circle.status").data(c);l.enter().append("circle").merge(l).attr("class","status").attr("r",a).attr("cx",0).attr("cy",8);const u=o.selectAll("path.innerFill").data(c);u.enter().append("path").merge(u).attr("d",t.getStatusIconPathString(s)).attr("transform",`translate(-${a}, 0)`).attr("class","innerFill"),u.exit().remove(),l.exit().remove()}appendPercentage(){const t=w(this.model.getDisplayData(),0,"value"),n=this.getComponentContainer(),i=I.appendOrSelect(n,"text.meter-title"),r=w(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")===!0?[t]:[],s=n.selectAll("text.percent-value").data(r),a=Gt.statusBar.paddingRight;s.enter().append("text").classed("percent-value",!0).merge(s).text(o=>`${o}%`).attr("x",+i.attr("x")+i.node().getComputedTextLength()+a).attr("y",i.attr("y")),s.exit().remove()}truncateTitle(t,n){super.truncateTitle(t,n);const i=I.appendOrSelect(this.parent,"tspan"),r=Gt.statusBar.paddingRight,s=Math.ceil(i.node().getComputedTextLength());I.appendOrSelect(this.parent,"text.percent-value").attr("x",+t.attr("x")+t.node().getComputedTextLength()+s+r)}getMaxTitleWidth(){const t=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=w(this.getOptions(),"meter","proportional"),i=t.width?t.width:this.parent.node().getBoundingClientRect().width;if(n!==null){const r=I.appendOrSelect(this.parent,"text.proportional-meter-total").node(),s=I.getSVGElementSize(r,{useBBox:!0}).width;return i-s-Gt.total.paddingLeft}else{const r=I.appendOrSelect(this.parent,"text.percent-value"),s=Gt.statusBar.paddingRight,a=r.node().getComputedTextLength(),o=I.appendOrSelect(this.parent,"g.status-indicator").node(),c=I.getSVGElementSize(o,{useBBox:!0}).width+Gt.status.paddingLeft;return i-a-s-c}}getStatusIconPathString(t){switch(t){case Ws.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case Ws.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case Ws.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}}}class Ec extends ht{getBarWidth(){const t=this.getOptions();if(t.bars.width)return t.bars.width;const n=this.model.getDisplayData().length,i=this.services.cartesianScales.getMainXScale(),r=I.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!i.step){const s=w(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,r*s/n)}return Math.min(t.bars.maxWidth,i.step()/2)}isOutsideZoomedDomain(t,n){if(this.model.getDisplayData().length<=1)return!1;const i=this.model.get("zoomDomain");if(i!==void 0){const r=this.services.cartesianScales.getDomainScale();return t<r(i[0])||n>r(i[1])}return!1}}class wR extends ht{constructor(){super(...arguments),this.type="circle-pack",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("circle.node").transition("legend-hover-circlepack").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-circlepack"})).attr("opacity",i=>i.data.dataGroupName===n.datum().name?1:In.circles.fillOpacity)},this.handleLegendMouseOut=()=>{this.parent.selectAll("circle.node").transition("legend-mouseout-circlepack").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-circlepack"})).attr("opacity",1)}}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(i<1||r<1)return;let s=this.model.getDisplayData();const a=this.model.hasParentNode(),o=this.model.getHierarchyLevel(),c=this.getOptions(),l=w(c,"canvasZoom","enabled");a&&w(s,0,"children")&&(s=w(s,0,"children"));const u=Ji({children:s}).sum(p=>p.value).sort((p,g)=>g.value-p.value),d=$b().size([i,r]).padding(p=>p.depth>=1?In.padding.children+3:In.padding.mainGroup+3)(u).descendants().splice(1).filter(p=>p.depth<=o),h=n.selectAll("circle.node").data(d);h.exit().attr("width",0).attr("height",0).remove();const f=h.enter().append("circle").classed("node",!0);f.merge(h).attr("class",p=>{const g=l&&o===3?this.getZoomClass(p):"";return this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:p.data.dataGroupName,originalClassName:p.children?`node ${g}`:`node node-leaf ${g}`})}).style("fill",p=>this.model.getFillColor(p.data.dataGroupName)).style("stroke",p=>this.model.getFillColor(p.data.dataGroupName)).attr("cx",p=>p.x).attr("cy",p=>p.y).transition("circlepack-leaf-update-enter").call(p=>this.services.transitions.setupTransition({transition:p,name:"circlepack-leaf-update-enter"})).attr("r",p=>p.r).attr("opacity",1).attr("fill-opacity",In.circles.fillOpacity),l===!0&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,f,vi),this.setBackgroundListeners()),a||this.addLegendListeners(),this.addEventListeners()}unhighlightChildren(t){const n=t.map(i=>i.data);this.parent.selectAll("circle.node").filter(i=>n.some(r=>r===i.data)&&i.depth>1).style("stroke",i=>this.model.getFillColor(i.data.dataGroupName))}highlightChildren(t){const n=t.map(i=>i.data);this.parent.selectAll("circle.node").filter(i=>n.some(r=>r===i.data)&&i.depth>1).style("stroke",In.circles.hover.stroke)}getZoomClass(t){return this.model.getHierarchyLevel()===3&&this.focal&&(t.data===this.focal.data||this.focal.children.some(n=>n.data===t.data))?"focal":"non-focal"}addLegendListeners(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}removeBackgroundListeners(){P(this.services.domUtils.getMainContainer()).on("click",()=>null)}setBackgroundListeners(){const t=P(this.services.domUtils.getMainContainer()),n=this,i=this.parent.selectAll("circle.node"),r=w(Fp,"canvasZoomSettings");t.on("click",()=>{n.focal=null,n.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),n.services.canvasZoom.zoomOut(i,r)})}getZoomIcon(){return`
80
80
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
81
81
  <polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>
82
82
  <path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>
83
- </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!r.classed("focal"),o=w(t.model.getOptions(),"canvasZoom","enabled");let c=!1;if(!a){let l=[],u=[],d=null;if(i.children){i.depth>1&&o&&(c=!0,r.classed("clickable",!0)),l=i.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:Ot(f,"tooltip.totalLabel")||"Total",value:i.value,bold:!0}],t.highlightChildren(i.children)}else d=i.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{color:h,label:i.data.name,labelIcon:c&&o&&s<=2?t.getZoomIcon():null,value:d},...l,...u]})}t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:r,datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),i.children&&t.unhighlightChildren(i.children),t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})}).on("click",function(n,i){const r=P(this),s=r.classed("non-focal"),a=w(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");P(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,vi)}else if(i.depth===2&&i.children&&!s&&a){const o=t.parent.selectAll("circle.node");P(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=i,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(i,o,vi),n.stopPropagation()}t.services.events.dispatchEvent(M.CirclePack.CIRCLE_CLICK,{event:n,element:r,datum:i})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function wR(e,t){const n=Ni(this._current,e);return i=>(this._current=n(i),t(this._current))}class tg extends ht{constructor(){super(...arguments),this.type="pie",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r.data[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Et.innerRadius}render(t=!0){const n=this,i=this.getComponentContainer(),r=this.getOptions(),{groupMapsTo:s}=r.data,{valueMapsTo:a}=r.pie,o=this.model.getDisplayData().filter(S=>S[a]>0),c=this.computeRadius();this.arc=lr().innerRadius(this.getInnerRadius()).outerRadius(c),this.hoverArc=lr().innerRadius(this.getInnerRadius()).outerRadius(c+Et.hoverArc.outerRadiusOffset);const l=OE().value(S=>S[a]).sort(w(r,"pie","sortFunction")).padAngle(Et.padAngle)(o),u=I.appendOrSelect(i,"g.slices").attr("role",at.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,S=>S.data[s]);u.exit().attr("opacity",0).remove(),u.enter().append("path").classed("slice",!0).attr("opacity",0).merge(u).attr("class",S=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:S.data[s],originalClassName:"slice"})).style("fill",S=>n.model.getFillColor(S.data[s])).attr("d",this.arc).transition().call(S=>this.services.transitions.setupTransition({transition:S,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",S=>`${S[a]}, ${Dp(S.data[a],o,a)+"%"}`).attrTween("d",function(S){return wR.bind(this)(S,n.arc)});const d=r.pie.labels.enabled,h=d?l.filter(S=>S.data[a]>0):[],f=I.appendOrSelect(i,"g.labels").attr("role",at.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,S=>S.data[s]);f.exit().attr("opacity",0).remove();const p=f.enter().append("text").classed("pie-label",!0),g=[];p.merge(f).style("text-anchor","middle").text(S=>r.pie.labels.formatter?r.pie.labels.formatter(S):Dp(S.data[a],o,a)+"%").datum(function(S){const A=c+7,D=(S.endAngle-S.startAngle)/2+S.startAngle,L=D/Math.PI*180,C=this.getComputedTextLength();return S.textOffsetX=C/2,S.textOffsetY=L>90&&L<270?10:0,S.xPosition=(S.textOffsetX+A)*Math.sin(D),S.yPosition=(S.textOffsetY+A)*-Math.cos(D),S}).attr("transform",function(S,A){const D=h.length,L=(S.endAngle-S.startAngle)*(180/Math.PI);if(A>=D-2&&L<Et.callout.minSliceDegree){let C,B;return S.index===D-1?(C=S.xPosition+Et.callout.offsetX+Et.callout.textMargin+S.textOffsetX,B=S.yPosition-Et.callout.offsetY,S.direction=Ws.RIGHT,g.push(S)):(C=S.xPosition-Et.callout.offsetX-S.textOffsetX-Et.callout.textMargin,B=S.yPosition-Et.callout.offsetY,S.direction=Ws.LEFT,g.push(S)),`translate(${C}, ${B})`}return`translate(${S.xPosition}, ${S.yPosition})`}),this.renderCallouts(g);const m=w(r,"donut")?"donut":"pie",v=w(r,m,"alignment"),{width:x}=I.getSVGElementSize(this.getParent(),{useAttrs:!0}),b=d?Et.xOffset:0,O=d?Et.yOffset:0;let E=c+b;v===Nt.CENTER?E=x/2:v===Nt.RIGHT&&(E=x-c-Et.xOffset);let T=c+O;g.length>0&&(T+=Et.yOffsetCallout),i.attr("x",E+7).attr("y",T),this.addEventListeners()}renderCallouts(t){const n=I.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",at.GROUP).attr("data-name","callouts"),i=n.selectAll("g.callout").data(t);i.exit().remove();const r=i.enter().append("g").classed("callout",!0).attr("role",at.GROUP).attr("aria-roledescription","label callout");r.merge(i).datum(function(s){const{xPosition:a,yPosition:o,direction:c}=s;return c===Ws.RIGHT?(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a+Et.callout.offsetX,y:o-Et.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x-Et.callout.horizontalLineLength):(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a-Et.callout.offsetX,y:o-Et.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x+Et.callout.horizontalLineLength),s}),r.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return P(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.startPos.x).attr("y1",s=>s.startPos.y).attr("x2",s=>s.intersectPointX).attr("y2",s=>s.endPos.y),r.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return P(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.intersectPointX).attr("y1",s=>s.endPos.y).attr("x2",s=>s.endPos.x).attr("y2",s=>s.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEOVER,{event:n,element:P(this),datum:i});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{label:i.data[s],value:i.data[a]}]})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Pie.SLICE_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc),t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}computeRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0}),i=this.getOptions(),r=Math.min(t,n)/2;return i.pie.labels.enabled?r+Et.radiusOffset:r}}class ER extends tg{constructor(){super(...arguments),this.type="donut",this.renderType=K.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer().select("g.center").remove();return}const i=I.appendOrSelect(this.getComponentContainer(),"g.center"),r=this.getOptions(),s=this.computeRadius(),a=w(r,"donut","center","label");I.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>r.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(P(this))}),a!==null&&a!==""&&I.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>r.donut.center.titleFontSize(s)).attr("y",r.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let i=w(n,"donut","center","number");i===null&&(i=this.model.getDisplayData().reduce((o,c)=>o+c[n.pie.valueMapsTo],0));const r=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;r%1===0&&i%1===0?s=hu:s=ue;const a=s(r,i);return o=>{const{numberFormatter:c}=n.donut.center;t.text(c(a(o)))}}}const eg="4,10 8,6 12,10",ng="12,6 8,10 4,6";class SR extends ht{constructor(){super(...arguments),this.type="gauge",this.renderType=K.SVG}getValue(){var t;return((t=this.model.getData().find(n=>n.group==="value"))==null?void 0:t.value)??null}getValueRatio(){return $m(this.getValue(),0,100)/100}getDelta(){var t;return((t=this.model.getData().find(n=>n.group==="delta"))==null?void 0:t.value)??null}getArcRatio(){const t=this.getOptions();return w(t,"gauge","type")===fi.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(w(n,"gauge","deltaArrow","direction")){case fl.UP:return eg;case fl.DOWN:return ng;default:return t>0?eg:ng}}render(t=!0){const n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),r=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),c=s*a,l=o+c,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=lr().innerRadius(h).outerRadius(d).startAngle(l).endAngle(u),this.arc=lr().innerRadius(h).outerRadius(d).startAngle(o).endAngle(l),I.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([r]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>w(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",v=>v),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const p=w(i,"gauge","alignment"),{width:g}=I.getSVGElementSize(this.getParent(),{useAttrs:!0});let m=d;p===Nt.CENTER?m=g/2:p===Nt.RIGHT&&(m=g-d),n.attr("x",m).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),i=w(n,"gauge","type"),r=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=w(n,"gauge","valueFontSize"),c=w(n,"gauge","deltaFontSize"),l=w(n,"gauge","numberSpacing"),u=w(n,"gauge","showPercentageSymbol");let d=0;i===fi.FULL&&!s?d=c(a):i===fi.SEMI&&s&&(d=-(c(a)+l));const h=I.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=I.appendOrSelect(h,"g.gauge-value-number"),g=w(n,"gauge","numberFormatter"),m=p.selectAll("text.gauge-value-number").data([r]);m.enter().append("text").attr("class","gauge-value-number").merge(m).style("font-size",`${f}px`).attr("text-anchor","middle").text(S=>g(S));const{width:v}=I.getSVGElementSize(I.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,b=u?"%":"",O=I.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",v/2).text(b),{width:E,height:T}=I.getSVGElementSize(O,{useBBox:!0});O.attr("y",`-${T/2}px`),p.attr("transform",`translate(-${E/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),i=this.getOptions(),r=this.getDelta();if(r){const s=this.computeRadius(),a=r?w(i,"gauge","deltaFontSize"):()=>0,o=r?w(i,"gauge","numberFormatter"):()=>null,c=w(i,"gauge","deltaArrow","size"),l=w(i,"gauge","numberSpacing"),u=w(i,"gauge","showPercentageSymbol"),d=I.appendOrSelect(n,"g.gauge-numbers"),h=I.appendOrSelect(d,"g.gauge-delta").attr("transform",`translate(0, ${a(s)+l})`),f=I.appendOrSelect(h,"text.gauge-delta-number"),p=u?"%":"";f.data(r===null?[]:[r]),f.enter().append("text").classed("gauge-delta-number",!0).merge(f).attr("text-anchor","middle").style("font-size",`${a(s)}px`).text(x=>`${o(x)}${p}`);const{width:g}=I.getSVGElementSize(I.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),m=w(i,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(r!==null&&m?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-c(s)-g/2).attr("y",-c(s)/2-a(s)*.35).attr("width",c(s)).attr("height",c(s)).attr("viewBox","0 0 16 16").each(function(){const x=P(this);I.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const b=w(i,"gauge","status");I.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",b!==null?`gauge-delta-arrow status--${b}`:"").attr("points",t.getArrow(r))}),v.exit().remove(),f.exit().remove()}else{const s=n.select("g.gauge-delta");s.empty()||s.remove()}}getInnerRadius(){const t=this.computeRadius(),n=w(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,i){t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEOVER,{event:n,element:P(this),datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEMOVE,{event:n,element:r,datum:i})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Gauge.ARC_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEOUT,{event:n,element:r,datum:i})})}computeRadius(){const t=this.getOptions(),n=w(t,"gauge","type"),{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});return n===fi.SEMI?Math.min(i/2,r):Math.min(i/2,r/2)}}class ig extends Ec{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=K.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),i=this.getOptions(),{groupMapsTo:r}=i.data;this.setGroupScale();const s=this.getComponentContainer({withinChartClip:!0}),a=Cr(n.map(u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return u[d]&&typeof u[d].toString=="function"?u[d].toString():u[d]})),o=s.selectAll("g.bars").data(a,u=>u);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",at.GROUP).attr("data-name","bars").merge(o);c.transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-group-update-enter",animate:t})).attr("transform",u=>{const d=this.services.cartesianScales.getDomainValue(u)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Ft.VERTICAL?`translate(${d}, 0)`:`translate(0, ${d})`});const l=c.selectAll("path.bar").data(u=>this.getDataCorrespondingToLabel(u),u=>u[r]);l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:u[r],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[r])).attr("d",u=>{const d=this.groupScale(u[r]),h=this.getBarWidth(),f=d,p=d+h,g=this.services.cartesianScales.getRangeAxisPosition({datum:u}),m=this.services.cartesianScales.getValueThroughAxisPosition(g,0),v=this.services.cartesianScales.getRangeValue(u),x=this.services.cartesianScales.getDomainValue(u)-h/2,b=x+h;if(!this.isOutsideZoomedDomain(x,b))return ee({x0:f,x1:p,y0:m,y1:v},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>u.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,data:[i]})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(n=>{const i=this.services.cartesianScales.getDomainIdentifier(n);return n[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let i=this.defaultStepFactor;if(typeof t.step=="function")i=t.step();else if(n.length>0){const r=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(r){const s=this.services.cartesianScales.getDomainIdentifier(r.data[0]);i=Math.abs(t(r.data[1][s])-t(r.data[0][s]))}}return i}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=w(t,"bars","width"),i=w(t,"bars","maxWidth");if(n!==null&&(i===null||n<=i))return n;const r=this.model.getGroupedData(this.configs.groups).length,s=this.getTotalGroupPadding();return Math.min(i,(this.getDomainScaleStep()-s)/r)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=nr().domain(t).rangeRound([0,this.getGroupWidth()])}}class OR extends ht{constructor(){super(...arguments),this.type="heatmap",this.renderType=K.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:i}=n,r=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),c=this.services.cartesianScales.getMainXScale(),l=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[i]!==void 0?(u=a,r.forEach(p=>{if(typeof this.matrix[i][p].value=="number"){const g=this.matrix[i][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][i].value=="number"){const g=this.matrix[p][i].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),c(i)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${c(i)}, ${cn(l.range())})`):l(i)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${cn(c.range())},${l(i)})`),this.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n.event,hoveredElement:P(t.detail.element),items:[{label:u,value:i,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(M.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(M.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(M.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(M.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(M.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.lower();const{cartesianScales:i}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),w(this.getOptions(),"data","loading"))return;const r=i.getMainXScale(),s=i.getMainYScale(),a=i.getDomainIdentifier(),o=i.getRangeIdentifier(),c=this.model.getUniqueDomain(),l=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=r.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/c.length),this.yBandwidth=Math.abs((h[1]-h[0])/l.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${r(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value))).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,i){const r=I.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);I.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",n+1),I.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",i+1),I.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",i).attr("y2",i),I.appendOrSelect(r,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",i+1)}determineDividerStatus(){const t=w(this.getOptions(),"heatmap","divider","state");return t!==pr.OFF&&(t===pr.AUTO&&yl.minCellDividerDimension<=this.xBandwidth&&yl.minCellDividerDimension<=this.yBandwidth||t===pr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,i=this.getOptions(),r=Ot(i,"tooltip.totalLabel"),s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),c=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(l,u){const d=P(this),h=d.select("rect.heat");if(!h.classed("null-state")){const f=Mr(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${f.x+t.translationUnits.x}, ${f.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEOVER,{event:l,element:h,datum:u}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,items:[{label:o,value:u[s]},{label:c,value:u[a]},{label:r||"Total",value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(l,u){t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEMOVE,{event:l,element:P(this),datum:u}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l,u){t.services.events.dispatchEvent(M.Heatmap.HEATMAP_CLICK,{event:l,element:P(this),datum:u})}).on("mouseout",function(l,u){const d=P(this).select("rect.heat"),h=d.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),h||(t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEOUT,{event:l,element:d,datum:u}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{event:l,hoveredElement:d}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class TR extends ht{constructor(){super(...arguments),this.type="histogram",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer(),i=this.model.getOptions(),{groupIdentifier:r}=i,{groupMapsTo:s}=i.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),c=n.selectAll("g.bars").data(a,u=>Ot(u,`0.${s}`));c.exit().attr("opacity",0).remove(),c.enter().append("g").classed("bars",!0).attr("role",at.GROUP);const l=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).attr(r,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s])).attr("d",u=>{const d=Ot(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>i.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Ft.VERTICAL?m+=1:m-=1),ee({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>w(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,i=this;this.parent.selectAll("path.bar").on("mouseover",function(r,s){const a=P(this);a.classed("hovered",!0);const o=parseFloat(Ot(s,"data.x0")),c=parseFloat(Ot(s,"data.x1")),l=i.services.cartesianScales.getRangeAxisPosition(),u=i.services.cartesianScales.getScaleLabel(l);i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:Ot(t,"bins.rangeLabel")||"Range",value:`${o} – ${c}`},{label:t.tooltip.groupLabel||"Group",value:s[n],class:i.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:s[n]})},{label:u,value:Ot(s,`data.${s[n]}`)}]})}).on("mousemove",function(r){i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("mouseout",function(){P(this).classed("hovered",!1),i.services.events.dispatchEvent(M.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class CR extends He{constructor(){super(...arguments),this.type="lollipop",this.renderType=K.SVG,this.handleScatterOnHover=t=>{const n=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[r]!==n.datum[r]?Ue.weight.unselected:Ue.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",Ue.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[r]!==n.datum().name?Ue.opacity.unselected:Ue.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",Ue.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.model.getOptions(),{groupMapsTo:r}=i.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),c=s.getDomainIdentifier(),l=m=>s.getDomainValue(m),u=m=>s.getRangeValue(m),d=s.getOrientation(),[h,f]=an(l,u,d),p=n.selectAll("line.line").data(this.getScatterData(),m=>`${m[r]}-${m[c]}`);p.exit().attr("opacity",0).remove();const g=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",m=>this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:m[r],originalClassName:"line"})).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"lollipop-line-update-enter",animate:t})).style("stroke",m=>this.model.getFillColor(m[r],m[c],m)).attr("opacity",1);d===Ft.HORIZONTAL?g.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",m=>h(m)-i.points.radius):g.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",m=>f(m)+i.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(M.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(M.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(M.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(M.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class MR extends ht{constructor(){super(...arguments),this.type="meter",this.renderType=K.SVG}getStackedBounds(t,n){let i=0;return t.map((r,s)=>s!==0?(i+=n(r.value),{...r,width:Math.abs(n(r.value)-Gt.dividerWidth),x:i-n(r.value)}):(i=n(r.value),{...r,width:Math.abs(n(r.value)-Gt.dividerWidth),x:0}))}render(t=!0){const n=this,i=this.getComponentContainer(),r=this.getOptions(),s=w(r,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:c}=I.getSVGElementSize(i,{useAttrs:!0}),{groupMapsTo:l}=r.data;let u;w(r,"meter","proportional")===null?u=100:u=w(r,"meter","proportional","total")||this.model.getMaximumDomain(this.model.getDisplayData());const d=Oe().domain([0,u]).range([0,c]),h=this.getStackedBounds(a,d),f=w(r,"meter","height");I.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",f||(s?Gt.height.proportional:Gt.height.default)),I.appendOrSelect(i,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",f||(s?Gt.height.proportional:Gt.height.default));const p=i.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",b=>b.x).attr("y",0).attr("height",()=>w(r,"meter","height")||(s?Gt.height.proportional:Gt.height.default)).attr("class",b=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:b[l],originalClassName:g})).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"meter-bar-update",animate:t})).attr("width",b=>b.value>u?d(u):b.width).style("fill",b=>n.model.getFillColor(b[l])).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",b=>b.value),p.exit().remove();const m=w(r,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const x=i.selectAll("line.peak").data(v==null?[]:[v]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",()=>w(r,"meter","height")||(s?Gt.height.proportional:Gt.height.default)).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"peak-line-update",animate:t})).attr("x1",b=>d(b)).attr("x2",b=>d(b)).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",b=>b),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this,r=w(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),r&&(o.classed("hovered",!0),i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),r&&i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){i.services.events.dispatchEvent(M.Meter.METER_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),r&&(o.classed("hovered",!1),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}class $R extends ht{constructor(){super(...arguments),this.type="radar",this.renderType=K.SVG,this.getLabelDimensions=t=>{const n=I.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),i=I.appendOrSelect(n,"text").text(t),{width:r,height:s}=I.getSVGElementSize(i.node(),{useBBox:!0});return n.remove(),{width:r,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:i,value:r}=w(n,"radar","axes"),s=w(n,"data","groupMapsTo"),a=UD(this.uniqueKeys.map(o=>this.uniqueGroups.map(c=>({[i]:o,[s]:c,[r]:null}))));return nt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:i,value:r}=w(n,"radar","axes"),s=w(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const c=this.uniqueKeys.map(l=>({[s]:a,[i]:l,[r]:null}));return{name:a,data:nt(c,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-blob"})).style("fill-opacity",i=>i.name!==n.datum().name?pn.opacity.unselected:pn.opacity.selected).style("stroke-opacity",i=>i.name!==n.datum().name?pn.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",pn.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer(),{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),c=w(o,"data","groupMapsTo"),l=w(o,"radar","axes","value"),{angle:u,value:d}=w(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=pn;this.uniqueKeys=Array.from(new Set(s.map(_=>_[u]))),this.uniqueGroups=Array.from(new Set(s.map(_=>_[c]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const v=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),x=(Math.min(i,r)-v)/2;if(x<=0)return;const b=nr().domain(this.fullDataNormalized.map(_=>_[u])).range([0,2*Math.PI].map(_=>_-Math.PI/2)),O=cn(this.fullDataNormalized.map(_=>_[d])),E=Oe().domain([O>=0?0:O,xn(this.fullDataNormalized.map(_=>_[d]))]).range([g,x]).nice(p),T=E.ticks(p),S=_=>this.model.getFillColor(_),A=ME().angle(_=>b(_[u])+Math.PI/2).radius(_=>E(_[d])).curve($d),D=this.uniqueKeys.map(_=>{const $=this.getLabelDimensions(_).width,y=rL(b(_),x);return $+y}),L={x:xn(D)+h,y:r/2},C=I.appendOrSelect(n,"g.y-axes").attr("role",at.GROUP).selectAll("path").data(T,_=>_),B=_=>this.uniqueKeys.map($=>({[u]:$,[d]:_}));C.join(_=>_.append("path").attr("opacity",0).attr("transform",`translate(${L.x}, ${L.y})`).attr("fill","none").call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",y=>A(B(y)))),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${L.x}, ${L.y})`).attr("d",y=>A(B(y)))),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_exit",animate:t})).attr("d",y=>A(B(y))).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-axes").attr("role",at.GROUP).selectAll("line").data(this.uniqueKeys,_=>_).join(_=>_.append("line").attr("opacity",0).attr("class",$=>`x-axis-${Oi($)}`).attr("stroke-dasharray","0").attr("x1",$=>It(b($),0,L).x).attr("y1",$=>It(b($),0,L).y).attr("x2",$=>It(b($),0,L).x).attr("y2",$=>It(b($),0,L).y).call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",y=>It(b(y),E.range()[0],L).x).attr("y1",y=>It(b(y),E.range()[0],L).y).attr("x2",y=>It(b(y),E.range()[1],L).x).attr("y2",y=>It(b(y),E.range()[1],L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",y=>It(b(y),E.range()[0],L).x).attr("y1",y=>It(b(y),E.range()[0],L).y).attr("x2",y=>It(b(y),E.range()[1],L).x).attr("y2",y=>It(b(y),E.range()[1],L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-labels").attr("role",at.GROUP).selectAll("text").data(this.uniqueKeys).join(_=>_.append("text").text($=>$).attr("opacity",0).attr("x",$=>It(b($),E.range()[1]+h,L).x).attr("y",$=>It(b($),E.range()[1]+h,L).y).style("text-anchor",$=>Kp(b($)).textAnchor).style("dominant-baseline",$=>Kp(b($)).dominantBaseline).call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",y=>It(b(y),E.range()[1]+h,L).x).attr("y",y=>It(b(y),E.range()[1]+h,L).y).end().finally(()=>{const y=w(o,"radar","alignment"),k=this.getAlignmentXOffset(y,n,this.getParent());n.attr("x",k)})),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.blobs").attr("role",at.GROUP).selectAll("path").data(this.groupedDataNormalized,_=>_.name).join(_=>_.append("path").attr("class",$=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:$.name,originalClassName:"blob"})).attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",$=>$.name).attr("opacity",0).attr("transform",t?()=>`translate(${L.x}, ${L.y}) scale(${1+Math.random()*.35})`:`translate(${L.x}, ${L.y})`).style("fill",$=>S($.name)).style("fill-opacity",pn.opacity.selected).style("stroke",$=>S($.name)).call($=>{const y=$.transition().call(k=>this.services.transitions.setupTransition({transition:k,name:"radar_blobs_enter",animate:t}));t&&y.delay(()=>Math.random()*30).attr("transform",`translate(${L.x}, ${L.y})`),y.attr("opacity",1).attr("d",k=>A(k.data))}),_=>(_.attr("class",$=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:$.name,originalClassName:"blob"})).style("fill",$=>S($.name)).style("stroke",$=>S($.name)),_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${L.x}, ${L.y})`).attr("d",y=>A(y.data))),_),_=>_.call($=>{const y=$.transition().call(k=>this.services.transitions.setupTransition({transition:k,name:"radar_blobs_exit",animate:t}));t&&y.delay(()=>Math.random()*30).attr("transform",()=>`translate(${L.x}, ${L.y}) scale(${1+Math.random()*.35})`),y.attr("opacity",0).remove()})),I.appendOrSelect(n,"g.dots").attr("role",at.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(_=>w(_,d)!==null)).join(_=>_.append("circle").attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",$=>$[l]),_=>_,_=>_.remove()).attr("class",_=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:_[c],originalClassName:Oi(_[u])})).attr("cx",_=>It(b(_[u]),E(_[d]),L).x).attr("cy",_=>It(b(_[u]),E(_[d]),L).y).attr("r",0).attr("opacity",0).style("fill",_=>S(_[c])),I.appendOrSelect(n,"g.x-axes-rect").attr("role",at.GROUP).selectAll("rect").data(this.uniqueKeys).join(_=>_.append("rect"),_=>_,_=>_.remove()).attr("x",L.x).attr("y",L.y-m/2).attr("width",E.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",_=>`rotate(${Qp(b(_))}, ${L.x}, ${L.y})`),I.appendOrSelect(n,"g.y-labels").attr("role",at.GROUP).selectAll("text").data(xe(T)).join(_=>_.append("text").attr("opacity",0).text($=>$).attr("x",$=>It(-Math.PI/2,E($),L).x+f).attr("y",$=>It(-Math.PI/2,E($),L).y).style("text-anchor","start").style("dominant-baseline","middle").call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_update",animate:t})).text(y=>y).attr("opacity",1).attr("x",y=>It(-Math.PI/2,E(y),L).x+f).attr("y",y=>It(-Math.PI/2,E(y),L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,i){const r=I.getSVGElementSize(n,{useBBox:!0}),{width:s}=I.getSVGElementSize(i,{useAttrs:!0});let a=0;return t===Nt.CENTER?a=Math.floor((s-r.width)/2):t===Nt.RIGHT&&(a=s-r.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=w(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(i,r){const s=P(this);t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEOVER,{event:i,element:s,datum:r});const a=t.parent.select(`.x-axes .x-axis-${Oi(r)}`),o=t.parent.selectAll(`.dots circle.${Oi(r)}`),c=t.model.getActiveDataGroupNames(),l=t.getOptions(),{groupMapsTo:u}=l.data,d=w(l,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>c.indexOf(f[u])!==-1?1:0).attr("r",pn.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===r&&c.indexOf(f[u])!==-1);t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:i,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u]),class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(i,r){const s=P(this);t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEMOVE,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(M.Radar.X_AXIS_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){const s=P(this),a=t.parent.select(`.x-axes .x-axis-${Oi(r)}`),o=t.parent.selectAll(`.dots circle.${Oi(r)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEOUT,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.HIDE)})}}class rg extends Ec{constructor(){super(...arguments),this.type="simple-bar",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-simple-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=r.selectAll("path.bar").data(s,c=>c[i]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i])).attr("d",c=>{const l=this.services.cartesianScales.getRangeIdentifier(),u=this.getBarWidth(),d=c[l],h=this.services.cartesianScales.getDomainValue(c)-u/2,f=h+u;let p,g;if(Array.isArray(d)&&d.length===2)p=this.services.cartesianScales.getRangeValue(d[0]),g=this.services.cartesianScales.getRangeValue(d[1]);else{const v=this.services.cartesianScales.getRangeScale().domain()[0];p=this.services.cartesianScales.getRangeValue(Math.max(0,v)),g=this.services.cartesianScales.getRangeValue(c)}const m=Math.abs(g-p);if(m!==0&&m<2&&(d>0&&a===Ft.VERTICAL||d<0&&a===Ft.HORIZONTAL?g=p-2:g=p+2),!this.isOutsideZoomedDomain(h,f))return ee({x0:h,x1:f,y0:p,y1:g},a)}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,data:[i]})}).on("mousemove",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:n,element:P(this),datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class AR extends ne{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=w(this.getOptions(),"data","loading"),i=!w(this.getOptions(),"grid","x","enabled")&&!w(this.getOptions(),"grid","y","enabled")&&!w(this.getOptions(),"axes","bottom","visible")&&!w(this.getOptions(),"axes","left","visible");n&&!i?super.renderGridSkeleton(n):n&&i?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),i=[100],r=I.appendOrSelect(this.backdrop,"g.y.skeleton"),s=r.selectAll("line").data(i);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),r.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-skeleton.DAII"),I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class sg extends ht{constructor(){super(...arguments),this.type="area-stacked",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>w(s,0,r)!==n.datum().name?Ne.opacity.unselected:Ne.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Ne.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),i=this,r=this.getOptions(),{groupMapsTo:s}=r.data,a=Object.keys(r.axes).some(f=>r.axes[f].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),c=w(o,0,0),l=this.services.cartesianScales.getDomainAxisPosition({datum:c}),u=this.services.cartesianScales.getRangeAxisPosition({datum:c}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,f=>w(f,0,s));this.areaGenerator=sl().x(f=>this.services.cartesianScales.getValueThroughAxisPosition(l,f.data.sharedStackKey)).y0(f=>d(f[0])).y1(f=>d(f[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,f=>w(f,0,s)).attr("class","area").attr("class",f=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:w(f,0,s),originalClassName:"area"})).style("fill",f=>i.model.getFillColor(w(f,0,s))).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",f=>w(f,0,s)).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"area-update-enter",animate:t})).attr("opacity",Ne.opacity.selected).attr("d",this.areaGenerator)}}class ag extends Ec{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,l=>w(l,0,r));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",at.GROUP).attr("data-name","bars");const c=n.selectAll("g.bars").selectAll("path.bar").data(l=>l,l=>l.data.sharedStackKey);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).transition().call(l=>this.services.transitions.setupTransition({transition:l,name:"bar-update-enter",animate:t})).attr("class",l=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:l[r],originalClassName:"bar"})).style("fill",l=>this.model.getFillColor(l[r])).attr("d",l=>{const u=l.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(l[0]);let g=this.services.cartesianScales.getRangeValue(l[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>i.bars.dividerSize){const m=l[0]<0&&l[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Ft.VERTICAL?g+=l[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Ft.VERTICAL?g+=1:g-=1)}return ee({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",l=>l[1]-l[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this;this.parent.selectAll("path.bar").on("mouseover",function(r,s){const a=P(this);a.classed("hovered",!0),i.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:r,element:a,datum:s});let o=i.model.getDisplayData(i.configs.groups).find(c=>{const l=i.services.cartesianScales.getDomainIdentifier(c),u=i.services.cartesianScales.getRangeIdentifier(c);return c[u]===s.data[s[n]]&&c[l].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(o===void 0){const c=i.services.cartesianScales.getDomainIdentifier(),l=i.services.cartesianScales.getRangeIdentifier();o={[c]:s.data.sharedStackKey,[l]:s.data[s[n]],[n]:s[n]}}i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,data:[o]})}).on("mousemove",function(r,s){const a=P(this);i.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:r,element:a,datum:s}),i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){i.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);a.classed("hovered",!1),i.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:r,element:a,datum:s}),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(w(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),i=I.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,s=w(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,i*s/r)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class og extends He{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=K.SVG}render(t){if(!w(this.getOptions(),"points","enabled"))return;const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=Object.keys(i.axes).some(u=>i.axes[u].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=n.selectAll("g.dots").data(a,u=>w(u,0,r));o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("dots",!0).attr("role",at.GROUP).merge(o).selectAll("circle.dot").data(u=>u);c.exit().attr("opacity",0).remove();const l=c.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(c).datum(u=>{const d=u[r],h=this.services.cartesianScales.getDomainIdentifier(u),f=this.services.cartesianScales.getRangeIdentifier(u);return{[r]:d,[h]:u.data.sharedStackKey,[f]:u[1]}});this.styleCircles(l,t),this.addEventListeners()}getTooltipData(t,n){const i=this.getOptions(),{groupMapsTo:r}=i.data,s=Object.keys(i.axes).some(c=>i.axes[c].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((c,l)=>{c.forEach((u,d)=>{const h=u[r],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[l][d].data[h]),p!==null&&o.push({[r]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(c=>{const l=this.services.cartesianScales.getDomainIdentifier(c),u=this.services.cartesianScales.getRangeIdentifier(c);return o.find(d=>d[r]==c[r]&&d[l]==c[l]&&d[u]==c[u])!==void 0})}}const Ai=6;class LR extends ht{constructor(){super(...arguments),this.type="tree",this.renderType=K.SVG}getLongestLabel(t){let n="";return t.forEach(i=>{const r=i.children?this.getLongestLabel(i.children):"";(r.length>n.length||i.name.length>n.length)&&(n=r.length>i.name.length?r:i.name)}),n}getMockLabelWidth(t,n){const i=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:r}=I.getSVGElementSize(i.node(),{useBBox:!0});return i.remove(),r}render(t=!0){const n=this.getComponentContainer();n.html("");const{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(i<1||r<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=w(s,"tree","rootTitle")||"Tree",c=this.getMockLabelWidth(n,o),l=this.getLongestLabel(a),u=this.getMockLabelWidth(n,l),d={top:0,right:0,bottom:0,left:c>0?c+Ai:30-Ai},h=Ji({name:o,children:a}),f=10,p=i/6,g=T=>{const S=h.descendants().reverse(),A=h.links();let D=h,L=h;h.eachBefore(U=>{U.x<D.x&&(D=U),U.x>L.x&&(L=U)});const C=L.x-D.x,B=n.transition().call(U=>this.services.transitions.setupTransition({transition:U,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,D.x,i,C].join(" ")),_=E.selectAll("g").data(S,U=>U.id),$=this,y=_.enter().append("g").attr("transform",()=>`translate(${T.y0},${T.x0})`).attr("class",U=>U.depth!==0&&U.children&&U.children.length>0?"clickable":null).on("mouseover",function(U,N){$.services.events.dispatchEvent(M.Tree.NODE_MOUSEOVER,{event:U,element:P(this),datum:N})}).on("click",function(U,N){N.depth!==0&&(N.children=N.children?null:N._children,g(N)),$.services.events.dispatchEvent(M.Tree.NODE_CLICK,{event:U,element:P(this),datum:N})}).on("mouseout",function(U,N){$.services.events.dispatchEvent(M.Tree.NODE_MOUSEOUT,{event:U,element:P(this),datum:N})});y.append("circle").attr("r",2.5).attr("class",U=>U._children?"parent":"child").attr("stroke-width",10),y.append("text").attr("dy","0.31em").attr("x",U=>U._children?-Ai:Ai).attr("text-anchor",U=>U._children?"end":"start").text(U=>U.data.name).clone(!0).attr("class","text-stroke").lower(),_.merge(y).transition(B).attr("transform",U=>`translate(${U.y},${U.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),_.exit().transition(B).remove().attr("transform",()=>`translate(${T.y},${T.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const k=O.selectAll("path").data(A,U=>U.target.id),R=k.enter().append("path").attr("d",()=>{const U={x:T.x0,y:T.y0};return b({source:U,target:U})});k.merge(R).transition(B).attr("d",b),k.exit().transition(B).remove().attr("d",()=>{const U={x:T.x,y:T.y};return b({source:U,target:U})}),h.eachBefore(U=>{U.x0=U.x,U.y0=U.y})},m=h.descendants(),v=m[m.length-1].depth,x=w(s,"tree","type")===dl.DENDROGRAM?Xx().size([r,i-u-v*Ai-c]):Pb().nodeSize([f,p]).size([r,i-u-v*Ai-c]),b=RE().x(T=>T.y).y(T=>T.x);h.x0=p/2,h.y0=0,h.descendants().forEach((T,S)=>{T.id=S,T._children=T.children}),x(h),n.attr("viewBox",[-d.left,-d.top,i,f]).style("user-select","none");const O=n.append("g").attr("class","links"),E=n.append("g").attr("class","nodes");g(h)}}var DR="#000000",kR="#ffffff",RR="#fcf4d6",IR="#fddc69",PR="#f1c21b",NR="#d2a106",UR="#b28600",BR="#8e6a00",VR="#684e00",HR="#483700",FR="#302400",GR="#1c1500",zR={10:RR,20:IR,30:PR,40:NR,50:UR,60:BR,70:VR,80:HR,90:FR,100:GR},jR="#fff2e8",WR="#ffd9be",qR="#ffb784",YR="#ff832b",XR="#eb6200",ZR="#ba4e00",KR="#8a3800",QR="#5e2900",JR="#3e1a00",tI="#231000",eI={10:jR,20:WR,30:qR,40:YR,50:XR,60:ZR,70:KR,80:QR,90:JR,100:tI},nI="#fff1f1",iI="#ffd7d9",rI="#ffb3b8",sI="#ff8389",aI="#fa4d56",oI="#da1e28",lI="#a2191f",cI="#750e13",uI="#520408",hI="#2d0709",dI={10:nI,20:iI,30:rI,40:sI,50:aI,60:oI,70:lI,80:cI,90:uI,100:hI},fI="#fff0f7",pI="#ffd6e8",mI="#ffafd2",gI="#ff7eb6",vI="#ee5396",yI="#d02670",_I="#9f1853",xI="#740937",bI="#510224",wI="#2a0a18",EI={10:fI,20:pI,30:mI,40:gI,50:vI,60:yI,70:_I,80:xI,90:bI,100:wI},SI="#f6f2ff",OI="#e8daff",TI="#d4bbff",CI="#be95ff",MI="#a56eff",$I="#8a3ffc",AI="#6929c4",LI="#491d8b",DI="#31135e",kI="#1c0f30",RI={10:SI,20:OI,30:TI,40:CI,50:MI,60:$I,70:AI,80:LI,90:DI,100:kI},II="#edf5ff",PI="#d0e2ff",NI="#a6c8ff",UI="#78a9ff",BI="#4589ff",VI="#0f62fe",HI="#0043ce",FI="#002d9c",GI="#001d6c",zI="#001141",jI={10:II,20:PI,30:NI,40:UI,50:BI,60:VI,70:HI,80:FI,90:GI,100:zI},WI="#e5f6ff",qI="#bae6ff",YI="#82cfff",XI="#33b1ff",ZI="#1192e8",KI="#0072c3",QI="#00539a",JI="#003a6d",tP="#012749",eP="#061727",nP={10:WI,20:qI,30:YI,40:XI,50:ZI,60:KI,70:QI,80:JI,90:tP,100:eP},iP="#d9fbfb",rP="#9ef0f0",sP="#3ddbd9",aP="#08bdba",oP="#009d9a",lP="#007d79",cP="#005d5d",uP="#004144",hP="#022b30",dP="#081a1c",fP={10:iP,20:rP,30:sP,40:aP,50:oP,60:lP,70:cP,80:uP,90:hP,100:dP},pP="#defbe6",mP="#a7f0ba",gP="#6fdc8c",vP="#42be65",yP="#24a148",_P="#198038",xP="#0e6027",bP="#044317",wP="#022d0d",EP="#071908",SP={10:pP,20:mP,30:gP,40:vP,50:yP,60:_P,70:xP,80:bP,90:wP,100:EP},OP="#f2f4f8",TP="#dde1e6",CP="#c1c7cd",MP="#a2a9b0",$P="#878d96",AP="#697077",LP="#4d5358",DP="#343a3f",kP="#21272a",RP="#121619",IP={10:OP,20:TP,30:CP,40:MP,50:$P,60:AP,70:LP,80:DP,90:kP,100:RP},PP="#f4f4f4",NP="#e0e0e0",UP="#c6c6c6",BP="#a8a8a8",VP="#8d8d8d",HP="#6f6f6f",FP="#525252",GP="#393939",zP="#262626",jP="#161616",WP={10:PP,20:NP,30:UP,40:BP,50:VP,60:HP,70:FP,80:GP,90:zP,100:jP},qP="#f7f3f2",YP="#e5e0df",XP="#cac5c4",ZP="#ada8a8",KP="#8f8b8b",QP="#726e6e",JP="#565151",tN="#3c3838",eN="#272525",nN="#171414",iN={10:qP,20:YP,30:XP,40:ZP,50:KP,60:QP,70:JP,80:tN,90:eN,100:nN},lg={black:{100:DR},blue:jI,coolGray:IP,cyan:nP,gray:WP,green:SP,magenta:EI,orange:eI,purple:RI,red:dI,teal:fP,warmGray:iN,white:{0:kR},yellow:zR};const rN=e=>{if(!e)return null;for(const t of Object.keys(lg)){const n=lg[t];for(const i of Object.keys(n))if(n[+i]===e)return i}return null},cg=function(){const e=P(this.parentNode).select("rect.leaf"),t=getComputedStyle(e.node(),null).getPropertyValue("fill"),n=Ge(t);let i;if(n&&(i=rN(n?n.hex():null)),i==null){const r=Ya(n).l;i=Math.abs(r*100-100)}return i>50?"white":"black"};let sN=0;class aN extends ht{constructor(){super(...arguments),this.type="treemap",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-treemap"})).attr("opacity",i=>i.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer();this.model.getData();const i=this.model.getDisplayData(),r=this.model.getOptions(),s=w(window,"location"),{width:a,height:o}=I.getSVGElementSize(n,{useAttrs:!0}),c=Ji({name:r.title||"Treemap",children:i}).sum(f=>f.value).sort((f,p)=>p.value-f.value),l=Hb().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(c),u=n.selectAll("g[data-name='leaf']").data(l.leaves(),f=>f.data.name);u.exit().attr("opacity",0).remove();const d=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>sN++).merge(u);d.attr("data-name","leaf").transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"treemap-group-update",animate:t})).attr("transform",f=>`translate(${f.x0},${f.y0})`);const h=d.selectAll("rect.leaf").data(f=>[f]);h.exit().attr("width",0).attr("height",0).remove(),h.enter().append("rect").classed("leaf",!0).merge(h).attr("width",0).attr("height",0).attr("id",function(){const f=P(this.parentNode).attr("data-uid");return`${r.style.prefix}-leaf-${f}`}).attr("class",f=>{for(;f.depth>1;)f=f.parent;return this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:f.data.name,originalClassName:"leaf"})}).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"treemap-leaf-update-enter",animate:t})).attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).style("fill",f=>{for(;f.depth>1;)f=f.parent;return this.model.getFillColor(f.data.name)}),d.selectAll("clipPath").data(f=>f.data.showLabel!==!0?[]:[1],f=>f).join(f=>f.append("clipPath").attr("id",function(){const p=P(this.parentNode).attr("data-uid");return`${r.style.prefix}-clip-${p}`}).append("use").attr("xlink:href",function(){const p=P(this.parentNode.parentNode).attr("data-uid"),g=`${r.style.prefix}-leaf-${p}`;return new URL(`#${g}`,s)+""}),f=>null,f=>f.remove()),d.selectAll("text").data(f=>{if(f.data.showLabel!==!0)return[];let p=f;for(;p.depth>1;)p=p.parent;const g=Ya(this.model.getFillColor(p.data.name));return[{text:f.data.name,color:g.l<.5?"white":"black"}]},f=>f).join(f=>{const p=f.append("text").text(g=>g.text).style("fill",cg).attr("x",7).attr("y",18);return s&&p.attr("clip-path",function(){const g=P(this.parentNode).attr("data-uid"),m=`${r.style.prefix}-clip-${g}`;return`url(${new URL(`#${m}`,s)+""})`}),p},f=>f.text(p=>p.text).style("fill",cg),f=>f.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,i){const r=P(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=i;for(;a.depth>1;)a=a.parent;r.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const c=t.model.getFillColor(o.parent.data.name);return c&&(s=c),Ge(s).darker(.7).toString()}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{color:s,label:a.data.name,bold:!0},{label:i.data.name,value:i.data.value}]}),t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEOVER,{event:n,element:r,datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Treemap.LEAF_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1);let s=i;for(;s.depth>1;)s=s.parent;r.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name)),t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}}class oN extends ht{constructor(){super(...arguments),this.type="wordcloud",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-wordcloud"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,i=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),s=this.getFontSizeScale(r),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:c}=a.wordCloud,{groupMapsTo:l}=a.data,{width:u,height:d}=I.getSVGElementSize(i,{useAttrs:!0});if(u===0||d===0)return;const h=zL().size([u,d]).words(r.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[l]:p[l],text:p[c],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=I.appendOrSelect(i,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,v=>`${v[l]}-${v.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",v=>`${v.size}px`).text(function(v){return v.text}).attr("class",v=>n.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:v[l],originalClassName:`word ${v.size>32?"light":""}`})).style("fill",v=>n.model.getFillColor(v[l],v.text,v)).attr("text-anchor","middle").transition().call(v=>n.services.transitions.setupTransition({transition:v,name:"wordcloud-text-update-enter",animate:t})).attr("transform",v=>`translate(${v.x}, ${v.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:i}=n.wordCloud,r=t.map(c=>c[i]).filter(c=>c),s=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=r.length>0,o=a?xe(r):[1,1];return Oe().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this,r=ya(s=>{const a=i.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>i.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;r(o),i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEOVER,{event:s,element:P(this),datum:a}),i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:t.tooltip.groupLabel,value:a[n],class:i.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){i.services.events.dispatchEvent(M.WordCloud.WORD_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);r(null),i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}}class lN extends ht{constructor(){super(...arguments),this.type="geo",this.renderType=K.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:i}=I.getSVGElementSize(t,{useAttrs:!0});if(n<1||i<1)return;const r=this.getProjection(),s=w(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},c={};Object.keys(a).forEach(m=>{typeof a[m].value=="number"?o[m]=a[m]:c[m]=a[m]});const l=vR(s,Object.values(c)),u=pR(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=r.fitSize([n,i],u),h=bx().projection(d);I.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const f=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),p=I.appendOrSelect(t,"defs");I.appendOrSelect(p,"pattern").attr("id",f).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",cr()([[0,0],[0,10]]));const g=I.appendOrSelect(t,"g.missing-data");I.appendOrSelect(g,"path").datum(l).attr("d",h).style("fill",`url(#${f})`)}getProjection(){let t=null;switch(w(this.getOptions(),"thematic","projection")){case tn.geoEqualEarth:t=Vx();break;case tn.geoAlbers:t=kx();break;case tn.geoConicEqualArea:t=Ah();break;case tn.geoConicEquidistant:t=Ux();break;case tn.geoEquirectangular:t=Px();break;case tn.geoMercator:t=Rx();break;case tn.geoNaturalEarth1:t=Hx();break;default:throw new Error("Projection is not supported.")}return t}}class cN extends lN{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",i=>this.model.getColorClassName({value:n[i.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(i,r){const s=P(this);t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEOVER,{event:i,element:s,datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.SHOW,{event:i,hoveredElement:s,items:[{label:r.properties.NAME,value:n[r.properties.NAME].value}]})}).on("mousemove",function(i,r){t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEMOVE,{event:i,element:P(this),datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(hi.CHOROPLETH_CLICK,{event:i,element:P(this),datum:n[r.properties.NAME]})}).on("mouseout",function(i,r){const s=P(this);t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEOUT,{event:i,element:s,datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.HIDE,{event:i,hoveredElement:s})})}}function ug(e,t){st(2,arguments);var n=ft(e),i=Vt(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Sc(e,t){st(2,arguments);var n=ft(e),i=Vt(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+i+1,0);var a=s.getDate();return r>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}var uN=36e5;function hg(e,t){st(2,arguments);var n=Vt(t);return Qs(e,n*uN)}function dg(e){st(1,arguments);var t=ft(e);return t.setHours(0,0,0,0),t}var hN=864e5;function dN(e,t){st(2,arguments);var n=dg(e),i=dg(t),r=n.getTime()-gl(n),s=i.getTime()-gl(i);return Math.round((r-s)/hN)}var fN=6e4;function Oc(e,t){st(2,arguments);var n=Vt(t);return Qs(e,n*fN)}function Tc(e,t){st(2,arguments);var n=Vt(t);return Qs(e,n*1e3)}function fg(e,t){st(2,arguments);var n=Vt(t);return Sc(e,n*12)}function Ur(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var pN=6e4,mN=36e5;function gN(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth();return r*12+s}function vN(e,t){st(2,arguments);var n=ft(e),i=ft(t);return n.getFullYear()-i.getFullYear()}function pg(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function yN(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=pg(n,i),s=Math.abs(dN(n,i));n.setDate(n.getDate()-r*s);var a=+(pg(n,i)===-r),o=r*(s-a);return o===0?0:o}function Cc(e,t){return st(2,arguments),ft(e).getTime()-ft(t).getTime()}var mg={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},_N="trunc";function Mc(e){return e?mg[e]:mg[_N]}function xN(e,t,n){st(2,arguments);var i=Cc(e,t)/mN;return Mc(n==null?void 0:n.roundingMethod)(i)}function gg(e,t,n){st(2,arguments);var i=Cc(e,t)/pN;return Mc(n==null?void 0:n.roundingMethod)(i)}function bN(e){st(1,arguments);var t=ft(e);return t.setHours(23,59,59,999),t}function wN(e){st(1,arguments);var t=ft(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function EN(e){st(1,arguments);var t=ft(e);return bN(t).getTime()===wN(t).getTime()}function SN(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=Ur(n,i),s=Math.abs(gN(n,i)),a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*s);var o=Ur(n,i)===-r;EN(ft(e))&&s===1&&Ur(e,i)===1&&(o=!1),a=r*(s-Number(o))}return a===0?0:a}function vg(e,t,n){st(2,arguments);var i=Cc(e,t)/1e3;return Mc(n==null?void 0:n.roundingMethod)(i)}function ON(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=Ur(n,i),s=Math.abs(vN(n,i));n.setFullYear(1584),i.setFullYear(1584);var a=Ur(n,i)===-r,o=r*(s-Number(a));return o===0?0:o}function TN(e,t){st(2,arguments);var n=Vt(t);return ug(e,-n)}function CN(e,t){st(2,arguments);var n=Vt(t);return Sc(e,-n)}function MN(e,t){st(2,arguments);var n=Vt(t);return hg(e,-n)}function yg(e,t){st(2,arguments);var n=Vt(t);return Oc(e,-n)}function _g(e,t){st(2,arguments);var n=Vt(t);return Tc(e,-n)}function $N(e,t){st(2,arguments);var n=Vt(t);return fg(e,-n)}function xg(e){var t=e==null?0:e.length;return t?ua(e,1):[]}class AN extends on{zoomIn(t,n,i){let r,s,a;const o=i||vi;t&&(r=t.x,s=t.y,a=2);const{width:c,height:l}=I.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});n.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${c/2}, ${l/2}) scale(${a}) translate(${-r},${-s})`),this.services.events.dispatchEvent(M.CanvasZoom.CANVAS_ZOOM_IN,{element:P(t)})}zoomOut(t,n){const i=n||vi;t.transition().duration(i.duration).ease(i.ease).attr("transform",""),this.services.events.dispatchEvent(M.CanvasZoom.CANVAS_ZOOM_OUT)}}class LN extends on{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,n){this.documentFragment.addEventListener(t,n)}removeEventListener(t,n){this.documentFragment.removeEventListener(t,n)}dispatchEvent(t,n){let i;n?i=new CustomEvent(t,{detail:n}):(i=document.createEvent("Event"),i.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(i)}}class DN extends on{constructor(t,n){super(t,n)}downloadCSV(t,n){const i=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:r}),n);else if(URL&&"download"in i){const s=URL.createObjectURL(new Blob([t],{type:r}));i.href=s,i.setAttribute("download",n),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(s)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,n){const i=document.createElement("a");i.download=n,i.href=t,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}class kN extends on{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;(t=this.services.events)==null||t.addEventListener(M.Model.UPDATE,()=>{this.pendingTransitions={}})}setupTransition({transition:t,name:n,animate:i}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",()=>{delete this.pendingTransitions[t._id]}),this.model.getOptions().animations===!1||i===!1?t.duration(0):t.duration(w(xl,n,"duration")||xl.default.duration)}getPendingTransitions(){return this.pendingTransitions}}let RN=class extends on{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const n=this.model.getOptions(),{groupMapsTo:i}=n.data,r=w(n,"axes",this.secondaryDomainAxisPosition),s=t[i];if(r!=null&&r.correspondingDatasets&&r.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:n=null}={}){if(this.dualAxes){const i=this.model.getOptions(),{groupMapsTo:r}=i.data,s=w(i,"axes",this.secondaryRangeAxisPosition);let a;if(t!==null?a=t[r]:n&&n.length>0&&(a=n[0]),s!=null&&s.correspondingDatasets&&s.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return w(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===V.BOTTOM||t===V.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(V).map(t=>V[t]).forEach(t=>{this.scales[t]=this.createScale(t)})}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),n=this.findHorizontalAxesPositions(),i=this.findDomainAndRangeAxesPositions(t,n);this.domainAxisPosition=i.primaryDomainAxisPosition,this.rangeAxisPosition=i.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=i.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=i.secondaryRangeAxisPosition)}determineOrientation(){(this.rangeAxisPosition===V.LEFT||this.rangeAxisPosition===V.RIGHT)&&(this.domainAxisPosition===V.BOTTOM||this.domainAxisPosition===V.TOP)?this.orientation=Ft.VERTICAL:this.orientation=Ft.HORIZONTAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,n,i,r;const s=this.model.getOptions(),a=w(s,"axes");((t=a[V.LEFT])!=null&&t.correspondingDatasets&&a[V.RIGHT]||(n=a[V.RIGHT])!=null&&n.correspondingDatasets&&a[V.LEFT]||(i=a[V.TOP])!=null&&i.correspondingDatasets&&a[V.BOTTOM]||(r=a[V.BOTTOM])!=null&&r.correspondingDatasets&&a[V.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const n=w(this.model.getOptions(),"axes",t,"domain");if(n&&!Array.isArray(n))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(n)&&(this.scaleTypes[t]===Z.LINEAR||this.scaleTypes[t]===Z.TIME)&&n.length!==2)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return n}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[V.BOTTOM,V.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainYAxisPosition(){const t=[V.LEFT,V.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,n,i,r){const s=this.model.getOptions(),a=w(s,"axes")[i],{mapsTo:o}=a,c=w(r,o)!==null?r[o]:r;let l;switch(n){case Z.LABELS:l=t(c)+t.step()/2;break;case Z.TIME:l=t(new Date(c));break;default:l=t(c)}return l}getBoundedScaledValues(t){const{bounds:n}=this.model.getOptions(),i=this.getRangeAxisPosition({datum:t}),r=this.scales[i],s=this.model.getOptions(),a=w(s,"axes")[i],{mapsTo:o}=a,c=t[o]!==void 0?t[o]:t;return[r(w(t,n.upperBoundMapsTo)!==null?t[n.upperBoundMapsTo]:c),r(w(t,n.lowerBoundMapsTo)!==null?t[n.lowerBoundMapsTo]:c)]}getValueThroughAxisPosition(t,n){const i=this.scaleTypes[t],r=this.scales[t];return this.getValueFromScale(r,i,t,n)}getDomainValue(t){const n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getRangeValue(t){const n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const n=this.model.getOptions();return w(n,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const n=this.model.getOptions();return w(n,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,n){const i=this.model.getOptions(),r=w(i,"axes",t);if(r.scaleType===Z.TIME){const s=w(i,"timeScale","addSpaceOnEdges");return IN(n,s)}else return PN(n,gi.paddingRatio,r.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),n=w(t,"axes"),i=this.isDualAxes();return w(n,V.LEFT)===null&&w(n,V.RIGHT)!==null||w(n,V.RIGHT,"main")===!0||i&&w(n,V.LEFT,"correspondingDatasets")?{primary:V.RIGHT,secondary:V.LEFT}:{primary:V.LEFT,secondary:V.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),n=w(t,"axes"),i=this.isDualAxes();return w(n,V.BOTTOM)===null&&w(n,V.TOP)!==null||w(n,V.TOP,"main")===!0||i&&w(n,V.BOTTOM,"correspondingDatasets")?{primary:V.TOP,secondary:V.BOTTOM}:{primary:V.BOTTOM,secondary:V.TOP}}findDomainAndRangeAxesPositions(t,n){const i=this.model.getOptions(),r=w(i,"axes",t.primary),s=w(i,"axes",n.primary),a=r.scaleType||Z.LINEAR,o=s.scaleType||Z.LINEAR,c={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return c.primaryDomainAxisPosition=n.primary,c.primaryRangeAxisPosition=t.primary,c.secondaryDomainAxisPosition=n.secondary,c.secondaryRangeAxisPosition=t.secondary,(!(o===Z.LABELS||o===Z.TIME)&&a===Z.LABELS||a===Z.TIME)&&(c.primaryDomainAxisPosition=t.primary,c.primaryRangeAxisPosition=n.primary,c.secondaryDomainAxisPosition=t.secondary,c.secondaryRangeAxisPosition=n.secondary),c}getScaleDomain(t){const n=this.model.getOptions(),i=w(n,"axes",t),r=w(n,"bounds"),{includeZero:s}=i,a=w(i,"scaleType")||Z.LINEAR;if(this.model.isDataEmpty())return[];if(i.binned){const{bins:v}=this.model.getBinConfigurations();return[0,xn(v,x=>x.length)]}else if(i.limitDomainToBins){const{bins:v}=this.model.getBinConfigurations(),x=this.model.getStackKeys({bins:v});return[x[0].split("-")[0],x[x.length-1].split("-")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:c,mapsTo:l,percentage:u,thresholds:d}=i,{reference:h,compareTo:f}=gi.ratio;if(i.domain)return a===Z.LABELS?i.domain:(a===Z.TIME&&(i.domain=i.domain.map(v=>v.getTime===void 0?new Date(v):v)),this.extendsDomain(t,i.domain));if(u)return[0,100];if(i&&a===Z.LABELS)return Cr(o.map(v=>v[l]));let p,g;const m=this.model.getDataGroupNames();if(a===Z.LABELS_RATIO)return o.map(v=>`${v[h]}/${v[f]}`);if(a===Z.TIME)g=o.map(v=>+new Date(v[l]));else if(r&&n.axes)g=[],o.forEach(v=>{g.push(v[l]),v[r.upperBoundMapsTo]&&g.push(v[r.upperBoundMapsTo]),v[r.lowerBoundMapsTo]&&g.push(v[r.lowerBoundMapsTo])});else if(i.stacked===!0&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:v}=n.data,x=this.model.getDataValuesGroupedByKeys({groups:m}),b=o.filter(E=>!m.includes(E[v])),O=[];x.forEach(E=>{const{...T}=E;let S=0,A=0;Object.values(T).forEach(D=>{isNaN(D)||(D<0?A+=D:S+=D)}),O.push([A,S])}),g=[...xg(O),...b.map(E=>E[l])]}else g=[],o.forEach(v=>{const x=v[l];Array.isArray(x)&&x.length===2?(g.push(x[0]),g.push(x[1])):(c&&g.push(Math.max(v[l],v[c])),g.push(x))});return a!==Z.TIME&&a!==Z.LOG&&s&&g.push(0),d&&d.length>0&&d.forEach(v=>{const x=w(v,"value");x!==null&&g.push(x)}),p=xe(g),p=this.extendsDomain(t,p),p}createScale(t){const n=this.model.getOptions(),i=w(n,"axes",t);if(!i)return null;const r=w(i,"scaleType")||Z.LINEAR;this.scaleTypes[t]=r;let s;return r===Z.TIME?s=gd():r===Z.LOG?s=Kh().base(i.base||10):r===Z.LABELS||r===Z.LABELS_RATIO?s=nr():s=Oe(),s.domain(this.getScaleDomain(t)),s}getHighestDomainThreshold(){const t=w(this.model.getOptions(),"axes"),n=this.getDomainAxisPosition(),{thresholds:i}=t[n];if(!Array.isArray(i)||Array.isArray(i)&&!i.length)return null;const r=this.getDomainScale(),s=i.sort((a,o)=>o.value-a.value)[0];return this.getScaleTypeByPosition(n)===Z.TIME&&(typeof s.value=="string"||s.value.getTime===void 0)&&(s.value=new Date(s.value)),{threshold:s,scaleValue:r(s.value)}}getHighestRangeThreshold(){const t=w(this.model.getOptions(),"axes"),n=this.getRangeAxisPosition(),{thresholds:i}=t[n];if(!Array.isArray(i)||Array.isArray(i)&&!i.length)return null;const r=this.getRangeScale(),s=i.sort((a,o)=>o.value-a.value)[0];return{threshold:s,scaleValue:r(s.value)}}};function IN(e,t){const n=new Date(e[0]),i=new Date(e[1]);return ON(i,n)>1?[$N(n,t),fg(i,t)]:SN(i,n)>1?[CN(n,t),Sc(i,t)]:yN(i,n)>1?[TN(n,t),ug(i,t)]:xN(i,n)>1?[MN(n,t),hg(i,t)]:gg(i,n)>30?[yg(n,t*30),Oc(i,t*30)]:gg(i,n)>1?[yg(n,t),Oc(i,t)]:vg(i,n)>15?[_g(n,t*15),Tc(i,t*15)]:vg(i,n)>1?[_g(n,t),Tc(i,t)]:[n,i]}function PN([e,t],n,i){const r=(t-e)*n,s=t<=0&&t+r>0?0:t+r;let a=e>=0&&e-r<0?0:e-r;if(i===Z.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,s]}let NN=class extends on{constructor(){super(...arguments),this.curveTypes={curveLinear:Vs,curveLinearClosed:$d,curveBasis:IE,curveBasisClosed:PE,curveBasisOpen:NE,curveBundle:UE,curveCardinal:BE,curveCardinalClosed:VE,curveCardinalOpen:HE,curveCatmullRom:FE,curveCatmullRomClosed:GE,curveCatmullRomOpen:zE,curveMonotoneX:jE,curveMonotoneY:WE,curveNatural:qE,curveStep:YE,curveStepAfter:ZE,curveStepBefore:XE}}getD3Curve(){let t="curveLinear";const n=this.model.getOptions().curve;if(n&&(typeof n=="string"?t=n:t=n.name),this.curveTypes[t]){let i=this.curveTypes[t];return n&&Object.keys(n).forEach(r=>{i[r]&&(i=i[r](n[r]))}),i}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}};class UN extends on{isZoomBarEnabled(){if(!this.services.cartesianScales||!w(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),n=w(this.model.getOptions(),"axes",t,"scaleType");return t===V.BOTTOM&&n===Z.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const n=t||this.services.zoom.getZoomBarData(),{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales undefined");const r=i.getMainXAxisPosition(),s=i.getDomainIdentifier(),a=w(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(a)&&a.length===2)return a;if(!r)throw new Error("Not defined: mainXAxisPosition");return i.extendsDomain(r,xe(n,o=>o[s]))}handleDomainChange(t,n={dispatchEvent:!0}){var i;this.model.set({zoomDomain:t},{animate:!1}),n.dispatchEvent&&((i=this.services.events)==null||i.dispatchEvent(M.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return w(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,n){var i;const r=this.model.get("zoomDomain"),s=Object.assign({stacked:!1},n),a=w(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&a&&r){const o=s.stacked?"sharedStackKey":(i=this.services.cartesianScales)==null?void 0:i.getDomainIdentifier(),c=t.filter(l=>new Date(l[o])>=r[0]&&new Date(l[o])<=r[1]);if(c.length>0)return c}return t}zoomIn(t=this.getZoomRatio()){var n;const i=this.model.get("zoomDomain"),r=se.handleWidth,s=(n=this.services.cartesianScales)==null?void 0:n.getMainXScale().copy();s.domain(this.getDefaultZoomBarDomain());const a=s(i[0]),o=s(i[1]);if(o-a<r+1)return;const c=s.range(),l=o-a,u=Math.min((c[1]-c[0])/2*(t/2),l/2);let d=a+u,h=o-u;d>=h&&(d=a+l/2-r/2,h=o-l/2+r/2);const f=[s.invert(d),s.invert(h)];(i[0].valueOf()!==f[0].valueOf()||i[1].valueOf()!==f[1].valueOf())&&this.handleDomainChange(f)}zoomOut(t=this.getZoomRatio()){const n=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const i=this.services.cartesianScales.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const r=i(n[0]),s=i(n[1]),a=i.range(),o=(a[1]-a[0])/2*(t/2),c=Math.max(r-o,a[0]),l=Math.min(s+o,a[1]),u=[i.invert(c),i.invert(l)];(n[0].valueOf()!==u[0].valueOf()||n[1].valueOf()!==u[1].valueOf())&&this.handleDomainChange(u)}resetZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();(t[0].valueOf()!==n[0].valueOf()||t[1].valueOf()!==n[1].valueOf())&&this.handleDomainChange(n)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();if(!t||!n)return!1;const i=t[1].valueOf()-t[0].valueOf(),r=n[1].valueOf()-n[0].valueOf(),s=w(this.model.getOptions(),"zoomBar","minZoomRatio");return i/r<s}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();return!!(t&&n&&t[0].valueOf()===n[0].valueOf()&&t[1].valueOf()===n[1].valueOf())}isEmptyState(){return this.getZoomBarData().length===0}isZoomBarLoading(t){return w(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return w(this.model.getOptions(),"zoomBar",t,"locked")}}function BN(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}function VN(e,t,n){var i=e.length;return n=n===void 0?i:n,!t&&n>=i?e:BN(e,t,n)}var HN="\\ud800-\\udfff",FN="\\u0300-\\u036f",GN="\\ufe20-\\ufe2f",zN="\\u20d0-\\u20ff",jN=FN+GN+zN,WN="\\ufe0e\\ufe0f",qN="\\u200d",YN=RegExp("["+qN+HN+jN+WN+"]");function bg(e){return YN.test(e)}function XN(e){return e.split("")}var wg="\\ud800-\\udfff",ZN="\\u0300-\\u036f",KN="\\ufe20-\\ufe2f",QN="\\u20d0-\\u20ff",JN=ZN+KN+QN,tU="\\ufe0e\\ufe0f",eU="["+wg+"]",$c="["+JN+"]",Ac="\\ud83c[\\udffb-\\udfff]",nU="(?:"+$c+"|"+Ac+")",Eg="[^"+wg+"]",Sg="(?:\\ud83c[\\udde6-\\uddff]){2}",Og="[\\ud800-\\udbff][\\udc00-\\udfff]",iU="\\u200d",Tg=nU+"?",Cg="["+tU+"]?",rU="(?:"+iU+"(?:"+[Eg,Sg,Og].join("|")+")"+Cg+Tg+")*",sU=Cg+Tg+rU,aU="(?:"+[Eg+$c+"?",$c,Sg,Og,eU].join("|")+")",oU=RegExp(Ac+"(?="+Ac+")|"+aU+sU,"g");function lU(e){return e.match(oU)||[]}function cU(e){return bg(e)?lU(e):XN(e)}function uU(e){return function(t){t=Or(t);var n=bg(t)?cU(t):void 0,i=n?n[0]:t.charAt(0),r=n?VN(n,1).join(""):t.slice(1);return i[e]()+r}}var hU=uU("toUpperCase");const dU=hU;function fU(e){return dU(Or(e).toLowerCase())}var pU=Mm(function(e,t,n){return t=t.toLowerCase(),e+(n?fU(t):t)});const mU=pU;class Ae{constructor(t,n){this.components=[],this.services={canvasZoom:AN,domUtils:I,events:LN,files:DN,gradientUtils:Kl,transitions:kN},this.model=new Ve(this.services)}init(t,n){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach(i=>{const r=this.services[i];this.services[i]=new r(this.model,this.services)}),this.services.events.addEventListener(M.Model.UPDATE,()=>{this.update()}),this.model.setData(n.data),this.services.events.addEventListener(M.Chart.RESIZE,()=>{this.update()}),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(){if(!this.components)return;Object.keys(this.services).forEach(i=>{this.services[i].update()}),this.components.forEach(i=>i.render(!0));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map(i=>t[i].end().catch(r=>r));Promise.all(n).then(()=>this.services.events.dispatchEvent(M.Chart.RENDER_FINISHED))}destroy(){this.components.forEach(t=>t.destroy()),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled"),s={id:"legend",components:[new xc(this.model,this.services)],growth:it.PREFERRED},a=w(i,"canvasZoom","enabled");a&&a===!0&&t.push(new eR(this.model,this.services));const o=!!this.model.getOptions().title,c={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},l={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},u={id:"header",components:[new ae(this.model,this.services,[c,...r?[l]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},d={id:"graph-frame",components:t,growth:it.STRETCH,renderType:w(n,"graphFrameRenderType")||K.SVG},h=w(n,"excludeLegend")!==!0&&i.legend.enabled!==!1;let f=St.COLUMN;if(h){const v=w(i,"legend","position");v==="left"?(f=St.ROW,i.legend.orientation||(i.legend.orientation=fr.VERTICAL)):v==="right"?(f=St.ROW_REVERSE,i.legend.orientation||(i.legend.orientation=fr.VERTICAL)):v==="bottom"&&(f=St.COLUMN_REVERSE)}const p={id:"spacer",components:[new ln(this.model,this.services)],growth:it.PREFERRED},g={id:"full-frame",components:[new ae(this.model,this.services,[...h?[s]:[],...h?[p]:[],d],{direction:f})],growth:it.STRETCH},m=[];if(o||r){m.push(u);const v={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};m.push(v)}return m.push(g),[new bc(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,m,{direction:St.COLUMN})]}}class le extends Ae{constructor(t,n){super(t,n),this.services=Object.assign(this.services,{cartesianScales:RN,curves:NN,zoom:UN}),this.model=new Gn(this.services)}getAxisChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"zoomBar",V.TOP,"enabled"),s=w(i,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),o=w(i,"axes",a,"scaleType"),c=r&&a===V.BOTTOM&&o===Z.TIME,l=this.services.zoom.isZoomBarLocked(V.TOP),u=!!this.model.getOptions().title,d={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},h={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},f={id:"header",components:[new ae(this.model,this.services,[d,...s?[h]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},p={id:"legend",components:[new xc(this.model,this.services)],growth:it.PREFERRED};c&&!l&&t.push(new zm(this.model,this.services),new qm(this.model,this.services)),t.push(new iR(this.model,this.services)),t.push(new rR(this.model,this.services));const g={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},m=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1;let v=St.COLUMN;if(m){const T=w(this.model.getOptions(),"legend","position");T===dr.LEFT?(v=St.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=fr.VERTICAL)):T===dr.RIGHT?(v=St.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=fr.VERTICAL)):T===dr.BOTTOM&&(v=St.COLUMN_REVERSE)}const x={id:"spacer",components:[new ln(this.model,this.services)],growth:it.PREFERRED},b={id:"full-frame",components:[new ae(this.model,this.services,[...m?[p]:[],...m?[x]:[],g],{direction:v})],growth:it.STRETCH},O={id:"zoom-bar",components:[new nR(this.model,this.services)],growth:it.PREFERRED,renderType:K.SVG},E=[];if(u||s){E.push(f);const T={id:"spacer",components:[new ln(this.model,this.services,s?{size:15}:void 0)],growth:it.PREFERRED};E.push(T)}return c&&E.push(O),E.push(b),[new Ym(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,E,{direction:St.COLUMN})]}}class gU extends Ae{constructor(t,n){super(t,n),this.model=new AA(this.services),this.model.setOptions(At(wt.alluvialChart,n.options)),this.init(t,n)}getComponents(){const t=[new sR(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class vU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(rn(wt.areaChart),n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new vn(this.model,this.services),new Mi(this.model,this.services),new Xm(this.model,this.services),new He(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class yU extends le{constructor(t,n){super(t,n),this.model=new LA(this.services),this.model.setOptions(At(wt.boxplotChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new lR(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})}}class _U extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.bubbleChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new vn(this.model,this.services),new cR(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class xU extends le{constructor(t,n){super(t,n),this.model=new DA(this.services),this.model.setOptions(At(wt.bulletChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new uR(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class bU extends Ae{constructor(t,n){super(t,n),this.model=new kA(this.services),this.model.setOptions(At(wt.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},o={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},c={id:"header",components:[new ae(this.model,this.services,[a,...r?[o]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},l={id:"legend",components:[new Jm(this.model,this.services,{chartType:"choropleth"})],growth:it.PREFERRED,renderType:K.SVG},u={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},d=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1,h=St.COLUMN_REVERSE,f={id:"spacer",components:[new ln(this.model,this.services,{size:15})],growth:it.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[l]:[],...d?[f]:[],u],{direction:h})],growth:it.STRETCH},g=[];if(s||r){g.push(c);const m={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};g.push(m)}return g.push(p),[new bc(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,g,{direction:St.COLUMN})]}getComponents(){const t=[new cN(this.model,this.services)];return this.getChartComponents(t)}}class wU extends Ae{constructor(t,n){super(t,n),this.model=new RA(this.services),this.model.setOptions(At(wt.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new bR(this.model,this.services)];return this.getChartComponents(t)}}const Mg={[ge.LINE]:[Mi,He],[ge.SCATTER]:[He],[ge.AREA]:[Xm,Mi,He],[ge.STACKED_AREA]:[sg,Mi,og,Da],[ge.SIMPLE_BAR]:[rg],[ge.GROUPED_BAR]:[ig,$i],[ge.STACKED_BAR]:[ag,Da]};class EU extends le{constructor(t,n){super(t,n);const i=At(wt.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:ge.LINE,correspondingDatasets:[]}]),this.model.setOptions(i),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const i=t.map(r=>{const s=r.type;let a;if(typeof r.type=="string"){if(!Object.keys(Mg).includes(r.type))return console.error(`Invalid chart type "${r.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const c=`${mU(r.type)}Chart`;return a=nt({},wt[c],this.model.getOptions(),r.options),r.type===ge.STACKED_AREA&&(o=!0),Mg[r.type].map(l=>new l(this.model,this.services,{groups:r.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=nt({},this.model.getOptions(),r.options),new s(this.model,this.services,{groups:r.correspondingDatasets,id:n++,options:a})}).filter(r=>r!==null);return xg(i)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(r=>r.type===ge.STACKED_BAR||r.type===ge.STACKED_AREA),i=[new oe(this.model,this.services),new fe(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID}),...n?[]:[new vn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(i)}}class $g extends Ae{constructor(t,n,i=!1){super(t,n),this.model=new IA(this.services),!i&&(this.model.setOptions(At(wt.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new tg(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.PIE})];return this.getChartComponents(t)}}class SU extends $g{constructor(t,n){super(t,n,!0),this.model.setOptions(At(wt.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new ER(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.DONUT})];return this.getChartComponents(t)}}class OU extends Ae{constructor(t,n){super(t,n),this.model=new PA(this.services),this.model.setOptions(At(wt.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new SR(this.model,this.services)];return this.getChartComponents(t)}}class TU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new ig(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class CU extends le{constructor(t,n){super(t,n),this.model=new NA(this.services),this.model.setOptions(At(wt.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},o={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},c={id:"header",components:[new ae(this.model,this.services,[a,...r?[o]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},l={id:"legend",components:[new Jm(this.model,this.services,{chartType:"heatmap"})],growth:it.PREFERRED,renderType:K.SVG},u={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},d=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1,h=St.COLUMN_REVERSE,f={id:"spacer",components:[new ln(this.model,this.services,{size:15})],growth:it.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[l]:[],...d?[f]:[],u],{direction:h})],growth:it.STRETCH},g=[];if(s||r){g.push(c);const m={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};g.push(m)}return g.push(p),[new Ym(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,g,{direction:St.COLUMN})]}getComponents(){const t=[new oe(this.model,this.services),new OR(this.model,this.services)];return this.getAxisChartComponents(t)}}class MU extends le{constructor(t,n){super(t,n),this.model=new UA(this.services),this.model.setOptions(At(wt.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new _R(this.model,this.services),new TR(this.model,this.services)];return this.getAxisChartComponents(t)}}class $U extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new vn(this.model,this.services),new Mi(this.model,this.services),new He(this.model,this.services,{handleThresholds:!0}),new AR(this.model,this.services),new $i(this.model,this.services)];return this.getAxisChartComponents(t)}}class AU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new vn(this.model,this.services),new CR(this.model,this.services),new He(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class LU extends Ae{constructor(t,n){var i;super(t,n),this.model=new BA(this.services);const r=(i=n.options.meter)!=null&&i.proportional?nt(rn(wt.proportionalMeterChart),n.options):nt(rn(wt.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const t=[...w(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new xR(this.model,this.services)],growth:it.STRETCH,renderType:K.SVG},{id:"spacer",components:[new ln(this.model,this.services,{size:8})],growth:it.STRETCH}]:[],{id:"meter-graph",components:[new MR(this.model,this.services)],growth:it.STRETCH,renderType:K.SVG}],n=[new ae(this.model,this.services,t,{direction:St.COLUMN})];return this.getChartComponents(n,{graphFrameRenderType:K.HTML})}}class DU extends Ae{constructor(t,n){super(t,n),this.model=new VA(this.services),this.model.setOptions(At(wt.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new $R(this.model,this.services)];return this.getChartComponents(t)}}class kU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new vn(this.model,this.services),new He(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class RU extends Ae{constructor(t,n){super(t,n),this.model=new HA(this.services),this.model.setOptions(At(wt.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new LR(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class IU extends Ae{constructor(t,n){super(t,n),this.model=new FA(this.services),this.model.setOptions(At(wt.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new aN(this.model,this.services)];return this.getChartComponents(t)}}class PU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new rg(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class NU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new Da(this.model,this.services),new sg(this.model,this.services),new Mi(this.model,this.services,{stacked:!0}),new og(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class UU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new Da(this.model,this.services),new ag(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ}),new $i(this.model,this.services)];return this.getAxisChartComponents(t)}}class BU extends Ae{constructor(t,n){super(t,n),this.model=new GA(this.services),this.model.setOptions(At(wt.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new oN(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.PIE})];return this.getChartComponents(t)}}const VU=mt.defineComponent({name:"CcvBaseChart",props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},data(){return{coreChart:null}},watch:{data:{handler:function(e){var t,n;(n=(t=this.coreChart)==null?void 0:t.model)==null||n.setData(e)},deep:!0},options:{handler:function(e){var t,n;(n=(t=this.coreChart)==null?void 0:t.model)==null||n.setOptions(e)},deep:!0}}});function Ct(e,t,n,i,r,s,a,o){var c=typeof e=="function"?e.options:e;t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s);var l;if(a?(l=function(h){h=h||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!h&&typeof __VUE_SSR_CONTEXT__<"u"&&(h=__VUE_SSR_CONTEXT__),r&&r.call(this,h),h&&h._registeredComponents&&h._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=o?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(f,p){return l.call(p),u(f,p)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}let HU,FU;const Ag={};var GU=Ct(VU,HU,FU,!1,zU,null,null,null);function zU(e){for(let t in Ag)this[t]=Ag[t]}const $t=function(){return GU.exports}(),jU=mt.defineComponent({name:"CcvAlluvialChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new gU(this.$el,{data:e,options:t})}});var WU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-alluvial-chart"})},qU=[];const Lg={};var YU=Ct(jU,WU,qU,!1,XU,null,null,null);function XU(e){for(let t in Lg)this[t]=Lg[t]}const Dg=function(){return YU.exports}(),ZU=mt.defineComponent({name:"CcvAreaChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new vU(this.$el,{data:e,options:t})}});var KU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-area-chart"})},QU=[];const kg={};var JU=Ct(ZU,KU,QU,!1,tB,null,null,null);function tB(e){for(let t in kg)this[t]=kg[t]}const Rg=function(){return JU.exports}(),eB=mt.defineComponent({name:"CcvBoxplotChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new yU(this.$el,{data:e,options:t})}});var nB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-boxplot-chart"})},iB=[];const Ig={};var rB=Ct(eB,nB,iB,!1,sB,null,null,null);function sB(e){for(let t in Ig)this[t]=Ig[t]}const Pg=function(){return rB.exports}(),aB=mt.defineComponent({name:"CcvBubbleChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new _U(this.$el,{data:e,options:t})}});var oB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-bubble-chart"})},lB=[];const Ng={};var cB=Ct(aB,oB,lB,!1,uB,null,null,null);function uB(e){for(let t in Ng)this[t]=Ng[t]}const Ug=function(){return cB.exports}(),hB=mt.defineComponent({name:"CcvBulletChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new xU(this.$el,{data:e,options:t})}});var dB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-bullet-chart"})},fB=[];const Bg={};var pB=Ct(hB,dB,fB,!1,mB,null,null,null);function mB(e){for(let t in Bg)this[t]=Bg[t]}const Vg=function(){return pB.exports}(),gB=mt.defineComponent({name:"ExperimentalCcvChoroplethChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new bU(this.$el,{data:e,options:t})}});var vB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"experimental-ccv-choropleth-chart"})},yB=[];const Hg={};var _B=Ct(gB,vB,yB,!1,xB,null,null,null);function xB(e){for(let t in Hg)this[t]=Hg[t]}const Fg=function(){return _B.exports}(),bB=mt.defineComponent({name:"CcvCirclePackChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new wU(this.$el,{data:e,options:t})}});var wB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-circle-pack-chart"})},EB=[];const Gg={};var SB=Ct(bB,wB,EB,!1,OB,null,null,null);function OB(e){for(let t in Gg)this[t]=Gg[t]}const zg=function(){return SB.exports}(),TB=mt.defineComponent({name:"CcvComboChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new EU(this.$el,{data:e,options:t})}});var CB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-combo-chart"})},MB=[];const jg={};var $B=Ct(TB,CB,MB,!1,AB,null,null,null);function AB(e){for(let t in jg)this[t]=jg[t]}const Wg=function(){return $B.exports}(),LB=mt.defineComponent({name:"CcvDonutChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new SU(this.$el,{data:e,options:t})}});var DB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-donut-chart"})},kB=[];const qg={};var RB=Ct(LB,DB,kB,!1,IB,null,null,null);function IB(e){for(let t in qg)this[t]=qg[t]}const Yg=function(){return RB.exports}(),PB=mt.defineComponent({name:"CcvGaugeChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new OU(this.$el,{data:e,options:t})}});var NB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-gauge-chart"})},UB=[];const Xg={};var BB=Ct(PB,NB,UB,!1,VB,null,null,null);function VB(e){for(let t in Xg)this[t]=Xg[t]}const Zg=function(){return BB.exports}(),HB=mt.defineComponent({name:"CcvGroupedBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new TU(this.$el,{data:e,options:t})}});var FB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-grouped-bar-chart"})},GB=[];const Kg={};var zB=Ct(HB,FB,GB,!1,jB,null,null,null);function jB(e){for(let t in Kg)this[t]=Kg[t]}const Qg=function(){return zB.exports}(),WB=mt.defineComponent({name:"CcvHeatmapChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new CU(this.$el,{data:e,options:t})}});var qB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-heatmap-chart"})},YB=[];const Jg={};var XB=Ct(WB,qB,YB,!1,ZB,null,null,null);function ZB(e){for(let t in Jg)this[t]=Jg[t]}const tv=function(){return XB.exports}(),KB=mt.defineComponent({name:"CcvHistogramChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new MU(this.$el,{data:e,options:t})}});var QB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-histogram-chart"})},JB=[];const ev={};var tV=Ct(KB,QB,JB,!1,eV,null,null,null);function eV(e){for(let t in ev)this[t]=ev[t]}const nv=function(){return tV.exports}(),nV=mt.defineComponent({name:"CcvLineChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new $U(this.$el,{data:e,options:t})}});var iV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-line-chart"})},rV=[];const iv={};var sV=Ct(nV,iV,rV,!1,aV,null,null,null);function aV(e){for(let t in iv)this[t]=iv[t]}const rv=function(){return sV.exports}(),oV=mt.defineComponent({name:"CcvLollipopChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new AU(this.$el,{data:e,options:t})}});var lV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-lollipop-chart"})},cV=[];const sv={};var uV=Ct(oV,lV,cV,!1,hV,null,null,null);function hV(e){for(let t in sv)this[t]=sv[t]}const av=function(){return uV.exports}(),dV=mt.defineComponent({name:"CcvMeterChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new LU(this.$el,{data:e,options:t})}});var fV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-meter-chart"})},pV=[];const ov={};var mV=Ct(dV,fV,pV,!1,gV,null,null,null);function gV(e){for(let t in ov)this[t]=ov[t]}const lv=function(){return mV.exports}(),vV=mt.defineComponent({name:"CcvPieChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new $g(this.$el,{data:e,options:t})}});var yV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-pie-chart"})},_V=[];const cv={};var xV=Ct(vV,yV,_V,!1,bV,null,null,null);function bV(e){for(let t in cv)this[t]=cv[t]}const uv=function(){return xV.exports}(),wV=mt.defineComponent({name:"CcvRadarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new DU(this.$el,{data:e,options:t})}});var EV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-radar-chart"})},SV=[];const hv={};var OV=Ct(wV,EV,SV,!1,TV,null,null,null);function TV(e){for(let t in hv)this[t]=hv[t]}const dv=function(){return OV.exports}(),CV=mt.defineComponent({name:"CcvScatterChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new kU(this.$el,{data:e,options:t})}});var MV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-scatter-chart"})},$V=[];const fv={};var AV=Ct(CV,MV,$V,!1,LV,null,null,null);function LV(e){for(let t in fv)this[t]=fv[t]}const pv=function(){return AV.exports}(),DV=mt.defineComponent({name:"CcvSimpleBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new PU(this.$el,{data:e,options:t})}});var kV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-simple-bar-chart"})},RV=[];const mv={};var IV=Ct(DV,kV,RV,!1,PV,null,null,null);function PV(e){for(let t in mv)this[t]=mv[t]}const gv=function(){return IV.exports}(),NV=mt.defineComponent({name:"CcvStackedAreaChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new NU(this.$el,{data:e,options:t})}});var UV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-stacked-area-chart"})},BV=[];const vv={};var VV=Ct(NV,UV,BV,!1,HV,null,null,null);function HV(e){for(let t in vv)this[t]=vv[t]}const yv=function(){return VV.exports}(),FV=mt.defineComponent({name:"CcvStackedBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new UU(this.$el,{data:e,options:t})}});var GV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-stacked-bar-chart"})},zV=[];const _v={};var jV=Ct(FV,GV,zV,!1,WV,null,null,null);function WV(e){for(let t in _v)this[t]=_v[t]}const xv=function(){return jV.exports}(),qV=mt.defineComponent({name:"CcvTreeChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new RU(this.$el,{data:e,options:t})}});var YV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-tree-chart"})},XV=[];const bv={};var ZV=Ct(qV,YV,XV,!1,KV,null,null,null);function KV(e){for(let t in bv)this[t]=bv[t]}const wv=function(){return ZV.exports}(),QV=mt.defineComponent({name:"CcvTreemapChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new IU(this.$el,{data:e,options:t})}});var JV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-treemap-chart"})},tH=[];const Ev={};var eH=Ct(QV,JV,tH,!1,nH,null,null,null);function nH(e){for(let t in Ev)this[t]=Ev[t]}const Sv=function(){return eH.exports}(),iH=mt.defineComponent({name:"CcvWordCloudChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new BU(this.$el,{data:e,options:t})}});var rH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-wordcloud-chart"})},sH=[];const Ov={};var aH=Ct(iH,rH,sH,!1,oH,null,null,null);function oH(e){for(let t in Ov)this[t]=Ov[t]}const Tv=function(){return aH.exports}(),Cv=[Dg,Rg,Pg,Ug,Vg,Fg,zg,Wg,Yg,Zg,Qg,tv,nv,rv,av,lv,uv,dv,pv,gv,yv,xv,wv,Sv,Tv],lH={install(e,t){if(typeof t>"u")for(const n of Cv)e.component(n.name,n);else{if(!(t instanceof Array))throw new TypeError("options must be an array");for(const n of Cv)t.includes(n.name)&&e.component(n.name,n)}}};rt.CcvAlluvialChart=Dg,rt.CcvAreaChart=Rg,rt.CcvBoxplotChart=Pg,rt.CcvBubbleChart=Ug,rt.CcvBulletChart=Vg,rt.CcvCirclePackChart=zg,rt.CcvComboChart=Wg,rt.CcvDonutChart=Yg,rt.CcvGaugeChart=Zg,rt.CcvGroupedBarChart=Qg,rt.CcvHeatmapChart=tv,rt.CcvHistogramChart=nv,rt.CcvLineChart=rv,rt.CcvLollipopChart=av,rt.CcvMeterChart=lv,rt.CcvPieChart=uv,rt.CcvRadarChart=dv,rt.CcvScatterChart=pv,rt.CcvSimpleBarChart=gv,rt.CcvStackedAreaChart=yv,rt.CcvStackedBarChart=xv,rt.CcvTreeChart=wv,rt.CcvTreemapChart=Sv,rt.CcvWordCloudChart=Tv,rt.ExperimentalCcvChoroplethChart=Fg,rt.default=lH,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
83
+ </svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!r.classed("focal"),o=w(t.model.getOptions(),"canvasZoom","enabled");let c=!1;if(!a){let l=[],u=[],d=null;if(i.children){i.depth>1&&o&&(c=!0,r.classed("clickable",!0)),l=i.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:Ot(f,"tooltip.totalLabel")||"Total",value:i.value,bold:!0}],t.highlightChildren(i.children)}else d=i.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{color:h,label:i.data.name,labelIcon:c&&o&&s<=2?t.getZoomIcon():null,value:d},...l,...u]})}t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:r,datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),i.children&&t.unhighlightChildren(i.children),t.services.events.dispatchEvent(M.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})}).on("click",function(n,i){const r=P(this),s=r.classed("non-focal"),a=w(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");P(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,vi)}else if(i.depth===2&&i.children&&!s&&a){const o=t.parent.selectAll("circle.node");P(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=i,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(i,o,vi),n.stopPropagation()}t.services.events.dispatchEvent(M.CirclePack.CIRCLE_CLICK,{event:n,element:r,datum:i})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function ER(e,t){const n=Ni(this._current,e);return i=>(this._current=n(i),t(this._current))}class eg extends ht{constructor(){super(...arguments),this.type="pie",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r.data[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Et.innerRadius}render(t=!0){const n=this,i=this.getComponentContainer(),r=this.getOptions(),{groupMapsTo:s}=r.data,{valueMapsTo:a}=r.pie,o=this.model.getDisplayData().filter(S=>S[a]>0),c=this.computeRadius();this.arc=lr().innerRadius(this.getInnerRadius()).outerRadius(c),this.hoverArc=lr().innerRadius(this.getInnerRadius()).outerRadius(c+Et.hoverArc.outerRadiusOffset);const l=TE().value(S=>S[a]).sort(w(r,"pie","sortFunction")).padAngle(Et.padAngle)(o),u=I.appendOrSelect(i,"g.slices").attr("role",at.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,S=>S.data[s]);u.exit().attr("opacity",0).remove(),u.enter().append("path").classed("slice",!0).attr("opacity",0).merge(u).attr("class",S=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:S.data[s],originalClassName:"slice"})).style("fill",S=>n.model.getFillColor(S.data[s])).attr("d",this.arc).transition().call(S=>this.services.transitions.setupTransition({transition:S,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",S=>`${S[a]}, ${Dp(S.data[a],o,a)+"%"}`).attrTween("d",function(S){return ER.bind(this)(S,n.arc)});const d=r.pie.labels.enabled,h=d?l.filter(S=>S.data[a]>0):[],f=I.appendOrSelect(i,"g.labels").attr("role",at.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,S=>S.data[s]);f.exit().attr("opacity",0).remove();const p=f.enter().append("text").classed("pie-label",!0),g=[];p.merge(f).style("text-anchor","middle").text(S=>r.pie.labels.formatter?r.pie.labels.formatter(S):Dp(S.data[a],o,a)+"%").datum(function(S){const A=c+7,D=(S.endAngle-S.startAngle)/2+S.startAngle,L=D/Math.PI*180,C=this.getComputedTextLength();return S.textOffsetX=C/2,S.textOffsetY=L>90&&L<270?10:0,S.xPosition=(S.textOffsetX+A)*Math.sin(D),S.yPosition=(S.textOffsetY+A)*-Math.cos(D),S}).attr("transform",function(S,A){const D=h.length,L=(S.endAngle-S.startAngle)*(180/Math.PI);if(A>=D-2&&L<Et.callout.minSliceDegree){let C,B;return S.index===D-1?(C=S.xPosition+Et.callout.offsetX+Et.callout.textMargin+S.textOffsetX,B=S.yPosition-Et.callout.offsetY,S.direction=qs.RIGHT,g.push(S)):(C=S.xPosition-Et.callout.offsetX-S.textOffsetX-Et.callout.textMargin,B=S.yPosition-Et.callout.offsetY,S.direction=qs.LEFT,g.push(S)),`translate(${C}, ${B})`}return`translate(${S.xPosition}, ${S.yPosition})`}),this.renderCallouts(g);const m=w(r,"donut")?"donut":"pie",v=w(r,m,"alignment"),{width:x}=I.getSVGElementSize(this.getParent(),{useAttrs:!0}),b=d?Et.xOffset:0,O=d?Et.yOffset:0;let E=c+b;v===Nt.CENTER?E=x/2:v===Nt.RIGHT&&(E=x-c-Et.xOffset);let T=c+O;g.length>0&&(T+=Et.yOffsetCallout),i.attr("x",E+7).attr("y",T),this.addEventListeners()}renderCallouts(t){const n=I.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",at.GROUP).attr("data-name","callouts"),i=n.selectAll("g.callout").data(t);i.exit().remove();const r=i.enter().append("g").classed("callout",!0).attr("role",at.GROUP).attr("aria-roledescription","label callout");r.merge(i).datum(function(s){const{xPosition:a,yPosition:o,direction:c}=s;return c===qs.RIGHT?(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a+Et.callout.offsetX,y:o-Et.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x-Et.callout.horizontalLineLength):(s.startPos={x:a,y:o+s.textOffsetY},s.endPos={x:a-Et.callout.offsetX,y:o-Et.callout.offsetY+s.textOffsetY},s.intersectPointX=s.endPos.x+Et.callout.horizontalLineLength),s}),r.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return P(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.startPos.x).attr("y1",s=>s.startPos.y).attr("x2",s=>s.intersectPointX).attr("y2",s=>s.endPos.y),r.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return P(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",s=>s.intersectPointX).attr("y1",s=>s.endPos.y).attr("x2",s=>s.endPos.x).attr("y2",s=>s.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEOVER,{event:n,element:P(this),datum:i});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{label:i.data[s],value:i.data[a]}]})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Pie.SLICE_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc),t.services.events.dispatchEvent(M.Pie.SLICE_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}computeRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0}),i=this.getOptions(),r=Math.min(t,n)/2;return i.pie.labels.enabled?r+Et.radiusOffset:r}}class SR extends eg{constructor(){super(...arguments),this.type="donut",this.renderType=K.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer().select("g.center").remove();return}const i=I.appendOrSelect(this.getComponentContainer(),"g.center"),r=this.getOptions(),s=this.computeRadius(),a=w(r,"donut","center","label");I.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>r.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(P(this))}),a!==null&&a!==""&&I.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>r.donut.center.titleFontSize(s)).attr("y",r.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let i=w(n,"donut","center","number");i===null&&(i=this.model.getDisplayData().reduce((o,c)=>o+c[n.pie.valueMapsTo],0));const r=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;r%1===0&&i%1===0?s=hu:s=ue;const a=s(r,i);return o=>{const{numberFormatter:c}=n.donut.center;t.text(c(a(o)))}}}const ng="4,10 8,6 12,10",ig="12,6 8,10 4,6";class OR extends ht{constructor(){super(...arguments),this.type="gauge",this.renderType=K.SVG}getValue(){var t;return((t=this.model.getData().find(n=>n.group==="value"))==null?void 0:t.value)??null}getValueRatio(){return Am(this.getValue(),0,100)/100}getDelta(){var t;return((t=this.model.getData().find(n=>n.group==="delta"))==null?void 0:t.value)??null}getArcRatio(){const t=this.getOptions();return w(t,"gauge","type")===fi.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(w(n,"gauge","deltaArrow","direction")){case fl.UP:return ng;case fl.DOWN:return ig;default:return t>0?ng:ig}}render(t=!0){const n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),r=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),c=s*a,l=o+c,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=lr().innerRadius(h).outerRadius(d).startAngle(l).endAngle(u),this.arc=lr().innerRadius(h).outerRadius(d).startAngle(o).endAngle(l),I.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([r]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>w(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",v=>v),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const p=w(i,"gauge","alignment"),{width:g}=I.getSVGElementSize(this.getParent(),{useAttrs:!0});let m=d;p===Nt.CENTER?m=g/2:p===Nt.RIGHT&&(m=g-d),n.attr("x",m).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),i=w(n,"gauge","type"),r=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=w(n,"gauge","valueFontSize"),c=w(n,"gauge","deltaFontSize"),l=w(n,"gauge","numberSpacing"),u=w(n,"gauge","showPercentageSymbol");let d=0;i===fi.FULL&&!s?d=c(a):i===fi.SEMI&&s&&(d=-(c(a)+l));const h=I.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=I.appendOrSelect(h,"g.gauge-value-number"),g=w(n,"gauge","numberFormatter"),m=p.selectAll("text.gauge-value-number").data([r]);m.enter().append("text").attr("class","gauge-value-number").merge(m).style("font-size",`${f}px`).attr("text-anchor","middle").text(S=>g(S));const{width:v}=I.getSVGElementSize(I.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,b=u?"%":"",O=I.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",v/2).text(b),{width:E,height:T}=I.getSVGElementSize(O,{useBBox:!0});O.attr("y",`-${T/2}px`),p.attr("transform",`translate(-${E/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),i=this.getOptions(),r=this.getDelta();if(r){const s=this.computeRadius(),a=r?w(i,"gauge","deltaFontSize"):()=>0,o=r?w(i,"gauge","numberFormatter"):()=>null,c=w(i,"gauge","deltaArrow","size"),l=w(i,"gauge","numberSpacing"),u=w(i,"gauge","showPercentageSymbol"),d=I.appendOrSelect(n,"g.gauge-numbers"),h=I.appendOrSelect(d,"g.gauge-delta").attr("transform",`translate(0, ${a(s)+l})`),f=I.appendOrSelect(h,"text.gauge-delta-number"),p=u?"%":"";f.data(r===null?[]:[r]),f.enter().append("text").classed("gauge-delta-number",!0).merge(f).attr("text-anchor","middle").style("font-size",`${a(s)}px`).text(x=>`${o(x)}${p}`);const{width:g}=I.getSVGElementSize(I.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),m=w(i,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(r!==null&&m?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-c(s)-g/2).attr("y",-c(s)/2-a(s)*.35).attr("width",c(s)).attr("height",c(s)).attr("viewBox","0 0 16 16").each(function(){const x=P(this);I.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const b=w(i,"gauge","status");I.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",b!==null?`gauge-delta-arrow status--${b}`:"").attr("points",t.getArrow(r))}),v.exit().remove(),f.exit().remove()}else{const s=n.select("g.gauge-delta");s.empty()||s.remove()}}getInnerRadius(){const t=this.computeRadius(),n=w(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,i){t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEOVER,{event:n,element:P(this),datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEMOVE,{event:n,element:r,datum:i})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Gauge.ARC_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Gauge.ARC_MOUSEOUT,{event:n,element:r,datum:i})})}computeRadius(){const t=this.getOptions(),n=w(t,"gauge","type"),{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});return n===fi.SEMI?Math.min(i/2,r):Math.min(i/2,r/2)}}class rg extends Ec{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=K.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),i=this.getOptions(),{groupMapsTo:r}=i.data;this.setGroupScale();const s=this.getComponentContainer({withinChartClip:!0}),a=Cr(n.map(u=>{const d=this.services.cartesianScales.getDomainIdentifier(u);return u[d]&&typeof u[d].toString=="function"?u[d].toString():u[d]})),o=s.selectAll("g.bars").data(a,u=>u);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",at.GROUP).attr("data-name","bars").merge(o);c.transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-group-update-enter",animate:t})).attr("transform",u=>{const d=this.services.cartesianScales.getDomainValue(u)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Ft.VERTICAL?`translate(${d}, 0)`:`translate(0, ${d})`});const l=c.selectAll("path.bar").data(u=>this.getDataCorrespondingToLabel(u),u=>u[r]);l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:u[r],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[r])).attr("d",u=>{const d=this.groupScale(u[r]),h=this.getBarWidth(),f=d,p=d+h,g=this.services.cartesianScales.getRangeAxisPosition({datum:u}),m=this.services.cartesianScales.getValueThroughAxisPosition(g,0),v=this.services.cartesianScales.getRangeValue(u),x=this.services.cartesianScales.getDomainValue(u)-h/2,b=x+h;if(!this.isOutsideZoomedDomain(x,b))return ee({x0:f,x1:p,y0:m,y1:v},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>u.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,data:[i]})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(n=>{const i=this.services.cartesianScales.getDomainIdentifier(n);return n[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let i=this.defaultStepFactor;if(typeof t.step=="function")i=t.step();else if(n.length>0){const r=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(r){const s=this.services.cartesianScales.getDomainIdentifier(r.data[0]);i=Math.abs(t(r.data[1][s])-t(r.data[0][s]))}}return i}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=w(t,"bars","width"),i=w(t,"bars","maxWidth");if(n!==null&&(i===null||n<=i))return n;const r=this.model.getGroupedData(this.configs.groups).length,s=this.getTotalGroupPadding();return Math.min(i,(this.getDomainScaleStep()-s)/r)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=nr().domain(t).rangeRound([0,this.getGroupWidth()])}}class TR extends ht{constructor(){super(...arguments),this.type="heatmap",this.renderType=K.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:i}=n,r=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),c=this.services.cartesianScales.getMainXScale(),l=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[i]!==void 0?(u=a,r.forEach(p=>{if(typeof this.matrix[i][p].value=="number"){const g=this.matrix[i][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][i].value=="number"){const g=this.matrix[p][i].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),c(i)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${c(i)}, ${cn(l.range())})`):l(i)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${cn(c.range())},${l(i)})`),this.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n.event,hoveredElement:P(t.detail.element),items:[{label:u,value:i,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(M.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(M.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(M.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(M.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(M.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0});n.lower();const{cartesianScales:i}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),w(this.getOptions(),"data","loading"))return;const r=i.getMainXScale(),s=i.getMainYScale(),a=i.getDomainIdentifier(),o=i.getRangeIdentifier(),c=this.model.getUniqueDomain(),l=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=r.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/c.length),this.yBandwidth=Math.abs((h[1]-h[0])/l.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${r(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value))).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,i){const r=I.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);I.appendOrSelect(r,"line.top").attr("x1",-1).attr("x2",n+1),I.appendOrSelect(r,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",i+1),I.appendOrSelect(r,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",i).attr("y2",i),I.appendOrSelect(r,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",i+1)}determineDividerStatus(){const t=w(this.getOptions(),"heatmap","divider","state");return t!==pr.OFF&&(t===pr.AUTO&&yl.minCellDividerDimension<=this.xBandwidth&&yl.minCellDividerDimension<=this.yBandwidth||t===pr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,i=this.getOptions(),r=Ot(i,"tooltip.totalLabel"),s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),c=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(l,u){const d=P(this),h=d.select("rect.heat");if(!h.classed("null-state")){const f=Mr(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${f.x+t.translationUnits.x}, ${f.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEOVER,{event:l,element:h,datum:u}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:l,items:[{label:o,value:u[s]},{label:c,value:u[a]},{label:r||"Total",value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(l,u){t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEMOVE,{event:l,element:P(this),datum:u}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:l})}).on("click",function(l,u){t.services.events.dispatchEvent(M.Heatmap.HEATMAP_CLICK,{event:l,element:P(this),datum:u})}).on("mouseout",function(l,u){const d=P(this).select("rect.heat"),h=d.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),h||(t.services.events.dispatchEvent(M.Heatmap.HEATMAP_MOUSEOUT,{event:l,element:d,datum:u}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{event:l,hoveredElement:d}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class CR extends ht{constructor(){super(...arguments),this.type="histogram",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer(),i=this.model.getOptions(),{groupIdentifier:r}=i,{groupMapsTo:s}=i.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),c=n.selectAll("g.bars").data(a,u=>Ot(u,`0.${s}`));c.exit().attr("opacity",0).remove(),c.enter().append("g").classed("bars",!0).attr("role",at.GROUP);const l=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).attr(r,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s])).attr("d",u=>{const d=Ot(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>i.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Ft.VERTICAL?m+=1:m-=1),ee({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>w(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,i=this;this.parent.selectAll("path.bar").on("mouseover",function(r,s){const a=P(this);a.classed("hovered",!0);const o=parseFloat(Ot(s,"data.x0")),c=parseFloat(Ot(s,"data.x1")),l=i.services.cartesianScales.getRangeAxisPosition(),u=i.services.cartesianScales.getScaleLabel(l);i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,items:[{label:Ot(t,"bins.rangeLabel")||"Range",value:`${o} – ${c}`},{label:t.tooltip.groupLabel||"Group",value:s[n],class:i.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:s[n]})},{label:u,value:Ot(s,`data.${s[n]}`)}]})}).on("mousemove",function(r){i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("mouseout",function(){P(this).classed("hovered",!1),i.services.events.dispatchEvent(M.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class MR extends Ve{constructor(){super(...arguments),this.type="lollipop",this.renderType=K.SVG,this.handleScatterOnHover=t=>{const n=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[r]!==n.datum[r]?Ue.weight.unselected:Ue.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",Ue.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[r]!==n.datum().name?Ue.opacity.unselected:Ue.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",Ue.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.model.getOptions(),{groupMapsTo:r}=i.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),c=s.getDomainIdentifier(),l=m=>s.getDomainValue(m),u=m=>s.getRangeValue(m),d=s.getOrientation(),[h,f]=an(l,u,d),p=n.selectAll("line.line").data(this.getScatterData(),m=>`${m[r]}-${m[c]}`);p.exit().attr("opacity",0).remove();const g=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",m=>this.model.getColorClassName({classNameTypes:[J.STROKE],dataGroupName:m[r],originalClassName:"line"})).transition().call(m=>this.services.transitions.setupTransition({transition:m,name:"lollipop-line-update-enter",animate:t})).style("stroke",m=>this.model.getFillColor(m[r],m[c],m)).attr("opacity",1);d===Ft.HORIZONTAL?g.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",m=>h(m)-i.points.radius):g.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",m=>f(m)+i.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(M.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(M.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(M.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(M.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class $R extends ht{constructor(){super(...arguments),this.type="meter",this.renderType=K.SVG}getStackedBounds(t,n){let i=0;return t.map((r,s)=>s!==0?(i+=n(r.value),{...r,width:Math.abs(n(r.value)-Gt.dividerWidth),x:i-n(r.value)}):(i=n(r.value),{...r,width:Math.abs(n(r.value)-Gt.dividerWidth),x:0}))}render(t=!0){const n=this,i=this.getComponentContainer(),r=this.getOptions(),s=w(r,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:c}=I.getSVGElementSize(i,{useAttrs:!0}),{groupMapsTo:l}=r.data;let u;w(r,"meter","proportional")===null?u=100:u=w(r,"meter","proportional","total")||this.model.getMaximumDomain(this.model.getDisplayData());const d=Oe().domain([0,u]).range([0,c]),h=this.getStackedBounds(a,d),f=w(r,"meter","height");I.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",f||(s?Gt.height.proportional:Gt.height.default)),I.appendOrSelect(i,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",f||(s?Gt.height.proportional:Gt.height.default));const p=i.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",b=>b.x).attr("y",0).attr("height",()=>w(r,"meter","height")||(s?Gt.height.proportional:Gt.height.default)).attr("class",b=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:b[l],originalClassName:g})).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"meter-bar-update",animate:t})).attr("width",b=>b.value>u?d(u):b.width).style("fill",b=>n.model.getFillColor(b[l])).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",b=>b.value),p.exit().remove();const m=w(r,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const x=i.selectAll("line.peak").data(v==null?[]:[v]);x.enter().append("line").classed("peak",!0).merge(x).attr("y1",0).attr("y2",()=>w(r,"meter","height")||(s?Gt.height.proportional:Gt.height.default)).transition().call(b=>this.services.transitions.setupTransition({transition:b,name:"peak-line-update",animate:t})).attr("x1",b=>d(b)).attr("x2",b=>d(b)).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",b=>b),x.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this,r=w(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),r&&(o.classed("hovered",!0),i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),r&&i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){i.services.events.dispatchEvent(M.Meter.METER_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),r&&(o.classed("hovered",!1),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}class AR extends ht{constructor(){super(...arguments),this.type="radar",this.renderType=K.SVG,this.getLabelDimensions=t=>{const n=I.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),i=I.appendOrSelect(n,"text").text(t),{width:r,height:s}=I.getSVGElementSize(i.node(),{useBBox:!0});return n.remove(),{width:r,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:i,value:r}=w(n,"radar","axes"),s=w(n,"data","groupMapsTo"),a=BD(this.uniqueKeys.map(o=>this.uniqueGroups.map(c=>({[i]:o,[s]:c,[r]:null}))));return nt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:i,value:r}=w(n,"radar","axes"),s=w(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const c=this.uniqueKeys.map(l=>({[s]:a,[i]:l,[r]:null}));return{name:a,data:nt(c,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-blob"})).style("fill-opacity",i=>i.name!==n.datum().name?pn.opacity.unselected:pn.opacity.selected).style("stroke-opacity",i=>i.name!==n.datum().name?pn.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",pn.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer(),{width:i,height:r}=I.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),c=w(o,"data","groupMapsTo"),l=w(o,"radar","axes","value"),{angle:u,value:d}=w(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=pn;this.uniqueKeys=Array.from(new Set(s.map(_=>_[u]))),this.uniqueGroups=Array.from(new Set(s.map(_=>_[c]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const v=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),x=(Math.min(i,r)-v)/2;if(x<=0)return;const b=nr().domain(this.fullDataNormalized.map(_=>_[u])).range([0,2*Math.PI].map(_=>_-Math.PI/2)),O=cn(this.fullDataNormalized.map(_=>_[d])),E=Oe().domain([O>=0?0:O,bn(this.fullDataNormalized.map(_=>_[d]))]).range([g,x]).nice(p),T=E.ticks(p),S=_=>this.model.getFillColor(_),A=$E().angle(_=>b(_[u])+Math.PI/2).radius(_=>E(_[d])).curve($d),D=this.uniqueKeys.map(_=>{const $=this.getLabelDimensions(_).width,y=sL(b(_),x);return $+y}),L={x:bn(D)+h,y:r/2},C=I.appendOrSelect(n,"g.y-axes").attr("role",at.GROUP).selectAll("path").data(T,_=>_),B=_=>this.uniqueKeys.map($=>({[u]:$,[d]:_}));C.join(_=>_.append("path").attr("opacity",0).attr("transform",`translate(${L.x}, ${L.y})`).attr("fill","none").call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",y=>A(B(y)))),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${L.x}, ${L.y})`).attr("d",y=>A(B(y)))),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_axes_exit",animate:t})).attr("d",y=>A(B(y))).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-axes").attr("role",at.GROUP).selectAll("line").data(this.uniqueKeys,_=>_).join(_=>_.append("line").attr("opacity",0).attr("class",$=>`x-axis-${Oi($)}`).attr("stroke-dasharray","0").attr("x1",$=>It(b($),0,L).x).attr("y1",$=>It(b($),0,L).y).attr("x2",$=>It(b($),0,L).x).attr("y2",$=>It(b($),0,L).y).call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",y=>It(b(y),E.range()[0],L).x).attr("y1",y=>It(b(y),E.range()[0],L).y).attr("x2",y=>It(b(y),E.range()[1],L).x).attr("y2",y=>It(b(y),E.range()[1],L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",y=>It(b(y),E.range()[0],L).x).attr("y1",y=>It(b(y),E.range()[0],L).y).attr("x2",y=>It(b(y),E.range()[1],L).x).attr("y2",y=>It(b(y),E.range()[1],L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-labels").attr("role",at.GROUP).selectAll("text").data(this.uniqueKeys).join(_=>_.append("text").text($=>$).attr("opacity",0).attr("x",$=>It(b($),E.range()[1]+h,L).x).attr("y",$=>It(b($),E.range()[1]+h,L).y).style("text-anchor",$=>Qp(b($)).textAnchor).style("dominant-baseline",$=>Qp(b($)).dominantBaseline).call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",y=>It(b(y),E.range()[1]+h,L).x).attr("y",y=>It(b(y),E.range()[1]+h,L).y).end().finally(()=>{const y=w(o,"radar","alignment"),k=this.getAlignmentXOffset(y,n,this.getParent());n.attr("x",k)})),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.blobs").attr("role",at.GROUP).selectAll("path").data(this.groupedDataNormalized,_=>_.name).join(_=>_.append("path").attr("class",$=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:$.name,originalClassName:"blob"})).attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",$=>$.name).attr("opacity",0).attr("transform",t?()=>`translate(${L.x}, ${L.y}) scale(${1+Math.random()*.35})`:`translate(${L.x}, ${L.y})`).style("fill",$=>S($.name)).style("fill-opacity",pn.opacity.selected).style("stroke",$=>S($.name)).call($=>{const y=$.transition().call(k=>this.services.transitions.setupTransition({transition:k,name:"radar_blobs_enter",animate:t}));t&&y.delay(()=>Math.random()*30).attr("transform",`translate(${L.x}, ${L.y})`),y.attr("opacity",1).attr("d",k=>A(k.data))}),_=>(_.attr("class",$=>this.model.getColorClassName({classNameTypes:[J.FILL,J.STROKE],dataGroupName:$.name,originalClassName:"blob"})).style("fill",$=>S($.name)).style("stroke",$=>S($.name)),_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${L.x}, ${L.y})`).attr("d",y=>A(y.data))),_),_=>_.call($=>{const y=$.transition().call(k=>this.services.transitions.setupTransition({transition:k,name:"radar_blobs_exit",animate:t}));t&&y.delay(()=>Math.random()*30).attr("transform",()=>`translate(${L.x}, ${L.y}) scale(${1+Math.random()*.35})`),y.attr("opacity",0).remove()})),I.appendOrSelect(n,"g.dots").attr("role",at.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(_=>w(_,d)!==null)).join(_=>_.append("circle").attr("role",at.GRAPHICS_SYMBOL).attr("aria-label",$=>$[l]),_=>_,_=>_.remove()).attr("class",_=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:_[c],originalClassName:Oi(_[u])})).attr("cx",_=>It(b(_[u]),E(_[d]),L).x).attr("cy",_=>It(b(_[u]),E(_[d]),L).y).attr("r",0).attr("opacity",0).style("fill",_=>S(_[c])),I.appendOrSelect(n,"g.x-axes-rect").attr("role",at.GROUP).selectAll("rect").data(this.uniqueKeys).join(_=>_.append("rect"),_=>_,_=>_.remove()).attr("x",L.x).attr("y",L.y-m/2).attr("width",E.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",_=>`rotate(${Jp(b(_))}, ${L.x}, ${L.y})`),I.appendOrSelect(n,"g.y-labels").attr("role",at.GROUP).selectAll("text").data(xe(T)).join(_=>_.append("text").attr("opacity",0).text($=>$).attr("x",$=>It(-Math.PI/2,E($),L).x+f).attr("y",$=>It(-Math.PI/2,E($),L).y).style("text-anchor","start").style("dominant-baseline","middle").call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_update",animate:t})).text(y=>y).attr("opacity",1).attr("x",y=>It(-Math.PI/2,E(y),L).x+f).attr("y",y=>It(-Math.PI/2,E(y),L).y)),_=>_.call($=>$.transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,i){const r=I.getSVGElementSize(n,{useBBox:!0}),{width:s}=I.getSVGElementSize(i,{useAttrs:!0});let a=0;return t===Nt.CENTER?a=Math.floor((s-r.width)/2):t===Nt.RIGHT&&(a=s-r.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=w(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(i,r){const s=P(this);t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEOVER,{event:i,element:s,datum:r});const a=t.parent.select(`.x-axes .x-axis-${Oi(r)}`),o=t.parent.selectAll(`.dots circle.${Oi(r)}`),c=t.model.getActiveDataGroupNames(),l=t.getOptions(),{groupMapsTo:u}=l.data,d=w(l,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>c.indexOf(f[u])!==-1?1:0).attr("r",pn.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===r&&c.indexOf(f[u])!==-1);t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:i,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u]),class:t.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(i,r){const s=P(this);t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEMOVE,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(M.Radar.X_AXIS_CLICK,{event:i,element:P(this),datum:r})}).on("mouseout",function(i,r){const s=P(this),a=t.parent.select(`.x-axes .x-axis-${Oi(r)}`),o=t.parent.selectAll(`.dots circle.${Oi(r)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(M.Radar.X_AXIS_MOUSEOUT,{event:i,element:s,datum:r}),t.services.events.dispatchEvent(M.Tooltip.HIDE)})}}class sg extends Ec{constructor(){super(...arguments),this.type="simple-bar",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-simple-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:i}=n.data,r=this.getComponentContainer({withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=r.selectAll("path.bar").data(s,c=>c[i]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i])).attr("d",c=>{const l=this.services.cartesianScales.getRangeIdentifier(),u=this.getBarWidth(),d=c[l],h=this.services.cartesianScales.getDomainValue(c)-u/2,f=h+u;let p,g;if(Array.isArray(d)&&d.length===2)p=this.services.cartesianScales.getRangeValue(d[0]),g=this.services.cartesianScales.getRangeValue(d[1]);else{const v=this.services.cartesianScales.getRangeScale().domain()[0];p=this.services.cartesianScales.getRangeValue(Math.max(0,v)),g=this.services.cartesianScales.getRangeValue(c)}const m=Math.abs(g-p);if(m!==0&&m<2&&(d>0&&a===Ft.VERTICAL||d<0&&a===Ft.HORIZONTAL?g=p-2:g=p+2),!this.isOutsideZoomedDomain(h,f))return ee({x0:h,x1:f,y0:p,y1:g},a)}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,i){const r=P(this);r.classed("hovered",!0),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,data:[i]})}).on("mousemove",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:n,element:P(this),datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1),t.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class LR extends ne{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=w(this.getOptions(),"data","loading"),i=!w(this.getOptions(),"grid","x","enabled")&&!w(this.getOptions(),"grid","y","enabled")&&!w(this.getOptions(),"axes","bottom","visible")&&!w(this.getOptions(),"axes","left","visible");n&&!i?super.renderGridSkeleton(n):n&&i?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),i=[100],r=I.appendOrSelect(this.backdrop,"g.y.skeleton"),s=r.selectAll("line").data(i);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),r.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-skeleton.DAII"),I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class ag extends ht{constructor(){super(...arguments),this.type="area-stacked",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,i=this.getOptions(),{groupMapsTo:r}=i.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>w(s,0,r)!==n.datum().name?Ne.opacity.unselected:Ne.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Ne.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({withinChartClip:!0}),i=this,r=this.getOptions(),{groupMapsTo:s}=r.data,a=Object.keys(r.axes).some(f=>r.axes[f].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),c=w(o,0,0),l=this.services.cartesianScales.getDomainAxisPosition({datum:c}),u=this.services.cartesianScales.getRangeAxisPosition({datum:c}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,f=>w(f,0,s));this.areaGenerator=sl().x(f=>this.services.cartesianScales.getValueThroughAxisPosition(l,f.data.sharedStackKey)).y0(f=>d(f[0])).y1(f=>d(f[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,f=>w(f,0,s)).attr("class","area").attr("class",f=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:w(f,0,s),originalClassName:"area"})).style("fill",f=>i.model.getFillColor(w(f,0,s))).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",f=>w(f,0,s)).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"area-update-enter",animate:t})).attr("opacity",Ne.opacity.selected).attr("d",this.areaGenerator)}}class og extends Ec{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-bar"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,l=>w(l,0,r));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",at.GROUP).attr("data-name","bars");const c=n.selectAll("g.bars").selectAll("path.bar").data(l=>l,l=>l.data.sharedStackKey);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).transition().call(l=>this.services.transitions.setupTransition({transition:l,name:"bar-update-enter",animate:t})).attr("class",l=>this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:l[r],originalClassName:"bar"})).style("fill",l=>this.model.getFillColor(l[r])).attr("d",l=>{const u=l.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(l[0]);let g=this.services.cartesianScales.getRangeValue(l[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>i.bars.dividerSize){const m=l[0]<0&&l[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Ft.VERTICAL?g+=l[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Ft.VERTICAL?g+=1:g-=1)}return ee({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",at.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",l=>l[1]-l[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this;this.parent.selectAll("path.bar").on("mouseover",function(r,s){const a=P(this);a.classed("hovered",!0),i.services.events.dispatchEvent(M.Bar.BAR_MOUSEOVER,{event:r,element:a,datum:s});let o=i.model.getDisplayData(i.configs.groups).find(c=>{const l=i.services.cartesianScales.getDomainIdentifier(c),u=i.services.cartesianScales.getRangeIdentifier(c);return c[u]===s.data[s[n]]&&c[l].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(o===void 0){const c=i.services.cartesianScales.getDomainIdentifier(),l=i.services.cartesianScales.getRangeIdentifier();o={[c]:s.data.sharedStackKey,[l]:s.data[s[n]],[n]:s[n]}}i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:r,hoveredElement:a,data:[o]})}).on("mousemove",function(r,s){const a=P(this);i.services.events.dispatchEvent(M.Bar.BAR_MOUSEMOVE,{event:r,element:a,datum:s}),i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:r})}).on("click",function(r,s){i.services.events.dispatchEvent(M.Bar.BAR_CLICK,{event:r,element:P(this),datum:s})}).on("mouseout",function(r,s){const a=P(this);a.classed("hovered",!1),i.services.events.dispatchEvent(M.Bar.BAR_MOUSEOUT,{event:r,element:a,datum:s}),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(w(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),i=I.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=this.model.getStackKeys().length,s=w(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,i*s/r)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class lg extends Ve{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=K.SVG}render(t){if(!w(this.getOptions(),"points","enabled"))return;const n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:r}=i.data,s=Object.keys(i.axes).some(u=>i.axes[u].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=n.selectAll("g.dots").data(a,u=>w(u,0,r));o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("dots",!0).attr("role",at.GROUP).merge(o).selectAll("circle.dot").data(u=>u);c.exit().attr("opacity",0).remove();const l=c.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(c).datum(u=>{const d=u[r],h=this.services.cartesianScales.getDomainIdentifier(u),f=this.services.cartesianScales.getRangeIdentifier(u);return{[r]:d,[h]:u.data.sharedStackKey,[f]:u[1]}});this.styleCircles(l,t),this.addEventListeners()}getTooltipData(t,n){const i=this.getOptions(),{groupMapsTo:r}=i.data,s=Object.keys(i.axes).some(c=>i.axes[c].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((c,l)=>{c.forEach((u,d)=>{const h=u[r],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[l][d].data[h]),p!==null&&o.push({[r]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(c=>{const l=this.services.cartesianScales.getDomainIdentifier(c),u=this.services.cartesianScales.getRangeIdentifier(c);return o.find(d=>d[r]==c[r]&&d[l]==c[l]&&d[u]==c[u])!==void 0})}}const Ai=6;class DR extends ht{constructor(){super(...arguments),this.type="tree",this.renderType=K.SVG}getLongestLabel(t){let n="";return t.forEach(i=>{const r=i.children?this.getLongestLabel(i.children):"";(r.length>n.length||i.name.length>n.length)&&(n=r.length>i.name.length?r:i.name)}),n}getMockLabelWidth(t,n){const i=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:r}=I.getSVGElementSize(i.node(),{useBBox:!0});return i.remove(),r}render(t=!0){const n=this.getComponentContainer();n.html("");const{width:i,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(i<1||r<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=w(s,"tree","rootTitle")||"Tree",c=this.getMockLabelWidth(n,o),l=this.getLongestLabel(a),u=this.getMockLabelWidth(n,l),d={top:0,right:0,bottom:0,left:c>0?c+Ai:30-Ai},h=Ji({name:o,children:a}),f=10,p=i/6,g=T=>{const S=h.descendants().reverse(),A=h.links();let D=h,L=h;h.eachBefore(U=>{U.x<D.x&&(D=U),U.x>L.x&&(L=U)});const C=L.x-D.x,B=n.transition().call(U=>this.services.transitions.setupTransition({transition:U,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,D.x,i,C].join(" ")),_=E.selectAll("g").data(S,U=>U.id),$=this,y=_.enter().append("g").attr("transform",()=>`translate(${T.y0},${T.x0})`).attr("class",U=>U.depth!==0&&U.children&&U.children.length>0?"clickable":null).on("mouseover",function(U,N){$.services.events.dispatchEvent(M.Tree.NODE_MOUSEOVER,{event:U,element:P(this),datum:N})}).on("click",function(U,N){N.depth!==0&&(N.children=N.children?null:N._children,g(N)),$.services.events.dispatchEvent(M.Tree.NODE_CLICK,{event:U,element:P(this),datum:N})}).on("mouseout",function(U,N){$.services.events.dispatchEvent(M.Tree.NODE_MOUSEOUT,{event:U,element:P(this),datum:N})});y.append("circle").attr("r",2.5).attr("class",U=>U._children?"parent":"child").attr("stroke-width",10),y.append("text").attr("dy","0.31em").attr("x",U=>U._children?-Ai:Ai).attr("text-anchor",U=>U._children?"end":"start").text(U=>U.data.name).clone(!0).attr("class","text-stroke").lower(),_.merge(y).transition(B).attr("transform",U=>`translate(${U.y},${U.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),_.exit().transition(B).remove().attr("transform",()=>`translate(${T.y},${T.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const k=O.selectAll("path").data(A,U=>U.target.id),R=k.enter().append("path").attr("d",()=>{const U={x:T.x0,y:T.y0};return b({source:U,target:U})});k.merge(R).transition(B).attr("d",b),k.exit().transition(B).remove().attr("d",()=>{const U={x:T.x,y:T.y};return b({source:U,target:U})}),h.eachBefore(U=>{U.x0=U.x,U.y0=U.y})},m=h.descendants(),v=m[m.length-1].depth,x=w(s,"tree","type")===dl.DENDROGRAM?Zx().size([r,i-u-v*Ai-c]):Nb().nodeSize([f,p]).size([r,i-u-v*Ai-c]),b=IE().x(T=>T.y).y(T=>T.x);h.x0=p/2,h.y0=0,h.descendants().forEach((T,S)=>{T.id=S,T._children=T.children}),x(h),n.attr("viewBox",[-d.left,-d.top,i,f]).style("user-select","none");const O=n.append("g").attr("class","links"),E=n.append("g").attr("class","nodes");g(h)}}var kR="#000000",RR="#ffffff",IR="#fcf4d6",PR="#fddc69",NR="#f1c21b",UR="#d2a106",BR="#b28600",HR="#8e6a00",VR="#684e00",FR="#483700",GR="#302400",zR="#1c1500",jR={10:IR,20:PR,30:NR,40:UR,50:BR,60:HR,70:VR,80:FR,90:GR,100:zR},qR="#fff2e8",WR="#ffd9be",YR="#ffb784",XR="#ff832b",ZR="#eb6200",KR="#ba4e00",QR="#8a3800",JR="#5e2900",tI="#3e1a00",eI="#231000",nI={10:qR,20:WR,30:YR,40:XR,50:ZR,60:KR,70:QR,80:JR,90:tI,100:eI},iI="#fff1f1",rI="#ffd7d9",sI="#ffb3b8",aI="#ff8389",oI="#fa4d56",lI="#da1e28",cI="#a2191f",uI="#750e13",hI="#520408",dI="#2d0709",fI={10:iI,20:rI,30:sI,40:aI,50:oI,60:lI,70:cI,80:uI,90:hI,100:dI},pI="#fff0f7",mI="#ffd6e8",gI="#ffafd2",vI="#ff7eb6",yI="#ee5396",_I="#d02670",xI="#9f1853",bI="#740937",wI="#510224",EI="#2a0a18",SI={10:pI,20:mI,30:gI,40:vI,50:yI,60:_I,70:xI,80:bI,90:wI,100:EI},OI="#f6f2ff",TI="#e8daff",CI="#d4bbff",MI="#be95ff",$I="#a56eff",AI="#8a3ffc",LI="#6929c4",DI="#491d8b",kI="#31135e",RI="#1c0f30",II={10:OI,20:TI,30:CI,40:MI,50:$I,60:AI,70:LI,80:DI,90:kI,100:RI},PI="#edf5ff",NI="#d0e2ff",UI="#a6c8ff",BI="#78a9ff",HI="#4589ff",VI="#0f62fe",FI="#0043ce",GI="#002d9c",zI="#001d6c",jI="#001141",qI={10:PI,20:NI,30:UI,40:BI,50:HI,60:VI,70:FI,80:GI,90:zI,100:jI},WI="#e5f6ff",YI="#bae6ff",XI="#82cfff",ZI="#33b1ff",KI="#1192e8",QI="#0072c3",JI="#00539a",tP="#003a6d",eP="#012749",nP="#061727",iP={10:WI,20:YI,30:XI,40:ZI,50:KI,60:QI,70:JI,80:tP,90:eP,100:nP},rP="#d9fbfb",sP="#9ef0f0",aP="#3ddbd9",oP="#08bdba",lP="#009d9a",cP="#007d79",uP="#005d5d",hP="#004144",dP="#022b30",fP="#081a1c",pP={10:rP,20:sP,30:aP,40:oP,50:lP,60:cP,70:uP,80:hP,90:dP,100:fP},mP="#defbe6",gP="#a7f0ba",vP="#6fdc8c",yP="#42be65",_P="#24a148",xP="#198038",bP="#0e6027",wP="#044317",EP="#022d0d",SP="#071908",OP={10:mP,20:gP,30:vP,40:yP,50:_P,60:xP,70:bP,80:wP,90:EP,100:SP},TP="#f2f4f8",CP="#dde1e6",MP="#c1c7cd",$P="#a2a9b0",AP="#878d96",LP="#697077",DP="#4d5358",kP="#343a3f",RP="#21272a",IP="#121619",PP={10:TP,20:CP,30:MP,40:$P,50:AP,60:LP,70:DP,80:kP,90:RP,100:IP},NP="#f4f4f4",UP="#e0e0e0",BP="#c6c6c6",HP="#a8a8a8",VP="#8d8d8d",FP="#6f6f6f",GP="#525252",zP="#393939",jP="#262626",qP="#161616",WP={10:NP,20:UP,30:BP,40:HP,50:VP,60:FP,70:GP,80:zP,90:jP,100:qP},YP="#f7f3f2",XP="#e5e0df",ZP="#cac5c4",KP="#ada8a8",QP="#8f8b8b",JP="#726e6e",tN="#565151",eN="#3c3838",nN="#272525",iN="#171414",rN={10:YP,20:XP,30:ZP,40:KP,50:QP,60:JP,70:tN,80:eN,90:nN,100:iN},cg={black:{100:kR},blue:qI,coolGray:PP,cyan:iP,gray:WP,green:OP,magenta:SI,orange:nI,purple:II,red:fI,teal:pP,warmGray:rN,white:{0:RR},yellow:jR};const sN=e=>{if(!e)return null;for(const t of Object.keys(cg)){const n=cg[t];for(const i of Object.keys(n))if(n[+i]===e)return i}return null},ug=function(){const e=P(this.parentNode).select("rect.leaf"),t=getComputedStyle(e.node(),null).getPropertyValue("fill"),n=Ge(t);let i;if(n&&(i=sN(n?n.hex():null)),i==null){const r=Ya(n).l;i=Math.abs(r*100-100)}return i>50?"white":"black"};let aN=0;class oN extends ht{constructor(){super(...arguments),this.type="treemap",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-treemap"})).attr("opacity",i=>i.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer();this.model.getData();const i=this.model.getDisplayData(),r=this.model.getOptions(),s=w(window,"location"),{width:a,height:o}=I.getSVGElementSize(n,{useAttrs:!0}),c=Ji({name:r.title||"Treemap",children:i}).sum(f=>f.value).sort((f,p)=>p.value-f.value),l=Fb().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(c),u=n.selectAll("g[data-name='leaf']").data(l.leaves(),f=>f.data.name);u.exit().attr("opacity",0).remove();const d=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>aN++).merge(u);d.attr("data-name","leaf").transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"treemap-group-update",animate:t})).attr("transform",f=>`translate(${f.x0},${f.y0})`);const h=d.selectAll("rect.leaf").data(f=>[f]);h.exit().attr("width",0).attr("height",0).remove(),h.enter().append("rect").classed("leaf",!0).merge(h).attr("width",0).attr("height",0).attr("id",function(){const f=P(this.parentNode).attr("data-uid");return`${r.style.prefix}-leaf-${f}`}).attr("class",f=>{for(;f.depth>1;)f=f.parent;return this.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:f.data.name,originalClassName:"leaf"})}).transition().call(f=>this.services.transitions.setupTransition({transition:f,name:"treemap-leaf-update-enter",animate:t})).attr("width",f=>f.x1-f.x0).attr("height",f=>f.y1-f.y0).style("fill",f=>{for(;f.depth>1;)f=f.parent;return this.model.getFillColor(f.data.name)}),d.selectAll("clipPath").data(f=>f.data.showLabel!==!0?[]:[1],f=>f).join(f=>f.append("clipPath").attr("id",function(){const p=P(this.parentNode).attr("data-uid");return`${r.style.prefix}-clip-${p}`}).append("use").attr("xlink:href",function(){const p=P(this.parentNode.parentNode).attr("data-uid"),g=`${r.style.prefix}-leaf-${p}`;return new URL(`#${g}`,s)+""}),f=>null,f=>f.remove()),d.selectAll("text").data(f=>{if(f.data.showLabel!==!0)return[];let p=f;for(;p.depth>1;)p=p.parent;const g=Ya(this.model.getFillColor(p.data.name));return[{text:f.data.name,color:g.l<.5?"white":"black"}]},f=>f).join(f=>{const p=f.append("text").text(g=>g.text).style("fill",ug).attr("x",7).attr("y",18);return s&&p.attr("clip-path",function(){const g=P(this.parentNode).attr("data-uid"),m=`${r.style.prefix}-clip-${g}`;return`url(${new URL(`#${m}`,s)+""})`}),p},f=>f.text(p=>p.text).style("fill",ug),f=>f.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,i){const r=P(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=i;for(;a.depth>1;)a=a.parent;r.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const c=t.model.getFillColor(o.parent.data.name);return c&&(s=c),Ge(s).darker(.7).toString()}),t.services.events.dispatchEvent(M.Tooltip.SHOW,{event:n,hoveredElement:r,items:[{color:s,label:a.data.name,bold:!0},{label:i.data.name,value:i.data.value}]}),t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEOVER,{event:n,element:r,datum:i})}).on("mousemove",function(n,i){const r=P(this);t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEMOVE,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.MOVE,{event:n})}).on("click",function(n,i){t.services.events.dispatchEvent(M.Treemap.LEAF_CLICK,{event:n,element:P(this),datum:i})}).on("mouseout",function(n,i){const r=P(this);r.classed("hovered",!1);let s=i;for(;s.depth>1;)s=s.parent;r.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name)),t.services.events.dispatchEvent(M.Treemap.LEAF_MOUSEOUT,{event:n,element:r,datum:i}),t.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:r})})}}class lN extends ht{constructor(){super(...arguments),this.type="wordcloud",this.renderType=K.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:i}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-wordcloud"})).attr("opacity",r=>r[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(M.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(M.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,i=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),s=this.getFontSizeScale(r),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:c}=a.wordCloud,{groupMapsTo:l}=a.data,{width:u,height:d}=I.getSVGElementSize(i,{useAttrs:!0});if(u===0||d===0)return;const h=jL().size([u,d]).words(r.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[l]:p[l],text:p[c],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=I.appendOrSelect(i,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,v=>`${v[l]}-${v.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",v=>`${v.size}px`).text(function(v){return v.text}).attr("class",v=>n.model.getColorClassName({classNameTypes:[J.FILL],dataGroupName:v[l],originalClassName:`word ${v.size>32?"light":""}`})).style("fill",v=>n.model.getFillColor(v[l],v.text,v)).attr("text-anchor","middle").transition().call(v=>n.services.transitions.setupTransition({transition:v,name:"wordcloud-text-update-enter",animate:t})).attr("transform",v=>`translate(${v.x}, ${v.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:i}=n.wordCloud,r=t.map(c=>c[i]).filter(c=>c),s=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=r.length>0,o=a?xe(r):[1,1];return Oe().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,i=this,r=ya(s=>{const a=i.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>i.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;r(o),i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEOVER,{event:s,element:P(this),datum:a}),i.services.events.dispatchEvent(M.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:t.tooltip.groupLabel,value:a[n],class:i.model.getColorClassName({classNameTypes:[J.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=P(this);i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),i.services.events.dispatchEvent(M.Tooltip.MOVE,{event:s})}).on("click",function(s,a){i.services.events.dispatchEvent(M.WordCloud.WORD_CLICK,{event:s,element:P(this),datum:a})}).on("mouseout",function(s,a){const o=P(this);r(null),i.services.events.dispatchEvent(M.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),i.services.events.dispatchEvent(M.Tooltip.HIDE,{hoveredElement:o})})}}class cN extends ht{constructor(){super(...arguments),this.type="geo",this.renderType=K.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:i}=I.getSVGElementSize(t,{useAttrs:!0});if(n<1||i<1)return;const r=this.getProjection(),s=w(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},c={};Object.keys(a).forEach(m=>{typeof a[m].value=="number"?o[m]=a[m]:c[m]=a[m]});const l=yR(s,Object.values(c)),u=mR(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=r.fitSize([n,i],u),h=wx().projection(d);I.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const f=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),p=I.appendOrSelect(t,"defs");I.appendOrSelect(p,"pattern").attr("id",f).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",cr()([[0,0],[0,10]]));const g=I.appendOrSelect(t,"g.missing-data");I.appendOrSelect(g,"path").datum(l).attr("d",h).style("fill",`url(#${f})`)}getProjection(){let t=null;switch(w(this.getOptions(),"thematic","projection")){case tn.geoEqualEarth:t=Vx();break;case tn.geoAlbers:t=Rx();break;case tn.geoConicEqualArea:t=Ah();break;case tn.geoConicEquidistant:t=Bx();break;case tn.geoEquirectangular:t=Nx();break;case tn.geoMercator:t=Ix();break;case tn.geoNaturalEarth1:t=Fx();break;default:throw new Error("Projection is not supported.")}return t}}class uN extends cN{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",i=>this.model.getColorClassName({value:n[i.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(i,r){const s=P(this);t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEOVER,{event:i,element:s,datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.SHOW,{event:i,hoveredElement:s,items:[{label:r.properties.NAME,value:n[r.properties.NAME].value}]})}).on("mousemove",function(i,r){t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEMOVE,{event:i,element:P(this),datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.MOVE,{event:i})}).on("click",function(i,r){t.services.events.dispatchEvent(hi.CHOROPLETH_CLICK,{event:i,element:P(this),datum:n[r.properties.NAME]})}).on("mouseout",function(i,r){const s=P(this);t.services.events.dispatchEvent(hi.CHOROPLETH_MOUSEOUT,{event:i,element:s,datum:n[r.properties.NAME]}),t.services.events.dispatchEvent(hr.HIDE,{event:i,hoveredElement:s})})}}function hg(e,t){st(2,arguments);var n=ft(e),i=Ht(t);return isNaN(i)?new Date(NaN):(i&&n.setDate(n.getDate()+i),n)}function Sc(e,t){st(2,arguments);var n=ft(e),i=Ht(t);if(isNaN(i))return new Date(NaN);if(!i)return n;var r=n.getDate(),s=new Date(n.getTime());s.setMonth(n.getMonth()+i+1,0);var a=s.getDate();return r>=a?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}var hN=36e5;function dg(e,t){st(2,arguments);var n=Ht(t);return Qs(e,n*hN)}function fg(e){st(1,arguments);var t=ft(e);return t.setHours(0,0,0,0),t}var dN=864e5;function fN(e,t){st(2,arguments);var n=fg(e),i=fg(t),r=n.getTime()-gl(n),s=i.getTime()-gl(i);return Math.round((r-s)/dN)}var pN=6e4;function Oc(e,t){st(2,arguments);var n=Ht(t);return Qs(e,n*pN)}function Tc(e,t){st(2,arguments);var n=Ht(t);return Qs(e,n*1e3)}function pg(e,t){st(2,arguments);var n=Ht(t);return Sc(e,n*12)}function Ur(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=n.getTime()-i.getTime();return r<0?-1:r>0?1:r}var mN=6e4,gN=36e5;function vN(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth();return r*12+s}function yN(e,t){st(2,arguments);var n=ft(e),i=ft(t);return n.getFullYear()-i.getFullYear()}function mg(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function _N(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=mg(n,i),s=Math.abs(fN(n,i));n.setDate(n.getDate()-r*s);var a=+(mg(n,i)===-r),o=r*(s-a);return o===0?0:o}function Cc(e,t){return st(2,arguments),ft(e).getTime()-ft(t).getTime()}var gg={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},xN="trunc";function Mc(e){return e?gg[e]:gg[xN]}function bN(e,t,n){st(2,arguments);var i=Cc(e,t)/gN;return Mc(n==null?void 0:n.roundingMethod)(i)}function vg(e,t,n){st(2,arguments);var i=Cc(e,t)/mN;return Mc(n==null?void 0:n.roundingMethod)(i)}function wN(e){st(1,arguments);var t=ft(e);return t.setHours(23,59,59,999),t}function EN(e){st(1,arguments);var t=ft(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function SN(e){st(1,arguments);var t=ft(e);return wN(t).getTime()===EN(t).getTime()}function ON(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=Ur(n,i),s=Math.abs(vN(n,i)),a;if(s<1)a=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*s);var o=Ur(n,i)===-r;SN(ft(e))&&s===1&&Ur(e,i)===1&&(o=!1),a=r*(s-Number(o))}return a===0?0:a}function yg(e,t,n){st(2,arguments);var i=Cc(e,t)/1e3;return Mc(n==null?void 0:n.roundingMethod)(i)}function TN(e,t){st(2,arguments);var n=ft(e),i=ft(t),r=Ur(n,i),s=Math.abs(yN(n,i));n.setFullYear(1584),i.setFullYear(1584);var a=Ur(n,i)===-r,o=r*(s-Number(a));return o===0?0:o}function CN(e,t){st(2,arguments);var n=Ht(t);return hg(e,-n)}function MN(e,t){st(2,arguments);var n=Ht(t);return Sc(e,-n)}function $N(e,t){st(2,arguments);var n=Ht(t);return dg(e,-n)}function _g(e,t){st(2,arguments);var n=Ht(t);return Oc(e,-n)}function xg(e,t){st(2,arguments);var n=Ht(t);return Tc(e,-n)}function AN(e,t){st(2,arguments);var n=Ht(t);return pg(e,-n)}function bg(e){var t=e==null?0:e.length;return t?ua(e,1):[]}class LN extends on{zoomIn(t,n,i){let r,s,a;const o=i||vi;t&&(r=t.x,s=t.y,a=2);const{width:c,height:l}=I.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});n.transition().duration(o.duration).ease(o.ease).attr("transform",`translate(${c/2}, ${l/2}) scale(${a}) translate(${-r},${-s})`),this.services.events.dispatchEvent(M.CanvasZoom.CANVAS_ZOOM_IN,{element:P(t)})}zoomOut(t,n){const i=n||vi;t.transition().duration(i.duration).ease(i.ease).attr("transform",""),this.services.events.dispatchEvent(M.CanvasZoom.CANVAS_ZOOM_OUT)}}class DN extends on{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,n){this.documentFragment.addEventListener(t,n)}removeEventListener(t,n){this.documentFragment.removeEventListener(t,n)}dispatchEvent(t,n){let i;n?i=new CustomEvent(t,{detail:n}):(i=document.createEvent("Event"),i.initEvent(t,!1,!0)),this.documentFragment.dispatchEvent(i)}}class kN extends on{constructor(t,n){super(t,n)}downloadCSV(t,n){const i=document.createElement("a"),r="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:r}),n);else if(URL&&"download"in i){const s=URL.createObjectURL(new Blob([t],{type:r}));i.href=s,i.setAttribute("download",n),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(s)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,n){const i=document.createElement("a");i.download=n,i.href=t,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}class RN extends on{constructor(){super(...arguments),this.pendingTransitions={}}init(){var t;(t=this.services.events)==null||t.addEventListener(M.Model.UPDATE,()=>{this.pendingTransitions={}})}setupTransition({transition:t,name:n,animate:i}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",()=>{delete this.pendingTransitions[t._id]}),this.model.getOptions().animations===!1||i===!1?t.duration(0):t.duration(w(xl,n,"duration")||xl.default.duration)}getPendingTransitions(){return this.pendingTransitions}}let IN=class extends on{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){const n=this.model.getOptions(),{groupMapsTo:i}=n.data,r=w(n,"axes",this.secondaryDomainAxisPosition),s=t[i];if(r!=null&&r.correspondingDatasets&&r.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:n=null}={}){if(this.dualAxes){const i=this.model.getOptions(),{groupMapsTo:r}=i.data,s=w(i,"axes",this.secondaryRangeAxisPosition);let a;if(t!==null?a=t[r]:n&&n.length>0&&(a=n[0]),s!=null&&s.correspondingDatasets&&s.correspondingDatasets.includes(a))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return w(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){const t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){const t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===H.BOTTOM||t===H.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(H).map(t=>H[t]).forEach(t=>{this.scales[t]=this.createScale(t)})}findDomainAndRangeAxes(){const t=this.findVerticalAxesPositions(),n=this.findHorizontalAxesPositions(),i=this.findDomainAndRangeAxesPositions(t,n);this.domainAxisPosition=i.primaryDomainAxisPosition,this.rangeAxisPosition=i.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=i.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=i.secondaryRangeAxisPosition)}determineOrientation(){(this.rangeAxisPosition===H.LEFT||this.rangeAxisPosition===H.RIGHT)&&(this.domainAxisPosition===H.BOTTOM||this.domainAxisPosition===H.TOP)?this.orientation=Ft.VERTICAL:this.orientation=Ft.HORIZONTAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){var t,n,i,r;const s=this.model.getOptions(),a=w(s,"axes");((t=a[H.LEFT])!=null&&t.correspondingDatasets&&a[H.RIGHT]||(n=a[H.RIGHT])!=null&&n.correspondingDatasets&&a[H.LEFT]||(i=a[H.TOP])!=null&&i.correspondingDatasets&&a[H.BOTTOM]||(r=a[H.BOTTOM])!=null&&r.correspondingDatasets&&a[H.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){const n=w(this.model.getOptions(),"axes",t,"domain");if(n&&!Array.isArray(n))throw new Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(n)&&(this.scaleTypes[t]===Z.LINEAR||this.scaleTypes[t]===Z.TIME)&&n.length!==2)throw new Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return n}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){const t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){const t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){const t=[H.BOTTOM,H.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainYAxisPosition(){const t=[H.LEFT,H.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find(n=>t.indexOf(n)>-1)}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,n,i,r){const s=this.model.getOptions(),a=w(s,"axes")[i],{mapsTo:o}=a,c=w(r,o)!==null?r[o]:r;let l;switch(n){case Z.LABELS:l=t(c)+t.step()/2;break;case Z.TIME:l=t(new Date(c));break;default:l=t(c)}return l}getBoundedScaledValues(t){const{bounds:n}=this.model.getOptions(),i=this.getRangeAxisPosition({datum:t}),r=this.scales[i],s=this.model.getOptions(),a=w(s,"axes")[i],{mapsTo:o}=a,c=t[o]!==void 0?t[o]:t;return[r(w(t,n.upperBoundMapsTo)!==null?t[n.upperBoundMapsTo]:c),r(w(t,n.lowerBoundMapsTo)!==null?t[n.lowerBoundMapsTo]:c)]}getValueThroughAxisPosition(t,n){const i=this.scaleTypes[t],r=this.scales[t];return this.getValueFromScale(r,i,t,n)}getDomainValue(t){const n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getRangeValue(t){const n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){const n=this.model.getOptions();return w(n,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){const n=this.model.getOptions();return w(n,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,n){const i=this.model.getOptions(),r=w(i,"axes",t);if(r.scaleType===Z.TIME){const s=w(i,"timeScale","addSpaceOnEdges");return PN(n,s)}else return NN(n,gi.paddingRatio,r.scaleType)}findVerticalAxesPositions(){const t=this.model.getOptions(),n=w(t,"axes"),i=this.isDualAxes();return w(n,H.LEFT)===null&&w(n,H.RIGHT)!==null||w(n,H.RIGHT,"main")===!0||i&&w(n,H.LEFT,"correspondingDatasets")?{primary:H.RIGHT,secondary:H.LEFT}:{primary:H.LEFT,secondary:H.RIGHT}}findHorizontalAxesPositions(){const t=this.model.getOptions(),n=w(t,"axes"),i=this.isDualAxes();return w(n,H.BOTTOM)===null&&w(n,H.TOP)!==null||w(n,H.TOP,"main")===!0||i&&w(n,H.BOTTOM,"correspondingDatasets")?{primary:H.TOP,secondary:H.BOTTOM}:{primary:H.BOTTOM,secondary:H.TOP}}findDomainAndRangeAxesPositions(t,n){const i=this.model.getOptions(),r=w(i,"axes",t.primary),s=w(i,"axes",n.primary),a=r.scaleType||Z.LINEAR,o=s.scaleType||Z.LINEAR,c={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return c.primaryDomainAxisPosition=n.primary,c.primaryRangeAxisPosition=t.primary,c.secondaryDomainAxisPosition=n.secondary,c.secondaryRangeAxisPosition=t.secondary,(!(o===Z.LABELS||o===Z.TIME)&&a===Z.LABELS||a===Z.TIME)&&(c.primaryDomainAxisPosition=t.primary,c.primaryRangeAxisPosition=n.primary,c.secondaryDomainAxisPosition=t.secondary,c.secondaryRangeAxisPosition=n.secondary),c}getScaleDomain(t){const n=this.model.getOptions(),i=w(n,"axes",t),r=w(n,"bounds"),{includeZero:s}=i,a=w(i,"scaleType")||Z.LINEAR;if(this.model.isDataEmpty())return[];if(i.binned){const{bins:v}=this.model.getBinConfigurations();return[0,bn(v,x=>x.length)]}else if(i.limitDomainToBins){const{bins:v}=this.model.getBinConfigurations(),x=this.model.getStackKeys({bins:v});return[x[0].split("-")[0],x[x.length-1].split("-")[1]]}const o=this.model.getDisplayData(),{extendLinearDomainBy:c,mapsTo:l,percentage:u,thresholds:d}=i,{reference:h,compareTo:f}=gi.ratio;if(i.domain)return a===Z.LABELS?i.domain:(a===Z.TIME&&(i.domain=i.domain.map(v=>v.getTime===void 0?new Date(v):v)),this.extendsDomain(t,i.domain));if(u)return[0,100];if(i&&a===Z.LABELS)return Cr(o.map(v=>v[l]));let p,g;const m=this.model.getDataGroupNames();if(a===Z.LABELS_RATIO)return o.map(v=>`${v[h]}/${v[f]}`);if(a===Z.TIME)g=o.map(v=>+new Date(v[l]));else if(r&&n.axes)g=[],o.forEach(v=>{g.push(v[l]),v[r.upperBoundMapsTo]&&g.push(v[r.upperBoundMapsTo]),v[r.lowerBoundMapsTo]&&g.push(v[r.lowerBoundMapsTo])});else if(i.stacked===!0&&m&&t===this.getRangeAxisPosition()){const{groupMapsTo:v}=n.data,x=this.model.getDataValuesGroupedByKeys({groups:m}),b=o.filter(E=>!m.includes(E[v])),O=[];x.forEach(E=>{const{...T}=E;let S=0,A=0;Object.values(T).forEach(D=>{isNaN(D)||(D<0?A+=D:S+=D)}),O.push([A,S])}),g=[...bg(O),...b.map(E=>E[l])]}else g=[],o.forEach(v=>{const x=v[l];Array.isArray(x)&&x.length===2?(g.push(x[0]),g.push(x[1])):(c&&g.push(Math.max(v[l],v[c])),g.push(x))});return a!==Z.TIME&&a!==Z.LOG&&s&&g.push(0),d&&d.length>0&&d.forEach(v=>{const x=w(v,"value");x!==null&&g.push(x)}),p=xe(g),p=this.extendsDomain(t,p),p}createScale(t){const n=this.model.getOptions(),i=w(n,"axes",t);if(!i)return null;const r=w(i,"scaleType")||Z.LINEAR;this.scaleTypes[t]=r;let s;return r===Z.TIME?s=gd():r===Z.LOG?s=Kh().base(i.base||10):r===Z.LABELS||r===Z.LABELS_RATIO?s=nr():s=Oe(),s.domain(this.getScaleDomain(t)),s}getHighestDomainThreshold(){const t=w(this.model.getOptions(),"axes"),n=this.getDomainAxisPosition(),{thresholds:i}=t[n];if(!Array.isArray(i)||Array.isArray(i)&&!i.length)return null;const r=this.getDomainScale(),s=i.sort((a,o)=>o.value-a.value)[0];return this.getScaleTypeByPosition(n)===Z.TIME&&(typeof s.value=="string"||s.value.getTime===void 0)&&(s.value=new Date(s.value)),{threshold:s,scaleValue:r(s.value)}}getHighestRangeThreshold(){const t=w(this.model.getOptions(),"axes"),n=this.getRangeAxisPosition(),{thresholds:i}=t[n];if(!Array.isArray(i)||Array.isArray(i)&&!i.length)return null;const r=this.getRangeScale(),s=i.sort((a,o)=>o.value-a.value)[0];return{threshold:s,scaleValue:r(s.value)}}};function PN(e,t){const n=new Date(e[0]),i=new Date(e[1]);return TN(i,n)>1?[AN(n,t),pg(i,t)]:ON(i,n)>1?[MN(n,t),Sc(i,t)]:_N(i,n)>1?[CN(n,t),hg(i,t)]:bN(i,n)>1?[$N(n,t),dg(i,t)]:vg(i,n)>30?[_g(n,t*30),Oc(i,t*30)]:vg(i,n)>1?[_g(n,t),Oc(i,t)]:yg(i,n)>15?[xg(n,t*15),Tc(i,t*15)]:yg(i,n)>1?[xg(n,t),Tc(i,t)]:[n,i]}function NN([e,t],n,i){const r=(t-e)*n,s=t<=0&&t+r>0?0:t+r;let a=e>=0&&e-r<0?0:e-r;if(i===Z.LOG&&a<=0){if(e<=0)throw Error("Data must have values greater than 0 if log scale type is used.");a=e}return[a,s]}let UN=class extends on{constructor(){super(...arguments),this.curveTypes={curveLinear:Hs,curveLinearClosed:$d,curveBasis:PE,curveBasisClosed:NE,curveBasisOpen:UE,curveBundle:BE,curveCardinal:HE,curveCardinalClosed:VE,curveCardinalOpen:FE,curveCatmullRom:GE,curveCatmullRomClosed:zE,curveCatmullRomOpen:jE,curveMonotoneX:qE,curveMonotoneY:WE,curveNatural:YE,curveStep:XE,curveStepAfter:KE,curveStepBefore:ZE}}getD3Curve(){let t="curveLinear";const n=this.model.getOptions().curve;if(n&&(typeof n=="string"?t=n:t=n.name),this.curveTypes[t]){let i=this.curveTypes[t];return n&&Object.keys(n).forEach(r=>{i[r]&&(i=i[r](n[r]))}),i}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}};class BN extends on{isZoomBarEnabled(){if(!this.services.cartesianScales||!w(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();const t=this.services.cartesianScales.getMainXAxisPosition(),n=w(this.model.getOptions(),"axes",t,"scaleType");return t===H.BOTTOM&&n===Z.TIME}getZoomBarData(){const t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw new Error("Services zoom not defined");const n=t||this.services.zoom.getZoomBarData(),{cartesianScales:i}=this.services;if(!i)throw new Error("Services cartesianScales undefined");const r=i.getMainXAxisPosition(),s=i.getDomainIdentifier(),a=w(this.model.getOptions(),"axes",r,"domain");if(Array.isArray(a)&&a.length===2)return a;if(!r)throw new Error("Not defined: mainXAxisPosition");return i.extendsDomain(r,xe(n,o=>o[s]))}handleDomainChange(t,n={dispatchEvent:!0}){var i;this.model.set({zoomDomain:t},{animate:!1}),n.dispatchEvent&&((i=this.services.events)==null||i.dispatchEvent(M.ZoomDomain.CHANGE,{newDomain:t}))}getZoomRatio(){return w(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,n){var i;const r=this.model.get("zoomDomain"),s=Object.assign({stacked:!1},n),a=w(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&a&&r){const o=s.stacked?"sharedStackKey":(i=this.services.cartesianScales)==null?void 0:i.getDomainIdentifier(),c=t.filter(l=>new Date(l[o])>=r[0]&&new Date(l[o])<=r[1]);if(c.length>0)return c}return t}zoomIn(t=this.getZoomRatio()){var n;const i=this.model.get("zoomDomain"),r=se.handleWidth,s=(n=this.services.cartesianScales)==null?void 0:n.getMainXScale().copy();s.domain(this.getDefaultZoomBarDomain());const a=s(i[0]),o=s(i[1]);if(o-a<r+1)return;const c=s.range(),l=o-a,u=Math.min((c[1]-c[0])/2*(t/2),l/2);let d=a+u,h=o-u;d>=h&&(d=a+l/2-r/2,h=o-l/2+r/2);const f=[s.invert(d),s.invert(h)];(i[0].valueOf()!==f[0].valueOf()||i[1].valueOf()!==f[1].valueOf())&&this.handleDomainChange(f)}zoomOut(t=this.getZoomRatio()){const n=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw new Error("Services cartesianScales undefined");const i=this.services.cartesianScales.getMainXScale().copy();i.domain(this.getDefaultZoomBarDomain());const r=i(n[0]),s=i(n[1]),a=i.range(),o=(a[1]-a[0])/2*(t/2),c=Math.max(r-o,a[0]),l=Math.min(s+o,a[1]),u=[i.invert(c),i.invert(l)];(n[0].valueOf()!==u[0].valueOf()||n[1].valueOf()!==u[1].valueOf())&&this.handleDomainChange(u)}resetZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();(t[0].valueOf()!==n[0].valueOf()||t[1].valueOf()!==n[1].valueOf())&&this.handleDomainChange(n)}isMinZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();if(!t||!n)return!1;const i=t[1].valueOf()-t[0].valueOf(),r=n[1].valueOf()-n[0].valueOf(),s=w(this.model.getOptions(),"zoomBar","minZoomRatio");return i/r<s}isMaxZoomDomain(){const t=this.model.get("zoomDomain"),n=this.getDefaultZoomBarDomain();return!!(t&&n&&t[0].valueOf()===n[0].valueOf()&&t[1].valueOf()===n[1].valueOf())}isEmptyState(){return this.getZoomBarData().length===0}isZoomBarLoading(t){return w(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return w(this.model.getOptions(),"zoomBar",t,"locked")}}function HN(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}function VN(e,t,n){var i=e.length;return n=n===void 0?i:n,!t&&n>=i?e:HN(e,t,n)}var FN="\\ud800-\\udfff",GN="\\u0300-\\u036f",zN="\\ufe20-\\ufe2f",jN="\\u20d0-\\u20ff",qN=GN+zN+jN,WN="\\ufe0e\\ufe0f",YN="\\u200d",XN=RegExp("["+YN+FN+qN+WN+"]");function wg(e){return XN.test(e)}function ZN(e){return e.split("")}var Eg="\\ud800-\\udfff",KN="\\u0300-\\u036f",QN="\\ufe20-\\ufe2f",JN="\\u20d0-\\u20ff",tU=KN+QN+JN,eU="\\ufe0e\\ufe0f",nU="["+Eg+"]",$c="["+tU+"]",Ac="\\ud83c[\\udffb-\\udfff]",iU="(?:"+$c+"|"+Ac+")",Sg="[^"+Eg+"]",Og="(?:\\ud83c[\\udde6-\\uddff]){2}",Tg="[\\ud800-\\udbff][\\udc00-\\udfff]",rU="\\u200d",Cg=iU+"?",Mg="["+eU+"]?",sU="(?:"+rU+"(?:"+[Sg,Og,Tg].join("|")+")"+Mg+Cg+")*",aU=Mg+Cg+sU,oU="(?:"+[Sg+$c+"?",$c,Og,Tg,nU].join("|")+")",lU=RegExp(Ac+"(?="+Ac+")|"+oU+aU,"g");function cU(e){return e.match(lU)||[]}function uU(e){return wg(e)?cU(e):ZN(e)}function hU(e){return function(t){t=Or(t);var n=wg(t)?uU(t):void 0,i=n?n[0]:t.charAt(0),r=n?VN(n,1).join(""):t.slice(1);return i[e]()+r}}var dU=hU("toUpperCase");const fU=dU;function pU(e){return fU(Or(e).toLowerCase())}var mU=$m(function(e,t,n){return t=t.toLowerCase(),e+(n?pU(t):t)});const gU=mU;class Ae{constructor(t,n){this.components=[],this.services={canvasZoom:LN,domUtils:I,events:DN,files:kN,gradientUtils:Kl,transitions:RN},this.model=new He(this.services)}init(t,n){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach(i=>{const r=this.services[i];this.services[i]=new r(this.model,this.services)}),this.services.events.addEventListener(M.Model.UPDATE,()=>{this.update()}),this.model.setData(n.data),this.services.events.addEventListener(M.Chart.RESIZE,()=>{this.update()}),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(){if(!this.components)return;Object.keys(this.services).forEach(i=>{this.services[i].update()}),this.components.forEach(i=>i.render(!0));const t=this.services.transitions.getPendingTransitions(),n=Object.keys(t).map(i=>t[i].end().catch(r=>r));Promise.all(n).then(()=>this.services.events.dispatchEvent(M.Chart.RENDER_FINISHED))}destroy(){this.components.forEach(t=>t.destroy()),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled"),s={id:"legend",components:[new xc(this.model,this.services)],growth:it.PREFERRED},a=w(i,"canvasZoom","enabled");a&&a===!0&&t.push(new nR(this.model,this.services));const o=!!this.model.getOptions().title,c={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},l={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},u={id:"header",components:[new ae(this.model,this.services,[c,...r?[l]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},d={id:"graph-frame",components:t,growth:it.STRETCH,renderType:w(n,"graphFrameRenderType")||K.SVG},h=w(n,"excludeLegend")!==!0&&i.legend.enabled!==!1;let f=St.COLUMN;if(h){const v=w(i,"legend","position");v==="left"?(f=St.ROW,i.legend.orientation||(i.legend.orientation=fr.VERTICAL)):v==="right"?(f=St.ROW_REVERSE,i.legend.orientation||(i.legend.orientation=fr.VERTICAL)):v==="bottom"&&(f=St.COLUMN_REVERSE)}const p={id:"spacer",components:[new ln(this.model,this.services)],growth:it.PREFERRED},g={id:"full-frame",components:[new ae(this.model,this.services,[...h?[s]:[],...h?[p]:[],d],{direction:f})],growth:it.STRETCH},m=[];if(o||r){m.push(u);const v={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};m.push(v)}return m.push(g),[new bc(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,m,{direction:St.COLUMN})]}}class le extends Ae{constructor(t,n){super(t,n),this.services=Object.assign(this.services,{cartesianScales:IN,curves:UN,zoom:BN}),this.model=new Gn(this.services)}getAxisChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"zoomBar",H.TOP,"enabled"),s=w(i,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const a=this.services.cartesianScales.getMainXAxisPosition(),o=w(i,"axes",a,"scaleType"),c=r&&a===H.BOTTOM&&o===Z.TIME,l=this.services.zoom.isZoomBarLocked(H.TOP),u=!!this.model.getOptions().title,d={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},h={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},f={id:"header",components:[new ae(this.model,this.services,[d,...s?[h]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},p={id:"legend",components:[new xc(this.model,this.services)],growth:it.PREFERRED};c&&!l&&t.push(new jm(this.model,this.services),new Ym(this.model,this.services)),t.push(new rR(this.model,this.services)),t.push(new sR(this.model,this.services));const g={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},m=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1;let v=St.COLUMN;if(m){const T=w(this.model.getOptions(),"legend","position");T===dr.LEFT?(v=St.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=fr.VERTICAL)):T===dr.RIGHT?(v=St.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=fr.VERTICAL)):T===dr.BOTTOM&&(v=St.COLUMN_REVERSE)}const x={id:"spacer",components:[new ln(this.model,this.services)],growth:it.PREFERRED},b={id:"full-frame",components:[new ae(this.model,this.services,[...m?[p]:[],...m?[x]:[],g],{direction:v})],growth:it.STRETCH},O={id:"zoom-bar",components:[new iR(this.model,this.services)],growth:it.PREFERRED,renderType:K.SVG},E=[];if(u||s){E.push(f);const T={id:"spacer",components:[new ln(this.model,this.services,s?{size:15}:void 0)],growth:it.PREFERRED};E.push(T)}return c&&E.push(O),E.push(b),[new Xm(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,E,{direction:St.COLUMN})]}}class vU extends Ae{constructor(t,n){super(t,n),this.model=new LA(this.services),this.model.setOptions(At(wt.alluvialChart,n.options)),this.init(t,n)}getComponents(){const t=[new aR(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class yU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(rn(wt.areaChart),n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new yn(this.model,this.services),new Mi(this.model,this.services),new Zm(this.model,this.services),new Ve(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class _U extends le{constructor(t,n){super(t,n),this.model=new DA(this.services),this.model.setOptions(At(wt.boxplotChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new cR(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})}}class xU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.bubbleChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new yn(this.model,this.services),new uR(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class bU extends le{constructor(t,n){super(t,n),this.model=new kA(this.services),this.model.setOptions(At(wt.bulletChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new hR(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class wU extends Ae{constructor(t,n){super(t,n),this.model=new RA(this.services),this.model.setOptions(At(wt.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},o={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},c={id:"header",components:[new ae(this.model,this.services,[a,...r?[o]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},l={id:"legend",components:[new tg(this.model,this.services,{chartType:"choropleth"})],growth:it.PREFERRED,renderType:K.SVG},u={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},d=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1,h=St.COLUMN_REVERSE,f={id:"spacer",components:[new ln(this.model,this.services,{size:15})],growth:it.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[l]:[],...d?[f]:[],u],{direction:h})],growth:it.STRETCH},g=[];if(s||r){g.push(c);const m={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};g.push(m)}return g.push(p),[new bc(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,g,{direction:St.COLUMN})]}getComponents(){const t=[new uN(this.model,this.services)];return this.getChartComponents(t)}}class EU extends Ae{constructor(t,n){super(t,n),this.model=new IA(this.services),this.model.setOptions(At(wt.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new wR(this.model,this.services)];return this.getChartComponents(t)}}const $g={[ge.LINE]:[Mi,Ve],[ge.SCATTER]:[Ve],[ge.AREA]:[Zm,Mi,Ve],[ge.STACKED_AREA]:[ag,Mi,lg,Da],[ge.SIMPLE_BAR]:[sg],[ge.GROUPED_BAR]:[rg,$i],[ge.STACKED_BAR]:[og,Da]};class SU extends le{constructor(t,n){super(t,n);const i=At(wt.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:ge.LINE,correspondingDatasets:[]}]),this.model.setOptions(i),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const i=t.map(r=>{const s=r.type;let a;if(typeof r.type=="string"){if(!Object.keys($g).includes(r.type))return console.error(`Invalid chart type "${r.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const c=`${gU(r.type)}Chart`;return a=nt({},wt[c],this.model.getOptions(),r.options),r.type===ge.STACKED_AREA&&(o=!0),$g[r.type].map(l=>new l(this.model,this.services,{groups:r.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=nt({},this.model.getOptions(),r.options),new s(this.model,this.services,{groups:r.correspondingDatasets,id:n++,options:a})}).filter(r=>r!==null);return bg(i)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(r=>r.type===ge.STACKED_BAR||r.type===ge.STACKED_AREA),i=[new oe(this.model,this.services),new fe(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID}),...n?[]:[new yn(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(i)}}class Ag extends Ae{constructor(t,n,i=!1){super(t,n),this.model=new PA(this.services),!i&&(this.model.setOptions(At(wt.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new eg(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.PIE})];return this.getChartComponents(t)}}class OU extends Ag{constructor(t,n){super(t,n,!0),this.model.setOptions(At(wt.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new SR(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.DONUT})];return this.getChartComponents(t)}}class TU extends Ae{constructor(t,n){super(t,n),this.model=new NA(this.services),this.model.setOptions(At(wt.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new OR(this.model,this.services)];return this.getChartComponents(t)}}class CU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new rg(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class MU extends le{constructor(t,n){super(t,n),this.model=new UA(this.services),this.model.setOptions(At(wt.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const i=this.model.getOptions(),r=w(i,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new Nr(this.model,this.services)],growth:it.STRETCH},o={id:"toolbar",components:[new Ir(this.model,this.services)],growth:it.PREFERRED},c={id:"header",components:[new ae(this.model,this.services,[a,...r?[o]:[]],{direction:St.ROW,alignItems:di.CENTER})],growth:it.PREFERRED},l={id:"legend",components:[new tg(this.model,this.services,{chartType:"heatmap"})],growth:it.PREFERRED,renderType:K.SVG},u={id:"graph-frame",components:t,growth:it.STRETCH,renderType:K.SVG},d=w(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1,h=St.COLUMN_REVERSE,f={id:"spacer",components:[new ln(this.model,this.services,{size:15})],growth:it.PREFERRED},p={id:"full-frame",components:[new ae(this.model,this.services,[...d?[l]:[],...d?[f]:[],u],{direction:h})],growth:it.STRETCH},g=[];if(s||r){g.push(c);const m={id:"spacer",components:[new ln(this.model,this.services,r?{size:15}:void 0)],growth:it.PREFERRED};g.push(m)}return g.push(p),[new Xm(this.model,this.services),new $a(this.model,this.services),new ae(this.model,this.services,g,{direction:St.COLUMN})]}getComponents(){const t=[new oe(this.model,this.services),new TR(this.model,this.services)];return this.getAxisChartComponents(t)}}class $U extends le{constructor(t,n){super(t,n),this.model=new BA(this.services),this.model.setOptions(At(wt.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new xR(this.model,this.services),new CR(this.model,this.services)];return this.getAxisChartComponents(t)}}class AU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new yn(this.model,this.services),new Mi(this.model,this.services),new Ve(this.model,this.services,{handleThresholds:!0}),new LR(this.model,this.services),new $i(this.model,this.services)];return this.getAxisChartComponents(t)}}class LU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new yn(this.model,this.services),new MR(this.model,this.services),new Ve(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class DU extends Ae{constructor(t,n){var i;super(t,n),this.model=new HA(this.services);const r=(i=n.options.meter)!=null&&i.proportional?nt(rn(wt.proportionalMeterChart),n.options):nt(rn(wt.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const t=[...w(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new bR(this.model,this.services)],growth:it.STRETCH,renderType:K.SVG},{id:"spacer",components:[new ln(this.model,this.services,{size:8})],growth:it.STRETCH}]:[],{id:"meter-graph",components:[new $R(this.model,this.services)],growth:it.STRETCH,renderType:K.SVG}],n=[new ae(this.model,this.services,t,{direction:St.COLUMN})];return this.getChartComponents(n,{graphFrameRenderType:K.HTML})}}class kU extends Ae{constructor(t,n){super(t,n),this.model=new VA(this.services),this.model.setOptions(At(wt.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new AR(this.model,this.services)];return this.getChartComponents(t)}}class RU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new yn(this.model,this.services),new Ve(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class IU extends Ae{constructor(t,n){super(t,n),this.model=new FA(this.services),this.model.setOptions(At(wt.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new DR(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class PU extends Ae{constructor(t,n){super(t,n),this.model=new GA(this.services),this.model.setOptions(At(wt.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new oN(this.model,this.services)];return this.getChartComponents(t)}}class NU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new sg(this.model,this.services),new $i(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class UU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new Da(this.model,this.services),new ag(this.model,this.services),new Mi(this.model,this.services,{stacked:!0}),new lg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new ne(this.model,this.services,{skeleton:Ut.GRID})];return this.getAxisChartComponents(t)}}class BU extends le{constructor(t,n){super(t,n),this.model.setOptions(At(wt.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new oe(this.model,this.services),new fe(this.model,this.services),new Da(this.model,this.services),new og(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.VERT_OR_HORIZ}),new $i(this.model,this.services)];return this.getAxisChartComponents(t)}}class HU extends Ae{constructor(t,n){super(t,n),this.model=new zA(this.services),this.model.setOptions(At(wt.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new lN(this.model,this.services),new ne(this.model,this.services,{skeleton:Ut.PIE})];return this.getChartComponents(t)}}const VU=mt.defineComponent({name:"CcvBaseChart",props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},data(){return{coreChart:null}},watch:{data:{handler:function(e){var t,n;(n=(t=this.coreChart)==null?void 0:t.model)==null||n.setData(e)},deep:!0},options:{handler:function(e){var t,n;(n=(t=this.coreChart)==null?void 0:t.model)==null||n.setOptions(e)},deep:!0}}});function Ct(e,t,n,i,r,s,a,o){var c=typeof e=="function"?e.options:e;t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),s&&(c._scopeId="data-v-"+s);var l;if(a?(l=function(h){h=h||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!h&&typeof __VUE_SSR_CONTEXT__<"u"&&(h=__VUE_SSR_CONTEXT__),r&&r.call(this,h),h&&h._registeredComponents&&h._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=o?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(f,p){return l.call(p),u(f,p)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}let FU,GU;const Lg={};var zU=Ct(VU,FU,GU,!1,jU,null,null,null);function jU(e){for(let t in Lg)this[t]=Lg[t]}const $t=function(){return zU.exports}(),qU=mt.defineComponent({name:"CcvAlluvialChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new vU(this.$el,{data:e,options:t})}});var WU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-alluvial-chart"})},YU=[];const Dg={};var XU=Ct(qU,WU,YU,!1,ZU,null,null,null);function ZU(e){for(let t in Dg)this[t]=Dg[t]}const kg=function(){return XU.exports}(),KU=mt.defineComponent({name:"CcvAreaChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new yU(this.$el,{data:e,options:t})}});var QU=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-area-chart"})},JU=[];const Rg={};var tB=Ct(KU,QU,JU,!1,eB,null,null,null);function eB(e){for(let t in Rg)this[t]=Rg[t]}const Ig=function(){return tB.exports}(),nB=mt.defineComponent({name:"CcvBoxplotChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new _U(this.$el,{data:e,options:t})}});var iB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-boxplot-chart"})},rB=[];const Pg={};var sB=Ct(nB,iB,rB,!1,aB,null,null,null);function aB(e){for(let t in Pg)this[t]=Pg[t]}const Ng=function(){return sB.exports}(),oB=mt.defineComponent({name:"CcvBubbleChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new xU(this.$el,{data:e,options:t})}});var lB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-bubble-chart"})},cB=[];const Ug={};var uB=Ct(oB,lB,cB,!1,hB,null,null,null);function hB(e){for(let t in Ug)this[t]=Ug[t]}const Bg=function(){return uB.exports}(),dB=mt.defineComponent({name:"CcvBulletChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new bU(this.$el,{data:e,options:t})}});var fB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-bullet-chart"})},pB=[];const Hg={};var mB=Ct(dB,fB,pB,!1,gB,null,null,null);function gB(e){for(let t in Hg)this[t]=Hg[t]}const Vg=function(){return mB.exports}(),vB=mt.defineComponent({name:"ExperimentalCcvChoroplethChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new wU(this.$el,{data:e,options:t})}});var yB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"experimental-ccv-choropleth-chart"})},_B=[];const Fg={};var xB=Ct(vB,yB,_B,!1,bB,null,null,null);function bB(e){for(let t in Fg)this[t]=Fg[t]}const Gg=function(){return xB.exports}(),wB=mt.defineComponent({name:"CcvCirclePackChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new EU(this.$el,{data:e,options:t})}});var EB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-circle-pack-chart"})},SB=[];const zg={};var OB=Ct(wB,EB,SB,!1,TB,null,null,null);function TB(e){for(let t in zg)this[t]=zg[t]}const jg=function(){return OB.exports}(),CB=mt.defineComponent({name:"CcvComboChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new SU(this.$el,{data:e,options:t})}});var MB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-combo-chart"})},$B=[];const qg={};var AB=Ct(CB,MB,$B,!1,LB,null,null,null);function LB(e){for(let t in qg)this[t]=qg[t]}const Wg=function(){return AB.exports}(),DB=mt.defineComponent({name:"CcvDonutChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new OU(this.$el,{data:e,options:t})}});var kB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-donut-chart"})},RB=[];const Yg={};var IB=Ct(DB,kB,RB,!1,PB,null,null,null);function PB(e){for(let t in Yg)this[t]=Yg[t]}const Xg=function(){return IB.exports}(),NB=mt.defineComponent({name:"CcvGaugeChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new TU(this.$el,{data:e,options:t})}});var UB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-gauge-chart"})},BB=[];const Zg={};var HB=Ct(NB,UB,BB,!1,VB,null,null,null);function VB(e){for(let t in Zg)this[t]=Zg[t]}const Kg=function(){return HB.exports}(),FB=mt.defineComponent({name:"CcvGroupedBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new CU(this.$el,{data:e,options:t})}});var GB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-grouped-bar-chart"})},zB=[];const Qg={};var jB=Ct(FB,GB,zB,!1,qB,null,null,null);function qB(e){for(let t in Qg)this[t]=Qg[t]}const Jg=function(){return jB.exports}(),WB=mt.defineComponent({name:"CcvHeatmapChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new MU(this.$el,{data:e,options:t})}});var YB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-heatmap-chart"})},XB=[];const tv={};var ZB=Ct(WB,YB,XB,!1,KB,null,null,null);function KB(e){for(let t in tv)this[t]=tv[t]}const ev=function(){return ZB.exports}(),QB=mt.defineComponent({name:"CcvHistogramChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new $U(this.$el,{data:e,options:t})}});var JB=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-histogram-chart"})},tH=[];const nv={};var eH=Ct(QB,JB,tH,!1,nH,null,null,null);function nH(e){for(let t in nv)this[t]=nv[t]}const iv=function(){return eH.exports}(),iH=mt.defineComponent({name:"CcvLineChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new AU(this.$el,{data:e,options:t})}});var rH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-line-chart"})},sH=[];const rv={};var aH=Ct(iH,rH,sH,!1,oH,null,null,null);function oH(e){for(let t in rv)this[t]=rv[t]}const sv=function(){return aH.exports}(),lH=mt.defineComponent({name:"CcvLollipopChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new LU(this.$el,{data:e,options:t})}});var cH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-lollipop-chart"})},uH=[];const av={};var hH=Ct(lH,cH,uH,!1,dH,null,null,null);function dH(e){for(let t in av)this[t]=av[t]}const ov=function(){return hH.exports}(),fH=mt.defineComponent({name:"CcvMeterChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new DU(this.$el,{data:e,options:t})}});var pH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-meter-chart"})},mH=[];const lv={};var gH=Ct(fH,pH,mH,!1,vH,null,null,null);function vH(e){for(let t in lv)this[t]=lv[t]}const cv=function(){return gH.exports}(),yH=mt.defineComponent({name:"CcvPieChart",extends:$t,props:{data:{type:Array,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new Ag(this.$el,{data:e,options:t})}});var _H=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-pie-chart"})},xH=[];const uv={};var bH=Ct(yH,_H,xH,!1,wH,null,null,null);function wH(e){for(let t in uv)this[t]=uv[t]}const hv=function(){return bH.exports}(),EH=mt.defineComponent({name:"CcvRadarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new kU(this.$el,{data:e,options:t})}});var SH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-radar-chart"})},OH=[];const dv={};var TH=Ct(EH,SH,OH,!1,CH,null,null,null);function CH(e){for(let t in dv)this[t]=dv[t]}const fv=function(){return TH.exports}(),MH=mt.defineComponent({name:"CcvScatterChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new RU(this.$el,{data:e,options:t})}});var $H=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-scatter-chart"})},AH=[];const pv={};var LH=Ct(MH,$H,AH,!1,DH,null,null,null);function DH(e){for(let t in pv)this[t]=pv[t]}const mv=function(){return LH.exports}(),kH=mt.defineComponent({name:"CcvSimpleBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new NU(this.$el,{data:e,options:t})}});var RH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-simple-bar-chart"})},IH=[];const gv={};var PH=Ct(kH,RH,IH,!1,NH,null,null,null);function NH(e){for(let t in gv)this[t]=gv[t]}const vv=function(){return PH.exports}(),UH=mt.defineComponent({name:"CcvStackedAreaChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new UU(this.$el,{data:e,options:t})}});var BH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-stacked-area-chart"})},HH=[];const yv={};var VH=Ct(UH,BH,HH,!1,FH,null,null,null);function FH(e){for(let t in yv)this[t]=yv[t]}const _v=function(){return VH.exports}(),GH=mt.defineComponent({name:"CcvStackedBarChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new BU(this.$el,{data:e,options:t})}});var zH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-stacked-bar-chart"})},jH=[];const xv={};var qH=Ct(GH,zH,jH,!1,WH,null,null,null);function WH(e){for(let t in xv)this[t]=xv[t]}const bv=function(){return qH.exports}(),YH=mt.defineComponent({name:"CcvTreeChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new IU(this.$el,{data:e,options:t})}});var XH=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-tree-chart"})},ZH=[];const wv={};var KH=Ct(YH,XH,ZH,!1,QH,null,null,null);function QH(e){for(let t in wv)this[t]=wv[t]}const Ev=function(){return KH.exports}(),JH=mt.defineComponent({name:"CcvTreemapChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new PU(this.$el,{data:e,options:t})}});var tV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-treemap-chart"})},eV=[];const Sv={};var nV=Ct(JH,tV,eV,!1,iV,null,null,null);function iV(e){for(let t in Sv)this[t]=Sv[t]}const Ov=function(){return nV.exports}(),rV=mt.defineComponent({name:"CcvWordCloudChart",extends:$t,props:{data:{type:Object,required:!0},options:{type:Object,required:!0}},mounted(){const{data:e,options:t}=this.$props;this.coreChart=new HU(this.$el,{data:e,options:t})}});var sV=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ccv-wordcloud-chart"})},aV=[];const Tv={};var oV=Ct(rV,sV,aV,!1,lV,null,null,null);function lV(e){for(let t in Tv)this[t]=Tv[t]}const Cv=function(){return oV.exports}(),Mv=[kg,Ig,Ng,Bg,Vg,Gg,jg,Wg,Xg,Kg,Jg,ev,iv,sv,ov,cv,hv,fv,mv,vv,_v,bv,Ev,Ov,Cv],cV={install(e,t){if(typeof t>"u")for(const n of Mv)e.component(n.name,n);else{if(!(t instanceof Array))throw new TypeError("options must be an array");for(const n of Mv)t.includes(n.name)&&e.component(n.name,n)}}};rt.CcvAlluvialChart=kg,rt.CcvAreaChart=Ig,rt.CcvBoxplotChart=Ng,rt.CcvBubbleChart=Bg,rt.CcvBulletChart=Vg,rt.CcvCirclePackChart=jg,rt.CcvComboChart=Wg,rt.CcvDonutChart=Xg,rt.CcvGaugeChart=Kg,rt.CcvGroupedBarChart=Jg,rt.CcvHeatmapChart=ev,rt.CcvHistogramChart=iv,rt.CcvLineChart=sv,rt.CcvLollipopChart=ov,rt.CcvMeterChart=cv,rt.CcvPieChart=hv,rt.CcvRadarChart=fv,rt.CcvScatterChart=mv,rt.CcvSimpleBarChart=vv,rt.CcvStackedAreaChart=_v,rt.CcvStackedBarChart=bv,rt.CcvTreeChart=Ev,rt.CcvTreemapChart=Ov,rt.CcvWordCloudChart=Cv,rt.ExperimentalCcvChoroplethChart=Gg,rt.default=cV,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
84
84
  //# sourceMappingURL=index.js.map