const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/5_w68OZ9.js","assets/js/-fu1hSD_.js","assets/js/D1C2KfwP.js","assets/js/qFMjfHJD.js","assets/js/elL1GhmQ.js","assets/js/DqjTWg2h.js","assets/js/GZAJeW7u.js","assets/js/DfIDC-M9.js","assets/js/CTyn8xHh.js","assets/js/DISaS9Xv.js","assets/index-TmzLOKdh.js","assets/gtm-DDM5wXle.css","assets/js/IAVEYXfa.js","assets/js/CGBoZHvM.js","assets/js/rPO8BmYx.js"])))=>i.map(i=>d[i]);
import{g as e,c as t,r as n,R as i,a as r,d as a}from"./-fu1hSD_.js";import{c as o,b as s,a as l,d as c,P as u,e as h}from"./D1C2KfwP.js";const d={},f=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));i=Promise.allSettled(t.map((e=>{if((e=function(e){return"/"+e}(e))in d)return;d[e]=!0;const t=e.endsWith(".css"),i=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${i}`))return;const r=document.createElement("link");return r.rel=t?"stylesheet":"modulepreload",t||(r.as="script"),r.crossOrigin="",r.href=e,n&&r.setAttribute("nonce",n),document.head.appendChild(r),t?new Promise(((t,n)=>{r.addEventListener("load",t),r.addEventListener("error",(()=>n(new Error(`Unable to preload CSS for ${e}`))))})):void 0})))}function r(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return i.then((t=>{for(const e of t||[])"rejected"===e.status&&r(e.reason);return e().catch(r)}))};var p=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),g="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,m="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),y="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(m):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var b=["top","right","bottom","left","width","height","size","weight"],v="undefined"!=typeof MutationObserver,x=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,i=!1,r=0;function a(){n&&(n=!1,e()),i&&s()}function o(){y(a)}function s(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(o,t);r=e}return s}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){g&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),v?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){g&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;b.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),w=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},M=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||m},S=A(0,0,0,0);function k(e){return parseFloat(e)||0}function _(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+k(e["border-"+n+"-width"])}),0)}function O(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return S;var i=M(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],a=e["padding-"+r];t[r]=k(a)}return t}(i),a=r.left+r.right,o=r.top+r.bottom,s=k(i.width),l=k(i.height);if("border-box"===i.boxSizing&&(Math.round(s+a)!==t&&(s-=_(i,"left","right")+a),Math.round(l+o)!==n&&(l-=_(i,"top","bottom")+o)),!function(e){return e===M(e).document.documentElement}(e)){var c=Math.round(s+a)-t,u=Math.round(l+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return A(r.left,r.top,s,l)}var C="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof M(e).SVGGraphicsElement}:function(e){return e instanceof M(e).SVGElement&&"function"==typeof e.getBBox};function E(e){return g?C(e)?function(e){var t=e.getBBox();return A(0,0,t.width,t.height)}(e):O(e):S}function A(e,t,n,i){return{x:e,y:t,width:n,height:i}}var T=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=A(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=E(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),I=function(){return function(e,t){var n,i,r,a,o,s,l,c=(i=(n=t).x,r=n.y,a=n.width,o=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),w(l,{x:i,y:r,width:a,height:o,top:r,right:i+a,bottom:o+r,left:i}),l);w(this,{target:e,contentRect:c})}}(),j=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new p,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof M(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new T(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof M(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new I(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),L="undefined"!=typeof WeakMap?new WeakMap:new p,P=function(){return function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=x.getInstance(),i=new j(t,n,this);L.set(this,i)}}();["observe","unobserve","disconnect"].forEach((function(e){P.prototype[e]=function(){var t;return(t=L.get(this))[e].apply(t,arguments)}}));var z=void 0!==m.ResizeObserver?m.ResizeObserver:P;const D=Object.freeze(Object.defineProperty({__proto__:null,default:z},Symbol.toStringTag,{value:"Module"}));var N={exports:{}};N.exports=function(){var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",a="minute",o="hour",s="day",l="week",c="month",u="quarter",h="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},b={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+y(i,2,"0")+":"+y(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,c),a=n-r<0,o=t.clone().add(i+(a?-1:1),c);return+(-(i+(n-r)/(a?r-o:o-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:h,w:l,d:s,D:d,h:o,m:a,s:r,ms:i,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},v="en",x={};x[v]=m;var w="$isDayjsObject",M=function(e){return e instanceof O||!(!e||!e[w])},S=function e(t,n,i){var r;if(!t)return v;if("string"==typeof t){var a=t.toLowerCase();x[a]&&(r=a),n&&(x[a]=n,r=a);var o=t.split("-");if(!r&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,r=s}return!i&&r&&(v=r),r||!i&&v},k=function(e,t){if(M(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},_=b;_.l=S,_.i=M,_.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function m(e){this.$L=S(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var y=m.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(_.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(p);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(e,t){var n=k(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return k(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<k(e)},y.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,i=!!_.u(t)||t,u=_.p(e),f=function(e,t){var r=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?r:r.endOf(s)},p=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,m=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case h:return i?f(1,0):f(31,11);case c:return i?f(1,m):f(0,m+1);case l:var v=this.$locale().weekStart||0,x=(g<v?g+7:g)-v;return f(i?y-x:y+(6-x),m);case s:case d:return p(b+"Hours",0);case o:return p(b+"Minutes",1);case a:return p(b+"Seconds",2);case r:return p(b+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,l=_.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[s]=u+"Date",n[d]=u+"Date",n[c]=u+"Month",n[h]=u+"FullYear",n[o]=u+"Hours",n[a]=u+"Minutes",n[r]=u+"Seconds",n[i]=u+"Milliseconds",n)[l],p=l===s?this.$D+(t-this.$W):t;if(l===c||l===h){var g=this.clone().set(d,1);g.$d[f](p),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[_.p(e)]()},y.add=function(i,u){var d,f=this;i=Number(i);var p=_.p(u),g=function(e){var t=k(f);return _.w(t.date(t.date()+Math.round(e*i)),f)};if(p===c)return this.set(c,this.$M+i);if(p===h)return this.set(h,this.$y+i);if(p===s)return g(1);if(p===l)return g(7);var m=(d={},d[a]=t,d[o]=n,d[r]=e,d)[p]||1,y=this.$d.getTime()+i*m;return _.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=_.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,c=n.months,u=n.meridiem,h=function(e,n,r,a){return e&&(e[n]||e(t,i))||r[n].slice(0,a)},d=function(e){return _.s(a%12||12,e,"0")},p=u||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i};return i.replace(g,(function(e,i){return i||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return s+1;case"MM":return _.s(s+1,2,"0");case"MMM":return h(n.monthsShort,s,c,3);case"MMMM":return h(c,s);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return h(n.weekdaysMin,t.$W,l,2);case"ddd":return h(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(a);case"HH":return _.s(a,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(a,o,!0);case"A":return p(a,o,!1);case"m":return String(o);case"mm":return _.s(o,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return r}return null}(e)||r.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(i,d,f){var p,g=this,m=_.p(d),y=k(i),b=(y.utcOffset()-this.utcOffset())*t,v=this-y,x=function(){return _.m(g,y)};switch(m){case h:p=x()/12;break;case c:p=x();break;case u:p=x()/3;break;case l:p=(v-b)/6048e5;break;case s:p=(v-b)/864e5;break;case o:p=v/n;break;case a:p=v/t;break;case r:p=v/e;break;default:p=v}return f?p:_.a(p)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return x[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=S(e,t,!0);return i&&(n.$L=i),n},y.clone=function(){return _.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},m}(),C=O.prototype;return k.prototype=C,[["$ms",i],["$s",r],["$m",a],["$H",o],["$W",s],["$M",c],["$y",h],["$D",d]].forEach((function(e){C[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),k.extend=function(e,t){return e.$i||(e(t,O,k),e.$i=!0),k},k.locale=S,k.isDayjs=M,k.unix=function(e){return k(1e3*e)},k.en=x[v],k.Ls=x,k.p={},k}();const R=e(N.exports);var V,$,F={exports:{}};F.exports=(V={year:0,month:1,day:2,hour:3,minute:4,second:5},$={},function(e,t,n){var i,r=function(e,t,n){void 0===n&&(n={});var i=new Date(e);return function(e,t){void 0===t&&(t={});var n=t.timeZoneName||"short",i=e+"|"+n,r=$[i];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:n}),$[i]=r),r}(t,n).formatToParts(i)},a=function(e,t){for(var i=r(e,t),a=[],o=0;o<i.length;o+=1){var s=i[o],l=s.type,c=s.value,u=V[l];u>=0&&(a[u]=parseInt(c,10))}var h=a[3],d=24===h?0:h,f=a[0]+"-"+a[1]+"-"+a[2]+" "+d+":"+a[4]+":"+a[5]+":000",p=+e;return(n.utc(f).valueOf()-(p-=p%1e3))/6e4},o=t.prototype;o.tz=function(e,t){void 0===e&&(e=i);var r,a=this.utcOffset(),o=this.toDate(),s=o.toLocaleString("en-US",{timeZone:e}),l=Math.round((o-new Date(s))/1e3/60),c=15*-Math.round(o.getTimezoneOffset()/15)-l;if(Number(c)){if(r=n(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=r.utcOffset();r=r.add(a-u,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},o.offsetName=function(e){var t=this.$x.$timezone||n.tz.guess(),i=r(this.valueOf(),t,{timeZoneName:e}).find((function(e){return"timezonename"===e.type.toLowerCase()}));return i&&i.value};var s=o.startOf;o.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return s.call(this,e,t);var i=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(i,e,t).tz(this.$x.$timezone,!0)},n.tz=function(e,t,r){var o=r&&t,s=r||t||i,l=a(+n(),s);if("string"!=typeof e)return n(e).tz(s);var c=function(e,t,n){var i=e-60*t*1e3,r=a(i,n);if(t===r)return[i,t];var o=a(i-=60*(r-t)*1e3,n);return r===o?[i,r]:[e-60*Math.min(r,o)*1e3,Math.max(r,o)]}(n.utc(e,o).valueOf(),l,s),u=c[0],h=c[1],d=n(u).utcOffset(h);return d.$x.$timezone=s,d},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(e){i=e}});const B=e(F.exports);var H={exports:{}};H.exports=function(){var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(i,r,a){var o=r.prototype;a.utc=function(e){return new r({date:e,utc:!0,args:arguments})},o.utc=function(t){var n=a(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},o.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var s=o.parse;o.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=o.init;o.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=o.utcOffset;o.utcOffset=function(i,r){var a=this.$utils().u;if(a(i))return this.$u?0:a(this.$offset)?c.call(this):this.$offset;if("string"==typeof i&&null===(i=function(e){void 0===e&&(e="");var i=e.match(t);if(!i)return null;var r=(""+i[0]).match(n)||["-",0,0],a=r[0],o=60*+r[1]+ +r[2];return 0===o?0:"+"===a?o:-o}(i)))return this;var o=Math.abs(i)<=16?60*i:i,s=this;if(r)return s.$offset=o,s.$u=0===i,s;if(0!==i){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(o+l,e)).$offset=o,s.$x.$localOffset=l}else s=this.utc();return s};var u=o.format;o.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,t)},o.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var h=o.toDate;o.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var d=o.diff;o.diff=function(e,t,n){if(e&&this.$u===e.$u)return d.call(this,e,t,n);var i=this.local(),r=a(e).local();return d.call(i,r,t,n)}}}();const W=e(H.exports);var U={exports:{}},Y={},G=n,q=60103;if(Y.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var X=Symbol.for;q=X("react.element"),Y.Fragment=X("react.fragment")}var Z=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,K=Object.prototype.hasOwnProperty,Q={key:!0,ref:!0,__self:!0,__source:!0};function J(e,t,n){var i,r={},a=null,o=null;for(i in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(o=t.ref),t)K.call(t,i)&&!Q.hasOwnProperty(i)&&(r[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===r[i]&&(r[i]=t[i]);return{$$typeof:q,type:e,key:a,ref:o,props:r,_owner:Z.current}}Y.jsx=J,Y.jsxs=J,U.exports=Y;var ee,te=U.exports,ne={exports:{}};ee=ne,function(){var e={}.hasOwnProperty;function t(){for(var n=[],i=0;i<arguments.length;i++){var r=arguments[i];if(r){var a=typeof r;if("string"===a||"number"===a)n.push(r);else if(Array.isArray(r)){if(r.length){var o=t.apply(null,r);o&&n.push(o)}}else if("object"===a){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){n.push(r.toString());continue}for(var s in r)e.call(r,s)&&r[s]&&n.push(s)}}}return n.join(" ")}ee.exports?(t.default=t,ee.exports=t):window.classNames=t}();const ie=e(ne.exports);var re,ae=new Uint8Array(16);function oe(){if(!re&&!(re="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return re(ae)}const se=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var le,ce,ue=[],he=0;he<256;++he)ue.push((he+256).toString(16).substr(1));function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ue[e[t+0]]+ue[e[t+1]]+ue[e[t+2]]+ue[e[t+3]]+"-"+ue[e[t+4]]+ue[e[t+5]]+"-"+ue[e[t+6]]+ue[e[t+7]]+"-"+ue[e[t+8]]+ue[e[t+9]]+"-"+ue[e[t+10]]+ue[e[t+11]]+ue[e[t+12]]+ue[e[t+13]]+ue[e[t+14]]+ue[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&se.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n}var fe=0,pe=0;function ge(e,t,n){var i=t&&n||0,r=t||new Array(16),a=(e=e||{}).node||le,o=void 0!==e.clockseq?e.clockseq:ce;if(null==a||null==o){var s=e.random||(e.rng||oe)();null==a&&(a=le=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==o&&(o=ce=16383&(s[6]<<8|s[7]))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:pe+1,u=l-fe+(c-pe)/1e4;if(u<0&&void 0===e.clockseq&&(o=o+1&16383),(u<0||l>fe)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");fe=l,pe=c,ce=o;var h=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;r[i++]=h>>>24&255,r[i++]=h>>>16&255,r[i++]=h>>>8&255,r[i++]=255&h;var d=l/4294967296*1e4&268435455;r[i++]=d>>>8&255,r[i++]=255&d,r[i++]=d>>>24&15|16,r[i++]=d>>>16&255,r[i++]=o>>>8|128,r[i++]=255&o;for(var f=0;f<6;++f)r[i+f]=a[f];return t||de(r)}const me="UPSERT_SPEC",ye="REMOVE_SPEC",be="SPEC_PARSED",ve="SPEC_UNMOUNTED";function xe(e){return{type:me,spec:e}}function we(e){return{type:ye,id:e}}function Me(){return{type:be}}function Se(){return{type:ve}}const ke=o(null,(e=>s({specParsed:Me,specUnmounted:Se},e)))((e=>{const t=e;return n.useEffect((()=>{t.specParsed()})),n.useEffect((()=>()=>{t.specUnmounted()}),[]),e.children?e.children:null})),_e="EXTERNAL_POINTER_EVENT";const Oe="Z_INDEX_EVENT";const Ce=Object.freeze({Global:"global",Goal:"goal",Partition:"partition",XYAxis:"xy_axis",Heatmap:"heatmap",Wordcloud:"wordcloud"}),Ee="default",Ae=2*Math.PI,Te=Ae/4,Ie=1.618;var je={exports:{}};je.exports=function(){for(var e=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e<t?t:e>n?n:e},t=e,n=function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var n=0;n<=3;n++)n<3?((e[n]<0||e[n]>255)&&(e._clipped=!0),e[n]=t(e[n],0,255)):3===n&&(e[n]=t(e[n],0,1));return e},i={},r=0,a=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r<a.length;r+=1){var o=a[r];i["[object "+o+"]"]=o.toLowerCase()}var s=function(e){return i[Object.prototype.toString.call(e)]||"object"},l=s,c=function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==l(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},u=s,h=function(e){if(e.length<2)return null;var t=e.length-1;return"string"==u(e[t])?e[t].toLowerCase():null},d=Math.PI,f={clip_rgb:n,limit:e,type:s,unpack:c,last:h,PI:d,TWOPI:2*d,PITHIRD:d/3,DEG2RAD:d/180,RAD2DEG:180/d},p={format:{},autodetect:[]},g=f.last,m=f.clip_rgb,y=f.type,b=p,v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=this;if("object"===y(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var i=g(e),r=!1;if(!i){r=!0,b.sorted||(b.autodetect=b.autodetect.sort((function(e,t){return t.p-e.p})),b.sorted=!0);for(var a=0,o=b.autodetect;a<o.length;a+=1){var s=o[a];if(i=s.test.apply(s,e))break}}if(!b.format[i])throw new Error("unknown format: "+e);var l=b.format[i].apply(null,r?e:e.slice(0,-1));n._rgb=m(l),3===n._rgb.length&&n._rgb.push(1)};v.prototype.toString=function(){return"function"==y(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var x=v,w=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(w.Color,[null].concat(e)))};w.Color=x,w.version="2.4.2";var M=w,S=f.unpack,k=Math.max,_=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=S(e,"rgb"),i=n[0],r=n[1],a=n[2],o=1-k(i/=255,k(r/=255,a/=255)),s=o<1?1/(1-o):0;return[(1-i-o)*s,(1-r-o)*s,(1-a-o)*s,o]},O=_,C=f.unpack,E=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=C(e,"cmyk"))[0],i=e[1],r=e[2],a=e[3],o=e.length>4?e[4]:1;return 1===a?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-a),i>=1?0:255*(1-i)*(1-a),r>=1?0:255*(1-r)*(1-a),o]},A=E,T=M,I=x,j=p,L=f.unpack,P=f.type,z=O;I.prototype.cmyk=function(){return z(this._rgb)},T.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(I,[null].concat(e,["cmyk"])))},j.format.cmyk=A,j.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=L(e,"cmyk"),"array"===P(e)&&4===e.length)return"cmyk"}});var D=f.unpack,N=f.last,R=function(e){return Math.round(100*e)/100},V=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=D(e,"hsla"),i=N(e)||"lsa";return n[0]=R(n[0]||0),n[1]=R(100*n[1])+"%",n[2]=R(100*n[2])+"%","hsla"===i||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,i="hsla"):n.length=3,i+"("+n.join(",")+")"},F=V,B=f.unpack,H=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=B(e,"rgba"))[0],i=e[1],r=e[2];n/=255,i/=255,r/=255;var a,o,s=Math.min(n,i,r),l=Math.max(n,i,r),c=(l+s)/2;return l===s?(a=0,o=Number.NaN):a=c<.5?(l-s)/(l+s):(l-s)/(2-l-s),n==l?o=(i-r)/(l-s):i==l?o=2+(r-n)/(l-s):r==l&&(o=4+(n-i)/(l-s)),(o*=60)<0&&(o+=360),e.length>3&&void 0!==e[3]?[o,a,c,e[3]]:[o,a,c]},W=H,U=f.unpack,Y=f.last,G=F,q=W,X=Math.round,Z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=U(e,"rgba"),i=Y(e)||"rgb";return"hsl"==i.substr(0,3)?G(q(n),i):(n[0]=X(n[0]),n[1]=X(n[1]),n[2]=X(n[2]),("rgba"===i||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,i="rgba"),i+"("+n.slice(0,"rgb"===i?3:4).join(",")+")")},K=Z,Q=f.unpack,J=Math.round,ee=function(){for(var e,t=[],n=arguments.length;n--;)t[n]=arguments[n];var i,r,a,o=(t=Q(t,"hsl"))[0],s=t[1],l=t[2];if(0===s)i=r=a=255*l;else{var c=[0,0,0],u=[0,0,0],h=l<.5?l*(1+s):l+s-l*s,d=2*l-h,f=o/360;c[0]=f+1/3,c[1]=f,c[2]=f-1/3;for(var p=0;p<3;p++)c[p]<0&&(c[p]+=1),c[p]>1&&(c[p]-=1),6*c[p]<1?u[p]=d+6*(h-d)*c[p]:2*c[p]<1?u[p]=h:3*c[p]<2?u[p]=d+(h-d)*(2/3-c[p])*6:u[p]=d;i=(e=[J(255*u[0]),J(255*u[1]),J(255*u[2])])[0],r=e[1],a=e[2]}return t.length>3?[i,r,a,t[3]]:[i,r,a,1]},te=ee,ne=te,ie=p,re=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ae=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,oe=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,se=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,le=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,ce=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ue=Math.round,he=function(e){var t;if(e=e.toLowerCase().trim(),ie.format.named)try{return ie.format.named(e)}catch($){}if(t=e.match(re)){for(var n=t.slice(1,4),i=0;i<3;i++)n[i]=+n[i];return n[3]=1,n}if(t=e.match(ae)){for(var r=t.slice(1,5),a=0;a<4;a++)r[a]=+r[a];return r}if(t=e.match(oe)){for(var o=t.slice(1,4),s=0;s<3;s++)o[s]=ue(2.55*o[s]);return o[3]=1,o}if(t=e.match(se)){for(var l=t.slice(1,5),c=0;c<3;c++)l[c]=ue(2.55*l[c]);return l[3]=+l[3],l}if(t=e.match(le)){var u=t.slice(1,4);u[1]*=.01,u[2]*=.01;var h=ne(u);return h[3]=1,h}if(t=e.match(ce)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=ne(d);return f[3]=+t[4],f}};he.test=function(e){return re.test(e)||ae.test(e)||oe.test(e)||se.test(e)||le.test(e)||ce.test(e)};var de=he,fe=M,pe=x,ge=p,me=f.type,ye=K,be=de;pe.prototype.css=function(e){return ye(this._rgb,e)},fe.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pe,[null].concat(e,["css"])))},ge.format.css=be,ge.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===me(e)&&be.test(e))return"css"}});var ve=x,xe=M,we=p,Me=f.unpack;we.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Me(e,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},xe.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ve,[null].concat(e,["gl"])))},ve.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var Se=f.unpack,ke=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,i=Se(e,"rgb"),r=i[0],a=i[1],o=i[2],s=Math.min(r,a,o),l=Math.max(r,a,o),c=l-s,u=100*c/255,h=s/(255-c)*100;return 0===c?n=Number.NaN:(r===l&&(n=(a-o)/c),a===l&&(n=2+(o-r)/c),o===l&&(n=4+(r-a)/c),(n*=60)<0&&(n+=360)),[n,u,h]},_e=ke,Oe=f.unpack,Ce=Math.floor,Ee=function(){for(var e,t,n,i,r,a,o=[],s=arguments.length;s--;)o[s]=arguments[s];var l,c,u,h=(o=Oe(o,"hcg"))[0],d=o[1],f=o[2];f*=255;var p=255*d;if(0===d)l=c=u=f;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var g=Ce(h/=60),m=h-g,y=f*(1-d),b=y+p*(1-m),v=y+p*m,x=y+p;switch(g){case 0:l=(e=[x,v,y])[0],c=e[1],u=e[2];break;case 1:l=(t=[b,x,y])[0],c=t[1],u=t[2];break;case 2:l=(n=[y,x,v])[0],c=n[1],u=n[2];break;case 3:l=(i=[y,b,x])[0],c=i[1],u=i[2];break;case 4:l=(r=[v,y,x])[0],c=r[1],u=r[2];break;case 5:l=(a=[x,y,b])[0],c=a[1],u=a[2]}}return[l,c,u,o.length>3?o[3]:1]},Ae=Ee,Te=f.unpack,Ie=f.type,je=M,Le=x,Pe=p,ze=_e;Le.prototype.hcg=function(){return ze(this._rgb)},je.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Le,[null].concat(e,["hcg"])))},Pe.format.hcg=Ae,Pe.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Te(e,"hcg"),"array"===Ie(e)&&3===e.length)return"hcg"}});var De=f.unpack,Ne=f.last,Re=Math.round,Ve=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=De(e,"rgba"),i=n[0],r=n[1],a=n[2],o=n[3],s=Ne(e)||"auto";void 0===o&&(o=1),"auto"===s&&(s=o<1?"rgba":"rgb");var l="000000"+((i=Re(i))<<16|(r=Re(r))<<8|(a=Re(a))).toString(16);l=l.substr(l.length-6);var c="0"+Re(255*o).toString(16);switch(c=c.substr(c.length-2),s.toLowerCase()){case"rgba":return"#"+l+c;case"argb":return"#"+c+l;default:return"#"+l}},$e=Ve,Fe=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Be=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,He=function(e){if(e.match(Fe)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Be)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var n=parseInt(e,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+e)},We=M,Ue=x,Ye=f.type,Ge=p,qe=$e;Ue.prototype.hex=function(e){return qe(this._rgb,e)},We.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ue,[null].concat(e,["hex"])))},Ge.format.hex=He,Ge.autodetect.push({p:4,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===Ye(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var Xe=f.unpack,Ze=f.TWOPI,Ke=Math.min,Qe=Math.sqrt,Je=Math.acos,et=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,i=Xe(e,"rgb"),r=i[0],a=i[1],o=i[2],s=Ke(r/=255,a/=255,o/=255),l=(r+a+o)/3,c=l>0?1-s/l:0;return 0===c?n=NaN:(n=(r-a+(r-o))/2,n/=Qe((r-a)*(r-a)+(r-o)*(a-o)),n=Je(n),o>a&&(n=Ze-n),n/=Ze),[360*n,c,l]},tt=et,nt=f.unpack,it=f.limit,rt=f.TWOPI,at=f.PITHIRD,ot=Math.cos,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,i,r,a=(e=nt(e,"hsi"))[0],o=e[1],s=e[2];return isNaN(a)&&(a=0),isNaN(o)&&(o=0),a>360&&(a-=360),a<0&&(a+=360),(a/=360)<1/3?i=1-((r=(1-o)/3)+(n=(1+o*ot(rt*a)/ot(at-rt*a))/3)):a<2/3?r=1-((n=(1-o)/3)+(i=(1+o*ot(rt*(a-=1/3))/ot(at-rt*a))/3)):n=1-((i=(1-o)/3)+(r=(1+o*ot(rt*(a-=2/3))/ot(at-rt*a))/3)),[255*(n=it(s*n*3)),255*(i=it(s*i*3)),255*(r=it(s*r*3)),e.length>3?e[3]:1]},lt=st,ct=f.unpack,ut=f.type,ht=M,dt=x,ft=p,pt=tt;dt.prototype.hsi=function(){return pt(this._rgb)},ht.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(dt,[null].concat(e,["hsi"])))},ft.format.hsi=lt,ft.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ct(e,"hsi"),"array"===ut(e)&&3===e.length)return"hsi"}});var gt=f.unpack,mt=f.type,yt=M,bt=x,vt=p,xt=W;bt.prototype.hsl=function(){return xt(this._rgb)},yt.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(bt,[null].concat(e,["hsl"])))},vt.format.hsl=te,vt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=gt(e,"hsl"),"array"===mt(e)&&3===e.length)return"hsl"}});var wt=f.unpack,Mt=Math.min,St=Math.max,kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,i,r,a=(e=wt(e,"rgb"))[0],o=e[1],s=e[2],l=Mt(a,o,s),c=St(a,o,s),u=c-l;return r=c/255,0===c?(n=Number.NaN,i=0):(i=u/c,a===c&&(n=(o-s)/u),o===c&&(n=2+(s-a)/u),s===c&&(n=4+(a-o)/u),(n*=60)<0&&(n+=360)),[n,i,r]},_t=kt,Ot=f.unpack,Ct=Math.floor,Et=function(){for(var e,t,n,i,r,a,o=[],s=arguments.length;s--;)o[s]=arguments[s];var l,c,u,h=(o=Ot(o,"hsv"))[0],d=o[1],f=o[2];if(f*=255,0===d)l=c=u=f;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Ct(h/=60),g=h-p,m=f*(1-d),y=f*(1-d*g),b=f*(1-d*(1-g));switch(p){case 0:l=(e=[f,b,m])[0],c=e[1],u=e[2];break;case 1:l=(t=[y,f,m])[0],c=t[1],u=t[2];break;case 2:l=(n=[m,f,b])[0],c=n[1],u=n[2];break;case 3:l=(i=[m,y,f])[0],c=i[1],u=i[2];break;case 4:l=(r=[b,m,f])[0],c=r[1],u=r[2];break;case 5:l=(a=[f,m,y])[0],c=a[1],u=a[2]}}return[l,c,u,o.length>3?o[3]:1]},At=Et,Tt=f.unpack,It=f.type,jt=M,Lt=x,Pt=p,zt=_t;Lt.prototype.hsv=function(){return zt(this._rgb)},jt.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Lt,[null].concat(e,["hsv"])))},Pt.format.hsv=At,Pt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Tt(e,"hsv"),"array"===It(e)&&3===e.length)return"hsv"}});var Dt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Nt=Dt,Rt=f.unpack,Vt=Math.pow,$t=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Rt(e,"rgb"),i=n[0],r=n[1],a=n[2],o=Ht(i,r,a),s=o[0],l=o[1],c=116*l-16;return[c<0?0:c,500*(s-l),200*(l-o[2])]},Ft=function(e){return(e/=255)<=.04045?e/12.92:Vt((e+.055)/1.055,2.4)},Bt=function(e){return e>Nt.t3?Vt(e,1/3):e/Nt.t2+Nt.t0},Ht=function(e,t,n){return e=Ft(e),t=Ft(t),n=Ft(n),[Bt((.4124564*e+.3575761*t+.1804375*n)/Nt.Xn),Bt((.2126729*e+.7151522*t+.072175*n)/Nt.Yn),Bt((.0193339*e+.119192*t+.9503041*n)/Nt.Zn)]},Wt=$t,Ut=Dt,Yt=f.unpack,Gt=Math.pow,qt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n,i,r,a=(e=Yt(e,"lab"))[0],o=e[1],s=e[2];return i=(a+16)/116,n=isNaN(o)?i:i+o/500,r=isNaN(s)?i:i-s/200,i=Ut.Yn*Zt(i),n=Ut.Xn*Zt(n),r=Ut.Zn*Zt(r),[Xt(3.2404542*n-1.5371385*i-.4985314*r),Xt(-.969266*n+1.8760108*i+.041556*r),Xt(.0556434*n-.2040259*i+1.0572252*r),e.length>3?e[3]:1]},Xt=function(e){return 255*(e<=.00304?12.92*e:1.055*Gt(e,1/2.4)-.055)},Zt=function(e){return e>Ut.t1?e*e*e:Ut.t2*(e-Ut.t0)},Kt=qt,Qt=f.unpack,Jt=f.type,en=M,tn=x,nn=p,rn=Wt;tn.prototype.lab=function(){return rn(this._rgb)},en.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tn,[null].concat(e,["lab"])))},nn.format.lab=Kt,nn.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qt(e,"lab"),"array"===Jt(e)&&3===e.length)return"lab"}});var an=f.unpack,on=f.RAD2DEG,sn=Math.sqrt,ln=Math.atan2,cn=Math.round,un=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=an(e,"lab"),i=n[0],r=n[1],a=n[2],o=sn(r*r+a*a),s=(ln(a,r)*on+360)%360;return 0===cn(1e4*o)&&(s=Number.NaN),[i,o,s]},hn=un,dn=f.unpack,fn=Wt,pn=hn,gn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=dn(e,"rgb"),i=n[0],r=n[1],a=n[2],o=fn(i,r,a),s=o[0],l=o[1],c=o[2];return pn(s,l,c)},mn=gn,yn=f.unpack,bn=f.DEG2RAD,vn=Math.sin,xn=Math.cos,wn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yn(e,"lch"),i=n[0],r=n[1],a=n[2];return isNaN(a)&&(a=0),[i,xn(a*=bn)*r,vn(a)*r]},Mn=wn,Sn=f.unpack,kn=Mn,_n=Kt,On=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Sn(e,"lch"))[0],i=e[1],r=e[2],a=kn(n,i,r),o=a[0],s=a[1],l=a[2],c=_n(o,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},Cn=On,En=f.unpack,An=Cn,Tn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=En(e,"hcl").reverse();return An.apply(void 0,n)},In=Tn,jn=f.unpack,Ln=f.type,Pn=M,zn=x,Dn=p,Nn=mn;zn.prototype.lch=function(){return Nn(this._rgb)},zn.prototype.hcl=function(){return Nn(this._rgb).reverse()},Pn.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(zn,[null].concat(e,["lch"])))},Pn.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(zn,[null].concat(e,["hcl"])))},Dn.format.lch=Cn,Dn.format.hcl=In,["lch","hcl"].forEach((function(e){return Dn.autodetect.push({p:2,test:function(){for(var t=[],n=arguments.length;n--;)t[n]=arguments[n];if(t=jn(t,e),"array"===Ln(t)&&3===t.length)return e}})}));var Rn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Vn=x,$n=p,Fn=f.type,Bn=Rn,Hn=He,Wn=$e;Vn.prototype.name=function(){for(var e=Wn(this._rgb,"rgb"),t=0,n=Object.keys(Bn);t<n.length;t+=1){var i=n[t];if(Bn[i]===e)return i.toLowerCase()}return e},$n.format.named=function(e){if(e=e.toLowerCase(),Bn[e])return Hn(Bn[e]);throw new Error("unknown color name: "+e)},$n.autodetect.push({p:5,test:function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];if(!t.length&&"string"===Fn(e)&&Bn[e.toLowerCase()])return"named"}});var Un=f.unpack,Yn=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Un(e,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},Gn=Yn,qn=f.type,Xn=function(e){if("number"==qn(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},Zn=M,Kn=x,Qn=p,Jn=f.type,ei=Gn;Kn.prototype.num=function(){return ei(this._rgb)},Zn.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Kn,[null].concat(e,["num"])))},Qn.format.num=Xn,Qn.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===Jn(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var ti=M,ni=x,ii=p,ri=f.unpack,ai=f.type,oi=Math.round;ni.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(oi)},ni.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,n){return n<3?!1===e?t:oi(t):t}))},ti.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ni,[null].concat(e,["rgb"])))},ii.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=ri(e,"rgba");return void 0===n[3]&&(n[3]=1),n},ii.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=ri(e,"rgba"),"array"===ai(e)&&(3===e.length||4===e.length&&"number"==ai(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var si=Math.log,li=function(e){var t,n,i,r=e/100;return r<66?(t=255,n=r<6?0:-155.25485562709179-.44596950469579133*(n=r-2)+104.49216199393888*si(n),i=r<20?0:.8274096064007395*(i=r-10)-254.76935184120902+115.67994401066147*si(i)):(t=351.97690566805693+.114206453784165*(t=r-55)-40.25366309332127*si(t),n=325.4494125711974+.07943456536662342*(n=r-50)-28.0852963507957*si(n),i=255),[t,n,i,1]},ci=li,ui=f.unpack,hi=Math.round,di=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n,i=ui(e,"rgb"),r=i[0],a=i[2],o=1e3,s=4e4,l=.4;s-o>l;){var c=ci(n=.5*(s+o));c[2]/c[0]>=a/r?s=n:o=n}return hi(n)},fi=M,pi=x,gi=p,mi=di;pi.prototype.temp=pi.prototype.kelvin=pi.prototype.temperature=function(){return mi(this._rgb)},fi.temp=fi.kelvin=fi.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pi,[null].concat(e,["temp"])))},gi.format.temp=gi.format.kelvin=gi.format.temperature=li;var yi=f.unpack,bi=Math.cbrt,vi=Math.pow,xi=Math.sign,wi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=yi(e,"rgb"),i=n[0],r=n[1],a=n[2],o=[Si(i/255),Si(r/255),Si(a/255)],s=o[0],l=o[1],c=o[2],u=bi(.4122214708*s+.5363325363*l+.0514459929*c),h=bi(.2119034982*s+.6806995451*l+.1073969566*c),d=bi(.0883024619*s+.2817188376*l+.6299787005*c);return[.2104542553*u+.793617785*h-.0040720468*d,1.9779984951*u-2.428592205*h+.4505937099*d,.0259040371*u+.7827717662*h-.808675766*d]},Mi=wi;function Si(e){var t=Math.abs(e);return t<.04045?e/12.92:(xi(e)||1)*vi((t+.055)/1.055,2.4)}var ki=f.unpack,_i=Math.pow,Oi=Math.sign,Ci=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=ki(e,"lab"))[0],i=e[1],r=e[2],a=_i(n+.3963377774*i+.2158037573*r,3),o=_i(n-.1055613458*i-.0638541728*r,3),s=_i(n-.0894841775*i-1.291485548*r,3);return[255*Ai(4.0767416621*a-3.3077115913*o+.2309699292*s),255*Ai(-1.2684380046*a+2.6097574011*o-.3413193965*s),255*Ai(-.0041960863*a-.7034186147*o+1.707614701*s),e.length>3?e[3]:1]},Ei=Ci;function Ai(e){var t=Math.abs(e);return t>.0031308?(Oi(e)||1)*(1.055*_i(t,1/2.4)-.055):12.92*e}var Ti=f.unpack,Ii=f.type,ji=M,Li=x,Pi=p,zi=Mi;Li.prototype.oklab=function(){return zi(this._rgb)},ji.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Li,[null].concat(e,["oklab"])))},Pi.format.oklab=Ei,Pi.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Ti(e,"oklab"),"array"===Ii(e)&&3===e.length)return"oklab"}});var Di=f.unpack,Ni=Mi,Ri=hn,Vi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=Di(e,"rgb"),i=n[0],r=n[1],a=n[2],o=Ni(i,r,a),s=o[0],l=o[1],c=o[2];return Ri(s,l,c)},$i=Vi,Fi=f.unpack,Bi=Mn,Hi=Ei,Wi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n=(e=Fi(e,"lch"))[0],i=e[1],r=e[2],a=Bi(n,i,r),o=a[0],s=a[1],l=a[2],c=Hi(o,s,l);return[c[0],c[1],c[2],e.length>3?e[3]:1]},Ui=Wi,Yi=f.unpack,Gi=f.type,qi=M,Xi=x,Zi=p,Ki=$i;Xi.prototype.oklch=function(){return Ki(this._rgb)},qi.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Xi,[null].concat(e,["oklch"])))},Zi.format.oklch=Ui,Zi.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Yi(e,"oklch"),"array"===Gi(e)&&3===e.length)return"oklch"}});var Qi=x,Ji=f.type;Qi.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Ji(e)?t?(this._rgb[3]=e,this):new Qi([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},x.prototype.clipped=function(){return this._rgb._clipped||!1};var er=x,tr=Dt;er.prototype.darken=function(e){void 0===e&&(e=1);var t=this,n=t.lab();return n[0]-=tr.Kn*e,new er(n,"lab").alpha(t.alpha(),!0)},er.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},er.prototype.darker=er.prototype.darken,er.prototype.brighter=er.prototype.brighten,x.prototype.get=function(e){var t=e.split("."),n=t[0],i=t[1],r=this[n]();if(i){var a=n.indexOf(i)-("ok"===n.substr(0,2)?2:0);if(a>-1)return r[a];throw new Error("unknown channel "+i+" in mode "+n)}return r};var nr=x,ir=f.type,rr=Math.pow,ar=1e-7,or=20;nr.prototype.luminance=function(e){if(void 0!==e&&"number"===ir(e)){if(0===e)return new nr([0,0,0,this._rgb[3]],"rgb");if(1===e)return new nr([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),n="rgb",i=or,r=function(t,a){var o=t.interpolate(a,.5,n),s=o.luminance();return Math.abs(e-s)<ar||!i--?o:s>e?r(t,o):r(o,a)},a=(t>e?r(new nr([0,0,0]),this):r(this,new nr([255,255,255]))).rgb();return new nr(a.concat([this._rgb[3]]))}return sr.apply(void 0,this._rgb.slice(0,3))};var sr=function(e,t,n){return.2126*(e=lr(e))+.7152*(t=lr(t))+.0722*(n=lr(n))},lr=function(e){return(e/=255)<=.03928?e/12.92:rr((e+.055)/1.055,2.4)},cr={},ur=x,hr=f.type,dr=cr,fr=function(e,t,n){void 0===n&&(n=.5);for(var i=[],r=arguments.length-3;r-- >0;)i[r]=arguments[r+3];var a=i[0]||"lrgb";if(dr[a]||i.length||(a=Object.keys(dr)[0]),!dr[a])throw new Error("interpolation mode "+a+" is not defined");return"object"!==hr(e)&&(e=new ur(e)),"object"!==hr(t)&&(t=new ur(t)),dr[a](e,t,n).alpha(e.alpha()+n*(t.alpha()-e.alpha()))},pr=x,gr=fr;pr.prototype.mix=pr.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var n=[],i=arguments.length-2;i-- >0;)n[i]=arguments[i+2];return gr.apply(void 0,[this,e,t].concat(n))};var mr=x;mr.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,n=t[3];return e?(this._rgb=[t[0]*n,t[1]*n,t[2]*n,n],this):new mr([t[0]*n,t[1]*n,t[2]*n,n],"rgb")};var yr=x,br=Dt;yr.prototype.saturate=function(e){void 0===e&&(e=1);var t=this,n=t.lch();return n[1]+=br.Kn*e,n[1]<0&&(n[1]=0),new yr(n,"lch").alpha(t.alpha(),!0)},yr.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var vr=x,xr=f.type;vr.prototype.set=function(e,t,n){void 0===n&&(n=!1);var i=e.split("."),r=i[0],a=i[1],o=this[r]();if(a){var s=r.indexOf(a)-("ok"===r.substr(0,2)?2:0);if(s>-1){if("string"==xr(t))switch(t.charAt(0)){case"+":case"-":o[s]+=+t;break;case"*":o[s]*=+t.substr(1);break;case"/":o[s]/=+t.substr(1);break;default:o[s]=+t}else{if("number"!==xr(t))throw new Error("unsupported value for Color.set");o[s]=t}var l=new vr(o,r);return n?(this._rgb=l._rgb,this):l}throw new Error("unknown channel "+a+" in mode "+r)}return o};var wr=x,Mr=function(e,t,n){var i=e._rgb,r=t._rgb;return new wr(i[0]+n*(r[0]-i[0]),i[1]+n*(r[1]-i[1]),i[2]+n*(r[2]-i[2]),"rgb")};cr.rgb=Mr;var Sr=x,kr=Math.sqrt,_r=Math.pow,Or=function(e,t,n){var i=e._rgb,r=i[0],a=i[1],o=i[2],s=t._rgb,l=s[0],c=s[1],u=s[2];return new Sr(kr(_r(r,2)*(1-n)+_r(l,2)*n),kr(_r(a,2)*(1-n)+_r(c,2)*n),kr(_r(o,2)*(1-n)+_r(u,2)*n),"rgb")};cr.lrgb=Or;var Cr=x,Er=function(e,t,n){var i=e.lab(),r=t.lab();return new Cr(i[0]+n*(r[0]-i[0]),i[1]+n*(r[1]-i[1]),i[2]+n*(r[2]-i[2]),"lab")};cr.lab=Er;var Ar=x,Tr=function(e,t,n,i){var r,a,o,s,l,c,u,h,d,f,p,g,m;return"hsl"===i?(o=e.hsl(),s=t.hsl()):"hsv"===i?(o=e.hsv(),s=t.hsv()):"hcg"===i?(o=e.hcg(),s=t.hcg()):"hsi"===i?(o=e.hsi(),s=t.hsi()):"lch"===i||"hcl"===i?(i="hcl",o=e.hcl(),s=t.hcl()):"oklch"===i&&(o=e.oklch().reverse(),s=t.oklch().reverse()),"h"!==i.substr(0,1)&&"oklch"!==i||(l=(r=o)[0],u=r[1],d=r[2],c=(a=s)[0],h=a[1],f=a[2]),isNaN(l)||isNaN(c)?isNaN(l)?isNaN(c)?g=Number.NaN:(g=c,1!=d&&0!=d||"hsv"==i||(p=h)):(g=l,1!=f&&0!=f||"hsv"==i||(p=u)):g=l+n*(c>l&&c-l>180?c-(l+360):c<l&&l-c>180?c+360-l:c-l),void 0===p&&(p=u+n*(h-u)),m=d+n*(f-d),new Ar("oklch"===i?[m,p,g]:[g,p,m],i)},Ir=Tr,jr=function(e,t,n){return Ir(e,t,n,"lch")};cr.lch=jr,cr.hcl=jr;var Lr=x,Pr=function(e,t,n){var i=e.num(),r=t.num();return new Lr(i+n*(r-i),"num")};cr.num=Pr;var zr=Tr,Dr=function(e,t,n){return zr(e,t,n,"hcg")};cr.hcg=Dr;var Nr=Tr,Rr=function(e,t,n){return Nr(e,t,n,"hsi")};cr.hsi=Rr;var Vr=Tr,$r=function(e,t,n){return Vr(e,t,n,"hsl")};cr.hsl=$r;var Fr=Tr,Br=function(e,t,n){return Fr(e,t,n,"hsv")};cr.hsv=Br;var Hr=x,Wr=function(e,t,n){var i=e.oklab(),r=t.oklab();return new Hr(i[0]+n*(r[0]-i[0]),i[1]+n*(r[1]-i[1]),i[2]+n*(r[2]-i[2]),"oklab")};cr.oklab=Wr;var Ur=Tr,Yr=function(e,t,n){return Ur(e,t,n,"oklch")};cr.oklch=Yr;var Gr=x,qr=f.clip_rgb,Xr=Math.pow,Zr=Math.sqrt,Kr=Math.PI,Qr=Math.cos,Jr=Math.sin,ea=Math.atan2,ta=function(e,t,n){void 0===t&&(t="lrgb"),void 0===n&&(n=null);var i=e.length;n||(n=Array.from(new Array(i)).map((function(){return 1})));var r=i/n.reduce((function(e,t){return e+t}));if(n.forEach((function(e,t){n[t]*=r})),e=e.map((function(e){return new Gr(e)})),"lrgb"===t)return na(e,n);for(var a=e.shift(),o=a.get(t),s=[],l=0,c=0,u=0;u<o.length;u++)if(o[u]=(o[u]||0)*n[0],s.push(isNaN(o[u])?0:n[0]),"h"===t.charAt(u)&&!isNaN(o[u])){var h=o[u]/180*Kr;l+=Qr(h)*n[0],c+=Jr(h)*n[0]}var d=a.alpha()*n[0];e.forEach((function(e,i){var r=e.get(t);d+=e.alpha()*n[i+1];for(var a=0;a<o.length;a++)if(!isNaN(r[a]))if(s[a]+=n[i+1],"h"===t.charAt(a)){var u=r[a]/180*Kr;l+=Qr(u)*n[i+1],c+=Jr(u)*n[i+1]}else o[a]+=r[a]*n[i+1]}));for(var f=0;f<o.length;f++)if("h"===t.charAt(f)){for(var p=ea(c/s[f],l/s[f])/Kr*180;p<0;)p+=360;for(;p>=360;)p-=360;o[f]=p}else o[f]=o[f]/s[f];return d/=i,new Gr(o,t).alpha(d>.99999?1:d,!0)},na=function(e,t){for(var n=e.length,i=[0,0,0,0],r=0;r<e.length;r++){var a=e[r],o=t[r]/n,s=a._rgb;i[0]+=Xr(s[0],2)*o,i[1]+=Xr(s[1],2)*o,i[2]+=Xr(s[2],2)*o,i[3]+=s[3]*o}return i[0]=Zr(i[0]),i[1]=Zr(i[1]),i[2]=Zr(i[2]),i[3]>.9999999&&(i[3]=1),new Gr(qr(i))},ia=M,ra=f.type,aa=Math.pow,oa=function(e){var t="rgb",n=ia("#ccc"),i=0,r=[0,1],a=[],o=[0,0],s=!1,l=[],c=!1,u=0,h=1,d=!1,f={},p=!0,g=1,m=function(e){if((e=e||["#fff","#000"])&&"string"===ra(e)&&ia.brewer&&ia.brewer[e.toLowerCase()]&&(e=ia.brewer[e.toLowerCase()]),"array"===ra(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=ia(e[t]);a.length=0;for(var n=0;n<e.length;n++)a.push(n/(e.length-1))}return w(),l=e},y=function(e){if(null!=s){for(var t=s.length-1,n=0;n<t&&e>=s[n];)n++;return n-1}return 0},b=function(e){return e},v=function(e){return e},x=function(e,i){var r,c;if(null==i&&(i=!1),isNaN(e)||null===e)return n;c=i?e:s&&s.length>2?y(e)/(s.length-2):h!==u?(e-u)/(h-u):1,c=v(c),i||(c=b(c)),1!==g&&(c=aa(c,g)),c=o[0]+c*(1-o[0]-o[1]),c=Math.min(1,Math.max(0,c));var d=Math.floor(1e4*c);if(p&&f[d])r=f[d];else{if("array"===ra(l))for(var m=0;m<a.length;m++){var x=a[m];if(c<=x){r=l[m];break}if(c>=x&&m===a.length-1){r=l[m];break}if(c>x&&c<a[m+1]){c=(c-x)/(a[m+1]-x),r=ia.interpolate(l[m],l[m+1],c,t);break}}else"function"===ra(l)&&(r=l(c));p&&(f[d]=r)}return r},w=function(){return f={}};m(e);var M=function(e){var t=ia(x(e));return c&&t[c]?t[c]():t};return M.classes=function(e){if(null!=e){if("array"===ra(e))s=e,r=[e[0],e[e.length-1]];else{var t=ia.analyze(r);s=0===e?[t.min,t.max]:ia.limits(t,"e",e)}return M}return s},M.domain=function(e){if(!arguments.length)return r;u=e[0],h=e[e.length-1],a=[];var t=l.length;if(e.length===t&&u!==h)for(var n=0,i=Array.from(e);n<i.length;n+=1){var o=i[n];a.push((o-u)/(h-u))}else{for(var s=0;s<t;s++)a.push(s/(t-1));if(e.length>2){var c=e.map((function(t,n){return n/(e.length-1)})),d=e.map((function(e){return(e-u)/(h-u)}));d.every((function(e,t){return c[t]===e}))||(v=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var n=(e-d[t])/(d[t+1]-d[t]);return c[t]+n*(c[t+1]-c[t])})}}return r=[u,h],M},M.mode=function(e){return arguments.length?(t=e,w(),M):t},M.range=function(e,t){return m(e),M},M.out=function(e){return c=e,M},M.spread=function(e){return arguments.length?(i=e,M):i},M.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),b=d?function(e){for(var t=x(0,!0).lab()[0],n=x(1,!0).lab()[0],i=t>n,r=x(e,!0).lab()[0],a=t+(n-t)*e,o=r-a,s=0,l=1,c=20;Math.abs(o)>.01&&c-- >0;)i&&(o*=-1),o<0?(s=e,e+=.5*(l-e)):(l=e,e+=.5*(s-e)),r=x(e,!0).lab()[0],o=r-a;return e}:function(e){return e},M},M.padding=function(e){return null!=e?("number"===ra(e)&&(e=[e,e]),o=e,M):o},M.colors=function(t,n){arguments.length<2&&(n="hex");var i=[];if(0===arguments.length)i=l.slice(0);else if(1===t)i=[M(.5)];else if(t>1){var a=r[0],o=r[1]-a;i=sa(0,t).map((function(e){return M(a+e/(t-1)*o)}))}else{e=[];var c=[];if(s&&s.length>2)for(var u=1,h=s.length,d=1<=h;d?u<h:u>h;d?u++:u--)c.push(.5*(s[u-1]+s[u]));else c=r;i=c.map((function(e){return M(e)}))}return ia[n]&&(i=i.map((function(e){return e[n]()}))),i},M.cache=function(e){return null!=e?(p=e,M):p},M.gamma=function(e){return null!=e?(g=e,M):g},M.nodata=function(e){return null!=e?(n=ia(e),M):n},M};function sa(e,t,n){for(var i=[],r=e<t,a=t,o=e;r?o<a:o>a;r?o++:o--)i.push(o);return i}var la=x,ca=oa,ua=function(e){for(var t=[1,1],n=1;n<e;n++){for(var i=[1],r=1;r<=t.length;r++)i[r]=(t[r]||0)+t[r-1];t=i}return t},ha=function(e){var t,n,i,r,a,o,s;if(2===(e=e.map((function(e){return new la(e)}))).length)t=e.map((function(e){return e.lab()})),a=t[0],o=t[1],r=function(e){var t=[0,1,2].map((function(t){return a[t]+e*(o[t]-a[t])}));return new la(t,"lab")};else if(3===e.length)n=e.map((function(e){return e.lab()})),a=n[0],o=n[1],s=n[2],r=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*a[t]+2*(1-e)*e*o[t]+e*e*s[t]}));return new la(t,"lab")};else if(4===e.length){var l;i=e.map((function(e){return e.lab()})),a=i[0],o=i[1],s=i[2],l=i[3],r=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*o[t]+3*(1-e)*e*e*s[t]+e*e*e*l[t]}));return new la(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var c,u,h;c=e.map((function(e){return e.lab()})),h=e.length-1,u=ua(h),r=function(e){var t=1-e,n=[0,1,2].map((function(n){return c.reduce((function(i,r,a){return i+u[a]*Math.pow(t,h-a)*Math.pow(e,a)*r[n]}),0)}));return new la(n,"lab")}}return r},da=function(e){var t=ha(e);return t.scale=function(){return ca(t)},t},fa=M,pa=function(e,t,n){if(!pa[n])throw new Error("unknown blend mode "+n);return pa[n](e,t)},ga=function(e){return function(t,n){var i=fa(n).rgb(),r=fa(t).rgb();return fa.rgb(e(i,r))}},ma=function(e){return function(t,n){var i=[];return i[0]=e(t[0],n[0]),i[1]=e(t[1],n[1]),i[2]=e(t[2],n[2]),i}},ya=function(e){return e},ba=function(e,t){return e*t/255},va=function(e,t){return e>t?t:e},xa=function(e,t){return e>t?e:t},wa=function(e,t){return 255*(1-(1-e/255)*(1-t/255))},Ma=function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))},Sa=function(e,t){return 255*(1-(1-t/255)/(e/255))},ka=function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e};pa.normal=ga(ma(ya)),pa.multiply=ga(ma(ba)),pa.screen=ga(ma(wa)),pa.overlay=ga(ma(Ma)),pa.darken=ga(ma(va)),pa.lighten=ga(ma(xa)),pa.dodge=ga(ma(ka)),pa.burn=ga(ma(Sa));for(var _a=pa,Oa=f.type,Ca=f.clip_rgb,Ea=f.TWOPI,Aa=Math.pow,Ta=Math.sin,Ia=Math.cos,ja=M,La=function(e,t,n,i,r){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===n&&(n=1),void 0===i&&(i=1),void 0===r&&(r=[0,1]);var a,o=0;"array"===Oa(r)?a=r[1]-r[0]:(a=0,r=[r,r]);var s=function(s){var l=Ea*((e+120)/360+t*s),c=Aa(r[0]+a*s,i),u=(0!==o?n[0]+s*o:n)*c*(1-c)/2,h=Ia(l),d=Ta(l);return ja(Ca([255*(c+u*(-.14861*h+1.78277*d)),255*(c+u*(-.29227*h-.90649*d)),255*(c+u*(1.97294*h)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?i:(i=e,s)},s.hue=function(e){return null==e?n:("array"===Oa(n=e)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,s)},s.lightness=function(e){return null==e?r:("array"===Oa(e)?(r=e,a=e[1]-e[0]):(r=[e,e],a=0),s)},s.scale=function(){return ja.scale(s)},s.hue(n),s},Pa=x,za="0123456789abcdef",Da=Math.floor,Na=Math.random,Ra=function(){for(var e="#",t=0;t<6;t++)e+=za.charAt(Da(16*Na()));return new Pa(e,"hex")},Va=s,$a=Math.log,Fa=Math.pow,Ba=Math.floor,Ha=Math.abs,Wa=function(e,t){void 0===t&&(t=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Va(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Va(e)&&(e=e[t]),null==e||isNaN(e)||(n.values.push(e),n.sum+=e,e<n.min&&(n.min=e),e>n.max&&(n.max=e),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(e,t){return Ua(n,e,t)},n},Ua=function(e,t,n){void 0===t&&(t="equal"),void 0===n&&(n=7),"array"==Va(e)&&(e=Wa(e));var i=e.min,r=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===n)return[i,r];var o=[];if("c"===t.substr(0,1)&&(o.push(i),o.push(r)),"e"===t.substr(0,1)){o.push(i);for(var s=1;s<n;s++)o.push(i+s/n*(r-i));o.push(r)}else if("l"===t.substr(0,1)){if(i<=0)throw new Error("Logarithmic scales are only possible for values > 0");var l=Math.LOG10E*$a(i),c=Math.LOG10E*$a(r);o.push(i);for(var u=1;u<n;u++)o.push(Fa(10,l+u/n*(c-l)));o.push(r)}else if("q"===t.substr(0,1)){o.push(i);for(var h=1;h<n;h++){var d=(a.length-1)*h/n,f=Ba(d);if(f===d)o.push(a[f]);else{var p=d-f;o.push(a[f]*(1-p)+a[f+1]*p)}}o.push(r)}else if("k"===t.substr(0,1)){var g,m=a.length,y=new Array(m),b=new Array(n),v=!0,x=0,w=null;(w=[]).push(i);for(var M=1;M<n;M++)w.push(i+M/n*(r-i));for(w.push(r);v;){for(var S=0;S<n;S++)b[S]=0;for(var k=0;k<m;k++)for(var _=a[k],O=Number.MAX_VALUE,C=void 0,E=0;E<n;E++){var A=Ha(w[E]-_);A<O&&(O=A,C=E),b[C]++,y[k]=C}for(var T=new Array(n),I=0;I<n;I++)T[I]=null;for(var j=0;j<m;j++)null===T[g=y[j]]?T[g]=a[j]:T[g]+=a[j];for(var L=0;L<n;L++)T[L]*=1/b[L];v=!1;for(var P=0;P<n;P++)if(T[P]!==w[P]){v=!0;break}w=T,++x>200&&(v=!1)}for(var z={},D=0;D<n;D++)z[D]=[];for(var N=0;N<m;N++)z[g=y[N]].push(a[N]);for(var R=[],V=0;V<n;V++)R.push(z[V][0]),R.push(z[V][z[V].length-1]);R=R.sort((function(e,t){return e-t})),o.push(R[0]);for(var $=1;$<R.length;$+=2){var F=R[$];isNaN(F)||-1!==o.indexOf(F)||o.push(F)}}return o},Ya={analyze:Wa,limits:Ua},Ga=x,qa=function(e,t){e=new Ga(e),t=new Ga(t);var n=e.luminance(),i=t.luminance();return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)},Xa=x,Za=Math.sqrt,Ka=Math.pow,Qa=Math.min,Ja=Math.max,eo=Math.atan2,to=Math.abs,no=Math.cos,io=Math.sin,ro=Math.exp,ao=Math.PI,oo=function(e,t,n,i,r){void 0===n&&(n=1),void 0===i&&(i=1),void 0===r&&(r=1);var a=function(e){return 360*e/(2*ao)},o=function(e){return 2*ao*e/360};e=new Xa(e),t=new Xa(t);var s=Array.from(e.lab()),l=s[0],c=s[1],u=s[2],h=Array.from(t.lab()),d=h[0],f=h[1],p=h[2],g=(l+d)/2,m=(Za(Ka(c,2)+Ka(u,2))+Za(Ka(f,2)+Ka(p,2)))/2,y=.5*(1-Za(Ka(m,7)/(Ka(m,7)+Ka(25,7)))),b=c*(1+y),v=f*(1+y),x=Za(Ka(b,2)+Ka(u,2)),w=Za(Ka(v,2)+Ka(p,2)),M=(x+w)/2,S=a(eo(u,b)),k=a(eo(p,v)),_=S>=0?S:S+360,O=k>=0?k:k+360,C=to(_-O)>180?(_+O+360)/2:(_+O)/2,E=1-.17*no(o(C-30))+.24*no(o(2*C))+.32*no(o(3*C+6))-.2*no(o(4*C-63)),A=O-_;A=to(A)<=180?A:O<=_?A+360:A-360,A=2*Za(x*w)*io(o(A)/2);var T=d-l,I=w-x,j=1+.015*Ka(g-50,2)/Za(20+Ka(g-50,2)),L=1+.045*M,P=1+.015*M*E,z=30*ro(-Ka((C-275)/25,2)),D=-2*Za(Ka(M,7)/(Ka(M,7)+Ka(25,7)))*io(2*o(z)),N=Za(Ka(T/(n*j),2)+Ka(I/(i*L),2)+Ka(A/(r*P),2)+D*(I/(i*L))*(A/(r*P)));return Ja(0,Qa(100,N))},so=x,lo=function(e,t,n){void 0===n&&(n="lab"),e=new so(e),t=new so(t);var i=e.get(n),r=t.get(n),a=0;for(var o in i){var s=(i[o]||0)-(r[o]||0);a+=s*s}return Math.sqrt(a)},co=x,uo=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(co,[null].concat(e))),!0}catch($){return!1}},ho=M,fo=oa,po={cool:function(){return fo([ho.hsl(180,1,.9),ho.hsl(250,.7,.4)])},hot:function(){return fo(["#000","#f00","#ff0","#fff"]).mode("rgb")}},go={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},mo=0,yo=Object.keys(go);mo<yo.length;mo+=1){var bo=yo[mo];go[bo.toLowerCase()]=go[bo]}var vo=go,xo=M;return xo.average=ta,xo.bezier=da,xo.blend=_a,xo.cubehelix=La,xo.mix=xo.interpolate=fr,xo.random=Ra,xo.scale=oa,xo.analyze=Ya.analyze,xo.contrast=qa,xo.deltaE=oo,xo.distance=lo,xo.limits=Ya.limits,xo.valid=uo,xo.scales=po,xo.colors=Rn,xo.brewer=vo,xo}();const Le=e(je.exports);function Pe(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ze(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function De(){}var Ne=.7,Re=1/Ne,Ve="\\s*([+-]?\\d+)\\s*",$e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Be=/^#([0-9a-f]{3,8})$/,He=new RegExp("^rgb\\("+[Ve,Ve,Ve]+"\\)$"),We=new RegExp("^rgb\\("+[Fe,Fe,Fe]+"\\)$"),Ue=new RegExp("^rgba\\("+[Ve,Ve,Ve,$e]+"\\)$"),Ye=new RegExp("^rgba\\("+[Fe,Fe,Fe,$e]+"\\)$"),Ge=new RegExp("^hsl\\("+[$e,Fe,Fe]+"\\)$"),qe=new RegExp("^hsla\\("+[$e,Fe,Fe,$e]+"\\)$"),Xe={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};function Ze(){return this.rgb().formatHex()}function Ke(){return this.rgb().formatRgb()}function Qe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Be.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Je(t):3===n?new it(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?et(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?et(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=He.exec(e))?new it(t[1],t[2],t[3],1):(t=We.exec(e))?new it(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ue.exec(e))?et(t[1],t[2],t[3],t[4]):(t=Ye.exec(e))?et(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ge.exec(e))?st(t[1],t[2]/100,t[3]/100,1):(t=qe.exec(e))?st(t[1],t[2]/100,t[3]/100,t[4]):Xe.hasOwnProperty(e)?Je(Xe[e]):"transparent"===e?new it(NaN,NaN,NaN,0):null}function Je(e){return new it(e>>16&255,e>>8&255,255&e,1)}function et(e,t,n,i){return i<=0&&(e=t=n=NaN),new it(e,t,n,i)}function tt(e){return e instanceof De||(e=Qe(e)),e?new it((e=e.rgb()).r,e.g,e.b,e.opacity):new it}function nt(e,t,n,i){return 1===arguments.length?tt(e):new it(e,t,n,null==i?1:i)}function it(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function rt(){return"#"+ot(this.r)+ot(this.g)+ot(this.b)}function at(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function ot(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function st(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ct(e,t,n,i)}function lt(e){if(e instanceof ct)return new ct(e.h,e.s,e.l,e.opacity);if(e instanceof De||(e=Qe(e)),!e)return new ct;if(e instanceof ct)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),a=Math.max(t,n,i),o=NaN,s=a-r,l=(a+r)/2;return s?(o=t===a?(n-i)/s+6*(n<i):n===a?(i-t)/s+2:(t-n)/s+4,s/=l<.5?a+r:2-a-r,o*=60):s=l>0&&l<1?0:o,new ct(o,s,l,e.opacity)}function ct(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function ut(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Pe(De,Qe,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ze,formatHex:Ze,formatHsl:function(){return lt(this).formatHsl()},formatRgb:Ke,toString:Ke}),Pe(it,nt,ze(De,{brighter:function(e){return e=null==e?Re:Math.pow(Re,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Ne:Math.pow(Ne,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:rt,formatHex:rt,formatRgb:at,toString:at})),Pe(ct,(function(e,t,n,i){return 1===arguments.length?lt(e):new ct(e,t,n,null==i?1:i)}),ze(De,{brighter:function(e){return e=null==e?Re:Math.pow(Re,e),new ct(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Ne:Math.pow(Ne,e),new ct(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new it(ut(e>=240?e-240:e+120,r,i),ut(e,r,i),ut(e<120?e+240:e-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ht=Math.PI/180,dt=180/Math.PI,ft=.96422,pt=.82521,gt=4/29,mt=6/29,yt=3*mt*mt,bt=mt*mt*mt;function vt(e){if(e instanceof xt)return new xt(e.l,e.a,e.b,e.opacity);if(e instanceof Ot)return Ct(e);e instanceof it||(e=tt(e));var t,n,i=kt(e.r),r=kt(e.g),a=kt(e.b),o=wt((.2225045*i+.7168786*r+.0606169*a)/1);return i===r&&r===a?t=n=o:(t=wt((.4360747*i+.3850649*r+.1430804*a)/ft),n=wt((.0139322*i+.0971045*r+.7141733*a)/pt)),new xt(116*o-16,500*(t-o),200*(o-n),e.opacity)}function xt(e,t,n,i){this.l=+e,this.a=+t,this.b=+n,this.opacity=+i}function wt(e){return e>bt?Math.pow(e,1/3):e/yt+gt}function Mt(e){return e>mt?e*e*e:yt*(e-gt)}function St(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function kt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function _t(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof Ot)return new Ot(e.h,e.c,e.l,e.opacity);if(e instanceof xt||(e=vt(e)),0===e.a&&0===e.b)return new Ot(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*dt;return new Ot(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ot(e,t,n,null==i?1:i)}function Ot(e,t,n,i){this.h=+e,this.c=+t,this.l=+n,this.opacity=+i}function Ct(e){if(isNaN(e.h))return new xt(e.l,0,0,e.opacity);var t=e.h*ht;return new xt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Pe(xt,(function(e,t,n,i){return 1===arguments.length?vt(e):new xt(e,t,n,null==i?1:i)}),ze(De,{brighter:function(e){return new xt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new xt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new it(St(3.1338561*(t=ft*Mt(t))-1.6168667*(e=1*Mt(e))-.4906146*(n=pt*Mt(n))),St(-.9787684*t+1.9161415*e+.033454*n),St(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Pe(Ot,_t,ze(De,{brighter:function(e){return new Ot(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Ot(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ct(this).rgb()}}));var Et=-.14861,At=1.78277,Tt=-.29227,It=-.90649,jt=1.97294,Lt=jt*It,Pt=jt*At,zt=At*Tt-It*Et;function Dt(e,t,n,i){return 1===arguments.length?function(e){if(e instanceof Nt)return new Nt(e.h,e.s,e.l,e.opacity);e instanceof it||(e=tt(e));var t=e.r/255,n=e.g/255,i=e.b/255,r=(zt*i+Lt*t-Pt*n)/(zt+Lt-Pt),a=i-r,o=(jt*(n-r)-Tt*a)/It,s=Math.sqrt(o*o+a*a)/(jt*r*(1-r)),l=s?Math.atan2(o,a)*dt-120:NaN;return new Nt(l<0?l+360:l,s,r,e.opacity)}(e):new Nt(e,t,n,null==i?1:i)}function Nt(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Pe(Nt,Dt,ze(De,{brighter:function(e){return e=null==e?Re:Math.pow(Re,e),new Nt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Ne:Math.pow(Ne,e),new Nt(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*ht,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),r=Math.sin(e);return new it(255*(t+n*(Et*i+At*r)),255*(t+n*(Tt*i+It*r)),255*(t+n*(jt*i)),this.opacity)}}));const Rt={r:255,g:0,b:0,opacity:1},Vt={r:0,g:0,b:0,opacity:0},$t=nt(Rt.r,Rt.g,Rt.b,Rt.opacity);function Ft(e,t){if("transparent"===e)return Vt;const n=function(e=""){var t;const n=/,\s*0+(\.0*)?\s*\)$/,i=/^(rgba|hsla)\(/i.test(e)&&n.test(e)?Object.assign(Object.assign({},nt(e.replace(n,",1)"))),{opacity:0}):nt(e);return null!==(t=Bt(i))&&void 0!==t?t:Rt}(e);if(void 0===t)return n;const i="number"==typeof t?t:t(n.opacity);return isNaN(i)?n:Object.assign(Object.assign({},n),{opacity:i})}function Bt(e){const{r:t,g:n,b:i,opacity:r}=e;return isNaN(t)||isNaN(n)||isNaN(i)||isNaN(r)?null:e}function Ht(e,t,n,i){return function(e,t,n,i){var r;return null!==(r=Bt(nt(e,t,n,i)))&&void 0!==r?r:$t}(e,t,n,i).toString()}function Wt(e){const{r:t,g:n,b:i,opacity:r}=e;return Ht(t,n,i,r)}function Ut(e,t){return 1===t?e:e.slice(0,7)+(0===e.slice(7).length||255===parseInt(e.slice(7,2),16)?`00${Math.round(255*t).toString(16)}`.slice(-2):`00${Math.round(parseInt(e.slice(7,2),16)/255*t*255).toString(16)}`.slice(-2))}const Yt=new Map;function Gt(e){const t=Yt.get(e);if(void 0===t){const t=Le(e).rgba();return Yt.set(e,t),t}return t}function qt(e,t){const[n,i,r,a]=Gt(e),[o,s,l,c]=Gt(t),u=a+c*(1-a);if(0===u)return"rgba(0,0,0,0)";return function(e){return 4===e.length?`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`:`rgb(${e[0]}, ${e[1]}, ${e[2]})`}([Math.round((n*a+o*c*(1-a))/u),Math.round((i*a+s*c*(1-a))/u),Math.round((r*a+l*c*(1-a))/u),u])}const Xt=new Map;function Zt(e){const t=Xt.get(e);if(void 0===t){const t=Boolean(e)&&Le.valid(e);return Xt.set(e,t),t}return t}function Kt(e,t,n=4.5){const i=Le(t).get("hsl.l");let r=e;const a=Jt(t);a&&0===Le.deltaE("black",e)?r="#fff":i>.5&&0===Le.deltaE("white",e)&&(r="#000");const o=1e8;let s=Qt(r,t);for(;s<n;){r=a?Le(r).brighten().toString():Le(r).darken().toString();const e=Math.round(s*o)/o;s=Qt(r,t);if(e===Math.round(s*o)/o)break}return r.toString()}function Qt(e,t){return Le.contrast(e,t)}function Jt(e){return Le(e).luminance()<.2}function en(e,t,n,i,r){const a=e===t,{r:o,g:s,b:l,opacity:c}=Ft(n);return i?!0===i&&"number"!=typeof i?Kt(a?void 0===c?`rgb(${255-o}, ${255-s}, ${255-l})`:`rgba(${255-o}, ${255-s}, ${255-l}, ${c})`:n,r):"number"==typeof i?Kt(a?void 0===c?`rgb(${255-o}, ${255-s}, ${255-l})`:`rgba(${255-o}, ${255-s}, ${255-l}, ${c})`:n,r,i):"black":a?void 0===c?`rgb(${255-o}, ${255-s}, ${255-l})`:`rgba(${255-o}, ${255-s}, ${255-l}, ${c})`:n}const tn="ON_POINTER_MOVE",nn="ON_MOUSE_DOWN",rn="ON_MOUSE_UP";function an(e,t){return{type:nn,position:e,time:t}}function on(e,t){return{type:rn,position:e,time:t}}function sn(e,t){return{type:tn,position:e,time:t}}var ln=function(){function e(){this._cache={}}var t=e.prototype;return t.set=function(e,t){this._cache[e]=t},t.get=function(e){return this._cache[e]},t.remove=function(e){delete this._cache[e]},t.clear=function(){this._cache={}},t.isValidCacheKey=function(e){return"string"==typeof(t=e)||"number"==typeof t;var t},e}(),cn=function(){return!0};class un{constructor(){this.cache={}}set(e,t){this.cache[e]=t}get(e){return this.cache[e]}remove(e){delete this.cache[e]}clear(){this.cache={}}isEmpty(){return 0===Object.keys(this.cache).length}isValidCacheKey(e){return"string"==typeof e}}class hn{constructor(){this.selectorCaches=[]}static keySelector({chartId:e}){return e}getNewOptions(){return{keySelector:hn.keySelector,cacheObject:this.getCacheObject()}}removeKeyFromAll(e){this.selectorCaches.forEach((t=>{t.remove(e)}))}getCacheObject(){const e=new un;return this.selectorCaches.push(e),e}}const dn=new hn,fn=(...e)=>function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,n){if("function"==typeof n)throw new Error('[re-reselect] Second argument "options" must be an object. Please use "options.selectorCreator" to provide a custom selectorCreator.');var i={};"function"==typeof e?Object.assign(i,n,{keySelector:e}):Object.assign(i,e);var r=0,a=t.pop(),o=Array.isArray(t[0])?t[0]:[].concat(t);t.push((function(){return r++,a.apply(void 0,arguments)}));var s=i.cacheObject||new ln,c=i.selectorCreator||l,u=s.isValidCacheKey||cn;i.keySelectorCreator&&(i.keySelector=i.keySelectorCreator({keySelector:i.keySelector,inputSelectors:o,resultFunc:a}));var h=function(){var e=i.keySelector.apply(i,arguments);if(u(e)){var n=s.get(e);return void 0===n&&(n=c.apply(void 0,t),s.set(e,n)),n.apply(void 0,arguments)}console.warn('[re-reselect] Invalid cache key "'+e+'" has been returned by keySelector function.')};return h.getMatchingSelector=function(){var e=i.keySelector.apply(i,arguments);return s.get(e)},h.removeMatchingSelector=function(){var e=i.keySelector.apply(i,arguments);s.remove(e)},h.clearCache=function(){s.clear()},h.resultFunc=a,h.dependencies=o,h.cache=s,h.recomputations=function(){return r},h.resetRecomputations=function(){return r=0},h.keySelector=i.keySelector,h}}(...e)(dn.getNewOptions());function pn(e,t,n){var i,r,a;void 0===t&&(t=50),void 0===n&&(n={});var o=null!=(i=n.isImmediate)&&i,s=null!=(r=n.callback)&&r,l=n.maxWait,c=Date.now(),u=[];var h=function(){var n=[].slice.call(arguments),i=this;return new Promise((function(r,h){var d=o&&void 0===a;if(void 0!==a&&clearTimeout(a),a=setTimeout((function(){if(a=void 0,c=Date.now(),!o){var t=e.apply(i,n);s&&s(t),u.forEach((function(e){return(0,e.resolve)(t)})),u=[]}}),function(){if(void 0!==l){var e=Date.now()-c;if(e+t>=l)return l-e}return t}()),d){var f=e.apply(i,n);return s&&s(f),r(f)}u.push({resolve:r,reject:h})}))};return h.cancel=function(e){void 0!==a&&clearTimeout(a),u.forEach((function(t){return(0,t.reject)(e)})),u=[]},h}var gn={},mn={};Object.defineProperty(mn,"__esModule",{value:!0}),mn.isPrimitive=function(e){if(null==e)return!0;switch(typeof e){case"string":case"number":case"bigint":case"boolean":case"symbol":return!0;default:return!1}},mn.isFalsy=function(e){return!e};var yn={};Object.defineProperty(yn,"__esModule",{value:!0}),yn.getReturnOfExpression=function(e){},Object.defineProperty(gn,"__esModule",{value:!0});var bn=mn;gn.isFalsy=bn.isFalsy;var vn=gn.isPrimitive=bn.isPrimitive,xn=yn;gn.getReturnOfExpression=xn.getReturnOfExpression;const wn=Object.freeze({Top:"top",Bottom:"bottom",Left:"left",Right:"right"}),Mn=Object.freeze({Horizontal:"horizontal",Vertical:"vertical"}),Sn=Object.freeze({Series:"__use__series__color__",None:"__use__empty__color__"}),kn=Object.freeze({Center:"center",Right:wn.Right,Left:wn.Left,Near:"near",Far:"far"}),_n=Object.freeze({Middle:"middle",Top:wn.Top,Bottom:wn.Bottom,Near:"near",Far:"far"});function On(e){return e}function Cn(e,t){return e>t?1:-1}function En(e,t,n){return An(e,n,t)}function An(e,t,n){return Math.max(Math.min(e,t),n)}function Tn(e,t,n){return Math.min(Math.max(e,t),n)}function In(e,t){return t===Sn.Series?e:t===Sn.None?"transparent":t||e}const jn=e=>e*Math.PI/180;function Ln(e){return Array.isArray(e)||e instanceof Set}function Pn(e){return null==e}function zn(e){return!function(e){return Pn(e)||vn(e)||n.isValidElement(e)}(e)}function Dn(e,t){return zn(e)?i.createElement(e,Object.assign({},t)):e}function Nn(e,t,n={},i=[]){const r=(a=e,Array.isArray(a)?[...a]:a instanceof Set?new Set([...a]):"object"==typeof a&&null!==a?a instanceof Map?new Map(a.entries()):Object.assign({},a):a);var a;if(function(e,t,n=[]){return!Ln(e)&&"object"==typeof e&&null!==e&&("object"==typeof t&&!Ln(t)&&null!==t||n.some((e=>"object"==typeof e&&!Array.isArray(e))))}(e,t,i)){const a=!(r instanceof Map)||n.mergeMaps;if(void 0!==t&&n.mergeOptionalPartialValues&&a&&function(e,t=[]){const n=e instanceof Map?[...e.keys()]:Object.keys(e);return t.reduce(((e,t)=>{if(t&&"object"==typeof t){const n=t instanceof Map?t.keys():Object.keys(t);e.push(...n)}return e}),n)}(t,i).forEach((e=>{r instanceof Map?r.has(e)||r.set(e,void 0!==t.get(e)?t.get(e):i.find((t=>void 0!==t.get(e)))||(new Map).get(e)):e in r||(r[e]=void 0!==t[e]?t[e]:(i.find((t=>void 0!==t[e]))||{})[e])})),r instanceof Map){if(n.mergeMaps)return[...r.keys()].reduce(((r,a)=>{const o=t&&t.get(a),s=i.map((e=>"object"==typeof e&&e instanceof Map?e.get(a):void 0)),l=e.get(a);return r.set(a,Nn(l,o,n,s)),r}),r);if(void 0!==t)return t;const a=i.find((e=>void 0!==e));return a||r}return Object.keys(e).reduce(((r,a)=>{const o=t&&t[a],s=i.map((e=>"object"==typeof e?e[a]:void 0)),l=e[a];return r[a]=Nn(l,o,n,s),r}),r)}return function(e,t,n=[]){const i=void 0!==t?t:n.find((e=>void 0!==e));return void 0!==i?i:e}(r,t,i)}function Rn(e,t,n=!1){return e.reduce(((e,i)=>{const r=i[t];return e.uniqueValues.has(r)||(n?(e.uniqueValues.clear(),e.uniqueValues.add(r)):e.uniqueValues.add(r),e.filtered.push(i)),e}),{filtered:[],uniqueValues:new Set}).filtered}function Vn(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function $n(e){return null!=e}function Fn(e,t,n){if("number"==typeof e)return Math.abs(e);const i=e.trim();if(/\d+%$/.test(i)){return t*(Math.abs(Number.parseInt(i.slice(0,-1),10))/100)}const r=Number.parseFloat(i);return r&&!isNaN(r)?Math.abs(r):n}function Bn(e,t,n){return n.indexOf(e)===t}const Hn={echPaletteColorBlind:{colors:["#1EA593","#2B70F7","#CE0060","#38007E","#FCA5D3","#F37020","#E49E29","#B0916F","#7B000B","#34130C"]},echPaletteForLightBackground:{colors:["#006BB4","#017D73","#F5A700","#BD271E","#DD0A73"]},echPaletteForDarkBackground:{colors:["#1BA9F5","#7DE2D1","#F990C0","#F66","#FFCE7A"]},echPaletteForStatus:{colors:["#58BA6D","#6ECE67","#A5E26A","#D2E26A","#EBDF61","#EBD361","#EBC461","#D99D4C","#D97E4C","#D75949"]}},Wn=Object.freeze({Circle:"circle",Square:"square",Diamond:"diamond",Plus:"plus",X:"x",Triangle:"triangle"}),Un=Object.freeze(Object.assign(Object.assign({},Wn),{Line:"line"})),Yn={left:0,right:0,top:0,bottom:0},Gn={left:10,right:10,top:10,bottom:10},qn={default:{opacity:1},highlighted:{opacity:1},unhighlighted:{opacity:.25}},Xn={chartPaddings:Yn,chartMargins:Gn,lineSeriesStyle:{line:{visible:!0,strokeWidth:1,opacity:1},point:{visible:!0,strokeWidth:1,fill:"white",radius:2,opacity:1,shape:Wn.Circle}},bubbleSeriesStyle:{point:{visible:!0,strokeWidth:1,fill:"white",radius:2,opacity:1,shape:Wn.Circle}},areaSeriesStyle:{area:{visible:!0,opacity:.3},line:{visible:!0,strokeWidth:1,opacity:1},point:{visible:!1,strokeWidth:1,fill:"white",radius:2,opacity:1,shape:Wn.Circle}},barSeriesStyle:{rect:{opacity:1},rectBorder:{visible:!1,strokeWidth:1},displayValue:{fontSize:8,fontStyle:"normal",fontFamily:"sans-serif",padding:0,fill:"#777",offsetX:0,offsetY:0}},arcSeriesStyle:{arc:{visible:!0,stroke:"black",strokeWidth:1,opacity:1}},sharedStyle:qn,scales:{barsPadding:.25,histogramPadding:.05},axes:{axisTitle:{visible:!0,fontSize:12,fontStyle:"bold",fontFamily:"sans-serif",padding:{inner:8,outer:0},fill:"#333"},axisPanelTitle:{visible:!0,fontSize:10,fontStyle:"bold",fontFamily:"sans-serif",padding:{inner:8,outer:0},fill:"#333"},axisLine:{visible:!0,stroke:"#eaeaea",strokeWidth:1},tickLabel:{visible:!0,fontSize:10,fontFamily:"sans-serif",fontStyle:"normal",fill:"#777",padding:0,rotation:0,offset:{x:0,y:0,reference:"local"},alignment:{vertical:"near",horizontal:"near"}},tickLine:{visible:!0,stroke:"#eaeaea",strokeWidth:1,size:10,padding:10},gridLine:{horizontal:{visible:!1,stroke:"#D3DAE6",strokeWidth:1,opacity:1,dash:[0,0]},vertical:{visible:!1,stroke:"#D3DAE6",strokeWidth:1,opacity:1,dash:[0,0]}}},colors:{vizColors:Hn.echPaletteColorBlind.colors,defaultVizColor:"red"},legend:{verticalWidth:200,horizontalHeight:64,spacingBuffer:10,margin:0},crosshair:{band:{fill:"#F5F5F5",visible:!0},line:{stroke:"#98A2B3",strokeWidth:1,visible:!0},crossLine:{stroke:"#98A2B3",strokeWidth:1,dash:[5,5],visible:!0}},background:{color:"transparent"}},Zn=Object.freeze({Series:"series",Axis:"axis",Annotation:"annotation",Settings:"settings",IndexOrder:"index_order",SmallMultiples:"small_multiples"}),Kn=Object.freeze({Sum:"sum",None:"none"}),Qn=Object.freeze({Ascending:"ascending",Descending:"descending"}),Jn=Object.freeze({Over:"Over",Out:"Out"}),ei=Object.freeze({VerticalCursor:"vertical",Crosshairs:"cross",Follow:"follow",None:"none"}),ti=Object.freeze({X:"x",Y:"y",Both:"both"}),ni=Object.freeze({X:"x",Y:"y",Both:"both"}),ii=Object.freeze({Top:"top",Bottom:"bottom",Middle:"middle",Left:"left",Right:"right",Center:"center",MousePosition:"MousePosition"}),ri=ei.VerticalCursor,ai=!0,oi={showLegend:!1,showLegendExtra:!1,legendMaxDepth:1/0,legendPosition:wn.Right},si=Object.assign({id:"__global__settings___",chartType:Ce.Global,specType:Zn.Settings,rendering:"canvas",rotation:0,animateData:!0,resizeDebounce:10,debug:!1,tooltip:{type:ri,snap:ai},pointerUpdateTrigger:ni.X,externalPointerEvents:{tooltip:{visible:!1}},hideDuplicateAxes:!1,baseTheme:Xn,brushAxis:ti.X,minBrushDelta:2,ariaUseDefaultSummary:!0,ariaLabelHeadingLevel:"p"},oi);function li(e,t,n){return Object.keys(e).filter((i=>{const r=e[i],a=r.chartType===t,o=!n||r.specType===n;return a&&o})).map((t=>e[t]))}function ci(e,t){return null===e&&null!==t||null!==e&&null!==t&&e.time!==t.time}const ui=e=>e.specs,hi=fn([ui],(e=>{const t=li(e,Ce.Global,Zn.Settings);return 1===t.length?function(e){var t;const n=null!==(t=e.pointerUpdateDebounce)&&void 0!==t?t:16;e.onPointerUpdate&&(e.onPointerUpdate=pn(e.onPointerUpdate,n));return e}(t[0]):si}));const di=fn([hi],(e=>e.rotation)),fi={line:{stroke:"#777",strokeWidth:1,opacity:1},details:{fontSize:10,fontFamily:"sans-serif",fontStyle:"normal",fill:"#777",padding:0}},pi={stroke:"#FFEEBC",strokeWidth:0,opacity:.25,fill:"#FFEEBC"};function gi(e){const t=fi.line,n=fi.details,i=Object.assign({},fi);return e?(e.line&&(i.line=Object.assign(Object.assign({},t),e.line)),e.details&&(i.details=Object.assign(Object.assign({},n),e.details)),i):i}function mi(e,t=Xn,n=[]){return Nn(t,e,{mergeOptionalPartialValues:!0},n)}const yi=fn([hi],(e=>function(e,t){const n=e||Xn;if(Array.isArray(t)){const[e,...i]=t;return mi(e,n,i)}return t?mi(t,n):n}(e.baseTheme,e.theme)));const bi=Object.freeze({ParentSizeInvalid:"ParentSizeInvalid",SpecNotInitialized:"SpecNotInitialized",MissingChartType:"MissingChartType",ChartNotInitialized:"ChartNotInitialized",Initialized:"Initialized"}),vi=e=>{const{parentDimensions:{width:t,height:n},specsInitialized:i,internalChartState:r}=e;return i?r?t<=0||n<=0?bi.ParentSizeInvalid:r.isInitialized(e):bi.MissingChartType:bi.SpecNotInitialized},xi=e=>e.internalChartState?e.internalChartState.getTooltipAnchor(e):null,wi=e=>{if(e.internalChartState)return e.internalChartState.getTooltipInfo(e)};function Mi(e){const t=e=>{const{removeSpec:t,upsertSpec:i}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["removeSpec","upsertSpec"]);return n.useEffect((()=>{i(r)})),n.useEffect((()=>()=>{t(e.id)}),[]),null};return t.defaultProps=e,t}const Si=e=>s({upsertSpec:xe,removeSpec:we},e);function ki(){return o(null,Si,null,{pure:!1})}const _i=ki()(Mi(si));function Oi(e){return"object"==typeof e}function Ci(e){return"object"!=typeof e}function Ei(e,t=!1){const n=ei.VerticalCursor;if(t)return function({externalPointerEvents:{tooltip:{visible:e}}}){return e?ei.VerticalCursor:ei.None}(e);const{tooltip:i}=e;return null==i?n:Ci(i)?i:Oi(i)&&i.type||n}const Ai=fn([hi],(function(e){const{tooltip:t}=e;if(t&&Oi(t))return t.headerFormatter}));var Ti="top",Ii="bottom",ji="right",Li="left",Pi="auto",zi=[Ti,Ii,ji,Li],Di="start",Ni="end",Ri="viewport",Vi="popper",$i=zi.reduce((function(e,t){return e.concat([t+"-"+Di,t+"-"+Ni])}),[]),Fi=[].concat(zi,[Pi]).reduce((function(e,t){return e.concat([t,t+"-"+Di,t+"-"+Ni])}),[]),Bi=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Hi(e){return e?(e.nodeName||"").toLowerCase():null}function Wi(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ui(e){return e instanceof Wi(e).Element||e instanceof Element}function Yi(e){return e instanceof Wi(e).HTMLElement||e instanceof HTMLElement}function Gi(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Wi(e).ShadowRoot||e instanceof ShadowRoot)}const qi={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},i=t.attributes[e]||{},r=t.elements[e];Yi(r)&&Hi(r)&&(Object.assign(r.style,n),Object.keys(i).forEach((function(e){var t=i[e];!1===t?r.removeAttribute(e):r.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],r=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Yi(i)&&Hi(i)&&(Object.assign(i.style,a),Object.keys(r).forEach((function(e){i.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Xi(e){return e.split("-")[0]}var Zi=Math.max,Ki=Math.min,Qi=Math.round;function Ji(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function er(){return!/^((?!chrome|android).)*safari/i.test(Ji())}function tr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var i=e.getBoundingClientRect(),r=1,a=1;t&&Yi(e)&&(r=e.offsetWidth>0&&Qi(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Qi(i.height)/e.offsetHeight||1);var o=(Ui(e)?Wi(e):window).visualViewport,s=!er()&&n,l=(i.left+(s&&o?o.offsetLeft:0))/r,c=(i.top+(s&&o?o.offsetTop:0))/a,u=i.width/r,h=i.height/a;return{width:u,height:h,top:c,right:l+u,bottom:c+h,left:l,x:l,y:c}}function nr(e){var t=tr(e),n=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:i}}function ir(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gi(n)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function rr(e){return Wi(e).getComputedStyle(e)}function ar(e){return["table","td","th"].indexOf(Hi(e))>=0}function or(e){return((Ui(e)?e.ownerDocument:e.document)||window.document).documentElement}function sr(e){return"html"===Hi(e)?e:e.assignedSlot||e.parentNode||(Gi(e)?e.host:null)||or(e)}function lr(e){return Yi(e)&&"fixed"!==rr(e).position?e.offsetParent:null}function cr(e){for(var t=Wi(e),n=lr(e);n&&ar(n)&&"static"===rr(n).position;)n=lr(n);return n&&("html"===Hi(n)||"body"===Hi(n)&&"static"===rr(n).position)?t:n||function(e){var t=/firefox/i.test(Ji());if(/Trident/i.test(Ji())&&Yi(e)&&"fixed"===rr(e).position)return null;var n=sr(e);for(Gi(n)&&(n=n.host);Yi(n)&&["html","body"].indexOf(Hi(n))<0;){var i=rr(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(e)||t}function ur(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function hr(e,t,n){return Zi(e,Ki(t,n))}function dr(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function fr(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function pr(e){return e.split("-")[1]}var gr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mr(e){var t,n=e.popper,i=e.popperRect,r=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,h=e.isFixed,d=o.x,f=void 0===d?0:d,p=o.y,g=void 0===p?0:p,m="function"==typeof u?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var y=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Li,x=Ti,w=window;if(c){var M=cr(n),S="clientHeight",k="clientWidth";if(M===Wi(n)&&"static"!==rr(M=or(n)).position&&"absolute"===s&&(S="scrollHeight",k="scrollWidth"),r===Ti||(r===Li||r===ji)&&a===Ni)x=Ii,g-=(h&&M===w&&w.visualViewport?w.visualViewport.height:M[S])-i.height,g*=l?1:-1;if(r===Li||(r===Ti||r===Ii)&&a===Ni)v=ji,f-=(h&&M===w&&w.visualViewport?w.visualViewport.width:M[k])-i.width,f*=l?1:-1}var _,O=Object.assign({position:s},c&&gr),C=!0===u?function(e){var t=e.x,n=e.y,i=window.devicePixelRatio||1;return{x:Qi(t*i)/i||0,y:Qi(n*i)/i||0}}({x:f,y:g}):{x:f,y:g};return f=C.x,g=C.y,l?Object.assign({},O,((_={})[x]=b?"0":"",_[v]=y?"0":"",_.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",_)):Object.assign({},O,((t={})[x]=b?g+"px":"",t[v]=y?f+"px":"",t.transform="",t))}var yr={passive:!0};var br={left:"right",right:"left",bottom:"top",top:"bottom"};function vr(e){return e.replace(/left|right|bottom|top/g,(function(e){return br[e]}))}var xr={start:"end",end:"start"};function wr(e){return e.replace(/start|end/g,(function(e){return xr[e]}))}function Mr(e){var t=Wi(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Sr(e){return tr(or(e)).left+Mr(e).scrollLeft}function kr(e){var t=rr(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function _r(e){return["html","body","#document"].indexOf(Hi(e))>=0?e.ownerDocument.body:Yi(e)&&kr(e)?e:_r(sr(e))}function Or(e,t){var n;void 0===t&&(t=[]);var i=_r(e),r=i===(null==(n=e.ownerDocument)?void 0:n.body),a=Wi(i),o=r?[a].concat(a.visualViewport||[],kr(i)?i:[]):i,s=t.concat(o);return r?s:s.concat(Or(sr(o)))}function Cr(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Er(e,t,n){return t===Ri?Cr(function(e,t){var n=Wi(e),i=or(e),r=n.visualViewport,a=i.clientWidth,o=i.clientHeight,s=0,l=0;if(r){a=r.width,o=r.height;var c=er();(c||!c&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:a,height:o,x:s+Sr(e),y:l}}(e,n)):Ui(t)?function(e,t){var n=tr(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Cr(function(e){var t,n=or(e),i=Mr(e),r=null==(t=e.ownerDocument)?void 0:t.body,a=Zi(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Zi(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-i.scrollLeft+Sr(e),l=-i.scrollTop;return"rtl"===rr(r||n).direction&&(s+=Zi(n.clientWidth,r?r.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}(or(e)))}function Ar(e,t,n,i){var r="clippingParents"===t?function(e){var t=Or(sr(e)),n=["absolute","fixed"].indexOf(rr(e).position)>=0&&Yi(e)?cr(e):e;return Ui(n)?t.filter((function(e){return Ui(e)&&ir(e,n)&&"body"!==Hi(e)})):[]}(e):[].concat(t),a=[].concat(r,[n]),o=a[0],s=a.reduce((function(t,n){var r=Er(e,n,i);return t.top=Zi(r.top,t.top),t.right=Ki(r.right,t.right),t.bottom=Ki(r.bottom,t.bottom),t.left=Zi(r.left,t.left),t}),Er(e,o,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Tr(e){var t,n=e.reference,i=e.element,r=e.placement,a=r?Xi(r):null,o=r?pr(r):null,s=n.x+n.width/2-i.width/2,l=n.y+n.height/2-i.height/2;switch(a){case Ti:t={x:s,y:n.y-i.height};break;case Ii:t={x:s,y:n.y+n.height};break;case ji:t={x:n.x+n.width,y:l};break;case Li:t={x:n.x-i.width,y:l};break;default:t={x:n.x,y:n.y}}var c=a?ur(a):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case Di:t[c]=t[c]-(n[u]/2-i[u]/2);break;case Ni:t[c]=t[c]+(n[u]/2-i[u]/2)}}return t}function Ir(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=void 0===i?e.placement:i,a=n.strategy,o=void 0===a?e.strategy:a,s=n.boundary,l=void 0===s?"clippingParents":s,c=n.rootBoundary,u=void 0===c?Ri:c,h=n.elementContext,d=void 0===h?Vi:h,f=n.altBoundary,p=void 0!==f&&f,g=n.padding,m=void 0===g?0:g,y=dr("number"!=typeof m?m:fr(m,zi)),b=d===Vi?"reference":Vi,v=e.rects.popper,x=e.elements[p?b:d],w=Ar(Ui(x)?x:x.contextElement||or(e.elements.popper),l,u,o),M=tr(e.elements.reference),S=Tr({reference:M,element:v,strategy:"absolute",placement:r}),k=Cr(Object.assign({},v,S)),_=d===Vi?k:M,O={top:w.top-_.top+y.top,bottom:_.bottom-w.bottom+y.bottom,left:w.left-_.left+y.left,right:_.right-w.right+y.right},C=e.modifiersData.offset;if(d===Vi&&C){var E=C[r];Object.keys(O).forEach((function(e){var t=[ji,Ii].indexOf(e)>=0?1:-1,n=[Ti,Ii].indexOf(e)>=0?"y":"x";O[e]+=E[n]*t}))}return O}const jr={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=n.mainAxis,a=void 0===r||r,o=n.altAxis,s=void 0===o||o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,h=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,p=void 0===f||f,g=n.allowedAutoPlacements,m=t.options.placement,y=Xi(m),b=l||(y===m||!p?[vr(m)]:function(e){if(Xi(e)===Pi)return[];var t=vr(e);return[wr(e),t,wr(t)]}(m)),v=[m].concat(b).reduce((function(e,n){return e.concat(Xi(n)===Pi?function(e,t){void 0===t&&(t={});var n=t,i=n.placement,r=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Fi:l,u=pr(i),h=u?s?$i:$i.filter((function(e){return pr(e)===u})):zi,d=h.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=h);var f=d.reduce((function(t,n){return t[n]=Ir(e,{placement:n,boundary:r,rootBoundary:a,padding:o})[Xi(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),x=t.rects.reference,w=t.rects.popper,M=new Map,S=!0,k=v[0],_=0;_<v.length;_++){var O=v[_],C=Xi(O),E=pr(O)===Di,A=[Ti,Ii].indexOf(C)>=0,T=A?"width":"height",I=Ir(t,{placement:O,boundary:u,rootBoundary:h,altBoundary:d,padding:c}),j=A?E?ji:Li:E?Ii:Ti;x[T]>w[T]&&(j=vr(j));var L=vr(j),P=[];if(a&&P.push(I[C]<=0),s&&P.push(I[j]<=0,I[L]<=0),P.every((function(e){return e}))){k=O,S=!1;break}M.set(O,P)}if(S)for(var z=function(e){var t=v.find((function(t){var n=M.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},D=p?3:1;D>0;D--){if("break"===z(D))break}t.placement!==k&&(t.modifiersData[i]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Lr(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Pr(e){return[Ti,ji,Ii,Li].some((function(t){return e[t]>=0}))}function zr(e,t,n){void 0===n&&(n=!1);var i,r,a=Yi(t),o=Yi(t)&&function(e){var t=e.getBoundingClientRect(),n=Qi(t.width)/e.offsetWidth||1,i=Qi(t.height)/e.offsetHeight||1;return 1!==n||1!==i}(t),s=or(t),l=tr(e,o,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==Hi(t)||kr(s))&&(c=(i=t)!==Wi(i)&&Yi(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:Mr(i)),Yi(t)?((u=tr(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=Sr(s))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function Dr(e){var t=new Map,n=new Set,i=[];function r(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var i=t.get(e);i&&r(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||r(e)})),i}var Nr={placement:"bottom",modifiers:[],strategy:"absolute"};function Rr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function Vr(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,i=void 0===n?[]:n,r=t.defaultOptions,a=void 0===r?Nr:r;return function(e,t,n){void 0===n&&(n=a);var r,o,s={placement:"bottom",orderedModifiers:[],options:Object.assign({},Nr,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},l=[],c=!1,u={state:s,setOptions:function(n){var r="function"==typeof n?n(s.options):n;h(),s.options=Object.assign({},a,s.options,r),s.scrollParents={reference:Ui(e)?Or(e):e.contextElement?Or(e.contextElement):[],popper:Or(t)};var o,c,d=function(e){var t=Dr(e);return Bi.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((o=[].concat(i,s.options.modifiers),c=o.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return s.orderedModifiers=d.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,i=void 0===n?{}:n,r=e.effect;if("function"==typeof r){var a=r({state:s,name:t,instance:u,options:i}),o=function(){};l.push(a||o)}})),u.update()},forceUpdate:function(){if(!c){var e=s.elements,t=e.reference,n=e.popper;if(Rr(t,n)){s.rects={reference:zr(t,cr(n),"fixed"===s.options.strategy),popper:nr(n)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<s.orderedModifiers.length;i++)if(!0!==s.reset){var r=s.orderedModifiers[i],a=r.fn,o=r.options,l=void 0===o?{}:o,h=r.name;"function"==typeof a&&(s=a({state:s,options:l,name:h,instance:u})||s)}else s.reset=!1,i=-1}}},update:(r=function(){return new Promise((function(e){u.forceUpdate(),e(s)}))},function(){return o||(o=new Promise((function(e){Promise.resolve().then((function(){o=void 0,e(r())}))}))),o}),destroy:function(){h(),c=!0}};if(!Rr(e,t))return u;function h(){l.forEach((function(e){return e()})),l=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var $r=Vr({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,i=e.options,r=i.scroll,a=void 0===r||r,o=i.resize,s=void 0===o||o,l=Wi(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,yr)})),s&&l.addEventListener("resize",n.update,yr),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,yr)})),s&&l.removeEventListener("resize",n.update,yr)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Tr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,i=n.gpuAcceleration,r=void 0===i||i,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,l=void 0===s||s,c={placement:Xi(t.placement),variation:pr(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mr(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mr(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},qi,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.offset,a=void 0===r?[0,0]:r,o=Fi.reduce((function(e,n){return e[n]=function(e,t,n){var i=Xi(e),r=[Li,Ti].indexOf(i)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*r,[Li,ji].indexOf(i)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=o}},jr,{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,i=e.name,r=n.mainAxis,a=void 0===r||r,o=n.altAxis,s=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,h=n.padding,d=n.tether,f=void 0===d||d,p=n.tetherOffset,g=void 0===p?0:p,m=Ir(t,{boundary:l,rootBoundary:c,padding:h,altBoundary:u}),y=Xi(t.placement),b=pr(t.placement),v=!b,x=ur(y),w="x"===x?"y":"x",M=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,_="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,O="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,E={x:0,y:0};if(M){if(a){var A,T="y"===x?Ti:Li,I="y"===x?Ii:ji,j="y"===x?"height":"width",L=M[x],P=L+m[T],z=L-m[I],D=f?-k[j]/2:0,N=b===Di?S[j]:k[j],R=b===Di?-k[j]:-S[j],V=t.elements.arrow,$=f&&V?nr(V):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[T],H=F[I],W=hr(0,S[j],$[j]),U=v?S[j]/2-D-W-B-O.mainAxis:N-W-B-O.mainAxis,Y=v?-S[j]/2+D+W+H+O.mainAxis:R+W+H+O.mainAxis,G=t.elements.arrow&&cr(t.elements.arrow),q=G?"y"===x?G.clientTop||0:G.clientLeft||0:0,X=null!=(A=null==C?void 0:C[x])?A:0,Z=L+Y-X,K=hr(f?Ki(P,L+U-X-q):P,L,f?Zi(z,Z):z);M[x]=K,E[x]=K-L}if(s){var Q,J="x"===x?Ti:Li,ee="x"===x?Ii:ji,te=M[w],ne="y"===w?"height":"width",ie=te+m[J],re=te-m[ee],ae=-1!==[Ti,Li].indexOf(y),oe=null!=(Q=null==C?void 0:C[w])?Q:0,se=ae?ie:te-S[ne]-k[ne]-oe+O.altAxis,le=ae?te+S[ne]+k[ne]-oe-O.altAxis:re,ce=f&&ae?(he=hr(se,te,ue=le))>ue?ue:he:hr(f?se:ie,te,f?le:re);M[w]=ce,E[w]=ce-te}var ue,he;t.modifiersData[i]=E}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,i=e.name,r=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=Xi(n.placement),l=ur(s),c=[Li,ji].indexOf(s)>=0?"height":"width";if(a&&o){var u=function(e,t){return dr("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:fr(e,zi))}(r.padding,n),h=nr(a),d="y"===l?Ti:Li,f="y"===l?Ii:ji,p=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],g=o[l]-n.rects.reference[l],m=cr(a),y=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,b=p/2-g/2,v=u[d],x=y-h[c]-u[f],w=y/2-h[c]/2+b,M=hr(v,w,x),S=l;n.modifiersData[i]=((t={})[S]=M,t.centerOffset=M-w,t)}},effect:function(e){var t=e.state,n=e.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&ir(t.elements.popper,i)&&(t.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,i=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,o=Ir(t,{elementContext:"reference"}),s=Ir(t,{altBoundary:!0}),l=Lr(o,i),c=Lr(s,r,a),u=Pr(l),h=Pr(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":h})}}]});const Fr=Object.freeze({Top:"top",Bottom:"bottom",Left:"left",Right:"right",TopStart:"top-start",TopEnd:"top-end",BottomStart:"bottom-start",BottomEnd:"bottom-end",RightStart:"right-start",RightEnd:"right-end",LeftStart:"left-start",LeftEnd:"left-end",Auto:"auto",AutoStart:"auto-start",AutoEnd:"auto-end"}),Br={fallbackPlacements:[Fr.Right,Fr.Left,Fr.Top,Fr.Bottom],placement:Fr.Right,offset:10};function Hr(e,t,n=document.body,i=0){const r=document.getElementById(e);if(r)return r;const a=document.createElement("div");return a.id=e,t&&a.classList.add(t),a.style.zIndex=`${i}`,n.appendChild(a),a}function Wr(e){return"object"==typeof e&&null!==e&&e.hasOwnProperty("nodeName")}function Ur(e=0,t=0){if("number"==typeof e)return e+t;const{top:n=0,right:i=0,bottom:r=0,left:a=0}=e;return{top:n+t,right:i+t,bottom:r+t,left:a+t}}const Yr=({anchor:e,scope:t,settings:i,children:a,visible:o,chartId:s,zIndex:l})=>{var c,u;const h=n.useRef(Wr(e)?e:Hr(`echAnchor${t}__${s}`,void 0,null!==(c=null==e?void 0:e.ref)&&void 0!==c?c:void 0)),d=Hr(`echTooltipPortal${t}__${s}`,"echTooltipPortal__invisible",void 0,l),f=n.useRef(d),p=n.useRef(null),g=n.useMemo((()=>Nn(Br,i,{mergeOptionalPartialValues:!0})),[i]),m=null===(u=e)||void 0===u?void 0:u.position,y=n.useMemo((()=>Wr(e)?null:m),[e,m]),b=n.useCallback((()=>{p.current&&(p.current.destroy(),p.current=null)}),[]),v=n.useCallback((()=>{if(!$n(h.current)||!o)return;const{fallbackPlacements:e,placement:t,boundary:n,offset:i,boundaryPadding:r}=g;p.current=$r(h.current,f.current,{strategy:"absolute",placement:t,modifiers:[{name:"offset",options:{offset:[0,i]}},{name:"preventOverflow",options:{boundary:n,padding:r}},{name:"flip",options:{fallbackPlacements:e.filter((e=>e!==t)),boundary:n,altAxis:!1,padding:Ur(r,i)}}]})}),[o,g.fallbackPlacements,g.placement,g.boundary,g.offset]);n.useEffect((()=>{v();const e=f.current;return()=>{e.parentNode&&e.parentNode.removeChild(e),b()}}),[]),n.useEffect((()=>{b(),v()}),[b,v,g]),n.useEffect((()=>{o?p.current||v():b()}),[b,v,o]);const x=n.useCallback((()=>{if(!y||!o)return;const{x:e,y:t,width:n,height:i}=y;h.current.style.transform=`translate(${e}px, ${t}px)`,$n(n)&&(h.current.style.width=`${n}px`),$n(i)&&(h.current.style.height=`${i}px`)}),[o,h,null==y?void 0:y.x,null==y?void 0:y.y,null==y?void 0:y.width,null==y?void 0:y.height]);return n.useEffect((()=>{y?f.current.classList.remove("echTooltipPortal__invisible"):f.current.classList.add("echTooltipPortal__invisible")}),[y]),n.useEffect((()=>{p.current&&(x(),p.current.update())}),[x,p]),r.createPortal(a,f.current)};Yr.displayName="TooltipPortal";const Gr=Yr;const qr=({info:e,zIndex:t,headerFormatter:r,position:a,getChartContainerRef:o,settings:s,visible:l,rotation:c,chartId:u,onPointerMove:h,backgroundColor:d})=>{const f=o(),p=()=>{h({x:-1,y:-1},Date.now())};n.useEffect((()=>(window.addEventListener("scroll",p,!0),()=>window.removeEventListener("scroll",p,!0))),[]);const g=n.useCallback((e=>e&&e.isVisible?i.createElement("div",{className:"echTooltip__header"},r?r(e):e.formattedValue):null),[r]),m=n.useMemo((()=>{var e;if(!s||"string"==typeof s)return;const{placement:t,fallbackPlacements:n,boundary:i}=s,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(s,["placement","fallbackPlacements","boundary"]);return Object.assign(Object.assign({},r),{placement:null!=t?t:0===c||180===c?Fr.Right:Fr.Top,fallbackPlacements:null!=n?n:0===c||180===c?[Fr.Right,Fr.Left,Fr.Top,Fr.Bottom]:[Fr.Top,Fr.Bottom,Fr.Right,Fr.Left],boundary:"chart"===i?null!==(e=f.current)&&void 0!==e?e:void 0:i})}),[s,f,c]);return l?i.createElement(Gr,{scope:"MainTooltip",zIndex:t+100,anchor:{position:a,ref:f.current},settings:m,chartId:u,visible:l},(()=>{if(!e||!l)return null;if("string"!=typeof s&&(null==s?void 0:s.customTooltip)){const t=s.customTooltip;return i.createElement(t,Object.assign({},e))}return i.createElement("div",{className:"echTooltip",style:"string"!=typeof s?null==s?void 0:s.customStyle:void 0},g(e.header),(t=e.values,i.createElement("div",{className:"echTooltip__list"},t.map((({seriesIdentifier:e,valueAccessor:t,label:n,markValue:r,formattedValue:a,formattedMarkValue:o,color:s,isHighlighted:l,isVisible:c},u)=>{if(!c)return null;const h=ie("echTooltip__item",{echTooltip__rowHighlighted:l}),f=Zt(s)&&0===Le(s).alpha()?"transparent":d;return i.createElement("div",{key:`${e.key}__${t}__${u}`,className:h,style:{borderLeftColor:s}},i.createElement("div",{className:"echTooltip__item--backgroundColor",style:{backgroundColor:f}},i.createElement("div",{className:"echTooltip__item--color",style:{backgroundColor:s}})),i.createElement("div",{className:"echTooltip__item--container"},i.createElement("span",{className:"echTooltip__label"},n),i.createElement("span",{className:"echTooltip__value"},a),$n(r)&&i.createElement("span",{className:"echTooltip__markValue"}," (",o,")")))})))));var t})()):null};qr.displayName="Tooltip";const Xr={zIndex:0,visible:!1,info:void 0,position:null,headerFormatter:void 0,settings:{},rotation:0,chartId:"",backgroundColor:"transparent"},Zr=n.memo(o((e=>{if(vi(e)!==bi.Initialized)return Xr;const{visible:t,isExternal:n}=(e=>e.internalChartState?e.internalChartState.isTooltipVisible(e):{visible:!1,isExternal:!1})(e),i=function(e,t){return t?Ci(e.tooltip)?Object.assign({type:e.tooltip},e.externalPointerEvents.tooltip):Object.assign(Object.assign({},e.tooltip),e.externalPointerEvents.tooltip):e.tooltip}(hi(e),n);return{visible:t,zIndex:e.zIndex,info:wi(e),position:xi(e),headerFormatter:Ai(e),settings:i,rotation:di(e),chartId:e.chartId,backgroundColor:yi(e).background.color}}),(e=>s({onPointerMove:sn},e)))(qr)),Kr=Object.freeze({Goal:"goal",HorizontalBullet:"horizontalBullet",VerticalBullet:"verticalBullet"});class Qr{constructor(e,t,n){this.dflt=e,this.reconfigurable=t,this.documentation=n}}class Jr extends Qr{constructor({dflt:e,min:t,max:n,reconfigurable:i,documentation:r}){super(e,i,r),this.type="number",this.min=t,this.max=n}}function ea(e,t){return Object.assign({},...Object.entries(t).map((([t,n])=>"group"===n.type?{[t]:ea(e,n.values)}:{[t]:e(n)})))}const ta=ea((e=>e.dflt),{angleStart:{dflt:Math.PI+Math.PI/4,min:-Ae,max:Ae,type:"number"},angleEnd:{dflt:-Math.PI/4,min:-Ae,max:Ae,type:"number"},width:{dflt:300,min:0,max:1024,type:"number",reconfigurable:!1},height:{dflt:150,min:0,max:1024,type:"number",reconfigurable:!1},margin:{type:"group",values:{left:{dflt:0,min:-.25,max:.25,type:"number"},right:{dflt:0,min:-.25,max:.25,type:"number"},top:{dflt:0,min:-.25,max:.25,type:"number"},bottom:{dflt:0,min:-.25,max:.25,type:"number"}}},fontFamily:{dflt:"Sans-Serif",type:"string"},minFontSize:{dflt:8,min:.1,max:8,type:"number",reconfigurable:!0},maxFontSize:{dflt:64,min:.1,max:64,type:"number"},backgroundColor:{dflt:"#ffffff",type:"color"},sectorLineWidth:{dflt:1,min:0,max:4,type:"number"},actualFillColor:{dflt:"black",type:"color"},targetFillColor:{dflt:"black",type:"color"},tickColor:{dflt:"darkgrey",type:"color"},tickTextColor:{dflt:"black",type:"color"},labelsColor:{dflt:"black",type:"color"}}),na={specType:Zn.Series,subtype:Kr.Goal,base:0,target:100,actual:50,ticks:[0,25,50,75,100]},ia=Object.assign(Object.assign({},na),{bands:[50,75,100],bandFillColor:({value:e,base:t,highestValue:n,lowestValue:i})=>{const r=e>t,a=r?(e-t)/(Math.max(t,n)-t):(e-t)/(Math.min(t,i)-t),o=Math.round(255*a);return r?`rgb(0, ${o}, 0)`:`rgb( ${o}, 0, 0)`},tickValueFormatter:({value:e})=>String(e),labelMajor:({base:e})=>String(e),labelMinor:({})=>"unit",centralMajor:({base:e})=>String(e),centralMinor:({target:e})=>String(e),bandLabels:[]}),ra=Object.assign(Object.assign({},na),{bands:[],ticks:[],labelMajor:"",labelMinor:"",centralMajor:"",centralMinor:"",highestValue:100,lowestValue:0,aboveBaseCount:0,belowBaseCount:0}),aa=(e,t)=>({config:e||ta,bulletViewModel:ra,chartCenter:t||{x:0,y:0},pickQuads:()=>[]});function oa(e){return Math.floor(e)}function sa(e,t,n,i=e=>e,r=0){let a=i(r);const o=e(a);let s=i(t),l=e(s);if(o>n||a>s)return NaN;if(l<=n)return s;let c=NaN,u=NaN,h=NaN;for(;a<s;){const t=(a+s)/2,r=e(i(t));if(r===u||r===h)return i(a);c=t,h=u,u=r;u<=n?a=c:(s=c,l=u)}return i(c)}const la=Object.freeze(["normal","small-caps"]),ca=Object.freeze(["normal","italic","oblique","inherit","initial","unset"]);function ua({fontStyle:e,fontVariant:t,fontWeight:n,fontFamily:i},r){return`${e} ${t} ${n} ${r}px ${i}`}function ha(e){return(t,n)=>n.map((n=>(e.font=ua(n,t),e.measureText(n.text))))}const da=Object.freeze({top:"top",middle:"middle",bottom:"bottom",alphabetic:"alphabetic",hanging:"hanging",ideographic:"ideographic"});function fa(e,t){return e.length<=t?e:`${e.slice(0,Math.max(0,t-1))}…`}function pa(e,t){const{width:n,height:i}=t,{config:r}=e,a=document.createElement("canvas").getContext("2d"),o=Object.assign(Object.assign({},r),{width:n,height:i}),s=Nn(ta,o);return a?function(e,t,n){const{width:i,height:r,margin:a}=n,o=i*(1-Math.min(1,a.left+a.right)),s=r*(1-Math.min(1,a.top+a.bottom)),l={x:i*a.left+o/2,y:r*a.top+s/2},{subtype:c,base:u,target:h,actual:d,bands:f,ticks:p,bandFillColor:g,tickValueFormatter:m,labelMajor:y,labelMinor:b,centralMajor:v,centralMinor:x,bandLabels:w}=t,[M,S]=[u,h,d,...f,...p].reduce((([e,t],n)=>[Math.min(e,n),Math.max(t,n)]),[1/0,-1/0]),k=f.filter((e=>e>u)).length,_=f.filter((e=>e<=u)).length,O={base:u,target:h,actual:d,highestValue:S,lowestValue:M,aboveBaseCount:k,belowBaseCount:_},C={subtype:c,base:u,target:h,actual:d,bands:f.map(((e,t)=>({value:e,fillColor:g(Object.assign({value:e,index:t},O)),text:w}))),ticks:p.map(((e,t)=>({value:e,text:m(Object.assign({value:e,index:t},O))}))),labelMajor:"string"==typeof y?y:y(Object.assign({value:NaN,index:0},O)),labelMinor:"string"==typeof b?b:b(Object.assign({value:NaN,index:0},O)),centralMajor:"string"==typeof v?v:v(Object.assign({value:NaN,index:0},O)),centralMinor:"string"==typeof x?x:x(Object.assign({value:NaN,index:0},O)),highestValue:S,lowestValue:M,aboveBaseCount:k,belowBaseCount:_};return{config:n,chartCenter:l,bulletViewModel:C,pickQuads:(e,t)=>-o/2<=e&&e<=o/2&&-s/2<=t&&t<=s/2?[C]:[]}}(ha(a),e,s):aa(s,{x:n/2,y:i/2})}const ga=fn([ui,e=>e.parentDimensions],((e,t)=>{const n=li(e,Ce.Goal,Zn.Series);return 1===n.length?pa(n[0],t):aa()})),ma=fn([ga],(e=>({maximum:e.bulletViewModel.highestValue,minimum:e.bulletViewModel.lowestValue,target:e.bulletViewModel.target,value:e.bulletViewModel.actual}))),ya=fn([ga],(e=>({majorLabel:e.bulletViewModel.labelMajor,minorLabel:e.bulletViewModel.labelMinor}))),ba=fn([ga],(e=>{var t;return null!==(t=e.bulletViewModel.bands)&&void 0!==t?t:[]})),va=fn([ga],(e=>e.bulletViewModel.lowestValue)),xa=e=>e.chartId,wa={labelHeadingLevel:si.ariaLabelHeadingLevel},Ma=fn([hi,xa],(({ariaDescription:e,ariaDescribedBy:t,ariaLabel:n,ariaLabelledBy:i,ariaUseDefaultSummary:r,ariaLabelHeadingLevel:a,ariaTableCaption:o},s)=>{const l=r?`${s}--defaultSummary`:void 0,c=[null!=t?t:e&&`${s}--desc`,l].filter($n);return{label:i?void 0:n,labelId:null!=i?i:n&&`${s}--label`,labelHeadingLevel:Sa(a)?a:wa.labelHeadingLevel,description:t?void 0:e,descriptionId:c.length>0?c.join(" "):void 0,defaultSummaryId:l,tableCaption:o}}));function Sa(e){return["h1","h2","h3","h4","h5","h6","p"].includes(e)}const ka=e=>e.internalChartState?e.internalChartState.getChartTypeDescription(e):"unknown chart type";function _a(e){return e.description?i.createElement("p",{id:e.descriptionId},e.description):null}function Oa({label:e,labelHeadingLevel:t,labelId:n,goalChartLabels:r}){const a=t;if(!e&&!(null==r?void 0:r.majorLabel)&&!(null==r?void 0:r.minorLabel))return null;let o="";return!e&&(null==r?void 0:r.majorLabel)?o=null==r?void 0:r.majorLabel:e&&!(null==r?void 0:r.majorLabel)?o=e:e&&(null==r?void 0:r.majorLabel)&&e!==(null==r?void 0:r.majorLabel)&&(o=`${e}; Chart visible label: ${null==r?void 0:r.majorLabel}`),i.createElement(i.Fragment,null,o&&i.createElement(a,{id:n},o),(null==r?void 0:r.minorLabel)&&i.createElement("p",null,null==r?void 0:r.minorLabel))}function Ca({goalChartData:e,defaultSummaryId:t,chartTypeDescription:n}){if(!t&&!e)return null;const r="goal chart"===n||"horizontalBullet chart"===n||"verticalBullet chart"===n;return i.createElement("dl",null,i.createElement("dt",null,"Chart type:"),i.createElement("dd",{id:t},n),r&&e?i.createElement(i.Fragment,null,i.createElement("dt",null,"Minimum:"),i.createElement("dd",null,e.minimum),i.createElement("dt",null,"Maximum:"),i.createElement("dd",null,e.maximum),i.createElement("dt",null,"Target:"),i.createElement("dd",null,"$",e.target),i.createElement("dd",null,"Value:"),i.createElement("dt",null,e.value)):null)}const Ea={a11ySettings:wa,chartTypeDescription:"",goalChartData:void 0},Aa=n.memo(o((e=>vi(e)!==bi.Initialized?Ea:{chartTypeDescription:ka(e),a11ySettings:Ma(e),goalChartData:ma(e),goalChartLabels:ya(e)}))((({a11ySettings:e,chartTypeDescription:t,goalChartData:n,goalChartLabels:r})=>i.createElement("div",{className:"echScreenReaderOnly"},i.createElement(Oa,Object.assign({},e,{goalChartLabels:r})),i.createElement(_a,Object.assign({},e)),i.createElement(Ca,Object.assign({},e,{chartTypeDescription:t,goalChartData:n})))))),Ta="value",Ia="statistics",ja="depth",La="children",Pa="inputIndex",za="parent",Da="sortIndex",Na="path",Ra="__root_key__",Va=([e])=>e,$a=([,e])=>e;function Fa(e){return $a(e)[ja]}function Ba(e){return $a(e)[Ta]}function Ha(e){return $a(e)[za]}function Wa(e){return $a(e)[Da]}function Ua(e){return $a(e)[Na]}function Ya(e){const t=e[Da],n=e[za][La][t];return Va(n)}function Ga(e,t,n){const i=(e,n)=>{const r=Array.from(e,(([e,t])=>{const r=t[La],a={[Ta]:NaN,[Ia]:{globalAggregate:NaN},[La]:[],[ja]:NaN,[Da]:NaN,[za]:n,[Pa]:[],[Na]:[]};return[e,Object.assign(a,t,r&&{[La]:i(r,a)})]}));return t.some((e=>null!==e))&&r.sort(((e,n)=>{const i=e[1],r=n[1];if(i[ja]!==r[ja])return i[ja]-r[ja];const a=i[ja],o=t[a];return o?o(e,n):r.value-i.value})),r.map(((e,t)=>($a(e).sortIndex=t,e)))},r=i(e,function(){const e={[Ta]:NaN,[ja]:NaN,[La]:[],[Pa]:[],[Na]:[],[Da]:0,[Ia]:{globalAggregate:0}};return e[za]=e,e}()),a=([e,t],n)=>{const i=[...n,{index:t[Da],value:e}];t[Na]=i,t.children.forEach((e=>a(e,i)))};return a(r[0],n),r}function qa(e){return $a(e)[Ta]}const Xa={identity:()=>0,reducer:(e,t)=>e+t},Za={chartType:Ce.Global,specType:Zn.IndexOrder};ki()(Mi(Za));const Ka={outer:0,inner:.1},Qa={id:"__global__small_multiples___",chartType:Ce.Global,specType:Zn.SmallMultiples};ki()(Mi(Qa));const Ja=Object.freeze({Linear:"linear",Ordinal:"ordinal",Log:"log",Sqrt:"sqrt",Time:"time",Quantize:"quantize",Quantile:"quantile",Threshold:"threshold"}),eo=Object.freeze({Area:"area",Bar:"bar",Line:"line",Bubble:"bubble"}),to=Object.freeze({Percentage:"percentage",Wiggle:"wiggle",Silhouette:"silhouette"}),no="__global__",io=Object.freeze({None:"none",Carry:"carry",Lookahead:"lookahead",Nearest:"nearest",Average:"average",Linear:"linear",Zero:"zero",Explicit:"explicit"}),ro=Object.freeze({Domain:"domain",Pixel:"pixel",DomainRatio:"domainRatio"}),ao=Object.freeze({Start:"start",Center:"center",End:"end"}),oo=Object.freeze({Line:"line",Rectangle:"rectangle",Text:"text"}),so=Object.freeze({XDomain:"xDomain",YDomain:"yDomain"});function lo(e){return e.annotationType===oo.Line}function co(e){return e.annotationType===oo.Rectangle}function uo(e){return e.seriesType===eo.Bar}function ho(e){return e.seriesType===eo.Bubble}function fo(e){return e.seriesType===eo.Line}function po(e){return e.seriesType===eo.Area}function go(e){return Boolean(e&&e.length>0)}const mo={chartType:Ce.XYAxis,specType:Zn.Series,seriesType:eo.Area,groupId:no,xScaleType:Ja.Linear,yScaleType:Ja.Linear,xAccessor:"x",yAccessors:["y"],hideInLegend:!1,histogramModeAlignment:ao.Center},yo=ki()(Mi(mo)),bo={chartType:Ce.XYAxis,specType:Zn.Axis,groupId:no,hide:!1,showOverlappingTicks:!1,showOverlappingLabels:!1,position:wn.Left},vo=ki()(Mi(bo)),xo={chartType:Ce.XYAxis,specType:Zn.Series,seriesType:eo.Bar,groupId:no,xScaleType:Ja.Ordinal,yScaleType:Ja.Linear,xAccessor:"x",yAccessors:["y"],hideInLegend:!1,enableHistogramMode:!1},wo=ki()(Mi(xo)),Mo={chartType:Ce.XYAxis,specType:Zn.Series,seriesType:eo.Bubble,groupId:no,xScaleType:Ja.Ordinal,yScaleType:Ja.Linear,xAccessor:"x",yAccessors:["y"],hideInLegend:!1};ki()(Mi(Mo));const So={chartType:Ce.XYAxis,specType:Zn.Series,seriesType:eo.Bar,groupId:no,xScaleType:Ja.Linear,yScaleType:Ja.Linear,xAccessor:"x",yAccessors:["y"],hideInLegend:!1,enableHistogramMode:!0};ki()(Mi(So));const ko={chartType:Ce.XYAxis,specType:Zn.Annotation,groupId:no,annotationType:oo.Line,style:fi,hideLines:!1,hideTooltips:!1,hideLinesTooltips:!0,zIndex:1},_o=ki()(Mi(ko)),Oo={chartType:Ce.XYAxis,specType:Zn.Series,seriesType:eo.Line,groupId:no,xScaleType:Ja.Ordinal,yScaleType:Ja.Linear,xAccessor:"x",yAccessors:["y"],hideInLegend:!1,histogramModeAlignment:ao.Center},Co=ki()(Mi(Oo)),Eo={chartType:Ce.XYAxis,specType:Zn.Annotation,groupId:no,annotationType:oo.Rectangle,zIndex:-1,style:pi,outside:!1},Ao=ki()(Mi(Eo)),To=Object.freeze({sunburst:"sunburst",treemap:"treemap",icicle:"icicle",flame:"flame",mosaic:"mosaic"}),Io=Math.log(10);function jo(e){return e[Ta]}const Lo="parent";function Po(e){return 100*e[Ta]/e[Lo][Ia].globalAggregate}const zo=Object.freeze({percent:Po,ratio:function(e){return e[Ta]/e[Lo][Ia].globalAggregate}});const Do={fontFamily:{dflt:"Sans-Serif",type:"string"},fontSize:{dflt:12,min:4,max:32,type:"number"},fontStyle:{dflt:"normal",type:"string",values:ca},fontVariant:{dflt:"normal",type:"string",values:la},fontWeight:{dflt:400,min:100,max:900,type:"number"}},No={type:"group",values:{fontWeight:Do.fontWeight,fontStyle:Do.fontStyle,fontVariant:Do.fontVariant}},Ro={width:{dflt:300,min:0,max:1024,type:"number",reconfigurable:!1},height:{dflt:150,min:0,max:1024,type:"number",reconfigurable:!1},margin:{type:"group",values:{left:{dflt:0,min:-.25,max:.25,type:"number"},right:{dflt:0,min:-.25,max:.25,type:"number"},top:{dflt:0,min:-.25,max:.25,type:"number"},bottom:{dflt:0,min:-.25,max:.25,type:"number"}}},outerSizeRatio:new Jr({dflt:1/Ie,min:.25,max:1,reconfigurable:!0,documentation:"The diameter of the entire circle, relative to the smaller of the usable rectangular size (smaller of width/height minus the margins)"}),emptySizeRatio:new Jr({dflt:0,min:0,max:.8,reconfigurable:!0,documentation:"The diameter of the inner circle, relative to `outerSizeRatio`"}),clockwiseSectors:{dflt:!0,type:"boolean",documentation:"Largest to smallest sectors are positioned in a clockwise order"},specialFirstInnermostSector:{dflt:!0,type:"boolean",documentation:"Starts placement with the second largest slice, for the innermost pie/ring"},fontFamily:{dflt:"Sans-Serif",type:"string"},minFontSize:{dflt:8,min:.1,max:8,type:"number",reconfigurable:!0},maxFontSize:{dflt:64,min:.1,max:64,type:"number"},idealFontSizeJump:{dflt:1.05,min:1.05,max:Ie,type:"number",reconfigurable:!1},maximizeFontSize:{dflt:!1,type:"boolean"},partitionLayout:{dflt:To.sunburst,type:"string",values:Object.keys(To)},drilldown:{dflt:!1,type:"boolean"},circlePadding:{dflt:2,min:0,max:8,type:"number"},radialPadding:{dflt:Ae/360,min:0,max:.035,type:"number"},horizontalTextAngleThreshold:{dflt:Ae/12,min:0,max:Ae,type:"number"},horizontalTextEnforcer:{dflt:1,min:0,max:1,type:"number"},maxRowCount:{dflt:12,min:1,max:16,type:"number"},fillOutside:{dflt:!1,type:"boolean"},radiusOutside:{dflt:128,min:0,max:1024,type:"number"},fillRectangleWidth:{dflt:1/0,reconfigurable:!1,type:"number"},fillRectangleHeight:{dflt:1/0,reconfigurable:!1,type:"number"},fillLabel:{type:"group",values:Object.assign(Object.assign({textColor:{type:"color",dflt:"#000000"},textInvertible:{dflt:!1,type:"boolean"},textContrast:{dflt:!1,type:"boolean"}},Do),{valueGetter:{dflt:jo,type:"function"},valueFormatter:{dflt:function(e){return Math.abs(e)>=1e7||Math.abs(e)<.001?e.toExponential(Math.min(2,Math.max(0,function(e){let t=Math.abs(parseFloat(String(e).replace(".","")));if(0===t)return 0;for(;0!==t&&t%10==0;)t/=10;return Math.floor(Math.log(t)/Io)+1}(e)-1))):e.toLocaleString(void 0,{maximumSignificantDigits:4,maximumFractionDigits:3,useGrouping:!0})},type:"function"},valueFont:No,padding:{type:"group",values:{top:{dflt:2,min:0,max:20,type:"number",reconfigurable:!0,documentation:"Top padding for fill text"},bottom:{dflt:2,min:0,max:20,type:"number",reconfigurable:!0,documentation:"Bottom padding for fill text"},left:{dflt:2,min:0,max:20,type:"number",reconfigurable:!0,documentation:"Left padding for fill text"},right:{dflt:2,min:0,max:20,type:"number",reconfigurable:!0,documentation:"Right padding for fill text"}}},clipText:{type:"boolean",dflt:!1,documentation:"Renders, but clips, text that's longer than what would fit in a box entirely"}})},linkLabel:{type:"group",values:Object.assign(Object.assign({maximumSection:{dflt:10,min:0,max:1e4,type:"number",reconfigurable:!0,documentation:"Uses linked labels below this limit of the outer sector arc length (in pixels)"}},Do),{gap:{dflt:10,min:6,max:16,type:"number"},spacing:{dflt:2,min:0,max:16,type:"number"},horizontalStemLength:{dflt:10,min:6,max:16,type:"number"},radiusPadding:{dflt:10,min:6,max:16,type:"number"},lineWidth:{dflt:1,min:.1,max:2,type:"number"},maxCount:{dflt:36,min:2,max:64,type:"number",documentation:"Limits the total count of linked labels. The first N largest slices are kept."},maxTextLength:{dflt:100,min:2,max:200,documentation:"Limits the total number of characters in linked labels."},textColor:{dflt:"#000000",type:"color"},textInvertible:{dflt:!1,type:"boolean"},textContrast:{dflt:!1,type:"boolean"},textOpacity:{dflt:1,min:0,max:1,type:"number"},minimumStemLength:{dflt:0,min:0,max:16,type:"number",reconfigurable:!1},stemAngle:{dflt:Ae/8,min:0,max:Ae,type:"number",reconfigurable:!1},valueFont:No})},backgroundColor:{dflt:"#ffffff",type:"color"},sectorLineWidth:{dflt:1,min:0,max:4,type:"number"},sectorLineStroke:{dflt:"white",type:"string"},animation:{type:"group",values:{duration:{dflt:0,min:0,max:3e3,type:"number"}}}},Vo=ea((e=>e.dflt),Ro),$o={chartType:Ce.Partition,specType:Zn.Series,config:Vo,valueAccessor:e=>"number"==typeof e?e:0,valueGetter:e=>e[Ta],valueFormatter:e=>String(e),percentFormatter:function(e){return`${Math.round(e)}%`},topGroove:20,smallMultiples:null,layers:[{groupByRollup:(e,t)=>t,nodeLabel:e=>String(e),showAccessor:()=>!0,fillLabel:{}}]},Fo=ki()(Mi($o)),Bo=Object.freeze({NumAsc:"numAsc",NumDesc:"numDesc",AlphaAsc:"alphaAsc",AlphaDesc:"alphaDesc",DataIndex:"dataIndex"});function Ho(e,t){switch(e){case"alphaAsc":return(e,t)=>{const n=String(e),i=String(t);return n.localeCompare(i)};case"alphaDesc":return(e,t)=>{const n=String(e);return String(t).localeCompare(n)};case"numDesc":return(e,t)=>{const n=Number(e);return Number(t)-n};default:return(e,t)=>Number(e)-Number(t)}}const Wo={width:500,height:500,margin:{left:.01,right:.01,top:.01,bottom:.01},maxRowHeight:30,maxColumnWidth:30,fontFamily:"Sans-Serif",onBrushEnd:void 0,brushArea:{visible:!0,fill:"black",stroke:"#69707D",strokeWidth:2},brushMask:{visible:!0,fill:"rgb(115 115 115 / 50%)"},brushTool:{visible:!1,fill:"gray"},timeZone:"UTC",xAxisLabel:{name:"X Value",visible:!0,width:"auto",fill:"black",fontSize:12,fontFamily:"Sans-Serif",fontStyle:"normal",textColor:"black",fontVariant:"normal",fontWeight:"normal",textOpacity:1,align:"center",baseline:"verticalAlign",padding:6,labelRotation:0,position:"top",removeDuplicateTicks:!0,formatter:String},yAxisLabel:{name:"Y Value",visible:!0,width:"auto",fill:"black",fontSize:12,fontFamily:"Sans-Serif",fontStyle:"normal",textColor:"black",fontVariant:"normal",fontWeight:"normal",textOpacity:1,baseline:"verticalAlign",padding:5,formatter:String},grid:{cellWidth:{min:0,max:30},cellHeight:{min:12,max:30},stroke:{width:1,color:"gray"}},cell:{maxWidth:"fill",maxHeight:"fill",align:"center",label:{visible:!0,maxWidth:"fill",fill:"black",fontSize:10,fontFamily:"Sans-Serif",fontStyle:"normal",textColor:"black",fontVariant:"normal",fontWeight:"normal",textOpacity:1,align:"center",baseline:"verticalAlign"},border:{strokeWidth:1,stroke:"gray"}}},Uo={type:Ja.Ordinal,nice:!1,desiredTickCount:10},Yo={chartType:Ce.Heatmap,specType:Zn.Series,data:[],colors:["red","yellow","green"],colorScale:Ja.Linear,xAccessor:({x:e})=>e,yAccessor:({y:e})=>e,xScaleType:Uo.type,valueAccessor:({value:e})=>e,valueFormatter:e=>`${e}`,xSortPredicate:Bo.AlphaAsc,ySortPredicate:Bo.AlphaAsc,config:Wo},Go=ki()(Mi(Yo));const qo={[wn.Left]:{vAlign:wn.Top,hAlign:wn.Left,direction:Mn.Vertical,floating:!1,floatingColumns:1},[wn.Top]:{vAlign:wn.Top,hAlign:wn.Left,direction:Mn.Horizontal,floating:!1,floatingColumns:1},[wn.Bottom]:{vAlign:wn.Bottom,hAlign:wn.Left,direction:Mn.Horizontal,floating:!1,floatingColumns:1},[wn.Right]:{vAlign:wn.Top,hAlign:wn.Right,direction:Mn.Vertical,floating:!1,floatingColumns:1}};function Xo(e){return"object"==typeof e?e:qo[e]}const Zo=fn([hi],(({flatLegend:e,legendAction:t,legendColorPicker:n,legendMaxDepth:i,legendPosition:r,legendStrategy:a,onLegendItemClick:o,showLegend:s,onLegendItemMinusClick:l,onLegendItemOut:c,onLegendItemOver:u,onLegendItemPlusClick:h,showLegendExtra:d})=>({flatLegend:e,legendAction:t,legendColorPicker:n,legendMaxDepth:i,legendPosition:Xo(r),legendStrategy:a,onLegendItemClick:o,showLegend:s,onLegendItemMinusClick:l,onLegendItemOut:c,onLegendItemOver:u,onLegendItemPlusClick:h,showLegendExtra:d})));function Ko(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;let n,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(i=n;0!=i--;)if(!Ko(e[i],t[i]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;for(i of e.entries())if(!Ko(i[1],t.get(i[0])))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i of e.entries())if(!t.has(i[0]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();const r=Object.keys(e);if(n=r.length,n!==Object.keys(t).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(t,r[i]))return!1;for(i=n;0!=i--;){const n=r[i];if(("_owner"!==n||!e.$$typeof)&&!Ko(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}class Qo extends i.Component{shouldComponentUpdate(e){return!Ko(this.props,e)}render(){return i.createElement("svg",Object.assign({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},this.props),i.createElement("circle",{cx:8,cy:8,r:4}))}}function Jo(e){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},e))}const es={alert:function(e){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},e),i.createElement("path",{fillRule:"evenodd",d:"M8.378 1.496l6.695 10.984A1 1 0 0 1 14.22 14H1.667a1 1 0 0 1-.883-1.47L6.642 1.545a1 1 0 0 1 1.736-.05zm-.853.52L1.667 13h12.552L7.525 2.016zM7.14 10.06L6.9 5.18h1.3l-.25 4.878h-.81zm.394 1.901a.61.61 0 0 1-.448-.186.606.606 0 0 1-.186-.444c0-.174.062-.323.186-.446a.614.614 0 0 1 .448-.184c.169 0 .315.06.44.182.124.122.186.27.186.448a.6.6 0 0 1-.189.446.607.607 0 0 1-.437.184z"}))},dot:Qo,empty:Jo,eye:function(e){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},e),i.createElement("path",{d:"M15.98 7.873c.013.03.02.064.02.098v.06a.24.24 0 0 1-.02.097C15.952 8.188 13.291 14 8 14S.047 8.188.02 8.128A.24.24 0 0 1 0 8.03v-.059c0-.034.007-.068.02-.098C.048 7.813 2.709 2 8 2s7.953 5.813 7.98 5.873zm-1.37-.424a12.097 12.097 0 0 0-1.385-1.862C11.739 3.956 9.999 3 8 3c-2 0-3.74.956-5.225 2.587a12.098 12.098 0 0 0-1.701 2.414 12.095 12.095 0 0 0 1.7 2.413C4.26 12.043 6.002 13 8 13s3.74-.956 5.225-2.587A12.097 12.097 0 0 0 14.926 8c-.08-.15-.189-.343-.315-.551zM8 4.75A3.253 3.253 0 0 1 11.25 8 3.254 3.254 0 0 1 8 11.25 3.253 3.253 0 0 1 4.75 8 3.252 3.252 0 0 1 8 4.75zm0 1C6.76 5.75 5.75 6.76 5.75 8S6.76 10.25 8 10.25 10.25 9.24 10.25 8 9.24 5.75 8 5.75zm0 1.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5z"}))},eyeClosed:function(e){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},e),i.createElement("path",{d:"M5.318 13.47l.776-.776A6.04 6.04 0 0 0 8 13c1.999 0 3.74-.956 5.225-2.587A12.097 12.097 0 0 0 14.926 8a12.097 12.097 0 0 0-1.701-2.413l-.011-.012.707-.708c1.359 1.476 2.045 2.976 2.058 3.006.014.03.021.064.021.098v.06a.24.24 0 0 1-.02.097C15.952 8.188 13.291 14 8 14a7.03 7.03 0 0 1-2.682-.53zM2.04 11.092C.707 9.629.034 8.158.02 8.128A.24.24 0 0 1 0 8.03v-.059c0-.034.007-.068.02-.098C.048 7.813 2.709 2 8 2c.962 0 1.837.192 2.625.507l-.78.78A6.039 6.039 0 0 0 8 3c-2 0-3.74.956-5.225 2.587a12.098 12.098 0 0 0-1.701 2.414 12.11 12.11 0 0 0 1.674 2.383l-.708.708zM8.362 4.77L7.255 5.877a2.262 2.262 0 0 0-1.378 1.378L4.77 8.362A3.252 3.252 0 0 1 8.362 4.77zm2.86 2.797a3.254 3.254 0 0 1-3.654 3.654l1.06-1.06a2.262 2.262 0 0 0 1.533-1.533l1.06-1.06zm-9.368 7.287a.5.5 0 0 1-.708-.708l13-13a.5.5 0 0 1 .708.708l-13 13z"}))},list:function(e){return i.createElement("svg",Object.assign({width:16,height:16,xmlns:"http://www.w3.org/2000/svg"},e),i.createElement("path",{d:"M2 4V3h2v1H2zm4 0V3h8v1H6zm0 3V6h8v1H6zm0 3V9h8v1H6zM2 7V6h2v1H2zm0 3V9h2v1H2zm4 3v-1h8v1H6zm-4 0v-1h2v1H2z"}))},questionInCircle:function(e){return i.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"},e),i.createElement("path",{d:"M8 14A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-1A5 5 0 1 0 8 3a5 5 0 0 0 0 10zm-.186-1.065A.785.785 0 0 1 7 11.12c0-.48.34-.82.814-.82.475 0 .809.34.809.82 0 .475-.334.815-.809.815zM5.9 6.317C5.96 5.168 6.755 4.4 8.048 4.4c1.218 0 2.091.759 2.091 1.8 0 .736-.36 1.304-1.03 1.707-.56.33-.717.56-.717 1.022v.305l-.1.1H7.47l-.1-.1v-.431c-.005-.646.302-1.104.987-1.514.527-.322.708-.59.708-1.047 0-.536-.416-.91-1.05-.91-.652 0-1.064.374-1.112.998l-.1.092H6l-.1-.105z"}))}};function ts(e){var{type:t,color:n,className:r,tabIndex:a}=e,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["type","color","className","tabIndex"]);let s=null;n&&(s={color:n});const l=ie("echIcon",r),c=t&&es[t]||Jo,u=null==a||-1===a?"false":"true";return i.createElement(c,Object.assign({className:l},s,{tabIndex:a,focusable:u},o))}ts.displayName="Icon";const ns=n.memo(ts,Ko),is=n.memo(n.forwardRef((({color:e,seriesName:t,isSeriesHidden:n=!1,hasColorPicker:r,onClick:a},o)=>n?i.createElement("div",{className:"echLegendItem__color",title:"series hidden"},i.createElement(ns,{type:"eyeClosed",viewBox:"-3 -3 22 22","aria-label":`series ${t} is hidden`})):r?i.createElement("button",{type:"button",onClick:a,className:"echLegendItem__color echLegendItem__color--changable",title:"change series color",ref:o},i.createElement(ns,{type:"dot",color:e,"aria-label":`Change series color, currently ${e}`})):i.createElement("div",{className:"echLegendItem__color",title:"series color"},i.createElement(ns,{type:"dot",color:e,"aria-label":`series color: ${e}`})))));function rs({label:e,isToggleable:t,onClick:n,isSeriesHidden:r}){const a=ie("echLegendItem__label",{"echLegendItem__label--clickable":Boolean(n)});return t?i.createElement("button",{type:"button",className:a,title:e,onClick:n,"aria-label":r?`${e}; Activate to show series in graph`:`${e}; Activate to hide series in graph`},e):i.createElement("div",{className:a,title:e,onClick:n},e)}is.displayName="Color";class as extends n.Component{constructor(){super(...arguments),this.shouldClearPersistedColor=!1,this.colorRef=n.createRef(),this.state={isOpen:!1,actionActive:!1},this.handleColorClick=e=>e?e=>{e.stopPropagation(),this.toggleIsOpen()}:void 0,this.toggleIsOpen=()=>{this.setState((({isOpen:e})=>({isOpen:!e})))},this.onLegendItemMouseOver=()=>{const{onMouseOver:e,mouseOverAction:t,item:n}=this.props;e&&e(n.seriesIdentifiers),t(n.path)},this.onLegendItemMouseOut=()=>{const{onMouseOut:e,mouseOutAction:t}=this.props;e&&e(),t()},this.handleLabelClick=e=>{const{item:t,onClick:n,toggleDeselectSeriesAction:i,totalItems:r}=this.props;if(!(r<=1||!t.isToggleable&&!n))return({shiftKey:r})=>{n&&n(e),t.isToggleable&&i(e,r)}}}shouldComponentUpdate(e,t){return!Ko(this.props,e)||!Ko(this.state,t)}renderColorPicker(){const{colorPicker:e,item:t,clearTemporaryColorsAction:n,setTemporaryColorAction:r,setPersistedColorAction:a}=this.props,{seriesIdentifiers:o,color:s}=t,l=o.map((({key:e})=>e)),c=()=>{a(l,this.shouldClearPersistedColor?null:s),n(),this.toggleIsOpen()},u=e=>{this.shouldClearPersistedColor=null===e,r(l,e)};if(e&&this.state.isOpen&&this.colorRef.current)return i.createElement(e,{anchor:this.colorRef.current,color:s,onClose:c,onChange:u,seriesIdentifiers:o})}render(){var e;const{extraValues:t,item:n,showExtra:r,colorPicker:a,totalItems:o,action:s,positionConfig:l}=this.props,{color:c,isSeriesHidden:u,isItemHidden:h,seriesIdentifiers:d,label:f}=n;if(h)return null;const p=ie("echLegendItem",{"echLegendItem--hidden":u,"echLegendItem--vertical":l.direction===Mn.Vertical}),g=Boolean(a),m=r&&function(e,t,n){var i,r,a;const{seriesIdentifiers:o,defaultExtra:s,childId:l,path:c}=t;if(0===e.size||o.length>1)return null!==(i=null==s?void 0:s.formatted)&&void 0!==i?i:"";const[{key:u}]=o,h=c.map((({index:e})=>e)).join("__"),d=e.has(h)?e.get(h):e.get(u),f=null!==(r=l&&(null==d?void 0:d.get(l)))&&void 0!==r?r:null;return e.size!==n?null!=f?f:"":null!==f?f:null!==(a=null==s?void 0:s.formatted)&&void 0!==a?a:""}(t,n,o),y=n.depth?{marginLeft:10*(null!==(e=n.depth)&&void 0!==e?e:0)}:void 0;return i.createElement(i.Fragment,null,i.createElement("li",{className:p,onMouseEnter:this.onLegendItemMouseOver,onMouseLeave:this.onLegendItemMouseOut,style:y,"data-ech-series-name":f},i.createElement("div",{className:"background"}),i.createElement(is,{ref:this.colorRef,color:c,seriesName:f,isSeriesHidden:u,hasColorPicker:g,onClick:this.handleColorClick(g)}),i.createElement(rs,{label:f,isToggleable:o>1&&n.isToggleable,onClick:this.handleLabelClick(d),isSeriesHidden:u}),m&&!u&&function(e){return i.createElement("div",{className:"echLegendItem__extra",title:`${e}`},e)}(m),s&&i.createElement("div",{className:"echLegendItem__action"},i.createElement(s,{series:d,color:c,label:f}))),this.renderColorPicker())}}as.displayName="LegendItem";const os={width:0,height:0};class ss{constructor(e){this.offscreenCanvas=document.createElement("canvas"),this.offscreenCanvas.style.position="absolute",this.offscreenCanvas.style.top="-99999px",this.offscreenCanvas.style.left="-99999px",this.context=this.offscreenCanvas.getContext("2d"),this.attachedRoot=e||document.documentElement,this.attachedRoot.appendChild(this.offscreenCanvas)}compute(e,t,n=16,i="Arial",r=1,a=400){if(!this.context)return os;t<1&&(t=1),this.context.font=`${a} ${n}px ${i}`;return{width:this.context.measureText(e).width+t,height:n*r}}destroy(){this.attachedRoot.removeChild(this.offscreenCanvas)}}const ls=fn([Zo,yi,e=>e.parentDimensions,e=>{var t,n;return null!==(n=null===(t=e.internalChartState)||void 0===t?void 0:t.getLegendItemsLabels(e))&&void 0!==n?n:[]}],((e,t,n,i)=>{if(!e.showLegend)return{width:0,height:0,margin:0,position:qo[wn.Right]};const r=new ss,a=i.reduce(((e,{label:t,depth:n})=>{const i=r.compute(t,1,12,'"Inter UI", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',1.5,400);return i.width+=10*n,e.height<i.height&&(e.height=i.height),e.width<i.width&&(e.width=i.width),e}),{width:0,height:0});r.destroy();const{showLegendExtra:o,legendPosition:s,legendAction:l}=e,{legend:{verticalWidth:c,spacingBuffer:u,margin:h}}=t,d=$n(l)?24:0,f=20+a.width+(o?4:0);if(s.direction===Mn.Vertical){const e=(a.height+8)*i.length+2,t=e>n.height?16:0;return{width:Math.floor(Math.min(f+u+d+t,c)),height:e,margin:h,position:s}}const p=Math.floor(Math.min(f+u+d,c)),g=(n.width-32)/p>i.length,m=Math.ceil(i.length/Math.floor((n.width-32)/p));return{height:g?a.height+16:a.height*m+(8*m+8),width:p,margin:h,position:s}})),cs=fn([Zo,ls,e=>e.parentDimensions],(({showLegend:e,legendPosition:{floating:t,direction:n}},i,r)=>!e||t?r:n===Mn.Vertical?{left:0,top:0,width:r.width-i.width-2*i.margin,height:r.height}:{left:0,top:0,width:r.width,height:r.height-i.height-2*i.margin})),us={fontStyle:"normal",fontVariant:"normal",fontFamily:"",fontWeight:"normal",textColor:"black",textOpacity:1},hs=e=>({index:0,innerIndex:0,smAccessorValue:"",panelTitle:"",top:0,left:0,width:0,height:0,innerRowCount:0,innerColumnCount:0,innerRowIndex:0,innerColumnIndex:0,marginLeftPx:0,marginTopPx:0,panelInnerWidth:0,panelInnerHeight:0,partitionLayout:e}),ds=(e,t)=>Object.assign(Object.assign({},hs((e||Vo).partitionLayout)),{config:e||Vo,layers:[],quadViewModel:[],rowSets:[],linkLabelViewModels:{linkLabels:[],labelFontSpec:us,valueFontSpec:us,strokeColor:""},outsideLinksViewModel:[],diskCenter:t||{x:0,y:0},pickQuads:()=>[],outerRadius:0});class fs{static warn(e,...t){}static expected(e,t,n){}static error(e,...t){}static isDevelopment(){return!1}static isTest(){return!1}}function ps(e,t,n,i,r){if(!function(e){const t=Zt(e)?Le(e).alpha():1;return!!(Zt(e)&&t>=1)}(r))return en(Jt(i),Jt(e),e,!1,"white");const a=e,o=qt(i,r),s="number"==typeof n,l=n&&!t;if(t&&!n||t&&"number"!=typeof n){return en(Jt(qt(i,r)),Jt(e),e,n,o)}return s||l?Kt(a,o):a}function gs(e){return 0<=e&&e<=Ae?e:(e<0&&(e-=Ae*Math.floor(e/Ae)),e>Ae?e%Ae:e)}function ms(e,t){return(Ae+t+function(e,t){return(e-t+Math.PI+Ae)%Ae-Math.PI}(e,t)/2)%Ae}function ys(e){return gs(Te-e)}function bs({x:e,y:t},{x:n,y:i}){return Math.sqrt(Math.pow(e-n,2)+Math.pow(t-i,2))}function vs(e,t){return bs(e,t)+t.r<=e.r}function xs(e,t){return bs(e,t)>=e.r+t.r}function ws(e,t){const{inside:n}=e,{x:i,y:r,r:a,from:o,to:s}=t,l=vs(e,t),c=xs(e,t)||vs(t,e);if(n&&l||!n&&c)return[];if(n&&c||!n&&l)return[t];const u=function(e,t){const n=Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y));if(e.r+t.r>=n&&n>=Math.abs(e.r-t.r)){const i=n+e.r+t.r,r=n+e.r-t.r,a=n-e.r+t.r,o=-n+e.r+t.r,s=Math.sqrt(i*r*a*o)/4,l=(e.x+t.x)/2+(t.x-e.x)*(e.r*e.r-t.r*t.r)/(2*n*n),c=2*(e.y-t.y)*s/(n*n),u=l+c,h=l-c,d=(e.y+t.y)/2+(t.y-e.y)*(e.r*e.r-t.r*t.r)/(2*n*n),f=2*(e.x-t.x)*s/(n*n);return[{x:u,y:d-f},{x:h,y:d+f}]}return[]}(e,t);if(2!==u.length)return[];const[h,d]=u,f=Math.atan2(h.y-t.y,h.x-t.x),p=Math.atan2(d.y-t.y,d.x-t.x),g=Math.max(o,Math.min(s,f<0?f+Ae:f)),m=Math.max(o,Math.min(s,p<0?p+Ae:p)),y=Math.min(g,m),b=g===m?Ae:Math.max(g,m),v=[o];o<y&&y<s&&v.push(y),o<b&&b<s&&v.push(b),v.push(s);const x=n?xs:vs,w=[];for(let M=0;M<v.length-1;M++){const t=v[M],n=v[M+1],o=(t+n)/2;x(e,{x:i+a*Math.cos(o),y:r+a*Math.sin(o),r:0})&&w.push({x:i,y:r,r:a,from:t,to:n})}return w}function Ms(e,t){let n=[t];for(let i=0;i<e.length;i++){const t=e[i],r=[];for(let e=0;e<n.length;e++){const i=ws(t,n[e]);r.push(...i)}n=r}return n}fs.namespace="[@elastic/charts]";const Ss=1e4;function ks(e,t,n){const i=Math.cos(t)*e,r=Math.sin(t)*e,a=t+n*Math.PI/2;return{x:i+Ss*Math.cos(a),y:r+Ss*Math.sin(a),r:Ss,inside:!1,from:0,to:Ae}}function _s(e,t){return n=>e+n.y0*t}function Os(e,t){return n=>e+(n.y0+1)*t}function Cs(e,t,n){return i=>{const{circlePadding:r,radialPadding:a,fillOutside:o,radiusOutside:s,fillRectangleWidth:l,fillRectangleHeight:c}=e,u=(o?Os:_s)(t,n)(i),h=u+2*r,d=Math.max(h,Os(t,n)(i)-r+(o?s:0)),f=ys((p=i).x0+Math.max(0,p.x1-p.x0-Ae/2)/2);var p;const g=function(e){return ys(e.x1-Math.max(0,e.x1-e.x0-Ae/2)/2)}(i),m={x:0,y:0,r:h,inside:!0,from:0,to:Ae},y={x:0,y:0,r:d,inside:!1,from:0,to:Ae},b=(h+d)/2,v=ks(b,f-a,-1),x=ks(b,g+a,1),w=l/2,M=c/2,S=0===i.x0&&i.x1===Ae&&0===u;return[...[...S&&0===t?[]:[m],y,...S?[]:[v,x]],...w===1/0&&M===1/0?[]:[{x:Ss-w,y:0,r:Ss,inside:!0},{x:-1e4+w,y:0,r:Ss,inside:!0},{x:0,y:Ss-M,r:Ss,inside:!0},{x:0,y:-1e4+M,r:Ss,inside:!0}]]}}function Es(e,t,n,i,r,a){const o=Ss-a*r/2;return{r:Ss+n,x:e+o*Math.cos(Ae/4-i),y:t+o*Math.cos(Ae/2-i)}}function As(e,t,{x0:n,y0:i},r,a,o=1){const s=[],l=(e,{x0:n,y0:i},c)=>{let u=n;const h=e.length;for(let d=0;d<h;d++){const n=r?d:h-d-1,f=e[1===c&&a?(n+1)%h:n],p=t(f);s.push({node:f,x0:u,y0:i,x1:u+p,y1:i+o});const g=$a(f)[La];g.length>0&&l(g,{x0:u,y0:i+o},c+1),u+=p}};return l(e,{x0:n,y0:i},0),s}const Ts=.0256197;function Is(e,t,n){const i=e.reduce(((e,t)=>e+n(t)),0)/t;let r=0;const a=[r],o=e.map(((t,o)=>{const s=n(t)/i;return o<e.length-1&&a.push(r+=s),s}));return{nodes:e,dependentSize:i,sectionSizes:o,sectionOffsets:a}}function js({sectionSizes:e,dependentSize:t}){return e.reduce(((e,n)=>Math.min(e,n/t,t/n)),1)}const Ls={nodes:[],dependentSize:NaN,sectionSizes:[],sectionOffsets:[]},Ps=Object.freeze({horizontal:"horizontal",vertical:"vertical",squarifying:"squarifying"});const zs=(e,t)=>Math.min(e,.33*t);function Ds(e,t,n,i,{x0:r,y0:a,width:o,height:s},l){var c;if(0===e.length)return[];const u=e[0][1][ja]-1,h=null!==(c=l[u])&&void 0!==c?c:null,d=h===Ps.vertical||!h&&o/Ie<=s,f=function(e,t,n,i){let r=-1,a=0,o=Ls,s=Ls,l=1;do{o=s,r=a,s=Is(e.slice(0,l),t,n),a=js(s)}while(l++<e.length&&(i||a>r));return i||a>=r?s:o}(e,d?o:s,t,h),p=function(e,t,n,i){const{nodes:r,dependentSize:a,sectionSizes:o,sectionOffsets:s}=e;return r.map(((e,r)=>{const l=i?t+s[r]:t,c=i?n:n+s[r];return{node:e,x0:l,y0:c,x1:i?l+o[r]:l+a,y1:i?c+a:c+o[r]}}))}(f,r,a,d),{dependentSize:g}=f;return p.concat(...p.map((({node:e,x0:r,y0:a,x1:o,y1:s})=>{const c=$a(e)[La];if(0===c.length)return[];const u=o-r,h=s-a,d=Math.min(i(e),u*Ts*2,h*Ts*2),f=zs(n(e),h),p=u-2*d,g=h-d-f;return Ds(c,(e=>p*g/(u*h)*t(e)),n,i,{x0:r+d,y0:a+f,width:p,height:g},l)}))).concat(Ds(e.slice(p.length),t,n,i,d?{x0:r,y0:a+g,width:o,height:s-g}:{x0:r+g,y0:a,width:o-g,height:s},l))}function Ns(e){return`${e.x0}|${e.y0}`}const Rs=(e,t,n,i,r,a,o,s)=>{const l=i/2*o+o/2-r*a,c=Es(t,n,l,s,o,1),u=Es(t,n,l,s,o,-1),h=Es(t,n,l,s,0,0),d=Ms(e,Object.assign(Object.assign({},c),{from:0,to:Ae}))[0];if(!d)return{rowAnchorX:t,rowAnchorY:n,maximumRowLength:0};const f=Ms(e,Object.assign(Object.assign({},u),{from:0,to:Ae}))[0];if(!f)return{rowAnchorX:t,rowAnchorY:n,maximumRowLength:0};const p=Math.max(d.from,f.from),g=Math.min(d.to,f.to),m=(p+g)/2,y=Math.max(0,g-p);return{rowAnchorX:h.r*Math.cos(m)+h.x,rowAnchorY:h.r*Math.sin(m)+h.y,maximumRowLength:y*Ss}};const Vs=(e,t,n,i,r,a,o,s,l,c)=>{const{top:u,right:h,bottom:d,left:f}="number"==typeof c?{top:c,right:c,bottom:c,left:c}:Object.assign({top:2,right:2,bottom:2,left:2},c),p=u+(o<6?0:Math.max(1,Math.min(2,o/16)));if((e.y1-e.y0-p-d)/i<r)return{rowAnchorX:NaN,rowAnchorY:NaN,maximumRowLength:0};const g=function(e,t,n,i,r,a,o,s,l){switch(t){case da.top:return-(e.y0+n*r+a+s*l);case da.bottom:return-(e.y1-n*(i-1-r)-o-s*l);default:return-((e.y0+e.y1)/2+n*(r+1-i)/2)}}(e,l,r,i,a,p,d,o,.05);return{rowAnchorX:t+f/2-h/2,rowAnchorY:g,maximumRowLength:e.x1-e.x0-f-h}};function $s(e,t){return 0===t.length&&!e.rows.some((e=>isNaN(e.length)||0===e.rowWords.length||e.rowWords.every((e=>0===e.text.length))))}function Fs(){return{id:"",rows:[],fontSize:NaN,fillTextColor:"",rotation:NaN,verticalAlignment:da.middle,leftAlign:!1}}function Bs(e,t,n){return function(i,r,a,o,s,l,c,u){const{maxRowCount:h,fillLabel:d}=i;return(i,f,p)=>{var g;const m=e(p),y=n(p),b=r[p.depth-1]||{},v=u?da.middle:p.depth<r.length?da.bottom:da.top,x=i[Math.min(p.depth,i.length)-1],{fontStyle:w,fontVariant:M,fontFamily:S,fontWeight:k,valueFormatter:_,padding:O,textOpacity:C,clipText:E}=Object.assign(Object.assign(Object.assign(Object.assign({},d),{valueFormatter:l}),b.fillLabel),b.shape),A=Object.assign(Object.assign(Object.assign(Object.assign({},d),d.valueFont),b.fillLabel),null===(g=b.fillLabel)||void 0===g?void 0:g.valueFont),T={fontStyle:w,fontVariant:M,fontWeight:k,fontFamily:S,textColor:p.textColor,textOpacity:C},I=function(e,t,n,i,r,a){return e(a).split(" ").filter(Boolean).map((e=>Object.assign({text:e},i))).concat(n(t(a)).split(" ").filter(Boolean).map((e=>Object.assign(Object.assign({text:e},i),r))))}(o,s,_,T,A,p),[j,L]=f;return Object.assign(Object.assign({},function(e,t,n,i,r,a,o,s,l,c,u,h,d,f){const p=function(e,t,n,i,r,a,o,s,l,c,u,h,d){return function(f,p){let g=f;const m=function(e){return e/4}(p),y=e(p,u).map((({width:e,emHeightDescent:t,emHeightAscent:n},i)=>Object.assign(Object.assign({width:e,verticalOffset:-(t+n)/2,wordBeginning:NaN},u[i]),{fontSize:p}))),b=p;let v=0,x=y.slice(),w=!1;for(;++v<=h&&!w;){x=y.slice(),g={id:Ns(c),fontSize:p,fillTextColor:"",rotation:t,verticalAlignment:n,leftAlign:i,clipText:d,rows:[...new Array(v)].map((()=>({rowWords:[],rowAnchorX:NaN,rowAnchorY:NaN,maximumLength:NaN,length:NaN}))),container:r};let e=0;for(;e<v;){const i=g.rows[e],c=i.rowWords,{maximumRowLength:u,rowAnchorX:h,rowAnchorY:f}=a(r,o,s,v,b,e,p,t,n,l);i.rowAnchorX=h,i.rowAnchorY=f,i.maximumLength=u;let y=0,w=!0;for(;x.length>0&&w;){const[e]=x,t=y;y+=e.width+m,d||y<=i.maximumLength?(c.push(Object.assign(Object.assign({},e),{wordBeginning:t})),i.length=y,x.shift()):w=!1}e++}w=$s(g,x)}return{rowSet:g,completed:0===x.length}}}(i,r,a,o,s,l,c,u,h,d,e,t,f),g=n.length-1,m=e=>e+(p(Fs(),n[e]).completed?0:g+1),y=sa(m,g,g,oa);if(!(y>=0))return Fs();const{rowSet:b,completed:v}=p(Fs(),n[y]);return Object.assign(Object.assign({},b),{rows:b.rows.filter((e=>v&&!isNaN(e.length)))})}(I,h,x,a,y,v,c,m,t,j,L,O,p,E)),{fillTextColor:p.textColor})}}}function Hs(e,t,n){const i=Bs(e,t,n);return function(e,t,n,r,a,o,s,l,c,u){const h=[];for(let i=0;i<=s.length;i++){const{minFontSize:e,maxFontSize:t,idealFontSizeJump:n}=Object.assign(Object.assign({},o),i<s.length&&s[i].fillLabel),r=t/e,a=Math.round((d=n,f=r,Math.log(f)/Math.log(d))),l=Math.pow(r,1/a),c=[];for(let i=0;i<=a;i++){const t=Math.round(e*Math.pow(l,i));c.includes(t)||c.push(t)}h.push(c)}var d,f;const p=i(o,s,e,t,n,r,c,u);return a.map(((e,t)=>({node:e,origin:l[t]}))).sort(((e,t)=>t.node.value-e.node.value)).reduce((({rowSets:e,fontSizes:t},{node:n,origin:i})=>{const r=p(t,i,n),a=n.depth-1;return{rowSets:[...e,r],fontSizes:t.map(((e,t)=>{var n,i;return isNaN(r.fontSize)||t!==a||(null===(i=null===(n=s[a])||void 0===n?void 0:n.fillLabel)||void 0===i?void 0:i.maximizeFontSize)?e:e.filter((e=>e<=r.fontSize))}))}}),{rowSets:[],fontSizes:h}).rowSets}}function Ws(e,t,n,i,r,a,o,s,l,c,u,h,d){const{linkLabel:f,sectorLineStroke:p}=i,g=r.reduce(((e,t)=>Math.max(e,t.depth)),0),m=Math.sin(f.stemAngle)*f.minimumStemLength,y=f.fontSize+f.spacing,{contrastTextColor:b,strokeColor:v}=function(e,t,n){const i=Zt(n)?n:"rgba(255, 255, 255, 0)";return{contrastTextColor:n?Kt(e,i):e,strokeColor:n?Kt(t,i):void 0}}(f.textColor,p,d),x=Object.assign(Object.assign({},f),{textColor:b}),w=Object.assign(Object.assign(Object.assign({},f),f.valueFont),{textColor:b}),M=r.filter((e=>e.depth===g)).sort(((e,t)=>Math.abs(t.x0-t.x1)-Math.abs(e.x0-e.x1))).slice(0,f.maxCount).sort(Us).map(function({linkLabel:e,anchorRadius:t,currentY:n,rowPitch:i,yRelativeIncrement:r,rawTextGetter:a,maxTextLength:o,valueFormatter:s,valueGetter:l,measure:c,rectWidth:u,rectHeight:h,diskCenter:d}){const f=e,p=Object.assign(Object.assign({},f),e.valueFont);return function(g){const m=ys((g.x0+g.x1)/2),y=m<Ae/2?1:-1,b=Ae/4<m&&m<3*Ae/4?0:1,v=b?1:-1,x=Math.cos(m),w=Math.sin(m),M=x*t,S=w*t,k=x*(t+e.radiusPadding),_=w*(t+e.radiusPadding),O=k,C=_,E=b+(1-y),A=y*_,T=Math.max(n[E]+i,A+r,i/2);n[E]=T;const I=y*T,j=k+y*v*I-v*A,L=I,P=j+v*(e.horizontalStemLength+e.gap),z=[P,L],D=[[M,S],[O,C],[j,L],[j+v*e.horizontalStemLength,L]],N=s(l(g)),R=function(e,t,n){return e(t,[n])[0].width}(c,e.fontSize,Object.assign(Object.assign({},p),{text:N})),V=R+2*e.fontSize,$=fa(a(g),o),F=Math.max(0,b?u-d.x-P-V:d.x+P-V),{text:B,width:H,verticalOffset:W}=e.fontSize/2<=I+d.y&&I+d.y<=h-e.fontSize/2?function(e,t,n,i,r){const a=t.length,o=sa((n=>e(i,[Object.assign(Object.assign({},r),{text:t.slice(0,Math.max(0,n))})])[0].width),a,n,oa),s=o<2&&a>=2?"":fa(t,o),{width:l,emHeightAscent:c,emHeightDescent:u}=e(i,[Object.assign(Object.assign({},r),{text:s})])[0];return{width:l,verticalOffset:-(u+c)/2,text:s}}(c,$,F,e.fontSize,f):{text:"",width:0,verticalOffset:0};return{linkLabels:D,translate:z,text:B,valueText:N,width:H,valueWidth:R,verticalOffset:W,textAlign:b?"left":"right"}}}({linkLabel:f,anchorRadius:o,currentY:a,rowPitch:y,yRelativeIncrement:m,rawTextGetter:s,maxTextLength:u,valueFormatter:c,valueGetter:l,measure:n,rectWidth:e,rectHeight:t,diskCenter:h})).filter((({text:e})=>""!==e));return{linkLabels:M,valueFontSpec:w,labelFontSpec:x,strokeColor:v}}function Us(e,t){const n=ms(e.x0,e.x1),i=ms(t.x0,t.x1);return Math.min(Math.abs(n-Ae/4),Math.abs(n-3*Ae/4))-Math.min(Math.abs(i-Ae/4),Math.abs(i-3*Ae/4))}const Ys=e=>e===To.mosaic,Gs=e=>e===To.treemap,qs=e=>e===To.sunburst,Xs=e=>e===To.icicle,Zs=e=>e===To.flame,Ks=(e,t)=>{return n=e.partitionLayout,(Zs(n)||Xs(n))&&t.every((t=>{var n,i,r;return null!==(i=null===(n=t.fillLabel)||void 0===n?void 0:n.clipText)&&void 0!==i?i:null===(r=e.fillLabel)||void 0===r?void 0:r.clipText}));var n};function Qs(e){return $a(e).depth>1?1:[0,2][$a(e).depth]}function Js(e){return[(e.x0+e.x1)/2,(e.y0+e.y1)/2]}const el=e=>e.y1px;const tl=(e,t,n,i,r,a,o,s)=>{const l=t.reduce(((e,t)=>e+qa(t)),0);switch(e){case To.sunburst:const u=Ae/l,h=e=>u*qa(e);return As(t,h,{x0:0,y0:-1},a,o);case To.treemap:case To.mosaic:const d=i*r/l,f=e=>d*qa(e);return Ds(t,f,(c=n,e=>$a(e).depth>0?c:Qs(e)),Qs,{x0:0,y0:0,width:i,height:r},Ys(e)?[Ps.vertical,Ps.horizontal]:[]);case To.icicle:case To.flame:const p=Xs(e),g=i/l,m=e=>g*qa(e),y=r/(s-1),b=As(t,m,{x0:0,y0:-y},!0,!1,y);return p?b:b.map((e=>{var{y0:t,y1:n}=e,i=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["y0","y1"]);return Object.assign({y0:r-n,y1:r-t},i)}));default:return(e=>null!=e?e:[])(e)}var c};function nl(e,t,n,i,r,a,o,s,l,c,u,h){var d;const{width:f,height:p,emptySizeRatio:g,outerSizeRatio:m,fillOutside:y,linkLabel:b,clockwiseSectors:v,specialFirstInnermostSector:x,minFontSize:w,partitionLayout:M,sectorLineWidth:S}=t,{marginLeftPx:k,marginTopPx:_,panelInnerWidth:O,panelInnerHeight:C}=h,E=Gs(M),A=Ys(M),T=qs(M),I=Xs(M),j=Zs(M),L=Ks(t,n),P=qs(M)?{x:k+O/2,y:_+C/2}:{x:k,y:_};if(!(f>0&&p>0&&0!==s.length))return ds(t,P);const z=([,{children:e,path:t}])=>e.length>0?e.reduce(((e,t)=>Math.max(e,z(t))),0):t.length,D=z(s[0])-2,N=tl(M,s,l,O,C,v,x,D).filter((e=>{const t=$a(e.node).depth-1,i=n[t];return!i||!i.showAccessor||i.showAccessor(Va(e.node))})),R=Math.min(O,C-(h.panelTitle.length>0?32:0)),V=Math.min(m*R,R-S)/2,$=V-(1-g)*V,F=N.reduce(((e,t)=>Math.max(e,$a(t.node).depth)),0),B=(V-$)/F,H=function(e,t,n){return({node:i,x0:r,x1:a,y0:o,y1:s})=>({dataName:Va(i),depth:Fa(i),value:Ba(i),[Lo]:Ha(i),sortIndex:Wa(i),path:Ua(i),x0:r,x1:a,y0:o,y1:s,y0px:e?o:t+o*n,y1px:e?s:t+s*n,yMidPx:e?(o+s)/2:t+(o+s)/2*n})}(!T,$,B),W=function(e,t,n,i,r,a,o,s,l,c){return e.map((e=>{const u=t[e.depth-1],h=u&&u.shape&&u.shape.fillColor,d=null!=h?h:"rgba(128,0,0,0.5)",f="function"==typeof d?d(e,e.sortIndex,e[Lo].children):d,{r:p,g:g,b:m,opacity:y}=Ft(f),b=Ht(p,g,m,1*y),v=n,x=i,w=e.y1px-e.y0px<8,{textColor:M,textInvertible:S,textContrast:k}=Object.assign(Object.assign({},s),u.fillLabel),_=!l&&w?"transparent":ps(M,S,k,b,c);return Object.assign({index:a,innerIndex:o,smAccessorValue:r,strokeWidth:v,strokeStyle:x,fillColor:b,textColor:_},e)}))}(N.slice(1).map(H),n,t.sectorLineWidth,t.sectorLineStroke,h.smAccessorValue,h.index,h.innerIndex,t.fillLabel,T,c),U=W.filter((e=>{const t=e.x1-e.x0;return T?(t<0?Ae+t:t)*(e=>e.yMidPx)(e)>Math.max(w,b.maximumSection):e.x1-e.x0>w&&e.y1px-e.y0px>w})),Y=y&&T?U:[],G=U.map(T?function(e){return t=>{const n=(t.x0+t.x1)/2,i=e?9:1,r=10-i,a=(i*t.y0px+r*el(t))/10;return[Math.cos(ys(n))*a,Math.sin(ys(n))*a]}}(y):Js),q=o===Po?a:r,X=T?Hs(Cs(t,$,B),Rs,(Z=t.horizontalTextEnforcer,K=t.horizontalTextAngleThreshold,e=>{let t=ys((e.x0+e.x1)/2);return Math.abs(e.x1-e.x0)>K&&Z>0&&(t*=1-Z),Ae/4<t&&t<3*Ae/4&&(t=gs(t-Ae/2)),t})):L?()=>[]:Hs(function(e,t){return function(n){return n.depth<e&&null!==t?{x0:n.x0,y0:n.y0px,x1:n.x1,y1:n.y0px+zs(t,n.y1px-n.y0px)}:{x0:n.x0,y0:n.y0px,x1:n.x1,y1:n.y1px}}}(F,E||A?l:null),Vs,(()=>0));var Z,K;const Q=X(e,i,o,q,U,t,n,G,!T,!(E||A)),J=function(e,t,n){return e.map(((e,i)=>{if(!t[i].rows.reduce(((e,t)=>e+t.rowWords.length),0))return{points:[]};const r=el(e),a=ys(ms(e.x0,e.x1)),o=Math.cos(a),s=Math.sin(a);return{points:[[o*r,s*r],[o*(r+n),s*(r+n)]]}})).filter((({points:e})=>e.length>1))}(Y,Q,b.radiusPadding),ee=[-p,-p,-p,-p],te=Ws(O,C,e,t,y||E||A||I||j?[]:W.filter((e=>{const t=Ns(e),n=Q.find((e=>e.id===t));return!(n&&n.rows.length>0)})),ee,V,i,o,q,t.linkLabel.maxTextLength,{x:f*h.left+O/2,y:p*h.top+C/2},c),ne=T?(e,t)=>W.filter((({x0:n,y0px:i,x1:r,y1px:a})=>{const o=(Math.atan2(t,e)+Ae/4+Ae)%Ae,s=Math.sqrt(e*e+t*t);return n<=o&&o<=r&&i<=s&&s<=a})):(e,t,{currentFocusX0:n,currentFocusX1:i})=>W.filter((({x0:r,y0px:a,x1:o,y1px:s})=>{const l=f/(i-n),c=Math.max((r-n)*l,0),u=Math.min((o-n)*l,f);return c<=e&&e<u&&a<t&&t<=s}));return{partitionLayout:null!==(d=null==t?void 0:t.partitionLayout)&&void 0!==d?d:Vo.partitionLayout,smAccessorValue:h.smAccessorValue,panelTitle:h.panelTitle,index:h.index,innerIndex:h.innerIndex,width:h.width,height:h.height,top:h.top,left:h.left,innerRowCount:h.innerRowCount,innerColumnCount:h.innerColumnCount,innerRowIndex:h.innerRowIndex,innerColumnIndex:h.innerColumnIndex,marginLeftPx:h.marginLeftPx,marginTopPx:h.marginTopPx,panelInnerWidth:h.panelInnerWidth,panelInnerHeight:h.panelInnerHeight,config:t,layers:n,diskCenter:P,quadViewModel:W,rowSets:Q,linkLabelViewModels:te,outsideLinksViewModel:J,pickQuads:ne,outerRadius:V}}function il(e){return"function"==typeof e?e:zo[e]}function rl(e,t,n,i,r,a){const{width:o,height:s}=t,{layers:l,topGroove:c,config:u}=e,h=document.createElement("canvas").getContext("2d"),d=Object.assign(Object.assign({},u),{width:o,height:s}),f=Nn(Vo,d);if(!h)return ds(f,{x:o/2,y:s/2});const p=il(e.valueGetter);return nl(ha(h),f,l,function(e){return t=>`${(e[t[ja]-1].nodeLabel||On)(t.dataName)}`}(l),e.valueFormatter,e.percentFormatter,p,n,c,i,0,a)}const al=fn([ui],(e=>li(e,Ce.Partition,Zn.Series))),ol=fn([ui],(e=>li(e,Ce.Global,Zn.SmallMultiples))),sl=fn([ol],(e=>1===e.length?e:void 0));function ll(e,t){return(n,i)=>t(e(n),e(i))}const cl=(e,t)=>e-t,ul=ll(qa,((e,t)=>t-e)),hl=ll(qa,cl);function dl(e,t,n,i,r){const a=Xa,o=e.filter((e=>{const n=t(e);return Number.isFinite(n)&&n>0}));return o.reduce(((e,n)=>a.reducer(e,t(n))),a.identity())<=0?[]:Ga(function(e,t,{reducer:n,identity:i},r){const a={globalAggregate:NaN},o=r.reduce(((r,o,s)=>{const l=e.length;let c=r;return e.forEach(((e,r)=>{var u,h,d;const f=e(o,s),p=r===l-1,g=c.get(f),m=null!==(u=null==g?void 0:g[Pa])&&void 0!==u?u:[],y=null!==(h=null==g?void 0:g[La])&&void 0!==h?h:new Map,b=null!==(d=null==g?void 0:g[Ta])&&void 0!==d?d:i(),v=n(b,t(o));c.set(f,Object.assign({[Ta]:v,[Ia]:a,[Pa]:[...m,s],[ja]:r},!p&&{[La]:y})),y&&(c=y)})),r}),new Map);return void 0!==o.get(Ra)&&(a.globalAggregate=o.get(Ra)[Ta]),o}(n,t,a,o),i,r)}function fl(e,t,n,i,r=i,a){return dl(e,t,[()=>Ra,...n.map((({groupByRollup:e})=>e))],[null,...n.map((o=r,({sortPredicate:e},t)=>e||(Gs(o)||qs(o)?ul:Ys(o)?2===t?hl:ul:null)))],a);var o}function pl(e,t,n,i,r=0,a=new Map){for(let o=0;o<n.length;o++){const s=n[o],[l,c]=s,{value:u,path:h,[La]:d}=c;if(null!=l){const e=new Map,n=t?t(u):u;e.set(l,n),a.set(h.map((({index:e})=>e)).join("__"),e)}r<i&&pl(e,t,d,i,r+1,a)}return a}const gl=fn([ui],(e=>li(e,Ce.Global,Zn.IndexOrder)));const ml=fn([al,ol,gl],((e,t,n)=>e.length>0?function(e,t,n){var i,r,a,o;const{data:s,valueAccessor:l,layers:c,config:u,smallMultiples:h}=e,d=t.find((e=>e.id===h)),f={horizontalPanelPadding:d?null!==(r=null===(i=d.style)||void 0===i?void 0:i.horizontalPanelPadding)&&void 0!==r?r:Ka:{outer:0,inner:0},verticalPanelPadding:d?null!==(o=null===(a=d.style)||void 0===a?void 0:a.verticalPanelPadding)&&void 0!==o?o:Ka:{outer:0,inner:0}},p=n.find((e=>e.id===(null==d?void 0:d.splitHorizontally)||e.id===(null==d?void 0:d.splitVertically)||e.id===(null==d?void 0:d.splitZigzag)));if(p){const{by:t,sort:n,format:i=e=>String(e)}=p,r={id:e.id,chartType:e.chartType,specType:Zn.Series},a=s.reduce(((e,n)=>{const i=t(r,n),a=e.get(i),o=null!=a?a:[];return a||e.set(i,o),o.push(n),e}),new Map);return Array.from(a).sort(Ho(n)).map((([e,t],n)=>({name:i(e),smAccessorValue:e,style:f,tree:fl(t,l,c,Ro.partitionLayout.dflt,u.partitionLayout,[{index:n,value:String(e)}])})))}return[{name:"",smAccessorValue:"",style:f,tree:fl(s,l,c,Ro.partitionLayout.dflt,u.partitionLayout,[{index:0,value:"__null_small_multiples_key__"}])}]}(e[0],t,n):[]));function yl(e,t,n){return e*(1-Math.min(1,t+n))}function bl(e,t,{outer:n,inner:i}){return e/(2*n+t+t*i-i)}const vl=fn([ui,al,cs,ml,yi],((e,t,n,i,{background:r})=>{const a=li(e,Ce.Global,Zn.SmallMultiples),o=(null==(s=a[0])?void 0:s.splitHorizontally)?"horizontal":(e=>null==e?void 0:e.splitVertically)(a[0])?"vertical":"zigzag";var s;const{width:l,height:c}=n,u=t.length,h=1/u,d=t.flatMap(((e,t)=>{var a,s,d,f,p,g,m,y;const b=null!==(s=null===(a=e.config.margin)||void 0===a?void 0:a.left)&&void 0!==s?s:Vo.margin.left,v=null!==(f=null===(d=e.config.margin)||void 0===d?void 0:d.right)&&void 0!==f?f:Vo.margin.right,x=yl(l,b,v),w=null!==(g=null===(p=e.config.margin)||void 0===p?void 0:p.top)&&void 0!==g?g:Vo.margin.top,M=null!==(y=null===(m=e.config.margin)||void 0===m?void 0:m.bottom)&&void 0!==y?y:Vo.margin.bottom,S=yl(c,w,M);return i.map((({name:i,smAccessorValue:a,style:s,tree:l},c,d)=>{var f;const p=d.length,g=1*S,m=x*h*g/p,y=Math.sqrt(m),k=Math.max(1,Math.floor(g/y)),_=Math.ceil(d.length/k),O=Math.ceil(d.length/_),C="vertical"===o?d.length:"zigzag"===o?O:1,E="vertical"===o?1:"zigzag"===o?_:d.length,A="vertical"===o?c:"zigzag"===o?Math.floor(c/_):0,T="vertical"===o?0:"zigzag"===o?c%_:c,I=1*("vertical"===o?c/d.length:"zigzag"===o?Math.floor(c/_)/O:0),j=1*("vertical"===o?1/d.length:"zigzag"===o?1/O:1),L=t/u,P=h*("horizontal"===o?c/d.length:"zigzag"===o?c%_/_:0),z=h*("horizontal"===o?1/d.length:"zigzag"===o?1/_:1),{width:D,height:N}=n,R=yl(D,b,v),V=yl(N,w,M),$=bl(R,E,s.horizontalPanelPadding),F=bl(V,C,s.verticalPanelPadding),B=D*b+$*s.horizontalPanelPadding.outer+T*($*(1+s.horizontalPanelPadding.inner)),H=N*w+F*s.verticalPanelPadding.outer+A*(F*(1+s.verticalPanelPadding.inner));return rl(e,n,l,r.color,0,{index:t,innerIndex:c,partitionLayout:null!==(f=e.config.partitionLayout)&&void 0!==f?f:Vo.partitionLayout,panelTitle:String(i),smAccessorValue:a,top:0+I,height:j,left:L+P,width:z,innerRowCount:C,innerColumnCount:E,innerRowIndex:A,innerColumnIndex:T,marginLeftPx:B,marginTopPx:H,panelInnerWidth:$,panelInnerHeight:F})}))}));return 0===d.length?[ds(Vo,{x:h,y:1})]:d}));function xl(e,{left:t,width:n},i){var r;return 0===i.length?{x0:t,x1:t+n}:null!==(r=e.find((({path:e})=>e.length===i.length&&e.every((({value:e},t)=>e===i[t])))))&&void 0!==r?r:{x0:t,x1:t+n}}const wl=fn([vl,cs,e=>e.interactions.drilldown,e=>e.interactions.prevDrilldown],((e,t,n,i)=>e.map((({quadViewModel:e,smAccessorValue:r,index:a,innerIndex:o})=>{const{x0:s,x1:l}=xl(e,t,n),{x0:c,x1:u}=xl(e,t,i);return{currentFocusX0:s,currentFocusX1:l,prevFocusX0:c,prevFocusX1:u,smAccessorValue:r,index:a,innerIndex:o}})))),Ml=([{valueFormatter:e}],t)=>t.flatMap((({quadViewModel:t,layers:n,panelTitle:i})=>t.map((({depth:t,value:r,dataName:a,parent:o,path:s})=>{var l,c,u,h,d,f;const p=null!==(u=null===(c=null===(l=n[t-1])||void 0===l?void 0:l.nodeLabel)||void 0===c?void 0:c.call(l,a))&&void 0!==u?u:a,g=s.length>1?s[s.length-2].value:void 0,m=t>1&&g?null!==(f=null===(d=null===(h=n[t-2])||void 0===h?void 0:h.nodeLabel)||void 0===d?void 0:d.call(h,g))&&void 0!==f?f:s[s.length-1].value:"none";return{panelTitle:i,depth:t,label:p,parentName:m,percentage:`${Math.round(r/o[Ia].globalAggregate*100)}%`,value:r,valueText:e?e(r):`${r}`}})))),Sl=fn([al,vl],((e,t)=>0===e.length?{hasMultipleLayers:!1,isSmallMultiple:!1,data:[]}:{hasMultipleLayers:e[0].layers.length>1,isSmallMultiple:t.length>1,data:Ml(e,t)})),kl={a11ySettings:wa,partitionData:{isSmallMultiple:!1,hasMultipleLayers:!1,data:[]},debug:!1},_l=n.memo(o((e=>vi(e)!==bi.Initialized?kl:{a11ySettings:Ma(e),partitionData:Sl(e),debug:hi(e).debug}))((({a11ySettings:e,partitionData:t,debug:r})=>{const[a,o]=n.useState(1),s=n.createRef(),{tableCaption:l}=e,c=20*a,{isSmallMultiple:u,data:h,hasMultipleLayers:d}=t,f=h.length,p=c<f;let g=3;const m=d&&u?g+=3:d||u?g+=2:g;return i.createElement("div",{className:`echScreenReaderOnly ${r?"echScreenReaderOnlyDebug":""} echScreenReaderTable`},i.createElement("table",null,i.createElement("caption",null,Pn(l)?"The table "+(p?`represents only ${c} of the ${f} data points`:`fully represents the dataset of ${f} data point${f>1?"s":""}`):l),i.createElement("thead",null,i.createElement("tr",null,u&&i.createElement("th",{scope:"col"},"Small multiple title"),d&&i.createElement("th",{scope:"col"},"Depth"),i.createElement("th",{scope:"col"},"Label"),d&&i.createElement("th",{scope:"col"},"Parent"),i.createElement("th",{scope:"col"},"Value"),i.createElement("th",{scope:"col"},"Percentage"))),i.createElement("tbody",null,t.data.slice(0,c).map((({panelTitle:e,depth:t,label:n,parentName:r,valueText:a,percentage:o},l)=>i.createElement("tr",{key:`row--${l}`,ref:c===l?s:void 0,tabIndex:-1},u&&i.createElement("td",null,e),d&&i.createElement("td",null,t),i.createElement("th",null,n),d&&i.createElement("td",null,r),i.createElement("td",null,a),i.createElement("td",null,o))))),p&&i.createElement("tfoot",null,i.createElement("tr",null,i.createElement("td",{colSpan:m},i.createElement("button",{type:"submit",onClick:()=>(o(a+1),void(s.current&&s.current.focus())),tabIndex:-1},"Click to show more data"))))))}))),Ol=({bandLabels:e,labelId:t,firstValue:n})=>e.length>1?i.createElement("dl",{className:"echScreenReaderOnly echGoalDescription",key:`goalChart--${t}`},e.map((({value:t,text:r},a)=>{const o=e[a-1];return void 0!==o?i.createElement(i.Fragment,null,i.createElement("dt",{key:`dt--${a}`},`${o.value} - ${t}`),i.createElement("dd",{key:`dd--${a}`},`${r[a]}`)):i.createElement(i.Fragment,null,i.createElement("dt",{key:`dt--${a}`},`${n} - ${t}`),i.createElement("dd",{key:`dd--${a}`},`${r[a]}`))}))):null,Cl="CHART_RENDERED";function El(){return{type:Cl}}function Al(e,t){e.save(),t(e),e.restore()}function Tl(e,t,n){Al(e,(e=>{e.clearRect(-t,-n,2*t,2*n)}))}function Il(e,t){t.forEach((t=>t(e)))}function jl(e,t,n,i=!1,r){Al(e,(e=>{const{length:a}=t,{width:o,height:s,y:l}=n;if(e.beginPath(),i)t.forEach((([t,n])=>{e.rect(t,l,n-t,s)}));else{if(a>0){e.rect(0,-.5,t[0][0],s);const n=t[a-1][1];e.rect(n,l,o-n,s)}if(a>1)for(let n=1;n<a;n++){const[,i]=t[n-1],[r]=t[n];e.rect(i,l,r-i,s)}}e.clip(),r(e)}))}function Ll(e,t,n){return t in e&&e[t]||n}let Pl=class extends i.Component{constructor(e){super(e),this.ctx=null,this.devicePixelRatio=window.devicePixelRatio}componentDidMount(){this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}componentDidUpdate(){this.ctx||this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}handleMouseMove(e){const{initialized:t,chartContainerDimensions:{width:n,height:i},forwardStageRef:r,geometries:a}=this.props;if(!r.current||!this.ctx||!t||0===n||0===i)return;const o=a.pickQuads,s=r.current.getBoundingClientRect(),{chartCenter:l}=a;return o(e.clientX-s.left-l.x,e.clientY-s.top-l.y)}render(){const{initialized:e,chartContainerDimensions:{width:t,height:n},forwardStageRef:r,a11ySettings:a,bandLabels:o,firstValue:s}=this.props;return e&&0!==t&&0!==n?i.createElement("figure",{"aria-labelledby":a.labelId,"aria-describedby":a.descriptionId},i.createElement("canvas",{ref:r,className:"echCanvasRenderer",width:t*this.devicePixelRatio,height:n*this.devicePixelRatio,onMouseMove:this.handleMouseMove.bind(this),style:{width:t,height:n},role:"presentation"},i.createElement(Aa,null),i.createElement(Ol,Object.assign({bandLabels:o,firstValue:s},a)))):null}tryCanvasContext(){const e=this.props.forwardStageRef.current;this.ctx=e&&e.getContext("2d")}drawCanvas(){if(this.ctx){const{width:e,height:t}=this.props.chartContainerDimensions;!function(e,t,{config:n,bulletViewModel:i,chartCenter:r}){const a=Ll(n,"fontFamily","sans-serif"),o=Ll(n,"actualFillColor","black"),s=Ll(n,"targetFillColor","black"),l=Ll(n,"tickColor","darkgrey"),c=Ll(n,"tickTextColor","black"),u=Ll(n,"labelsColor","black");Al(e,(e=>{e.scale(t,t),e.textAlign="center",e.textBaseline="middle",e.translate(r.x,r.y),e.scale(1,-1);const{subtype:h,lowestValue:d,highestValue:f,base:p,target:g,actual:m,bands:y,ticks:b,labelMajor:v,labelMinor:x,centralMajor:w,centralMinor:M}=i,S=h===Kr.Goal,k=h===Kr.VerticalBullet,_=[d,f],O=Object.assign(Object.assign(Object.assign(Object.assign({base:{value:p}},Object.fromEntries(y.map((({value:e},t)=>[`qualitative_${t}`,{value:e}])))),{target:{value:g},actual:{value:m},labelMajor:{value:_[S||!k?0:1],text:v},labelMinor:{value:_[S||!k?0:1],text:x}}),Object.assign({},...b.map((({value:e,text:t},n)=>({[`tick_${n}`]:{value:e,text:t}}))))),S?{centralMajor:{value:0,text:w},centralMinor:{value:0,text:M}}:{}),C=Math.min(n.width,n.height),E=.9*Math.min(S?360:500,S?C:k?n.height:n.width),A=Math.min(32,.1*E),T=A*Math.pow(1/Ie,3),I=-T/2-A/2,j=Math.min(24,E/25),L=Math.min(32,E/18),P=Math.min(38,E/14),z=[...i.bands.map(((e,t)=>({order:0,landmarks:{from:t?"qualitative_"+(t-1):"base",to:`qualitative_${t}`},aes:{shape:"line",fillColor:e.fillColor,lineWidth:A}}))),{order:1,landmarks:{from:"base",to:"actual"},aes:{shape:"line",fillColor:o,lineWidth:T}},...g?[{order:2,landmarks:{at:"target"},aes:{shape:"line",fillColor:s,lineWidth:A/Ie}}]:[],...i.ticks.map(((e,t)=>({order:3,landmarks:{at:`tick_${t}`},aes:{shape:"line",fillColor:l,lineWidth:T,axisNormalOffset:I}}))),...i.ticks.map(((e,t)=>({order:4,landmarks:{at:`tick_${t}`},aes:{shape:"text",textAlign:k?"right":"center",textBaseline:k?"middle":"top",fillColor:c,fontShape:{fontStyle:"normal",fontVariant:"normal",fontWeight:"500",fontFamily:a},axisNormalOffset:-A}}))),{order:5,landmarks:{at:"labelMajor"},aes:{shape:"text",axisNormalOffset:0,axisTangentOffset:S||!k?0:2*L,textAlign:k?"center":"right",textBaseline:"bottom",fillColor:u,fontShape:{fontStyle:"normal",fontVariant:"normal",fontWeight:"900",fontFamily:a}}},{order:5,landmarks:{at:"labelMinor"},aes:{shape:"text",axisNormalOffset:0,axisTangentOffset:S||!k?0:2*L,textAlign:k?"center":"right",textBaseline:"top",fillColor:u,fontShape:{fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontFamily:a}}},...S?[{order:6,landmarks:{at:"centralMajor"},aes:{shape:"text",textAlign:"center",textBaseline:"bottom",fillColor:u,fontShape:{fontStyle:"normal",fontVariant:"normal",fontWeight:"900",fontFamily:a}}},{order:6,landmarks:{at:"centralMinor"},aes:{shape:"text",textAlign:"center",textBaseline:"top",fillColor:u,fontShape:{fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontFamily:a}}}]:[]],D=z.reduce(((e,t)=>Math.max(e,Ll(t.aes,"lineWidth",0))),0),N=.5*E-D/2;Il(e,[e=>Tl(e,2e5,2e5),e=>Al(e,(e=>{const t=-E/2+(S||k?0:E/2),i=E/2+(!S&&k?-2*L:0),r=(t+i)/2,a=i-t,o=_[1]-_[0],s=e=>t+a*(e-_[0])/o,{angleStart:l,angleEnd:c}=n,u=c-l,h=e=>l+u*(e-_[0])/o,d=l>c;z.slice().sort(((e,t)=>e.order-t.order)).forEach((({landmarks:t,aes:n})=>{const i=Ll(t,"at",""),a=Ll(t,"from",""),o=Ll(t,"to",""),l=Ll(n,"textAlign",""),c=Ll(n,"textBaseline",""),u=Ll(n,"fontShape",""),f=Ll(n,"axisNormalOffset",0),p=Ll(n,"axisTangentOffset",0),g=Ll(n,"lineWidth",0),m=Ll(n,"fillColor","");Al(e,(e=>{if(e.beginPath(),S){if("line"===n.shape)if(e.lineWidth=g,e.strokeStyle=m,i)e.arc(r,0,N+f,h(O[i].value)+Math.PI/360,h(O[i].value)-Math.PI/360,!0);else{const t=O[a].value<O[o].value;e.arc(r,0,N,h(O[a].value),h(O[o].value),d===t)}else if("text"===n.shape){const t="label"===i.slice(0,5),r="central"===i.slice(0,7);e.fillStyle=n.fillColor,e.textAlign="center",e.textBaseline=t||r?c:"middle",e.font=ua(u,t?L:r?P:j),e.scale(1,-1);const a=h(O[i].value);t?e.translate(0,N):r||e.translate((N-Ie*A)*Math.cos(a),-(N-Ie*A)*Math.sin(a)),e.fillText(O[i].text,0,0)}}else{e.translate(k?f:p,k?p:f);const t=O[i]&&s(O[i].value);if("line"===n.shape)if(e.lineWidth=g,e.strokeStyle=n.fillColor,i){const n=t-1,i=t+1;e.moveTo(k?0:n,k?n:0),e.lineTo(k?0:i,k?i:0)}else{const t=s(O[a].value),n=s(O[o].value);e.moveTo(k?0:t,k?t:0),e.lineTo(k?0:n,k?n:0)}else"text"===n.shape&&(e.textAlign=l,e.textBaseline=c,e.fillStyle=n.fillColor,e.font=ua(u,j),e.scale(1,-1),e.translate(k?0:t,k?-t:0),e.fillText(O[i].text,0,0))}e.stroke()}))}))}))])}))}(this.ctx,this.devicePixelRatio,Object.assign(Object.assign({},this.props.geometries),{config:Object.assign(Object.assign({},this.props.geometries.config),{width:e,height:t})}))}}};Pl.displayName="Goal";const zl={initialized:!1,geometries:aa(),chartContainerDimensions:{width:0,height:0,left:0,top:0},a11ySettings:wa,bandLabels:[],firstValue:0},Dl=o((e=>vi(e)!==bi.Initialized?zl:{initialized:!0,geometries:ga(e),chartContainerDimensions:e.parentDimensions,a11ySettings:Ma(e),bandLabels:ba(e),firstValue:va(e)}),(e=>s({onChartRendered:El},e)))(Pl);function Nl(e){const t=li(e.specs,Ce.Goal,Zn.Series);return t.length>0?t[0]:null}const Rl=fn([Nl],(e=>{var t;return`${null!==(t=null==e?void 0:e.subtype)&&void 0!==t?t:"goal"} chart`}));const Vl=fn([ga,function(e){return e.interactions.pointer.current.position}],((e,t)=>{const n=e.pickQuads,{chartCenter:i}=e;return n(t.x-i.x,t.y-i.y)})),$l=fn([Vl],(e=>e.map((e=>{const t=[];return t.push({smAccessorValue:"",groupByRollup:"Actual",value:e.actual,sortIndex:0,path:[],depth:0}),t.reverse()})))),Fl=Object.freeze({header:null,values:[]}),Bl=fn([Nl,Vl],((e,t)=>{if(!e)return Fl;const n={header:null,values:[]};return t.forEach((t=>{n.values.push({label:"Actual",color:"white",isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:e.id,key:e.id},value:t.actual,formattedValue:`${t.actual}`,datum:t.actual})})),n})),Hl=fn([hi,Bl],((e,t)=>Ei(e)!==ei.None&&t.values.length>0)),Wl=e=>(t,n,i,r)=>{if(!t)return;if(!i.onElementClick)return;if(r.length>0&&ci(e.click,n)&&i&&i.onElementClick){const e=r.map((e=>[e,{specId:t.id,key:`spec{${t.id}}`}]));i.onElementClick(e)}e.click=n},Ul=e=>(t,n,i)=>{if(!t)return;if(!i.onElementOut)return;const r=n.length;null!==e.pickedShapes&&e.pickedShapes>0&&0===r&&i.onElementOut(),e.pickedShapes=r};const Yl=e=>(t,n,i)=>{if(t&&i.onElementOver){if(function(e=[],t){if(0!==t.length)return t.length!==e.length||!t.every(((t,n)=>{const i=e[n];return null!==i&&i.length===t.length&&t.every(((e,t)=>{const n=i[t];return!!n&&e.value===n.value&&e.groupByRollup===n.groupByRollup}))}))}(e.pickedShapes,n)){const e=n.map((e=>[e,{specId:t.id,key:`spec{${t.id}}`}]));i.onElementOver(e)}e.pickedShapes=n}};function Gl(e){return e.interactions.pointer.lastClick}const ql=new Map,Xl=[],Zl=[];class Kl{constructor(){this.chartType=Ce.Goal,this.onElementClickCaller=function(){const e={click:null};let t=null;return n=>{null===t&&n.chartType===Ce.Goal&&(t=fn([Nl,Gl,hi,$l],Wl(e))),t&&t(n)}}(),this.onElementOverCaller=function(){const e={pickedShapes:[]};let t=null;return n=>{null===t&&n.chartType===Ce.Goal&&(t=fn([Nl,$l,hi],Yl(e))),t&&t(n)}}(),this.onElementOutCaller=function(){const e={pickedShapes:null};let t=null;return n=>{null===t&&n.chartType===Ce.Goal&&(t=fn([Nl,$l,hi],Ul(e))),t&&t(n)}}()}isInitialized(e){return null!==Nl(e)?bi.Initialized:bi.ChartNotInitialized}isBrushAvailable(){return!1}isBrushing(){return!1}isChartEmpty(){return!1}getLegendItems(){return Xl}getLegendItemsLabels(){return Zl}getLegendExtraValues(){return ql}chartRenderer(e,t){return i.createElement(i.Fragment,null,i.createElement(Zr,{getChartContainerRef:e}),i.createElement(Dl,{forwardStageRef:t}))}getPointerCursor(){return Ee}isTooltipVisible(e){return{visible:Hl(e),isExternal:!1}}getTooltipInfo(e){return Bl(e)}getTooltipAnchor(e){const{position:t}=e.interactions.pointer.current;return{isRotated:!1,x:t.x,width:0,y:t.y,height:0}}eventCallbacks(e){this.onElementOverCaller(e),this.onElementOutCaller(e),this.onElementClickCaller(e)}getChartTypeDescription(e){return Rl(e)}getProjectionContainerArea(){return{width:0,height:0,top:0,left:0}}getMainProjectionArea(){return{width:0,height:0,top:0,left:0}}getBrushArea(){return null}getDebugState(){return{}}}function Ql(e,t,n,i,r=!1){if(n||i){if(n){const a=!r&&i&&i.width>.001?i.width:0,o=t.x+a,s=t.y+a,l=t.width-2*a,c=t.height-2*a;if(Jl(e,{x:o,y:s,width:l,height:c}),e.fillStyle=Wt(n.color),e.fill(),n.texture){const{texture:t}=n;Al(e,(e=>{var n,i,r,a,u;Jl(e,{x:o,y:s,width:l,height:c}),e.clip();const h=jn(null!==(n=t.rotation)&&void 0!==n?n:0),{offset:d}=t;d&&d.global&&e.translate(null!==(i=null==d?void 0:d.x)&&void 0!==i?i:0,null!==(r=null==d?void 0:d.y)&&void 0!==r?r:0),h&&e.rotate(h),d&&!d.global&&e.translate(null!==(a=null==d?void 0:d.x)&&void 0!==a?a:0,null!==(u=null==d?void 0:d.y)&&void 0!==u?u:0),e.fillStyle=t.pattern;const f=e.canvas.clientWidth*e.canvas.clientHeight;e.translate(-f/2,-f/2),e.fillRect(0,0,f,f)}))}}if(i&&i.width>.001){const n=!r&&i&&i.width>.001?i.width/2:0,a=t.x+n,o=t.y+n,s=t.width-2*n,l=t.height-2*n;e.strokeStyle=Wt(i.color),e.lineWidth=i.width,Jl(e,{x:a,y:o,width:s,height:l}),i.dash?e.setLineDash(i.dash):e.lineCap="square",e.stroke()}}}function Jl(e,t){const{x:n,y:i,width:r,height:a}=t;e.beginPath(),e.moveTo(n,i),e.lineTo(n+r,i),e.lineTo(n+r,i+a),e.lineTo(n,i+a),e.lineTo(n,i)}const ec=e=>e.internalChartState?e.internalChartState.getBrushArea(e):null,tc=e=>!!e.internalChartState&&e.internalChartState.isBrushing(e),nc=e=>!!e.internalChartState&&e.internalChartState.isBrushAvailable(e),ic=e=>e.internalChartState?e.internalChartState.getMainProjectionArea(e):{width:0,height:0,left:0,top:0},rc=e=>e.internalChartState?e.internalChartState.getProjectionContainerArea(e):{width:0,height:0,left:0,top:0},ac={r:128,g:128,b:128,opacity:.6};class oc extends i.Component{constructor(e){super(e),this.drawCanvas=()=>{const{brushArea:e,mainProjectionArea:t,fillColor:n}=this.props;if(!this.ctx||!e)return;const{top:i,left:r,width:a,height:o}=e;Al(this.ctx,(e=>{e.scale(this.devicePixelRatio,this.devicePixelRatio),function(e,t,n,i=!0){Al(e,(e=>{if(i){const{x:n,y:i,width:r,height:a}=t;e.beginPath(),e.rect(n,i,r,a),e.clip()}Al(e,(e=>{n(e)}))}))}(e,{x:t.left,y:t.top,width:t.width,height:t.height},(e=>{Tl(e,2e5,2e5),e.translate(t.left,t.top),Ql(e,{x:r,y:i,width:a,height:o},{color:null!=n?n:ac})}))}))},this.ctx=null,this.devicePixelRatio=window.devicePixelRatio,this.canvasRef=i.createRef()}componentDidMount(){this.tryCanvasContext(),this.drawCanvas()}componentDidUpdate(){this.ctx||this.tryCanvasContext(),this.props.initialized&&this.drawCanvas()}tryCanvasContext(){const e=this.canvasRef.current;this.ctx=e&&e.getContext("2d")}render(){const{initialized:e,isBrushAvailable:t,isBrushing:n,projectionContainer:r,zIndex:a}=this.props;if(!e||!t||!n)return this.ctx=null,null;const{width:o,height:s}=r;return i.createElement("canvas",{ref:this.canvasRef,className:"echBrushTool",width:o*this.devicePixelRatio,height:s*this.devicePixelRatio,style:{width:o,height:s,zIndex:a}})}}oc.displayName="BrushTool";const sc=o((e=>vi(e)!==bi.Initialized?{initialized:!1,projectionContainer:{width:0,height:0,left:0,top:0},mainProjectionArea:{top:0,left:0,width:0,height:0},isBrushing:!1,isBrushAvailable:!1,brushArea:null,zIndex:0}:{initialized:e.specsInitialized,projectionContainer:rc(e),mainProjectionArea:ic(e),isBrushAvailable:nc(e),isBrushing:tc(e),brushArea:ec(e),zIndex:e.zIndex}))(oc);function lc(e){return Array.isArray(e)}const cc={gridOrigin:{x:0,y:0},gridLines:{x:[],y:[],stroke:{width:0,color:{r:0,g:0,b:0,opacity:0}}},cells:[],xValues:[],yValues:[],pageSize:0},uc=e=>({config:e||Wo,heatmapViewModel:cc,pickQuads:()=>[],pickDragArea:()=>({cells:[],x:[],y:[],chartType:Ce.Heatmap}),pickDragShape:()=>({x:0,y:0,width:0,height:0}),pickHighlightedArea:()=>({x:0,y:0,width:0,height:0})});function hc(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function dc(e){var t;return 1===e.length&&(t=e,e=function(e,n){return hc(t(e),n)}),{left:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var a=i+r>>>1;e(t[a],n)<0?i=a+1:r=a}return i},right:function(t,n,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var a=i+r>>>1;e(t[a],n)>0?r=a:i=a+1}return i}}}var fc=dc(hc),pc=fc.right,gc=fc.left;function mc(e){return null===e?NaN:+e}function yc(e,t){var n,i,r,a=e.length,o=-1;if(null==t){for(;++o<a;)if(null!=(n=e[o])&&n>=n)for(i=r=n;++o<a;)null!=(n=e[o])&&(i>n&&(i=n),r<n&&(r=n))}else for(;++o<a;)if(null!=(n=t(e[o],o,e))&&n>=n)for(i=r=n;++o<a;)null!=(n=t(e[o],o,e))&&(i>n&&(i=n),r<n&&(r=n));return[i,r]}var bc=Math.sqrt(50),vc=Math.sqrt(10),xc=Math.sqrt(2);function wc(e,t,n){var i,r,a,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((i=t<e)&&(r=e,e=t,t=r),0===(o=Mc(e,t,n))||!isFinite(o))return[];if(o>0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(r=Math.ceil(t-e+1));++s<r;)a[s]=(e+s)*o;else for(e=Math.floor(e*o),t=Math.ceil(t*o),a=new Array(r=Math.ceil(e-t+1));++s<r;)a[s]=(e-s)/o;return i&&a.reverse(),a}function Mc(e,t,n){var i=(t-e)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,r);return r>=0?(a>=bc?10:a>=vc?5:a>=xc?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(a>=bc?10:a>=vc?5:a>=xc?2:1)}function Sc(e,t,n){var i=Math.abs(t-e)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/r;return a>=bc?r*=10:a>=vc?r*=5:a>=xc&&(r*=2),t<e?-r:r}function kc(e,t,n){if(null==n&&(n=mc),i=e.length){if((t=+t)<=0||i<2)return+n(e[0],0,e);if(t>=1)return+n(e[i-1],i-1,e);var i,r=(i-1)*t,a=Math.floor(r),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(r-a)}}function _c(e,t){var n,i,r=e.length,a=-1;if(null==t){for(;++a<r;)if(null!=(n=e[a])&&n>=n)for(i=n;++a<r;)null!=(n=e[a])&&n>i&&(i=n)}else for(;++a<r;)if(null!=(n=t(e[a],a,e))&&n>=n)for(i=n;++a<r;)null!=(n=t(e[a],a,e))&&n>i&&(i=n);return i}const Oc=e=>e.direction===Mn.Horizontal,Cc=fn([ui],(e=>li(e,Ce.Heatmap,Zn.Series)[0])),Ec=fn([Cc],(e=>Nn(Wo,e.config,{mergeOptionalPartialValues:!0})));function Ac(e,t){return"function"==typeof t?t(e):e[t]}function Tc(e,t){if(null==e[0]||null==e[1])return[0,0];const n=e[0]>e[1],i=(([e,n])=>{const[i,r]=function(e,t,n){if(!n||!n.padding||n.paddingUnit===ro.Pixel)return[e,t];const{padding:i,paddingUnit:r=ro.Domain}=n,a=Math.abs(i),o=r===ro.Domain?a:a*Math.abs(t-e);return 0===o?[e,t]:function(e,t,n,i,r=!0){return r?e<t?[e>=0&&n<0?0:n,t<=0&&i>0?0:i]:[t>=0&&i<0?0:i,e<=0&&n>0?0:n]:[n,i]}(e,t,e-o,t+o,n.constrainPadding)}(e,n,t);return i>=0&&r>=0?(null==t?void 0:t.fit)?[i,r]:[0,r]:i<0&&r<0?(null==t?void 0:t.fit)?[i,r]:[i,0]:[i,r]})(n?e.slice().reverse():e);return n?i.slice().reverse():i}function Ic(e,t,n,i){var r,a;const o=yc((null==i?void 0:i.fit)&&n===Ja.Log?e.filter((e=>0!==t(e))):e,t);return null===i?[null!==(r=o[0])&&void 0!==r?r:0,null!==(a=o[1])&&void 0!==a?a:0]:Tc(o,i)}const jc={type:Ja.Ordinal,nice:!1,desiredTickCount:10},Lc={type:Ja.Linear,nice:!1,desiredTickCount:10,constrainDomainPadding:void 0,domainPixelPadding:0,logBase:void 0,logMinLimit:void 0};function Pc(e){return null!=e?e:jc.type}function zc(e){return null!=e?e:jc.nice}function Dc(e){return null!=e.min}function Nc(e){return null!=e.max}function Rc(e){return null!=e.max&&null!=e.min}function Vc(e){return e===wn.Left||e===wn.Right}function $c(e){return e===wn.Top||e===wn.Bottom}function Fc(e){return e.length>0&&e.every((e=>e))}function Bc({type:e,nice:t,isBandScale:n,timeZone:i,desiredTickCount:r,customDomain:a},o,s){const l=[...o.values()];let c,u=0;if(e===Ja.Ordinal||s===Ja.Ordinal)Ja.Ordinal,c=function(e,t,n){if(0===e.length)return[0];const i=e.map(t).filter((e=>null!==e)),r=[...new Set(i)];return n?r.sort(((e,t)=>`${e}`.localeCompare(`${t}`))):r}(l,On,!1),a&&(Array.isArray(a)?c=a:Ja.Ordinal);else{let t;if(c=Ic(l,On,e,{fit:!0}),a)if(Array.isArray(a));else{t=a.minInterval;const[e,n]=c;Rc(a)?a.min>a.max||(c=[a.min,a.max]):Dc(a)?a.min>n||(c=[a.min,n]):Nc(a)&&(e>a.max||(c=[e,a.max]))}const n=function(e){const t=e.length;if(t<=0)return 0;if(1===t)return 1;const n=e.slice().sort(Cn);let i,r=Math.abs(n[1]-n[0]);for(i=1;i<t-1;i++){const e=n[i],t=n[i+1],a=Math.abs(t-e);r=Math.min(r,a)}return r}(l);u=function(e,t,n){if(null==n)return e;if(t>1&&n>e)return e;if(n<0)return e;return n}(n,o.size,t)}return{type:null!=s?s:e,nice:t,isBandScale:n,domain:c,minInterval:u,timeZone:i,logBase:a&&"logBase"in a?a.logBase:void 0,desiredTickCount:r}}const Hc=fn([Cc,hi],((e,t)=>{const{data:n,valueAccessor:i,xAccessor:r,yAccessor:a,xSortPredicate:o,ySortPredicate:s}=e,{xDomain:l}=t,c=n.reduce(((e,t,n)=>{const o=Ac(t,r),s=Ac(t,a),l=Ac(t,i),[c,u]=e.extent;return e.extent=[Math.min(c,l),Math.max(u,l)],e.table.push({x:o,y:s,value:l,originalIndex:n}),e.xValues.includes(o)||e.xValues.push(o),e.yValues.includes(s)||e.yValues.push(s),e}),{table:[],xValues:[],yValues:[],extent:[1/0,-1/0]});return c.xDomain=Bc({type:Pc(e.xScaleType),nice:zc(),isBandScale:!1,desiredTickCount:Uo.desiredTickCount,customDomain:l},c.xValues),e.xScaleType===Ja.Ordinal&&c.xDomain.domain.sort(Ho(o)),c.yValues.sort(Ho(s)),c})),Wc=fn([ls,hi,e=>e.parentDimensions,Ec,Hc],((e,{showLegend:t},{height:n},i,{table:r,yValues:a})=>{var o,s;const{labelRotation:l}=i.xAxisLabel;let c=0;if(i.xAxisLabel.visible)if(90===Math.abs(l)){const e=r.map((e=>e.x)).map(i.xAxisLabel.formatter).map((e=>Object.assign({text:String(e),value:e},i.xAxisLabel)));c=null!==(o=_c(ha(document.createElement("canvas").getContext("2d"))(i.xAxisLabel.fontSize,e),(({width:e})=>e)))&&void 0!==o?o:0}else c=i.xAxisLabel.fontSize;const u=2*i.xAxisLabel.padding;let h=0;t&&Oc(e.position)&&(h=null!==(s=i.maxLegendHeight)&&void 0!==s?s:e.height);const d=n-c-u-h,f=function(e,t,n){if(0===e.length)return n;const i=n/e.length;if(i<t.cellHeight.min)return t.cellHeight.min;if("fill"!==t.cellHeight.max&&i>t.cellHeight.max)return t.cellHeight.max;return i}(a,i.grid,d),p=f*a.length;return{height:p,gridCellHeight:f,pageSize:f>0&&p>n?Math.floor(d/f):a.length}}));var Uc="$";function Yc(){}function Gc(e,t){var n=new Yc;if(e instanceof Yc)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var i,r=-1,a=e.length;if(null==t)for(;++r<a;)n.set(r,e[r]);else for(;++r<a;)n.set(t(i=e[r],r,e),i)}else if(e)for(var o in e)n.set(o,e[o]);return n}function qc(){}Yc.prototype=Gc.prototype={constructor:Yc,has:function(e){return Uc+e in this},get:function(e){return this[Uc+e]},set:function(e,t){return this[Uc+e]=t,this},remove:function(e){var t=Uc+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Uc&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Uc&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Uc&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Uc&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Uc&&++e;return e},empty:function(){for(var e in this)if(e[0]===Uc)return!1;return!0},each:function(e){for(var t in this)t[0]===Uc&&e(this[t],t.slice(1),this)}};var Xc=Gc.prototype;qc.prototype={constructor:qc,has:Xc.has,add:function(e){return this[Uc+(e+="")]=e,this},remove:Xc.remove,clear:Xc.clear,values:Xc.keys,size:Xc.size,empty:Xc.empty,each:Xc.each};var Zc=Array.prototype,Kc=Zc.map,Qc=Zc.slice,Jc={name:"implicit"};function eu(e){var t=Gc(),n=[],i=Jc;function r(r){var a=r+"",o=t.get(a);if(!o){if(i!==Jc)return i;t.set(a,o=n.push(r))}return e[(o-1)%e.length]}return e=null==e?[]:Qc.call(e),r.domain=function(e){if(!arguments.length)return n.slice();n=[],t=Gc();for(var i,a,o=-1,s=e.length;++o<s;)t.has(a=(i=e[o])+"")||t.set(a,n.push(i));return r},r.range=function(t){return arguments.length?(e=Qc.call(t),r):e.slice()},r.unknown=function(e){return arguments.length?(i=e,r):i},r.copy=function(){return eu().domain(n).range(e).unknown(i)},r}function tu(){var e,t,n=eu().unknown(void 0),i=n.domain,r=n.range,a=[0,1],o=!1,s=0,l=0,c=.5;function u(){var n=i().length,u=a[1]<a[0],h=a[u-0],d=a[1-u];e=(d-h)/Math.max(1,n-s+2*l),o&&(e=Math.floor(e)),h+=(d-h-e*(n-s))*c,t=e*(1-s),o&&(h=Math.round(h),t=Math.round(t));var f=function(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(r);++i<r;)a[i]=e+i*n;return a}(n).map((function(t){return h+e*t}));return r(u?f.reverse():f)}return delete n.unknown,n.domain=function(e){return arguments.length?(i(e),u()):i()},n.range=function(e){return arguments.length?(a=[+e[0],+e[1]],u()):a.slice()},n.rangeRound=function(e){return a=[+e[0],+e[1]],o=!0,u()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(o=!!e,u()):o},n.padding=function(e){return arguments.length?(s=l=Math.max(0,Math.min(1,e)),u()):s},n.paddingInner=function(e){return arguments.length?(s=Math.max(0,Math.min(1,e)),u()):s},n.paddingOuter=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),u()):l},n.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},n.copy=function(){return tu().domain(i()).range(a).round(o).paddingInner(s).paddingOuter(l).align(c)},u()}function nu(e){return function(){return e}}function iu(e,t){return function(n){return e+n*t}}function ru(e,t){var n=t-e;return n?iu(e,n>180||n<-180?n-360*Math.round(n/360):n):nu(isNaN(e)?t:e)}function au(e){return 1==(e=+e)?ou:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}(t,n,e):nu(isNaN(t)?n:t)}}function ou(e,t){var n=t-e;return n?iu(e,n):nu(isNaN(e)?t:e)}const su=function e(t){var n=au(t);function i(e,t){var i=n((e=nt(e)).r,(t=nt(t)).r),r=n(e.g,t.g),a=n(e.b,t.b),o=ou(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=a(t),e.opacity=o(t),e+""}}return i.gamma=e,i}(1);function lu(e,t){t||(t=[]);var n,i=e?Math.min(t.length,e.length):0,r=t.slice();return function(a){for(n=0;n<i;++n)r[n]=e[n]*(1-a)+t[n]*a;return r}}function cu(e,t){var n,i=t?t.length:0,r=e?Math.min(i,e.length):0,a=new Array(r),o=new Array(i);for(n=0;n<r;++n)a[n]=mu(e[n],t[n]);for(;n<i;++n)o[n]=t[n];return function(e){for(n=0;n<r;++n)o[n]=a[n](e);return o}}function uu(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function hu(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function du(e,t){var n,i={},r={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?i[n]=mu(e[n],t[n]):r[n]=t[n];return function(e){for(n in i)r[n]=i[n](e);return r}}var fu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pu=new RegExp(fu.source,"g");function gu(e,t){var n,i,r,a=fu.lastIndex=pu.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(n=fu.exec(e))&&(i=pu.exec(t));)(r=i.index)>a&&(r=t.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:hu(n,i)})),a=pu.lastIndex;return a<t.length&&(r=t.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,i=0;i<t;++i)s[(n=l[i]).i]=n.x(e);return s.join("")})}function mu(e,t){var n,i,r=typeof t;return null==t||"boolean"===r?nu(t):("number"===r?hu:"string"===r?(n=Qe(t))?(t=n,su):gu:t instanceof Qe?su:t instanceof Date?uu:(i=t,!ArrayBuffer.isView(i)||i instanceof DataView?Array.isArray(t)?cu:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?du:hu:lu))(e,t)}function yu(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}const bu=(vu=ru,function(e,t){var n=vu((e=_t(e)).h,(t=_t(t)).h),i=ou(e.c,t.c),r=ou(e.l,t.l),a=ou(e.opacity,t.opacity);return function(t){return e.h=n(t),e.c=i(t),e.l=r(t),e.opacity=a(t),e+""}});var vu;function xu(e){return function t(n){function i(t,i){var r=e((t=Dt(t)).h,(i=Dt(i)).h),a=ou(t.s,i.s),o=ou(t.l,i.l),s=ou(t.opacity,i.opacity);return function(e){return t.h=r(e),t.s=a(e),t.l=o(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,i.gamma=t,i}(1)}xu(ru);var wu=xu(ou);function Mu(e){return function(){return e}}function Su(e){return+e}var ku=[0,1];function _u(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Mu(t)}function Ou(e,t,n,i){var r=e[0],a=e[1],o=t[0],s=t[1];return a<r?(r=n(a,r),o=i(s,o)):(r=n(r,a),o=i(o,s)),function(e){return o(r(e))}}function Cu(e,t,n,i){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=n(e[s],e[s+1]),o[s]=i(t[s],t[s+1]);return function(t){var n=pc(e,t,1,r)-1;return o[n](a[n](t))}}function Eu(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp())}function Au(e,t){var n,i,r,a=ku,o=ku,s=mu,l=!1;function c(){return n=Math.min(a.length,o.length)>2?Cu:Ou,i=r=null,u}function u(t){return(i||(i=n(a,o,l?function(e){return function(t,n){var i=e(t=+t,n=+n);return function(e){return e<=t?0:e>=n?1:i(e)}}}(e):e,s)))(+t)}return u.invert=function(e){return(r||(r=n(o,a,_u,l?function(e){return function(t,n){var i=e(t=+t,n=+n);return function(e){return e<=0?t:e>=1?n:i(e)}}}(t):t)))(+e)},u.domain=function(e){return arguments.length?(a=Kc.call(e,Su),c()):a.slice()},u.range=function(e){return arguments.length?(o=Qc.call(e),c()):o.slice()},u.rangeRound=function(e){return o=Qc.call(e),s=yu,c()},u.clamp=function(e){return arguments.length?(l=!!e,c()):l},u.interpolate=function(e){return arguments.length?(s=e,c()):s},c()}function Tu(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,i=e.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+e.slice(n+1)]}function Iu(e){return(e=Tu(Math.abs(e)))?e[1]:NaN}var ju,Lu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pu(e){if(!(t=Lu.exec(e)))throw new Error("invalid format: "+e);var t;return new zu({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function zu(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Du(e,t){var n=Tu(e,t);if(!n)return e+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}Pu.prototype=zu.prototype,zu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Nu={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Du(100*e,t)},r:Du,s:function(e,t){var n=Tu(e,t);if(!n)return e+"";var i=n[0],r=n[1],a=r-(ju=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Tu(e,Math.max(0,t+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Ru(e){return e}var Vu,$u,Fu,Bu=Array.prototype.map,Hu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wu(e){var t,n,i=void 0===e.grouping||void 0===e.thousands?Ru:(t=Bu.call(e.grouping,Number),n=e.thousands+"",function(e,i){for(var r=e.length,a=[],o=0,s=t[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(e.substring(r-=s,r+s)),!((l+=s+1)>i));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),r=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Ru:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Bu.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=Pu(e)).fill,n=e.align,h=e.sign,d=e.symbol,f=e.zero,p=e.width,g=e.comma,m=e.precision,y=e.trim,b=e.type;"n"===b?(g=!0,b="g"):Nu[b]||(void 0===m&&(m=12),y=!0,b="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var v="$"===d?r:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?a:/[%p]/.test(b)?l:"",w=Nu[b],M=/[defgprs%]/.test(b);function S(e){var r,a,l,d=v,S=x;if("c"===b)S=w(e)+S,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),y&&(e=function(e){e:for(var t,n=e.length,i=1,r=-1;i<n;++i)switch(e[i]){case".":r=t=i;break;case"0":0===r&&(r=i),t=i;break;default:if(!+e[i])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}(e)),k&&0==+e&&"+"!==h&&(k=!1),d=(k?"("===h?h:c:"-"===h||"("===h?"":h)+d,S=("s"===b?Hu[8+ju/3]:"")+S+(k&&"("===h?")":""),M)for(r=-1,a=e.length;++r<a;)if(48>(l=e.charCodeAt(r))||l>57){S=(46===l?o+e.slice(r+1):e.slice(r))+S,e=e.slice(0,r);break}}g&&!f&&(e=i(e,1/0));var _=d.length+e.length+S.length,O=_<p?new Array(p-_+1).join(t):"";switch(g&&f&&(e=i(O+e,O.length?p-S.length:1/0),O=""),n){case"<":e=d+e+S+O;break;case"=":e=d+O+e+S;break;case"^":e=O.slice(0,_=O.length>>1)+d+e+S+O.slice(_);break;default:e=O+d+e+S}return s(e)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return e+""},S}return{format:h,formatPrefix:function(e,t){var n=h(((e=Pu(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Iu(t)/3))),r=Math.pow(10,-i),a=Hu[8+i/3];return function(e){return n(r*e)+a}}}}function Uu(e,t,n){var i,r=e[0],a=e[e.length-1],o=Sc(r,a,null==t?10:t);switch((n=Pu(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(r),Math.abs(a));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Iu(t)/3)))-Iu(Math.abs(e)))}(o,s))||(n.precision=i),Fu(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Iu(t)-Iu(e))+1}(o,Math.max(Math.abs(r),Math.abs(a))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-Iu(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return $u(n)}function Yu(e){var t=e.domain;return e.ticks=function(e){var n=t();return wc(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){return Uu(t(),e,n)},e.nice=function(n){null==n&&(n=10);var i,r=t(),a=0,o=r.length-1,s=r[a],l=r[o];return l<s&&(i=s,s=l,l=i,i=a,a=o,o=i),(i=Mc(s,l,n))>0?i=Mc(s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i,n):i<0&&(i=Mc(s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i,n)),i>0?(r[a]=Math.floor(s/i)*i,r[o]=Math.ceil(l/i)*i,t(r)):i<0&&(r[a]=Math.ceil(s*i)/i,r[o]=Math.floor(l*i)/i,t(r)),e},e}function Gu(){var e=Au(_u,hu);return e.copy=function(){return Eu(e,Gu())},Yu(e)}function qu(e,t){var n,i=0,r=(e=e.slice()).length-1,a=e[i],o=e[r];return o<a&&(n=i,i=r,r=n,n=a,a=o,o=n),e[i]=t.floor(a),e[r]=t.ceil(o),e}function Xu(e,t){return(t=Math.log(t/e))?function(n){return Math.log(n/e)/t}:Mu(t)}function Zu(e,t){return e<0?function(n){return-Math.pow(-t,n)*Math.pow(-e,1-n)}:function(n){return Math.pow(t,n)*Math.pow(e,1-n)}}function Ku(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Qu(e){return 10===e?Ku:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function Ju(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function eh(e){return function(t){return-e(-t)}}function th(e,t){return e<0?-Math.pow(-e,t):Math.pow(e,t)}function nh(){var e=1,t=Au((function(t,n){return(n=th(n,e)-(t=th(t,e)))?function(i){return(th(i,e)-t)/n}:Mu(n)}),(function(t,n){return n=th(n,e)-(t=th(t,e)),function(i){return th(t+n*i,1/e)}})),n=t.domain;return t.exponent=function(t){return arguments.length?(e=+t,n(n())):e},t.copy=function(){return Eu(t,nh().exponent(e))},Yu(t)}function ih(){var e=[],t=[],n=[];function i(){var i=0,a=Math.max(1,t.length);for(n=new Array(a-1);++i<a;)n[i-1]=kc(e,i/a);return r}function r(e){if(!isNaN(e=+e))return t[pc(n,e)]}return r.invertExtent=function(i){var r=t.indexOf(i);return r<0?[NaN,NaN]:[r>0?n[r-1]:e[0],r<n.length?n[r]:e[e.length-1]]},r.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,a=t.length;r<a;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(hc),i()},r.range=function(e){return arguments.length?(t=Qc.call(e),i()):t.slice()},r.quantiles=function(){return n.slice()},r.copy=function(){return ih().domain(e).range(t)},r}function rh(){var e=0,t=1,n=1,i=[.5],r=[0,1];function a(e){if(e<=e)return r[pc(i,e,0,n)]}function o(){var r=-1;for(i=new Array(n);++r<n;)i[r]=((r+1)*t-(r-n)*e)/(n+1);return a}return a.domain=function(n){return arguments.length?(e=+n[0],t=+n[1],o()):[e,t]},a.range=function(e){return arguments.length?(n=(r=Qc.call(e)).length-1,o()):r.slice()},a.invertExtent=function(a){var o=r.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=n?[i[n-1],t]:[i[o-1],i[o]]},a.copy=function(){return rh().domain([e,t]).range(r)},Yu(a)}function ah(){var e=[.5],t=[0,1],n=1;function i(i){if(i<=i)return t[pc(e,i,0,n)]}return i.domain=function(r){return arguments.length?(e=Qc.call(r),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(r){return arguments.length?(t=Qc.call(r),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var i=t.indexOf(n);return[e[i-1],e[i]]},i.copy=function(){return ah().domain(e).range(t)},i}Vu=Wu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),$u=Vu.format,Fu=Vu.formatPrefix;var oh=new Date,sh=new Date;function lh(e,t,n,i){function r(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return r.floor=function(t){return e(t=new Date(+t)),t},r.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},r.round=function(e){var t=r(e),n=r.ceil(e);return e-t<n-e?t:n},r.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},r.range=function(n,i,a){var o,s=[];if(n=r.ceil(n),a=null==a?1:Math.floor(a),!(n<i&&a>0))return s;do{s.push(o=new Date(+n)),t(n,a),e(n)}while(o<n&&n<i);return s},r.filter=function(n){return lh((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,i){if(e>=e)if(i<0)for(;++i<=0;)for(;t(e,-1),!n(e););else for(;--i>=0;)for(;t(e,1),!n(e););}))},n&&(r.count=function(t,i){return oh.setTime(+t),sh.setTime(+i),e(oh),e(sh),Math.floor(n(oh,sh))},r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?r.filter(i?function(t){return i(t)%e==0}:function(t){return r.count(0,t)%e==0}):r:null}),r}var ch=lh((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));ch.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?lh((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):ch:null},ch.range;var uh=6e4,hh=36e5,dh=864e5,fh=6048e5,ph=lh((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()}));ph.range;var gh=lh((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uh)/dh}),(function(e){return e.getDate()-1}));function mh(e){return lh((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uh)/fh}))}gh.range;var yh=mh(0),bh=mh(1),vh=mh(2),xh=mh(3),wh=mh(4),Mh=mh(5),Sh=mh(6);yh.range,bh.range,vh.range,xh.range,wh.range,Mh.range,Sh.range;var kh=lh((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));kh.every=function(e){return isFinite(e=Math.floor(e))&&e>0?lh((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},kh.range;var _h=lh((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*uh)}),(function(e,t){return(t-e)/uh}),(function(e){return e.getUTCMinutes()}));_h.range;var Oh=lh((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*hh)}),(function(e,t){return(t-e)/hh}),(function(e){return e.getUTCHours()}));Oh.range;var Ch=lh((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/dh}),(function(e){return e.getUTCDate()-1}));function Eh(e){return lh((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/fh}))}Ch.range;var Ah=Eh(0),Th=Eh(1),Ih=Eh(2),jh=Eh(3),Lh=Eh(4),Ph=Eh(5),zh=Eh(6);Ah.range,Th.range,Ih.range,jh.range,Lh.range,Ph.range,zh.range;var Dh=lh((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));Dh.range;var Nh=lh((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function Rh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Vh(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function $h(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}Nh.every=function(e){return isFinite(e=Math.floor(e))&&e>0?lh((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},Nh.range;var Fh,Bh,Hh={"-":"",_:" ",0:"0"},Wh=/^\s*\d+/,Uh=/^%/,Yh=/[\\^$*+?|[\]().{}]/g;function Gh(e,t,n){var i=e<0?"-":"",r=(i?-e:e)+"",a=r.length;return i+(a<n?new Array(n-a+1).join(t)+r:r)}function qh(e){return e.replace(Yh,"\\$&")}function Xh(e){return new RegExp("^(?:"+e.map(qh).join("|")+")","i")}function Zh(e){for(var t={},n=-1,i=e.length;++n<i;)t[e[n].toLowerCase()]=n;return t}function Kh(e,t,n){var i=Wh.exec(t.slice(n,n+1));return i?(e.w=+i[0],n+i[0].length):-1}function Qh(e,t,n){var i=Wh.exec(t.slice(n,n+1));return i?(e.u=+i[0],n+i[0].length):-1}function Jh(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.U=+i[0],n+i[0].length):-1}function ed(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.V=+i[0],n+i[0].length):-1}function td(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.W=+i[0],n+i[0].length):-1}function nd(e,t,n){var i=Wh.exec(t.slice(n,n+4));return i?(e.y=+i[0],n+i[0].length):-1}function id(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function rd(e,t,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ad(e,t,n){var i=Wh.exec(t.slice(n,n+1));return i?(e.q=3*i[0]-3,n+i[0].length):-1}function od(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.m=i[0]-1,n+i[0].length):-1}function sd(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.d=+i[0],n+i[0].length):-1}function ld(e,t,n){var i=Wh.exec(t.slice(n,n+3));return i?(e.m=0,e.d=+i[0],n+i[0].length):-1}function cd(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.H=+i[0],n+i[0].length):-1}function ud(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.M=+i[0],n+i[0].length):-1}function hd(e,t,n){var i=Wh.exec(t.slice(n,n+2));return i?(e.S=+i[0],n+i[0].length):-1}function dd(e,t,n){var i=Wh.exec(t.slice(n,n+3));return i?(e.L=+i[0],n+i[0].length):-1}function fd(e,t,n){var i=Wh.exec(t.slice(n,n+6));return i?(e.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function pd(e,t,n){var i=Uh.exec(t.slice(n,n+1));return i?n+i[0].length:-1}function gd(e,t,n){var i=Wh.exec(t.slice(n));return i?(e.Q=+i[0],n+i[0].length):-1}function md(e,t,n){var i=Wh.exec(t.slice(n));return i?(e.s=+i[0],n+i[0].length):-1}function yd(e,t){return Gh(e.getDate(),t,2)}function bd(e,t){return Gh(e.getHours(),t,2)}function vd(e,t){return Gh(e.getHours()%12||12,t,2)}function xd(e,t){return Gh(1+gh.count(kh(e),e),t,3)}function wd(e,t){return Gh(e.getMilliseconds(),t,3)}function Md(e,t){return wd(e,t)+"000"}function Sd(e,t){return Gh(e.getMonth()+1,t,2)}function kd(e,t){return Gh(e.getMinutes(),t,2)}function _d(e,t){return Gh(e.getSeconds(),t,2)}function Od(e){var t=e.getDay();return 0===t?7:t}function Cd(e,t){return Gh(yh.count(kh(e)-1,e),t,2)}function Ed(e){var t=e.getDay();return t>=4||0===t?wh(e):wh.ceil(e)}function Ad(e,t){return e=Ed(e),Gh(wh.count(kh(e),e)+(4===kh(e).getDay()),t,2)}function Td(e){return e.getDay()}function Id(e,t){return Gh(bh.count(kh(e)-1,e),t,2)}function jd(e,t){return Gh(e.getFullYear()%100,t,2)}function Ld(e,t){return Gh((e=Ed(e)).getFullYear()%100,t,2)}function Pd(e,t){return Gh(e.getFullYear()%1e4,t,4)}function zd(e,t){var n=e.getDay();return Gh((e=n>=4||0===n?wh(e):wh.ceil(e)).getFullYear()%1e4,t,4)}function Dd(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gh(t/60|0,"0",2)+Gh(t%60,"0",2)}function Nd(e,t){return Gh(e.getUTCDate(),t,2)}function Rd(e,t){return Gh(e.getUTCHours(),t,2)}function Vd(e,t){return Gh(e.getUTCHours()%12||12,t,2)}function $d(e,t){return Gh(1+Ch.count(Nh(e),e),t,3)}function Fd(e,t){return Gh(e.getUTCMilliseconds(),t,3)}function Bd(e,t){return Fd(e,t)+"000"}function Hd(e,t){return Gh(e.getUTCMonth()+1,t,2)}function Wd(e,t){return Gh(e.getUTCMinutes(),t,2)}function Ud(e,t){return Gh(e.getUTCSeconds(),t,2)}function Yd(e){var t=e.getUTCDay();return 0===t?7:t}function Gd(e,t){return Gh(Ah.count(Nh(e)-1,e),t,2)}function qd(e){var t=e.getUTCDay();return t>=4||0===t?Lh(e):Lh.ceil(e)}function Xd(e,t){return e=qd(e),Gh(Lh.count(Nh(e),e)+(4===Nh(e).getUTCDay()),t,2)}function Zd(e){return e.getUTCDay()}function Kd(e,t){return Gh(Th.count(Nh(e)-1,e),t,2)}function Qd(e,t){return Gh(e.getUTCFullYear()%100,t,2)}function Jd(e,t){return Gh((e=qd(e)).getUTCFullYear()%100,t,2)}function ef(e,t){return Gh(e.getUTCFullYear()%1e4,t,4)}function tf(e,t){var n=e.getUTCDay();return Gh((e=n>=4||0===n?Lh(e):Lh.ceil(e)).getUTCFullYear()%1e4,t,4)}function nf(){return"+0000"}function rf(){return"%"}function af(e){return+e}function of(e){return Math.floor(+e/1e3)}!function(e){Fh=function(e){var t=e.dateTime,n=e.date,i=e.time,r=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Xh(r),u=Zh(r),h=Xh(a),d=Zh(a),f=Xh(o),p=Zh(o),g=Xh(s),m=Zh(s),y=Xh(l),b=Zh(l),v={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:yd,e:yd,f:Md,g:Ld,G:zd,H:bd,I:vd,j:xd,L:wd,m:Sd,M:kd,p:function(e){return r[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:af,s:of,S:_d,u:Od,U:Cd,V:Ad,w:Td,W:Id,x:null,X:null,y:jd,Y:Pd,Z:Dd,"%":rf},x={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Nd,e:Nd,f:Bd,g:Jd,G:tf,H:Rd,I:Vd,j:$d,L:Fd,m:Hd,M:Wd,p:function(e){return r[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:af,s:of,S:Ud,u:Yd,U:Gd,V:Xd,w:Zd,W:Kd,x:null,X:null,y:Qd,Y:ef,Z:nf,"%":rf},w={a:function(e,t,n){var i=f.exec(t.slice(n));return i?(e.w=p[i[0].toLowerCase()],n+i[0].length):-1},A:function(e,t,n){var i=h.exec(t.slice(n));return i?(e.w=d[i[0].toLowerCase()],n+i[0].length):-1},b:function(e,t,n){var i=y.exec(t.slice(n));return i?(e.m=b[i[0].toLowerCase()],n+i[0].length):-1},B:function(e,t,n){var i=g.exec(t.slice(n));return i?(e.m=m[i[0].toLowerCase()],n+i[0].length):-1},c:function(e,n,i){return k(e,t,n,i)},d:sd,e:sd,f:fd,g:id,G:nd,H:cd,I:cd,j:ld,L:dd,m:od,M:ud,p:function(e,t,n){var i=c.exec(t.slice(n));return i?(e.p=u[i[0].toLowerCase()],n+i[0].length):-1},q:ad,Q:gd,s:md,S:hd,u:Qh,U:Jh,V:ed,w:Kh,W:td,x:function(e,t,i){return k(e,n,t,i)},X:function(e,t,n){return k(e,i,t,n)},y:id,Y:nd,Z:rd,"%":pd};function M(e,t){return function(n){var i,r,a,o=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(o.push(e.slice(l,s)),null!=(r=Hh[i=e.charAt(++s)])?i=e.charAt(++s):r="e"===i?" ":"0",(a=t[i])&&(i=a(n,r)),o.push(i),l=s+1);return o.push(e.slice(l,s)),o.join("")}}function S(e,t){return function(n){var i,r,a=$h(1900,void 0,1);if(k(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(r=(i=Vh($h(a.y,0,1))).getUTCDay(),i=r>4||0===r?Th.ceil(i):Th(i),i=Ch.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(r=(i=Rh($h(a.y,0,1))).getDay(),i=r>4||0===r?bh.ceil(i):bh(i),i=gh.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),r="Z"in a?Vh($h(a.y,0,1)).getUTCDay():Rh($h(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(r+5)%7:a.w+7*a.U-(r+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Vh(a)):Rh(a)}}function k(e,t,n,i){for(var r,a,o=0,s=t.length,l=n.length;o<s;){if(i>=l)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(a=w[r in Hh?t.charAt(o++):r])||(i=a(e,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return v.x=M(n,v),v.X=M(i,v),v.c=M(t,v),x.x=M(n,x),x.X=M(i,x),x.c=M(t,x),{format:function(e){var t=M(e+="",v);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=M(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}(e),Fh.format,Fh.parse,Bh=Fh.utcFormat,Fh.utcParse}({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"]});var sf=1e3,lf=6e4,cf=36e5,uf=864e5,hf=2592e6,df=31536e6;function ff(e){return new Date(e)}function pf(e){return e instanceof Date?+e:+new Date(+e)}function gf(e,t,n,i,r,a,o,s,l){var c=Au(_u,hu),u=c.invert,h=c.domain,d=l(".%L"),f=l(":%S"),p=l("%I:%M"),g=l("%I %p"),m=l("%a %d"),y=l("%b %d"),b=l("%B"),v=l("%Y"),x=[[o,1,sf],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,lf],[a,5,3e5],[a,15,9e5],[a,30,18e5],[r,1,cf],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,uf],[i,2,1728e5],[n,1,6048e5],[t,1,hf],[t,3,7776e6],[e,1,df]];function w(s){return(o(s)<s?d:a(s)<s?f:r(s)<s?p:i(s)<s?g:t(s)<s?n(s)<s?m:y:e(s)<s?b:v)(s)}function M(t,n,i,r){if(null==t&&(t=10),"number"==typeof t){var a=Math.abs(i-n)/t,o=dc((function(e){return e[2]})).right(x,a);o===x.length?(r=Sc(n/df,i/df,t),t=e):o?(r=(o=x[a/x[o-1][2]<x[o][2]/a?o-1:o])[1],t=o[0]):(r=Math.max(Sc(n,i,t),1),t=s)}return null==r?t:t.every(r)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?h(Kc.call(e,pf)):h().map(ff)},c.ticks=function(e,t){var n,i=h(),r=i[0],a=i[i.length-1],o=a<r;return o&&(n=r,r=a,a=n),n=(n=M(e,r,a,t))?n.range(r,a+1):[],o?n.reverse():n},c.tickFormat=function(e,t){return null==t?w:l(t)},c.nice=function(e,t){var n=h();return(e=M(e,n[0],n[n.length-1],t))?h(qu(n,e)):c},c.copy=function(){return Eu(c,gf(e,t,n,i,r,a,o,s,l))},c}function mf(){return gf(Nh,Dh,Ah,Ch,Oh,_h,ph,ch,Bh).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}function yf(e){return e.match(/.{6}/g).map((function(e){return"#"+e}))}function bf(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}yf("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),yf("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),yf("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),yf("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),wu(Dt(300,.5,0),Dt(-240,.5,1)),wu(Dt(-100,.75,.35),Dt(80,1.5,.8)),wu(Dt(260,.75,.35),Dt(80,1.5,.8)),Dt(),bf(yf("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),bf(yf("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),bf(yf("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),bf(yf("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));class vf{constructor(e,t,n,i=0){this.type=Ja.Ordinal,this.d3Scale=tu(),this.d3Scale.domain(e),this.d3Scale.range(t);let r=0;"object"==typeof i?(this.d3Scale.paddingInner(i.inner),this.d3Scale.paddingOuter(i.outer),this.barsPadding=i.inner):(r=Tn(i,0,1),this.d3Scale.paddingInner(r),this.barsPadding=r,this.d3Scale.paddingOuter(r/2)),this.outerPadding=this.d3Scale.paddingOuter(),this.innerPadding=this.d3Scale.paddingInner(),this.bandwidth=this.d3Scale.bandwidth()||0,this.originalBandwidth=this.d3Scale.bandwidth()||0,this.step=this.d3Scale.step(),this.domain=this.d3Scale.domain(),this.range=t.slice(),n&&(this.bandwidth=n*(1-r)),this.bandwidthPadding=this.bandwidth,this.isInverted=this.domain[0]>this.domain[1],this.invertedScale=rh().domain(t).range(this.domain),this.minInterval=0}getScaledValue(e){const t=this.d3Scale(function(e){return void 0===e?"undefined":null===e?"null":e}(e));return void 0===t||isNaN(t)?null:t}scaleOrThrow(e){const t=this.scale(e);if(null===t)throw new Error(`Unable to scale value: ${t})`);return t}scale(e){return this.getScaledValue(e)}pureScale(e){return this.getScaledValue(e)}ticks(){return this.domain}invert(e){return this.invertedScale(e)}invertWithStep(e){return{value:this.invertedScale(e),withinBandwidth:!0}}isSingleValue(){return this.domain.length<2}isValueInDomain(e){return this.domain.includes(e)}}const xf=(e,t,n)=>{const i={bounds:[],scaleMultiplier:1/0},r=Math.min(e.length,t.length);for(let a=0;a<r;a++)for(let o=0;o<r;o++){if(e[a]>e[o])continue;const r=(n-t[a]/2-t[o]/2)/(e[o]-e[a]);(r<i.scaleMultiplier||Number.isNaN(r))&&(i.bounds[0]=a,i.bounds[1]=o,i.scaleMultiplier=r)}return i};function wf(e,t){return"local"!==t&&t?"utc"===t.toLowerCase()?R.utc(e):t.toLowerCase().startsWith("utc+")||t.toLowerCase().startsWith("utc-")?R(e).utcOffset(Number(t.slice(3))):R.tz(e,t):R(e)}R.extend(W),R.extend(B);const Mf={[Ja.Linear]:Gu,[Ja.Log]:function e(){var t=Au(Xu,Zu).domain([1,10]),n=t.domain,i=10,r=Ju(10),a=Qu(10);function o(){return r=Ju(i),a=Qu(i),n()[0]<0&&(r=eh(r),a=eh(a)),t}return t.base=function(e){return arguments.length?(i=+e,o()):i},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=function(e){var t,o=n(),s=o[0],l=o[o.length-1];(t=l<s)&&(d=s,s=l,l=d);var c,u,h,d=r(s),f=r(l),p=null==e?10:+e,g=[];if(!(i%1)&&f-d<p){if(d=Math.round(d)-1,f=Math.round(f)+1,s>0){for(;d<f;++d)for(u=1,c=a(d);u<i;++u)if(!((h=c*u)<s)){if(h>l)break;g.push(h)}}else for(;d<f;++d)for(u=i-1,c=a(d);u>=1;--u)if(!((h=c*u)<s)){if(h>l)break;g.push(h)}}else g=wc(d,f,Math.min(f-d,p)).map(a);return t?g.reverse():g},t.tickFormat=function(e,n){if(null==n&&(n=10===i?".0e":","),"function"!=typeof n&&(n=$u(n)),e===1/0)return n;null==e&&(e=10);var o=Math.max(1,i*e/t.ticks().length);return function(e){var t=e/a(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=o?n(e):""}},t.nice=function(){return n(qu(n(),{floor:function(e){return a(Math.floor(r(e)))},ceil:function(e){return a(Math.ceil(r(e)))}}))},t.copy=function(){return Eu(t,e().base(i))},t},[Ja.Sqrt]:function(){return nh().exponent(.5)},[Ja.Time]:mf};const Sf=Object.freeze({Common:"common",Binary:"binary",Natural:"natural"}),kf={[Sf.Common]:10,[Sf.Binary]:2,[Sf.Natural]:Math.E},_f={bandwidth:0,minInterval:0,timeZone:"utc",totalBarsInCluster:1,barsPadding:0,constrainDomainPadding:!0,domainPixelPadding:0,desiredTickCount:10,isSingleValueHistogram:!1,integersOnly:!1,logBase:Sf.Common};class Of{constructor({type:e=Ja.Linear,domain:t=[0,1],range:n=[0,1],nice:i=!1},r){const{bandwidth:a,minInterval:o,timeZone:s,totalBarsInCluster:l,barsPadding:c,desiredTickCount:u,isSingleValueHistogram:h,integersOnly:d,logBase:f,logMinLimit:p,domainPixelPadding:g,constrainDomainPadding:m}=Nn(_f,r,{mergeOptionalPartialValues:!0});this.d3Scale=Mf[e](),e===Ja.Log?(this.d3Scale.base(kf[f]),this.domain=function([e,t],n){const i=void 0!==n?Math.abs(n):void 0;if(void 0!==i&&i>0){if(e>0&&e<i)return t>i?[i,t]:[i,i];if(t<0&&t>-i)return e<-i?[e,-i]:[-i,-i]}const r=i||1;if(0===e)return t>0?[r,t]:t<0?[-r,t]:[r,r];if(0===t)return e>0?[e,r]:e<0?[e,-r]:[r,r];if(e<0&&t>0)return Math.abs(t)-Math.abs(e)>=0?[r,t]:[e,-r];if(e>0&&t<0)return Math.abs(e)-Math.abs(t)>=0?[e,r]:[-r,t];return[e,t]}(t,p)):this.domain=t,this.d3Scale.domain(this.domain),i&&e!==Ja.Time&&(this.d3Scale.domain(this.domain).nice(u),this.domain=this.d3Scale.domain());const y=Tn(c,0,1);this.barsPadding=y,this.bandwidth=a*(1-y),this.bandwidthPadding=a*y,this.d3Scale.range(n),this.step=this.bandwidth+this.barsPadding+this.bandwidthPadding,this.type=e,this.range=n,this.minInterval=o,this.isInverted=this.domain[0]>this.domain[1],this.timeZone=s,this.totalBarsInCluster=l,this.isSingleValueHistogram=h;const[b,v]=this.range,x=Math.abs(b-v);if(e!==Ja.Time&&g&&!(([e,t])=>0===e&&1===t)(n)&&2*g<x){const e=function(e,t,n,i,r=0){const a=t[1]<t[0],o=a?t.slice().reverse():t,{scaleMultiplier:s}=xf(o,[2*n,2*n],e);let l=o[0]-n/s,c=o[1]+n/s;if(i)if(l<r&&o[0]>=r){const{scaleMultiplier:t}=xf([r,o[1]],[0,2*n],e);l=r,c=o[1]+n/t}else if(c>0&&o[1]<=0){const{scaleMultiplier:t}=xf([o[0],r],[2*n,0],e);l=o[0]-n/t,c=r}return a?[c,l]:[l,c]}(x,this.domain,g,m);i?(this.d3Scale.domain(e).nice(u),this.domain=this.d3Scale.domain()):(this.domain=e,this.d3Scale.domain(e))}if(e===Ja.Time){const e=wf(this.domain[0],this.timeZone),t=wf(this.domain[1],this.timeZone),n=e.utcOffset(),i=e.add(n,"minutes").valueOf(),r=t.add(n,"minutes").valueOf(),a=mf().domain([i,r]).ticks(u),o=(r-i)/a.length<432e5;this.tickValues=a.map((e=>{const t=wf(e,this.timeZone),i=o?n:t.utcOffset();return t.subtract(i,"minutes").valueOf()}))}else if(o>0&&a>0){const e=Math.floor((this.domain[1]-this.domain[0])/this.minInterval);this.tickValues=new Array(e+1).fill(0).map(((e,t)=>this.domain[0]+t*this.minInterval))}else this.tickValues=this.getTicks(u,d)}getScaledValue(e){if("number"!=typeof e||isNaN(e))return null;const t=this.d3Scale(e);return isNaN(t)?null:t}getTicks(e,t){return t?this.d3Scale.ticks(e).filter((e=>"number"==typeof e&&e%1==0)).map((e=>parseInt(e.toFixed(0),10))):this.d3Scale.ticks(e)}scaleOrThrow(e){const t=this.scale(e);if(null===t)throw new Error(`Unable to scale value: ${t})`);return t}scale(e){const t=this.getScaledValue(e);return null===t?null:t+this.bandwidthPadding/2*this.totalBarsInCluster}pureScale(e){return 0===this.bandwidth?this.getScaledValue(e):"number"!=typeof e||isNaN(e)?null:this.getScaledValue(e+this.minInterval/2)}ticks(){return this.tickValues}invert(e){let t=this.d3Scale.invert(e);return this.type===Ja.Time&&(t=wf(t,this.timeZone).valueOf()),t}invertWithStep(e,t){if(0===t.length)return null;const n=this.invert(e),i=0===this.bandwidth?n+this.minInterval/2:n,r=gc(t,i);if(0===r)return n<t[0]?{value:t[0]-this.minInterval*Math.ceil((t[0]-n)/this.minInterval),withinBandwidth:!1}:{value:t[0],withinBandwidth:!0};const a=t[r-1];if(0===this.minInterval){const e=t[r];return{value:Math.abs(e-n)<=Math.abs(n-a)?e:a,withinBandwidth:!0}}return n-a<=this.minInterval?{value:a,withinBandwidth:!0}:{value:a+this.minInterval*Math.floor((n-a)/this.minInterval),withinBandwidth:!1}}isSingleValue(){if(this.isSingleValueHistogram)return!0;if(this.domain.length<2)return!0;const e=this.domain[0];return this.domain[this.domain.length-1]===e}isValueInDomain(e){return e>=this.domain[0]&&e<=this.domain[1]}handleDomainPadding(){}}function Cf(e){const[t,n]=e;return t>=0&&n>=0?1:t<=0&&n<=0?-1:0}const Ef=fn([Ec,Hc],(({xAxisLabel:{fontSize:e,fontFamily:t,padding:n,formatter:i,width:r},timeZone:a},{xDomain:o})=>{if(o.type!==Ja.Time)return 0;if("number"==typeof r)return r/2;const s=new Of({type:Ja.Time,domain:o.domain,range:[0,1]},{timeZone:a}),l=new ss,c=s.ticks().reduce(((r,a)=>{const o=i(a),s=l.compute(o,n,e,t,1);return Math.max(r,s.width+n)}),0);return l.destroy(),c/2})),Af=fn([e=>e.parentDimensions,ls,Hc,Ec,Ef,Wc,hi],((e,t,n,i,r,{height:a,gridCellHeight:o,pageSize:s},{showLegend:l,legendPosition:c})=>{var u,h,d;let{width:f,left:p}=e,{top:g}=e;const{padding:m}=i.yAxisLabel,y=ha(document.createElement("canvas").getContext("2d")),b="number"==typeof m?2*m:(null!==(u=m.left)&&void 0!==u?u:0)+(null!==(h=m.right)&&void 0!==h?h:0);if(i.yAxisLabel.visible){const e=n.yValues.map((e=>{var t,n;return Object.assign({text:(null===(n=null===(t=i.yAxisLabel)||void 0===t?void 0:t.formatter)||void 0===n?void 0:n.call(t,e))||String(e),value:e},i.yAxisLabel)}));let t=null!==(d=_c(y(i.yAxisLabel.fontSize,e),(({width:e})=>e)))&&void 0!==d?d:0;"number"==typeof i.yAxisLabel.width?t=i.yAxisLabel.width:"object"==typeof i.yAxisLabel.width&&t>i.yAxisLabel.width.max&&(t=i.yAxisLabel.width.max),f-=t+r+b,p+=t+b}let v=0;!l||c!==wn.Right&&c!==wn.Left||(v=t.width-2*t.margin),f-=v,"top"===i.xAxisLabel.position&&(g=e.height-o*s);let x=0;return!l||c!==wn.Top&&c!==wn.Bottom||(x=t.height,g-=t.height),{height:a-=x,width:f,top:g,left:p}})),Tf=fn([Cc,Hc],((e,t)=>{const{colors:n,colorScale:i}=e,{ranges:r=t.extent}=e,a=null!=n?n:["green","red"],o={type:i};return o.type===Ja.Quantize?(o.config=rh().domain(yc(r)).range(a),o.ticks=o.config.ticks(e.colors.length)):o.type===Ja.Quantile?(o.config=ih().domain(r).range(a),o.ticks=o.config.quantiles()):o.type===Ja.Threshold?(o.config=ah().domain(r).range(a),o.ticks=o.config.domain()):(o.config=Gu().domain(r).interpolate(bu).range(a),o.ticks=function(e,t,n){if(e<0&&t<0)return[...n,0];if(e>=0&&t>=0)return[0,...n];return n}(r[0],r[1],o.config.ticks(6))),o}));const If=e=>e.interactions.deselectedDataSeries;function jf(e){const t=li(e.specs,Ce.Heatmap,Zn.Series);return t.length>0?t[0]:null}const Lf=fn([jf,Tf,If],((e,t,n)=>null===t||null===e?[]:t.ticks.map((i=>{const r=t.config(i),a={key:String(i),specId:String(i)};return{color:r,label:`> ${e.valueFormatter?e.valueFormatter(i):i}`,seriesIdentifiers:[a],isSeriesHidden:n.some((e=>e.key===a.key)),isToggleable:!0,path:[{index:0,value:a.key}],keys:[]}})))),Pf=fn([Lf,hi],((e,{showLegendExtra:t})=>e.map((({label:e,defaultExtra:n})=>null!=(null==n?void 0:n.formatted)?{label:`${e}${t?n.formatted:""}`,depth:0}:{label:e,depth:0}))));function zf(e,t,n){const i=e.indexOf(t),r=Math.min(e.indexOf(n)+1,e.length);return e.slice(i,r)}function Df(e,t){const n=new ss,i=t.formatter(Date.now()),{width:r,height:a}=n.compute(i,t.padding,t.fontSize,t.fontFamily);n.destroy();return Math.floor(e/(90===Math.abs(t.labelRotation)?a:r))/2}function Nf(e,t){return[String(e),String(t)].join("&_&")}function Rf(e,t){return e.some((([e,n])=>null!==n&&t>e&&t<n||null===n&&t>e))}function Vf(e,t,n,i,r,a,o){const s=document.createElement("canvas").getContext("2d");if(!s)return uc();const{width:l,height:c}=n,{config:u}=e,h=Object.assign(Object.assign({},u),{width:l,height:c}),d=Nn(Wo,h);return function(e,t,n,i,r,a,o,s,{height:l,pageSize:c}){var u,h;const d=null!==(u=n.grid.stroke.width)&&void 0!==u?u:1,{table:f,yValues:p,xDomain:g}=a,m=p.map((e=>Object.assign({text:n.yAxisLabel.formatter(e),value:e},n.yAxisLabel))),y=tu().domain(p).range([0,l]),b=rh().domain([0,l]).range(p);let v=g.domain;const x=g.type===Ja.Time?new Of({type:Ja.Time,domain:g.domain,range:[0,r.width],nice:!1},{desiredTickCount:Df(r.width,n.xAxisLabel),timeZone:n.timeZone}):null;if(x){const e=[];let[t]=v;for(;t<v[1];)e.push(t),t+=g.minInterval;v=e}const w=tu().domain(v).range([0,r.width]),M=rh().domain([0,r.width]).range(v),S="fill"!==n.cell.maxWidth&&w.bandwidth()>n.cell.maxWidth?n.cell.maxWidth:w.bandwidth(),k=y.bandwidth(),_=k*c,O=(e,t=w)=>i=>Object.assign(Object.assign({text:e(i,{timeZone:n.timeZone}),value:i},n.xAxisLabel),{x:r.left+(t(i)||0),y:("top"===n.xAxisLabel.position?0:k*c)+(90===Math.abs(n.xAxisLabel.labelRotation)?0:n.xAxisLabel.fontSize/2)+n.xAxisLabel.padding});let C=x?x.ticks().map(O(n.xAxisLabel.formatter,(e=>x.scale(e)))):v.map((e=>Object.assign(Object.assign({},O(n.xAxisLabel.formatter)(e)),{x:r.left+(w(e)||0)+w.bandwidth()/2})));!0===n.xAxisLabel.removeDuplicateTicks&&(C=Rn(C,"text"));const{padding:E}=n.yAxisLabel,A="number"==typeof E?E:null!==(h=E.right)&&void 0!==h?h:0,T=m.map((e=>Object.assign(Object.assign({},e),{x:r.left-A,y:r.top+(k/2+(y(e.value)||0))}))),I=f.reduce(((e,i)=>{const r=w(String(i.x)),a=y(String(i.y))+d,l=p.indexOf(i.y),c=o.config(i.value);return void 0===r||void 0===a||-1===l||(e[Nf(i.x,i.y)]={x:("fill"!==n.cell.maxWidth?r+w.bandwidth()/2-n.cell.maxWidth/2:r)+d,y:a,yIndex:l,width:S-2*d,height:k-2*d,datum:i,fill:{color:Ft(c)},stroke:{color:Ft(n.cell.border.stroke),width:n.cell.border.strokeWidth},value:i.value,visible:!Rf(s,i.value),formatted:t.valueFormatterRaw?t.valueFormatterRaw(i):t.valueFormatter(i.value)}),e}),{}),j=e=>{const[t,n]=e,{left:i,top:a,width:o}=r,s=[Math.min(t.x,n.x)-i,Math.min(t.y,n.y)-a],l=[Math.max(t.x,n.x)-i,Math.max(t.y,n.y)-a],c=M(En(s[0],0,o)),u=M(En(l[0],0,o)),h=b(En(s[1],0,_-1)),d=b(En(l[1],0,_-1)),f=zf(v,c,u),m=zf(p,h,d),y=x&&"number"==typeof u?[c,u+g.minInterval]:[...f],w=[];return f.forEach((e=>{m.forEach((t=>{const n=Nf(e,t);w.push(I[n])}))})),{cells:w.filter(Boolean),x:y,y:m}},L=(e,t)=>{const n=e[0],i=e[e.length-1],a="number"==typeof n?gc(v,n):v.indexOf(n),o="number"==typeof i?gc(v,i):v.indexOf(i)+1,s=o>v.length-1||o<0,l=a>v.length-1||a<0,c=w(l?v[0]:v[a]),u=w(s?v[v.length-1]:v[o]);if(void 0===c||void 0===u)return null;const h=r.left+c,d=u-c+(s||l?S:0),{y:f,totalHeight:g}=t.filter((e=>p.includes(e))).reduce(((e,t,n)=>(0===n&&(e.y=y(t)||0),e.totalHeight+=k,e)),{y:0,totalHeight:0});return{x:h,y:f+r.top,width:d,height:g}},P=[];for(let D=0;D<v.length+1;D++){const e=r.left+D*S,t=r.top,n=t+k*c;P.push({x1:e,y1:t,x2:e,y2:n})}const z=[];for(let D=0;D<c+1;D++){const e=r.top+D*k;z.push({x1:r.left,y1:e,x2:r.width+r.left,y2:e})}return{config:n,heatmapViewModel:{gridOrigin:{x:r.left,y:r.top},gridLines:{x:P,y:z,stroke:{color:Ft(n.grid.stroke.color),width:d}},pageSize:c,cells:Object.values(I),xValues:C,yValues:T},pickQuads:(e,t)=>{if(e>0&&e<r.left&&t>r.top&&t<r.height+r.top){const e=b(t-r.top),n=T.find((t=>t.value===e));if(n)return n}if(e<r.left||t<r.top)return[];if(e>r.width+r.left||t>r.height+r.top)return[];const n=M(e-r.left),i=b(t-r.top);if(void 0===n||void 0===i)return[];const a=Nf(n,i),o=I[a];return o?[o]:[]},pickDragArea:j,pickDragShape:e=>{const t=j(e);return L(t.x,t.y)},pickHighlightedArea:L}}(ha(s),e,d,0,n,i,r,a,o)}const $f=fn([Cc,Af,hi,Hc,Tf,Pf,e=>e.interactions.deselectedDataSeries,Wc],((e,t,n,i,r,a,o,s)=>{const l=new Set(o.map((({specId:e})=>Number(e)))),{ticks:c}=r,u=c.reduce(((e,t,n)=>{if(l.has(t)){const i=n+1===c.length?null:c[n+1];e.push([t,i])}return e}),[]);return e?Vf(e,0,t,i,r,u,s):uc()})),Ff=fn([e=>e.parentDimensions,ls,Ec,Zo],((e,t,{maxLegendHeight:n},{showLegend:i,legendPosition:r})=>{if(!i||r.floating)return e;if(r.direction===Mn.Vertical)return{left:0,top:0,width:e.width-t.width-2*t.margin,height:e.height};const a=null!=n?n:t.height+2*t.margin;return{left:0,top:0,width:e.width,height:e.height-a}})),Bf=.001;function Hf(e,t,n){n.width<Bf||0===t.length||Al(e,(e=>{e.strokeStyle=Wt(n.color),e.lineJoin="round",e.lineWidth=n.width,n.dash&&e.setLineDash(n.dash),e.beginPath();for(const n of t)if("string"==typeof n)e.stroke(new Path2D(n));else{const{x1:t,y1:i,x2:r,y2:a}=n;e.moveTo(t,i),e.lineTo(r,a)}e.stroke()}))}function Wf(e,t,n,i,r=0,a,o=1){!function(e,t,n=0,i){Al(e,(e=>{const{x:r,y:a}=t;e.translate(r,a),e.rotate(jn(n)),e.translate(-r,-a),i(e)}))}(e,t,r,(e=>{Al(e,(e=>{var r,s,l;e.fillStyle=i.fill,e.textAlign=i.align,e.textBaseline=i.baseline,e.font=ua(i,i.fontSize),((null==a?void 0:a.x)||(null==a?void 0:a.y))&&e.translate(null!==(r=null==a?void 0:a.x)&&void 0!==r?r:0,null!==(s=null==a?void 0:a.y)&&void 0!==s?s:0),e.translate(t.x,t.y),e.scale(o,o);const c=null!==(l=i.shadowSize)&&void 0!==l?l:0;i.shadow&&c>0&&(e.lineJoin="round",e.lineWidth=c,e.strokeStyle=i.shadow,e.strokeText(n,0,0)),e.fillText(n,0,0)}))}))}function Uf(e,t,n,i,r,a,{wrapAtWord:o,shouldAddEllipsis:s}={wrapAtWord:!0,shouldAddEllipsis:!1}){const l=t.split("\n");let c=0;const u=1*i,h=r-0,d=a-0;let f=0;const p=[],g=ha(e),m=e=>{const t=g(i,[Object.assign({text:e},n)]),[r]=t;return r?r.width:0},y=s?m("…"):0;for(let b=0,v=l.length;b<v;++b){let e=l[b],t=m(e);if(r&&t>h)for(;e.length>0;){let n=0,i=e.length,r="",l=0;for(;n<i;){const t=n+i>>>1,a=e.slice(0,t+1),o=m(a)+y;o<=h?(n=t+1,r=a+(s?"…":""),l=o):i=t}if(!r)break;if(o){const t=e[r.length],i=(" "===t||"-"===t)&&l<=h?r.length:Math.max(r.lastIndexOf(" "),r.lastIndexOf("-"))+1;i>0&&(n=i,r=r.slice(0,n),l=m(r))}if(r=r.trimEnd(),p.push(r),c=Math.max(c,l),f+=u,a&&f+u>d)break;if(e=e.slice(n),e=e.trimStart(),e.length>0&&(t=m(e),t<=h)){p.push(e),f+=u,c=Math.max(c,t);break}}else p.push(e),f+=u,c=Math.max(c,t);if(a&&f+u>d)break}return{lines:p,height:i,width:c}}let Yf=class extends i.Component{constructor(e){super(e),this.ctx=null,this.devicePixelRatio=window.devicePixelRatio}componentDidMount(){this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}componentDidUpdate(){this.ctx||this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}tryCanvasContext(){const e=this.props.forwardStageRef.current;this.ctx=e&&e.getContext("2d")}drawCanvas(){if(this.ctx){const{width:e,height:t}=this.props.chartContainerDimensions;!function(e,t,{config:n,heatmapViewModel:i}){Al(e,(e=>{e.scale(t,t),e.textAlign="center",e.textBaseline="middle";const r=i.cells.filter((e=>e.yIndex<i.pageSize)),a=i.yValues.filter(((e,t)=>t<i.pageSize));Il(e,[e=>Tl(e,n.width,n.height),e=>{Al(e,(e=>{Hf(e,i.gridLines.x,i.gridLines.stroke),Hf(e,i.gridLines.y,i.gridLines.stroke)}))},e=>Al(e,(e=>{const{x:t,y:n}=i.gridOrigin;e.translate(t,n),r.forEach((t=>{t.visible&&Ql(e,t,t.fill,t.stroke)}))})),e=>Al(e,(e=>{const{x:t,y:a}=i.gridOrigin;e.translate(t,a),n.cell.label.visible&&r.forEach((t=>{t.visible&&Wf(e,{x:t.x+t.width/2,y:t.y+t.height/2},t.formatted,n.cell.label)}))})),e=>Al(e,(e=>{n.yAxisLabel.visible&&a.forEach((t=>{var r,a;const o={fontFamily:n.yAxisLabel.fontFamily,fontStyle:n.yAxisLabel.fontStyle?n.yAxisLabel.fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",textColor:"black",textOpacity:1},{padding:s}=n.yAxisLabel,l="number"==typeof s?2*s:(null!==(r=s.left)&&void 0!==r?r:0)+(null!==(a=s.right)&&void 0!==a?a:0),[c]=Uf(e,t.text,o,n.yAxisLabel.fontSize,i.gridOrigin.x-l,16,{shouldAddEllipsis:!0,wrapAtWord:!1}).lines;Wf(e,{x:t.x,y:t.y},c,Object.assign(Object.assign({},n.yAxisLabel),{align:"right"}))}))})),e=>Al(e,(e=>{if(!n.xAxisLabel.visible)return;const t=n.xAxisLabel.labelRotation;let r="center";90===t?r="left":-90===t&&(r="right");const a=i.gridLines.x.length,o=i.xValues.length;let s;if(o>a){const e=Math.ceil(o/a);s=i.xValues.filter(((t,n)=>n%e==0))}(null!=s?s:i.xValues).forEach((t=>{Wf(e,{x:t.x,y:t.y},t.text,Object.assign(Object.assign({},n.xAxisLabel),{align:r}),n.xAxisLabel.labelRotation)}))}))])}))}(this.ctx,this.devicePixelRatio,Object.assign(Object.assign({},this.props.geometries),{config:Object.assign(Object.assign({},this.props.geometries.config),{width:e,height:t})}))}}render(){const{initialized:e,chartContainerDimensions:{width:t,height:n},forwardStageRef:r,a11ySettings:a}=this.props;return e&&0!==t&&0!==n?i.createElement("figure",{"aria-labelledby":a.labelId,"aria-describedby":a.descriptionId},i.createElement("canvas",{ref:r,className:"echCanvasRenderer",width:t*this.devicePixelRatio,height:n*this.devicePixelRatio,style:{width:t,height:n},role:"presentation"},i.createElement(Aa,null))):null}};Yf.displayName="Heatmap";const Gf={initialized:!1,geometries:uc(),chartContainerDimensions:{width:0,height:0,left:0,top:0},a11ySettings:wa},qf=o((e=>vi(e)!==bi.Initialized?Gf:{initialized:!0,geometries:$f(e),chartContainerDimensions:Ff(e),a11ySettings:Ma(e)}),(e=>s({onChartRendered:El},e)))(Yf);const Xf=fn([$f,function(e){return e.interactions.pointer}],((e,t)=>t.dragging&&t.down?e.pickDragShape([t.down.position,t.current.position]):null)),Zf=fn([e=>e.interactions.pointer],(e=>e.dragging)),Kf=fn([Cc,Zf],((e,t)=>!e.highlightedData||t?null:e.highlightedData)),Qf=fn([$f,Cc,Zf],((e,t,n)=>!t.highlightedData||n?null:e.pickHighlightedArea(t.highlightedData.x,t.highlightedData.y))),Jf={chartId:"empty",initialized:!1,canvasDimension:{width:0,height:0,left:0,top:0},geometries:uc(),dragShape:{x:0,y:0,height:0,width:0},brushArea:Wo.brushArea,brushMask:Wo.brushMask},ep=o((e=>{if(vi(e)!==bi.Initialized)return Jf;const{chartId:t}=e,n=$f(e),i=Af(e);let r=Xf(e);const a=Qf(e);a&&(r=a);const{brushMask:o,brushArea:s}=Ec(e);return{chartId:t,initialized:!0,canvasDimension:i,geometries:n,dragShape:r,brushMask:o,brushArea:s}}))((({initialized:e,dragShape:t,chartId:n,canvasDimension:r,brushArea:a,brushMask:o})=>{if(!e||null===t)return null;const s=`echHighlighterMask__${n}`;return i.createElement("svg",{className:"echHighlighter",width:"100%",height:"100%"},i.createElement("defs",null,i.createElement("mask",{id:s},o.visible&&i.createElement("rect",{x:0,y:r.top,width:r.width+r.left,height:r.height,fill:"#eee"}),a.visible&&i.createElement(i.Fragment,null,i.createElement("rect",{x:t.x,y:t.y,width:t.width,height:t.height,fill:a.fill}),i.createElement("rect",{x:0,y:t.y,width:r.left,height:t.height,fill:a.fill})))),i.createElement("g",null,o.visible&&i.createElement("rect",{x:0,y:r.top,width:r.width+r.left,height:r.height,mask:`url(#${s})`,fill:o.fill}),a.visible&&i.createElement(i.Fragment,null,i.createElement("line",{x1:t.x,y1:t.y,x2:t.x+t.width,y2:t.y,stroke:a.stroke,strokeWidth:a.strokeWidth}),i.createElement("line",{x1:t.x,y1:t.y+t.height,x2:t.x+t.width,y2:t.y+t.height,stroke:a.stroke,strokeWidth:a.strokeWidth}),i.createElement("line",{x1:t.x,y1:t.y,x2:t.x,y2:t.y+t.height,stroke:a.stroke,strokeWidth:a.strokeWidth}),i.createElement("line",{x1:t.x+t.width,y1:t.y,x2:t.x+t.width,y2:t.y+t.height,stroke:a.stroke,strokeWidth:a.strokeWidth}))))})),tp=fn([e=>e.interactions.pointer.dragging,e=>e.interactions.pointer.down,e=>e.interactions.pointer.current.position,di,hi,Af],((e,t,n,i,{brushAxis:r},a)=>{if(!e||!t)return null;const o={x:t.position.x-a.left,y:t.position.y};return ti.Both,{top:o.y,left:o.x,width:n.x-o.x-a.left,height:n.y-o.y}}));const np=fn([$f,function(e){return e.interactions.pointer.current.position}],((e,t)=>{const n=e.pickQuads,{x:i,y:r}=t;return n(i,r)})),ip=fn([np,Zf],((e,t)=>t||Array.isArray(e)&&e.length>0?"pointer":Ee));function rp(e){return e.interactions.pointer.lastDrag}const ap=fn([$f,rp],((e,t)=>t?e.pickDragArea([t.start.position,t.end.position]):null)),op=fn([$f,Lf,Qf,ap,Kf],((e,t,n,i,r)=>({legend:sp(t),axes:{x:[{id:"x",position:wn.Left,labels:e.heatmapViewModel.xValues.map((({text:e})=>e)),values:e.heatmapViewModel.xValues.map((({value:e})=>e)),gridlines:e.heatmapViewModel.gridLines.x.map((e=>({x:e.x1,y:e.y2})))}],y:[{id:"y",position:wn.Bottom,labels:e.heatmapViewModel.yValues.map((({text:e})=>e)),values:e.heatmapViewModel.yValues.map((({value:e})=>e)),gridlines:e.heatmapViewModel.gridLines.y.map((e=>({x:e.x2,y:e.y1})))}]},heatmap:{cells:e.heatmapViewModel.cells.map((({x:e,y:t,fill:n,formatted:i,value:r})=>({x:e,y:t,fill:Wt(n.color),formatted:i,value:r}))),selection:{area:n,data:r}}})));function sp(e){return{items:e.filter((({isSeriesHidden:e})=>!e)).map((({label:e,color:t,seriesIdentifiers:[{key:n}]})=>({key:n,name:e,color:t})))}}const lp=fn([np,Af,function(e){return e.interactions.pointer.current.position}],((e,t,n)=>{if(Array.isArray(e)&&e.length>0){const n=e[0];return{x:n.x+t.left,width:n.width,y:n.y+t.top,height:n.height}}return{x:n.x,width:0,y:n.y,height:0}})),cp=fn([Ec],(e=>Boolean(e.onBrushEnd)&&e.brushTool.visible)),up=fn([Ec],(e=>Boolean(e.onBrushEnd))),hp=Object.freeze({header:null,values:[]}),dp=fn([jf,Ec,np],((e,t,n)=>{if(!e)return hp;const i={header:null,values:[]};return Array.isArray(n)?n.filter((({visible:e})=>e)).forEach((n=>{var r;i.values.push({label:t.xAxisLabel.name,color:"transparent",isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:e.id,key:e.id},value:`${n.datum.x}`,formattedValue:t.xAxisLabel.formatter(n.datum.x),datum:n.datum}),i.values.push({label:t.yAxisLabel.name,color:"transparent",isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:e.id,key:e.id},value:`${n.datum.y}`,formattedValue:t.yAxisLabel.formatter(n.datum.y),datum:n.datum}),i.values.push({label:null!==(r=e.name)&&void 0!==r?r:e.id,color:Wt(n.fill.color),isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:e.id,key:e.id},value:`${n.value}`,formattedValue:`${n.formatted}`,datum:n.datum})})):i.values.push({label:"",color:"transparent",isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:e.id,key:e.id},value:`${n.value}`,formattedValue:`${n.value}`,datum:n.value}),i})),fp=fn([hi,dp],((e,t)=>Ei(e)!==ei.None&&t.values.length>0));function pp(e,t){return function(e){return(null==e?void 0:e.type)===Jn.Over}(t)&&(void 0===t.unit||t.unit===e.unit)}function gp(e,t){if(null===t)return!1;if(!t.onBrushEnd)return!1;const n=null!==e?e.lastDrag:null,i=null!==t?t.lastDrag:null;return null===n&&null!==i||null!==n&&null!==i&&n.end.time!==i.end.time}const mp=new Map;class yp{constructor(){this.chartType=Ce.Heatmap,this.onElementClickCaller=function(){let e=null,t=null;return n=>{null===t&&n.chartType===Ce.Heatmap&&(t=fn([jf,Gl,hi,np],((t,n,i,r)=>{if(t&&i.onElementClick&&lc(r)){if(r.length>0&&ci(e,n)&&i&&i.onElementClick){const e=r.map((e=>[e,{specId:t.id,key:`spec{${t.id}}`}]));i.onElementClick(e)}e=n}}))),t&&t(n)}}(),this.onElementOverCaller=function(){let e=[],t=null;return n=>{null===t&&n.chartType===Ce.Heatmap&&(t=fn([jf,np,hi],((t,n,i)=>{if(t&&i.onElementOver&&lc(n)){if(function(e=[],t){if(0!==t.length)return t.length!==e.length||!t.every(((t,n)=>{const i=e[n];return null!==i&&t.value===i.value&&t.x===i.x&&t.y===i.y}))}(e,n)){const e=n.map((e=>[e,{specId:t.id,key:`spec{${t.id}}`}]));i.onElementOver(e)}e=n}}))),t&&t(n)}}(),this.onElementOutCaller=function(){let e=null,t=null;return n=>{null===t&&n.chartType===Ce.Heatmap&&(t=fn([jf,np,hi],((t,n,i)=>{if(!t)return;if(!i.onElementOut)return;const r=lc(n)?n.length:0;null!==e&&e>0&&0===r&&i.onElementOut(),e=r}))),t&&t(n)}}(),this.onBrushEndCaller=function(){let e=null,t=null;return n=>{if(null===t&&n.chartType===Ce.Heatmap){if(!up(n))return t=null,void(e=null);t=fn([rp,jf,Ec,ap],((t,n,{onBrushEnd:i},r)=>{const a={lastDrag:t,onBrushEnd:i};n&&i&&null!==r&&(null!==t&&gp(e,a)&&i(r),e=a)}))}t&&t(n)}}()}isInitialized(e){return null!==jf(e)?bi.Initialized:bi.ChartNotInitialized}isBrushAvailable(e){return cp(e)}isBrushing(e){return Zf(e)}isChartEmpty(){return!1}getLegendItems(e){return Lf(e)}getLegendItemsLabels(e){return Pf(e)}getLegendExtraValues(){return mp}chartRenderer(e,t){return i.createElement(i.Fragment,null,i.createElement(Zr,{getChartContainerRef:e}),i.createElement(qf,{forwardStageRef:t}),i.createElement(sc,null),i.createElement(ep,null))}getPointerCursor(e){return ip(e)}isTooltipVisible(e){return{visible:fp(e),isExternal:!1}}getTooltipInfo(e){return dp(e)}getTooltipAnchor(e){return lp(e)}getProjectionContainerArea(e){return cs(e)}getMainProjectionArea(e){return Af(e)}getBrushArea(e){return tp(e)}getDebugState(e){return op(e)}getChartTypeDescription(){return"Heatmap chart"}eventCallbacks(e){this.onElementOverCaller(e),this.onElementOutCaller(e),this.onElementClickCaller(e),this.onBrushEndCaller(e)}}const bp=e=>e,vp=new Map;function xp(e,t,{config:{sectorLineWidth:n,width:i,height:r,animation:a},quadViewModel:o,diskCenter:s,width:l,height:c,layers:u},{currentFocusX0:h,currentFocusX1:d,prevFocusX0:f,prevFocusX1:p},g){if(null==a?void 0:a.duration){const e=vp.get(g);void 0!==e&&window.cancelAnimationFrame(e),m(0);(h!==f||d!==p)&&vp.set(g,window.requestAnimationFrame((e=>{const t=n=>{const i=Math.max(0,Math.min(1,(n-e)/a.duration));m(i),i<1&&vp.set(g,window.requestAnimationFrame(t))};vp.set(g,window.requestAnimationFrame(t))})))}else m(1);function m(g,m=(a.duration?(e=>t=>Math.pow(t,e)/(Math.pow(t,e)+Math.pow(1-t,e)))(Math.min(5,a.duration/100)):bp)){const y=i*l,b=r*c,v=m(g),x=v*h+(1-v)*f||0,w=i/((v*d+(1-v)*p||0)-x);e.save(),e.textAlign="left",e.textBaseline="middle",e.scale(t,t),e.translate(s.x,s.y),e.clearRect(0,0,y,b),o.forEach((({fillColor:t,x0:i,x1:r,y0px:a,y1px:o,dataName:s,textColor:l,depth:c})=>{var h,d;if(o-a<=n)return;const f=Math.max((i-x)*w,0),p=Math.min((r-x)*w,y);if(p<0||f>y)return;const g=(null!==(d=null===(h=u[c])||void 0===h?void 0:h.nodeLabel)&&void 0!==d?d:String)(s),m=p-f,b=Math.min(n,.25*m);e.fillStyle=t,e.beginPath(),e.rect(f+b,a+n/2,m-b,o-a-n),e.fill(),"transparent"===l||""===g||m<4||(e.fillStyle=l,e.save(),e.clip(),e.fillText(g,f+3*b,(a+o)/2),e.restore())})),e.restore()}}function wp(e,t,n){t.rows.forEach(function(e,{fontSize:t,fillTextColor:n,rotation:i,verticalAlignment:r,leftAlign:a,container:o,clipText:s},l){return c=>{const u=a?c.rowAnchorX-c.maximumLength/2:c.rowAnchorX-Math.cos(i)*c.length/2,h=-c.rowAnchorY+Math.sin(i)*c.length/2;Number.isFinite(u)&&Number.isFinite(h)&&Al(e,(e=>{e.scale(1,-1),s&&(e.rect(o.x0+1,o.y0+1,o.x1-o.x0-2,o.y1-o.y0-2),e.clip()),e.beginPath(),e.translate(u,h),e.rotate(-i),e.fillStyle=null!=n?n:l,e.textBaseline=r,c.rowWords.forEach((n=>{e.font=ua(n,t),e.fillText(n.text,n.width/2+n.wordBeginning,0)})),e.closePath()}))}}(e,t,n))}function Mp(e,t){Al(e,(e=>{e.scale(1,-1),t.forEach((t=>{t.x0!==t.x1&&function(e,{strokeWidth:t,strokeStyle:n,fillColor:i,x0:r,x1:a,y0px:o,y1px:s}){const l=r-Ae/4,c=a-Ae/4;if(e.fillStyle=i,e.beginPath(),e.arc(0,0,o,l,l),e.arc(0,0,s,l,c,!1),e.arc(0,0,o,c,l,!0),e.fill(),t>.001&&(0!==r||a!==Ae))if(e.lineWidth=t,a-r<15*Ae/360){e.beginPath(),e.arc(0,0,s,l,c,!1),e.stroke(),e.beginPath(),e.arc(0,0,o,c,l,!0),e.stroke(),e.fillStyle=n,e.beginPath();const i=Math.max(50,10*t/(c-l)),r=t/i;e.arc(0,0,o,l,l+r*(i/o)),e.arc(0,0,Math.min(i,s),l+r,l+r),e.arc(0,0,s,l+r*(i/s),l,!0),e.arc(0,0,o,l,l),e.fill()}else e.strokeStyle=n,e.stroke()}(e,t)}))}))}function Sp(e,t,{width:n,height:i,panelTitle:r,config:a,quadViewModel:o,rowSets:s,outsideLinksViewModel:l,linkLabelViewModels:c,diskCenter:u,outerRadius:h}){const{sectorLineWidth:d,sectorLineStroke:f,linkLabel:p}=a,g=Ut(p.textColor,p.textOpacity);Al(e,(e=>{e.scale(t,t),e.textAlign="center",e.textBaseline="bottom",e.fillText(r,qs(a.partitionLayout)?u.x:u.x+a.width*n/2,qs(a.partitionLayout)?a.linkLabel.maxCount>0?u.y-a.height*i/2+16:u.y-h-5.6:u.y+12),e.textBaseline="middle",e.translate(u.x,u.y),e.scale(1,-1),e.lineJoin="round",e.strokeStyle=f,e.lineWidth=d,Il(e,[e=>qs(a.partitionLayout)?Mp(e,o):function(e,t){Al(e,(e=>{e.scale(1,-1),t.forEach((({strokeWidth:t,fillColor:n,x0:i,x1:r,y0px:a,y1px:o})=>{r-i>=1&&o-a>=1&&(e.fillStyle=n,e.beginPath(),e.moveTo(i,a),e.lineTo(i,o),e.lineTo(r,o),e.lineTo(r,a),e.lineTo(i,a),e.fill(),t>.001&&(e.lineWidth=t,e.stroke()))}))}))}(e,o),e=>function(e,t,n){t.forEach((t=>wp(e,t,n)))}(e,s,g),e=>function(e,t,n,i){Al(e,(e=>{e.lineWidth=i,e.strokeStyle=n,t.forEach((({points:t})=>{e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(let n=1;n<t.length;n++)e.lineTo(t[n][0],t[n][1]);e.stroke()}))}))}(e,l,g,p.lineWidth),e=>function(e,t,n,{linkLabels:i,labelFontSpec:r,valueFontSpec:a,strokeColor:o},s){const l=Ut(r.textColor,r.textOpacity),c=Ut(a.textColor,a.textOpacity),u=t/2;Al(e,(e=>{e.lineWidth=n,i.forEach((({linkLabels:n,translate:i,textAlign:h,text:d,valueText:f,width:p,valueWidth:g})=>{e.beginPath(),e.moveTo(...n[0]),n.slice(1).forEach((t=>e.lineTo(...t))),e.strokeStyle=null!=o?o:s,e.stroke(),Al(e,(e=>{e.translate(...i),e.scale(1,-1),e.textAlign=h,e.strokeStyle=l,e.fillStyle=l,e.font=`${r.fontStyle} ${r.fontVariant} ${r.fontWeight} ${t}px ${r.fontFamily}`,e.fillText(d,"right"===h?-g-u:0,0),e.strokeStyle=c,e.fillStyle=c,e.font=`${a.fontStyle} ${a.fontVariant} ${a.fontWeight} ${t}px ${a.fontFamily}`,e.fillText(f,"left"===h?p+u:0,0)}))}))}))}(e,p.fontSize,p.lineWidth,c,g)])}))}class kp extends i.Component{constructor(e){super(e),this.ctx=null,this.devicePixelRatio=window.devicePixelRatio}componentDidMount(){this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}componentDidUpdate(){this.ctx||this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}handleMouseMove(e){const{initialized:t,chartContainerDimensions:{width:n,height:i},forwardStageRef:r}=this.props;if(!r.current||!this.ctx||!t||0===n||0===i)return;const a=this.props.geometries.pickQuads,o=this.props.geometriesFoci[0],s=r.current.getBoundingClientRect(),{diskCenter:l}=this.props.geometries,c=a(e.clientX-s.left-l.x,e.clientY-s.top-l.y,o),u=new Set;return c.forEach((e=>{const t=e[Lo].children.find((([t])=>t===e.dataName));if(t){(t[1][Pa]||[]).forEach((e=>u.add(e)))}})),c}render(){const{forwardStageRef:e,initialized:t,chartContainerDimensions:{width:n,height:r},a11ySettings:a,debug:o}=this.props;return t&&0!==n&&0!==r?i.createElement("figure",{"aria-labelledby":a.labelId,"aria-describedby":a.descriptionId},i.createElement("canvas",{ref:e,className:"echCanvasRenderer",width:n*this.devicePixelRatio,height:r*this.devicePixelRatio,onMouseMove:this.handleMouseMove.bind(this),style:{width:n,height:r},role:"presentation"},i.createElement(Aa,null),!o&&i.createElement(_l,null)),o&&i.createElement(_l,null)):null}drawCanvas(){if(this.ctx){const{width:e,height:t}=this.props.chartContainerDimensions;Tl(this.ctx,e*this.devicePixelRatio,t*this.devicePixelRatio);const{ctx:n,devicePixelRatio:i,props:{multiGeometries:r,geometriesFoci:a,chartId:o}}=this;r.forEach(((e,t)=>{(Ks(e.config,e.layers)?xp:Sp)(n,i,e,a[t],o)}))}}tryCanvasContext(){const e=this.props.forwardStageRef.current;this.ctx=e&&e.getContext("2d")}}kp.displayName="Partition";const _p={initialized:!1,chartId:"",geometries:ds(),geometriesFoci:[],multiGeometries:[],chartContainerDimensions:{width:0,height:0,left:0,top:0},a11ySettings:wa,debug:!1},Op=o((e=>{if(vi(e)!==bi.Initialized)return _p;const t=vl(e);return{initialized:!0,geometries:t.length>0?t[0]:ds(),multiGeometries:t,chartContainerDimensions:cs(e),geometriesFoci:wl(e),chartId:xa(e),a11ySettings:Ma(e),debug:hi(e).debug}}),(e=>s({onChartRendered:El},e)))(kp);const Cp=fn([vl,function(e){return e.interactions.pointer.current.position},wl],((e,{x:t,y:n},i)=>e.flatMap((({diskCenter:e,pickQuads:r})=>r(t-e.x,n-e.y,i[0]))))),Ep=fn([Cp],(function(e){const t=e.reduce(((e,t)=>Math.max(e,t.depth)),0);return e.filter((({depth:e})=>e===t)).map((e=>{const t=[{smAccessorValue:e.smAccessorValue,groupByRollup:e.dataName,value:e[Ta],depth:e[ja],sortIndex:e[Da],path:e[Na]}];let n=e[Lo];for(;n[ja]>0;){const i=n[Ta],r=Ya(n);t.push({smAccessorValue:e.smAccessorValue,groupByRollup:r,value:i,depth:n[ja],sortIndex:n[Da],path:n[Na]}),n=n[za]}return t.reverse()}))}));function Ap(e,t,n,i,r,a){const o=a?0:1;return`A${n},${n},0,${+((a?-1:1)*(r-i)>=Math.PI)},${o},${e+n*Math.cos(r)},${t+n*Math.sin(r)}`}function Tp(e,t,n,{currentFocusX0:r,currentFocusX1:a},o){const{x0:s,x1:l,y0px:c,y1px:u}=e,h=n.color?{fill:n.color}:{className:n.fillClassName},d=o/(a-r),f=Math.max((s-r)*d,0),p=Math.min((l-r)*d,o);return i.createElement("rect",Object.assign({key:t,x:f,y:c,width:Math.abs(p-f),height:Math.abs(u-c)},h))}function Ip(e,t,{color:n,fillClassName:r,strokeClassName:a}){const{x0:o,x1:s,y0px:l,y1px:c}=e;if((Math.abs(o-s)+Ae)%Ae<1e-6){const e=0===l?Object.assign({key:t,r:c,stroke:"none"},n?{fill:n}:{className:r}):Object.assign({key:t,r:(l+c)/2,strokeWidth:c-l,fill:"none"},n?{stroke:n}:{className:a});return i.createElement("circle",Object.assign({},e))}const u=o-Ae/4,h=s-Ae/4,d=[`M${l*Math.cos(u)},${l*Math.sin(u)}`,Ap(0,0,l,u,h,!1),`L${c*Math.cos(h)},${c*Math.sin(h)}`,Ap(0,0,c,h,u,!0),"Z"].join(" "),f=n?{fill:n}:{className:r};return i.createElement("path",Object.assign({key:t,d:d},f))}function jp(e,t,n,i,r){const a=e.reduce(((e,t)=>Math.max(e,t.depth)),0),o=Gs(t)||Ys(t)?e.filter((e=>e.depth>=a)):e,s=qs(t)?Ip:Tp;return o.map(((e,t)=>{var a;return s(e,`${t}`,n,null!==(a=i[0])&&void 0!==a?a:{currentFocusX0:NaN,currentFocusX1:NaN,prevFocusX0:NaN,prevFocusX1:NaN},r)}))}let Lp=class extends i.Component{renderAsMask(){const{chartId:e,canvasDimension:{width:t},highlightSets:n}=this.props,r=(t,n)=>`echHighlighterMask__${e}__${t}__${n}`,a=n.some((({geometries:e})=>e.length>0))?n:[];return i.createElement(i.Fragment,null,i.createElement("defs",null,a.filter((({geometries:e})=>e.length>0)).map((({geometries:e,geometriesFoci:n,diskCenter:a,index:o,innerIndex:s,partitionLayout:l,marginLeftPx:c,marginTopPx:u,panelInnerWidth:h,panelInnerHeight:d})=>i.createElement("mask",{key:r(o,s),id:r(o,s)},i.createElement("rect",{x:c,y:u,width:h,height:d,fill:"white"}),i.createElement("g",{transform:`translate(${a.x}, ${a.y})`},jp(e,l,{color:"black"},n,t)))))),a.map((({diskCenter:e,outerRadius:t,index:n,innerIndex:a,partitionLayout:o,marginLeftPx:s,marginTopPx:l,panelInnerWidth:c,panelInnerHeight:u})=>qs(o)?i.createElement("circle",{key:`${n}__${a}`,cx:e.x,cy:e.y,r:t,mask:`url(#${r(n,a)})`,className:"echHighlighter__mask"}):i.createElement("rect",{key:`${n}__${a}`,x:s,y:l,width:c,height:u,mask:`url(#${r(n,a)})`,className:"echHighlighter__mask"}))))}renderAsOverlay(){const{canvasDimension:{width:e}}=this.props;return this.props.highlightSets.filter((({geometries:e})=>e.length>0)).map((({index:t,innerIndex:n,partitionLayout:r,geometries:a,diskCenter:o,geometriesFoci:s})=>i.createElement("g",{key:`${t}|${n}`,transform:`translate(${o.x}, ${o.y})`},jp(a,r,{fillClassName:"echHighlighterOverlay__fill",strokeClassName:"echHighlighterOverlay__stroke"},s,e))))}render(){return i.createElement("svg",{className:"echHighlighter",width:"100%",height:"100%"},this.props.renderAsOverlay?this.renderAsOverlay():this.renderAsMask())}};Lp.displayName="Highlighter";const Pp={chartId:"empty",initialized:!1,renderAsOverlay:!1,canvasDimension:{width:0,height:0,left:0,top:0},highlightSets:[Object.assign(Object.assign({},hs(Ro.partitionLayout.dflt)),{geometries:[],geometriesFoci:[],diskCenter:{x:0,y:0},outerRadius:10})]};function zp(e,t){return n=>{const{index:i}=n,{innerIndex:r}=n;return Object.assign(Object.assign({},n),{geometries:e.filter((({index:e,innerIndex:t})=>i===e&&r===t)),geometriesFoci:t.filter((({index:e,innerIndex:t})=>i===e&&r===t))})}}const Dp=o((e=>{if(vi(e)!==bi.Initialized)return Pp;const t=cs(e),{chartId:n}=e,i=vl(e),r=wl(e),a=Cp(e);return{chartId:n,initialized:!0,renderAsOverlay:!0,canvasDimension:t,highlightSets:i.map(zp(a,r))}}))(Lp),Np={node:e=>({path:t})=>e.length===t.length&&e.every((({index:e,value:n},i)=>{var r,a;return e===(null===(r=t[i])||void 0===r?void 0:r.index)&&n===(null===(a=t[i])||void 0===a?void 0:a.value)})),path:e=>({path:t})=>t.every((({index:t,value:n},i)=>{var r,a;return t===(null===(r=e[i])||void 0===r?void 0:r.index)&&n===(null===(a=e[i])||void 0===a?void 0:a.value)})),keyInLayer:e=>({path:t,dataName:n})=>e.length===t.length&&n===e[e.length-1].value,key:e=>({dataName:t})=>t===e[e.length-1].value,nodeWithDescendants:e=>({path:t})=>e.every((({index:e,value:n},i)=>{var r,a;return e===(null===(r=t[i])||void 0===r?void 0:r.index)&&n===(null===(a=t[i])||void 0===a?void 0:a.value)})),pathWithDescendants:e=>({path:t})=>e.slice(0,t.length).every((({index:e,value:n},i)=>{var r,a;return e===(null===(r=t[i])||void 0===r?void 0:r.index)&&n===(null===(a=t[i])||void 0===a?void 0:a.value)}))},Rp=Object.freeze({Node:"node",Path:"path",KeyInLayer:"keyInLayer",Key:"key",NodeWithDescendants:"nodeWithDescendants",PathWithDescendants:"pathWithDescendants"}),Vp=Rp.Key;const $p=fn([hi,e=>e.interactions.highlightedLegendPath,vl],(({legendStrategy:e,flatLegend:t},n,i)=>0===n.length?[]:i.flatMap((({quadViewModel:i})=>function(e,t,n,i){const r=t?Rp.Key:null!=e?e:Vp;return n.filter(Np[r](i))}(e,t,i,n))))),Fp=o((e=>{if(vi(e)!==bi.Initialized)return Pp;const{chartId:t}=e,n=$p(e),i=wl(e),r=cs(e),a=vl(e),o=zp(n,i);return{chartId:t,initialized:!0,renderAsOverlay:!1,canvasDimension:r,highlightSets:a.map(o)}}))(Lp);function Bp(...e){return e.join("---")}function Hp({index:e,innerIndex:t,path:n},{index:i,innerIndex:r,path:a}){if(e!==i)return e-i;if(t!==r)return t-r;for(let o=0;o<Math.min(n.length,a.length);o++){const e=n[o].index-a[o].index;if(e)return e}return n.length-a.length}function Wp(e,t,n,i,r,a){const o=new Set(function(e,t){let n=0;return function*(){for(const i of t)yield e(i,n++)}()}((({dataName:e,fillColor:t})=>Bp(e,t)),a)),s=((e,t)=>!e&&!Oc(t))(n,r),l=({dataName:e,depth:n})=>{var i;const r=null===(i=t[n-1])||void 0===i?void 0:i.nodeLabel;return r?r(e):e};const c=new Set,u=a.filter((({depth:e,dataName:t,fillColor:n})=>{if(null!==i&&e>i)return!1;if(!s){const e=Bp(t,n);if(o.has(e)&&c.has(e))return!1;c.add(e)}return!0}));return u.sort(n?function(e,t){const n=l(e),i=l(t);return n<i?-1:n>i?1:0}:Hp),u.map((t=>{const{dataName:n,fillColor:i,depth:r,path:a}=t;return{color:i,label:l(t),childId:n,depth:s?r-1:0,path:a,seriesIdentifiers:[{key:n,specId:e}],keys:[]}}))}const Up=fn([al,Zo,vl],((e,{flatLegend:t,legendMaxDepth:n,legendPosition:i},r)=>e.flatMap(((e,a)=>{const o=r.filter((e=>e.index===a)).flatMap((e=>e.quadViewModel));return Wp(e.id,e.layers,t,n,i,o)}))));function Yp(e){return li(e.specs,Ce.Partition,Zn.Series)}function Gp(e){const t=Yp(e);return t.length>0?t[0]:null}const qp=fn([Gp],(e=>{var t;return null!==(t=`${null==e?void 0:e.config.partitionLayout} chart`)&&void 0!==t?t:"Partition chart"})),Xp=fn([vl],(e=>({partition:e.reduce(((e,{panelTitle:t,config:n,quadViewModel:i,diskCenter:r})=>{const a=i.map((e=>{const{dataName:t,depth:i,fillColor:a,value:o}=e;return{name:t,depth:i,color:a,value:o,coords:qs(n.partitionLayout)?Zp(e,r):Kp(e,r)}}));return e.push({panelTitle:t,partitions:a}),e}),[])})));function Zp({x0:e,x1:t,y1px:n,y0px:i},r){const a=e-Ae/4,o=i+(n-i)/2,s=a+(t-Ae/4-a)/2;return[Math.round(Math.cos(s)*o+r.x),Math.round(Math.sin(s)*o+r.y)]}function Kp({x0:e,x1:t,y1px:n,y0px:i},r){const a=Math.round(i+(n-i)/2+r.y);return[Math.round(e+(t-e)/2+r.x),a]}const Qp=fn([Gp,hi,ml],((e,{legendMaxDepth:t},n)=>{const i=new Map;return e&&!Number.isNaN(t)&&t>0?n.reduce(((n,{tree:i})=>{const r=pl(e.layers,e.valueFormatter,i,t);for(const[e,t]of r)n.set(e,t);return n}),i):i}));function Jp(e,t,n){return eg(e,0,t).filter((({depth:e})=>e<=n))}function eg(e,t,n,i=new Map){var r;if(0===n.length)return[];for(const[a,o]of n){const n=e[t-1],s=null==n?void 0:n.nodeLabel;let l="";null!=a&&(l=s?s(a):`${a}`),null!=l&&""!==l&&l!==Ra&&i.set(l,Math.max(t,null!==(r=i.get(l))&&void 0!==r?r:0));eg(e,t+1,o[La],i)}return[...i.keys()].map((e=>{var t;return{label:e,depth:null!==(t=i.get(e))&&void 0!==t?t:0}}))}const tg=fn([al,hi,ml],((e,{legendMaxDepth:t,showLegend:n},i)=>e.flatMap((({layers:e})=>n?i.flatMap((({tree:n})=>Jp(e,n,t))):[])))),ng=Object.freeze({header:null,values:[]});const ig=fn([Gp,Cp],((e,t)=>e?function(e,t,n,i,r,a){if(!i||!t)return ng;const o={header:null,values:[]},s=il(n),l=s===Po?jo:s;return e.forEach((e=>{const n=t[e.depth-1],s=l(e);o.values.push({label:n?n(e.dataName):e.dataName,color:e.fillColor,isHighlighted:!1,isVisible:!0,seriesIdentifier:{specId:a,key:a},value:s,formattedValue:`${i(s)} (${r(Po(e))})`,valueAccessor:e.depth})})),o}(t,e.layers.map((e=>e.nodeLabel)),e.valueGetter,e.valueFormatter,e.percentFormatter,e.id):ng)),rg=fn([hi,ig],((e,t)=>Ei(e)!==ei.None&&t.values.length>0));class ag{constructor(){this.chartType=Ce.Partition,this.onElementClickCaller=function(){const e={click:null};let t=null;return n=>{null===t&&n.chartType===Ce.Partition&&(t=fn([Gp,Gl,hi,Ep],Wl(e))),t&&t(n)}}(),this.onElementOverCaller=function(){const e={pickedShapes:[]};let t=null;return n=>{null===t&&n.chartType===Ce.Partition&&(t=fn([Gp,Ep,hi],Yl(e))),t&&t(n)}}(),this.onElementOutCaller=function(){const e={pickedShapes:null};let t=null;return n=>{null===t&&n.chartType===Ce.Partition&&(t=fn([Gp,Ep,hi],Ul(e))),t&&t(n)}}()}isInitialized(e){return null!==Gp(e)?bi.Initialized:bi.SpecNotInitialized}isBrushAvailable(){return!1}isBrushing(){return!1}isChartEmpty(){return!1}getLegendItemsLabels(e){return tg(e)}getLegendItems(e){return Up(e)}getLegendExtraValues(e){return Qp(e)}chartRenderer(e,t){return function(e,t){return i.createElement(i.Fragment,null,i.createElement(Zr,{getChartContainerRef:e}),i.createElement(Op,{forwardStageRef:t}),i.createElement(Dp,null),i.createElement(Fp,null))}(e,t)}getPointerCursor(){return Ee}isTooltipVisible(e){return{visible:rg(e),isExternal:!1}}getTooltipInfo(e){return ig(e)}getTooltipAnchor(e){const{position:t}=e.interactions.pointer.current;return{isRotated:!1,x:t.x,width:0,y:t.y,height:0}}eventCallbacks(e){this.onElementOverCaller(e),this.onElementOutCaller(e),this.onElementClickCaller(e)}getProjectionContainerArea(){return{width:0,height:0,top:0,left:0}}getMainProjectionArea(){return{width:0,height:0,top:0,left:0}}getBrushArea(){return null}getDebugState(e){return Xp(e)}getChartTypeDescription(e){return qp(e)}}var og={value:function(){}};function sg(){for(var e,t=0,n=arguments.length,i={};t<n;++t){if(!(e=arguments[t]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new lg(i)}function lg(e){this._=e}function cg(e,t){for(var n,i=0,r=e.length;i<r;++i)if((n=e[i]).name===t)return n.value}function ug(e,t,n){for(var i=0,r=e.length;i<r;++i)if(e[i].name===t){e[i]=og,e=e.slice(0,i).concat(e.slice(i+1));break}return null!=n&&e.push({name:t,value:n}),e}lg.prototype=sg.prototype={constructor:lg,on:function(e,t){var n,i,r=this._,a=(i=r,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!i.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(n=(e=a[o]).type)r[n]=ug(r[n],e.name,t);else if(null==t)for(n in r)r[n]=ug(r[n],e.name,null);return this}for(;++o<s;)if((n=(e=a[o]).type)&&(n=cg(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new lg(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(i=this._[e]).length;a<n;++a)i[a].value.apply(t,r)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)}};var hg=a(Object.freeze(Object.defineProperty({__proto__:null,dispatch:sg},Symbol.toStringTag,{value:"Module"}))).dispatch,dg=Math.PI/180,fg=2048,pg=function(){var e=[256,256],t=gg,n=mg,i=bg,r=yg,a=yg,o=vg,s=xg,l=kg,c=[],u=1/0,h=hg("word","end"),d=null,f=Math.random,p={},g=_g;function m(t,n,i){e[0],e[1];for(var r,a,o,s,c,u=n.x,h=n.y,d=Math.sqrt(e[0]*e[0]+e[1]*e[1]),p=l(e),g=f()<.5?1:-1,m=-g;(r=p(m+=g))&&(a=~~r[0],o=~~r[1],!(Math.min(Math.abs(a),Math.abs(o))>=d));)if(n.x=u+a,n.y=h+o,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>e[0]||n.y+n.y1>e[1]||i&&Mg(n,t,e[0])||i&&(c=i,!((s=n).x+s.x1>c[0].x&&s.x+s.x0<c[1].x&&s.y+s.y1>c[0].y&&s.y+s.y0<c[1].y)))){for(var y,b=n.sprite,v=n.width>>5,x=e[0]>>5,w=n.x-(v<<4),M=127&w,S=32-M,k=n.y1-n.y0,_=(n.y+n.y0)*x+(w>>5),O=0;O<k;O++){y=0;for(var C=0;C<=v;C++)t[_+C]|=y<<S|(C<v?(y=b[O*v+C])>>>M:0);_+=x}return delete n.sprite,!0}return!1}return p.canvas=function(e){return arguments.length?(g=Og(e),p):g},p.start=function(){var l=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=fg/t;var n=e.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:t}}(g()),y=function(e){var t=[],n=-1;for(;++n<e;)t[n]=0;return t}((e[0]>>5)*e[1]),b=null,v=c.length,x=-1,w=[],M=c.map((function(e,l){return e.text=t.call(this,e,l),e.font=n.call(this,e,l),e.style=r.call(this,e,l),e.weight=a.call(this,e,l),e.rotate=o.call(this,e,l),e.size=~~i.call(this,e,l),e.padding=s.call(this,e,l),e})).sort((function(e,t){return t.size-e.size}));return d&&clearInterval(d),d=setInterval(S,0),S(),p;function S(){for(var t=Date.now();Date.now()-t<u&&++x<v&&d;){var n=M[x];n.x=e[0]*(f()+.5)>>1,n.y=e[1]*(f()+.5)>>1,wg(l,n,M,x),n.hasText&&m(y,n,b)&&(w.push(n),h.call("word",p,n),b?Sg(b,n):b=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=e[0]>>1,n.y-=e[1]>>1)}x>=v&&(p.stop(),h.call("end",p,w,b))}},p.stop=function(){return d&&(clearInterval(d),d=null),p},p.timeInterval=function(e){return arguments.length?(u=null==e?1/0:e,p):u},p.words=function(e){return arguments.length?(c=e,p):c},p.size=function(t){return arguments.length?(e=[+t[0],+t[1]],p):e},p.font=function(e){return arguments.length?(n=Og(e),p):n},p.fontStyle=function(e){return arguments.length?(r=Og(e),p):r},p.fontWeight=function(e){return arguments.length?(a=Og(e),p):a},p.rotate=function(e){return arguments.length?(o=Og(e),p):o},p.text=function(e){return arguments.length?(t=Og(e),p):t},p.spiral=function(e){return arguments.length?(l=Cg[e]||e,p):l},p.fontSize=function(e){return arguments.length?(i=Og(e),p):i},p.padding=function(e){return arguments.length?(s=Og(e),p):s},p.random=function(e){return arguments.length?(f=e,p):f},p.on=function(){var e=h.on.apply(h,arguments);return e===h?p:e},p};function gg(e){return e.text}function mg(){return"serif"}function yg(){return"normal"}function bg(e){return Math.sqrt(e.value)}function vg(){return 30*(~~(6*Math.random())-3)}function xg(){return 1}function wg(e,t,n,i){if(!t.sprite){var r=e.context,a=e.ratio;r.clearRect(0,0,2048/a,fg/a);var o=0,s=0,l=0,c=n.length;for(--i;++i<c;){t=n[i],r.save(),r.font=t.style+" "+t.weight+" "+~~((t.size+1)/a)+"px "+t.font;var u=r.measureText(t.text+"m").width*a,h=t.size<<1;if(t.rotate){var d=Math.sin(t.rotate*dg),f=Math.cos(t.rotate*dg),p=u*f,g=u*d,m=h*f,y=h*d;u=Math.max(Math.abs(p+y),Math.abs(p-y))+31>>5<<5,h=~~Math.max(Math.abs(g+m),Math.abs(g-m))}else u=u+31>>5<<5;if(h>l&&(l=h),o+u>=2048&&(o=0,s+=l,l=0),s+h>=fg)break;r.translate((o+(u>>1))/a,(s+(h>>1))/a),t.rotate&&r.rotate(t.rotate*dg),r.fillText(t.text,0,0),t.padding&&(r.lineWidth=2*t.padding,r.strokeText(t.text,0,0)),r.restore(),t.width=u,t.height=h,t.xoff=o,t.yoff=s,t.x1=u>>1,t.y1=h>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,o+=u}for(var b=r.getImageData(0,0,2048/a,fg/a).data,v=[];--i>=0;)if((t=n[i]).hasText){for(var x=(u=t.width)>>5,w=(h=t.y1-t.y0,0);w<h*x;w++)v[w]=0;if(null==(o=t.xoff))return;s=t.yoff;for(var M=0,S=-1,k=0;k<h;k++){for(w=0;w<u;w++){var _=x*k+(w>>5),O=b[2048*(s+k)+(o+w)<<2]?1<<31-w%32:0;v[_]|=O,M|=O}M?S=k:(t.y0++,h--,k--,s++)}t.y1=t.y0+S,t.sprite=v.slice(0,(t.y1-t.y0)*x)}}}function Mg(e,t,n){n>>=5;for(var i,r=e.sprite,a=e.width>>5,o=e.x-(a<<4),s=127&o,l=32-s,c=e.y1-e.y0,u=(e.y+e.y0)*n+(o>>5),h=0;h<c;h++){i=0;for(var d=0;d<=a;d++)if((i<<l|(d<a?(i=r[h*a+d])>>>s:0))&t[u+d])return!0;u+=n}return!1}function Sg(e,t){var n=e[0],i=e[1];t.x+t.x0<n.x&&(n.x=t.x+t.x0),t.y+t.y0<n.y&&(n.y=t.y+t.y0),t.x+t.x1>i.x&&(i.x=t.x+t.x1),t.y+t.y1>i.y&&(i.y=t.y+t.y1)}function kg(e){var t=e[0]/e[1];return function(e){return[t*(e*=.1)*Math.cos(e),e*Math.sin(e)]}}function _g(){return document.createElement("canvas")}function Og(e){return"function"==typeof e?e:function(){return e}}var Cg={archimedean:kg,rectangular:function(e){var t=4*e[0]/e[1],n=0,i=0;return function(e){var r=e<0?-1:1;switch(Math.sqrt(1+4*r*e)-r&3){case 0:n+=t;break;case 1:i+=4;break;case 2:n-=t;break;default:i-=4}return[n,i]}}};const Eg=e(pg),Ag=ea((e=>e.dflt),{width:{dflt:300,min:0,max:1024,type:"number",reconfigurable:!1},height:{dflt:150,min:0,max:1024,type:"number",reconfigurable:!1},margin:{type:"group",values:{left:{dflt:0,min:-.25,max:.25,type:"number"},right:{dflt:0,min:-.25,max:.25,type:"number"},top:{dflt:0,min:-.25,max:.25,type:"number"},bottom:{dflt:0,min:-.25,max:.25,type:"number"}}},fontFamily:{dflt:"Impact",type:"string"},minFontSize:{dflt:10,min:10,max:50,type:"number",reconfigurable:!0},maxFontSize:{dflt:70,min:15,max:150,type:"number",reconfigurable:!0},backgroundColor:{dflt:"#ffffff",type:"color"},sectorLineWidth:{dflt:1,min:0,max:4,type:"number"}}),Tg={startAngle:-20,endAngle:20,angleCount:5,padding:2,fontWeight:300,fontFamily:"Impact",fontStyle:"italic",minFontSize:10,maxFontSize:50,spiral:"archimedean",exponent:3,data:[],weightFn:"exponential",outOfRoomCallback:()=>{}},Ig=Object.assign({},Tg),jg=Object.assign(Object.assign({},Tg),{data:[]}),Lg=(e,t)=>({config:e||Ag,wordcloudViewModel:jg,chartCenter:t||{x:0,y:0},pickQuads:()=>[],specId:"empty"});function Pg(e,t){const{width:n,height:i}=t,{config:r}=e,a=Object.assign(Object.assign({},r),{width:n,height:i});return function(e,t){const{width:n,height:i,margin:r}=t,a=n*(1-Math.min(1,r.left+r.right)),o=i*(1-Math.min(1,r.top+r.bottom)),s={x:n*r.left+a/2,y:i*r.top+o/2},{id:l,startAngle:c,endAngle:u,angleCount:h,padding:d,fontWeight:f,fontFamily:p,fontStyle:g,minFontSize:m,maxFontSize:y,spiral:b,exponent:v,data:x,weightFn:w,outOfRoomCallback:M}=e,S={startAngle:c,endAngle:u,angleCount:h,padding:d,fontWeight:f,fontFamily:p,fontStyle:g,minFontSize:m,maxFontSize:y,spiral:b,exponent:v,data:x,weightFn:w,outOfRoomCallback:M};return{config:t,chartCenter:s,wordcloudViewModel:S,pickQuads:(e,t)=>-a/2<=e&&e<=a/2&&-o/2<=t&&t<=o/2?[S]:[],specId:l}}(e,Nn(Ag,a))}const zg=fn([e=>e.specs,e=>e.parentDimensions],((e,t)=>{const n=li(e,Ce.Wordcloud,Zn.Series);return 1===n.length?Pg(n[0],t):Lg()}));function Dg(){return.5}function Ng(e){return e.fontFamily}function Rg(e){return e.style}function Vg(e){return e.fontWeight}function $g(e){var t;return null!==(t=e.width)&&void 0!==t?t:500}function Fg(e){var t;return null!==(t=e.height)&&void 0!==t?t:500}function Bg(e){return e.size}function Hg(e,t,n,i){const r=n-1,a=0===r?0:(t-e)/r;return function(e,t){e=JSON.stringify(e);let n=0;for(const i of e)n=(31*n+i.charCodeAt(0))%t;return Math.abs(n)%t}(i,null!=n?n:360)*a+e}const Wg={linear:function(e,t,n,i){return e+(t-e)*i},exponential:function(e,t,n,i){return e+(t-e)*Math.pow(i,n)},log:function(e,t,n,i){return e+(t-e)*Math.log2(i+1)},squareRoot:function(e,t,n,i){return e+(t-e)*Math.sqrt(i)}};const Ug=({words:e,conf:t,actions:{onElementClick:n,onElementOver:r,onElementOut:a},specId:o})=>i.createElement("svg",{width:$g(t),height:Fg(t),role:"presentation"},i.createElement("g",{transform:`translate(${$g(t)/2}, ${Fg(t)/2})`},e.map(((e,t)=>{const s=[[e.datum,{specId:o,key:o}]],l=Object.assign(Object.assign(Object.assign({},n&&{onClick:()=>{n(s)}}),r&&{onMouseOver:()=>{r(s)}}),a&&{onMouseOut:()=>{a()}});return i.createElement("text",Object.assign({key:String(t),style:{fontSize:Bg(e),fontStyle:Rg(e),fontFamily:Ng(e),fontWeight:Vg(e),fill:e.color},textAnchor:"middle",transform:`translate(${e.x}, ${e.y}) rotate(${e.rotate})`},l),e.text)}))));class Yg extends i.Component{componentDidMount(){this.props.initialized&&this.props.onChartRendered()}componentDidUpdate(){this.props.initialized&&this.props.onChartRendered()}render(){const{initialized:e,chartContainerDimensions:{width:t,height:n},geometries:{wordcloudViewModel:r,specId:a},a11ySettings:o,onElementClick:s,onElementOver:l,onElementOut:c}=this.props;if(!e||0===t||0===n)return null;const u={width:t,height:n,startAngle:r.startAngle,endAngle:r.endAngle,count:r.angleCount,padding:r.padding,fontWeight:r.fontWeight,fontFamily:r.fontFamily,fontStyle:r.fontStyle,minFontSize:r.minFontSize,maxFontSize:r.maxFontSize,spiral:r.spiral,exponent:r.exponent,weightFn:r.weightFn};let h;(function(e,t){var n,i;const r=t.map((t=>{const n=Wg[e.weightFn];return{datum:t,text:t.text,color:t.color,fontFamily:e.fontFamily,style:e.fontStyle,fontWeight:e.fontWeight,size:n(e.minFontSize,e.maxFontSize,e.exponent,t.weight)}}));return Eg().random(Dg).size([$g(e),Fg(e)]).words(r).spiral(null!==(n=e.spiral)&&void 0!==n?n:"archimedean").padding(null!==(i=e.padding)&&void 0!==i?i:5).rotate((t=>Hg(e.startAngle,e.endAngle,e.count,t.text))).font(Ng).fontStyle(Rg).fontWeight(Vg).fontSize((e=>Bg(e)))})(u,r.data).on("end",(e=>h=e)).start();const d=r.data.length,f=h,p=f.length;return d!==p&&r.outOfRoomCallback instanceof Function&&r.outOfRoomCallback(d,p,f.map((e=>e.text))),i.createElement("figure",{"aria-labelledby":o.labelId,"aria-describedby":o.descriptionId},i.createElement(Ug,{words:f,conf:u,actions:{onElementClick:s,onElementOut:c,onElementOver:l},specId:a}),i.createElement(Aa,null))}}Yg.displayName="Wordcloud";const Gg={initialized:!1,geometries:Lg(),chartContainerDimensions:{width:0,height:0,left:0,top:0},a11ySettings:wa},qg=o((e=>vi(e)!==bi.Initialized?Gg:{initialized:!0,geometries:zg(e),chartContainerDimensions:e.parentDimensions,a11ySettings:Ma(e),onElementClick:hi(e).onElementClick,onElementOver:hi(e).onElementOver,onElementOut:hi(e).onElementOut}),(e=>s({onChartRendered:El},e)))(Yg);const Xg=new Map,Zg=[],Kg=[];class Qg{constructor(){this.chartType=Ce.Wordcloud}isInitialized(e){return null!==function(e){const t=li(e.specs,Ce.Wordcloud,Zn.Series);return t.length>0?t[0]:null}(e)?bi.Initialized:bi.ChartNotInitialized}isBrushAvailable(){return!1}isBrushing(){return!1}isChartEmpty(){return!1}getLegendItems(){return Zg}getLegendItemsLabels(){return Kg}getLegendExtraValues(){return Xg}chartRenderer(){return i.createElement(qg,null)}getPointerCursor(){return Ee}isTooltipVisible(){return{visible:!1,isExternal:!1}}getTooltipInfo(){return ng}getTooltipAnchor(e){const{position:t}=e.interactions.pointer.current;return{isRotated:!1,x:t.x,width:0,y:t.y,height:0}}eventCallbacks(){}getChartTypeDescription(){return"Word cloud chart"}getProjectionContainerArea(){return{width:0,height:0,top:0,left:0}}getMainProjectionArea(){return{width:0,height:0,top:0,left:0}}getBrushArea(){return null}getDebugState(){return{}}}function Jg(e){return 0===e||180===e}function em(e){return-90===e||90===e}function tm(e,t){return e.find((e=>e.id===t))}function nm(e,t){let n,i;for(const r of e)r.groupId===t&&(Vc(r.position)?i=r:n=r);return{xAxis:n,yAxis:i}}function im(e){return e.useDefaultGroupDomain?"boolean"==typeof e.useDefaultGroupDomain?no:e.useDefaultGroupDomain:e.groupId}function rm(e){return e.type===Ja.Log}function am(e){return e.type===Ja.Ordinal}function om(e){return e.type!==Ja.Ordinal}var sm=Math.PI,lm=2*sm,cm=1e-6,um=lm-cm;function hm(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function dm(){return new hm}function fm(e){return function(){return e}}hm.prototype=dm.prototype={constructor:hm,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(e,t,n,i,r){e=+e,t=+t,n=+n,i=+i,r=+r;var a=this._x1,o=this._y1,s=n-e,l=i-t,c=a-e,u=o-t,h=c*c+u*u;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>cm)if(Math.abs(u*s-l*c)>cm&&r){var d=n-a,f=i-o,p=s*s+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(h),b=r*Math.tan((sm-Math.acos((p+h-g)/(2*m*y)))/2),v=b/y,x=b/m;Math.abs(v-1)>cm&&(this._+="L"+(e+v*c)+","+(t+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,i,r,a){e=+e,t=+t,a=!!a;var o=(n=+n)*Math.cos(i),s=n*Math.sin(i),l=e+o,c=t+s,u=1^a,h=a?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>cm||Math.abs(this._y1-c)>cm)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%lm+lm),h>um?this._+="A"+n+","+n+",0,1,"+u+","+(e-o)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>cm&&(this._+="A"+n+","+n+",0,"+ +(h>=sm)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};function pm(e){this._context=e}function gm(e){return new pm(e)}function mm(e){return e[0]}function ym(e){return e[1]}function bm(){var e=mm,t=ym,n=fm(!0),i=null,r=gm,a=null;function o(o){var s,l,c,u=o.length,h=!1;for(null==i&&(a=r(c=dm())),s=0;s<=u;++s)!(s<u&&n(l=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(l,s,o),+t(l,s,o));if(c)return a=null,c+""||null}return o.x=function(t){return arguments.length?(e="function"==typeof t?t:fm(+t),o):e},o.y=function(e){return arguments.length?(t="function"==typeof e?e:fm(+e),o):t},o.defined=function(e){return arguments.length?(n="function"==typeof e?e:fm(!!e),o):n},o.curve=function(e){return arguments.length?(r=e,null!=i&&(a=r(i)),o):r},o.context=function(e){return arguments.length?(null==e?i=a=null:a=r(i=e),o):i},o}pm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var vm=Array.prototype.slice;function xm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wm(e){this._context=e}function Mm(e){return new wm(e)}function Sm(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function km(e,t){this._context=e,this._k=(1-t)/6}wm.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:xm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},km.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:Sm(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Sm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _m=function e(t){function n(e){return new km(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Om(e,t){this._context=e,this._alpha=t}Om.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)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var i=e._x1,r=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,r=(r*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(i,r,a,o,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Cm=function e(t){function n(e){return t?new Om(e,t):new km(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Em(e){return e<0?-1:1}function Am(e,t,n){var i=e._x1-e._x0,r=t-e._x1,a=(e._y1-e._y0)/(i||r<0&&-0),o=(n-e._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return(Em(a)+Em(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Tm(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Im(e,t,n){var i=e._x0,r=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,r+s*t,a-s,o-s*n,a,o)}function jm(e){this._context=e}function Lm(e){this._context=new Pm(e)}function Pm(e){this._context=e}function zm(e){return new jm(e)}function Dm(e){return new Lm(e)}function Nm(e){this._context=e}function Rm(e){var t,n,i=e.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<i-1;++t)r[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(r[i-1]=2,a[i-1]=7,o[i-1]=8*e[i-1]+e[i],t=1;t<i;++t)n=r[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(r[i-1]=o[i-1]/a[i-1],t=i-2;t>=0;--t)r[t]=(o[t]-r[t+1])/a[t];for(a[i-1]=(e[i]+r[i-1])/2,t=0;t<i-1;++t)a[t]=2*e[t+1]-r[t+1];return[r,a]}function Vm(e){return new Nm(e)}function $m(e,t){this._context=e,this._t=t}function Fm(e){return new $m(e,.5)}function Bm(e){return new $m(e,0)}function Hm(e){return new $m(e,1)}function Wm(e,t){if((r=e.length)>1)for(var n,i,r,a=1,o=e[t[0]],s=o.length;a<r;++a)for(i=o,o=e[t[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Um(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Ym(e,t){return e[t]}function Gm(e,t){if((i=e.length)>0){for(var n,i,r,a=0,o=e[0].length;a<o;++a){for(r=n=0;n<i;++n)r+=e[n][a][1]||0;if(r)for(n=0;n<i;++n)e[n][a][1]/=r}Wm(e,t)}}function qm(e,t){if((n=e.length)>0){for(var n,i=0,r=e[t[0]],a=r.length;i<a;++i){for(var o=0,s=0;o<n;++o)s+=e[o][i][1]||0;r[i][1]+=r[i][0]=-s/2}Wm(e,t)}}function Xm(e,t){if((r=e.length)>0&&(i=(n=e[t[0]]).length)>0){for(var n,i,r,a=0,o=1;o<i;++o){for(var s=0,l=0,c=0;s<r;++s){for(var u=e[t[s]],h=u[o][1]||0,d=(h-(u[o-1][1]||0))/2,f=0;f<s;++f){var p=e[t[f]];d+=(p[o][1]||0)-(p[o-1][1]||0)}l+=h,c+=d*h}n[o-1][1]+=n[o-1][0]=a,l&&(a-=c/l)}n[o-1][1]+=n[o-1][0]=a,Wm(e,t)}}jm.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:Im(this,this._t0,Tm(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Im(this,Tm(this,n=Am(this,e,t)),n);break;default:Im(this,this._t0,n=Am(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Lm.prototype=Object.create(jm.prototype)).point=function(e,t){jm.prototype.point.call(this,t,e)},Pm.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,i,r,a){this._context.bezierCurveTo(t,e,i,n,a,r)}},Nm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var i=Rm(e),r=Rm(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],e[o],t[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},$m.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};const Zm=Object.freeze({CURVE_CARDINAL:0,CURVE_NATURAL:1,CURVE_MONOTONE_X:2,CURVE_MONOTONE_Y:3,CURVE_BASIS:4,CURVE_CATMULL_ROM:5,CURVE_STEP:6,CURVE_STEP_AFTER:7,CURVE_STEP_BEFORE:8,LINEAR:9});function Km(e=Zm.LINEAR){switch(e){case Zm.CURVE_CARDINAL:return _m;case Zm.CURVE_NATURAL:return Vm;case Zm.CURVE_MONOTONE_X:return zm;case Zm.CURVE_MONOTONE_Y:return Dm;case Zm.CURVE_BASIS:return Mm;case Zm.CURVE_CATMULL_ROM:return Cm;case Zm.CURVE_STEP:return Fm;case Zm.CURVE_STEP_AFTER:return Hm;case Zm.CURVE_STEP_BEFORE:return Bm;case Zm.LINEAR:default:return gm}}const Qm=()=>0;function Jm(e,t,n=Qm){var i,r;return"object"==typeof t?null!==(r=null!==(i=t[e])&&void 0!==i?i:t.default)&&void 0!==r?r:n:null!=t?t:n}function ey(e,t,n){const i=Array.isArray(t)?function(e,t="|"){return n=>e.map((e=>n[e])).join(t)}(t):t,r=e.reduce(((e,t)=>{const n=i(t);return e[n]||(e[n]=[]),e[n].push(t),e}),{});return n?Object.values(r):r}function ty(e,t){return ey(e,(({spec:e})=>im(e)),!0).reduce(((e,n)=>{const i=function(e,t,n,i){const r=[...e,...t];if(0===r.length)return null;const[{stackMode:a,spec:o}]=r,s=im(o),{customDomain:l,type:c,nice:u,desiredTickCount:h}=i[s],d=l?Object.assign({},l):{},{paddingUnit:f,padding:p,constrainPadding:g}=d;let m;if(a===to.Percentage)m=Ic([0,1],On,c,l);else{m=Ic([...ny(e,n,c,d),...ny(t,n,c,d)],On,c,d);const[i,r]=m;d&&Rc(d)?m=[d.min,d.max]:d&&Dc(d)?m=d.min>r?[d.min,d.min]:[d.min,r]:d&&Nc(d)&&(m=i>d.max?[d.max,d.max]:[i,d.max])}return{type:c,nice:u,isBandScale:!1,groupId:s,domain:m,logBase:null==l?void 0:l.logBase,logMinLimit:null==l?void 0:l.logMinLimit,desiredTickCount:h,domainPixelPadding:f===ro.Pixel?p:0,constrainDomainPadding:g}}(n.filter((({isStacked:e,isFiltered:t})=>e&&!t)),n.filter((({isStacked:e,isFiltered:t})=>!e&&!t)),n.some((({seriesType:e,isFiltered:t})=>e===eo.Bar||e===eo.Area&&!t)),t);return i?[...e,i]:e}),[])}function ny(e,t,n,i){const r=new Set;if(e.forEach((({data:e})=>{for(let n=0;n<e.length;n++){const i=e[n];r.add(i.y1),t&&null!=i.y0&&r.add(i.y0)}})),0===r.size)return[];const a=Object.assign(Object.assign({},i),{padding:0});return Ic([...r.values()],On,n,a)}function iy(e){return e.some((({seriesType:e,enableHistogramMode:t})=>e===eo.Bar&&t))}function ry(e,t){const n=e.seriesType===eo.Bar&&t,i=e.stackAccessors&&e.stackAccessors.length>0;return n||i}const ay=Object.freeze({Y0:"y0",Y1:"y1"});function oy(e){return e.hasOwnProperty("radius")}class sy{constructor(){this.map=new Map}get size(){return this.map.size}set(e){const{x:t}=e.value,n=this.map.get(t);void 0===n?this.map.set(t,[e]):this.map.set(t,[e,...n])}getMergeData(){return[...this.map.values()]}keys(){return[...this.map.keys()]}find(e){var t;return null===e?[]:null!==(t=this.map.get(e))&&void 0!==t?t:[]}}const ly=Math.pow(2,-52),cy=new Uint32Array(512);class uy{static from(e,t=by,n=vy){const i=e.length,r=new Float64Array(2*i);for(let a=0;a<i;a++){const i=e[a];r[2*a]=t(i),r[2*a+1]=n(i)}return new uy(r)}constructor(e){const t=e.length>>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*n),this._halfedges=new Int32Array(3*n),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:n,_hullTri:i,_hullHash:r}=this,a=e.length>>1;let o=1/0,s=1/0,l=-1/0,c=-1/0;for(let _=0;_<a;_++){const t=e[2*_],n=e[2*_+1];t<o&&(o=t),n<s&&(s=n),t>l&&(l=t),n>c&&(c=n),this._ids[_]=_}const u=(o+l)/2,h=(s+c)/2;let d,f,p,g=1/0;for(let _=0;_<a;_++){const t=hy(u,h,e[2*_],e[2*_+1]);t<g&&(d=_,g=t)}const m=e[2*d],y=e[2*d+1];g=1/0;for(let _=0;_<a;_++){if(_===d)continue;const t=hy(m,y,e[2*_],e[2*_+1]);t<g&&t>0&&(f=_,g=t)}let b=e[2*f],v=e[2*f+1],x=1/0;for(let _=0;_<a;_++){if(_===d||_===f)continue;const t=gy(m,y,b,v,e[2*_],e[2*_+1]);t<x&&(p=_,x=t)}let w=e[2*p],M=e[2*p+1];if(x===1/0){for(let i=0;i<a;i++)this._dists[i]=e[2*i]-e[0]||e[2*i+1]-e[1];my(this._ids,this._dists,0,a-1);const t=new Uint32Array(a);let n=0;for(let e=0,i=-1/0;e<a;e++){const r=this._ids[e];this._dists[r]>i&&(t[n++]=r,i=this._dists[r])}return this.hull=t.subarray(0,n),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(fy(m,y,b,v,w,M)){const e=f,t=b,n=v;f=p,b=w,v=M,p=e,w=t,M=n}const S=function(e,t,n,i,r,a){const o=n-e,s=i-t,l=r-e,c=a-t,u=o*o+s*s,h=l*l+c*c,d=.5/(o*c-s*l);return{x:e+(c*u-s*h)*d,y:t+(o*h-l*u)*d}}(m,y,b,v,w,M);this._cx=S.x,this._cy=S.y;for(let _=0;_<a;_++)this._dists[_]=hy(e[2*_],e[2*_+1],S.x,S.y);my(this._ids,this._dists,0,a-1),this._hullStart=d;let k=3;n[d]=t[p]=f,n[f]=t[d]=p,n[p]=t[f]=d,i[d]=0,i[f]=1,i[p]=2,r.fill(-1),r[this._hashKey(m,y)]=d,r[this._hashKey(b,v)]=f,r[this._hashKey(w,M)]=p,this.trianglesLen=0,this._addTriangle(d,f,p,-1,-1,-1);for(let _,O,C=0;C<this._ids.length;C++){const a=this._ids[C],o=e[2*a],s=e[2*a+1];if(C>0&&Math.abs(o-_)<=ly&&Math.abs(s-O)<=ly)continue;if(_=o,O=s,a===d||a===f||a===p)continue;let l=0;for(let e=0,t=this._hashKey(o,s);e<this._hashSize&&(l=r[(t+e)%this._hashSize],-1===l||l===n[l]);e++);l=t[l];let c,u=l;for(;c=n[u],!fy(o,s,e[2*u],e[2*u+1],e[2*c],e[2*c+1]);)if(u=c,u===l){u=-1;break}if(-1===u)continue;let h=this._addTriangle(u,a,n[u],-1,-1,i[u]);i[a]=this._legalize(h+2),i[u]=h,k++;let g=n[u];for(;c=n[g],fy(o,s,e[2*g],e[2*g+1],e[2*c],e[2*c+1]);)h=this._addTriangle(g,a,c,i[a],-1,i[g]),i[a]=this._legalize(h+2),n[g]=g,k--,g=c;if(u===l)for(;c=t[u],fy(o,s,e[2*c],e[2*c+1],e[2*u],e[2*u+1]);)h=this._addTriangle(c,a,u,-1,i[u],i[c]),this._legalize(h+2),i[c]=h,n[u]=u,k--,u=c;this._hullStart=t[a]=u,n[u]=t[g]=a,n[a]=g,r[this._hashKey(o,s)]=a,r[this._hashKey(e[2*u],e[2*u+1])]=u}this.hull=new Uint32Array(k);for(let _=0,O=this._hullStart;_<k;_++)this.hull[_]=O,O=n[O];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,t){return Math.floor(function(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:n,coords:i}=this;let r=0,a=0;for(;;){const o=n[e],s=e-e%3;if(a=s+(e+2)%3,-1===o){if(0===r)break;e=cy[--r];continue}const l=o-o%3,c=s+(e+1)%3,u=l+(o+2)%3,h=t[a],d=t[e],f=t[c],p=t[u];if(py(i[2*h],i[2*h+1],i[2*d],i[2*d+1],i[2*f],i[2*f+1],i[2*p],i[2*p+1])){t[e]=p,t[o]=h;const i=n[u];if(-1===i){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,i),this._link(o,n[a]),this._link(a,u);const s=l+(o+1)%3;r<cy.length&&(cy[r++]=s)}else{if(0===r)break;e=cy[--r]}}return a}_link(e,t){this._halfedges[e]=t,-1!==t&&(this._halfedges[t]=e)}_addTriangle(e,t,n,i,r,a){const o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=t,this._triangles[o+2]=n,this._link(o,i),this._link(o+1,r),this._link(o+2,a),this.trianglesLen+=3,o}}function hy(e,t,n,i){const r=e-n,a=t-i;return r*r+a*a}function dy(e,t,n,i,r,a){const o=(i-t)*(r-e),s=(n-e)*(a-t);return Math.abs(o-s)>=33306690738754716e-32*Math.abs(o+s)?o-s:0}function fy(e,t,n,i,r,a){return(dy(r,a,e,t,n,i)||dy(e,t,n,i,r,a)||dy(n,i,r,a,e,t))<0}function py(e,t,n,i,r,a,o,s){const l=e-o,c=t-s,u=n-o,h=i-s,d=r-o,f=a-s,p=u*u+h*h,g=d*d+f*f;return l*(h*g-p*f)-c*(u*g-p*d)+(l*l+c*c)*(u*f-h*d)<0}function gy(e,t,n,i,r,a){const o=n-e,s=i-t,l=r-e,c=a-t,u=o*o+s*s,h=l*l+c*c,d=.5/(o*c-s*l),f=(c*u-s*h)*d,p=(o*h-l*u)*d;return f*f+p*p}function my(e,t,n,i){if(i-n<=20)for(let r=n+1;r<=i;r++){const i=e[r],a=t[i];let o=r-1;for(;o>=n&&t[e[o]]>a;)e[o+1]=e[o--];e[o+1]=i}else{let r=n+1,a=i;yy(e,n+i>>1,r),t[e[n]]>t[e[i]]&&yy(e,n,i),t[e[r]]>t[e[i]]&&yy(e,r,i),t[e[n]]>t[e[r]]&&yy(e,n,r);const o=e[r],s=t[o];for(;;){do{r++}while(t[e[r]]<s);do{a--}while(t[e[a]]>s);if(a<r)break;yy(e,r,a)}e[n+1]=e[a],e[a]=o,i-r+1>=a-n?(my(e,t,r,i),my(e,t,n,a-1)):(my(e,t,n,a-1),my(e,t,r,i))}}function yy(e,t,n){const i=e[t];e[t]=e[n],e[n]=i}function by(e){return e[0]}function vy(e){return e[1]}const xy=1e-6;class wy{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,n){const i=(e=+e)+(n=+n),r=t=+t;if(n<0)throw new Error("negative radius");null===this._x1?this._+=`M${i},${r}`:(Math.abs(this._x1-i)>xy||Math.abs(this._y1-r)>xy)&&(this._+="L"+i+","+r),n&&(this._+=`A${n},${n},0,1,1,${e-n},${t}A${n},${n},0,1,1,${this._x1=i},${this._y1=r}`)}rect(e,t,n,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+n}v${+i}h${-n}Z`}value(){return this._||null}}class My{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class Sy{constructor(e,[t,n,i,r]=[0,0,960,500]){if(!((i=+i)>=(t=+t)&&(r=+r)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=i,this.xmin=t,this.ymax=r,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:n},vectors:i}=this,r=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let d,f,p=0,g=0,m=n.length;p<m;p+=3,g+=2){const t=2*n[p],i=2*n[p+1],a=2*n[p+2],o=e[t],s=e[t+1],l=e[i],c=e[i+1],u=e[a],h=e[a+1],m=l-o,y=c-s,b=u-o,v=h-s,x=m*m+y*y,w=b*b+v*v,M=2*(m*v-y*b);if(M)if(Math.abs(M)<1e-8)d=(o+u)/2,f=(s+h)/2;else{const e=1/M;d=o+(v*x-y*w)*e,f=s+(m*w-b*x)*e}else d=(o+u)/2-1e8*v,f=(s+h)/2+1e8*b;r[g]=d,r[g+1]=f}let a,o,s,l=t[t.length-1],c=4*l,u=e[2*l],h=e[2*l+1];i.fill(0);for(let d=0;d<t.length;++d)l=t[d],a=c,o=u,s=h,c=4*l,u=e[2*l],h=e[2*l+1],i[a+2]=i[c]=s-h,i[a+3]=i[c+1]=u-o}render(e){const t=null==e?e=new wy:void 0,{delaunay:{halfedges:n,inedges:i,hull:r},circumcenters:a,vectors:o}=this;if(r.length<=1)return null;for(let c=0,u=n.length;c<u;++c){const t=n[c];if(t<c)continue;const i=2*Math.floor(c/3),r=2*Math.floor(t/3),o=a[i],s=a[i+1],l=a[r],u=a[r+1];this._renderSegment(o,s,l,u,e)}let s,l=r[r.length-1];for(let c=0;c<r.length;++c){s=l,l=r[c];const t=2*Math.floor(i[l]/3),n=a[t],u=a[t+1],h=4*s,d=this._project(n,u,o[h+2],o[h+3]);d&&this._renderSegment(n,u,d[0],d[1],e)}return t&&t.value()}renderBounds(e){const t=null==e?e=new wy:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),t&&t.value()}renderCell(e,t){const n=null==t?t=new wy:void 0,i=this._clip(e);if(null===i)return;t.moveTo(i[0],i[1]);let r=i.length;for(;i[0]===i[r-2]&&i[1]===i[r-1]&&r>1;)r-=2;for(let a=2;a<r;a+=2)i[a]===i[a-2]&&i[a+1]===i[a-1]||t.lineTo(i[a],i[a+1]);return t.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let t=0,n=e.length/2;t<n;++t){const e=this.cellPolygon(t);e&&(yield e)}}cellPolygon(e){const t=new My;return this.renderCell(e,t),t.value()}_renderSegment(e,t,n,i,r){let a;const o=this._regioncode(e,t),s=this._regioncode(n,i);0===o&&0===s?(r.moveTo(e,t),r.lineTo(n,i)):(a=this._clipSegment(e,t,n,i,o,s))&&(r.moveTo(a[0],a[1]),r.lineTo(a[2],a[3]))}contains(e,t,n){return(t=+t)==t&&(n=+n)==n&&this.delaunay._step(e,t,n)===e}*neighbors(e){const t=this._clip(e);if(t)for(const n of this.delaunay.neighbors(e)){const e=this._clip(n);if(e)e:for(let i=0,r=t.length;i<r;i+=2)for(let a=0,o=e.length;a<o;a+=2)if(t[i]==e[a]&&t[i+1]==e[a+1]&&t[(i+2)%r]==e[(a+o-2)%o]&&t[(i+3)%r]==e[(a+o-1)%o]){yield n;break e}}}_cell(e){const{circumcenters:t,delaunay:{inedges:n,halfedges:i,triangles:r}}=this,a=n[e];if(-1===a)return null;const o=[];let s=a;do{const n=Math.floor(s/3);if(o.push(t[2*n],t[2*n+1]),s=s%3==2?s-2:s+1,r[s]!==e)break;s=i[s]}while(s!==a&&-1!==s);return o}_clip(e){if(0===e&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const t=this._cell(e);if(null===t)return null;const{vectors:n}=this,i=4*e;return n[i]||n[i+1]?this._clipInfinite(e,t,n[i],n[i+1],n[i+2],n[i+3]):this._clipFinite(e,t)}_clipFinite(e,t){const n=t.length;let i,r,a,o,s,l=null,c=t[n-2],u=t[n-1],h=this._regioncode(c,u);for(let d=0;d<n;d+=2)if(i=c,r=u,c=t[d],u=t[d+1],a=h,h=this._regioncode(c,u),0===a&&0===h)o=s,s=0,l?l.push(c,u):l=[c,u];else{let t,n,d,f,p;if(0===a){if(null===(t=this._clipSegment(i,r,c,u,a,h)))continue;[n,d,f,p]=t}else{if(null===(t=this._clipSegment(c,u,i,r,h,a)))continue;[f,p,n,d]=t,o=s,s=this._edgecode(n,d),o&&s&&this._edge(e,o,s,l,l.length),l?l.push(n,d):l=[n,d]}o=s,s=this._edgecode(f,p),o&&s&&this._edge(e,o,s,l,l.length),l?l.push(f,p):l=[f,p]}if(l)o=s,s=this._edgecode(l[0],l[1]),o&&s&&this._edge(e,o,s,l,l.length);else if(this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return l}_clipSegment(e,t,n,i,r,a){for(;;){if(0===r&&0===a)return[e,t,n,i];if(r&a)return null;let o,s,l=r||a;8&l?(o=e+(n-e)*(this.ymax-t)/(i-t),s=this.ymax):4&l?(o=e+(n-e)*(this.ymin-t)/(i-t),s=this.ymin):2&l?(s=t+(i-t)*(this.xmax-e)/(n-e),o=this.xmax):(s=t+(i-t)*(this.xmin-e)/(n-e),o=this.xmin),r?(e=o,t=s,r=this._regioncode(e,t)):(n=o,i=s,a=this._regioncode(n,i))}}_clipInfinite(e,t,n,i,r,a){let o,s=Array.from(t);if((o=this._project(s[0],s[1],n,i))&&s.unshift(o[0],o[1]),(o=this._project(s[s.length-2],s[s.length-1],r,a))&&s.push(o[0],o[1]),s=this._clipFinite(e,s))for(let l,c=0,u=s.length,h=this._edgecode(s[u-2],s[u-1]);c<u;c+=2)l=h,h=this._edgecode(s[c],s[c+1]),l&&h&&(c=this._edge(e,l,h,s,c),u=s.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(e,t,n,i,r){for(;t!==n;){let n,a;switch(t){case 5:t=4;continue;case 4:t=6,n=this.xmax,a=this.ymin;break;case 6:t=2;continue;case 2:t=10,n=this.xmax,a=this.ymax;break;case 10:t=8;continue;case 8:t=9,n=this.xmin,a=this.ymax;break;case 9:t=1;continue;case 1:t=5,n=this.xmin,a=this.ymin}i[r]===n&&i[r+1]===a||!this.contains(e,n,a)||(i.splice(r,0,n,a),r+=2)}if(i.length>4)for(let a=0;a<i.length;a+=2){const e=(a+2)%i.length,t=(a+4)%i.length;(i[a]===i[e]&&i[e]===i[t]||i[a+1]===i[e+1]&&i[e+1]===i[t+1])&&(i.splice(e,2),a-=2)}return r}_project(e,t,n,i){let r,a,o,s=1/0;if(i<0){if(t<=this.ymin)return null;(r=(this.ymin-t)/i)<s&&(o=this.ymin,a=e+(s=r)*n)}else if(i>0){if(t>=this.ymax)return null;(r=(this.ymax-t)/i)<s&&(o=this.ymax,a=e+(s=r)*n)}if(n>0){if(e>=this.xmax)return null;(r=(this.xmax-e)/n)<s&&(a=this.xmax,o=t+(s=r)*i)}else if(n<0){if(e<=this.xmin)return null;(r=(this.xmin-e)/n)<s&&(a=this.xmin,o=t+(s=r)*i)}return[a,o]}_edgecode(e,t){return(e===this.xmin?1:e===this.xmax?2:0)|(t===this.ymin?4:t===this.ymax?8:0)}_regioncode(e,t){return(e<this.xmin?1:e>this.xmax?2:0)|(t<this.ymin?4:t>this.ymax?8:0)}}const ky=2*Math.PI;function _y(e){return e[0]}function Oy(e){return e[1]}function Cy(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Ey{constructor(e){this._delaunator=new uy(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}static from(e,t=_y,n=Oy,i){return new Ey("length"in e?function(e,t,n,i){const r=e.length,a=new Float64Array(2*r);for(let o=0;o<r;++o){const r=e[o];a[2*o]=t.call(i,r,o,e),a[2*o+1]=n.call(i,r,o,e)}return a}(e,t,n,i):Float64Array.from(function*(e,t,n,i){let r=0;for(const a of e)yield t.call(i,a,r,e),yield n.call(i,a,r,e),++r}(e,t,n,i)))}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,t=this.points;if(e.hull&&e.hull.length>2&&function(e){const{triangles:t,coords:n}=e;for(let i=0;i<t.length;i+=3){const e=2*t[i],r=2*t[i+1],a=2*t[i+2];if((n[a]-n[e])*(n[r+1]-n[e+1])-(n[r]-n[e])*(n[a+1]-n[e+1])>1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,n)=>t[2*e]-t[2*n]||t[2*e+1]-t[2*n+1]));const e=this.collinear[0],n=this.collinear[this.collinear.length-1],i=[t[2*e],t[2*e+1],t[2*n],t[2*n+1]],r=1e-8*Math.sqrt(Math.pow(i[3]-i[1],2)+Math.pow(i[2]-i[0],2));for(let a=0,o=t.length/2;a<o;++a){const e=Cy(t[2*a],t[2*a+1],r);t[2*a]=e[0],t[2*a+1]=e[1]}this._delaunator=new uy(t)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,r=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let s=0,l=n.length;s<l;++s){const e=r[s%3==2?s-2:s+1];-1!==n[s]&&-1!==a[e]||(a[e]=s)}for(let s=0,l=i.length;s<l;++s)o[i[s]]=s;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],this.triangles[1]=i[1],this.triangles[2]=i[1],a[i[0]]=1,2===i.length&&(a[i[1]]=0))}voronoi(e){return new Sy(this,e)}*neighbors(e){const{inedges:t,hull:n,_hullIndex:i,halfedges:r,triangles:a,collinear:o}=this;if(o){const t=o.indexOf(e);return t>0&&(yield o[t-1]),void(t<o.length-1&&(yield o[t+1]))}const s=t[e];if(-1===s)return;let l=s,c=-1;do{if(yield c=a[l],l=l%3==2?l-2:l+1,a[l]!==e)return;if(l=r[l],-1===l){const t=n[(i[e]+1)%n.length];return void(t!==c&&(yield t))}}while(l!==s)}find(e,t,n=0){if((e=+e)!=e||(t=+t)!=t)return-1;const i=n;let r;for(;(r=this._step(n,e,t))>=0&&r!==n&&r!==i;)n=r;return r}_step(e,t,n){const{inedges:i,hull:r,_hullIndex:a,halfedges:o,triangles:s,points:l}=this;if(-1===i[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=Math.pow(t-l[2*e],2)+Math.pow(n-l[2*e+1],2);const h=i[e];let d=h;do{let i=s[d];const h=Math.pow(t-l[2*i],2)+Math.pow(n-l[2*i+1],2);if(h<u&&(u=h,c=i),d=d%3==2?d-2:d+1,s[d]!==e)break;if(d=o[d],-1===d){if(d=r[(a[e]+1)%r.length],d!==i&&Math.pow(t-l[2*d],2)+Math.pow(n-l[2*d+1],2)<u)return d;break}}while(d!==h);return c}render(e){const t=null==e?e=new wy:void 0,{points:n,halfedges:i,triangles:r}=this;for(let a=0,o=i.length;a<o;++a){const t=i[a];if(t<a)continue;const o=2*r[a],s=2*r[t];e.moveTo(n[o],n[o+1]),e.lineTo(n[s],n[s+1])}return this.renderHull(e),t&&t.value()}renderPoints(e,t){const n=null==e?e=new wy:void 0,{points:i}=this;for(let r=0,a=i.length;r<a;r+=2){const n=i[r],a=i[r+1];e.moveTo(n+t,a),e.arc(n,a,t,0,ky)}return n&&n.value()}renderHull(e){const t=null==e?e=new wy:void 0,{hull:n,points:i}=this,r=2*n[0],a=n.length;e.moveTo(i[r],i[r+1]);for(let o=1;o<a;++o){const t=2*n[o];e.lineTo(i[t],i[t+1])}return e.closePath(),t&&t.value()}hullPolygon(){const e=new My;return this.renderHull(e),e.value()}renderTriangle(e,t){const n=null==t?t=new wy:void 0,{points:i,triangles:r}=this,a=2*r[e*=3],o=2*r[e+1],s=2*r[e+2];return t.moveTo(i[a],i[a+1]),t.lineTo(i[o],i[o+1]),t.lineTo(i[s],i[s+1]),t.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let t=0,n=e.length/3;t<n;++t)yield this.trianglePolygon(t)}trianglePolygon(e){const t=new My;return this.renderTriangle(e,t),t.value()}}class Ay{constructor(e=[]){this.map=null,this.points=[],this.pointGeometries=[],this.searchStartIndex=0,this.maxRadius=-1/0,this.triangulation=e=>{var t;return null===(t=this.map)||void 0===t?void 0:t.voronoi(e)},this.set(e)}get size(){return this.points.length}isSpatial(){return this.pointGeometries.length>0}set(e){this.maxRadius=Math.max(this.maxRadius,...e.map((({radius:e})=>e))),this.pointGeometries.push(...e),this.points.push(...e.map((({x:e,y:t})=>[e+1e-6*Math.random(),t]))),this.points.length>0&&(this.map=Ey.from(this.points))}getMergeData(){return[...this.pointGeometries]}keys(){return this.pointGeometries.map((({value:{x:e}})=>e))}find(e){const t=[];if(null!==this.map){const n=this.map.find(e.x,e.y,this.searchStartIndex),i=this.pointGeometries[n];i&&(this.searchStartIndex=n,t.push(i),t.push(...this.getRadialNeighbors(n,e,new Set([n]))))}return t}getRadialNeighbors(e,t,n){if(null===this.map)return[];return[...this.map.neighbors(e)].reduce(((e,i)=>{if(n.has(i))return e;n.add(i);const r=this.pointGeometries[i];return r&&(e.push(r),Vn(r,t)<Math.min(this.maxRadius,10)&&e.push(...this.getRadialNeighbors(i,t,n))),e}),[])}}const Ty=Object.freeze({linear:"linear",spatial:"spatial"});class Iy{constructor(){this.linearMap=new sy,this.spatialMap=new Ay}triangulation(e){return this.spatialMap.triangulation(e)}keys(){return[...this.linearMap.keys(),...this.spatialMap.keys()]}get size(){return this.linearMap.size+this.spatialMap.size}set(e,t=Ty.linear){t===Ty.spatial&&oy(e)?this.spatialMap.set([e]):this.linearMap.set(e)}find(e,t,n,i){if(null===e&&!t)return[];const r=void 0===t?[]:this.spatialMap.find(t);return[...this.linearMap.find(e),...r].filter((({seriesIdentifier:{smHorizontalAccessorValue:e,smVerticalAccessorValue:t}})=>(Pn(i)||t===i)&&(Pn(n)||e===n)))}getMergeData(){return{spatialGeometries:this.spatialMap.getMergeData(),linearGeometries:this.linearMap.getMergeData()}}merge(...e){for(const t of e){const{spatialGeometries:e,linearGeometries:n}=t.getMergeData();this.spatialMap.set(e),n.forEach((e=>{Array.isArray(e)?e.forEach((e=>this.linearMap.set(e))):this.linearMap.set(e)}))}}}function jy(e="y1"){return(t,n=!0)=>{var i,r;const a=t[e];return null===a&&n?null!==(r=null===(i=t.filled)||void 0===i?void 0:i[e])&&void 0!==r?r:null:a}}function Ly({filled:e,initialY1:t}){return void 0!==(null==e?void 0:e.x)||void 0!==(null==e?void 0:e.y1)||null==t}function Py(e,t,n){let i=null,r=!1;return e.every((e=>Ly(e)))?[[t.range[0],t.range[1]]]:e.reduce(((e,a)=>{const o=t.scale(a.x);if(null===o)return e;const s=o-n+t.bandwidth/2;if(Ly(a)){const n=t.range[1]-t.bandwidth*(2/3);null!==i&&s===n&&e.push([i,s]),r=!0}else r&&(null!==i?e.push([i,s]):e.push([0,s]),r=!1),i=s;return e}),[])}function zy(e,t,n,i){const{default:r,highlighted:a,unhighlighted:o}=t;if(n){return n.seriesIdentifiers.some((({key:t})=>t===e.key))?a:o}return r}function Dy(e,t){const n=rm(e),i=Cf(e.domain);return(e,r)=>{const a=r(e);return null!==a&&!(n&&i>=0&&a<=0||i<0&&a>=0)&&t.isValueInDomain(e.x)}}function Ny(e){const t=jy(),n=Ry(e);return i=>{const r=e.scaleOrThrow(t(i)),a=n(i);return r-(o=r,s=a,Math.abs(o-s)<=.5?.5:0);var o,s}}function Ry(e){const t=rm(e),n=Cf(e.domain),i=n>=0?Math.min(...e.domain):Math.max(...e.domain);return({y0:r})=>null===r?t?e.scaleOrThrow(i):e.scaleOrThrow(0):t&&(n>=0&&r<=0||n<0&&r>=0)?e.scaleOrThrow(i):e.scaleOrThrow(r)}function Vy(e,t,n,i,r,a,o,s,l,c,u=!1){const h=new Iy,d=l.enabled?function(e,t,n=50){if(0===e.length)return()=>0;const{min:i,max:r}=e.reduce(((e,{mark:t})=>null===t?e:{min:Math.min(e.min,t/2),max:Math.max(e.max,t/2)}),{min:1/0,max:-1/0}),a=Math.min(Math.max(n,0),100),o=(r-i||100*r)/Math.pow(a,2);return function(e,n=0){if(null===e)return n;const r=(e/2-i)/o,a=2;return r?Math.sqrt(r+a)+t:t}}(t.data,o.strokeWidth,l.ratio):()=>0,f=u?Ty.spatial:Ty.linear,p=Ny(i),g=Ry(i),m=Dy(i,n),y=t.data.reduce(((i,u,y)=>{const{x:b,mark:v}=u,x=t.data[y-1],w=t.data[y+1];if(!n.isValueInDomain(b))return i;if(Ly(u))return i;const M=n.scale(b);if(null===M)return i;const S=[];return(s?["y0","y1"]:["y1"]).forEach(((n,i)=>{var k;const _=jy(n);let O;try{if(O="y1"===n?p(u):g(u),null===O)return}catch(P){return}const C=function({y1:e,y0:t,initialY1:n,initialY0:i},r,a,o){if(a)return o===to.Percentage?r?t:e:r?i:n;return o===to.Percentage?(null!=e?e:0)-(null!=t?t:0):n}(u,0===i,s,t.stackMode),E={key:t.key,specId:t.specId,yAccessor:t.yAccessor,splitAccessors:t.splitAccessors,seriesKeys:t.seriesKeys,smVerticalAccessorValue:t.smVerticalAccessorValue,smHorizontalAccessorValue:t.smHorizontalAccessorValue},A=function(e,t,n){const i=n&&n(e,t);if(!i)return;if("string"==typeof i)return{stroke:i};return i}(u,E,c),T=function(e,t,n){var i;const r=Nn(t,n,{mergeOptionalPartialValues:!0}),a=e=>e*r.opacity;return{fill:{color:Ft(In(e,r.fill),a)},stroke:{color:Ft(In(e,r.stroke),a),width:r.strokeWidth},shape:null!==(i=r.shape)&&void 0!==i?i:Wn.Circle}}(a,o,A),I=function(e,t,n,i,r){if(0===e&&(Pn(r)||!n(r,$y)))return!0;if(e===t-1&&(Pn(i)||!n(i,$y)))return!0;return(Pn(i)||!n(i,$y))&&(Pn(r)||!n(r,$y))}(y,t.data.length,m,x,w),j=l.enabled?Math.max(d(v),o.radius):null!==(k=null==A?void 0:A.radius)&&void 0!==k?k:o.radius,L={x:M,y:O,radius:j,color:a,style:T,value:{x:b,y:C,mark:v,accessor:s&&0===i?ay.Y0:ay.Y1,datum:u.datum},transform:{x:e,y:0},seriesIdentifier:E,panel:r,orphan:I};h.set(L,f),m(u,_)&&S.push(L)})),[...i,...S]}),[]);return{pointGeometries:y,indexedGeometryMap:h}}function $y(e){var t;return(null===(t=e.filled)||void 0===t?void 0:t.y1)?null:e.y1}function Fy(e,t,n,i,r,a,o,s,l,c,u,h=!1,d,f){const p=Ny(i),g=Ry(i),m=Dy(i,n),y=jy(),b=jy("y0"),v=function(){var e=mm,t=null,n=fm(0),i=ym,r=fm(!0),a=null,o=gm,s=null;function l(l){var c,u,h,d,f,p=l.length,g=!1,m=new Array(p),y=new Array(p);for(null==a&&(s=o(f=dm())),c=0;c<=p;++c){if(!(c<p&&r(d=l[c],c,l))===g)if(g=!g)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=u;--h)s.point(m[h],y[h]);s.lineEnd(),s.areaEnd()}g&&(m[c]=+e(d,c,l),y[c]=+n(d,c,l),s.point(t?+t(d,c,l):m[c],i?+i(d,c,l):y[c]))}if(f)return s=null,f+""||null}function c(){return bm().defined(r).curve(o).context(a)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:fm(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:fm(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:fm(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:fm(+e),i=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:fm(+e),l):n},l.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:fm(+e),l):i},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(i)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(r="function"==typeof e?e:fm(!!e),l):r},l.curve=function(e){return arguments.length?(o=e,null!=a&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(null==e?a=s=null:s=o(a=e),l):a},l}().x((({x:e})=>n.scaleOrThrow(e)-l)).y1(p).y0(g).defined((e=>m(e,y)&&(!s||m(e,b)))).curve(Km(o)),x=Py(t.data,n,l);let w;try{w=v.lineY1()(t.data)}catch(O){w=null}const M=[];if(w&&M.push(w),s){let e;try{e=v.lineY0()(t.data)}catch(C){e=null}e&&M.push(e)}const{pointGeometries:S,indexedGeometryMap:k}=Vy(e-l,t,n,i,r,a,c.point,s,u,d,!1);let _;try{_=v(t.data)||""}catch(E){_=""}return{areaGeometry:{area:_,lines:M,points:S,color:a,transform:{y:0,x:e},seriesIdentifier:{key:t.key,specId:t.specId,yAccessor:t.yAccessor,splitAccessors:t.splitAccessors,seriesKeys:t.seriesKeys,smHorizontalAccessorValue:t.smHorizontalAccessorValue,smVerticalAccessorValue:t.smVerticalAccessorValue},seriesAreaStyle:c.area,seriesAreaLineStyle:c.line,seriesPointStyle:c.point,isStacked:h,clippedRanges:x,hideClippedRanges:!f},indexedGeometryMap:k}}function By(e,t,n,i,r,a,o,s,l,c=0,u,h){const d=new Iy,f=[],p=new ss,{fontSize:g,fontFamily:m}=o.displayValue;return t.data.forEach((y=>{var b,v,x;const{y0:w,y1:M,initialY1:S,filled:k}=y;if(null===M||null===S||k&&void 0!==k.y1)return;if(!n.isValueInDomain(y.x))return;let _,O;if(i.type===Ja.Log?(_=0===M||null===M?i.range[0]:i.scale(M),O=i.isInverted?0===w||null===w?i.range[1]:i.scale(w):0===w||null===w?i.range[0]:i.scale(w)):(_=i.scale(M),O=null===w?i.scale(0):i.scale(w)),null===_||null===O)return;const C=Math.abs(c);let E=O-_;if(void 0!==C&&0!==E&&Math.abs(E)<C){const e=C-Math.abs(E);E<0?(E=-C,_+=e):(E=C,_-=e)}const A=E<0;E=Math.abs(E),_=A?_-E:_;const T=n.scale(y.x);if(null===T)return;const I={key:t.key,specId:t.specId,yAccessor:t.yAccessor,splitAccessors:t.splitAccessors,seriesKeys:t.seriesKeys,smHorizontalAccessorValue:t.smHorizontalAccessorValue,smVerticalAccessorValue:t.smVerticalAccessorValue},j=function(e,t,n,i){const r=i&&i(e,t);if(!r)return n;if("string"==typeof r)return Object.assign(Object.assign({},n),{rect:Object.assign(Object.assign({},n.rect),{fill:r})});return Nn(n,r,{mergeOptionalPartialValues:!0})}(y,I,o,l),L=En(null!==(b=j.rect.widthRatio)&&void 0!==b?b:1,0,1)*n.bandwidth,P=En(null!==(v=j.rect.widthPixel)&&void 0!==v?v:0,0,L),z=En(null!==(x=j.rect.widthPixel)&&void 0!==x?x:n.bandwidth,P,L),D=T+n.bandwidth*e+n.bandwidth/2-z/2,N=u===to.Percentage?M-(null!=w?w:0):S,R=s&&s.valueFormatter?s.valueFormatter(N):void 0,V=s&&s.isAlternatingValueLabel&&f.length%2?void 0:R,{displayValueWidth:$,fixedFontScale:F}=function(e,{padding:t,fontSize:n,fontFamily:i,bboxCalculator:r,width:a},o){const s=Math.max("number"==typeof n?n:n.min,1),l=r.compute(e||"",t,s,i).width;if("number"!=typeof n)return{fixedFontScale:s,displayValueWidth:l};return{fixedFontScale:s,displayValueWidth:o&&o.isValueContainedInElement?a:l}}(V||"",{padding:1,fontSize:g,fontFamily:m,bboxCalculator:p,width:z},s),B=null==h||[0,180].includes(h),H=function(e,t,n){if("number"==typeof n)return 1;const i=e*t;if(i>n.max)return n.max/t;if(i<n.min)return n.min/t;return e}(.7*z/Math.max(B?$:F,1),F,g),W=s?s.hideClippedValue:void 0,U=B?H:1,Y={displayValue:s&&s.showValueLabel?{fontScale:H,fontSize:F,text:V,width:U*$,height:H*F,hideClippedValue:W,isValueContainedInElement:s.isValueContainedInElement}:void 0,x:D,y:_,transform:{x:0,y:0},width:z,height:E,color:a,value:{x:y.x,y:N,mark:null,accessor:ay.Y1,datum:y.datum},seriesIdentifier:I,seriesStyle:j,panel:r};d.set(Y),f.push(Y)})),p.destroy(),{barGeometries:f,indexedGeometryMap:d}}function Hy(e,t,n,i,r,a,o,s,l,c,u,h){const{pointGeometries:d,indexedGeometryMap:f}=Vy(e-s,t,n,i,a,r,l.point,o,c,h,!u);return{bubbleGeometry:{points:d,color:r,seriesIdentifier:{key:t.key,specId:t.specId,yAccessor:t.yAccessor,splitAccessors:t.splitAccessors,seriesKeys:t.seriesKeys,smHorizontalAccessorValue:t.smHorizontalAccessorValue,smVerticalAccessorValue:t.smVerticalAccessorValue},seriesPointStyle:l.point},indexedGeometryMap:f}}function Wy(e,t,n,i,r,a,o,s,l,c,u,h,d){const f=Ny(i),p=Dy(i,n),g=jy(),m=bm().x((({x:e})=>n.scaleOrThrow(e)-l)).y(f).defined((e=>p(e,g))).curve(Km(o)),{pointGeometries:y,indexedGeometryMap:b}=Vy(e-l,t,n,i,r,a,c.point,s,u,h),v=Py(t.data,n,l);let x;try{x=m(t.data)||""}catch(w){x=""}return{lineGeometry:{line:x,points:y,color:a,transform:{x:e,y:0},seriesIdentifier:{key:t.key,specId:t.specId,yAccessor:t.yAccessor,splitAccessors:t.splitAccessors,seriesKeys:t.seriesKeys,smHorizontalAccessorValue:t.smHorizontalAccessorValue,smVerticalAccessorValue:t.smVerticalAccessorValue},seriesLineStyle:c.line,seriesPointStyle:c.point,clippedRanges:v,hideClippedRanges:!d},indexedGeometryMap:b}}function Uy(e,t=0){var n,i;if("number"==typeof e){const n=Math.max(t,e);return{inner:n,outer:n}}return{inner:Math.max(t,null!==(n=null==e?void 0:e.inner)&&void 0!==n?n:0),outer:Math.max(t,null!==(i=null==e?void 0:e.outer)&&void 0!==i?i:0)}}function Yy({horizontal:e,vertical:t}){return{width:e.bandwidth,height:t.bandwidth}}const Gy=({domain:e})=>e.length>0&&void 0!==e[0];function qy(e){const{xDomain:t,totalBarsInCluster:n,range:i,barsPadding:r,enableHistogramMode:a,integersOnly:o}=e,{type:s,nice:l,minInterval:c,domain:u,isBandScale:h,timeZone:d,logBase:f,desiredTickCount:p}=t,g=Math.abs(i[1]-i[0]),m=i[1]<i[0];if(s===Ja.Ordinal){const e=n>0?n:1,t=g/(u.length*e);return new vf(u,i,t,r)}if(h){const[e,t]=u,o=!!a&&t-e==0,h=[e,o?e+c:t],y=g/((h[1]-h[0])/c+(o?0:1)),{start:b,end:v}=function(e,t,n,i,r){const a=t?0:r;return{start:e?n-a:n,end:e?i:i-a}}(m,o,i[0],i[1],y);return new Of({type:s,domain:h,range:[b,v],nice:l},{bandwidth:n>0?y/n:y,minInterval:c,timeZone:d,totalBarsInCluster:n,barsPadding:r,desiredTickCount:p,isSingleValueHistogram:o,logBase:f})}return new Of({type:s,domain:u,range:i,nice:l},{bandwidth:0,minInterval:c,timeZone:d,totalBarsInCluster:n,barsPadding:r,desiredTickCount:p,integersOnly:o,logBase:f})}function Xy(e){const{yDomains:t,range:n,integersOnly:i}=e;return t.reduce(((e,{type:t,nice:r,desiredTickCount:a,domain:o,groupId:s,logBase:l,logMinLimit:c,domainPixelPadding:u,constrainDomainPadding:h})=>{const d=new Of({type:t,domain:o,range:n,nice:r},{desiredTickCount:a,integersOnly:i,logBase:l,logMinLimit:c,domainPixelPadding:u,constrainDomainPadding:h});return e.set(s,d),e}),new Map)}const Zy=e=>`${e}`;function Ky(e,t){return Vc(e)===(t%180==0)}function Qy({groupId:e,integersOnly:t,position:n},i,r,a,o,s,l,c){var u;return Ky(n,o)?null!==(u=Xy({yDomains:r,range:s,integersOnly:t}).get(e))&&void 0!==u?u:null:qy({xDomain:i,totalBarsInCluster:a,range:s,barsPadding:l,enableHistogramMode:c,integersOnly:t})}function Jy(e,t){const{width:n,height:i}=e,r=jn(t),a=Math.abs(n*Math.sin(r))+Math.abs(i*Math.cos(r));return{width:Math.abs(n*Math.cos(r))+Math.abs(i*Math.sin(r)),height:a}}function eb({tickLine:e,tickLabel:t},n,i,r,a,o,s,l,c){const{maxLabelBboxWidth:u,maxLabelTextWidth:h,maxLabelBboxHeight:d,maxLabelTextHeight:f}=o,p=s?e.size+e.padding:0,g=Uy(t.padding),m=i===wn.Left,y=i===wn.Top,b=function(e,t,n=kn.Near){return n===kn.Center||n===kn.Right||n===kn.Left?n:[-90,90].includes(t)?e===wn.Left||e===wn.Right?kn.Center:e===wn.Top?90===t?kn.Right:kn.Left:-90===t?kn.Right:kn.Left:![0,180].includes(t)||e!==wn.Bottom&&e!==wn.Top?e===wn.Left?n===kn.Near?kn.Right:kn.Left:e===wn.Right?n===kn.Near?kn.Left:kn.Right:kn.Center:kn.Center}(i,r,null==c?void 0:c.horizontal),v=function(e,t,n=_n.Middle){return n===_n.Middle||n===_n.Top||n===_n.Bottom?n:[0,180].includes(t)?e===wn.Bottom||e===wn.Top?_n.Middle:e===wn.Left?0===t?_n.Bottom:_n.Top:180===t?_n.Bottom:_n.Top:e===wn.Top?n===_n.Near?_n.Bottom:_n.Top:e===wn.Bottom?n===_n.Near?_n.Top:_n.Bottom:_n.Middle}(i,r,null==c?void 0:c.vertical),x=function(e,t){const n={x:0,y:0};return"global"===t.reference?{local:n,global:{x:Fn(t.x,e.maxLabelBboxWidth,0),y:Fn(t.y,e.maxLabelBboxHeight,0)}}:{global:n,local:{x:Fn(t.x,e.maxLabelTextWidth,0),y:Fn(t.y,e.maxLabelTextHeight,0)}}}(o,l),w=function(e,t){switch(t){case kn.Left:return-e/2;case kn.Right:return e/2;case kn.Center:default:return 0}}(h,b)+x.local.x,M=function(e,t){switch(t){case _n.Top:return-e/2;case _n.Bottom:return e/2;case _n.Middle:default:return 0}}(f,v)+x.local.y;if(Vc(i)){return{x:m?a.width-p-g.inner:p+g.inner,y:n,offsetX:u/2*(m?-1:1)+x.global.x,offsetY:x.global.y,textOffsetY:M,textOffsetX:w,horizontalAlign:b,verticalAlign:v}}const S=y?-d/2:d/2;return{x:n,y:y?a.height-p-g.inner:p+g.inner,offsetX:x.global.x,offsetY:S+x.global.y,textOffsetX:w,textOffsetY:M,horizontalAlign:b,verticalAlign:v}}function tb(e,t,n,i,r,a,o){var s,l;const c=t.ticks(),u=t.domain[0]-t.domain[1]==0,h=i&&t.bandwidth>0;if(h){const e=c[c.length-1];if(!u){const n=e-c[c.length-2],i=t.minInterval/n;for(let t=1;t<=i;t++)c.push(t*n+e)}}const d=n>0?n:1,f=(t.bandwidth/(1-t.barsPadding)-t.bandwidth)/2,p=(i?-f:t.bandwidth*d/2)+(t.isSingleValue()?0:a),g=null!==(s=e.tickFormat)&&void 0!==s?s:r;if(u&&h){const[e]=c,n={value:e,label:g(e,o),position:(null!==(l=t.scale(e))&&void 0!==l?l:0)+p},i=e+t.minInterval;return[n,{value:i,label:g(i,o),position:t.bandwidth+2*f}]}return function(e,t,n,i,r){const a=t.ticks(),o=a.map((a=>{var o,s;return{value:a,label:(null!==(o=e.tickFormat)&&void 0!==o?o:i)(a,r),position:(null!==(s=t.scale(a))&&void 0!==s?s:0)+n}}));if(!0===e.showDuplicatedTicks)return o;return Rn(o,"label",!0)}(e,t,p,r,o)}function nb({visible:e,fontSize:t,padding:n}){if(!e||t<=0)return 0;const{inner:i,outer:r}=Uy(n);return i+t+r}function ib({visible:e,strokeWidth:t,size:n},i){return!i&&e&&n>0&&t>=Bf}function rb(e,{chartPaddings:t,chartMargins:n,axes:i},r,a,o,s,l,c,u,h,d,f,p){const g=[],{chartDimensions:m}=e,y=Yy(u),b=[...o.entries()].reduce(((e,[t,r])=>{var o;const l=tm(a,t);if(!l)return e;const{tickLine:c,tickLabel:h,axisTitle:d,axisPanelTitle:f}=null!==(o=s.get(t))&&void 0!==o?o:i,p=Uy(h.padding),g=ib(c,l.hide)?c.size+c.padding:0,y=h.visible?p.inner+p.outer:0,{dimensions:b,topIncrement:v,bottomIncrement:x,leftIncrement:w,rightIncrement:M}=function(e,t,n,i,r,a,o,s,l,c,u,h,d,f){const p=r.title&&"top"!==r.titlePosition?nb(n):0,{position:g}=r,{maxLabelBboxHeight:m,maxLabelBboxWidth:y}=a,{top:b,left:v,height:x,width:w}=e,M={top:b,left:v,width:w,height:x};let S=0,k=0,_=0,O=0;if(Vc(g)){const e=d+(f?y:0)+h+p+(Gy(o.vertical)?nb(i):0);g===wn.Left?(_=t.left+e,M.left=c+t.left):(O=e+t.right,M.left=v+w+u),M.width=e}else{const e=d+(f?m:0)+h+p+(Gy(o.horizontal)?nb(i):0);g===wn.Top?(S=e+t.top,M.top=s+t.top):(k=e+t.bottom,M.top=b+x+l),M.height=e}return{dimensions:M,topIncrement:S,bottomIncrement:k,leftIncrement:_,rightIncrement:O}}(m,n,d,f,l,r,u,e.top,e.bottom,e.left,e.right,g,y,h.visible);return e.pos.set(t,{anchor:{top:e.top,left:e.left,right:e.right,bottom:e.bottom},dimensions:b}),{top:e.top+v,bottom:e.bottom+x,left:e.left+w,right:e.right+M,pos:e.pos}}),{top:0,bottom:t.bottom,left:e.leftMargin,right:t.right,pos:new Map}).pos;return o.forEach(((e,t)=>{const n=tm(a,t),i=b.get(t);if(!n||!i)return;const o=Vc(n.position),s=function(e,t,{width:n,height:i}){switch(e){case wn.Bottom:case wn.Top:return function(e,t){switch(e){case 90:return{minRange:0,maxRange:t};case-90:case 180:return{minRange:t,maxRange:0};default:return{minRange:0,maxRange:t}}}(t,n);case wn.Left:case wn.Right:default:return function(e,t){switch(e){case 90:return{minRange:0,maxRange:t};case-90:return{minRange:t,maxRange:0};case 180:return{minRange:0,maxRange:t};default:return{minRange:t,maxRange:0}}}(t,i)}}(n.position,r,y),u=Qy(n,l,c,h,r,[s.minRange,s.maxRange],p,d);if(!u)throw new Error(`Cannot compute scale for axis spec ${n.id}`);const m={timeZone:l.timeZone},v=d&&(o&&[-90].includes(r)||!o&&[180].includes(r))?u.step:0,x=tb(n,u,h,d,o?f:Zy,v,m),w=function(e,t,n){e.sort(((e,t)=>e.position-t.position));const{showOverlappingTicks:i,showOverlappingLabels:r}=t,{maxLabelBboxHeight:a,maxLabelBboxWidth:o}=n,s=Vc(t.position)?a/2:o/2;let l=0;const c=[];for(let u=0;u<e.length;u++){const{position:t}=e[u];if(0===u)c.push(e[u]),l=t+s;else if(t-s>=l)c.push(e[u]),l=t+s;else if(i||r){const t=Object.assign(Object.assign({},e[u]),{label:r?e[u].label:""});c.push(t)}}return c}(x,n,e),M=e.isHidden?{width:0,height:0}:{width:o?i.dimensions.width:y.width,height:o?y.height:i.dimensions.height};g.push({axis:{id:n.id,position:n.position},anchorPoint:{x:i.dimensions.left,y:i.dimensions.top},size:M,parentSize:{height:i.dimensions.height,width:i.dimensions.width},dimension:e,ticks:x,visibleTicks:w})})),g}function ab(e,t){return e.groupId!==t.groupId?e.insertIndex-t.insertIndex:e.isStacked&&!t.isStacked?-1:!e.isStacked&&t.isStacked?1:e.isStacked&&t.isStacked?t.insertIndex-e.insertIndex:e.insertIndex-t.insertIndex}function ob(e,t,n){const i=[...t.values()];return e.map((e=>{const{spec:r,data:a,isStacked:o}=e,s=function(e,t,n){const i=(po(e)||fo(e))&&!e.fit,r=t===Ja.Linear||t===Ja.Time;return i&&r&&!n}(r,n,o);if(a.length===t.size||s)return Object.assign(Object.assign({},e),{data:a});const l=[],c=new Set(t);for(let t=0;t<a.length;t++){const{x:e}=a[t];l.push(a[t]),c.delete(e)}const u=[...c.values()];for(let t=0;t<u.length;t++){const e=u[t],n=i.indexOf(e);l.splice(n,0,{x:e,y1:null,y0:null,initialY1:null,initialY0:null,mark:null,datum:void 0,filled:{x:e}})}return Object.assign(Object.assign({},e),{data:l})}))}const sb=(e,t)=>(n,i)=>e===Ja.Ordinal||"string"==typeof n.x||"string"==typeof i.x?t?t.indexOf(n.x)-t.indexOf(i.x):0:n.x-i.x;function lb(e,t,n){const i=e.reduce(((e,t)=>(e[t.key]=t,e)),{}),r=[...t],a=[],o=new Map;e.forEach((({data:e,key:t,isFiltered:n})=>{if(n)return;const i=new Map;e.forEach((e=>{const{x:n,y0:o,y1:s}=e,l=r.indexOf(n);void 0===a[l]&&(a[l]={x:n}),a[l][`${t}-y0`]=o,a[l][`${t}-y1`]=(null!=s?s:0)-(null!=o?o:0),i.set(n,e)})),o.set(t,i)}));const s=function(e){switch(e){case to.Percentage:return Gm;case to.Silhouette:return qm;case to.Wiggle:return Xm;default:return Wm}}(n),l=Object.keys(i).reduce(((e,t)=>[...e,`${t}-y0`,`${t}-y1`]),[]),c=function(){var e=fm([]),t=Um,n=Wm,i=Ym;function r(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a<c;++a){for(var h,d=s[a],f=u[a]=new Array(l),p=0;p<l;++p)f[p]=h=[0,+i(r[p],d,p,r)],h.data=r[p];f.key=d}for(a=0,o=t(u);a<c;++a)u[o[a]].index=a;return n(u,o),u}return r.keys=function(t){return arguments.length?(e="function"==typeof t?t:fm(vm.call(t)),r):e},r.value=function(e){return arguments.length?(i="function"==typeof e?e:fm(+e),r):i},r.order=function(e){return arguments.length?(t=null==e?Um:"function"==typeof e?e:fm(vm.call(e)),r):t},r.offset=function(e){return arguments.length?(n=null==e?Wm:e,r):n},r}().keys(l).order(Um).offset(s)(a),u=c.reduce(((e,t)=>{const n=t.key.slice(0,-3),i=t.key.slice(-2);return"y1"!==i&&"y0"!==i||(e[n]||(e[n]={y0:[],y1:[]}),e[n][i]=t.map((e=>e))),e}),{}),h=Object.keys(u).map((e=>{const t=i[e],r=o.get(e),{y0:a,y1:s}=u[e],l=s.map(((e,t)=>{const{x:i}=e.data;if(null==i)return null;const o=null==r?void 0:r.get(i);if(!o)return null;const[,s]=a[t],[,l]=e,{initialY0:c,initialY1:u,mark:h,datum:d,filled:f}=o;return{x:i,y1:cb(l,n),y0:cb(s,n),initialY0:c,initialY1:u,mark:h,datum:d,filled:f}})).filter((e=>null!==e));return Object.assign(Object.assign({},t),{data:l})}));return n?h:h.map(((e,t)=>{if("bar"!==e.seriesType||!e.isStacked)return e;const n=e.data.map((n=>{var i;if(!n.datum)return n;let r=n.initialY1||0,a=n.initialY0||0;if(r){for(let o=0;o<t;o++){if(!h[o].isStacked||h[o].groupId!==e.groupId)continue;const t=null===(i=h[o].data.find((e=>e.x===n.x)))||void 0===i?void 0:i.initialY1;r&&t&&(r>=0&&t>=0||r<0&&t<0)&&(a=(a||0)+t)}r=(a||0)+r-(n.initialY0||0)}return Object.assign(Object.assign({},n),{y1:r,y0:a})}));return Object.assign(Object.assign({},e),{data:n})}))}function cb(e,t){return t===to.Percentage?En(e,0,1):e}const ub=({x:e,y1:t,fittingIndex:n})=>["string"==typeof e?n:e,t],hb=(e,t,n,i,r,a)=>{if(null!==n&&r===io.Carry){const{y1:t}=n;return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}if(null!==i&&r===io.Lookahead){const{y1:t}=i;return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}if(null!==n&&null!==i){if(r===io.Average){const t=(n.y1+i.y1)/2;return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}if(null!==e.x&&null!==n.x&&null!==i.x){const[a,o]=ub(n),[s,l]=ub(i),c="string"==typeof e.x?t:e.x;if(r===io.Nearest){const t=Math.abs(c-a)>Math.abs(c-s)?l:o;return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}if(r===io.Linear){const t=n.y1+(l-o)/(s-a)*(c-a);return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}}}else if(!(null===n&&null===i||r!==io.Nearest&&"nearest"!==a)){const t=null!==n?n.y1:i.y1;return Object.assign(Object.assign({},e),{y1:t,filled:Object.assign(Object.assign({},e.filled),{y1:t})})}return void 0===a||"string"==typeof a?e:Object.assign(Object.assign({},e),{y1:a,filled:Object.assign(Object.assign({},e.filled),{y1:a})})},db=(e,t,n,i=!1)=>{const{type:r,value:a,endValue:o}=(s=t)?"string"==typeof s?{type:s}:s.type===io.Explicit&&void 0===s.value?{type:io.None}:{type:s.type,value:s.type===io.Explicit?s.value:void 0,endValue:s.endValue}:{type:io.None};var s;if(r===io.None)return e;if(r===io.Zero)return e.map((e=>Object.assign(Object.assign({},e),{y1:null===e.y1?0:e.y1,filled:Object.assign(Object.assign({},e.filled),{y1:null===e.y1?0:void 0})})));if(r===io.Explicit)return void 0===a?e:e.map((e=>Object.assign(Object.assign({},e),{y1:null===e.y1?a:e.y1,filled:Object.assign(Object.assign({},e.filled),{y1:null===e.y1?a:void 0})})));const l=i||n===Ja.Ordinal?e:e.slice().sort(sb(n)),c=[];let u=null,h=null;for(let d=0;d<l.length;d++){let e=d;const t=l[d];if(null===t.y1&&null===h&&(r===io.Lookahead||r===io.Nearest||r===io.Average||r===io.Linear||"nearest"===o))for(e=d+1;e<l.length;e++){const t=l[e];if(null!==t.y1&&null!==t.x){h=Object.assign(Object.assign({},t),{fittingIndex:e});break}}const n=null===t.y1?hb(t,d,u,h,r,o):t;c[d]=n,null!==t.y1&&null!==t.x&&(u=Object.assign(Object.assign({},t),{fittingIndex:d})),null!==h&&h.x<=t.x&&(h=null)}return c};const fb=(e,t,n)=>e.map((e=>{var{specId:i,data:r}=e,a=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["specId","data"]);const o=tm(t,i);if(null!=o&&(po(o)||fo(o))&&void 0!==o.fit){const e=db(r,o.fit,n);return Object.assign(Object.assign({specId:i},a),{data:e})}return Object.assign({specId:i,data:r},a)}));const pb=" - ";function gb(e,t){var n;return"function"==typeof e?null!==(n=e.fieldName)&&void 0!==n?n:`(index:${t})`:e}function mb(e,t,n=!1,i,r){var a,o,s,l,c;const{seriesType:u,id:h,groupId:d,data:f,xAccessor:p,yAccessors:g,y0Accessors:m,markSizeAccessor:y,splitSeriesAccessors:b=[]}=e,v=new Map,x=[],w=[];for(let M=0;M<f.length;M++){const S=f[M],k=bb(S,b);if(b.length>0&&k.size<1)continue;if("object"!=typeof S||null===S)continue;const _=Ac(S,p);if("string"!=typeof _&&"number"!=typeof _)continue;x.push(_);let O=null!==(a=t.get(_))&&void 0!==a?a:0;const C=null===(s=null===(o=null==r?void 0:r.horizontal)||void 0===o?void 0:o.by)||void 0===s?void 0:s.call(o,e,S),E=null===(c=null===(l=null==r?void 0:r.vertical)||void 0===l?void 0:l.by)||void 0===c?void 0:c.call(l,e,S);g.forEach(((r,a)=>{var o;const s=vb(S,r,w,m&&m[a],y),l=gb(r,a),c=[...[...k.values()].map(((e,t)=>gb(e,t))),l],f=Object.assign(Object.assign({specId:h,seriesKeys:c,yAccessor:l,splitAccessors:k},!Pn(E)&&{smVerticalAccessorValue:E}),!Pn(C)&&{smHorizontalAccessorValue:C}),p=yb(f,d);O+=null!==(o=s.y1)&&void 0!==o?o:0;const g=Object.assign(Object.assign({x:_},s),{smH:C,smV:E}),b=v.get(p);b?b.data.push(g):v.set(p,Object.assign(Object.assign({},f),{groupId:d,seriesType:u,stackMode:i,isStacked:n,seriesKeys:c,key:p,data:[g],spec:e,insertIndex:0,isFiltered:!1})),t.set(_,O)}))}return w.length>0&&fs.warn(`Found non-numeric y value${w.length>1?"s":""} in dataset for spec "${h}"`,`(${w.map((e=>JSON.stringify(e))).join(", ")})`),{dataSeries:v,xValues:x}}function yb({specId:e,yAccessor:t,splitAccessors:n,smVerticalAccessorValue:i,smHorizontalAccessorValue:r},a){return`groupId{${a}}spec{${e}}yAccessor{${t}}splitAccessors{${[...n.entries()].sort((([e],[t])=>e>t?1:-1)).map((([e,t])=>`${e}-${t}`)).join("|")}}${i?`smV{${i}}`:""}${r?`smH{${r}}`:""}`}function bb(e,t=[]){const n=new Map;return"object"==typeof e&&null!==e&&t.forEach(((t,i)=>{const r=Ac(e,t);if("string"==typeof r||"number"==typeof r){const e=gb(t,i);n.set(e,r)}})),n}function vb(e,t,n,i,r){const a=void 0===r?null:xb(Ac(e,r),n),o=xb(Ac(e,t),n),s=i?xb(Ac(e,i),n):null;return{y1:o,datum:e,y0:s,mark:a,initialY0:s,initialY1:o}}function xb(e,t){if(null==e)return null;const n=Number(e);return isNaN(n)?(t.push(e),null):n}const wb=(e,t,n)=>e.map((e=>{var{data:i}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["data"]);return Object.assign(Object.assign({},r),{data:i.sort(sb(n,[...t.values()]))})}));function Mb(e,t=[],n,i){let r=[];const a=new Map,o=new Set;let s=!0,l=!1;const c=function(e){const t=new Map,n=iy(e);return e.forEach((e=>{const i=t.get(e.groupId)||{stackMode:void 0,stacked:[],nonStacked:[]};ry(e,n)?i.stacked.push(e):i.nonStacked.push(e),void 0===i.stackMode&&void 0!==e.stackMode&&(i.stackMode=e.stackMode),void 0!==e.stackMode&&void 0!==i.stackMode&&(i.stackMode,e.stackMode),t.set(e.groupId,i)})),t}(e);for(const f of e){f.xScaleType===Ja.Ordinal&&(l=!0);const e=c.get(f.groupId),n=Boolean(null==e?void 0:e.stacked.find((({id:e})=>e===f.id))),{dataSeries:u,xValues:h}=mb(f,a,n,null==e?void 0:e.stackMode,i);let d=[...u.values()];t.length>0&&(d=d.map((e=>Object.assign(Object.assign({},e),{isFiltered:t.some((({key:t})=>e.key===t))})))),r=[...r,...d];for(const t of h)s&&"number"!=typeof t&&(s=!1),o.add(t)}const u=l||!s?function(e,t,n){if(!n)return e;switch(null==n?void 0:n.binAgg){case Kn.None:return e;case Kn.Sum:default:return new Set([...e].sort(((e,i)=>{var r,a;return(n.direction===Qn.Ascending?1:-1)*((null!==(r=t.get(e))&&void 0!==r?r:0)-(null!==(a=t.get(i))&&void 0!==a?a:0))})))}}(o,a,n):new Set([...o].sort(((e,t)=>"string"==typeof e||"string"==typeof t?0:e-t))),h=r.map(((e,t)=>Object.assign(Object.assign({},e),{insertIndex:t}))),d=h.reduce(((e,t)=>(t.isFiltered||(Pn(t.smHorizontalAccessorValue)||e.smHValues.add(t.smHorizontalAccessorValue),Pn(t.smVerticalAccessorValue)||e.smVValues.add(t.smVerticalAccessorValue)),e)),{smVValues:new Set,smHValues:new Set});return Object.assign(Object.assign({dataSeries:h,xValues:u},d),{fallbackScale:l||s?void 0:jc.type})}const Sb=Number.MAX_SAFE_INTEGER;function kb(e,t,n,i){var r,a;const o="function"==typeof(null==i?void 0:i.name)?i.name(e,n):"object"==typeof(null==i?void 0:i.name)?function(e,{yAccessor:t,splitAccessors:n},i){return e.names&&e.names.slice().sort((({sortIndex:e=Sb},{sortIndex:t=Sb})=>e-t)).map((({accessor:e,value:i,name:r})=>{var a;return(null!==(a=n.get(e))&&void 0!==a?a:null)===i?null!=r?r:i:t===e?null!=r?r:e:null})).filter((e=>Boolean(e)||0===e)).join(i)||null}(i.name,e,null!==(r=i.name.delimiter)&&void 0!==r?r:pb):null;if(null!==o)return o.toString();const s=i&&i.yAccessors.length>1?e.seriesKeys:e.seriesKeys.slice(0,-1);return!(s.length>0)||!(null==i?void 0:i.splitSeriesAccessors)&&t?void 0===i?"":"string"==typeof i.name?i.name:i.id:s.join("object"==typeof(null==i?void 0:i.name)&&null!==(a=i.name.delimiter)&&void 0!==a?a:pb)}function _b(e,t,n=[],i,r,a){var o,s,l,c;const{dataSeries:u,xValues:h,fallbackScale:d,smHValues:f,smVValues:p}=Mb(e,n,i,r),g=Bc(t.x,h,d),m=ob(u,h,g.type),y=function(e,t){return Jm("rendering",e,t)}(a,((e,t)=>function(e,t){return e.groupId!==t.groupId?e.insertIndex-t.insertIndex:e.isStacked&&!t.isStacked?-1:!e.isStacked&&t.isStacked?1:e.insertIndex-t.insertIndex}(e,t))),b=function(e,t,n,i){const r=iy(e),a=fb(wb(t,n,i),e,i);return[...ey(a.filter((({spec:e})=>ry(e,r))),["smHorizontalAccessorValue","smVerticalAccessorValue","groupId"],!0).reduce(((e,t)=>{const[{stackMode:i}]=t;return[...e,...lb(t,n,i)]}),[]),...a.filter((({spec:e})=>!ry(e,r)))]}(e,m,h,g.type).sort(y),v=ty(b,t.y),x=null!==(s=null===(o=null==r?void 0:r.horizontal)||void 0===o?void 0:o.sort)&&void 0!==s?s:Bo.DataIndex,w=[...f].sort(Ho(x)),M=null!==(c=null===(l=null==r?void 0:r.vertical)||void 0===l?void 0:l.sort)&&void 0!==c?c:Bo.DataIndex;return{xDomain:g,yDomains:v,smHDomain:w,smVDomain:[...p].sort(Ho(M)),formattedDataSeries:b}}function Ob(e,{xDomain:t,yDomains:n,formattedDataSeries:i},r,a,o,s,l,c){const u=a.colors,h=i.filter((({isFiltered:e})=>!e)),d=ey(h.filter((({spec:e})=>uo(e))),["smVerticalAccessorValue","smHorizontalAccessorValue"],!1),f=Object.keys(d).reduce(((e,t)=>{const n=ey(d[t],(e=>Tb(e,c)),!1);return e[t]=Object.keys(n),e}),{}),{horizontal:p,vertical:g}=l,m=Xy({yDomains:n,range:[Jg(o)?g.bandwidth:p.bandwidth,0]}),y=function(e,t,n,i,r,a,o,s,l,c,u,h,d){var f,p,g,m;const y=e.length;let b;const v=[],x=[],w=[],M=[],S=[],k=new Iy,_=function(e,t){const n=new Set;return e.every((e=>{const i=t?t(e):e;return!n.has(i)&&(n.add(i),!0)}))}(o,(({seriesType:e})=>e))&&o.length>1,O=null!==(p=null===(f=o.find((({tickFormat:e})=>e)))||void 0===f?void 0:f.tickFormat)&&void 0!==p?p:Zy,C={points:0,bars:0,areas:0,areasPoints:0,lines:0,linePoints:0,bubbles:0,bubblePoints:0},E=h?u.scales.histogramPadding:u.scales.barsPadding;for(b=0;b<y;b++){const f=e[b],p=tm(o,f.specId);if(void 0===p)continue;const y=n.get(im(f.spec));if(!y)continue;const v=a[[f.smVerticalAccessorValue,f.smHorizontalAccessorValue].join("|")],A=qy({xDomain:t,totalBarsInCluster:null!==(g=null==v?void 0:v.length)&&void 0!==g?g:0,range:[0,Jg(d)?r.bandwidth:i.bandwidth],barsPadding:E,enableHistogramMode:h}),{stackMode:T}=f,I=r.scale(f.smHorizontalAccessorValue)||0,j=i.scale(f.smVerticalAccessorValue)||0,L={width:r.bandwidth,height:i.bandwidth,top:j,left:I},P=yb({specId:f.specId,yAccessor:f.yAccessor,splitAccessors:f.splitAccessors},f.groupId),z=s.get(P)||l;if(uo(p)){const e=Tb(f,h),t=v.indexOf(e);if(-1===t)continue;const n=Nn(u.barSeriesStyle,p.barSeriesStyle,{mergeOptionalPartialValues:!0}),{yAxis:i}=nm(c,p.groupId),r=null!==(m=null==i?void 0:i.tickFormat)&&void 0!==m?m:O,a=By(t,f,A,y,L,z,n,p.displayValueSettings?Object.assign({valueFormatter:r},p.displayValueSettings):void 0,p.styleAccessor,p.minBarHeight,T,d);k.merge(a.indexedGeometryMap),x.push({panel:L,value:a.barGeometries}),C.bars+=a.barGeometries.length}else if(ho(p)){const e=v&&v.length>0?v.length:1,t=p.bubbleSeriesStyle?Nn(u.bubbleSeriesStyle,p.bubbleSeriesStyle,{mergeOptionalPartialValues:!0}):u.bubbleSeriesStyle,n=Cb(A,h),i=Hy(A.bandwidth*e/2,f,A,y,z,L,go(p.y0Accessors),n,t,{enabled:void 0!==p.markSizeAccessor,ratio:u.markSizeRatio},_,p.pointStyleAccessor);k.merge(i.indexedGeometryMap),S.push({panel:L,value:i.bubbleGeometry}),C.bubblePoints+=i.bubbleGeometry.points.length,C.bubbles+=1}else if(fo(p)){const e=v&&v.length>0?v.length:1,t=p.lineSeriesStyle?Nn(u.lineSeriesStyle,p.lineSeriesStyle,{mergeOptionalPartialValues:!0}):u.lineSeriesStyle,n=Cb(A,h,p.histogramModeAlignment),i=Wy(A.bandwidth*e/2,f,A,y,L,z,p.curve||Zm.LINEAR,go(p.y0Accessors),n,t,{enabled:void 0!==p.markSizeAccessor&&t.point.visible,ratio:u.markSizeRatio},p.pointStyleAccessor,Ab(p.fit));k.merge(i.indexedGeometryMap),M.push({panel:L,value:i.lineGeometry}),C.linePoints+=i.lineGeometry.points.length,C.lines+=1}else if(po(p)){const e=v&&v.length>0?v.length:1,t=p.areaSeriesStyle?Nn(u.areaSeriesStyle,p.areaSeriesStyle,{mergeOptionalPartialValues:!0}):u.areaSeriesStyle,n=Cb(A,h,p.histogramModeAlignment),i=Fy(A.bandwidth*e/2,f,A,y,L,z,p.curve||Zm.LINEAR,go(p.y0Accessors),n,t,{enabled:void 0!==p.markSizeAccessor&&t.point.visible,ratio:u.markSizeRatio},!!p.stackAccessors&&p.stackAccessors.length>0,p.pointStyleAccessor,Ab(p.fit));k.merge(i.indexedGeometryMap),w.push({panel:L,value:i.areaGeometry}),C.areasPoints+=i.areaGeometry.points.length,C.areas+=1}}return{geometries:{points:v,bars:x,areas:w,lines:M,bubbles:S},geometriesIndex:k,geometriesCounts:C}}(h,t,m,g,p,f,e,r,u.defaultVizColor,s,a,c,o),b=qy({xDomain:t,totalBarsInCluster:Object.values(f).reduce(((e,t)=>Math.max(e,t.length)),0),range:[0,Jg(o)?p.bandwidth:g.bandwidth],barsPadding:c?a.scales.histogramPadding:a.scales.barsPadding,enableHistogramMode:c});return Object.assign({scales:{xScale:b,yScales:m}},y)}function Cb(e,t,n=ao.Start){if(!t)return 0;const{bandwidth:i,barsPadding:r}=e,a=i/2+(i/(1-r)-i)/2;switch(n){case ao.Center:return 0;case ao.End:return-a;default:return a}}function Eb({width:e,height:t},n){return 90===n?{x:e,y:0,rotate:90}:-90===n?{x:0,y:t,rotate:-90}:180===n?{x:e,y:t,rotate:180}:{x:0,y:0,rotate:0}}function Ab(e){return Boolean(e&&(e.type||e)!==io.None)}function Tb({spec:e,specId:t,groupId:n,yAccessor:i,splitAccessors:r},a){return ry(e,a)?[n,"__stacked__"].join("__-__"):[n,t,...r.values(),i].join("__-__")}function Ib(e,t,{vertical:n,horizontal:i},r,a){var o,s;const{id:l,dataValues:c,marker:u,markerBody:h,markerDimensions:d,markerPosition:f,style:p}=e,g=gi(p),m=null!==(s=null===(o=null==g?void 0:g.line)||void 0===o?void 0:o.stroke)&&void 0!==s?s:"red",y=Jg(r),b=[],[v,x]=t.domain,w=Yy({vertical:n,horizontal:i});return c.forEach(((e,o)=>{const{dataValue:s}=e;if(null==s||""===s)return;const c=t.scale(s);null!==c&&(s<v||s>x||n.domain.forEach((t=>{i.domain.forEach((s=>{const p=n.scaleOrThrow(t),g=i.scaleOrThrow(s),v=function({width:e},t){return{x1:0,y1:t,x2:e,y2:t}}({width:y?i.bandwidth:n.bandwidth,height:y?n.bandwidth:i.bandwidth},c),x=Lb(!1,r,a,f),M=function({width:e,height:t},n,i,r,{width:a,height:o}={width:0,height:0}){switch(i){case wn.Right:return{top:180===n?t-r-o/2:r-o/2,left:e};case wn.Left:return{top:180===n?t-r-o/2:r-o/2,left:-a};case wn.Top:return{top:-o,left:90===n?e-r-a/2:r-a/2};case wn.Bottom:default:return{top:t,left:90===n?e-r-a/2:r-a/2}}}(w,r,x,c,d),S={specId:l,id:Pb(l,e,o,t,s),datum:e,linePathPoints:v,markers:u?[{icon:u,body:h,color:m,dimension:d,position:M,alignment:x}]:[],panel:Object.assign(Object.assign({},w),{top:p,left:g})};b.push(S)}))})))})),b}function jb(e,t,{vertical:n,horizontal:i},r,a,o){var s,l;const{id:c,dataValues:u,marker:h,markerBody:d,markerDimensions:f,markerPosition:p,style:g}=e,m=gi(g),y=null!==(l=null===(s=null==m?void 0:m.line)||void 0===s?void 0:s.stroke)&&void 0!==l?l:"red",b=[],v=Jg(r),x=Yy({vertical:n,horizontal:i});return u.forEach(((e,s)=>{const{dataValue:l}=e;let u=t.scale(l);if(!Pn(u)){if(om(t)&&"number"==typeof l){const[e]=t.domain,n=a?t.domain[1]+t.minInterval:t.domain[1];if(l<e||l>n)return;if(a){const e=Cb(t,!0),n=t.pureScale(l);if(null==n)return;u=n-e}else u+=t.bandwidth*t.totalBarsInCluster/2}else{if(!am(t))return;if(a){const e=(t.step-t.originalBandwidth)/2;u-=e}else u+=t.originalBandwidth/2}isNaN(u)||null==u||n.domain.forEach((t=>{i.domain.forEach((a=>{if(null==u)return;const l=n.scaleOrThrow(t),g=i.scaleOrThrow(a),m=function({height:e},t){return{x1:t,y1:0,x2:t,y2:e}}({width:v?i.bandwidth:n.bandwidth,height:v?n.bandwidth:i.bandwidth},u),w=Lb(!0,r,o,p),M=function({width:e,height:t},n,i,r,{width:a,height:o}={width:0,height:0}){switch(i){case wn.Right:return{top:-90===n?t-r-o/2:r-o/2,left:e};case wn.Left:return{top:-90===n?t-r-o/2:r-o/2,left:-a};case wn.Top:return{top:0-o,left:180===n?e-r-a/2:r-a/2};case wn.Bottom:default:return{top:t,left:180===n?e-r-a/2:r-a/2}}}(x,r,w,u,f),S={specId:c,id:Pb(c,e,s,t,a),datum:e,linePathPoints:m,markers:h?[{icon:h,body:d,color:y,dimension:f,position:M,alignment:w}]:[],panel:Object.assign(Object.assign({},x),{top:l,left:g})};b.push(S)}))}))}})),b}function Lb(e,t,n,i){const r=function(e,t,n){if(n)return n;if(e&&em(t)||!e&&Jg(t))return wn.Left;return wn.Bottom}(e,t,n);if(void 0!==i){const n=function(e,t,n){if(e&&Jg(t)||!e&&em(t))return n===wn.Top||n===wn.Bottom?n:void 0;return n===wn.Left||n===wn.Right?n:void 0}(e,t,i);return null!=n?n:r}return r}function Pb(e,t,n,i,r){return[e,i,r,t.header,t.details,n].join("__")}function zb({x:e,y:t},{startX:n,endX:i,startY:r,endY:a}){return e>=n&&e<=i&&(t>=r&&t<=a)}function Db(e,t,n,i,r,a,o,s=!1){const{dataValues:l,groupId:c,outside:u}=e,{xAxis:h,yAxis:d}=nm(i,c),f=t.get(c),p=[],g=Yy(r);return l.forEach((t=>{var i,r,l,c;const{x0:m,x1:y,y0:b,y1:v}=t.coordinates;if(null==m&&null==y&&null==b&&null==v)return;let x;const[w,M]=Nb(n,m,y,s);if(null==w||null==M)return;let S=null;if(am(n)?S=function(e,t,n){const i=(e.step-e.originalBandwidth)/2;let r=e.scale(n),a=e.scale(t);if(null==r||null==a)return null;r+=e.originalBandwidth+i,r>e.range[1]&&([,r]=e.range);a-=i,a<e.range[0]&&([a]=e.range);const o=Math.abs(r-a);return{x:a,width:o}}(n,w,M):om(n)&&(S=function(e,t,n,i=!1){if("number"!=typeof n||"number"!=typeof t)return null;const r=e.scale(t),a=e.totalBarsInCluster>0&&!i?e.scale(n+e.minInterval):e.scale(n);if(null==a||null==r)return null;const o=Math.abs(a-r);return{x:r-e.bandwidthPadding/2*e.totalBarsInCluster,width:o}}(n,w,M,s)),!S)return;if(!f){if(!$n(b)&&!$n(v)){const n=0===a&&(null==h?void 0:h.position)===wn.Bottom||180===a&&(null==h?void 0:h.position)===wn.Top||-90===a&&(null==d?void 0:d.position)===wn.Right||90===a&&(null==d?void 0:d.position)===wn.Left,s=Jg(a)?g.height:g.width,l=null!==(i=e.outsideDimension)&&void 0!==i?i:Rb(o(null!==(r=null==h?void 0:h.id)&&void 0!==r?r:null==d?void 0:d.id)),c=Object.assign(Object.assign({},S),u?{y:n?s:-l,height:l}:{y:0,height:s});p.push({rect:c,datum:t})}return}const[k,_]=Nb(f,b,v);if(null==k||null==_)return;let O=f.pureScale(_);const C=f.pureScale(k);if(null==O||null==C)return;x=Math.abs(C-O),0===x&&2===f.domain.length&&f.domain[0]===f.domain[1]&&(x=g.height,O=0);const E=em(a)?g.height:g.width,A=0===a&&(null==d?void 0:d.position)===wn.Left||180===a&&(null==d?void 0:d.position)===wn.Right||-90===a&&(null==h?void 0:h.position)===wn.Bottom||90===a&&(null==h?void 0:h.position)===wn.Top,T=null!==(l=e.outsideDimension)&&void 0!==l?l:Rb(o(null!==(c=null==h?void 0:h.id)&&void 0!==c?c:null==d?void 0:d.id)),I=Object.assign(Object.assign({},$n(m)||$n(y)||!u?S:{x:A?-T:E,width:T}),{y:O,height:x});p.push({rect:I,datum:t})})),p.reduce(((e,t)=>{const n=[];return r.vertical.domain.forEach((e=>{r.horizontal.domain.forEach((i=>{const a=Object.assign(Object.assign({},g),{top:r.vertical.scaleOrThrow(e),left:r.horizontal.scaleOrThrow(i)});n.push(Object.assign(Object.assign({},t),{panel:a}))}))})),[...e,...n]}),[])}function Nb(e,t,n,i=!1){const[r]=e.domain,a=e.domain.length>0?e.domain[e.domain.length-1]:e.domain[0],o=function(e,t){if(null==t)return e;if("number"==typeof t)return Math.max(t,e);return t}(r,t),s=function(e,t){if(null==t)return e;if("number"==typeof t)return Math.min(t,e);return t}(i?a+e.minInterval:a,n);return om(e)&&null!==o&&null!==s&&o>s?[null,null]:[o,s]}function Rb(e){const{visible:t,size:n,strokeWidth:i}=e.tickLine;return t&&n>0&&i>0?n:0}function Vb(e,t,n,i){const{xAxis:r,yAxis:a}=nm(e,t),o=Jg(i),s=function(e){return e===so.XDomain}(n),l=o?s?r:a:s?a:r;return l?l.position:void 0}function $b(e,t,n,i,r,a,o,s){return e.reduce(((e,l)=>{const{id:c}=l;if(lo(l)){const{groupId:s,domainType:u}=l,h=Vb(r,s,u,t),d=function(e,t,n,i,r,a,o){const{domainType:s,hideLines:l}=e;if(l)return null;if(s===so.XDomain)return jb(e,i,r,t,a,o);const{groupId:c}=e,u=n.get(c);return u?Ib(e,u,r,t,o):null}(l,t,n,i,o,a,h);return d&&e.set(c,d),e}const u=Db(l,n,i,r,o,t,s,a);return u&&e.set(c,u),e}),new Map)}const Fb=fn([ui],(e=>li(e,Ce.XYAxis,Zn.Axis))),Bb=fn([ui],(e=>li(e,Ce.XYAxis,Zn.Series))),Hb=fn([ui],(e=>li(e,Ce.XYAxis,Zn.Annotation))),Wb=fn([ui],(e=>{const[t]=li(e,Ce.Global,Zn.SmallMultiples),n=li(e,Ce.Global,Zn.IndexOrder);return{horizontal:n.find((e=>e.id===(null==t?void 0:t.splitHorizontally))),vertical:n.find((e=>e.id===(null==t?void 0:t.splitVertically)))}}));const Ub=fn([Fb,Bb,hi],(function(e,t,n){const i=Jg(n.rotation),r=e.filter((e=>i===$c(e.position))).reduce(((e,{ticks:t=jc.desiredTickCount})=>Math.max(e,t)),jc.desiredTickCount),a=function(e){const t=new Set,n=new Set,i=new Set,r=[];if(e.forEach((e=>{r.push(zc(e.xNice)),t.add(e.seriesType),n.add(Pc(e.xScaleType)),e.timeZone&&i.add(e.timeZone.toLowerCase())})),0===e.length||0===t.size||0===n.size)return{type:Ja.Linear,nice:!0,isBandScale:!1};const a=Fc(r),o=t.has(eo.Bar);if(1===n.size)return{type:n.values().next().value,nice:a,isBandScale:o,timeZone:i.size>1?"utc":i.values().next().value};return n.size>1&&n.has(Ja.Ordinal)?{type:Ja.Ordinal,nice:a,isBandScale:o}:{type:Ja.Linear,nice:a,isBandScale:o}}(t),o=Object.assign(Object.assign({customDomain:n.xDomain},a),{desiredTickCount:r}),s=ey(t,im,!0).reduce(((e,t)=>{const n=t.map((({yScaleType:e,yNice:t})=>{return{nice:(i=t,null!=i?i:Lc.nice),type:(n=e,null!=n?n:Lc.type)};var n,i}));return e[im(t[0])]=function(e){const t=e.reduce(((e,t)=>(e.types.add(t.type),e.nice.push(t.nice),e)),{types:new Set,nice:[]}),n=Fc(t.nice);return 1===t.types.size?{type:t.types.values().next().value,nice:n}:{type:Ja.Linear,nice:n}}(n),e}),{}),l=function(e,t){const n=new Map;return e.forEach((e=>{const{id:i,groupId:r,domain:a}=e;if(!a)return;if(!Ky(e.position,t))throw new Error(`[Axis ${i}]: custom domain for xDomain should be defined in Settings`);if(Rc(a)&&a.min>a.max)throw new Error(`[Axis ${i}]: custom domain is invalid, min is greater than max`);const o=n.get(r);if(o){const e=o,t=Dc(e)?e.min:void 0,i=Nc(e)?e.max:void 0;let s=i,l=t;Rc(a)?(l=null!=t?Math.min(a.min,t):a.min,s=null!=i?Math.max(a.max,i):a.max):Dc(a)?l=null!=t?Math.min(a.min,t):a.min:Nc(a)&&(s=null!=i?Math.max(a.max,i):a.max);const c={min:l,max:s};(function(e){return null!=e.max||null!=e.min})(c)&&n.set(r,c)}else n.set(r,a)})),n}(e,n.rotation),c=e.filter((e=>i===Vc(e.position))),u=Object.keys(s).reduce(((e,t)=>{var n;const i=c.find((e=>e.groupId===t)),r=null!==(n=null==i?void 0:i.ticks)&&void 0!==n?n:Lc.desiredTickCount,a=s[t],o=l.get(t);return e[t]||(e[t]=Object.assign(Object.assign({customDomain:o},a),{desiredTickCount:r})),e[t].desiredTickCount=Math.max(e[t].desiredTickCount,r),e}),{});return{x:o,y:u}}));const Yb=fn([Bb,e=>e.interactions.deselectedDataSeries,hi,Wb,Ub],((e,t,n,i,r)=>_b(e,r,t,n.orderOrdinalBinsBy,i,n.sortSeriesBy)));function Gb(e,t,n,i,r,a){if(e.width<=0||e.height<=0)return{chartDimensions:{width:0,height:0,left:0,top:0},leftMargin:0};const o=function({axes:e,chartMargins:t},n,i,r,a){const o={left:0,right:0,top:0,bottom:0},s={left:0,right:0,top:0,bottom:0};n.forEach((({maxLabelBboxWidth:n=0,maxLabelBboxHeight:l=0,isHidden:c},u)=>{var h;const d=tm(r,u);if(!d||c)return;const{tickLine:f,axisTitle:p,axisPanelTitle:g,tickLabel:m}=null!==(h=i.get(u))&&void 0!==h?h:e,y=ib(f,d.hide),{position:b,title:v,titlePosition:x}=d,w=Uy(m.padding),M="top"===x,S=(m.visible?w.inner+w.outer:0)+(y?f.size+f.padding:0)+(v&&!M?nb(p):0)+(Boolean(Vc(b)?null==a?void 0:a.splitVertically:null==a?void 0:a.splitHorizontally)?nb(g):0),k=m.visible?l+S:S,_=m.visible?n+S:S;switch(b){case wn.Top:o.top+=k+t.top,s.left=Math.max(s.left,n/2),s.right=Math.max(s.right,n/2);break;case wn.Bottom:o.bottom+=k+t.bottom,s.left=Math.max(s.left,n/2),s.right=Math.max(s.right,n/2);break;case wn.Right:o.right+=_+t.right,s.top=(M?p.fontSize:0)+Math.max(s.top,l/2),s.bottom=Math.max(s.bottom,l/2);break;case wn.Left:default:o.left+=_+t.left,s.top=(M?p.fontSize+Uy(p.padding).inner:0)+Math.max(s.top,l/2),s.bottom=Math.max(s.bottom,l/2)}}));const l=Math.max(s.left+t.left,o.left);return{margin:{left:l-o.left},left:l,right:Math.max(s.right+t.right,o.right),top:Math.max(s.top+t.top,o.top),bottom:Math.max(s.bottom+t.bottom,o.bottom)}}(t,n,i,r,a),s=e.width-o.left-o.right,l=e.height-o.top-o.bottom,{chartPaddings:c}=t,u=o.top+c.top,h=o.left+c.left;return{leftMargin:o.margin.left,chartDimensions:{top:u,left:h,width:s-c.left-c.right,height:l-c.top-c.bottom}}}const qb=fn([Bb],(e=>function(e){return e.some((e=>uo(e)&&e.enableHistogramMode))}(e))),Xb=fn([Yb,qb],(function({formattedDataSeries:e},t){const n=ey(e.filter((({seriesType:e})=>e===eo.Bar)),["smVerticalAccessorValue","smHorizontalAccessorValue"],!1),i=Object.keys(n).reduce(((e,i)=>{const r=ey(n[i],(e=>Tb(e,t)),!1);return e[i]=Object.keys(r),e}),{});return Object.values(i).reduce(((e,t)=>Math.max(e,t.length)),0)}));const Zb=fn([Fb,yi],((e,{axes:t})=>{const n=new Map;return e.forEach((({id:e,style:i,gridLine:r,position:a})=>{const o=Vc(a),s=Object.assign({},i);r&&(s.gridLine={[o?"vertical":"horizontal"]:r});const l=i?Nn(t,s,{mergeOptionalPartialValues:!0}):null;n.set(e,l)})),n})),Kb=fn([qb,yi],((e,t)=>e?t.scales.histogramPadding:t.scales.barsPadding)),Qb=fn([Kb,qb,Fb,yi,hi,Yb,Xb,Bb,Zb],((e,t,n,i,r,a,o,s,l)=>{var c,u;const{xDomain:h,yDomains:d}=a,f=null!==(u=null===(c=s.find((({tickFormat:e})=>e)))||void 0===c?void 0:c.tickFormat)&&void 0!==u?u:Zy,p=new ss,g=new Map;return n.forEach((a=>{var s;const{id:c}=a,u=null!==(s=l.get(c))&&void 0!==s?s:i.axes,m=function(e,t,n,i,r,a,{gridLine:o,tickLabel:s},l,c,u){var h,d;const f=Vc(e.position)?o.vertical.visible:o.horizontal.visible;if(e.hide&&!f)return null;const p=Qy(e,t,n,i,a,[0,1],c,u);if(!p)return fs.warn(`Cannot compute scale for axis spec ${e.id}. Axis will not be displayed.`),null;const g=null!==(d=null!==(h=e.labelFormat)&&void 0!==h?h:e.tickFormat)&&void 0!==d?d:l,m={timeZone:t.timeZone},y=p.ticks(),b=y.map((e=>g(e,m)));let v=0,x=0,w=0,M=0;if(s.visible)for(const S of b){const e=r.compute(S,0,s.fontSize,s.fontFamily),t=Jy(e,s.rotation);v=Math.max(v,Math.ceil(t.width)),x=Math.max(x,Math.ceil(t.height)),w=Math.max(w,Math.ceil(e.width)),M=Math.max(M,Math.ceil(e.height))}return{maxLabelBboxWidth:v,maxLabelBboxHeight:x,maxLabelTextWidth:w,maxLabelTextHeight:M,tickValues:y,tickLabels:b,isHidden:e.hide&&f}}(a,h,d,o,p,r.rotation,u,f,e,t);!m||r.hideDuplicateAxes&&(({position:e,title:t},{tickLabels:n},i,r)=>[...i].some((([i,{tickLabels:a}])=>{const o=tm(r,i);return(null==o?void 0:o.position)===e&&t===o.title&&a&&n.length===a.length&&n[0]===a[0]&&n[n.length-1]===a[a.length-1]})))(a,m,g,n)||g.set(c,m)})),p.destroy(),g})),Jb=fn([cs,yi,Qb,Fb,Zb,sl],((e,t,n,i,r,a)=>Gb(e,t,n,r,i,a&&a[0]))),ev=fn([Yb,Jb,sl],(({smHDomain:e,smVDomain:t},{chartDimensions:{width:n,height:i}},r)=>{var a,o;return{horizontal:tv(e,n,r&&(null===(a=r[0].style)||void 0===a?void 0:a.horizontalPanelPadding)),vertical:tv(t,i,r&&(null===(o=r[0].style)||void 0===o?void 0:o.verticalPanelPadding))}}));function tv(e,t,n=Ka){const i=e.length<=1,r=0===e.length?[void 0]:e;return new vf(r,[0,t],void 0,i?0:n)}const nv=fn([Yb,yi,function({colors:e}){return e}],((e,t,n)=>{const i=function(e){const t=new Map,n=new Map;return e.forEach((e=>{const{spec:i,specId:r}=e,a=yb({specId:e.specId,yAccessor:e.yAccessor,splitAccessors:e.splitAccessors,smVerticalAccessorValue:void 0,smHorizontalAccessorValue:void 0},e.groupId);if(!i||!i.color)return;let o;if(!o&&i.color)if("string"==typeof i.color)o=i.color;else{const t=n.get(r)||0;o=Array.isArray(i.color)?i.color[t%i.color.length]:i.color(e),n.set(r,t+1)}o&&t.set(a,o)})),t}(e.formattedDataSeries);return function(e,t,n,i){const r=new Map;let a=0;return ey(e.slice().sort(((e,t)=>e.insertIndex-t.insertIndex)),(e=>[e.specId,e.groupId,e.yAccessor,...e.splitAccessors.values()].join("__")),!0).forEach((e=>{const o=yb({specId:e[0].specId,yAccessor:e[0].yAccessor,splitAccessors:e[0].splitAccessors,smVerticalAccessorValue:void 0,smHorizontalAccessorValue:void 0},e[0].groupId),s=function(e,t,n){const i=n.temporary[e];return i||t.get(e)||(null===i?void 0:n.persisted[e])}(o,n,i),l=s||t.vizColors[a%t.vizColors.length];r.set(o,l),a++})),r}(e.formattedDataSeries,t.colors,i,n)})),iv=fn([hi,Bb,Yb,nv,yi,Fb,ev,qb],((e,t,n,i,r,a,o,s)=>Ob(t,n,i,r,e.rotation,a,o,s))),rv=fn([Hb,hi,iv,Fb,qb,ev,Zb,yi],((e,t,{scales:{yScales:n,xScale:i}},r,a,o,s,{axes:l})=>$b(e,t.rotation,n,i,r,a,o,((e="")=>{var t;return null!==(t=s.get(e))&&void 0!==t?t:l})))),av=fn([Jb,hi],((e,t)=>Eb(e.chartDimensions,t.rotation)));function ov(e,t){const{horizontal:n,vertical:i}=e;return i.domain.reduce(((r,a)=>[...r,...n.domain.reduce(((r,o)=>{var s,l;const c={x:null!==(s=n.scale(o))&&void 0!==s?s:0,y:null!==(l=i.scale(a))&&void 0!==l?l:0},u=t(c,o,a,e);return u?[...r,Object.assign({panelAnchor:c,horizontalValue:o,verticalValue:a},u)]:r}),[])]),[])}function sv(e,t,n,i){const r=Yy(i);return ov(i,(()=>{const i=t.reduce(((t,{axis:i,visibleTicks:a})=>{const o=e.find((({id:e})=>e===i.id));if(!o)return t;const s=function(e,t,n,i){var r;const a=Vc(e.position),o=Nn(n,e.style,{mergeOptionalPartialValues:!0}),s=a?o.gridLine.vertical:o.gridLine.horizontal,l=e.gridLine?Nn(s,e.gridLine):s,c=null!==(r=e.showGridLines)&&void 0!==r?r:l.visible;if(!c)return null;const u=t.map((e=>a?function(e,t){return{x1:0,y1:e,x2:t.width,y2:e}}(e.position,i):function(e,t){return{x1:e,y1:0,x2:e,y2:t.height}}(e.position,i)));if(!l.stroke||!l.strokeWidth||l.strokeWidth<Bf)return null;const h=Ft(l.stroke);h.opacity=void 0!==l.opacity?h.opacity*l.opacity:h.opacity;const d={color:h,width:l.strokeWidth,dash:l.dash};return{lines:u,stroke:d,axisId:e.id}}(o,a,n,r);return s?[...t,s]:t}),[]);return{lineGroups:i}}))}const lv=fn([Jb,yi,hi,Fb,Qb,Zb,Yb,Xb,qb,Kb,Bb,ev],((e,t,n,i,r,a,o,s,l,c,u,h)=>{var d,f;const p=null!==(f=null===(d=u.find((({tickFormat:e})=>e)))||void 0===d?void 0:d.tickFormat)&&void 0!==f?f:Zy,{xDomain:g,yDomains:m}=o;return rb(e,t,n.rotation,i,r,a,g,m,h,s,l,p,c)})),cv=fn([Fb,yi,lv,ev],((e,t,n,i)=>sv(e,n,t.axes,i))),uv=fn([ev],(e=>{const t=Yy(e);return ov(e,(()=>t))})),hv=fn([lv,ev,Wb],((e,t,n)=>{const{horizontal:i,vertical:r}=t,a=(({horizontal:{domain:e}})=>(t,n)=>Vc(t)&&e[0]===n)(t),o=(({vertical:{domain:e}})=>(t,n)=>$c(t)&&e[0]===n)(t);return ov(t,((t,s,l)=>({axesGeoms:e.map((e=>{const{axis:{position:t}}=e,c=Vc(t),u=Gy(c?r:i)?((e,t,n,i)=>{var r,a;return function(e,t){if(t)try{return t(e)}catch(r){}return`${e}`}(e?`${t}`:`${n}`,e?null===(r=null==i?void 0:i.vertical)||void 0===r?void 0:r.format:null===(a=null==i?void 0:i.horizontal)||void 0===a?void 0:a.format)})(c,l,s,n):void 0,h=!a(t,s)&&!o(t,l);return Object.assign(Object.assign({},e),{axis:Object.assign(Object.assign({},e.axis),{panelTitle:u,secondary:h})})}))})))})),dv=" - lower",fv=" - upper";function pv({color:e,value:{x:t,y:n,mark:i,accessor:r,datum:a},seriesIdentifier:o},s,l,c,u,h){var d,f;let p=kb(o,u,!0,s);if(go(s.y0Accessors)&&(po(s)||uo(s))){const{y0AccessorFormat:e=dv,y1AccessorFormat:t=fv}=s;p=function(e,t){return"string"==typeof e?`${t}${e}`:e(t)}(r===ay.Y0?e:t,p)}const g=void 0===s.filterSeriesInTooltip||s.filterSeriesInTooltip(o),m=""!==p&&g,y=l?t:n,b=l||null===i?null:i,v=s.timeZone?{timeZone:s.timeZone}:void 0,x=null!==(f=l?null==h?void 0:h.tickFormat:null!==(d=s.tickFormat)&&void 0!==d?d:null==h?void 0:h.tickFormat)&&void 0!==f?f:Zy;return Object.assign(Object.assign({seriesIdentifier:o,valueAccessor:r,label:p,value:y,formattedValue:x(y,v),markValue:b},$n(b)&&{formattedMarkValue:s.markFormat?s.markFormat(b,v):Zy(b)}),{color:e,isHighlighted:!l&&c,isVisible:m,datum:a})}function gv(e,t,n){return t===ay.Y1?`${e}${n.y1AccessorFormat}`:`${e}${n.y0AccessorFormat}`}function mv(e,t,n,i,r){var a;if(e){const e=null!==(a=r&&r[i])&&void 0!==a?a:null,o=null!==e?n(e):null;return{raw:null!==e?e:null,formatted:t===Ja.Ordinal?null:o,legendSizingLabel:o}}return{raw:null,formatted:null,legendSizingLabel:null}}function yv(e,t,n,i,r,a,o,s,l=[],c){const u=[];e.forEach((s=>{var c,h;const{specId:d,yAccessor:f}=s,p=function({spec:e}){return e.y0Accessors&&e.y0Accessors.length>0}(s),g=yb(s,s.groupId),m=tm(i,d),y=yb({specId:s.specId,yAccessor:s.yAccessor,splitAccessors:s.splitAccessors},s.groupId),b=n.get(y)||r,v=kb(s,1===e.length,!1,m),x=!!l&&function(e,t){return e?e.findIndex((({key:e})=>t.key===e)):-1}(l,s)>=0;if(""===v||!m)return;const w=function(e){if(po(e)||uo(e)){const{y0AccessorFormat:t=dv,y1AccessorFormat:n=fv}=e;return{y0AccessorFormat:t,y1AccessorFormat:n}}return{}}(m),M=p?gv(v,ay.Y1,w):v,{yAxis:S}=nm(a,m.groupId),k=null!==(h=null!==(c=m.tickFormat)&&void 0!==c?c:null==S?void 0:S.tickFormat)&&void 0!==h?h:Zy,{hideInLegend:_}=m,O=t.get(g),C=function(e){const{yAccessor:t,splitAccessors:n,smVerticalAccessorValue:i,smHorizontalAccessorValue:r,seriesKeys:a,specId:o,key:s}=e;return{yAccessor:t,splitAccessors:n,smVerticalAccessorValue:i,smHorizontalAccessorValue:r,seriesKeys:a,specId:o,key:s}}(s),E=Pc(m.xScaleType);if(u.push({color:b,label:M,seriesIdentifiers:[C],childId:ay.Y1,isSeriesHidden:x,isItemHidden:_,isToggleable:!0,defaultExtra:mv(o,E,k,"y1",O),path:[{index:0,value:C.key}],keys:[d,m.groupId,f,...s.splitAccessors.values()]}),p){const e=gv(v,ay.Y0,w);u.push({color:b,label:e,seriesIdentifiers:[C],childId:ay.Y0,isSeriesHidden:x,isItemHidden:_,isToggleable:!0,defaultExtra:mv(o,E,k,"y0",O),path:[{index:0,value:C.key}],keys:[d,m.groupId,f,...s.splitAccessors.values()]})}}));const h=function(e,t){return Jm("legend",e,t)}(c,((e,t)=>ab(s[e.key],s[t.key])));return ey(u.sort(((e,t)=>h(e.seriesIdentifiers[0],t.seriesIdentifiers[0]))),(({keys:e,childId:t})=>[...e,t].join("__")),!0).map((e=>Object.assign(Object.assign({},e[0]),{seriesIdentifiers:e.map((({seriesIdentifiers:[e]})=>e)),path:e.map((({path:[e]})=>e))})))}const bv=fn([Yb],(({formattedDataSeries:e})=>e.reduce(((e,t)=>(e[yb(t,t.groupId)]=t,e)),{}))),vv=fn([Bb,Yb,yi,nv,Fb,If,hi,bv],((e,{formattedDataSeries:t,xDomain:n},i,r,a,o,s,l)=>{const c=function(e,t){const n=new Map;return e.forEach((e=>{if(0===e.data.length)return;const i=e.data[e.data.length-1];if(!i)return;if(Ly(i))return;if(i.x!==t.domain[t.domain.length-1])return;const{y0:r,y1:a,initialY0:o,initialY1:s}=i,l=yb(e,e.groupId);if(e.stackMode!==to.Percentage)null===o&&null===s||n.set(l,{y0:o,y1:s});else{const e=null===a||null===r?null:a-r;n.set(l,{y0:r,y1:e})}})),n}(t,n);return yv(t,c,r,e,i.colors.defaultVizColor,a,s.showLegendExtra,l,o,s.sortSeriesBy)})),xv=fn([e=>e.interactions.highlightedLegendPath,vv],((e,t)=>{if(0===e.length)return;const n=e.map((({value:e})=>e));return t.find((({seriesIdentifiers:e})=>e.some((({key:e})=>n.some((t=>t===e))))))})),wv=fn([vv],(e=>function(e){for(const t of e)if(!t.isSeriesHidden)return!1;return!0}(e)));function Mv(e,t,n,i,r,a){const o=Eb(t,n),s=i.left+t.left+o.x,l=i.top+t.top+o.y;Al(e,(e=>{if(e.translate(s,l),e.rotate(jn(n)),null==a?void 0:a.shouldClip){const{x:t,y:n,width:i,height:r}=a.area;e.save(),e.beginPath(),e.rect(t,n,i,r),e.clip()}r(e),(null==a?void 0:a.shouldClip)&&e.restore()}))}function Sv(e,{annotationDimensions:t,annotationSpecs:n,rotation:i,renderingArea:r},a=!0){t.forEach(((t,o)=>{const s=tm(n,o);if(!s)return null;const l=!s.zIndex||s.zIndex&&s.zIndex<=0;if(l&&a||!l&&!a)if(lo(s)){const n=gi(s.style);!function(e,t,n,i,r){const a=Ft(n.line.stroke);a.opacity*=n.line.opacity;const o={color:a,width:n.line.strokeWidth,dash:n.line.dash};t.forEach((({linePathPoints:t,panel:n})=>{Mv(e,n,i,r,(e=>{Hf(e,[t],o)}))}))}(e,t,n,i,r)}else if(co(s)){const n=(c=s.style)?Object.assign(Object.assign({},pi),c):pi;!function(e,t,n,i,r){const a=Ft(n.fill);a.opacity*=n.opacity;const o={color:a},s=Ft(n.stroke);s.opacity*=n.opacity;const l={color:s,width:n.strokeWidth},c=t.length;for(let u=0;u<c;u++){const{rect:n,panel:a}=t[u];Mv(e,a,i,r,(e=>{Ql(e,n,o,l)}))}}(e,t,n,i,r)}var c}))}const kv=e=>`M ${-e} 0 L ${e} 0 M 0 ${e} L 0 ${-e}`,_v=e=>`M ${-e} ${-e} L ${-e} ${e} L ${e} ${e} L ${e} ${-e} Z`,Ov={[Wn.Circle]:[e=>`M ${-e} 0 a ${e},${e} 0 1,0 ${2*e},0 a ${e},${e} 0 1,0 ${2*-e},0`,0],[Wn.X]:[kv,45],[Wn.Plus]:[kv,0],[Wn.Diamond]:[_v,45],[Wn.Square]:[_v,0],[Wn.Triangle]:[e=>{const t=e*Math.sqrt(3)/2,n=e/2;return`M ${-t} ${n} L ${t} ${n} L 0 ${-e} Z`},0]},Cv=Object.assign(Object.assign({},Ov),{[Un.Line]:[e=>`M 0 ${-e} l 0 ${2*e}`,0]});function Ev(e,t,n,i,r){r&&i&&Al(e,(e=>{const[a,o]=Ov[t],{x:s,y:l,radius:c}=n;e.translate(s,l),e.rotate(jn(o)),e.beginPath();const u=new Path2D(a(c));!function(e,t,n,i){t&&(e.fillStyle=Wt(t.color),i?e.fill(i):e.fill()),n&&n.width>Bf&&(e.strokeStyle=Wt(n.color),e.lineWidth=n.width,n.dash&&e.setLineDash(n.dash),i?e.stroke(i):e.stroke())}(e,i,r,u)}))}function Av(e,t,{opacity:n}){t.map((({x:e,y:t,radius:i,transform:r,style:a})=>{const o={color:Tv(a.fill.color,n)},s=Object.assign(Object.assign({},a.stroke),{color:Tv(a.stroke.color,n)});return[{x:e+r.x,y:t+r.y,radius:i},o,s,a.shape]})).sort((([{radius:e}],[{radius:t}])=>t-e)).forEach((([t,n,i,r])=>Ev(e,r,t,n,i)))}function Tv(e,t){return Object.assign(Object.assign({},e),{opacity:e.opacity*t})}function Iv(e,t,n,i,r,a,o=!1){if(r.length>0){if(jl(e,r,a,!1,(e=>{e.translate(t.x,t.y),Hf(e,n,i)})),o)return;jl(e,r,a,!0,(e=>{e.translate(t.x,t.y),Hf(e,n,Object.assign(Object.assign({},i),{dash:[5,5]}))}))}else Al(e,(e=>{e.translate(t.x,t.y),Hf(e,n,i)}))}function jv(e,t,n){var i,r,a,o,s;const l=new Path2D(t);if(e.fillStyle=Wt(n.color),e.fill(l),n.texture){e.clip(l);const t=jn(null!==(i=n.texture.rotation)&&void 0!==i?i:0),{offset:c}=n.texture;c&&c.global&&e.translate(null!==(r=null==c?void 0:c.x)&&void 0!==r?r:0,null!==(a=null==c?void 0:c.y)&&void 0!==a?a:0),t&&e.rotate(t),c&&!c.global&&e.translate(null!==(o=null==c?void 0:c.x)&&void 0!==o?o:0,null!==(s=null==c?void 0:c.y)&&void 0!==s?s:0),e.fillStyle=n.texture.pattern;const u=e.canvas.clientWidth*e.canvas.clientHeight;e.translate(-u/2,-u/2),e.fillRect(0,0,u,u)}}function Lv(e,t,n,i,r,a){var o;const s=n.getContext("2d");if(!a||!s)return;const{size:l=10,stroke:c,strokeWidth:u=1,opacity:h,shapeRotation:d,fill:f,dash:p}=a,g=(({spacing:e})=>{var t,n;return{x:"number"==typeof e?e:null!==(t=null==e?void 0:e.x)&&void 0!==t?t:0,y:"number"==typeof e?e:null!==(n=null==e?void 0:e.y)&&void 0!==n?n:0}})(a),m=l+g.x,y=l+g.y;n.width=t*m,n.height=t*y,s.globalAlpha=h?r(h,1):r(1),s.lineWidth=u,s.strokeStyle=In(i,null!=c?c:Sn.Series),p&&s.setLineDash(p),f&&(s.fillStyle=In(i,f));const[b,v]=((e,t,n)=>{if("path"in e)return["string"==typeof e.path?new Path2D(e.path):e.path,0];const[i,r]=Cv[e.shape],a=[Un.Circle,Un.Square].includes(e.shape)?n:0;return[new Path2D(i((t-a)/2)),r]})(a,l,u),x=(null!=d?d:0)+v;return s.scale(t,t),s.translate(m/2,y/2),x&&s.rotate(jn(x)),s.beginPath(),b&&(s.stroke(b),f&&s.fill(b)),null!==(o=e.createPattern(n,"repeat"))&&void 0!==o?o:void 0}const Pv=(e,t,n,i,r)=>{const a=window.devicePixelRatio,o=Lv(e,a,t,n,i,r);if(!o||!r)return;const s=1/a;o.setTransform(new DOMMatrix([s,0,0,s,0,0]));const{rotation:l,offset:c}=r;return{pattern:o,rotation:l,offset:c}};function zv(e,t,n){return{color:Ft(In(e,t.stroke),(e=>e*t.opacity*n.opacity)),width:t.strokeWidth,dash:t.dash}}function Dv(e,t,n){const{sharedStyle:i,highlightedLegendItem:r,areas:a,rotation:o,clippings:s,renderingArea:l}=n;Al(e,(e=>{a.forEach((({panel:n,value:a})=>{const{seriesAreaLineStyle:c,seriesAreaStyle:u}=a;u.visible&&Mv(e,n,o,l,(e=>{!function(e,t,n,i,r,a){const{area:o,color:s,transform:l,seriesIdentifier:c,seriesAreaStyle:u,clippedRanges:h,hideClippedRanges:d}=n,f=zy(c,i,a),p=function(e,t,n,i,r){const a=(e,t=i.opacity)=>e*t*r.opacity,o=Pv(e,t,n,a,i.texture);return{color:Ft(In(n,i.fill),a),texture:o}}(e,t,s,u,f);!function(e,t,n,i,r,a,o=!1){if(r.length>0){if(jl(e,r,a,!1,(e=>{e.translate(t.x,t.y),jv(e,n,i)})),o)return;jl(e,r,a,!0,(e=>{e.translate(t.x,t.y);const{opacity:r}=i.color,a=Object.assign(Object.assign({},i.color),{opacity:r/2});jv(e,n,Object.assign(Object.assign({},i),{color:a}))}))}else Al(e,(e=>{e.translate(t.x,t.y),jv(e,n,i)}))}(e,l,o,p,h,r,d)}(e,t,a,i,s,r)}),{area:s,shouldClip:!0}),c.visible&&Mv(e,n,o,l,(e=>{!function(e,t,n,i,r){const{lines:a,color:o,seriesIdentifier:s,transform:l,seriesAreaLineStyle:c,clippedRanges:u,hideClippedRanges:h}=t,d=zy(s,n,r),f=zv(o,c,d);Iv(e,l,a,f,u,i,h)}(e,a,i,s,r)}),{area:s,shouldClip:!0})})),a.forEach((({panel:t,value:n})=>{var a;const{seriesPointStyle:c,seriesIdentifier:u,points:h}=n,d=c.visible?h:h.filter((({orphan:e})=>e));if(0===d.length)return;const f=zy(u,i,r);Mv(e,t,o,l,(e=>{Av(e,d,f)}),{area:s,shouldClip:null!==(null===(a=h[0])||void 0===a?void 0:a.value.mark)})}))}))}function Nv(e,t,n,i,r,a,o,s){Al(e,(e=>{const l=function(e,t,n,i,r,a,o=0){return({panel:s,value:l})=>{0!==l.length&&Mv(e,s,o,r,(e=>{l.forEach((n=>{const{x:r,y:o,width:s,height:l,color:c,seriesStyle:u,seriesIdentifier:h}=n,d=zy(h,i,a),{fill:f,stroke:p}=function(e,t,n,i,r,a){const o=(e,t=i.opacity)=>e*t*a.opacity,s=Pv(e,t,n,o,i.texture),l={color:Ft(In(n,i.fill),o),texture:s},c=(void 0===r.strokeOpacity?i.opacity:r.strokeOpacity)*a.opacity;return{fill:l,stroke:{color:Ft(In(n,r.stroke),(e=>e*c)),width:r.visible?r.strokeWidth:0}}}(e,t,c,u.rect,u.rectBorder,d),g={x:r,y:o,width:s,height:l};Al(e,(e=>{Ql(e,g,f,p)}))}))}),{area:n,shouldClip:!0})}}(e,t,r,i,a,o,s);n.forEach(l)}))}function Rv(e,t){Al(e,(e=>{var n;const{bubbles:i,sharedStyle:r,highlightedLegendItem:a,clippings:o,rotation:s,renderingArea:l}=t,c={},u={},h=i.reduce(((e,{value:{seriesIdentifier:t,seriesPointStyle:n,points:i}})=>(c[t.key]=zy(t,r,a),u[t.key]=n,e.push(...i),e)),[]);0!==h.length&&function(e,t,n,i,r,a,o,s){t.map((({x:e,y:t,radius:n,transform:r,style:a,seriesIdentifier:{key:o},panel:s})=>{const{opacity:l}=i[o],c={color:Tv(a.fill.color,l)},u=Object.assign(Object.assign({},a.stroke),{color:Tv(a.stroke.color,l)});return[{x:e+r.x,y:t,radius:n},c,u,s,a.shape]})).sort((([{radius:e}],[{radius:t}])=>t-e)).forEach((([t,n,i,l,c])=>{Mv(e,l,r,a,(e=>{Ev(e,c,t,n,i)}),{area:o,shouldClip:s})}))}(e,h,0,c,s,l,o,null!==(null===(n=h[0])||void 0===n?void 0:n.value.mark))}))}function Vv(e,t){Al(e,(e=>{const{lines:n,sharedStyle:i,highlightedLegendItem:r,clippings:a,renderingArea:o,rotation:s}=t;n.forEach((({panel:t,value:n})=>{var l;const{seriesLineStyle:c,seriesPointStyle:u,points:h}=n;c.visible&&Mv(e,t,s,o,(e=>{!function(e,t,n,i,r){const{color:a,transform:o,seriesIdentifier:s,seriesLineStyle:l,clippedRanges:c,hideClippedRanges:u}=t,h=zy(s,n,r),d=zv(a,l,h);Iv(e,o,[t.line],d,c,i,u)}(e,n,i,a,r)}),{area:a,shouldClip:!0});const d=u.visible?h:h.filter((({orphan:e})=>e));if(0===d.length)return;const f=zy(n.seriesIdentifier,i,r);Mv(e,t,s,o,(e=>{Av(e,d,f)}),{area:a,shouldClip:null!==(null===(l=n.points[0])||void 0===l?void 0:l.value.mark)})}))}))}const $v={color:{r:238,g:130,b:238,opacity:.2}},Fv={color:{r:0,g:0,b:0,opacity:.2},width:1};function Bv(e,t,n=$v,i=Fv,r=0){Al(e,(e=>{e.translate(t.x,t.y),e.rotate(jn(r)),Ql(e,Object.assign(Object.assign({},t),{x:0,y:0}),n,i,!0)}))}function Hv(e,t,n,i=$v,r=Fv,a=0){const{x:o,y:s}=t;Al(e,(e=>{e.translate(o,s),e.rotate(jn(a)),e.translate(-o,-s),Ql(e,Object.assign(Object.assign({},n),{x:o-n.width/2,y:s-n.height/2}),i,r)}))}function Wv(e,t){const{ticks:n,axisStyle:i,axisSpec:r,secondary:a}=t,o=ib(i.tickLine,r.hide);!function(e,{axisSpec:{position:t},size:{width:n,height:i},axisStyle:{axisLine:r}}){r.visible&&(e.beginPath(),e.moveTo(t===wn.Left?n:0,t===wn.Top?i:0),e.lineTo(t!==wn.Right?n:0,t!==wn.Bottom?i:0),e.strokeStyle=r.stroke,e.lineWidth=r.strokeWidth,e.stroke())}(e,t),!a&&o&&n.forEach((n=>function(e,{position:t},{axisSpec:{position:n},size:{width:i,height:r},axisStyle:{tickLine:a}}){Hf(e,[$c(n)?Object.assign({x1:t,x2:t},n===wn.Top?{y1:r-a.size,y2:r}:{y1:0,y2:a.size}):Object.assign({y1:t,y2:t},n===wn.Left?{x1:i,x2:i-a.size}:{x1:0,x2:a.size})],{color:Ft(a.stroke),width:a.strokeWidth})}(e,n,t))),!a&&i.tickLabel.visible&&n.forEach((n=>function(e,t,n,i){const{axisSpec:{position:r,labelFormat:a},dimension:o,size:s,debug:l,axisStyle:c}=i,u=c.tickLabel,{rotation:h,alignment:d,offset:f}=u,{maxLabelBboxWidth:p,maxLabelBboxHeight:g,maxLabelTextWidth:m,maxLabelTextHeight:y}=o,{x:b,y:v,offsetX:x,offsetY:w,textOffsetX:M,textOffsetY:S,horizontalAlign:k,verticalAlign:_}=eb(c,t.position,r,h,s,o,n,f,d);l&&(Hv(e,{x:b+x,y:v+w},{x:b+x,y:v+w,height:y,width:m},void 0,void 0,h),[0,-90,90,180].includes(h)||Hv(e,{x:b+x,y:v+w},{x:b+x,y:v+w,height:g,width:p},void 0,void 0,0));const O={fontFamily:u.fontFamily,fontStyle:u.fontStyle?u.fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",textColor:u.fill,textOpacity:1};Al(e,(e=>{Wf(e,{x:b+x,y:v+w},a&&t.label?a(t.value):t.label,Object.assign(Object.assign({},O),{fontSize:u.fontSize,fill:u.fill,align:k,baseline:_}),h,{x:M,y:S})}))}(e,n,o,t)))}function Uv(e,t){const{axisSpec:{position:n},axisStyle:{axisPanelTitle:i},panelTitle:r}=t;return r&&i.visible?$c(n)?function(e,t){const{size:{width:n},axisSpec:{position:i,hide:r,title:a},dimension:{maxLabelBboxHeight:o},axisStyle:{axisTitle:s,axisPanelTitle:l,tickLine:c,tickLabel:u},debug:h,panelTitle:d}=t;if(!d)return;const f=Yv(l),p=ib(c,r)?c.size+c.padding:0,g=Uy(l.visible&&d?l.padding:0),m=a?nb(s):0,y=Uy(u.padding),b=u.visible?o+y.outer+y.inner:0,v=i===wn.Top?m+g.outer:b+p+g.inner,x=0;h&&Bv(e,{x:x,y:v,width:n,height:f.fontSize});Wf(e,{x:x+n/2,y:v+f.fontSize/2},d,f)}(e,t):function(e,t){const{size:{height:n},axisSpec:{position:i,hide:r,title:a},dimension:{maxLabelBboxWidth:o},axisStyle:{axisTitle:s,axisPanelTitle:l,tickLine:c,tickLabel:u},debug:h,panelTitle:d}=t;if(!d)return null;const f=Yv(l),p=ib(c,r)?c.size+c.padding:0,g=Uy(l.visible&&d?l.padding:0),m=a?nb(s):0,y=Uy(u.padding),b=u.visible?y.outer+o+y.inner:0,v=n,x=i===wn.Left?m+g.outer:p+b+g.inner;h&&Bv(e,{x:x,y:v,width:n,height:f.fontSize},void 0,void 0,-90);Wf(e,{x:x+f.fontSize/2,y:v-n/2},d,f,-90)}(e,t):null}function Yv({fontFamily:e,fontStyle:t,fill:n,fontSize:i}){return{fontFamily:e,fontVariant:"normal",fontStyle:t||"normal",fontWeight:"normal",textColor:n,textOpacity:1,fill:n,align:"center",baseline:"middle",fontSize:i}}function Gv(e,t){const{axesSpecs:n,perPanelAxisGeoms:i,axesStyles:r,sharedAxesStyle:a,debug:o,renderingArea:s}=t,l=new Set;i.forEach((({axesGeoms:t,panelAnchor:i})=>{t.forEach((t=>{var c;const{axis:{panelTitle:u,id:h,position:d,secondary:f},anchorPoint:p,size:g,dimension:m,visibleTicks:y,parentSize:b}=t,v=tm(n,h);if(!v||!m||!d||v.hide)return;const x=null!==(c=r.get(v.id))&&void 0!==c?c:a;l.has(h)||(l.add(h),function(e,t){if(!t.axisSpec.title||!t.axisStyle.axisTitle.visible)return;const{size:{width:n,height:i},axisSpec:{position:r,hide:a,title:o,titlePosition:s},dimension:{maxLabelBboxWidth:l,maxLabelBboxHeight:c},axisStyle:{axisTitle:u,axisPanelTitle:h,tickLine:d,tickLabel:f},anchorPoint:p,debug:g,panelTitle:m}=t,y=Yv(u),b=Uy(u.visible&&o?u.padding:0),v=m?nb(h):0,x=ib(d,a)?d.size+d.padding:0,w=Uy(f.padding),M=$c(t.axisSpec.position),S="top"===s,k=M?c:l,_=f.visible?k+w.outer+w.inner:0,O=r===wn.Left||r===wn.Top?b.outer:_+x+b.inner+v,C=S?r===wn.Left?p.x:p.x+_+x:p.x+(M?0:O),E=p.y+(M?O:S?y.fontSize-p.y:i);if(g){const t=e.measureText(null!=o?o:"").width;Bv(e,{x:C,y:E,width:M?n:S?r===wn.Left?t:-t:i,height:y.fontSize},void 0,void 0,M||S?0:-90)}"top"===s?Wf(e,{x:C,y:E+y.fontSize/2},null!=o?o:"",Object.assign(Object.assign({},y),{align:r===wn.Left?"left":"right"}),0):Wf(e,{x:C+(M?n:y.fontSize)/2,y:E+(M?y.fontSize:-i)/2},null!=o?o:"",y,M?0:-90)}(e,{size:b,debug:o,panelTitle:u,anchorPoint:p,dimension:m,axisStyle:x,axisSpec:v})),function(e,t){const{size:n,anchorPoint:i,debug:r,axisStyle:a,axisSpec:o,panelAnchor:s,secondary:l}=t,{position:c}=o,u=i.x+(c===wn.Right?-1:1)*s.x,h=i.y+(c===wn.Bottom?-1:1)*s.y;Al(e,(e=>{if(e.translate(u,h),r&&!l&&Bv(e,Object.assign({x:0,y:0},n)),Wv(e,t),!l){const{panelTitle:i,dimension:s}=t;Uv(e,{panelTitle:i,axisSpec:o,axisStyle:a,size:n,dimension:s,debug:r})}}))}(e,{panelTitle:u,secondary:f,panelAnchor:i,axisSpec:v,anchorPoint:p,size:g,dimension:m,ticks:y,axisStyle:x,debug:o,renderingArea:s})}))}))}const qv=180,Xv=90,Zv=-90;function Kv(e,t,n,i,r){const{x:a,y:o}=e,{width:s,height:l}=r;let c,u;switch(t){case 180:c=a,u=o-(n-i+1)*l;break;case-90:c=a,u=o;break;case 90:c=a,u=o-(n-i+1)*s;break;default:c=a,u=o+n*l}return{x:c,y:u}}function Qv(e,t,n,{horizontal:i}={}){switch(n){case Xv:if(i===kn.Left)return e.height-t.width;if(i===kn.Center)return e.height/2-t.width/2;break;case Zv:if(i===kn.Right)return e.height-t.width;if(i===kn.Center)return e.height/2-t.width/2;break;case qv:if(i===kn.Left)return e.width/2-t.width/2;if(i===kn.Right)return-e.width/2+t.width/2;break;default:if(i===kn.Left)return-e.width/2+t.width/2;if(i===kn.Right)return e.width/2-t.width/2}return 0}function Jv(e,t,n,{vertical:i}={}){switch(n){case Xv:if(i===_n.Bottom)return e.width-t.height;if(i===_n.Middle)return e.width/2-t.height/2;break;case Zv:if(i===_n.Bottom)return-e.width+t.height;if(i===_n.Middle)return-e.width/2+t.height/2;break;case qv:if(i===_n.Top)return e.height-t.height;if(i===_n.Middle)return e.height/2-t.height/2;break;default:if(i===_n.Bottom)return e.height-t.height;if(i===_n.Middle)return e.height/2-t.height/2}return 0}function ex(e,t,n,i,r){const{offsetX:a,offsetY:o}=i,{alignmentOffsetX:s,alignmentOffsetY:l}=function(e,t,n,i={}){return{alignmentOffsetX:Qv(e,t,n,i),alignmentOffsetY:Jv(e,t,n,i)}}(e,t,n,r);switch(n){case qv:{const n=e.x+e.width/2-a+s,i=e.y+o+l;return{x:n,y:i,align:"center",baseline:"bottom",rect:{x:n-t.width/2,y:i,width:t.width,height:t.height}}}case Zv:{const n=e.x+e.width+o+l,i=e.y-a+s;return{x:n,y:i,align:"left",baseline:"top",rect:{x:n-t.height,y:i,width:t.height,height:t.width}}}case Xv:{const n=e.x-o+l,i=e.y+a+s;return{x:n,y:i,align:"right",baseline:"top",rect:{x:n,y:i,width:t.height,height:t.width}}}default:{const n=e.x+e.width/2-a+s,i=e.y-o+l;return{x:n,y:i,align:"center",baseline:"top",rect:{x:n-t.width/2,y:i,width:t.width,height:t.height}}}}}function tx(e,t,n){let i=t.width,r=t.height;return 90!==n&&-90!==n||(i=t.height,r=t.width),e.x<0||e.x+e.width>i||(e.y<0||e.y+e.height>r)}const nx="black",ix="rgba(255, 255, 255, 0.8)",rx="rgb(255, 255, 255)",ax="rgba(0,0,0,0)";function ox(e,t,n){if("string"==typeof e)return{fillColor:e,shadowColor:ax};if("color"in e)return{fillColor:e.color,shadowColor:e.borderColor||ax};const i=ps(nx,e.textInvertible,e.textContrast||!1,t,"white")||nx,r=n<2?ix:rx;return{fillColor:i,shadowColor:"textBorder"in e&&en(Jt(i),Jt(r),r,!1,t)||ax}}const sx=1.5,lx=8;function cx(e){var t;if("string"==typeof e)return sx;if("borderWidth"in e)return Math.min(null!==(t=e.borderWidth)&&void 0!==t?t:sx,lx);const n="textBorder"in e&&"number"==typeof e.textBorder?e.textBorder:sx;return Math.min(n,lx)}function ux(e,t,n,i){const r=document.createElement("canvas");Al(e,(e=>{e.scale(t,t);const{renderingArea:a,chartTransform:o,rotation:s,geometries:l,geometriesIndex:c,theme:{axes:u,sharedStyle:h,barSeriesStyle:d},highlightedLegendItem:f,annotationDimensions:p,annotationSpecs:g,perPanelAxisGeoms:m,perPanelGridLines:y,axesSpecs:b,axesStyles:v,debug:x,panelGeoms:w}=i,M={x:a.left+o.x,y:a.top+o.y};Il(e,[e=>Tl(e,2e5,2e5),e=>{x&&function(e,{x:t,y:n},i){i.forEach((({width:i,height:r,panelAnchor:{x:a,y:o}})=>Al(e,(e=>Ql(e,{x:t+a,y:n+o,width:i,height:r},{color:Ft("#00000000")},{color:Ft("#000000"),width:1})))))}(e,M,w)},e=>{!function(e,t){const{perPanelGridLines:n,renderingArea:{left:i,top:r}}=t;Al(e,(e=>{e.translate(i,r),n.forEach((({lineGroups:t,panelAnchor:{x:n,y:i}})=>{Al(e,(e=>{e.translate(n,i),t.forEach((({lines:t,stroke:n})=>{Hf(e,t,n)}))}))}))}))}(e,{axesSpecs:b,renderingArea:a,perPanelGridLines:y,axesStyles:v,sharedAxesStyle:u})},e=>{Gv(e,{axesSpecs:b,perPanelAxisGeoms:m,renderingArea:a,debug:x,axesStyles:v,sharedAxesStyle:u})},e=>{Al(e,(e=>{Sv(e,{rotation:s,renderingArea:a,annotationDimensions:p,annotationSpecs:g},!0)}))},e=>{Al(e,(e=>{Nv(e,r,l.bars,h,n,a,f,s)}))},e=>{Al(e,(e=>{Dv(e,r,{areas:l.areas,clippings:n,renderingArea:a,rotation:s,highlightedLegendItem:f,sharedStyle:h})}))},e=>{Al(e,(e=>{Vv(e,{lines:l.lines,clippings:n,renderingArea:a,rotation:s,highlightedLegendItem:f,sharedStyle:h})}))},e=>{Rv(e,{bubbles:l.bubbles,clippings:n,highlightedLegendItem:f,sharedStyle:h,rotation:s,renderingArea:a})},e=>{l.bars.forEach((({value:t,panel:n})=>{Al(e,(e=>{!function(e,t){const{bars:n,debug:i,rotation:r,renderingArea:a,barSeriesStyle:o,panel:s}=t,{fontFamily:l,fontStyle:c,fill:u,alignment:h}=o.displayValue,d=n.length;for(let f=0;f<d;f++){const{displayValue:t}=n[f];if(!t)continue;const{text:d,fontSize:p,fontScale:g}=t;let m={lines:[d],width:t.width,height:t.height};const y={fontFamily:l,fontStyle:c||"normal",fontVariant:"normal",fontWeight:"normal",textColor:"black",textOpacity:1},{x:b,y:v,align:x,baseline:w,rect:M}=ex(n[f],t,r,o.displayValue,h);if(t.isValueContainedInElement){const t=0===r||180===r?n[f].width:n[f].height;m=Uf(e,m.lines[0],y,p,t,100)}if(t.hideClippedValue&&tx(M,a,r))continue;i&&Bv(e,M);const{width:S,height:k}=m,_=m.lines.length,O=cx(u),{fillColor:C,shadowColor:E}=ox(u,n[f].color,O);for(let n=0;n<_;n++){const t=m.lines[n],i=Kv({x:b,y:v},r,n,_,{height:k,width:S});Mv(e,s,r,a,(e=>{Wf(e,i,t,Object.assign(Object.assign({},y),{fill:C,fontSize:p,align:x,baseline:w,shadow:E,shadowSize:O}),-r,void 0,g)}))}}}(e,{bars:t,panel:n,renderingArea:a,rotation:s,debug:x,barSeriesStyle:d})}))}))},e=>{Al(e,(e=>{Sv(e,{annotationDimensions:p,annotationSpecs:g,rotation:s,renderingArea:a},!1)}))},e=>{x&&Al(e,(e=>{const{left:t,top:n,width:i,height:r}=a;Bv(e,{x:t,y:n,width:i,height:r},{color:Ft("transparent")},{color:Ft("red"),width:4,dash:[4,4]});const o=c.triangulation([0,0,i,r]);o&&(e.beginPath(),e.translate(t,n),e.setLineDash([5,5]),o.render(e),e.lineWidth=1,e.strokeStyle="blue",e.stroke())}))}])}))}class hx extends i.Component{constructor(e){super(e),this.ctx=null,this.devicePixelRatio=window.devicePixelRatio}componentDidMount(){this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}shouldComponentUpdate(e){return!Ko(this.props,e)}componentDidUpdate(){this.ctx||this.tryCanvasContext(),this.props.initialized&&(this.drawCanvas(),this.props.onChartRendered())}drawCanvas(){if(this.ctx){const{renderingArea:e,rotation:t}=this.props,n={x:-.5,y:-.5,width:([90,-90].includes(t)?e.height:e.width)+1,height:([90,-90].includes(t)?e.width:e.height)+1};ux(this.ctx,this.devicePixelRatio,n,this.props)}}tryCanvasContext(){const e=this.props.forwardCanvasRef.current;this.ctx=e&&e.getContext("2d")}render(){const{forwardCanvasRef:e,initialized:t,isChartEmpty:n,chartContainerDimensions:{width:r,height:a},a11ySettings:o,debug:s}=this.props;return!t||n?(this.ctx=null,null):i.createElement(i.Fragment,null,i.createElement("figure",{"aria-labelledby":o.labelId,"aria-describedby":o.descriptionId},i.createElement("canvas",{ref:e,className:"echCanvasRenderer",width:r*this.devicePixelRatio,height:a*this.devicePixelRatio,style:{width:r,height:a},role:"presentation"}),!s&&i.createElement(Aa,null)),s&&i.createElement(Aa,null))}}hx.displayName="XYChart";const dx={initialized:!1,debug:!1,isChartEmpty:!0,geometries:{areas:[],bars:[],lines:[],points:[],bubbles:[]},geometriesIndex:new Iy,theme:Xn,chartContainerDimensions:{width:0,height:0,left:0,top:0},rotation:0,renderingArea:{width:0,height:0,left:0,top:0},chartTransform:{x:0,y:0,rotate:0},axesSpecs:[],perPanelAxisGeoms:[],perPanelGridLines:[],axesStyles:new Map,annotationDimensions:new Map,annotationSpecs:[],panelGeoms:[],a11ySettings:wa},fx=o((e=>{if(vi(e)!==bi.Initialized)return dx;const{geometries:t,geometriesIndex:n}=iv(e),{debug:i}=hi(e);return{initialized:!0,isChartEmpty:wv(e),debug:i,geometries:t,geometriesIndex:n,theme:yi(e),chartContainerDimensions:cs(e),highlightedLegendItem:xv(e),rotation:di(e),renderingArea:Jb(e).chartDimensions,chartTransform:av(e),axesSpecs:Fb(e),perPanelAxisGeoms:hv(e),perPanelGridLines:cv(e),axesStyles:Zb(e),annotationDimensions:rv(e),annotationSpecs:Hb(e),panelGeoms:uv(e),a11ySettings:Ma(e)}}),(e=>s({onChartRendered:El},e)))(hx),px="ON_DOM_ELEMENT_ENTER",gx="ON_DOM_ELEMENT_LEAVE",mx=Object.freeze({LineAnnotationMarker:"LineAnnotationMarker"});function yx(){return{type:gx}}function bx(e){return{type:px,element:e}}function vx(e,t,n,i){const r=t.length;for(let a=0;a<r;a++){const r=t[a],{panel:o,datum:s}=r,l=xx(r.rect,n,o),c=l.x+i.left+o.left,u=c+l.width,h=l.y+i.top+o.top;if(zb(e,{startX:c,endX:u,startY:h,endY:h+l.height}))return{isVisible:!0,annotationType:oo.Rectangle,anchor:{x:e.x,y:e.y,width:0,height:0},datum:s}}return null}function xx(e,t,n){const i=Jg(t),r=i?n.width:n.height,a=i?n.height:n.width;switch(t){case 90:return{x:a-e.height-e.y,y:e.x,width:e.height,height:e.width};case-90:return{x:e.y,y:r-e.x-e.width,width:e.height,height:e.width};case 180:return{x:r-e.x-e.width,y:a-e.y-e.height,width:e.width,height:e.height};default:return e}}function wx({placement:e,fallbackPlacements:t,boundary:n,offset:i}){return{placement:e,fallbackPlacements:t,boundary:n,offset:i}}const Mx=fn([iv],(({scales:e})=>e)),Sx=fn([iv],(({geometriesIndex:e})=>e)),kx=fn([iv],(e=>e.geometriesIndex.keys().sort(Cn)));function _x(e,t,n,i){switch(n){case 180:return i.width-e;case 90:return t;case-90:return i.height-t;default:return e}}function Ox(e,t,n,i){switch(n){case 180:return i.height-t;case-90:return e;case 90:return i.width-e;default:return t}}const Cx=fn([e=>e.interactions.pointer.current.position,Jb,ev],((e,{chartDimensions:t},n)=>function(e,{left:t,top:n,width:i,height:r},{horizontal:a,vertical:o}){const{x:s,y:l}=e;let c=s-t,u=l-n;(c<0||c>=i)&&(c=-1);(u<0||u>=r)&&(u=-1);const h=Ex(a,c),d=Ex(o,u);return{x:h.pos,y:d.pos,horizontalPanelValue:h.value,verticalPanelValue:d.value}}(e,t,n)));function Ex(e,t){var n,i;const r=e.outerPadding*e.step,a=e.innerPadding*e.step,o=e.domain.length,s=o*e.bandwidth+(o-1)*a;if(t<r||t>r+s)return{pos:-1,value:null};const l=t-r;if(l<=(o-1)*e.step){const t=Math.floor(l/e.step),i=l-e.step*t;return i>e.bandwidth?{pos:-1,value:null}:{pos:i,value:null!==(n=e.domain[t])&&void 0!==n?n:null}}return{pos:l-e.step*(o-1),value:null!==(i=e.domain[o-1])&&void 0!==i?i:null}}const Ax=fn([Cx,hi,ev],(function({x:e,y:t,horizontalPanelValue:n,verticalPanelValue:i},r,a){const o=Yy(a);return{x:_x(e,t,r.rotation,o),y:Ox(e,t,r.rotation,o),horizontalPanelValue:n,verticalPanelValue:i}}));const Tx=fn([Ax,Mx,kx,Sx,e=>e.externalEvents.pointer,Jb],(function(e,t,n,i,r,{chartDimensions:a}){if(pp(t.xScale,r)){const e=t.xScale.pureScale(r.x);return null==e||e>a.width+a.left||e<0?[]:i.find(r.x,{x:-1,y:-1})}const o=t.xScale.invertWithStep(e.x,n);if(!o)return[];return i.find(null==o?void 0:o.value,e,e.horizontalPanelValue,e.verticalPanelValue).sort((s=e,(e,t)=>Vn(s,e)-Vn(s,t)));var s}));const Ix=fn([Yb],(e=>Boolean(e)&&e.formattedDataSeries.length>1)),jx=Object.freeze({tooltip:{header:null,values:[]},highlightedGeometries:[]}),Lx=fn([Bb,Fb,hi,Cx,Ax,di,Ix,Mx,Tx,bv,e=>e.externalEvents.pointer,Ai],(function(e,t,n,i,r,a,o,s,l,c,u,h){if(!s.xScale||!s.yScales)return jx;let{x:d,y:f}=r,p=Ei(n);if(pp(s.xScale,u)){p=Ei(n,!0);const e=s.xScale.pureScale(u.x);if(null===e)return jx;d=e,f=0}else if(-1===i.x||-1===i.y)return jx;if(p===ei.None&&!u)return jx;if(0===l.length)return jx;let g=null;const m=[],y=new Set,b=l.filter((({value:{y:e}})=>null!==e)).reduce(((i,r)=>{const{seriesIdentifier:{specId:l}}=r,c=tm(e,l);if(!c)return i;const{xAxis:b,yAxis:v}=nm(t,c.groupId);if(!s.yScales.get(im(c)))return i;let x=!1;var w;if(u&&(null==(w=u)?void 0:w.type)!==Jn.Out||!function(e,t,n,i=10){const{x:r,y:a,transform:o}=n;if(oy(n)){const{radius:s}=n,l=Vn({x:e,y:t},{x:r+o.x,y:a+o.y}),c="number"==typeof i?i:i(s);return c===1/0?l<=s+10:l<=s+c}const{width:s,height:l}=n;return t>=a&&t<=a+l&&e>=r&&e<=r+s}(d,f,r,n.pointBuffer)||(x=!0,m.push(r)),!x&&p===ei.Follow)return i;const M=[0,180].includes(a)?v:b,S=pv(r,c,!1,x,o,M);if(!g){const e=[0,180].includes(a)?b:v;g=pv(r,c,!0,!1,o,h?void 0:e)}return y.add(r.value.x),[...i,S]}),[]);b.length>1&&y.size===b.length&&(g=null);const v=(w=n.sortSeriesBy,M=(e,t)=>ab(c[e.key],c[t.key]),Jm("tooltip",w,M)),x=b.sort(((e,t)=>v(e.seriesIdentifier,t.seriesIdentifier)));var w,M;return{tooltip:{header:g,values:x},highlightedGeometries:m}}));const Px=fn([Lx],(({tooltip:e})=>e)),zx=fn([Lx],(({highlightedGeometries:e})=>e)),Dx=fn([e=>e.interactions.pointer.current.position,Jb,iv,di,Hb,Fb,rv,Px,e=>e.interactions.hoveredDOMElement],(function(e,{chartDimensions:t},n,i,r,a,o,s,l){const c=function(e,t,n,i){var r,a,o,s,l;if(!i)return null;const c=t.find((({id:e})=>e===i.createdBySpecId));if(!c||c.hideTooltips)return null;const u=(null!==(r=n.get(i.createdBySpecId))&&void 0!==r?r:[]).filter(Nx).find((({id:e})=>e===i.id));if(!u)return null;return{isVisible:!0,annotationType:oo.Line,datum:u.datum,anchor:{y:(null!==(o=null===(a=u.markers[0])||void 0===a?void 0:a.position.top)&&void 0!==o?o:0)+u.panel.top+e.top,x:(null!==(l=null===(s=u.markers[0])||void 0===s?void 0:s.position.left)&&void 0!==l?l:0)+u.panel.left+e.left,width:0,height:0},customTooltipDetails:c.customTooltipDetails,customTooltip:c.customTooltip,tooltipSettings:Rx(c)}}(t,r,o,l);if(c)return c;if(e.x<0||e.y<0)return null;const{xScale:u,yScales:h}=n.scales;if(!u||!h)return null;const d=function(e,t,n,i,r){const a=n.filter(co).reverse().sort((({zIndex:e=Number.MIN_SAFE_INTEGER},{zIndex:t=Number.MIN_SAFE_INTEGER})=>t-e));for(let o=0;o<a.length;o++){const n=a[o],s=t.get(n.id);if(n.hideTooltips||!s)continue;const{customTooltip:l,customTooltipDetails:c}=n,u=wx(n),h=vx(e,s,i,r);if(h)return Object.assign(Object.assign({},h),{tooltipSettings:u,customTooltip:l,customTooltipDetails:null!=c?c:n.renderTooltip})}return null}(e,o,r,i,t),f=s.values.some((({isHighlighted:e})=>e));if(d&&d.isVisible&&d.annotationType===oo.Rectangle&&f)return null;return d}));function Nx(e){return"linePathPoints"in e}function Rx({placement:e,fallbackPlacements:t,boundary:n,offset:i}){return{placement:e,fallbackPlacements:t,boundary:n,offset:i}}const Vx=({annotationType:e,datum:t,customTooltip:r,customTooltipDetails:a})=>{const o=n.useCallback((()=>{const{details:e,dataValue:n,header:r=n.toString()}=t;return i.createElement("div",{className:"echAnnotation__tooltip"},i.createElement("p",{className:"echAnnotation__header"},r),i.createElement("div",{className:"echAnnotation__details"},a?a(e):e))}),[t,a]),s=n.useCallback((()=>{const{details:e}=t,n=a?a(e):e;return n?i.createElement("div",{className:"echAnnotation__tooltip"},i.createElement("div",{className:"echAnnotation__details"},i.createElement("div",{className:"echAnnotation__detailsText"},n))):null}),[t,a]);if(r){const{details:e}=t;return"header"in t?i.createElement(r,{details:e,header:t.header,datum:t}):i.createElement(r,{details:e,datum:t})}switch(e){case oo.Line:return o();case oo.Rectangle:return s();default:return null}};const $x=({state:e,chartRef:t,chartId:r,onScroll:a,zIndex:o})=>{var s;const l=n.useCallback((()=>e&&e.isVisible?i.createElement(Vx,Object.assign({},e)):null),[e]),c=()=>{a&&a()};n.useEffect((()=>{if(a)return window.addEventListener("scroll",c,!0),()=>window.removeEventListener("scroll",c,!0)}),[]);const u=n.useMemo((()=>{var n;const i=null==e?void 0:e.tooltipSettings;if(!i)return;const{placement:r,boundary:a}=i,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(i,["placement","boundary"]);return Object.assign(Object.assign({},o),{placement:null!=r?r:Fr.Right,boundary:"chart"===a?null!==(n=t.current)&&void 0!==n?n:void 0:a})}),[null==e?void 0:e.tooltipSettings,t]),h=n.useMemo((()=>{var t;return null!==(t=null==e?void 0:e.anchor)&&void 0!==t?t:null}),[null==e?void 0:e.anchor]);return(null==e?void 0:e.isVisible)?i.createElement(Gr,{scope:"AnnotationTooltip",chartId:r,zIndex:o+100,anchor:{position:h,ref:t.current},visible:null!==(s=null==e?void 0:e.isVisible)&&void 0!==s&&s,settings:u},l()):null},Fx={[wn.Right]:"translate(0%, -50%)",[wn.Left]:"translate(-100%, -50%)",[wn.Top]:"translate(-50%, -100%)",[wn.Bottom]:"translate(-50%, 0%)"};function Bx(e,t){return t?void 0:Fx[e]}function Hx({id:e,specId:t,datum:r,panel:a,markers:[{icon:o,body:s,color:l,position:c,alignment:u,dimension:h}],chartAreaRef:d,chartDimensions:f,onDOMElementEnter:p,onDOMElementLeave:g}){var m,y;const b=n.useRef(null),v=n.useRef(null),x=n.useRef(null),w={color:l,top:f.top+c.top+a.top,left:f.left+c.left+a.left},M={transform:Bx(u,Boolean(h))},S=n.useCallback((()=>{b.current&&v.current&&(x.current=$r(b.current,v.current,{strategy:"absolute",placement:u,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"preventOverflow",options:{boundary:d.current}},{name:"flip",options:{fallbackPlacements:[]}}]}))}),[d,u]);return n.useEffect((()=>(!x.current&&s&&S(),()=>{var e,t;null===(t=null===(e=null==x?void 0:x.current)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),x.current=null})),[S,s]),null===(y=null===(m=null==x?void 0:x.current)||void 0===m?void 0:m.update)||void 0===y||y.call(m),i.createElement("div",{className:"echAnnotation",key:`annotation-${e}`,onMouseEnter:()=>{p({createdBySpecId:t,id:e,type:mx.LineAnnotationMarker,datum:r})},onMouseLeave:g,style:Object.assign(Object.assign({},w),M)},i.createElement("div",{ref:b,className:"echAnnotation__icon"},Dn(o,r)),s&&i.createElement("div",{ref:v,className:"echAnnotation__body"},Dn(s,r)))}const Wx=({tooltipState:e,isChartEmpty:t,chartDimensions:r,annotationSpecs:a,annotationDimensions:o,getChartContainerRef:s,chartAreaRef:l,chartId:c,zIndex:u,onPointerMove:h,onDOMElementEnter:d,onDOMElementLeave:f})=>{const p=n.useCallback((()=>{const e=[];return o.forEach(((t,n)=>{const o=tm(a,n);if(o&&lo(o)){const n=function(e,t,n,r,a){return n.reduce(((n,o)=>(0===o.markers.length||n.push(i.createElement(Hx,Object.assign({},o,{key:`annotation-${o.id}`,chartAreaRef:e,chartDimensions:t,onDOMElementEnter:r,onDOMElementLeave:a}))),n)),[])}(l,r,t,d,f);e.push(...n)}})),e}),[o,a,l,r,d,f]),g=n.useCallback((()=>{h({x:-1,y:-1},Date.now())}),[]);return t?null:i.createElement(i.Fragment,null,p(),i.createElement($x,{chartId:c,zIndex:u,state:e,chartRef:s(),onScroll:g}))};Wx.displayName="Annotations";const Ux=o((e=>{const{zIndex:t,chartId:n}=e;return vi(e)!==bi.Initialized?{isChartEmpty:!0,chartDimensions:{top:0,left:0,width:0,height:0},annotationDimensions:new Map,annotationSpecs:[],tooltipState:null,chartId:n,zIndex:t}:{isChartEmpty:wv(e),chartDimensions:Jb(e).chartDimensions,annotationDimensions:rv(e),annotationSpecs:Hb(e),tooltipState:Dx(e),chartId:n,zIndex:t}}),(e=>s({onPointerMove:sn,onDOMElementLeave:yx,onDOMElementEnter:bx},e)))(Wx);const Yx=fn([hi],(function(e){const{tooltip:t}=e;if(t&&Oi(t))return t.snap||!1;return ai}));const Gx=fn([iv,Yx],((e,t)=>function(e,t){return e&&e.bandwidth>0||t}(e.scales.xScale,t)));const qx=fn([Ax,e=>e.externalEvents.pointer,Jb,hi,iv,Bb,Xb,Gx,kx,ev],((e,t,n,i,r,a,o,s,l,c)=>function(e,t,n,i,r,a,o,s,l,c){if(!r)return;const u=(h=a,!h.some((e=>e.seriesType===eo.Bar)));var h;let d,f=Object.assign({},e),p=!1;if(pp(r,t)){p=!0;const e=r.pureScale(t.x);if(null==e||e>n.width||e<0)return;f={x:e,y:0,verticalPanelValue:null,horizontalPanelValue:null},d={value:t.x,withinBandwidth:!0}}else if(d=r.invertWithStep(e.x,l),!d)return;const{horizontal:g,vertical:m}=c,y=m.scale(f.verticalPanelValue)||0,b=g.scale(f.horizontalPanelValue)||0,v={width:g.bandwidth,height:m.bandwidth,top:n.top+y,left:n.left+b},x=function(e,t,n,i,r,a,o){const{top:s,left:l,width:c,height:u}=t,{x:h,y:d}=n,f=Jg(e),p=!o;if(h>(f?c:u)||d>(f?u:c)||h<0||d<0||!i.withinBandwidth)return;const g=function(e,t,n=1){const i=t.scale(e);if(null!==i){if(t.bandwidth>0){const e=t.bandwidth/(1-t.barsPadding);return{position:i-(e-t.bandwidth)/2*n,band:e*n}}return{position:i,band:1}}}(i.value,a,p?1:o);if(!g)return;const{position:m,band:y}=g,b=a.bandwidth>0?y:0;if(f){const t=r?m:n.x;let i=0===e?l+t:l+c-t-b,o=y;return y>1&&i+y>l+c?o=l+c-i:y>1&&i<l&&(o=y-(l-i),i=l),p&&om(a)?{x:i,width:0,y:s,height:u}:{x:i,y:s,width:o,height:u}}const v=r?m:n.x;let x=90===e?s+v:u+s-v-b,w=y;return y>1&&x+y>s+u?w=y-(x+y-(s+u)):y>1&&x<s&&(w=y-(s-x),x=s),p&&om(a)?{x:l,width:c,y:x,height:0}:{y:x,x:l,width:c,height:w}}(i.rotation,v,f,{value:d.value,withinBandwidth:!0},s,r,u?0:o);return x&&Object.assign(Object.assign({},x),{fromExternalEvent:p})}(e,t,n.chartDimensions,i,r.scales.xScale,a,o,s,l,c)));const Xx=fn([Jb,hi,Cx],((e,t,n)=>function(e,t,n){const{x:i,y:r}=n;if(i<0||r<0)return;const{left:a,top:o,width:s,height:l}=t;if(Jg(e)){const e=r+o;return{x1:a,x2:a+s,y1:e,y2:e}}const c=i+a;return{x1:c,x2:c,y1:o,y2:o+l}}(t.rotation,e.chartDimensions,n)));class Zx extends i.Component{renderCursor(){const{zIndex:e,theme:{crosshair:{band:t,line:n}},cursorPosition:r,tooltipType:a,fromExternalEvent:o}=this.props;if(!r||!function(e,t,n){return t&&(e===ei.Crosshairs||e===ei.VerticalCursor||n)}(a,t.visible,o))return null;const{x:s,y:l,width:c,height:u}=r,h=0===c||0===u,{strokeWidth:d,stroke:f,dash:p}=n,{fill:g}=t,m=(null!=p?p:[]).join(" ");return i.createElement("svg",{className:"echCrosshair__cursor",width:"100%",height:"100%",style:{zIndex:r&&h?e:void 0}},h&&i.createElement("line",Object.assign({},{x1:s,x2:s+c,y1:l,y2:l+u,strokeWidth:d,stroke:f,strokeDasharray:m})),!h&&i.createElement("rect",Object.assign({},{x:s,y:l,width:c,height:u,fill:g})))}renderCrossLine(){const{zIndex:e,theme:{crosshair:{crossLine:t}},cursorCrossLinePosition:n,tooltipType:r}=this.props;if(!n||(a=r,!t.visible||a!==ei.Crosshairs))return null;var a;const{strokeWidth:o,stroke:s,dash:l}=t,c={strokeWidth:o,stroke:s,strokeDasharray:(null!=l?l:[]).join(" ")};return i.createElement("svg",{className:"echCrosshair__crossLine",width:"100%",height:"100%",style:{zIndex:e}},i.createElement("line",Object.assign({},n,c)))}render(){return i.createElement(i.Fragment,null,this.renderCursor(),this.renderCrossLine())}}Zx.displayName="Crosshair";const Kx=o((e=>{if(vi(e)!==bi.Initialized)return{theme:Xn,chartRotation:0,tooltipType:ei.None,zIndex:0};const t=hi(e),n=qx(e),i=null==n?void 0:n.fromExternalEvent,r=Ei(t,i);return{theme:yi(e),chartRotation:di(e),cursorPosition:n,cursorCrossLinePosition:Xx(e),tooltipType:r,fromExternalEvent:i,zIndex:e.zIndex}}))(Zx);class Qx extends i.Component{render(){const{highlightedGeometries:e,chartDimensions:t,chartRotation:n,chartId:r,zIndex:a}=this.props,o=[90,-90].includes(n)?t.height:t.width,s=[90,-90].includes(n)?t.width:t.height,l=`echHighlighterClipPath__${r}`;return i.createElement("svg",{className:"echHighlighter",style:{zIndex:a}},i.createElement("defs",null,i.createElement("clipPath",{id:l},i.createElement("rect",{x:"0",y:"0",width:o,height:s}))),e.map(((e,r)=>{const{panel:a}=e,o=e.x+e.transform.x,s=e.y+e.transform.y,c=function(e,t,{left:n,top:i}){const{x:r,y:a}=Eb(e,t);return`translate(${n+e.left+r}, ${i+e.top+a}) rotate(${t})`}(a,n,t);if(oy(e)){const{color:t}=e.style.stroke,{d:n,rotate:a}=function(e){const t=Math.max(e.radius,10),[n,i]=Ov[e.style.shape];return{d:n(t),rotate:i}}(e);return i.createElement("g",{key:r,transform:c,clipPath:null!==e.value.mark?`url(#${l})`:void 0},i.createElement("path",{d:n,stroke:Wt(t),strokeWidth:4,transform:`translate(${o}, ${s}) rotate(${a||0})`,fill:"transparent"}))}return i.createElement("rect",{key:r,x:o,y:s,width:e.width,height:e.height,transform:c,className:"echHighlighterOverlay__fill",clipPath:`url(#${l})`})})))}}Qx.displayName="Highlighter";const Jx=o((e=>{const{chartId:t,zIndex:n}=e;return vi(e)!==bi.Initialized?{initialized:!1,chartId:t,zIndex:n,highlightedGeometries:[],chartTransform:{x:0,y:0,rotate:0},chartDimensions:{top:0,left:0,width:0,height:0},chartRotation:0}:{initialized:!0,chartId:t,zIndex:n,highlightedGeometries:zx(e),chartTransform:av(e),chartDimensions:Jb(e).chartDimensions,chartRotation:di(e)}}))(Qx),ew=fn([e=>{var t;return null===(t=e.interactions.pointer.down)||void 0===t?void 0:t.position},e=>e.interactions.pointer.current.position,di,Jb,hi,ev],((e,t,n,{chartDimensions:i},{brushAxis:r},a)=>{if(!e)return null;const o=tw(nw(e,i),nw(t,i),a);switch(r){case ti.Y:return function(e,{hPanelStart:t,vPanelStart:n,hPanelWidth:i,vPanelHeight:r,start:a,end:o}){const s=em(e);return{left:s?a.x:t,top:s?n:a.y,height:s?r:iw(a.y,o.y),width:s?iw(a.x,o.x):i}}(n,o);case ti.Both:return function({start:e,end:t}){return{left:e.x,top:e.y,height:iw(e.y,t.y),width:iw(e.x,t.x)}}(o);case ti.X:default:return function(e,{hPanelStart:t,vPanelStart:n,hPanelWidth:i,vPanelHeight:r,start:a,end:o}){const s=em(e);return{left:s?t:a.x,top:s?a.y:n,height:s?iw(a.y,o.y):r,width:s?i:iw(a.x,o.x)}}(n,o)}}));function tw(e,t,{horizontal:n,vertical:i}){var r,a;const o=n.invert(e.x),s=i.invert(e.y),l=null!==(r=n.scale(o))&&void 0!==r?r:0,c=l+n.bandwidth,u=null!==(a=i.scale(s))&&void 0!==a?a:0,h=u+i.bandwidth;return{start:{x:En(e.x,l,c),y:En(e.y,u,h)},end:{x:En(t.x,l,c),y:En(t.y,u,h)},hPanelStart:l,hPanelWidth:n.bandwidth,vPanelStart:u,vPanelHeight:i.bandwidth}}function nw({x:e,y:t},{left:n,top:i}){return{x:e-n,y:t-i}}function iw(e,t,n=1){const i=t-e;return Math.abs(i)<n?n:i}const rw=fn([Bb],(e=>{const t=new Set;e.forEach((e=>t.add(e.seriesType)));return t.size>1?`Mixed chart: ${[...t].join(" and ")} chart`:`${[...t]} chart`})),aw=fn([Ax,iv,kx],(({x:e,y:t,verticalPanelValue:n,horizontalPanelValue:i},{scales:{xScale:r,yScales:a}},o)=>{if(!r||-1===e)return;const s=r.invertWithStep(e,o);return s?{x:s.value,y:[...a.entries()].map((([e,n])=>({value:n.invert(t),groupId:e}))),smVerticalValue:n,smHorizontalValue:i}:void 0})),ow=fn([hi,Mx],((e,t)=>!!t.xScale&&(t.xScale.type!==Ja.Ordinal&&Boolean(e.onBrushEnd)))),sw=fn([zx,hi,e=>e.interactions.pointer.current.position,aw,Jb,ow],((e,t,n,i,{chartDimensions:r},a)=>{const{x:o,y:s}=n,l=o-r.left,c=s-r.top;return l<0||l>=r.width||c<0||c>=r.height?Ee:e.length>0&&(t.onElementClick||t.onElementOver)||null!==i&&t.onProjectionClick?"pointer":a?"crosshair":Ee})),lw=fn([yi,Fb,lv,ev],((e,t,n,i)=>sv(t,n,e.axes,i)));const cw=fn([iv,vv,lv,lw,Fb],(({geometries:e},t,n,i,r)=>{const a=t.reduce(((e,{label:t,seriesIdentifiers:n})=>(n.forEach((({key:n})=>{e.set(n,t)})),e)),new Map);return{legend:pw(t),axes:uw(n,r,i),areas:e.areas.map(fw(a)),lines:e.lines.map(dw(a)),bars:hw(a,e.bars)}}));function uw(e,t,n){return t.reduce(((t,{position:i,title:r,id:a})=>{const o=e.find((({axis:e})=>e.id===a));if(!o)return t;const s=o.visibleTicks.filter((({label:e})=>""!==e)),l=s.map((({label:e})=>e)),c=s.map((({value:e})=>e)),u=n.flatMap((({lineGroups:e})=>{var t,n;return null!==(n=null===(t=e.find((({axisId:e})=>e===o.axis.id)))||void 0===t?void 0:t.lines)&&void 0!==n?n:[]})).map((({x1:e,y1:t})=>({x:e,y:t})));return t[$c(i)?"x":"y"].push(Object.assign({id:a,title:r,position:i},$c(i)?{labels:l,values:c,gridlines:u}:{labels:l.reverse(),values:c.reverse(),gridlines:u.reverse()})),t}),{x:[],y:[]})}function hw(e,t){const n=new Map;return t.reduce(((e,t)=>[...e,...t.value]),[]).forEach((({color:t,seriesIdentifier:{key:i},seriesStyle:{rect:r,rectBorder:a},value:{x:o,y:s,mark:l},displayValue:c})=>{var u,h;const d=null==c?void 0:c.text,f=null!==(u=e.get(i))&&void 0!==u?u:"",p=null!==(h=n.get(i))&&void 0!==h?h:{key:i,name:f,color:t,bars:[],labels:[],visible:gw(r)||gw(a)};return p.bars.push({x:o,y:s,mark:l}),d&&p.labels.push(d),n.set(i,p),n})),[...n.values()]}function dw(e){return({value:{line:t,points:n,color:i,seriesIdentifier:{key:r},seriesLineStyle:a,seriesPointStyle:o}})=>{var s;return{path:t,color:i,key:r,name:null!==(s=e.get(r))&&void 0!==s?s:"",visible:gw(a),visiblePoints:gw(o),points:n.map((({value:{x:e,y:t,mark:n}})=>({x:e,y:t,mark:n})))}}}function fw(e){return({value:{area:t,lines:n,points:i,color:r,seriesIdentifier:{key:a},seriesAreaStyle:o,seriesPointStyle:s,seriesAreaLineStyle:l}})=>{var c;const[u,h]=n,d=i.reduce(((e,t)=>{var n=t.value,{accessor:i}=n,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(n,["accessor"]);return i===ay.Y0?e.y0.push(r):e.y1.push(r),e}),{y0:[],y1:[]}),f=gw(l),p=gw(s);return{path:t,color:r,key:a,name:null!==(c=e.get(a))&&void 0!==c?c:"",visible:gw(o),lines:{y0:h?{visible:f,path:h,points:d.y0,visiblePoints:p}:void 0,y1:{visible:f,path:u,points:d.y1,visiblePoints:p}}}}}function pw(e){return{items:e.filter((({isSeriesHidden:e})=>!e)).map((({label:e,color:t,seriesIdentifiers:n})=>n.map((({key:n})=>({key:n,name:e,color:t}))))).flat()}}function gw({visible:e=!0,fill:t="#fff",stroke:n="#fff",strokeWidth:i=1,opacity:r=1}){return Boolean(e&&r>0&&i>0&&t&&n)}const mw=fn([Px],(({values:e})=>function(e){const t=new Map;return e.forEach((({formattedValue:e,seriesIdentifier:n,valueAccessor:i})=>{var r;const a=e,o=null!==(r=t.get(n.key))&&void 0!==r?r:new Map;null==i||i!==ay.Y0&&i!==ay.Y1||o.set(i,a),t.set(n.key,o)})),t}(e))),yw=fn([vv,hi],((e,{showLegendExtra:t})=>e.map((({label:e,defaultExtra:n})=>null!=(null==n?void 0:n.legendSizingLabel)?{label:`${e}${t?n.legendSizingLabel:""}`,depth:0}:{label:e,depth:0})))),bw=fn([Jb,hi,qx,Cx,ev],((e,t,n,i,{horizontal:r,vertical:a})=>{var o,s;if(!n)return null;const l=null!==(o=a.scale(i.verticalPanelValue))&&void 0!==o?o:0,c=null!==(s=r.scale(i.horizontalPanelValue))&&void 0!==s?s:0,u={width:r.bandwidth,height:a.bandwidth,top:e.chartDimensions.top+l,left:e.chartDimensions.left+c};return function(e,t,n,i,r=ii.MousePosition){const{x:a,y:o,width:s,height:l}=t;if(!em(e))return{x:a,width:s,y:r===ii.MousePosition?n.y+i.top:r===ii.Middle?o+l/2:r===ii.Bottom?o+l:o,height:0};return{x:r===ii.MousePosition?n.x+i.left:r===ii.Right?a+s:r===ii.Center?a+s/2:a,width:0,y:o,height:l}}(t.rotation,n,i,u,Ci(t.tooltip)?void 0:t.tooltip.stickTo)})),vw=fn([ow,e=>e.interactions.pointer],((e,t)=>!!e&&t.dragging)),xw=fn([hi,({externalEvents:{pointer:e}})=>null!==e&&e.type!==Jn.Out,({externalEvents:{pointer:e}})=>e,Mx,Jb],(({externalPointerEvents:e},t,n,{xScale:i},{chartDimensions:r})=>{var a,o;if(!n||n.type!==Jn.Over||!1===(null===(a=e.tooltip)||void 0===a?void 0:a.visible))return!1;const s=i.pureScale(n.x);return!(null==s||s>r.width+r.left||s<0)&&(t&&!0===(null===(o=e.tooltip)||void 0===o?void 0:o.visible))})),ww=fn([Dx],(e=>null!==e&&e.isVisible)),Mw=fn([e=>Ei(hi(e)),e=>e.interactions.pointer,Cx,Px,ww,xw],(function(e,t,n,i,r,a){const o=e!==ei.None&&null===t.down&&n.x>-1&&n.y>-1&&i.values.length>0&&!r,s=a&&i.values.length>0;return{visible:o||s,isExternal:a}}));const Sw=e=>e.interactions.pointer.lastDrag;function kw(){let e=null,t=null;return n=>{if(null===t&&n.chartType===Ce.XYAxis){if(!ow(n))return t=null,void(e=null);t=fn([Sw,hi,Mx,Jb,qb,ev],((t,{onBrushEnd:n,rotation:i,brushAxis:r,minBrushDelta:a,roundHistogramBrushValues:o,allowBrushingLastHistogramBucket:s},l,{chartDimensions:c},u,h)=>{const d={lastDrag:t,onBrushEnd:n};if(null!==t&&gp(e,d)&&n){const e={},{yScales:d,xScale:f}=l;r!==ti.X&&r!==ti.Both||(e.x=function(e,t,n,i,r,a,o,s,l){const c=!em(n),u=_w(e,t,a,c);let{minPos:h,maxPos:d}=u;-90!==n&&180!==n||(h=u.panelMax-h,d=u.panelMax-d);if(void 0!==o?Math.abs(d-h)<o:d===h)return;const f=i?0:-(r.bandwidth+r.bandwidthPadding)/2,p=s?e=>{var t;return null===(t=r.invertWithStep(e,r.domain))||void 0===t?void 0:t.value}:e=>r.invert(e),g=p(h+f),m=p(d+f),y=r.domain[1]+(l?r.minInterval:0),b=An(g,m,r.domain[0]),v=Tn(g,m,y);return[b,v]}(c,t,i,u,f,h,a,o,s)),r!==ti.Y&&r!==ti.Both||(e.y=function(e,t,n,i,r,a){const o=[];return i.forEach(((i,s)=>{const l=em(n),c=_w(e,t,r,l);let{minPos:u,maxPos:h}=c;if(90!==n&&180!==n||(u=c.panelMax-u,h=c.panelMax-h),void 0!==a?Math.abs(h-u)<a:h===u)return;const d=i.invert(u),f=i.invert(h),p=An(d,f,i.domain[0]),g=Tn(d,f,i.domain[1]);o.push({extent:[p,g],groupId:s})})),0===o.length?void 0:o}(c,t,i,d,h,a)),void 0===e.x&&void 0===e.y||n(e)}e=d}))}t&&t(n)}}function _w(e,t,n,i){const r=function(e,t,n){const i=nw(t.start.position,e),r=nw(t.end.position,e);return tw(i,r,n)}(e,t,n);return function(e,{start:t,end:n,vPanelStart:i,hPanelStart:r,vPanelHeight:a,hPanelWidth:o}){const s=e?t.x-r:t.y-i,l=e?n.x-r:n.y-i,c=e?o:a;return{minPos:Math.min(s,l),maxPos:Math.max(s,l),panelMax:c}}(i,r)}const Ow=fn([xa,Ax,iv,kx],((e,t,n,i)=>function(e,t,{xScale:n,yScales:i},r){if(!n)return{chartId:e,type:Jn.Out};const{x:a,y:o,verticalPanelValue:s,horizontalPanelValue:l}=t;if(-1===a||-1===o)return{chartId:e,type:Jn.Out};const c=n.invertWithStep(a,r);if(!c)return{chartId:e,type:Jn.Out};return{chartId:e,type:Jn.Over,unit:n.unit,scale:n.type,x:c.value,y:[...i.entries()].map((([e,t])=>({value:t.invert(o),groupId:e}))),smVerticalValue:s,smHorizontalValue:l}}(e,t,n.scales,i)));function Cw(e,t,n){return!(!t||e.type===t.type)||(!t||e.type!==t.type||e.type!==Jn.Out)&&!(!t||e.type!==Jn.Over||t.type!==Jn.Over||function(e,t,n){const i=n===ni.X||n===ni.Both,r=n===ni.Y||n===ni.Both;return(!i||e.x===t.x&&e.scale===t.scale&&e.unit===t.unit)&&(!r||e.y.every(((e,n)=>{var i;return e.value===(null===(i=t.y[n])||void 0===i?void 0:i.value)})))}(e,t,n))}class Ew{constructor(){this.onClickCaller=function(){let e=null,t=null;return n=>{if(t)return t(n);n.chartType===Ce.XYAxis&&(t=fn([Gl,hi,zx,aw],((t,{onElementClick:n,onProjectionClick:i},r,a)=>{if(!ci(e,t))return;const o=function(e,t){if(0===e.length||!t)return!1;return t(e.map((({value:e,seriesIdentifier:t})=>[e,t]))),!0}(r,n);o||function(e,t){if(void 0===e||!t)return!1;t(e)}(a,i),e=t})))}}(),this.onElementOverCaller=function(){let e=null,t=null;return n=>{null===t&&n.chartType===Ce.XYAxis&&(t=fn([Lx,hi],(({highlightedGeometries:t},n)=>{const i={settings:n,highlightedGeometries:t};if(function(e,t){if(!t)return!1;if(!t.settings||!t.settings.onElementOver)return!1;const{highlightedGeometries:n}=t,i=e?e.highlightedGeometries:[];return n.length>0&&(n.length!==i.length||!n.every((({value:e},t)=>{const n=i[t].value;return n&&n.x===e.x&&n.y===e.y&&n.accessor===e.accessor})))}(e,i)&&n.onElementOver){const e=t.map((({value:e,seriesIdentifier:t})=>[e,t]));n.onElementOver(e)}e=i}))),t&&t(n)}}(),this.onElementOutCaller=function(){let e=null,t=null;return n=>{null===t&&n.chartType===Ce.XYAxis&&(t=fn([Lx,hi],(({highlightedGeometries:t},n)=>{const i={settings:n,highlightedGeometries:t};(function(e,t){return!(!t||!e)&&!(!t.settings||!t.settings.onElementOut)&&e.highlightedGeometries.length>0&&0===t.highlightedGeometries.length})(e,i)&&n.onElementOut&&n.onElementOut(),e=i}))),t&&t(n)}}(),this.onBrushEndCaller=kw(),this.onPointerMoveCaller=function(){let e=null,t=null;return n=>{null===t&&n.chartType===Ce.XYAxis&&(t=fn([hi,Ow,xa],(({onPointerUpdate:t,pointerUpdateTrigger:n},i,r)=>{null===e&&(e={chartId:r,type:Jn.Out});const a=Object.assign({},e);e=i,t&&Cw(a,i,n)&&t(i)}))),t&&t(n)}}(),this.chartType=Ce.XYAxis,this.legendId=function(){const e=`i${ge()}`;return t=>`${e}_${t||ge()}`}()("legend")}isInitialized(e){return Bb(e).length>0?bi.Initialized:bi.SpecNotInitialized}isBrushAvailable(e){return ow(e)}isBrushing(e){return vw(e)}isChartEmpty(e){return wv(e)}getMainProjectionArea(e){return Jb(e).chartDimensions}getProjectionContainerArea(e){return cs(e)}getBrushArea(e){return ew(e)}getLegendItemsLabels(e){return yw(e)}getLegendItems(e){return vv(e)}getLegendExtraValues(e){return mw(e)}chartRenderer(e,t){return i.createElement(i.Fragment,null,i.createElement(Kx,null),i.createElement(fx,{forwardCanvasRef:t}),i.createElement(Zr,{getChartContainerRef:e}),i.createElement(Ux,{getChartContainerRef:e,chartAreaRef:t}),i.createElement(Jx,null),i.createElement(sc,null))}getPointerCursor(e){return sw(e)}isTooltipVisible(e){return Mw(e)}getTooltipInfo(e){return Px(e)}getTooltipAnchor(e){return bw(e)}eventCallbacks(e){this.onElementOverCaller(e),this.onElementOutCaller(e),this.onClickCaller(e),this.onBrushEndCaller(e),this.onPointerMoveCaller(e)}getDebugState(e){return cw(e)}getChartTypeDescription(e){return rw(e)}}const Aw="UPDATE_PARENT_DIMENSION";function Tw(e){return{type:Aw,dimensions:e}}const Iw="CLEAR_TEMPORARY_COLORS",jw="SET_TEMPORARY_COLOR",Lw="SET_PERSISTED_COLOR";function Pw(){return{type:Iw}}function zw(e,t){return{type:jw,keys:e,color:t}}function Dw(e,t){return{type:Lw,keys:e,color:t}}const Nw=fn([Yp],(e=>1===e.length&&Ks(e[0].config,e[0].layers)));const Rw="ON_KEY_UP";function Vw(e){return{type:Rw,key:e}}const $w="ON_LEGEND_ITEM_OVER",Fw="ON_LEGEND_ITEM_OUT",Bw="ON_TOGGLE_DESELECT_SERIES";function Hw(e){return{type:$w,legendPath:e}}function Ww(){return{type:Fw}}function Uw(e,t=!1){return{type:Bw,legendItemIds:e,negate:t}}function Yw(e,t,n){const{interactions:i}=e;switch(t.type){case Rw:return"Escape"===t.key?Object.assign(Object.assign({},i),{pointer:{dragging:!1,current:{position:{x:-1,y:-1},time:0},down:null,up:null,lastDrag:null,lastClick:null}}):i;case tn:const o=!!i.pointer.down&&(r=i.pointer.down.position,a=t.position,Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2))>4);return Object.assign(Object.assign({},i),{pointer:Object.assign(Object.assign({},i.pointer),{dragging:o,current:{position:Object.assign({},t.position),time:t.time}})});case nn:return Object.assign(Object.assign({},i),{drilldown:qw(e),prevDrilldown:i.drilldown,pointer:Object.assign(Object.assign({},i.pointer),{dragging:!1,up:null,down:{position:Object.assign({},t.position),time:t.time}})});case rn:return Object.assign(Object.assign({},i),{pointer:Object.assign(Object.assign({},i.pointer),{lastDrag:i.pointer.down&&i.pointer.dragging?{start:{position:Object.assign({},i.pointer.down.position),time:i.pointer.down.time},end:{position:Object.assign({},i.pointer.current.position),time:t.time}}:null,lastClick:i.pointer.down&&!i.pointer.dragging?{position:Object.assign({},t.position),time:t.time}:null,dragging:!1,down:null,up:{position:Object.assign({},t.position),time:t.time}})});case Fw:return Object.assign(Object.assign({},i),{highlightedLegendPath:[]});case $w:const{legendPath:s}=t;return Object.assign(Object.assign({},i),{highlightedLegendPath:s});case Bw:return Object.assign(Object.assign({},i),{deselectedDataSeries:Gw(t,i.deselectedDataSeries,n)});case px:return Object.assign(Object.assign({},i),{hoveredDOMElement:t.element});case gx:return Object.assign(Object.assign({},i),{hoveredDOMElement:null});default:return i}var r,a}function Gw({legendItemIds:e,negate:t},n,i){const r=e.map((({key:e})=>e)),a=new Set(n.map((({key:e})=>e))),o=i.map((({seriesIdentifiers:e})=>e)),s=r.every((e=>a.has(e)));return t?s||n.length!==o.length-1?i.map((({seriesIdentifiers:e})=>e)).flat().filter((({key:e})=>!r.includes(e))):e:s?n.filter((({key:e})=>!r.includes(e))):[...n,...e]}function qw(e){if(e.chartType!==Ce.Partition||!Nw(e))return[];const t=Ep(e)[0];return t?t[t.length-1].path.map((e=>e.value)):[]}const Xw=[],Zw=e=>e.internalChartState?e.internalChartState.getLegendItems(e):Xw;const Kw=e=>{const t=(e=>({chartId:e,zIndex:0,specsInitialized:!1,specParsing:!1,chartRendered:!1,chartRenderedCount:0,specs:{[si.id]:si},colors:{temporary:{},persisted:{}},chartType:null,internalChartState:null,interactions:{pointer:{dragging:!1,current:{position:{x:-1,y:-1},time:0},down:null,up:null,lastDrag:null,lastClick:null},highlightedLegendPath:[],deselectedDataSeries:[],hoveredDOMElement:null,drilldown:[],prevDrilldown:[]},externalEvents:{pointer:null},parentDimensions:{height:0,width:0,left:0,top:0}}))(e);return(n=t,i)=>{switch(i.type){case Oe:return Object.assign(Object.assign({},n),{zIndex:i.zIndex});case be:const t=function(e){const t=Object.values(e).map((e=>e.chartType)).filter((e=>e!==Ce.Global)).filter(Bn);if(1!==t.length)return fs.warn((0===t.length?"Zero":"Multiple")+" chart types in the same configuration"),null;return t[0]}(n.specs);return Object.assign(Object.assign({},n),{specsInitialized:!0,specParsing:!1,chartType:t,internalChartState:n.chartType===t?n.internalChartState:Jw(t)});case ve:return Object.assign(Object.assign({},n),{specsInitialized:!1,chartRendered:!1});case me:return Object.assign(Object.assign({},n),{specsInitialized:!1,chartRendered:!1,specParsing:!0,specs:n.specParsing?Object.assign(Object.assign({},n.specs),{[i.spec.id]:i.spec}):{[si.id]:si,[i.spec.id]:i.spec}});case ye:const r=n.specs,a=i.id;r[a];const o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(r,["symbol"==typeof a?a:a+""]);return Object.assign(Object.assign({},n),{specsInitialized:!1,chartRendered:!1,specParsing:!1,specs:Object.assign({},o)});case Cl:const s=n.chartRendered?n.chartRenderedCount:n.chartRenderedCount+1;return Object.assign(Object.assign({},n),{chartRendered:!0,chartRenderedCount:s});case Aw:return Object.assign(Object.assign({},n),{interactions:Object.assign(Object.assign({},n.interactions),{prevDrilldown:n.interactions.drilldown}),parentDimensions:Object.assign({},i.dimensions)});case _e:return Object.assign(Object.assign({},n),{externalEvents:Object.assign(Object.assign({},n.externalEvents),{pointer:i.event.chartId===e?null:i.event})});case Iw:return Object.assign(Object.assign({},n),{colors:Object.assign(Object.assign({},n.colors),{temporary:{}})});case jw:return Object.assign(Object.assign({},n),{colors:Object.assign(Object.assign({},n.colors),{temporary:Object.assign(Object.assign({},n.colors.temporary),i.keys.reduce(((e,t)=>(e[t]=i.color,e)),{}))})});case Lw:return Object.assign(Object.assign({},n),{colors:Object.assign(Object.assign({},n.colors),{persisted:Object.fromEntries(Object.entries(n.colors.persisted).filter((([e])=>!i.keys.includes(e))))})});default:return vi(n)===bi.Initialized?Object.assign(Object.assign({},n),{interactions:Yw(n,i,Zw(n))}):n}}};const Qw={[Ce.Goal]:()=>new Kl,[Ce.Partition]:()=>new ag,[Ce.XYAxis]:()=>new Ew,[Ce.Heatmap]:()=>new yp,[Ce.Wordcloud]:()=>new Qg,[Ce.Global]:()=>null};function Jw(e){return e?Qw[e]():null}class eM extends i.Component{render(){const{backgroundColor:e}=this.props;return i.createElement("div",{className:"echChartBackground",style:{backgroundColor:e}})}}eM.displayName="ChartBackground";const tM=o((e=>vi(e)!==bi.Initialized?{backgroundColor:"transparent"}:{backgroundColor:yi(e).background.color}))(eM),nM=e=>e.internalChartState?e.internalChartState.chartRenderer:()=>null,iM=e=>{var t,n;return null!==(n=null===(t=e.internalChartState)||void 0===t?void 0:t.getPointerCursor(e))&&void 0!==n?n:Ee},rM=e=>{if(e.internalChartState)return e.internalChartState.isChartEmpty(e)},aM=({renderFn:e})=>i.createElement(n.Suspense,{fallback:()=>null},i.createElement("div",{className:"echReactiveChart_noResults"},null!=e?e:i.createElement("p",null,"No data to display")));class oM extends i.Component{constructor(){super(...arguments),this.handleMouseMove=({nativeEvent:{offsetX:e,offsetY:t,timeStamp:n}})=>{const{isChartEmpty:i,onPointerMove:r}=this.props;i||r({x:e,y:t},n)},this.handleMouseLeave=({nativeEvent:{timeStamp:e}})=>{const{isChartEmpty:t,onPointerMove:n,isBrushing:i}=this.props;t||i||n({x:-1,y:-1},e)},this.handleMouseDown=({nativeEvent:{offsetX:e,offsetY:t,timeStamp:n}})=>{const{isChartEmpty:i,onMouseDown:r,isBrushingAvailable:a}=this.props;i||(a&&window.addEventListener("mouseup",this.handleBrushEnd),window.addEventListener("keyup",this.handleKeyUp),r({x:e,y:t},n))},this.handleMouseUp=({nativeEvent:{offsetX:e,offsetY:t,timeStamp:n}})=>{const{isChartEmpty:i,onMouseUp:r}=this.props;i||(window.removeEventListener("keyup",this.handleKeyUp),r({x:e,y:t},n))},this.handleKeyUp=({key:e})=>{window.removeEventListener("keyup",this.handleKeyUp);const{isChartEmpty:t,onKeyPress:n}=this.props;t||n(e)},this.handleBrushEnd=()=>{const{onMouseUp:e}=this.props;window.removeEventListener("mouseup",this.handleBrushEnd),requestAnimationFrame((()=>{e({x:-1,y:-1},Date.now())}))}}shouldComponentUpdate(e){return!Ko(this.props,e)}render(){const{status:e,isChartEmpty:t,settings:n,initialized:r}=this.props;if(!r||e===bi.ParentSizeInvalid)return null;if(e===bi.ChartNotInitialized||e===bi.MissingChartType||e===bi.SpecNotInitialized||t)return i.createElement(aM,{renderFn:null==n?void 0:n.noResults});const{pointerCursor:a,internalChartRenderer:o,getChartContainerRef:s,forwardStageRef:l}=this.props;return i.createElement("div",{className:"echChartPointerContainer",style:{cursor:a},onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp},o(s,l))}}oM.displayName="ChartContainer";const sM=o((e=>{const t=vi(e),n=hi(e),i=!e.specParsing&&e.specsInitialized;return t!==bi.Initialized?{status:t,initialized:i,pointerCursor:Ee,isBrushingAvailable:!1,isBrushing:!1,internalChartRenderer:()=>null,settings:n}:{status:t,initialized:i,isChartEmpty:rM(e),pointerCursor:iM(e),isBrushingAvailable:nc(e),isBrushing:tc(e),internalChartRenderer:nM(e),settings:n}}),(e=>s({onPointerMove:sn,onMouseUp:on,onMouseDown:an,onKeyPress:Vw},e)))(oM);class lM extends i.Component{constructor(e){super(e),this.initialResizeComplete=!1,this.onResize=e=>{if(!Array.isArray(e))return;if(0===e.length||!e[0])return;const{width:t,height:n}=e[0].contentRect;this.animationFrameID=window.requestAnimationFrame((()=>{this.props.updateParentDimensions({width:t,height:n,top:0,left:0})}))},this.handleResize=e=>{this.initialResizeComplete?this.onResizeDebounced(e):(this.initialResizeComplete=!0,this.onResize(e))},this.containerRef=i.createRef(),this.ro=new z(this.handleResize),this.animationFrameID=null,this.onResizeDebounced=()=>{}}componentDidMount(){this.onResizeDebounced=pn(this.onResize,this.props.resizeDebounce),this.containerRef.current&&this.ro.observe(this.containerRef.current)}componentWillUnmount(){this.animationFrameID&&window.cancelAnimationFrame(this.animationFrameID),this.ro.disconnect()}render(){return i.createElement("div",{ref:this.containerRef,className:"echChartResizer"})}}const cM=o((e=>{const t=hi(e),n=void 0===t.resizeDebounce||null===t.resizeDebounce?200:t.resizeDebounce;return{resizeDebounce:!$n(n)||Number.isNaN(n)?200:n}}),(e=>s({updateParentDimensions:Tw},e)))(lM),uM=e=>{if(e.internalChartState){const{height:t,width:n}=cs(e);if(t*n>0)return e.internalChartState.getDebugState(e)}return{}};class hM extends i.Component{constructor(){super(...arguments),this.dispatchRenderChange=()=>{const{onRenderChange:e,rendered:t}=this.props;e&&window.requestAnimationFrame((()=>{e(t)}))}}componentDidMount(){this.dispatchRenderChange()}componentDidUpdate(){this.dispatchRenderChange()}componentWillUnmount(){dn.removeKeyFromAll(this.props.chartId)}render(){const{rendered:e,renderedCount:t,debugState:n}=this.props,r=n&&JSON.stringify(n);return i.createElement("div",{className:"echChartStatus","data-ech-render-complete":e,"data-ech-render-count":t,"data-ech-debug-state":r})}}const dM=o((e=>{const{onRenderChange:t,debugState:n}=hi(e);return{chartId:e.chartId,rendered:e.chartRendered,renderedCount:e.chartRenderedCount,onRenderChange:t,debugState:n?uM(e):null}}))(hM),fM=Object.freeze({Graceful:"graceful"});class pM extends n.Component{constructor(){super(...arguments),this.hasError=!1}componentDidUpdate(){this.hasError&&(this.hasError=!1)}componentDidCatch(e){(function(e){var t;return(null===(t=e)||void 0===t?void 0:t.type)===fM.Graceful})(e)&&(this.hasError=!0,this.forceUpdate())}render(){return this.hasError?i.createElement(aM,{renderFn:this.props.renderFn}):this.props.children}}const gM=new Map,mM=e=>e.internalChartState?e.internalChartState.getLegendExtraValues(e):gM;const yM={chartDimensions:{width:0,height:0,left:0,top:0},containerDimensions:{width:0,height:0,left:0,top:0},items:[],extraValues:new Map,debug:!1,chartTheme:Xn,size:{width:0,height:0},config:oi},bM=o((e=>{if(vi(e)!==bi.Initialized)return yM;const t=Zo(e);if(!t.showLegend)return yM;const{debug:n}=hi(e);return{debug:n,chartDimensions:ic(e),containerDimensions:rc(e),chartTheme:yi(e),size:ls(e),items:Zw(e),extraValues:mM(e),config:t}}),(e=>s({onToggleDeselectSeriesAction:Uw,onItemOutAction:Ww,onItemOverAction:Hw,clearTemporaryColors:Pw,setTemporaryColor:zw,setPersistedColor:Dw},e)))((function(e){const{items:t,size:n,debug:r,chartTheme:{chartMargins:a,legend:o},chartDimensions:s,containerDimensions:l,config:c}=e;if(0===t.length||t.every((({isItemHidden:e})=>e)))return null;const u=Xo(c.legendPosition),h=function({direction:e,floating:t},n,i){if(e===Mn.Vertical){const e=`${n.width}px`;return{width:t?void 0:e,maxWidth:t?void 0:e,marginLeft:i,marginRight:i}}const r=`${n.height}px`;return{height:r,maxHeight:r,marginTop:i,marginBottom:i}}(u,n,o.margin),d=function({direction:e,floating:t,floatingColumns:n},i,r,a,o){const{top:s,bottom:l,left:c,right:u}=i;return e===Mn.Horizontal?{paddingLeft:c,paddingRight:u,gridTemplateColumns:`repeat(auto-fill, minmax(${Math.min(o.width,r.verticalWidth)}px, 1fr))`}:Object.assign({paddingTop:s,paddingBottom:l},t&&{gridTemplateColumns:`repeat(${En(null!=n?n:1,1,a)}, auto)`})}(u,a,o,t.length,n),f=ie("echLegend",{"echLegend--debug":r,"echLegend--horizontal":u.direction===Mn.Horizontal,"echLegend--vertical":u.direction===Mn.Vertical,"echLegend--left":u.hAlign===kn.Left,"echLegend--right":u.hAlign===kn.Right,"echLegend--top":u.vAlign===_n.Top,"echLegend--bottom":u.vAlign===_n.Bottom}),p={positionConfig:u,totalItems:t.length,extraValues:e.extraValues,showExtra:c.showLegendExtra,onMouseOut:c.onLegendItemOut,onMouseOver:c.onLegendItemOver,onClick:c.onLegendItemClick,clearTemporaryColorsAction:e.clearTemporaryColors,setPersistedColorAction:e.setPersistedColor,setTemporaryColorAction:e.setTemporaryColor,mouseOutAction:e.onItemOutAction,mouseOverAction:e.onItemOverAction,toggleDeselectSeriesAction:e.onToggleDeselectSeriesAction,colorPicker:c.legendColorPicker,action:c.legendAction},g=function({legendPosition:e},t,n,i){const{vAlign:r,hAlign:a,direction:o,floating:s}=Xo(e);if(!s)return{};const{Left:l,Right:c,Top:u,Bottom:h}=wn;return o===Mn.Vertical?{position:"absolute",zIndex:1,right:a===c?i.width-n.width-n.left+10:void 0,left:a===l?n.left+10:void 0,top:r===u?n.top:void 0,bottom:r===h?i.height-n.top-n.height:void 0,height:!s&&t.height>=n.height?n.height:void 0}:{position:"absolute",zIndex:1,right:10,left:n.left+10,top:r===u?n.top:void 0,bottom:r===h?i.height-n.top-n.height:void 0,height:!s&&t.height>=n.height?n.height:void 0}}(c,n,s,l);return i.createElement("div",{className:f,style:g},i.createElement("div",{style:h,className:"echLegendListContainer"},i.createElement("ul",{style:d,className:"echLegendList"},t.map(((e,n)=>function(e,t,n,r){return i.createElement(as,Object.assign({key:`${r}`,item:e},t))}(e,p,t.length,n))))))}));class vM extends i.Component{constructor(e){var t;super(e),this.getChartContainerRef=()=>this.chartContainerRef,this.chartContainerRef=n.createRef(),this.chartStageRef=n.createRef();const i=null!==(t=e.id)&&void 0!==t?t:((a=(r=r||{}).random||(r.rng||oe)())[6]=15&a[6]|64,a[8]=63&a[8]|128,de(a));var r,a;const o=Kw(i),s=(e=>{const t=[];return"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,name:`@elastic/charts (id: ${e})`})(h(...t)):h(...t)})(i);this.chartStore=c(o,s),this.state={legendDirection:Mn.Vertical},this.unsubscribeToStore=this.chartStore.subscribe((()=>{const e=this.chartStore.getState();if(vi(e)!==bi.Initialized)return;const{legendPosition:{direction:t}}=Zo(e);this.state.legendDirection!==t&&this.setState({legendDirection:t}),e.internalChartState&&e.internalChartState.eventCallbacks(e)}))}componentDidMount(){if(this.chartContainerRef.current){const e=function(e,t){const n=[];for(;n.push(e),null!=(e=e.offsetParent)&&!e.contains(t););for(let i=n.length-1;i>=0;i--){const e=n[i],t=window.document.defaultView.getComputedStyle(e).getPropertyValue("z-index"),r=parseInt(t,10);if(!isNaN(r))return r}return 0}(this.chartContainerRef.current,document.body);this.chartStore.dispatch(function(e){return{type:Oe,zIndex:e}}(e))}}componentWillUnmount(){this.unsubscribeToStore()}getPNGSnapshot(e={backgroundColor:"transparent",pixelRatio:2}){if(!this.chartStageRef.current)return null;const t=this.chartStageRef.current,n=document.createElement("canvas");n.width=t.width,n.height=t.height;const i=n.getContext("2d");return i?(i.fillStyle=e.backgroundColor,i.fillRect(0,0,t.width,t.height),i.drawImage(t,0,0),{blobOrDataUrl:n.toDataURL(),browser:"other"}):null}dispatchExternalPointerEvent(e){this.chartStore.dispatch(function(e){return{type:_e,event:e}}(e))}render(){const{size:e,className:t}=this.props,n=function(e){if(void 0===e)return{};if(Array.isArray(e))return{width:void 0===e[0]?"100%":e[0],height:void 0===e[1]?"100%":e[1]};if("object"==typeof e)return{width:void 0===e.width?"100%":e.width,height:void 0===e.height?"100%":e.height};const t=void 0===e?"100%":e;return{width:t,height:t}}(e),r=ie("echChart",t,{"echChart--column":this.state.legendDirection===Mn.Horizontal});return i.createElement(u,{store:this.chartStore},i.createElement("div",{className:r,style:n},i.createElement(tM,null),i.createElement(dM,null),i.createElement(cM,null),i.createElement(bM,null),i.createElement(pM,null,i.createElement(ke,null,this.props.children),i.createElement("div",{className:"echContainer",ref:this.chartContainerRef},i.createElement(sM,{getChartContainerRef:this.getChartContainerRef,forwardStageRef:this.chartStageRef})))))}}vM.defaultProps={renderer:"canvas"};const xM=Object.assign(Object.assign({chartType:Ce.Goal},ia),{config:ta}),wM=ki()(Mi(xM)),MM=Object.assign(Object.assign({chartType:Ce.Wordcloud,specType:Zn.Series},Ig),{config:Ag});ki()(Mi(MM)),Wn.Circle,Wn.Circle,Wn.Circle,Hn.echPaletteColorBlind.colors;const SM=n.createContext({eventsBus:new class{constructor(){this.registeredCharts=[],this.subscribe=e=>(this.registeredCharts.push(e),()=>{this.registeredCharts=[...this.registeredCharts.filter((t=>t!==e))]}),this.elastic_onPointerUpdate=e=>{this.registeredCharts.forEach((t=>{t.current instanceof vM&&t.current.dispatchExternalPointerEvent(e)}))}}}});function kM({enabled:e,visible:t}){const r=n.useContext(SM).eventsBus,a=i.useRef(null);n.useEffect((()=>null==r?void 0:r.subscribe(a)),[r]);const o=n.useMemo((()=>{if(e)return{onPointerUpdate:null==r?void 0:r.elastic_onPointerUpdate,pointerUpdateDebounce:0,pointerUpdateTrigger:"x",externalPointerEvents:{tooltip:{visible:t}}}}),[r,e,t]);return{ref:a,elasticXYEventsProps:o}}SM.Provider;const _M={types:{ok:{actualFillColor:"#24A148",bandsColor:["#DEFBE6"]},warning:{actualFillColor:"#F1C21B",bandsColor:["#FFF8E1"]},error:{actualFillColor:"#DA1E28",bandsColor:["#FFF1F1"]},blue:{actualFillColor:"#0F62FE",bandsColor:["#EDF5FF"]}},fontFamily:"IBM Plex Mono"},OM=["#3A87BF","#002845","#60A4D0","#cfdfea","#94C3DD","#146BAB"],CM={name:"metrika",isDark:!1,data:{colors:OM},base:{fontFamily:"IBM Plex Mono",background:{color:"transparent"}},chart:{donut:{},linebar:{},heatmap:{},treemap:{},gauge:_M}},EM={name:"metrikaDark",isDark:!0,data:{colors:OM},base:{fontFamily:"IBM Plex Mono",background:{color:"#333333"}},chart:{donut:{},linebar:{},heatmap:{},treemap:{},gauge:_M}},AM=i.createContext(CM),TM=AM.Provider;function IM(){return n.useContext(AM)}let jM=0;function LM(e){return n.useState((()=>"metrika-chart-"+ ++jM))[0]}const PM=i.lazy((()=>f((()=>import("./5_w68OZ9.js")),__vite__mapDeps([0,1,2])))),zM=i.lazy((()=>f((()=>import("./qFMjfHJD.js")),__vite__mapDeps([3,1,2]))));const DM={elastic:zM,echarts:PM},NM=e=>{var{fallback:t,engine:i="echarts",data:r,format:a}=e,o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["fallback","engine","data","format"]);const s=DM[a.engine||i];return te.jsx(n.Suspense,{fallback:t||null,children:te.jsx(s,Object.assign({data:r,format:a},o))})};NM.engines=Object.keys(DM);const RM=i.lazy((()=>f((()=>import("./elL1GhmQ.js")),__vite__mapDeps([4,1,5,6,2,7,8,9,10,11,12,13,14]))));const VM={elastic:RM},$M=e=>{var{fallback:t,engine:i="elastic"}=e,r=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}(e,["fallback","engine"]);const a=VM[i];return te.jsx(n.Suspense,{fallback:t||null,children:te.jsx(a,Object.assign({},r))})};$M.engines=Object.keys(VM);export{so as A,wo as B,vM as C,wM as G,Go as H,_o as L,$M as M,wn as P,D as R,_i as S,TM as T,f as _,Ja as a,kM as b,ie as c,R as d,Ao as e,vo as f,yo as g,Co as h,EM as i,te as j,NM as k,IM as l,CM as m,LM as n,To as o,Fo as p,B as t,W as u};