usage-board 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/bin/cli.js +3 -0
- package/dist/index.mjs +9917 -0
- package/dist/nitro.json +15 -0
- package/dist/public/200.html +1 -0
- package/dist/public/404.html +1 -0
- package/dist/public/_nuxt/ByWgBgZ8.js +119 -0
- package/dist/public/_nuxt/CBiuWPro.js +282 -0
- package/dist/public/_nuxt/Cmq4CfR_.js +1 -0
- package/dist/public/_nuxt/CvR6h1He.js +1 -0
- package/dist/public/_nuxt/DCeZWdZx.js +105 -0
- package/dist/public/_nuxt/DJRZ2xy0.js +3 -0
- package/dist/public/_nuxt/DRIVB4-c.js +9 -0
- package/dist/public/_nuxt/R7A4Dcdm.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -0
- package/dist/public/_nuxt/builds/meta/ee1b1668-0818-4b73-b349-b813232bb364.json +1 -0
- package/dist/public/_nuxt/entry.DrzELaFO.css +1 -0
- package/dist/public/_nuxt/error-404.B0EXnOcv.css +1 -0
- package/dist/public/_nuxt/error-500.CnSNZoEG.css +1 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/index.html +1 -0
- package/dist/public/logo.svg +4 -0
- package/dist/public/robots.txt +2 -0
- package/package.json +104 -11
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import{a8 as al,f as q,o as N,c as P,J as ct,a7 as Z,I as R,V as at,g as ge,w as kt,b as ut,a as F,d as Xo,t as j,O as we,a9 as br,i as z,Z as Gt,$ as Xt,P as cl,A as qo,N as je,k as hs,l as ll,v as Kt,E as ul,a6 as Ri,K as hn,x as fn,r as Me,a1 as hl,G as Pe,D as gi,y as mi,h as fl}from"./DRIVB4-c.js";function dl(t,e="reka"){let n;return n=al?.(),e?`${e}-${n}`:n}const pl=q({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("div",{"data-slot":"card",class:Z(R(at)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e.class))},[ct(n.$slots,"default")],2))}}),gl=q({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("div",{"data-slot":"card-content",class:Z(R(at)("px-6",e.class))},[ct(n.$slots,"default")],2))}}),ml=q({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("div",{"data-slot":"card-header",class:Z(R(at)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e.class))},[ct(n.$slots,"default")],2))}}),_l=q({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("h3",{"data-slot":"card-title",class:Z(R(at)("leading-none font-semibold",e.class))},[ct(n.$slots,"default")],2))}}),vl={class:"flex items-start justify-between gap-4"},yl={class:"min-w-0 space-y-1"},xl={key:0,class:"text-sm text-muted-foreground"},bl=q({name:"StatisticalAnalysisPanel",__name:"Panel",props:{compact:{type:Boolean},description:{},icon:{},title:{}},setup(t){return(e,n)=>{const i=_l,r=br,s=ml,o=gl,a=pl;return N(),ge(a,{class:Z(R(at)("shadow-none bg-transparent",t.compact?"gap-3 py-4":"gap-4 py-5"))},{default:kt(()=>[ut(s,{class:Z(R(at)(t.compact?"px-4":"px-5"))},{default:kt(()=>[F("div",vl,[F("div",yl,[ut(i,{class:Z(t.compact?"text-xs font-medium text-muted-foreground uppercase tracking-wide":"text-base")},{default:kt(()=>[Xo(j(t.title),1)]),_:1},8,["class"]),t.description?(N(),P("p",xl,j(t.description),1)):we("",!0)]),t.icon?(N(),P("div",{key:0,class:Z(R(at)("shrink-0 rounded-lg bg-secondary text-secondary-foreground flex items-center justify-center",t.compact?"size-7":"size-8"))},[ut(r,{mode:"svg",name:t.icon,class:Z(t.compact?"size-3.5":"size-4")},null,8,["name","class"])],2)):we("",!0)])]),_:1},8,["class"]),ut(o,{class:Z(R(at)(t.compact?"px-4":"px-5"))},{default:kt(()=>[ct(e.$slots,"default")]),_:3},8,["class"])]),_:3},8,["class"])}}}),_i=Object.assign(bl,{__name:"StatisticalAnalysisPanel"}),wl={class:"flex justify-between items-center"},kl={class:"text-2xl font-bold tracking-tight"},Sl={class:"flex items-center gap-1"},Tl=q({name:"StatisticalAnalysisTotalCard",__name:"TotalCard",props:{name:{},value:{},icon:{},trend:{},trendTone:{default:"neutral"}},setup(t){const e=t,n=z(()=>e.trendTone==="down"?{icon:"lucide:trending-down",iconClass:"size-3 text-red-500",textClass:"text-xs font-medium text-red-500"}:e.trendTone==="up"?{icon:"lucide:trending-up",iconClass:"size-3 text-emerald-500",textClass:"text-xs font-medium text-emerald-600 dark:text-emerald-400"}:{icon:"lucide:minus",iconClass:"size-3 text-muted-foreground",textClass:"text-xs font-medium text-muted-foreground"});return(i,r)=>{const s=br,o=_i;return N(),ge(o,{compact:"",icon:t.icon,title:t.name},{default:kt(()=>[F("div",wl,[F("span",kl,j(t.value),1),F("div",Sl,[ut(s,{class:Z(R(n).iconClass),mode:"svg",name:R(n).icon},null,8,["class","name"]),F("span",{class:Z(R(n).textClass)},j(t.trend),3)])])]),_:1},8,["icon","title"])}}}),Cl=Object.assign(Tl,{__name:"StatisticalAnalysisTotalCard"}),Ml={class:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4"},Al=q({name:"DashboardOverviewCards",__name:"OverviewCards",props:{cards:{}},setup(t){return(e,n)=>{const i=Cl;return N(),P("div",Ml,[(N(!0),P(Gt,null,Xt(t.cards,r=>(N(),ge(i,{key:r.name,icon:r.icon,name:r.name,trend:r.trend,"trend-tone":r.trendTone,value:r.value},null,8,["icon","name","trend","trend-tone","value"]))),128))])}}}),cv=Object.assign(Al,{__name:"DashboardOverviewCards"}),$l=q({__name:"ChartStyle",props:{id:{}},setup(t){const{config:e}=h_(),n=z(()=>Object.entries(e.value).filter(([,i])=>i.theme||i.color));return(i,r)=>n.value.length?(N(),ge(R(cl),{key:0,as:"style"},{default:kt(()=>[Xo(j(Object.entries(R(u_)).map(([s,o])=>`
|
|
2
|
+
${o} [data-chart=${t.id}] {
|
|
3
|
+
${n.value.map(([a,c])=>{const l=c.theme?.[s]||c.color;return l?` --color-${a}: ${l};`:null}).join(`
|
|
4
|
+
`)}
|
|
5
|
+
}
|
|
6
|
+
`).join(`
|
|
7
|
+
`)),1)]),_:1})):we("",!0)}}),Dl=["data-chart"],El=q({__name:"ChartContainer",props:{id:{},class:{type:[Boolean,null,String,Object,Array]},config:{},cursor:{type:Boolean}},setup(t){const e=t,{config:n}=qo(e),i=dl(),r=z(()=>`chart-${e.id||i.replace(/:/g,"")}`);return f_({id:i,config:n}),(s,o)=>(N(),P("div",{"data-slot":"chart","data-chart":r.value,class:Z(R(at)("[&_.tick_text]:!fill-muted-foreground [&_.tick_line]:!stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex flex-col aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden [&_[data-vis-xy-container]]:h-full [&_[data-vis-single-container]]:h-full h-full [&_[data-vis-xy-container]]:w-full [&_[data-vis-single-container]]:w-full w-full ",e.class)),style:je({"--vis-tooltip-padding":"0px","--vis-tooltip-background-color":"transparent","--vis-tooltip-border-color":"transparent","--vis-tooltip-text-color":"none","--vis-tooltip-shadow-color":"none","--vis-tooltip-backdrop-filter":"none","--vis-crosshair-circle-stroke-color":"#0000","--vis-crosshair-line-stroke-width":t.cursor?"1px":"0px","--vis-font-family":"var(--font-sans)"})},[ct(s.$slots,"default",{id:R(i),config:R(n)}),ut($l,{id:r.value},null,8,["id"])],14,Dl))}});var ji="http://www.w3.org/1999/xhtml";const fs={svg:"http://www.w3.org/2000/svg",xhtml:ji,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function vi(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),fs.hasOwnProperty(e)?{space:fs[e],local:t}:t}function Fl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ji&&e.documentElement.namespaceURI===ji?e.createElement(t):e.createElementNS(n,t)}}function Nl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function jo(t){var e=vi(t);return(e.local?Nl:Fl)(e)}function Ol(){}function wr(t){return t==null?Ol:function(){return this.querySelector(t)}}function Rl(t){typeof t!="function"&&(t=wr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=new Array(o),c,l,h=0;h<o;++h)(c=s[h])&&(l=t.call(c,c.__data__,h,s))&&("__data__"in c&&(l.__data__=c.__data__),a[h]=l);return new _t(i,this._parents)}function Il(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Bl(){return[]}function Zo(t){return t==null?Bl:function(){return this.querySelectorAll(t)}}function Pl(t){return function(){return Il(t.apply(this,arguments))}}function Ll(t){typeof t=="function"?t=Pl(t):t=Zo(t);for(var e=this._groups,n=e.length,i=[],r=[],s=0;s<n;++s)for(var o=e[s],a=o.length,c,l=0;l<a;++l)(c=o[l])&&(i.push(t.call(c,c.__data__,l,o)),r.push(c));return new _t(i,r)}function Qo(t){return function(){return this.matches(t)}}function Ko(t){return function(e){return e.matches(t)}}var Ul=Array.prototype.find;function zl(t){return function(){return Ul.call(this.children,t)}}function Hl(){return this.firstElementChild}function Wl(t){return this.select(t==null?Hl:zl(typeof t=="function"?t:Ko(t)))}var Yl=Array.prototype.filter;function Vl(){return Array.from(this.children)}function Gl(t){return function(){return Yl.call(this.children,t)}}function Xl(t){return this.selectAll(t==null?Vl:Gl(typeof t=="function"?t:Ko(t)))}function ql(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],c,l=0;l<o;++l)(c=s[l])&&t.call(c,c.__data__,l,s)&&a.push(c);return new _t(i,this._parents)}function Jo(t){return new Array(t.length)}function jl(){return new _t(this._enter||this._groups.map(Jo),this._parents)}function Yn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Yn.prototype={constructor:Yn,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 Zl(t){return function(){return t}}function Ql(t,e,n,i,r,s){for(var o=0,a,c=e.length,l=s.length;o<l;++o)(a=e[o])?(a.__data__=s[o],i[o]=a):n[o]=new Yn(t,s[o]);for(;o<c;++o)(a=e[o])&&(r[o]=a)}function Kl(t,e,n,i,r,s,o){var a,c,l=new Map,h=e.length,u=s.length,f=new Array(h),d;for(a=0;a<h;++a)(c=e[a])&&(f[a]=d=o.call(c,c.__data__,a,e)+"",l.has(d)?r[a]=c:l.set(d,c));for(a=0;a<u;++a)d=o.call(t,s[a],a,s)+"",(c=l.get(d))?(i[a]=c,c.__data__=s[a],l.delete(d)):n[a]=new Yn(t,s[a]);for(a=0;a<h;++a)(c=e[a])&&l.get(f[a])===c&&(r[a]=c)}function Jl(t){return t.__data__}function tu(t,e){if(!arguments.length)return Array.from(this,Jl);var n=e?Kl:Ql,i=this._parents,r=this._groups;typeof t!="function"&&(t=Zl(t));for(var s=r.length,o=new Array(s),a=new Array(s),c=new Array(s),l=0;l<s;++l){var h=i[l],u=r[l],f=u.length,d=eu(t.call(h,h&&h.__data__,l,i)),g=d.length,p=a[l]=new Array(g),m=o[l]=new Array(g),_=c[l]=new Array(f);n(h,u,p,m,_,d,e);for(var x=0,b=0,T,M;x<g;++x)if(T=p[x]){for(x>=b&&(b=x+1);!(M=m[b])&&++b<g;);T._next=M||null}}return o=new _t(o,i),o._enter=a,o._exit=c,o}function eu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function nu(){return new _t(this._exit||this._groups.map(Jo),this._parents)}function iu(t,e,n){var i=this.enter(),r=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?s.remove():n(s),i&&r?i.merge(r).order():r}function ru(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,s=i.length,o=Math.min(r,s),a=new Array(r),c=0;c<o;++c)for(var l=n[c],h=i[c],u=l.length,f=a[c]=new Array(u),d,g=0;g<u;++g)(d=l[g]||h[g])&&(f[g]=d);for(;c<r;++c)a[c]=n[c];return new _t(a,this._parents)}function su(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,s=i[r],o;--r>=0;)(o=i[r])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function ou(t){t||(t=au);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),s=0;s<i;++s){for(var o=n[s],a=o.length,c=r[s]=new Array(a),l,h=0;h<a;++h)(l=o[h])&&(c[h]=l);c.sort(e)}return new _t(r,this._parents).order()}function au(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function cu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function lu(){return Array.from(this)}function uu(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length;r<s;++r){var o=i[r];if(o)return o}return null}function hu(){let t=0;for(const e of this)++t;return t}function fu(){return!this.node()}function du(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],s=0,o=r.length,a;s<o;++s)(a=r[s])&&t.call(a,a.__data__,s,r);return this}function pu(t){return function(){this.removeAttribute(t)}}function gu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mu(t,e){return function(){this.setAttribute(t,e)}}function _u(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function vu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function yu(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 xu(t,e){var n=vi(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?gu:pu:typeof e=="function"?n.local?yu:vu:n.local?_u:mu)(n,e))}function ta(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bu(t){return function(){this.style.removeProperty(t)}}function wu(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ku(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Su(t,e,n){return arguments.length>1?this.each((e==null?bu:typeof e=="function"?ku:wu)(t,e,n??"")):Ae(this.node(),t)}function Ae(t,e){return t.style.getPropertyValue(e)||ta(t).getComputedStyle(t,null).getPropertyValue(e)}function Tu(t){return function(){delete this[t]}}function Cu(t,e){return function(){this[t]=e}}function Mu(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Au(t,e){return arguments.length>1?this.each((e==null?Tu:typeof e=="function"?Mu:Cu)(t,e)):this.node()[t]}function ea(t){return t.trim().split(/^|\s+/)}function kr(t){return t.classList||new na(t)}function na(t){this._node=t,this._names=ea(t.getAttribute("class")||"")}na.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 ia(t,e){for(var n=kr(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function ra(t,e){for(var n=kr(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function $u(t){return function(){ia(this,t)}}function Du(t){return function(){ra(this,t)}}function Eu(t,e){return function(){(e.apply(this,arguments)?ia:ra)(this,t)}}function Fu(t,e){var n=ea(t+"");if(arguments.length<2){for(var i=kr(this.node()),r=-1,s=n.length;++r<s;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Eu:e?$u:Du)(n,e))}function Nu(){this.textContent=""}function Ou(t){return function(){this.textContent=t}}function Ru(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Iu(t){return arguments.length?this.each(t==null?Nu:(typeof t=="function"?Ru:Ou)(t)):this.node().textContent}function Bu(){this.innerHTML=""}function Pu(t){return function(){this.innerHTML=t}}function Lu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Uu(t){return arguments.length?this.each(t==null?Bu:(typeof t=="function"?Lu:Pu)(t)):this.node().innerHTML}function zu(){this.nextSibling&&this.parentNode.appendChild(this)}function Hu(){return this.each(zu)}function Wu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yu(){return this.each(Wu)}function Vu(t){var e=typeof t=="function"?t:jo(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Gu(){return null}function Xu(t,e){var n=typeof t=="function"?t:jo(t),i=e==null?Gu:typeof e=="function"?e:wr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function qu(){var t=this.parentNode;t&&t.removeChild(this)}function ju(){return this.each(qu)}function Zu(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ku(t){return this.select(t?Qu:Zu)}function Ju(t){return arguments.length?this.property("__data__",t):this.node().__data__}function th(t){return function(e){t.call(this,e,this.__data__)}}function eh(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function nh(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,s;n<r;++n)s=e[n],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function ih(t,e,n){return function(){var i=this.__on,r,s=th(e);if(i){for(var o=0,a=i.length;o<a;++o)if((r=i[o]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=s,r.options=n),r.value=e;return}}this.addEventListener(t.type,s,n),r={type:t.type,name:t.name,value:e,listener:s,options:n},i?i.push(r):this.__on=[r]}}function rh(t,e,n){var i=eh(t+""),r,s=i.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var c=0,l=a.length,h;c<l;++c)for(r=0,h=a[c];r<s;++r)if((o=i[r]).type===h.type&&o.name===h.name)return h.value}return}for(a=e?ih:nh,r=0;r<s;++r)this.each(a(i[r],e,n));return this}function sa(t,e,n){var i=ta(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function sh(t,e){return function(){return sa(this,t,e)}}function oh(t,e){return function(){return sa(this,t,e.apply(this,arguments))}}function ah(t,e){return this.each((typeof e=="function"?oh:sh)(t,e))}function*ch(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,s=i.length,o;r<s;++r)(o=i[r])&&(yield o)}var oa=[null];function _t(t,e){this._groups=t,this._parents=e}function dn(){return new _t([[document.documentElement]],oa)}function lh(){return this}_t.prototype=dn.prototype={constructor:_t,select:Rl,selectAll:Ll,selectChild:Wl,selectChildren:Xl,filter:ql,data:tu,enter:jl,exit:nu,join:iu,merge:ru,selection:lh,order:su,sort:ou,call:cu,nodes:lu,node:uu,size:hu,empty:fu,each:du,attr:xu,style:Su,property:Au,classed:Fu,text:Iu,html:Uu,raise:Hu,lower:Yu,append:Vu,insert:Xu,remove:ju,clone:Ku,datum:Ju,on:rh,dispatch:ah,[Symbol.iterator]:ch};function Tt(t){return typeof t=="string"?new _t([[document.querySelector(t)]],[document.documentElement]):new _t([[t]],oa)}function uh(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Vn(t,e){if(t=uh(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var Ze;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(Ze||(Ze={}));var $e;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})($e||($e={}));function Qe(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hh(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Sr(t){let e,n,i;t.length!==2?(e=Qe,n=(a,c)=>Qe(t(a),c),i=(a,c)=>t(a)-c):(e=t===Qe||t===hh?t:fh,n=t,i=t);function r(a,c,l=0,h=a.length){if(l<h){if(e(c,c)!==0)return h;do{const u=l+h>>>1;n(a[u],c)<0?l=u+1:h=u}while(l<h)}return l}function s(a,c,l=0,h=a.length){if(l<h){if(e(c,c)!==0)return h;do{const u=l+h>>>1;n(a[u],c)<=0?l=u+1:h=u}while(l<h)}return l}function o(a,c,l=0,h=a.length){const u=r(a,c,l,h-1);return u>l&&i(a[u-1],c)>-i(a[u],c)?u-1:u}return{left:r,center:o,right:s}}function fh(){return 0}function aa(t){return t===null?NaN:+t}const ca=Sr(Qe),pn=ca.right,dh=ca.left;Sr(aa).center;function ph(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class ds extends Map{constructor(e,n=_h){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(ps(this,e))}has(e){return super.has(ps(this,e))}set(e,n){return super.set(gh(this,e),n)}delete(e){return super.delete(mh(this,e))}}function ps({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function gh({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function mh({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function _h(t){return t!==null&&typeof t=="object"?t.valueOf():t}const vh=Math.sqrt(50),yh=Math.sqrt(10),xh=Math.sqrt(2);function Gn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),s=i/Math.pow(10,r),o=s>=vh?10:s>=yh?5:s>=xh?2:1;let a,c,l;return r<0?(l=Math.pow(10,-r)/o,a=Math.round(t*l),c=Math.round(e*l),a/l<t&&++a,c/l>e&&--c,l=-l):(l=Math.pow(10,r)*o,a=Math.round(t/l),c=Math.round(e/l),a*l<t&&++a,c*l>e&&--c),c<a&&.5<=n&&n<2?Gn(t,e,n*2):[a,c,l]}function Zi(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,s,o]=i?Gn(e,t,n):Gn(t,e,n);if(!(s>=r))return[];const a=s-r+1,c=new Array(a);if(i)if(o<0)for(let l=0;l<a;++l)c[l]=(s-l)/-o;else for(let l=0;l<a;++l)c[l]=(s-l)*o;else if(o<0)for(let l=0;l<a;++l)c[l]=(r+l)/-o;else for(let l=0;l<a;++l)c[l]=(r+l)*o;return c}function Qi(t,e,n){return e=+e,t=+t,n=+n,Gn(t,e,n)[2]}function Ki(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?Qi(e,t,n):Qi(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function gs(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function ms(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function bh(t,e,n=aa){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,s=Math.floor(r),o=+n(t[s],s,t),a=+n(t[s+1],s+1,t);return o+(a-o)*(r-s)}}function wh(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let s of t)(s=e(s,++r,t))!=null&&(s=+s)>=s&&(++n,i+=s)}if(n)return i/n}function*kh(t){for(const e of t)yield*e}function Sh(t){return Array.from(kh(t))}function Th(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,s=new Array(r);++i<r;)s[i]=t+i*n;return s}function Ch(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Mh(t,e,n){var i={},r=i.noTrailing,s=r===void 0?!1:r,o=i.noLeading,a=o===void 0?!1:o,c=i.debounceMode,l=c===void 0?void 0:c,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function g(m){var _=m||{},x=_.upcomingOnly,b=x===void 0?!1:x;d(),u=!b}function p(){for(var m=arguments.length,_=new Array(m),x=0;x<m;x++)_[x]=arguments[x];var b=this,T=Date.now()-f;if(u)return;function M(){f=Date.now(),e.apply(b,_)}function y(){h=void 0}!a&&l&&!h&&M(),d(),l===void 0&&T>t?a?(f=Date.now(),s||(h=setTimeout(l?y:M,t))):M():s!==!0&&(h=setTimeout(l?y:M,l===void 0?t-T:t))}return p.cancel=g,p}var It;(function(t){t.Left="left",t.Right="right",t.Auto="auto"})(It||(It={}));const se=t=>typeof t=="number",Tr=t=>typeof t=="function",he=t=>Array.isArray(t),Ah=t=>t instanceof Object,Xn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",_s=t=>Ah(t)&&!he(t)&&!Tr(t)&&!Xn(t),lv=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,fe=(t,e,n=[],i=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!fe(t[r],e[r],n,i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const r=Object.keys(t).filter(o=>!n.includes(o)),s=Object.keys(e).filter(o=>!n.includes(o));if(r.length!==s.length)return!1;if(i.has(t))return!0;i.add(t);for(const o of r)if(!fe(t[o],e[o],n,i))return!1;return!0}return t===e},Ji=t=>t.flat(),qn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):qn(i,e));return n}if(Xn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,s)=>(r[s]=e.has(i[s])?e.get(i[s]):qn(i[s],e),r),n),n}return t},De=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=Xn(t)?t:qn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(_s(t[r])&&_s(e[r])?i[r]=De(t[r],e[r],n):Xn(e)?i[r]=e:i[r]=qn(e[r]))}),i)},jn=(t,e,n)=>Mh(e,t);function Cr(t,e,n){return Tr(e)?e(t,n):e}function tr(t,e,n){return Cr(t,e,n)}function tt(t,e,n){return Cr(t,e,n)}function Le(t){return t.filter(e=>e&&!se(e))}function qt(t,e,n){return Math.min(Math.max(t,e),n)}function $h(t,...e){if(!t)return[void 0,void 0];if(he(e)){let n=0,i=0;return t.forEach((r,s)=>{let o=0,a=0;for(const c of e){const l=tt(r,c,s)||0;l>=0?o+=l:a+=l}o>i&&(i=o),a<n&&(n=a)}),[n,i]}}function Dh(t,e,...n){const i=[];let r=0,s=0;for(const o of n){const a=tt(t,o,e)||0;a>=0?i.push(r+=a):i.push(s+=a)}return i}function Eh(t,e,n,i){const r=t.map((a,c)=>tt(a,e,c)||0),s=n.map((a,c)=>{const l=wh(t,(h,u)=>tt(h,a,u)||0);return l===0&&Array.isArray(i)?i[c]:l<0}),o=n.map(()=>[]);return t.forEach((a,c)=>{let l=r[c],h=r[c];n.forEach((u,f)=>{const d=tt(a,u,c)||0;d>=0?o[f].push([l,l+=d]):o[f].push([h,h+=d])})}),o.forEach((a,c)=>{a.isMostlyNegative=s[c]}),o}function Fh(t,...e){return t?ms(t,(i,r)=>ms(e,s=>tt(i,s,r))):void 0}function Nh(t,...e){return t?gs(t,(i,r)=>gs(e,s=>tt(i,s,r))):void 0}function Ii(t,...e){return[Fh(t,...e),Nh(t,...e)]}function Zn(t,e,n,i=It.Auto){if(t.length<=1)return t[0];const s=t.map((c,l)=>[c,l]).sort(([c,l],[h,u])=>tt(c,n,l)-tt(h,n,u)),o=s.map(([c,l])=>tt(c,n,l)),a=i===It.Right?dh(o,e,0,t.length-1):pn(o,e,1,t.length);return i===It.Right?s[a][0]:i===It.Left?s[a-1][0]:e-o[a-1]>o[a]-e?s[a][0]:s[a-1][0]}function la(t,e,n,i=!1){if(!n)return[];const r=t.filter((s,o)=>{const a=tt(s,n,o);return a>=e[0]&&a<=e[1]});if(i){if(r.length===0){const u=Zn(t,e[0],n,It.Left),f=Zn(t,e[1],n,It.Right);return[u,f].filter(Boolean)}const s=r[0],o=r[r.length-1],a=t.findIndex(u=>u===s),c=t.findIndex(u=>u===o),l=Math.max(0,a-1),h=Math.min(t.length-1,c+1);return t.slice(l,h+1)}return r}var oe=[],Oh=function(){return oe.some(function(t){return t.activeTargets.length>0})},Rh=function(){return oe.some(function(t){return t.skippedTargets.length>0})},vs="ResizeObserver loop completed with undelivered notifications.",Ih=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:vs}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=vs),window.dispatchEvent(t)},en;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(en||(en={}));var ae=function(t){return Object.freeze(t)},Bh=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,ae(this)}return t})(),ua=(function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,ae(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,s=e.right,o=e.bottom,a=e.left,c=e.width,l=e.height;return{x:n,y:i,top:r,right:s,bottom:o,left:a,width:c,height:l}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),Mr=function(t){return t instanceof SVGElement&&"getBBox"in t},ha=function(t){if(Mr(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,s=r.offsetWidth,o=r.offsetHeight;return!(s||o||t.getClientRects().length)},ys=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Ph=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ke=typeof window<"u"?window:{},bn=new WeakMap,xs=/auto|scroll/,Lh=/^tb|vertical/,Uh=/msie|trident/i.test(Ke.navigator&&Ke.navigator.userAgent),$t=function(t){return parseFloat(t||"0")},ke=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Bh((n?e:t)||0,(n?t:e)||0)},bs=ae({devicePixelContentBoxSize:ke(),borderBoxSize:ke(),contentBoxSize:ke(),contentRect:new ua(0,0,0,0)}),fa=function(t,e){if(e===void 0&&(e=!1),bn.has(t)&&!e)return bn.get(t);if(ha(t))return bn.set(t,bs),bs;var n=getComputedStyle(t),i=Mr(t)&&t.ownerSVGElement&&t.getBBox(),r=!Uh&&n.boxSizing==="border-box",s=Lh.test(n.writingMode||""),o=!i&&xs.test(n.overflowY||""),a=!i&&xs.test(n.overflowX||""),c=i?0:$t(n.paddingTop),l=i?0:$t(n.paddingRight),h=i?0:$t(n.paddingBottom),u=i?0:$t(n.paddingLeft),f=i?0:$t(n.borderTopWidth),d=i?0:$t(n.borderRightWidth),g=i?0:$t(n.borderBottomWidth),p=i?0:$t(n.borderLeftWidth),m=u+l,_=c+h,x=p+d,b=f+g,T=a?t.offsetHeight-b-t.clientHeight:0,M=o?t.offsetWidth-x-t.clientWidth:0,y=r?m+x:0,C=r?_+b:0,I=i?i.width:$t(n.width)-y-M,O=i?i.height:$t(n.height)-C-T,w=I+m+M+x,D=O+_+T+b,v=ae({devicePixelContentBoxSize:ke(Math.round(I*devicePixelRatio),Math.round(O*devicePixelRatio),s),borderBoxSize:ke(w,D,s),contentBoxSize:ke(I,O,s),contentRect:new ua(u,c,I,O)});return bn.set(t,v),v},da=function(t,e,n){var i=fa(t,n),r=i.borderBoxSize,s=i.contentBoxSize,o=i.devicePixelContentBoxSize;switch(e){case en.DEVICE_PIXEL_CONTENT_BOX:return o;case en.BORDER_BOX:return r;default:return s}},zh=(function(){function t(e){var n=fa(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=ae([n.borderBoxSize]),this.contentBoxSize=ae([n.contentBoxSize]),this.devicePixelContentBoxSize=ae([n.devicePixelContentBoxSize])}return t})(),pa=function(t){if(ha(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Hh=function(){var t=1/0,e=[];oe.forEach(function(o){if(o.activeTargets.length!==0){var a=[];o.activeTargets.forEach(function(l){var h=new zh(l.target),u=pa(l.target);a.push(h),l.lastReportedSize=da(l.target,l.observedBox),u<t&&(t=u)}),e.push(function(){o.callback.call(o.observer,a,o.observer)}),o.activeTargets.splice(0,o.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},ws=function(t){oe.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(pa(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},Wh=function(){var t=0;for(ws(t);Oh();)t=Hh(),ws(t);return Rh()&&Ih(),t>0},Bi,ga=[],Yh=function(){return ga.splice(0).forEach(function(t){return t()})},Vh=function(t){if(!Bi){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return Yh()}).observe(n,i),Bi=function(){n.textContent="".concat(e?e--:e++)}}ga.push(t),Bi()},Gh=function(t){Vh(function(){requestAnimationFrame(t)})},$n=0,Xh=function(){return!!$n},qh=250,jh={attributes:!0,characterData:!0,childList:!0,subtree:!0},ks=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ss=function(t){return t===void 0&&(t=0),Date.now()+t},Pi=!1,Zh=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=qh),!Pi){Pi=!0;var i=Ss(e);Gh(function(){var r=!1;try{r=Wh()}finally{if(Pi=!1,e=i-Ss(),!Xh())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,jh)};document.body?n():Ke.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ks.forEach(function(n){return Ke.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ks.forEach(function(n){return Ke.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),er=new Zh,Ts=function(t){!$n&&t>0&&er.start(),$n+=t,!$n&&er.stop()},Qh=function(t){return!Mr(t)&&!Ph(t)&&getComputedStyle(t).display==="inline"},Kh=(function(){function t(e,n){this.target=e,this.observedBox=n||en.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=da(this.target,this.observedBox,!0);return Qh(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),Jh=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),wn=new WeakMap,Cs=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},kn=(function(){function t(){}return t.connect=function(e,n){var i=new Jh(e,n);wn.set(e,i)},t.observe=function(e,n,i){var r=wn.get(e),s=r.observationTargets.length===0;Cs(r.observationTargets,n)<0&&(s&&oe.push(r),r.observationTargets.push(new Kh(n,i&&i.box)),Ts(1),er.schedule())},t.unobserve=function(e,n){var i=wn.get(e),r=Cs(i.observationTargets,n),s=i.observationTargets.length===1;r>=0&&(s&&oe.splice(oe.indexOf(i),1),i.observationTargets.splice(r,1),Ts(-1))},t.disconnect=function(e){var n=this,i=wn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t})(),tf=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");kn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ys(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");kn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ys(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");kn.unobserve(this,e)},t.prototype.disconnect=function(){kn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const ef=globalThis.ResizeObserver||tf,ma={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:$e.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class nn{constructor(e){this._defaultConfig=ma,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=Tt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",nn.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=De(this._defaultConfig,e),e?.svgDefs!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;Tt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||nn.DEFAULT_CONTAINER_HEIGHT}get width(){return qt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return qt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===$e.Fit||e.sizing===$e.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new ef((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),s={width:r.width,height:r.height};!fe(this._containerSize,s)&&s.width&&s.height&&(this._containerSize=s,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}nn.DEFAULT_CONTAINER_HEIGHT=300;function nf(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function rf(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var sf=(function(){function t(n){var i=this;this._insertTag=function(r){var s;i.tags.length===0?i.insertionPoint?s=i.insertionPoint.nextSibling:i.prepend?s=i.container.firstChild:s=i.before:s=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,s),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rf(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=nf(r);try{s.insertRule(i,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),ot="-ms-",Qn="-moz-",V="-webkit-",_a="comm",Ar="rule",$r="decl",of="@import",va="@keyframes",af="@layer",cf=Math.abs,yi=String.fromCharCode,lf=Object.assign;function uf(t,e){return st(t,0)^45?(((e<<2^st(t,0))<<2^st(t,1))<<2^st(t,2))<<2^st(t,3):0}function ya(t){return t.trim()}function hf(t,e){return(t=e.exec(t))?t[0]:t}function G(t,e,n){return t.replace(e,n)}function nr(t,e){return t.indexOf(e)}function st(t,e){return t.charCodeAt(e)|0}function rn(t,e,n){return t.slice(e,n)}function Dt(t){return t.length}function Dr(t){return t.length}function Sn(t,e){return e.push(t),t}function ff(t,e){return t.map(e).join("")}var xi=1,Ee=1,xa=0,dt=0,et=0,Ie="";function bi(t,e,n,i,r,s,o){return{value:t,root:e,parent:n,type:i,props:r,children:s,line:xi,column:Ee,length:o,return:""}}function Ue(t,e){return lf(bi("",null,null,"",null,null,0),t,{length:-t.length},e)}function df(){return et}function pf(){return et=dt>0?st(Ie,--dt):0,Ee--,et===10&&(Ee=1,xi--),et}function mt(){return et=dt<xa?st(Ie,dt++):0,Ee++,et===10&&(Ee=1,xi++),et}function Et(){return st(Ie,dt)}function Dn(){return dt}function gn(t,e){return rn(Ie,t,e)}function sn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ba(t){return xi=Ee=1,xa=Dt(Ie=t),dt=0,[]}function wa(t){return Ie="",t}function En(t){return ya(gn(dt-1,ir(t===91?t+2:t===40?t+1:t)))}function gf(t){for(;(et=Et())&&et<33;)mt();return sn(t)>2||sn(et)>3?"":" "}function mf(t,e){for(;--e&&mt()&&!(et<48||et>102||et>57&&et<65||et>70&&et<97););return gn(t,Dn()+(e<6&&Et()==32&&mt()==32))}function ir(t){for(;mt();)switch(et){case t:return dt;case 34:case 39:t!==34&&t!==39&&ir(et);break;case 40:t===41&&ir(t);break;case 92:mt();break}return dt}function _f(t,e){for(;mt()&&t+et!==57;)if(t+et===84&&Et()===47)break;return"/*"+gn(e,dt-1)+"*"+yi(t===47?t:mt())}function vf(t){for(;!sn(Et());)mt();return gn(t,dt)}function yf(t){return wa(Fn("",null,null,null,[""],t=ba(t),0,[0],t))}function Fn(t,e,n,i,r,s,o,a,c){for(var l=0,h=0,u=o,f=0,d=0,g=0,p=1,m=1,_=1,x=0,b="",T=r,M=s,y=i,C=b;m;)switch(g=x,x=mt()){case 40:if(g!=108&&st(C,u-1)==58){nr(C+=G(En(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:C+=En(x);break;case 9:case 10:case 13:case 32:C+=gf(g);break;case 92:C+=mf(Dn()-1,7);continue;case 47:switch(Et()){case 42:case 47:Sn(xf(_f(mt(),Dn()),e,n),c);break;default:C+="/"}break;case 123*p:a[l++]=Dt(C)*_;case 125*p:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+h:_==-1&&(C=G(C,/\f/g,"")),d>0&&Dt(C)-u&&Sn(d>32?As(C+";",i,n,u-1):As(G(C," ","")+";",i,n,u-2),c);break;case 59:C+=";";default:if(Sn(y=Ms(C,e,n,l,h,r,a,b,T=[],M=[],u),s),x===123)if(h===0)Fn(C,e,y,y,T,s,u,a,M);else switch(f===99&&st(C,3)===110?100:f){case 100:case 108:case 109:case 115:Fn(t,y,y,i&&Sn(Ms(t,y,y,0,0,r,a,b,r,T=[],u),M),r,M,u,a,i?T:M);break;default:Fn(C,y,y,y,[""],M,0,a,M)}}l=h=d=0,p=_=1,b=C="",u=o;break;case 58:u=1+Dt(C),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&pf()==125)continue}switch(C+=yi(x),x*p){case 38:_=h>0?1:(C+="\f",-1);break;case 44:a[l++]=(Dt(C)-1)*_,_=1;break;case 64:Et()===45&&(C+=En(mt())),f=Et(),h=u=Dt(b=C+=vf(Dn())),x++;break;case 45:g===45&&Dt(C)==2&&(p=0)}}return s}function Ms(t,e,n,i,r,s,o,a,c,l,h){for(var u=r-1,f=r===0?s:[""],d=Dr(f),g=0,p=0,m=0;g<i;++g)for(var _=0,x=rn(t,u+1,u=cf(p=o[g])),b=t;_<d;++_)(b=ya(p>0?f[_]+" "+x:G(x,/&\f/g,f[_])))&&(c[m++]=b);return bi(t,e,n,r===0?Ar:a,c,l,h)}function xf(t,e,n){return bi(t,e,n,_a,yi(df()),rn(t,2,-2),0)}function As(t,e,n,i){return bi(t,e,n,$r,rn(t,0,i),rn(t,i+1,-1),i)}function Se(t,e){for(var n="",i=Dr(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function bf(t,e,n,i){switch(t.type){case af:if(t.children.length)break;case of:case $r:return t.return=t.return||t.value;case _a:return"";case va:return t.return=t.value+"{"+Se(t.children,i)+"}";case Ar:t.value=t.props.join(",")}return Dt(n=Se(t.children,i))?t.return=t.value+"{"+n+"}":""}function wf(t){var e=Dr(t);return function(n,i,r,s){for(var o="",a=0;a<e;a++)o+=t[a](n,i,r,s)||"";return o}}function kf(t){return function(e){e.root||(e=e.return)&&t(e)}}function Sf(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Tf=function(e,n,i){for(var r=0,s=0;r=s,s=Et(),r===38&&s===12&&(n[i]=1),!sn(s);)mt();return gn(e,dt)},Cf=function(e,n){var i=-1,r=44;do switch(sn(r)){case 0:r===38&&Et()===12&&(n[i]=1),e[i]+=Tf(dt-1,n,i);break;case 2:e[i]+=En(r);break;case 4:if(r===44){e[++i]=Et()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=yi(r)}while(r=mt());return e},Mf=function(e,n){return wa(Cf(ba(e),n))},$s=new WeakMap,Af=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!$s.get(i))&&!r){$s.set(e,!0);for(var s=[],o=Mf(n,s),a=i.props,c=0,l=0;c<o.length;c++)for(var h=0;h<a.length;h++,l++)e.props[l]=s[c]?o[c].replace(/&\f/g,a[h]):a[h]+" "+o[c]}}},$f=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ka(t,e){switch(uf(t,e)){case 5103:return V+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return V+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return V+t+Qn+t+ot+t+t;case 6828:case 4268:return V+t+ot+t+t;case 6165:return V+t+ot+"flex-"+t+t;case 5187:return V+t+G(t,/(\w+).+(:[^]+)/,V+"box-$1$2"+ot+"flex-$1$2")+t;case 5443:return V+t+ot+"flex-item-"+G(t,/flex-|-self/,"")+t;case 4675:return V+t+ot+"flex-line-pack"+G(t,/align-content|flex-|-self/,"")+t;case 5548:return V+t+ot+G(t,"shrink","negative")+t;case 5292:return V+t+ot+G(t,"basis","preferred-size")+t;case 6060:return V+"box-"+G(t,"-grow","")+V+t+ot+G(t,"grow","positive")+t;case 4554:return V+G(t,/([^-])(transform)/g,"$1"+V+"$2")+t;case 6187:return G(G(G(t,/(zoom-|grab)/,V+"$1"),/(image-set)/,V+"$1"),t,"")+t;case 5495:case 3959:return G(t,/(image-set\([^]*)/,V+"$1$`$1");case 4968:return G(G(t,/(.+:)(flex-)?(.*)/,V+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+V+t+t;case 4095:case 3583:case 4068:case 2532:return G(t,/(.+)-inline(.+)/,V+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Dt(t)-1-e>6)switch(st(t,e+1)){case 109:if(st(t,e+4)!==45)break;case 102:return G(t,/(.+:)(.+)-([^]+)/,"$1"+V+"$2-$3$1"+Qn+(st(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~nr(t,"stretch")?ka(G(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(st(t,e+1)!==115)break;case 6444:switch(st(t,Dt(t)-3-(~nr(t,"!important")&&10))){case 107:return G(t,":",":"+V)+t;case 101:return G(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+V+(st(t,14)===45?"inline-":"")+"box$3$1"+V+"$2$3$1"+ot+"$2box$3")+t}break;case 5936:switch(st(t,e+11)){case 114:return V+t+ot+G(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return V+t+ot+G(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return V+t+ot+G(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return V+t+ot+t+t}return t}var Df=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case $r:e.return=ka(e.value,e.length);break;case va:return Se([Ue(e,{value:G(e.value,"@","@"+V)})],r);case Ar:if(e.length)return ff(e.props,function(s){switch(hf(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Se([Ue(e,{props:[G(s,/:(read-\w+)/,":"+Qn+"$1")]})],r);case"::placeholder":return Se([Ue(e,{props:[G(s,/:(plac\w+)/,":"+V+"input-$1")]}),Ue(e,{props:[G(s,/:(plac\w+)/,":"+Qn+"$1")]}),Ue(e,{props:[G(s,/:(plac\w+)/,ot+"input-$1")]})],r)}return""})}},Ef=[Df],Ff=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var m=p.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Ef,s={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var m=p.getAttribute("data-emotion").split(" "),_=1;_<m.length;_++)s[m[_]]=!0;a.push(p)});var c,l=[Af,$f];{var h,u=[bf,kf(function(p){h.insert(p)})],f=wf(l.concat(r,u)),d=function(m){return Se(yf(m),f)};c=function(m,_,x,b){h=x,d(m?m+"{"+_.styles+"}":_.styles),b&&(g.inserted[_.name]=!0)}}var g={key:n,sheet:new sf({key:n,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:c};return g.sheet.hydrate(a),g};function Nf(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Of={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Rf=/[A-Z]|^ms/g,If=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sa=function(e){return e.charCodeAt(1)===45},Ds=function(e){return e!=null&&typeof e!="boolean"},Li=Sf(function(t){return Sa(t)?t:t.replace(Rf,"-$&").toLowerCase()}),Es=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(If,function(i,r,s){return jt={name:r,styles:s,next:jt},r})}return Of[e]!==1&&!Sa(e)&&typeof n=="number"&&n!==0?n+"px":n};function Kn(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return jt={name:r.name,styles:r.styles,next:jt},r.name;var s=n;if(s.styles!==void 0){var o=s.next;if(o!==void 0)for(;o!==void 0;)jt={name:o.name,styles:o.styles,next:jt},o=o.next;var a=s.styles+";";return a}return Bf(t,e,n)}}var c=n;if(e==null)return c;var l=e[c];return l!==void 0?l:c}function Bf(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=Kn(t,e,n[r])+";";else for(var s in n){var o=n[s];if(typeof o!="object"){var a=o;e!=null&&e[a]!==void 0?i+=s+"{"+e[a]+"}":Ds(a)&&(i+=Li(s)+":"+Es(s,a)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(e==null||e[o[0]]===void 0))for(var c=0;c<o.length;c++)Ds(o[c])&&(i+=Li(s)+":"+Es(s,o[c])+";");else{var l=Kn(t,e,o);switch(s){case"animation":case"animationName":{i+=Li(s)+":"+l+";";break}default:i+=s+"{"+l+"}"}}}return i}var Fs=/label:\s*([^\s;{]+)\s*(;|$)/g,jt;function Ui(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";jt=void 0;var s=t[0];if(s==null||s.raw===void 0)i=!1,r+=Kn(n,e,s);else{var o=s;r+=o[0]}for(var a=1;a<t.length;a++)if(r+=Kn(n,e,t[a]),i){var c=s;r+=c[a]}Fs.lastIndex=0;for(var l="",h;(h=Fs.exec(r))!==null;)l+="-"+h[1];var u=Nf(r)+l;return{name:u,styles:r,next:jt}}function Ta(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var Pf=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Lf=function(e,n,i){Pf(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var s=n;do e.insert(n===s?"."+r:"",s,e.sheet,!0),s=s.next;while(s!==void 0)}};function Ns(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Os(t,e,n){var i=[],r=Ta(t,i,n);return i.length<2?n:r+e(i)}var Uf=function(e){var n=Ff(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var c=arguments.length,l=new Array(c),h=0;h<c;h++)l[h]=arguments[h];var u=Ui(l,n.registered,void 0);return Lf(n,u),n.key+"-"+u.name},r=function(){for(var c=arguments.length,l=new Array(c),h=0;h<c;h++)l[h]=arguments[h];var u=Ui(l,n.registered),f="animation-"+u.name;return Ns(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},s=function(){for(var c=arguments.length,l=new Array(c),h=0;h<c;h++)l[h]=arguments[h];var u=Ui(l,n.registered);Ns(n,u)},o=function(){for(var c=arguments.length,l=new Array(c),h=0;h<c;h++)l[h]=arguments[h];return Os(n.registered,i,zf(l))};return{css:i,cx:o,injectGlobal:s,keyframes:r,hydrate:function(c){c.forEach(function(l){n.inserted[l]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Ta.bind(null,n.registered),merge:Os.bind(null,n.registered,i)}},zf=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var s=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))s=t(r);else{s="";for(var o in r)r[o]&&o&&(s&&(s+=" "),s+=o)}break}default:s=r}s&&(n&&(n+=" "),n+=s)}}return n},Ca=Uf({key:"css"}),mn=Ca.injectGlobal,Q=Ca.css;function Ma(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}const Rs=new WeakMap;function Hf(t,e){const n=t.substr(4,t.length-5);let i=Rs.get(e);if(i||(i=new Map,Rs.set(e,i)),i.has(n))return i.get(n);const r=getComputedStyle(e).getPropertyValue(n);return i.set(n,r),r}function Wf(t,e,n=0){const[i,r,s,o]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,c,l,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||c<o||s<a||l<i)}function Er(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Aa(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function _n(){}var on=.7,Jn=1/on,Te="\\s*([+-]?\\d+)\\s*",an="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yf=/^#([0-9a-f]{3,8})$/,Vf=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Gf=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),Xf=new RegExp(`^rgba\\(${Te},${Te},${Te},${an}\\)$`),qf=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${an}\\)$`),jf=new RegExp(`^hsl\\(${an},${Ft},${Ft}\\)$`),Zf=new RegExp(`^hsla\\(${an},${Ft},${Ft},${an}\\)$`),Is={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};Er(_n,de,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Bs,formatHex:Bs,formatHex8:Qf,formatHsl:Kf,formatRgb:Ps,toString:Ps});function Bs(){return this.rgb().formatHex()}function Qf(){return this.rgb().formatHex8()}function Kf(){return $a(this).formatHsl()}function Ps(){return this.rgb().formatRgb()}function de(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ls(e):n===3?new ht(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Tn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Tn(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=Vf.exec(t))?new ht(e[1],e[2],e[3],1):(e=Gf.exec(t))?new ht(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Xf.exec(t))?Tn(e[1],e[2],e[3],e[4]):(e=qf.exec(t))?Tn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=jf.exec(t))?Hs(e[1],e[2]/100,e[3]/100,1):(e=Zf.exec(t))?Hs(e[1],e[2]/100,e[3]/100,e[4]):Is.hasOwnProperty(t)?Ls(Is[t]):t==="transparent"?new ht(NaN,NaN,NaN,0):null}function Ls(t){return new ht(t>>16&255,t>>8&255,t&255,1)}function Tn(t,e,n,i){return i<=0&&(t=e=n=NaN),new ht(t,e,n,i)}function Jf(t){return t instanceof _n||(t=de(t)),t?(t=t.rgb(),new ht(t.r,t.g,t.b,t.opacity)):new ht}function rr(t,e,n,i){return arguments.length===1?Jf(t):new ht(t,e,n,i??1)}function ht(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Er(ht,rr,Aa(_n,{brighter(t){return t=t==null?Jn:Math.pow(Jn,t),new ht(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?on:Math.pow(on,t),new ht(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ht(ce(this.r),ce(this.g),ce(this.b),ti(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:Us,formatHex:Us,formatHex8:td,formatRgb:zs,toString:zs}));function Us(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function td(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie((isNaN(this.opacity)?1:this.opacity)*255)}`}function zs(){const t=ti(this.opacity);return`${t===1?"rgb(":"rgba("}${ce(this.r)}, ${ce(this.g)}, ${ce(this.b)}${t===1?")":`, ${t})`}`}function ti(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ce(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return t=ce(t),(t<16?"0":"")+t.toString(16)}function Hs(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wt(t,e,n,i)}function $a(t){if(t instanceof wt)return new wt(t.h,t.s,t.l,t.opacity);if(t instanceof _n||(t=de(t)),!t)return new wt;if(t instanceof wt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,c=(s+r)/2;return a?(e===s?o=(n-i)/a+(n<i)*6:n===s?o=(i-e)/a+2:o=(e-n)/a+4,a/=c<.5?s+r:2-s-r,o*=60):a=c>0&&c<1?0:o,new wt(o,a,c,t.opacity)}function Fr(t,e,n,i){return arguments.length===1?$a(t):new wt(t,e,n,i??1)}function wt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Er(wt,Fr,Aa(_n,{brighter(t){return t=t==null?Jn:Math.pow(Jn,t),new wt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?on:Math.pow(on,t),new wt(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,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ht(zi(t>=240?t-240:t+120,r,i),zi(t,r,i),zi(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new wt(Ws(this.h),Cn(this.s),Cn(this.l),ti(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=ti(this.opacity);return`${t===1?"hsl(":"hsla("}${Ws(this.h)}, ${Cn(this.s)*100}%, ${Cn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ws(t){return t=(t||0)%360,t<0?t+360:t}function Cn(t){return Math.max(0,Math.min(1,t||0))}function zi(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 Ve=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],ed=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Yt=t=>`--vis-${se(t)?`color${t%Ve.length}`:t}`;function nd(t,e=.4){const n=Fr(t);return n.l=n.l*(1+e),n.formatHex()}function id(t,e=.4,n=.6){const i=Fr(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const ei=10,sr=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],or=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Vt(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const rd=t=>`<mask id="${Vt(t)}">
|
|
8
|
+
<pattern id="${t.id}" viewBox="0 0 10 10" width="${ei}" height="${ei}" patternUnits="userSpaceOnUse">
|
|
9
|
+
<rect width="100%" height="100%" fill="#fff"/>
|
|
10
|
+
${t.svg}
|
|
11
|
+
</pattern>
|
|
12
|
+
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${t.id})"/>
|
|
13
|
+
</mask>`,sd=(t,e)=>`<marker id="${Vt(t)}"
|
|
14
|
+
fill="var(${Yt(e)})"
|
|
15
|
+
markerUnits="userSpaceOnUse"
|
|
16
|
+
refX="5"
|
|
17
|
+
refY="5"
|
|
18
|
+
markerWidth="${ei}"
|
|
19
|
+
markerHeight="${ei}">
|
|
20
|
+
${t.marker}
|
|
21
|
+
</marker>`;function od(){const t=sr.map(rd).concat(or.map(sd)).join(""),e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.style.position="fixed",e.style.zIndex="-99999999",e.innerHTML=`<defs>${t}</defs>`,document.body.appendChild(e)}typeof window<"u"&&od();const Da=globalThis?.UNOVIS_FONT_W2H_RATIO_DEFAULT||.5,Ea=globalThis?.UNOVIS_TEXT_SEPARATOR_DEFAULT||[" ","-",".",","],Fa=globalThis?.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT||"-",Je=globalThis?.UNOVIS_TEXT_DEFAULT||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};mn`
|
|
22
|
+
:root {
|
|
23
|
+
label: vis-root-styles;
|
|
24
|
+
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
25
|
+
--vis-font-wh-ratio: ${Da};
|
|
26
|
+
--vis-color-main: var(${Yt(0)});
|
|
27
|
+
--vis-color-main-light: ${nd(Ve[0])};
|
|
28
|
+
--vis-color-main-dark: ${id(Ve[0])};
|
|
29
|
+
--vis-color-grey: #2a2a2a;
|
|
30
|
+
${Ve.map((t,e)=>`${Yt(e)}: ${t};`)}
|
|
31
|
+
${ed.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
|
|
32
|
+
${sr.map((t,e)=>`
|
|
33
|
+
--${Vt(t)}: url(#${Vt(t)});
|
|
34
|
+
--vis-pattern-fill${e}: var(--${Vt(t)});
|
|
35
|
+
`)}
|
|
36
|
+
${or.map((t,e)=>{var n;return`
|
|
37
|
+
--${Vt(t)}: url(#${Vt(t)});
|
|
38
|
+
--vis-pattern-marker${e}: var(--${Vt(t)});
|
|
39
|
+
--vis-pattern-dasharray${e}: ${(n=t.dashArray)===null||n===void 0?void 0:n.join(" ")};
|
|
40
|
+
`})}
|
|
41
|
+
|
|
42
|
+
body.theme-dark {
|
|
43
|
+
${Ve.map((t,e)=>`${Yt(e)}: var(--vis-dark-color${e});`)}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body.theme-patterns {
|
|
47
|
+
${sr.map((t,e)=>`path[style*="fill: var(${Yt(e)})"] {
|
|
48
|
+
mask: var(--vis-pattern-fill${e});
|
|
49
|
+
}`)}
|
|
50
|
+
${or.map((t,e)=>`
|
|
51
|
+
path[stroke="var(${Yt(e)})"]:not([style*="fill"]),
|
|
52
|
+
path[style*="stroke: var(${Yt(e)})"]:not([style*="fill"]) {
|
|
53
|
+
marker: var(--vis-pattern-marker${e});
|
|
54
|
+
stroke-dasharray: var(--vis-pattern-dasharray${e});
|
|
55
|
+
}
|
|
56
|
+
`)}
|
|
57
|
+
}
|
|
58
|
+
`;function Nr(t=window?.document.body){return t?+Hf("var(--vis-font-wh-ratio)",t):Da}var ad={value:()=>{}};function Na(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Nn(n)}function Nn(t){this._=t}function cd(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Nn.prototype=Na.prototype={constructor:Nn,on:function(t,e){var n=this._,i=cd(t+"",n),r,s=-1,o=i.length;if(arguments.length<2){for(;++s<o;)if((r=(t=i[s]).type)&&(r=ld(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<o;)if(r=(t=i[s]).type)n[r]=Ys(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Ys(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Nn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function ld(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Ys(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=ad,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Fe=0,Ge=0,ze=0,Oa=1e3,ni,Xe,ii=0,pe=0,wi=0,cn=typeof performance=="object"&&performance.now?performance:Date,Ra=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Or(){return pe||(Ra(ud),pe=cn.now()+wi)}function ud(){pe=0}function ri(){this._call=this._time=this._next=null}ri.prototype=Ia.prototype={constructor:ri,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Or():+n)+(e==null?0:+e),!this._next&&Xe!==this&&(Xe?Xe._next=this:ni=this,Xe=this),this._call=t,this._time=n,ar()},stop:function(){this._call&&(this._call=null,this._time=1/0,ar())}};function Ia(t,e,n){var i=new ri;return i.restart(t,e,n),i}function hd(){Or(),++Fe;for(var t=ni,e;t;)(e=pe-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Fe}function Vs(){pe=(ii=cn.now())+wi,Fe=Ge=0;try{hd()}finally{Fe=0,dd(),pe=0}}function fd(){var t=cn.now(),e=t-ii;e>Oa&&(wi-=e,ii=t)}function dd(){for(var t,e=ni,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ni=n);Xe=t,ar(i)}function ar(t){if(!Fe){Ge&&(Ge=clearTimeout(Ge));var e=t-pe;e>24?(t<1/0&&(Ge=setTimeout(Vs,t-cn.now()-wi)),ze&&(ze=clearInterval(ze))):(ze||(ii=cn.now(),ze=setInterval(fd,Oa)),Fe=1,Ra(Vs))}}function Gs(t,e,n){var i=new ri;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var pd=Na("start","end","cancel","interrupt"),gd=[],Ba=0,Xs=1,cr=2,On=3,qs=4,lr=5,Rn=6;function ki(t,e,n,i,r,s){var o=t.__transition;if(!o)t.__transition={};else if(n in o)return;md(t,n,{name:e,index:i,group:r,on:pd,tween:gd,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ba})}function Rr(t,e){var n=Mt(t,e);if(n.state>Ba)throw new Error("too late; already scheduled");return n}function Nt(t,e){var n=Mt(t,e);if(n.state>On)throw new Error("too late; already running");return n}function Mt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function md(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Ia(s,0,n.time);function s(l){n.state=Xs,n.timer.restart(o,n.delay,n.time),n.delay<=l&&o(l-n.delay)}function o(l){var h,u,f,d;if(n.state!==Xs)return c();for(h in i)if(d=i[h],d.name===n.name){if(d.state===On)return Gs(o);d.state===qs?(d.state=Rn,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=Rn,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(Gs(function(){n.state===On&&(n.state=qs,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=cr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===cr){for(n.state=On,r=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=lr,1),u=-1,f=r.length;++u<f;)r[u].call(t,h);n.state===lr&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Rn,n.timer.stop(),delete i[e];for(var l in i)return;delete t.__transition}}function Ir(t,e){var n=t.__transition,i,r,s=!0,o;if(n){e=e==null?null:e+"";for(o in n){if((i=n[o]).name!==e){s=!1;continue}r=i.state>cr&&i.state<lr,i.state=Rn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[o]}s&&delete t.__transition}}function _d(t){return this.each(function(){Ir(this,t)})}const Br=t=>()=>t;function vd(t,e){return function(n){return t+n*e}}function yd(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function xd(t){return(t=+t)==1?Pa:function(e,n){return n-e?yd(e,n,t):Br(isNaN(e)?n:e)}}function Pa(t,e){var n=e-t;return n?vd(t,n):Br(isNaN(t)?e:t)}const si=(function t(e){var n=xd(e);function i(r,s){var o=n((r=rr(r)).r,(s=rr(s)).r),a=n(r.g,s.g),c=n(r.b,s.b),l=Pa(r.opacity,s.opacity);return function(h){return r.r=o(h),r.g=a(h),r.b=c(h),r.opacity=l(h),r+""}}return i.gamma=t,i})(1);function bd(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(s){for(r=0;r<n;++r)i[r]=t[r]*(1-s)+e[r]*s;return i}}function wd(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function kd(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),s=new Array(n),o;for(o=0;o<i;++o)r[o]=Be(t[o],e[o]);for(;o<n;++o)s[o]=e[o];return function(a){for(o=0;o<i;++o)s[o]=r[o](a);return s}}function Sd(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function xt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Td(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=Be(t[r],e[r]):i[r]=e[r];return function(s){for(r in n)i[r]=n[r](s);return i}}var ur=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hi=new RegExp(ur.source,"g");function Cd(t){return function(){return t}}function Md(t){return function(e){return t(e)+""}}function La(t,e){var n=ur.lastIndex=Hi.lastIndex=0,i,r,s,o=-1,a=[],c=[];for(t=t+"",e=e+"";(i=ur.exec(t))&&(r=Hi.exec(e));)(s=r.index)>n&&(s=e.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(i=i[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:xt(i,r)})),n=Hi.lastIndex;return n<e.length&&(s=e.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?c[0]?Md(c[0].x):Cd(e):(e=c.length,function(l){for(var h=0,u;h<e;++h)a[(u=c[h]).i]=u.x(l);return a.join("")})}function Be(t,e){var n=typeof e,i;return e==null||n==="boolean"?Br(e):(n==="number"?xt:n==="string"?(i=de(e))?(e=i,si):La:e instanceof de?si:e instanceof Date?Sd:wd(e)?bd:Array.isArray(e)?kd:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Td:xt)(t,e)}function Pr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var js=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ua(t,e,n,i,r,s){var o,a,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*i)&&(n-=t*c,i-=e*c),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,c/=a),t*i<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:r,translateY:s,rotate:Math.atan2(e,t)*js,skewX:Math.atan(c)*js,scaleX:o,scaleY:a}}var Mn;function Ad(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?hr:Ua(e.a,e.b,e.c,e.d,e.e,e.f)}function $d(t){return t==null||(Mn||(Mn=document.createElementNS("http://www.w3.org/2000/svg","g")),Mn.setAttribute("transform",t),!(t=Mn.transform.baseVal.consolidate()))?hr:(t=t.matrix,Ua(t.a,t.b,t.c,t.d,t.e,t.f))}function za(t,e,n,i){function r(l){return l.length?l.pop()+" ":""}function s(l,h,u,f,d,g){if(l!==u||h!==f){var p=d.push("translate(",null,e,null,n);g.push({i:p-4,x:xt(l,u)},{i:p-2,x:xt(h,f)})}else(u||f)&&d.push("translate("+u+e+f+n)}function o(l,h,u,f){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),f.push({i:u.push(r(u)+"rotate(",null,i)-2,x:xt(l,h)})):h&&u.push(r(u)+"rotate("+h+i)}function a(l,h,u,f){l!==h?f.push({i:u.push(r(u)+"skewX(",null,i)-2,x:xt(l,h)}):h&&u.push(r(u)+"skewX("+h+i)}function c(l,h,u,f,d,g){if(l!==u||h!==f){var p=d.push(r(d)+"scale(",null,",",null,")");g.push({i:p-4,x:xt(l,u)},{i:p-2,x:xt(h,f)})}else(u!==1||f!==1)&&d.push(r(d)+"scale("+u+","+f+")")}return function(l,h){var u=[],f=[];return l=t(l),h=t(h),s(l.translateX,l.translateY,h.translateX,h.translateY,u,f),o(l.rotate,h.rotate,u,f),a(l.skewX,h.skewX,u,f),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,f),l=h=null,function(d){for(var g=-1,p=f.length,m;++g<p;)u[(m=f[g]).i]=m.x(d);return u.join("")}}}var Dd=za(Ad,"px, ","px)","deg)"),Ed=za($d,", ",")",")");function Fd(t,e){e===void 0&&(e=t,t=Be);for(var n=0,i=e.length-1,r=e[0],s=new Array(i<0?0:i);n<i;)s[n]=t(r,r=e[++n]);return function(o){var a=Math.max(0,Math.min(i-1,Math.floor(o*=i)));return s[a](o-a)}}function Nd(t,e){var n,i;return function(){var r=Nt(this,t),s=r.tween;if(s!==n){i=n=s;for(var o=0,a=i.length;o<a;++o)if(i[o].name===e){i=i.slice(),i.splice(o,1);break}}r.tween=i}}function Od(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var s=Nt(this,t),o=s.tween;if(o!==i){r=(i=o).slice();for(var a={name:e,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===e){r[c]=a;break}c===l&&r.push(a)}s.tween=r}}function Rd(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=Mt(this.node(),n).tween,r=0,s=i.length,o;r<s;++r)if((o=i[r]).name===t)return o.value;return null}return this.each((e==null?Nd:Od)(n,t,e))}function Lr(t,e,n){var i=t._id;return t.each(function(){var r=Nt(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return Mt(r,i).value[e]}}function Ha(t,e){var n;return(typeof e=="number"?xt:e instanceof de?si:(n=de(e))?(e=n,si):La)(t,e)}function Id(t){return function(){this.removeAttribute(t)}}function Bd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Pd(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttribute(t);return o===r?null:o===i?s:s=e(i=o,n)}}function Ld(t,e,n){var i,r=n+"",s;return function(){var o=this.getAttributeNS(t.space,t.local);return o===r?null:o===i?s:s=e(i=o,n)}}function Ud(t,e,n){var i,r,s;return function(){var o,a=n(this),c;return a==null?void this.removeAttribute(t):(o=this.getAttribute(t),c=a+"",o===c?null:o===i&&c===r?s:(r=c,s=e(i=o,a)))}}function zd(t,e,n){var i,r,s;return function(){var o,a=n(this),c;return a==null?void this.removeAttributeNS(t.space,t.local):(o=this.getAttributeNS(t.space,t.local),c=a+"",o===c?null:o===i&&c===r?s:(r=c,s=e(i=o,a)))}}function Hd(t,e){var n=vi(t),i=n==="transform"?Ed:Ha;return this.attrTween(t,typeof e=="function"?(n.local?zd:Ud)(n,i,Lr(this,"attr."+t,e)):e==null?(n.local?Bd:Id)(n):(n.local?Ld:Pd)(n,i,e))}function Wd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Yd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Vd(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Yd(t,s)),n}return r._value=e,r}function Gd(t,e){var n,i;function r(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&Wd(t,s)),n}return r._value=e,r}function Xd(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 i=vi(t);return this.tween(n,(i.local?Vd:Gd)(i,e))}function qd(t,e){return function(){Rr(this,t).delay=+e.apply(this,arguments)}}function jd(t,e){return e=+e,function(){Rr(this,t).delay=e}}function Zd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?qd:jd)(e,t)):Mt(this.node(),e).delay}function Qd(t,e){return function(){Nt(this,t).duration=+e.apply(this,arguments)}}function Kd(t,e){return e=+e,function(){Nt(this,t).duration=e}}function Jd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Qd:Kd)(e,t)):Mt(this.node(),e).duration}function t0(t,e){if(typeof e!="function")throw new Error;return function(){Nt(this,t).ease=e}}function e0(t){var e=this._id;return arguments.length?this.each(t0(e,t)):Mt(this.node(),e).ease}function n0(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Nt(this,t).ease=n}}function i0(t){if(typeof t!="function")throw new Error;return this.each(n0(this._id,t))}function r0(t){typeof t!="function"&&(t=Qo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var s=e[r],o=s.length,a=i[r]=[],c,l=0;l<o;++l)(c=s[l])&&t.call(c,c.__data__,l,s)&&a.push(c);return new Lt(i,this._parents,this._name,this._id)}function s0(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,s=Math.min(i,r),o=new Array(i),a=0;a<s;++a)for(var c=e[a],l=n[a],h=c.length,u=o[a]=new Array(h),f,d=0;d<h;++d)(f=c[d]||l[d])&&(u[d]=f);for(;a<i;++a)o[a]=e[a];return new Lt(o,this._parents,this._name,this._id)}function o0(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 a0(t,e,n){var i,r,s=o0(e)?Rr:Nt;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}function c0(t,e){var n=this._id;return arguments.length<2?Mt(this.node(),n).on.on(t):this.each(a0(n,t,e))}function l0(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function u0(){return this.on("end.remove",l0(this._id))}function h0(t){var e=this._name,n=this._id;typeof t!="function"&&(t=wr(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;o<r;++o)for(var a=i[o],c=a.length,l=s[o]=new Array(c),h,u,f=0;f<c;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),l[f]=u,ki(l[f],e,n,f,l,Mt(h,n)));return new Lt(s,this._parents,e,n)}function f0(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Zo(t));for(var i=this._groups,r=i.length,s=[],o=[],a=0;a<r;++a)for(var c=i[a],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var f=t.call(h,h.__data__,u,c),d,g=Mt(h,n),p=0,m=f.length;p<m;++p)(d=f[p])&&ki(d,e,n,p,f,g);s.push(f),o.push(h)}return new Lt(s,o,e,n)}var d0=dn.prototype.constructor;function p0(){return new d0(this._groups,this._parents)}function g0(t,e){var n,i,r;return function(){var s=Ae(this,t),o=(this.style.removeProperty(t),Ae(this,t));return s===o?null:s===n&&o===i?r:r=e(n=s,i=o)}}function Wa(t){return function(){this.style.removeProperty(t)}}function m0(t,e,n){var i,r=n+"",s;return function(){var o=Ae(this,t);return o===r?null:o===i?s:s=e(i=o,n)}}function _0(t,e,n){var i,r,s;return function(){var o=Ae(this,t),a=n(this),c=a+"";return a==null&&(c=a=(this.style.removeProperty(t),Ae(this,t))),o===c?null:o===i&&c===r?s:(r=c,s=e(i=o,a))}}function v0(t,e){var n,i,r,s="style."+e,o="end."+s,a;return function(){var c=Nt(this,t),l=c.on,h=c.value[s]==null?a||(a=Wa(e)):void 0;(l!==n||r!==h)&&(i=(n=l).copy()).on(o,r=h),c.on=i}}function y0(t,e,n){var i=(t+="")=="transform"?Dd:Ha;return e==null?this.styleTween(t,g0(t,i)).on("end.style."+t,Wa(t)):typeof e=="function"?this.styleTween(t,_0(t,i,Lr(this,"style."+t,e))).each(v0(this._id,t)):this.styleTween(t,m0(t,i,e),n).on("end.style."+t,null)}function x0(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function b0(t,e,n){var i,r;function s(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&x0(t,o,n)),i}return s._value=e,s}function w0(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,b0(t,e,n??""))}function k0(t){return function(){this.textContent=t}}function S0(t){return function(){var e=t(this);this.textContent=e??""}}function T0(t){return this.tween("text",typeof t=="function"?S0(Lr(this,"text",t)):k0(t==null?"":t+""))}function C0(t){return function(e){this.textContent=t.call(this,e)}}function M0(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&C0(r)),e}return i._value=t,i}function A0(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,M0(t))}function $0(){for(var t=this._name,e=this._id,n=Ya(),i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,c,l=0;l<a;++l)if(c=o[l]){var h=Mt(c,e);ki(c,t,n,l,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Lt(i,this._parents,t,n)}function D0(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(s,o){var a={value:o},c={value:function(){--r===0&&s()}};n.each(function(){var l=Nt(this,i),h=l.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(c)),l.on=e}),r===0&&s()})}var E0=0;function Lt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ya(){return++E0}var Ot=dn.prototype;Lt.prototype={constructor:Lt,select:h0,selectAll:f0,selectChild:Ot.selectChild,selectChildren:Ot.selectChildren,filter:r0,merge:s0,selection:p0,transition:$0,call:Ot.call,nodes:Ot.nodes,node:Ot.node,size:Ot.size,empty:Ot.empty,each:Ot.each,on:c0,attr:Hd,attrTween:Xd,style:y0,styleTween:w0,text:T0,textTween:A0,remove:u0,tween:Rd,delay:Zd,duration:Jd,ease:e0,easeVarying:i0,end:D0,[Symbol.iterator]:Ot[Symbol.iterator]};const Zs=t=>+t;function F0(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var N0={time:null,delay:0,duration:250,ease:F0};function O0(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 R0(t){var e,n;t instanceof Lt?(e=t._id,t=t._name):(e=Ya(),(n=N0).time=Or(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,s=0;s<r;++s)for(var o=i[s],a=o.length,c,l=0;l<a;++l)(c=o[l])&&ki(c,t,e,l,o,n||O0(c,e));return new Lt(i,this._parents,t,e)}dn.prototype.interrupt=_d;dn.prototype.transition=R0;function St(t,e,n){if(t.nodes().forEach(i=>Ir(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}class Ur{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var U;(function(t){t.X="x",t.Y="y"})(U||(U={}));function At(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Va(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Qs=Symbol("implicit");function zr(){var t=new ds,e=[],n=[],i=Qs;function r(s){let o=t.get(s);if(o===void 0){if(i!==Qs)return i;t.set(s,o=e.push(s)-1)}return n[o%n.length]}return r.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new ds;for(const o of s)t.has(o)||t.set(o,e.push(o)-1);return r},r.range=function(s){return arguments.length?(n=Array.from(s),r):n.slice()},r.unknown=function(s){return arguments.length?(i=s,r):i},r.copy=function(){return zr(e,n).unknown(i)},At.apply(r,arguments),r}function Hr(){var t=zr().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,s,o,a=!1,c=0,l=0,h=.5;delete t.unknown;function u(){var f=e().length,d=r<i,g=d?r:i,p=d?i:r;s=(p-g)/Math.max(1,f-c+l*2),a&&(s=Math.floor(s)),g+=(p-g-s*(f-c))*h,o=s*(1-c),a&&(g=Math.round(g),o=Math.round(o));var m=Th(f).map(function(_){return g+s*_});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,r]=f,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(f){return[i,r]=f,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return o},t.step=function(){return s},t.round=function(f){return arguments.length?(a=!!f,u()):a},t.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),u()):c},t.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),u()):c},t.paddingOuter=function(f){return arguments.length?(l=+f,u()):l},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return Hr(e(),[i,r]).round(a).paddingInner(c).paddingOuter(l).align(h)},At.apply(u(),arguments)}function Ga(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ga(e())},t}function I0(){return Ga(Hr.apply(null,arguments).paddingInner(1))}function B0(t){return function(){return t}}function fr(t){return+t}var Ks=[0,1];function ft(t){return t}function dr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:B0(isNaN(e)?NaN:.5)}function P0(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function L0(t,e,n){var i=t[0],r=t[1],s=e[0],o=e[1];return r<i?(i=dr(r,i),s=n(o,s)):(i=dr(i,r),s=n(s,o)),function(a){return s(i(a))}}function U0(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),s=new Array(i),o=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<i;)r[o]=dr(t[o],t[o+1]),s[o]=n(e[o],e[o+1]);return function(a){var c=pn(t,a,1,i)-1;return s[c](r[c](a))}}function vn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Si(){var t=Ks,e=Ks,n=Be,i,r,s,o=ft,a,c,l;function h(){var f=Math.min(t.length,e.length);return o!==ft&&(o=P0(t[0],t[f-1])),a=f>2?U0:L0,c=l=null,u}function u(f){return f==null||isNaN(f=+f)?s:(c||(c=a(t.map(i),e,n)))(i(o(f)))}return u.invert=function(f){return o(r((l||(l=a(e,t.map(i),xt)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,fr),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=Pr,h()},u.clamp=function(f){return arguments.length?(o=f?!0:ft,h()):o!==ft},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(s=f,u):s},function(f,d){return i=f,r=d,h()}}function Xa(){return Si()(ft,ft)}function z0(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function oi(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Ne(t){return t=oi(Math.abs(t)),t?t[1]:NaN}function H0(t,e){return function(n,i){for(var r=n.length,s=[],o=0,a=t[0],c=0;r>0&&a>0&&(c+a+1>i&&(a=Math.max(1,i-c)),s.push(n.substring(r-=a,r+a)),!((c+=a+1)>i));)a=t[o=(o+1)%t.length];return s.reverse().join(e)}}function W0(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Y0=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ln(t){if(!(e=Y0.exec(t)))throw new Error("invalid format: "+t);var e;return new Wr({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]})}ln.prototype=Wr.prototype;function Wr(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+""}Wr.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 V0(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var ai;function G0(t,e){var n=oi(t,e);if(!n)return ai=void 0,t.toPrecision(e);var i=n[0],r=n[1],s=r-(ai=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+oi(t,Math.max(0,e+s-1))[0]}function Js(t,e){var n=oi(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const to={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:z0,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)=>Js(t*100,e),r:Js,s:G0,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function eo(t){return t}var no=Array.prototype.map,io=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function X0(t){var e=t.grouping===void 0||t.thousands===void 0?eo:H0(no.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?eo:W0(no.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(u,f){u=ln(u);var d=u.fill,g=u.align,p=u.sign,m=u.symbol,_=u.zero,x=u.width,b=u.comma,T=u.precision,M=u.trim,y=u.type;y==="n"?(b=!0,y="g"):to[y]||(T===void 0&&(T=12),M=!0,y="g"),(_||d==="0"&&g==="=")&&(_=!0,d="0",g="=");var C=(f&&f.prefix!==void 0?f.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),I=(m==="$"?i:/[%p]/.test(y)?o:"")+(f&&f.suffix!==void 0?f.suffix:""),O=to[y],w=/[defgprs%]/.test(y);T=T===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function D(v){var k=C,E=I,B,Y,Wt;if(y==="c")E=O(v)+E,v="";else{v=+v;var ye=v<0||1/v<0;if(v=isNaN(v)?c:O(Math.abs(v),T),M&&(v=V0(v)),ye&&+v==0&&p!=="+"&&(ye=!1),k=(ye?p==="("?p:a:p==="-"||p==="("?"":p)+k,E=(y==="s"&&!isNaN(v)&&ai!==void 0?io[8+ai/3]:"")+E+(ye&&p==="("?")":""),w){for(B=-1,Y=v.length;++B<Y;)if(Wt=v.charCodeAt(B),48>Wt||Wt>57){E=(Wt===46?r+v.slice(B+1):v.slice(B))+E,v=v.slice(0,B);break}}}b&&!_&&(v=e(v,1/0));var xe=k.length+v.length+E.length,yt=xe<x?new Array(x-xe+1).join(d):"";switch(b&&_&&(v=e(yt+v,yt.length?x-E.length:1/0),yt=""),g){case"<":v=k+v+E+yt;break;case"=":v=k+yt+v+E;break;case"^":v=yt.slice(0,xe=yt.length>>1)+k+v+E+yt.slice(xe);break;default:v=yt+k+v+E;break}return s(v)}return D.toString=function(){return u+""},D}function h(u,f){var d=Math.max(-8,Math.min(8,Math.floor(Ne(f)/3)))*3,g=Math.pow(10,-d),p=l((u=ln(u),u.type="f",u),{suffix:io[8+d/3]});return function(m){return p(g*m)}}return{format:l,formatPrefix:h}}var An,Yr,qa;q0({thousands:",",grouping:[3],currency:["$",""]});function q0(t){return An=X0(t),Yr=An.format,qa=An.formatPrefix,An}function j0(t){return Math.max(0,-Ne(Math.abs(t)))}function Z0(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ne(e)/3)))*3-Ne(Math.abs(t)))}function Q0(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ne(e)-Ne(t))+1}function K0(t,e,n,i){var r=Ki(t,e,n),s;switch(i=ln(i??",f"),i.type){case"s":{var o=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=Z0(r,o))&&(i.precision=s),qa(i,o)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=Q0(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=j0(r))&&(i.precision=s-(i.type==="%")*2);break}}return Yr(i)}function me(t){var e=t.domain;return t.ticks=function(n){var i=e();return Zi(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return K0(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,s=i.length-1,o=i[r],a=i[s],c,l,h=10;for(a<o&&(l=o,o=a,a=l,l=r,r=s,s=l);h-- >0;){if(l=Qi(o,a,n),l===c)return i[r]=o,i[s]=a,e(i);if(l>0)o=Math.floor(o/l)*l,a=Math.ceil(a/l)*l;else if(l<0)o=Math.ceil(o*l)/l,a=Math.floor(a*l)/l;else break;c=l}return t},t}function ja(){var t=Xa();return t.copy=function(){return vn(t,ja())},At.apply(t,arguments),me(t)}function Za(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,fr),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Za(t).unknown(e)},t=arguments.length?Array.from(t,fr):[0,1],me(n)}function Qa(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],s=t[i],o;return s<r&&(o=n,n=i,i=o,o=r,r=s,s=o),t[n]=e.floor(r),t[i]=e.ceil(s),t}function ro(t){return Math.log(t)}function so(t){return Math.exp(t)}function J0(t){return-Math.log(-t)}function tp(t){return-Math.exp(-t)}function ep(t){return isFinite(t)?+("1e"+t):t<0?0:t}function np(t){return t===10?ep:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ip(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function oo(t){return(e,n)=>-t(-e,n)}function rp(t){const e=t(ro,so),n=e.domain;let i=10,r,s;function o(){return r=ip(i),s=np(i),n()[0]<0?(r=oo(r),s=oo(s),t(J0,tp)):t(ro,so),e}return e.base=function(a){return arguments.length?(i=+a,o()):i},e.domain=function(a){return arguments.length?(n(a),o()):n()},e.ticks=a=>{const c=n();let l=c[0],h=c[c.length-1];const u=h<l;u&&([l,h]=[h,l]);let f=r(l),d=r(h),g,p;const m=a==null?10:+a;let _=[];if(!(i%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),l>0){for(;f<=d;++f)for(g=1;g<i;++g)if(p=f<0?g/s(-f):g*s(f),!(p<l)){if(p>h)break;_.push(p)}}else for(;f<=d;++f)for(g=i-1;g>=1;--g)if(p=f>0?g/s(-f):g*s(f),!(p<l)){if(p>h)break;_.push(p)}_.length*2<m&&(_=Zi(l,h,m))}else _=Zi(f,d,Math.min(d-f,m)).map(s);return u?_.reverse():_},e.tickFormat=(a,c)=>{if(a==null&&(a=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=ln(c)).precision==null&&(c.trim=!0),c=Yr(c)),a===1/0)return c;const l=Math.max(1,i*a/e.ticks().length);return h=>{let u=h/s(Math.round(r(h)));return u*i<i-.5&&(u*=i),u<=l?c(h):""}},e.nice=()=>n(Qa(n(),{floor:a=>s(Math.floor(r(a))),ceil:a=>s(Math.ceil(r(a)))})),e}function Ka(){const t=rp(Si()).domain([1,10]);return t.copy=()=>vn(t,Ka()).base(t.base()),At.apply(t,arguments),t}function ao(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function co(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function sp(t){var e=1,n=t(ao(e),co(e));return n.constant=function(i){return arguments.length?t(ao(e=+i),co(e)):e},me(n)}function Ja(){var t=sp(Si());return t.copy=function(){return vn(t,Ja()).constant(t.constant())},At.apply(t,arguments)}function lo(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function op(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ap(t){return t<0?-t*t:t*t}function cp(t){var e=t(ft,ft),n=1;function i(){return n===1?t(ft,ft):n===.5?t(op,ap):t(lo(n),lo(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},me(e)}function Vr(){var t=cp(Si());return t.copy=function(){return vn(t,Vr()).exponent(t.exponent())},At.apply(t,arguments),t}function lp(){return Vr.apply(null,arguments).exponent(.5)}function tc(){var t=[],e=[],n=[],i;function r(){var o=0,a=Math.max(1,e.length);for(n=new Array(a-1);++o<a;)n[o-1]=bh(t,o/a);return s}function s(o){return o==null||isNaN(o=+o)?i:e[pn(n,o)]}return s.invertExtent=function(o){var a=e.indexOf(o);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},s.domain=function(o){if(!arguments.length)return t.slice();t=[];for(let a of o)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Qe),r()},s.range=function(o){return arguments.length?(e=Array.from(o),r()):e.slice()},s.unknown=function(o){return arguments.length?(i=o,s):i},s.quantiles=function(){return n.slice()},s.copy=function(){return tc().domain(t).range(e).unknown(i)},At.apply(s,arguments)}function ec(){var t=0,e=1,n=1,i=[.5],r=[0,1],s;function o(c){return c!=null&&c<=c?r[pn(i,c,0,n)]:s}function a(){var c=-1;for(i=new Array(n);++c<n;)i[c]=((c+1)*e-(c-n)*t)/(n+1);return o}return o.domain=function(c){return arguments.length?([t,e]=c,t=+t,e=+e,a()):[t,e]},o.range=function(c){return arguments.length?(n=(r=Array.from(c)).length-1,a()):r.slice()},o.invertExtent=function(c){var l=r.indexOf(c);return l<0?[NaN,NaN]:l<1?[t,i[0]]:l>=n?[i[n-1],e]:[i[l-1],i[l]]},o.unknown=function(c){return arguments.length&&(s=c),o},o.thresholds=function(){return i.slice()},o.copy=function(){return ec().domain([t,e]).range(r).unknown(s)},At.apply(me(o),arguments)}function nc(){var t=[.5],e=[0,1],n,i=1;function r(s){return s!=null&&s<=s?e[pn(t,s,0,i)]:n}return r.domain=function(s){return arguments.length?(t=Array.from(s),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(s){return arguments.length?(e=Array.from(s),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(s){var o=e.indexOf(s);return[t[o-1],t[o]]},r.unknown=function(s){return arguments.length?(n=s,r):n},r.copy=function(){return nc().domain(t).range(e).unknown(n)},At.apply(r,arguments)}const Wi=new Date,Yi=new Date;function nt(t,e,n,i){function r(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return r.floor=s=>(t(s=new Date(+s)),s),r.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),r.round=s=>{const o=r(s),a=r.ceil(s);return s-o<a-s?o:a},r.offset=(s,o)=>(e(s=new Date(+s),o==null?1:Math.floor(o)),s),r.range=(s,o,a)=>{const c=[];if(s=r.ceil(s),a=a==null?1:Math.floor(a),!(s<o)||!(a>0))return c;let l;do c.push(l=new Date(+s)),e(s,a),t(s);while(l<s&&s<o);return c},r.filter=s=>nt(o=>{if(o>=o)for(;t(o),!s(o);)o.setTime(o-1)},(o,a)=>{if(o>=o)if(a<0)for(;++a<=0;)for(;e(o,-1),!s(o););else for(;--a>=0;)for(;e(o,1),!s(o););}),n&&(r.count=(s,o)=>(Wi.setTime(+s),Yi.setTime(+o),t(Wi),t(Yi),Math.floor(n(Wi,Yi))),r.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?r.filter(i?o=>i(o)%s===0:o=>r.count(0,o)%s===0):r)),r}const ci=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ci.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ci);ci.range;const Bt=1e3,vt=Bt*60,Pt=vt*60,Ut=Pt*24,Gr=Ut*7,uo=Ut*30,Vi=Ut*365,re=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Bt)},(t,e)=>(e-t)/Bt,t=>t.getUTCSeconds());re.range;const Xr=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Bt)},(t,e)=>{t.setTime(+t+e*vt)},(t,e)=>(e-t)/vt,t=>t.getMinutes());Xr.range;const qr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*vt)},(t,e)=>(e-t)/vt,t=>t.getUTCMinutes());qr.range;const jr=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Bt-t.getMinutes()*vt)},(t,e)=>{t.setTime(+t+e*Pt)},(t,e)=>(e-t)/Pt,t=>t.getHours());jr.range;const Zr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Pt)},(t,e)=>(e-t)/Pt,t=>t.getUTCHours());Zr.range;const yn=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*vt)/Ut,t=>t.getDate()-1);yn.range;const Ti=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ut,t=>t.getUTCDate()-1);Ti.range;const ic=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Ut,t=>Math.floor(t/Ut));ic.range;function _e(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*vt)/Gr)}const Ci=_e(0),li=_e(1),up=_e(2),hp=_e(3),Oe=_e(4),fp=_e(5),dp=_e(6);Ci.range;li.range;up.range;hp.range;Oe.range;fp.range;dp.range;function ve(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Gr)}const Mi=ve(0),ui=ve(1),pp=ve(2),gp=ve(3),Re=ve(4),mp=ve(5),_p=ve(6);Mi.range;ui.range;pp.range;gp.range;Re.range;mp.range;_p.range;const Qr=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Qr.range;const Kr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Kr.range;const zt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});zt.range;const Ht=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ht.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Ht.range;function rc(t,e,n,i,r,s){const o=[[re,1,Bt],[re,5,5*Bt],[re,15,15*Bt],[re,30,30*Bt],[s,1,vt],[s,5,5*vt],[s,15,15*vt],[s,30,30*vt],[r,1,Pt],[r,3,3*Pt],[r,6,6*Pt],[r,12,12*Pt],[i,1,Ut],[i,2,2*Ut],[n,1,Gr],[e,1,uo],[e,3,3*uo],[t,1,Vi]];function a(l,h,u){const f=h<l;f&&([l,h]=[h,l]);const d=u&&typeof u.range=="function"?u:c(l,h,u),g=d?d.range(l,+h+1):[];return f?g.reverse():g}function c(l,h,u){const f=Math.abs(h-l)/u,d=Sr(([,,m])=>m).right(o,f);if(d===o.length)return t.every(Ki(l/Vi,h/Vi,u));if(d===0)return ci.every(Math.max(Ki(l,h,u),1));const[g,p]=o[f/o[d-1][2]<o[d][2]/f?d-1:d];return g.every(p)}return[a,c]}const[vp,yp]=rc(Ht,Kr,Mi,ic,Zr,qr),[xp,bp]=rc(zt,Qr,Ci,yn,jr,Xr);function Gi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Xi(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function He(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function wp(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,l=We(r),h=Ye(r),u=We(s),f=Ye(s),d=We(o),g=Ye(o),p=We(a),m=Ye(a),_=We(c),x=Ye(c),b={a:Wt,A:ye,b:xe,B:yt,c:null,d:_o,e:_o,f:Vp,g:eg,G:ig,H:Hp,I:Wp,j:Yp,L:sc,m:Gp,M:Xp,p:Jc,q:tl,Q:xo,s:bo,S:qp,u:jp,U:Zp,V:Qp,w:Kp,W:Jp,x:null,X:null,y:tg,Y:ng,Z:rg,"%":yo},T={a:el,A:nl,b:il,B:rl,c:null,d:vo,e:vo,f:cg,g:vg,G:xg,H:sg,I:og,j:ag,L:ac,m:lg,M:ug,p:sl,q:ol,Q:xo,s:bo,S:hg,u:fg,U:dg,V:pg,w:gg,W:mg,x:null,X:null,y:_g,Y:yg,Z:bg,"%":yo},M={a:w,A:D,b:v,B:k,c:E,d:go,e:go,f:Pp,g:po,G:fo,H:mo,I:mo,j:Op,L:Bp,m:Np,M:Rp,p:O,q:Fp,Q:Up,s:zp,S:Ip,u:Mp,U:Ap,V:$p,w:Cp,W:Dp,x:B,X:Y,y:po,Y:fo,Z:Ep,"%":Lp};b.x=y(n,b),b.X=y(i,b),b.c=y(e,b),T.x=y(n,T),T.X=y(i,T),T.c=y(e,T);function y($,L){return function(H){var S=[],lt=-1,X=0,pt=$.length,gt,te,us;for(H instanceof Date||(H=new Date(+H));++lt<pt;)$.charCodeAt(lt)===37&&(S.push($.slice(X,lt)),(te=ho[gt=$.charAt(++lt)])!=null?gt=$.charAt(++lt):te=gt==="e"?" ":"0",(us=L[gt])&&(gt=us(H,te)),S.push(gt),X=lt+1);return S.push($.slice(X,lt)),S.join("")}}function C($,L){return function(H){var S=He(1900,void 0,1),lt=I(S,$,H+="",0),X,pt;if(lt!=H.length)return null;if("Q"in S)return new Date(S.Q);if("s"in S)return new Date(S.s*1e3+("L"in S?S.L:0));if(L&&!("Z"in S)&&(S.Z=0),"p"in S&&(S.H=S.H%12+S.p*12),S.m===void 0&&(S.m="q"in S?S.q:0),"V"in S){if(S.V<1||S.V>53)return null;"w"in S||(S.w=1),"Z"in S?(X=Xi(He(S.y,0,1)),pt=X.getUTCDay(),X=pt>4||pt===0?ui.ceil(X):ui(X),X=Ti.offset(X,(S.V-1)*7),S.y=X.getUTCFullYear(),S.m=X.getUTCMonth(),S.d=X.getUTCDate()+(S.w+6)%7):(X=Gi(He(S.y,0,1)),pt=X.getDay(),X=pt>4||pt===0?li.ceil(X):li(X),X=yn.offset(X,(S.V-1)*7),S.y=X.getFullYear(),S.m=X.getMonth(),S.d=X.getDate()+(S.w+6)%7)}else("W"in S||"U"in S)&&("w"in S||(S.w="u"in S?S.u%7:"W"in S?1:0),pt="Z"in S?Xi(He(S.y,0,1)).getUTCDay():Gi(He(S.y,0,1)).getDay(),S.m=0,S.d="W"in S?(S.w+6)%7+S.W*7-(pt+5)%7:S.w+S.U*7-(pt+6)%7);return"Z"in S?(S.H+=S.Z/100|0,S.M+=S.Z%100,Xi(S)):Gi(S)}}function I($,L,H,S){for(var lt=0,X=L.length,pt=H.length,gt,te;lt<X;){if(S>=pt)return-1;if(gt=L.charCodeAt(lt++),gt===37){if(gt=L.charAt(lt++),te=M[gt in ho?L.charAt(lt++):gt],!te||(S=te($,H,S))<0)return-1}else if(gt!=H.charCodeAt(S++))return-1}return S}function O($,L,H){var S=l.exec(L.slice(H));return S?($.p=h.get(S[0].toLowerCase()),H+S[0].length):-1}function w($,L,H){var S=d.exec(L.slice(H));return S?($.w=g.get(S[0].toLowerCase()),H+S[0].length):-1}function D($,L,H){var S=u.exec(L.slice(H));return S?($.w=f.get(S[0].toLowerCase()),H+S[0].length):-1}function v($,L,H){var S=_.exec(L.slice(H));return S?($.m=x.get(S[0].toLowerCase()),H+S[0].length):-1}function k($,L,H){var S=p.exec(L.slice(H));return S?($.m=m.get(S[0].toLowerCase()),H+S[0].length):-1}function E($,L,H){return I($,e,L,H)}function B($,L,H){return I($,n,L,H)}function Y($,L,H){return I($,i,L,H)}function Wt($){return o[$.getDay()]}function ye($){return s[$.getDay()]}function xe($){return c[$.getMonth()]}function yt($){return a[$.getMonth()]}function Jc($){return r[+($.getHours()>=12)]}function tl($){return 1+~~($.getMonth()/3)}function el($){return o[$.getUTCDay()]}function nl($){return s[$.getUTCDay()]}function il($){return c[$.getUTCMonth()]}function rl($){return a[$.getUTCMonth()]}function sl($){return r[+($.getUTCHours()>=12)]}function ol($){return 1+~~($.getUTCMonth()/3)}return{format:function($){var L=y($+="",b);return L.toString=function(){return $},L},parse:function($){var L=C($+="",!1);return L.toString=function(){return $},L},utcFormat:function($){var L=y($+="",T);return L.toString=function(){return $},L},utcParse:function($){var L=C($+="",!0);return L.toString=function(){return $},L}}}var ho={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,kp=/^%/,Sp=/[\\^$*+?|[\]().{}]/g;function W(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s<n?new Array(n-s+1).join(e)+r:r)}function Tp(t){return t.replace(Sp,"\\$&")}function We(t){return new RegExp("^(?:"+t.map(Tp).join("|")+")","i")}function Ye(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Cp(t,e,n){var i=rt.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Mp(t,e,n){var i=rt.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Ap(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function $p(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Dp(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function fo(t,e,n){var i=rt.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function po(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ep(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Fp(t,e,n){var i=rt.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function Np(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function go(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Op(t,e,n){var i=rt.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function mo(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Rp(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Ip(t,e,n){var i=rt.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Bp(t,e,n){var i=rt.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Pp(t,e,n){var i=rt.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Lp(t,e,n){var i=kp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Up(t,e,n){var i=rt.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function zp(t,e,n){var i=rt.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _o(t,e){return W(t.getDate(),e,2)}function Hp(t,e){return W(t.getHours(),e,2)}function Wp(t,e){return W(t.getHours()%12||12,e,2)}function Yp(t,e){return W(1+yn.count(zt(t),t),e,3)}function sc(t,e){return W(t.getMilliseconds(),e,3)}function Vp(t,e){return sc(t,e)+"000"}function Gp(t,e){return W(t.getMonth()+1,e,2)}function Xp(t,e){return W(t.getMinutes(),e,2)}function qp(t,e){return W(t.getSeconds(),e,2)}function jp(t){var e=t.getDay();return e===0?7:e}function Zp(t,e){return W(Ci.count(zt(t)-1,t),e,2)}function oc(t){var e=t.getDay();return e>=4||e===0?Oe(t):Oe.ceil(t)}function Qp(t,e){return t=oc(t),W(Oe.count(zt(t),t)+(zt(t).getDay()===4),e,2)}function Kp(t){return t.getDay()}function Jp(t,e){return W(li.count(zt(t)-1,t),e,2)}function tg(t,e){return W(t.getFullYear()%100,e,2)}function eg(t,e){return t=oc(t),W(t.getFullYear()%100,e,2)}function ng(t,e){return W(t.getFullYear()%1e4,e,4)}function ig(t,e){var n=t.getDay();return t=n>=4||n===0?Oe(t):Oe.ceil(t),W(t.getFullYear()%1e4,e,4)}function rg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+W(e/60|0,"0",2)+W(e%60,"0",2)}function vo(t,e){return W(t.getUTCDate(),e,2)}function sg(t,e){return W(t.getUTCHours(),e,2)}function og(t,e){return W(t.getUTCHours()%12||12,e,2)}function ag(t,e){return W(1+Ti.count(Ht(t),t),e,3)}function ac(t,e){return W(t.getUTCMilliseconds(),e,3)}function cg(t,e){return ac(t,e)+"000"}function lg(t,e){return W(t.getUTCMonth()+1,e,2)}function ug(t,e){return W(t.getUTCMinutes(),e,2)}function hg(t,e){return W(t.getUTCSeconds(),e,2)}function fg(t){var e=t.getUTCDay();return e===0?7:e}function dg(t,e){return W(Mi.count(Ht(t)-1,t),e,2)}function cc(t){var e=t.getUTCDay();return e>=4||e===0?Re(t):Re.ceil(t)}function pg(t,e){return t=cc(t),W(Re.count(Ht(t),t)+(Ht(t).getUTCDay()===4),e,2)}function gg(t){return t.getUTCDay()}function mg(t,e){return W(ui.count(Ht(t)-1,t),e,2)}function _g(t,e){return W(t.getUTCFullYear()%100,e,2)}function vg(t,e){return t=cc(t),W(t.getUTCFullYear()%100,e,2)}function yg(t,e){return W(t.getUTCFullYear()%1e4,e,4)}function xg(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Re(t):Re.ceil(t),W(t.getUTCFullYear()%1e4,e,4)}function bg(){return"+0000"}function yo(){return"%"}function xo(t){return+t}function bo(t){return Math.floor(+t/1e3)}var be,lc,uc;wg({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function wg(t){return be=wp(t),lc=be.format,be.parse,uc=be.utcFormat,be.utcParse,be}function kg(t){return new Date(t)}function Sg(t){return t instanceof Date?+t:+new Date(+t)}function Jr(t,e,n,i,r,s,o,a,c,l){var h=Xa(),u=h.invert,f=h.domain,d=l(".%L"),g=l(":%S"),p=l("%I:%M"),m=l("%I %p"),_=l("%a %d"),x=l("%b %d"),b=l("%B"),T=l("%Y");function M(y){return(c(y)<y?d:a(y)<y?g:o(y)<y?p:s(y)<y?m:i(y)<y?r(y)<y?_:x:n(y)<y?b:T)(y)}return h.invert=function(y){return new Date(u(y))},h.domain=function(y){return arguments.length?f(Array.from(y,Sg)):f().map(kg)},h.ticks=function(y){var C=f();return t(C[0],C[C.length-1],y??10)},h.tickFormat=function(y,C){return C==null?M:l(C)},h.nice=function(y){var C=f();return(!y||typeof y.range!="function")&&(y=e(C[0],C[C.length-1],y??10)),y?f(Qa(C,y)):h},h.copy=function(){return vn(h,Jr(t,e,n,i,r,s,o,a,c,l))},h}function Tg(){return At.apply(Jr(xp,bp,zt,Qr,Ci,yn,jr,Xr,re,lc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Cg(){return At.apply(Jr(vp,yp,Ht,Kr,Mi,Ti,Zr,qr,re,uc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mg(){var t=0,e=1,n,i,r,s,o=ft,a=!1,c;function l(u){return u==null||isNaN(u=+u)?c:o(r===0?.5:(u=(s(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}l.domain=function(u){return arguments.length?([t,e]=u,n=s(t=+t),i=s(e=+e),r=n===i?0:1/(i-n),l):[t,e]},l.clamp=function(u){return arguments.length?(a=!!u,l):a},l.interpolator=function(u){return arguments.length?(o=u,l):o};function h(u){return function(f){var d,g;return arguments.length?([d,g]=f,o=u(d,g),l):[o(0),o(1)]}}return l.range=h(Be),l.rangeRound=h(Pr),l.unknown=function(u){return arguments.length?(c=u,l):c},function(u){return s=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),l}}function hc(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function fc(){var t=me(Mg()(ft));return t.copy=function(){return hc(t,fc())},Va.apply(t,arguments)}function Ag(){var t=0,e=.5,n=1,i=1,r,s,o,a,c,l=ft,h,u=!1,f;function d(p){return isNaN(p=+p)?f:(p=.5+((p=+h(p))-s)*(i*p<i*s?a:c),l(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e,n]=p,r=h(t=+t),s=h(e=+e),o=h(n=+n),a=r===s?0:.5/(s-r),c=s===o?0:.5/(o-s),i=s<r?-1:1,d):[t,e,n]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(l=p,d):l};function g(p){return function(m){var _,x,b;return arguments.length?([_,x,b]=m,l=Fd(p,[_,x,b]),d):[l(0),l(.5),l(1)]}}return d.range=g(Be),d.rangeRound=g(Pr),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return h=p,r=p(t),s=p(e),o=p(n),a=r===s?0:.5/(s-r),c=s===o?0:.5/(o-s),i=s<r?-1:1,d}}function dc(){var t=me(Ag()(ft));return t.copy=function(){return hc(t,dc())},Va.apply(t,arguments)}const wo={scaleLinear:ja,scalePow:Vr,scaleSqrt:lp,scaleLog:Ka,scaleSymlog:Ja,scaleIdentity:Za,scaleTime:Tg,scaleUtc:Cg,scaleSequential:fc,scaleDiverging:dc,scaleQuantize:ec,scaleQuantile:tc,scaleThreshold:nc,scaleOrdinal:zr,scaleBand:Hr,scalePoint:I0};var J;(function(t){t.X="x",t.Y="y"})(J||(J={}));var le;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(le||(le={}));const $g=Object.assign(Object.assign({},ma),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:le.North,preventEmptyDomain:null,scaleByDomain:!1,clipPathExtend:2});class Dg extends nn{constructor(e,n,i){var r,s;super(e),this._defaultConfig=$g,this.datamodel=new Ur,this.config=this._defaultConfig,this._clipPathId=Ma(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const o="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",Q`
|
|
59
|
+
--highlight-filter-id: url(${a}#${o}); // defining a css variable
|
|
60
|
+
`),this._svgDefs.append("filter").attr("id",o).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||!((r=this.components)===null||r===void 0)&&r.some(c=>c.datamodel.data))&&this.render(),(s=document.fonts)===null||s===void 0||s.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return qt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return qt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,s,o,a;const{components:c,config:l}=this;if(!e)return;this.datamodel.data=e,c.forEach(u=>{u.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(s=l.yAxis)===null||s===void 0||s.setData(e),!fe(this.datamodel.data,e)&&((o=l.tooltip)===null||o===void 0||o.hide(),(a=l.crosshair)===null||a===void 0||a.hide()),n||this.render()}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=U.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=U.Y,this.element.appendChild(e.yAxis.element));for(const o of this.components)this.element.appendChild(o.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i,this.element.appendChild(r.element));const s=e.annotations;s&&this.element.appendChild(s.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:i}=this;this.components.forEach((r,s)=>{e[s]&&r.setConfig(e[s])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=Le([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]),i=this._getMargin();for(const r of n)r.setSize(this.width,this.height,this.containerWidth,this.containerHeight),r.setContainerMargin(i);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,s,o,a;const{config:c}=this;super._render();const l=this._getMargin();for(const f of this.components)f.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",f.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",f.clippable?`url(#${this._clipPathId})`:null),f.render(e);this._renderAxes(this._firstRender?0:e);const h=c.clipPathExtend;this._clipPath.select("rect").attr("x",-h).attr("y",-h).attr("width",this.width+2*h).attr("height",this.height+2*h),(n=c.tooltip)===null||n===void 0||n.update();const u=c.crosshair;if(u){const f=this.components.filter(m=>!m.stacked).map(m=>m.config.y),d=this.components.filter(m=>m.stacked).map(m=>m.config.y),g=(i=this.components.find(m=>m.config.baseline))===null||i===void 0?void 0:i.config,p=g?.baseline;u.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:Ji(f),yStacked:Ji(d),baseline:p},u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),u.render()}(s=c.annotations)===null||s===void 0||s.g.attr("transform",`translate(${l.left},${l.top})`),(o=c.annotations)===null||o===void 0||o.render(),this._firstRender=!1,(a=c.onRenderComplete)===null||a===void 0||a.call(c,this.svg.node(),l,this._getBleed(this.components),this.containerWidth,this.containerHeight,this.width,this.height)}_updateScales(...e){const n=Le(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(J.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(J.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(J).forEach(r=>{var s,o,a,c,l,h,u,f;const[d,g]=ph(Sh(i.map(M=>M.getDataExtent(r,n.scaleByDomain)))),p=r===J.Y?n.yDomain:n.xDomain,m=r===J.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,_=r===J.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(o=(s=p?.[0])!==null&&s!==void 0?s:d)!==null&&o!==void 0?o:0,b=(c=(a=p?.[1])!==null&&a!==void 0?a:g)!==null&&c!==void 0?c:1,T=[qt(x,(l=m?.[0])!==null&&l!==void 0?l:Number.NEGATIVE_INFINITY,(h=m?.[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY),qt(b,(u=_?.[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(f=_?.[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY)];if(T[0]===T[1]){const M=i.some(y=>{var C;return((C=y.datamodel.data)===null||C===void 0?void 0:C.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!M||r===J.Y))&&(T[1]=T[0]+1)}e.forEach(M=>M.setScaleDomain(r,T))})}_updateScalesRange(...e){var n,i,r,s,o,a;const{config:c}=this;if(!e)return;const l=c.yDirection===le.South,h=[(n=c.padding.left)!==null&&n!==void 0?n:0,this.width-((i=c.padding.right)!==null&&i!==void 0?i:0)],u=[this.height-((r=c.padding.bottom)!==null&&r!==void 0?r:0),(s=c.padding.top)!==null&&s!==void 0?s:0];l&&u.reverse();for(const d of e)d.setSize(this.width,this.height,this.containerWidth,this.containerHeight),d.setScaleRange(J.X,(o=c.xRange)!==null&&o!==void 0?o:h),d.setScaleRange(J.Y,(a=c.yRange)!==null&&a!==void 0?a:u);const f=this._getBleed(e);for(const d of e)d.setScaleRange(J.X,[h[0]+f.left,h[1]-f.right]),d.setScaleRange(J.Y,l?[u[0]+f.top,u[1]-f.bottom]:[u[0]-f.bottom,u[1]+f.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();Le([n,i]).forEach(o=>{const a=o.getOffset(r);o.g.attr("transform",`translate(${a.left},${a.top})`),o.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=Le([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let s=0;s<r;s+=1){const o={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),Le([e,n]).forEach(c=>{c.preRender();const l=c.getRequiredMargin();o.top<l.top&&(o.top=l.top),o.bottom<l.bottom&&(o.bottom=l.bottom),o.left<l.left&&(o.left=l.left),o.right<l.right&&(o.right=l.right)}),this._axisMargin=o}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}_getBleed(e){return e.map(n=>n.bleed).reduce((n,i)=>{for(const r of Object.keys(n)){const s=r;n[s]<i[s]&&(n[s]=i[s])}return n},{top:0,bottom:0,left:0,right:0})}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:s,yAxis:o}}=this;super.destroy();for(const a of e)a?.destroy();n?.destroy(),i?.destroy(),r?.destroy(),s?.destroy(),o?.destroy()}}const pc={duration:600,events:{},attributes:{}};class Eg{constructor(e=Ze.SVG){var n,i;this.type=Ze.SVG,this.datamodel=new Ur,this.sizing=$e.Fit,this.events={},this._defaultConfig=pc,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._containerMargin={top:0,bottom:0,left:0,right:0},this._setUpComponentEventsThrottled=jn(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=jn(this._setCustomAttributes,500),e===Ze.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=Ma(),this.g=Tt(this.element);const r=(i=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||i===void 0?void 0:i.root;r&&this.g.attr("class",r)}setContainerMargin(e){this._containerMargin=e}setConfig(e){this.prevConfig=this.config,this.config=De(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(i=>{Object.keys(e[i]).forEach(r=>{const s=this.g.selectAll(`.${i}`);s.on(r+n,(o,a)=>{const c=s.nodes(),l=c.indexOf(o.currentTarget),h=e[i][r];return h?.(a,o,l,c)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Fg extends Ur{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const Ai=Object.assign(Object.assign({},pc),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class ts extends Eg{constructor(){super(...arguments),this.datamodel=new Fg,this.clippable=!0,this.stacked=!1,this._defaultConfig=Ai,this._xScale=wo.scaleLinear(),this._yScale=wo.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,i;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((i=this.config)===null||i===void 0)&&i.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var i,r;e===J.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===J.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===J.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===J.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===J.X&&(this._xScale=n),n&&e===J.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case J.X:return this.getXDataExtent();case J.Y:return this.getYDataExtent(n);default:return Ii(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return Ii(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=this.xScale.domain(),s=e?la(i.data,r,n.x,!0):i.data,o=he(n.y)?n.y:[n.y];return Ii(s,...o)}}var A;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(A||(A={}));var ko;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(ko||(ko={}));var So;(function(t){t.Inside="inside",t.Outside="outside",t.Center="center"})(So||(So={}));var To;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(To||(To={}));const Ng={components:[],container:void 0,followCursor:!0,allowHover:!1,horizontalPlacement:A.Auto,horizontalShift:0,verticalPlacement:A.Top,verticalShift:0,attributes:{},triggers:{},className:void 0,showDelay:void 0,hideDelay:void 0},$i=Q`
|
|
61
|
+
label: tooltip;
|
|
62
|
+
display: inline-block;
|
|
63
|
+
left: 0;
|
|
64
|
+
bottom: 0;
|
|
65
|
+
min-width: max-content;
|
|
66
|
+
position: absolute;
|
|
67
|
+
opacity: 0;
|
|
68
|
+
transition: opacity;
|
|
69
|
+
transition-duration: var(--vis-tooltip-transition-duration);
|
|
70
|
+
z-index: 999999;
|
|
71
|
+
padding: var(--vis-tooltip-padding);
|
|
72
|
+
color: var(--vis-tooltip-text-color);
|
|
73
|
+
border-radius: var(--vis-tooltip-border-radius);
|
|
74
|
+
box-shadow: var(--vis-tooltip-box-shadow);
|
|
75
|
+
border: solid 1px var(--vis-tooltip-border-color);
|
|
76
|
+
background-color: var(--vis-tooltip-background-color);
|
|
77
|
+
backdrop-filter: var(--vis-tooltip-backdrop-filter);
|
|
78
|
+
`,Og=$i,Rg=mn`
|
|
79
|
+
:root {
|
|
80
|
+
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
|
|
81
|
+
--vis-tooltip-border-color: #e5e9f7;
|
|
82
|
+
--vis-tooltip-text-color: #000;
|
|
83
|
+
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
|
|
84
|
+
--vis-tooltip-backdrop-filter: none;
|
|
85
|
+
--vis-tooltip-padding: 10px 15px;
|
|
86
|
+
--vis-tooltip-border-radius: 5px;
|
|
87
|
+
--vis-tooltip-transition-duration: 300ms;
|
|
88
|
+
--vis-tooltip-box-shadow: none;
|
|
89
|
+
|
|
90
|
+
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
91
|
+
--vis-dark-tooltip-text-color: #e5e9f7;
|
|
92
|
+
--vis-dark-tooltip-border-color: var(--vis-color-grey);
|
|
93
|
+
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
body.theme-dark ${`.${$i}`} {
|
|
97
|
+
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
|
|
98
|
+
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
|
|
99
|
+
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
|
|
100
|
+
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
body.theme-dark {
|
|
104
|
+
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
105
|
+
--vis-tooltip-text-color: #e5e9f7;
|
|
106
|
+
--vis-tooltip-border-color: var(--vis-color-grey);
|
|
107
|
+
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
108
|
+
}
|
|
109
|
+
`,gc=Q`
|
|
110
|
+
bottom: unset;
|
|
111
|
+
position: fixed;
|
|
112
|
+
`,In=Q`
|
|
113
|
+
opacity: 1;
|
|
114
|
+
`,Bn=Q`
|
|
115
|
+
display: none;
|
|
116
|
+
`,mc=Q`
|
|
117
|
+
label: non-interactive;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
user-select: none;
|
|
120
|
+
`,Ig=Object.freeze(Object.defineProperty({__proto__:null,hidden:Bn,nonInteractive:mc,positionFixed:gc,root:$i,show:In,tooltip:Og,variables:Rg},Symbol.toStringTag,{value:"Module"}));class _c{constructor(e={}){this._defaultConfig=Ng,this.config=this._defaultConfig,this._setUpEventsThrottled=jn(this._setUpEvents,500),this._setContainerPositionThrottled=jn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=Tt(this.element).attr("class",$i).classed(In,!1).classed(Bn,!0),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=De(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}_hide(){this.div.classed(In,!1).on("transitionend",()=>{this.div.classed(Bn,!this._isShown)}),this._isShown=!1}hide(){window.clearTimeout(this._showDelayTimeoutId),this.config.hideDelay?(window.clearTimeout(this._hideDelayTimeoutId),this._hideDelayTimeoutId=setTimeout(()=>this._hide(),this.config.hideDelay)):this._hide()}_display(){window.clearTimeout(this._hideDelayTimeoutId),this.div.classed(Bn,!1).classed(In,!0),this._isShown=!0}display(){this._isShown||(this.config.showDelay?(window.clearTimeout(this._showDelayTimeoutId),this._showDelayTimeoutId=setTimeout(()=>{this._display(),this.place({x:this._position[0],y:this._position[1]})},this.config.showDelay)):this._display())}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,s=this._overriddenHorizontalPlacement||(n.horizontalPlacement===A.Auto?A.Center:n.horizontalPlacement),o=n.verticalPlacement===A.Auto?e.y-r<0?A.Bottom:A.Top:n.verticalPlacement,a=5,c=s===A.Left?-i-a-n.horizontalShift:s===A.Center?-i/2:a+n.horizontalShift,l=o===A.Bottom?a+n.verticalShift:o===A.Center?-r/2:-a-n.verticalShift-r,[h,u]=this._constraintPosToContainer(e.x+c,e.y+l,i,r);this._applyPosition(h,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,s=this.element.offsetHeight,o=this.isContainerBody(),a=o?window.innerWidth:this._container.scrollWidth,c=e.getBoundingClientRect(),l=o?[c.x,c.y]:Vn({clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y},this._container),h=this._overriddenHorizontalPlacement||(n.horizontalPlacement===A.Auto?l[0]-r<0?A.Right:l[0]+r>a?A.Left:A.Center:n.horizontalPlacement);let u=0;switch(h){case A.Left:u=-r-i-n.horizontalShift;break;case A.Right:u=c.width+i+n.horizontalShift;break;case A.Center:default:u=(-r+c.width)/2;break}const f=n.verticalPlacement===A.Auto?h!==A.Center?A.Center:l[1]-s<0?A.Bottom:A.Top:n.verticalPlacement;let d=-s;switch(f){case A.Center:d+=(s+c.height)/2;break;case A.Bottom:d+=s+c.height+i+n.verticalShift;break;case A.Top:default:d+=-i-n.verticalShift;break}const[g,p]=this._constraintPosToContainer(l[0]+u,l[1]+d,r,s);this._applyPosition(g,p,s)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:i,prevConfig:r}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e!==null&&this.div.html(e||""),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(mc,!i.allowHover),r?.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),s=r?window.innerHeight:this._container.scrollHeight;this.div.classed(gc,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${s-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const s=this.isContainerBody(),o=s?window.innerHeight:this._container.scrollHeight,a=s?window.innerWidth:this._container.scrollWidth,c=10,l=e>a-i-c,h=e<c,u=l?a-i-c:h?c:e,f=10,d=n>o-r-f,g=n<f,p=d?o-r-f:g?f:n;return[a<i?0:u,o<r?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=Tt(n.element);i.on("mousemove.tooltip",r=>{const{config:s}=this,o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const a of Object.keys(s.triggers)){const c=s.triggers[a];if(!c)continue;const l=i.selectAll(`.${a}`).nodes();for(const h of o){if(h===i.node())break;if(h.classList.contains(a)){const u=l.indexOf(h),f=Tt(h).datum(),d=c(f,u,l),[g,p]=this.isContainerBody()?[r.clientX,r.clientY]:Vn(r,this._container);d===null?this.hide():(this.render(d),s.followCursor?this.place({x:g,y:p}):this.placeByElement(h)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover?this.div.on("mouseenter.tooltip",this._display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),window.clearTimeout(this._hideDelayTimeoutId),window.clearTimeout(this._showDelayTimeoutId),(e=this.div)===null||e===void 0||e.remove()}}_c.selectors=Ig;function it(t){return function(){return t}}const uv=Math.abs,hv=Math.atan2,fv=Math.cos,dv=Math.max,pv=Math.min,gv=Math.sin,mv=Math.sqrt,Co=1e-12,es=Math.PI,Mo=es/2,_v=2*es;function vv(t){return t>1?0:t<-1?es:Math.acos(t)}function yv(t){return t>=1?Mo:t<=-1?-Mo:Math.asin(t)}const pr=Math.PI,gr=2*pr,ee=1e-6,Bg=gr-ee;function vc(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Pg(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return vc;const n=10**e;return function(i){this._+=i[0];for(let r=1,s=i.length;r<s;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class Lg{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?vc:Pg(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,s,o){this._append`C${+e},${+n},${+i},${+r},${this._x1=+s},${this._y1=+o}`}arcTo(e,n,i,r,s){if(e=+e,n=+n,i=+i,r=+r,s=+s,s<0)throw new Error(`negative radius: ${s}`);let o=this._x1,a=this._y1,c=i-e,l=r-n,h=o-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>ee)if(!(Math.abs(u*c-l*h)>ee)||!s)this._append`L${this._x1=e},${this._y1=n}`;else{let d=i-o,g=r-a,p=c*c+l*l,m=d*d+g*g,_=Math.sqrt(p),x=Math.sqrt(f),b=s*Math.tan((pr-Math.acos((p+f-m)/(2*_*x)))/2),T=b/x,M=b/_;Math.abs(T-1)>ee&&this._append`L${e+T*h},${n+T*u}`,this._append`A${s},${s},0,0,${+(u*d>h*g)},${this._x1=e+M*c},${this._y1=n+M*l}`}}arc(e,n,i,r,s,o){if(e=+e,n=+n,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),c=i*Math.sin(r),l=e+a,h=n+c,u=1^o,f=o?r-s:s-r;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>ee||Math.abs(this._y1-h)>ee)&&this._append`L${l},${h}`,i&&(f<0&&(f=f%gr+gr),f>Bg?this._append`A${i},${i},0,1,${u},${e-a},${n-c}A${i},${i},0,1,${u},${this._x1=l},${this._y1=h}`:f>ee&&this._append`A${i},${i},0,${+(f>=pr)},${u},${this._x1=e+i*Math.cos(s)},${this._y1=n+i*Math.sin(s)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function yc(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new Lg(e)}function xc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function bc(t){this._context=t}bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function ns(t){return new bc(t)}function wc(t){return t[0]}function kc(t){return t[1]}function Sc(t,e){var n=it(!0),i=null,r=ns,s=null,o=yc(a);t=typeof t=="function"?t:t===void 0?wc:it(t),e=typeof e=="function"?e:e===void 0?kc:it(e);function a(c){var l,h=(c=xc(c)).length,u,f=!1,d;for(i==null&&(s=r(d=o())),l=0;l<=h;++l)!(l<h&&n(u=c[l],l,c))===f&&((f=!f)?s.lineStart():s.lineEnd()),f&&s.point(+t(u,l,c),+e(u,l,c));if(d)return s=null,d+""||null}return a.x=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),a):t},a.y=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),a):e},a.defined=function(c){return arguments.length?(n=typeof c=="function"?c:it(!!c),a):n},a.curve=function(c){return arguments.length?(r=c,i!=null&&(s=r(i)),a):r},a.context=function(c){return arguments.length?(c==null?i=s=null:s=r(i=c),a):i},a}function Ug(t,e,n){var i=null,r=it(!0),s=null,o=ns,a=null,c=yc(l);t=typeof t=="function"?t:t===void 0?wc:it(+t),e=typeof e=="function"?e:it(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?kc:it(+n);function l(u){var f,d,g,p=(u=xc(u)).length,m,_=!1,x,b=new Array(p),T=new Array(p);for(s==null&&(a=o(x=c())),f=0;f<=p;++f){if(!(f<p&&r(m=u[f],f,u))===_)if(_=!_)d=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=f-1;g>=d;--g)a.point(b[g],T[g]);a.lineEnd(),a.areaEnd()}_&&(b[f]=+t(m,f,u),T[f]=+e(m,f,u),a.point(i?+i(m,f,u):b[f],n?+n(m,f,u):T[f]))}if(x)return a=null,x+""||null}function h(){return Sc().defined(r).curve(o).context(s)}return l.x=function(u){return arguments.length?(t=typeof u=="function"?u:it(+u),i=null,l):t},l.x0=function(u){return arguments.length?(t=typeof u=="function"?u:it(+u),l):t},l.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:it(+u),l):i},l.y=function(u){return arguments.length?(e=typeof u=="function"?u:it(+u),n=null,l):e},l.y0=function(u){return arguments.length?(e=typeof u=="function"?u:it(+u),l):e},l.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:it(+u),l):n},l.lineX0=l.lineY0=function(){return h().x(t).y(e)},l.lineY1=function(){return h().x(t).y(n)},l.lineX1=function(){return h().x(i).y(e)},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:it(!!u),l):r},l.curve=function(u){return arguments.length?(o=u,s!=null&&(a=o(s)),l):o},l.context=function(u){return arguments.length?(u==null?s=a=null:a=o(s=u),l):s},l}function Jt(){}function hi(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Di(t){this._context=t}Di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:hi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:hi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function zg(t){return new Di(t)}function Tc(t){this._context=t}Tc.prototype={areaStart:Jt,areaEnd:Jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:hi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hg(t){return new Tc(t)}function Cc(t){this._context=t}Cc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:hi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Wg(t){return new Cc(t)}function Mc(t,e){this._basis=new Di(t),this._beta=e}Mc.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],s=t[n]-i,o=e[n]-r,a=-1,c;++a<=n;)c=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+c*s),this._beta*e[a]+(1-this._beta)*(r+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Yg=(function t(e){function n(i){return e===1?new Di(i):new Mc(i,e)}return n.beta=function(i){return t(+i)},n})(.85);function fi(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function is(t,e){this._context=t,this._k=(1-e)/6}is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:fi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:fi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Vg=(function t(e){function n(i){return new is(i,e)}return n.tension=function(i){return t(+i)},n})(0);function rs(t,e){this._context=t,this._k=(1-e)/6}rs.prototype={areaStart:Jt,areaEnd:Jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:fi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Gg=(function t(e){function n(i){return new rs(i,e)}return n.tension=function(i){return t(+i)},n})(0);function ss(t,e){this._context=t,this._k=(1-e)/6}ss.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:fi(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Xg=(function t(e){function n(i){return new ss(i,e)}return n.tension=function(i){return t(+i)},n})(0);function os(t,e,n){var i=t._x1,r=t._y1,s=t._x2,o=t._y2;if(t._l01_a>Co){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Co){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);s=(s*l+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,s,o,t._x2,t._y2)}function Ac(t,e){this._context=t,this._alpha=e}Ac.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:os(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qg=(function t(e){function n(i){return e?new Ac(i,e):new is(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function $c(t,e){this._context=t,this._alpha=e}$c.prototype={areaStart:Jt,areaEnd:Jt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:os(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const jg=(function t(e){function n(i){return e?new $c(i,e):new rs(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function Dc(t,e){this._context=t,this._alpha=e}Dc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:os(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Zg=(function t(e){function n(i){return e?new Dc(i,e):new ss(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function Ec(t){this._context=t}Ec.prototype={areaStart:Jt,areaEnd:Jt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function Qg(t){return new Ec(t)}function Ao(t){return t<0?-1:1}function $o(t,e,n){var i=t._x1-t._x0,r=e-t._x1,s=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),a=(s*r+o*i)/(i+r);return(Ao(s)+Ao(o))*Math.min(Math.abs(s),Math.abs(o),.5*Math.abs(a))||0}function Do(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qi(t,e,n){var i=t._x0,r=t._y0,s=t._x1,o=t._y1,a=(s-i)/3;t._context.bezierCurveTo(i+a,r+a*e,s-a,o-a*n,s,o)}function di(t){this._context=t}di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qi(this,this._t0,Do(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,qi(this,Do(this,n=$o(this,t,e)),n);break;default:qi(this,this._t0,n=$o(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Fc(t){this._context=new Nc(t)}(Fc.prototype=Object.create(di.prototype)).point=function(t,e){di.prototype.point.call(this,e,t)};function Nc(t){this._context=t}Nc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,s){this._context.bezierCurveTo(e,t,i,n,s,r)}};function Kg(t){return new di(t)}function Jg(t){return new Fc(t)}function Oc(t){this._context=t}Oc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=Eo(t),r=Eo(e),s=0,o=1;o<n;++s,++o)this._context.bezierCurveTo(i[0][s],r[0][s],i[1][s],r[1][s],t[o],e[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Eo(t){var e,n=t.length-1,i,r=new Array(n),s=new Array(n),o=new Array(n);for(r[0]=0,s[0]=2,o[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,s[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,s[n-1]=7,o[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/s[e-1],s[e]-=i,o[e]-=i*o[e-1];for(r[n-1]=o[n-1]/s[n-1],e=n-2;e>=0;--e)r[e]=(o[e]-r[e+1])/s[e];for(s[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)s[e]=2*t[e+1]-r[e+1];return[r,s]}function tm(t){return new Oc(t)}function Ei(t,e){this._context=t,this._t=e}Ei.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function em(t){return new Ei(t,.5)}function nm(t){return new Ei(t,0)}function im(t){return new Ei(t,1)}function Fo(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function rm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Fo(Object(n),!0).forEach(function(i){sm(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fo(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function tn(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?tn=function(e){return typeof e}:tn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(t)}function sm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pi(){return pi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pi.apply(this,arguments)}function om(t,e){if(t){if(typeof t=="string")return No(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return No(t,e)}}function No(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Rc(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=om(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(c){throw c},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
121
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s=!0,o=!1,a;return{s:function(){n=n.call(t)},n:function(){var c=n.next();return s=c.done,c},e:function(c){o=!0,a=c},f:function(){try{!s&&n.return!=null&&n.return()}finally{if(o)throw a}}}}function am(t,e){var n=[],i=[];function r(s,o){if(s.length===1)n.push(s[0]),i.push(s[0]);else{for(var a=Array(s.length-1),c=0;c<a.length;c++)c===0&&n.push(s[0]),c===a.length-1&&i.push(s[c+1]),a[c]=[(1-o)*s[c][0]+o*s[c+1][0],(1-o)*s[c][1]+o*s[c+1][1]];r(a,o)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function cm(t){var e={};return t.length===4&&(e.x2=t[2][0],e.y2=t[2][1]),t.length>=3&&(e.x1=t[1][0],e.y1=t[1][1]),e.x=t[t.length-1][0],e.y=t[t.length-1][1],t.length===4?e.type="C":t.length===3?e.type="Q":e.type="L",e}function lm(t,e){e=e||2;for(var n=[],i=t,r=1/e,s=0;s<e-1;s++){var o=r/(1-r*s),a=am(i,o);n.push(a.left),i=a.right}return n.push(i),n}function um(t,e,n){var i=[[t.x,t.y]];return e.x1!=null&&i.push([e.x1,e.y1]),e.x2!=null&&i.push([e.x2,e.y2]),i.push([e.x,e.y]),lm(i,n).map(cm)}var hm=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Ce={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Ce).forEach(function(t){Ce[t.toLowerCase()]=Ce[t]});function mr(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function fm(t){return"".concat(t.type).concat(Ce[t.type].map(function(e){return t[e]}).join(","))}function dm(t,e){var n={x1:"x",y1:"y",x2:"x",y2:"y"},i=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==e.type&&e.type.toUpperCase()!=="M"){var r={};Object.keys(e).forEach(function(s){var o=e[s],a=t[s];a===void 0&&(i.includes(s)?a=o:(a===void 0&&n[s]&&(a=t[n[s]]),a===void 0&&(a=0))),r[s]=a}),r.type=e.type,t=r}return t}function pm(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(um(t,e,n));else{var r=pi({},t);r.type==="M"&&(r.type="L"),i=i.concat(mr(n-1).map(function(){return r})),i.push(e)}return i}function Oo(t,e,n){var i=t.length-1,r=e.length-1,s=i/r,o=mr(r).reduce(function(c,l,h){var u=Math.floor(s*h);if(n&&u<t.length-1&&n(t[u],t[u+1])){var f=s*h%1<.5;c[u]&&(f?u>0?u-=1:u<t.length-1&&(u+=1):u<t.length-1?u+=1:u>0&&(u-=1))}return c[u]=(c[u]||0)+1,c},[]),a=o.reduce(function(c,l,h){if(h===t.length-1){var u=mr(l,pi({},t[t.length-1]));return u[0].type==="M"&&u.forEach(function(f){f.type="L"}),c.concat(u)}return c.concat(pm(t[h],t[h+1],l))},[]);return a.unshift(t[0]),a}function Ro(t){for(var e=(t||"").match(hm)||[],n=[],i,r,s=0;s<e.length;++s)if(i=Ce[e[s]],i){r={type:e[s]};for(var o=0;o<i.length;++o)r[i[o]]=+e[s+o+1];s+=i.length,n.push(r)}return n}function gm(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),s=tn(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},o=s.excludeSegment,a=s.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var c=(i.length===0||i[i.length-1].type==="Z")&&(r.length===0||r[r.length-1].type==="Z");i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]);var l=Math.abs(r.length-i.length);l!==0&&(r.length>i.length?i=Oo(i,r,o):r.length<i.length&&(r=Oo(r,i,o))),i=i.map(function(u,f){return dm(u,r[f])});var h=i.map(function(u){return rm({},u)});return c&&(h.push({type:"Z"}),i.push({type:"Z"})),function(f){if(f===1&&a)return e??[];if(f===0)return i;for(var d=0;d<h.length;++d){var g=i[d],p=r[d],m=h[d],_=Rc(Ce[m.type]),x;try{for(_.s();!(x=_.n()).done;){var b=x.value;m[b]=(1-f)*g[b]+f*p[b],(b==="largeArcFlag"||b==="sweepFlag")&&(m[b]=Math.round(m[b]))}}catch(T){_.e(T)}finally{_.f()}}return h}}function Io(t,e,n){var i=Ro(t),r=Ro(e),s=tn(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},o=s.excludeSegment,a=s.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var c=gm(i,r,{excludeSegment:o,snapEndsToInput:a});return function(h){if(h===1&&a)return e??"";var u=c(h),f="",d=Rc(u),g;try{for(d.s();!(g=d.n()).done;){var p=g.value;f+=fm(p)}}catch(m){d.e(m)}finally{d.f()}return f}}function Zt(t,e,n,i){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:tr(t,e,n)||(se(n)?`var(${Yt(n)})`:null)}var K;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(K||(K={}));const Bo={[K.Basis]:zg,[K.BasisClosed]:Hg,[K.BasisOpen]:Wg,[K.Bundle]:Yg,[K.Cardinal]:Vg,[K.CardinalClosed]:Gg,[K.CardinalOpen]:Xg,[K.CatmullRom]:qg,[K.CatmullRomClosed]:jg,[K.CatmullRomOpen]:Zg,[K.Linear]:ns,[K.LinearClosed]:Qg,[K.MonotoneX]:Kg,[K.MonotoneY]:Jg,[K.Natural]:tm,[K.Step]:em,[K.StepAfter]:im,[K.StepBefore]:nm};function mm(t){return t}var Pn=1,Ln=2,_r=3,qe=4,Po=1e-6;function _m(t){return"translate("+t+",0)"}function vm(t){return"translate(0,"+t+")"}function ym(t){return e=>+t(e)}function xm(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function bm(){return!this.__axis}function Fi(t,e){var n=[],i=null,r=null,s=6,o=6,a=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=t===Pn||t===qe?-1:1,h=t===qe||t===Ln?"x":"y",u=t===Pn||t===_r?_m:vm;function f(d){var g=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):mm),m=Math.max(s,0)+a,_=e.range(),x=+_[0]+c,b=+_[_.length-1]+c,T=(e.bandwidth?xm:ym)(e.copy(),c),M=d.selection?d.selection():d,y=M.selectAll(".domain").data([null]),C=M.selectAll(".tick").data(g,e).order(),I=C.exit(),O=C.enter().append("g").attr("class","tick"),w=C.select("line"),D=C.select("text");y=y.merge(y.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(O),w=w.merge(O.append("line").attr("stroke","currentColor").attr(h+"2",l*s)),D=D.merge(O.append("text").attr("fill","currentColor").attr(h,l*m).attr("dy",t===Pn?"0em":t===_r?"0.71em":"0.32em")),d!==M&&(y=y.transition(d),C=C.transition(d),w=w.transition(d),D=D.transition(d),I=I.transition(d).attr("opacity",Po).attr("transform",function(v){return isFinite(v=T(v))?u(v+c):this.getAttribute("transform")}),O.attr("opacity",Po).attr("transform",function(v){var k=this.parentNode.__axis;return u((k&&isFinite(k=k(v))?k:T(v))+c)})),I.remove(),y.attr("d",t===qe||t===Ln?o?"M"+l*o+","+x+"H"+c+"V"+b+"H"+l*o:"M"+c+","+x+"V"+b:o?"M"+x+","+l*o+"V"+c+"H"+b+"V"+l*o:"M"+x+","+c+"H"+b),C.attr("opacity",1).attr("transform",function(v){return u(T(v)+c)}),w.attr(h+"2",l*s),D.attr(h,l*m).text(p),M.filter(bm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ln?"start":t===qe?"end":"middle"),M.each(function(){this.__axis=T})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(r=d,f):r},f.tickSize=function(d){return arguments.length?(s=o=+d,f):s},f.tickSizeInner=function(d){return arguments.length?(s=+d,f):s},f.tickSizeOuter=function(d){return arguments.length?(o=+d,f):o},f.tickPadding=function(d){return arguments.length?(a=+d,f):a},f.offset=function(d){return arguments.length?(c=+d,f):c},f}function Lo(t){return Fi(Pn,t)}function Uo(t){return Fi(Ln,t)}function zo(t){return Fi(_r,t)}function Ho(t){return Fi(qe,t)}var Qt;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(Qt||(Qt={}));var ue;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(ue||(ue={}));var Rt;(function(t){t.Wrap="wrap",t.Trim="trim"})(Rt||(Rt={}));var Ct;(function(t){t.Left="left",t.Center="center",t.Right="right"})(Ct||(Ct={}));function wm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Un={exports:{}},km=Un.exports,Wo;function Sm(){return Wo||(Wo=1,(function(t){(function(e){if(typeof n!="function"){var n=function(g){return g};n.nonNative=!0}const i=n("plaintext"),r=n("html"),s=n("comment"),o=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function c(g,p,m){g=g||"",p=p||[],m=m||"";let _=h(p,m);return u(g,_)}function l(g,p){g=g||[],p=p||"";let m=h(g,p);return function(x){return u(x||"",m)}}c.init_streaming_mode=l;function h(g,p){return g=f(g),{allowable_tags:g,tag_replacement:p,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function u(g,p){if(typeof g!="string")throw new TypeError("'html' parameter must be a string");let m=p.allowable_tags,_=p.tag_replacement,x=p.state,b=p.tag_buffer,T=p.depth,M=p.in_quote_char,y="";for(let C=0,I=g.length;C<I;C++){let O=g[C];if(x===i)O==="<"?(x=r,b+=O):y+=O;else if(x===r)switch(O){case"<":if(M)break;T++;break;case">":if(M)break;if(T){T--;break}M="",x=i,b+=">",m.has(d(b))?y+=b:y+=_,b="";break;case'"':case"'":O===M?M="":M=M||O,b+=O;break;case"-":b==="<!-"&&(x=s),b+=O;break;case" ":case`
|
|
122
|
+
`:if(b==="<"){x=i,y+="< ",b="";break}b+=O;break;default:b+=O;break}else x===s&&(O===">"?(b.slice(-2)=="--"&&(x=i),b=""):b+=O)}return p.state=x,p.tag_buffer=b,p.depth=T,p.in_quote_char=M,y}function f(g){let p=new Set;if(typeof g=="string"){let m;for(;m=o.exec(g);)p.add(m[1])}else!n.nonNative&&typeof g[n.iterator]=="function"?p=new Set(g):typeof g.forEach=="function"&&g.forEach(p.add,p);return p}function d(g){let p=a.exec(g);return p?p[1].toLowerCase():null}t.exports?t.exports=c:e.striptags=c})(km)})(Un)),Un.exports}var Tm=Sm();const Cm=wm(Tm);function Mm(t){switch(t){case Ct.Center:return"middle";case Ct.Right:return"end";case Ct.Left:default:return"start"}}const Am=t=>{switch(t){case Ct.Left:return"start";case Ct.Right:return"end";case Ct.Center:return"middle";default:return null}};function $m(t){return t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function Dm(t){var e;return(e=t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g))===null||e===void 0?void 0:e.filter(Boolean).map(n=>n.toLowerCase()).join("-")}function Em(t){return t.replace(/['"]/g,"'").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\t/g,"\\t").replace(/\f/g,"\\f")}function Fm(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function Nm(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function Om(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function Rm(t,e=15,n=Qt.Middle){if(!t)return"";let i=Om(t,e);return n===Qt.Start?i=Fm(t,e):n===Qt.Middle&&(i=Nm(t,e)),i}function Ic(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((s,o)=>{const a=s.split(r),c=a.map((l,h)=>`${l}${h===a.length-1?"":r}`);n[o]=c}),n=Ji(n)}return n}function Im(t,e,n=[" ","-",".",","]){const i=t.text();if(!i)return;const r=he(n)?n:[n],s=Ic(i,r),o=parseFloat(t.attr("x"))||0;t.text("");let a=t.append("tspan").attr("x",o),c=`${s[0]}`;a.text(c),s.forEach((l,h)=>{if(h===0)return;const u=`${c}${l}`;a.text(u),a.node().getComputedTextLength()>e?(a.text(c.trim()),a=t.append("tspan").attr("x",o).attr("dy","1.2em").text(l),c=l):c+=l})}function Yo(t,e,n,i,r,s){var o;e===void 0&&(e=50),n===void 0&&(n=Qt.Middle),r===void 0&&(r=+((o=window.getComputedStyle(t.node()))===null||o===void 0?void 0:o.fontSize)||0),s===void 0&&(s=Nr());const a=t.text()||"",c=a.length,l=r*c*s,u=Math.ceil(c*e/(1.1*l));return u<c?(t.text(Rm(a,u,n)),!0):!1}function zn(t,e,n=Nr()){return t.length*e*n||0}function Hn(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),s=document.createElementNS(i,"text");s.textContent=t,s.setAttribute("font-size",`${n}`),s.setAttribute("font-family",e),r.appendChild(s),document.body.appendChild(r);const o=s.getComputedTextLength();return document.body.removeChild(r),o}function Bm(t,e=void 0,n=!0,i=Ea,r=!1){var s,o,a;const c=`${t.text}`;if(!c)return[];const l=(s=t.fontSize)!==null&&s!==void 0?s:Je.fontSize,h=(o=t.fontFamily)!==null&&o!==void 0?o:Je.fontFamily,u=(a=t.fontWidthToHeightRatio)!==null&&a!==void 0?a:Je.fontWidthToHeightRatio,f=Array.isArray(i)?i:[i];return c.split(`
|
|
123
|
+
`).map(g=>{const p=[];if(!e)return[g];const m=Ic(g,f);let _="";for(let x=0;x<m.length;x+=1){(n?zn(_+m[x],l,u):Hn(_+m[x],h,l))<e||x===0?_+=m[x]:(p.push(_.trim()),_=m[x]);const T=2;if(r)for(;_.trim().length>T&&(n?zn(_,l,u):Hn(_,h,l))>e;){let y=_.trim().length-T;for(;y>0;){const C=`${_.substring(0,y)}${Fa}`;if((n?zn(C,l,u):Hn(C,h,l))<=e||y===1){p.push(C.trim()),_=_.substring(y);break}y--}}}return _&&p.push(_.trim()),p}).flat()}function Pm(t,e=void 0,n=void 0,i=!0,r=Ea,s=!1){const o=Array.isArray(t)?t.map(u=>De(Je,u)):[De(Je,t)],a=o.map(u=>Bm(u,e,i,r,s)),c=o[0];let l=-c.fontSize*(c.lineHeight-1);const h=[];return o.forEach((u,f)=>{var d;let g=a[f];const p=f>0?h[f-1]:void 0,m=p?p.marginBottom:0,_=u.marginTop,x=Math.max(m,_);l+=x;const b=u.fontSize*u.lineHeight;let T=0;for(let M=0;M<g.length;M+=1){let y=g[M];l+=b;const C=`${y} …`,I=i?zn(C,u.fontSize,u.fontWidthToHeightRatio):Hn(C,u.fontFamily,u.fontSize);if(T=Math.max(I,T),n&&l+b>n&&M!==g.length-1){y.charAt(y.length-1)===Fa&&(y=y.substr(0,g[M].length-1)),I<e?g[M]=C:g[M]=`${g[M].substr(0,g[M].length-2)}…`,g=g.slice(0,M+1);break}}h.push(Object.assign(Object.assign({},u),{_lines:g,_estimatedHeight:l-(p?._estimatedHeight||0),_maxWidth:Math.max(T,(d=p?._maxWidth)!==null&&d!==void 0?d:0)}))}),h}function Lm(t,e=0,n,i){return t.map((r,s)=>{const o=s>0?t[s-1]:void 0,a=o?o.marginBottom/o.fontSize:0,c=r.marginTop/r.fontSize,l=Math.max(a,c),h={fontSize:r.fontSize,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fill:r.color,y:s===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(h).filter(([f,d])=>d).map(([f,d])=>`${Dm(f)}="${Em(d.toString())}"`).join(" ")}>${r._lines.map((f,d)=>{let g;return s===0&&d===0?g=l:d===0?g=l+r.lineHeight:g=r.lineHeight,`<tspan x="${e}" dy="${g}em" dominant-baseline="${i??"auto"}">${f.length?f:" "}</tspan>`}).join("")}</tspan>`})}function Um(t){return Ch(t,e=>e._estimatedHeight)}const zm=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function Hm(t,e,n,i){var r,s;const o=Pm(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=(r=n.x)!==null&&r!==void 0?r:+t.getAttribute("x"),c=(s=n.y)!==null&&s!==void 0?s:+t.getAttribute("y"),l=a??0;let h=c??0;if(n.textAlign&&t.setAttribute("text-anchor",Mm(n.textAlign)),n.verticalAlign&&n.verticalAlign!==ue.Top){const f=Um(o),d=n.verticalAlign===ue.Middle?-f/2:n.verticalAlign===ue.Bottom?-f:0;h+=d}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${l} ${h})`):t.removeAttribute("transform");const u=new DOMParser;t.textContent="",o.forEach(f=>{const d=Lm([f],l,h,i).join(""),g=Cm(d,zm),p=u.parseFromString(g,"image/svg+xml").firstChild;t.appendChild(p)})}const Wm=Object.assign(Object.assign({},Ai),{position:void 0,type:void 0,label:void 0,labelFontSize:null,labelTextFitMode:Rt.Wrap,labelTextTrimType:Qt.Middle,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,minMaxTicksOnlyShowGridLines:!1,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:Qt.Middle,tickTextFitMode:Rt.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0});function Ym(t,e){const n="--vis-",i=Object.entries(t);return Object.fromEntries(i.map(([r])=>[$m(r.replace(n,"")),r]))}function Vm(t,e){mn({":root":t,[`body.theme-dark .${e}`]:Object.keys(t).filter(n=>n.includes("--vis-dark")).map(n=>({[n.replace("--vis-dark","--vis")]:`var(${n})`}))})}const Bc=Q`
|
|
124
|
+
label: axis-component;
|
|
125
|
+
`,as={"--vis-axis-tick-color":"#e8e9ef","--vis-axis-grid-color":"#e8e9ef","--vis-axis-grid-line-width":"1px","--vis-axis-grid-line-dasharray":"none","--vis-axis-label-font-size":"14px","--vis-axis-label-color":"#6c778c","--vis-axis-label-weight":"500","--vis-axis-tick-label-color":"#6c778c","--vis-axis-tick-label-font-size":"12px","--vis-axis-tick-label-weight":"500","--vis-axis-tick-label-cursor":"default","--vis-axis-tick-label-text-decoration":"none","--vis-axis-tick-line-width":"1px","--vis-axis-tick-label-hide-transition":"opacity 400ms ease-in-out","--vis-dark-axis-tick-color":"#6c778c","--vis-dark-axis-tick-label-color":"#e8e9ef","--vis-dark-axis-grid-color":"#6c778c","--vis-dark-axis-label-color":"#fefefe"},Gm=Ym(as);Vm(as,Bc);const cs=Q`
|
|
126
|
+
label: hide-tick-line;
|
|
127
|
+
`,ls=Q`
|
|
128
|
+
label: hide-domain;
|
|
129
|
+
`,Pc=Q`
|
|
130
|
+
label: axis;
|
|
131
|
+
|
|
132
|
+
user-select: none;
|
|
133
|
+
|
|
134
|
+
.domain {
|
|
135
|
+
stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
|
|
136
|
+
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
|
|
137
|
+
stroke-dasharray: var(--vis-axis-domain-line-dasharray, var(--vis-axis-grid-line-dasharray));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&${`.${cs}`} {
|
|
141
|
+
.tick > line {
|
|
142
|
+
opacity: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&${`.${ls}`} {
|
|
147
|
+
.domain {
|
|
148
|
+
opacity: 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
`,Lc=Q`
|
|
152
|
+
label: grid;
|
|
153
|
+
|
|
154
|
+
.domain {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
line {
|
|
159
|
+
stroke: var(--vis-axis-grid-color);
|
|
160
|
+
stroke-width: var(--vis-axis-grid-line-width);
|
|
161
|
+
stroke-dasharray: var(--vis-axis-grid-line-dasharray);
|
|
162
|
+
}
|
|
163
|
+
`,Uc=Q`
|
|
164
|
+
label: tick;
|
|
165
|
+
|
|
166
|
+
stroke: none;
|
|
167
|
+
font-size: var(--vis-axis-tick-label-font-size);
|
|
168
|
+
font-weight: var(--vis-axis-tick-label-weight);
|
|
169
|
+
|
|
170
|
+
line {
|
|
171
|
+
stroke: var(--vis-axis-tick-color);
|
|
172
|
+
stroke-width: var(--vis-axis-tick-line-width);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
text {
|
|
176
|
+
fill: var(--vis-axis-tick-label-color);
|
|
177
|
+
cursor: var(--vis-axis-tick-label-cursor);
|
|
178
|
+
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
|
179
|
+
text-decoration: var(--vis-axis-tick-label-text-decoration);
|
|
180
|
+
stroke: none;
|
|
181
|
+
}
|
|
182
|
+
`,vr=Q`
|
|
183
|
+
label: tick-text-exiting;
|
|
184
|
+
`,yr=Q`
|
|
185
|
+
label: label;
|
|
186
|
+
fill: var(--vis-axis-label-color);
|
|
187
|
+
font-size: var(--vis-axis-label-font-size);
|
|
188
|
+
font-weight: var(--vis-axis-label-weight);
|
|
189
|
+
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
|
190
|
+
text-anchor: middle;
|
|
191
|
+
`,zc=Q`
|
|
192
|
+
label: tick-label;
|
|
193
|
+
`,Hc=Q`
|
|
194
|
+
label: tick-label-hideable;
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transition: var(--vis-axis-tick-label-hide-transition);
|
|
197
|
+
`,Xm=Object.freeze(Object.defineProperty({__proto__:null,axis:Pc,cssVarDefaults:as,grid:Lc,hideDomain:ls,hideTickLine:cs,label:yr,root:Bc,tick:Uc,tickLabel:zc,tickLabelHideable:Hc,tickTextExiting:vr,variables:Gm},Symbol.toStringTag,{value:"Module"}));class Wc extends ts{constructor(e){super(),this._defaultConfig=Wm,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",Lc)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0),this._axisRawBBox=n.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===U.X?A.Bottom:A.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case U.X:{const s=this._axisSizeBBox.x+this._axisSizeBBox.width,o=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=s-this._width>1?s-this._width:0;switch(i){case A.Top:return{top:e.height,left:o,right:a};case A.Bottom:default:return{bottom:e.height,left:o,right:a}}}case U.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,s=r,o=r;switch(i){case A.Right:return{right:e.width,top:s,bottom:o};case A.Left:default:return{left:e.width,top:s,bottom:o}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case U.X:switch(i){case A.Top:return{top:e.top,left:e.left};case A.Bottom:default:return{top:e.top+this._height,left:e.left}}case U.Y:switch(i){case A.Right:return{top:e.top,left:e.left+this._width};case A.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:i}=this;if(this._renderAxis(n,e),this._renderAxisLabel(n),i.gridLine){const r=this._buildGrid();this.gridGroup.selectAll("*").interrupt(),St(this.gridGroup,e).call(r).style("opacity",1)}else St(this.gridGroup,e).style("opacity",0);i.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_buildAxis(){const{config:{type:e,position:n,tickPadding:i}}=this,r=this._getNumTicks();switch(e){case U.X:switch(n){case A.Top:return Lo(this.xScale).ticks(r).tickPadding(i);case A.Bottom:default:return zo(this.xScale).ticks(r).tickPadding(i)}case U.Y:switch(n){case A.Right:return Uo(this.yScale).ticks(r).tickPadding(i);case A.Left:default:return Ho(this.yScale).ticks(r).tickPadding(i)}}}_buildGrid(){const{config:e}=this;let n;switch(e.type){case U.X:switch(e.position){case A.Top:{n=Lo(this.xScale);break}case A.Bottom:default:{n=zo(this.xScale);break}}n.tickSize(-this._height);break;case U.Y:switch(e.position){case A.Right:{n=Uo(this.yScale);break}case A.Left:default:{n=Ho(this.yScale);break}}n.tickSize(-this._width)}n.tickSizeOuter(0).tickFormat(()=>"");const i=this._getNumTicks()*2,r=n.scale(),s=r.domain(),o=()=>{if(!e.minMaxTicksOnlyShowGridLines)return s;const c=r.ticks(i);if(c.length<2)return s;const l=+c[1]-+c[0],h=s[1];return+h-+c[c.length-1]>l/2?[...c,h]:c},a=e.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?o():r.ticks(i);return n.tickValues(a),n}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:i}=this,r=this._buildAxis(),s=r.scale(),o=i.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?s.domain():s.ticks(this._getNumTicks()),a=o.length;r.tickValues(o),e.selectAll("*").interrupt();const c=St(e,n).call(r);e.selectAll("text").attr("dy",null).attr("y",null),c.on("end",()=>{this._resolveTickLabelOverlap(e)}),e.selectAll("g.tick").classed(Uc,!0).style("font-size",i.tickTextFontSize);const h=e.selectAll("g.tick > text").filter(g=>o.some(p=>fe(g,p))).classed(zc,!0).classed(Hc,!!i.tickTextHideOverlapping).style("fill",i.tickTextColor);e.selectAll("g.tick > text").filter(g=>!o.some(p=>fe(g,p))).classed(vr,!0),h.nodes().forEach(g=>Ir(g));const u=r.tickSize(),f=this.getPosition(),d=i.tickTextWidth||(i.type===U.X?this._containerWidth/(a+1):this._containerWidth/5);if(h.each((g,p,m)=>{var _,x;let b=(x=(_=i.tickFormat)===null||_===void 0?void 0:_.call(i,g,p,o))!==null&&x!==void 0?x:`${g}`;const T=m[p];if(!this._tickTextStyleCached){const w=getComputedStyle(T);this._tickTextStyleCached={fontSize:Number.parseFloat(w.fontSize),fontFamily:w.fontFamily,fontWidthToHeightRatio:Nr()}}const[M,y]=this._getTickTextOffset(f,u,this._tickTextStyleCached.fontSize),C={verticalAlign:i.type===U.X?ue.Top:ue.Middle,width:d,textRotationAngle:i.tickTextAngle,separator:i.tickTextSeparator,wordBreak:i.tickTextForceWordBreak,x:M,y};if(i.tickTextFitMode===Rt.Trim){const w=Tt(T).text(b);Yo(w,d,i.tickTextTrimType,!0,this._tickTextStyleCached.fontSize,.58),b=Tt(T).text()}const I=Object.assign({text:b},this._tickTextStyleCached),O=i.type===U.X?"central":"hanging";Hm(T,I,C,O)}),e.classed(Pc,!0).classed(cs,!i.tickLine).classed(ls,!i.domainLine),i.fullSize){const g=this._getFullDomainPath(0);St(e.select(".domain"),n).attr("d",g)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll(`g.tick > text:not(.${vr})`);if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(i)})}_collideTickLabels(e){e.each((i,r,s)=>{const o=s[r];o._visible=!0});const n=3;for(let i=0;i<n;i+=1)e.each((r,s,o)=>{const a=o[s];if(!a._visible)return;const l=a.getBoundingClientRect();for(let h=s+1;h<o.length;h+=1){if(s===h)continue;const u=o[h];if(u._visible){const d=u.getBoundingClientRect();if(Wf(l,d,-5)){u._visible=!1;break}}}});e.each((i,r,s)=>{const o=s[r];Tt(o).style("opacity",o._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===U.X){const i=this.xScale.range(),r=i[1]-i[0];return Math.floor(r/175)}if(e===U.Y){const i=this.yScale.range(),r=Math.abs(i[0]-i[1]);return Math.pow(r,.85)/25}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,n=e.type===U.X?this.xScale:this.yScale,i=n?.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):null}_shouldRenderMinMaxTicksOnly(){const{config:e}=this;return e.minMaxTicksOnly||e.type===U.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case U.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case U.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){var n;const{type:i,label:r,labelMargin:s,labelFontSize:o,labelTextFitMode:a}=this.config;if(e.selectAll(`.${yr}`).remove(),!r)return;const c=this.getPosition(),{width:l,height:h}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),u=i===U.Y?-90:0,f=e.append("text").attr("class",yr).attr("dy",`${this._getLabelDY()}em`).style("font-size",o).style("fill",this.config.labelColor);f.text(r);let d=!1;if(a===Rt.Wrap){const T=i===U.Y?this._height:this._width;f.node().getComputedTextLength()>T&&(Im(f,T),d=!0)}let g=l,p=h;if(a===Rt.Wrap){const T=f.node().getBBox();g=T.width,p=T.height}else{const T=i===U.X?g:p,M=getComputedStyle(f.node()),y=Number.parseFloat(M.fontSize);Yo(f,T,this.config.labelTextTrimType,!0,y);const C=f.node().getBBox();g=C.width,p=C.height}const m=i===U.X?this._width/2:i===U.Y&&a===Rt.Wrap&&d?c===A.Left?-l-p/2-10:l:Math.pow(-1,+(c===A.Left))*l,_=i===U.Y?this._height/2:i===U.X&&a===Rt.Wrap?c===A.Top?-h-p/2:h:Math.pow(-1,+(c===A.Top))*h,x=i===U.X?0:Math.pow(-1,+(c===A.Left))*s,b=i===U.X?Math.pow(-1,+(c===A.Top))*s:0;f.attr("transform",`translate(${m+x},${_+b}) rotate(${u})`)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case U.X:switch(n){case A.Top:return 0;case A.Bottom:default:return .75}case U.Y:switch(n){case A.Right:return .75;case A.Left:default:return-.25}}}_getTickTextOffset(e,n,i){var r;const{config:s}=this,o=((r=s.tickTextAngle)!==null&&r!==void 0?r:0)/180*Math.PI,a=n+s.tickPadding;if(s.type===U.X){const c=e===A.Bottom?1:-1;return[c*a*Math.sin(o),c*(a+i/2)*Math.cos(o)]}else{const c=e===A.Right?1:-1;return[c*a*Math.cos(o),c*a*Math.sin(o)]}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:i,position:r}}=this,s=this.g.selectAll("g.tick > text"),o=Am(n),a=e===U.X?0:this._getYTickTextTranslate(n,r),c=i?`translate(${a},0) rotate(${i})`:`translate(${a},0)`;s.attr("transform",c).attr("text-anchor",o)}_getYTickTextTranslate(e,n=A.Left){var i,r,s,o;const a=this.config.tickPadding+1,c=((o=(r=(i=this._axisRawBBox)===null||i===void 0?void 0:i.width)!==null&&r!==void 0?r:(s=this.axisGroup.node())===null||s===void 0?void 0:s.getBBox().width)!==null&&o!==void 0?o:0)-a;switch(e){case Ct.Left:return n===A.Left?c*-1:0;case Ct.Right:return n===A.Left?0:c;case Ct.Center:return n===A.Left?c*-.5:c*.5;default:return 0}}}Wc.selectors=Xm;const qm=Object.assign(Object.assign({},Ai),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e,n,i)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0,onCrosshairMove:void 0,forceShowAt:void 0,skipRangeCheck:!1}),jm=mn`
|
|
198
|
+
:root {
|
|
199
|
+
--vis-crosshair-line-stroke-color: #888;
|
|
200
|
+
--vis-crosshair-line-stroke-width: 1px;
|
|
201
|
+
--vis-crosshair-line-stroke-opacity: 1;
|
|
202
|
+
--vis-crosshair-circle-stroke-color: #fff;
|
|
203
|
+
--vis-crosshair-circle-stroke-width: 1px;
|
|
204
|
+
--vis-crosshair-circle-stroke-opacity: 0.75;
|
|
205
|
+
}
|
|
206
|
+
`,Zm=Q`
|
|
207
|
+
label: crosshair-component;
|
|
208
|
+
`,Yc=Q`
|
|
209
|
+
stroke: var(--vis-crosshair-line-stroke-color);
|
|
210
|
+
stroke-width: var(--vis-crosshair-line-stroke-width);
|
|
211
|
+
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
|
|
212
|
+
pointer-events: none;
|
|
213
|
+
`,Vc=Q`
|
|
214
|
+
stroke: var(--vis-crosshair-circle-stroke-color);
|
|
215
|
+
stroke-width: var(--vis-crosshair-circle-stroke-width);
|
|
216
|
+
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
|
|
217
|
+
pointer-events: none;
|
|
218
|
+
`,Qm=Object.freeze(Object.defineProperty({__proto__:null,circle:Vc,globalStyles:jm,line:Yc,root:Zm},Symbol.toStringTag,{value:"Module"}));class Gc extends ts{constructor(e){super(),this.clippable=!0,this._defaultConfig=qm,this.config=this._defaultConfig,this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style("opacity",0),this.line=this.g.append("line").attr("class",Yc)}set accessors(e){this._accessors=e}get accessors(){var e;const{config:n}=this,i=!!(n.x||n.y||n.yStacked),r=i?n.x:this._accessors.x,s=i?n.y:this._accessors.y,o=s?he(s)?s:[s]:void 0,a=i?n.yStacked:this._accessors.yStacked,c=(e=n.baseline)!==null&&e!==void 0?e:this._accessors.baseline;return{x:r,y:o,yStacked:a,baseline:c}}_isContainerInViewport(){var e;if(!(!((e=this.container)===null||e===void 0)&&e.node()))return!1;const n=this.container.node().getBoundingClientRect(),i=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,s=Math.max(0,Math.min(n.right,i)-Math.max(n.left,0)),o=Math.max(0,Math.min(n.bottom,r)-Math.max(n.top,0)),a=n.width*n.height,c=s*o;return a>0&&c/a>=.35}setContainer(e){this.container!==e&&(this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this)),this.container.on("wheel.crosshair",this._onWheel.bind(this)))}_render(e){var n,i,r,s,o;const{config:a,datamodel:c}=this,l=se(e)?e:a.duration,h=a.forceShowAt!==void 0,u=h?this.xScale(a.forceShowAt):this._xPx,f=this.xScale.invert(u),d=!((n=c.data)===null||n===void 0)&&n.length&&this.accessors.x?c.data.indexOf(Zn(c.data,f,this.accessors.x,It.Left)):void 0;let g,p;a.snapToData&&(!this.accessors.y&&!this.accessors.yStacked&&(!((i=c.data)===null||i===void 0)&&i.length)&&console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object"),!(!((r=c.data)===null||r===void 0)&&r.length)&&this._mouseEvent&&console.warn("Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself"),g=Zn(c.data,f,this.accessors.x),p=c.data.indexOf(g));const m=this.xScale.range(),_=this.yScale.range(),x=a.snapToData&&g?qt(Math.round(this.xScale(tt(g,this.accessors.x,p))),0,this._width):qt(u,m[0],m[1]),b=u>=m[0]&&u<=m[1],T=this._yPx>=Math.min(_[0],_[1])&&this._yPx<=Math.max(_[0],_[1]);let M=a.skipRangeCheck?!!this._xPx:this._xPx?b&&T:b;a.hideWhenFarFromPointer&&Math.abs(x-+u)>=a.hideWhenFarFromPointerDistance&&(M=!1);const y=(s=a.tooltip)!==null&&s!==void 0?s:this.tooltip;if(M&&y&&this._isContainerInViewport()){const w=y.getContainer()||this.container.node(),D=y.isContainerBody(),v=this.accessors.x?tt(g,this.accessors.x,p):void 0;if(h){const k=this.container.node().getBoundingClientRect(),E=(D?u+k.left:u)+this._containerMargin.left,B=this._height/2+(D?k.top:0),Y=[E,B];this._showTooltip(g,v,Y,d)}else if(this._mouseEvent){const k=D?[this._mouseEvent.clientX,this._mouseEvent.clientY]:Vn(this._mouseEvent,w);this._showTooltip(g,v,k,d)}}else this._hideTooltip();if(this._mouseEvent&&((o=a.onCrosshairMove)===null||o===void 0||o.call(a,M?this.xScale.invert(this._xPx):void 0,g,p,this._mouseEvent),this._mouseEvent=void 0),St(this.g,l).style("opacity",M?1:0),!isFinite(u))return;this.line.attr("y1",0).attr("y2",this._height),St(this.line,l,Zs).attr("x1",x).attr("x2",x);const C=Tr(a.getCircles)?a.getCircles(f,c.data,this.yScale,d):this.getCircleData(g,p),I=this.g.selectAll("circle").data(C,(w,D)=>{var v;return(v=w.id)!==null&&v!==void 0?v:D}),O=I.enter().append("circle").attr("class",Vc).attr("r",0).attr("cx",x).attr("cy",w=>w.y).style("fill",w=>w.color).style("stroke",w=>w.strokeColor).style("stroke-width",w=>w.strokeWidth);St(O.merge(I),l,Zs).attr("cx",x).attr("cy",w=>w.y).attr("r",4).style("opacity",w=>w.opacity).style("fill",w=>w.color).style("stroke",w=>w.strokeColor).style("stroke-width",w=>w.strokeWidth),I.exit().remove()}hide(e){window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{var n,i;this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,(i=(n=this.config).onCrosshairMove)===null||i===void 0||i.call(n,void 0,void 0,void 0,e),this._render()})}_onMouseMove(e){var n;const{datamodel:i,element:r}=this;!this.accessors.x&&(!((n=i.data)===null||n===void 0)&&n.length)&&console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");const[s,o]=Vn(e,r);this._xPx=s,this._yPx=o,this._mouseEvent=e,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()})}_onMouseOut(e){var n;(!e||!(!((n=this.container)===null||n===void 0)&&n.node().contains(e.relatedTarget)))&&this.hide(e)}_onWheel(e){this.hide(e)}_showTooltip(e,n,i,r){var s;const{config:o,datamodel:a}=this,c=(s=o.tooltip)!==null&&s!==void 0?s:this.tooltip;if(!c||!i)return;const[l,h]=i,u=o.template(e,n,a.data,r);if(c.config.followCursor=!0,!c.config.horizontalPlacement||c.config.horizontalPlacement===A.Auto){const f=c.isContainerBody()?l-this.container.node().getBoundingClientRect().left:l;c.overrideHorizontalPlacement(f>this._containerWidth/2?A.Left:A.Right)}u&&c.show(u,{x:l,y:h})}_hideTooltip(){var e;const{config:n}=this,i=(e=n.tooltip)!==null&&e!==void 0?e:this.tooltip;i?.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(e,n){var i,r;const{config:s}=this;if(s.snapToData&&e){const o=(i=this.accessors.y)!==null&&i!==void 0?i:[],a=(r=this.accessors.yStacked)!==null&&r!==void 0?r:[],c=tt(e,this.accessors.baseline,n)||0,l=Dh(e,n,...a).map((u,f)=>({y:this.yScale(u+c),opacity:se(tt(e,a[f],f))?1:0,color:Zt(e,s.color,f),strokeColor:s.strokeColor?Zt(e,s.strokeColor,f):void 0,strokeWidth:s.strokeWidth?tt(e,s.strokeWidth,f):void 0})),h=o.map((u,f)=>{const d=tt(e,u,n);return{y:this.yScale(d),opacity:se(d)?1:0,color:Zt(e,s.color,l.length+f),strokeColor:s.strokeColor?Zt(e,s.strokeColor,f):void 0,strokeWidth:s.strokeWidth?tt(e,s.strokeWidth,f):void 0}});return l.concat(h)}return[]}}Gc.selectors=Qm;const Km=Object.assign(Object.assign({},Ai),{color:void 0,curveType:K.MonotoneX,baseline:()=>0,opacity:1,cursor:null,line:!1,lineColor:void 0,lineWidth:2,lineDashArray:void 0,minHeight1Px:!1,minHeight:void 0,stackMinHeight:!1}),Xc=Q`
|
|
219
|
+
label: area-component;
|
|
220
|
+
`,Jm=mn`
|
|
221
|
+
:root {
|
|
222
|
+
--vis-area-cursor: default;
|
|
223
|
+
--vis-area-fill-opacity: 1;
|
|
224
|
+
--vis-area-stroke-color: none;
|
|
225
|
+
--vis-area-stroke-width: 0px;
|
|
226
|
+
--vis-area-stroke-dasharray: none;
|
|
227
|
+
--vis-area-stroke-opacity: 1;
|
|
228
|
+
--vis-area-hover-fill-opacity: none;
|
|
229
|
+
--vis-area-hover-stroke-width: none;
|
|
230
|
+
|
|
231
|
+
/* Dark Theme */
|
|
232
|
+
--vis-dark-area-stroke-color: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
body.theme-dark ${`.${Xc}`} {
|
|
236
|
+
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
`,Wn=Q`
|
|
240
|
+
label: area;
|
|
241
|
+
cursor: var(--vis-area-cursor);
|
|
242
|
+
fill-opacity: var(--vis-area-fill-opacity);
|
|
243
|
+
stroke-width: var(--vis-area-stroke-width);
|
|
244
|
+
stroke-dasharray: var(--vis-area-stroke-dasharray);
|
|
245
|
+
stroke: var(--vis-area-stroke-color);
|
|
246
|
+
stroke-opacity: var(--vis-area-stroke-opacity);
|
|
247
|
+
|
|
248
|
+
&:hover {
|
|
249
|
+
fill-opacity: var(--vis-area-hover-fill-opacity);
|
|
250
|
+
stroke-width: var(--vis-area-hover-stroke-width);
|
|
251
|
+
}
|
|
252
|
+
`,xr=Q`
|
|
253
|
+
label: areaLinePath;
|
|
254
|
+
fill: none;
|
|
255
|
+
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
256
|
+
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
257
|
+
`,t_=Object.freeze(Object.defineProperty({__proto__:null,area:Wn,areaLinePath:xr,globalStyles:Jm,root:Xc},Symbol.toStringTag,{value:"Module"}));class Ni extends ts{constructor(e){super(),this._defaultConfig=Km,this.config=this._defaultConfig,this.stacked=!0,this.events={[Ni.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}get bleed(){const{config:{line:e,lineWidth:n}}=this;if(!e)return{top:0,bottom:0,left:0,right:0};const i=this.yScale.domain(),s=(this.yScale.range()[0]>this.yScale.range()[1]?le.North:le.South)===le.South,o=n>3,a=n>=10;return{top:!a&&(!s&&i[1]===0||s&&i[0]===0)?0:n/2,bottom:!a&&(!s&&i[0]===0||s&&i[1]===0)?0:n/2,left:o?n/2:0,right:o?n/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=se(e)?e:n.duration,s=Bo[n.curveType];this._areaGen=Ug().x(m=>m.x).y0(m=>m.y0).y1(m=>m.y1).curve(s);const o=he(n.y)?n.y:[n.y],a=i.map((m,_)=>this.xScale(tt(m,n.x,_))),c=Eh(i,n.baseline,o,this._prevNegative);this._prevNegative=c.map(m=>!!m.isMostlyNegative);const l=[],h=c.map(m=>m.map((_,x)=>{var b,T;const M=a[x],y=this.yScale(_[0]),C=this.yScale(_[1]),I=C>y,O=n.stackMinHeight&&l[x]||0,w=I?y+O:y-O,D=I?C+O:C-O;let v=0;return(n.minHeight||n.minHeight1Px)&&Math.abs(D-w)<((b=n.minHeight)!==null&&b!==void 0?b:1)&&(v=((T=n.minHeight)!==null&&T!==void 0?T:1)-Math.abs(D-w),n.stackMinHeight&&(l[x]=O+v)),{x:M,y0:w,y1:I?D+v:D-v}})),u=h.length-1,f=[...h].reverse(),d=this.g.selectAll(`.${Wn}`).data(f),g=d.enter().append("path").attr("class",Wn).attr("d",m=>this._areaGen(m)||this._emptyPath()).style("opacity",0).style("fill",(m,_)=>Zt(i,n.color,u-_)),p=St(g.merge(d),r).style("opacity",(m,_)=>m.some(b=>b.y0-b.y1!==0)?tt(i,n.opacity,u-_):0).style("fill",(m,_)=>Zt(i,n.color,u-_)).style("cursor",(m,_)=>tr(i,n.cursor,u-_));r?p.attrTween("d",(_,x,b)=>{const T=Tt(b[x]).attr("d"),M=this._areaGen(_)||this._emptyPath();return Io(T,M)}):p.attr("d",m=>this._areaGen(m)||this._emptyPath()),St(d.exit(),r).style("opacity",0).remove(),n.line&&this._renderLines(r,h)}_renderLines(e,n){var i;const{config:r,datamodel:{data:s}}=this,o=n.length-1,a=[...n].reverse(),c=(i=r.lineColor)!==null&&i!==void 0?i:r.color,l=this.g.selectAll(`.${xr}`).data(a),h=this.g.selectAll(`.${Wn}`).nodes(),u=l.enter().insert("path",(g,p)=>h[p+1]).attr("class",xr).attr("stroke",(g,p)=>Zt(s,c,o-p)).attr("stroke-width",r.lineWidth).attr("stroke-opacity",0),f=St(u.merge(l),e).attr("stroke",(g,p)=>Zt(s,c,o-p)).attr("stroke-width",r.lineWidth).attr("stroke-opacity",1).attr("cursor",(g,p)=>tr(s,r.cursor,o-p)).style("stroke-dasharray",(g,p)=>{var m,_;return(_=(m=Cr(s,r.lineDashArray,p))===null||m===void 0?void 0:m.join(" "))!==null&&_!==void 0?_:null}),d=Bo[r.curveType];this._lineGen=Sc().x(g=>g.x).y(g=>g.y1).curve(d),e?f.attrTween("d",(p,m,_)=>{const x=Tt(_[m]).attr("d")||this._emptyLinePath(),b=this._lineGen(p)||this._emptyLinePath();return Io(x,b)}):f.attr("d",g=>this._lineGen(g)||this._emptyLinePath()),St(l.exit(),e).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=he(n.y)?n.y:[n.y],s=this.xScale.domain(),o=e?la(i.data,s,n.x,!0):i.data;return $h(o,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}_emptyLinePath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}}Ni.selectors=t_;const qc=Symbol("componentAccessorKey"),jc=Symbol("tooltipAccessorKey"),Zc=Symbol("crosshairAccessorKey"),Qc=Symbol("axisAccessorKey"),e_=Symbol("annotationsAccessorKey");function Oi(t,e){return fe(t,e)}function xn(t){const e=ll(),n=e.attrs;return z(()=>{const i={},r=e?.vnode.props??{};return Object.keys(r).forEach(s=>{i[hs(s)]=t[hs(s)]}),{...i,...n}})}const n_=q({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=qo(n),r=xn(n),s=Me(),o=hl({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=Me();return Kt(i,()=>{s.value&&s.value.setData(i.value,!0)}),ul(()=>{var c;o.components.map(l=>l.config),(c=s.value)==null||c.updateContainer({...Ri(r.value),...Ri(o)})}),hn(()=>{a.value&&(s.value=new Dg(a.value,{...Ri(o)},i.value))}),fn(()=>{var c;return(c=s.value)==null?void 0:c.destroy()}),Pe(qc,{data:i,update:c=>o.components=[...o.components,c],destroy:()=>{var c;return o.components=(c=o.components)==null?void 0:c.filter(l=>!l.isDestroyed())}}),Pe(Qc,{data:i,update:c=>o[`${c.config.type}Axis`]=c,destroy:c=>{o[`${c}Axis`]=void 0}}),Pe(Zc,{data:i,update:c=>o.crosshair=c,destroy:()=>{o.crosshair=void 0}}),Pe(jc,{data:i,update:c=>o.tooltip=c,destroy:()=>{o.tooltip=void 0}}),Pe(e_,{data:i,update:c=>o.annotations=c,destroy:()=>{o.annotations=void 0}}),e({component:s}),(c,l)=>(N(),P("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[ct(c.$slots,"default")],512))}}),i_={"data-vis-component":""},r_=q({__name:"index",props:{color:{type:[Function,String,Array,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},minHeight1Px:{type:Boolean},minHeight:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=gi(qc),i=t,r=z(()=>n.data.value??i.data),s=xn(i),o=Me();return hn(()=>{mi(()=>{var a;o.value=new Ni(s.value),(a=o.value)==null||a.setData(r.value),n.update(o.value)})}),fn(()=>{var a;(a=o.value)==null||a.destroy(),n.destroy()}),Kt(s,(a,c)=>{var l;Oi(a,c)||(l=o.value)==null||l.setConfig(s.value)}),Kt(r,()=>{var a;(a=o.value)==null||a.setData(r.value)}),e({component:o}),(a,c)=>(N(),P("div",i_))}}),s_={"data-vis-axis":""},Vo=q({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=gi(Qc),i=t,r=z(()=>n.data.value??i.data),s=xn(i),o=Me();return hn(()=>{mi(()=>{var a;o.value=new Wc(s.value),(a=o.value)==null||a.setData(r.value),n.update(o.value)})}),fn(()=>{var a;(a=o.value)==null||a.destroy(),n.destroy(i.type)}),Kt(s,(a,c)=>{var l;Oi(a,c)||(l=o.value)==null||l.setConfig(s.value)}),Kt(r,()=>{var a;(a=o.value)==null||a.setData(r.value)}),e({component:o}),(a,c)=>(N(),P("div",s_))}}),o_={"data-vis-crosshair":""},a_=q({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=gi(Zc),i=t,r=z(()=>n.data.value??i.data),s=xn(i),o=Me();return hn(()=>{mi(()=>{var a;o.value=new Gc(s.value),(a=o.value)==null||a.setData(r.value),n.update(o.value)})}),fn(()=>{var a;(a=o.value)==null||a.destroy(),n.destroy()}),Kt(s,(a,c)=>{var l;Oi(a,c)||(l=o.value)==null||l.setConfig(s.value)}),Kt(r,()=>{var a;(a=o.value)==null||a.setData(r.value)}),e({component:o}),(a,c)=>(N(),P("div",o_))}}),c_={"data-vis-tooltip":""},l_=q({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(t,{expose:e}){const n=gi(jc),i=xn(t),r=Me();return hn(()=>{mi(()=>{r.value=new _c(i.value),n.update(r.value)})}),fn(()=>{var s;(s=r.value)==null||s.destroy(),n.destroy()}),Kt(i,(s,o)=>{var a;Oi(s,o)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(s,o)=>(N(),P("div",c_))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend],[data-vis-flow-legend],[data-vis-rolling-pin-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const u_={light:"",dark:".dark"},[h_,f_]=fl("Chart"),d_=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}),p_=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}),g_=new Intl.NumberFormat("en-US",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}),m_=new Intl.DateTimeFormat("en-CA",{day:"2-digit",month:"2-digit",year:"numeric"}),__=new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",timeZone:"UTC",year:"numeric"});function un(t){return typeof t=="number"&&Number.isFinite(t)?t:0}function xv(t){return Math.round(t*1e6)/1e6}function Go(t){return Array.from(new Set(t.filter(Boolean)))}function bt(t){return d_.format(un(t))}function ne(t){return p_.format(un(t))}function v_(t){return g_.format(un(t))}function bv(t,e,n){const i=Math.max(un(t),0),r=Math.max(un(e),0);if(r===0)return i===0?{trend:"0.0%",trendTone:"neutral"}:{trend:`+${n(i)}`,trendTone:"up"};const s=(i-r)/r;return{trend:x_(s),trendTone:b_(s)}}function Kc(t){const e=m_.formatToParts(t),n=e.find(s=>s.type==="year")?.value??"0000",i=e.find(s=>s.type==="month")?.value??"01",r=e.find(s=>s.type==="day")?.value??"01";return`${n}-${i}-${r}`}function y_(t){const e=new Date(t);return Number.isNaN(e.getTime())?t:Kc(e)}function wv(t){const[e,n,i]=t.split("-").map(s=>Number.parseInt(s,10)),r=new Date(e||0,(n||1)-1,i||1);return r.setDate(r.getDate()-1),Kc(r)}function kv(t,e=t){const[n,i,r]=t.split("-").map(s=>Number.parseInt(s,10));return!n||!i||!r?e:__.format(new Date(Date.UTC(n,i-1,r)))}function Sv(t){const e=new Map;for(const i of t){const r=e.get(i.project)??{costUSD:0,repository:i.repository,sessions:0,tokenTotal:0};r.costUSD+=i.costUSD,r.sessions+=1,r.tokenTotal+=i.tokenTotal,e.set(i.project,r)}const n=Math.max(...Array.from(e.values()).map(i=>i.costUSD),0);return Array.from(e.entries()).map(([i,r])=>({costUSD:r.costUSD,detail:`${r.sessions} sessions / ${bt(r.tokenTotal)} tokens`,label:i,percent:n>0?r.costUSD/n*100:0,repository:r.repository,sessions:r.sessions,tokenTotal:r.tokenTotal,tone:"amber",value:ne(r.costUSD)})).sort((i,r)=>r.costUSD-i.costUSD)}function Tv(t){const e=new Map;for(const n of t){const i=y_(n.date),r=e.get(i)??{cachedInputTokens:0,costUSD:0,id:i,inputTokens:0,label:n.date,models:[],outputTokens:0,period:n.date,projects:[],reasoningOutputTokens:0,sessionCount:0,totalTokens:0};r.cachedInputTokens+=n.cachedInputTokens,r.costUSD+=n.costUSD,r.inputTokens+=n.inputTokens,r.models=Go([...r.models,n.model]),r.outputTokens+=n.outputTokens,r.projects=Go([...r.projects,n.project]),r.reasoningOutputTokens+=n.reasoningOutputTokens,r.sessionCount+=1,r.totalTokens+=n.tokenTotal,e.set(i,r)}return Array.from(e.values()).sort((n,i)=>i.id.localeCompare(n.id))}function x_(t){return`${t>0?"+":""}${v_(t)}`}function b_(t){return t>0?"up":t<0?"down":"neutral"}const w_={class:"mt-4 flex flex-wrap items-center justify-center gap-3 text-xs text-muted-foreground"},k_={class:"font-medium text-foreground tabular-nums"},S_=q({name:"StatisticalAnalysisModelUsagePanel",__name:"ModelUsagePanel",props:{monthlyItems:{},year:{}},setup(t){const e=t,n=["#2563eb","#f97316","#0891b2","#8b5cf6","#059669","#f43f5e"],i={bottom:32,left:56,right:12,top:8},r=[0,void 0],s=z(()=>e.year??I(e.monthlyItems)??new Date().getFullYear()),o=z(()=>Array.from({length:12},(v,k)=>{const E=`${k+1}`.padStart(2,"0");return`${s.value}-${E}`})),a=z(()=>[0,Math.max(o.value.length-1,0)]),c=z(()=>o.value.map((v,k)=>k)),l=z(()=>e.monthlyItems.filter(v=>v.month.startsWith(`${s.value}-`))),h=z(()=>Array.from(new Set(l.value.map(v=>v.model)))),u=z(()=>o.value.map((v,k)=>{const E=Object.fromEntries(h.value.map(B=>[B,l.value.find(Y=>Y.month===v&&Y.model===B)?.tokenTotal??0]));return{month:v,monthIndex:k,tokensByModel:E,totalTokens:Object.values(E).reduce((B,Y)=>B+Y,0)}})),f=z(()=>h.value.map((v,k)=>{const E=w(k),B=u.value.reduce((Y,Wt)=>Y+(Wt.tokensByModel[v]??0),0);return{color:E,model:v,totalLabel:bt(B),totalTokens:B}}).sort((v,k)=>k.totalTokens-v.totalTokens)),d=z(()=>f.value.map(v=>k=>k.tokensByModel[v.model]??0)),g=z(()=>Object.fromEntries(f.value.map(v=>[v.model,{color:v.color,label:v.model}]))),p=z(()=>f.value.map(v=>`
|
|
258
|
+
<linearGradient id="${O(v.model)}" x1="0" y1="0" x2="0" y2="1">
|
|
259
|
+
<stop offset="0%" stop-color="${v.color}" stop-opacity="0.45" />
|
|
260
|
+
<stop offset="100%" stop-color="${v.color}" stop-opacity="0.08" />
|
|
261
|
+
</linearGradient>
|
|
262
|
+
`).join(""));function m(v){return v.monthIndex}function _(v,k){const E=f.value[k];return E?`url(#${O(E.model)})`:w(0)}function x(v,k){return f.value[k]?.color??w(0)}function b(v,k){return f.value[k]?.color??w(0)}function T(v){const k=f.value.map(E=>({...E,tokenTotal:v.tokensByModel[E.model]??0})).sort((E,B)=>B.tokenTotal-E.tokenTotal);return`
|
|
263
|
+
<div class="grid min-w-48 gap-2 rounded-md border bg-background px-3 py-2 text-xs shadow-lg">
|
|
264
|
+
<div class="font-medium text-foreground">${C(v.month)} ${v.month.slice(0,4)}</div>
|
|
265
|
+
<div class="grid gap-1 text-muted-foreground">
|
|
266
|
+
${k.map(E=>`
|
|
267
|
+
<div class="flex items-center justify-between gap-4">
|
|
268
|
+
<span class="flex items-center gap-2">
|
|
269
|
+
<span class="size-2 rounded-sm" style="background-color: ${E.color}"></span>
|
|
270
|
+
${D(E.model)}
|
|
271
|
+
</span>
|
|
272
|
+
<span class="font-mono font-medium text-foreground">${bt(E.tokenTotal)}</span>
|
|
273
|
+
</div>
|
|
274
|
+
`).join("")}
|
|
275
|
+
</div>
|
|
276
|
+
<div class="flex justify-between gap-4 border-t pt-2 text-muted-foreground">
|
|
277
|
+
<span>Total</span>
|
|
278
|
+
<span class="font-mono font-semibold text-foreground">${bt(v.totalTokens)}</span>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
`}function M(v){if(v instanceof Date)return"";const k=o.value[v];return k?C(k):""}function y(v){return v instanceof Date?"":bt(v)}function C(v){const[k,E]=v.split("-"),B=new Date(Number(k),Number(E)-1,1);return new Intl.DateTimeFormat("en-US",{month:"short"}).format(B)}function I(v){const E=[...v].sort((B,Y)=>Y.month.localeCompare(B.month))[0]?.month?.split("-")[0];return E?Number(E):null}function O(v){return`model-usage-${v.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`}function w(v){return n[v%n.length]??"#2563eb"}function D(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}return(v,k)=>{const E=El,B=_i;return N(),ge(B,{description:"Monthly token trends by model",icon:"solar:cpu-line-duotone",title:"Model Usage"},{default:kt(()=>[ut(E,{class:"h-72 w-full",config:R(g)},{default:kt(()=>[ut(R(n_),{"auto-margin":!1,data:R(u),height:288,margin:i,"svg-defs":R(p),"x-domain":R(a),"y-domain":r},{default:kt(()=>[ut(R(r_),{color:_,line:!0,"line-color":x,"line-width":2.5,opacity:.82,x:m,y:R(d)},null,8,["y"]),ut(R(Vo),{"grid-line":!1,"tick-format":M,"tick-values":R(c),type:"x"},null,8,["tick-values"]),ut(R(Vo),{"num-ticks":4,"tick-format":y,type:"y"}),ut(R(l_)),ut(R(a_),{color:b,template:T,x:m,"y-stacked":R(d)},null,8,["y-stacked"])]),_:1},8,["data","svg-defs","x-domain"])]),_:1},8,["config"]),F("div",w_,[(N(!0),P(Gt,null,Xt(R(f),Y=>(N(),P("div",{key:Y.model,class:"flex items-center gap-2"},[F("span",{class:"size-2.5 rounded-sm",style:je({backgroundColor:Y.color})},null,4),F("span",null,j(Y.model),1),F("span",k_,j(Y.totalLabel),1)]))),128))])]),_:1})}}}),Cv=Object.assign(S_,{__name:"StatisticalAnalysisModelUsagePanel"}),T_={class:"space-y-3"},C_={class:"flex flex-col flex-1"},M_={class:"truncate text-sm font-medium tracking-tight"},A_={class:"mt-1 truncate text-xs text-muted-foreground"},$_={class:"text-right"},D_={class:"text-xs font-medium tracking-tight tabular-nums"},E_={class:"mt-1 flex items-center justify-end gap-1"},F_=q({name:"StatisticalAnalysisProjectUsagePanel",__name:"ProjectUsagePanel",props:{items:{}},setup(t){const e=t,n=[{trend:"+12.4%",trendTone:"up"},{trend:"-8.2%",trendTone:"down"},{trend:"+22.1%",trendTone:"up"},{trend:"+15.8%",trendTone:"up"},{trend:"-3.4%",trendTone:"down"},{trend:"+9.6%",trendTone:"up"},{trend:"-5.1%",trendTone:"down"},{trend:"+4.7%",trendTone:"up"}],i=z(()=>e.items.slice(0,6).map((c,l)=>{const h=n[l]??{trend:"+0.0%",trendTone:"up"};return{...c,shortName:a(c.label),trend:h.trend,trendTone:h.trendTone}}));function r(c){return c==="down"?"lucide:trending-down":"lucide:trending-up"}function s(c){return c==="down"?"size-3 text-red-500":"size-3 text-emerald-600 dark:text-emerald-400"}function o(c){return c==="down"?"text-sm font-medium text-red-500 tabular-nums":"text-sm font-medium text-emerald-600 dark:text-emerald-400 tabular-nums"}function a(c){return c.split(/[-_\s]+/).filter(Boolean).slice(0,2).map(l=>l[0]?.toUpperCase()??"").join("")}return(c,l)=>{const h=br,u=_i;return N(),ge(u,{description:"Best performers by spend",icon:"lucide:folder-git-2",title:"Top Projects"},{default:kt(()=>[F("div",T_,[(N(!0),P(Gt,null,Xt(R(i),f=>(N(),P("div",{key:f.repository,class:"flex justify-between items-center gap-3 rounded-md transition-colors"},[F("div",C_,[F("p",M_,j(f.label),1),F("p",A_,j(f.detail),1)]),F("div",$_,[F("p",D_,j(f.value),1),F("div",E_,[ut(h,{class:Z(s(f.trendTone)),mode:"svg",name:r(f.trendTone)},null,8,["class","name"]),F("span",{class:Z(o(f.trendTone))},j(f.trend),3)])])]))),128))])]),_:1})}}}),Mv=Object.assign(F_,{__name:"StatisticalAnalysisProjectUsagePanel"}),N_={class:"mb-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},O_={class:"text-xs text-muted-foreground"},R_={class:"mt-1 text-lg font-semibold tabular-nums"},I_={class:"border-b pb-4"},B_=["aria-label","tabindex"],P_={class:"sr-only"},L_={key:0,class:"pointer-events-none absolute bottom-full left-1/2 z-30 mb-2 hidden min-w-40 -translate-x-1/2 gap-1 rounded-md border bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-md group-hover:grid group-focus-visible:grid",role:"tooltip"},U_={class:"font-medium"},z_={key:0,class:"flex items-center justify-between gap-4 text-muted-foreground"},H_={class:"font-mono font-medium text-foreground"},W_={class:"flex items-center justify-between gap-4 text-muted-foreground"},Y_={class:"font-mono font-medium text-foreground"},V_={key:1,class:"flex items-center justify-between gap-4 text-muted-foreground"},G_={class:"font-mono font-medium text-foreground"},X_={class:"mt-4 flex items-center justify-between gap-4"},q_={class:"text-xs text-muted-foreground"},j_={class:"flex items-center gap-1 text-xs text-muted-foreground"},Z_={class:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-3"},Q_={class:"text-xs text-muted-foreground"},K_={class:"mt-1 flex items-center justify-between gap-2"},J_={class:"text-sm font-semibold"},tv={class:"text-xs text-muted-foreground"},ev=q({name:"UsageHeatmapPanel",__name:"UsageHeatmapPanel",props:{heatMetric:{default:"tokens"},items:{},title:{}},setup(t){const e=t,n=["bg-zinc-100 dark:bg-zinc-800/80","bg-emerald-50 dark:bg-emerald-950/70","bg-emerald-100 dark:bg-emerald-900/70","bg-teal-100 dark:bg-teal-900/75","bg-teal-200 dark:bg-teal-800/80","bg-cyan-200 dark:bg-cyan-800/85","bg-cyan-300 dark:bg-cyan-700/90","bg-sky-300 dark:bg-sky-600/90","bg-sky-400 dark:bg-sky-500/95","bg-blue-500 dark:bg-blue-400"],i=[...n],r=[{key:"sun",label:"S",row:"1"},{key:"mon",label:"M",row:"2"},{key:"tue",label:"T",row:"3"},{key:"wed",label:"W",row:"4"},{key:"thu",label:"T",row:"5"},{key:"fri",label:"F",row:"6"},{key:"sat",label:"S",row:"7"}],s=z(()=>y(new Date)),o=z(()=>{const w=y(s.value);return w.setDate(w.getDate()-364),w}),a=z(()=>`${I(o.value)} - ${I(s.value)}`),c=z(()=>e.heatMetric==="cost"?"spend":"tokens"),l=z(()=>`${a.value} ${c.value} heatmap. Darker cells mean higher daily ${c.value}.`),h=z(()=>`Colored by daily ${c.value}`),u=z(()=>{const w=new Map(e.items.map(D=>[C(M(D.date)),D]));return Array.from({length:365},(D,v)=>{const k=y(o.value);return k.setDate(k.getDate()+v),{date:k,usage:w.get(C(k))}})}),f=z(()=>{const w=Math.max(...u.value.map(D=>e.heatMetric==="cost"?D.usage?.costUSD??0:D.usage?.totalTokens??0));return u.value.map(D=>{const v=D.usage?.costUSD??0,k=D.usage?.totalTokens??0,E=e.heatMetric==="cost"?v:k;return{colorClass:n[O(E,w)],costLabel:ne(v),costUSD:v,date:I(D.date),hasUsage:!!D.usage,tokenLabel:bt(k),totalTokens:k}})}),d=z(()=>{const w=o.value.getDay(),D=(7-(w+f.value.length)%7)%7,v=Array.from({length:w},(B,Y)=>({column:String(Math.floor(Y/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`blank-${Y}`,row:String(Y%7+1),title:"No date",tokenLabel:""})),k=f.value.map((B,Y)=>({...B,column:String(Math.floor((w+Y)/7)+2),isBlank:!1,key:B.date,row:String((w+Y)%7+1),title:e.heatMetric==="cost"?`${B.date}: ${ne(B.costUSD)} / ${bt(B.totalTokens)} tokens`:`${B.date}: ${bt(B.totalTokens)} tokens / ${ne(B.costUSD)}`})),E=Array.from({length:D},(B,Y)=>({column:String(Math.floor((w+f.value.length+Y)/7)+2),colorClass:"bg-transparent",costLabel:"",date:"",isBlank:!0,key:`trailing-blank-${Y}`,row:String((w+f.value.length+Y)%7+1),title:"No date",tokenLabel:""}));return[...v,...k,...E]}),g=z(()=>Math.ceil(d.value.length/7)),p=z(()=>({gridTemplateColumns:`max-content repeat(${g.value}, minmax(0, 1fr))`,gridTemplateRows:"repeat(7, minmax(0, 1fr))"})),m=z(()=>f.value.filter(w=>w.hasUsage).slice(-3)),_=z(()=>f.value.filter(w=>w.hasUsage).length),x=z(()=>ne(f.value.reduce((w,D)=>w+D.costUSD,0))),b=z(()=>bt(f.value.reduce((w,D)=>w+D.totalTokens,0))),T=z(()=>e.heatMetric==="cost"?[{key:"year-cost",label:"Year Spend",value:x.value},{key:"year-tokens",label:"Year Tokens",value:b.value},{key:"active-days",label:"Active Days",value:String(_.value)}]:[{key:"year-tokens",label:"Year Tokens",value:b.value},{key:"year-cost",label:"Year Spend",value:x.value},{key:"active-days",label:"Active Days",value:String(_.value)}]);function M(w){return new Date(w)}function y(w){return new Date(w.getFullYear(),w.getMonth(),w.getDate())}function C(w){const D=w.getFullYear(),v=`${w.getMonth()+1}`.padStart(2,"0"),k=`${w.getDate()}`.padStart(2,"0");return`${D}-${v}-${k}`}function I(w){return new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"short",year:"numeric"}).format(w)}function O(w,D){return w<=0||D<=0?0:Math.min(9,Math.max(1,Math.ceil(w/D*9)))}return(w,D)=>{const v=_i;return N(),ge(v,{description:l.value,icon:"lucide:calendar-days",title:e.title},{default:kt(()=>[F("div",N_,[(N(!0),P(Gt,null,Xt(T.value,k=>(N(),P("div",{key:k.key,class:"rounded-md border px-3 py-2"},[F("p",O_,j(k.label),1),F("p",R_,j(k.value),1)]))),128))]),F("div",I_,[F("div",{class:"grid w-full gap-1",style:je(p.value)},[(N(),P(Gt,null,Xt(r,k=>F("span",{key:k.key,class:"flex items-center justify-end pr-1 text-[10px] text-muted-foreground",style:je({gridColumn:"1",gridRow:k.row})},j(k.label),5)),64)),(N(!0),P(Gt,null,Xt(d.value,k=>(N(),P("div",{key:k.key,class:Z(["group relative aspect-square w-full max-w-3 justify-self-center rounded-sm border border-black/5 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 dark:border-white/10",[k.colorClass,{"border-transparent opacity-0":k.isBlank}]]),"aria-label":k.title,style:je({gridColumn:k.column,gridRow:k.row}),tabindex:k.isBlank?-1:0},[F("span",P_,j(k.title),1),k.isBlank?we("",!0):(N(),P("div",L_,[F("span",U_,j(k.date),1),e.heatMetric==="tokens"?(N(),P("span",z_,[D[0]||(D[0]=F("span",null,"Tokens",-1)),F("span",H_,j(k.tokenLabel),1)])):we("",!0),F("span",W_,[D[1]||(D[1]=F("span",null,"Cost",-1)),F("span",Y_,j(k.costLabel),1)]),e.heatMetric==="cost"?(N(),P("span",V_,[D[2]||(D[2]=F("span",null,"Tokens",-1)),F("span",G_,j(k.tokenLabel),1)])):we("",!0),D[3]||(D[3]=F("span",{class:"absolute top-full left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rotate-45 border-r border-b border-border bg-popover"},null,-1))]))],14,B_))),128))],4),F("div",X_,[F("p",q_,j(h.value),1),F("div",j_,[D[4]||(D[4]=F("span",null,"Less",-1)),(N(),P(Gt,null,Xt(i,k=>F("span",{key:k,class:Z(["size-3 rounded-[2px] border border-black/5 dark:border-white/10",k])},null,2)),64)),D[5]||(D[5]=F("span",null,"More",-1))])])]),F("div",Z_,[(N(!0),P(Gt,null,Xt(m.value,k=>(N(),P("div",{key:k.date,class:"rounded-md border px-3 py-2"},[F("p",Q_,j(k.date),1),F("div",K_,[F("span",J_,j(e.heatMetric==="cost"?("formatCurrency"in w?w.formatCurrency:R(ne))(k.costUSD):("formatCompactNumber"in w?w.formatCompactNumber:R(bt))(k.totalTokens)),1),F("span",tv,j(e.heatMetric==="cost"?("formatCompactNumber"in w?w.formatCompactNumber:R(bt))(k.totalTokens):("formatCurrency"in w?w.formatCurrency:R(ne))(k.costUSD)),1)])]))),128))])]),_:1},8,["description","title"])}}}),Av=Object.assign(ev,{__name:"UsageHeatmapPanel"}),nv={"data-slot":"table-container",class:"relative w-full overflow-auto"},$v=q({__name:"Table",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("div",nv,[F("table",{"data-slot":"table",class:Z(R(at)("w-full caption-bottom text-sm",e.class))},[ct(n.$slots,"default")],2)]))}}),Dv=q({__name:"TableBody",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("tbody",{"data-slot":"table-body",class:Z(R(at)("[&_tr:last-child]:border-0",e.class))},[ct(n.$slots,"default")],2))}}),Ev=q({__name:"TableCell",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("td",{"data-slot":"table-cell",class:Z(R(at)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e.class))},[ct(n.$slots,"default")],2))}}),Fv=q({__name:"TableRow",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("tr",{"data-slot":"table-row",class:Z(R(at)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e.class))},[ct(n.$slots,"default")],2))}}),Nv=q({__name:"TableHead",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("th",{"data-slot":"table-head",class:Z(R(at)("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e.class))},[ct(n.$slots,"default")],2))}}),Ov=q({__name:"TableHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(t){const e=t;return(n,i)=>(N(),P("thead",{"data-slot":"table-header",class:Z(R(at)("[&_tr]:border-b",e.class))},[ct(n.$slots,"default")],2))}});(function(){function t(){}return t.AddUnsigned=function(e,n){var i,r,s,o,a;return s=e&2147483648,o=n&2147483648,i=e&1073741824,r=n&1073741824,a=(e&1073741823)+(n&1073741823),i&r?a^2147483648^s^o:i|r?a&1073741824?a^3221225472^s^o:a^1073741824^s^o:a^s^o},t.FF=function(e,n,i,r,s,o,a){return e=this.AddUnsigned(e,this.AddUnsigned(this.AddUnsigned(this.F(n,i,r),s),a)),this.AddUnsigned(this.RotateLeft(e,o),n)},t.GG=function(e,n,i,r,s,o,a){return e=this.AddUnsigned(e,this.AddUnsigned(this.AddUnsigned(this.G(n,i,r),s),a)),this.AddUnsigned(this.RotateLeft(e,o),n)},t.HH=function(e,n,i,r,s,o,a){return e=this.AddUnsigned(e,this.AddUnsigned(this.AddUnsigned(this.H(n,i,r),s),a)),this.AddUnsigned(this.RotateLeft(e,o),n)},t.II=function(e,n,i,r,s,o,a){return e=this.AddUnsigned(e,this.AddUnsigned(this.AddUnsigned(this.I(n,i,r),s),a)),this.AddUnsigned(this.RotateLeft(e,o),n)},t.ConvertToWordArray=function(e){for(var n,i=e.length,r=i+8,s=(r-r%64)/64,o=(s+1)*16,a=Array(o-1),c=0,l=0;l<i;)n=(l-l%4)/4,c=l%4*8,a[n]=a[n]|e.charCodeAt(l)<<c,l++;return n=(l-l%4)/4,c=l%4*8,a[n]=a[n]|128<<c,a[o-2]=i<<3,a[o-1]=i>>>29,a},t.WordToHex=function(e){var n="",i="",r,s;for(s=0;s<=3;s++)r=e>>>s*8&255,i="0"+r.toString(16),n=n+i.substr(i.length-2,2);return n},t.Utf8Encode=function(e){var n="",i;e=e.replace(/\r\n/g,`
|
|
282
|
+
`);for(var r=0;r<e.length;r++)i=e.charCodeAt(r),i<128?n+=String.fromCharCode(i):i>127&&i<2048?(n+=String.fromCharCode(i>>6|192),n+=String.fromCharCode(i&63|128)):(n+=String.fromCharCode(i>>12|224),n+=String.fromCharCode(i>>6&63|128),n+=String.fromCharCode(i&63|128));return n},t.init=function(e){var n;for(typeof e!="string"&&(e=JSON.stringify(e)),this._string=this.Utf8Encode(e),this.x=this.ConvertToWordArray(this._string),this.a=1732584193,this.b=4023233417,this.c=2562383102,this.d=271733878,this.k=0;this.k<this.x.length;this.k+=16)this.AA=this.a,this.BB=this.b,this.CC=this.c,this.DD=this.d,this.a=this.FF(this.a,this.b,this.c,this.d,this.x[this.k],this.S11,3614090360),this.d=this.FF(this.d,this.a,this.b,this.c,this.x[this.k+1],this.S12,3905402710),this.c=this.FF(this.c,this.d,this.a,this.b,this.x[this.k+2],this.S13,606105819),this.b=this.FF(this.b,this.c,this.d,this.a,this.x[this.k+3],this.S14,3250441966),this.a=this.FF(this.a,this.b,this.c,this.d,this.x[this.k+4],this.S11,4118548399),this.d=this.FF(this.d,this.a,this.b,this.c,this.x[this.k+5],this.S12,1200080426),this.c=this.FF(this.c,this.d,this.a,this.b,this.x[this.k+6],this.S13,2821735955),this.b=this.FF(this.b,this.c,this.d,this.a,this.x[this.k+7],this.S14,4249261313),this.a=this.FF(this.a,this.b,this.c,this.d,this.x[this.k+8],this.S11,1770035416),this.d=this.FF(this.d,this.a,this.b,this.c,this.x[this.k+9],this.S12,2336552879),this.c=this.FF(this.c,this.d,this.a,this.b,this.x[this.k+10],this.S13,4294925233),this.b=this.FF(this.b,this.c,this.d,this.a,this.x[this.k+11],this.S14,2304563134),this.a=this.FF(this.a,this.b,this.c,this.d,this.x[this.k+12],this.S11,1804603682),this.d=this.FF(this.d,this.a,this.b,this.c,this.x[this.k+13],this.S12,4254626195),this.c=this.FF(this.c,this.d,this.a,this.b,this.x[this.k+14],this.S13,2792965006),this.b=this.FF(this.b,this.c,this.d,this.a,this.x[this.k+15],this.S14,1236535329),this.a=this.GG(this.a,this.b,this.c,this.d,this.x[this.k+1],this.S21,4129170786),this.d=this.GG(this.d,this.a,this.b,this.c,this.x[this.k+6],this.S22,3225465664),this.c=this.GG(this.c,this.d,this.a,this.b,this.x[this.k+11],this.S23,643717713),this.b=this.GG(this.b,this.c,this.d,this.a,this.x[this.k],this.S24,3921069994),this.a=this.GG(this.a,this.b,this.c,this.d,this.x[this.k+5],this.S21,3593408605),this.d=this.GG(this.d,this.a,this.b,this.c,this.x[this.k+10],this.S22,38016083),this.c=this.GG(this.c,this.d,this.a,this.b,this.x[this.k+15],this.S23,3634488961),this.b=this.GG(this.b,this.c,this.d,this.a,this.x[this.k+4],this.S24,3889429448),this.a=this.GG(this.a,this.b,this.c,this.d,this.x[this.k+9],this.S21,568446438),this.d=this.GG(this.d,this.a,this.b,this.c,this.x[this.k+14],this.S22,3275163606),this.c=this.GG(this.c,this.d,this.a,this.b,this.x[this.k+3],this.S23,4107603335),this.b=this.GG(this.b,this.c,this.d,this.a,this.x[this.k+8],this.S24,1163531501),this.a=this.GG(this.a,this.b,this.c,this.d,this.x[this.k+13],this.S21,2850285829),this.d=this.GG(this.d,this.a,this.b,this.c,this.x[this.k+2],this.S22,4243563512),this.c=this.GG(this.c,this.d,this.a,this.b,this.x[this.k+7],this.S23,1735328473),this.b=this.GG(this.b,this.c,this.d,this.a,this.x[this.k+12],this.S24,2368359562),this.a=this.HH(this.a,this.b,this.c,this.d,this.x[this.k+5],this.S31,4294588738),this.d=this.HH(this.d,this.a,this.b,this.c,this.x[this.k+8],this.S32,2272392833),this.c=this.HH(this.c,this.d,this.a,this.b,this.x[this.k+11],this.S33,1839030562),this.b=this.HH(this.b,this.c,this.d,this.a,this.x[this.k+14],this.S34,4259657740),this.a=this.HH(this.a,this.b,this.c,this.d,this.x[this.k+1],this.S31,2763975236),this.d=this.HH(this.d,this.a,this.b,this.c,this.x[this.k+4],this.S32,1272893353),this.c=this.HH(this.c,this.d,this.a,this.b,this.x[this.k+7],this.S33,4139469664),this.b=this.HH(this.b,this.c,this.d,this.a,this.x[this.k+10],this.S34,3200236656),this.a=this.HH(this.a,this.b,this.c,this.d,this.x[this.k+13],this.S31,681279174),this.d=this.HH(this.d,this.a,this.b,this.c,this.x[this.k],this.S32,3936430074),this.c=this.HH(this.c,this.d,this.a,this.b,this.x[this.k+3],this.S33,3572445317),this.b=this.HH(this.b,this.c,this.d,this.a,this.x[this.k+6],this.S34,76029189),this.a=this.HH(this.a,this.b,this.c,this.d,this.x[this.k+9],this.S31,3654602809),this.d=this.HH(this.d,this.a,this.b,this.c,this.x[this.k+12],this.S32,3873151461),this.c=this.HH(this.c,this.d,this.a,this.b,this.x[this.k+15],this.S33,530742520),this.b=this.HH(this.b,this.c,this.d,this.a,this.x[this.k+2],this.S34,3299628645),this.a=this.II(this.a,this.b,this.c,this.d,this.x[this.k],this.S41,4096336452),this.d=this.II(this.d,this.a,this.b,this.c,this.x[this.k+7],this.S42,1126891415),this.c=this.II(this.c,this.d,this.a,this.b,this.x[this.k+14],this.S43,2878612391),this.b=this.II(this.b,this.c,this.d,this.a,this.x[this.k+5],this.S44,4237533241),this.a=this.II(this.a,this.b,this.c,this.d,this.x[this.k+12],this.S41,1700485571),this.d=this.II(this.d,this.a,this.b,this.c,this.x[this.k+3],this.S42,2399980690),this.c=this.II(this.c,this.d,this.a,this.b,this.x[this.k+10],this.S43,4293915773),this.b=this.II(this.b,this.c,this.d,this.a,this.x[this.k+1],this.S44,2240044497),this.a=this.II(this.a,this.b,this.c,this.d,this.x[this.k+8],this.S41,1873313359),this.d=this.II(this.d,this.a,this.b,this.c,this.x[this.k+15],this.S42,4264355552),this.c=this.II(this.c,this.d,this.a,this.b,this.x[this.k+6],this.S43,2734768916),this.b=this.II(this.b,this.c,this.d,this.a,this.x[this.k+13],this.S44,1309151649),this.a=this.II(this.a,this.b,this.c,this.d,this.x[this.k+4],this.S41,4149444226),this.d=this.II(this.d,this.a,this.b,this.c,this.x[this.k+11],this.S42,3174756917),this.c=this.II(this.c,this.d,this.a,this.b,this.x[this.k+2],this.S43,718787259),this.b=this.II(this.b,this.c,this.d,this.a,this.x[this.k+9],this.S44,3951481745),this.a=this.AddUnsigned(this.a,this.AA),this.b=this.AddUnsigned(this.b,this.BB),this.c=this.AddUnsigned(this.c,this.CC),this.d=this.AddUnsigned(this.d,this.DD);return n=this.WordToHex(this.a)+this.WordToHex(this.b)+this.WordToHex(this.c)+this.WordToHex(this.d),n.toLowerCase()},t.x=Array(),t.S11=7,t.S12=12,t.S13=17,t.S14=22,t.S21=5,t.S22=9,t.S23=14,t.S24=20,t.S31=4,t.S32=11,t.S33=16,t.S34=23,t.S41=6,t.S42=10,t.S43=15,t.S44=21,t.RotateLeft=function(e,n){return e<<n|e>>>32-n},t.F=function(e,n,i){return e&n|~e&i},t.G=function(e,n,i){return e&i|n&~i},t.H=function(e,n,i){return e^n^i},t.I=function(e,n,i){return n^(e|~i)},t})();function Rv(t){return t.toLocaleString("en-US")}const iv={class:"grid grid-cols-1 gap-4 md:grid-cols-12"},rv=q({name:"DashboardPanelGrid",__name:"PanelGrid",setup(t){return(e,n)=>(N(),P("div",iv,[ct(e.$slots,"default")]))}}),Iv=Object.assign(rv,{__name:"DashboardPanelGrid"}),sv={class:"grow container mx-auto space-y-8"},ov=q({name:"DashboardPage",__name:"Page",setup(t){return(e,n)=>(N(),P("div",sv,[ct(e.$slots,"default")]))}}),Bv=Object.assign(ov,{__name:"DashboardPage"});export{Ii as $,_v as A,mv as B,ma as C,pv as D,uv as E,hv as F,dv as G,yv as H,vv as I,xc as J,Q as K,mn as L,ts as M,he as N,To as O,tt as P,ms as Q,gs as R,$e as S,se as T,Eh as U,tr as V,Zt as W,Ai as X,lv as Y,$h as Z,Fv as _,Ev as a,qt as a0,pc as a1,Be as a2,Eg as a3,Fg as a4,Im as a5,xn as a6,qc as a7,jc as a8,e_ as a9,Oi as aa,n_ as ab,Vo as ac,l_ as ad,El as ae,v_ as af,Kc as ag,wv as ah,bv as ai,Sv as aj,y_ as ak,kv as al,xv as am,_i as b,$v as c,Ov as d,Nv as e,Dv as f,Rv as g,ne as h,bt as i,Bv as j,cv as k,Iv as l,Cv as m,Mv as n,Av as o,Tv as p,nn as q,es as r,St as s,fv as t,dl as u,gv as v,yc as w,it as x,Mo as y,Co as z};
|