import{i as Bt}from"./Paired-C4wB-ooD.js";var $="http://www.w3.org/1999/xhtml";const lt={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),lt.hasOwnProperty(e)?{space:lt[e],local:t}:t}function zt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===$&&e.documentElement.namespaceURI===$?e.createElement(t):e.createElementNS(n,t)}}function Ht(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function dt(t){var e=pt(t);return(e.local?Ht:zt)(e)}function jt(){}function yt(t){return t==null?jt:function(){return this.querySelector(t)}}function qt(t){typeof t!="function"&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o=m&&(m=y+1);!(E=v[m])&&++m=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function ye(t){t||(t=ve);function e(u,h){return u&&h?t(u.__data__,h.__data__):!u-!h}for(var n=this._groups,r=n.length,o=new Array(r),i=0;ie?1:t>=e?0:NaN}function ge(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function be(){return Array.from(this)}function me(){for(var t=this._groups,e=0,n=t.length;e1?this.each((e==null?Ie:typeof e=="function"?Re:Me)(t,e,n??"")):De(this.node(),t)}function De(t,e){return t.style.getPropertyValue(e)||bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Fe(t){return function(){delete this[t]}}function Ue(t,e){return function(){this[t]=e}}function Le(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Be(t,e){return arguments.length>1?this.each((e==null?Fe:typeof e=="function"?Le:Ue)(t,e)):this.node()[t]}function mt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new wt(t)}function wt(t){this._node=t,this._names=mt(t.getAttribute("class")||"")}wt.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 St(t,e){for(var n=et(t),r=-1,o=e.length;++r=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function pn(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,o=e.length,i;n1e4?1e4:t,{In:function(e){return Math.pow(e,t)},Out:function(e){return 1-Math.pow(1-e,t)},InOut:function(e){return e<.5?Math.pow(e*2,t)/2:(1-Math.pow(2-e*2,t))/2+.5}}}}),T=function(){return performance.now()},En=function(){function t(){for(var e=[],n=0;n0;){this._tweensAddedDuringUpdate={};for(var o=0;o1?i(t[n],t[n-1],n-r):i(t[o],t[o+1>n?n:o+1],r-o)},Utils:{Linear:function(t,e,n){return(e-t)*n+t}}},Et=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),K=new En,Gn=function(){function t(e,n){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=I.Linear.None,this._interpolationFunction=G.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=Et.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,typeof n=="object"?(this._group=n,n.add(this)):n===!0&&(this._group=K,K.add(this))}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.getDuration=function(){return this._duration},t.prototype.to=function(e,n){if(n===void 0&&(n=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=n<0?0:n,this},t.prototype.duration=function(e){return e===void 0&&(e=1e3),this._duration=e<0?0:e,this},t.prototype.dynamic=function(e){return e===void 0&&(e=!1),this._isDynamic=e,this},t.prototype.start=function(e,n){if(e===void 0&&(e=T()),n===void 0&&(n=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed){this._reversed=!1;for(var r in this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r]}if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||n){if(this._propertiesAreSetUp=!0,!this._isDynamic){var o={};for(var i in this._valuesEnd)o[i]=this._valuesEnd[i];this._valuesEnd=o}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,n)}return this},t.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},t.prototype._setupProperties=function(e,n,r,o,i){for(var s in r){var l=e[s],f=Array.isArray(l),a=f?"array":typeof l,c=!f&&Array.isArray(r[s]);if(!(a==="undefined"||a==="function")){if(c){var u=r[s];if(u.length===0)continue;for(var h=[l],_=0,d=u.length;_"u"||i)&&(n[s]=l),f||(n[s]*=1),c?o[s]=r[s].slice().reverse():o[s]=n[s]||0}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},t.prototype.pause=function(e){return e===void 0&&(e=T()),this._isPaused||!this._isPlaying?this:(this._isPaused=!0,this._pauseStart=e,this)},t.prototype.resume=function(e){return e===void 0&&(e=T()),!this._isPaused||!this._isPlaying?this:(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this)},t.prototype.stopChainedTweens=function(){for(var e=0,n=this._chainedTweens.length;ef)return 1;var b=Math.trunc(s/l),v=s-b*l,p=Math.min(v/r._duration,1);return p===0&&s===r._duration?1:p},c=a(),u=this._easingFunction(c);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,c),this._duration===0||s>=this._duration)if(this._repeat>0){var h=Math.min(Math.trunc((s-this._duration)/l)+1,this._repeat);isFinite(this._repeat)&&(this._repeat-=h);for(i in this._valuesStartRepeat)!this._yoyo&&typeof this._valuesEnd[i]=="string"&&(this._valuesStartRepeat[i]=this._valuesStartRepeat[i]+parseFloat(this._valuesEnd[i])),this._yoyo&&this._swapEndStartRepeatValues(i),this._valuesStart[i]=this._valuesStartRepeat[i];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=l*h,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}else{this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var _=0,d=this._chainedTweens.length;_2&&(s.children=arguments.length>3?N.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)s[i]===void 0&&(s[i]=t.defaultProps[i]);return R(t,s,r,o,null)}function R(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o??++Pt,__i:-1,__u:0};return o==null&&g.vnode!=null&&g.vnode(i),i}function Y(t){return t.children}function L(t,e){this.props=t,this.context=e}function O(t,e){if(e==null)return t.__?O(t.__,t.__i+1):null;for(var n;ee&&P.sort(Tt),t=P.shift(),e=P.length,On(t)}finally{P.length=j.__r=0}}function Rt(t,e,n,r,o,i,s,l,f,a,c){var u,h,_,d,b,v,p,y=r&&r.__k||H,m=e.length;for(f=Tn(n,e,y,f,m),u=0;u0?s=t.__k[i]=R(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):t.__k[i]=s,f=i+h,s.__=t,s.__b=t.__b+1,l=null,(a=s.__i=In(s,n,f,u))!=-1&&(u--,(l=n[a])&&(l.__u|=2)),l==null||l.__v==null?(a==-1&&(o>c?h--:of?h--:h++,s.__u|=4))):t.__k[i]=null;if(u)for(i=0;i(c?1:0)){for(o=n-1,i=n+1;o>=0||i=0?o--:i++])!=null&&!(2&a.__u)&&l==a.key&&f==a.type)return s}return-1}function ft(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Pn.test(e)?n:n+"px"}function F(t,e,n,r,o){var i,s;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||ft(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||ft(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")i=e!=(e=e.replace(It,"$1")),s=e.toLowerCase(),e=s in t||e=="onFocusOut"||e=="onFocusIn"?s.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[M]=r[M]:(n[M]=nt,t.addEventListener(e,i?J:Q,i)):t.removeEventListener(e,i?J:Q,i);else{if(o=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function ct(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e[U]==null)e[U]=nt++;else if(e[U]0?t:W(t)?t.map(Ft):A({},t)}function Mn(t,e,n,r,o,i,s,l,f){var a,c,u,h,_,d,b,v=n.props||z,p=e.props,y=e.type;if(y=="svg"?o="http://www.w3.org/2000/svg":y=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a2&&(l.children=arguments.length>3?N.call(arguments,2):n),R(t.type,l,r||t.key,o||t.ref,null)}N=H.slice,g={__e:function(t,e,n,r){for(var o,i,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(t)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(t,r||{}),s=o.__d),s)return o.__E=o}catch(l){t=l}throw t}},Pt=0,xt=function(t){return t!=null&&t.constructor===void 0},L.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=A({},this.state),typeof t=="function"&&(t=t(A({},n),this.props)),t&&A(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),at(this))},L.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),at(this))},L.prototype.render=Y,P=[],Ot=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tt=function(t,e){return t.__v.__b-e.__v.__b},j.__r=0,V=Math.random().toString(8),U="__d"+V,M="__a"+V,It=/(PointerCapture)$|Capture$/i,nt=0,Q=ct(!1),J=ct(!0);function _t(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n"u")){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",n==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}var Vn=`.float-tooltip-kap { position: absolute; width: max-content; /* prevent shrinking near right edge */ max-width: max(50%, 150px); padding: 3px 5px; border-radius: 3px; font: 12px sans-serif; color: #eee; background: rgba(0,0,0,0.6); pointer-events: none; } `;Xn(Vn);var Kn=Bt({props:{content:{default:!1},offsetX:{triggerUpdate:!1},offsetY:{triggerUpdate:!1}},init:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.style,i=o===void 0?{}:o,s=!!e&&q(e)==="object"&&!!e.node&&typeof e.node=="function",l=kn(s?e.node():e);l.style("position")==="static"&&l.style("position","relative"),n.tooltipEl=l.append("div").attr("class","float-tooltip-kap"),Object.entries(i).forEach(function(a){var c=zn(a,2),u=c[0],h=c[1];return n.tooltipEl.style(u,h)}),n.tooltipEl.style("left","-10000px").style("display","none");var f="tooltip-".concat(Math.round(Math.random()*1e12));n.mouseInside=!1,l.on("mousemove.".concat(f),function(a){n.mouseInside=!0;var c=Cn(a),u=l.node(),h=u.offsetWidth,_=u.offsetHeight,d=[n.offsetX===null||n.offsetX===void 0?"-".concat(c[0]/h*100,"%"):typeof n.offsetX=="number"?"calc(-50% + ".concat(n.offsetX,"px)"):n.offsetX,n.offsetY===null||n.offsetY===void 0?_>130&&_-c[1]<100?"calc(-100% - 6px)":"21px":typeof n.offsetY=="number"?n.offsetY<0?"calc(-100% - ".concat(Math.abs(n.offsetY),"px)"):"".concat(n.offsetY,"px"):n.offsetY];n.tooltipEl.style("left",c[0]+"px").style("top",c[1]+"px").style("transform","translate(".concat(d.join(","),")")),n.content&&n.tooltipEl.style("display","inline")}),l.on("mouseover.".concat(f),function(){n.mouseInside=!0,n.content&&n.tooltipEl.style("display","inline")}),l.on("mouseout.".concat(f),function(){n.mouseInside=!1,n.tooltipEl.style("display","none")})},update:function(e){e.tooltipEl.style("display",e.content&&e.mouseInside?"inline":"none"),e.content?e.content instanceof HTMLElement?(e.tooltipEl.text(""),e.tooltipEl.append(function(){return e.content})):typeof e.content=="string"?e.tooltipEl.html(e.content):Wn(e.content)?(e.tooltipEl.text(""),Yn(e.content,e.tooltipEl.node())):(e.tooltipEl.style("display","none"),console.warn("Tooltip content is invalid, skipping.",e.content,e.content.toString())):e.tooltipEl.text("")}});export{I as E,En as G,Gn as T,wn as a,yt as b,Xt as c,De as d,Kn as i,Gt as m,pt as n,Cn as p,kn as s};