vuechrts 0.0.9 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Base/Area.vue.d.ts +25 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8396 -10
- package/dist/index.umd.cjs +363 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
@@ -1 +1,363 @@
|
|
1
|
-
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.VueChrts={},t.Vue))})(this,function(t,e){"use strict";const o=e.defineComponent({__name:"AreaChart",props:{data:{},categories:{},xLabel:{},yLabel:{},displayProps:{},xFormatter:{type:Function},generateChartTooltip:{type:Function}},setup(n){const r=n;return(a,i)=>{const s=e.resolveComponent("BaseArea");return e.openBlock(),e.createBlock(s,e.mergeProps(r,{"cross-hair-template":a.generateChartTooltip}),null,16,["cross-hair-template"])}}});t.AreaChart=o,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
1
|
+
(function(Ot,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],m):(Ot=typeof globalThis<"u"?globalThis:Ot||self,m(Ot.VueChrts={},Ot.Vue))})(this,function(Ot,m){"use strict";var gi="http://www.w3.org/1999/xhtml";const Jr={svg:"http://www.w3.org/2000/svg",xhtml:gi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ke(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Jr.hasOwnProperty(e)?{space:Jr[e],local:t}:t}function Pl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===gi&&e.documentElement.namespaceURI===gi?e.createElement(t):e.createElementNS(n,t)}}function zl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kr(t){var e=Ke(t);return(e.local?zl:Pl)(e)}function Ll(){}function mi(t){return t==null?Ll:function(){return this.querySelector(t)}}function Il(t){typeof t!="function"&&(t=mi(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,u=0;u<s;++u)(l=o[u])&&(c=t.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),a[u]=c);return new et(i,this._parents)}function Bl(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ul(){return[]}function to(t){return t==null?Ul:function(){return this.querySelectorAll(t)}}function Hl(t){return function(){return Bl(t.apply(this,arguments))}}function Wl(t){typeof t=="function"?t=Hl(t):t=to(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new et(i,r)}function eo(t){return function(){return this.matches(t)}}function no(t){return function(e){return e.matches(t)}}var Yl=Array.prototype.find;function Vl(t){return function(){return Yl.call(this.children,t)}}function Xl(){return this.firstElementChild}function ql(t){return this.select(t==null?Xl:Vl(typeof t=="function"?t:no(t)))}var Gl=Array.prototype.filter;function jl(){return Array.from(this.children)}function Zl(t){return function(){return Gl.call(this.children,t)}}function Ql(t){return this.selectAll(t==null?jl:Zl(typeof t=="function"?t:no(t)))}function Jl(t){typeof t!="function"&&(t=eo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new et(i,this._parents)}function io(t){return new Array(t.length)}function Kl(){return new et(this._enter||this._groups.map(io),this._parents)}function tn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}tn.prototype={constructor:tn,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 tc(t){return function(){return t}}function ec(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new tn(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function nc(t,e,n,i,r,o,s){var a,l,c=new Map,u=e.length,f=o.length,h=new Array(u),d;for(a=0;a<u;++a)(l=e[a])&&(h[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<f;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new tn(t,o[a]);for(a=0;a<u;++a)(l=e[a])&&c.get(h[a])===l&&(r[a]=l)}function ic(t){return t.__data__}function rc(t,e){if(!arguments.length)return Array.from(this,ic);var n=e?nc:ec,i=this._parents,r=this._groups;typeof t!="function"&&(t=tc(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var u=i[c],f=r[c],h=f.length,d=oc(t.call(u,u&&u.__data__,c,i)),g=d.length,p=a[c]=new Array(g),_=s[c]=new Array(g),y=l[c]=new Array(h);n(u,f,p,_,y,d,e);for(var x=0,v=0,M,k;x<g;++x)if(M=p[x]){for(x>=v&&(v=x+1);!(k=_[v])&&++v<g;);M._next=k||null}}return s=new et(s,i),s._enter=a,s._exit=l,s}function oc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function sc(){return new et(this._exit||this._groups.map(io),this._parents)}function ac(t,e,n){var i=this.enter(),r=this,o=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?o.remove():n(o),i&&r?i.merge(r).order():r}function lc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],u=i[l],f=c.length,h=a[l]=new Array(f),d,g=0;g<f;++g)(d=c[g]||u[g])&&(h[g]=d);for(;l<r;++l)a[l]=n[l];return new et(a,this._parents)}function cc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function uc(t){t||(t=fc);function e(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,u=0;u<a;++u)(c=s[u])&&(l[u]=c);l.sort(e)}return new et(r,this._parents).order()}function fc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function hc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function dc(){return Array.from(this)}function pc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function gc(){let t=0;for(const e of this)++t;return t}function mc(){return!this.node()}function _c(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function yc(t){return function(){this.removeAttribute(t)}}function vc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xc(t,e){return function(){this.setAttribute(t,e)}}function bc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function wc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function kc(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 Tc(t,e){var n=Ke(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?vc:yc:typeof e=="function"?n.local?kc:wc:n.local?bc:xc)(n,e))}function ro(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Sc(t){return function(){this.style.removeProperty(t)}}function Cc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Mc(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Ac(t,e,n){return arguments.length>1?this.each((e==null?Sc:typeof e=="function"?Mc:Cc)(t,e,n??"")):re(this.node(),t)}function re(t,e){return t.style.getPropertyValue(e)||ro(t).getComputedStyle(t,null).getPropertyValue(e)}function $c(t){return function(){delete this[t]}}function Ec(t,e){return function(){this[t]=e}}function Nc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oc(t,e){return arguments.length>1?this.each((e==null?$c:typeof e=="function"?Nc:Ec)(t,e)):this.node()[t]}function oo(t){return t.trim().split(/^|\s+/)}function _i(t){return t.classList||new so(t)}function so(t){this._node=t,this._names=oo(t.getAttribute("class")||"")}so.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 ao(t,e){for(var n=_i(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function lo(t,e){for(var n=_i(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Dc(t){return function(){ao(this,t)}}function Rc(t){return function(){lo(this,t)}}function Fc(t,e){return function(){(e.apply(this,arguments)?ao:lo)(this,t)}}function Pc(t,e){var n=oo(t+"");if(arguments.length<2){for(var i=_i(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Fc:e?Dc:Rc)(n,e))}function zc(){this.textContent=""}function Lc(t){return function(){this.textContent=t}}function Ic(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Bc(t){return arguments.length?this.each(t==null?zc:(typeof t=="function"?Ic:Lc)(t)):this.node().textContent}function Uc(){this.innerHTML=""}function Hc(t){return function(){this.innerHTML=t}}function Wc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Yc(t){return arguments.length?this.each(t==null?Uc:(typeof t=="function"?Wc:Hc)(t)):this.node().innerHTML}function Vc(){this.nextSibling&&this.parentNode.appendChild(this)}function Xc(){return this.each(Vc)}function qc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Gc(){return this.each(qc)}function jc(t){var e=typeof t=="function"?t:Kr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Zc(){return null}function Qc(t,e){var n=typeof t=="function"?t:Kr(t),i=e==null?Zc:typeof e=="function"?e:mi(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Jc(){var t=this.parentNode;t&&t.removeChild(this)}function Kc(){return this.each(Jc)}function tu(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function nu(t){return this.select(t?eu:tu)}function iu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ru(t){return function(e){t.call(this,e,this.__data__)}}function ou(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 su(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function au(t,e,n){return function(){var i=this.__on,r,o=ru(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function lu(t,e,n){var i=ou(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,u;l<c;++l)for(r=0,u=a[l];r<o;++r)if((s=i[r]).type===u.type&&s.name===u.name)return u.value}return}for(a=e?au:su,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function co(t,e,n){var i=ro(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 cu(t,e){return function(){return co(this,t,e)}}function uu(t,e){return function(){return co(this,t,e.apply(this,arguments))}}function fu(t,e){return this.each((typeof e=="function"?uu:cu)(t,e))}function*hu(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var uo=[null];function et(t,e){this._groups=t,this._parents=e}function we(){return new et([[document.documentElement]],uo)}function du(){return this}et.prototype=we.prototype={constructor:et,select:Il,selectAll:Wl,selectChild:ql,selectChildren:Ql,filter:Jl,data:rc,enter:Kl,exit:sc,join:ac,merge:lc,selection:du,order:cc,sort:uc,call:hc,nodes:dc,node:pc,size:gc,empty:mc,each:_c,attr:Tc,style:Ac,property:Oc,classed:Pc,text:Bc,html:Yc,raise:Xc,lower:Gc,append:jc,insert:Qc,remove:Kc,clone:nu,datum:iu,on:lu,dispatch:fu,[Symbol.iterator]:hu};function Z(t){return typeof t=="string"?new et([[document.querySelector(t)]],[document.documentElement]):new et([[t]],uo)}function pu(t){let e;for(;e=t.sourceEvent;)t=e;return t}function en(t,e){if(t=pu(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 ke;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(ke||(ke={}));var oe;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(oe||(oe={}));function Te(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function gu(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function nn(t){let e,n,i;t.length!==2?(e=Te,n=(a,l)=>Te(t(a),l),i=(a,l)=>t(a)-l):(e=t===Te||t===gu?t:mu,n=t,i=t);function r(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const f=c+u>>>1;n(a[f],l)<0?c=f+1:u=f}while(c<u)}return c}function o(a,l,c=0,u=a.length){if(c<u){if(e(l,l)!==0)return u;do{const f=c+u>>>1;n(a[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function s(a,l,c=0,u=a.length){const f=r(a,l,c,u-1);return f>c&&i(a[f-1],l)>-i(a[f],l)?f-1:f}return{left:r,center:s,right:o}}function mu(){return 0}function fo(t){return t===null?NaN:+t}const rn=nn(Te).right;nn(fo).center;function _u(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 ho extends Map{constructor(e,n=xu){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(po(this,e))}has(e){return super.has(po(this,e))}set(e,n){return super.set(yu(this,e),n)}delete(e){return super.delete(vu(this,e))}}function po({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function yu({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function vu({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function xu(t){return t!==null&&typeof t=="object"?t.valueOf():t}const bu=Math.sqrt(50),wu=Math.sqrt(10),ku=Math.sqrt(2);function on(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=bu?10:o>=wu?5:o>=ku?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?on(t,e,n*2):[a,l,c]}function yi(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?on(e,t,n):on(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function vi(t,e,n){return e=+e,t=+t,n=+n,on(t,e,n)[2]}function xi(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?vi(e,t,n):vi(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function go(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 mo(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 Tu(t,e,n=fo){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,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Su(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 o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Cu(t){for(const e of t)yield*e}function Mu(t){return Array.from(Cu(t))}function Au(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,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function $u(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 Eu(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,u,f=!1,h=0;function d(){u&&clearTimeout(u)}function g(_){var y=_||{},x=y.upcomingOnly,v=x===void 0?!1:x;d(),f=!v}function p(){for(var _=arguments.length,y=new Array(_),x=0;x<_;x++)y[x]=arguments[x];var v=this,M=Date.now()-h;if(f)return;function k(){h=Date.now(),e.apply(v,y)}function w(){u=void 0}!a&&c&&!u&&k(),d(),c===void 0&&M>t?a?(h=Date.now(),o||(u=setTimeout(c?w:k,t))):k():o!==!0&&(u=setTimeout(c?w:k,c===void 0?t-M:t))}return p.cancel=g,p}const kt=t=>typeof t=="number",bi=t=>typeof t=="function",It=t=>Array.isArray(t),Nu=t=>t instanceof Object,sn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",_o=t=>Nu(t)&&!It(t)&&!bi(t)&&!sn(t),Se=(t,e,n=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(n.has(t))return!0;n.add(t);for(let i=0;i<t.length;i++)if(!Se(t[i],e[i],n))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;if(Object.keys(t).length!==Object.keys(e).length)return!1;if(n.has(t))return!0;n.add(t);for(const r in t)if(!Se(t[r],e[r],n))return!1;return!0}return t===e},wi=t=>t.flat(),an=(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):an(i,e));return n}if(sn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):an(i[o],e),r),n),n}return t},Bt=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=sn(t)?t:an(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(_o(t[r])&&_o(e[r])?i[r]=Bt(t[r],e[r],n):sn(e)?i[r]=e:i[r]=an(e[r]))}),i)},ln=(t,e,n)=>Eu(e,t);function ki(t,e,n){return bi(e)?e(t,n):e}function cn(t,e,n){return ki(t,e,n)}function W(t,e,n){return ki(t,e,n)}function Ce(t){return t.filter(e=>e&&!kt(e))}function Dt(t,e,n){return Math.min(Math.max(t,e),n)}function Ou(t,...e){if(!t)return[void 0,void 0];if(It(e)){let n=0,i=0;return t.forEach((r,o)=>{let s=0,a=0;for(const l of e){const c=W(r,l,o)||0;c>=0?s+=c:a+=c}s>i&&(i=s),a<n&&(n=a)}),[n,i]}}function Du(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=W(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Ru(t,e,n,i){const r=t.map((a,l)=>W(a,e,l)||0),o=n.map((a,l)=>{const c=Su(t,(u,f)=>W(u,a,f)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],u=r[l];n.forEach((f,h)=>{const d=W(a,f,l)||0;o[h]?s[h].push([u,u+=d]):s[h].push([c,c+=d])})}),s.forEach((a,l)=>{a.negative=o[l]}),s.filter(a=>a.negative).forEach((a,l,c)=>{a.ending=l===c.length-1}),s.filter(a=>!a.negative).forEach((a,l,c)=>{a.ending=l===c.length-1}),s}function Fu(t,...e){return t?mo(t,(i,r)=>mo(e,o=>W(i,o,r))):void 0}function Pu(t,...e){return t?go(t,(i,r)=>go(e,o=>W(i,o,r))):void 0}function Ti(t,...e){return[Fu(t,...e),Pu(t,...e)]}function zu(t,e,n){if(t.length<=1)return t[0];const i=t.map((s,a)=>W(s,n,a));i.sort((s,a)=>s-a);const r=nn(s=>s).left,o=r(i,e,1,t.length-1);return e-i[o-1]>i[o]-e?t[o]:t[o-1]}function yo(t,e,n){return t.filter((r,o)=>{const s=W(r,n,o);return s>=e[0]&&s<=e[1]})}var Ut=[],Lu=function(){return Ut.some(function(t){return t.activeTargets.length>0})},Iu=function(){return Ut.some(function(t){return t.skippedTargets.length>0})},vo="ResizeObserver loop completed with undelivered notifications.",Bu=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:vo}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=vo),window.dispatchEvent(t)},Me;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Me||(Me={}));var Ht=function(t){return Object.freeze(t)},Uu=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ht(this)}return t}(),xo=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,Ht(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Si=function(t){return t instanceof SVGElement&&"getBBox"in t},bo=function(t){if(Si(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},wo=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Hu=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},Ae=typeof window<"u"?window:{},un=new WeakMap,ko=/auto|scroll/,Wu=/^tb|vertical/,Yu=/msie|trident/i.test(Ae.navigator&&Ae.navigator.userAgent),_t=function(t){return parseFloat(t||"0")},se=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Uu((n?e:t)||0,(n?t:e)||0)},To=Ht({devicePixelContentBoxSize:se(),borderBoxSize:se(),contentBoxSize:se(),contentRect:new xo(0,0,0,0)}),So=function(t,e){if(e===void 0&&(e=!1),un.has(t)&&!e)return un.get(t);if(bo(t))return un.set(t,To),To;var n=getComputedStyle(t),i=Si(t)&&t.ownerSVGElement&&t.getBBox(),r=!Yu&&n.boxSizing==="border-box",o=Wu.test(n.writingMode||""),s=!i&&ko.test(n.overflowY||""),a=!i&&ko.test(n.overflowX||""),l=i?0:_t(n.paddingTop),c=i?0:_t(n.paddingRight),u=i?0:_t(n.paddingBottom),f=i?0:_t(n.paddingLeft),h=i?0:_t(n.borderTopWidth),d=i?0:_t(n.borderRightWidth),g=i?0:_t(n.borderBottomWidth),p=i?0:_t(n.borderLeftWidth),_=f+c,y=l+u,x=p+d,v=h+g,M=a?t.offsetHeight-v-t.clientHeight:0,k=s?t.offsetWidth-x-t.clientWidth:0,w=r?_+x:0,T=r?y+v:0,I=i?i.width:_t(n.width)-w-k,P=i?i.height:_t(n.height)-T-M,ct=I+_+k+x,A=P+y+M+v,U=Ht({devicePixelContentBoxSize:se(Math.round(I*devicePixelRatio),Math.round(P*devicePixelRatio),o),borderBoxSize:se(ct,A,o),contentBoxSize:se(I,P,o),contentRect:new xo(f,l,I,P)});return un.set(t,U),U},Co=function(t,e,n){var i=So(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case Me.DEVICE_PIXEL_CONTENT_BOX:return s;case Me.BORDER_BOX:return r;default:return o}},Vu=function(){function t(e){var n=So(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ht([n.borderBoxSize]),this.contentBoxSize=Ht([n.contentBoxSize]),this.devicePixelContentBoxSize=Ht([n.devicePixelContentBoxSize])}return t}(),Mo=function(t){if(bo(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Xu=function(){var t=1/0,e=[];Ut.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var u=new Vu(c.target),f=Mo(c.target);a.push(u),c.lastReportedSize=Co(c.target,c.observedBox),f<t&&(t=f)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},Ao=function(t){Ut.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Mo(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},qu=function(){var t=0;for(Ao(t);Lu();)t=Xu(),Ao(t);return Iu()&&Bu(),t>0},Ci,$o=[],Gu=function(){return $o.splice(0).forEach(function(t){return t()})},ju=function(t){if(!Ci){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return Gu()}).observe(n,i),Ci=function(){n.textContent="".concat(e?e--:e++)}}$o.push(t),Ci()},Zu=function(t){ju(function(){requestAnimationFrame(t)})},fn=0,Qu=function(){return!!fn},Ju=250,Ku={attributes:!0,characterData:!0,childList:!0,subtree:!0},Eo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],No=function(t){return t===void 0&&(t=0),Date.now()+t},Mi=!1,tf=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=Ju),!Mi){Mi=!0;var i=No(e);Zu(function(){var r=!1;try{r=qu()}finally{if(Mi=!1,e=i-No(),!Qu())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,Ku)};document.body?n():Ae.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Eo.forEach(function(n){return Ae.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Eo.forEach(function(n){return Ae.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Ai=new tf,Oo=function(t){!fn&&t>0&&Ai.start(),fn+=t,!fn&&Ai.stop()},ef=function(t){return!Si(t)&&!Hu(t)&&getComputedStyle(t).display==="inline"},nf=function(){function t(e,n){this.target=e,this.observedBox=n||Me.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Co(this.target,this.observedBox,!0);return ef(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),rf=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),hn=new WeakMap,Do=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},dn=function(){function t(){}return t.connect=function(e,n){var i=new rf(e,n);hn.set(e,i)},t.observe=function(e,n,i){var r=hn.get(e),o=r.observationTargets.length===0;Do(r.observationTargets,n)<0&&(o&&Ut.push(r),r.observationTargets.push(new nf(n,i&&i.box)),Oo(1),Ai.schedule())},t.unobserve=function(e,n){var i=hn.get(e),r=Do(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&Ut.splice(Ut.indexOf(i),1),i.observationTargets.splice(r,1),Oo(-1))},t.disconnect=function(e){var n=this,i=hn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}(),of=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.");dn.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(!wo(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");dn.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(!wo(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");dn.unobserve(this,e)},t.prototype.disconnect=function(){dn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const sf=globalThis.ResizeObserver||of,Ro={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:oe.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class $e{constructor(e){this._defaultConfig=Ro,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=Z(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",$e.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=Bt(this._defaultConfig,e),(e==null?void 0: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;Z(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||$e.DEFAULT_CONTAINER_HEIGHT}get width(){return Dt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Dt(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===oe.Fit||e.sizing===oe.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 sf((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!Se(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,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()}}$e.DEFAULT_CONTAINER_HEIGHT=300;function af(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 lf(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 cf=function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),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(lf(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=af(r);try{o.insertRule(i,o.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}(),j="-ms-",pn="-moz-",O="-webkit-",Fo="comm",$i="rule",Ei="decl",uf="@import",Po="@keyframes",ff="@layer",hf=Math.abs,gn=String.fromCharCode,df=Object.assign;function pf(t,e){return q(t,0)^45?(((e<<2^q(t,0))<<2^q(t,1))<<2^q(t,2))<<2^q(t,3):0}function zo(t){return t.trim()}function gf(t,e){return(t=e.exec(t))?t[0]:t}function D(t,e,n){return t.replace(e,n)}function Ni(t,e){return t.indexOf(e)}function q(t,e){return t.charCodeAt(e)|0}function Ee(t,e,n){return t.slice(e,n)}function yt(t){return t.length}function Oi(t){return t.length}function mn(t,e){return e.push(t),t}function mf(t,e){return t.map(e).join("")}var _n=1,ae=1,Lo=0,Q=0,H=0,le="";function yn(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:_n,column:ae,length:s,return:""}}function Ne(t,e){return df(yn("",null,null,"",null,null,0),t,{length:-t.length},e)}function _f(){return H}function yf(){return H=Q>0?q(le,--Q):0,ae--,H===10&&(ae=1,_n--),H}function nt(){return H=Q<Lo?q(le,Q++):0,ae++,H===10&&(ae=1,_n++),H}function vt(){return q(le,Q)}function vn(){return Q}function Oe(t,e){return Ee(le,t,e)}function De(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 Io(t){return _n=ae=1,Lo=yt(le=t),Q=0,[]}function Bo(t){return le="",t}function xn(t){return zo(Oe(Q-1,Di(t===91?t+2:t===40?t+1:t)))}function vf(t){for(;(H=vt())&&H<33;)nt();return De(t)>2||De(H)>3?"":" "}function xf(t,e){for(;--e&&nt()&&!(H<48||H>102||H>57&&H<65||H>70&&H<97););return Oe(t,vn()+(e<6&&vt()==32&&nt()==32))}function Di(t){for(;nt();)switch(H){case t:return Q;case 34:case 39:t!==34&&t!==39&&Di(H);break;case 40:t===41&&Di(t);break;case 92:nt();break}return Q}function bf(t,e){for(;nt()&&t+H!==57;)if(t+H===84&&vt()===47)break;return"/*"+Oe(e,Q-1)+"*"+gn(t===47?t:nt())}function wf(t){for(;!De(vt());)nt();return Oe(t,Q)}function kf(t){return Bo(bn("",null,null,null,[""],t=Io(t),0,[0],t))}function bn(t,e,n,i,r,o,s,a,l){for(var c=0,u=0,f=s,h=0,d=0,g=0,p=1,_=1,y=1,x=0,v="",M=r,k=o,w=i,T=v;_;)switch(g=x,x=nt()){case 40:if(g!=108&&q(T,f-1)==58){Ni(T+=D(xn(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:T+=xn(x);break;case 9:case 10:case 13:case 32:T+=vf(g);break;case 92:T+=xf(vn()-1,7);continue;case 47:switch(vt()){case 42:case 47:mn(Tf(bf(nt(),vn()),e,n),l);break;default:T+="/"}break;case 123*p:a[c++]=yt(T)*y;case 125*p:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+u:y==-1&&(T=D(T,/\f/g,"")),d>0&&yt(T)-f&&mn(d>32?Ho(T+";",i,n,f-1):Ho(D(T," ","")+";",i,n,f-2),l);break;case 59:T+=";";default:if(mn(w=Uo(T,e,n,c,u,r,a,v,M=[],k=[],f),o),x===123)if(u===0)bn(T,e,w,w,M,o,f,a,k);else switch(h===99&&q(T,3)===110?100:h){case 100:case 108:case 109:case 115:bn(t,w,w,i&&mn(Uo(t,w,w,0,0,r,a,v,r,M=[],f),k),r,k,f,a,i?M:k);break;default:bn(T,w,w,w,[""],k,0,a,k)}}c=u=d=0,p=y=1,v=T="",f=s;break;case 58:f=1+yt(T),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&yf()==125)continue}switch(T+=gn(x),x*p){case 38:y=u>0?1:(T+="\f",-1);break;case 44:a[c++]=(yt(T)-1)*y,y=1;break;case 64:vt()===45&&(T+=xn(nt())),h=vt(),u=f=yt(v=T+=wf(vn())),x++;break;case 45:g===45&&yt(T)==2&&(p=0)}}return o}function Uo(t,e,n,i,r,o,s,a,l,c,u){for(var f=r-1,h=r===0?o:[""],d=Oi(h),g=0,p=0,_=0;g<i;++g)for(var y=0,x=Ee(t,f+1,f=hf(p=s[g])),v=t;y<d;++y)(v=zo(p>0?h[y]+" "+x:D(x,/&\f/g,h[y])))&&(l[_++]=v);return yn(t,e,n,r===0?$i:a,l,c,u)}function Tf(t,e,n){return yn(t,e,n,Fo,gn(_f()),Ee(t,2,-2),0)}function Ho(t,e,n,i){return yn(t,e,n,Ei,Ee(t,0,i),Ee(t,i+1,-1),i)}function ce(t,e){for(var n="",i=Oi(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Sf(t,e,n,i){switch(t.type){case ff:if(t.children.length)break;case uf:case Ei:return t.return=t.return||t.value;case Fo:return"";case Po:return t.return=t.value+"{"+ce(t.children,i)+"}";case $i:t.value=t.props.join(",")}return yt(n=ce(t.children,i))?t.return=t.value+"{"+n+"}":""}function Cf(t){var e=Oi(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Mf(t){return function(e){e.root||(e=e.return)&&t(e)}}function Af(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var $f=function(e,n,i){for(var r=0,o=0;r=o,o=vt(),r===38&&o===12&&(n[i]=1),!De(o);)nt();return Oe(e,Q)},Ef=function(e,n){var i=-1,r=44;do switch(De(r)){case 0:r===38&&vt()===12&&(n[i]=1),e[i]+=$f(Q-1,n,i);break;case 2:e[i]+=xn(r);break;case 4:if(r===44){e[++i]=vt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=gn(r)}while(r=nt());return e},Nf=function(e,n){return Bo(Ef(Io(e),n))},Wo=new WeakMap,Of=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&&!Wo.get(i))&&!r){Wo.set(e,!0);for(var o=[],s=Nf(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var u=0;u<a.length;u++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[u]):a[u]+" "+s[l]}}},Df=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function Yo(t,e){switch(pf(t,e)){case 5103:return O+"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 O+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return O+t+pn+t+j+t+t;case 6828:case 4268:return O+t+j+t+t;case 6165:return O+t+j+"flex-"+t+t;case 5187:return O+t+D(t,/(\w+).+(:[^]+)/,O+"box-$1$2"+j+"flex-$1$2")+t;case 5443:return O+t+j+"flex-item-"+D(t,/flex-|-self/,"")+t;case 4675:return O+t+j+"flex-line-pack"+D(t,/align-content|flex-|-self/,"")+t;case 5548:return O+t+j+D(t,"shrink","negative")+t;case 5292:return O+t+j+D(t,"basis","preferred-size")+t;case 6060:return O+"box-"+D(t,"-grow","")+O+t+j+D(t,"grow","positive")+t;case 4554:return O+D(t,/([^-])(transform)/g,"$1"+O+"$2")+t;case 6187:return D(D(D(t,/(zoom-|grab)/,O+"$1"),/(image-set)/,O+"$1"),t,"")+t;case 5495:case 3959:return D(t,/(image-set\([^]*)/,O+"$1$`$1");case 4968:return D(D(t,/(.+:)(flex-)?(.*)/,O+"box-pack:$3"+j+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+O+t+t;case 4095:case 3583:case 4068:case 2532:return D(t,/(.+)-inline(.+)/,O+"$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(yt(t)-1-e>6)switch(q(t,e+1)){case 109:if(q(t,e+4)!==45)break;case 102:return D(t,/(.+:)(.+)-([^]+)/,"$1"+O+"$2-$3$1"+pn+(q(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Ni(t,"stretch")?Yo(D(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(q(t,e+1)!==115)break;case 6444:switch(q(t,yt(t)-3-(~Ni(t,"!important")&&10))){case 107:return D(t,":",":"+O)+t;case 101:return D(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+O+(q(t,14)===45?"inline-":"")+"box$3$1"+O+"$2$3$1"+j+"$2box$3")+t}break;case 5936:switch(q(t,e+11)){case 114:return O+t+j+D(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return O+t+j+D(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return O+t+j+D(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return O+t+j+t+t}return t}var Rf=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case Ei:e.return=Yo(e.value,e.length);break;case Po:return ce([Ne(e,{value:D(e.value,"@","@"+O)})],r);case $i:if(e.length)return mf(e.props,function(o){switch(gf(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ce([Ne(e,{props:[D(o,/:(read-\w+)/,":"+pn+"$1")]})],r);case"::placeholder":return ce([Ne(e,{props:[D(o,/:(plac\w+)/,":"+O+"input-$1")]}),Ne(e,{props:[D(o,/:(plac\w+)/,":"+pn+"$1")]}),Ne(e,{props:[D(o,/:(plac\w+)/,j+"input-$1")]})],r)}return""})}},Ff=[Rf],Pf=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 _=p.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Ff,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var _=p.getAttribute("data-emotion").split(" "),y=1;y<_.length;y++)o[_[y]]=!0;a.push(p)});var l,c=[Of,Df];{var u,f=[Sf,Mf(function(p){u.insert(p)})],h=Cf(c.concat(r,f)),d=function(_){return ce(kf(_),h)};l=function(_,y,x,v){u=x,d(_?_+"{"+y.styles+"}":y.styles),v&&(g.inserted[y.name]=!0)}}var g={key:n,sheet:new cf({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function zf(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 Lf={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},If=/[A-Z]|^ms/g,Bf=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vo=function(e){return e.charCodeAt(1)===45},Xo=function(e){return e!=null&&typeof e!="boolean"},Ri=Af(function(t){return Vo(t)?t:t.replace(If,"-$&").toLowerCase()}),qo=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Bf,function(i,r,o){return Rt={name:r,styles:o,next:Rt},r})}return Lf[e]!==1&&!Vo(e)&&typeof n=="number"&&n!==0?n+"px":n};function wn(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 Rt={name:r.name,styles:r.styles,next:Rt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Rt={name:s.name,styles:s.styles,next:Rt},s=s.next;var a=o.styles+";";return a}return Uf(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function Uf(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=wn(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":Xo(a)&&(i+=Ri(o)+":"+qo(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)Xo(s[l])&&(i+=Ri(o)+":"+qo(o,s[l])+";");else{var c=wn(t,e,s);switch(o){case"animation":case"animationName":{i+=Ri(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var Go=/label:\s*([^\s;{]+)\s*(;|$)/g,Rt;function Fi(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="";Rt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=wn(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=wn(n,e,t[a]),i){var l=o;r+=l[a]}Go.lastIndex=0;for(var c="",u;(u=Go.exec(r))!==null;)c+="-"+u[1];var f=zf(r)+c;return{name:f,styles:r,next:Rt}}function jo(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var Hf=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Wf=function(e,n,i){Hf(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Zo(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Qo(t,e,n){var i=[],r=jo(t,i,n);return i.length<2?n:r+e(i)}var Yf=function(e){var n=Pf(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=Fi(c,n.registered,void 0);return Wf(n,f),n.key+"-"+f.name},r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=Fi(c,n.registered),h="animation-"+f.name;return Zo(n,{name:f.name,styles:"@keyframes "+h+"{"+f.styles+"}"}),h},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=Fi(c,n.registered);Zo(n,f)},s=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return Qo(n.registered,i,Vf(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:jo.bind(null,n.registered),merge:Qo.bind(null,n.registered,i)}},Vf=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},Jo=Yf({key:"css"}),Wt=Jo.injectGlobal,R=Jo.css;function Xf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Pi,Ko;function qf(){return Ko||(Ko=1,Pi=function(e,n){n||(n=[0,""]),e=String(e);var i=parseFloat(e,10);return n[0]=i,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),Pi}var zi,ts;function Gf(){if(ts)return zi;ts=1;var t=qf();zi=r;var e=i("in",document.body);function n(o,s){var a=t(getComputedStyle(o).getPropertyValue(s));return a[0]*r(a[1],o)}function i(o,s){var a=document.createElement("div");a.style.height="128"+o,s.appendChild(a);var l=n(a,"height")/128;return s.removeChild(a),l}function r(o,s){if(!o)return null;switch(s=s||document.body,o=(o+""||"px").trim().toLowerCase(),(s===window||s===document)&&(s=document.body),o){case"%":return s.clientHeight/100;case"ch":case"ex":return i(o,s);case"em":return n(s,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var a=t(o);if(!isNaN(a[0])&&a[1]){var l=r(a[1],s);return typeof l=="number"?a[0]*l:null}return null}return zi}Gf();function es(){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()}`}function jf(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function Zf(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,u]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<u||l<s||o<a||c<i)}function Li(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ns(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Re(){}var Fe=.7,kn=1/Fe,ue="\\s*([+-]?\\d+)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qf=/^#([0-9a-f]{3,8})$/,Jf=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),Kf=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),th=new RegExp(`^rgba\\(${ue},${ue},${ue},${Pe}\\)$`),eh=new RegExp(`^rgba\\(${xt},${xt},${xt},${Pe}\\)$`),nh=new RegExp(`^hsl\\(${Pe},${xt},${xt}\\)$`),ih=new RegExp(`^hsla\\(${Pe},${xt},${xt},${Pe}\\)$`),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};Li(Re,Yt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:rs,formatHex:rs,formatHex8:rh,formatHsl:oh,formatRgb:os,toString:os});function rs(){return this.rgb().formatHex()}function rh(){return this.rgb().formatHex8()}function oh(){return us(this).formatHsl()}function os(){return this.rgb().formatRgb()}function Yt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Qf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ss(e):n===3?new J(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=Jf.exec(t))?new J(e[1],e[2],e[3],1):(e=Kf.exec(t))?new J(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=th.exec(t))?Tn(e[1],e[2],e[3],e[4]):(e=eh.exec(t))?Tn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=nh.exec(t))?cs(e[1],e[2]/100,e[3]/100,1):(e=ih.exec(t))?cs(e[1],e[2]/100,e[3]/100,e[4]):is.hasOwnProperty(t)?ss(is[t]):t==="transparent"?new J(NaN,NaN,NaN,0):null}function ss(t){return new J(t>>16&255,t>>8&255,t&255,1)}function Tn(t,e,n,i){return i<=0&&(t=e=n=NaN),new J(t,e,n,i)}function sh(t){return t instanceof Re||(t=Yt(t)),t?(t=t.rgb(),new J(t.r,t.g,t.b,t.opacity)):new J}function Ii(t,e,n,i){return arguments.length===1?sh(t):new J(t,e,n,i??1)}function J(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Li(J,Ii,ns(Re,{brighter(t){return t=t==null?kn:Math.pow(kn,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new J(Vt(this.r),Vt(this.g),Vt(this.b),Sn(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:as,formatHex:as,formatHex8:ah,formatRgb:ls,toString:ls}));function as(){return`#${Xt(this.r)}${Xt(this.g)}${Xt(this.b)}`}function ah(){return`#${Xt(this.r)}${Xt(this.g)}${Xt(this.b)}${Xt((isNaN(this.opacity)?1:this.opacity)*255)}`}function ls(){const t=Sn(this.opacity);return`${t===1?"rgb(":"rgba("}${Vt(this.r)}, ${Vt(this.g)}, ${Vt(this.b)}${t===1?")":`, ${t})`}`}function Sn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Vt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Xt(t){return t=Vt(t),(t<16?"0":"")+t.toString(16)}function cs(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ut(t,e,n,i)}function us(t){if(t instanceof ut)return new ut(t.h,t.s,t.l,t.opacity);if(t instanceof Re||(t=Yt(t)),!t)return new ut;if(t instanceof ut)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new ut(s,a,l,t.opacity)}function Bi(t,e,n,i){return arguments.length===1?us(t):new ut(t,e,n,i??1)}function ut(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Li(ut,Bi,ns(Re,{brighter(t){return t=t==null?kn:Math.pow(kn,t),new ut(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Fe:Math.pow(Fe,t),new ut(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 J(Ui(t>=240?t-240:t+120,r,i),Ui(t,r,i),Ui(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new ut(fs(this.h),Cn(this.s),Cn(this.l),Sn(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=Sn(this.opacity);return`${t===1?"hsl(":"hsla("}${fs(this.h)}, ${Cn(this.s)*100}%, ${Cn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function fs(t){return t=(t||0)%360,t<0?t+360:t}function Cn(t){return Math.max(0,Math.min(1,t||0))}function Ui(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const ze=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],lh=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Ft=t=>`--vis-${kt(t)?`color${t%ze.length}`:t}`;function ch(t,e=.4){const n=Bi(t);return n.l=n.l*(1+e),n.formatHex()}function uh(t,e=.4,n=.6){const i=Bi(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Le=10,Hi=[{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"/>'}],Wi=[{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 Pt(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const fh=t=>`<mask id="${Pt(t)}">
|
2
|
+
<pattern id="${t.id}" viewBox="0 0 10 10" width="${Le}" height="${Le}" patternUnits="userSpaceOnUse">
|
3
|
+
<rect width="100%" height="100%" fill="#fff"/>
|
4
|
+
${t.svg}
|
5
|
+
</pattern>
|
6
|
+
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${t.id})"/>
|
7
|
+
</mask>`,hh=(t,e)=>`<marker id="${Pt(t)}"
|
8
|
+
fill="var(${Ft(e)})"
|
9
|
+
markerUnits="userSpaceOnUse"
|
10
|
+
refX="5"
|
11
|
+
refY="5"
|
12
|
+
markerWidth="${Le}"
|
13
|
+
markerHeight="${Le}">
|
14
|
+
${t.marker}
|
15
|
+
</marker>`;function dh(){const t=Hi.map(fh).concat(Wi.map(hh)).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"&&dh();const hs=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,ds=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[" ","-",".",","],ps=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||"-",gs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};Wt`
|
16
|
+
:root {
|
17
|
+
label: vis-root-styles;
|
18
|
+
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
|
19
|
+
--vis-font-wh-ratio: ${hs};
|
20
|
+
--vis-color-main: var(${Ft(0)});
|
21
|
+
--vis-color-main-light: ${ch(ze[0])};
|
22
|
+
--vis-color-main-dark: ${uh(ze[0])};
|
23
|
+
--vis-color-grey: #2a2a2a;
|
24
|
+
${ze.map((t,e)=>`${Ft(e)}: ${t};`)}
|
25
|
+
${lh.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
|
26
|
+
${Hi.map((t,e)=>`
|
27
|
+
--${Pt(t)}: url(#${Pt(t)});
|
28
|
+
--vis-pattern-fill${e}: var(--${Pt(t)});
|
29
|
+
`)}
|
30
|
+
${Wi.map((t,e)=>{var n;return`
|
31
|
+
--${Pt(t)}: url(#${Pt(t)});
|
32
|
+
--vis-pattern-marker${e}: var(--${Pt(t)});
|
33
|
+
--vis-pattern-dasharray${e}: ${(n=t.dashArray)===null||n===void 0?void 0:n.join(" ")};
|
34
|
+
`})}
|
35
|
+
|
36
|
+
body.theme-dark {
|
37
|
+
${ze.map((t,e)=>`${Ft(e)}: var(--vis-dark-color${e});`)}
|
38
|
+
}
|
39
|
+
|
40
|
+
body.theme-patterns {
|
41
|
+
${Hi.map((t,e)=>`path[style*="fill: var(${Ft(e)})"] {
|
42
|
+
mask: var(--vis-pattern-fill${e});
|
43
|
+
}`)}
|
44
|
+
${Wi.map((t,e)=>`
|
45
|
+
path[stroke="var(${Ft(e)})"]:not([style*="fill"]),
|
46
|
+
path[style*="stroke: var(${Ft(e)})"]:not([style*="fill"]) {
|
47
|
+
marker: var(--vis-pattern-marker${e});
|
48
|
+
stroke-dasharray: var(--vis-pattern-dasharray${e});
|
49
|
+
}
|
50
|
+
`)}
|
51
|
+
}
|
52
|
+
`;function ph(t=window==null?void 0:window.document.body){return t?+jf("var(--vis-font-wh-ratio)",t):hs}var gh={value:()=>{}};function ms(){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 Mn(n)}function Mn(t){this._=t}function mh(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}})}Mn.prototype=ms.prototype={constructor:Mn,on:function(t,e){var n=this._,i=mh(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=_h(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=_s(n[r],t.name,e);else if(e==null)for(r in n)n[r]=_s(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 Mn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[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,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function _h(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function _s(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=gh,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var fe=0,Ie=0,Be=0,ys=1e3,An,Ue,$n=0,qt=0,En=0,He=typeof performance=="object"&&performance.now?performance:Date,vs=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Yi(){return qt||(vs(yh),qt=He.now()+En)}function yh(){qt=0}function Nn(){this._call=this._time=this._next=null}Nn.prototype=xs.prototype={constructor:Nn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Yi():+n)+(e==null?0:+e),!this._next&&Ue!==this&&(Ue?Ue._next=this:An=this,Ue=this),this._call=t,this._time=n,Vi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vi())}};function xs(t,e,n){var i=new Nn;return i.restart(t,e,n),i}function vh(){Yi(),++fe;for(var t=An,e;t;)(e=qt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fe}function bs(){qt=($n=He.now())+En,fe=Ie=0;try{vh()}finally{fe=0,bh(),qt=0}}function xh(){var t=He.now(),e=t-$n;e>ys&&(En-=e,$n=t)}function bh(){for(var t,e=An,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:An=n);Ue=t,Vi(i)}function Vi(t){if(!fe){Ie&&(Ie=clearTimeout(Ie));var e=t-qt;e>24?(t<1/0&&(Ie=setTimeout(bs,t-He.now()-En)),Be&&(Be=clearInterval(Be))):(Be||($n=He.now(),Be=setInterval(xh,ys)),fe=1,vs(bs))}}function ws(t,e,n){var i=new Nn;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var wh=ms("start","end","cancel","interrupt"),kh=[],ks=0,Ts=1,Xi=2,On=3,Ss=4,qi=5,Dn=6;function Rn(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Th(t,n,{name:e,index:i,group:r,on:wh,tween:kh,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ks})}function Gi(t,e){var n=ft(t,e);if(n.state>ks)throw new Error("too late; already scheduled");return n}function bt(t,e){var n=ft(t,e);if(n.state>On)throw new Error("too late; already running");return n}function ft(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Th(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=xs(o,0,n.time);function o(c){n.state=Ts,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var u,f,h,d;if(n.state!==Ts)return l();for(u in i)if(d=i[u],d.name===n.name){if(d.state===On)return ws(s);d.state===Ss?(d.state=Dn,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[u]):+u<e&&(d.state=Dn,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[u])}if(ws(function(){n.state===On&&(n.state=Ss,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Xi,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Xi){for(n.state=On,r=new Array(h=n.tween.length),u=0,f=-1;u<h;++u)(d=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++f]=d);r.length=f+1}}function a(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=qi,1),f=-1,h=r.length;++f<h;)r[f].call(t,u);n.state===qi&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Dn,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function ji(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>Xi&&i.state<qi,i.state=Dn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function Sh(t){return this.each(function(){ji(this,t)})}const Zi=t=>()=>t;function Ch(t,e){return function(n){return t+n*e}}function Mh(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 Ah(t){return(t=+t)==1?Cs:function(e,n){return n-e?Mh(e,n,t):Zi(isNaN(e)?n:e)}}function Cs(t,e){var n=e-t;return n?Ch(t,n):Zi(isNaN(t)?e:t)}const Fn=function t(e){var n=Ah(e);function i(r,o){var s=n((r=Ii(r)).r,(o=Ii(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=Cs(r.opacity,o.opacity);return function(u){return r.r=s(u),r.g=a(u),r.b=l(u),r.opacity=c(u),r+""}}return i.gamma=t,i}(1);function $h(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function Eh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Nh(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=he(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Oh(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function ht(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Dh(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]=he(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Qi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ji=new RegExp(Qi.source,"g");function Rh(t){return function(){return t}}function Fh(t){return function(e){return t(e)+""}}function Ms(t,e){var n=Qi.lastIndex=Ji.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Qi.exec(t))&&(r=Ji.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:ht(i,r)})),n=Ji.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?Fh(l[0].x):Rh(e):(e=l.length,function(c){for(var u=0,f;u<e;++u)a[(f=l[u]).i]=f.x(c);return a.join("")})}function he(t,e){var n=typeof e,i;return e==null||n==="boolean"?Zi(e):(n==="number"?ht:n==="string"?(i=Yt(e))?(e=i,Fn):Ms:e instanceof Yt?Fn:e instanceof Date?Oh:Eh(e)?$h:Array.isArray(e)?Nh:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Dh:ht)(t,e)}function Ki(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var As=180/Math.PI,tr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function $s(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*As,skewX:Math.atan(l)*As,scaleX:s,scaleY:a}}var Pn;function Ph(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tr:$s(e.a,e.b,e.c,e.d,e.e,e.f)}function zh(t){return t==null||(Pn||(Pn=document.createElementNS("http://www.w3.org/2000/svg","g")),Pn.setAttribute("transform",t),!(t=Pn.transform.baseVal.consolidate()))?tr:(t=t.matrix,$s(t.a,t.b,t.c,t.d,t.e,t.f))}function Es(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,u,f,h,d,g){if(c!==f||u!==h){var p=d.push("translate(",null,e,null,n);g.push({i:p-4,x:ht(c,f)},{i:p-2,x:ht(u,h)})}else(f||h)&&d.push("translate("+f+e+h+n)}function s(c,u,f,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:f.push(r(f)+"rotate(",null,i)-2,x:ht(c,u)})):u&&f.push(r(f)+"rotate("+u+i)}function a(c,u,f,h){c!==u?h.push({i:f.push(r(f)+"skewX(",null,i)-2,x:ht(c,u)}):u&&f.push(r(f)+"skewX("+u+i)}function l(c,u,f,h,d,g){if(c!==f||u!==h){var p=d.push(r(d)+"scale(",null,",",null,")");g.push({i:p-4,x:ht(c,f)},{i:p-2,x:ht(u,h)})}else(f!==1||h!==1)&&d.push(r(d)+"scale("+f+","+h+")")}return function(c,u){var f=[],h=[];return c=t(c),u=t(u),o(c.translateX,c.translateY,u.translateX,u.translateY,f,h),s(c.rotate,u.rotate,f,h),a(c.skewX,u.skewX,f,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,f,h),c=u=null,function(d){for(var g=-1,p=h.length,_;++g<p;)f[(_=h[g]).i]=_.x(d);return f.join("")}}}var Lh=Es(Ph,"px, ","px)","deg)"),Ih=Es(zh,", ",")",")");function Bh(t,e){e===void 0&&(e=t,t=he);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function Uh(t,e){var n,i;return function(){var r=bt(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function Hh(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=bt(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function Wh(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=ft(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?Uh:Hh)(n,t,e))}function er(t,e,n){var i=t._id;return t.each(function(){var r=bt(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return ft(r,i).value[e]}}function Ns(t,e){var n;return(typeof e=="number"?ht:e instanceof Yt?Fn:(n=Yt(e))?(e=n,Fn):Ms)(t,e)}function Yh(t){return function(){this.removeAttribute(t)}}function Vh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xh(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function qh(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function Gh(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function jh(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function Zh(t,e){var n=Ke(t),i=n==="transform"?Ih:Ns;return this.attrTween(t,typeof e=="function"?(n.local?jh:Gh)(n,i,er(this,"attr."+t,e)):e==null?(n.local?Vh:Yh)(n):(n.local?qh:Xh)(n,i,e))}function Qh(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Jh(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Kh(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&Jh(t,o)),n}return r._value=e,r}function td(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&Qh(t,o)),n}return r._value=e,r}function ed(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=Ke(t);return this.tween(n,(i.local?Kh:td)(i,e))}function nd(t,e){return function(){Gi(this,t).delay=+e.apply(this,arguments)}}function id(t,e){return e=+e,function(){Gi(this,t).delay=e}}function rd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?nd:id)(e,t)):ft(this.node(),e).delay}function od(t,e){return function(){bt(this,t).duration=+e.apply(this,arguments)}}function sd(t,e){return e=+e,function(){bt(this,t).duration=e}}function ad(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?od:sd)(e,t)):ft(this.node(),e).duration}function ld(t,e){if(typeof e!="function")throw new Error;return function(){bt(this,t).ease=e}}function cd(t){var e=this._id;return arguments.length?this.each(ld(e,t)):ft(this.node(),e).ease}function ud(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;bt(this,t).ease=n}}function fd(t){if(typeof t!="function")throw new Error;return this.each(ud(this._id,t))}function hd(t){typeof t!="function"&&(t=eo(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new Tt(i,this._parents,this._name,this._id)}function dd(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],u=l.length,f=s[a]=new Array(u),h,d=0;d<u;++d)(h=l[d]||c[d])&&(f[d]=h);for(;a<i;++a)s[a]=e[a];return new Tt(s,this._parents,this._name,this._id)}function pd(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 gd(t,e,n){var i,r,o=pd(e)?Gi:bt;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function md(t,e){var n=this._id;return arguments.length<2?ft(this.node(),n).on.on(t):this.each(gd(n,t,e))}function _d(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function yd(){return this.on("end.remove",_d(this._id))}function vd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=mi(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),u,f,h=0;h<l;++h)(u=a[h])&&(f=t.call(u,u.__data__,h,a))&&("__data__"in u&&(f.__data__=u.__data__),c[h]=f,Rn(c[h],e,n,h,c,ft(u,n)));return new Tt(o,this._parents,e,n)}function xd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=to(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,u,f=0;f<c;++f)if(u=l[f]){for(var h=t.call(u,u.__data__,f,l),d,g=ft(u,n),p=0,_=h.length;p<_;++p)(d=h[p])&&Rn(d,e,n,p,h,g);o.push(h),s.push(u)}return new Tt(o,s,e,n)}var bd=we.prototype.constructor;function wd(){return new bd(this._groups,this._parents)}function kd(t,e){var n,i,r;return function(){var o=re(this,t),s=(this.style.removeProperty(t),re(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function Os(t){return function(){this.style.removeProperty(t)}}function Td(t,e,n){var i,r=n+"",o;return function(){var s=re(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function Sd(t,e,n){var i,r,o;return function(){var s=re(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),re(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function Cd(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=bt(this,t),c=l.on,u=l.value[o]==null?a||(a=Os(e)):void 0;(c!==n||r!==u)&&(i=(n=c).copy()).on(s,r=u),l.on=i}}function Md(t,e,n){var i=(t+="")=="transform"?Lh:Ns;return e==null?this.styleTween(t,kd(t,i)).on("end.style."+t,Os(t)):typeof e=="function"?this.styleTween(t,Sd(t,i,er(this,"style."+t,e))).each(Cd(this._id,t)):this.styleTween(t,Td(t,i,e),n).on("end.style."+t,null)}function Ad(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function $d(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Ad(t,s,n)),i}return o._value=e,o}function Ed(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,$d(t,e,n??""))}function Nd(t){return function(){this.textContent=t}}function Od(t){return function(){var e=t(this);this.textContent=e??""}}function Dd(t){return this.tween("text",typeof t=="function"?Od(er(this,"text",t)):Nd(t==null?"":t+""))}function Rd(t){return function(e){this.textContent=t.call(this,e)}}function Fd(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Rd(r)),e}return i._value=t,i}function Pd(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,Fd(t))}function zd(){for(var t=this._name,e=this._id,n=Ds(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var u=ft(l,e);Rn(l,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Tt(i,this._parents,t,n)}function Ld(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=bt(this,i),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var Id=0;function Tt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Ds(){return++Id}var St=we.prototype;Tt.prototype={constructor:Tt,select:vd,selectAll:xd,selectChild:St.selectChild,selectChildren:St.selectChildren,filter:hd,merge:dd,selection:wd,transition:zd,call:St.call,nodes:St.nodes,node:St.node,size:St.size,empty:St.empty,each:St.each,on:md,attr:Zh,attrTween:ed,style:Md,styleTween:Ed,text:Dd,textTween:Pd,remove:yd,tween:Wh,delay:rd,duration:ad,ease:cd,easeVarying:fd,end:Ld,[Symbol.iterator]:St[Symbol.iterator]};const Rs=t=>+t;function Bd(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ud={time:null,delay:0,duration:250,ease:Bd};function Hd(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 Wd(t){var e,n;t instanceof Tt?(e=t._id,t=t._name):(e=Ds(),(n=Ud).time=Yi(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Rn(l,t,e,c,s,n||Hd(l,e));return new Tt(i,this._parents,t,e)}we.prototype.interrupt=Sh,we.prototype.transition=Wd;function dt(t,e,n){if(t.nodes().forEach(i=>ji(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}class nr{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var F;(function(t){t.X="x",t.Y="y"})(F||(F={}));function pt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Fs(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 Ps=Symbol("implicit");function ir(){var t=new ho,e=[],n=[],i=Ps;function r(o){let s=t.get(o);if(s===void 0){if(i!==Ps)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new ho;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return ir(e,n).unknown(i)},pt.apply(r,arguments),r}function rr(){var t=ir().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,u=.5;delete t.unknown;function f(){var h=e().length,d=r<i,g=d?r:i,p=d?i:r;o=(p-g)/Math.max(1,h-l+c*2),a&&(o=Math.floor(o)),g+=(p-g-o*(h-l))*u,s=o*(1-l),a&&(g=Math.round(g),s=Math.round(s));var _=Au(h).map(function(y){return g+o*y});return n(d?_.reverse():_)}return t.domain=function(h){return arguments.length?(e(h),f()):e()},t.range=function(h){return arguments.length?([i,r]=h,i=+i,r=+r,f()):[i,r]},t.rangeRound=function(h){return[i,r]=h,i=+i,r=+r,a=!0,f()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(h){return arguments.length?(a=!!h,f()):a},t.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),f()):l},t.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},t.paddingOuter=function(h){return arguments.length?(c=+h,f()):c},t.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),f()):u},t.copy=function(){return rr(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(u)},pt.apply(f(),arguments)}function zs(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return zs(e())},t}function Yd(){return zs(rr.apply(null,arguments).paddingInner(1))}function Vd(t){return function(){return t}}function or(t){return+t}var Ls=[0,1];function K(t){return t}function sr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Vd(isNaN(e)?NaN:.5)}function Xd(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function qd(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=sr(r,i),o=n(s,o)):(i=sr(i,r),o=n(o,s)),function(a){return o(i(a))}}function Gd(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=sr(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=rn(t,a,1,i)-1;return o[l](r[l](a))}}function We(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function zn(){var t=Ls,e=Ls,n=he,i,r,o,s=K,a,l,c;function u(){var h=Math.min(t.length,e.length);return s!==K&&(s=Xd(t[0],t[h-1])),a=h>2?Gd:qd,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?o:(l||(l=a(t.map(i),e,n)))(i(s(h)))}return f.invert=function(h){return s(r((c||(c=a(e,t.map(i),ht)))(h)))},f.domain=function(h){return arguments.length?(t=Array.from(h,or),u()):t.slice()},f.range=function(h){return arguments.length?(e=Array.from(h),u()):e.slice()},f.rangeRound=function(h){return e=Array.from(h),n=Ki,u()},f.clamp=function(h){return arguments.length?(s=h?!0:K,u()):s!==K},f.interpolate=function(h){return arguments.length?(n=h,u()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,d){return i=h,r=d,u()}}function Is(){return zn()(K,K)}function jd(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ln(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function de(t){return t=Ln(Math.abs(t)),t?t[1]:NaN}function Zd(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Qd(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Jd=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ye(t){if(!(e=Jd.exec(t)))throw new Error("invalid format: "+t);var e;return new ar({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]})}Ye.prototype=ar.prototype;function ar(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+""}ar.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 Kd(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 Bs;function tp(t,e){var n=Ln(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(Bs=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Ln(t,Math.max(0,e+o-1))[0]}function Us(t,e){var n=Ln(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 Hs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:jd,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)=>Us(t*100,e),r:Us,s:tp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ws(t){return t}var Ys=Array.prototype.map,Vs=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ep(t){var e=t.grouping===void 0||t.thousands===void 0?Ws:Zd(Ys.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+"",o=t.numerals===void 0?Ws:Qd(Ys.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(f){f=Ye(f);var h=f.fill,d=f.align,g=f.sign,p=f.symbol,_=f.zero,y=f.width,x=f.comma,v=f.precision,M=f.trim,k=f.type;k==="n"?(x=!0,k="g"):Hs[k]||(v===void 0&&(v=12),M=!0,k="g"),(_||h==="0"&&d==="=")&&(_=!0,h="0",d="=");var w=p==="$"?n:p==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",T=p==="$"?i:/[%p]/.test(k)?s:"",I=Hs[k],P=/[defgprs%]/.test(k);v=v===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function ct(A){var U=w,V=T,Lt,pi,ve;if(k==="c")V=I(A)+V,A="";else{A=+A;var xe=A<0||1/A<0;if(A=isNaN(A)?l:I(Math.abs(A),v),M&&(A=Kd(A)),xe&&+A==0&&g!=="+"&&(xe=!1),U=(xe?g==="("?g:a:g==="-"||g==="("?"":g)+U,V=(k==="s"?Vs[8+Bs/3]:"")+V+(xe&&g==="("?")":""),P){for(Lt=-1,pi=A.length;++Lt<pi;)if(ve=A.charCodeAt(Lt),48>ve||ve>57){V=(ve===46?r+A.slice(Lt+1):A.slice(Lt))+V,A=A.slice(0,Lt);break}}}x&&!_&&(A=e(A,1/0));var be=U.length+A.length+V.length,mt=be<y?new Array(y-be+1).join(h):"";switch(x&&_&&(A=e(mt+A,mt.length?y-V.length:1/0),mt=""),d){case"<":A=U+A+V+mt;break;case"=":A=U+mt+A+V;break;case"^":A=mt.slice(0,be=mt.length>>1)+U+A+V+mt.slice(be);break;default:A=mt+U+A+V;break}return o(A)}return ct.toString=function(){return f+""},ct}function u(f,h){var d=c((f=Ye(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(de(h)/3)))*3,p=Math.pow(10,-g),_=Vs[8+g/3];return function(y){return d(p*y)+_}}return{format:c,formatPrefix:u}}var In,lr,Xs;np({thousands:",",grouping:[3],currency:["$",""]});function np(t){return In=ep(t),lr=In.format,Xs=In.formatPrefix,In}function ip(t){return Math.max(0,-de(Math.abs(t)))}function rp(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(de(e)/3)))*3-de(Math.abs(t)))}function op(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,de(e)-de(t))+1}function sp(t,e,n,i){var r=xi(t,e,n),o;switch(i=Ye(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=rp(r,s))&&(i.precision=o),Xs(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=op(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=ip(r))&&(i.precision=o-(i.type==="%")*2);break}}return lr(i)}function Gt(t){var e=t.domain;return t.ticks=function(n){var i=e();return yi(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return sp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,u=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);u-- >0;){if(c=vi(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function qs(){var t=Is();return t.copy=function(){return We(t,qs())},pt.apply(t,arguments),Gt(t)}function Gs(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,or),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Gs(t).unknown(e)},t=arguments.length?Array.from(t,or):[0,1],Gt(n)}function js(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Zs(t){return Math.log(t)}function Qs(t){return Math.exp(t)}function ap(t){return-Math.log(-t)}function lp(t){return-Math.exp(-t)}function cp(t){return isFinite(t)?+("1e"+t):t<0?0:t}function up(t){return t===10?cp:t===Math.E?Math.exp:e=>Math.pow(t,e)}function fp(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 Js(t){return(e,n)=>-t(-e,n)}function hp(t){const e=t(Zs,Qs),n=e.domain;let i=10,r,o;function s(){return r=fp(i),o=up(i),n()[0]<0?(r=Js(r),o=Js(o),t(ap,lp)):t(Zs,Qs),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let h=r(c),d=r(u),g,p;const _=a==null?10:+a;let y=[];if(!(i%1)&&d-h<_){if(h=Math.floor(h),d=Math.ceil(d),c>0){for(;h<=d;++h)for(g=1;g<i;++g)if(p=h<0?g/o(-h):g*o(h),!(p<c)){if(p>u)break;y.push(p)}}else for(;h<=d;++h)for(g=i-1;g>=1;--g)if(p=h>0?g/o(-h):g*o(h),!(p<c)){if(p>u)break;y.push(p)}y.length*2<_&&(y=yi(c,u,_))}else y=yi(h,d,Math.min(d-h,_)).map(o);return f?y.reverse():y},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Ye(l)).precision==null&&(l.trim=!0),l=lr(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return u=>{let f=u/o(Math.round(r(u)));return f*i<i-.5&&(f*=i),f<=c?l(u):""}},e.nice=()=>n(js(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function Ks(){const t=hp(zn()).domain([1,10]);return t.copy=()=>We(t,Ks()).base(t.base()),pt.apply(t,arguments),t}function ta(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function ea(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function dp(t){var e=1,n=t(ta(e),ea(e));return n.constant=function(i){return arguments.length?t(ta(e=+i),ea(e)):e},Gt(n)}function na(){var t=dp(zn());return t.copy=function(){return We(t,na()).constant(t.constant())},pt.apply(t,arguments)}function ia(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function pp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function gp(t){return t<0?-t*t:t*t}function mp(t){var e=t(K,K),n=1;function i(){return n===1?t(K,K):n===.5?t(pp,gp):t(ia(n),ia(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},Gt(e)}function cr(){var t=mp(zn());return t.copy=function(){return We(t,cr()).exponent(t.exponent())},pt.apply(t,arguments),t}function _p(){return cr.apply(null,arguments).exponent(.5)}function ra(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=Tu(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[rn(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Te),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return ra().domain(t).range(e).unknown(i)},pt.apply(o,arguments)}function oa(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[rn(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return oa().domain([t,e]).range(r).unknown(o)},pt.apply(Gt(s),arguments)}function sa(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[rn(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return sa().domain(t).range(e).unknown(n)},pt.apply(r,arguments)}const ur=new Date,fr=new Date;function Y(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>Y(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(ur.setTime(+o),fr.setTime(+s),t(ur),t(fr),Math.floor(n(ur,fr))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const Bn=Y(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Bn.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Y(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Bn),Bn.range;const Ct=1e3,st=Ct*60,Mt=st*60,At=Mt*24,hr=At*7,aa=At*30,dr=At*365,jt=Y(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Ct)},(t,e)=>(e-t)/Ct,t=>t.getUTCSeconds());jt.range;const pr=Y(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ct)},(t,e)=>{t.setTime(+t+e*st)},(t,e)=>(e-t)/st,t=>t.getMinutes());pr.range;const gr=Y(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*st)},(t,e)=>(e-t)/st,t=>t.getUTCMinutes());gr.range;const mr=Y(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Ct-t.getMinutes()*st)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getHours());mr.range;const _r=Y(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getUTCHours());_r.range;const Ve=Y(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*st)/At,t=>t.getDate()-1);Ve.range;const Un=Y(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/At,t=>t.getUTCDate()-1);Un.range;const la=Y(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/At,t=>Math.floor(t/At));la.range;function Zt(t){return Y(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())*st)/hr)}const Hn=Zt(0),Wn=Zt(1),yp=Zt(2),vp=Zt(3),pe=Zt(4),xp=Zt(5),bp=Zt(6);Hn.range,Wn.range,yp.range,vp.range,pe.range,xp.range,bp.range;function Qt(t){return Y(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)/hr)}const Yn=Qt(0),Vn=Qt(1),wp=Qt(2),kp=Qt(3),ge=Qt(4),Tp=Qt(5),Sp=Qt(6);Yn.range,Vn.range,wp.range,kp.range,ge.range,Tp.range,Sp.range;const yr=Y(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());yr.range;const vr=Y(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());vr.range;const $t=Y(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());$t.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Y(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)}),$t.range;const Et=Y(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());Et.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Y(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)}),Et.range;function ca(t,e,n,i,r,o){const s=[[jt,1,Ct],[jt,5,5*Ct],[jt,15,15*Ct],[jt,30,30*Ct],[o,1,st],[o,5,5*st],[o,15,15*st],[o,30,30*st],[r,1,Mt],[r,3,3*Mt],[r,6,6*Mt],[r,12,12*Mt],[i,1,At],[i,2,2*At],[n,1,hr],[e,1,aa],[e,3,3*aa],[t,1,dr]];function a(c,u,f){const h=u<c;h&&([c,u]=[u,c]);const d=f&&typeof f.range=="function"?f:l(c,u,f),g=d?d.range(c,+u+1):[];return h?g.reverse():g}function l(c,u,f){const h=Math.abs(u-c)/f,d=nn(([,,_])=>_).right(s,h);if(d===s.length)return t.every(xi(c/dr,u/dr,f));if(d===0)return Bn.every(Math.max(xi(c,u,f),1));const[g,p]=s[h/s[d-1][2]<s[d][2]/h?d-1:d];return g.every(p)}return[a,l]}const[Cp,Mp]=ca(Et,vr,Yn,la,_r,gr),[Ap,$p]=ca($t,yr,Hn,Ve,mr,pr);function xr(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 br(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 Xe(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Ep(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=qe(r),u=Ge(r),f=qe(o),h=Ge(o),d=qe(s),g=Ge(s),p=qe(a),_=Ge(a),y=qe(l),x=Ge(l),v={a:xe,A:be,b:mt,B:Um,c:null,d:ga,e:ga,f:Kp,g:cg,G:fg,H:Zp,I:Qp,j:Jp,L:ma,m:tg,M:eg,p:Hm,q:Wm,Q:wa,s:ka,S:ng,u:ig,U:rg,V:og,w:sg,W:ag,x:null,X:null,y:lg,Y:ug,Z:hg,"%":ba},M={a:Ym,A:Vm,b:Xm,B:qm,c:null,d:ya,e:ya,f:mg,g:Cg,G:Ag,H:dg,I:pg,j:gg,L:va,m:_g,M:yg,p:Gm,q:jm,Q:wa,s:ka,S:vg,u:xg,U:bg,V:wg,w:kg,W:Tg,x:null,X:null,y:Sg,Y:Mg,Z:$g,"%":ba},k={a:ct,A,b:U,B:V,c:Lt,d:da,e:da,f:Xp,g:ha,G:fa,H:pa,I:pa,j:Hp,L:Vp,m:Up,M:Wp,p:P,q:Bp,Q:Gp,s:jp,S:Yp,u:Fp,U:Pp,V:zp,w:Rp,W:Lp,x:pi,X:ve,y:ha,Y:fa,Z:Ip,"%":qp};v.x=w(n,v),v.X=w(i,v),v.c=w(e,v),M.x=w(n,M),M.X=w(i,M),M.c=w(e,M);function w(C,$){return function(N){var b=[],tt=-1,z=0,rt=C.length,ot,ie,Fl;for(N instanceof Date||(N=new Date(+N));++tt<rt;)C.charCodeAt(tt)===37&&(b.push(C.slice(z,tt)),(ie=ua[ot=C.charAt(++tt)])!=null?ot=C.charAt(++tt):ie=ot==="e"?" ":"0",(Fl=$[ot])&&(ot=Fl(N,ie)),b.push(ot),z=tt+1);return b.push(C.slice(z,tt)),b.join("")}}function T(C,$){return function(N){var b=Xe(1900,void 0,1),tt=I(b,C,N+="",0),z,rt;if(tt!=N.length)return null;if("Q"in b)return new Date(b.Q);if("s"in b)return new Date(b.s*1e3+("L"in b?b.L:0));if($&&!("Z"in b)&&(b.Z=0),"p"in b&&(b.H=b.H%12+b.p*12),b.m===void 0&&(b.m="q"in b?b.q:0),"V"in b){if(b.V<1||b.V>53)return null;"w"in b||(b.w=1),"Z"in b?(z=br(Xe(b.y,0,1)),rt=z.getUTCDay(),z=rt>4||rt===0?Vn.ceil(z):Vn(z),z=Un.offset(z,(b.V-1)*7),b.y=z.getUTCFullYear(),b.m=z.getUTCMonth(),b.d=z.getUTCDate()+(b.w+6)%7):(z=xr(Xe(b.y,0,1)),rt=z.getDay(),z=rt>4||rt===0?Wn.ceil(z):Wn(z),z=Ve.offset(z,(b.V-1)*7),b.y=z.getFullYear(),b.m=z.getMonth(),b.d=z.getDate()+(b.w+6)%7)}else("W"in b||"U"in b)&&("w"in b||(b.w="u"in b?b.u%7:"W"in b?1:0),rt="Z"in b?br(Xe(b.y,0,1)).getUTCDay():xr(Xe(b.y,0,1)).getDay(),b.m=0,b.d="W"in b?(b.w+6)%7+b.W*7-(rt+5)%7:b.w+b.U*7-(rt+6)%7);return"Z"in b?(b.H+=b.Z/100|0,b.M+=b.Z%100,br(b)):xr(b)}}function I(C,$,N,b){for(var tt=0,z=$.length,rt=N.length,ot,ie;tt<z;){if(b>=rt)return-1;if(ot=$.charCodeAt(tt++),ot===37){if(ot=$.charAt(tt++),ie=k[ot in ua?$.charAt(tt++):ot],!ie||(b=ie(C,N,b))<0)return-1}else if(ot!=N.charCodeAt(b++))return-1}return b}function P(C,$,N){var b=c.exec($.slice(N));return b?(C.p=u.get(b[0].toLowerCase()),N+b[0].length):-1}function ct(C,$,N){var b=d.exec($.slice(N));return b?(C.w=g.get(b[0].toLowerCase()),N+b[0].length):-1}function A(C,$,N){var b=f.exec($.slice(N));return b?(C.w=h.get(b[0].toLowerCase()),N+b[0].length):-1}function U(C,$,N){var b=y.exec($.slice(N));return b?(C.m=x.get(b[0].toLowerCase()),N+b[0].length):-1}function V(C,$,N){var b=p.exec($.slice(N));return b?(C.m=_.get(b[0].toLowerCase()),N+b[0].length):-1}function Lt(C,$,N){return I(C,e,$,N)}function pi(C,$,N){return I(C,n,$,N)}function ve(C,$,N){return I(C,i,$,N)}function xe(C){return s[C.getDay()]}function be(C){return o[C.getDay()]}function mt(C){return l[C.getMonth()]}function Um(C){return a[C.getMonth()]}function Hm(C){return r[+(C.getHours()>=12)]}function Wm(C){return 1+~~(C.getMonth()/3)}function Ym(C){return s[C.getUTCDay()]}function Vm(C){return o[C.getUTCDay()]}function Xm(C){return l[C.getUTCMonth()]}function qm(C){return a[C.getUTCMonth()]}function Gm(C){return r[+(C.getUTCHours()>=12)]}function jm(C){return 1+~~(C.getUTCMonth()/3)}return{format:function(C){var $=w(C+="",v);return $.toString=function(){return C},$},parse:function(C){var $=T(C+="",!1);return $.toString=function(){return C},$},utcFormat:function(C){var $=w(C+="",M);return $.toString=function(){return C},$},utcParse:function(C){var $=T(C+="",!0);return $.toString=function(){return C},$}}}var ua={"-":"",_:" ",0:"0"},X=/^\s*\d+/,Np=/^%/,Op=/[\\^$*+?|[\]().{}]/g;function E(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Dp(t){return t.replace(Op,"\\$&")}function qe(t){return new RegExp("^(?:"+t.map(Dp).join("|")+")","i")}function Ge(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Rp(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Fp(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Pp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function zp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Lp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function fa(t,e,n){var i=X.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function ha(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Ip(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 Bp(t,e,n){var i=X.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function Up(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function da(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Hp(t,e,n){var i=X.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function pa(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Wp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Yp(t,e,n){var i=X.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Vp(t,e,n){var i=X.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Xp(t,e,n){var i=X.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function qp(t,e,n){var i=Np.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Gp(t,e,n){var i=X.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function jp(t,e,n){var i=X.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function ga(t,e){return E(t.getDate(),e,2)}function Zp(t,e){return E(t.getHours(),e,2)}function Qp(t,e){return E(t.getHours()%12||12,e,2)}function Jp(t,e){return E(1+Ve.count($t(t),t),e,3)}function ma(t,e){return E(t.getMilliseconds(),e,3)}function Kp(t,e){return ma(t,e)+"000"}function tg(t,e){return E(t.getMonth()+1,e,2)}function eg(t,e){return E(t.getMinutes(),e,2)}function ng(t,e){return E(t.getSeconds(),e,2)}function ig(t){var e=t.getDay();return e===0?7:e}function rg(t,e){return E(Hn.count($t(t)-1,t),e,2)}function _a(t){var e=t.getDay();return e>=4||e===0?pe(t):pe.ceil(t)}function og(t,e){return t=_a(t),E(pe.count($t(t),t)+($t(t).getDay()===4),e,2)}function sg(t){return t.getDay()}function ag(t,e){return E(Wn.count($t(t)-1,t),e,2)}function lg(t,e){return E(t.getFullYear()%100,e,2)}function cg(t,e){return t=_a(t),E(t.getFullYear()%100,e,2)}function ug(t,e){return E(t.getFullYear()%1e4,e,4)}function fg(t,e){var n=t.getDay();return t=n>=4||n===0?pe(t):pe.ceil(t),E(t.getFullYear()%1e4,e,4)}function hg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+E(e/60|0,"0",2)+E(e%60,"0",2)}function ya(t,e){return E(t.getUTCDate(),e,2)}function dg(t,e){return E(t.getUTCHours(),e,2)}function pg(t,e){return E(t.getUTCHours()%12||12,e,2)}function gg(t,e){return E(1+Un.count(Et(t),t),e,3)}function va(t,e){return E(t.getUTCMilliseconds(),e,3)}function mg(t,e){return va(t,e)+"000"}function _g(t,e){return E(t.getUTCMonth()+1,e,2)}function yg(t,e){return E(t.getUTCMinutes(),e,2)}function vg(t,e){return E(t.getUTCSeconds(),e,2)}function xg(t){var e=t.getUTCDay();return e===0?7:e}function bg(t,e){return E(Yn.count(Et(t)-1,t),e,2)}function xa(t){var e=t.getUTCDay();return e>=4||e===0?ge(t):ge.ceil(t)}function wg(t,e){return t=xa(t),E(ge.count(Et(t),t)+(Et(t).getUTCDay()===4),e,2)}function kg(t){return t.getUTCDay()}function Tg(t,e){return E(Vn.count(Et(t)-1,t),e,2)}function Sg(t,e){return E(t.getUTCFullYear()%100,e,2)}function Cg(t,e){return t=xa(t),E(t.getUTCFullYear()%100,e,2)}function Mg(t,e){return E(t.getUTCFullYear()%1e4,e,4)}function Ag(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ge(t):ge.ceil(t),E(t.getUTCFullYear()%1e4,e,4)}function $g(){return"+0000"}function ba(){return"%"}function wa(t){return+t}function ka(t){return Math.floor(+t/1e3)}var me,Ta,Sa;Eg({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 Eg(t){return me=Ep(t),Ta=me.format,me.parse,Sa=me.utcFormat,me.utcParse,me}function Ng(t){return new Date(t)}function Og(t){return t instanceof Date?+t:+new Date(+t)}function wr(t,e,n,i,r,o,s,a,l,c){var u=Is(),f=u.invert,h=u.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),_=c("%I %p"),y=c("%a %d"),x=c("%b %d"),v=c("%B"),M=c("%Y");function k(w){return(l(w)<w?d:a(w)<w?g:s(w)<w?p:o(w)<w?_:i(w)<w?r(w)<w?y:x:n(w)<w?v:M)(w)}return u.invert=function(w){return new Date(f(w))},u.domain=function(w){return arguments.length?h(Array.from(w,Og)):h().map(Ng)},u.ticks=function(w){var T=h();return t(T[0],T[T.length-1],w??10)},u.tickFormat=function(w,T){return T==null?k:c(T)},u.nice=function(w){var T=h();return(!w||typeof w.range!="function")&&(w=e(T[0],T[T.length-1],w??10)),w?h(js(T,w)):u},u.copy=function(){return We(u,wr(t,e,n,i,r,o,s,a,l,c))},u}function Dg(){return pt.apply(wr(Ap,$p,$t,yr,Hn,Ve,mr,pr,jt,Ta).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Rg(){return pt.apply(wr(Cp,Mp,Et,vr,Yn,Un,_r,gr,jt,Sa).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Fg(){var t=0,e=1,n,i,r,o,s=K,a=!1,l;function c(f){return f==null||isNaN(f=+f)?l:s(r===0?.5:(f=(o(f)-n)*r,a?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([t,e]=f,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(f){return arguments.length?(a=!!f,c):a},c.interpolator=function(f){return arguments.length?(s=f,c):s};function u(f){return function(h){var d,g;return arguments.length?([d,g]=h,s=f(d,g),c):[s(0),s(1)]}}return c.range=u(he),c.rangeRound=u(Ki),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return o=f,n=f(t),i=f(e),r=n===i?0:1/(i-n),c}}function Ca(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ma(){var t=Gt(Fg()(K));return t.copy=function(){return Ca(t,Ma())},Fs.apply(t,arguments)}function Pg(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=K,u,f=!1,h;function d(p){return isNaN(p=+p)?h:(p=.5+((p=+u(p))-o)*(i*p<i*o?a:l),c(f?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e,n]=p,r=u(t=+t),o=u(e=+e),s=u(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]},d.clamp=function(p){return arguments.length?(f=!!p,d):f},d.interpolator=function(p){return arguments.length?(c=p,d):c};function g(p){return function(_){var y,x,v;return arguments.length?([y,x,v]=_,c=Bh(p,[y,x,v]),d):[c(0),c(.5),c(1)]}}return d.range=g(he),d.rangeRound=g(Ki),d.unknown=function(p){return arguments.length?(h=p,d):h},function(p){return u=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d}}function Aa(){var t=Gt(Pg()(K));return t.copy=function(){return Ca(t,Aa())},Fs.apply(t,arguments)}const $a={scaleLinear:qs,scalePow:cr,scaleSqrt:_p,scaleLog:Ks,scaleSymlog:na,scaleIdentity:Gs,scaleTime:Dg,scaleUtc:Rg,scaleSequential:Ma,scaleDiverging:Aa,scaleQuantize:oa,scaleQuantile:ra,scaleThreshold:sa,scaleOrdinal:ir,scaleBand:rr,scalePoint:Yd};var B;(function(t){t.X="x",t.Y="y"})(B||(B={}));var Jt;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(Jt||(Jt={}));const zg=Object.assign(Object.assign({},Ro),{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:Jt.North,preventEmptyDomain:null,scaleByDomain:!1});class Lg extends $e{constructor(e,n,i){var r,o;super(e),this._defaultConfig=zg,this.datamodel=new nr,this.config=this._defaultConfig,this._clipPathId=es(),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 s="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",R`
|
53
|
+
--highlight-filter-id: url(${a}#${s}); // defining a css variable
|
54
|
+
`),this._svgDefs.append("filter").attr("id",s).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(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return Dt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return Dt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,o,s;const{components:a,config:l}=this;e&&(this.datamodel.data=e,a.forEach(c=>{c.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(o=l.yAxis)===null||o===void 0||o.setData(e),(s=l.tooltip)===null||s===void 0||s.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=F.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=F.Y,this.element.appendChild(e.yAxis.element));for(const s of this.components)this.element.appendChild(s.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 o=e.annotations;o&&this.element.appendChild(o.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,o)=>{e[o]&&r.setConfig(e[o])}),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=Ce([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,o,s;const{config:a}=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 c=2;this._clipPath.select("rect").attr("x",-2).attr("y",-2).attr("width",this.width+2*c).attr("height",this.height+2*c),(n=a.tooltip)===null||n===void 0||n.update();const u=a.crosshair;if(u){const f=this.components.filter(p=>!p.stacked).map(p=>p.config.y),h=this.components.filter(p=>p.stacked).map(p=>p.config.y),d=(i=this.components.find(p=>p.config.baseline))===null||i===void 0?void 0:i.config,g=d==null?void 0:d.baseline;u.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:wi(f),yStacked:wi(h),baseline:g},u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),u.hide()}(o=a.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(s=a.annotations)===null||s===void 0||s.render(),this._firstRender=!1}_updateScales(...e){const n=Ce(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(B.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(B.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(B).forEach(r=>{var o,s,a,l,c,u,f,h;const[d,g]=_u(Mu(i.map(k=>k.getDataExtent(r,n.scaleByDomain)))),p=r===B.Y?n.yDomain:n.xDomain,_=r===B.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,y=r===B.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(s=(o=p==null?void 0:p[0])!==null&&o!==void 0?o:d)!==null&&s!==void 0?s:0,v=(l=(a=p==null?void 0:p[1])!==null&&a!==void 0?a:g)!==null&&l!==void 0?l:1,M=[Dt(x,(c=_==null?void 0:_[0])!==null&&c!==void 0?c:Number.NEGATIVE_INFINITY,(u=_==null?void 0:_[1])!==null&&u!==void 0?u:Number.POSITIVE_INFINITY),Dt(v,(f=y==null?void 0:y[0])!==null&&f!==void 0?f:Number.NEGATIVE_INFINITY,(h=y==null?void 0:y[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY)];if(M[0]===M[1]){const k=i.some(w=>{var T;return((T=w.datamodel.data)===null||T===void 0?void 0:T.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!k||r===B.Y))&&(M[1]=M[0]+1)}e.forEach(k=>k.setScaleDomain(r,M))})}_updateScalesRange(...e){var n,i,r,o,s,a;const{config:l}=this;if(!e)return;const c=l.yDirection===Jt.South,u=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((i=l.padding.right)!==null&&i!==void 0?i:0)],f=[this.height-((r=l.padding.bottom)!==null&&r!==void 0?r:0),(o=l.padding.top)!==null&&o!==void 0?o:0];c&&f.reverse();for(const d of e)d.setSize(this.width,this.height,this.containerWidth,this.containerHeight),d.setScaleRange(B.X,(s=l.xRange)!==null&&s!==void 0?s:u),d.setScaleRange(B.Y,(a=l.yRange)!==null&&a!==void 0?a:f);const h=e.map(d=>d.bleed).reduce((d,g)=>{for(const p of Object.keys(d)){const _=p;d[_]<g[_]&&(d[_]=g[_])}return d},{top:0,bottom:0,left:0,right:0});for(const d of e)d.setScaleRange(B.X,[u[0]+h.left,u[1]-h.right]),d.setScaleRange(B.Y,c?[f[0]+h.top,f[1]-h.bottom]:[f[0]-h.bottom,f[1]+h.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();Ce([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=Ce([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),Ce([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_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}}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a==null||a.destroy();n==null||n.destroy(),i==null||i.destroy(),r==null||r.destroy(),o==null||o.destroy(),s==null||s.destroy()}}const Ea={duration:600,events:{},attributes:{}};class Ig{constructor(e=ke.SVG){var n,i;this.type=ke.SVG,this.datamodel=new nr,this.sizing=oe.Fit,this.events={},this._defaultConfig=Ea,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._setUpComponentEventsThrottled=ln(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=ln(this._setCustomAttributes,500),e===ke.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=es(),this.g=Z(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)}setConfig(e){this.prevConfig=this.config,this.config=Bt(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 o=this.g.selectAll(`.${i}`);o.on(r+n,(s,a)=>{const l=o.nodes(),c=l.indexOf(s.currentTarget),u=e[i][r];return u==null?void 0:u(a,s,c,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Bg extends nr{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 je=Object.assign(Object.assign({},Ea),{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 Xn extends Ig{constructor(){super(...arguments),this.datamodel=new Bg,this.clippable=!0,this.stacked=!1,this._defaultConfig=je,this._xScale=$a.scaleLinear(),this._yScale=$a.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===B.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===B.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===B.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===B.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===B.X&&(this._xScale=n),n&&e===B.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case B.X:return this.getXDataExtent();case B.Y:return this.getYDataExtent(n);default:return Ti(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return Ti(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=e?yo(i.data,this.xScale.domain(),n.x):i.data,o=It(n.y)?n.y:[n.y];return Ti(r,...o)}}var S;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(S||(S={}));var Na;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(Na||(Na={}));var Oa;(function(t){t.Inside="inside",t.Outside="outside"})(Oa||(Oa={}));var Da;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(Da||(Da={}));const Ug={components:[],container:void 0,followCursor:!0,allowHover:!0,horizontalPlacement:S.Auto,horizontalShift:0,verticalPlacement:S.Top,verticalShift:0,attributes:{},triggers:{},className:void 0},qn=R`
|
55
|
+
label: tooltip;
|
56
|
+
display: inline-block;
|
57
|
+
left: 0;
|
58
|
+
bottom: 0;
|
59
|
+
min-width: max-content;
|
60
|
+
position: absolute;
|
61
|
+
opacity: 0;
|
62
|
+
transition: opacity;
|
63
|
+
transition-duration: var(--vis-tooltip-transition-duration);
|
64
|
+
z-index: 999999;
|
65
|
+
padding: var(--vis-tooltip-padding);
|
66
|
+
color: var(--vis-tooltip-text-color);
|
67
|
+
border-radius: var(--vis-tooltip-border-radius);
|
68
|
+
box-shadow: var(--vis-tooltip-box-shadow);
|
69
|
+
border: solid 1px var(--vis-tooltip-border-color);
|
70
|
+
background-color: var(--vis-tooltip-background-color);
|
71
|
+
backdrop-filter: var(--vis-tooltip-backdrop-filter);
|
72
|
+
`,Hg=qn,Wg=Wt`
|
73
|
+
:root {
|
74
|
+
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
|
75
|
+
--vis-tooltip-border-color: #e5e9f7;
|
76
|
+
--vis-tooltip-text-color: #000;
|
77
|
+
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
|
78
|
+
--vis-tooltip-backdrop-filter: none;
|
79
|
+
--vis-tooltip-padding: 10px 15px;
|
80
|
+
--vis-tooltip-border-radius: 5px;
|
81
|
+
--vis-tooltip-transition-duration: 300ms;
|
82
|
+
--vis-tooltip-box-shadow: none;
|
83
|
+
|
84
|
+
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
|
85
|
+
--vis-dark-tooltip-text-color: #e5e9f7;
|
86
|
+
--vis-dark-tooltip-border-color: var(--vis-color-grey);
|
87
|
+
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
88
|
+
}
|
89
|
+
|
90
|
+
body.theme-dark ${`.${qn}`} {
|
91
|
+
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
|
92
|
+
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
|
93
|
+
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
|
94
|
+
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
|
95
|
+
}
|
96
|
+
|
97
|
+
body.theme-dark {
|
98
|
+
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
|
99
|
+
--vis-tooltip-text-color: #e5e9f7;
|
100
|
+
--vis-tooltip-border-color: var(--vis-color-grey);
|
101
|
+
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
102
|
+
}
|
103
|
+
`,Ra=R`
|
104
|
+
bottom: unset;
|
105
|
+
position: fixed;
|
106
|
+
`,kr=R`
|
107
|
+
opacity: 1;
|
108
|
+
`,Tr=R`
|
109
|
+
display: none;
|
110
|
+
`,Fa=R`
|
111
|
+
label: non-interactive;
|
112
|
+
pointer-events: none;
|
113
|
+
user-select: none;
|
114
|
+
`,Yg=Object.freeze(Object.defineProperty({__proto__:null,hidden:Tr,nonInteractive:Fa,positionFixed:Ra,root:qn,show:kr,tooltip:Hg,variables:Wg},Symbol.toStringTag,{value:"Module"}));class Pa{constructor(e={}){this._defaultConfig=Ug,this.config=this._defaultConfig,this._setUpEventsThrottled=ln(this._setUpEvents,500),this._setContainerPositionThrottled=ln(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=Z(this.element).attr("class",qn),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=Bt(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(kr,!1).on("transitionend",()=>{this.div.classed(Tr,!this._isShown)}),this._isShown=!1}display(){this.div.classed(Tr,!1).classed(kr,!0),this._isShown=!0}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,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===S.Auto?S.Center:n.horizontalPlacement),s=n.verticalPlacement===S.Auto?e.y-r<0?S.Bottom:S.Top:n.verticalPlacement,a=5,l=o===S.Left?-i-a-n.horizontalShift:o===S.Center?-i/2:a+n.horizontalShift,c=s===S.Bottom?a+n.verticalShift:s===S.Center?-r/2:-5-n.verticalShift-r,[u,f]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(u,f,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:en({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),u=this._overriddenHorizontalPlacement||(n.horizontalPlacement===S.Auto?c[0]-r<0?S.Right:c[0]+r>a?S.Left:S.Center:n.horizontalPlacement);let f=0;switch(u){case S.Left:f=-r-i-n.horizontalShift;break;case S.Right:f=l.width+i+n.horizontalShift;break;case S.Center:default:f=(-r+l.width)/2;break}const h=n.verticalPlacement===S.Auto?u!==S.Center?S.Center:c[1]-o<0?S.Bottom:S.Top:n.verticalPlacement;let d=-o;switch(h){case S.Center:d+=(o+l.height)/2;break;case S.Bottom:d+=o+l.height+i+n.verticalShift;break;case S.Top:default:d+=-5-n.verticalShift;break}const[g,p]=this._constraintPosToContainer(c[0]+f,c[1]+d,r,o);this._applyPosition(g,p,o)}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&&this.div.html(e),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(Fa,!i.allowHover||i.followCursor),r!=null&&r.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed(Ra,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,u=e<l,f=c?a-i-l:u?l:e,h=10,d=n>s-r-h,g=n<h,p=d?s-r-h:g?h:n;return[a<i?0:f,s<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=Z(n.element);i.on("mousemove.tooltip",r=>{const o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const s of Object.keys(e.triggers)){const a=e.triggers[s];if(!a)continue;const l=i.selectAll(`.${s}`).nodes();for(const c of o){if(c===i.node())break;if(c.classList.contains(s)){const u=l.indexOf(c),f=Z(c).datum(),h=a(f,u,l),[d,g]=this.isContainerBody()?[r.clientX,r.clientY]:en(r,this._container);h===null?this.hide():(this.render(h),e.followCursor?this.place({x:d,y:g}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover&&!e.followCursor?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(),(e=this.div)===null||e===void 0||e.remove()}}Pa.selectors=Yg;var Sr=Math.PI,Cr=2*Sr,Kt=1e-6,Vg=Cr-Kt;function Mr(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Gn(){return new Mr}Mr.prototype=Gn.prototype={constructor:Mr,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var o=this._x1,s=this._y1,a=n-t,l=i-e,c=o-t,u=s-e,f=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>Kt)if(!(Math.abs(u*a-l*c)>Kt)||!r)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var h=n-o,d=i-s,g=a*a+l*l,p=h*h+d*d,_=Math.sqrt(g),y=Math.sqrt(f),x=r*Math.tan((Sr-Math.acos((g+f-p)/(2*_*y)))/2),v=x/y,M=x/_;Math.abs(v-1)>Kt&&(this._+="L"+(t+v*c)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*h>c*d)+","+(this._x1=t+M*a)+","+(this._y1=e+M*l)}},arc:function(t,e,n,i,r,o){t=+t,e=+e,n=+n,o=!!o;var s=n*Math.cos(i),a=n*Math.sin(i),l=t+s,c=e+a,u=1^o,f=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Kt||Math.abs(this._y1-c)>Kt)&&(this._+="L"+l+","+c),n&&(f<0&&(f=f%Cr+Cr),f>Vg?this._+="A"+n+","+n+",0,1,"+u+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):f>Kt&&(this._+="A"+n+","+n+",0,"+ +(f>=Sr)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};function G(t){return function(){return t}}var za=1e-12,jn=Math.PI,Zn=2*jn;function La(t){this._context=t}La.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 Ar(t){return new La(t)}function Ia(t){return t[0]}function Ba(t){return t[1]}function Ua(){var t=Ia,e=Ba,n=G(!0),i=null,r=Ar,o=null;function s(a){var l,c=a.length,u,f=!1,h;for(i==null&&(o=r(h=Gn())),l=0;l<=c;++l)!(l<c&&n(u=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,l,a),+e(u,l,a));if(h)return o=null,h+""||null}return s.x=function(a){return arguments.length?(t=typeof a=="function"?a:G(+a),s):t},s.y=function(a){return arguments.length?(e=typeof a=="function"?a:G(+a),s):e},s.defined=function(a){return arguments.length?(n=typeof a=="function"?a:G(!!a),s):n},s.curve=function(a){return arguments.length?(r=a,i!=null&&(o=r(i)),s):r},s.context=function(a){return arguments.length?(a==null?i=o=null:o=r(i=a),s):i},s}function Xg(){var t=Ia,e=null,n=G(0),i=Ba,r=G(!0),o=null,s=Ar,a=null;function l(u){var f,h,d,g=u.length,p,_=!1,y,x=new Array(g),v=new Array(g);for(o==null&&(a=s(y=Gn())),f=0;f<=g;++f){if(!(f<g&&r(p=u[f],f,u))===_)if(_=!_)h=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),d=f-1;d>=h;--d)a.point(x[d],v[d]);a.lineEnd(),a.areaEnd()}_&&(x[f]=+t(p,f,u),v[f]=+n(p,f,u),a.point(e?+e(p,f,u):x[f],i?+i(p,f,u):v[f]))}if(y)return a=null,y+""||null}function c(){return Ua().defined(r).curve(s).context(o)}return l.x=function(u){return arguments.length?(t=typeof u=="function"?u:G(+u),e=null,l):t},l.x0=function(u){return arguments.length?(t=typeof u=="function"?u:G(+u),l):t},l.x1=function(u){return arguments.length?(e=u==null?null:typeof u=="function"?u:G(+u),l):e},l.y=function(u){return arguments.length?(n=typeof u=="function"?u:G(+u),i=null,l):n},l.y0=function(u){return arguments.length?(n=typeof u=="function"?u:G(+u),l):n},l.y1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:G(+u),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(n)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(e).y(n)},l.defined=function(u){return arguments.length?(r=typeof u=="function"?u:G(!!u),l):r},l.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),l):s},l.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),l):o},l}const Ha={draw:function(t,e){var n=Math.sqrt(e/jn);t.moveTo(n,0),t.arc(0,0,n,0,Zn)}},qg={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Wa=Math.sqrt(1/3),Gg=Wa*2;const jg={draw:function(t,e){var n=Math.sqrt(e/Gg),i=n*Wa;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}};var Zg=.8908130915292852,Ya=Math.sin(jn/10)/Math.sin(7*jn/10),Qg=Math.sin(Zn/10)*Ya,Jg=-Math.cos(Zn/10)*Ya;const Kg={draw:function(t,e){var n=Math.sqrt(e*Zg),i=Qg*n,r=Jg*n;t.moveTo(0,-n),t.lineTo(i,r);for(var o=1;o<5;++o){var s=Zn*o/5,a=Math.cos(s),l=Math.sin(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},t0={draw:function(t,e){var n=Math.sqrt(e),i=-n/2;t.rect(i,i,n,n)}};var $r=Math.sqrt(3);const e0={draw:function(t,e){var n=-Math.sqrt(e/($r*3));t.moveTo(0,n*2),t.lineTo(-$r*n,-n),t.lineTo($r*n,-n),t.closePath()}};var at=-.5,lt=Math.sqrt(3)/2,Er=1/Math.sqrt(12),n0=(Er/2+1)*3;const i0={draw:function(t,e){var n=Math.sqrt(e/n0),i=n/2,r=n*Er,o=i,s=n*Er+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(at*i-lt*r,lt*i+at*r),t.lineTo(at*o-lt*s,lt*o+at*s),t.lineTo(at*a-lt*l,lt*a+at*l),t.lineTo(at*i+lt*r,at*r-lt*i),t.lineTo(at*o+lt*s,at*s-lt*o),t.lineTo(at*a+lt*l,at*l-lt*a),t.closePath()}};function r0(){var t=G(Ha),e=G(64),n=null;function i(){var r;if(n||(n=r=Gn()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return i.type=function(r){return arguments.length?(t=typeof r=="function"?r:G(r),i):t},i.size=function(r){return arguments.length?(e=typeof r=="function"?r:G(+r),i):e},i.context=function(r){return arguments.length?(n=r??null,i):n},i}function zt(){}function Qn(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 Jn(t){this._context=t}Jn.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:Qn(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:Qn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function o0(t){return new Jn(t)}function Va(t){this._context=t}Va.prototype={areaStart:zt,areaEnd:zt,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:Qn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function s0(t){return new Va(t)}function Xa(t){this._context=t}Xa.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:Qn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function a0(t){return new Xa(t)}function qa(t,e){this._basis=new Jn(t),this._beta=e}qa.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],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const l0=function t(e){function n(i){return e===1?new Jn(i):new qa(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Kn(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 Nr(t,e){this._context=t,this._k=(1-e)/6}Nr.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:Kn(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:Kn(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 c0=function t(e){function n(i){return new Nr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Or(t,e){this._context=t,this._k=(1-e)/6}Or.prototype={areaStart:zt,areaEnd:zt,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:Kn(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 u0=function t(e){function n(i){return new Or(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Dr(t,e){this._context=t,this._k=(1-e)/6}Dr.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:Kn(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 f0=function t(e){function n(i){return new Dr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Rr(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>za){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>za){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Ga(t,e){this._context=t,this._alpha=e}Ga.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:Rr(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 h0=function t(e){function n(i){return e?new Ga(i,e):new Nr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function ja(t,e){this._context=t,this._alpha=e}ja.prototype={areaStart:zt,areaEnd:zt,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:Rr(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 d0=function t(e){function n(i){return e?new ja(i,e):new Or(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Za(t,e){this._context=t,this._alpha=e}Za.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:Rr(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 p0=function t(e){function n(i){return e?new Za(i,e):new Dr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Qa(t){this._context=t}Qa.prototype={areaStart:zt,areaEnd:zt,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 g0(t){return new Qa(t)}function Ja(t){return t<0?-1:1}function Ka(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(Ja(o)+Ja(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function tl(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Fr(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function ti(t){this._context=t}ti.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:Fr(this,this._t0,tl(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,Fr(this,tl(this,n=Ka(this,t,e)),n);break;default:Fr(this,this._t0,n=Ka(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function el(t){this._context=new nl(t)}(el.prototype=Object.create(ti.prototype)).point=function(t,e){ti.prototype.point.call(this,e,t)};function nl(t){this._context=t}nl.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,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function m0(t){return new ti(t)}function _0(t){return new el(t)}function il(t){this._context=t}il.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=rl(t),r=rl(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(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 rl(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function y0(t){return new il(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 v0(t){return new ei(t,.5)}function x0(t){return new ei(t,0)}function b0(t){return new ei(t,1)}function ol(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 w0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ol(Object(n),!0).forEach(function(i){k0(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ze(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ze=function(e){return typeof e}:Ze=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze(t)}function k0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ni(){return ni=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},ni.apply(this,arguments)}function T0(t,e){if(t){if(typeof t=="string")return sl(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 sl(t,e)}}function sl(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 al(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=T0(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(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function S0(t,e){var n=[],i=[];function r(o,s){if(o.length===1)n.push(o[0]),i.push(o[0]);else{for(var a=Array(o.length-1),l=0;l<a.length;l++)l===0&&n.push(o[0]),l===a.length-1&&i.push(o[l+1]),a[l]=[(1-s)*o[l][0]+s*o[l+1][0],(1-s)*o[l][1]+s*o[l+1][1]];r(a,s)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function C0(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 M0(t,e){e=e||2;for(var n=[],i=t,r=1/e,o=0;o<e-1;o++){var s=r/(1-r*o),a=S0(i,s);n.push(a.left),i=a.right}return n.push(i),n}function A0(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]),M0(i,n).map(C0)}var $0=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,_e={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(_e).forEach(function(t){_e[t.toLowerCase()]=_e[t]});function Pr(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function E0(t){return"".concat(t.type).concat(_e[t.type].map(function(e){return t[e]}).join(","))}function N0(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(o){var s=e[o],a=t[o];a===void 0&&(i.includes(o)?a=s:(a===void 0&&n[o]&&(a=t[n[o]]),a===void 0&&(a=0))),r[o]=a}),r.type=e.type,t=r}return t}function O0(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(A0(t,e,n));else{var r=ni({},t);r.type==="M"&&(r.type="L"),i=i.concat(Pr(n-1).map(function(){return r})),i.push(e)}return i}function ll(t,e,n){var i=t.length-1,r=e.length-1,o=i/r,s=Pr(r).reduce(function(l,c,u){var f=Math.floor(o*u);if(n&&f<t.length-1&&n(t[f],t[f+1])){var h=o*u%1<.5;l[f]&&(h?f>0?f-=1:f<t.length-1&&(f+=1):f<t.length-1?f+=1:f>0&&(f-=1))}return l[f]=(l[f]||0)+1,l},[]),a=s.reduce(function(l,c,u){if(u===t.length-1){var f=Pr(c,ni({},t[t.length-1]));return f[0].type==="M"&&f.forEach(function(h){h.type="L"}),l.concat(f)}return l.concat(O0(t[u],t[u+1],c))},[]);return a.unshift(t[0]),a}function cl(t){for(var e=(t||"").match($0)||[],n=[],i,r,o=0;o<e.length;++o)if(i=_e[e[o]],i){r={type:e[o]};for(var s=0;s<i.length;++s)r[i[s]]=+e[o+s+1];o+=i.length,n.push(r)}return n}function D0(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),o=Ze(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var l=(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 c=Math.abs(r.length-i.length);c!==0&&(r.length>i.length?i=ll(i,r,s):r.length<i.length&&(r=ll(r,i,s))),i=i.map(function(f,h){return N0(f,r[h])});var u=i.map(function(f){return w0({},f)});return l&&(u.push({type:"Z"}),i.push({type:"Z"})),function(h){if(h===1&&a)return e??[];if(h===0)return i;for(var d=0;d<u.length;++d){var g=i[d],p=r[d],_=u[d],y=al(_e[_.type]),x;try{for(y.s();!(x=y.n()).done;){var v=x.value;_[v]=(1-h)*g[v]+h*p[v],(v==="largeArcFlag"||v==="sweepFlag")&&(_[v]=Math.round(_[v]))}}catch(M){y.e(M)}finally{y.f()}}return u}}function ul(t,e,n){var i=cl(t),r=cl(e),o=Ze(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var l=D0(i,r,{excludeSegment:s,snapEndsToInput:a});return function(u){if(u===1&&a)return e??"";var f=l(u),h="",d=al(f),g;try{for(d.s();!(g=d.n()).done;){var p=g.value;h+=E0(p)}}catch(_){d.e(_)}finally{d.f()}return h}}function Nt(t,e,n,i){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:cn(t,e,n)||(kt(n)&&!i?`var(${Ft(n)})`:null)}var L;(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"})(L||(L={}));const zr={[L.Basis]:o0,[L.BasisClosed]:s0,[L.BasisOpen]:a0,[L.Bundle]:l0,[L.Cardinal]:c0,[L.CardinalClosed]:u0,[L.CardinalOpen]:f0,[L.CatmullRom]:h0,[L.CatmullRomClosed]:d0,[L.CatmullRomOpen]:p0,[L.Linear]:Ar,[L.LinearClosed]:g0,[L.MonotoneX]:m0,[L.MonotoneY]:_0,[L.Natural]:y0,[L.Step]:v0,[L.StepAfter]:b0,[L.StepBefore]:x0},R0=Object.assign(Object.assign({},je),{curveType:L.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null}),F0=Wt`
|
116
|
+
:root {
|
117
|
+
--vis-line-cursor: default;
|
118
|
+
--vis-line-stroke-dasharray: none;
|
119
|
+
--vis-line-stroke-dashoffset: 0;
|
120
|
+
}
|
121
|
+
`,P0=R`
|
122
|
+
label: line-component;
|
123
|
+
`,Qe=R`
|
124
|
+
label: line;
|
125
|
+
transition: opacity 200ms;
|
126
|
+
cursor: var(--vis-line-cursor);
|
127
|
+
`,Lr=R`
|
128
|
+
label: linePath;
|
129
|
+
fill: none;
|
130
|
+
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
131
|
+
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
132
|
+
`,Ir=R`
|
133
|
+
label: lineSelectionHelper;
|
134
|
+
fill: none;
|
135
|
+
stroke: rgba(0, 0, 0, 0);
|
136
|
+
stroke-width: 8px;
|
137
|
+
`,Br=R`
|
138
|
+
opacity: 0.2;
|
139
|
+
`,z0=Object.freeze(Object.defineProperty({__proto__:null,dim:Br,globalStyles:F0,line:Qe,linePath:Lr,lineSelectionHelper:Ir,root:P0},Symbol.toStringTag,{value:"Module"}));class ii extends Xn{constructor(e){super(),this._defaultConfig=R0,this.config=this._defaultConfig,this.curve=zr[L.MonotoneX],this.events={[ii.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},e&&this.setConfig(e)}get bleed(){const{config:{lineWidth:e}}=this,n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?Jt.North:Jt.South)===Jt.South,o=e>3,s=e>=10;return{top:!s&&(!r&&n[1]===0||r&&n[0]===0)?0:e/2,bottom:!s&&(!r&&n[0]===0||r&&n[1]===0)?0:e/2,left:o?e/2:0,right:o?e/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=kt(e)?e:n.duration;this.curve=zr[n.curveType],this.lineGen=Ua().x(f=>f.x).y(f=>f.y).defined(f=>f.defined).curve(this.curve);const o=It(n.y)?n.y:[n.y],s=i.map((f,h)=>this.xScale(W(f,n.x,h))),a=o.map(f=>{const h=i.map((p,_)=>{const y=W(p,f,_),x=(kt(y)||y===null)&&isFinite(y)?y:n.fallbackValue;return{x:s[_],y:this.yScale(x??0),defined:isFinite(x),value:x}}),d=h.reduce((p,_)=>_.defined||p,!1),g=d&&h.some(p=>p.value!==null);return{values:h,defined:d,visible:g}}),l=this.g.selectAll(`.${Qe}`).data(a),c=l.enter().append("g").attr("class",Qe);c.append("path").attr("class",Lr).attr("stroke",(f,h)=>Nt(i,n.color,h)).attr("stroke-opacity",0).attr("stroke-width",n.lineWidth),c.append("path").attr("class",Ir).attr("d",this._emptyPath());const u=c.merge(l);u.style("cursor",(f,h)=>cn(i,n.cursor,h)),u.each((f,h,d)=>{var g;const p=Z(d[h]),_=p.select(`.${Lr}`),y=p.select(`.${Ir}`),x=f.visible,v=ki(i,n.lineDashArray,h),M=dt(_,r).attr("stroke",Nt(i,n.color,h)).attr("stroke-width",n.lineWidth).attr("stroke-opacity",x?1:0).style("stroke-dasharray",(g=v==null?void 0:v.join(" "))!==null&&g!==void 0?g:null),k=f.values.some(T=>!T.defined),w=this.lineGen(f.values);if(r&&!k){const T=_.attr("d")||this._emptyPath(),I=w||this._emptyPath();M.attrTween("d",()=>ul(T,I))}else f.visible&&M.attr("d",w);y.attr("d",w).attr("visibility",x?null:"hidden")}),dt(l.exit(),r).style("opacity",0).remove()}_emptyPath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}_highlight(e){const{config:n}=this;n.highlightOnHover&&this.g.selectAll(`.${Qe}`).classed(Br,i=>i!==e)}_resetHighlight(){const{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${Qe}`).classed(Br,!1)}}ii.selectors=z0;function L0(t){return t}var ri=1,oi=2,Ur=3,Je=4,fl=1e-6;function I0(t){return"translate("+t+",0)"}function B0(t){return"translate(0,"+t+")"}function U0(t){return e=>+t(e)}function H0(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function W0(){return!this.__axis}function si(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===ri||t===Je?-1:1,u=t===Je||t===oi?"x":"y",f=t===ri||t===Ur?I0:B0;function h(d){var g=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):L0),_=Math.max(o,0)+a,y=e.range(),x=+y[0]+l,v=+y[y.length-1]+l,M=(e.bandwidth?H0:U0)(e.copy(),l),k=d.selection?d.selection():d,w=k.selectAll(".domain").data([null]),T=k.selectAll(".tick").data(g,e).order(),I=T.exit(),P=T.enter().append("g").attr("class","tick"),ct=T.select("line"),A=T.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(P),ct=ct.merge(P.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),A=A.merge(P.append("text").attr("fill","currentColor").attr(u,c*_).attr("dy",t===ri?"0em":t===Ur?"0.71em":"0.32em")),d!==k&&(w=w.transition(d),T=T.transition(d),ct=ct.transition(d),A=A.transition(d),I=I.transition(d).attr("opacity",fl).attr("transform",function(U){return isFinite(U=M(U))?f(U+l):this.getAttribute("transform")}),P.attr("opacity",fl).attr("transform",function(U){var V=this.parentNode.__axis;return f((V&&isFinite(V=V(U))?V:M(U))+l)})),I.remove(),w.attr("d",t===Je||t===oi?s?"M"+c*s+","+x+"H"+l+"V"+v+"H"+c*s:"M"+l+","+x+"V"+v:s?"M"+x+","+c*s+"V"+l+"H"+v+"V"+c*s:"M"+x+","+l+"H"+v),T.attr("opacity",1).attr("transform",function(U){return f(M(U)+l)}),ct.attr(u+"2",c*o),A.attr(u,c*_).text(p),k.filter(W0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===oi?"start":t===Je?"end":"middle"),k.each(function(){this.__axis=M})}return h.scale=function(d){return arguments.length?(e=d,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),h):n.slice()},h.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),h):i&&i.slice()},h.tickFormat=function(d){return arguments.length?(r=d,h):r},h.tickSize=function(d){return arguments.length?(o=s=+d,h):o},h.tickSizeInner=function(d){return arguments.length?(o=+d,h):o},h.tickSizeOuter=function(d){return arguments.length?(s=+d,h):s},h.tickPadding=function(d){return arguments.length?(a=+d,h):a},h.offset=function(d){return arguments.length?(l=+d,h):l},h}function hl(t){return si(ri,t)}function dl(t){return si(oi,t)}function pl(t){return si(Ur,t)}function gl(t){return si(Je,t)}var te;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(te||(te={}));var ee;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(ee||(ee={}));var ai;(function(t){t.Wrap="wrap",t.Trim="trim"})(ai||(ai={}));var gt;(function(t){t.Left="left",t.Center="center",t.Right="right"})(gt||(gt={}));var li={exports:{}},Y0=li.exports,ml;function V0(){return ml||(ml=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"),o=n("comment"),s=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function l(g,p,_){g=g||"",p=p||[],_=_||"";let y=u(p,_);return f(g,y)}function c(g,p){g=g||[],p=p||"";let _=u(g,p);return function(x){return f(x||"",_)}}l.init_streaming_mode=c;function u(g,p){return g=h(g),{allowable_tags:g,tag_replacement:p,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function f(g,p){if(typeof g!="string")throw new TypeError("'html' parameter must be a string");let _=p.allowable_tags,y=p.tag_replacement,x=p.state,v=p.tag_buffer,M=p.depth,k=p.in_quote_char,w="";for(let T=0,I=g.length;T<I;T++){let P=g[T];if(x===i)switch(P){case"<":x=r,v+=P;break;default:w+=P;break}else if(x===r)switch(P){case"<":if(k)break;M++;break;case">":if(k)break;if(M){M--;break}k="",x=i,v+=">",_.has(d(v))?w+=v:w+=y,v="";break;case'"':case"'":P===k?k="":k=k||P,v+=P;break;case"-":v==="<!-"&&(x=o),v+=P;break;case" ":case`
|
140
|
+
`:if(v==="<"){x=i,w+="< ",v="";break}v+=P;break;default:v+=P;break}else if(x===o)switch(P){case">":v.slice(-2)=="--"&&(x=i),v="";break;default:v+=P;break}}return p.state=x,p.tag_buffer=v,p.depth=M,p.in_quote_char=k,w}function h(g){let p=new Set;if(typeof g=="string"){let _;for(;_=s.exec(g);)p.add(_[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=l:e.striptags=l})(Y0)}(li)),li.exports}var X0=V0();const q0=Xf(X0);function G0(t){switch(t){case gt.Center:return"middle";case gt.Right:return"end";case gt.Left:default:return"start"}}function j0(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 Z0(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 Q0(t="",e=15){return t.length>e?`…${t.substr(t.length-e,e)}`:t}function J0(t="",e=15){const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function K0(t="",e=15){return t.length>e?`${t.substr(0,e)}…`:t}function tm(t="",e=15,n=te.Middle){let i=K0(t,e);return n===te.Start?i=Q0(t,e):n===te.Middle&&(i=J0(t,e)),i}function em(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((o,s)=>{const a=o.split(r),l=a.map((c,u)=>`${c}${u===a.length-1?"":r}`);n[s]=l}),n=wi(n)}return n}function nm(t,e,n,i,r,o){var s;e===void 0&&(e=50),n===void 0&&(n=te.Middle),r===void 0&&(r=+((s=window.getComputedStyle(t.node()))===null||s===void 0?void 0:s.fontSize)||0);const a=t.text(),l=a.length,c=r*l*o,f=Math.ceil(l*e/(1.1*c));return f<l?(t.text(tm(a,f,n)),!0):!1}function ci(t,e,n=ph()){return t.length*e*n||0}function ui(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"text");o.textContent=t,o.setAttribute("font-size",`${n}`),o.setAttribute("font-family",e),r.appendChild(o),document.body.appendChild(r);const s=o.getComputedTextLength();return document.body.removeChild(r),s}function im(t,e=void 0,n=!0,i=ds,r=!1){const o=`${t.text}`;if(!o)return[];const s=Array.isArray(i)?i:[i];return o.split(`
|
141
|
+
`).map(l=>{const c=[];if(!e)return[l];const u=em(l,s);let f="";for(let h=0;h<u.length;h+=1){(n?ci(f+u[h],t.fontSize,t.fontWidthToHeightRatio):ui(f+u[h],t.fontFamily,t.fontSize))<e||h===0?f+=u[h]:(c.push(f.trim()),f=u[h]);const g=2;if(r)for(;f.trim().length>g&&(n?ci(f,t.fontSize,t.fontWidthToHeightRatio):ui(f,t.fontFamily,t.fontSize))>e;){let _=f.trim().length-g;for(;_>0;){const y=`${f.substring(0,_)}${ps}`;if((n?ci(y,t.fontSize,t.fontWidthToHeightRatio):ui(y,t.fontFamily,t.fontSize))<=e||_===1){c.push(y.trim()),f=f.substring(_);break}_--}}}return f&&c.push(f.trim()),c}).flat()}function rm(t,e=void 0,n=void 0,i=!0,r=ds,o=!1){const s=Array.isArray(t)?t.map(f=>Bt(gs,f)):[Bt(gs,t)],a=s.map(f=>im(f,e,i,r,o)),l=s[0];let c=-l.fontSize*(l.lineHeight-1);const u=[];return s.forEach((f,h)=>{var d;let g=a[h];const p=h>0?u[h-1]:void 0,_=p?p.marginBottom:0,y=f.marginTop,x=Math.max(_,y);c+=x;const v=f.fontSize*f.lineHeight;let M=0;for(let k=0;k<g.length;k+=1){let w=g[k];c+=v;const T=`${w} …`,I=i?ci(T,f.fontSize,f.fontWidthToHeightRatio):ui(T,f.fontFamily,f.fontSize);if(M=Math.max(I,M),n&&c+v>n&&k!==g.length-1){w.charAt(w.length-1)===ps&&(w=w.substr(0,g[k].length-1)),I<e?g[k]=T:g[k]=`${g[k].substr(0,g[k].length-2)}…`,g=g.slice(0,k+1);break}}u.push(Object.assign(Object.assign({},f),{_lines:g,_estimatedHeight:c-((p==null?void 0:p._estimatedHeight)||0),_maxWidth:Math.max(M,(d=p==null?void 0:p._maxWidth)!==null&&d!==void 0?d:0)}))}),u}function om(t,e=0,n){return t.map((i,r)=>{const o=r>0?t[r-1]:void 0,s=o?o.marginBottom/o.fontSize:0,a=i.marginTop/i.fontSize,l=Math.max(s,a),c={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:r===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(c).filter(([f,h])=>h).map(([f,h])=>`${j0(f)}="${Z0(h.toString())}"`).join(" ")}>${i._lines.map((f,h)=>{let d;return r===0&&h===0?d=.8+l:h===0?d=l+i.lineHeight:d=i.lineHeight,`<tspan x="${e}" dy="${d}em">${f.length?f:" "}</tspan>`}).join("")}</tspan>`})}function sm(t){return $u(t,e=>e._estimatedHeight)}const am=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function lm(t,e,n,i){var r,o;const s=rm(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=(r=n.x)!==null&&r!==void 0?r:+t.getAttribute("x"),l=(o=n.y)!==null&&o!==void 0?o:+t.getAttribute("y"),c=a??0;let u=l??0;if(n.textAlign&&t.setAttribute("text-anchor",G0(n.textAlign)),n.verticalAlign&&n.verticalAlign!==ee.Top){const f=sm(s),h=n.verticalAlign===ee.Middle?-f/2:n.verticalAlign===ee.Bottom?-f:0;u+=h}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${c} ${u})`):t.removeAttribute("transform");{const f=new DOMParser;t.textContent="",s.forEach(h=>{const d=om([h],c,u).join(""),g=q0(d,am),p=f.parseFromString(g,"image/svg+xml").firstChild;t.appendChild(p)})}}const cm=Object.assign(Object.assign({},je),{position:void 0,type:void 0,label:void 0,labelFontSize:null,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:te.Middle,tickTextFitMode:ai.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}),_l=R`
|
142
|
+
label: axis-component;
|
143
|
+
`,um=Wt`
|
144
|
+
:root {
|
145
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
146
|
+
/* --vis-axis-font-family: */
|
147
|
+
--vis-axis-tick-color: #e8e9ef;
|
148
|
+
/* --vis-axis-domain-color: // Undefined by default to allow fallback to var(--vis-axis-tick-color) */
|
149
|
+
--vis-axis-grid-color: #e8e9ef;
|
150
|
+
--vis-axis-label-color: #6c778c;
|
151
|
+
--vis-axis-tick-label-color: #6c778c;
|
152
|
+
--vis-axis-tick-label-font-size: 12px;
|
153
|
+
--vis-axis-tick-label-cursor: default;
|
154
|
+
--vis-axis-tick-label-text-decoration: none;
|
155
|
+
--vis-axis-label-font-size: 14px;
|
156
|
+
--vis-axis-tick-line-width: 1px;
|
157
|
+
--vis-axis-tick-label-hide-transition: opacity 400ms ease-in-out;
|
158
|
+
--vis-axis-grid-line-width: 1px;
|
159
|
+
/* --vis-axis-domain-line-width: // Undefined by default to allow fallback to var(--vis-axis-grid-line-width) */
|
160
|
+
|
161
|
+
--vis-dark-axis-tick-color: #6c778c;
|
162
|
+
/* --vis-dark-axis-domain-color: // Undefined by default to allow fallback to var(--vis-dark-axis-tick-color) */
|
163
|
+
--vis-dark-axis-tick-label-color: #e8e9ef;
|
164
|
+
--vis-dark-axis-grid-color: #6c778c;
|
165
|
+
--vis-dark-axis-label-color: #fefefe;
|
166
|
+
}
|
167
|
+
|
168
|
+
body.theme-dark ${`.${_l}`} {
|
169
|
+
--vis-axis-tick-color: var(--vis-dark-axis-tick-color);
|
170
|
+
--vis-axis-domain-color: var(--vis-dark-axis-domain-color);
|
171
|
+
--vis-axis-tick-label-color: var(--vis-dark-axis-tick-label-color);
|
172
|
+
--vis-axis-grid-color: var(--vis-dark-axis-grid-color);
|
173
|
+
--vis-axis-label-color: var(--vis-dark-axis-label-color);
|
174
|
+
}
|
175
|
+
`,Hr=R`
|
176
|
+
label: hide-tick-line;
|
177
|
+
`,Wr=R`
|
178
|
+
label: hide-domain;
|
179
|
+
`,yl=R`
|
180
|
+
label: axis;
|
181
|
+
|
182
|
+
user-select: none;
|
183
|
+
|
184
|
+
.domain {
|
185
|
+
stroke: var(--vis-axis-domain-color, var(--vis-axis-tick-color));
|
186
|
+
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
|
187
|
+
}
|
188
|
+
|
189
|
+
&${`.${Hr}`} {
|
190
|
+
.tick > line {
|
191
|
+
opacity: 0;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
&${`.${Wr}`} {
|
196
|
+
.domain {
|
197
|
+
opacity: 0;
|
198
|
+
}
|
199
|
+
}
|
200
|
+
`,vl=R`
|
201
|
+
label: grid;
|
202
|
+
|
203
|
+
.domain {
|
204
|
+
opacity: 0;
|
205
|
+
}
|
206
|
+
|
207
|
+
line {
|
208
|
+
stroke: var(--vis-axis-grid-color);
|
209
|
+
stroke-width: var(--vis-axis-grid-line-width);
|
210
|
+
}
|
211
|
+
`,xl=R`
|
212
|
+
label: tick;
|
213
|
+
|
214
|
+
stroke: none;
|
215
|
+
font-size: var(--vis-axis-tick-label-font-size);
|
216
|
+
|
217
|
+
line {
|
218
|
+
stroke: var(--vis-axis-tick-color);
|
219
|
+
stroke-width: var(--vis-axis-tick-line-width);
|
220
|
+
}
|
221
|
+
|
222
|
+
text {
|
223
|
+
fill: var(--vis-axis-tick-label-color);
|
224
|
+
cursor: var(--vis-axis-tick-label-cursor);
|
225
|
+
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
226
|
+
text-decoration: var(--vis-axis-tick-label-text-decoration);
|
227
|
+
stroke: none;
|
228
|
+
}
|
229
|
+
`,Yr=R`
|
230
|
+
label: label;
|
231
|
+
fill: var(--vis-axis-label-color);
|
232
|
+
font-size: var(--vis-axis-label-font-size);
|
233
|
+
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
234
|
+
text-anchor: middle;
|
235
|
+
`,bl=R`
|
236
|
+
label: tick-label;
|
237
|
+
`,wl=R`
|
238
|
+
label: tick-label-hideable;
|
239
|
+
opacity: 0;
|
240
|
+
transition: var(--vis-axis-tick-label-hide-transition);
|
241
|
+
`,fm=Object.freeze(Object.defineProperty({__proto__:null,axis:yl,globalStyles:um,grid:vl,hideDomain:Wr,hideTickLine:Hr,label:Yr,root:_l,tick:xl,tickLabel:bl,tickLabelHideable:wl},Symbol.toStringTag,{value:"Module"}));class kl extends Xn{constructor(e){super(),this._defaultConfig=cm,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",vl)}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===F.X?S.Bottom:S.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case F.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,s=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=o-this._width>1?o-this._width:0;switch(i){case S.Top:return{top:e.height,left:s,right:a};case S.Bottom:default:return{bottom:e.height,left:s,right:a}}}case F.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,o=r,s=r;switch(i){case S.Right:return{right:e.width,top:o,bottom:s};case S.Left:default:return{left:e.width,top:o,bottom:s}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case F.X:switch(i){case S.Top:return{top:e.top,left:e.left};case S.Bottom:default:return{top:e.top+this._height,left:e.left}}case F.Y:switch(i){case S.Right:return{top:e.top,left:e.left+this._width};case S.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().tickFormat(()=>"");r.tickValues(this._getConfiguredTickValues()),this.gridGroup.selectAll("*").interrupt(),dt(this.gridGroup,e).call(r).style("opacity",1)}else dt(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 F.X:switch(n){case S.Top:return hl(this.xScale).ticks(r).tickPadding(i);case S.Bottom:default:return pl(this.xScale).ticks(r).tickPadding(i)}case F.Y:switch(n){case S.Right:return dl(this.yScale).ticks(r).tickPadding(i);case S.Left:default:return gl(this.yScale).ticks(r).tickPadding(i)}}}_buildGrid(){const{config:{type:e,position:n}}=this,i=this._getNumTicks();switch(e){case F.X:switch(n){case S.Top:return hl(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0);case S.Bottom:default:return pl(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0)}case F.Y:switch(n){case S.Right:return dl(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0);case S.Left:default:return gl(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0)}}}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:i}=this,r=this._buildAxis(),o=this._getConfiguredTickValues()||r.scale().ticks(this._getNumTicks());r.tickValues(o),e.selectAll("*").interrupt(),dt(e,n).call(r);const s=e.selectAll("g.tick");s.classed(xl,!0).style("font-size",i.tickTextFontSize);const a=e.selectAll("g.tick > text").filter(l=>o.some(c=>Se(l,c))).classed(bl,!0).classed(wl,!!i.tickTextHideOverlapping).style("fill",i.tickTextColor);if(a.nodes().forEach(l=>ji(l)),a.each((l,c,u)=>{var f,h;let d=(h=(f=i.tickFormat)===null||f===void 0?void 0:f.call(i,l,c,o))!==null&&h!==void 0?h:`${l}`;const g=u[c],p=i.tickTextWidth||(i.type===F.X?this._containerWidth/(s.size()+1):this._containerWidth/5),_=getComputedStyle(g),y=Number.parseFloat(_.fontSize),x=_.fontFamily,v={verticalAlign:i.type===F.X?ee.Top:ee.Middle,width:p,textRotationAngle:i.tickTextAngle,separator:i.tickTextSeparator,wordBreak:i.tickTextForceWordBreak};if(i.tickTextFitMode===ai.Trim){const k=Z(g).text(d);nm(k,p,i.tickTextTrimType,!0,y,.58),d=Z(g).text()}lm(g,{text:d,fontFamily:x,fontSize:y},v)}),e.classed(yl,!0).classed(Hr,!i.tickLine).classed(Wr,!i.domainLine),i.fullSize){const l=this._getFullDomainPath(0);dt(e.select(".domain"),n).attr("d",l)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll("g.tick > text");if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(i)})}_collideTickLabels(e){e.each((i,r,o)=>{const s=o[r];s._visible=!0});const n=3;for(let i=0;i<n;i+=1)e.each((r,o,s)=>{const a=s[o];if(!a._visible)return;const c=a.getBoundingClientRect();for(let u=o+1;u<s.length;u+=1){if(o===u)continue;const f=s[u];if(f._visible){const d=f.getBoundingClientRect();if(Zf(c,d,-5)){f._visible=!1;break}}}});e.each((i,r,o)=>{const s=o[r];Z(s).style("opacity",s._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===F.X){const i=this.xScale.range(),r=i[1]-i[0];return Math.floor(r/175)}if(e===F.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===F.X?this.xScale:this.yScale,i=n==null?void 0:n.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):e.minMaxTicksOnly||e.type===F.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess?i:null}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case F.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case F.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:o,labelFontSize:s}=this.config;e.selectAll(`.${Yr}`).remove();const a=this.getPosition(),{width:l,height:c}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),u=i===F.X?this._width/2:Math.pow(-1,+(a===S.Left))*l,f=i===F.X?Math.pow(-1,+(a===S.Top))*c:this._height/2,h=i===F.X?0:Math.pow(-1,+(a===S.Left))*o,d=i===F.X?Math.pow(-1,+(a===S.Top))*o:0,g=i===F.Y?-90:0;e.append("text").attr("class",Yr).text(r).attr("dy",`${this._getLabelDY()}em`).attr("transform",`translate(${u+h},${f+d}) rotate(${g})`).style("font-size",s).style("fill",this.config.labelColor)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case F.X:switch(n){case S.Top:return 0;case S.Bottom:default:return .75}case F.Y:switch(n){case S.Right:return .75;case S.Left:default:return-.25}}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:i,position:r}}=this,o=this.g.selectAll("g.tick > text"),s=this._getTickTextAnchor(n),a=e===F.X?0:this._getYTickTextTranslate(n,r),l=i?`translate(${a},0) rotate(${i})`:`translate(${a},0)`;o.attr("transform",l).attr("text-anchor",s)}_getTickTextAnchor(e){switch(e){case gt.Left:return"start";case gt.Right:return"end";case gt.Center:return"middle";default:return null}}_getYTickTextTranslate(e,n=S.Left){const r=this._axisRawBBox.width-9;switch(e){case gt.Left:return n===S.Left?r*-1:0;case gt.Right:return n===S.Left?0:r;case gt.Center:return n===S.Left?r*-.5:r*.5;default:return 0}}}kl.selectors=fm;var wt;(function(t){t.Circle="circle",t.Cross="cross",t.Diamond="diamond",t.Square="square",t.Star="star",t.Triangle="triangle",t.Wye="wye"})(wt||(wt={}));const hm={[wt.Circle]:Ha,[wt.Cross]:qg,[wt.Diamond]:jg,[wt.Square]:t0,[wt.Star]:Kg,[wt.Triangle]:e0,[wt.Wye]:i0},it=Object.assign(Object.assign({},wt),{Line:"line"});var fi;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(fi||(fi={}));const dm={items:[],labelClassName:"",onLegendItemClick:void 0,labelFontSize:null,labelMaxWidth:null,bulletSize:null,bulletShape:t=>{var e;return(e=t.shape)!==null&&e!==void 0?e:it.Circle},orientation:fi.Horizontal,renderIntoProvidedDomNode:!1},Vr=Le*3,pm={[it.Circle]:Math.PI/4,[it.Cross]:5/9,[it.Diamond]:Math.sqrt(3)/6,[it.Square]:1,[it.Star]:.3,[it.Triangle]:Math.sqrt(3)/4,[it.Wye]:5/11};function gm(t){t.each((e,n,i)=>{Z(i[n]).append("svg").attr("width","100%").attr("height","100%").append("path")})}function mm(t,e,n){t.each((i,r,o)=>{const s=cn(i,e.bulletShape,r),a=Nt(i,n,r),l=Vr,c=s===it.Line?Vr/2.5:Vr,f=Z(o[r]).select("svg").attr("viewBox",`0 0 ${l} ${c}`).select("path").attr("stroke",a),h=i.inactive?"var(--vis-legend-bullet-inactive-opacity)":1;if(s===it.Line)f.attr("d",`M0,${c/2} L${l/2},${c/2} L${l},${c/2}`).attr("transform",null).style("opacity",h).style("stroke-width","3px").style("fill",null).style("fill-opacity",null).style("marker-start","none").style("marker-end","none");else{const d=r0().type(hm[s]).size(l*c*pm[s]),g=(l-2)/l;let p=c/2;switch(s){case it.Triangle:p+=c/8;break;case it.Star:p+=c/16;break;case it.Wye:p-=c/16;break}f.attr("d",d).attr("transform",`translate(${l/2}, ${Math.round(p)}) scale(${g})`).style("stroke-width","1px").style("opacity",null).style("fill",a).style("fill-opacity",h)}})}const Xr=R`
|
242
|
+
label: bullet-legend-component;
|
243
|
+
`,_m=Wt`
|
244
|
+
:root {
|
245
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
246
|
+
/* --vis-legend-font-family: */
|
247
|
+
|
248
|
+
--vis-legend-label-color: #6c778c;
|
249
|
+
--vis-legend-label-max-width: 300px;
|
250
|
+
--vis-legend-label-font-size: 12px;
|
251
|
+
--vis-legend-bullet-size: 9px;
|
252
|
+
--vis-legend-bullet-inactive-opacity: 0.15;
|
253
|
+
--vis-legend-item-spacing: 20px;
|
254
|
+
--vis-legend-vertical-item-spacing: 5px;
|
255
|
+
--vis-legend-bullet-label-spacing: 8px;
|
256
|
+
|
257
|
+
--vis-dark-legend-label-color: #eee;
|
258
|
+
}
|
259
|
+
|
260
|
+
body.theme-dark ${`.${Xr}`} {
|
261
|
+
--vis-legend-label-color: var(--vis-dark-legend-label-color);
|
262
|
+
}
|
263
|
+
|
264
|
+
body.theme-patterns {
|
265
|
+
--vis-legend-bullet-size: 14px;
|
266
|
+
}
|
267
|
+
`,hi=R`
|
268
|
+
label: legendItem;
|
269
|
+
display: inline-flex;
|
270
|
+
align-items: center;
|
271
|
+
font-family: var(--vis-legend-font-family, var(--vis-font-family));
|
272
|
+
margin-right: var(--vis-legend-item-spacing);
|
273
|
+
white-space: nowrap;
|
274
|
+
cursor: default;
|
275
|
+
user-select: none;
|
276
|
+
max-width: min-content;
|
277
|
+
`,Tl=R`
|
278
|
+
label: legendItemVertical;
|
279
|
+
display: flex;
|
280
|
+
margin-top: var(--vis-legend-vertical-item-spacing);
|
281
|
+
`,Sl=R`
|
282
|
+
cursor: pointer;
|
283
|
+
`,qr=R`
|
284
|
+
label: legendItemLabel;
|
285
|
+
font-size: var(--vis-legend-label-font-size);
|
286
|
+
display: inline-block;
|
287
|
+
vertical-align: middle;
|
288
|
+
color: var(--vis-legend-label-color);
|
289
|
+
max-width: var(--vis-legend-label-max-width);
|
290
|
+
text-overflow: ellipsis;
|
291
|
+
overflow: hidden;
|
292
|
+
white-space: nowrap;
|
293
|
+
`,Gr=R`
|
294
|
+
flex: 0 0 auto;
|
295
|
+
label: legendItemBullet;
|
296
|
+
margin-right: var(--vis-legend-bullet-label-spacing);
|
297
|
+
height: var(--vis-legend-bullet-size);
|
298
|
+
width: var(--vis-legend-bullet-size);
|
299
|
+
|
300
|
+
svg {
|
301
|
+
display: block;
|
302
|
+
}
|
303
|
+
`,ym=Object.freeze(Object.defineProperty({__proto__:null,bullet:Gr,clickable:Sl,item:hi,itemVertical:Tl,label:qr,root:Xr,variables:_m},Symbol.toStringTag,{value:"Module"}));class Cl{constructor(e,n){this._defaultConfig=dm,this.config=this._defaultConfig,this._colorAccessor=i=>i.color,this._container=e,this.div=n!=null&&n.renderIntoProvidedDomNode?Z(this._container):Z(this._container).append("div"),this.div.classed(Xr,!0),this.element=this.div.node(),n&&this.update(n)}update(e){this.prevConfig=this.config,this.config=Bt(this._defaultConfig,e),this.render()}render(){const{config:e}=this,n=this.div.selectAll(`.${hi}`).data(e.items),i=n.enter().append("div").on("click",this._onItemClick.bind(this)),r=i.merge(n);r.attr("class",o=>{var s;return`${hi} ${(s=o.className)!==null&&s!==void 0?s:""}`}).classed(Tl,e.orientation===fi.Vertical).classed(Sl,o=>!!e.onLegendItemClick&&this._isItemClickable(o)).attr("title",o=>o.name).style("display",o=>o.hidden?"none":null),i.append("span").attr("class",Gr).call(gm),r.select(`.${Gr}`).style("width",e.bulletSize).style("height",e.bulletSize).style("box-sizing","content-box").call(mm,this.config,this._colorAccessor),i.append("span").attr("class",qr).classed(e.labelClassName,!0).style("max-width",e.labelMaxWidth).style("font-size",e.labelFontSize),r.select(`.${qr}`).text(o=>o.name),n.exit().remove()}_isItemClickable(e){return e.pointer===void 0?!0:e.pointer}_onItemClick(e,n){const{config:{onLegendItemClick:i}}=this,o=this.div.selectAll(`.${hi}`).nodes().indexOf(e.currentTarget);i&&i(n,o)}destroy(){this.element!==this._container&&this.div.remove()}}Cl.selectors=ym;const vm=Object.assign(Object.assign({},je),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0}),xm=Wt`
|
304
|
+
:root {
|
305
|
+
--vis-crosshair-line-stroke-color: #888;
|
306
|
+
--vis-crosshair-line-stroke-width: 1px;
|
307
|
+
--vis-crosshair-line-stroke-opacity: 1;
|
308
|
+
--vis-crosshair-circle-stroke-color: #fff;
|
309
|
+
--vis-crosshair-circle-stroke-width: 1px;
|
310
|
+
--vis-crosshair-circle-stroke-opacity: 0.75;
|
311
|
+
}
|
312
|
+
`,bm=R`
|
313
|
+
label: crosshair-component;
|
314
|
+
`,Ml=R`
|
315
|
+
stroke: var(--vis-crosshair-line-stroke-color);
|
316
|
+
stroke-width: var(--vis-crosshair-line-stroke-width);
|
317
|
+
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
|
318
|
+
pointer-events: none;
|
319
|
+
`,Al=R`
|
320
|
+
stroke: var(--vis-crosshair-circle-stroke-color);
|
321
|
+
stroke-width: var(--vis-crosshair-circle-stroke-width);
|
322
|
+
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
|
323
|
+
pointer-events: none;
|
324
|
+
`,wm=Object.freeze(Object.defineProperty({__proto__:null,circle:Al,globalStyles:xm,line:Ml,root:bm},Symbol.toStringTag,{value:"Module"}));class $l extends Xn{constructor(e){super(),this.clippable=!0,this._defaultConfig=vm,this.config=this._defaultConfig,this.x=0,this.show=!1,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",this.show?1:0),this.line=this.g.append("line").attr("class",Ml)}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,o=i?n.y:this._accessors.y,s=o?It(o)?o:[o]:void 0,a=i?n.yStacked:this._accessors.yStacked,l=(e=n.baseline)!==null&&e!==void 0?e:this._accessors.baseline;return{x:r,y:s,yStacked:a,baseline:l}}setContainer(e){this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this))}_render(e){const{config:n}=this;if(n.snapToData&&!this.datum)return;const i=kt(e)?e:n.duration;dt(this.g,i).style("opacity",this.show?1:0),this.line.attr("y1",0).attr("y1",this._height),dt(this.line,i,Rs).attr("x1",this.x).attr("x2",this.x);const r=this.getCircleData(),o=this.g.selectAll("circle").data(r,(a,l)=>{var c;return(c=a.id)!==null&&c!==void 0?c:l}),s=o.enter().append("circle").attr("class",Al).attr("r",0).attr("cx",this.x).attr("cy",a=>a.y).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth);dt(s.merge(o),i,Rs).attr("cx",this.x).attr("cy",a=>a.y).attr("r",4).style("opacity",a=>a.opacity).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth),o.exit().remove()}hide(){this._onMouseOut()}_onMouseMove(e){var n,i;const{config:r,datamodel:o,element:s}=this;!this.accessors.x&&(!((n=o.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[a]=en(e,s),l=this.xScale.range();if(r.snapToData){!this.accessors.y&&!this.accessors.yStacked&&(!((i=o.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");const c=this.xScale,u=c.invert(a);if(this.datum=zu(o.data,u,this.accessors.x),this.datumIndex=o.data.indexOf(this.datum),!this.datum)return;this.x=Dt(Math.round(c(W(this.datum,this.accessors.x,this.datumIndex))),0,this._width),this.show=this.x>=0&&this.x<=this._width&&(!r.hideWhenFarFromPointer||Math.abs(this.x-a)<r.hideWhenFarFromPointerDistance)}else this.x=Dt(a,l[0],l[1]),this.show=a>=l[0]-2&&a<=l[1]+2;window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this.show?this._showTooltip(e):this._hideTooltip()}_onMouseOut(){this.show=!1,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this._hideTooltip()}_showTooltip(e){var n;const{config:i}=this,r=(n=i.tooltip)!==null&&n!==void 0?n:this.tooltip;if(!r)return;const o=r.getContainer()||this.container.node(),[s,a]=r.isContainerBody()?[e.clientX,e.clientY]:en(e,o),l=i.template(this.datum,this.xScale.invert(this.x));if(r.config.followCursor=!0,!r.config.horizontalPlacement||r.config.horizontalPlacement===S.Auto){const c=r.isContainerBody()?s-this.container.node().getBoundingClientRect().left:s;r.overrideHorizontalPlacement(c>this._containerWidth/2?S.Left:S.Right)}l&&r.show(l,{x:s,y:a})}_hideTooltip(){var e;const{config:n}=this,i=(e=n.tooltip)!==null&&e!==void 0?e:this.tooltip;i==null||i.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(){var e,n;const{config:i,datamodel:{data:r}}=this;if(bi(i.getCircles))return i.getCircles(this.xScale.invert(this.x),r,this.yScale);if(i.snapToData&&this.datum){const o=(e=this.accessors.y)!==null&&e!==void 0?e:[],s=(n=this.accessors.yStacked)!==null&&n!==void 0?n:[],a=W(this.datum,this.accessors.baseline,this.datumIndex)||0,l=Du(this.datum,this.datumIndex,...s).map((u,f,h)=>({y:this.yScale(u+a),opacity:kt(W(this.datum,s[f]))?1:0,color:Nt(this.datum,i.color,f),strokeColor:i.strokeColor?Nt(this.datum,i.strokeColor,f):void 0,strokeWidth:i.strokeWidth?W(this.datum,i.strokeWidth,f):void 0})),c=o.map((u,f)=>{const h=W(this.datum,u);return{y:this.yScale(h),opacity:kt(h)?1:0,color:Nt(this.datum,i.color,l.length+f),strokeColor:i.strokeColor?Nt(this.datum,i.strokeColor,f):void 0,strokeWidth:i.strokeWidth?W(this.datum,i.strokeWidth,f):void 0}});return l.concat(c)}return[]}}$l.selectors=wm;const km=Object.assign(Object.assign({},je),{color:void 0,curveType:L.MonotoneX,baseline:()=>0,opacity:1,cursor:null,minHeight1Px:!1}),El=R`
|
325
|
+
label: area-component;
|
326
|
+
`,Tm=Wt`
|
327
|
+
:root {
|
328
|
+
--vis-area-cursor: default;
|
329
|
+
--vis-area-fill-opacity: 1;
|
330
|
+
--vis-area-stroke-color: none;
|
331
|
+
--vis-area-stroke-width: 0px;
|
332
|
+
--vis-area-stroke-dasharray: none;
|
333
|
+
--vis-area-stroke-opacity: 1;
|
334
|
+
--vis-area-hover-fill-opacity: none;
|
335
|
+
--vis-area-hover-stroke-width: none;
|
336
|
+
|
337
|
+
/* Dark Theme */
|
338
|
+
--vis-dark-area-stroke-color: none;
|
339
|
+
}
|
340
|
+
|
341
|
+
body.theme-dark ${`.${El}`} {
|
342
|
+
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
|
343
|
+
}
|
344
|
+
|
345
|
+
`,jr=R`
|
346
|
+
label: area;
|
347
|
+
cursor: var(--vis-area-cursor);
|
348
|
+
fill-opacity: var(--vis-area-fill-opacity);
|
349
|
+
stroke-width: var(--vis-area-stroke-width);
|
350
|
+
stroke-dasharray: var(--vis-area-stroke-dasharray);
|
351
|
+
stroke: var(--vis-area-stroke-color);
|
352
|
+
stroke-opacity: var(--vis-area-stroke-opacity);
|
353
|
+
|
354
|
+
&:hover {
|
355
|
+
fill-opacity: var(--vis-area-hover-fill-opacity);
|
356
|
+
stroke-width: var(--vis-area-hover-stroke-width);
|
357
|
+
}
|
358
|
+
`,Sm=Object.freeze(Object.defineProperty({__proto__:null,area:jr,globalStyles:Tm,root:El},Symbol.toStringTag,{value:"Module"}));class di extends Xn{constructor(e){super(),this._defaultConfig=km,this.config=this._defaultConfig,this.stacked=!0,this.events={[di.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=kt(e)?e:n.duration,o=zr[n.curveType];this._areaGen=Xg().x(p=>p.x).y0(p=>p.y0).y1(p=>{const _=Math.abs(p.y1-p.y0)<1;return p.y1-(_&&n.minHeight1Px?1:0)}).curve(o);const s=It(n.y)?n.y:[n.y],a=i.map((p,_)=>this.xScale(W(p,n.x,_))),l=Ru(i,n.baseline,s,this._prevNegative);this._prevNegative=l.map(p=>!!p.negative);const c=l.map(p=>p.map((_,y)=>({y0:this.yScale(_[0]),y1:this.yScale(_[1]),x:a[y]}))),u=c.length-1,f=c.reverse(),h=this.g.selectAll(`.${jr}`).data(f),d=h.enter().append("path").attr("class",jr).attr("d",p=>this._areaGen(p)||this._emptyPath()).style("opacity",0).style("fill",(p,_)=>Nt(i,n.color,u-_)),g=dt(d.merge(h),r).style("opacity",(p,_)=>p.some(x=>x.y0-x.y1!==0)?W(i,n.opacity,u-_):0).style("fill",(p,_)=>Nt(i,n.color,u-_)).style("cursor",(p,_)=>cn(i,n.cursor,u-_));r?g.attrTween("d",(_,y,x)=>{const v=Z(x[y]).attr("d"),M=this._areaGen(_)||this._emptyPath();return ul(v,M)}):g.attr("d",p=>this._areaGen(p)||this._emptyPath()),dt(h.exit(),r).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=It(n.y)?n.y:[n.y],o=e?yo(i.data,this.xScale.domain(),n.x):i.data;return Ou(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]}])}}di.selectors=Sm;const Zr=Symbol("componentAccessorKey"),Nl=Symbol("tooltipAccessorKey"),Ol=Symbol("crosshairAccessorKey"),Dl=Symbol("axisAccessorKey"),Cm=Symbol("annotationsAccessorKey");function ye(t,e){return Se(t,e)}function ne(t){const e=m.getCurrentInstance(),n=e.attrs;return m.computed(()=>{const i={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{i[m.camelize(o)]=t[m.camelize(o)]}),{...i,...n}})}const Mm=m.defineComponent({__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:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=m.toRefs(n),r=ne(n),o=m.ref(),s=m.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=m.ref();return m.watch(i,()=>{o.value&&o.value.setData(i.value,!0)}),m.watchEffect(()=>{var l;s.components.map(c=>c.config),(l=o.value)==null||l.updateContainer({...m.toRaw(r.value),...m.toRaw(s)})}),m.onMounted(()=>{a.value&&(o.value=new Lg(a.value,{...m.toRaw(s)},i.value))}),m.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),m.provide(Zr,{data:i,update:l=>s.components=[...s.components,l],destroy:()=>{var l;return s.components=(l=s.components)==null?void 0:l.filter(c=>!c.isDestroyed())}}),m.provide(Dl,{data:i,update:l=>s[`${l.config.type}Axis`]=l,destroy:l=>{s[`${l}Axis`]=void 0}}),m.provide(Ol,{data:i,update:l=>s.crosshair=l,destroy:()=>{s.crosshair=void 0}}),m.provide(Nl,{data:i,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),m.provide(Cm,{data:i,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:o}),(l,c)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[m.renderSlot(l.$slots,"default")],512))}}),Am={"data-vis-component":""},$m=m.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Zr),i=t,r=m.computed(()=>n.data.value??i.data),o=ne(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new di(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;ye(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Am))}}),Em={"data-vis-axis":""},Rl=m.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Dl),i=t,r=m.computed(()=>n.data.value??i.data),o=ne(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new kl(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy(i.type)}),m.watch(o,(a,l)=>{var c;ye(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Em))}}),Nm={"data-vis-crosshair":""},Om=m.defineComponent({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=m.inject(Ol),i=t,r=m.computed(()=>n.data.value??i.data),o=ne(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new $l(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;ye(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Nm))}}),Dm={"data-vis-component":""},Rm=m.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Zr),i=t,r=m.computed(()=>n.data.value??i.data),o=ne(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new ii(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;ye(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Dm))}}),Fm={"data-vis-tooltip":""},Pm=m.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(t,{expose:e}){const n=m.inject(Nl),i=ne(t),r=m.ref();return m.onMounted(()=>{m.nextTick(()=>{r.value=new Pa(i.value),n.update(r.value)})}),m.onUnmounted(()=>{var o;(o=r.value)==null||o.destroy(),n.destroy()}),m.watch(i,(o,s)=>{var a;ye(o,s)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(o,s)=>(m.openBlock(),m.createElementBlock("div",Fm))}}),zm=m.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(t,{expose:e}){const n=t;m.computed(()=>n.data);const i=ne(n),r=m.ref(),o=m.ref();return m.onMounted(()=>{m.nextTick(()=>{o.value&&(r.value=new Cl(o.value,{...i.value,renderIntoProvidedDomNode:!0}))})}),m.onUnmounted(()=>{var s;(s=r.value)==null||s.destroy()}),m.watch(i,(s,a)=>{var l;ye(s,a)||(l=r.value)==null||l.update(i.value)}),e({component:r}),(s,a)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});(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]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Lm={class:"space-y-2"},Im=m.defineComponent({__name:"Area",props:{data:{},xLabel:{},yLabel:{},categories:{},displayProps:{},xFormatter:{type:Function},crossHairTemplate:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{}},setup(t){const e=t,n=Object.values(e.categories).map(o=>o.color);function i(o){var s;return{y:a=>Number(a[o]),color:((s=e.categories[o])==null?void 0:s.color)??"#3b82f6"}}const r=n.map((o,s)=>`
|
359
|
+
<linearGradient id="gradient${s}-${o}" gradientTransform="rotate(90)">
|
360
|
+
<stop offset="0%" stop-color="${o}" stop-opacity="1" />
|
361
|
+
<stop offset="100%" stop-color="${o}" stop-opacity="0" />
|
362
|
+
</linearGradient>
|
363
|
+
`).join("");return(o,s)=>(m.openBlock(),m.createElementBlock("div",Lm,[m.createVNode(m.unref(zm),{items:Object.values(o.categories)},null,8,["items"]),m.createVNode(m.unref(Mm),{data:o.data,height:275,"svg-defs":m.unref(r),class:""},{default:m.withCtx(()=>[m.createVNode(m.unref(Pm),{"follow-cursor":!1,"horizontal-placement":m.unref(S).Right,"vertical-placement":m.unref(S).Top},null,8,["horizontal-placement","vertical-placement"]),(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(e.displayProps,(a,l)=>(m.openBlock(),m.createElementBlock(m.Fragment,{key:l},[m.createVNode(m.unref($m),m.mergeProps({x:(c,u)=>u,ref_for:!0},i(a),{color:`url(#gradient${l}-${m.unref(n)[l]})`,opacity:.5,"curve-type":o.curveType??m.unref(L).MonotoneX}),null,16,["x","color","curve-type"]),m.createVNode(m.unref(Rm),{x:(c,u)=>u,y:c=>c[a],color:m.unref(n)[l],"curve-type":o.curveType??m.unref(L).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),m.createVNode(m.unref(Rl),{type:"x","grid-line":!1,"domain-line":!1,"tick-format":o.xFormatter,"num-ticks":o.xNumTicks??4},null,8,["tick-format","num-ticks"]),m.createVNode(m.unref(Rl),{type:"y","num-ticks":o.yNumTicks??4,"domain-line":!1,label:o.yLabel},null,8,["num-ticks","label"]),m.createVNode(m.unref(Om),{color:"#666",template:o.crossHairTemplate},null,8,["template"])]),_:1},8,["data","svg-defs"])]))}}),Qr=m.defineComponent({__name:"AreaChart",props:{data:{},categories:{},xLabel:{},yLabel:{},displayProps:{},xFormatter:{type:Function},generateChartTooltip:{type:Function}},setup(t){const e=t;return(n,i)=>(m.openBlock(),m.createBlock(Im,m.mergeProps(e,{"cross-hair-template":n.generateChartTooltip}),null,16,["cross-hair-template"]))}}),Bm={install(t){t.components(Qr.name,Qr)}};Ot.AreaChart=Qr,Ot.default=Bm,Object.defineProperties(Ot,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|