@spscommerce/ds-react-charts 8.21.0 → 8.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,239 @@
1
+ (function(ue,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("@spscommerce/ds-colors"),require("@spscommerce/ds-react"),require("@spscommerce/utils"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/ds-colors","@spscommerce/ds-react","@spscommerce/utils","react-dom"],m):(ue=typeof globalThis<"u"?globalThis:ue||self,m(ue.DSReactCharts={},ue.React,ue.DSColors,ue.dsReact,ue.utils,ue.require$$1))})(this,function(ue,m,Zn,tn,tt,os){"use strict";function ss(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const z=ss(m),pe=ss(Zn);var Qn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function pt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var fi={exports:{}},Jn={exports:{}},re={};/** @license React v16.13.1
2
+ * react-is.production.min.js
3
+ *
4
+ * Copyright (c) Facebook, Inc. and its affiliates.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE file in the root directory of this source tree.
8
+ */var ls;function Qh(){if(ls)return re;ls=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case t:switch(y=y.type,y){case l:case u:case r:case i:case a:case f:return y;default:switch(y=y&&y.$$typeof,y){case o:case c:case d:case p:case s:return y;default:return S}}case n:return S}}}function M(y){return _(y)===u}return re.AsyncMode=l,re.ConcurrentMode=u,re.ContextConsumer=o,re.ContextProvider=s,re.Element=t,re.ForwardRef=c,re.Fragment=r,re.Lazy=d,re.Memo=p,re.Portal=n,re.Profiler=i,re.StrictMode=a,re.Suspense=f,re.isAsyncMode=function(y){return M(y)||_(y)===l},re.isConcurrentMode=M,re.isContextConsumer=function(y){return _(y)===o},re.isContextProvider=function(y){return _(y)===s},re.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},re.isForwardRef=function(y){return _(y)===c},re.isFragment=function(y){return _(y)===r},re.isLazy=function(y){return _(y)===d},re.isMemo=function(y){return _(y)===p},re.isPortal=function(y){return _(y)===n},re.isProfiler=function(y){return _(y)===i},re.isStrictMode=function(y){return _(y)===a},re.isSuspense=function(y){return _(y)===f},re.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===r||y===u||y===i||y===a||y===f||y===h||typeof y=="object"&&y!==null&&(y.$$typeof===d||y.$$typeof===p||y.$$typeof===s||y.$$typeof===o||y.$$typeof===c||y.$$typeof===x||y.$$typeof===g||y.$$typeof===b||y.$$typeof===v)},re.typeOf=_,re}var ie={};/** @license React v16.13.1
9
+ * react-is.development.js
10
+ *
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
+ *
13
+ * This source code is licensed under the MIT license found in the
14
+ * LICENSE file in the root directory of this source tree.
15
+ */var us;function Jh(){return us||(us=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,d=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,x=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function _(O){return typeof O=="string"||typeof O=="function"||O===r||O===u||O===i||O===a||O===f||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===d||O.$$typeof===p||O.$$typeof===s||O.$$typeof===o||O.$$typeof===c||O.$$typeof===x||O.$$typeof===g||O.$$typeof===b||O.$$typeof===v)}function M(O){if(typeof O=="object"&&O!==null){var Q=O.$$typeof;switch(Q){case t:var te=O.type;switch(te){case l:case u:case r:case i:case a:case f:return te;default:var le=te&&te.$$typeof;switch(le){case o:case c:case d:case p:case s:return le;default:return Q}}case n:return Q}}}var y=l,S=u,T=o,$=s,k=t,C=c,P=r,N=d,A=p,R=n,X=i,U=a,Z=f,ee=!1;function K(O){return ee||(ee=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),E(O)||M(O)===l}function E(O){return M(O)===u}function D(O){return M(O)===o}function B(O){return M(O)===s}function W(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function F(O){return M(O)===c}function I(O){return M(O)===r}function q(O){return M(O)===d}function Y(O){return M(O)===p}function G(O){return M(O)===n}function L(O){return M(O)===i}function j(O){return M(O)===a}function H(O){return M(O)===f}ie.AsyncMode=y,ie.ConcurrentMode=S,ie.ContextConsumer=T,ie.ContextProvider=$,ie.Element=k,ie.ForwardRef=C,ie.Fragment=P,ie.Lazy=N,ie.Memo=A,ie.Portal=R,ie.Profiler=X,ie.StrictMode=U,ie.Suspense=Z,ie.isAsyncMode=K,ie.isConcurrentMode=E,ie.isContextConsumer=D,ie.isContextProvider=B,ie.isElement=W,ie.isForwardRef=F,ie.isFragment=I,ie.isLazy=q,ie.isMemo=Y,ie.isPortal=G,ie.isProfiler=L,ie.isStrictMode=j,ie.isSuspense=H,ie.isValidElementType=_,ie.typeOf=M}()),ie}var cs;function fs(){return cs||(cs=1,process.env.NODE_ENV==="production"?Jn.exports=Qh():Jn.exports=Jh()),Jn.exports}/*
16
+ object-assign
17
+ (c) Sindre Sorhus
18
+ @license MIT
19
+ */var hi,hs;function ed(){if(hs)return hi;hs=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return hi=a()?Object.assign:function(i,s){for(var o,l=r(i),u,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var f in o)t.call(o,f)&&(l[f]=o[f]);if(e){u=e(o);for(var h=0;h<u.length;h++)n.call(o,u[h])&&(l[u[h]]=o[u[h]])}}return l},hi}var di,ds;function pi(){if(ds)return di;ds=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return di=e,di}var vi,ps;function vs(){return ps||(ps=1,vi=Function.call.bind(Object.prototype.hasOwnProperty)),vi}var mi,ms;function td(){if(ms)return mi;ms=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=pi(),n={},r=vs();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function a(i,s,o,l,u){if(process.env.NODE_ENV!=="production"){for(var c in i)if(r(i,c)){var f;try{if(typeof i[c]!="function"){var h=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}f=i[c](s,c,l,o,null,t)}catch(d){f=d}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=u?u():"";e("Failed "+o+" type: "+f.message+(p??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},mi=a,mi}var gi,gs;function nd(){if(gs)return gi;gs=1;var e=fs(),t=ed(),n=pi(),r=vs(),a=td(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return gi=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function f(E){var D=E&&(u&&E[u]||E[c]);if(typeof D=="function")return D}var h="<<anonymous>>",p={array:g("array"),bigint:g("bigint"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:b(),arrayOf:_,element:M(),elementType:y(),instanceOf:S,node:C(),objectOf:$,oneOf:T,oneOfType:k,shape:N,exact:A};function d(E,D){return E===D?E!==0||1/E===1/D:E!==E&&D!==D}function v(E,D){this.message=E,this.data=D&&typeof D=="object"?D:{},this.stack=""}v.prototype=Error.prototype;function x(E){if(process.env.NODE_ENV!=="production")var D={},B=0;function W(I,q,Y,G,L,j,H){if(G=G||h,j=j||Y,H!==n){if(l){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Q=G+":"+Y;!D[Q]&&B<3&&(i("You are manually calling a React.PropTypes validation function for the `"+j+"` prop on `"+G+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),D[Q]=!0,B++)}}return q[Y]==null?I?q[Y]===null?new v("The "+L+" `"+j+"` is marked as required "+("in `"+G+"`, but its value is `null`.")):new v("The "+L+" `"+j+"` is marked as required in "+("`"+G+"`, but its value is `undefined`.")):null:E(q,Y,G,L,j)}var F=W.bind(null,!1);return F.isRequired=W.bind(null,!0),F}function g(E){function D(B,W,F,I,q,Y){var G=B[W],L=U(G);if(L!==E){var j=Z(G);return new v("Invalid "+I+" `"+q+"` of type "+("`"+j+"` supplied to `"+F+"`, expected ")+("`"+E+"`."),{expectedType:E})}return null}return x(D)}function b(){return x(s)}function _(E){function D(B,W,F,I,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside arrayOf.");var Y=B[W];if(!Array.isArray(Y)){var G=U(Y);return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an array."))}for(var L=0;L<Y.length;L++){var j=E(Y,L,F,I,q+"["+L+"]",n);if(j instanceof Error)return j}return null}return x(D)}function M(){function E(D,B,W,F,I){var q=D[B];if(!o(q)){var Y=U(q);return new v("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return x(E)}function y(){function E(D,B,W,F,I){var q=D[B];if(!e.isValidElementType(q)){var Y=U(q);return new v("Invalid "+F+" `"+I+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return x(E)}function S(E){function D(B,W,F,I,q){if(!(B[W]instanceof E)){var Y=E.name||h,G=K(B[W]);return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected ")+("instance of `"+Y+"`."))}return null}return x(D)}function T(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function D(B,W,F,I,q){for(var Y=B[W],G=0;G<E.length;G++)if(d(Y,E[G]))return null;var L=JSON.stringify(E,function(H,O){var Q=Z(O);return Q==="symbol"?String(O):O});return new v("Invalid "+I+" `"+q+"` of value `"+String(Y)+"` "+("supplied to `"+F+"`, expected one of "+L+"."))}return x(D)}function $(E){function D(B,W,F,I,q){if(typeof E!="function")return new v("Property `"+q+"` of component `"+F+"` has invalid PropType notation inside objectOf.");var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type "+("`"+G+"` supplied to `"+F+"`, expected an object."));for(var L in Y)if(r(Y,L)){var j=E(Y,L,F,I,q+"."+L,n);if(j instanceof Error)return j}return null}return x(D)}function k(E){if(!Array.isArray(E))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var D=0;D<E.length;D++){var B=E[D];if(typeof B!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(B)+" at index "+D+"."),s}function W(F,I,q,Y,G){for(var L=[],j=0;j<E.length;j++){var H=E[j],O=H(F,I,q,Y,G,n);if(O==null)return null;O.data&&r(O.data,"expectedType")&&L.push(O.data.expectedType)}var Q=L.length>0?", expected one of type ["+L.join(", ")+"]":"";return new v("Invalid "+Y+" `"+G+"` supplied to "+("`"+q+"`"+Q+"."))}return x(W)}function C(){function E(D,B,W,F,I){return R(D[B])?null:new v("Invalid "+F+" `"+I+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return x(E)}function P(E,D,B,W,F){return new v((E||"React class")+": "+D+" type `"+B+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+F+"`.")}function N(E){function D(B,W,F,I,q){var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));for(var L in E){var j=E[L];if(typeof j!="function")return P(F,I,q,L,Z(j));var H=j(Y,L,F,I,q+"."+L,n);if(H)return H}return null}return x(D)}function A(E){function D(B,W,F,I,q){var Y=B[W],G=U(Y);if(G!=="object")return new v("Invalid "+I+" `"+q+"` of type `"+G+"` "+("supplied to `"+F+"`, expected `object`."));var L=t({},B[W],E);for(var j in L){var H=E[j];if(r(E,j)&&typeof H!="function")return P(F,I,q,j,Z(H));if(!H)return new v("Invalid "+I+" `"+q+"` key `"+j+"` supplied to `"+F+"`.\nBad object: "+JSON.stringify(B[W],null," ")+`
20
+ Valid keys: `+JSON.stringify(Object.keys(E),null," "));var O=H(Y,j,F,I,q+"."+j,n);if(O)return O}return null}return x(D)}function R(E){switch(typeof E){case"number":case"string":case"undefined":return!0;case"boolean":return!E;case"object":if(Array.isArray(E))return E.every(R);if(E===null||o(E))return!0;var D=f(E);if(D){var B=D.call(E),W;if(D!==E.entries){for(;!(W=B.next()).done;)if(!R(W.value))return!1}else for(;!(W=B.next()).done;){var F=W.value;if(F&&!R(F[1]))return!1}}else return!1;return!0;default:return!1}}function X(E,D){return E==="symbol"?!0:D?D["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&D instanceof Symbol:!1}function U(E){var D=typeof E;return Array.isArray(E)?"array":E instanceof RegExp?"object":X(D,E)?"symbol":D}function Z(E){if(typeof E>"u"||E===null)return""+E;var D=U(E);if(D==="object"){if(E instanceof Date)return"date";if(E instanceof RegExp)return"regexp"}return D}function ee(E){var D=Z(E);switch(D){case"array":case"object":return"an "+D;case"boolean":case"date":case"regexp":return"a "+D;default:return D}}function K(E){return!E.constructor||!E.constructor.name?h:E.constructor.name}return p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},gi}var yi,ys;function rd(){if(ys)return yi;ys=1;var e=pi();function t(){}function n(){}return n.resetWarningCache=t,yi=function(){function r(s,o,l,u,c,f){if(f!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},yi}if(process.env.NODE_ENV!=="production"){var id=fs(),ad=!0;fi.exports=nd()(id.isElement,ad)}else fi.exports=rd()();var er=fi.exports;const w=Dt(er);var bs={exports:{}};/*!
21
+ Copyright (c) 2018 Jed Watson.
22
+ Licensed under the MIT License (MIT), see
23
+ http://jedwatson.github.io/classnames
24
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(i=a(i,r(o)))}return i}function r(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var o in i)t.call(i,o)&&i[o]&&(s=a(s,o));return s}function a(i,s){return s?i?i+" "+s:i+s:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(bs);var nn=bs.exports;const ve=Dt(nn);var od=["top","left","transform","className","children","innerRef"];function bi(){return bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bi.apply(this,arguments)}function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function rn(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=sd(e,od);return m.createElement("g",bi({ref:l,className:ve("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}rn.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};var xi=Math.PI,_i=2*xi,vt=1e-6,ld=_i-vt;function wi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zt(){return new wi}wi.prototype=zt.prototype={constructor:wi,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(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,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,a,i){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+i)},arcTo:function(e,t,n,r,a){e=+e,t=+t,n=+n,r=+r,a=+a;var i=this._x1,s=this._y1,o=n-e,l=r-t,u=i-e,c=s-t,f=u*u+c*c;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>vt)if(!(Math.abs(c*o-l*u)>vt)||!a)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var h=n-i,p=r-s,d=o*o+l*l,v=h*h+p*p,x=Math.sqrt(d),g=Math.sqrt(f),b=a*Math.tan((xi-Math.acos((d+f-v)/(2*x*g)))/2),_=b/g,M=b/x;Math.abs(_-1)>vt&&(this._+="L"+(e+_*u)+","+(t+_*c)),this._+="A"+a+","+a+",0,0,"+ +(c*h>u*p)+","+(this._x1=e+M*o)+","+(this._y1=t+M*l)}},arc:function(e,t,n,r,a,i){e=+e,t=+t,n=+n,i=!!i;var s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,u=t+o,c=1^i,f=i?r-a:a-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>vt||Math.abs(this._y1-u)>vt)&&(this._+="L"+l+","+u),n&&(f<0&&(f=f%_i+_i),f>ld?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):f>vt&&(this._+="A"+n+","+n+",0,"+ +(f>=xi)+","+c+","+(this._x1=e+n*Math.cos(a))+","+(this._y1=t+n*Math.sin(a))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function J(e){return function(){return e}}var xs=Math.abs,me=Math.atan2,mt=Math.cos,ud=Math.max,Si=Math.min,Ie=Math.sin,jt=Math.sqrt,ge=1e-12,nt=Math.PI,tr=nt/2,rt=2*nt;function cd(e){return e>1?0:e<-1?nt:Math.acos(e)}function _s(e){return e>=1?tr:e<=-1?-tr:Math.asin(e)}function fd(e){return e.innerRadius}function hd(e){return e.outerRadius}function dd(e){return e.startAngle}function pd(e){return e.endAngle}function vd(e){return e&&e.padAngle}function md(e,t,n,r,a,i,s,o){var l=n-e,u=r-t,c=s-a,f=o-i,h=f*l-c*u;if(!(h*h<ge))return h=(c*(t-i)-f*(e-a))/h,[e+h*l,t+h*u]}function nr(e,t,n,r,a,i,s){var o=e-n,l=t-r,u=(s?i:-i)/jt(o*o+l*l),c=u*l,f=-u*o,h=e+c,p=t+f,d=n+c,v=r+f,x=(h+d)/2,g=(p+v)/2,b=d-h,_=v-p,M=b*b+_*_,y=a-i,S=h*v-d*p,T=(_<0?-1:1)*jt(ud(0,y*y*M-S*S)),$=(S*_-b*T)/M,k=(-S*b-_*T)/M,C=(S*_+b*T)/M,P=(-S*b+_*T)/M,N=$-x,A=k-g,R=C-x,X=P-g;return N*N+A*A>R*R+X*X&&($=C,k=P),{cx:$,cy:k,x01:-c,y01:-f,x11:$*(a/y-1),y11:k*(a/y-1)}}function gd(){var e=fd,t=hd,n=J(0),r=null,a=dd,i=pd,s=vd,o=null;function l(){var u,c,f=+e.apply(this,arguments),h=+t.apply(this,arguments),p=a.apply(this,arguments)-tr,d=i.apply(this,arguments)-tr,v=xs(d-p),x=d>p;if(o||(o=u=zt()),h<f&&(c=h,h=f,f=c),!(h>ge))o.moveTo(0,0);else if(v>rt-ge)o.moveTo(h*mt(p),h*Ie(p)),o.arc(0,0,h,p,d,!x),f>ge&&(o.moveTo(f*mt(d),f*Ie(d)),o.arc(0,0,f,d,p,x));else{var g=p,b=d,_=p,M=d,y=v,S=v,T=s.apply(this,arguments)/2,$=T>ge&&(r?+r.apply(this,arguments):jt(f*f+h*h)),k=Si(xs(h-f)/2,+n.apply(this,arguments)),C=k,P=k,N,A;if($>ge){var R=_s($/f*Ie(T)),X=_s($/h*Ie(T));(y-=R*2)>ge?(R*=x?1:-1,_+=R,M-=R):(y=0,_=M=(p+d)/2),(S-=X*2)>ge?(X*=x?1:-1,g+=X,b-=X):(S=0,g=b=(p+d)/2)}var U=h*mt(g),Z=h*Ie(g),ee=f*mt(M),K=f*Ie(M);if(k>ge){var E=h*mt(b),D=h*Ie(b),B=f*mt(_),W=f*Ie(_),F;if(v<nt&&(F=md(U,Z,B,W,E,D,ee,K))){var I=U-F[0],q=Z-F[1],Y=E-F[0],G=D-F[1],L=1/Ie(cd((I*Y+q*G)/(jt(I*I+q*q)*jt(Y*Y+G*G)))/2),j=jt(F[0]*F[0]+F[1]*F[1]);C=Si(k,(f-j)/(L-1)),P=Si(k,(h-j)/(L+1))}}S>ge?P>ge?(N=nr(B,W,U,Z,h,P,x),A=nr(E,D,ee,K,h,P,x),o.moveTo(N.cx+N.x01,N.cy+N.y01),P<k?o.arc(N.cx,N.cy,P,me(N.y01,N.x01),me(A.y01,A.x01),!x):(o.arc(N.cx,N.cy,P,me(N.y01,N.x01),me(N.y11,N.x11),!x),o.arc(0,0,h,me(N.cy+N.y11,N.cx+N.x11),me(A.cy+A.y11,A.cx+A.x11),!x),o.arc(A.cx,A.cy,P,me(A.y11,A.x11),me(A.y01,A.x01),!x))):(o.moveTo(U,Z),o.arc(0,0,h,g,b,!x)):o.moveTo(U,Z),!(f>ge)||!(y>ge)?o.lineTo(ee,K):C>ge?(N=nr(ee,K,E,D,f,-C,x),A=nr(U,Z,B,W,f,-C,x),o.lineTo(N.cx+N.x01,N.cy+N.y01),C<k?o.arc(N.cx,N.cy,C,me(N.y01,N.x01),me(A.y01,A.x01),!x):(o.arc(N.cx,N.cy,C,me(N.y01,N.x01),me(N.y11,N.x11),!x),o.arc(0,0,f,me(N.cy+N.y11,N.cx+N.x11),me(A.cy+A.y11,A.cx+A.x11),x),o.arc(A.cx,A.cy,C,me(A.y11,A.x11),me(A.y01,A.x01),!x))):o.arc(0,0,f,M,_,x)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-nt/2;return[mt(c)*u,Ie(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:J(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:J(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:J(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:J(+u),l):r},l.startAngle=function(u){return arguments.length?(a=typeof u=="function"?u:J(+u),l):a},l.endAngle=function(u){return arguments.length?(i=typeof u=="function"?u:J(+u),l):i},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:J(+u),l):s},l.context=function(u){return arguments.length?(o=u??null,l):o},l}function ws(e){this._context=e}ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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);break}}};function rr(e){return new ws(e)}function Ti(e){return e[0]}function Oi(e){return e[1]}function ki(){var e=Ti,t=Oi,n=J(!0),r=null,a=rr,i=null;function s(o){var l,u=o.length,c,f=!1,h;for(r==null&&(i=a(h=zt())),l=0;l<=u;++l)!(l<u&&n(c=o[l],l,o))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,o),+t(c,l,o));if(h)return i=null,h+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:J(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:J(!!o),s):n},s.curve=function(o){return arguments.length?(a=o,r!=null&&(i=a(r)),s):a},s.context=function(o){return arguments.length?(o==null?r=i=null:i=a(r=o),s):r},s}function Ss(){var e=Ti,t=null,n=J(0),r=Oi,a=J(!0),i=null,s=rr,o=null;function l(c){var f,h,p,d=c.length,v,x=!1,g,b=new Array(d),_=new Array(d);for(i==null&&(o=s(g=zt())),f=0;f<=d;++f){if(!(f<d&&a(v=c[f],f,c))===x)if(x=!x)h=f,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=f-1;p>=h;--p)o.point(b[p],_[p]);o.lineEnd(),o.areaEnd()}x&&(b[f]=+e(v,f,c),_[f]=+n(v,f,c),o.point(t?+t(v,f,c):b[f],r?+r(v,f,c):_[f]))}if(g)return o=null,g+""||null}function u(){return ki().defined(a).curve(s).context(i)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:J(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:J(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:J(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:J(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(a=typeof c=="function"?c:J(!!c),l):a},l.curve=function(c){return arguments.length?(s=c,i!=null&&(o=s(i)),l):s},l.context=function(c){return arguments.length?(c==null?i=o=null:o=s(i=c),l):i},l}function yd(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function bd(e){return e}function xd(){var e=bd,t=yd,n=null,r=J(0),a=J(rt),i=J(0);function s(o){var l,u=o.length,c,f,h=0,p=new Array(u),d=new Array(u),v=+r.apply(this,arguments),x=Math.min(rt,Math.max(-rt,a.apply(this,arguments)-v)),g,b=Math.min(Math.abs(x)/u,i.apply(this,arguments)),_=b*(x<0?-1:1),M;for(l=0;l<u;++l)(M=d[p[l]=l]=+e(o[l],l,o))>0&&(h+=M);for(t!=null?p.sort(function(y,S){return t(d[y],d[S])}):n!=null&&p.sort(function(y,S){return n(o[y],o[S])}),l=0,f=h?(x-u*_)/h:0;l<u;++l,v=g)c=p[l],M=d[c],g=v+(M>0?M*f:0)+_,d[c]={data:o[c],index:l,value:M,startAngle:v,endAngle:g,padAngle:b};return d}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:J(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:J(+o),s):i},s}var Ts=Mi(rr);function Os(e){this._curve=e}Os.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Mi(e){function t(n){return new Os(e(n))}return t._curve=e,t}function an(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Mi(n)):t()._curve},e}function ks(){return an(ki().curve(Ts))}function Ms(){var e=Ss().curve(Ts),t=e.curve,n=e.lineX0,r=e.lineX1,a=e.lineY0,i=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return an(n())},delete e.lineX0,e.lineEndAngle=function(){return an(r())},delete e.lineX1,e.lineInnerRadius=function(){return an(a())},delete e.lineY0,e.lineOuterRadius=function(){return an(i())},delete e.lineY1,e.curve=function(s){return arguments.length?t(Mi(s)):t()._curve},e}function on(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var $i=Array.prototype.slice;function _d(e){return e.source}function wd(e){return e.target}function Ci(e){var t=_d,n=wd,r=Ti,a=Oi,i=null;function s(){var o,l=$i.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(i||(i=o=zt()),e(i,+r.apply(this,(l[0]=u,l)),+a.apply(this,l),+r.apply(this,(l[0]=c,l)),+a.apply(this,l)),o)return i=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:J(+o),s):r},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:J(+o),s):a},s.context=function(o){return arguments.length?(i=o??null,s):i},s}function Sd(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,a,r,a)}function Td(e,t,n,r,a){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+a)/2,r,n,r,a)}function Od(e,t,n,r,a){var i=on(t,n),s=on(t,n=(n+a)/2),o=on(r,n),l=on(r,a);e.moveTo(i[0],i[1]),e.bezierCurveTo(s[0],s[1],o[0],o[1],l[0],l[1])}function kd(){return Ci(Sd)}function Md(){return Ci(Td)}function $d(){var e=Ci(Od);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const Ei={draw:function(e,t){var n=Math.sqrt(t/nt);e.moveTo(n,0),e.arc(0,0,n,0,rt)}},$s={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var Cs=Math.sqrt(1/3),Cd=Cs*2;const Es={draw:function(e,t){var n=Math.sqrt(t/Cd),r=n*Cs;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var Ed=.8908130915292852,Ps=Math.sin(nt/10)/Math.sin(7*nt/10),Pd=Math.sin(rt/10)*Ps,Nd=-Math.cos(rt/10)*Ps;const Ns={draw:function(e,t){var n=Math.sqrt(t*Ed),r=Pd*n,a=Nd*n;e.moveTo(0,-n),e.lineTo(r,a);for(var i=1;i<5;++i){var s=rt*i/5,o=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*a,l*r+o*a)}e.closePath()}},Ls={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var Pi=Math.sqrt(3);const As={draw:function(e,t){var n=-Math.sqrt(t/(Pi*3));e.moveTo(0,n*2),e.lineTo(-Pi*n,-n),e.lineTo(Pi*n,-n),e.closePath()}};var Me=-.5,$e=Math.sqrt(3)/2,Ni=1/Math.sqrt(12),Ld=(Ni/2+1)*3;const Ds={draw:function(e,t){var n=Math.sqrt(t/Ld),r=n/2,a=n*Ni,i=r,s=n*Ni+n,o=-i,l=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(Me*r-$e*a,$e*r+Me*a),e.lineTo(Me*i-$e*s,$e*i+Me*s),e.lineTo(Me*o-$e*l,$e*o+Me*l),e.lineTo(Me*r+$e*a,Me*a-$e*r),e.lineTo(Me*i+$e*s,Me*s-$e*i),e.lineTo(Me*o+$e*l,Me*l-$e*o),e.closePath()}};var Ad=[Ei,$s,Es,Ls,Ns,As,Ds];function Dd(){var e=J(Ei),t=J(64),n=null;function r(){var a;if(n||(n=a=zt()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return r.type=function(a){return arguments.length?(e=typeof a=="function"?a:J(a),r):e},r.size=function(a){return arguments.length?(t=typeof a=="function"?a:J(+a),r):t},r.context=function(a){return arguments.length?(n=a??null,r):n},r}function it(){}function ir(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 ar(e){this._context=e}ar.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:ir(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function zd(e){return new ar(e)}function zs(e){this._context=e}zs.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function jd(e){return new zs(e)}function js(e){this._context=e}js.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ir(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fd(e){return new js(e)}function Fs(e,t){this._basis=new ar(e),this._beta=t}Fs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],a=t[0],i=e[n]-r,s=t[n]-a,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*i),this._beta*t[o]+(1-this._beta)*(a+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Id=function e(t){function n(r){return t===1?new ar(r):new Fs(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function or(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 Li(e,t){this._context=e,this._k=(1-t)/6}Li.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:or(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Rd=function e(t){function n(r){return new Li(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Ai(e,t){this._context=e,this._k=(1-t)/6}Ai.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wd=function e(t){function n(r){return new Ai(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Di(e,t){this._context=e,this._k=(1-t)/6}Di.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:or(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Bd=function e(t){function n(r){return new Di(r,t)}return n.tension=function(r){return e(+r)},n}(0);function zi(e,t,n){var r=e._x1,a=e._y1,i=e._x2,s=e._y2;if(e._l01_a>ge){var o=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);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,a=(a*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>ge){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);i=(i*u+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,a,i,s,e._x2,e._y2)}function Is(e,t){this._context=e,this._alpha=t}Is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hd=function e(t){function n(r){return t?new Is(r,t):new Li(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Rs(e,t){this._context=e,this._alpha=t}Rs.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ud=function e(t){function n(r){return t?new Rs(r,t):new Ai(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Ws(e,t){this._context=e,this._alpha=t}Ws.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qd=function e(t){function n(r){return t?new Ws(r,t):new Di(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Bs(e){this._context=e}Bs.prototype={areaStart:it,areaEnd:it,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Yd(e){return new Bs(e)}function Hs(e){return e<0?-1:1}function Us(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),o=(i*a+s*r)/(r+a);return(Hs(i)+Hs(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function qs(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ji(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-r)/3;e._context.bezierCurveTo(r+o,a+o*t,i-o,s-o*n,i,s)}function sr(e){this._context=e}sr.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:ji(this,this._t0,qs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(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,ji(this,qs(this,n=Us(this,e,t)),n);break;default:ji(this,this._t0,n=Us(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ys(e){this._context=new Vs(e)}(Ys.prototype=Object.create(sr.prototype)).point=function(e,t){sr.prototype.point.call(this,t,e)};function Vs(e){this._context=e}Vs.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,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Vd(e){return new sr(e)}function Gd(e){return new Ys(e)}function Gs(e){this._context=e}Gs.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]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Ks(e),a=Ks(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&n===1)&&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)}};function Ks(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Kd(e){return new Gs(e)}function lr(e,t){this._context=e,this._t=t}lr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(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)}break}}this._x=e,this._y=t}};function Xd(e){return new lr(e,.5)}function Zd(e){return new lr(e,0)}function Qd(e){return new lr(e,1)}function gt(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,o=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<o;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function yt(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Jd(e,t){return e[t]}function Xs(){var e=J([]),t=yt,n=gt,r=Jd;function a(i){var s=e.apply(this,arguments),o,l=i.length,u=s.length,c=new Array(u),f;for(o=0;o<u;++o){for(var h=s[o],p=c[o]=new Array(l),d=0,v;d<l;++d)p[d]=v=[0,+r(i[d],h,d,i)],v.data=i[d];p.key=h}for(o=0,f=t(c);o<u;++o)c[f[o]].index=o;return n(c,f),c}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:J($i.call(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:J(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?yt:typeof i=="function"?i:J($i.call(i)),a):t},a.offset=function(i){return arguments.length?(n=i??gt,a):n},a}function Zs(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}gt(e,t)}}function Qs(e,t){if((l=e.length)>0)for(var n,r=0,a,i,s,o,l,u=e[t[0]].length;r<u;++r)for(s=o=0,n=0;n<l;++n)(i=(a=e[t[n]][r])[1]-a[0])>0?(a[0]=s,a[1]=s+=i):i<0?(a[1]=o,a[0]=o+=i):(a[0]=0,a[1]=i)}function Js(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,o=0;s<a;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}gt(e,t)}}function el(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var o=0,l=0,u=0;o<s;++o){for(var c=e[t[o]],f=c[r][1]||0,h=c[r-1][1]||0,p=(f-h)/2,d=0;d<o;++d){var v=e[t[d]],x=v[r][1]||0,g=v[r-1][1]||0;p+=x-g}l+=f,u+=p*f}a[r-1][1]+=a[r-1][0]=n,l&&(n-=u/l)}a[r-1][1]+=a[r-1][0]=n,gt(e,t)}}function tl(e){var t=e.map(ep);return yt(e).sort(function(n,r){return t[n]-t[r]})}function ep(e){for(var t=-1,n=0,r=e.length,a,i=-1/0;++t<r;)(a=+e[t][1])>i&&(i=a,n=t);return n}function Fi(e){var t=e.map(nl);return yt(e).sort(function(n,r){return t[n]-t[r]})}function nl(e){for(var t=0,n=-1,r=e.length,a;++n<r;)(a=+e[n][1])&&(t+=a);return t}function rl(e){return Fi(e).reverse()}function il(e){var t=e.length,n,r,a=e.map(nl),i=tl(e),s=0,o=0,l=[],u=[];for(n=0;n<t;++n)r=i[n],s<o?(s+=a[r],l.push(r)):(o+=a[r],u.push(r));return u.reverse().concat(l)}function al(e){return yt(e).reverse()}const tp=Object.freeze(Object.defineProperty({__proto__:null,arc:gd,area:Ss,areaRadial:Ms,curveBasis:zd,curveBasisClosed:jd,curveBasisOpen:Fd,curveBundle:Id,curveCardinal:Rd,curveCardinalClosed:Wd,curveCardinalOpen:Bd,curveCatmullRom:Hd,curveCatmullRomClosed:Ud,curveCatmullRomOpen:qd,curveLinear:rr,curveLinearClosed:Yd,curveMonotoneX:Vd,curveMonotoneY:Gd,curveNatural:Kd,curveStep:Xd,curveStepAfter:Qd,curveStepBefore:Zd,line:ki,lineRadial:ks,linkHorizontal:kd,linkRadial:$d,linkVertical:Md,pie:xd,pointRadial:on,radialArea:Ms,radialLine:ks,stack:Xs,stackOffsetDiverging:Qs,stackOffsetExpand:Zs,stackOffsetNone:gt,stackOffsetSilhouette:Js,stackOffsetWiggle:el,stackOrderAppearance:tl,stackOrderAscending:Fi,stackOrderDescending:rl,stackOrderInsideOut:il,stackOrderNone:yt,stackOrderReverse:al,symbol:Dd,symbolCircle:Ei,symbolCross:$s,symbolDiamond:Es,symbolSquare:Ls,symbolStar:Ns,symbolTriangle:As,symbolWye:Ds,symbols:Ad},Symbol.toStringTag,{value:"Module"}));function np(e,t){e(t)}var ol={ascending:Fi,descending:rl,insideout:il,none:yt,reverse:al};function rp(e){return e&&ol[e]||ol.none}var sl={expand:Zs,diverging:Qs,none:gt,silhouette:Js,wiggle:el};function ip(e){return e&&sl[e]||sl.none}var ap=["top","left","transform","className","children","innerRef"];function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ii.apply(this,arguments)}function op(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ge(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.transform,s=e.className,o=e.children,l=e.innerRef,u=op(e,ap);return m.createElement("g",Ii({ref:l,className:ve("visx-group",s),transform:i||"translate("+a+", "+n+")"},u),o)}Ge.propTypes={top:w.number,left:w.number,transform:w.string,className:w.string,children:w.node,innerRef:w.oneOfType([w.string,w.func,w.object])};const sp=Object.freeze(Object.defineProperty({__proto__:null,Group:Ge},Symbol.toStringTag,{value:"Module"}));var lp=["from","to","fill","className","innerRef"];function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ri.apply(this,arguments)}function up(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function ll(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=up(e,lp),c=n.x===a.x||n.y===a.y;return m.createElement("line",Ri({ref:l,className:ve("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}var cp=["className","innerRef"];function Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wi.apply(this,arguments)}function fp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function hp(e){var t=e.className,n=e.innerRef,r=fp(e,cp);return m.createElement("rect",Wi({ref:n,className:ve("visx-bar",t)},r))}var dp=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bi.apply(this,arguments)}function pp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function vp(e){var t=e.all,n=e.bottom,r=e.bottomLeft,a=e.bottomRight,i=e.height,s=e.left,o=e.radius,l=e.right,u=e.top,c=e.topLeft,f=e.topRight,h=e.width,p=e.x,d=e.y;f=t||u||l||f,a=t||n||l||a,r=t||n||s||r,c=t||u||s||c,o=Math.max(1,Math.min(o,Math.min(h,i)/2));var v=2*o,x=("M"+(p+o)+","+d+" h"+(h-v)+`
25
+ `+(f?"a"+o+","+o+" 0 0 1 "+o+","+o:"h"+o+"v"+o)+`
26
+ v`+(i-v)+`
27
+ `+(a?"a"+o+","+o+" 0 0 1 "+-o+","+o:"v"+o+"h"+-o)+`
28
+ h`+(v-h)+`
29
+ `+(r?"a"+o+","+o+" 0 0 1 "+-o+","+-o:"h"+-o+"v"+-o)+`
30
+ v`+(v-i)+`
31
+ `+(c?"a"+o+","+o+" 0 0 1 "+o+","+-o:"v"+-o+"h"+o)+`
32
+ z`).split(`
33
+ `).join("");return x}function ul(e){var t=e.children,n=e.className,r=e.innerRef,a=e.x,i=e.y,s=e.width,o=e.height,l=e.radius,u=e.all,c=u===void 0?!1:u,f=e.top,h=f===void 0?!1:f,p=e.bottom,d=p===void 0?!1:p,v=e.left,x=v===void 0?!1:v,g=e.right,b=g===void 0?!1:g,_=e.topLeft,M=_===void 0?!1:_,y=e.topRight,S=y===void 0?!1:y,T=e.bottomLeft,$=T===void 0?!1:T,k=e.bottomRight,C=k===void 0?!1:k,P=pp(e,dp),N=vp({x:a,y:i,width:s,height:o,radius:l,all:c,top:h,bottom:d,left:x,right:b,topLeft:M,topRight:S,bottomLeft:$,bottomRight:C});return t?m.createElement(m.Fragment,null,t({path:N})):m.createElement("path",Bi({ref:r,className:ve("visx-bar-rounded",n),d:N},P))}function mp(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}function gp(e){return e==null?void 0:e[0]}function yp(e){return e==null?void 0:e[1]}var bp=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hi.apply(this,arguments)}function xp(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _p(e){var t=e.data,n=e.className,r=e.top,a=e.left,i=e.y,s=e.x0,o=s===void 0?gp:s,l=e.x1,u=l===void 0?yp:l,c=e.xScale,f=e.yScale,h=e.color,p=e.keys,d=e.value,v=e.order,x=e.offset,g=e.children,b=xp(e,bp),_=Xs();p&&_.keys(p),d&&np(_.value,d),v&&_.order(rp(v)),x&&_.offset(ip(x));var M=_(t),y=mp(f),S=M.map(function(T,$){var k=T.key;return{index:$,key:k,bars:T.map(function(C,P){var N=(c(u(C))||0)-(c(o(C))||0),A=c(o(C)),R="bandwidth"in f?f(i(C.data)):Math.max((f(i(C.data))||0)-N/2);return{bar:C,key:k,index:P,height:y,width:N,x:A||0,y:R||0,color:h(T.key,P)}})}});return g?m.createElement(m.Fragment,null,g(S)):m.createElement(Ge,{className:ve("visx-bar-stack-horizontal",n),top:r,left:a},S.map(function(T){return T.bars.map(function($){return m.createElement(hp,Hi({key:"bar-stack-"+T.index+"-"+$.index,x:$.x,y:$.y,height:$.height,width:$.width,fill:$.color},b))})}))}function at(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wp(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ur(e){let t,n,r;e.length!==2?(t=at,n=(o,l)=>at(e(o),l),r=(o,l)=>e(o)-l):(t=e===at||e===wp?e:Sp,n=e,r=e);function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<0?u=f+1:c=f}while(u<c)}return u}function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const f=u+c>>>1;n(o[f],l)<=0?u=f+1:c=f}while(u<c)}return u}function s(o,l,u=0,c=o.length){const f=a(o,l,u,c-1);return f>u&&r(o[f-1],l)>-r(o[f],l)?f-1:f}return{left:a,center:s,right:i}}function Sp(){return 0}function cl(e){return e===null?NaN:+e}function*Tp(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const fl=ur(at),sn=fl.right,Op=fl.left;ur(cl).center;function hl(e,t){let n,r;for(const a of e)a!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)));return[n,r]}class dl extends Map{constructor(t,n=$p){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(pl(this,t))}has(t){return super.has(pl(this,t))}set(t,n){return super.set(kp(this,t),n)}delete(t){return super.delete(Mp(this,t))}}function pl({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function kp({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Mp({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function $p(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Cp(e=at){if(e===at)return vl;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function vl(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Ui=Math.sqrt(50),qi=Math.sqrt(10),Yi=Math.sqrt(2);function Vi(e,t,n){var r,a=-1,i,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),(o=ml(e,t,n))===0||!isFinite(o))return[];if(o>0){let l=Math.round(e/o),u=Math.round(t/o);for(l*o<e&&++l,u*o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)*o}else{o=-o;let l=Math.round(e*o),u=Math.round(t*o);for(l/o<e&&++l,u/o>t&&--u,s=new Array(i=u-l+1);++a<i;)s[a]=(l+a)/o}return r&&s.reverse(),s}function ml(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,a);return a>=0?(i>=Ui?10:i>=qi?5:i>=Yi?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(i>=Ui?10:i>=qi?5:i>=Yi?2:1)}function Gi(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/a;return i>=Ui?a*=10:i>=qi?a*=5:i>=Yi&&(a*=2),t<e?-a:a}function gl(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function yl(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function bl(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?vl:Cp(a);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/l+h)),d=Math.min(r,Math.floor(t+(l-u)*f/l+h));bl(e,t,p,d,a)}const i=e[t];let s=n,o=r;for(ln(e,n,t),a(e[r],i)>0&&ln(e,n,r);s<o;){for(ln(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[n],i)===0?ln(e,n,o):(++o,ln(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function ln(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ep(e,t,n){if(e=Float64Array.from(Tp(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return yl(e);if(t>=1)return gl(e);var r,a=(r-1)*t,i=Math.floor(a),s=gl(bl(e,i).subarray(0,i+1)),o=yl(e.subarray(i+1));return s+(o-s)*(a-i)}}function Pp(e,t,n=cl){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),o=+n(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function xl(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Ce(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ke(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Ki=Symbol("implicit");function cr(){var e=new dl,t=[],n=[],r=Ki;function a(i){let s=e.get(i);if(s===void 0){if(r!==Ki)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new dl;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return cr(t,n).unknown(r)},Ce.apply(a,arguments),a}function fr(){var e=cr().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,o=!1,l=0,u=0,c=.5;delete e.unknown;function f(){var h=t().length,p=a<r,d=p?a:r,v=p?r:a;i=(v-d)/Math.max(1,h-l+u*2),o&&(i=Math.floor(i)),d+=(v-d-i*(h-l))*c,s=i*(1-l),o&&(d=Math.round(d),s=Math.round(s));var x=xl(h).map(function(g){return d+i*g});return n(p?x.reverse():x)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([r,a]=h,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(h){return[r,a]=h,r=+r,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),f()):c},e.copy=function(){return fr(t(),[r,a]).round(o).paddingInner(l).paddingOuter(u).align(c)},Ce.apply(f(),arguments)}function _l(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return _l(t())},e}function wl(){return _l(fr.apply(null,arguments).paddingInner(1))}function Ft(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function un(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ot(){}var bt=.7,It=1/bt,Rt="\\s*([+-]?\\d+)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Np=/^#([0-9a-f]{3,8})$/,Lp=new RegExp(`^rgb\\(${Rt},${Rt},${Rt}\\)$`),Ap=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Dp=new RegExp(`^rgba\\(${Rt},${Rt},${Rt},${cn}\\)$`),zp=new RegExp(`^rgba\\(${Re},${Re},${Re},${cn}\\)$`),jp=new RegExp(`^hsl\\(${cn},${Re},${Re}\\)$`),Fp=new RegExp(`^hsla\\(${cn},${Re},${Re},${cn}\\)$`),Sl={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};Ft(ot,fn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tl,formatHex:Tl,formatHex8:Ip,formatHsl:Rp,formatRgb:Ol,toString:Ol});function Tl(){return this.rgb().formatHex()}function Ip(){return this.rgb().formatHex8()}function Rp(){return El(this).formatHsl()}function Ol(){return this.rgb().formatRgb()}function fn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Np.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kl(t):n===3?new ce(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hr(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Lp.exec(e))?new ce(t[1],t[2],t[3],1):(t=Ap.exec(e))?new ce(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Dp.exec(e))?hr(t[1],t[2],t[3],t[4]):(t=zp.exec(e))?hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=jp.exec(e))?Cl(t[1],t[2]/100,t[3]/100,1):(t=Fp.exec(e))?Cl(t[1],t[2]/100,t[3]/100,t[4]):Sl.hasOwnProperty(e)?kl(Sl[e]):e==="transparent"?new ce(NaN,NaN,NaN,0):null}function kl(e){return new ce(e>>16&255,e>>8&255,e&255,1)}function hr(e,t,n,r){return r<=0&&(e=t=n=NaN),new ce(e,t,n,r)}function Xi(e){return e instanceof ot||(e=fn(e)),e?(e=e.rgb(),new ce(e.r,e.g,e.b,e.opacity)):new ce}function dr(e,t,n,r){return arguments.length===1?Xi(e):new ce(e,t,n,r??1)}function ce(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Ft(ce,dr,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new ce(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ce(xt(this.r),xt(this.g),xt(this.b),pr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ml,formatHex:Ml,formatHex8:Wp,formatRgb:$l,toString:$l}));function Ml(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function Wp(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function $l(){const e=pr(this.opacity);return`${e===1?"rgb(":"rgba("}${xt(this.r)}, ${xt(this.g)}, ${xt(this.b)}${e===1?")":`, ${e})`}`}function pr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=xt(e),(e<16?"0":"")+e.toString(16)}function Cl(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ne(e,t,n,r)}function El(e){if(e instanceof Ne)return new Ne(e.h,e.s,e.l,e.opacity);if(e instanceof ot||(e=fn(e)),!e)return new Ne;if(e instanceof Ne)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(n-r)/o+(n<r)*6:n===i?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new Ne(s,o,l,e.opacity)}function Zi(e,t,n,r){return arguments.length===1?El(e):new Ne(e,t,n,r??1)}function Ne(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ft(Ne,Zi,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new Ne(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new Ne(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new ce(Qi(e>=240?e-240:e+120,a,r),Qi(e,a,r),Qi(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ne(Pl(this.h),vr(this.s),vr(this.l),pr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pr(this.opacity);return`${e===1?"hsl(":"hsla("}${Pl(this.h)}, ${vr(this.s)*100}%, ${vr(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Pl(e){return e=(e||0)%360,e<0?e+360:e}function vr(e){return Math.max(0,Math.min(1,e||0))}function Qi(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Nl=Math.PI/180,Ll=180/Math.PI,mr=18,Al=.96422,Dl=1,zl=.82521,jl=4/29,Wt=6/29,Fl=3*Wt*Wt,Bp=Wt*Wt*Wt;function Il(e){if(e instanceof We)return new We(e.l,e.a,e.b,e.opacity);if(e instanceof Xe)return Rl(e);e instanceof ce||(e=Xi(e));var t=ra(e.r),n=ra(e.g),r=ra(e.b),a=ea((.2225045*t+.7168786*n+.0606169*r)/Dl),i,s;return t===n&&n===r?i=s=a:(i=ea((.4360747*t+.3850649*n+.1430804*r)/Al),s=ea((.0139322*t+.0971045*n+.7141733*r)/zl)),new We(116*a-16,500*(i-a),200*(a-s),e.opacity)}function Ji(e,t,n,r){return arguments.length===1?Il(e):new We(e,t,n,r??1)}function We(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Ft(We,Ji,un(ot,{brighter(e){return new We(this.l+mr*(e??1),this.a,this.b,this.opacity)},darker(e){return new We(this.l-mr*(e??1),this.a,this.b,this.opacity)},rgb(){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 t=Al*ta(t),e=Dl*ta(e),n=zl*ta(n),new ce(na(3.1338561*t-1.6168667*e-.4906146*n),na(-.9787684*t+1.9161415*e+.033454*n),na(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ea(e){return e>Bp?Math.pow(e,1/3):e/Fl+jl}function ta(e){return e>Wt?e*e*e:Fl*(e-jl)}function na(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ra(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hp(e){if(e instanceof Xe)return new Xe(e.h,e.c,e.l,e.opacity);if(e instanceof We||(e=Il(e)),e.a===0&&e.b===0)return new Xe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ll;return new Xe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function ia(e,t,n,r){return arguments.length===1?Hp(e):new Xe(e,t,n,r??1)}function Xe(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Rl(e){if(isNaN(e.h))return new We(e.l,0,0,e.opacity);var t=e.h*Nl;return new We(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ft(Xe,ia,un(ot,{brighter(e){return new Xe(this.h,this.c,this.l+mr*(e??1),this.opacity)},darker(e){return new Xe(this.h,this.c,this.l-mr*(e??1),this.opacity)},rgb(){return Rl(this).rgb()}}));var Wl=-.14861,aa=1.78277,oa=-.29227,gr=-.90649,hn=1.97294,Bl=hn*gr,Hl=hn*aa,Ul=aa*oa-gr*Wl;function Up(e){if(e instanceof wt)return new wt(e.h,e.s,e.l,e.opacity);e instanceof ce||(e=Xi(e));var t=e.r/255,n=e.g/255,r=e.b/255,a=(Ul*r+Bl*t-Hl*n)/(Ul+Bl-Hl),i=r-a,s=(hn*(n-a)-oa*i)/gr,o=Math.sqrt(s*s+i*i)/(hn*a*(1-a)),l=o?Math.atan2(s,i)*Ll-120:NaN;return new wt(l<0?l+360:l,o,a,e.opacity)}function sa(e,t,n,r){return arguments.length===1?Up(e):new wt(e,t,n,r??1)}function wt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Ft(wt,sa,un(ot,{brighter(e){return e=e==null?It:Math.pow(It,e),new wt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bt:Math.pow(bt,e),new wt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Nl,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),a=Math.sin(e);return new ce(255*(t+n*(Wl*r+aa*a)),255*(t+n*(oa*r+gr*a)),255*(t+n*(hn*r)),this.opacity)}}));function ql(e,t,n,r,a){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*a)/6}function Yl(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),a=e[r],i=e[r+1],s=r>0?e[r-1]:2*a-i,o=r<t-1?e[r+2]:2*i-a;return ql((n-r/t)*t,s,a,i,o)}}function Vl(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),a=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],o=e[(r+2)%t];return ql((n-r/t)*t,a,i,s,o)}}const yr=e=>()=>e;function Gl(e,t){return function(n){return e+n*t}}function qp(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function br(e,t){var n=t-e;return n?Gl(e,n>180||n<-180?n-360*Math.round(n/360):n):yr(isNaN(e)?t:e)}function Yp(e){return(e=+e)==1?fe:function(t,n){return n-t?qp(t,n,e):yr(isNaN(t)?n:t)}}function fe(e,t){var n=t-e;return n?Gl(e,n):yr(isNaN(e)?t:e)}const xr=function e(t){var n=Yp(t);function r(a,i){var s=n((a=dr(a)).r,(i=dr(i)).r),o=n(a.g,i.g),l=n(a.b,i.b),u=fe(a.opacity,i.opacity);return function(c){return a.r=s(c),a.g=o(c),a.b=l(c),a.opacity=u(c),a+""}}return r.gamma=e,r}(1);function Kl(e){return function(t){var n=t.length,r=new Array(n),a=new Array(n),i=new Array(n),s,o;for(s=0;s<n;++s)o=dr(t[s]),r[s]=o.r||0,a[s]=o.g||0,i[s]=o.b||0;return r=e(r),a=e(a),i=e(i),o.opacity=1,function(l){return o.r=r(l),o.g=a(l),o.b=i(l),o+""}}}var Vp=Kl(Yl),Gp=Kl(Vl);function la(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function Xl(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Kp(e,t){return(Xl(t)?la:Zl)(e,t)}function Zl(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=St(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(o){for(s=0;s<r;++s)i[s]=a[s](o);return i}}function Ql(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Le(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Jl(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=St(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var ua=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ca=new RegExp(ua.source,"g");function Xp(e){return function(){return e}}function Zp(e){return function(t){return e(t)+""}}function eu(e,t){var n=ua.lastIndex=ca.lastIndex=0,r,a,i,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=ua.exec(e))&&(a=ca.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),o[s]?o[s]+=i:o[++s]=i),(r=r[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Le(r,a)})),n=ca.lastIndex;return n<t.length&&(i=t.slice(n),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?Zp(l[0].x):Xp(t):(t=l.length,function(u){for(var c=0,f;c<t;++c)o[(f=l[c]).i]=f.x(u);return o.join("")})}function St(e,t){var n=typeof t,r;return t==null||n==="boolean"?yr(t):(n==="number"?Le:n==="string"?(r=fn(t))?(t=r,xr):eu:t instanceof fn?xr:t instanceof Date?Ql:Xl(t)?la:Array.isArray(t)?Zl:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Jl:Le)(e,t)}function Qp(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function Jp(e,t){var n=br(+e,+t);return function(r){var a=n(r);return a-360*Math.floor(a/360)}}function dn(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var tu=180/Math.PI,fa={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function nu(e,t,n,r,a,i){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*tu,skewX:Math.atan(l)*tu,scaleX:s,scaleY:o}}var _r;function ev(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?fa:nu(t.a,t.b,t.c,t.d,t.e,t.f)}function tv(e){return e==null||(_r||(_r=document.createElementNS("http://www.w3.org/2000/svg","g")),_r.setAttribute("transform",e),!(e=_r.transform.baseVal.consolidate()))?fa:(e=e.matrix,nu(e.a,e.b,e.c,e.d,e.e,e.f))}function ru(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push("translate(",null,t,null,n);d.push({i:v-4,x:Le(u,f)},{i:v-2,x:Le(c,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function s(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Le(u,c)})):c&&f.push(a(f)+"rotate("+c+r)}function o(u,c,f,h){u!==c?h.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Le(u,c)}):c&&f.push(a(f)+"skewX("+c+r)}function l(u,c,f,h,p,d){if(u!==f||c!==h){var v=p.push(a(p)+"scale(",null,",",null,")");d.push({i:v-4,x:Le(u,f)},{i:v-2,x:Le(c,h)})}else(f!==1||h!==1)&&p.push(a(p)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,h),s(u.rotate,c.rotate,f,h),o(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(p){for(var d=-1,v=h.length,x;++d<v;)f[(x=h[d]).i]=x.x(p);return f.join("")}}}var nv=ru(ev,"px, ","px)","deg)"),rv=ru(tv,", ",")",")"),iv=1e-12;function iu(e){return((e=Math.exp(e))+1/e)/2}function av(e){return((e=Math.exp(e))-1/e)/2}function ov(e){return((e=Math.exp(2*e))-1)/(e+1)}const sv=function e(t,n,r){function a(i,s){var o=i[0],l=i[1],u=i[2],c=s[0],f=s[1],h=s[2],p=c-o,d=f-l,v=p*p+d*d,x,g;if(v<iv)g=Math.log(h/u)/t,x=function(T){return[o+T*p,l+T*d,u*Math.exp(t*T*g)]};else{var b=Math.sqrt(v),_=(h*h-u*u+r*v)/(2*u*n*b),M=(h*h-u*u-r*v)/(2*h*n*b),y=Math.log(Math.sqrt(_*_+1)-_),S=Math.log(Math.sqrt(M*M+1)-M);g=(S-y)/t,x=function(T){var $=T*g,k=iu(y),C=u/(n*b)*(k*ov(t*$+y)-av(y));return[o+C*p,l+C*d,u*k/iu(t*$+y)]}}return x.duration=g*1e3*t/Math.SQRT2,x}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,l=o*o;return e(s,o,l)},a}(Math.SQRT2,2,4);function au(e){return function(t,n){var r=e((t=Zi(t)).h,(n=Zi(n)).h),a=fe(t.s,n.s),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.s=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const ou=au(br);var su=au(fe);function lu(e,t){var n=fe((e=Ji(e)).l,(t=Ji(t)).l),r=fe(e.a,t.a),a=fe(e.b,t.b),i=fe(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=a(s),e.opacity=i(s),e+""}}function uu(e){return function(t,n){var r=e((t=ia(t)).h,(n=ia(n)).h),a=fe(t.c,n.c),i=fe(t.l,n.l),s=fe(t.opacity,n.opacity);return function(o){return t.h=r(o),t.c=a(o),t.l=i(o),t.opacity=s(o),t+""}}}const cu=uu(br);var fu=uu(fe);function hu(e){return function t(n){n=+n;function r(a,i){var s=e((a=sa(a)).h,(i=sa(i)).h),o=fe(a.s,i.s),l=fe(a.l,i.l),u=fe(a.opacity,i.opacity);return function(c){return a.h=s(c),a.s=o(c),a.l=l(Math.pow(c,n)),a.opacity=u(c),a+""}}return r.gamma=t,r}(1)}const du=hu(br);var pu=hu(fe);function vu(e,t){t===void 0&&(t=e,e=St);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[o](s-o)}}function lv(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function uv(e){return function(){return e}}function wr(e){return+e}var mu=[0,1];function ye(e){return e}function ha(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:uv(isNaN(t)?NaN:.5)}function cv(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function fv(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=ha(a,r),i=n(s,i)):(r=ha(r,a),i=n(i,s)),function(o){return i(r(o))}}function hv(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=ha(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(o){var l=sn(e,o,1,r)-1;return i[l](a[l](o))}}function pn(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Sr(){var e=mu,t=mu,n=St,r,a,i,s=ye,o,l,u;function c(){var h=Math.min(e.length,t.length);return s!==ye&&(s=cv(e[0],e[h-1])),o=h>2?hv:fv,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(r),t,n)))(r(s(h)))}return f.invert=function(h){return s(a((u||(u=o(t,e.map(r),Le)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,wr),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=dn,c()},f.clamp=function(h){return arguments.length?(s=h?!0:ye,c()):s!==ye},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return r=h,a=p,c()}}function da(){return Sr()(ye,ye)}function dv(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Bt(e){return e=Tr(Math.abs(e)),e?e[1]:NaN}function pv(e,t){return function(n,r){for(var a=n.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),i.push(n.substring(a-=o,a+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function vv(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vn(e){if(!(t=mv.exec(e)))throw new Error("invalid format: "+e);var t;return new pa({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]})}vn.prototype=pa.prototype;function pa(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}pa.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gv(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var gu;function yv(e,t){var n=Tr(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(gu=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Tr(e,Math.max(0,t+i-1))[0]}function yu(e,t){var n=Tr(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const bu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:dv,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>yu(e*100,t),r:yu,s:yv,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function xu(e){return e}var _u=Array.prototype.map,wu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bv(e){var t=e.grouping===void 0||e.thousands===void 0?xu:pv(_u.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?xu:vv(_u.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=vn(f);var h=f.fill,p=f.align,d=f.sign,v=f.symbol,x=f.zero,g=f.width,b=f.comma,_=f.precision,M=f.trim,y=f.type;y==="n"?(b=!0,y="g"):bu[y]||(_===void 0&&(_=12),M=!0,y="g"),(x||h==="0"&&p==="=")&&(x=!0,h="0",p="=");var S=v==="$"?n:v==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",T=v==="$"?r:/[%p]/.test(y)?s:"",$=bu[y],k=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function C(P){var N=S,A=T,R,X,U;if(y==="c")A=$(P)+A,P="";else{P=+P;var Z=P<0||1/P<0;if(P=isNaN(P)?l:$(Math.abs(P),_),M&&(P=gv(P)),Z&&+P==0&&d!=="+"&&(Z=!1),N=(Z?d==="("?d:o:d==="-"||d==="("?"":d)+N,A=(y==="s"?wu[8+gu/3]:"")+A+(Z&&d==="("?")":""),k){for(R=-1,X=P.length;++R<X;)if(U=P.charCodeAt(R),48>U||U>57){A=(U===46?a+P.slice(R+1):P.slice(R))+A,P=P.slice(0,R);break}}}b&&!x&&(P=t(P,1/0));var ee=N.length+P.length+A.length,K=ee<g?new Array(g-ee+1).join(h):"";switch(b&&x&&(P=t(K+P,K.length?g-A.length:1/0),K=""),p){case"<":P=N+P+A+K;break;case"=":P=N+K+P+A;break;case"^":P=K.slice(0,ee=K.length>>1)+N+P+A+K.slice(ee);break;default:P=K+N+P+A;break}return i(P)}return C.toString=function(){return f+""},C}function c(f,h){var p=u((f=vn(f),f.type="f",f)),d=Math.max(-8,Math.min(8,Math.floor(Bt(h)/3)))*3,v=Math.pow(10,-d),x=wu[8+d/3];return function(g){return p(v*g)+x}}return{format:u,formatPrefix:c}}var Or,va,Su;xv({thousands:",",grouping:[3],currency:["$",""]});function xv(e){return Or=bv(e),va=Or.format,Su=Or.formatPrefix,Or}function _v(e){return Math.max(0,-Bt(Math.abs(e)))}function wv(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Bt(t)/3)))*3-Bt(Math.abs(e)))}function Sv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Bt(t)-Bt(e))+1}function Tu(e,t,n,r){var a=Gi(e,t,n),i;switch(r=vn(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=wv(a,s))&&(r.precision=i),Su(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Sv(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=_v(a))&&(r.precision=i-(r.type==="%")*2);break}}return va(r)}function st(e){var t=e.domain;return e.ticks=function(n){var r=t();return Vi(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Tu(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],o=r[i],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=a,a=i,i=u);c-- >0;){if(u=ml(s,o,n),u===l)return r[a]=s,r[i]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function ma(){var e=da();return e.copy=function(){return pn(e,ma())},Ce.apply(e,arguments),st(e)}function Ou(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,wr),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Ou(e).unknown(t)},e=arguments.length?Array.from(e,wr):[0,1],st(n)}function ku(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function Mu(e){return Math.log(e)}function $u(e){return Math.exp(e)}function Tv(e){return-Math.log(-e)}function Ov(e){return-Math.exp(-e)}function kv(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Mv(e){return e===10?kv:e===Math.E?Math.exp:t=>Math.pow(e,t)}function $v(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Cu(e){return(t,n)=>-e(-t,n)}function ga(e){const t=e(Mu,$u),n=t.domain;let r=10,a,i;function s(){return a=$v(r),i=Mv(r),n()[0]<0?(a=Cu(a),i=Cu(i),e(Tv,Ov)):e(Mu,$u),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let u=l[0],c=l[l.length-1];const f=c<u;f&&([u,c]=[c,u]);let h=a(u),p=a(c),d,v;const x=o==null?10:+o;let g=[];if(!(r%1)&&p-h<x){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(d=1;d<r;++d)if(v=h<0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;g.push(v)}}else for(;h<=p;++h)for(d=r-1;d>=1;--d)if(v=h>0?d/i(-h):d*i(h),!(v<u)){if(v>c)break;g.push(v)}g.length*2<x&&(g=Vi(u,c,x))}else g=Vi(h,p,Math.min(p-h,x)).map(i);return f?g.reverse():g},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=vn(l)).precision==null&&(l.trim=!0),l=va(l)),o===1/0)return l;const u=Math.max(1,r*o/t.ticks().length);return c=>{let f=c/i(Math.round(a(c)));return f*r<r-.5&&(f*=r),f<=u?l(c):""}},t.nice=()=>n(ku(n(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function ya(){const e=ga(Sr()).domain([1,10]);return e.copy=()=>pn(e,ya()).base(e.base()),Ce.apply(e,arguments),e}function Eu(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Pu(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ba(e){var t=1,n=e(Eu(t),Pu(t));return n.constant=function(r){return arguments.length?e(Eu(t=+r),Pu(t)):t},st(n)}function xa(){var e=ba(Sr());return e.copy=function(){return pn(e,xa()).constant(e.constant())},Ce.apply(e,arguments)}function Nu(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Cv(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ev(e){return e<0?-e*e:e*e}function _a(e){var t=e(ye,ye),n=1;function r(){return n===1?e(ye,ye):n===.5?e(Cv,Ev):e(Nu(n),Nu(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},st(t)}function kr(){var e=_a(Sr());return e.copy=function(){return pn(e,kr()).exponent(e.exponent())},Ce.apply(e,arguments),e}function Lu(){return kr.apply(null,arguments).exponent(.5)}function Au(e){return Math.sign(e)*e*e}function Pv(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wa(){var e=da(),t=[0,1],n=!1,r;function a(i){var s=Pv(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(Au(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,wr)).map(Au)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return wa(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ce.apply(a,arguments),st(a)}function Sa(){var e=[],t=[],n=[],r;function a(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=Pp(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?r:t[sn(n,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(at),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return Sa().domain(e).range(t).unknown(r)},Ce.apply(i,arguments)}function Ta(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(l){return l!=null&&l<=l?a[sn(r,l,0,n)]:i}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(n=(a=Array.from(l)).length-1,o()):a.slice()},s.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return Ta().domain([e,t]).range(a).unknown(i)},Ce.apply(st(s),arguments)}function Oa(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[sn(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return Oa().domain(e).range(t).unknown(n)},Ce.apply(a,arguments)}const ka=new Date,Ma=new Date;function se(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return l;let u;do l.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return l},a.filter=i=>se(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(ka.setTime(+i),Ma.setTime(+s),e(ka),e(Ma),Math.floor(n(ka,Ma))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ht=se(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ht.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?se(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ht);const Du=Ht.range,Ze=1e3,Ee=Ze*60,Qe=Ee*60,Je=Qe*24,$a=Je*7,zu=Je*30,Ca=Je*365,Ae=se(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ze)},(e,t)=>(t-e)/Ze,e=>e.getUTCSeconds()),ju=Ae.range,mn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze)},(e,t)=>{e.setTime(+e+t*Ee)},(e,t)=>(t-e)/Ee,e=>e.getMinutes()),Nv=mn.range,gn=se(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ee)},(e,t)=>(t-e)/Ee,e=>e.getUTCMinutes()),Lv=gn.range,yn=se(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ze-e.getMinutes()*Ee)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getHours()),Av=yn.range,bn=se(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qe)},(e,t)=>(t-e)/Qe,e=>e.getUTCHours()),Dv=bn.range,Tt=se(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ee)/Je,e=>e.getDate()-1),zv=Tt.range,Ut=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>e.getUTCDate()-1),jv=Ut.range,Ea=se(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Je,e=>Math.floor(e/Je)),Fv=Ea.range;function Ot(e){return se(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ee)/$a)}const kt=Ot(0),xn=Ot(1),Fu=Ot(2),Iu=Ot(3),Mt=Ot(4),Ru=Ot(5),Wu=Ot(6),Bu=kt.range,Iv=xn.range,Rv=Fu.range,Wv=Iu.range,Bv=Mt.range,Hv=Ru.range,Uv=Wu.range;function $t(e){return se(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/$a)}const Ct=$t(0),_n=$t(1),Hu=$t(2),Uu=$t(3),Et=$t(4),qu=$t(5),Yu=$t(6),Vu=Ct.range,qv=_n.range,Yv=Hu.range,Vv=Uu.range,Gv=Et.range,Kv=qu.range,Xv=Yu.range,wn=se(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),Zv=wn.range,Sn=se(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),Qv=Sn.range,De=se(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const Jv=De.range,ze=se(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ze.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:se(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const em=ze.range;function Gu(e,t,n,r,a,i){const s=[[Ae,1,Ze],[Ae,5,5*Ze],[Ae,15,15*Ze],[Ae,30,30*Ze],[i,1,Ee],[i,5,5*Ee],[i,15,15*Ee],[i,30,30*Ee],[a,1,Qe],[a,3,3*Qe],[a,6,6*Qe],[a,12,12*Qe],[r,1,Je],[r,2,2*Je],[n,1,$a],[t,1,zu],[t,3,3*zu],[e,1,Ca]];function o(u,c,f){const h=c<u;h&&([u,c]=[c,u]);const p=f&&typeof f.range=="function"?f:l(u,c,f),d=p?p.range(u,+c+1):[];return h?d.reverse():d}function l(u,c,f){const h=Math.abs(c-u)/f,p=ur(([,,x])=>x).right(s,h);if(p===s.length)return e.every(Gi(u/Ca,c/Ca,f));if(p===0)return Ht.every(Math.max(Gi(u,c,f),1));const[d,v]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return d.every(v)}return[o,l]}const[Ku,Xu]=Gu(ze,Sn,Ct,Ea,bn,gn),[Zu,Qu]=Gu(De,wn,kt,Tt,yn,mn);function Pa(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 Na(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 Tn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function tm(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=On(a),c=kn(a),f=On(i),h=kn(i),p=On(s),d=kn(s),v=On(o),x=kn(o),g=On(l),b=kn(l),_={a:Z,A:ee,b:K,B:E,c:null,d:ic,e:ic,f:Tm,g:Am,G:zm,H:_m,I:wm,j:Sm,L:ac,m:Om,M:km,p:D,q:B,Q:fc,s:hc,S:Mm,u:$m,U:Cm,V:Em,w:Pm,W:Nm,x:null,X:null,y:Lm,Y:Dm,Z:jm,"%":cc},M={a:W,A:F,b:I,B:q,c:null,d:sc,e:sc,f:Wm,g:Zm,G:Jm,H:Fm,I:Im,j:Rm,L:lc,m:Bm,M:Hm,p:Y,q:G,Q:fc,s:hc,S:Um,u:qm,U:Ym,V:Vm,w:Gm,W:Km,x:null,X:null,y:Xm,Y:Qm,Z:eg,"%":cc},y={a:C,A:P,b:N,B:A,c:R,d:nc,e:nc,f:gm,g:tc,G:ec,H:rc,I:rc,j:dm,L:mm,m:hm,M:pm,p:k,q:fm,Q:bm,s:xm,S:vm,u:om,U:sm,V:lm,w:am,W:um,x:X,X:U,y:tc,Y:ec,Z:cm,"%":ym};_.x=S(n,_),_.X=S(r,_),_.c=S(t,_),M.x=S(n,M),M.X=S(r,M),M.c=S(t,M);function S(L,j){return function(H){var O=[],Q=-1,te=0,le=L.length,de,qe,oi;for(H instanceof Date||(H=new Date(+H));++Q<le;)L.charCodeAt(Q)===37&&(O.push(L.slice(te,Q)),(qe=Ju[de=L.charAt(++Q)])!=null?de=L.charAt(++Q):qe=de==="e"?" ":"0",(oi=j[de])&&(de=oi(H,qe)),O.push(de),te=Q+1);return O.push(L.slice(te,Q)),O.join("")}}function T(L,j){return function(H){var O=Tn(1900,void 0,1),Q=$(O,L,H+="",0),te,le;if(Q!=H.length)return null;if("Q"in O)return new Date(O.Q);if("s"in O)return new Date(O.s*1e3+("L"in O?O.L:0));if(j&&!("Z"in O)&&(O.Z=0),"p"in O&&(O.H=O.H%12+O.p*12),O.m===void 0&&(O.m="q"in O?O.q:0),"V"in O){if(O.V<1||O.V>53)return null;"w"in O||(O.w=1),"Z"in O?(te=Na(Tn(O.y,0,1)),le=te.getUTCDay(),te=le>4||le===0?_n.ceil(te):_n(te),te=Ut.offset(te,(O.V-1)*7),O.y=te.getUTCFullYear(),O.m=te.getUTCMonth(),O.d=te.getUTCDate()+(O.w+6)%7):(te=Pa(Tn(O.y,0,1)),le=te.getDay(),te=le>4||le===0?xn.ceil(te):xn(te),te=Tt.offset(te,(O.V-1)*7),O.y=te.getFullYear(),O.m=te.getMonth(),O.d=te.getDate()+(O.w+6)%7)}else("W"in O||"U"in O)&&("w"in O||(O.w="u"in O?O.u%7:"W"in O?1:0),le="Z"in O?Na(Tn(O.y,0,1)).getUTCDay():Pa(Tn(O.y,0,1)).getDay(),O.m=0,O.d="W"in O?(O.w+6)%7+O.W*7-(le+5)%7:O.w+O.U*7-(le+6)%7);return"Z"in O?(O.H+=O.Z/100|0,O.M+=O.Z%100,Na(O)):Pa(O)}}function $(L,j,H,O){for(var Q=0,te=j.length,le=H.length,de,qe;Q<te;){if(O>=le)return-1;if(de=j.charCodeAt(Q++),de===37){if(de=j.charAt(Q++),qe=y[de in Ju?j.charAt(Q++):de],!qe||(O=qe(L,H,O))<0)return-1}else if(de!=H.charCodeAt(O++))return-1}return O}function k(L,j,H){var O=u.exec(j.slice(H));return O?(L.p=c.get(O[0].toLowerCase()),H+O[0].length):-1}function C(L,j,H){var O=p.exec(j.slice(H));return O?(L.w=d.get(O[0].toLowerCase()),H+O[0].length):-1}function P(L,j,H){var O=f.exec(j.slice(H));return O?(L.w=h.get(O[0].toLowerCase()),H+O[0].length):-1}function N(L,j,H){var O=g.exec(j.slice(H));return O?(L.m=b.get(O[0].toLowerCase()),H+O[0].length):-1}function A(L,j,H){var O=v.exec(j.slice(H));return O?(L.m=x.get(O[0].toLowerCase()),H+O[0].length):-1}function R(L,j,H){return $(L,t,j,H)}function X(L,j,H){return $(L,n,j,H)}function U(L,j,H){return $(L,r,j,H)}function Z(L){return s[L.getDay()]}function ee(L){return i[L.getDay()]}function K(L){return l[L.getMonth()]}function E(L){return o[L.getMonth()]}function D(L){return a[+(L.getHours()>=12)]}function B(L){return 1+~~(L.getMonth()/3)}function W(L){return s[L.getUTCDay()]}function F(L){return i[L.getUTCDay()]}function I(L){return l[L.getUTCMonth()]}function q(L){return o[L.getUTCMonth()]}function Y(L){return a[+(L.getUTCHours()>=12)]}function G(L){return 1+~~(L.getUTCMonth()/3)}return{format:function(L){var j=S(L+="",_);return j.toString=function(){return L},j},parse:function(L){var j=T(L+="",!1);return j.toString=function(){return L},j},utcFormat:function(L){var j=S(L+="",M);return j.toString=function(){return L},j},utcParse:function(L){var j=T(L+="",!0);return j.toString=function(){return L},j}}}var Ju={"-":"",_:" ",0:"0"},he=/^\s*\d+/,nm=/^%/,rm=/[\\^$*+?|[\]().{}]/g;function ne(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function im(e){return e.replace(rm,"\\$&")}function On(e){return new RegExp("^(?:"+e.map(im).join("|")+")","i")}function kn(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function am(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function om(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function sm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function lm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function um(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ec(e,t,n){var r=he.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function cm(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function fm(e,t,n){var r=he.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function hm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function nc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function dm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function rc(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function pm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vm(e,t,n){var r=he.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function mm(e,t,n){var r=he.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function gm(e,t,n){var r=he.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ym(e,t,n){var r=nm.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function bm(e,t,n){var r=he.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xm(e,t,n){var r=he.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ic(e,t){return ne(e.getDate(),t,2)}function _m(e,t){return ne(e.getHours(),t,2)}function wm(e,t){return ne(e.getHours()%12||12,t,2)}function Sm(e,t){return ne(1+Tt.count(De(e),e),t,3)}function ac(e,t){return ne(e.getMilliseconds(),t,3)}function Tm(e,t){return ac(e,t)+"000"}function Om(e,t){return ne(e.getMonth()+1,t,2)}function km(e,t){return ne(e.getMinutes(),t,2)}function Mm(e,t){return ne(e.getSeconds(),t,2)}function $m(e){var t=e.getDay();return t===0?7:t}function Cm(e,t){return ne(kt.count(De(e)-1,e),t,2)}function oc(e){var t=e.getDay();return t>=4||t===0?Mt(e):Mt.ceil(e)}function Em(e,t){return e=oc(e),ne(Mt.count(De(e),e)+(De(e).getDay()===4),t,2)}function Pm(e){return e.getDay()}function Nm(e,t){return ne(xn.count(De(e)-1,e),t,2)}function Lm(e,t){return ne(e.getFullYear()%100,t,2)}function Am(e,t){return e=oc(e),ne(e.getFullYear()%100,t,2)}function Dm(e,t){return ne(e.getFullYear()%1e4,t,4)}function zm(e,t){var n=e.getDay();return e=n>=4||n===0?Mt(e):Mt.ceil(e),ne(e.getFullYear()%1e4,t,4)}function jm(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ne(t/60|0,"0",2)+ne(t%60,"0",2)}function sc(e,t){return ne(e.getUTCDate(),t,2)}function Fm(e,t){return ne(e.getUTCHours(),t,2)}function Im(e,t){return ne(e.getUTCHours()%12||12,t,2)}function Rm(e,t){return ne(1+Ut.count(ze(e),e),t,3)}function lc(e,t){return ne(e.getUTCMilliseconds(),t,3)}function Wm(e,t){return lc(e,t)+"000"}function Bm(e,t){return ne(e.getUTCMonth()+1,t,2)}function Hm(e,t){return ne(e.getUTCMinutes(),t,2)}function Um(e,t){return ne(e.getUTCSeconds(),t,2)}function qm(e){var t=e.getUTCDay();return t===0?7:t}function Ym(e,t){return ne(Ct.count(ze(e)-1,e),t,2)}function uc(e){var t=e.getUTCDay();return t>=4||t===0?Et(e):Et.ceil(e)}function Vm(e,t){return e=uc(e),ne(Et.count(ze(e),e)+(ze(e).getUTCDay()===4),t,2)}function Gm(e){return e.getUTCDay()}function Km(e,t){return ne(_n.count(ze(e)-1,e),t,2)}function Xm(e,t){return ne(e.getUTCFullYear()%100,t,2)}function Zm(e,t){return e=uc(e),ne(e.getUTCFullYear()%100,t,2)}function Qm(e,t){return ne(e.getUTCFullYear()%1e4,t,4)}function Jm(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Et(e):Et.ceil(e),ne(e.getUTCFullYear()%1e4,t,4)}function eg(){return"+0000"}function cc(){return"%"}function fc(e){return+e}function hc(e){return Math.floor(+e/1e3)}var qt,dc,pc;tg({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tg(e){return qt=tm(e),dc=qt.format,qt.parse,pc=qt.utcFormat,qt.utcParse,qt}function ng(e){return new Date(e)}function rg(e){return e instanceof Date?+e:+new Date(+e)}function La(e,t,n,r,a,i,s,o,l,u){var c=da(),f=c.invert,h=c.domain,p=u(".%L"),d=u(":%S"),v=u("%I:%M"),x=u("%I %p"),g=u("%a %d"),b=u("%b %d"),_=u("%B"),M=u("%Y");function y(S){return(l(S)<S?p:o(S)<S?d:s(S)<S?v:i(S)<S?x:r(S)<S?a(S)<S?g:b:n(S)<S?_:M)(S)}return c.invert=function(S){return new Date(f(S))},c.domain=function(S){return arguments.length?h(Array.from(S,rg)):h().map(ng)},c.ticks=function(S){var T=h();return e(T[0],T[T.length-1],S??10)},c.tickFormat=function(S,T){return T==null?y:u(T)},c.nice=function(S){var T=h();return(!S||typeof S.range!="function")&&(S=t(T[0],T[T.length-1],S??10)),S?h(ku(T,S)):c},c.copy=function(){return pn(c,La(e,t,n,r,a,i,s,o,l,u))},c}function vc(){return Ce.apply(La(Zu,Qu,De,wn,kt,Tt,yn,mn,Ae,dc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function mc(){return Ce.apply(La(Ku,Xu,ze,Sn,Ct,Ut,bn,gn,Ae,pc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Mr(){var e=0,t=1,n,r,a,i,s=ye,o=!1,l;function u(f){return f==null||isNaN(f=+f)?l:s(a===0?.5:(f=(i(f)-n)*a,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(s=f,u):s};function c(f){return function(h){var p,d;return arguments.length?([p,d]=h,s=f(p,d),u):[s(0),s(1)]}}return u.range=c(St),u.rangeRound=c(dn),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),u}}function lt(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function gc(){var e=st(Mr()(ye));return e.copy=function(){return lt(e,gc())},Ke.apply(e,arguments)}function yc(){var e=ga(Mr()).domain([1,10]);return e.copy=function(){return lt(e,yc()).base(e.base())},Ke.apply(e,arguments)}function bc(){var e=ba(Mr());return e.copy=function(){return lt(e,bc()).constant(e.constant())},Ke.apply(e,arguments)}function Aa(){var e=_a(Mr());return e.copy=function(){return lt(e,Aa()).exponent(e.exponent())},Ke.apply(e,arguments)}function ig(){return Aa.apply(null,arguments).exponent(.5)}function xc(){var e=[],t=ye;function n(r){if(r!=null&&!isNaN(r=+r))return t((sn(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(at),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Ep(e,i/r))},n.copy=function(){return xc(t).domain(e)},Ke.apply(n,arguments)}function $r(){var e=0,t=.5,n=1,r=1,a,i,s,o,l,u=ye,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-i)*(r*v<r*i?o:l),u(f?Math.max(0,Math.min(1,v)):v))}p.domain=function(v){return arguments.length?([e,t,n]=v,a=c(e=+e),i=c(t=+t),s=c(n=+n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(v){return arguments.length?(f=!!v,p):f},p.interpolator=function(v){return arguments.length?(u=v,p):u};function d(v){return function(x){var g,b,_;return arguments.length?([g,b,_]=x,u=vu(v,[g,b,_]),p):[u(0),u(.5),u(1)]}}return p.range=d(St),p.rangeRound=d(dn),p.unknown=function(v){return arguments.length?(h=v,p):h},function(v){return c=v,a=v(e),i=v(t),s=v(n),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),r=i<a?-1:1,p}}function _c(){var e=st($r()(ye));return e.copy=function(){return lt(e,_c())},Ke.apply(e,arguments)}function wc(){var e=ga($r()).domain([.1,1,10]);return e.copy=function(){return lt(e,wc()).base(e.base())},Ke.apply(e,arguments)}function Sc(){var e=ba($r());return e.copy=function(){return lt(e,Sc()).constant(e.constant())},Ke.apply(e,arguments)}function Da(){var e=_a($r());return e.copy=function(){return lt(e,Da()).exponent(e.exponent())},Ke.apply(e,arguments)}function ag(){return Da.apply(null,arguments).exponent(.5)}const og=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:fr,scaleDiverging:_c,scaleDivergingLog:wc,scaleDivergingPow:Da,scaleDivergingSqrt:ag,scaleDivergingSymlog:Sc,scaleIdentity:Ou,scaleImplicit:Ki,scaleLinear:ma,scaleLog:ya,scaleOrdinal:cr,scalePoint:wl,scalePow:kr,scaleQuantile:Sa,scaleQuantize:Ta,scaleRadial:wa,scaleSequential:gc,scaleSequentialLog:yc,scaleSequentialPow:Aa,scaleSequentialQuantile:xc,scaleSequentialSqrt:ig,scaleSequentialSymlog:bc,scaleSqrt:Lu,scaleSymlog:xa,scaleThreshold:Oa,scaleTime:vc,scaleUtc:mc,tickFormat:Tu},Symbol.toStringTag,{value:"Module"}));function sg(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function lg(e,t){t.range&&("padding"in e,e.range(t.range))}function ug(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function cg(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function fg(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function hg(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function dg(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const pg=Object.freeze(Object.defineProperty({__proto__:null,interpolate:St,interpolateArray:Kp,interpolateBasis:Yl,interpolateBasisClosed:Vl,interpolateCubehelix:du,interpolateCubehelixLong:pu,interpolateDate:Ql,interpolateDiscrete:Qp,interpolateHcl:cu,interpolateHclLong:fu,interpolateHsl:ou,interpolateHslLong:su,interpolateHue:Jp,interpolateLab:lu,interpolateNumber:Le,interpolateNumberArray:la,interpolateObject:Jl,interpolateRgb:xr,interpolateRgbBasis:Vp,interpolateRgbBasisClosed:Gp,interpolateRound:dn,interpolateString:eu,interpolateTransformCss:nv,interpolateTransformSvg:rv,interpolateZoom:sv,piecewise:vu,quantize:lv},Symbol.toStringTag,{value:"Module"}));var Tc={lab:lu,hcl:cu,"hcl-long":fu,hsl:ou,"hsl-long":su,cubehelix:du,"cubehelix-long":pu,rgb:xr};function vg(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return Tc[e]}var t=e.type,n=e.gamma,r=Tc[t];return typeof n>"u"?r:r.gamma(n)}function mg(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=vg(t.interpolate);e.interpolate(n)}}const gg=Object.freeze(Object.defineProperty({__proto__:null,timeDay:Tt,timeDays:zv,timeFriday:Ru,timeFridays:Hv,timeHour:yn,timeHours:Av,timeInterval:se,timeMillisecond:Ht,timeMilliseconds:Du,timeMinute:mn,timeMinutes:Nv,timeMonday:xn,timeMondays:Iv,timeMonth:wn,timeMonths:Zv,timeSaturday:Wu,timeSaturdays:Uv,timeSecond:Ae,timeSeconds:ju,timeSunday:kt,timeSundays:Bu,timeThursday:Mt,timeThursdays:Bv,timeTickInterval:Qu,timeTicks:Zu,timeTuesday:Fu,timeTuesdays:Rv,timeWednesday:Iu,timeWednesdays:Wv,timeWeek:kt,timeWeeks:Bu,timeYear:De,timeYears:Jv,unixDay:Ea,unixDays:Fv,utcDay:Ut,utcDays:jv,utcFriday:qu,utcFridays:Kv,utcHour:bn,utcHours:Dv,utcMillisecond:Ht,utcMilliseconds:Du,utcMinute:gn,utcMinutes:Lv,utcMonday:_n,utcMondays:qv,utcMonth:Sn,utcMonths:Qv,utcSaturday:Yu,utcSaturdays:Xv,utcSecond:Ae,utcSeconds:ju,utcSunday:Ct,utcSundays:Vu,utcThursday:Et,utcThursdays:Gv,utcTickInterval:Xu,utcTicks:Ku,utcTuesday:Hu,utcTuesdays:Yv,utcWednesday:Uu,utcWednesdays:Vv,utcWeek:Ct,utcWeeks:Vu,utcYear:ze,utcYears:em},Symbol.toStringTag,{value:"Module"}));var yg=new Date(Date.UTC(2020,1,2,3,4,5)),bg="%Y-%m-%d %H:%M";function Oc(e){var t=e.tickFormat(1,bg)(yg);return t==="2020-02-02 03:04"}var kc={day:Tt,hour:yn,minute:mn,month:wn,second:Ae,week:kt,year:De},Mc={day:Ut,hour:bn,minute:gn,month:Sn,second:Ae,week:Ct,year:ze};function xg(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=Oc(r);if(typeof n=="string")r.nice(a?Mc[n]:kc[n]);else{var i=n.interval,s=n.step,o=(a?Mc[i]:kc[i]).every(s);o!=null&&r.nice(o)}}}}function _g(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function wg(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function Sg(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(dn))}function Tg(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function Og(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}var $c=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],kg={domain:sg,nice:xg,zero:Og,interpolate:mg,round:Sg,align:ug,base:cg,clamp:fg,constant:hg,exponent:dg,padding:_g,range:lg,reverse:wg,unknown:Tg};function be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=$c.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){kg[l](s,o)}),s}}var Mg=be("domain","range","reverse","align","padding","round");function Mn(e){return Mg(fr(),e)}var $g=be("domain","range","reverse","align","padding","round");function Cc(e){return $g(wl(),e)}var Cg=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function Yt(e){return Cg(ma(),e)}var Eg=be("domain","range","clamp","nice","round","unknown");function Pg(e){return Eg(wa(),e)}var Ng=be("domain","range","reverse","clamp","interpolate","nice","round");function Ec(e){return Ng(vc(),e)}var Lg=be("domain","range","reverse","clamp","interpolate","nice","round");function Pc(e){return Lg(mc(),e)}var Ag=be("domain","range","reverse","base","clamp","interpolate","nice","round");function Nc(e){return Ag(ya(),e)}var Dg=be("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Lc(e){return Dg(kr(),e)}var zg=be("domain","range","reverse","unknown");function Cr(e){return zg(cr(),e)}var jg=be("domain","range","reverse","nice","zero");function Ac(e){return jg(Ta(),e)}var Fg=be("domain","range","reverse");function Dc(e){return Fg(Sa(),e)}var Ig=be("domain","range","reverse","clamp","constant","nice","zero","round");function zc(e){return Ig(xa(),e)}var Rg=be("domain","range","reverse");function jc(e){return Rg(Oa(),e)}var Wg=be("domain","range","reverse","clamp","interpolate","nice","round","zero");function Fc(e){return Wg(Lu(),e)}function $n(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return Yt(e);case"log":return Nc(e);case"pow":return Lc(e);case"sqrt":return Fc(e);case"symlog":return zc(e);case"time":return Ec(e);case"utc":return Pc(e);case"quantile":return Dc(e);case"quantize":return Ac(e);case"threshold":return jc(e);case"ordinal":return Cr(e);case"point":return Cc(e);case"band":return Mn(e)}return Yt(e)}var Bg=be.apply(void 0,$c);function Hg(e,t){return Bg(e.copy(),t)}function Ug(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?Oc(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Er(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function Pr(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,a,i){return t==null||i.length<=t||a%Math.round((i.length-1)/t)===0})}function Ic(e){return e==null?void 0:e.toString()}var qg=new Set(["linear","pow","quantize","sqrt","symlog"]);function za(e){return qg.has(e.type)}const Yg=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Er,createScale:$n,getTicks:Pr,inferScaleType:Ug,scaleBand:Mn,scaleCanBeZeroed:za,scaleLinear:Yt,scaleLog:Nc,scaleOrdinal:Cr,scalePoint:Cc,scalePower:Lc,scaleQuantile:Dc,scaleQuantize:Ac,scaleRadial:Pg,scaleSqrt:Fc,scaleSymlog:zc,scaleThreshold:jc,scaleTime:Ec,scaleUtc:Pc,toString:Ic,updateScale:Hg},Symbol.toStringTag,{value:"Module"}));var Vg=["children","id","from","to","x1","y1","x2","y2","fromOffset","fromOpacity","toOffset","toOpacity","rotate","transform","vertical"];function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(this,arguments)}function Gg(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Cn(e){var t=e.children,n=e.id,r=e.from,a=e.to,i=e.x1,s=e.y1,o=e.x2,l=e.y2,u=e.fromOffset,c=u===void 0?"0%":u,f=e.fromOpacity,h=f===void 0?1:f,p=e.toOffset,d=p===void 0?"100%":p,v=e.toOpacity,x=v===void 0?1:v,g=e.rotate,b=e.transform,_=e.vertical,M=_===void 0?!0:_,y=Gg(e,Vg),S=i,T=o,$=s,k=l;return M&&!S&&!T&&!$&&!k&&(S="0",T="0",$="0",k="1"),m.createElement("defs",null,m.createElement("linearGradient",ja({id:n,x1:S,y1:$,x2:T,y2:k,gradientTransform:g?"rotate("+g+")":b},y),!!t&&t,!t&&m.createElement("stop",{offset:c,stopColor:r,stopOpacity:h}),!t&&m.createElement("stop",{offset:d,stopColor:a,stopOpacity:x})))}Cn.propTypes={id:w.string.isRequired,from:w.string,to:w.string,x1:w.oneOfType([w.string,w.number]),x2:w.oneOfType([w.string,w.number]),y1:w.oneOfType([w.string,w.number]),y2:w.oneOfType([w.string,w.number]),fromOffset:w.oneOfType([w.string,w.number]),fromOpacity:w.oneOfType([w.string,w.number]),toOffset:w.oneOfType([w.string,w.number]),toOpacity:w.oneOfType([w.string,w.number]),rotate:w.oneOfType([w.string,w.number]),transform:w.string,children:w.node,vertical:w.bool};var Kg=Rc;function Rc(e,t,n){e instanceof RegExp&&(e=Wc(e,n)),t instanceof RegExp&&(t=Wc(t,n));var r=Bc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Wc(e,t){var n=t.match(e);return n?n[0]:null}Rc.range=Bc;function Bc(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Xg=Hc;function Hc(e,t,n){e instanceof RegExp&&(e=Uc(e,n)),t instanceof RegExp&&(t=Uc(t,n));var r=qc(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function Uc(e,t){var n=t.match(e);return n?n[0]:null}Hc.range=qc;function qc(e,t,n){var r,a,i,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(r=[],i=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(a=r.pop(),a<i&&(i=a,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[i,s])}return o}var Zg=Xg,Qg=Yc;function Yc(e,t,n){var r=e;return Jg(e,t).reduce(function(a,i){return a.replace(i.functionIdentifier+"("+i.matches.body+")",e0(i.matches.body,i.functionIdentifier,n,r,t))},e)}function Jg(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var a=r.exec(e);if(!a)return n;if(a[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var i=a[1],s=a.index,o=Zg("(",")",e.substring(s));if(!o||o.start!==a[0].length-1)throw new SyntaxError(i+"(): missing closing ')' in the value '"+e+"'");n.push({matches:o,functionIdentifier:i}),e=o.post}while(r.test(e));return n}function e0(e,t,n,r,a){return n(Yc(e,a,n),t,r)}var xe=function(e){this.value=e};xe.math={isDegree:!0,acos:function(e){return xe.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return xe.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return xe.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,a=t;a<r&&(a=r,r=t);for(var i=a+1;i<=e;i++)n*=i;return n/xe.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,a=e;a<=t;a++)r*=Number(n.postfixEval({n:a}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,a=e;a<=t;a++)r+=Number(n.postfixEval({n:a}));return r},sin:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return xe.math.isDegree&&(e=xe.math.toRadian(e)),Math.tan(e)},tanh:function(e){return xe.sinha(e)/xe.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},xe.Exception=function(e){this.message=e};var t0=xe,V=t0;function _e(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var ut=[{token:"sin",show:"sin",type:0,value:V.math.sin},{token:"cos",show:"cos",type:0,value:V.math.cos},{token:"tan",show:"tan",type:0,value:V.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:V.math.P},{token:"C",show:"C",type:10,value:V.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:V.math.asin},{token:"acos",show:"acos",type:0,value:V.math.acos},{token:"atan",show:"atan",type:0,value:V.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:V.math.cosh},{token:"acosh",show:"acosh",type:0,value:V.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:V.math.div},{token:"!",show:"!",type:7,value:V.math.fact},{token:"tanh",show:"tanh",type:0,value:V.math.tanh},{token:"atanh",show:"atanh",type:0,value:V.math.atanh},{token:"Mod",show:" Mod ",type:2,value:V.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:V.math.mul},{token:"sinh",show:"sinh",type:0,value:V.math.sinh},{token:"asinh",show:"asinh",type:0,value:V.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:V.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:V.math.add},{token:"-",show:"-",type:9,value:V.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:V.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:V.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:V.math.and}],Fa={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},Nr=0;Nr<ut.length;Nr++)ut[Nr].precedence=Fa[ut[Nr].type];var Be={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Vt={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},n0={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},je={},En={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},r0={1:!0},we=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function i0(e,t,n,r){for(var a=0;a<r;a++)if(e[n+a]!==t[a])return!1;return!0}V.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},V.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===V.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),we[n]=we[n]||[];for(var a=0;a<we[n].length;a++)if(e[t].token===we[n][a]){r=Vc(we[n][a],ut);break}r===-1?(ut.push(e[t]),e[t].precedence=Fa[e[t].type],we.length<=e[t].token.length&&(we[e[t].token.length]=[]),we[e[t].token.length].push(e[t].token)):(ut[r]=e[t],e[t].precedence=Fa[e[t].type])}};function Vc(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function a0(e){for(var t=[],n=e.length,r,a,i,s=0;s<n;s++)if(!(s<n-1&&e[s]===" "&&e[s+1]===" ")){for(r="",a=e.length-s>we.length-2?we.length-1:e.length-s;a>0;a--)if(we[a]!==void 0)for(i=0;i<we[a].length;i++)i0(e,we[a][i],s,a)&&(r=we[a][i],i=we[a].length,a=0);if(s+=r.length-1,r==="")throw new V.Exception("Can't understand after "+e.slice(s));t.push(ut[Vc(r,ut)])}return t}var o0={value:V.math.changeSign,type:0,pre:21,show:"-"},Lr={value:")",show:")",type:5,pre:0},Pn={value:"(",type:4,pre:0,show:"("};V.lex=function(e,t){var n=[Pn],r=[],a=e,i=Be,s=0,o=je,l="",u;typeof t<"u"&&V.addToken(t);var c={},f=a0(a);for(u=0;u<f.length;u++){var h=f[u];if(h.type===14){if(u>0&&u<f.length-1&&f[u+1].type===1&&(f[u-1].type===1||f[u-1].type===6))throw new V.Exception("Unexpected Space");continue}var p=h.token,d=h.type,v=h.value,x=h.precedence,g=h.show,b=n[n.length-1],_;for(_=r.length;_--&&r[_]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(d)!==-1){if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+l);n.push(Lr),i=Vt,o=En,r.pop()}if(i[d]!==!0)throw new V.Exception(p+" is not allowed after "+l);if(o[d]===!0&&(d=2,v=V.math.mul,g="&times;",x=3,u=u-1),c={value:v,type:d,pre:x,show:g,numberOfArguments:h.numberOfArguments},d===0)i=Be,o=je,_e(r,2),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(2));else if(d===1)b.type===1?(b.value+=v,_e(r,1)):n.push(c),i=Vt,o=n0;else if(d===2)i=Be,o=je,_e(r,2),n.push(c);else if(d===3)n.push(c),i=Vt,o=En;else if(d===4)_e(r,1),s++,i=Be,o=je,n.push(c);else if(d===5){if(!s)throw new V.Exception("Closing parenthesis are more than opening one, wait What!!!");s--,i=Vt,o=En,n.push(c),_e(r,1)}else if(d===6){if(b.hasDec)throw new V.Exception("Two decimals are not allowed in one number");b.type!==1&&(b={value:0,type:1,pre:0},n.push(b)),i=r0,_e(r,1),o=je,b.value+=v,b.hasDec=!0}else d===7&&(i=Vt,o=En,_e(r,1),n.push(c));d===8?(i=Be,o=je,_e(r,h.numberOfArguments+2),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(h.numberOfArguments+2))):d===9?(b.type===9?b.value===V.math.add?(b.value=v,b.show=g,_e(r,1)):b.value===V.math.sub&&g==="-"&&(b.value=V.math.add,b.show="+",_e(r,1)):b.type!==5&&b.type!==7&&b.type!==1&&b.type!==3&&b.type!==13?p==="-"&&(i=Be,o=je,_e(r,2).push(2),n.push(o0),n.push(Pn)):(n.push(c),_e(r,2)),i=Be,o=je):d===10?(i=Be,o=je,_e(r,2),n.push(c)):d===11?(i=Be,o=je,n.push(c)):d===12?(i=Be,o=je,_e(r,6),n.push(c),f[u+1].type!==4&&(n.push(Pn),r.push(6))):d===13&&(i=Vt,o=En,n.push(c)),_e(r,-1),l=p}for(_=r.length;_--;)n.push(Lr);if(i[5]!==!0)throw new V.Exception("complete the expression");for(;s--;)n.push(Lr);return n.push(Lr),new V(n)};var s0=V,Ia=s0;Ia.prototype.toPostfix=function(){for(var e=[],t,n,r,a,i,s=[{value:"(",type:4,pre:0}],o=this.value,l=1;l<o.length;l++)if(o[l].type===1||o[l].type===3||o[l].type===13)o[l].type===1&&(o[l].value=Number(o[l].value)),e.push(o[l]);else if(o[l].type===4)s.push(o[l]);else if(o[l].type===5)for(;(n=s.pop()).type!==4;)e.push(n);else if(o[l].type===11){for(;(n=s.pop()).type!==4;)e.push(n);s.push(n)}else{t=o[l],a=t.pre,i=s[s.length-1],r=i.pre;var u=i.value=="Math.pow"&&t.value=="Math.pow";if(a>r)s.push(t);else{for(;r>=a&&!u||u&&a<r;)n=s.pop(),i=s[s.length-1],e.push(n),r=i.pre,u=t.value=="Math.pow"&&i.value=="Math.pow";s.push(t)}}return new Ia(e)};var l0=Ia,Nn=l0;Nn.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,a,i=this.value,s=typeof e.n<"u",o=0;o<i.length;o++)if(i[o].type===1)t.push({value:i[o].value,type:1});else if(i[o].type===3)t.push({value:e[i[o].value],type:1});else if(i[o].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(i[o]):t[t.length-1].value=i[o].value(t[t.length-1].value);else if(i[o].type===8){for(var l=[],u=0;u<i[o].numberOfArguments;u++)l.push(t.pop().value);t.push({type:1,value:i[o].value.apply(i[o],l.reverse())})}else i[o].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===2||i[o].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(i[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(i[o]),t.push(n)):t.push({type:1,value:i[o].value(r.value,n.value)})):i[o].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),a=t.pop(),t.push({type:1,value:i[o].value(a.value,r.value,new Nn(n))})):i[o].type===13&&(s?t.push({value:e[i[o].value],type:3}):t.push([i[o]]));if(t.length>1)throw new Nn.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},Nn.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var u0=Nn,Gc=u0;Gc.prototype.formulaEval=function(){for(var e,t,n,r=[],a=this.value,i=0;i<a.length;i++)a[i].type===1||a[i].type===3?r.push({value:a[i].type===3?a[i].show:a[i].value,type:1}):a[i].type===13?r.push({value:a[i].show,type:1}):a[i].type===0?r[r.length-1]={value:a[i].show+(a[i].show!="-"?"(":"")+r[r.length-1].value+(a[i].show!="-"?")":""),type:0}:a[i].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+a[i].show,type:7}:a[i].type===10?(e=r.pop(),t=r.pop(),a[i].show==="P"||a[i].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+a[i].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):a[i].type===2||a[i].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+a[i].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:a[i].type})):a[i].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:a[i].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var c0=Gc,f0=Kg,h0=Qg,d0=c0,p0=100,v0=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Ra,m0=g0;function g0(e,t){Ra=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(a,i,s){if(Ra++>p0)throw Ra=0,new Error("Call stack overflow for "+s);if(a==="")throw new Error(i+"(): '"+s+"' must contain a non-whitespace string");a=r(a,s);var o=y0(a);if(o.length>1||a.indexOf("var(")>-1)return i+"("+a+")";var l=o[0]||"";l==="%"&&(a=a.replace(/\b[0-9\.]+%/g,function(f){return parseFloat(f.slice(0,-1))*.01}));var u=a.replace(new RegExp(l,"gi"),""),c;try{c=d0.eval(u)}catch{return i+"("+a+")"}return l==="%"&&(c*=100),(i.length||l==="%")&&(c=Math.round(c*t)/t),c+=l,c}function r(a,i){a=a.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",o=a,l;l=v0.exec(o);){l[0].index>0&&(s+=o.substring(0,l[0].index));var u=f0("(",")",o.substring([0].index));if(u.body==="")throw new Error("'"+a+"' must contain a non-whitespace string");var c=n(u.body,"",i);s+=u.pre+c,o=u.post}return s+o}return h0(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function y0(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,a=r.exec(e);a;)!a||!a[1]||(n.indexOf(a[1].toLowerCase())===-1&&(t.push(a[1]),n.push(a[1].toLowerCase())),a=r.exec(e));return t}const Wa=Dt(m0);var b0=typeof Qn=="object"&&Qn&&Qn.Object===Object&&Qn,x0=b0,_0=x0,w0=typeof self=="object"&&self&&self.Object===Object&&self,S0=_0||w0||Function("return this")(),Ar=S0,T0=Ar,O0=T0.Symbol,Kc=O0,Xc=Kc,Zc=Object.prototype,k0=Zc.hasOwnProperty,M0=Zc.toString,Ln=Xc?Xc.toStringTag:void 0;function $0(e){var t=k0.call(e,Ln),n=e[Ln];try{e[Ln]=void 0;var r=!0}catch{}var a=M0.call(e);return r&&(t?e[Ln]=n:delete e[Ln]),a}var C0=$0,E0=Object.prototype,P0=E0.toString;function N0(e){return P0.call(e)}var L0=N0,Qc=Kc,A0=C0,D0=L0,z0="[object Null]",j0="[object Undefined]",Jc=Qc?Qc.toStringTag:void 0;function F0(e){return e==null?e===void 0?j0:z0:Jc&&Jc in Object(e)?A0(e):D0(e)}var ef=F0;function I0(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Dr=I0,R0=ef,W0=Dr,B0="[object AsyncFunction]",H0="[object Function]",U0="[object GeneratorFunction]",q0="[object Proxy]";function Y0(e){if(!W0(e))return!1;var t=R0(e);return t==H0||t==U0||t==B0||t==q0}var V0=Y0,G0=Ar,K0=G0["__core-js_shared__"],X0=K0,Ba=X0,tf=function(){var e=/[^.]+$/.exec(Ba&&Ba.keys&&Ba.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Z0(e){return!!tf&&tf in e}var Q0=Z0,J0=Function.prototype,ey=J0.toString;function ty(e){if(e!=null){try{return ey.call(e)}catch{}try{return e+""}catch{}}return""}var ny=ty,ry=V0,iy=Q0,ay=Dr,oy=ny,sy=/[\\^$.*+?()[\]{}|]/g,ly=/^\[object .+?Constructor\]$/,uy=Function.prototype,cy=Object.prototype,fy=uy.toString,hy=cy.hasOwnProperty,dy=RegExp("^"+fy.call(hy).replace(sy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function py(e){if(!ay(e)||iy(e))return!1;var t=ry(e)?dy:ly;return t.test(oy(e))}var vy=py;function my(e,t){return e==null?void 0:e[t]}var gy=my,yy=vy,by=gy;function xy(e,t){var n=by(e,t);return yy(n)?n:void 0}var nf=xy,_y=nf,wy=_y(Object,"create"),zr=wy,rf=zr;function Sy(){this.__data__=rf?rf(null):{},this.size=0}var Ty=Sy;function Oy(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ky=Oy,My=zr,$y="__lodash_hash_undefined__",Cy=Object.prototype,Ey=Cy.hasOwnProperty;function Py(e){var t=this.__data__;if(My){var n=t[e];return n===$y?void 0:n}return Ey.call(t,e)?t[e]:void 0}var Ny=Py,Ly=zr,Ay=Object.prototype,Dy=Ay.hasOwnProperty;function zy(e){var t=this.__data__;return Ly?t[e]!==void 0:Dy.call(t,e)}var jy=zy,Fy=zr,Iy="__lodash_hash_undefined__";function Ry(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Fy&&t===void 0?Iy:t,this}var Wy=Ry,By=Ty,Hy=ky,Uy=Ny,qy=jy,Yy=Wy;function Gt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Gt.prototype.clear=By,Gt.prototype.delete=Hy,Gt.prototype.get=Uy,Gt.prototype.has=qy,Gt.prototype.set=Yy;var Vy=Gt;function Gy(){this.__data__=[],this.size=0}var Ky=Gy;function Xy(e,t){return e===t||e!==e&&t!==t}var Zy=Xy,Qy=Zy;function Jy(e,t){for(var n=e.length;n--;)if(Qy(e[n][0],t))return n;return-1}var jr=Jy,eb=jr,tb=Array.prototype,nb=tb.splice;function rb(e){var t=this.__data__,n=eb(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():nb.call(t,n,1),--this.size,!0}var ib=rb,ab=jr;function ob(e){var t=this.__data__,n=ab(t,e);return n<0?void 0:t[n][1]}var sb=ob,lb=jr;function ub(e){return lb(this.__data__,e)>-1}var cb=ub,fb=jr;function hb(e,t){var n=this.__data__,r=fb(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var db=hb,pb=Ky,vb=ib,mb=sb,gb=cb,yb=db;function Kt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Kt.prototype.clear=pb,Kt.prototype.delete=vb,Kt.prototype.get=mb,Kt.prototype.has=gb,Kt.prototype.set=yb;var bb=Kt,xb=nf,_b=Ar,wb=xb(_b,"Map"),Sb=wb,af=Vy,Tb=bb,Ob=Sb;function kb(){this.size=0,this.__data__={hash:new af,map:new(Ob||Tb),string:new af}}var Mb=kb;function $b(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Cb=$b,Eb=Cb;function Pb(e,t){var n=e.__data__;return Eb(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fr=Pb,Nb=Fr;function Lb(e){var t=Nb(this,e).delete(e);return this.size-=t?1:0,t}var Ab=Lb,Db=Fr;function zb(e){return Db(this,e).get(e)}var jb=zb,Fb=Fr;function Ib(e){return Fb(this,e).has(e)}var Rb=Ib,Wb=Fr;function Bb(e,t){var n=Wb(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Hb=Bb,Ub=Mb,qb=Ab,Yb=jb,Vb=Rb,Gb=Hb;function Xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xt.prototype.clear=Ub,Xt.prototype.delete=qb,Xt.prototype.get=Yb,Xt.prototype.has=Vb,Xt.prototype.set=Gb;var Kb=Xt,of=Kb,Xb="Expected a function";function Ha(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Xb);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=e.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Ha.Cache||of),n}Ha.Cache=of;var Zb=Ha;const Qb=Dt(Zb);var sf="__react_svg_text_measurement_id";function Jb(e,t){try{var n=document.getElementById(sf);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",sf),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const lf=Qb(Jb,function(e,t){return e+"_"+JSON.stringify(t)});var e1=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function t1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ua(e){return typeof e=="number"}function uf(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function n1(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,a=r===void 0?!1:r,i=e.angle,s=e.width,o=e.lineHeight,l=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,f=e.children,h=e.style,p=t1(e,e1),d=p.x,v=d===void 0?0:d,x=p.y,g=x===void 0?0:x,b=!uf(v)||!uf(g),_=m.useMemo(function(){var k=f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:k.map(function(C){return{word:C,wordWidth:lf(C,h)||0}}),spaceWidth:lf(" ",h)||0}},[f,h]),M=_.wordsWithWidth,y=_.spaceWidth,S=m.useMemo(function(){return b?[]:s||a?M.reduce(function(k,C){var P=C.word,N=C.wordWidth,A=k[k.length-1];if(A&&(s==null||a||(A.width||0)+N+y<s))A.words.push(P),A.width=A.width||0,A.width+=N+y;else{var R={words:[P],width:N};k.push(R)}return k},[]):[{words:f==null?[]:f.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[b,s,a,f,M,y]),T=m.useMemo(function(){var k=b?"":Wa(n==="start"?"calc("+c+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+l+" + ("+c+" / 2))":"calc("+(S.length-1)+" * -"+l+")");return k},[b,n,c,S.length,l]),$=m.useMemo(function(){var k=[];if(b)return"";if(Ua(v)&&Ua(g)&&Ua(s)&&a&&S.length>0){var C=S[0].width||1,P=a==="shrink-only"?Math.min(s/C,1):s/C,N=P,A=v-P*v,R=g-N*g;k.push("matrix("+P+", 0, 0, "+N+", "+A+", "+R+")")}return i&&k.push("rotate("+i+", "+v+", "+g+")"),k.length>0?k.join(" "):""},[b,v,g,s,a,S,i]);return{wordsByLines:S,startDy:T,transform:$}}var r1=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function qa(){return qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qa.apply(this,arguments)}function i1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var a1={overflow:"visible"};function cf(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,a=r===void 0?0:r,i=e.textAnchor,s=i===void 0?"start":i,o=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var u=e.lineHeight,c=u===void 0?"1em":u;e.scaleToFit,e.capHeight,e.width;var f=i1(e,r1),h=f.x,p=h===void 0?0:h,d=f.fontSize,v=n1(e),x=v.wordsByLines,g=v.startDy,b=v.transform;return m.createElement("svg",{ref:o,x:n,y:a,fontSize:d,style:a1},x.length>0?m.createElement("text",qa({ref:l,transform:b},f,{textAnchor:s}),x.map(function(_,M){return m.createElement("tspan",{key:M,x:p,dy:M===0?g:c},_.words.join(" "))})):null)}var ke={top:"top",left:"left",right:"right",bottom:"bottom"};function o1(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,a=e.range,i=e.tickLabelFontSize,s=e.tickLength,o=r===ke.left||r===ke.top?-1:1,l,u,c;if(r===ke.top||r===ke.bottom){var f=r===ke.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(a[0])+Number(a[a.length-1]))/2,u=o*(s+t+i+f)}else l=o*((Number(a[0])+Number(a[a.length-1]))/2),u=-(s+t),c="rotate("+o*90+")";return{x:l,y:u,transform:c}}function An(){return An=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},An.apply(this,arguments)}function s1(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,a=e.tickClassName,i=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,l=o===void 0?"#222":o,u=e.tickTransform,c=e.ticks,f=e.strokeWidth,h=e.tickLineProps;return c.map(function(p){var d,v=p.value,x=p.index,g=p.from,b=p.to,_=p.formattedValue,M=(d=s[x])!=null?d:{},y=Math.max(10,typeof M.fontSize=="number"&&M.fontSize||0),S=b.y+(n&&r!==ke.top?y:0);return m.createElement(Ge,{key:"visx-tick-"+v+"-"+x,className:ve("visx-axis-tick",a),transform:u},!t&&m.createElement(ll,An({from:g,to:b,stroke:l,strokeWidth:f,strokeLinecap:"square"},h)),i?i(An({},M,{x:b.x,y:S,formattedValue:_})):m.createElement(cf,An({x:b.x,y:S},M),_))})}function Dn(){return Dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dn.apply(this,arguments)}var ff={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function l1(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,a=e.hideAxisLine,i=e.hideTicks,s=e.horizontal,o=e.label,l=o===void 0?"":o,u=e.labelClassName,c=e.labelOffset,f=c===void 0?14:c,h=e.labelProps,p=e.orientation,d=p===void 0?ke.bottom:p,v=e.scale,x=e.stroke,g=x===void 0?"#222":x,b=e.strokeDasharray,_=e.strokeWidth,M=_===void 0?1:_,y=e.tickClassName,S=e.tickComponent,T=e.tickLineProps,$=e.tickLabelProps,k=e.tickLength,C=k===void 0?8:k,P=e.tickStroke,N=P===void 0?"#222":P,A=e.tickTransform,R=e.ticks,X=e.ticksComponent,U=X===void 0?s1:X,Z=Dn({},ff,h),ee=Dn({},ff,typeof $=="object"?$:null),K=R.map(function(D){var B=D.value,W=D.index;return typeof $=="function"?$(B,W,R):ee}),E=Math.max.apply(Math,[10].concat(K.map(function(D){return typeof D.fontSize=="number"?D.fontSize:0})));return m.createElement(m.Fragment,null,U({hideTicks:i,horizontal:s,orientation:d,scale:v,tickClassName:y,tickComponent:S,tickLabelProps:K,tickStroke:N,tickTransform:A,ticks:R,strokeWidth:M,tickLineProps:T}),!a&&m.createElement(ll,{className:ve("visx-axis-line",n),from:t,to:r,stroke:g,strokeWidth:M,strokeDasharray:b}),l&&m.createElement(cf,Dn({className:ve("visx-axis-label",u)},o1({labelOffset:f,labelProps:Z,orientation:d,range:v.range(),tickLabelFontSize:E,tickLength:C}),Z),l))}function u1(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(a){var i=n(a);return typeof i=="number"?i+r:i}}return e}function c1(e){var t=e;return"tickFormat"in t?t.tickFormat():Ic}var He=function(){function e(n){var r=n.x,a=r===void 0?0:r,i=n.y,s=i===void 0?0:i;this.x=0,this.y=0,this.x=a,this.y=s}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function f1(e,t){return new He({x:e.x+t.x,y:e.y+t.y})}function h1(e,t){return new He({x:e.x-t.x,y:e.y-t.y})}const d1=Object.freeze(Object.defineProperty({__proto__:null,Point:He,subtractPoints:h1,sumPoints:f1},Symbol.toStringTag,{value:"Module"}));function Ir(e,t){var n=e.x,r=e.y;return new He(t?{x:n,y:r}:{x:r,y:n})}function Ya(){return Ya=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ya.apply(this,arguments)}var Va=0;function p1(e){return e===void 0&&(e=Va),typeof e=="number"?{start:e,end:e}:Ya({start:Va,end:Va},e)}var v1=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function Ga(){return Ga=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ga.apply(this,arguments)}function m1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ka(e){var t=e.children,n=t===void 0?l1:t,r=e.axisClassName,a=e.hideAxisLine,i=a===void 0?!1:a,s=e.hideTicks,o=s===void 0?!1:s,l=e.hideZero,u=l===void 0?!1:l,c=e.innerRef,f=e.left,h=f===void 0?0:f,p=e.numTicks,d=p===void 0?10:p,v=e.orientation,x=v===void 0?ke.bottom:v,g=e.rangePadding,b=g===void 0?0:g,_=e.scale,M=e.tickFormat,y=e.tickLength,S=y===void 0?8:y,T=e.tickValues,$=e.top,k=$===void 0?0:$,C=m1(e,v1),P=M??c1(_),N=x===ke.left,A=x===ke.top,R=A||x===ke.bottom,X=u1(_),U=N||A?-1:1,Z=_.range(),ee=p1(b),K=Ir({x:Number(Z[0])+.5-ee.start,y:0},R),E=Ir({x:Number(Z[Z.length-1])+.5+ee.end,y:0},R),D=(T??Pr(_,d)).filter(function(W){return!u||W!==0&&W!=="0"}).map(function(W,F){return{value:W,index:F}}),B=D.map(function(W){var F=W.value,I=W.index,q=Er(X(F));return{value:F,index:I,from:Ir({x:q,y:0},R),to:Ir({x:q,y:S*U},R),formattedValue:P(F,I,D)}});return m.createElement(Ge,{className:ve("visx-axis",r),innerRef:c,top:k,left:h},n(Ga({},C,{axisFromPoint:K,axisToPoint:E,hideAxisLine:i,hideTicks:o,hideZero:u,horizontal:R,numTicks:d,orientation:x,rangePadding:b,scale:_,tickFormat:P,tickLength:S,tickPosition:X,tickSign:U,ticks:B})))}var g1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rr.apply(this,arguments)}function y1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var b1={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function hf(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=y1(e,g1),l=typeof s=="function"?s:Rr({},b1,s);return m.createElement(Ka,Rr({axisClassName:ve("visx-axis-left",t),labelOffset:r,orientation:ke.left,tickLabelProps:l,tickLength:i},o))}var x1=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Wr(){return Wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wr.apply(this,arguments)}function _1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var w1={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Xa(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,a=e.tickLength,i=a===void 0?8:a,s=e.tickLabelProps,o=_1(e,x1),l=typeof s=="function"?s:Wr({},w1,s);return m.createElement(Ka,Wr({axisClassName:ve("visx-axis-bottom",t),labelOffset:r,orientation:ke.bottom,tickLabelProps:l,tickLength:i},o))}var Br={};Br.__esModule=!0;var df=Br.default=M1,S1=pf(m),T1=pf(nn),O1=["from","to","fill","className","innerRef"];function pf(e){return e&&e.__esModule?e:{default:e}}function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(this,arguments)}function k1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function M1(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,a=r===void 0?{x:1,y:1}:r,i=e.fill,s=i===void 0?"transparent":i,o=e.className,l=e.innerRef,u=k1(e,O1),c=n.x===a.x||n.y===a.y;return S1.default.createElement("line",Za({ref:l,className:(0,T1.default)("visx-line",o),x1:n.x,y1:n.y,x2:a.x,y2:a.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}function vf(e){return"bandwidth"in e?e.bandwidth():0}var $1=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qa.apply(this,arguments)}function C1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function mf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,g=e.offset,b=e.tickValues,_=C1(e,$1),M=b??Pr(i,v),y=(g??0)+vf(i)/2,S=M.map(function(T,$){var k,C=((k=Er(i(T)))!=null?k:0)+y;return{index:$,from:new He({x:0,y:C}),to:new He({x:s,y:C})}});return m.createElement(Ge,{className:ve("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return m.createElement(df,Qa({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}mf.propTypes={tickValues:w.array,width:w.number.isRequired};var E1=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ja.apply(this,arguments)}function P1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function gf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,g=e.tickValues,b=e.children,_=P1(e,E1),M=g??Pr(i,d),y=(x??0)+vf(i)/2,S=M.map(function(T,$){var k,C=((k=Er(i(T)))!=null?k:0)+y;return{index:$,from:new He({x:C,y:0}),to:new He({x:C,y:s})}});return m.createElement(Ge,{className:ve("visx-columns",h),top:n,left:a},b?b({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return m.createElement(df,Ja({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}gf.propTypes={tickValues:w.array,height:w.number.isRequired};var ct={};const eo=pt(tp);var to={};to.__esModule=!0,to.default=N1;function N1(e,t){e(t)}var Pt={};Pt.__esModule=!0,Pt.STACK_ORDER_NAMES=Pt.STACK_ORDERS=void 0,Pt.default=A1;var zn=eo,Hr={ascending:zn.stackOrderAscending,descending:zn.stackOrderDescending,insideout:zn.stackOrderInsideOut,none:zn.stackOrderNone,reverse:zn.stackOrderReverse};Pt.STACK_ORDERS=Hr;var L1=Object.keys(Hr);Pt.STACK_ORDER_NAMES=L1;function A1(e){return e&&Hr[e]||Hr.none}var Nt={};Nt.__esModule=!0,Nt.STACK_OFFSET_NAMES=Nt.STACK_OFFSETS=void 0,Nt.default=z1;var jn=eo,Ur={expand:jn.stackOffsetExpand,diverging:jn.stackOffsetDiverging,none:jn.stackOffsetNone,silhouette:jn.stackOffsetSilhouette,wiggle:jn.stackOffsetWiggle};Nt.STACK_OFFSETS=Ur;var D1=Object.keys(Ur);Nt.STACK_OFFSET_NAMES=D1;function z1(e){return e&&Ur[e]||Ur.none}ct.__esModule=!0,ct.arc=I1,ct.area=R1,ct.line=W1,ct.pie=B1,ct.radialLine=H1,ct.stack=U1;var Zt=eo,oe=no(to),j1=no(Pt),F1=no(Nt);function no(e){return e&&e.__esModule?e:{default:e}}function I1(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,a=t.cornerRadius,i=t.startAngle,s=t.endAngle,o=t.padAngle,l=t.padRadius,u=(0,Zt.arc)();return n!=null&&(0,oe.default)(u.innerRadius,n),r!=null&&(0,oe.default)(u.outerRadius,r),a!=null&&(0,oe.default)(u.cornerRadius,a),i!=null&&(0,oe.default)(u.startAngle,i),s!=null&&(0,oe.default)(u.endAngle,s),o!=null&&(0,oe.default)(u.padAngle,o),l!=null&&(0,oe.default)(u.padRadius,l),u}function R1(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,a=t.x1,i=t.y,s=t.y0,o=t.y1,l=t.defined,u=t.curve,c=(0,Zt.area)();return n&&(0,oe.default)(c.x,n),r&&(0,oe.default)(c.x0,r),a&&(0,oe.default)(c.x1,a),i&&(0,oe.default)(c.y,i),s&&(0,oe.default)(c.y0,s),o&&(0,oe.default)(c.y1,o),l&&c.defined(l),u&&c.curve(u),c}function W1(e){var t=e===void 0?{}:e,n=t.x,r=t.y,a=t.defined,i=t.curve,s=(0,Zt.line)();return n&&(0,oe.default)(s.x,n),r&&(0,oe.default)(s.y,r),a&&s.defined(a),i&&s.curve(i),s}function B1(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,a=t.padAngle,i=t.value,s=t.sort,o=t.sortValues,l=(0,Zt.pie)();return(s===null||s!=null)&&l.sort(s),(o===null||o!=null)&&l.sortValues(o),i!=null&&l.value(i),a!=null&&(0,oe.default)(l.padAngle,a),n!=null&&(0,oe.default)(l.startAngle,n),r!=null&&(0,oe.default)(l.endAngle,r),l}function H1(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,a=t.defined,i=t.curve,s=(0,Zt.radialLine)();return n&&(0,oe.default)(s.angle,n),r&&(0,oe.default)(s.radius,r),a&&s.defined(a),i&&s.curve(i),s}function U1(e){var t=e.keys,n=e.value,r=e.order,a=e.offset,i=(0,Zt.stack)();return t&&i.keys(t),n&&(0,oe.default)(i.value,n),r&&i.order((0,j1.default)(r)),a&&i.offset((0,F1.default)(a)),i}let Fn=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const q1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",yMaxValue:"number",yTickFormat:"(i: number) => string"};function ro(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"value",tickCount:3},xAxis:u={tickValues:"label"},yMaxValue:c,yTickFormat:f}=e,h={top:30,bottom:70,left:50,right:30},p=s-h.left-h.right,d=i-h.top-h.bottom,v=T=>T[u.tickValues],x=T=>T[l.tickValues],g=Mn({range:[0,p],round:!0,domain:a.map(v),padding:.4}),b=Yt({range:[d,0],round:!0,domain:[0,c||Math.max(...a.map(x))]}),_=(T,$)=>k=>T($(k)),M=_(g,v),y=_(b,x),S=Fn();return z.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},z.createElement(mf,{scale:b,left:h.left,width:p,numTicks:l.tickCount,stroke:pe.colors.gray400,strokeOpacity:.2}),z.createElement(Cn,{id:S,from:t,to:n}),a.map((T,$)=>{const k=d-y(T),C=Fn();return z.createElement(rn,{key:$},z.createElement(ul,{id:C,top:!0,radius:4,x:M(T)+h.left+(o?(g.bandwidth()-o)/2:0),y:d-k,height:k,width:o||g.bandwidth(),fill:`url(#${S})`,onMouseEnter:P=>{const N=P.target;N.style.fill=r},onMouseLeave:P=>{const N=P.target;N.style.fill=""}}),z.createElement(hf,{scale:b,left:h.left,hideTicks:!0,numTicks:l.tickCount,tickFormat:f||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200"})}),z.createElement(Xa,{top:d,scale:g,left:h.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400,width:g.bandwidth()+g.bandwidth()/2,lineHeight:"15px",verticalAnchor:"start"})}),z.createElement(tn.SpsTooltip,{for:C},T.label))}))}Object.assign(ro,{props:q1,displayName:"SpsBarChart"});const yf={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>z.createElement(z.Fragment,null,z.createElement("p",null,"Use Bar Charts to visualize the comparison of a dataset across multiple categories or subjects. When using bar charts, the dataset should attempt to provide a clear answer to a clear question (i.e. avoid comparing multiple or unrelated datasets in a single chart)."),z.createElement("p",null,"Bar Charts should not be used when the visualization of the data is too complex or the number of categories too numerous to be easily understood at a glance. In these cases consider the use of more general lists of content such as a"," ",z.createElement(e,{to:"Tables"},"Table"),"."),z.createElement("h5",null,"Color"),z.createElement("p",null,"The number of colors used should be directly related to the number of comparisons being made. When comparing categories across a single data set, only one color should be used. When comparing multiple categories across multiple series of data, use the appropriate number of colors to the number of categories. For more details on color usage visit the"," ",z.createElement(t,{to:"/style-and-layout/colors"},"Colors")," section."),z.createElement("h5",null,"Interaction"),z.createElement("p",null,"Charts should include interactivity on hover to give users insight to specifics of the data. Tooltips can be used to display expanded definitions or additional related data points for the selected category."))},horizontal:{label:"Horizontal Bar Chart",description:tt.code`
34
+ <p>In Horizontal Bar Charts categories are listed vertically on the Y-axis and with data points are plotted horizontally on the X-axis.</p>
35
+ `,examples:{vertical:{react:tt.code`
36
+ import { SpsHorizontalBarChart } from "@spscommerce/ds-react-charts";
37
+ function DemoComponent() {
38
+ const data = [
39
+ { value: 69, label: "Aktie Sports" },
40
+ { value: 69, label: "Dicks Sporting Goods" },
41
+ { value: 64, label: "FGL Sports" },
42
+ { value: 62, label: "Foot Asylum" },
43
+ { value: 55, label: "Hervis" },
44
+ { value: 51, label: "Lovell Rugby" },
45
+ { value: 48, label: "Modells Sporting Goods" },
46
+ { value: 44, label: "Perry Sport" },
47
+ { value: 44, label: "Sportman Warhouse Australia" },
48
+ { value: 44, label: "Perry Sport 2" },
49
+ ]
50
+
51
+ xTickFormat = (i) => \`\${i}\${i !== 0 ? "%" : ""}\`
52
+
53
+ return (
54
+ <SpsHorizontalBarChart
55
+ chartData={data}
56
+ chartHeight={523}
57
+ chartWidth={838}
58
+ barFillColor1 = "#32BE6F"
59
+ barFillColor2 = "#32BE6F80"
60
+ barFillColorHover = "#289858"
61
+ yAxis={{
62
+ tickValues: 'label',
63
+ }}
64
+ xAxis={{
65
+ tickValues: 'value',
66
+ tickCount: 10
67
+ }}
68
+ marginLeft={135}
69
+ xMaxValue={100}
70
+ barSize={20}
71
+ xTickFormat={xTickFormat}
72
+ />
73
+ )
74
+ }
75
+ `}}},vertical:{label:"Vertical Bar Chart",description:tt.code`
76
+ <p>In Vertical Bar Charts data points are plotted vertically on the Y-axis and with categories being listed horizontally on the X-axis.</p>
77
+ <p>If the categories become too crowded along the X-axis, opt for a Horizontal Bar Chart instead.</p>
78
+ `,examples:{vertical:{react:tt.code`
79
+ import { SpsBarChart } from "@spscommerce/ds-react-charts";
80
+ function DemoComponent() {
81
+ const data = [
82
+ { value: 112, label: "Aktie Sports" },
83
+ { value: 100, label: "Dicks Sporting Goods" },
84
+ { value: 90, label: "FGL Sports" },
85
+ { value: 82, label: "Foot Asylum" },
86
+ { value: 76, label: "Hervis" },
87
+ { value: 64, label: "Lovell Rugby" },
88
+ { value: 64, label: "Modells Sporting Goods" },
89
+ ]
90
+
91
+ return (
92
+ <SpsBarChart
93
+ chartData={data}
94
+ chartHeight={364}
95
+ chartWidth={838}
96
+ barFillColor1 = "#9B4B87"
97
+ barFillColor2 = "#9B4B8780"
98
+ barFillColorHover = "#7C3C6C"
99
+ yAxis={{
100
+ tickValues: 'value',
101
+ tickCount: 5,
102
+ }}
103
+ xAxis={{
104
+ tickValues: 'label',
105
+ }}
106
+ yMaxValue={125}
107
+ barSize={45}
108
+ />
109
+ )
110
+ }
111
+ `}}}},Y1={barFillColor1:"string",barFillColor2:"string",barFillColorHover:"string",chartData:"ChartDataObject[]",chartHeight:"number",chartWidth:"number",barSize:"number",yAxis:"ChartAxis",xAxis:"ChartAxis",marginLeft:"number",xMaxValue:"number",xTickFormat:"(i: number) => string"};function io(e){const{barFillColor1:t=pe.colors.blue200,barFillColor2:n="#007DB880",barFillColorHover:r=pe.colors.blue300,chartData:a=[],chartHeight:i=0,chartWidth:s=0,barSize:o,yAxis:l={tickValues:"label"},xAxis:u={tickValues:"value",tickCount:3},marginLeft:c=30,xMaxValue:f,xTickFormat:h}=e,p={top:30,bottom:30,left:c,right:30},d=s-p.left-p.right,v=i-p.top-p.bottom,x=k=>k[u.tickValues],g=k=>k[l.tickValues],b=Mn({range:[0,v],round:!0,domain:a.map(g),padding:.4}),_=Yt({range:[0,d],round:!0,domain:[0,f||Math.max(...a.map(x))]}),M=(k,C)=>P=>k(C(P)),y=M(_,x),S=M(b,g),T=Fn(),$=Fn();return z.createElement("svg",{width:s,height:i,className:"sps-chart-wrapper"},z.createElement(gf,{scale:_,left:p.left,height:v,stroke:pe.colors.gray400,strokeOpacity:.2}),z.createElement(Cn,{id:$,from:"#D2D4D580",to:"#D2D4D5",vertical:!1}),z.createElement(Cn,{id:T,from:n,to:t,vertical:!1}),a.map((k,C)=>{const P=y(k),N=Fn();return z.createElement(rn,{key:C},z.createElement("rect",{x:p.left,y:S(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:d,fill:`url(#${$})`}),z.createElement(ul,{id:N,right:!0,radius:4,x:p.left,y:S(k)+(o?(b.bandwidth()-o)/2:0),height:o||b.bandwidth(),width:P,fill:`url(#${T})`,onMouseEnter:A=>{const R=A.target;R.style.fill=r},onMouseLeave:A=>{const R=A.target;R.style.fill=""}}),z.createElement(hf,{scale:b,left:p.left,hideTicks:!0,hideAxisLine:!0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"end",fontSize:"12px",fill:pe.colors.gray400,fontWeight:"200",width:p.left,verticalAnchor:"middle"})}),z.createElement(Xa,{top:v,scale:_,left:p.left,hideTicks:!0,numTicks:u.tickCount,tickFormat:h||void 0,stroke:pe.colors.gray300,tickLabelProps:()=>({textAnchor:"middle",fontSize:"12px",fontWeight:"200",fill:pe.colors.gray400})}),z.createElement(tn.SpsTooltip,{for:N},k.label))}))}Object.assign(io,{props:Y1,displayName:"SpsHorizontalBarChart"});function bf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=bf(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xf(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=bf(e))&&(r&&(r+=" "),r+=t);return r}var V1=["flexDirection","alignItems","margin","display","children"];function ao(){return ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ao.apply(this,arguments)}function G1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function _f(e){var t=e.flexDirection,n=t===void 0?"row":t,r=e.alignItems,a=r===void 0?"center":r,i=e.margin,s=i===void 0?"0":i,o=e.display,l=o===void 0?"flex":o,u=e.children,c=G1(e,V1);return m.createElement("div",ao({className:"visx-legend-item",style:{display:l,alignItems:a,flexDirection:n,margin:s}},c),u)}_f.propTypes={alignItems:w.string,margin:w.oneOfType([w.string,w.number]),children:w.node,display:w.string};var K1=["flex","label","margin","align","children"];function oo(){return oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oo.apply(this,arguments)}function X1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function wf(e){var t=e.flex,n=t===void 0?"1":t,r=e.label,a=e.margin,i=a===void 0?"5px 0":a,s=e.align,o=s===void 0?"left":s,l=e.children,u=X1(e,K1);return m.createElement("div",oo({className:"visx-legend-label",style:{justifyContent:o,display:"flex",flex:n,margin:i}},u),l||r)}wf.propTypes={align:w.string,label:w.node,flex:w.oneOfType([w.string,w.number]),margin:w.oneOfType([w.string,w.number]),children:w.node};function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},so.apply(this,arguments)}function lo(e){var t=e.fill,n=e.width,r=e.height,a=e.style;return m.createElement("div",{style:so({width:n,height:r,background:t},a)})}lo.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Sf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof n=="string"||typeof n>"u"?0:n,s=typeof r=="string"||typeof r>"u"?0:r,o=Math.max(i,s),l=o/2;return m.createElement("svg",{width:o,height:o},m.createElement(Ge,{top:l,left:l},m.createElement("circle",{r:l,fill:t,style:a})))}Sf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function Tf(e){var t=e.fill,n=e.width,r=e.height,a=e.style,i=typeof r=="string"||typeof r>"u"?0:r,s=typeof(a==null?void 0:a.strokeWidth)=="number"?a==null?void 0:a.strokeWidth:2;return m.createElement("svg",{width:n,height:r},m.createElement(Ge,{top:i/2-s/2},m.createElement("line",{x1:0,x2:n,y1:0,y2:0,stroke:t,strokeWidth:s,style:a})))}Tf.propTypes={fill:w.string,width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function In(){return In=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},In.apply(this,arguments)}var uo=function(){};function Z1(e){var t=e.shape,n=t===void 0?"rect":t,r=e.fill,a=r===void 0?uo:r,i=e.size,s=i===void 0?uo:i,o=e.width,l=e.height,u=e.label,c=e.item,f=e.itemIndex,h=e.shapeStyle,p=h===void 0?uo:h,d={width:o,height:l,item:c,itemIndex:f,label:u,fill:a(In({},u)),size:s(In({},u)),style:p(In({},u))};return typeof n=="string"?n==="circle"?m.createElement(Sf,d):n==="line"?m.createElement(Tf,d):m.createElement(lo,d):m.isValidElement(n)?m.cloneElement(n,d):n?m.createElement(n,d):null}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}function Of(e){var t=e.shape,n=t===void 0?lo:t,r=e.width,a=e.height,i=e.margin,s=e.label,o=e.item,l=e.itemIndex,u=e.fill,c=e.size,f=e.shapeStyle;return m.createElement("div",{className:"visx-legend-shape",style:{display:"flex",width:c?c(qr({},s)):r,height:c?c(qr({},s)):a,margin:i}},Z1({shape:n,item:o,itemIndex:l,label:s,width:r,height:a,fill:u,shapeStyle:f}))}Of.propTypes={itemIndex:w.number.isRequired,margin:w.oneOfType([w.string,w.number]),width:w.oneOfType([w.string,w.number]),height:w.oneOfType([w.string,w.number])};function kf(e){return e&&typeof e=="object"&&"value"in e&&typeof e.value<"u"?e.value:e}function Mf(e){return String(kf(e))}function Q1(e){var t=e.scale,n=e.labelFormat;return function(r,a){return{datum:r,index:a,text:""+n(r,a),value:t(r)}}}var J1=["className","style","scale","shape","domain","fill","size","labelFormat","labelTransform","shapeWidth","shapeHeight","shapeMargin","shapeStyle","labelAlign","labelFlex","labelMargin","itemMargin","direction","itemDirection","legendLabelProps","children"];function Rn(){return Rn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rn.apply(this,arguments)}function ex(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var tx={display:"flex"};function $f(e){var t=e.className,n=e.style,r=n===void 0?tx:n,a=e.scale,i=e.shape,s=e.domain,o=e.fill,l=o===void 0?Mf:o,u=e.size,c=u===void 0?Mf:u,f=e.labelFormat,h=f===void 0?kf:f,p=e.labelTransform,d=p===void 0?Q1:p,v=e.shapeWidth,x=v===void 0?15:v,g=e.shapeHeight,b=g===void 0?15:g,_=e.shapeMargin,M=_===void 0?"2px 4px 2px 0":_,y=e.shapeStyle,S=e.labelAlign,T=S===void 0?"left":S,$=e.labelFlex,k=$===void 0?"1":$,C=e.labelMargin,P=C===void 0?"0 4px":C,N=e.itemMargin,A=N===void 0?"0":N,R=e.direction,X=R===void 0?"column":R,U=e.itemDirection,Z=U===void 0?"row":U,ee=e.legendLabelProps,K=e.children,E=ex(e,J1),D=s||("domain"in a?a.domain():[]),B=d({scale:a,labelFormat:h}),W=D.map(B);return K?m.createElement(m.Fragment,null,K(W)):m.createElement("div",{className:ve("visx-legend",t),style:Rn({},r,{flexDirection:X})},W.map(function(F,I){return m.createElement(_f,Rn({key:"legend-"+F.text+"-"+I,margin:A,flexDirection:Z},E),m.createElement(Of,{shape:i,height:b,width:x,margin:M,item:D[I],itemIndex:I,label:F,fill:l,size:c,shapeStyle:y}),m.createElement(wf,Rn({label:F.text,flex:k,margin:P,align:T},ee)))}))}$f.propTypes={children:w.func,className:w.string,domain:w.array,shapeWidth:w.oneOfType([w.string,w.number]),shapeHeight:w.oneOfType([w.string,w.number]),shapeMargin:w.oneOfType([w.string,w.number]),labelAlign:w.string,labelFlex:w.oneOfType([w.string,w.number]),labelMargin:w.oneOfType([w.string,w.number]),itemMargin:w.oneOfType([w.string,w.number]),fill:w.func,size:w.func,shapeStyle:w.func};function Cf(e){return m.createElement($f,e)}const nx={chartData:"ChartDataProps[]",chartHeight:"number",chartWidth:"number",milestones:"MilestonesType[]",useAbsoluteLegend:"boolean",barTooltip:"(props: BarTooltipProps) => JSX.Element"};function co(e){const t=tn.useElementId(),{chartData:n=[],chartHeight:r=0,chartWidth:a=0,milestones:i,barTooltip:s,useAbsoluteLegend:o}=e,l={top:25,bottom:40,left:30,right:30};function u(T,$){const k=parseInt(T.slice(1,3),16),C=parseInt(T.slice(3,5),16),P=parseInt(T.slice(5,7),16);return`rgba(${k}, ${C}, ${P}, ${$})`}const c=n.map(T=>T.color),f=n.map(T=>T.label),h=n.map(T=>T.value),p=h.reduce((T,$)=>T+$,0),d=h.map(T=>Math.round(T/p*100*10)/10),v=Yt({domain:[0,100],nice:!0}),x=[n.reduce((T,$)=>Object.assign(T,{[$.label]:$.value}),{})],g=[n.reduce((T,$,k)=>Object.assign(T,{[$.label]:d[k]}),{})],b=Mn({domain:x,padding:.2}),_=Cr({domain:f.map(T=>`${T}: ${(o?x:g)[0][T]}%`),range:[...c]}),M=a-l.left-l.right,y=r-l.top-l.bottom;v.rangeRound([0,M]),b.rangeRound([y,0]);const S=T=>`${T}%`;return z.createElement("div",{style:{width:a},className:"position-relative"},z.createElement(Cf,{className:"fs-12 lh-18 gray600",scale:_,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),i&&!(i!=null&&i.every(T=>T===void 0))&&z.createElement("div",{className:"position-absolute",style:{top:"26px",width:`${a-l.left-l.right}px`,margin:`0 ${l.left}px`,height:"12px"}},i.map(T=>z.createElement("i",{key:`${t.current}_${T.label}`,className:xf("sps-icon sps-icon-chevron-down fs-14 position-absolute",T.color),style:{left:`calc(${T.value}% - 5px)`}}))),z.createElement("svg",{width:a,height:r},z.createElement(rn,{top:l.top,left:l.left},z.createElement(_p,{data:g,keys:f,height:y,y:()=>"",xScale:v,yScale:b,color:_},T=>T.map($=>$.bars.map(k=>{let C=0;k.x===0||T.length-1===$.index?C=k.width-1.5:C=k.width-3,C<0&&(C=0);const P=`${t.current}_${k.key}`,N=k.key?k.key.toUpperCase():"",A=x[0][$.key]?x[0][$.key].toLocaleString():"";return z.createElement(rn,{key:`barstack-horizontal-${$.index}-${k.index}`},z.createElement(Cn,{id:`gradient-${$.index}`,vertical:!1,from:u(k.color,.5),to:k.color}),z.createElement("rect",{id:P,x:k.x!==0?k.x+1.5:k.x,y:k.y,width:C,height:20,fill:`url(#gradient-${$.index})`},s&&z.createElement(tn.SpsTooltip,{for:P},z.createElement(s,{label:N,absoluteValue:A,relativeValue:g[0][$.key]}))))}))),z.createElement(Xa,{top:y+6,tickFormat:S,scale:v,stroke:pe.colors.gray400,tickStroke:pe.colors.gray400,tickLength:4,tickLineProps:{y1:-11,y2:5},tickLabelProps:()=>({fill:pe.colors.gray400,fontSize:12,textAnchor:"middle"})}))),i&&!i.every(T=>T===void 0)&&z.createElement("footer",{className:"fs-12 lh-18 gray600 d-flex justify-content-center"},i.map(T=>z.createElement("span",{key:`${t.current}_${T.label}`,className:"d-flex align-items-center ml-3"},z.createElement("i",{className:xf("sps-icon sps-icon-chevron-down fs-14 mr-1",T.color)}),T.label,":",z.createElement("span",{className:"sps-text-semibold gray600 ml-1"},T.value,"%")))))}Object.assign(co,{props:nx,displayName:"SpsStackedHorizontalBarChart"});const Ef={basic:{label:"Basic",description:tt.code`
112
+ <p>Stacked horizontal bar chart example.</p>
113
+ `,examples:{basic:{react:tt.code`
114
+ import { SpsStackedHorizontalBarChart } from "@spscommerce/ds-react-charts";
115
+ function DemoComponent() {
116
+ const data = [
117
+ {label: 'Label 1', value: 0.9, color: '#6c5efb'},
118
+ {label: 'Label 2', value: 7, color: '#ff9632'},
119
+ {label: 'Label 3', value: 15, color: '#a44afe'},
120
+ {label: 'Label 4', value: 0, color: '#32be6f'},
121
+ {label: 'Label 5', value: 10, color: '#a5a9ab'}
122
+ ];
123
+
124
+ const BarTooltip = ({ label, absoluteValue, relativeValue }) => (
125
+ <>
126
+ <div className="font-weight-bold">{label}</div>
127
+ <div>Percentage: {relativeValue}%</div>
128
+ <div>Count: {absoluteValue}</div>
129
+ </>
130
+ )
131
+
132
+ return (
133
+ <SpsStackedHorizontalBarChart
134
+ chartData={data}
135
+ chartHeight={100}
136
+ chartWidth={800}
137
+ barTooltip={BarTooltip}
138
+ />
139
+ )
140
+ }
141
+ `},vertical:{react:tt.code`
142
+ import { SpsStackedHorizontalBarChart } from "@spscommerce/ds-react-charts";
143
+ function DemoComponent() {
144
+ const chartData = [
145
+ {label: 'Label 1', value: 10, color: '#6c5efb'},
146
+ {label: 'Label 2', value: 7, color: '#ff9632'},
147
+ {label: 'Label 3', value: 35, color: '#a44afe'},
148
+ {label: 'Label 4', value: 29, color: '#32be6f'},
149
+ {label: 'Label 5', value: 19, color: '#a5a9ab'}
150
+ ];
151
+
152
+ const milestonesData = [
153
+ {label: 'Current Total', value: 81, color: StackedBarChartMilestone.GREEN},
154
+ {label: 'Current Target', value: 67, color: StackedBarChartMilestone.GRAY},
155
+ {label: 'Goal', value: 99, color: StackedBarChartMilestone.RED}
156
+ ]
157
+
158
+ return (
159
+ <SpsStackedHorizontalBarChart
160
+ chartData={chartData}
161
+ chartHeight={100}
162
+ chartWidth={800}
163
+ milestones={milestonesData}
164
+ />
165
+ )
166
+ }
167
+ `}}}};function fo(e,t,n){var r,a,i,s,o;t==null&&(t=100);function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(i,a),i=a=null))}var u=function(){i=this,a=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(i,a),i=a=null),o};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(o=e.apply(i,a),i=a=null,clearTimeout(r),r=null)},u}fo.debounce=fo;var rx=fo;const Pf=Dt(rx);function ix(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:a}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=r||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,o]=m.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=m.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s}),u=t?typeof t=="number"?t:t.scroll:null,c=t?typeof t=="number"?t:t.resize:null,f=m.useRef(!1);m.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[h,p,d]=m.useMemo(()=>{const b=()=>{if(!l.current.element)return;const{left:_,top:M,width:y,height:S,bottom:T,right:$,x:k,y:C}=l.current.element.getBoundingClientRect(),P={left:_,top:M,width:y,height:S,bottom:T,right:$,x:k,y:C};l.current.element instanceof HTMLElement&&a&&(P.height=l.current.element.offsetHeight,P.width=l.current.element.offsetWidth),Object.freeze(P),f.current&&!lx(l.current.lastBounds,P)&&o(l.current.lastBounds=P)};return[b,c?Pf(b,c):b,u?Pf(b,u):b]},[o,a,u,c]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(b=>b.removeEventListener("scroll",d,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new i(d),l.current.resizeObserver.observe(l.current.element),n&&l.current.scrollContainers&&l.current.scrollContainers.forEach(b=>b.addEventListener("scroll",d,{capture:!0,passive:!0})))}const g=b=>{!b||b===l.current.element||(v(),l.current.element=b,l.current.scrollContainers=Nf(b),x())};return ox(d,!!n),ax(p),m.useEffect(()=>{v(),x()},[n,d,p]),m.useEffect(()=>v,[]),[g,s,h]}function ax(e){m.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function ox(e,t){m.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Nf(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:a}=window.getComputedStyle(e);return[n,r,a].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Nf(e.parentElement)]}const sx=["x","y","top","bottom","left","right","width","height"],lx=(e,t)=>sx.every(n=>e[n]===t[n]),Lf=pt(d1);function ux(e){return!!e&&e instanceof Element}function cx(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function fx(e){return!!e&&"createSVGPoint"in e}function hx(e){return!!e&&"getScreenCTM"in e}function dx(e){return!!e&&"changedTouches"in e}function px(e){return!!e&&"clientX"in e}function vx(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function Wn(){return Wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wn.apply(this,arguments)}var ho={x:0,y:0};function mx(e){if(!e)return Wn({},ho);if(dx(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:Wn({},ho);if(px(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:Wn({},ho)}function Af(e,t){if(!e||!t)return null;var n=mx(t),r=cx(e)?e.ownerSVGElement:e,a=hx(r)?r.getScreenCTM():null;if(fx(r)&&a){var i=r.createSVGPoint();return i.x=n.x,i.y=n.y,i=i.matrixTransform(a.inverse()),new He({x:i.x,y:i.y})}var s=e.getBoundingClientRect();return new He({x:n.x-s.left-e.clientLeft,y:n.y-s.top-e.clientTop})}function gx(e,t){if(ux(e)&&t)return Af(e,t);if(vx(e)){var n=e,r=n.target;if(r)return Af(r,n)}return null}var Ue=m.createContext({});function po(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function Se(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const Df=pt(sp),zf=pt(Yg);var yx=["AxisComponent"];function Yr(){return Yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yr.apply(this,arguments)}function bx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function xx(e){var t,n,r,a,i,s,o,l=e.AxisComponent,u=bx(e,yx),c=m.useContext(Ue),f=c.theme,h=c.xScale,p=c.yScale,d=c.margin,v=c.width,x=c.height,g=u.orientation,b=m.useMemo(function(){var $,k,C,P;return g==="left"||g==="right"?f==null||($=f.axisStyles)==null||(k=$.y)==null?void 0:k[g]:f==null||(C=f.axisStyles)==null||(P=C.x)==null?void 0:P[g]},[f,g]),_=u.tickLabelProps,M=m.useMemo(function(){return _||b?function($,k,C){return Yr({},b==null?void 0:b.tickLabel,{width:g==="left"||g==="right"?d==null?void 0:d[g]:void 0},typeof _=="function"?_($,k,C):_)}:void 0},[_,b,g,d]),y=g==="bottom"?(x??0)-((t=d==null?void 0:d.bottom)!=null?t:0):g==="top"&&(n=d==null?void 0:d.top)!=null?n:0,S=g==="left"?(r=d==null?void 0:d.left)!=null?r:0:g==="right"?(v??0)-((a=d==null?void 0:d.right)!=null?a:0):0,T=g==="left"||g==="right"?p:h;return T?m.createElement(l,Yr({top:y,left:S,labelProps:b==null?void 0:b.axisLabel,stroke:b==null||(i=b.axisLine)==null?void 0:i.stroke,strokeWidth:b==null||(s=b.axisLine)==null?void 0:s.strokeWidth,tickLength:b==null?void 0:b.tickLength,tickStroke:b==null||(o=b.tickLine)==null?void 0:o.stroke},u,{tickLabelProps:M,scale:T})):null}var Vr={};Vr.__esModule=!0,Vr.default=_x;function _x(e){return"bandwidth"in e?e.bandwidth():0}var wx=Wf,jf=Bn(er),Ff=Bn(m),Sx=Bn(nn),Tx=Bn(Br),Ox=Df,If=Lf,Rf=zf,kx=Bn(Vr),Mx=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Bn(e){return e&&e.__esModule?e:{default:e}}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vo.apply(this,arguments)}function $x(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Wf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.children,d=e.numTicks,v=d===void 0?10:d,x=e.lineStyle,g=e.offset,b=e.tickValues,_=$x(e,Mx),M=b??(0,Rf.getTicks)(i,v),y=(g??0)+(0,kx.default)(i)/2,S=M.map(function(T,$){var k,C=((k=(0,Rf.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new If.Point({x:0,y:C}),to:new If.Point({x:s,y:C})}});return Ff.default.createElement(Ox.Group,{className:(0,Sx.default)("visx-rows",h),top:n,left:a},p?p({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return Ff.default.createElement(Tx.default,vo({key:"row-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:x},_))}))}Wf.propTypes={tickValues:jf.default.array,width:jf.default.number.isRequired};var Cx=Yf,Bf=Hn(er),Hf=Hn(m),Ex=Hn(nn),Px=Hn(Br),Nx=Df,Uf=Lf,qf=zf,Lx=Hn(Vr),Ax=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Hn(e){return e&&e.__esModule?e:{default:e}}function mo(){return mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mo.apply(this,arguments)}function Dx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Yf(e){var t=e.top,n=t===void 0?0:t,r=e.left,a=r===void 0?0:r,i=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,f=e.strokeDasharray,h=e.className,p=e.numTicks,d=p===void 0?10:p,v=e.lineStyle,x=e.offset,g=e.tickValues,b=e.children,_=Dx(e,Ax),M=g??(0,qf.getTicks)(i,d),y=(x??0)+(0,Lx.default)(i)/2,S=M.map(function(T,$){var k,C=((k=(0,qf.coerceNumber)(i(T)))!=null?k:0)+y;return{index:$,from:new Uf.Point({x:C,y:0}),to:new Uf.Point({x:C,y:s})}});return Hf.default.createElement(Nx.Group,{className:(0,Ex.default)("visx-columns",h),top:n,left:a},b?b({lines:S}):S.map(function(T){var $=T.from,k=T.to,C=T.index;return Hf.default.createElement(Px.default,mo({key:"column-line-"+C,from:$,to:k,stroke:l,strokeWidth:c,strokeDasharray:f,style:v},_))}))}Yf.propTypes={tickValues:Bf.default.array,height:Bf.default.number.isRequired};var zx=["rows","columns","GridRowsComponent","GridColumnsComponent"];function Gr(){return Gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gr.apply(this,arguments)}function jx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Vf(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,a=r===void 0?!0:r,i=e.GridRowsComponent,s=e.GridColumnsComponent,o=jx(e,zx),l=m.useContext(Ue),u=l.theme,c=l.xScale,f=l.yScale,h=l.margin,p=l.innerWidth,d=l.innerHeight,v=u==null?void 0:u.gridStyles;return m.createElement(m.Fragment,null,n&&f&&p!=null&&m.createElement(i,Gr({left:h==null?void 0:h.left,lineStyle:v,width:p,scale:f},o)),a&&c&&d!=null&&m.createElement(s,Gr({top:h==null?void 0:h.top,lineStyle:v,height:d,scale:c},o)))}Vf.propTypes={rows:w.bool,columns:w.bool};function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},go.apply(this,arguments)}function Gf(e){return m.createElement(xx,go({AxisComponent:Ka},e))}function yo(){return yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yo.apply(this,arguments)}function Fx(e){return m.createElement(Vf,yo({GridRowsComponent:wx,GridColumnsComponent:Cx},e))}var Ix=["tooltipOpen"];function Rx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Kr(){return Kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kr.apply(this,arguments)}function Wx(e){var t=m.useState(Kr({tooltipOpen:!1},e)),n=t[0],r=t[1],a=m.useCallback(function(s){return r(typeof s=="function"?function(o){o.tooltipOpen;var l=Rx(o,Ix);return Kr({},s(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:s.tooltipLeft,tooltipTop:s.tooltipTop,tooltipData:s.tooltipData})},[r]),i=m.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:a,hideTooltip:i}}function Bx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,bo(e,t)}function bo(e,t){return bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bo(e,t)}var Kf=function(e){Bx(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?os.createPortal(this.props.children,this.node):null},t}(m.PureComponent);Kf.propTypes={zIndex:w.oneOfType([w.number,w.string])};var Hx=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function Xr(){return Xr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xr.apply(this,arguments)}function Ux(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var xo={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Zr=m.forwardRef(function(e,t){var n=e.className,r=e.top,a=e.left,i=e.offsetLeft,s=i===void 0?10:i,o=e.offsetTop,l=o===void 0?10:o,u=e.style,c=u===void 0?xo:u,f=e.children,h=e.unstyled,p=h===void 0?!1:h,d=e.applyPositionStyle,v=d===void 0?!1:d,x=Ux(e,Hx);return m.createElement("div",Xr({ref:t,className:ve("visx-tooltip",n),style:Xr({top:r==null||l==null?r:r+l,left:a==null||s==null?a:a+s},v&&{position:"absolute"},!p&&c)},x),f)});Zr.propTypes={children:w.node,className:w.string,left:w.number,offsetLeft:w.number,offsetTop:w.number,top:w.number,applyPositionStyle:w.bool,unstyled:w.bool},Zr.displayName="Tooltip";function _o(){return _o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_o.apply(this,arguments)}function qx(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,wo(e,t)}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},wo(e,t)}var Xf={top:0,right:0,bottom:0,left:0,width:0,height:0};function Vx(e){var t;return t=function(n){Yx(r,n);function r(i){var s;return s=n.call(this,i)||this,s.state={rect:void 0,parentRect:void 0},s.nodeRef=m.createRef(),s.getRects=s.getRects.bind(qx(s)),s}var a=r.prototype;return a.componentDidMount=function(){var s,o=this;this.node=(s=this.nodeRef)!=null&&s.current?this.nodeRef.current:os.findDOMNode(this),this.setState(function(){return o.getRects()})},a.getRects=function(){if(!this.node)return this.state;var s=this.node,o=s.parentNode,l=s.getBoundingClientRect?s.getBoundingClientRect():Xf,u=o!=null&&o.getBoundingClientRect?o.getBoundingClientRect():Xf;return{rect:l,parentRect:u}},a.render=function(){return m.createElement(e,_o({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(m.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var Zf=m.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),Gx=Zf.Provider;Zf.Consumer;var Kx=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Qr(){return Qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qr.apply(this,arguments)}function Xx(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Qf(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,a=e.offsetLeft,i=a===void 0?10:a,s=e.offsetTop,o=s===void 0?10:s,l=e.parentRect,u=e.rect,c=e.style,f=c===void 0?xo:c,h=e.top,p=h===void 0?0:h,d=e.unstyled,v=d===void 0?!1:d,x=e.nodeRef,g=Xx(e,Kx),b,_=!1,M=!1;if(u&&l){var y=r,S=p;if(l.width){var T=y+i+u.width-l.width,$=u.width-y-i;_=T>0&&T>$}else{var k=y+i+u.width-window.innerWidth,C=u.width-y-i;_=k>0&&k>C}if(l.height){var P=S+o+u.height-l.height,N=u.height-S-o;M=P>0&&P>N}else M=S+o+u.height>window.innerHeight;y=_?y-u.width-i:y+i,S=M?S-u.height-o:S+o,y=Math.round(y),S=Math.round(S),b="translate("+y+"px, "+S+"px)"}return m.createElement(Zr,Qr({ref:x,style:Qr({left:0,top:0,transform:b},!v&&f)},g),m.createElement(Gx,{value:{isFlippedVertically:!M,isFlippedHorizontally:!_}},t))}Qf.propTypes={nodeRef:w.oneOfType([w.string,w.func,w.object])};const Zx=Vx(Qf);var Qx=["detectBounds","zIndex"],Jx=["left","top","detectBounds","zIndex"];function So(){return So=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},So.apply(this,arguments)}function Jf(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function e_(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,a=t.zIndex,i=Jf(t,Qx),s=ix(i),o=s[0],l=s[1],u=s[2],c=m.useState(!1),f=c[0],h=c[1];m.useEffect(function(){h(!1)},[]);var p=m.useMemo(function(){return function(d){var v=d.left,x=v===void 0?0:v,g=d.top,b=g===void 0?0:g,_=d.detectBounds,M=d.zIndex,y=Jf(d,Jx),S=_??r,T=M??a,$=S?Zx:Zr,k=f?0:window.scrollX,C=f?0:window.scrollY,P=x+(l.left||0)+k,N=b+(l.top||0)+C;return m.createElement(Kf,{zIndex:T},m.createElement($,So({left:P,top:N},y)))}},[r,a,l.left,l.top,f]);return{containerRef:o,containerBounds:l,forceRefreshBounds:u,TooltipInPortal:p}}var Un=m.createContext(null),t_=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],n_=["x","y"];function eh(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},et.apply(this,arguments)}var To={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},r_={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function th(e){var t=m.useContext(Ue)||{},n=t.theme;return m.createElement("circle",et({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}th.propTypes={isNearestDatum:w.bool.isRequired};function i_(e){return m.createElement(th,e)}function nh(e){var t,n,r,a,i,s,o,l,u,c,f,h,p,d=e.debounce,v=e.detectBounds,x=e.horizontalCrosshairStyle,g=e.glyphStyle,b=e.renderTooltip,_=e.renderGlyph,M=_===void 0?i_:_,y=e.resizeObserverPolyfill,S=e.scroll,T=S===void 0?!0:S,$=e.showDatumGlyph,k=$===void 0?!1:$,C=e.showHorizontalCrosshair,P=C===void 0?!1:C,N=e.showSeriesGlyphs,A=N===void 0?!1:N,R=e.showVerticalCrosshair,X=R===void 0?!1:R,U=e.snapTooltipToDatumX,Z=U===void 0?!1:U,ee=e.snapTooltipToDatumY,K=ee===void 0?!1:ee,E=e.verticalCrosshairStyle,D=e.zIndex,B=eh(e,t_),W=m.useContext(Ue)||{},F=W.colorScale,I=W.theme,q=W.innerHeight,Y=W.innerWidth,G=W.margin,L=W.xScale,j=W.yScale,H=W.dataRegistry,O=W.resizeObserverPolyfill,Q=m.useContext(Un),te=e_({debounce:d,detectBounds:v,polyfill:O||y,scroll:T,zIndex:D}),le=te.containerRef,de=te.TooltipInPortal,qe=te.forceRefreshBounds,oi=m.useCallback(function(Pe){var Ve;le((Ve=Pe==null?void 0:Pe.parentElement)!=null?Ve:null)},[le]),Eh=Q!=null&&Q.tooltipOpen?b(et({},Q,{colorScale:F})):null,en=(Q==null?void 0:Q.tooltipOpen)&&Eh!=null,Ph=m.useRef(!1);m.useEffect(function(){en&&!Ph.current&&qe(),Ph.current=en},[en,qe]);var si=Q==null?void 0:Q.tooltipLeft,li=Q==null?void 0:Q.tooltipTop,Nh=L?po(L):0,Lh=j?po(j):0,rs=m.useCallback(function(Pe,Ve){var Lt,At,Fe=H==null?void 0:H.get(Pe),Xn=Fe==null?void 0:Fe.xAccessor,ui=Fe==null?void 0:Fe.yAccessor,as=L&&Xn?(Lt=Number(L(Xn(Ve)))+Nh/2)!=null?Lt:0:void 0,ci=j&&ui?(At=Number(j(ui(Ve)))+Lh/2)!=null?At:0:void 0;return{left:as,top:ci}},[H,Nh,Lh,L,j]),Ye=Q==null||(t=Q.tooltipData)==null?void 0:t.nearestDatum,Kn=(n=Ye==null?void 0:Ye.key)!=null?n:"";if(en&&Ye&&(Z||K)){var Ah=rs(Kn,Ye.datum),Dh=Ah.left,zh=Ah.top;si=Z&&Se(Dh)?Dh:si,li=K&&Se(zh)?zh:li}var is=[];if(en&&(k||A)){var jh,Fh=Number((jh=g==null?void 0:g.radius)!=null?jh:4);if(A){var Ih,Rh;Object.values((Ih=Q==null||(Rh=Q.tooltipData)==null?void 0:Rh.datumByKey)!=null?Ih:{}).forEach(function(Pe){var Ve,Lt,At,Fe=Pe.key,Xn=Pe.datum,ui=Pe.index,as=(Ve=(Lt=F==null?void 0:F(Fe))!=null?Lt:I==null||(At=I.htmlLabel)==null?void 0:At.color)!=null?Ve:"#222",ci=rs(Fe,Xn),Xh=ci.left,Zh=ci.top;!Se(Xh)||!Se(Zh)||is.push({key:Fe,color:as,datum:Xn,index:ui,size:Fh,x:Xh,y:Zh,glyphStyle:g,isNearestDatum:Ye?Ye.key===Fe:!1})})}else if(Ye){var Wh=rs(Kn,Ye.datum),Bh=Wh.left,Hh=Wh.top;if(Se(Bh)&&Se(Hh)){var Uh,qh,Yh,Vh,Gh,Kh,yS=(Uh=(qh=(Yh=(Vh=Kn&&(F==null?void 0:F(Kn)))!=null?Vh:null)!=null?Yh:I==null||(Gh=I.gridStyles)==null?void 0:Gh.stroke)!=null?qh:I==null||(Kh=I.htmlLabel)==null?void 0:Kh.color)!=null?Uh:"#222";is.push({key:Kn,color:yS,datum:Ye.datum,index:Ye.index,size:Fh,x:Bh,y:Hh,glyphStyle:g,isNearestDatum:!0})}}}return m.createElement(m.Fragment,null,m.createElement("svg",{ref:oi,style:r_}),en&&m.createElement(m.Fragment,null,X&&m.createElement(de,{className:"visx-crosshair visx-crosshair-vertical",left:si,top:G==null?void 0:G.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{width:"1",height:q,overflow:"visible"},m.createElement("line",et({x1:0,x2:0,y1:0,y2:q,strokeWidth:1.5,stroke:(r=(a=I==null||(i=I.gridStyles)==null?void 0:i.stroke)!=null?a:I==null||(s=I.htmlLabel)==null?void 0:s.color)!=null?r:"#222"},E)))),P&&m.createElement(de,{className:"visx-crosshair visx-crosshair-horizontal",left:G==null?void 0:G.left,top:li,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{width:Y,height:"1",overflow:"visible"},m.createElement("line",et({x1:0,x2:Y,y1:0,y2:0,strokeWidth:1.5,stroke:(o=(l=I==null||(u=I.gridStyles)==null?void 0:u.stroke)!=null?l:I==null||(c=I.htmlLabel)==null?void 0:c.color)!=null?o:"#222"},x)))),is.map(function(Pe,Ve){var Lt=Pe.x,At=Pe.y,Fe=eh(Pe,n_);return m.createElement(de,{key:Ve,className:"visx-tooltip-glyph",left:Lt,top:At,offsetLeft:0,offsetTop:0,detectBounds:!1,style:To},m.createElement("svg",{overflow:"visible"},M(et({x:0,y:0},Fe))))}),m.createElement(de,et({left:si,top:li,style:et({},xo,{background:(f=I==null?void 0:I.backgroundColor)!=null?f:"white",boxShadow:"0 1px 2px "+(I!=null&&(h=I.htmlLabel)!=null&&h.color?(I==null||(p=I.htmlLabel)==null?void 0:p.color)+"55":"#22222255")},I==null?void 0:I.htmlLabel)},B),Eh)))}nh.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};function rh(e){var t=m.useContext(Un);return t!=null&&t.tooltipOpen?m.createElement(nh,e):null}rh.propTypes={renderTooltip:w.func.isRequired,renderGlyph:w.func,snapTooltipToDatumX:w.bool,snapTooltipToDatumY:w.bool,showVerticalCrosshair:w.bool,showHorizontalCrosshair:w.bool,showDatumGlyph:w.bool,showSeriesGlyphs:w.bool};var Oo={},a_=Ar,o_=function(){return a_.Date.now()},s_=o_,l_=/\s/;function u_(e){for(var t=e.length;t--&&l_.test(e.charAt(t)););return t}var c_=u_,f_=c_,h_=/^\s+/;function d_(e){return e&&e.slice(0,f_(e)+1).replace(h_,"")}var p_=d_;function v_(e){return e!=null&&typeof e=="object"}var m_=v_,g_=ef,y_=m_,b_="[object Symbol]";function x_(e){return typeof e=="symbol"||y_(e)&&g_(e)==b_}var __=x_,w_=p_,ih=Dr,S_=__,ah=NaN,T_=/^[-+]0x[0-9a-f]+$/i,O_=/^0b[01]+$/i,k_=/^0o[0-7]+$/i,M_=parseInt;function $_(e){if(typeof e=="number")return e;if(S_(e))return ah;if(ih(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ih(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=w_(e);var n=O_.test(e);return n||k_.test(e)?M_(e.slice(2),n?2:8):T_.test(e)?ah:+e}var C_=$_,E_=Dr,ko=s_,oh=C_,P_="Expected a function",N_=Math.max,L_=Math.min;function A_(e,t,n){var r,a,i,s,o,l,u=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(P_);t=oh(t)||0,E_(n)&&(c=!!n.leading,f="maxWait"in n,i=f?N_(oh(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(S){var T=r,$=a;return r=a=void 0,u=S,s=e.apply($,T),s}function d(S){return u=S,o=setTimeout(g,t),c?p(S):s}function v(S){var T=S-l,$=S-u,k=t-T;return f?L_(k,i-$):k}function x(S){var T=S-l,$=S-u;return l===void 0||T>=t||T<0||f&&$>=i}function g(){var S=ko();if(x(S))return b(S);o=setTimeout(g,v(S))}function b(S){return o=void 0,h&&r?p(S):(r=a=void 0,s)}function _(){o!==void 0&&clearTimeout(o),u=0,r=l=a=o=void 0}function M(){return o===void 0?s:b(ko())}function y(){var S=ko(),T=x(S);if(r=arguments,a=this,l=S,T){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(g,t),p(l)}return o===void 0&&(o=setTimeout(g,t)),s}return y.cancel=_,y.flush=M,y}var sh=A_;const D_=Dt(sh);Oo.__esModule=!0,Oo.default=I_;var z_=j_(sh),qn=m;function j_(e){return e&&e.__esModule?e:{default:e}}function Jr(){return Jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jr.apply(this,arguments)}var F_=[],lh={width:0,height:0,top:0,left:0};function I_(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?lh:n,a=t.debounceTime,i=a===void 0?300:a,s=t.ignoreDimensions,o=s===void 0?F_:s,l=t.enableDebounceLeadingCall,u=l===void 0?!0:l,c=t.resizeObserverPolyfill,f=(0,qn.useRef)(null),h=(0,qn.useRef)(0),p=(0,qn.useState)(Jr({},lh,r)),d=p[0],v=p[1],x=(0,qn.useMemo)(function(){var g=Array.isArray(o)?o:[o];return(0,z_.default)(function(b){v(function(_){var M=Object.keys(_),y=M.filter(function(T){return _[T]!==b[T]}),S=y.every(function(T){return g.includes(T)});return S?_:b})},i,{leading:u})},[i,u,o]);return(0,qn.useEffect)(function(){var g=c||window.ResizeObserver,b=new g(function(_){_.forEach(function(M){var y,S=(y=M==null?void 0:M.contentRect)!=null?y:{},T=S.left,$=S.top,k=S.width,C=S.height;h.current=window.requestAnimationFrame(function(){x({width:k,height:C,top:$,left:T})})})});return f.current&&b.observe(f.current),function(){window.cancelAnimationFrame(h.current),b.disconnect(),x.cancel()}},[x,c]),Jr({parentRef:f,resize:x},d)}var R_=fh,uh=Mo(er),W_=Mo(m),B_=Mo(Oo),H_=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],U_=["parentRef","resize"];function Mo(e){return e&&e.__esModule?e:{default:e}}function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ei.apply(this,arguments)}function ch(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}var q_={width:"100%",height:"100%"};function fh(e){var t=e.className,n=e.children,r=e.debounceTime,a=e.ignoreDimensions,i=e.initialSize,s=e.parentSizeStyles,o=s===void 0?q_:s,l=e.enableDebounceLeadingCall,u=l===void 0?!0:l,c=e.resizeObserverPolyfill,f=ch(e,H_),h=(0,B_.default)({initialSize:i,debounceTime:r,ignoreDimensions:a,enableDebounceLeadingCall:u,resizeObserverPolyfill:c}),p=h.parentRef,d=h.resize,v=ch(h,U_);return W_.default.createElement("div",ei({style:o,ref:p,className:t},f),n(ei({},v,{ref:p.current,resize:d})))}fh.propTypes={className:uh.default.string,children:uh.default.func.isRequired};var hh=m.createContext(null);function ft(e,t,n){var r=m.useContext(hh),a=m.useRef();a.current=n;var i=m.useCallback(function(s,o,l){r&&r.emit(s,{event:o,svgPoint:gx(o),source:l})},[r]);return m.useEffect(function(){if(r&&e&&t){var s=function(l){var u;(!a.current||l!=null&&l.source&&(u=a.current)!=null&&u.includes(l.source))&&t(l)};return r.on(e,s),function(){return r==null?void 0:r.off(e,s)}}},[r,e,t]),r?i:null}function Y_(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function V_(e){var t=e.children,n=m.useMemo(function(){return Y_()},[]);return m.createElement(hh.Provider,{value:n},t)}function $o(){return $o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$o.apply(this,arguments)}function dh(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,a=Wx(void 0),i=a.tooltipOpen,s=a.tooltipLeft,o=a.tooltipTop,l=a.tooltipData,u=a.updateTooltip,c=a.hideTooltip,f=m.useRef(null);function h(){f.current&&(f.current.cancel(),f.current=null)}m.useEffect(function(){return h},[]);var p=m.useRef(function(x){var g=x.svgPoint,b=x.index,_=x.key,M=x.datum,y=x.distanceX,S=x.distanceY;h();var T=Se(y)?y:1/0,$=Se(S)?S:1/0,k=Math.sqrt(Math.pow(T,2)+Math.pow($,2));u(function(C){var P,N,A,R=C.tooltipData,X=R!=null&&R.nearestDatum&&Se(R.nearestDatum.distance)?R.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:g==null?void 0:g.x,tooltipTop:g==null?void 0:g.y,tooltipData:{nearestDatum:((P=R==null||(N=R.nearestDatum)==null?void 0:N.key)!=null?P:"")!==_&&X<k?R==null?void 0:R.nearestDatum:{key:_,index:b,datum:M,distance:k},datumByKey:$o({},R==null?void 0:R.datumByKey,(A={},A[_]={datum:M,index:b,key:_},A))}}})}),d=m.useCallback(function(){f.current=D_(c,n),f.current()},[c,n]),v=m.useMemo(function(){return{tooltipOpen:i,tooltipLeft:s,tooltipTop:o,tooltipData:l,updateTooltip:u,showTooltip:p.current,hideTooltip:d}},[d,l,s,i,o,u]);return m.createElement(Un.Provider,{value:v},r)}dh.propTypes={hideTooltipDebounceMs:w.number,children:w.node.isRequired};const G_=pt(og);var Yn={},Co={};Co.__esModule=!0,Co.default=K_;function K_(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Eo={};Eo.__esModule=!0,Eo.default=X_;function X_(e,t){t.range&&("padding"in e,e.range(t.range))}var Po={};Po.__esModule=!0,Po.default=Z_;function Z_(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var No={};No.__esModule=!0,No.default=Q_;function Q_(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var Lo={};Lo.__esModule=!0,Lo.default=J_;function J_(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var Ao={};Ao.__esModule=!0,Ao.default=ew;function ew(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var Do={};Do.__esModule=!0,Do.default=tw;function tw(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var zo={},jo={};const ph=pt(pg);jo.__esModule=!0,jo.default=nw;var ht=ph,vh={lab:ht.interpolateLab,hcl:ht.interpolateHcl,"hcl-long":ht.interpolateHclLong,hsl:ht.interpolateHsl,"hsl-long":ht.interpolateHslLong,cubehelix:ht.interpolateCubehelix,"cubehelix-long":ht.interpolateCubehelixLong,rgb:ht.interpolateRgb};function nw(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return vh[e]}var t=e.type,n=e.gamma,r=vh[t];return typeof n>"u"?r:r.gamma(n)}zo.__esModule=!0,zo.default=aw;var rw=iw(jo);function iw(e){return e&&e.__esModule?e:{default:e}}function aw(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,rw.default)(t.interpolate);e.interpolate(n)}}var Fo={};const ow=pt(gg);var Io={};Io.__esModule=!0,Io.default=uw;var sw=new Date(Date.UTC(2020,1,2,3,4,5)),lw="%Y-%m-%d %H:%M";function uw(e){var t=e.tickFormat(1,lw)(sw);return t==="2020-02-02 03:04"}Fo.__esModule=!0,Fo.default=hw;var Te=ow,cw=fw(Io);function fw(e){return e&&e.__esModule?e:{default:e}}var mh={day:Te.timeDay,hour:Te.timeHour,minute:Te.timeMinute,month:Te.timeMonth,second:Te.timeSecond,week:Te.timeWeek,year:Te.timeYear},gh={day:Te.utcDay,hour:Te.utcHour,minute:Te.utcMinute,month:Te.utcMonth,second:Te.utcSecond,week:Te.utcWeek,year:Te.utcYear};function hw(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,a=(0,cw.default)(r);if(typeof n=="string")r.nice(a?gh[n]:mh[n]);else{var i=n.interval,s=n.step,o=(a?gh[i]:mh[i]).every(s);o!=null&&r.nice(o)}}}}var Ro={};Ro.__esModule=!0,Ro.default=dw;function dw(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var Wo={};Wo.__esModule=!0,Wo.default=pw;function pw(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var Bo={};Bo.__esModule=!0,Bo.default=mw;var vw=ph;function mw(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(vw.interpolateRound))}var Ho={};Ho.__esModule=!0,Ho.default=gw;function gw(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var Uo={};Uo.__esModule=!0,Uo.default=yw;function yw(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],a=n[1],i=a<r,s=i?[a,r]:[r,a],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(i?u.reverse():u)}}Yn.__esModule=!0,Yn.ALL_OPERATORS=void 0,Yn.default=Aw;var bw=Oe(Co),xw=Oe(Eo),_w=Oe(Po),ww=Oe(No),Sw=Oe(Lo),Tw=Oe(Ao),Ow=Oe(Do),kw=Oe(zo),Mw=Oe(Fo),$w=Oe(Ro),Cw=Oe(Wo),Ew=Oe(Bo),Pw=Oe(Ho),Nw=Oe(Uo);function Oe(e){return e&&e.__esModule?e:{default:e}}var yh=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];Yn.ALL_OPERATORS=yh;var Lw={domain:bw.default,nice:Mw.default,zero:Nw.default,interpolate:kw.default,round:Ew.default,align:_w.default,base:ww.default,clamp:Sw.default,constant:Tw.default,exponent:Ow.default,padding:$w.default,range:xw.default,reverse:Cw.default,unknown:Pw.default};function Aw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),a=yh.filter(function(i){return r.has(i)});return function(s,o){return typeof o<"u"&&a.forEach(function(l){Lw[l](s,o)}),s}}var Dw=Rw,zw=G_,jw=Fw(Yn);function Fw(e){return e&&e.__esModule?e:{default:e}}var Iw=(0,jw.default)("domain","range","reverse","unknown");function Rw(e){return Iw((0,zw.scaleOrdinal)(),e)}var dt={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},Vn=dt.gray,qo=Vn[7],Ww=[dt.cyan[9],dt.cyan[3],dt.yellow[5],dt.red[4],dt.grape[8],dt.grape[5],dt.pink[9]];function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}var Yo={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function Bw(e){var t,n,r,a,i,s,o=ae({},Yo,{fill:qo,stroke:"none"},e.svgLabelBig),l=ae({},Yo,{fontWeight:200,fontSize:11,fill:qo,stroke:"none"},e.svgLabelSmall),u=ae({color:(t=(n=(r=(a=e.htmlLabel)==null?void 0:a.color)!=null?r:(i=e.svgLabelBig)==null?void 0:i.fill)!=null?n:(s=e.svgLabelSmall)==null?void 0:s.fill)!=null?t:qo},Yo,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:ae({},u),svgLabelSmall:ae({},l),svgLabelBig:ae({},o),gridStyles:ae({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:ae({},o,{dy:"-0.25em"}),axisLine:ae({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:ae({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:ae({},o,{dx:"-1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:ae({},o,{dx:"1.25em"}),axisLine:ae({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:ae({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:ae({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const Hw=Bw({backgroundColor:"#fff",colors:Ww,tickLength:4,svgLabelSmall:{fill:Vn[7]},svgLabelBig:{fill:Vn[9]},gridColor:Vn[5],gridColorDark:Vn[9]});var Uw=m.createContext(Hw),qw=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){s.key in a.registry&&a.registry[s.key]!=null&&console.debug("Overriding data registry key",s.key),a.registry[s.key]=s,a.registryKeys=Object.keys(a.registry)})},t.unregisterData=function(r){var a=this,i=Array.isArray(r)?r:[r];i.forEach(function(s){delete a.registry[s],a.registryKeys=Object.keys(a.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function Yw(){var e=m.useState(Math.random()),t=e[1],n=m.useMemo(function(){return new qw},[]);return m.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(a){return n.get(a)},keys:function(){return n.keys()}}},[n])}var Vo={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function Vw(e){var t=m.useState({width:(e==null?void 0:e.width)==null?Vo.width:e.width,height:(e==null?void 0:e.height)==null?Vo.height:e.height,margin:(e==null?void 0:e.margin)==null?Vo.margin:e.margin}),n=t[0],r=t[1],a=m.useCallback(function(i){(i.width!==n.width||i.height!==n.height||i.margin.left!==n.margin.left||i.margin.right!==n.margin.right||i.margin.top!==n.margin.top||i.margin.bottom!==n.margin.bottom)&&r(i)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,a]}function Go(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function Qt(){return Qt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qt.apply(this,arguments)}function Gw(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,a=e.yRange,i=e.yScaleConfig,s=t.keys(),o=n[0],l=n[1],u=a[0],c=a[1],f=m.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,b){return b?g.concat(b.data.map(function(_){return b.xAccessor(_)})):g},[]);if(d.length!==0){var v=Go(r)?d:hl(d),x=za(r)?$n(Qt({range:[o,l],domain:v,zero:!0},r)):$n(Qt({range:[o,l],domain:v},r));return p.forEach(function(g){g!=null&&g.xScale&&(x=g.xScale(x))}),x}},[t,r,s,o,l]),h=m.useMemo(function(){var p=s.map(function(g){return t.get(g)}),d=p.reduce(function(g,b){return b?g.concat(b.data.map(function(_){return b.yAccessor(_)})):g},[]);if(d.length!==0){var v=Go(i)?d:hl(d),x=za(i)?$n(Qt({range:[u,c],domain:v,zero:!0},i)):$n(Qt({range:[u,c],domain:v},i));return p.forEach(function(g){g!=null&&g.yScale&&(x=g.yScale(x))}),x}},[t,i,s,u,c]);return{xScale:f,yScale:h}}function bh(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,a=e.yScale,i=e.children,s=e.horizontal,o=s===void 0?"auto":s,l=e.resizeObserverPolyfill,u=m.useContext(Uw),c=n||u,f=Vw(t),h=f[0],p=h.width,d=h.height,v=h.margin,x=f[1],g=Math.max(0,p-v.left-v.right),b=Math.max(0,d-v.top-v.bottom),_=Yw(),M=Gw({dataRegistry:_,xScaleConfig:r,yScaleConfig:a,xRange:[v.left,Math.max(0,p-v.right)],yRange:[Math.max(0,d-v.bottom),v.top]}),y=M.xScale,S=M.yScale,T=_.keys(),$=m.useMemo(function(){return Dw({domain:T,range:c.colors})},[T,c.colors]),k=o==="auto"?Go(a)||a.type==="time"||a.type==="utc":o,C=m.useMemo(function(){return{dataRegistry:_,registerData:_.registerData,unregisterData:_.unregisterData,xScale:y,yScale:S,colorScale:$,theme:c,width:p,height:d,margin:v,innerWidth:g,innerHeight:b,setDimensions:x,horizontal:k,resizeObserverPolyfill:l}},[$,_,d,k,b,g,v,x,c,p,y,S,l]);return m.createElement(Ue.Provider,{value:C},i)}bh.propTypes={children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])])};function xh(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,a=e.onPointerMove,i=a===void 0?!0:a,s=e.onPointerUp,o=s===void 0?!0:s,l=e.onPointerDown,u=l===void 0?!0:l,c=e.onFocus,f=c===void 0?!1:c,h=e.onBlur,p=h===void 0?!1:h,d=ft(),v=m.useCallback(function(y){return d==null?void 0:d("pointermove",y,t)},[d,t]),x=m.useCallback(function(y){return d==null?void 0:d("pointerout",y,t)},[d,t]),g=m.useCallback(function(y){return d==null?void 0:d("pointerup",y,t)},[d,t]),b=m.useCallback(function(y){return d==null?void 0:d("pointerdown",y,t)},[d,t]),_=m.useCallback(function(y){return d==null?void 0:d("focus",y,t)},[d,t]),M=m.useCallback(function(y){return d==null?void 0:d("blur",y,t)},[d,t]);return{onPointerMove:i?v:void 0,onFocus:f?_:void 0,onBlur:p?M:void 0,onPointerOut:r?x:void 0,onPointerUp:o?g:void 0,onPointerDown:u?b:void 0}}var Kw="GLYPHSERIES_EVENT_SOURCE",Xw="LINESERIES_EVENT_SOURCE",ti="XYCHART_EVENT_SOURCE";function _h(e){return!!e&&("clientX"in e||"changedTouches"in e)}function Zw(e){return!!e&&!_h(e)}function wh(e){var t=e.scale,n=e.accessor,r=e.scaledValue,a=e.data,i=t,s,o;if("invert"in i&&typeof i.invert=="function"){var l=ur(n).left,u=Number(i.invert(r)),c=l(a,u),f=a[c-1],h=a[c];s=!f||Math.abs(u-n(f))>Math.abs(u-n(h))?h:f,o=s===f?c-1:c}else if("step"in i&&typeof i.step<"u"){var p=t.domain(),d=t.range().map(Number),v=[].concat(d).sort(function(S,T){return S-T}),x=xl(v[0],v[1],i.step()),g=Op(x,r),b=d[0]<d[1]?p:p.reverse(),_=b[g-1],M=a.findIndex(function(S){return String(n(S))===String(_)});s=a[M],o=M}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(s==null||o==null)return null;var y=Math.abs(Number(i(n(s)))-r);return{datum:s,index:o,distance:y}}function Qw(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,a=e.yAccessor,i=e.point,s=e.data;if(!i)return null;var o=wh({scale:t,accessor:n,scaledValue:i.x,data:s});return o?{datum:o.datum,index:o.index,distanceX:o.distance,distanceY:Math.abs(Number(r(a(o.datum)))-i.y)}:null}function Jw(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,a=e.xAccessor,i=e.point,s=e.data;if(!i)return null;var o=wh({scale:t,accessor:n,scaledValue:i.y,data:s});return o?{datum:o.datum,index:o.index,distanceY:o.distance,distanceX:Math.abs(Number(r(a(o.datum)))-i.x)}:null}function Ko(){return Ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ko.apply(this,arguments)}var Xo="__POINTER_EVENTS_ALL",ni="__POINTER_EVENTS_NEAREST";function Sh(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,a=e.onFocus,i=e.onPointerMove,s=e.onPointerOut,o=e.onPointerUp,l=e.onPointerDown,u=e.allowedSources,c=m.useContext(Ue),f=c.width,h=c.height,p=c.horizontal,d=c.dataRegistry,v=c.xScale,x=c.yScale,g=n||(p?Jw:Qw),b=m.useCallback(function(k){var C=k||{},P=C.svgPoint,N=C.event,A={},R=null,X=1/0;if(k&&N&&P&&f&&h&&v&&x){var U,Z=t===ni||t===Xo,ee=Z?(U=d==null?void 0:d.keys())!=null?U:[]:Array.isArray(t)?t:[t];ee.forEach(function(E){var D=d==null?void 0:d.get(E);if(D){var B=g({dataKey:E,data:D.data,height:h,point:P,width:f,xAccessor:D.xAccessor,xScale:v,yAccessor:D.yAccessor,yScale:x});if(B&&(A[E]=Ko({key:E,svgPoint:P,event:N},B),t===ni)){var W,F,I=Math.sqrt(((W=B.distanceX)!=null?W:Math.pow(1/0,2))+((F=B.distanceY)!=null?F:Math.pow(1/0,2)));R=I<X?A[E]:R,X=Math.min(X,I)}}});var K=t===ni?[R]:t===Xo||Array.isArray(t)?Object.values(A):[A[t]];return K.filter(function(E){return E})}return[]},[t,d,v,x,f,h,g]),_=m.useCallback(function(k){i&&b(k).forEach(function(C){return i(C)})},[b,i]),M=m.useCallback(function(k){o&&b(k).forEach(function(C){return o(C)})},[b,o]),y=m.useCallback(function(k){l&&b(k).forEach(function(C){return l(C)})},[b,l]),S=m.useCallback(function(k){a&&b(k).forEach(function(C){return a(C)})},[b,a]),T=m.useCallback(function(k){var C=k==null?void 0:k.event;C&&_h(C)&&s&&s(C)},[s]),$=m.useCallback(function(k){var C=k==null?void 0:k.event;C&&Zw(C)&&r&&r(C)},[r]);ft("pointermove",i?_:void 0,u),ft("pointerout",s?T:void 0,u),ft("pointerup",o?M:void 0,u),ft("pointerdown",l?y:void 0,u),ft("focus",a?S:void 0,u),ft("blur",r?$:void 0,u)}function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ri.apply(this,arguments)}var eS={top:50,right:50,bottom:50,left:50},tS=[ti];function Jt(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,a=r===void 0?!0:r,i=e.children,s=e.height,o=e.horizontal,l=e.margin,u=l===void 0?eS:l,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.pointerEventsDataKey,v=d===void 0?"nearest":d,x=e.theme,g=e.width,b=e.xScale,_=e.yScale,M=e.resizeObserverPolyfill,y=m.useContext(Ue),S=y.setDimensions,T=y.resizeObserverPolyfill,$=m.useContext(Un),k=ft();m.useEffect(function(){S&&g!=null&&s!=null&&g>0&&s>0&&S({width:g,height:s,margin:u})},[S,g,s,u]);var C=xh({source:ti});return Sh({dataKey:v==="nearest"?ni:Xo,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,allowedSources:tS}),S?g==null||s==null?m.createElement(R_,{resizeObserverPolyfill:T},function(P){return m.createElement(Jt,ri({},e,{width:e.width==null?P.width:e.width,height:e.height==null?P.height:e.height}))}):$==null?m.createElement(dh,null,m.createElement(Jt,e)):k==null?m.createElement(V_,null,m.createElement(Jt,e)):g<=0||s<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:g,height:s}),null):m.createElement("svg",{width:g,height:s,"aria-label":n},i,a&&m.createElement("rect",ri({x:u.left,y:u.top,width:g-u.left-u.right,height:s-u.top-u.bottom,fill:"transparent"},C))):!b||!_?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):m.createElement(bh,{xScale:b,yScale:_,theme:x,initialDimensions:{width:g,height:s,margin:u},horizontal:o,resizeObserverPolyfill:M},m.createElement(Jt,e))}Jt.propTypes={accessibilityLabel:w.string,captureEvents:w.bool,width:w.number,height:w.number,children:w.node.isRequired,horizontal:w.oneOfType([w.bool,w.oneOf(["auto"])]),onPointerMove:w.func,onPointerOut:w.func,onPointerUp:w.func,onPointerDown:w.func,pointerEventsDataKey:w.oneOf(["all","nearest"])};var nS=sS,Zo=Th(m),rS=Th(nn),iS=ct,aS=["children","data","x","y","fill","className","curve","innerRef","defined"];function Th(e){return e&&e.__esModule?e:{default:e}}function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(this,arguments)}function oS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function sS(e){var t=e.children,n=e.data,r=n===void 0?[]:n,a=e.x,i=e.y,s=e.fill,o=s===void 0?"transparent":s,l=e.className,u=e.curve,c=e.innerRef,f=e.defined,h=f===void 0?function(){return!0}:f,p=oS(e,aS),d=(0,iS.line)({x:a,y:i,defined:h,curve:u});return t?Zo.default.createElement(Zo.default.Fragment,null,t({path:d})):Zo.default.createElement("path",Qo({ref:c,className:(0,rS.default)("visx-linepath",l),d:d(r)||"",fill:o,strokeLinecap:"round"},p))}function Jo(){return Jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jo.apply(this,arguments)}function Oh(e){function t(n){var r=n.dataKey,a=n.data,i=n.xAccessor,s=n.yAccessor,o=m.useContext(Ue),l=o.xScale,u=o.yScale,c=o.dataRegistry;m.useEffect(function(){return c&&c.registerData({key:r,data:a,xAccessor:i,yAccessor:s}),function(){return c==null?void 0:c.unregisterData(r)}},[c,r,a,i,s]);var f=c==null?void 0:c.get(r);if(!l||!u||!f)return null;var h=e;return m.createElement(h,Jo({},n,{xScale:l,yScale:u,data:f.data,xAccessor:f.xAccessor,yAccessor:f.yAccessor}))}return t}function ii(e,t,n){return n===void 0&&(n="center"),function(r){var a=e(t(r));if(Se(a)){var i=(n==="start"?0:po(e))/(n==="center"?2:1);return a+i}return NaN}}function kh(e){var t,n=e.dataKey,r=e.enableEvents,a=e.findNearestDatum,i=e.onBlur,s=e.onFocus,o=e.onPointerMove,l=e.onPointerOut,u=e.onPointerUp,c=e.onPointerDown,f=e.source,h=e.allowedSources,p=(t=m.useContext(Un))!=null?t:{},d=p.showTooltip,v=p.hideTooltip,x=m.useCallback(function(y){d(y),o&&o(y)},[d,o]),g=m.useCallback(function(y){d(y),s&&s(y)},[d,s]),b=m.useCallback(function(y){v(),y&&l&&l(y)},[v,l]),_=m.useCallback(function(y){v(),y&&i&&i(y)},[v,i]),M=m.useCallback(function(y){d(y),c&&c(y)},[d,c]);return Sh({dataKey:n,findNearestDatum:a,onBlur:r?_:void 0,onFocus:r?g:void 0,onPointerMove:r?x:void 0,onPointerOut:r?b:void 0,onPointerUp:r?u:void 0,onPointerDown:r?M:void 0,allowedSources:h}),xh({source:f,onBlur:!!i&&r,onFocus:!!s&&r,onPointerMove:!!o&&r,onPointerOut:!!l&&r,onPointerUp:!!u&&r,onPointerDown:!!c&&r})}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},es.apply(this,arguments)}function ts(e){var t,n,r,a=e.colorAccessor,i=e.data,s=e.dataKey,o=e.onBlur,l=e.onFocus,u=e.onPointerMove,c=e.onPointerOut,f=e.onPointerUp,h=e.onPointerDown,p=e.enableEvents,d=p===void 0?!0:p,v=e.renderGlyphs,x=e.size,g=x===void 0?8:x,b=e.xAccessor,_=e.xScale,M=e.yAccessor,y=e.yScale,S=m.useContext(Ue),T=S.colorScale,$=S.theme,k=S.horizontal,C=m.useMemo(function(){return ii(_,b)},[_,b]),P=m.useMemo(function(){return ii(y,M)},[y,M]),N=(t=(n=T==null?void 0:T(s))!=null?n:$==null||(r=$.colors)==null?void 0:r[0])!=null?t:"#222",A=Kw+"-"+s,R=kh({dataKey:s,enableEvents:d,onBlur:o,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:f,onPointerDown:h,source:A,allowedSources:[ti,A]}),X=m.useMemo(function(){return i.map(function(U,Z){var ee,K=C(U);if(!Se(K))return null;var E=P(U);return Se(E)?{key:""+Z,x:K,y:E,color:(ee=a==null?void 0:a(U,Z))!=null?ee:N,size:typeof g=="function"?g(U):g,datum:U}:null}).filter(function(U){return U})},[N,a,i,C,P,g]);return m.createElement(m.Fragment,null,v(es({glyphs:X,xScale:_,yScale:y,horizontal:k},R)))}ts.propTypes={colorAccessor:w.func,size:w.oneOfType([w.number,w.func]),renderGlyphs:w.func.isRequired};const lS=Oh(ts);function Mh(e){var t=e.key,n=e.color,r=e.x,a=e.y,i=e.size,s=e.onBlur,o=e.onFocus,l=e.onPointerMove,u=e.onPointerOut,c=e.onPointerUp;return m.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:s||o?0:void 0,fill:n,r:i/2,cx:r,cy:a,onBlur:s,onFocus:o,onPointerMove:l,onPointerOut:u,onPointerUp:c})}var uS=["renderGlyph"];function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ai.apply(this,arguments)}function cS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function fS(e){var t=e.renderGlyph,n=t===void 0?Mh:t,r=cS(e,uS),a=m.useCallback(function(i){var s=i.glyphs,o=i.onPointerMove,l=i.onPointerOut,u=i.onPointerUp,c=i.onFocus,f=i.onBlur;return s.map(function(h){return m.createElement(m.Fragment,{key:h.key},n(ai({},h,{onPointerMove:o,onPointerOut:l,onPointerUp:u,onFocus:c,onBlur:f})))})},[n]);return m.createElement(lS,ai({},r,{renderGlyphs:a}))}var hS=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gn.apply(this,arguments)}function dS(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function $h(e){var t,n,r,a=e.colorAccessor,i=e.curve,s=e.data,o=e.dataKey,l=e.onBlur,u=e.onFocus,c=e.onPointerMove,f=e.onPointerOut,h=e.onPointerUp,p=e.onPointerDown,d=e.enableEvents,v=d===void 0?!0:d,x=e.xAccessor,g=e.xScale,b=e.yAccessor,_=e.yScale,M=e.PathComponent,y=M===void 0?"path":M,S=dS(e,hS),T=m.useContext(Ue),$=T.colorScale,k=T.theme,C=m.useMemo(function(){return ii(g,x)},[g,x]),P=m.useMemo(function(){return ii(_,b)},[_,b]),N=m.useCallback(function(ee){return Se(g(x(ee)))&&Se(_(b(ee)))},[g,x,_,b]),A=(t=(n=$==null?void 0:$(o))!=null?n:k==null||(r=k.colors)==null?void 0:r[0])!=null?t:"#222",R=Xw+"-"+o,X=kh({dataKey:o,enableEvents:v,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:f,onPointerUp:h,onPointerDown:p,source:R,allowedSources:[ti,R]}),U=!!(u||l),Z=m.useCallback(function(ee){var K=ee.glyphs;return U?K.map(function(E){return m.createElement(m.Fragment,{key:E.key},Mh(Gn({},E,{color:"transparent",onFocus:X.onFocus,onBlur:X.onBlur})))}):null},[U,X.onFocus,X.onBlur]);return m.createElement(m.Fragment,null,m.createElement(nS,Gn({x:C,y:P,defined:N,curve:i},S),function(ee){var K,E=ee.path;return m.createElement(y,Gn({stroke:(K=a==null?void 0:a(o))!=null?K:A,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:E(s)||""},X))}),U&&m.createElement(ts,{dataKey:o,data:s,xAccessor:x,yAccessor:b,xScale:g,yScale:_,renderGlyphs:Z}))}$h.propTypes={colorAccessor:w.func};const pS=Oh($h);function vS(e){return m.createElement(pS,e)}const mS={lines:"LinesChartProps[]",barTooltip:"(props: LineTooltipProps) => JSX.Element",grid:"GridProps",labels:"Array<string>",xAxis:"CommonProps<AxisScale>",xScale:"ScaleConfig<AxisScaleOutput, any, any>",yAxis:"CommonProps<AxisScale>",yScale:"ScaleConfig<AxisScaleOutput, any, any>"};function ns(e){const t=tn.useElementId(),{lines:n=[],xScale:r,yScale:a,xAxis:i,yAxis:s,grid:o,labels:l,barTooltip:u}=e,c={xAccessor:p=>p.x,yAccessor:p=>p.y},f=p=>l[p],h=Cr({domain:n.map(p=>p.name),range:n.map(p=>Zn.colors[p.color])});return z.createElement(z.Fragment,null,z.createElement(Cf,{className:"fs-12 lh-18 gray600",scale:h,direction:"row",shape:"rect",shapeWidth:30,shapeHeight:4,shapeMargin:"0 5px 0 0",shapeStyle:()=>({borderRadius:"2px"}),labelMargin:"0",itemMargin:"0 10px 0 10px",style:{display:"flex",justifyContent:"center",fontSize:"16px"}}),z.createElement(Jt,{height:300,xScale:r,yScale:a},z.createElement(Gf,{strokeWidth:"1",orientation:"bottom",tickFormat:f,...i}),z.createElement(Gf,{orientation:"left",...s}),z.createElement(Fx,{...o}),n.map((p,d)=>z.createElement(z.Fragment,{key:`${t.current}${d}`},z.createElement(fS,{dataKey:p.name,colorAccessor:()=>Zn.colors[p.color],data:[p.data],...c}),z.createElement(vS,{dataKey:p.name,stroke:Zn.colors[p.color],strokeDasharray:p.strokeDashArray?"4,3":"",data:p.data,...c}))),z.createElement(rh,{snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,className:"bg-dark white",renderTooltip:({tooltipData:p})=>{var d,v,x;return z.createElement(z.Fragment,null,u&&z.createElement(u,{yAxisName:(d=p==null?void 0:p.nearestDatum)==null?void 0:d.key,xLineName:l[c.xAccessor((v=p==null?void 0:p.nearestDatum)==null?void 0:v.datum)],value:c.yAccessor((x=p==null?void 0:p.nearestDatum)==null?void 0:x.datum)}))}})))}Object.assign(ns,{props:mS,displayName:"SpsLineChart"});const Ch={basic:{label:"Basic",description:()=>z.createElement(z.Fragment,null,z.createElement("p",null,"Line chart example."),z.createElement("p",null,z.createElement("code",null,"<grid>")," allows override grid property. Optional. Type of ",z.createElement("code",null,"GridProps")," which comes from",z.createElement("code",null,"@visx/xychart/lib/components/grid/Grid")," package, which is a peer dependency of our React components."),z.createElement("p",null,z.createElement("code",null,"<xAxis>")," and ",z.createElement("code",null,"<yAxis>")," allow override X/Y axes property. Optional. Type of",z.createElement("code",null,"CommonProps<AxisScale>")," which comes from",z.createElement("code",null,"@visx/axis/lib/types")," package, which is a peer dependency of our React components."),z.createElement("p",null,z.createElement("code",null,"<xScale>")," and ",z.createElement("code",null,"<yScale>")," allow override scale configuration for X/Y axes. Type of",z.createElement("code",null,"ScaleConfig<AxisScaleOutput, any, any>")," comes from",z.createElement("code",null,"@visx/scale")," and ",z.createElement("code",null,"@visx/axis")," packages, which is a peer dependency of our React components.")),examples:{basic:{react:tt.code`
168
+ import { SpsLineChart } from "@spscommerce/ds-react-charts";
169
+ function DemoComponent() {
170
+ const lines = [
171
+ {
172
+ data: [
173
+ { x: 0, y: 30 },
174
+ { x: 1, y: 45 },
175
+ { x: 2, y: 85 },
176
+ { x: 3, y: 20 },
177
+ { x: 4, y: 10 },
178
+ { x: 5, y: 90 },
179
+ { x: 6, y: 30 },
180
+ { x: 7, y: 100 },
181
+ { x: 8, y: 70 },
182
+ { x: 9, y: 50 },
183
+ ],
184
+ color: LineChartColors.ORANGE,
185
+ name: "Line 1",
186
+ strokeDashArray: true,
187
+ },
188
+ {
189
+ data: [
190
+ { x: 0, y: 10 },
191
+ { x: 1, y: 30 },
192
+ { x: 2, y: 70 },
193
+ { x: 3, y: 70 },
194
+ { x: 4, y: 40 },
195
+ { x: 5, y: 90 },
196
+ { x: 6, y: 80 },
197
+ { x: 7, y: 80 },
198
+ { x: 8, y: 100 },
199
+ { x: 9, y: 30 },
200
+ ],
201
+ color: LineChartColors.GREEN,
202
+ name: "Line 2",
203
+ },
204
+ {
205
+ data: [
206
+ { x: 0, y: 15 },
207
+ { x: 1, y: 40 },
208
+ { x: 2, y: 80 },
209
+ { x: 3, y: 40 },
210
+ { x: 4, y: 100 },
211
+ { x: 5, y: 40 },
212
+ { x: 6, y: 50 },
213
+ { x: 7, y: 10 },
214
+ { x: 8, y: 0 },
215
+ { x: 9, y: 20 },
216
+ ],
217
+ color: LineChartColors.GREEN,
218
+ name: "Line 3",
219
+ },
220
+ ];
221
+ const lineChartLabels = [
222
+ 'PRE', 'W1', 'W2', 'W3', 'W4', 'W5', 'W6', 'W7', 'W8', 'W9'
223
+ ];
224
+ const BarTooltip = ({ yAxisName, xLineName, value }) => (
225
+ <div className="font-weight-bold">{xLineName} <br /> {yAxisName}: {value}</div>
226
+ );
227
+
228
+ return (
229
+ <SpsLineChart
230
+ barTooltip={ BarTooltip }
231
+ grid={{ rows: false }}
232
+ labels={ lineChartLabels }
233
+ lines={lines}
234
+ xScale={{ type: 'linear' }}
235
+ yScale={{ type: 'linear' }}
236
+ />
237
+ )
238
+ }
239
+ `}}}},gS={"Bar Chart":{description:()=>z.createElement("p",null,"Bar Charts are a data visualization used to compare sets of data to more easily analyze questions or identify gaps oriented toward user goals. ",z.createElement("br",null),"Each chart should focus on answering a single question about the dataset."),components:[ro,io],examples:yf},"Line Chart":{components:[ns],examples:Ch},"Stacked Horizontal Bar Chart":{components:[co],examples:Ef}};ue.MANIFEST=gS,ue.SpsBarChart=ro,ue.SpsBarChartExamples=yf,ue.SpsHorizontalBarChart=io,ue.SpsLineChart=ns,ue.SpsLineChartExamples=Ch,ue.SpsStackedHorizontalBarChart=co,ue.SpsStackedHorizontalBarChartExamples=Ef,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"})});