@orbcharts/core 3.0.0-beta.7 → 3.0.0-beta.9
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.
@@ -15,6 +15,8 @@ const Ae = {
|
|
15
15
|
colors: {
|
16
16
|
light: {
|
17
17
|
label: ["#67B7DC", "#6794DC", "#6771DC", "#8067DC", "#A367DC", "#C767DC", "#DC67CE", "#DC67AB", "#DC6788", "#DC6967", "#DC8C67", "#DCAF67"],
|
18
|
+
// label: ['#F3A356', '#7A60F0', '#38B1AF', '#60A2F0', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
19
|
+
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
18
20
|
// primary: '#454545',
|
19
21
|
primary: "#1b1e23",
|
20
22
|
secondary: "#e1e1e1",
|
@@ -22,7 +24,8 @@ const Ae = {
|
|
22
24
|
background: "#ffffff"
|
23
25
|
},
|
24
26
|
dark: {
|
25
|
-
label: ["#67B7DC", "#6794DC", "#6771DC", "#8067DC", "#A367DC", "#C767DC", "#DC67CE", "#DC67AB", "#DC6788", "#DC6967", "#DC8C67", "#DCAF67"],
|
27
|
+
label: ["#67B7DC", "#6794DC", "#38B1AF", "#6771DC", "#8067DC", "#A367DC", "#C767DC", "#DC67CE", "#DC67AB", "#DC6788", "#DC6967", "#DC8C67", "#DCAF67"],
|
28
|
+
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
26
29
|
primary: "#f0f0f0",
|
27
30
|
secondary: "#e1e1e1",
|
28
31
|
white: "#ffffff",
|
@@ -1,4 +1,4 @@
|
|
1
|
-
(function(g,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(g=typeof globalThis<"u"?globalThis:g||self,ot(g["orbcharts-core"]={}))})(this,function(g){"use strict";const ot={width:"auto",height:"auto"},Fe={top:60,right:60,bottom:60,left:60},Le={padding:Fe,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{label:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#1b1e23",secondary:"#e1e1e1",white:"#ffffff",background:"#ffffff"},dark:{label:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#f0f0f0",secondary:"#e1e1e1",white:"#ffffff",background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Gn=800,Xn=500,Wi=[],Ji=[],Ki=[],Zi=[],Qi=[],ta={nodes:[],edges:[]},V={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Yn={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Nt={gap:120,rowAmount:1,columnAmount:1},Ee={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Nt},separateSeries:!1,sumSeries:!1};Ee.visibleFilter.toString=()=>"(datum, context) => true";const Oe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...V},groupAxis:{...Yn},separateSeries:!1},Pe={type:"grid",visibleFilter:(t,e)=>!0,...Oe,container:{...Nt}};Pe.visibleFilter.toString=()=>"(datum, context) => true";const Bt={...Oe},Re={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Bt}],separateGrid:!1,container:{...Nt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Ie={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],xAxis:{...V},yAxis:{...V},container:{...Nt},separateCategory:!1};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};ke.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ne.visibleFilter.toString=()=>"(datum, context) => true";function U(t){return Object.prototype.toString.call(t)==="[object Object]"}function Un(t){return Object.prototype.toString.call(t)==="[object Function]"}function Hn(t){return!!(t&&t.nodeType)}function ut(t,e){if(U(t)===!1||U(e)===!1)return Object.assign({},e);const n=(r,i)=>{const a=Object.assign({},i);for(let o of Object.keys(r)){if(!(o in i))continue;let u;U(r[o])&&U(i[o])?(u=n(r[o],i[o]),a[o]=u):a[o]=r[o]}return a};return n(t,e)}function ea(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function na(t,e){const n={string:a=>typeof a=="string",number:a=>typeof a=="number",boolean:a=>typeof a=="boolean",object:a=>U(a),"object[]":a=>Array.isArray(a)&&a.every(o=>U(o)),"string[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="string"),"number[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="number"),Function:a=>Un(a),null:a=>a===null,undefined:a=>a===void 0},r={ColorType:a=>a==="none"||a==="label"||a==="primary"||a==="secondary"||a==="white"||a==="background"};return Object.keys(t).find(a=>{if(e[a]){const o=e[a],u=t[a];if(o.toBeTypes){if(o.toBeTypes.some(f=>n[f](u))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(u)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](u)===!1)return!0}}return!1})}function F(t,e){const n=na(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const ra=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function te(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ia(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zn(t){let e,n,r;t.length!==2?(e=te,n=(u,s)=>te(t(u),s),r=(u,s)=>t(u)-s):(e=t===te||t===ia?t:aa,n=t,r=t);function i(u,s,l=0,f=u.length){if(l<f){if(e(s,s)!==0)return f;do{const c=l+f>>>1;n(u[c],s)<0?l=c+1:f=c}while(l<f)}return l}function a(u,s,l=0,f=u.length){if(l<f){if(e(s,s)!==0)return f;do{const c=l+f>>>1;n(u[c],s)<=0?l=c+1:f=c}while(l<f)}return l}function o(u,s,l=0,f=u.length){const c=i(u,s,l,f-1);return c>l&&r(u[c-1],s)>-r(u[c],s)?c-1:c}return{left:i,center:o,right:a}}function aa(){return 0}function oa(t){return t===null?NaN:+t}const jn=zn(te).right;zn(oa).center;class qn extends Map{constructor(e,n=la){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Wn(this,e))}has(e){return super.has(Wn(this,e))}set(e,n){return super.set(ua(this,e),n)}delete(e){return super.delete(sa(this,e))}}function Wn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ua({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function sa({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function la(t){return t!==null&&typeof t=="object"?t.valueOf():t}const ca=Math.sqrt(50),fa=Math.sqrt(10),ha=Math.sqrt(2);function ee(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=ca?10:a>=fa?5:a>=ha?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/o,u=Math.round(t*l),s=Math.round(e*l),u/l<t&&++u,s/l>e&&--s,l=-l):(l=Math.pow(10,i)*o,u=Math.round(t/l),s=Math.round(e/l),u*l<t&&++u,s*l>e&&--s),s<u&&.5<=n&&n<2?ee(t,e,n*2):[u,s,l]}function pa(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?ee(e,t,n):ee(t,e,n);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(r)if(o<0)for(let l=0;l<u;++l)s[l]=(a-l)/-o;else for(let l=0;l<u;++l)s[l]=(a-l)*o;else if(o<0)for(let l=0;l<u;++l)s[l]=(i+l)/-o;else for(let l=0;l<u;++l)s[l]=(i+l)*o;return s}function Be(t,e,n){return e=+e,t=+t,n=+n,ee(t,e,n)[2]}function da(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Be(e,t,n):Be(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ma(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}var ga={value:()=>{}};function Jn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ne(n)}function ne(t){this._=t}function ya(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ne.prototype=Jn.prototype={constructor:ne,on:function(t,e){var n=this._,r=ya(t+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=va(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=r[a]).type)n[i]=Kn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Kn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function va(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Kn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ga,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ve="http://www.w3.org/1999/xhtml";const Zn={svg:"http://www.w3.org/2000/svg",xhtml:Ve,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function re(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Zn.hasOwnProperty(e)?{space:Zn[e],local:t}:t}function ba(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ve&&e.documentElement.namespaceURI===Ve?e.createElement(t):e.createElementNS(n,t)}}function wa(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Qn(t){var e=re(t);return(e.local?wa:ba)(e)}function Da(){}function Ge(t){return t==null?Da:function(){return this.querySelector(t)}}function xa(t){typeof t!="function"&&(t=Ge(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=new Array(o),s,l,f=0;f<o;++f)(s=a[f])&&(l=t.call(s,s.__data__,f,a))&&("__data__"in s&&(l.__data__=s.__data__),u[f]=l);return new z(r,this._parents)}function _a(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function $a(){return[]}function tr(t){return t==null?$a:function(){return this.querySelectorAll(t)}}function Aa(t){return function(){return _a(t.apply(this,arguments))}}function Ta(t){typeof t=="function"?t=Aa(t):t=tr(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o=e[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&(r.push(t.call(s,s.__data__,l,o)),i.push(s));return new z(r,i)}function er(t){return function(){return this.matches(t)}}function nr(t){return function(e){return e.matches(t)}}var Sa=Array.prototype.find;function Ma(t){return function(){return Sa.call(this.children,t)}}function Ca(){return this.firstElementChild}function Fa(t){return this.select(t==null?Ca:Ma(typeof t=="function"?t:nr(t)))}var La=Array.prototype.filter;function Ea(){return Array.from(this.children)}function Oa(t){return function(){return La.call(this.children,t)}}function Pa(t){return this.selectAll(t==null?Ea:Oa(typeof t=="function"?t:nr(t)))}function Ra(t){typeof t!="function"&&(t=er(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new z(r,this._parents)}function rr(t){return new Array(t.length)}function Ia(){return new z(this._enter||this._groups.map(rr),this._parents)}function ie(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ie.prototype={constructor:ie,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ka(t){return function(){return t}}function Na(t,e,n,r,i,a){for(var o=0,u,s=e.length,l=a.length;o<l;++o)(u=e[o])?(u.__data__=a[o],r[o]=u):n[o]=new ie(t,a[o]);for(;o<s;++o)(u=e[o])&&(i[o]=u)}function Ba(t,e,n,r,i,a,o){var u,s,l=new Map,f=e.length,c=a.length,h=new Array(f),p;for(u=0;u<f;++u)(s=e[u])&&(h[u]=p=o.call(s,s.__data__,u,e)+"",l.has(p)?i[u]=s:l.set(p,s));for(u=0;u<c;++u)p=o.call(t,a[u],u,a)+"",(s=l.get(p))?(r[u]=s,s.__data__=a[u],l.delete(p)):n[u]=new ie(t,a[u]);for(u=0;u<f;++u)(s=e[u])&&l.get(h[u])===s&&(i[u]=s)}function Va(t){return t.__data__}function Ga(t,e){if(!arguments.length)return Array.from(this,Va);var n=e?Ba:Na,r=this._parents,i=this._groups;typeof t!="function"&&(t=ka(t));for(var a=i.length,o=new Array(a),u=new Array(a),s=new Array(a),l=0;l<a;++l){var f=r[l],c=i[l],h=c.length,p=Xa(t.call(f,f&&f.__data__,l,r)),d=p.length,m=u[l]=new Array(d),b=o[l]=new Array(d),_=s[l]=new Array(h);n(f,c,m,b,_,p,e);for(var T=0,$=0,E,A;T<d;++T)if(E=m[T]){for(T>=$&&($=T+1);!(A=b[$])&&++$<d;);E._next=A||null}}return o=new z(o,r),o._enter=u,o._exit=s,o}function Xa(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ya(){return new z(this._exit||this._groups.map(rr),this._parents)}function Ua(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ha(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),u=new Array(i),s=0;s<o;++s)for(var l=n[s],f=r[s],c=l.length,h=u[s]=new Array(c),p,d=0;d<c;++d)(p=l[d]||f[d])&&(h[d]=p);for(;s<i;++s)u[s]=n[s];return new z(u,this._parents)}function za(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ja(t){t||(t=qa);function e(c,h){return c&&h?t(c.__data__,h.__data__):!c-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],u=o.length,s=i[a]=new Array(u),l,f=0;f<u;++f)(l=o[f])&&(s[f]=l);s.sort(e)}return new z(i,this._parents).order()}function qa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Wa(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ja(){return Array.from(this)}function Ka(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Za(){let t=0;for(const e of this)++t;return t}function Qa(){return!this.node()}function to(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,u;a<o;++a)(u=i[a])&&t.call(u,u.__data__,a,i);return this}function eo(t){return function(){this.removeAttribute(t)}}function no(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ro(t,e){return function(){this.setAttribute(t,e)}}function io(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ao(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function oo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function uo(t,e){var n=re(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?no:eo:typeof e=="function"?n.local?oo:ao:n.local?io:ro)(n,e))}function ir(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function so(t){return function(){this.style.removeProperty(t)}}function lo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function co(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function fo(t,e,n){return arguments.length>1?this.each((e==null?so:typeof e=="function"?co:lo)(t,e,n??"")):At(this.node(),t)}function At(t,e){return t.style.getPropertyValue(e)||ir(t).getComputedStyle(t,null).getPropertyValue(e)}function ho(t){return function(){delete this[t]}}function po(t,e){return function(){this[t]=e}}function mo(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function go(t,e){return arguments.length>1?this.each((e==null?ho:typeof e=="function"?mo:po)(t,e)):this.node()[t]}function ar(t){return t.trim().split(/^|\s+/)}function Xe(t){return t.classList||new or(t)}function or(t){this._node=t,this._names=ar(t.getAttribute("class")||"")}or.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ur(t,e){for(var n=Xe(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function sr(t,e){for(var n=Xe(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function yo(t){return function(){ur(this,t)}}function vo(t){return function(){sr(this,t)}}function bo(t,e){return function(){(e.apply(this,arguments)?ur:sr)(this,t)}}function wo(t,e){var n=ar(t+"");if(arguments.length<2){for(var r=Xe(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?bo:e?yo:vo)(n,e))}function Do(){this.textContent=""}function xo(t){return function(){this.textContent=t}}function _o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function $o(t){return arguments.length?this.each(t==null?Do:(typeof t=="function"?_o:xo)(t)):this.node().textContent}function Ao(){this.innerHTML=""}function To(t){return function(){this.innerHTML=t}}function So(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Mo(t){return arguments.length?this.each(t==null?Ao:(typeof t=="function"?So:To)(t)):this.node().innerHTML}function Co(){this.nextSibling&&this.parentNode.appendChild(this)}function Fo(){return this.each(Co)}function Lo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Eo(){return this.each(Lo)}function Oo(t){var e=typeof t=="function"?t:Qn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Po(){return null}function Ro(t,e){var n=typeof t=="function"?t:Qn(t),r=e==null?Po:typeof e=="function"?e:Ge(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Io(){var t=this.parentNode;t&&t.removeChild(this)}function ko(){return this.each(Io)}function No(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Bo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vo(t){return this.select(t?Bo:No)}function Go(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xo(t){return function(e){t.call(this,e,this.__data__)}}function Yo(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Uo(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function Ho(t,e,n){return function(){var r=this.__on,i,a=Xo(e);if(r){for(var o=0,u=r.length;o<u;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function zo(t,e,n){var r=Yo(t+""),i,a=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u){for(var s=0,l=u.length,f;s<l;++s)for(i=0,f=u[s];i<a;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(u=e?Ho:Uo,i=0;i<a;++i)this.each(u(r[i],e,n));return this}function lr(t,e,n){var r=ir(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function jo(t,e){return function(){return lr(this,t,e)}}function qo(t,e){return function(){return lr(this,t,e.apply(this,arguments))}}function Wo(t,e){return this.each((typeof e=="function"?qo:jo)(t,e))}function*Jo(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var cr=[null];function z(t,e){this._groups=t,this._parents=e}function Vt(){return new z([[document.documentElement]],cr)}function Ko(){return this}z.prototype=Vt.prototype={constructor:z,select:xa,selectAll:Ta,selectChild:Fa,selectChildren:Pa,filter:Ra,data:Ga,enter:Ia,exit:Ya,join:Ua,merge:Ha,selection:Ko,order:za,sort:ja,call:Wa,nodes:Ja,node:Ka,size:Za,empty:Qa,each:to,attr:uo,style:fo,property:go,classed:wo,text:$o,html:Mo,raise:Fo,lower:Eo,append:Oo,insert:Ro,remove:ko,clone:Vo,datum:Go,on:zo,dispatch:Wo,[Symbol.iterator]:Jo};function ae(t){return typeof t=="string"?new z([[document.querySelector(t)]],[document.documentElement]):new z([[t]],cr)}function Ye(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function fr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Gt(){}var Xt=.7,oe=1/Xt,Tt="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zo=/^#([0-9a-f]{3,8})$/,Qo=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),tu=new RegExp(`^rgb\\(${Q},${Q},${Q}\\)$`),eu=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${Yt}\\)$`),nu=new RegExp(`^rgba\\(${Q},${Q},${Q},${Yt}\\)$`),ru=new RegExp(`^hsl\\(${Yt},${Q},${Q}\\)$`),iu=new RegExp(`^hsla\\(${Yt},${Q},${Q},${Yt}\\)$`),hr={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};Ye(Gt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:pr,formatHex:pr,formatHex8:au,formatHsl:ou,formatRgb:dr,toString:dr});function pr(){return this.rgb().formatHex()}function au(){return this.rgb().formatHex8()}function ou(){return br(this).formatHsl()}function dr(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Zo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?mr(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ue(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ue(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Qo.exec(t))?new H(e[1],e[2],e[3],1):(e=tu.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eu.exec(t))?ue(e[1],e[2],e[3],e[4]):(e=nu.exec(t))?ue(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ru.exec(t))?vr(e[1],e[2]/100,e[3]/100,1):(e=iu.exec(t))?vr(e[1],e[2]/100,e[3]/100,e[4]):hr.hasOwnProperty(t)?mr(hr[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function mr(t){return new H(t>>16&255,t>>8&255,t&255,1)}function ue(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function uu(t){return t instanceof Gt||(t=mt(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function Ue(t,e,n,r){return arguments.length===1?uu(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ye(H,Ue,fr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(gt(this.r),gt(this.g),gt(this.b),se(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:gr,formatHex:gr,formatHex8:su,formatRgb:yr,toString:yr}));function gr(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function su(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function yr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yt(t){return t=gt(t),(t<16?"0":"")+t.toString(16)}function vr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function br(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof Gt||(t=mt(t)),!t)return new W;if(t instanceof W)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(e===a?o=(n-r)/u+(n<r)*6:n===a?o=(r-e)/u+2:o=(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new W(o,u,s,t.opacity)}function lu(t,e,n,r){return arguments.length===1?br(t):new W(t,e,n,r??1)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ye(W,lu,fr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new W(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new H(He(t>=240?t-240:t+120,i,r),He(t,i,r),He(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new W(wr(this.h),le(this.s),le(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${wr(this.h)}, ${le(this.s)*100}%, ${le(this.l)*100}%${t===1?")":`, ${t})`}`}}));function wr(t){return t=(t||0)%360,t<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function He(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ze=t=>()=>t;function cu(t,e){return function(n){return t+n*e}}function fu(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function hu(t){return(t=+t)==1?Dr:function(e,n){return n-e?fu(e,n,t):ze(isNaN(e)?n:e)}}function Dr(t,e){var n=e-t;return n?cu(t,n):ze(isNaN(t)?e:t)}const ce=function t(e){var n=hu(e);function r(i,a){var o=n((i=Ue(i)).r,(a=Ue(a)).r),u=n(i.g,a.g),s=n(i.b,a.b),l=Dr(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=u(f),i.b=s(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function pu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function du(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function mu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=We(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(u){for(o=0;o<r;++o)a[o]=i[o](u);return a}}function gu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function J(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yu(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=We(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var je=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qe=new RegExp(je.source,"g");function vu(t){return function(){return t}}function bu(t){return function(e){return t(e)+""}}function xr(t,e){var n=je.lastIndex=qe.lastIndex=0,r,i,a,o=-1,u=[],s=[];for(t=t+"",e=e+"";(r=je.exec(t))&&(i=qe.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),u[o]?u[o]+=a:u[++o]=a),(r=r[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:J(r,i)})),n=qe.lastIndex;return n<e.length&&(a=e.slice(n),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?bu(s[0].x):vu(e):(e=s.length,function(l){for(var f=0,c;f<e;++f)u[(c=s[f]).i]=c.x(l);return u.join("")})}function We(t,e){var n=typeof e,r;return e==null||n==="boolean"?ze(e):(n==="number"?J:n==="string"?(r=mt(e))?(e=r,ce):xr:e instanceof mt?ce:e instanceof Date?gu:du(e)?pu:Array.isArray(e)?mu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?yu:J)(t,e)}function wu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _r=180/Math.PI,Je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $r(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*_r,skewX:Math.atan(s)*_r,scaleX:o,scaleY:u}}var fe;function Du(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Je:$r(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(t){return t==null||(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),!(t=fe.transform.baseVal.consolidate()))?Je:(t=t.matrix,$r(t.a,t.b,t.c,t.d,t.e,t.f))}function Ar(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,f,c,h,p,d){if(l!==c||f!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:J(l,c)},{i:m-2,x:J(f,h)})}else(c||h)&&p.push("translate("+c+e+h+n)}function o(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:J(l,f)})):f&&c.push(i(c)+"rotate("+f+r)}function u(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:J(l,f)}):f&&c.push(i(c)+"skewX("+f+r)}function s(l,f,c,h,p,d){if(l!==c||f!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:J(l,c)},{i:m-2,x:J(f,h)})}else(c!==1||h!==1)&&p.push(i(p)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=t(l),f=t(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,h),o(l.rotate,f.rotate,c,h),u(l.skewX,f.skewX,c,h),s(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(p){for(var d=-1,m=h.length,b;++d<m;)c[(b=h[d]).i]=b.x(p);return c.join("")}}}var _u=Ar(Du,"px, ","px)","deg)"),$u=Ar(xu,", ",")",")"),St=0,Ut=0,Ht=0,Tr=1e3,he,zt,pe=0,vt=0,de=0,jt=typeof performance=="object"&&performance.now?performance:Date,Sr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ke(){return vt||(Sr(Au),vt=jt.now()+de)}function Au(){vt=0}function me(){this._call=this._time=this._next=null}me.prototype=Mr.prototype={constructor:me,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ke():+n)+(e==null?0:+e),!this._next&&zt!==this&&(zt?zt._next=this:he=this,zt=this),this._call=t,this._time=n,Ze()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ze())}};function Mr(t,e,n){var r=new me;return r.restart(t,e,n),r}function Tu(){Ke(),++St;for(var t=he,e;t;)(e=vt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function Cr(){vt=(pe=jt.now())+de,St=Ut=0;try{Tu()}finally{St=0,Mu(),vt=0}}function Su(){var t=jt.now(),e=t-pe;e>Tr&&(de-=e,pe=t)}function Mu(){for(var t,e=he,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:he=n);zt=t,Ze(r)}function Ze(t){if(!St){Ut&&(Ut=clearTimeout(Ut));var e=t-vt;e>24?(t<1/0&&(Ut=setTimeout(Cr,t-jt.now()-de)),Ht&&(Ht=clearInterval(Ht))):(Ht||(pe=jt.now(),Ht=setInterval(Su,Tr)),St=1,Sr(Cr))}}function Fr(t,e,n){var r=new me;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Cu=Jn("start","end","cancel","interrupt"),Fu=[],Lr=0,Er=1,Qe=2,ge=3,Or=4,tn=5,ye=6;function ve(t,e,n,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Lu(t,n,{name:e,index:r,group:i,on:Cu,tween:Fu,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Lr})}function en(t,e){var n=K(t,e);if(n.state>Lr)throw new Error("too late; already scheduled");return n}function tt(t,e){var n=K(t,e);if(n.state>ge)throw new Error("too late; already running");return n}function K(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Lu(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Mr(a,0,n.time);function a(l){n.state=Er,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,c,h,p;if(n.state!==Er)return s();for(f in r)if(p=r[f],p.name===n.name){if(p.state===ge)return Fr(o);p.state===Or?(p.state=ye,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=ye,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Fr(function(){n.state===ge&&(n.state=Or,n.timer.restart(u,n.delay,n.time),u(l))}),n.state=Qe,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qe){for(n.state=ge,i=new Array(h=n.tween.length),f=0,c=-1;f<h;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=p);i.length=c+1}}function u(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(s),n.state=tn,1),c=-1,h=i.length;++c<h;)i[c].call(t,f);n.state===tn&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){n.state=ye,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Eu(t,e){var n=t.__transition,r,i,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){a=!1;continue}i=r.state>Qe&&r.state<tn,r.state=ye,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}a&&delete t.__transition}}function Ou(t){return this.each(function(){Eu(this,t)})}function Pu(t,e){var n,r;return function(){var i=tt(this,t),a=i.tween;if(a!==n){r=n=a;for(var o=0,u=r.length;o<u;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Ru(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=tt(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}a.tween=i}}function Iu(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Pu:Ru)(n,t,e))}function nn(t,e,n){var r=t._id;return t.each(function(){var i=tt(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return K(i,r).value[e]}}function Pr(t,e){var n;return(typeof e=="number"?J:e instanceof mt?ce:(n=mt(e))?(e=n,ce):xr)(t,e)}function ku(t){return function(){this.removeAttribute(t)}}function Nu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function Vu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function Gu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttribute(t):(o=this.getAttribute(t),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Xu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Yu(t,e){var n=re(t),r=n==="transform"?$u:Pr;return this.attrTween(t,typeof e=="function"?(n.local?Xu:Gu)(n,r,nn(this,"attr."+t,e)):e==null?(n.local?Nu:ku)(n):(n.local?Vu:Bu)(n,r,e))}function Uu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function zu(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Hu(t,a)),n}return i._value=e,i}function ju(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Uu(t,a)),n}return i._value=e,i}function qu(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=re(t);return this.tween(n,(r.local?zu:ju)(r,e))}function Wu(t,e){return function(){en(this,t).delay=+e.apply(this,arguments)}}function Ju(t,e){return e=+e,function(){en(this,t).delay=e}}function Ku(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wu:Ju)(e,t)):K(this.node(),e).delay}function Zu(t,e){return function(){tt(this,t).duration=+e.apply(this,arguments)}}function Qu(t,e){return e=+e,function(){tt(this,t).duration=e}}function ts(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Zu:Qu)(e,t)):K(this.node(),e).duration}function es(t,e){if(typeof e!="function")throw new Error;return function(){tt(this,t).ease=e}}function ns(t){var e=this._id;return arguments.length?this.each(es(e,t)):K(this.node(),e).ease}function rs(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;tt(this,t).ease=n}}function is(t){if(typeof t!="function")throw new Error;return this.each(rs(this._id,t))}function as(t){typeof t!="function"&&(t=er(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new nt(r,this._parents,this._name,this._id)}function os(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s=e[u],l=n[u],f=s.length,c=o[u]=new Array(f),h,p=0;p<f;++p)(h=s[p]||l[p])&&(c[p]=h);for(;u<r;++u)o[u]=e[u];return new nt(o,this._parents,this._name,this._id)}function us(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ss(t,e,n){var r,i,a=us(e)?en:tt;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}function ls(t,e){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(t):this.each(ss(n,t,e))}function cs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function fs(){return this.on("end.remove",cs(this._id))}function hs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ge(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u=r[o],s=u.length,l=a[o]=new Array(s),f,c,h=0;h<s;++h)(f=u[h])&&(c=t.call(f,f.__data__,h,u))&&("__data__"in f&&(c.__data__=f.__data__),l[h]=c,ve(l[h],e,n,h,l,K(f,n)));return new nt(a,this._parents,e,n)}function ps(t){var e=this._name,n=this._id;typeof t!="function"&&(t=tr(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s=r[u],l=s.length,f,c=0;c<l;++c)if(f=s[c]){for(var h=t.call(f,f.__data__,c,s),p,d=K(f,n),m=0,b=h.length;m<b;++m)(p=h[m])&&ve(p,e,n,m,h,d);a.push(h),o.push(f)}return new nt(a,o,e,n)}var ds=Vt.prototype.constructor;function ms(){return new ds(this._groups,this._parents)}function gs(t,e){var n,r,i;return function(){var a=At(this,t),o=(this.style.removeProperty(t),At(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}function Rr(t){return function(){this.style.removeProperty(t)}}function ys(t,e,n){var r,i=n+"",a;return function(){var o=At(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}function vs(t,e,n){var r,i,a;return function(){var o=At(this,t),u=n(this),s=u+"";return u==null&&(s=u=(this.style.removeProperty(t),At(this,t))),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function bs(t,e){var n,r,i,a="style."+e,o="end."+a,u;return function(){var s=tt(this,t),l=s.on,f=s.value[a]==null?u||(u=Rr(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(o,i=f),s.on=r}}function ws(t,e,n){var r=(t+="")=="transform"?_u:Pr;return e==null?this.styleTween(t,gs(t,r)).on("end.style."+t,Rr(t)):typeof e=="function"?this.styleTween(t,vs(t,r,nn(this,"style."+t,e))).each(bs(this._id,t)):this.styleTween(t,ys(t,r,e),n).on("end.style."+t,null)}function Ds(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function xs(t,e,n){var r,i;function a(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Ds(t,o,n)),r}return a._value=e,a}function _s(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,xs(t,e,n??""))}function $s(t){return function(){this.textContent=t}}function As(t){return function(){var e=t(this);this.textContent=e??""}}function Ts(t){return this.tween("text",typeof t=="function"?As(nn(this,"text",t)):$s(t==null?"":t+""))}function Ss(t){return function(e){this.textContent=t.call(this,e)}}function Ms(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Ss(i)),e}return r._value=t,r}function Cs(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Ms(t))}function Fs(){for(var t=this._name,e=this._id,n=Ir(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)if(s=o[l]){var f=K(s,e);ve(s,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nt(r,this._parents,t,n)}function Ls(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var u={value:o},s={value:function(){--i===0&&a()}};n.each(function(){var l=tt(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),l.on=e}),i===0&&a()})}var Es=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ir(){return++Es}var rt=Vt.prototype;nt.prototype={constructor:nt,select:hs,selectAll:ps,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:as,merge:os,selection:ms,transition:Fs,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:ls,attr:Yu,attrTween:qu,style:ws,styleTween:_s,text:Ts,textTween:Cs,remove:fs,tween:Iu,delay:Ku,duration:ts,ease:ns,easeVarying:is,end:Ls,[Symbol.iterator]:rt[Symbol.iterator]};function Os(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ps={time:null,delay:0,duration:250,ease:Os};function Rs(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Is(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=Ir(),(n=Ps).time=Ke(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&ve(s,t,e,l,o,n||Rs(s,e));return new nt(r,this._parents,t,e)}Vt.prototype.interrupt=Ou,Vt.prototype.transition=Is;function ks(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function be(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Mt(t){return t=be(Math.abs(t)),t?t[1]:NaN}function Ns(t,e){return function(n,r){for(var i=n.length,a=[],o=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Bs(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Vs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function we(t){if(!(e=Vs.exec(t)))throw new Error("invalid format: "+t);var e;return new rn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}we.prototype=rn.prototype;function rn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}rn.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 Gs(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var kr;function Xs(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(kr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+be(t,Math.max(0,e+a-1))[0]}function Nr(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Br={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ks,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nr(t*100,e),r:Nr,s:Xs,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vr(t){return t}var Gr=Array.prototype.map,Xr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ys(t){var e=t.grouping===void 0||t.thousands===void 0?Vr:Ns(Gr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Vr:Bs(Gr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",s=t.nan===void 0?"NaN":t.nan+"";function l(c){c=we(c);var h=c.fill,p=c.align,d=c.sign,m=c.symbol,b=c.zero,_=c.width,T=c.comma,$=c.precision,E=c.trim,A=c.type;A==="n"?(T=!0,A="g"):Br[A]||($===void 0&&($=12),E=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var N=m==="$"?n:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",Y=m==="$"?r:/[%p]/.test(A)?o:"",k=Br[A],w=/[defgprs%]/.test(A);$=$===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function x(y){var S=N,C=Y,B,dt,$t;if(A==="c")C=k(y)+C,y="";else{y=+y;var Z=y<0||1/y<0;if(y=isNaN(y)?s:k(Math.abs(y),$),E&&(y=Gs(y)),Z&&+y==0&&d!=="+"&&(Z=!1),S=(Z?d==="("?d:u:d==="-"||d==="("?"":d)+S,C=(A==="s"?Xr[8+kr/3]:"")+C+(Z&&d==="("?")":""),w){for(B=-1,dt=y.length;++B<dt;)if($t=y.charCodeAt(B),48>$t||$t>57){C=($t===46?i+y.slice(B+1):y.slice(B))+C,y=y.slice(0,B);break}}}T&&!b&&(y=e(y,1/0));var Ce=S.length+y.length+C.length,at=Ce<_?new Array(_-Ce+1).join(h):"";switch(T&&b&&(y=e(at+y,at.length?_-C.length:1/0),at=""),p){case"<":y=S+y+C+at;break;case"=":y=S+at+y+C;break;case"^":y=at.slice(0,Ce=at.length>>1)+S+y+C+at.slice(Ce);break;default:y=at+S+y+C;break}return a(y)}return x.toString=function(){return c+""},x}function f(c,h){var p=l((c=we(c),c.type="f",c)),d=Math.max(-8,Math.min(8,Math.floor(Mt(h)/3)))*3,m=Math.pow(10,-d),b=Xr[8+d/3];return function(_){return p(m*_)+b}}return{format:l,formatPrefix:f}}var De,an,Yr;Us({thousands:",",grouping:[3],currency:["$",""]});function Us(t){return De=Ys(t),an=De.format,Yr=De.formatPrefix,De}function Hs(t){return Math.max(0,-Mt(Math.abs(t)))}function zs(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Mt(e)/3)))*3-Mt(Math.abs(t)))}function js(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mt(e)-Mt(t))+1}function xe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ur=Symbol("implicit");function Hr(){var t=new qn,e=[],n=[],r=Ur;function i(a){let o=t.get(a);if(o===void 0){if(r!==Ur)return r;t.set(a,o=e.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new qn;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Hr(e,n).unknown(r)},xe.apply(i,arguments),i}function zr(){var t=Hr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,a,o,u=!1,s=0,l=0,f=.5;delete t.unknown;function c(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;a=(m-d)/Math.max(1,h-s+l*2),u&&(a=Math.floor(a)),d+=(m-d-a*(h-s))*f,o=a*(1-s),u&&(d=Math.round(d),o=Math.round(o));var b=ma(h).map(function(_){return d+a*_});return n(p?b.reverse():b)}return t.domain=function(h){return arguments.length?(e(h),c()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,c()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,u=!0,c()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(h){return arguments.length?(u=!!h,c()):u},t.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),c()):s},t.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),c()):s},t.paddingOuter=function(h){return arguments.length?(l=+h,c()):l},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),c()):f},t.copy=function(){return zr(e(),[r,i]).round(u).paddingInner(s).paddingOuter(l).align(f)},xe.apply(c(),arguments)}function jr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return jr(e())},t}function qs(){return jr(zr.apply(null,arguments).paddingInner(1))}function Ws(t){return function(){return t}}function Js(t){return+t}var qr=[0,1];function Ct(t){return t}function on(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Ws(isNaN(e)?NaN:.5)}function Ks(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Zs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=on(i,r),a=n(o,a)):(r=on(r,i),a=n(a,o)),function(u){return a(r(u))}}function Qs(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=on(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(u){var s=jn(t,u,1,r)-1;return a[s](i[s](u))}}function tl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function el(){var t=qr,e=qr,n=We,r,i,a,o=Ct,u,s,l;function f(){var h=Math.min(t.length,e.length);return o!==Ct&&(o=Ks(t[0],t[h-1])),u=h>2?Qs:Zs,s=l=null,c}function c(h){return h==null||isNaN(h=+h)?a:(s||(s=u(t.map(r),e,n)))(r(o(h)))}return c.invert=function(h){return o(i((l||(l=u(e,t.map(r),J)))(h)))},c.domain=function(h){return arguments.length?(t=Array.from(h,Js),f()):t.slice()},c.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},c.rangeRound=function(h){return e=Array.from(h),n=wu,f()},c.clamp=function(h){return arguments.length?(o=h?!0:Ct,f()):o!==Ct},c.interpolate=function(h){return arguments.length?(n=h,f()):n},c.unknown=function(h){return arguments.length?(a=h,c):a},function(h,p){return r=h,i=p,f()}}function nl(){return el()(Ct,Ct)}function rl(t,e,n,r){var i=da(t,e,n),a;switch(r=we(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=zs(i,o))&&(r.precision=a),Yr(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=js(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Hs(i))&&(r.precision=a-(r.type==="%")*2);break}}return an(r)}function Wr(t){var e=t.domain;return t.ticks=function(n){var r=e();return pa(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return rl(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],u=r[a],s,l,f=10;for(u<o&&(l=o,o=u,u=l,l=i,i=a,a=l);f-- >0;){if(l=Be(o,u,n),l===s)return r[i]=o,r[a]=u,e(r);if(l>0)o=Math.floor(o/l)*l,u=Math.ceil(u/l)*l;else if(l<0)o=Math.ceil(o*l)/l,u=Math.floor(u*l)/l;else break;s=l}return t},t}function qt(){var t=nl();return t.copy=function(){return tl(t,qt())},xe.apply(t,arguments),Wr(t)}function Jr(){var t=0,e=1,n=1,r=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[jn(r,s,0,n)]:a}function u(){var s=-1;for(r=new Array(n);++s<n;)r[s]=((s+1)*e-(s-n)*t)/(n+1);return o}return o.domain=function(s){return arguments.length?([t,e]=s,t=+t,e=+e,u()):[t,e]},o.range=function(s){return arguments.length?(n=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Jr().domain([t,e]).range(i).unknown(a)},xe.apply(Wr(o),arguments)}function Wt(t,e,n){this.k=t,this.x=e,this.y=n}Wt.prototype={constructor:Wt,scale:function(t){return t===1?this:new Wt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Wt.prototype;function il(t,e){return e instanceof Function?e(t):an(e)(t)}function Jt(t,e,n,r){let i=`${t}_${e}`;return n!=null&&(i+=`_${n}`),r!=null&&(i+=`_${r}`),i}function _e(t,e){return`${t}_series${e}`}function un(t,e){return`${t}_group${e}`}function $e(){return""}function sn({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,a)=>r[a]!=null?r[a]:_e(n,a))}function Kr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((a,o)=>i[o]!=null?i[o]:_e(`${n}_grid${r}`,o))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,a)=>r[a]!=null?r[a]:un(n,a))}function Qr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((a,o)=>i[o]!=null?i[o]:un(`${n}_grid${r}`,o))}function st(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function ti(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return st(e)}function al(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ln(t){const n=t.flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ol(t){const n=t.flat().flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ul(t,e){const n=t.map(r=>Array.isArray(r)?r[e]??null:U(r)?r.value[e]??null:null).filter(r=>r!=null);return st(n)}function sl({data:t,minX:e,maxX:n,minY:r,maxY:i}){let a=[],o=null,u=null,s=null,l=null;for(let f of t)for(let c of f)c.axisX>=e&&c.axisX<=n&&c.axisY>=r&&c.axisY<=i&&(a.push(f),(o==null||c.axisX<o.axisX)&&(o=c),(u==null||c.axisX>u.axisX)&&(u=c),(s==null||c.axisY<s.axisY)&&(s=c),(l==null||c.axisY>l.axisY)&&(l=c));return{minXDatum:o,maxXDatum:u,minYDatum:s,maxYDatum:l,filteredData:a}}function ei(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((a,o)=>Math.max(a,o.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let a=0;a<n;a++)for(let o=0;o<r;o++)i[o][a]=e[a][o];return i}function lt(t,e){return t<e.colors[e.colorScheme].label.length?e.colors[e.colorScheme].label[t]:e.colors[e.colorScheme].label[t%e.colors[e.colorScheme].label.length]}function ni(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function cn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ni(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),f=(t.width-r*(a-1))/a,c=(t.height-r*(i-1))/i,h=s*f+s*r,p=l*c+l*r;return{slotIndex:u,rowIndex:l,columnIndex:s,startX:h,startY:p,centerX:h+f/2,centerY:p+c/2,width:f,height:c}})}function Ft(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ni(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),f=(t.width-r*(a-1))/a,c=(t.height-r*(i-1))/i,h=s*f+s*r,p=l*c+l*r,d=[h,p],m=[f/t.width,c/t.height];return{slotIndex:u,rowIndex:l,columnIndex:s,translate:d,scale:m}})}const ll=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=(o,u,s,l)=>{const f=Jt(n.type,u,s),c=n.seriesLabels[u]||_e("series",u),h=lt(u,r);return typeof o=="number"?{id:f,index:l,seq:0,label:f,description:"",data:{},value:o,seriesIndex:u,seriesLabel:c,color:h,visible:!0}:{id:o.id?o.id:f,index:l,seq:0,label:o.label?o.label:f,description:o.description,data:o.data??{},value:o.value,seriesIndex:u,seriesLabel:c,color:h,visible:!0}};i=e.map((o,u)=>Array.isArray(o)?o.map((s,l)=>a(s,u,l,i.length+l)):a(o,u,0,i.length)).flat().sort(n.sort??void 0).map((o,u)=>(o.seq=u,o)).map(o=>(o.visible=n.visibleFilter(o,t),o)).sort((o,u)=>o.index-u.index).reduce((o,u)=>(o[u.seriesIndex]||(o[u.seriesIndex]=[]),o[u.seriesIndex].push(u),o),[])}catch(a){throw Error(a)}return i},cl=t=>F({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var fn=function(t,e){return fn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},fn(t,e)};function et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function fl(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(f){try{l(r.next(f))}catch(c){o(c)}}function s(f){try{l(r.throw(f))}catch(c){o(c)}}function l(f){f.done?a(f.value):i(f.value).then(u,s)}l((r=r.apply(t,e||[])).next())})}function ri(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(f){return s([l,f])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Lt(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ct(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}function Et(t){return this instanceof Et?(this.v=t,this):new Et(t)}function hl(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(d){return Promise.resolve(d).then(p,c)}}function u(p,d){r[p]&&(i[p]=function(m){return new Promise(function(b,_){a.push([p,m,b,_])>1||s(p,m)})},d&&(i[p]=d(i[p])))}function s(p,d){try{l(r[p](d))}catch(m){h(a[0][3],m)}}function l(p){p.value instanceof Et?Promise.resolve(p.value.v).then(f,c):h(a[0][2],p)}function f(p){s("next",p)}function c(p){s("throw",p)}function h(p,d){p(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function pl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Lt=="function"?Lt(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(u,s){o=t[a](o),i(u,s,o.done,o.value)})}}function i(a,o,u,s){Promise.resolve(s).then(function(l){a({value:l,done:u})},o)}}typeof SuppressedError=="function"&&SuppressedError;function I(t){return typeof t=="function"}function hn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pn=hn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
1
|
+
(function(g,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(g=typeof globalThis<"u"?globalThis:g||self,ot(g["orbcharts-core"]={}))})(this,function(g){"use strict";const ot={width:"auto",height:"auto"},Fe={top:60,right:60,bottom:60,left:60},Le={padding:Fe,highlightTarget:"datum",highlightDefault:null,colorScheme:"light",colors:{light:{label:["#67B7DC","#6794DC","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#1b1e23",secondary:"#e1e1e1",white:"#ffffff",background:"#ffffff"},dark:{label:["#67B7DC","#6794DC","#38B1AF","#6771DC","#8067DC","#A367DC","#C767DC","#DC67CE","#DC67AB","#DC6788","#DC6967","#DC8C67","#DCAF67"],primary:"#f0f0f0",secondary:"#e1e1e1",white:"#ffffff",background:"#000000"}},styles:{textSize:"0.875rem",unhighlightedOpacity:.3},transitionDuration:800,transitionEase:"easeCubic"},Gn=800,Xn=500,Wi=[],Ji=[],Ki=[],Zi=[],Qi=[],ta={nodes:[],edges:[]},V={position:"left",scaleDomain:["auto","auto"],scaleRange:[0,.9],label:""},Yn={position:"bottom",scaleDomain:[0,"max"],scalePadding:.5,label:""},Nt={gap:120,rowAmount:1,columnAmount:1},Ee={type:"series",visibleFilter:(t,e)=>!0,sort:null,seriesLabels:[],container:{...Nt},separateSeries:!1,sumSeries:!1};Ee.visibleFilter.toString=()=>"(datum, context) => true";const Oe={seriesDirection:"row",rowLabels:[],columnLabels:[],valueAxis:{...V},groupAxis:{...Yn},separateSeries:!1},Pe={type:"grid",visibleFilter:(t,e)=>!0,...Oe,container:{...Nt}};Pe.visibleFilter.toString=()=>"(datum, context) => true";const Bt={...Oe},Re={type:"multiGrid",visibleFilter:(t,e)=>!0,gridList:[{...Bt}],separateGrid:!1,container:{...Nt}};Re.visibleFilter.toString=()=>"(datum, context) => true";const Ie={type:"multiValue",visibleFilter:(t,e)=>!0,categoryLabels:[],xAxis:{...V},yAxis:{...V},container:{...Nt},separateCategory:!1};Ie.visibleFilter.toString=()=>"(datum, context) => true";const ke={type:"tree",visibleFilter:(t,e)=>!0,categoryLabels:[]};ke.visibleFilter.toString=()=>"(datum, context) => true";const Ne={type:"relationship",visibleFilter:(t,e)=>!0,categoryLabels:[]};Ne.visibleFilter.toString=()=>"(datum, context) => true";function U(t){return Object.prototype.toString.call(t)==="[object Object]"}function Un(t){return Object.prototype.toString.call(t)==="[object Function]"}function Hn(t){return!!(t&&t.nodeType)}function ut(t,e){if(U(t)===!1||U(e)===!1)return Object.assign({},e);const n=(r,i)=>{const a=Object.assign({},i);for(let o of Object.keys(r)){if(!(o in i))continue;let u;U(r[o])&&U(i[o])?(u=n(r[o],i[o]),a[o]=u):a[o]=r[o]}return a};return n(t,e)}function ea(t=0){try{let e=t.toString().split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")}catch(e){console.error(e)}}function na(t,e){const n={string:a=>typeof a=="string",number:a=>typeof a=="number",boolean:a=>typeof a=="boolean",object:a=>U(a),"object[]":a=>Array.isArray(a)&&a.every(o=>U(o)),"string[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="string"),"number[]":a=>Array.isArray(a)&&a.every(o=>typeof o=="number"),Function:a=>Un(a),null:a=>a===null,undefined:a=>a===void 0},r={ColorType:a=>a==="none"||a==="label"||a==="primary"||a==="secondary"||a==="white"||a==="background"};return Object.keys(t).find(a=>{if(e[a]){const o=e[a],u=t[a];if(o.toBeTypes){if(o.toBeTypes.some(f=>n[f](u))===!1)return!0}else if(o.toBe){const{toBe:s,test:l}=o;if(l(u)===!1)return!0}else if(o.toBeOption){const s=o.toBeOption;if(r[s](u)===!1)return!0}}return!1})}function F(t,e){const n=na(t,e);if(n){const r=e[n],i=r.toBeTypes?r.toBeTypes.join(" | "):r.toBe?r.toBe:r.toBeOption?r.toBeOption:"";return{status:"error",columnName:n,expectToBe:i}}else return{status:"success",columnName:"",expectToBe:""}}const ra=t=>{const e=F(t,{visibleFilter:{toBeTypes:["Function"]},sort:{toBeTypes:["Function","null"]},seriesLabels:{toBeTypes:["string[]"]},container:{toBeTypes:["object"]},separateSeries:{toBeTypes:["boolean"]},sumSeries:{toBeTypes:["boolean"]}});if(t.container){const n=F(t.container,{gap:{toBeTypes:["number"]},rowAmount:{toBeTypes:["number"]},columnAmount:{toBeTypes:["number"]}});if(n.status==="error")return n}return e};function te(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ia(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function zn(t){let e,n,r;t.length!==2?(e=te,n=(u,s)=>te(t(u),s),r=(u,s)=>t(u)-s):(e=t===te||t===ia?t:aa,n=t,r=t);function i(u,s,l=0,f=u.length){if(l<f){if(e(s,s)!==0)return f;do{const c=l+f>>>1;n(u[c],s)<0?l=c+1:f=c}while(l<f)}return l}function a(u,s,l=0,f=u.length){if(l<f){if(e(s,s)!==0)return f;do{const c=l+f>>>1;n(u[c],s)<=0?l=c+1:f=c}while(l<f)}return l}function o(u,s,l=0,f=u.length){const c=i(u,s,l,f-1);return c>l&&r(u[c-1],s)>-r(u[c],s)?c-1:c}return{left:i,center:o,right:a}}function aa(){return 0}function oa(t){return t===null?NaN:+t}const jn=zn(te).right;zn(oa).center;class qn extends Map{constructor(e,n=la){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(Wn(this,e))}has(e){return super.has(Wn(this,e))}set(e,n){return super.set(ua(this,e),n)}delete(e){return super.delete(sa(this,e))}}function Wn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ua({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function sa({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function la(t){return t!==null&&typeof t=="object"?t.valueOf():t}const ca=Math.sqrt(50),fa=Math.sqrt(10),ha=Math.sqrt(2);function ee(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=ca?10:a>=fa?5:a>=ha?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/o,u=Math.round(t*l),s=Math.round(e*l),u/l<t&&++u,s/l>e&&--s,l=-l):(l=Math.pow(10,i)*o,u=Math.round(t/l),s=Math.round(e/l),u*l<t&&++u,s*l>e&&--s),s<u&&.5<=n&&n<2?ee(t,e,n*2):[u,s,l]}function pa(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?ee(e,t,n):ee(t,e,n);if(!(a>=i))return[];const u=a-i+1,s=new Array(u);if(r)if(o<0)for(let l=0;l<u;++l)s[l]=(a-l)/-o;else for(let l=0;l<u;++l)s[l]=(a-l)*o;else if(o<0)for(let l=0;l<u;++l)s[l]=(i+l)/-o;else for(let l=0;l<u;++l)s[l]=(i+l)*o;return s}function Be(t,e,n){return e=+e,t=+t,n=+n,ee(t,e,n)[2]}function da(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Be(e,t,n):Be(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function ma(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}var ga={value:()=>{}};function Jn(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ne(n)}function ne(t){this._=t}function ya(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ne.prototype=Jn.prototype={constructor:ne,on:function(t,e){var n=this._,r=ya(t+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(t=r[a]).type)&&(i=va(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=r[a]).type)n[i]=Kn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=Kn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ne(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],r=0,i=a.length;r<i;++r)a[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};function va(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Kn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ga,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Ve="http://www.w3.org/1999/xhtml";const Zn={svg:"http://www.w3.org/2000/svg",xhtml:Ve,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function re(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Zn.hasOwnProperty(e)?{space:Zn[e],local:t}:t}function ba(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Ve&&e.documentElement.namespaceURI===Ve?e.createElement(t):e.createElementNS(n,t)}}function wa(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Qn(t){var e=re(t);return(e.local?wa:ba)(e)}function Da(){}function Ge(t){return t==null?Da:function(){return this.querySelector(t)}}function xa(t){typeof t!="function"&&(t=Ge(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=new Array(o),s,l,f=0;f<o;++f)(s=a[f])&&(l=t.call(s,s.__data__,f,a))&&("__data__"in s&&(l.__data__=s.__data__),u[f]=l);return new z(r,this._parents)}function _a(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function $a(){return[]}function tr(t){return t==null?$a:function(){return this.querySelectorAll(t)}}function Aa(t){return function(){return _a(t.apply(this,arguments))}}function Ta(t){typeof t=="function"?t=Aa(t):t=tr(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o=e[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&(r.push(t.call(s,s.__data__,l,o)),i.push(s));return new z(r,i)}function er(t){return function(){return this.matches(t)}}function nr(t){return function(e){return e.matches(t)}}var Sa=Array.prototype.find;function Ma(t){return function(){return Sa.call(this.children,t)}}function Ca(){return this.firstElementChild}function Fa(t){return this.select(t==null?Ca:Ma(typeof t=="function"?t:nr(t)))}var La=Array.prototype.filter;function Ea(){return Array.from(this.children)}function Oa(t){return function(){return La.call(this.children,t)}}function Pa(t){return this.selectAll(t==null?Ea:Oa(typeof t=="function"?t:nr(t)))}function Ra(t){typeof t!="function"&&(t=er(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new z(r,this._parents)}function rr(t){return new Array(t.length)}function Ia(){return new z(this._enter||this._groups.map(rr),this._parents)}function ie(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ie.prototype={constructor:ie,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ka(t){return function(){return t}}function Na(t,e,n,r,i,a){for(var o=0,u,s=e.length,l=a.length;o<l;++o)(u=e[o])?(u.__data__=a[o],r[o]=u):n[o]=new ie(t,a[o]);for(;o<s;++o)(u=e[o])&&(i[o]=u)}function Ba(t,e,n,r,i,a,o){var u,s,l=new Map,f=e.length,c=a.length,h=new Array(f),p;for(u=0;u<f;++u)(s=e[u])&&(h[u]=p=o.call(s,s.__data__,u,e)+"",l.has(p)?i[u]=s:l.set(p,s));for(u=0;u<c;++u)p=o.call(t,a[u],u,a)+"",(s=l.get(p))?(r[u]=s,s.__data__=a[u],l.delete(p)):n[u]=new ie(t,a[u]);for(u=0;u<f;++u)(s=e[u])&&l.get(h[u])===s&&(i[u]=s)}function Va(t){return t.__data__}function Ga(t,e){if(!arguments.length)return Array.from(this,Va);var n=e?Ba:Na,r=this._parents,i=this._groups;typeof t!="function"&&(t=ka(t));for(var a=i.length,o=new Array(a),u=new Array(a),s=new Array(a),l=0;l<a;++l){var f=r[l],c=i[l],h=c.length,p=Xa(t.call(f,f&&f.__data__,l,r)),d=p.length,m=u[l]=new Array(d),b=o[l]=new Array(d),_=s[l]=new Array(h);n(f,c,m,b,_,p,e);for(var T=0,$=0,E,A;T<d;++T)if(E=m[T]){for(T>=$&&($=T+1);!(A=b[$])&&++$<d;);E._next=A||null}}return o=new z(o,r),o._enter=u,o._exit=s,o}function Xa(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ya(){return new z(this._exit||this._groups.map(rr),this._parents)}function Ua(t,e,n){var r=this.enter(),i=this,a=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Ha(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),u=new Array(i),s=0;s<o;++s)for(var l=n[s],f=r[s],c=l.length,h=u[s]=new Array(c),p,d=0;d<c;++d)(p=l[d]||f[d])&&(h[d]=p);for(;s<i;++s)u[s]=n[s];return new z(u,this._parents)}function za(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ja(t){t||(t=qa);function e(c,h){return c&&h?t(c.__data__,h.__data__):!c-!h}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],u=o.length,s=i[a]=new Array(u),l,f=0;f<u;++f)(l=o[f])&&(s[f]=l);s.sort(e)}return new z(i,this._parents).order()}function qa(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Wa(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Ja(){return Array.from(this)}function Ka(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function Za(){let t=0;for(const e of this)++t;return t}function Qa(){return!this.node()}function to(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],a=0,o=i.length,u;a<o;++a)(u=i[a])&&t.call(u,u.__data__,a,i);return this}function eo(t){return function(){this.removeAttribute(t)}}function no(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ro(t,e){return function(){this.setAttribute(t,e)}}function io(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ao(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function oo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function uo(t,e){var n=re(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?no:eo:typeof e=="function"?n.local?oo:ao:n.local?io:ro)(n,e))}function ir(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function so(t){return function(){this.style.removeProperty(t)}}function lo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function co(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function fo(t,e,n){return arguments.length>1?this.each((e==null?so:typeof e=="function"?co:lo)(t,e,n??"")):At(this.node(),t)}function At(t,e){return t.style.getPropertyValue(e)||ir(t).getComputedStyle(t,null).getPropertyValue(e)}function ho(t){return function(){delete this[t]}}function po(t,e){return function(){this[t]=e}}function mo(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function go(t,e){return arguments.length>1?this.each((e==null?ho:typeof e=="function"?mo:po)(t,e)):this.node()[t]}function ar(t){return t.trim().split(/^|\s+/)}function Xe(t){return t.classList||new or(t)}function or(t){this._node=t,this._names=ar(t.getAttribute("class")||"")}or.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ur(t,e){for(var n=Xe(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function sr(t,e){for(var n=Xe(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function yo(t){return function(){ur(this,t)}}function vo(t){return function(){sr(this,t)}}function bo(t,e){return function(){(e.apply(this,arguments)?ur:sr)(this,t)}}function wo(t,e){var n=ar(t+"");if(arguments.length<2){for(var r=Xe(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?bo:e?yo:vo)(n,e))}function Do(){this.textContent=""}function xo(t){return function(){this.textContent=t}}function _o(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function $o(t){return arguments.length?this.each(t==null?Do:(typeof t=="function"?_o:xo)(t)):this.node().textContent}function Ao(){this.innerHTML=""}function To(t){return function(){this.innerHTML=t}}function So(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Mo(t){return arguments.length?this.each(t==null?Ao:(typeof t=="function"?So:To)(t)):this.node().innerHTML}function Co(){this.nextSibling&&this.parentNode.appendChild(this)}function Fo(){return this.each(Co)}function Lo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Eo(){return this.each(Lo)}function Oo(t){var e=typeof t=="function"?t:Qn(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Po(){return null}function Ro(t,e){var n=typeof t=="function"?t:Qn(t),r=e==null?Po:typeof e=="function"?e:Ge(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Io(){var t=this.parentNode;t&&t.removeChild(this)}function ko(){return this.each(Io)}function No(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Bo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vo(t){return this.select(t?Bo:No)}function Go(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xo(t){return function(e){t.call(this,e,this.__data__)}}function Yo(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Uo(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,a;n<i;++n)a=e[n],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++r]=a;++r?e.length=r:delete this.__on}}}function Ho(t,e,n){return function(){var r=this.__on,i,a=Xo(e);if(r){for(var o=0,u=r.length;o<u;++o)if((i=r[o]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=e;return}}this.addEventListener(t.type,a,n),i={type:t.type,name:t.name,value:e,listener:a,options:n},r?r.push(i):this.__on=[i]}}function zo(t,e,n){var r=Yo(t+""),i,a=r.length,o;if(arguments.length<2){var u=this.node().__on;if(u){for(var s=0,l=u.length,f;s<l;++s)for(i=0,f=u[s];i<a;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(u=e?Ho:Uo,i=0;i<a;++i)this.each(u(r[i],e,n));return this}function lr(t,e,n){var r=ir(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function jo(t,e){return function(){return lr(this,t,e)}}function qo(t,e){return function(){return lr(this,t,e.apply(this,arguments))}}function Wo(t,e){return this.each((typeof e=="function"?qo:jo)(t,e))}function*Jo(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var cr=[null];function z(t,e){this._groups=t,this._parents=e}function Vt(){return new z([[document.documentElement]],cr)}function Ko(){return this}z.prototype=Vt.prototype={constructor:z,select:xa,selectAll:Ta,selectChild:Fa,selectChildren:Pa,filter:Ra,data:Ga,enter:Ia,exit:Ya,join:Ua,merge:Ha,selection:Ko,order:za,sort:ja,call:Wa,nodes:Ja,node:Ka,size:Za,empty:Qa,each:to,attr:uo,style:fo,property:go,classed:wo,text:$o,html:Mo,raise:Fo,lower:Eo,append:Oo,insert:Ro,remove:ko,clone:Vo,datum:Go,on:zo,dispatch:Wo,[Symbol.iterator]:Jo};function ae(t){return typeof t=="string"?new z([[document.querySelector(t)]],[document.documentElement]):new z([[t]],cr)}function Ye(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function fr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Gt(){}var Xt=.7,oe=1/Xt,Tt="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Q="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zo=/^#([0-9a-f]{3,8})$/,Qo=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),tu=new RegExp(`^rgb\\(${Q},${Q},${Q}\\)$`),eu=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${Yt}\\)$`),nu=new RegExp(`^rgba\\(${Q},${Q},${Q},${Yt}\\)$`),ru=new RegExp(`^hsl\\(${Yt},${Q},${Q}\\)$`),iu=new RegExp(`^hsla\\(${Yt},${Q},${Q},${Yt}\\)$`),hr={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};Ye(Gt,mt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:pr,formatHex:pr,formatHex8:au,formatHsl:ou,formatRgb:dr,toString:dr});function pr(){return this.rgb().formatHex()}function au(){return this.rgb().formatHex8()}function ou(){return br(this).formatHsl()}function dr(){return this.rgb().formatRgb()}function mt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Zo.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?mr(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ue(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ue(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Qo.exec(t))?new H(e[1],e[2],e[3],1):(e=tu.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eu.exec(t))?ue(e[1],e[2],e[3],e[4]):(e=nu.exec(t))?ue(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ru.exec(t))?vr(e[1],e[2]/100,e[3]/100,1):(e=iu.exec(t))?vr(e[1],e[2]/100,e[3]/100,e[4]):hr.hasOwnProperty(t)?mr(hr[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function mr(t){return new H(t>>16&255,t>>8&255,t&255,1)}function ue(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function uu(t){return t instanceof Gt||(t=mt(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function Ue(t,e,n,r){return arguments.length===1?uu(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}Ye(H,Ue,fr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(gt(this.r),gt(this.g),gt(this.b),se(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:gr,formatHex:gr,formatHex8:su,formatRgb:yr,toString:yr}));function gr(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function su(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function yr(){const t=se(this.opacity);return`${t===1?"rgb(":"rgba("}${gt(this.r)}, ${gt(this.g)}, ${gt(this.b)}${t===1?")":`, ${t})`}`}function se(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function gt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yt(t){return t=gt(t),(t<16?"0":"")+t.toString(16)}function vr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new W(t,e,n,r)}function br(t){if(t instanceof W)return new W(t.h,t.s,t.l,t.opacity);if(t instanceof Gt||(t=mt(t)),!t)return new W;if(t instanceof W)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,u=a-i,s=(a+i)/2;return u?(e===a?o=(n-r)/u+(n<r)*6:n===a?o=(r-e)/u+2:o=(e-n)/u+4,u/=s<.5?a+i:2-a-i,o*=60):u=s>0&&s<1?0:o,new W(o,u,s,t.opacity)}function lu(t,e,n,r){return arguments.length===1?br(t):new W(t,e,n,r??1)}function W(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ye(W,lu,fr(Gt,{brighter(t){return t=t==null?oe:Math.pow(oe,t),new W(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Xt:Math.pow(Xt,t),new W(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new H(He(t>=240?t-240:t+120,i,r),He(t,i,r),He(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new W(wr(this.h),le(this.s),le(this.l),se(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=se(this.opacity);return`${t===1?"hsl(":"hsla("}${wr(this.h)}, ${le(this.s)*100}%, ${le(this.l)*100}%${t===1?")":`, ${t})`}`}}));function wr(t){return t=(t||0)%360,t<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function He(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ze=t=>()=>t;function cu(t,e){return function(n){return t+n*e}}function fu(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function hu(t){return(t=+t)==1?Dr:function(e,n){return n-e?fu(e,n,t):ze(isNaN(e)?n:e)}}function Dr(t,e){var n=e-t;return n?cu(t,n):ze(isNaN(t)?e:t)}const ce=function t(e){var n=hu(e);function r(i,a){var o=n((i=Ue(i)).r,(a=Ue(a)).r),u=n(i.g,a.g),s=n(i.b,a.b),l=Dr(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=u(f),i.b=s(f),i.opacity=l(f),i+""}}return r.gamma=t,r}(1);function pu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=t[i]*(1-a)+e[i]*a;return r}}function du(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function mu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=We(t[o],e[o]);for(;o<n;++o)a[o]=e[o];return function(u){for(o=0;o<r;++o)a[o]=i[o](u);return a}}function gu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function J(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yu(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=We(t[i],e[i]):r[i]=e[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var je=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qe=new RegExp(je.source,"g");function vu(t){return function(){return t}}function bu(t){return function(e){return t(e)+""}}function xr(t,e){var n=je.lastIndex=qe.lastIndex=0,r,i,a,o=-1,u=[],s=[];for(t=t+"",e=e+"";(r=je.exec(t))&&(i=qe.exec(e));)(a=i.index)>n&&(a=e.slice(n,a),u[o]?u[o]+=a:u[++o]=a),(r=r[0])===(i=i[0])?u[o]?u[o]+=i:u[++o]=i:(u[++o]=null,s.push({i:o,x:J(r,i)})),n=qe.lastIndex;return n<e.length&&(a=e.slice(n),u[o]?u[o]+=a:u[++o]=a),u.length<2?s[0]?bu(s[0].x):vu(e):(e=s.length,function(l){for(var f=0,c;f<e;++f)u[(c=s[f]).i]=c.x(l);return u.join("")})}function We(t,e){var n=typeof e,r;return e==null||n==="boolean"?ze(e):(n==="number"?J:n==="string"?(r=mt(e))?(e=r,ce):xr:e instanceof mt?ce:e instanceof Date?gu:du(e)?pu:Array.isArray(e)?mu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?yu:J)(t,e)}function wu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var _r=180/Math.PI,Je={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $r(t,e,n,r,i,a){var o,u,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*_r,skewX:Math.atan(s)*_r,scaleX:o,scaleY:u}}var fe;function Du(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Je:$r(e.a,e.b,e.c,e.d,e.e,e.f)}function xu(t){return t==null||(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),!(t=fe.transform.baseVal.consolidate()))?Je:(t=t.matrix,$r(t.a,t.b,t.c,t.d,t.e,t.f))}function Ar(t,e,n,r){function i(l){return l.length?l.pop()+" ":""}function a(l,f,c,h,p,d){if(l!==c||f!==h){var m=p.push("translate(",null,e,null,n);d.push({i:m-4,x:J(l,c)},{i:m-2,x:J(f,h)})}else(c||h)&&p.push("translate("+c+e+h+n)}function o(l,f,c,h){l!==f?(l-f>180?f+=360:f-l>180&&(l+=360),h.push({i:c.push(i(c)+"rotate(",null,r)-2,x:J(l,f)})):f&&c.push(i(c)+"rotate("+f+r)}function u(l,f,c,h){l!==f?h.push({i:c.push(i(c)+"skewX(",null,r)-2,x:J(l,f)}):f&&c.push(i(c)+"skewX("+f+r)}function s(l,f,c,h,p,d){if(l!==c||f!==h){var m=p.push(i(p)+"scale(",null,",",null,")");d.push({i:m-4,x:J(l,c)},{i:m-2,x:J(f,h)})}else(c!==1||h!==1)&&p.push(i(p)+"scale("+c+","+h+")")}return function(l,f){var c=[],h=[];return l=t(l),f=t(f),a(l.translateX,l.translateY,f.translateX,f.translateY,c,h),o(l.rotate,f.rotate,c,h),u(l.skewX,f.skewX,c,h),s(l.scaleX,l.scaleY,f.scaleX,f.scaleY,c,h),l=f=null,function(p){for(var d=-1,m=h.length,b;++d<m;)c[(b=h[d]).i]=b.x(p);return c.join("")}}}var _u=Ar(Du,"px, ","px)","deg)"),$u=Ar(xu,", ",")",")"),St=0,Ut=0,Ht=0,Tr=1e3,he,zt,pe=0,vt=0,de=0,jt=typeof performance=="object"&&performance.now?performance:Date,Sr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ke(){return vt||(Sr(Au),vt=jt.now()+de)}function Au(){vt=0}function me(){this._call=this._time=this._next=null}me.prototype=Mr.prototype={constructor:me,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Ke():+n)+(e==null?0:+e),!this._next&&zt!==this&&(zt?zt._next=this:he=this,zt=this),this._call=t,this._time=n,Ze()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ze())}};function Mr(t,e,n){var r=new me;return r.restart(t,e,n),r}function Tu(){Ke(),++St;for(var t=he,e;t;)(e=vt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function Cr(){vt=(pe=jt.now())+de,St=Ut=0;try{Tu()}finally{St=0,Mu(),vt=0}}function Su(){var t=jt.now(),e=t-pe;e>Tr&&(de-=e,pe=t)}function Mu(){for(var t,e=he,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:he=n);zt=t,Ze(r)}function Ze(t){if(!St){Ut&&(Ut=clearTimeout(Ut));var e=t-vt;e>24?(t<1/0&&(Ut=setTimeout(Cr,t-jt.now()-de)),Ht&&(Ht=clearInterval(Ht))):(Ht||(pe=jt.now(),Ht=setInterval(Su,Tr)),St=1,Sr(Cr))}}function Fr(t,e,n){var r=new me;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Cu=Jn("start","end","cancel","interrupt"),Fu=[],Lr=0,Er=1,Qe=2,ge=3,Or=4,tn=5,ye=6;function ve(t,e,n,r,i,a){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;Lu(t,n,{name:e,index:r,group:i,on:Cu,tween:Fu,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Lr})}function en(t,e){var n=K(t,e);if(n.state>Lr)throw new Error("too late; already scheduled");return n}function tt(t,e){var n=K(t,e);if(n.state>ge)throw new Error("too late; already running");return n}function K(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Lu(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Mr(a,0,n.time);function a(l){n.state=Er,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var f,c,h,p;if(n.state!==Er)return s();for(f in r)if(p=r[f],p.name===n.name){if(p.state===ge)return Fr(o);p.state===Or?(p.state=ye,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=ye,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Fr(function(){n.state===ge&&(n.state=Or,n.timer.restart(u,n.delay,n.time),u(l))}),n.state=Qe,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Qe){for(n.state=ge,i=new Array(h=n.tween.length),f=0,c=-1;f<h;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++c]=p);i.length=c+1}}function u(l){for(var f=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(s),n.state=tn,1),c=-1,h=i.length;++c<h;)i[c].call(t,f);n.state===tn&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){n.state=ye,n.timer.stop(),delete r[e];for(var l in r)return;delete t.__transition}}function Eu(t,e){var n=t.__transition,r,i,a=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((r=n[o]).name!==e){a=!1;continue}i=r.state>Qe&&r.state<tn,r.state=ye,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[o]}a&&delete t.__transition}}function Ou(t){return this.each(function(){Eu(this,t)})}function Pu(t,e){var n,r;return function(){var i=tt(this,t),a=i.tween;if(a!==n){r=n=a;for(var o=0,u=r.length;o<u;++o)if(r[o].name===e){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Ru(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=tt(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}a.tween=i}}function Iu(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=K(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===t)return o.value;return null}return this.each((e==null?Pu:Ru)(n,t,e))}function nn(t,e,n){var r=t._id;return t.each(function(){var i=tt(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return K(i,r).value[e]}}function Pr(t,e){var n;return(typeof e=="number"?J:e instanceof mt?ce:(n=mt(e))?(e=n,ce):xr)(t,e)}function ku(t){return function(){this.removeAttribute(t)}}function Nu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttribute(t);return o===i?null:o===r?a:a=e(r=o,n)}}function Vu(t,e,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(t.space,t.local);return o===i?null:o===r?a:a=e(r=o,n)}}function Gu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttribute(t):(o=this.getAttribute(t),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Xu(t,e,n){var r,i,a;return function(){var o,u=n(this),s;return u==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),s=u+"",o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u)))}}function Yu(t,e){var n=re(t),r=n==="transform"?$u:Pr;return this.attrTween(t,typeof e=="function"?(n.local?Xu:Gu)(n,r,nn(this,"attr."+t,e)):e==null?(n.local?Nu:ku)(n):(n.local?Vu:Bu)(n,r,e))}function Uu(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hu(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function zu(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Hu(t,a)),n}return i._value=e,i}function ju(t,e){var n,r;function i(){var a=e.apply(this,arguments);return a!==r&&(n=(r=a)&&Uu(t,a)),n}return i._value=e,i}function qu(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=re(t);return this.tween(n,(r.local?zu:ju)(r,e))}function Wu(t,e){return function(){en(this,t).delay=+e.apply(this,arguments)}}function Ju(t,e){return e=+e,function(){en(this,t).delay=e}}function Ku(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Wu:Ju)(e,t)):K(this.node(),e).delay}function Zu(t,e){return function(){tt(this,t).duration=+e.apply(this,arguments)}}function Qu(t,e){return e=+e,function(){tt(this,t).duration=e}}function ts(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Zu:Qu)(e,t)):K(this.node(),e).duration}function es(t,e){if(typeof e!="function")throw new Error;return function(){tt(this,t).ease=e}}function ns(t){var e=this._id;return arguments.length?this.each(es(e,t)):K(this.node(),e).ease}function rs(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;tt(this,t).ease=n}}function is(t){if(typeof t!="function")throw new Error;return this.each(rs(this._id,t))}function as(t){typeof t!="function"&&(t=er(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a=e[i],o=a.length,u=r[i]=[],s,l=0;l<o;++l)(s=a[l])&&t.call(s,s.__data__,l,a)&&u.push(s);return new nt(r,this._parents,this._name,this._id)}function os(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),u=0;u<a;++u)for(var s=e[u],l=n[u],f=s.length,c=o[u]=new Array(f),h,p=0;p<f;++p)(h=s[p]||l[p])&&(c[p]=h);for(;u<r;++u)o[u]=e[u];return new nt(o,this._parents,this._name,this._id)}function us(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ss(t,e,n){var r,i,a=us(e)?en:tt;return function(){var o=a(this,t),u=o.on;u!==r&&(i=(r=u).copy()).on(e,n),o.on=i}}function ls(t,e){var n=this._id;return arguments.length<2?K(this.node(),n).on.on(t):this.each(ss(n,t,e))}function cs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function fs(){return this.on("end.remove",cs(this._id))}function hs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ge(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var u=r[o],s=u.length,l=a[o]=new Array(s),f,c,h=0;h<s;++h)(f=u[h])&&(c=t.call(f,f.__data__,h,u))&&("__data__"in f&&(c.__data__=f.__data__),l[h]=c,ve(l[h],e,n,h,l,K(f,n)));return new nt(a,this._parents,e,n)}function ps(t){var e=this._name,n=this._id;typeof t!="function"&&(t=tr(t));for(var r=this._groups,i=r.length,a=[],o=[],u=0;u<i;++u)for(var s=r[u],l=s.length,f,c=0;c<l;++c)if(f=s[c]){for(var h=t.call(f,f.__data__,c,s),p,d=K(f,n),m=0,b=h.length;m<b;++m)(p=h[m])&&ve(p,e,n,m,h,d);a.push(h),o.push(f)}return new nt(a,o,e,n)}var ds=Vt.prototype.constructor;function ms(){return new ds(this._groups,this._parents)}function gs(t,e){var n,r,i;return function(){var a=At(this,t),o=(this.style.removeProperty(t),At(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}function Rr(t){return function(){this.style.removeProperty(t)}}function ys(t,e,n){var r,i=n+"",a;return function(){var o=At(this,t);return o===i?null:o===r?a:a=e(r=o,n)}}function vs(t,e,n){var r,i,a;return function(){var o=At(this,t),u=n(this),s=u+"";return u==null&&(s=u=(this.style.removeProperty(t),At(this,t))),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,u))}}function bs(t,e){var n,r,i,a="style."+e,o="end."+a,u;return function(){var s=tt(this,t),l=s.on,f=s.value[a]==null?u||(u=Rr(e)):void 0;(l!==n||i!==f)&&(r=(n=l).copy()).on(o,i=f),s.on=r}}function ws(t,e,n){var r=(t+="")=="transform"?_u:Pr;return e==null?this.styleTween(t,gs(t,r)).on("end.style."+t,Rr(t)):typeof e=="function"?this.styleTween(t,vs(t,r,nn(this,"style."+t,e))).each(bs(this._id,t)):this.styleTween(t,ys(t,r,e),n).on("end.style."+t,null)}function Ds(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function xs(t,e,n){var r,i;function a(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Ds(t,o,n)),r}return a._value=e,a}function _s(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,xs(t,e,n??""))}function $s(t){return function(){this.textContent=t}}function As(t){return function(){var e=t(this);this.textContent=e??""}}function Ts(t){return this.tween("text",typeof t=="function"?As(nn(this,"text",t)):$s(t==null?"":t+""))}function Ss(t){return function(e){this.textContent=t.call(this,e)}}function Ms(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&Ss(i)),e}return r._value=t,r}function Cs(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Ms(t))}function Fs(){for(var t=this._name,e=this._id,n=Ir(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)if(s=o[l]){var f=K(s,e);ve(s,t,n,l,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new nt(r,this._parents,t,n)}function Ls(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var u={value:o},s={value:function(){--i===0&&a()}};n.each(function(){var l=tt(this,r),f=l.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),l.on=e}),i===0&&a()})}var Es=0;function nt(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ir(){return++Es}var rt=Vt.prototype;nt.prototype={constructor:nt,select:hs,selectAll:ps,selectChild:rt.selectChild,selectChildren:rt.selectChildren,filter:as,merge:os,selection:ms,transition:Fs,call:rt.call,nodes:rt.nodes,node:rt.node,size:rt.size,empty:rt.empty,each:rt.each,on:ls,attr:Yu,attrTween:qu,style:ws,styleTween:_s,text:Ts,textTween:Cs,remove:fs,tween:Iu,delay:Ku,duration:ts,ease:ns,easeVarying:is,end:Ls,[Symbol.iterator]:rt[Symbol.iterator]};function Os(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ps={time:null,delay:0,duration:250,ease:Os};function Rs(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Is(t){var e,n;t instanceof nt?(e=t._id,t=t._name):(e=Ir(),(n=Ps).time=Ke(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],u=o.length,s,l=0;l<u;++l)(s=o[l])&&ve(s,t,e,l,o,n||Rs(s,e));return new nt(r,this._parents,t,e)}Vt.prototype.interrupt=Ou,Vt.prototype.transition=Is;function ks(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function be(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Mt(t){return t=be(Math.abs(t)),t?t[1]:NaN}function Ns(t,e){return function(n,r){for(var i=n.length,a=[],o=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),a.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[o=(o+1)%t.length];return a.reverse().join(e)}}function Bs(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Vs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function we(t){if(!(e=Vs.exec(t)))throw new Error("invalid format: "+t);var e;return new rn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}we.prototype=rn.prototype;function rn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}rn.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 Gs(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var kr;function Xs(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(kr=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+be(t,Math.max(0,e+a-1))[0]}function Nr(t,e){var n=be(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Br={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:ks,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nr(t*100,e),r:Nr,s:Xs,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vr(t){return t}var Gr=Array.prototype.map,Xr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ys(t){var e=t.grouping===void 0||t.thousands===void 0?Vr:Ns(Gr.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Vr:Bs(Gr.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",u=t.minus===void 0?"−":t.minus+"",s=t.nan===void 0?"NaN":t.nan+"";function l(c){c=we(c);var h=c.fill,p=c.align,d=c.sign,m=c.symbol,b=c.zero,_=c.width,T=c.comma,$=c.precision,E=c.trim,A=c.type;A==="n"?(T=!0,A="g"):Br[A]||($===void 0&&($=12),E=!0,A="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var N=m==="$"?n:m==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",Y=m==="$"?r:/[%p]/.test(A)?o:"",k=Br[A],w=/[defgprs%]/.test(A);$=$===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function x(y){var S=N,C=Y,B,dt,$t;if(A==="c")C=k(y)+C,y="";else{y=+y;var Z=y<0||1/y<0;if(y=isNaN(y)?s:k(Math.abs(y),$),E&&(y=Gs(y)),Z&&+y==0&&d!=="+"&&(Z=!1),S=(Z?d==="("?d:u:d==="-"||d==="("?"":d)+S,C=(A==="s"?Xr[8+kr/3]:"")+C+(Z&&d==="("?")":""),w){for(B=-1,dt=y.length;++B<dt;)if($t=y.charCodeAt(B),48>$t||$t>57){C=($t===46?i+y.slice(B+1):y.slice(B))+C,y=y.slice(0,B);break}}}T&&!b&&(y=e(y,1/0));var Ce=S.length+y.length+C.length,at=Ce<_?new Array(_-Ce+1).join(h):"";switch(T&&b&&(y=e(at+y,at.length?_-C.length:1/0),at=""),p){case"<":y=S+y+C+at;break;case"=":y=S+at+y+C;break;case"^":y=at.slice(0,Ce=at.length>>1)+S+y+C+at.slice(Ce);break;default:y=at+S+y+C;break}return a(y)}return x.toString=function(){return c+""},x}function f(c,h){var p=l((c=we(c),c.type="f",c)),d=Math.max(-8,Math.min(8,Math.floor(Mt(h)/3)))*3,m=Math.pow(10,-d),b=Xr[8+d/3];return function(_){return p(m*_)+b}}return{format:l,formatPrefix:f}}var De,an,Yr;Us({thousands:",",grouping:[3],currency:["$",""]});function Us(t){return De=Ys(t),an=De.format,Yr=De.formatPrefix,De}function Hs(t){return Math.max(0,-Mt(Math.abs(t)))}function zs(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Mt(e)/3)))*3-Mt(Math.abs(t)))}function js(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Mt(e)-Mt(t))+1}function xe(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const Ur=Symbol("implicit");function Hr(){var t=new qn,e=[],n=[],r=Ur;function i(a){let o=t.get(a);if(o===void 0){if(r!==Ur)return r;t.set(a,o=e.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new qn;for(const o of a)t.has(o)||t.set(o,e.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Hr(e,n).unknown(r)},xe.apply(i,arguments),i}function zr(){var t=Hr().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,a,o,u=!1,s=0,l=0,f=.5;delete t.unknown;function c(){var h=e().length,p=i<r,d=p?i:r,m=p?r:i;a=(m-d)/Math.max(1,h-s+l*2),u&&(a=Math.floor(a)),d+=(m-d-a*(h-s))*f,o=a*(1-s),u&&(d=Math.round(d),o=Math.round(o));var b=ma(h).map(function(_){return d+a*_});return n(p?b.reverse():b)}return t.domain=function(h){return arguments.length?(e(h),c()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,c()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,u=!0,c()},t.bandwidth=function(){return o},t.step=function(){return a},t.round=function(h){return arguments.length?(u=!!h,c()):u},t.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),c()):s},t.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),c()):s},t.paddingOuter=function(h){return arguments.length?(l=+h,c()):l},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),c()):f},t.copy=function(){return zr(e(),[r,i]).round(u).paddingInner(s).paddingOuter(l).align(f)},xe.apply(c(),arguments)}function jr(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return jr(e())},t}function qs(){return jr(zr.apply(null,arguments).paddingInner(1))}function Ws(t){return function(){return t}}function Js(t){return+t}var qr=[0,1];function Ct(t){return t}function on(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Ws(isNaN(e)?NaN:.5)}function Ks(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Zs(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=on(i,r),a=n(o,a)):(r=on(r,i),a=n(a,o)),function(u){return a(r(u))}}function Qs(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=on(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(u){var s=jn(t,u,1,r)-1;return a[s](i[s](u))}}function tl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function el(){var t=qr,e=qr,n=We,r,i,a,o=Ct,u,s,l;function f(){var h=Math.min(t.length,e.length);return o!==Ct&&(o=Ks(t[0],t[h-1])),u=h>2?Qs:Zs,s=l=null,c}function c(h){return h==null||isNaN(h=+h)?a:(s||(s=u(t.map(r),e,n)))(r(o(h)))}return c.invert=function(h){return o(i((l||(l=u(e,t.map(r),J)))(h)))},c.domain=function(h){return arguments.length?(t=Array.from(h,Js),f()):t.slice()},c.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},c.rangeRound=function(h){return e=Array.from(h),n=wu,f()},c.clamp=function(h){return arguments.length?(o=h?!0:Ct,f()):o!==Ct},c.interpolate=function(h){return arguments.length?(n=h,f()):n},c.unknown=function(h){return arguments.length?(a=h,c):a},function(h,p){return r=h,i=p,f()}}function nl(){return el()(Ct,Ct)}function rl(t,e,n,r){var i=da(t,e,n),a;switch(r=we(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(a=zs(i,o))&&(r.precision=a),Yr(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=js(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Hs(i))&&(r.precision=a-(r.type==="%")*2);break}}return an(r)}function Wr(t){var e=t.domain;return t.ticks=function(n){var r=e();return pa(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return rl(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,a=r.length-1,o=r[i],u=r[a],s,l,f=10;for(u<o&&(l=o,o=u,u=l,l=i,i=a,a=l);f-- >0;){if(l=Be(o,u,n),l===s)return r[i]=o,r[a]=u,e(r);if(l>0)o=Math.floor(o/l)*l,u=Math.ceil(u/l)*l;else if(l<0)o=Math.ceil(o*l)/l,u=Math.floor(u*l)/l;else break;s=l}return t},t}function qt(){var t=nl();return t.copy=function(){return tl(t,qt())},xe.apply(t,arguments),Wr(t)}function Jr(){var t=0,e=1,n=1,r=[.5],i=[0,1],a;function o(s){return s!=null&&s<=s?i[jn(r,s,0,n)]:a}function u(){var s=-1;for(r=new Array(n);++s<n;)r[s]=((s+1)*e-(s-n)*t)/(n+1);return o}return o.domain=function(s){return arguments.length?([t,e]=s,t=+t,e=+e,u()):[t,e]},o.range=function(s){return arguments.length?(n=(i=Array.from(s)).length-1,u()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[t,r[0]]:l>=n?[r[n-1],e]:[r[l-1],r[l]]},o.unknown=function(s){return arguments.length&&(a=s),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Jr().domain([t,e]).range(i).unknown(a)},xe.apply(Wr(o),arguments)}function Wt(t,e,n){this.k=t,this.x=e,this.y=n}Wt.prototype={constructor:Wt,scale:function(t){return t===1?this:new Wt(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Wt(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Wt.prototype;function il(t,e){return e instanceof Function?e(t):an(e)(t)}function Jt(t,e,n,r){let i=`${t}_${e}`;return n!=null&&(i+=`_${n}`),r!=null&&(i+=`_${r}`),i}function _e(t,e){return`${t}_series${e}`}function un(t,e){return`${t}_group${e}`}function $e(){return""}function sn({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){const r=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((i,a)=>r[a]!=null?r[a]:_e(n,a))}function Kr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){const i=e.seriesDirection==="row"?e.rowLabels:e.columnLabels;return t.map((a,o)=>i[o]!=null?i[o]:_e(`${n}_grid${r}`,o))}function Zr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="grid"}){if(t[0]==null)return[];const r=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((i,a)=>r[a]!=null?r[a]:un(n,a))}function Qr({transposedDataGrid:t,dataFormatterGrid:e,chartType:n="multiGrid",gridIndex:r=0}){if(t[0]==null)return[];const i=e.seriesDirection==="row"?e.columnLabels:e.rowLabels;return t[0].map((a,o)=>i[o]!=null?i[o]:un(`${n}_grid${r}`,o))}function st(t){const e=[0,0];return t.length?t.reduce((r,i)=>[i<r[0]?i:r[0],i>r[1]?i:r[1]],[t[0],t[0]]):e}function ti(t){const e=t.filter(n=>n!=null&&n.value!=null).map(n=>n.value);return st(e)}function al(t){const n=(t[0]&&Array.isArray(t[0])?t.flat():t).filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ln(t){const n=t.flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ol(t){const n=t.flat().flat().filter(r=>(r==null||U(r)&&r.value==null)===!1).map(r=>typeof r=="number"?r:r.value);return st(n)}function ul(t,e){const n=t.map(r=>Array.isArray(r)?r[e]??null:U(r)?r.value[e]??null:null).filter(r=>r!=null);return st(n)}function sl({data:t,minX:e,maxX:n,minY:r,maxY:i}){let a=[],o=null,u=null,s=null,l=null;for(let f of t)for(let c of f)c.axisX>=e&&c.axisX<=n&&c.axisY>=r&&c.axisY<=i&&(a.push(f),(o==null||c.axisX<o.axisX)&&(o=c),(u==null||c.axisX>u.axisX)&&(u=c),(s==null||c.axisY<s.axisY)&&(s=c),(l==null||c.axisY>l.axisY)&&(l=c));return{minXDatum:o,maxXDatum:u,minYDatum:s,maxYDatum:l,filteredData:a}}function ei(t,e){if(t==="row")return Object.assign([],e);const n=e.length,r=e.reduce((a,o)=>Math.max(a,o.length),0),i=new Array(r).fill(null).map(()=>new Array(n).fill(null));for(let a=0;a<n;a++)for(let o=0;o<r;o++)i[o][a]=e[a][o];return i}function lt(t,e){return t<e.colors[e.colorScheme].label.length?e.colors[e.colorScheme].label[t]:e.colors[e.colorScheme].label[t%e.colors[e.colorScheme].label.length]}function ni(t){let e=Math.floor(Math.sqrt(t)),n=Math.ceil(t/e);for(;e*n<t;)n++;return{rowAmount:e,columnAmount:n}}function cn(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ni(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),f=(t.width-r*(a-1))/a,c=(t.height-r*(i-1))/i,h=s*f+s*r,p=l*c+l*r;return{slotIndex:u,rowIndex:l,columnIndex:s,startX:h,startY:p,centerX:h+f/2,centerY:p+c/2,width:f,height:c}})}function Ft(t,e,n){const{gap:r}=e,{rowAmount:i,columnAmount:a}=e.rowAmount*e.columnAmount>=n?e:ni(n);return new Array(n).fill(null).map((o,u)=>{const s=u%a,l=Math.floor(u/a),f=(t.width-r*(a-1))/a,c=(t.height-r*(i-1))/i,h=s*f+s*r,p=l*c+l*r,d=[h,p],m=[f/t.width,c/t.height];return{slotIndex:u,rowIndex:l,columnIndex:s,translate:d,scale:m}})}const ll=t=>{const{data:e=[],dataFormatter:n,chartParams:r}=t;if(!e.length)return[];let i=[];try{const a=(o,u,s,l)=>{const f=Jt(n.type,u,s),c=n.seriesLabels[u]||_e("series",u),h=lt(u,r);return typeof o=="number"?{id:f,index:l,seq:0,label:f,description:"",data:{},value:o,seriesIndex:u,seriesLabel:c,color:h,visible:!0}:{id:o.id?o.id:f,index:l,seq:0,label:o.label?o.label:f,description:o.description,data:o.data??{},value:o.value,seriesIndex:u,seriesLabel:c,color:h,visible:!0}};i=e.map((o,u)=>Array.isArray(o)?o.map((s,l)=>a(s,u,l,i.length+l)):a(o,u,0,i.length)).flat().sort(n.sort??void 0).map((o,u)=>(o.seq=u,o)).map(o=>(o.visible=n.visibleFilter(o,t),o)).sort((o,u)=>o.index-u.index).reduce((o,u)=>(o[u.seriesIndex]||(o[u.seriesIndex]=[]),o[u.seriesIndex].push(u),o),[])}catch(a){throw Error(a)}return i},cl=t=>F({data:t},{data:{toBe:"(DataSeriesDatum | DataSeriesValue)[][] | (DataSeriesDatum | DataSeriesValue)[]",test:n=>Array.isArray(n)}});var fn=function(t,e){return fn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},fn(t,e)};function et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");fn(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}function fl(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(f){try{l(r.next(f))}catch(c){o(c)}}function s(f){try{l(r.throw(f))}catch(c){o(c)}}function l(f){f.done?a(f.value):i(f.value).then(u,s)}l((r=r.apply(t,e||[])).next())})}function ri(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(f){return s([l,f])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(f){l=[6,f],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Lt(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ct(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(u){o={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function ft(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}function Et(t){return this instanceof Et?(this.v=t,this):new Et(t)}function hl(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(p){return function(d){return Promise.resolve(d).then(p,c)}}function u(p,d){r[p]&&(i[p]=function(m){return new Promise(function(b,_){a.push([p,m,b,_])>1||s(p,m)})},d&&(i[p]=d(i[p])))}function s(p,d){try{l(r[p](d))}catch(m){h(a[0][3],m)}}function l(p){p.value instanceof Et?Promise.resolve(p.value.v).then(f,c):h(a[0][2],p)}function f(p){s("next",p)}function c(p){s("throw",p)}function h(p,d){p(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function pl(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Lt=="function"?Lt(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(u,s){o=t[a](o),i(u,s,o.done,o.value)})}}function i(a,o,u,s){Promise.resolve(s).then(function(l){a({value:l,done:u})},o)}}typeof SuppressedError=="function"&&SuppressedError;function I(t){return typeof t=="function"}function hn(t){var e=function(r){Error.call(r),r.stack=new Error().stack},n=t(e);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var pn=hn(function(t){return function(n){t(this),this.message=n?n.length+` errors occurred during unsubscription:
|
2
2
|
`+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
|
3
3
|
`):"",this.name="UnsubscriptionError",this.errors=n}});function Ae(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Kt=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,n,r,i,a;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=Lt(o),s=u.next();!s.done;s=u.next()){var l=s.value;l.remove(this)}}catch(m){e={error:m}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}else o.remove(this);var f=this.initialTeardown;if(I(f))try{f()}catch(m){a=m instanceof pn?m.errors:[m]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var h=Lt(c),p=h.next();!p.done;p=h.next()){var d=p.value;try{oi(d)}catch(m){a=a??[],m instanceof pn?a=ft(ft([],ct(a)),ct(m.errors)):a.push(m)}}}catch(m){r={error:m}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(a)throw new pn(a)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)oi(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(e)}},t.prototype._hasParent=function(e){var n=this._parentage;return n===e||Array.isArray(n)&&n.includes(e)},t.prototype._addParent=function(e){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(e),n):n?[n,e]:e},t.prototype._removeParent=function(e){var n=this._parentage;n===e?this._parentage=null:Array.isArray(n)&&Ae(n,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&Ae(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),ii=Kt.EMPTY;function ai(t){return t instanceof Kt||t&&"closed"in t&&I(t.remove)&&I(t.add)&&I(t.unsubscribe)}function oi(t){I(t)?t():t.unsubscribe()}var ui={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},si={setTimeout:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,ft([t,e],ct(n)))},clearTimeout:function(t){var e=si.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function li(t){si.setTimeout(function(){throw t})}function dn(){}function Te(t){t()}var mn=function(t){et(e,t);function e(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ai(n)&&n.add(r)):r.destination=yl,r}return e.create=function(n,r,i){return new Zt(n,r,i)},e.prototype.next=function(n){this.isStopped||this._next(n)},e.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(n){this.destination.next(n)},e.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Kt),dl=Function.prototype.bind;function gn(t,e){return dl.call(t,e)}var ml=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var n=this.partialObserver;if(n.next)try{n.next(e)}catch(r){Se(r)}},t.prototype.error=function(e){var n=this.partialObserver;if(n.error)try{n.error(e)}catch(r){Se(r)}else Se(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(n){Se(n)}},t}(),Zt=function(t){et(e,t);function e(n,r,i){var a=t.call(this)||this,o;if(I(n)||!n)o={next:n??void 0,error:r??void 0,complete:i??void 0};else{var u;a&&ui.useDeprecatedNextContext?(u=Object.create(n),u.unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&gn(n.next,u),error:n.error&&gn(n.error,u),complete:n.complete&&gn(n.complete,u)}):o=n}return a.destination=new ml(o),a}return e}(mn);function Se(t){li(t)}function gl(t){throw t}var yl={closed:!0,next:dn,error:gl,complete:dn},yn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Ot(t){return t}function vl(t){return t.length===0?Ot:t.length===1?t[0]:function(n){return t.reduce(function(r,i){return i(r)},n)}}var P=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(e,n,r){var i=this,a=wl(e)?e:new Zt(e,n,r);return Te(function(){var o=i,u=o.operator,s=o.source;a.add(u?u.call(a,s):s?i._subscribe(a):i._trySubscribe(a))}),a},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(n){e.error(n)}},t.prototype.forEach=function(e,n){var r=this;return n=ci(n),new n(function(i,a){var o=new Zt({next:function(u){try{e(u)}catch(s){a(s),o.unsubscribe()}},error:a,complete:i});r.subscribe(o)})},t.prototype._subscribe=function(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)},t.prototype[yn]=function(){return this},t.prototype.pipe=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return vl(e)(this)},t.prototype.toPromise=function(e){var n=this;return e=ci(e),new e(function(r,i){var a;n.subscribe(function(o){return a=o},function(o){return i(o)},function(){return r(a)})})},t.create=function(e){return new t(e)},t}();function ci(t){var e;return(e=t??ui.Promise)!==null&&e!==void 0?e:Promise}function bl(t){return t&&I(t.next)&&I(t.error)&&I(t.complete)}function wl(t){return t&&t instanceof mn||bl(t)&&ai(t)}function Dl(t){return I(t==null?void 0:t.lift)}function G(t){return function(e){if(Dl(e))return e.lift(function(n){try{return t(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function X(t,e,n,r,i){return new xl(t,e,n,r,i)}var xl=function(t){et(e,t);function e(n,r,i,a,o,u){var s=t.call(this,n)||this;return s.onFinalize=o,s.shouldUnsubscribe=u,s._next=r?function(l){try{r(l)}catch(f){n.error(f)}}:t.prototype._next,s._error=a?function(l){try{a(l)}catch(f){n.error(f)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=i?function(){try{i()}catch(l){n.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,s}return e.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},e}(mn),_l=hn(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),R=function(t){et(e,t);function e(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return e.prototype.lift=function(n){var r=new fi(this,this);return r.operator=n,r},e.prototype._throwIfClosed=function(){if(this.closed)throw new _l},e.prototype.next=function(n){var r=this;Te(function(){var i,a;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var o=Lt(r.currentObservers),u=o.next();!u.done;u=o.next()){var s=u.value;s.next(n)}}catch(l){i={error:l}}finally{try{u&&!u.done&&(a=o.return)&&a.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(n){var r=this;Te(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},e.prototype.complete=function(){var n=this;Te(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},e.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},e.prototype._innerSubscribe=function(n){var r=this,i=this,a=i.hasError,o=i.isStopped,u=i.observers;return a||o?ii:(this.currentObservers=null,u.push(n),new Kt(function(){r.currentObservers=null,Ae(u,n)}))},e.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,a=r.thrownError,o=r.isStopped;i?n.error(a):o&&n.complete()},e.prototype.asObservable=function(){var n=new P;return n.source=this,n},e.create=function(n,r){return new fi(n,r)},e}(P),fi=function(t){et(e,t);function e(n,r){var i=t.call(this)||this;return i.destination=n,i.source=r,i}return e.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},e.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},e.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},e.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:ii},e}(R),hi=function(t){et(e,t);function e(n){var r=t.call(this)||this;return r._value=n,r}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},e.prototype.getValue=function(){var n=this,r=n.hasError,i=n.thrownError,a=n._value;if(r)throw i;return this._throwIfClosed(),a},e.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},e}(R),vn={now:function(){return(vn.delegate||Date).now()},delegate:void 0},$l=function(t){et(e,t);function e(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=vn);var a=t.call(this)||this;return a._bufferSize=n,a._windowTime=r,a._timestampProvider=i,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=r===1/0,a._bufferSize=Math.max(1,n),a._windowTime=Math.max(1,r),a}return e.prototype.next=function(n){var r=this,i=r.isStopped,a=r._buffer,o=r._infiniteTimeWindow,u=r._timestampProvider,s=r._windowTime;i||(a.push(n),!o&&a.push(u.now()+s)),this._trimBuffer(),t.prototype.next.call(this,n)},e.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,a=i._infiniteTimeWindow,o=i._buffer,u=o.slice(),s=0;s<u.length&&!n.closed;s+=a?1:2)n.next(u[s]);return this._checkFinalizedStatuses(n),r},e.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,a=n._buffer,o=n._infiniteTimeWindow,u=(o?1:2)*r;if(r<1/0&&u<a.length&&a.splice(0,a.length-u),!o){for(var s=i.now(),l=0,f=1;f<a.length&&a[f]<=s;f+=2)l=f;l&&a.splice(0,l+1)}},e}(R),Al=function(t){et(e,t);function e(n,r){return t.call(this)||this}return e.prototype.schedule=function(n,r){return this},e}(Kt),bn={setInterval:function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,ft([t,e],ct(n)))},clearInterval:function(t){var e=bn.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},Tl=function(t){et(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return e.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var a=this.id,o=this.scheduler;return a!=null&&(this.id=this.recycleAsyncId(o,a,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,r),this},e.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),bn.setInterval(n.flush.bind(n,this),i)},e.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&bn.clearInterval(r)},e.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(n,r){var i=!1,a;try{this.work(n)}catch(o){i=!0,a=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),a},e.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,a=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Ae(a,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(Al),pi=function(){function t(e,n){n===void 0&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(e,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,e).schedule(r,n)},t.now=vn.now,t}(),Sl=function(t){et(e,t);function e(n,r){r===void 0&&(r=pi.now);var i=t.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},e}(pi),wn=new Sl(Tl),Ml=wn,di=new P(function(t){return t.complete()});function mi(t){return t&&I(t.schedule)}function Dn(t){return t[t.length-1]}function Cl(t){return I(Dn(t))?t.pop():void 0}function Pt(t){return mi(Dn(t))?t.pop():void 0}function gi(t,e){return typeof Dn(t)=="number"?t.pop():e}var yi=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function vi(t){return I(t==null?void 0:t.then)}function bi(t){return I(t[yn])}function wi(t){return Symbol.asyncIterator&&I(t==null?void 0:t[Symbol.asyncIterator])}function Di(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Fl(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var xi=Fl();function _i(t){return I(t==null?void 0:t[xi])}function $i(t){return hl(this,arguments,function(){var n,r,i,a;return ri(this,function(o){switch(o.label){case 0:n=t.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,Et(n.read())];case 3:return r=o.sent(),i=r.value,a=r.done,a?[4,Et(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,Et(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function Ai(t){return I(t==null?void 0:t.getReader)}function j(t){if(t instanceof P)return t;if(t!=null){if(bi(t))return Ll(t);if(yi(t))return El(t);if(vi(t))return Ol(t);if(wi(t))return Ti(t);if(_i(t))return Pl(t);if(Ai(t))return Rl(t)}throw Di(t)}function Ll(t){return new P(function(e){var n=t[yn]();if(I(n.subscribe))return n.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function El(t){return new P(function(e){for(var n=0;n<t.length&&!e.closed;n++)e.next(t[n]);e.complete()})}function Ol(t){return new P(function(e){t.then(function(n){e.closed||(e.next(n),e.complete())},function(n){return e.error(n)}).then(null,li)})}function Pl(t){return new P(function(e){var n,r;try{for(var i=Lt(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(u){n={error:u}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()})}function Ti(t){return new P(function(e){Il(t,e).catch(function(n){return e.error(n)})})}function Rl(t){return Ti($i(t))}function Il(t,e){var n,r,i,a;return fl(this,void 0,void 0,function(){var o,u;return ri(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=pl(t),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(o=r.value,e.next(o),e.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return u=s.sent(),i={error:u},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function ht(t,e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=e.schedule(function(){n(),i?t.add(this.schedule(null,r)):this.unsubscribe()},r);if(t.add(a),!i)return a}function Si(t,e){return e===void 0&&(e=0),G(function(n,r){n.subscribe(X(r,function(i){return ht(r,t,function(){return r.next(i)},e)},function(){return ht(r,t,function(){return r.complete()},e)},function(i){return ht(r,t,function(){return r.error(i)},e)}))})}function Mi(t,e){return e===void 0&&(e=0),G(function(n,r){r.add(t.schedule(function(){return n.subscribe(r)},e))})}function kl(t,e){return j(t).pipe(Mi(e),Si(e))}function Nl(t,e){return j(t).pipe(Mi(e),Si(e))}function Bl(t,e){return new P(function(n){var r=0;return e.schedule(function(){r===t.length?n.complete():(n.next(t[r++]),n.closed||this.schedule())})})}function Vl(t,e){return new P(function(n){var r;return ht(n,e,function(){r=t[xi](),ht(n,e,function(){var i,a,o;try{i=r.next(),a=i.value,o=i.done}catch(u){n.error(u);return}o?n.complete():n.next(a)},0,!0)}),function(){return I(r==null?void 0:r.return)&&r.return()}})}function Ci(t,e){if(!t)throw new Error("Iterable cannot be null");return new P(function(n){ht(n,e,function(){var r=t[Symbol.asyncIterator]();ht(n,e,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Gl(t,e){return Ci($i(t),e)}function Xl(t,e){if(t!=null){if(bi(t))return kl(t,e);if(yi(t))return Bl(t,e);if(vi(t))return Nl(t,e);if(wi(t))return Ci(t,e);if(_i(t))return Vl(t,e);if(Ai(t))return Gl(t,e)}throw Di(t)}function Rt(t,e){return e?Xl(t,e):j(t)}function bt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t);return Rt(t,n)}var Fi=hn(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function Yl(t){return t instanceof Date&&!isNaN(t)}function D(t,e){return G(function(n,r){var i=0;n.subscribe(X(r,function(a){r.next(t.call(e,a,i++))}))})}var Ul=Array.isArray;function Hl(t,e){return Ul(e)?t.apply(void 0,ft([],ct(e))):t(e)}function zl(t){return D(function(e){return Hl(t,e)})}var jl=Array.isArray,ql=Object.getPrototypeOf,Wl=Object.prototype,Jl=Object.keys;function Kl(t){if(t.length===1){var e=t[0];if(jl(e))return{args:e,keys:null};if(Zl(e)){var n=Jl(e);return{args:n.map(function(r){return e[r]}),keys:n}}}return{args:t,keys:null}}function Zl(t){return t&&typeof t=="object"&&ql(t)===Wl}function Ql(t,e){return t.reduce(function(n,r,i){return n[r]=e[i],n},{})}function O(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=Cl(t),i=Kl(t),a=i.args,o=i.keys;if(a.length===0)return Rt([],n);var u=new P(tc(a,n,o?function(s){return Ql(o,s)}:Ot));return r?u.pipe(zl(r)):u}function tc(t,e,n){return n===void 0&&(n=Ot),function(r){Li(e,function(){for(var i=t.length,a=new Array(i),o=i,u=i,s=function(f){Li(e,function(){var c=Rt(t[f],e),h=!1;c.subscribe(X(r,function(p){a[f]=p,h||(h=!0,u--),u||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},l=0;l<i;l++)s(l)},r)}}function Li(t,e,n){t?ht(n,t,e):e()}function ec(t,e,n,r,i,a,o,u){var s=[],l=0,f=0,c=!1,h=function(){c&&!s.length&&!l&&e.complete()},p=function(m){return l<r?d(m):s.push(m)},d=function(m){l++;var b=!1;j(n(m,f++)).subscribe(X(e,function(_){e.next(_)},function(){b=!0},void 0,function(){if(b)try{l--;for(var _=function(){var T=s.shift();o||d(T)};s.length&&l<r;)_();h()}catch(T){e.error(T)}}))};return t.subscribe(X(e,p,function(){c=!0,h()})),function(){}}function Ei(t,e,n){return n===void 0&&(n=1/0),I(e)?Ei(function(r,i){return D(function(a,o){return e(r,a,i,o)})(j(t(r,i)))},n):(typeof e=="number"&&(n=e),G(function(r,i){return ec(r,i,t,n)}))}function xn(t){return t===void 0&&(t=1/0),Ei(Ot,t)}function nc(){return xn(1)}function Oi(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nc()(Rt(t,Pt(t)))}function rc(t){return new P(function(e){j(t()).subscribe(e)})}function Pi(t,e,n){return rc(function(){return t()?e:n})}function ic(t,e,n){n===void 0&&(n=Ml);var r=-1;return e!=null&&(mi(e)?n=e:r=e),new P(function(i){var a=Yl(t)?+t-n.now():t;a<0&&(a=0);var o=0;return n.schedule(function(){i.closed||(i.next(o++),0<=r?this.schedule(void 0,r):i.complete())},a)})}function ac(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=gi(t,1/0),i=t;return i.length?i.length===1?j(i[0]):xn(r)(Rt(i,n)):di}var oc=Array.isArray;function uc(t){return t.length===1&&oc(t[0])?t[0]:t}function Ri(t,e){return G(function(n,r){var i=0;n.subscribe(X(r,function(a){return t.call(e,a,i++)&&r.next(a)}))})}function sc(t,e){return e===void 0&&(e=wn),G(function(n,r){var i=null,a=null,o=null,u=function(){if(i){i.unsubscribe(),i=null;var l=a;a=null,r.next(l)}};function s(){var l=o+t,f=e.now();if(f<l){i=this.schedule(void 0,l-f),r.add(i);return}u()}n.subscribe(X(r,function(l){a=l,o=e.now(),i||(i=e.schedule(s,t),r.add(i))},function(){u(),r.complete()},void 0,function(){a=i=null}))})}function lc(t){return G(function(e,n){var r=!1;e.subscribe(X(n,function(i){r=!0,n.next(i)},function(){r||n.next(t),n.complete()}))})}function cc(t){return t<=0?function(){return di}:G(function(e,n){var r=0;e.subscribe(X(n,function(i){++r<=t&&(n.next(i),t<=r&&n.complete())}))})}function q(t,e){return e===void 0&&(e=Ot),t=t??fc,G(function(n,r){var i,a=!0;n.subscribe(X(r,function(o){var u=e(o);(a||!t(i,u))&&(a=!1,i=u,r.next(o))}))})}function fc(t,e){return t===e}function hc(t){return t===void 0&&(t=pc),G(function(e,n){var r=!1;e.subscribe(X(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(t())}))})}function pc(){return new Fi}function dc(t,e){var n=arguments.length>=2;return function(r){return r.pipe(Ot,cc(1),n?lc(e):hc(function(){return new Fi}))}}function mc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t),r=gi(t,1/0);return t=uc(t),G(function(i,a){xn(r)(Rt(ft([i],ct(t)),n)).subscribe(a)})}function gc(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return mc.apply(void 0,ft([],ct(t)))}function _n(t){t===void 0&&(t={});var e=t.connector,n=e===void 0?function(){return new R}:e,r=t.resetOnError,i=r===void 0?!0:r,a=t.resetOnComplete,o=a===void 0?!0:a,u=t.resetOnRefCountZero,s=u===void 0?!0:u;return function(l){var f,c,h,p=0,d=!1,m=!1,b=function(){c==null||c.unsubscribe(),c=void 0},_=function(){b(),f=h=void 0,d=m=!1},T=function(){var $=f;_(),$==null||$.unsubscribe()};return G(function($,E){p++,!m&&!d&&b();var A=h=h??n();E.add(function(){p--,p===0&&!m&&!d&&(c=$n(T,s))}),A.subscribe(E),!f&&p>0&&(f=new Zt({next:function(N){return A.next(N)},error:function(N){m=!0,b(),c=$n(_,i,N),A.error(N)},complete:function(){d=!0,b(),c=$n(_,o),A.complete()}}),j($).subscribe(f))})(l)}}function $n(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(e===!0){t();return}if(e!==!1){var i=new Zt({next:function(){i.unsubscribe(),t()}});return j(e.apply(void 0,ft([],ct(n)))).subscribe(i)}}function v(t,e,n){var r,i=!1;return r=t,_n({connector:function(){return new $l(r,e,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function An(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Pt(t);return G(function(r,i){(n?Oi(t,r,n):Oi(t,r)).subscribe(i)})}function L(t,e){return G(function(n,r){var i=null,a=0,o=!1,u=function(){return o&&!i&&r.complete()};n.subscribe(X(r,function(s){i==null||i.unsubscribe();var l=0,f=a++;j(t(s,f)).subscribe(i=X(r,function(c){return r.next(e?e(s,c,f,l++):c)},function(){i=null,u()}))},function(){o=!0,u()}))})}function M(t){return G(function(e,n){j(t).subscribe(X(n,function(){return n.complete()},dn)),!n.closed&&e.subscribe(n)})}function yc(t,e){return G(function(n,r){var i=e??{},a=i.leading,o=a===void 0?!0:a,u=i.trailing,s=u===void 0?!1:u,l=!1,f=null,c=null,h=!1,p=function(){c==null||c.unsubscribe(),c=null,s&&(b(),h&&r.complete())},d=function(){c=null,h&&r.complete()},m=function(_){return c=j(t(_)).subscribe(X(r,p,d))},b=function(){if(l){l=!1;var _=f;f=null,r.next(_),!h&&m(_)}};n.subscribe(X(r,function(_){l=!0,f=_,!(c&&!c.closed)&&(o?b():m(_))},function(){h=!0,!(s&&l&&c&&!c.closed)&&r.complete()}))})}function vc(t,e,n){e===void 0&&(e=wn);var r=ic(t,e);return yc(function(){return r},n)}function Ii(t){return new P(e=>{const n=new ResizeObserver(r=>{const i=r[0];i&&i.contentRect&&e.next(i.contentRect)});return n.observe(t),function(){n.unobserve(t)}})}const pt=({datumList$:t,fullChartParams$:e,event$:n})=>{const r=new R,i=e.pipe(M(r),D(c=>({id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:c.highlightDefault})),q()),a=n.pipe(M(r),Ri(c=>c.eventName==="mouseover"),D(c=>c.datum?{id:c.datum.id,seriesLabel:c.datum.seriesLabel,groupLabel:c.datum.groupLabel,categoryLabel:c.datum.categoryLabel,highlightDefault:null}:{id:null,seriesLabel:null,groupLabel:null,categoryLabel:null,highlightDefault:null})),o=n.pipe(M(r),Ri(c=>c.eventName==="mouseout"),L(c=>i));function u(c,h){const p=c.find(d=>d.id===h);return p?[p]:[]}function s(c,h){return h==null?[]:c.filter(p=>p.seriesLabel===h)}function l(c,h){return h==null?[]:c.filter(p=>p.groupLabel===h)}function f(c,h){return h==null?[]:c.filter(p=>p.categoryLabel===h)}return new P(c=>(O({target:ac(a,o,i),datumList:t,fullChartParams:e}).pipe(M(r),L(async h=>h)).subscribe(h=>{let p=[];h.fullChartParams.highlightTarget==="datum"?p=u(h.datumList,h.target.id):h.fullChartParams.highlightTarget==="series"?p=s(h.datumList,h.target.seriesLabel):h.fullChartParams.highlightTarget==="group"?p=l(h.datumList,h.target.groupLabel):h.fullChartParams.highlightTarget==="category"&&(p=f(h.datumList,h.target.categoryLabel)),c.next(p)}),function(){r.next(void 0)}))},Me=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.seriesLabel)??[];i.push(r),n.set(r.seriesLabel,i)}),n})),Tn=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.forEach(r=>{const i=n.get(r.groupLabel)??[];i.push(r),n.set(r.groupLabel,i)}),n})),Qt=({datumList$:t})=>t.pipe(D(e=>{const n=new Map;return e.filter(r=>r.categoryLabel!=null).forEach(r=>{const i=n.get(r.categoryLabel)??[];i.push(r),n.set(r.categoryLabel,i)}),n})),wt=t=>t.pipe(D(e=>e.styles.textSize),q(),D(e=>{let n=NaN;if(typeof e=="string")if(e.includes("rem")){const r=parseFloat(getComputedStyle(document.documentElement).fontSize);n=parseFloat(e)*r}else e.includes("px")&&(n=parseFloat(e));else if(typeof e=="number")return e;return n||14})),ki=({fullDataFormatter$:t})=>t.pipe(D(e=>e.separateSeries),q()),Ni=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Sn=({computedData$:t})=>t.pipe(D(e=>e.map(n=>n.filter(r=>r.visible!=!1)))),Bi=({computedData$:t,fullDataFormatter$:e})=>O({computedData:t,fullDataFormatter:e}).pipe(L(async n=>n),D(n=>{const r=n.fullDataFormatter.sumSeries==!0?n.computedData.map(i=>[i.reduce((a,o)=>a==null?o:(a.value=a.value+o.value,a),null)]):n.computedData;return n.fullDataFormatter.separateSeries==!0?r.map(i=>i.sort((a,o)=>a.seq-o.seq)):[r.flat().sort((i,a)=>i.seq-a.seq)]})),Vi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>i.fullDataFormatter.separateSeries?cn(i.layout,i.fullDataFormatter.container,i.computedData.length):cn(i.layout,i.fullDataFormatter.container,1))),Gi=({seriesContainerPosition$:t,seriesLabels$:e,separateSeries$:n})=>O({seriesContainerPosition:t,seriesLabels:e,separateSeries:n}).pipe(L(async r=>r),D(r=>r.separateSeries?new Map(r.seriesLabels.map((i,a)=>[i,r.seriesContainerPosition[a]??r.seriesContainerPosition[0]])):new Map(r.seriesLabels.map((i,a)=>[i,r.seriesContainerPosition[0]])))),bc=({subject:t,observer:e})=>{const n=wt(e.fullChartParams$).pipe(v(1)),r=ki({fullDataFormatter$:e.fullDataFormatter$}),i=Sn({computedData$:e.computedData$}),a=Bi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$}).pipe(v(1)),o=Sn({computedData$:a}),u=e.computedData$.pipe(D(p=>p.flat())).pipe(v(1)),s=pt({datumList$:u,fullChartParams$:e.fullChartParams$,event$:t.event$}).pipe(v(1)),l=Ni({computedData$:e.computedData$}),f=Me({datumList$:u}).pipe(v(1)),c=Vi({computedData$:e.computedData$,fullDataFormatter$:e.fullDataFormatter$,layout$:e.layout$}).pipe(v(1)),h=Gi({seriesContainerPosition$:c,seriesLabels$:l,separateSeries$:r}).pipe(v(1));return{fullParams$:e.fullParams$,fullChartParams$:e.fullChartParams$,fullDataFormatter$:e.fullDataFormatter$,computedData$:e.computedData$,layout$:e.layout$,textSizePx$:n,visibleComputedData$:i,visibleComputedLayoutData$:o,separateSeries$:r,computedLayoutData$:a,seriesHighlight$:s,seriesLabels$:l,SeriesDataMap$:f,seriesContainerPosition$:c,SeriesContainerPositionMap$:h}},it=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=V.scaleDomain,scaleRange:i=V.scaleRange,reverse:a=!1})=>{const o=r[0]??V.scaleDomain[0],u=r[1]??V.scaleDomain[1],s=i[0]??V.scaleRange[0],l=i[1]??V.scaleRange[1];let f=o==="auto"?e<0?e:0:o==="min"?e:o,c=u==="auto"?t>=0?t:0:u==="max"?t:u;const h=t-(t-f)/(1-s),p=c/l;return a?qt().domain([h,p]).range([n,0]):qt().domain([h,p]).range([0,n])},wc=({maxValue:t=1,minValue:e=0,axisWidth:n,scaleDomain:r=V.scaleDomain,scaleRange:i=V.scaleRange,reverse:a=!1})=>{e===t&&(t+=1,e-=1);const o=r[0]??V.scaleDomain[0],u=r[1]??V.scaleDomain[1],s=i[0]??V.scaleRange[0],l=i[1]??V.scaleRange[1];let f=o==="auto"?e<0?e:0:o==="min"?e:o,c=u==="auto"?t>=0?t:0:u==="max"?t:u;const h=t-(t-f)/(1-s),p=c/l;return a?qt().domain([n,0]).range([h,p]):qt().domain([0,n]).range([h,p])},Dc=({axisLabels:t,axisWidth:e,padding:n=.5})=>{let r=[0,e];return qs().domain(t).range(r).padding(n)},xc=({axisLabels:t,axisWidth:e,padding:n=0,reverse:r=!1})=>{let i=t.map((s,l)=>l);r&&i.reverse();const a=i.length-1+n*2,o=e/a,u=o*n-o*.5;return Jr().domain([u,e-u]).range(i)},Mn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>{function r(a,o,u){const s=o.groupAxis.position==="top"||o.groupAxis.position==="bottom"?u.width:u.height,l=a[0]?a[0].length-1:0;return it({maxValue:l,minValue:0,axisWidth:s,scaleDomain:[0,l],scaleRange:[0,1]})}function i(a,o,u){const s=o.valueAxis.position==="left"||o.valueAxis.position==="right"?u.height:u.width,l=a.flat();let[f,c]=ti(l);return f===c&&c===0&&(c=1),it({maxValue:c,minValue:f,axisWidth:s,scaleDomain:["auto","auto"],scaleRange:[0,1]})}return O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async a=>a),D(a=>{const o=r(a.computedData,a.fullDataFormatter,a.layout),u=i(a.computedData,a.fullDataFormatter,a.layout),s=u(0);return a.computedData.map((l,f)=>l.map((c,h)=>{const p=o(h),d=u(c.value??0);return{...c,axisX:p,axisY:d,axisYFromZero:d-s}}))}))},Cn=({fullDataFormatter$:t,layout$:e})=>{const n=new R;function r({xAxisPosition:i,yAxisPosition:a,width:o,height:u}){return(i==="bottom"||i==="top")&&(a==="left"||a==="right")?{width:o,height:u}:(i==="left"||i==="right")&&(a==="bottom"||a==="top")?{width:u,height:o}:{width:o,height:u}}return new P(i=>{O({fullDataFormatter:t,layout:e}).pipe(M(n),L(async a=>a)).subscribe(a=>{const o=r({xAxisPosition:a.fullDataFormatter.groupAxis.position,yAxisPosition:a.fullDataFormatter.valueAxis.position,width:a.layout.width,height:a.layout.height});return i.next(o),function(){n.next(void 0)}})})},Fn=({computedData$:t})=>t.pipe(D(e=>e.filter(n=>n.length).map(n=>n[0].seriesLabel)),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),Ln=({computedData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),En=({computedLayoutData$:t})=>t.pipe(D(e=>e.map(r=>r.filter(i=>i.visible==!0)).filter(r=>r.length))),Xi=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async i=>i),D(i=>{if(i.fullDataFormatter.separateSeries)return Ft(i.layout,i.fullDataFormatter.container,i.computedData.length);{const a=Ft(i.layout,i.fullDataFormatter.container,1);return i.computedData.map((o,u)=>a[0])}})),On=({isSeriesSeprate$:t,computedData$:e})=>{const n=e.pipe(D(r=>{const i=new Array(r[0]?r[0].length:0).fill(null).map((o,u)=>r.reduce((s,l)=>{if(l&&l[u]){const f=l[u].value==null||l[u].visible==!1?0:l[u].value;return s+f}return s},0));return r.map((o,u)=>o.map((s,l)=>({...s,value:i[l]})))}));return t.pipe(L(r=>Pi(()=>r,e,n)))},Pn=({computedData$:t,fullDataFormatter$:e})=>O({computedData:t,fullDataFormatter:e}).pipe(L(async n=>n),D(n=>{const r=n.fullDataFormatter.groupAxis,i=n.computedData[0]?n.computedData[0].length-1:0,a=r.scaleDomain[0]-r.scalePadding,o=r.scaleDomain[1]==="max"?i+r.scalePadding:r.scaleDomain[1]+r.scalePadding;return[a,o]})),Rn=({computedData$:t,groupScaleDomainValue$:e})=>O({computedData:t,groupScaleDomainValue:e}).pipe(D(n=>{const r=n.computedData.map((a,o)=>a.filter((u,s)=>s>=n.groupScaleDomainValue[0]&&s<=n.groupScaleDomainValue[1]&&u.visible==!0));return ln(r)})),In=({fullDataFormatter$:t,layout$:e})=>{const n=new R;function r({xAxis:i,yAxis:a,width:o,height:u}){if(!i||!a)return{translate:[0,0],scale:[1,1],rotate:0,rotateX:0,rotateY:0,value:""};let s=0,l=0,f=0,c=0,h=0;return i.position==="bottom"?a.position==="left"?(c=180,l=u):a.position==="right"?(c=180,h=180,s=o,l=u):(c=180,l=u):i.position==="top"?a.position==="left"||(a.position==="right"?(h=180,s=o):(c=180,l=u)):i.position==="left"?a.position==="bottom"?(f=-90,l=u):a.position==="top"?(f=-90,h=180):(c=180,l=u):i.position==="right"?a.position==="bottom"?(f=-90,c=180,l=u,s=o):a.position==="top"?(f=-90,c=180,h=180,s=o):(c=180,l=u):(c=180,l=u),{translate:[s,l],scale:[1,1],rotate:f,rotateX:c,rotateY:h,value:`translate(${s}px, ${l}px) rotate(${f}deg) rotateX(${c}deg) rotateY(${h}deg)`}}return new P(i=>(O({fullDataFormatter:t,layout:e}).pipe(M(n),L(async a=>a)).subscribe(a=>{const o=r({xAxis:a.fullDataFormatter.groupAxis,yAxis:a.fullDataFormatter.valueAxis,width:a.layout.width,height:a.layout.height});i.next(o)}),function(){n.next(void 0)}))},kn=({gridAxesTransform$:t})=>t.pipe(D(e=>{const n=[0,0],r=[1/e.scale[0],1/e.scale[1]],i=e.rotate*-1,a=e.rotateX*-1,o=e.rotateY*-1;return{translate:n,scale:r,rotate:i,rotateX:a,rotateY:o,value:`translate(${n[0]}px, ${n[1]}px) rotateX(${a}deg) rotateY(${o}deg) rotate(${i}deg)`}})),Nn=({computedData$:t,groupScaleDomainValue$:e,filteredMinMaxValue$:n,fullDataFormatter$:r,layout$:i})=>{const a=new R;function o({data:u,groupAxis:s,valueAxis:l,groupScaleDomainValue:f,filteredMinMaxValue:c,width:h,height:p}){let d=0,m=0,b=0,_=0;const T=s.position==="top"||s.position==="bottom"?h:p,$=0,E=u[0]?u[0].length-1:0,A=it({maxValue:E,minValue:$,axisWidth:T,scaleDomain:f,scaleRange:[0,1]}),N=A($),Y=A(E);$==E?(d=0,b=1):(d=N,b=(Y-N)/T),c[0]===c[1]&&c[1]===0&&(c[1]=1);const k=l.position==="left"||l.position==="right"?p:h,w=it({maxValue:c[1],minValue:c[0],axisWidth:k,scaleDomain:l.scaleDomain,scaleRange:l.scaleRange}),x=ln(u);x[0]===x[1]&&x[1]===0&&(x[1]=1);const y=w(x[0]>0?0:x[0]),S=w(x[1]<0?0:x[1]);return m=y,_=(S-y)/k,{translate:[d,m],scale:[b,_],rotate:0,rotateX:0,rotateY:0,value:`translate(${d}px, ${m}px) scale(${b}, ${_})`}}return new P(u=>(O({computedData:t,groupScaleDomainValue:e,filteredMinMaxValue:n,fullDataFormatter:r,layout:i}).pipe(M(a),L(async s=>s)).subscribe(s=>{const l=o({data:s.computedData,groupAxis:s.fullDataFormatter.groupAxis,valueAxis:s.fullDataFormatter.valueAxis,groupScaleDomainValue:s.groupScaleDomainValue,filteredMinMaxValue:s.filteredMinMaxValue,width:s.layout.width,height:s.layout.height});u.next(l)}),function(){a.next(void 0)}))},Bn=({gridContainerPosition$:t,gridAxesTransform$:e,gridGraphicTransform$:n})=>O({gridContainerPosition:t,gridAxesTransform:e,gridGraphicTransform:n}).pipe(L(async r=>r),D(r=>r.gridAxesTransform.rotate==0||r.gridAxesTransform.rotate==180?r.gridContainerPosition.map((i,a)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[a].scale[0],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[a].scale[1]]):r.gridContainerPosition.map((i,a)=>[1/r.gridGraphicTransform.scale[0]/r.gridContainerPosition[a].scale[1],1/r.gridGraphicTransform.scale[1]/r.gridContainerPosition[a].scale[0]]))),Yi=({fullDataFormatter$:t,computedData$:e,layout$:n,fullChartParams$:r,event$:i})=>{const a=new R,o=pt({datumList$:e.pipe(D(s=>s.flat().flat()),v(1)),fullChartParams$:r,event$:i}).pipe(v(1)),u=Vn({computedData$:e,fullDataFormatter$:t,layout$:n}).pipe(v(1));return O({fullDataFormatter:t,computedData:e,multiGridContainer:u}).pipe(L(async s=>s),D(s=>{a.next(void 0);const l=s.fullDataFormatter.gridList[0]??Bt;return s.computedData.map((f,c)=>{const h=s.fullDataFormatter.gridList[c]??l,p={type:"grid",visibleFilter:s.fullDataFormatter.visibleFilter,...h,container:{...s.fullDataFormatter.container}},d=bt(p).pipe(M(a),v(1)),m=bt(f).pipe(M(a),v(1)),b=d.pipe(D(Z=>Z.separateSeries),q(),v(1)),_=bt(s.multiGridContainer[c]).pipe(M(a),v(1)),T=Cn({fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),$=m.pipe(D(Z=>Z.flat())).pipe(M(a),v(1)),E=Fn({computedData$:m}).pipe(M(a),v(1)),A=Me({datumList$:$}).pipe(M(a),v(1)),N=Tn({datumList$:$}).pipe(M(a),v(1)),Y=Ln({computedData$:m}).pipe(M(a),v(1)),k=Mn({computedData$:m,fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),w=En({computedLayoutData$:k}).pipe(M(a),v(1)),x=On({computedData$:m,isSeriesSeprate$:b}).pipe(v(1)),y=Pn({computedData$:m,fullDataFormatter$:d}).pipe(M(a),v(1)),S=Rn({computedData$:m,groupScaleDomainValue$:y}).pipe(M(a),v(1)),C=In({fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),B=kn({gridAxesTransform$:C}).pipe(M(a),v(1)),dt=Nn({computedData$:m,groupScaleDomainValue$:y,filteredMinMaxValue$:S,fullDataFormatter$:d,layout$:n}).pipe(M(a),v(1)),$t=Bn({gridContainerPosition$:_,gridAxesTransform$:C,gridGraphicTransform$:dt});return{isSeriesSeprate$:b,gridContainerPosition$:_,gridAxesSize$:T,gridHighlight$:o,seriesLabels$:E,SeriesDataMap$:A,GroupDataMap$:N,dataFormatter$:d,computedData$:m,computedLayoutData$:k,visibleComputedData$:Y,visibleComputedLayoutData$:w,computedStackedData$:x,groupScaleDomainValue$:y,filteredMinMaxValue$:S,gridAxesTransform$:C,gridAxesReverseTransform$:B,gridGraphicTransform$:dt,gridGraphicReverseScale$:$t}})}))},Vn=({computedData$:t,fullDataFormatter$:e,layout$:n})=>O({computedData:t,fullDataFormatter:e,layout:n}).pipe(L(async r=>r),D(r=>{const i=r.fullDataFormatter.gridList[0]??Bt,a=r.computedData.reduce((l,f,c)=>{const p=(r.fullDataFormatter.gridList[c]??i).separateSeries?f.length:r.fullDataFormatter.separateGrid?1:0;return l+p},0)||1,o=Ft(r.layout,r.fullDataFormatter.container,a);let u=0;return r.computedData.map((l,f)=>{const c=r.fullDataFormatter.gridList[f]??i,h=l.map((p,d)=>{const m=o[u];return c.separateSeries&&(u+=1),m});return!c.separateSeries&&r.fullDataFormatter.separateGrid&&(u+=1),h})})),Ui=({computedData$:t})=>t.pipe(D(e=>{function n(r,i){return r.push(i),i.children&&i.children.forEach(a=>{r=n(r,a)}),r}return n([],e)})),Hi=t=>t.pipe(D(e=>Array.from(e.keys())),q((e,n)=>JSON.stringify(e).length===JSON.stringify(n).length)),zi=({computedData$:t})=>t.pipe(D(e=>{function n(r){return r.children&&(r.children=r.children.filter(i=>i.visible).map(i=>n(i))),r}return n(e)}));function It(t){return`[OrbCharts warn]: ${t.message}`}function Dt({columnName:t,expectToBe:e,from:n}){return`Invalid value: '${t}' must be '${e}'
|
4
4
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orbcharts/core",
|
3
|
-
"version": "3.0.0-beta.
|
3
|
+
"version": "3.0.0-beta.9",
|
4
4
|
"description": "OrbCharts is an open source chart library based on d3.js and rx.js",
|
5
5
|
"author": "Blue Planet Inc.",
|
6
6
|
"license": "Apache-2.0",
|
@@ -35,7 +35,7 @@
|
|
35
35
|
"vite-plugin-dts": "^3.7.3"
|
36
36
|
},
|
37
37
|
"dependencies": {
|
38
|
-
"@orbcharts/core-types": "^3.0.0-beta.
|
38
|
+
"@orbcharts/core-types": "^3.0.0-beta.6",
|
39
39
|
"d3": "^7.8.5",
|
40
40
|
"rxjs": "^7.8.1"
|
41
41
|
}
|
package/src/defaults.ts
CHANGED
@@ -57,6 +57,8 @@ export const DEFAULT_CHART_PARAMS: ChartParams = {
|
|
57
57
|
colors: {
|
58
58
|
light: {
|
59
59
|
label: ['#67B7DC', '#6794DC', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
60
|
+
// label: ['#F3A356', '#7A60F0', '#38B1AF', '#60A2F0', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
61
|
+
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
60
62
|
// primary: '#454545',
|
61
63
|
primary: '#1b1e23',
|
62
64
|
secondary: '#e1e1e1',
|
@@ -64,7 +66,8 @@ export const DEFAULT_CHART_PARAMS: ChartParams = {
|
|
64
66
|
background: '#ffffff'
|
65
67
|
},
|
66
68
|
dark: {
|
67
|
-
label: ['#67B7DC', '#6794DC', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
69
|
+
label: ['#67B7DC', '#6794DC', '#38B1AF', '#6771DC', '#8067DC', '#A367DC', '#C767DC', '#DC67CE', '#DC67AB', '#DC6788', '#DC6967', '#DC8C67', '#DCAF67'],
|
70
|
+
// label: ['#60A2F0', '#F3A356', '#7A60F0', '#38B1AF', '#F06062', '#FF383C', '#6580EA', '#079F9C', '#9F65EA', '#EA7465', '#EA7465', '#8657D2', '#59B757', '#2797FF', '#D25786', '#F54BA6', '#4BECF5', '#74FD72', '#CA4BF5', '#EFE26E'],
|
68
71
|
primary: '#f0f0f0',
|
69
72
|
secondary: '#e1e1e1',
|
70
73
|
white: '#ffffff',
|