var t=Object.defineProperty,e=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,'symbol'!=typeof n?n+'':n,r);import{jsx as n}from'react/jsx-runtime';import{PureComponent as r}from'react';function i(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,'default')?t.default:t}var o,a={exports:{}},u={exports:{}},s={};
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function c(){if(o)return s;o=1;var t='function'==typeof Symbol&&Symbol.for,e=t?Symbol.for('react.element'):60103,n=t?Symbol.for('react.portal'):60106,r=t?Symbol.for('react.fragment'):60107,i=t?Symbol.for('react.strict_mode'):60108,a=t?Symbol.for('react.profiler'):60114,u=t?Symbol.for('react.provider'):60109,c=t?Symbol.for('react.context'):60110,l=t?Symbol.for('react.async_mode'):60111,f=t?Symbol.for('react.concurrent_mode'):60111,h=t?Symbol.for('react.forward_ref'):60112,p=t?Symbol.for('react.suspense'):60113,d=t?Symbol.for('react.suspense_list'):60120,y=t?Symbol.for('react.memo'):60115,g=t?Symbol.for('react.lazy'):60116,m=t?Symbol.for('react.block'):60121,v=t?Symbol.for('react.fundamental'):60117,b=t?Symbol.for('react.responder'):60118,_=t?Symbol.for('react.scope'):60119;function w(t){if('object'==typeof t&&null!==t){var o=t.$$typeof;switch(o){case e:switch(t=t.type){case l:case f:case r:case a:case i:case p:return t;default:switch(t=t&&t.$$typeof){case c:case h:case g:case y:case u:return t;default:return o}}case n:return o}}}function x(t){return w(t)===f}return s.AsyncMode=l,s.ConcurrentMode=f,s.ContextConsumer=c,s.ContextProvider=u,s.Element=e,s.ForwardRef=h,s.Fragment=r,s.Lazy=g,s.Memo=y,s.Portal=n,s.Profiler=a,s.StrictMode=i,s.Suspense=p,s.isAsyncMode=t=>x(t)||w(t)===l,s.isConcurrentMode=x,s.isContextConsumer=t=>w(t)===c,s.isContextProvider=t=>w(t)===u,s.isElement=t=>'object'==typeof t&&null!==t&&t.$$typeof===e,s.isForwardRef=t=>w(t)===h,s.isFragment=t=>w(t)===r,s.isLazy=t=>w(t)===g,s.isMemo=t=>w(t)===y,s.isPortal=t=>w(t)===n,s.isProfiler=t=>w(t)===a,s.isStrictMode=t=>w(t)===i,s.isSuspense=t=>w(t)===p,s.isValidElementType=t=>'string'==typeof t||'function'==typeof t||t===r||t===f||t===a||t===i||t===p||t===d||'object'==typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===y||t.$$typeof===u||t.$$typeof===c||t.$$typeof===h||t.$$typeof===v||t.$$typeof===b||t.$$typeof===_||t.$$typeof===m),s.typeOf=w,s}var l,f,h,p,d,y,g,m,v,b,_,w,x,S,$,M={};
/** @license React v16.13.1
 * react-is.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */function O(){return l||(l=1,'production'!==process.env.NODE_ENV&&(()=>{var t='function'==typeof Symbol&&Symbol.for,e=t?Symbol.for('react.element'):60103,n=t?Symbol.for('react.portal'):60106,r=t?Symbol.for('react.fragment'):60107,i=t?Symbol.for('react.strict_mode'):60108,o=t?Symbol.for('react.profiler'):60114,a=t?Symbol.for('react.provider'):60109,u=t?Symbol.for('react.context'):60110,s=t?Symbol.for('react.async_mode'):60111,c=t?Symbol.for('react.concurrent_mode'):60111,l=t?Symbol.for('react.forward_ref'):60112,f=t?Symbol.for('react.suspense'):60113,h=t?Symbol.for('react.suspense_list'):60120,p=t?Symbol.for('react.memo'):60115,d=t?Symbol.for('react.lazy'):60116,y=t?Symbol.for('react.block'):60121,g=t?Symbol.for('react.fundamental'):60117,m=t?Symbol.for('react.responder'):60118,v=t?Symbol.for('react.scope'):60119;function b(t){if('object'==typeof t&&null!==t){var h=t.$$typeof;switch(h){case e:var y=t.type;switch(y){case s:case c:case r:case o:case i:case f:return y;default:var g=y&&y.$$typeof;switch(g){case u:case l:case d:case p:case a:return g;default:return h}}case n:return h}}}var _=s,w=c,x=u,S=a,$=e,O=l,A=r,E=d,N=p,j=n,T=o,k=i,I=f,C=!1;function P(t){return b(t)===c}M.AsyncMode=_,M.ConcurrentMode=w,M.ContextConsumer=x,M.ContextProvider=S,M.Element=$,M.ForwardRef=O,M.Fragment=A,M.Lazy=E,M.Memo=N,M.Portal=j,M.Profiler=T,M.StrictMode=k,M.Suspense=I,M.isAsyncMode=function(t){return C||(C=!0),P(t)||b(t)===s},M.isConcurrentMode=P,M.isContextConsumer=function(t){return b(t)===u},M.isContextProvider=function(t){return b(t)===a},M.isElement=function(t){return'object'==typeof t&&null!==t&&t.$$typeof===e},M.isForwardRef=function(t){return b(t)===l},M.isFragment=function(t){return b(t)===r},M.isLazy=function(t){return b(t)===d},M.isMemo=function(t){return b(t)===p},M.isPortal=function(t){return b(t)===n},M.isProfiler=function(t){return b(t)===o},M.isStrictMode=function(t){return b(t)===i},M.isSuspense=function(t){return b(t)===f},M.isValidElementType=function(t){return'string'==typeof t||'function'==typeof t||t===r||t===c||t===o||t===i||t===f||t===h||'object'==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===u||t.$$typeof===l||t.$$typeof===g||t.$$typeof===m||t.$$typeof===v||t.$$typeof===y)},M.typeOf=b})()),M}function A(){return f||(f=1,'production'===process.env.NODE_ENV?u.exports=c():u.exports=O()),u.exports
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/}function E(){if(p)return h;p=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return h=function(){try{if(!Object.assign)return!1;var t=new String('abc');if(t[5]='de','5'===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e['_'+String.fromCharCode(n)]=n;if('0123456789'!==Object.getOwnPropertyNames(e).map((t=>e[t])).join(''))return!1;var r={};return'abcdefghijklmnopqrst'.split('').forEach((t=>{r[t]=t})),'abcdefghijklmnopqrst'===Object.keys(Object.assign({},r)).join('')}catch{return!1}}()?Object.assign:function(r,i){for(var o,a,u=function(t){if(null==t)throw new TypeError('Object.assign cannot be called with null or undefined');return Object(t)}(r),s=1;s<arguments.length;s++){for(var c in o=Object(arguments[s]))e.call(o,c)&&(u[c]=o[c]);if(t){a=t(o);for(var l=0;l<a.length;l++)n.call(o,a[l])&&(u[a[l]]=o[a[l]])}}return u},h}function N(){if(y)return d;y=1;return d='SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'}function j(){return m||(m=1,g=Function.call.bind(Object.prototype.hasOwnProperty)),g}function T(){if(b)return v;b=1;var t=()=>{};if('production'!==process.env.NODE_ENV){var e=N(),n={},r=j();t=t=>{var e='Warning: '+t;try{throw new Error(e)}catch{}}}function i(i,o,a,u,s){if('production'!==process.env.NODE_ENV)for(var c in i)if(r(i,c)){var l;try{if('function'!=typeof i[c]){var f=Error((u||'React class')+': '+a+' 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 f.name='Invariant Violation',f}l=i[c](o,c,u,a,null,e)}catch(t){l=t}if(l&&!(l instanceof Error)&&t((u||'React class')+': type specification of '+a+' `'+c+'` is invalid; the type checker function must return `null` or an `Error` but returned a '+typeof l+'. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).'),l instanceof Error&&!(l.message in n)){n[l.message]=!0;var h=s?s():'';t('Failed '+a+' type: '+l.message+(h??''))}}}return i.resetWarningCache=()=>{'production'!==process.env.NODE_ENV&&(n={})},v=i}function k(){if(w)return _;w=1;var t=A(),e=E(),n=N(),r=j(),i=T(),o=()=>{};function a(){return null}return'production'!==process.env.NODE_ENV&&(o=t=>{var e='Warning: '+t;try{throw new Error(e)}catch{}}),_=function(u,s){var c='function'==typeof Symbol&&Symbol.iterator;var l='<<anonymous>>',f={array:y('array'),bigint:y('bigint'),bool:y('boolean'),func:y('function'),number:y('number'),object:y('object'),string:y('string'),symbol:y('symbol'),any:d(a),arrayOf:function(t){return d((function(e,r,i,o,a){if('function'!=typeof t)return new p('Property `'+a+'` of component `'+i+'` has invalid PropType notation inside arrayOf.');var u=e[r];if(!Array.isArray(u))return new p('Invalid '+o+' `'+a+'` of type `'+v(u)+'` supplied to `'+i+'`, expected an array.');for(var s=0;s<u.length;s++){var c=t(u,s,i,o,a+'['+s+']',n);if(c instanceof Error)return c}return null}))},element:d(((t,e,n,r,i)=>{var o=t[e];return u(o)?null:new p('Invalid '+r+' `'+i+'` of type `'+v(o)+'` supplied to `'+n+'`, expected a single ReactElement.')})),elementType:d(((e,n,r,i,o)=>{var a=e[n];return t.isValidElementType(a)?null:new p('Invalid '+i+' `'+o+'` of type `'+v(a)+'` supplied to `'+r+'`, expected a single ReactElement type.')})),instanceOf:function(t){return d((function(e,n,r,i,o){if(!(e[n]instanceof t)){var a=t.name||l,u=(t=>t.constructor&&t.constructor.name?t.constructor.name:l)(e[n]);return new p('Invalid '+i+' `'+o+'` of type `'+u+'` supplied to `'+r+'`, expected instance of `'+a+'`.')}return null}))},node:d(((t,e,n,r,i)=>m(t[e])?null:new p('Invalid '+r+' `'+i+'` supplied to `'+n+'`, expected a ReactNode.'))),objectOf:function(t){return d((function(e,i,o,a,u){if('function'!=typeof t)return new p('Property `'+u+'` of component `'+o+'` has invalid PropType notation inside objectOf.');var s=e[i],c=v(s);if('object'!==c)return new p('Invalid '+a+' `'+u+'` of type `'+c+'` supplied to `'+o+'`, expected an object.');for(var l in s)if(r(s,l)){var f=t(s,l,o,a,u+'.'+l,n);if(f instanceof Error)return f}return null}))},oneOf:function(t){if(!Array.isArray(t))return'production'!==process.env.NODE_ENV&&o(arguments.length>1?'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]).':'Invalid argument supplied to oneOf, expected an array.'),a;return d((function(e,n,r,i,o){for(var a=e[n],u=0;u<t.length;u++)if(h(a,t[u]))return null;var s=JSON.stringify(t,((t,e)=>'symbol'===b(e)?String(e):e));return new p('Invalid '+i+' `'+o+'` of value `'+String(a)+'` supplied to `'+r+'`, expected one of '+s+'.')}))},oneOfType:function(t){if(!Array.isArray(t))return'production'!==process.env.NODE_ENV&&o('Invalid argument supplied to oneOfType, expected an instance of array.'),a;for(var e=0;e<t.length;e++){var i=t[e];if('function'!=typeof i)return o('Invalid argument supplied to oneOfType. Expected an array of check functions, but received '+_(i)+' at index '+e+'.'),a}return d((function(e,i,o,a,u){for(var s=[],c=0;c<t.length;c++){var l=(0,t[c])(e,i,o,a,u,n);if(null==l)return null;l.data&&r(l.data,'expectedType')&&s.push(l.data.expectedType)}return new p('Invalid '+a+' `'+u+'` supplied to `'+o+'`'+(s.length>0?', expected one of type ['+s.join(', ')+']':'')+'.')}))},shape:function(t){return d((function(e,r,i,o,a){var u=e[r],s=v(u);if('object'!==s)return new p('Invalid '+o+' `'+a+'` of type `'+s+'` supplied to `'+i+'`, expected `object`.');for(var c in t){var l=t[c];if('function'!=typeof l)return g(i,o,a,c,b(l));var f=l(u,c,i,o,a+'.'+c,n);if(f)return f}return null}))},exact:function(t){return d((function(i,o,a,u,s){var c=i[o],l=v(c);if('object'!==l)return new p('Invalid '+u+' `'+s+'` of type `'+l+'` supplied to `'+a+'`, expected `object`.');var f=e({},i[o],t);for(var h in f){var d=t[h];if(r(t,h)&&'function'!=typeof d)return g(a,u,s,h,b(d));if(!d)return new p('Invalid '+u+' `'+s+'` key `'+h+'` supplied to `'+a+'`.\nBad object: '+JSON.stringify(i[o],null,'  ')+'\nValid keys: '+JSON.stringify(Object.keys(t),null,'  '));var y=d(c,h,a,u,s+'.'+h,n);if(y)return y}return null}))}};function h(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function p(t,e){this.message=t,this.data=e&&'object'==typeof e?e:{},this.stack=''}function d(t){if('production'!==process.env.NODE_ENV)var e={},r=0;function i(i,a,u,c,f,h,d){if(c=c||l,h=h||u,d!==n){if(s){var y=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 y.name='Invariant Violation',y}if('production'!==process.env.NODE_ENV&&typeof console<'u'){var g=c+':'+u;!e[g]&&r<3&&(o('You are manually calling a React.PropTypes validation function for the `'+h+'` prop on `'+c+'`. 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.'),e[g]=!0,r++)}}return null==a[u]?i?null===a[u]?new p('The '+f+' `'+h+'` is marked as required in `'+c+'`, but its value is `null`.'):new p('The '+f+' `'+h+'` is marked as required in `'+c+'`, but its value is `undefined`.'):null:t(a,u,c,f,h)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function y(t){return d((function(e,n,r,i,o,a){var u=e[n];return v(u)!==t?new p('Invalid '+i+' `'+o+'` of type `'+b(u)+'` supplied to `'+r+'`, expected `'+t+'`.',{expectedType:t}):null}))}function g(t,e,n,r,i){return new p((t||'React class')+': '+e+' type `'+n+'.'+r+'` is invalid; it must be a function, usually from the `prop-types` package, but received `'+i+'`.')}function m(t){switch(typeof t){case'number':case'string':case'undefined':return!0;case'boolean':return!t;case'object':if(Array.isArray(t))return t.every(m);if(null===t||u(t))return!0;var e=function(t){var e=t&&(c&&t[c]||t['@@iterator']);if('function'==typeof e)return e}(t);if(!e)return!1;var n,r=e.call(t);if(e!==t.entries){for(;!(n=r.next()).done;)if(!m(n.value))return!1}else for(;!(n=r.next()).done;){var i=n.value;if(i&&!m(i[1]))return!1}return!0;default:return!1}}function v(t){var e=typeof t;return Array.isArray(t)?'array':t instanceof RegExp?'object':function(t,e){return'symbol'===t||!!e&&('Symbol'===e['@@toStringTag']||'function'==typeof Symbol&&e instanceof Symbol)}(e,t)?'symbol':e}function b(t){if(typeof t>'u'||null===t)return''+t;var e=v(t);if('object'===e){if(t instanceof Date)return'date';if(t instanceof RegExp)return'regexp'}return e}function _(t){var e=b(t);switch(e){case'array':case'object':return'an '+e;case'boolean':case'date':case'regexp':return'a '+e;default:return e}}return p.prototype=Error.prototype,f.checkPropTypes=i,f.resetWarningCache=i.resetWarningCache,f.PropTypes=f,f},_}function I(){if(S)return x;S=1;var t=N();function e(){}function n(){}return n.resetWarningCache=e,x=()=>{function r(e,n,r,i,o,a){if(a!==t){var u=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 u.name='Invariant Violation',u}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return o.PropTypes=o,o}}function C(){if($)return a.exports;if($=1,'production'!==process.env.NODE_ENV){var t=A();a.exports=k()(t.isElement,true)}else a.exports=I()();return a.exports}const P=i(C());function R(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf('e'))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function V(t){return(t=R(Math.abs(t)))?t[1]:NaN}var q,F=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(t){if(!(e=F.exec(t)))throw new Error('invalid format: '+t);var e;return new L({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function L(t){this.fill=void 0===t.fill?' ':t.fill+'',this.align=void 0===t.align?'>':t.align+'',this.sign=void 0===t.sign?'-':t.sign+'',this.symbol=void 0===t.symbol?'':t.symbol+'',this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?'':t.type+''}function z(t,e){var n=R(t,e);if(!n)return t+'';var r=n[0],i=n[1];return i<0?'0.'+new Array(-i).join('0')+r:r.length>i+1?r.slice(0,i+1)+'.'+r.slice(i+1):r+new Array(i-r.length+2).join('0')}D.prototype=L.prototype,L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?'0':'')+(void 0===this.width?'':Math.max(1,0|this.width))+(this.comma?',':'')+(void 0===this.precision?'':'.'+Math.max(0,0|this.precision))+(this.trim?'~':'')+this.type};const B={'%':(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+'',d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString('en').replace(/,/g,''):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>z(100*t,e),r:z,s:function(t,e){var n=R(t,e);if(!n)return t+'';var r=n[0],i=n[1],o=i-(q=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join('0'):o>0?r.slice(0,o)+'.'+r.slice(o):'0.'+new Array(1-o).join('0')+R(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function W(t){return t}var H,U,X,Y=Array.prototype.map,Q=['y','z','a','f','p','n','µ','m','','k','M','G','T','P','E','Z','Y'];function G(t){var e=void 0===t.grouping||void 0===t.thousands?W:function(t,e){return(n,r)=>{for(var i=n.length,o=[],a=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}(Y.call(t.grouping,Number),t.thousands+''),n=void 0===t.currency?'':t.currency[0]+'',r=void 0===t.currency?'':t.currency[1]+'',i=void 0===t.decimal?'.':t.decimal+'',o=void 0===t.numerals?W:function(t){return e=>e.replace(/[0-9]/g,(e=>t[+e]))}(Y.call(t.numerals,String)),a=void 0===t.percent?'%':t.percent+'',u=void 0===t.minus?'−':t.minus+'',s=void 0===t.nan?'NaN':t.nan+'';function c(t){var c=(t=D(t)).fill,l=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,y=t.comma,g=t.precision,m=t.trim,v=t.type;'n'===v?(y=!0,v='g'):B[v]||(void 0===g&&(g=12),m=!0,v='g'),(p||'0'===c&&'='===l)&&(p=!0,c='0',l='=');var b='$'===h?n:'#'===h&&/[boxX]/.test(v)?'0'+v.toLowerCase():'',_='$'===h?r:/[%p]/.test(v)?a:'',w=B[v],x=/[defgprs%]/.test(v);function S(t){var n,r,a,h=b,S=_;if('c'===v)S=w(t)+S,t='';else{var $=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:w(Math.abs(t),g),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case'.':i=e=r;break;case'0':0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),$&&0==+t&&'+'!==f&&($=!1),h=($?'('===f?f:u:'-'===f||'('===f?'':f)+h,S=('s'===v?Q[8+q/3]:'')+S+($&&'('===f?')':''),x)for(n=-1,r=t.length;++n<r;)if(48>(a=t.charCodeAt(n))||a>57){S=(46===a?i+t.slice(n+1):t.slice(n))+S,t=t.slice(0,n);break}}y&&!p&&(t=e(t,1/0));var M=h.length+t.length+S.length,O=M<d?new Array(d-M+1).join(c):'';switch(y&&p&&(t=e(O+t,O.length?d-S.length:1/0),O=''),l){case'<':t=h+t+S+O;break;case'=':t=h+O+t+S;break;case'^':t=O.slice(0,M=O.length>>1)+h+t+S+O.slice(M);break;default:t=O+h+t+S}return o(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=()=>t+'',S}return{format:c,formatPrefix:function(t,e){var n=c(((t=D(t)).type='f',t)),r=3*Math.max(-8,Math.min(8,Math.floor(V(e)/3))),i=Math.pow(10,-r),o=Q[8+r/3];return t=>n(i*t)+o}}}H=G({thousands:',',grouping:[3],currency:['$','']}),U=H.format,X=H.formatPrefix;var J='http://www.w3.org/1999/xhtml';const Z={svg:'http://www.w3.org/2000/svg',xhtml:J,xlink:'http://www.w3.org/1999/xlink',xml:'http://www.w3.org/XML/1998/namespace',xmlns:'http://www.w3.org/2000/xmlns/'};function K(t){var e=t+='',n=e.indexOf(':');return n>=0&&'xmlns'!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Z.hasOwnProperty(e)?{space:Z[e],local:t}:t}function tt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===J&&e.documentElement.namespaceURI===J?e.createElement(t):e.createElementNS(n,t)}}function et(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function nt(t){var e=K(t);return(e.local?et:tt)(e)}function rt(){}function it(t){return null==t?rt:function(){return this.querySelector(t)}}function ot(){return[]}function at(t){return null==t?ot:function(){return this.querySelectorAll(t)}}function ut(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function st(t){return function(){return this.matches(t)}}function ct(t){return e=>e.matches(t)}var lt=Array.prototype.find;function ft(){return this.firstElementChild}var ht=Array.prototype.filter;function pt(){return Array.from(this.children)}function dt(t){return new Array(t.length)}function yt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function gt(t,e,n,r,i,o){for(var a,u=0,s=e.length,c=o.length;u<c;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new yt(t,o[u]);for(;u<s;++u)(a=e[u])&&(i[u]=a)}function mt(t,e,n,r,i,o,a){var u,s,c,l=new Map,f=e.length,h=o.length,p=new Array(f);for(u=0;u<f;++u)(s=e[u])&&(p[u]=c=a.call(s,s.__data__,u,e)+'',l.has(c)?i[u]=s:l.set(c,s));for(u=0;u<h;++u)c=a.call(t,o[u],u,o)+'',(s=l.get(c))?(r[u]=s,s.__data__=o[u],l.delete(c)):n[u]=new yt(t,o[u]);for(u=0;u<f;++u)(s=e[u])&&l.get(p[u])===s&&(i[u]=s)}function vt(t){return t.__data__}function bt(t){return'object'==typeof t&&'length'in t?t:Array.from(t)}function _t(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function wt(t){return function(){this.removeAttribute(t)}}function xt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function St(t,e){return function(){this.setAttribute(t,e)}}function $t(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ot(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function At(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Et(t){return function(){this.style.removeProperty(t)}}function Nt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function jt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Tt(t,e){return t.style.getPropertyValue(e)||At(t).getComputedStyle(t,null).getPropertyValue(e)}function kt(t){return function(){delete this[t]}}function It(t,e){return function(){this[t]=e}}function Ct(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Pt(t){return t.trim().split(/^|\s+/)}function Rt(t){return t.classList||new Vt(t)}function Vt(t){this._node=t,this._names=Pt(t.getAttribute('class')||'')}function qt(t,e){for(var n=Rt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ft(t,e){for(var n=Rt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Dt(t){return function(){qt(this,t)}}function Lt(t){return function(){Ft(this,t)}}function zt(t,e){return function(){(e.apply(this,arguments)?qt:Ft)(this,t)}}function Bt(){this.textContent=''}function Wt(t){return function(){this.textContent=t}}function Ht(t){return function(){var e=t.apply(this,arguments);this.textContent=e??''}}function Ut(){this.innerHTML=''}function Xt(t){return function(){this.innerHTML=t}}function Yt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??''}}function Qt(){this.nextSibling&&this.parentNode.appendChild(this)}function Gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jt(){return null}function Zt(){var t=this.parentNode;t&&t.removeChild(this)}function Kt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function te(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ee(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function ne(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function re(t,e,n){var r=At(t),i=r.CustomEvent;'function'==typeof i?i=new i(e,n):(i=r.document.createEvent('Event'),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ie(t,e){return function(){return re(this,t,e)}}function oe(t,e){return function(){return re(this,t,e.apply(this,arguments))}}yt.prototype={constructor:yt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Vt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute('class',this._names.join(' ')))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute('class',this._names.join(' ')))},contains:function(t){return this._names.indexOf(t)>=0}};var ae=[null];function ue(t,e){this._groups=t,this._parents=e}function se(){return new ue([[document.documentElement]],ae)}function ce(t){return'string'==typeof t?new ue([[document.querySelector(t)]],[document.documentElement]):new ue([[t]],ae)}function le(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function fe(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function he(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=le,n=(e,n)=>le(t(e),n),r=(e,n)=>t(e)-n):(e=t===le||t===fe?t:pe,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function pe(){return 0}ue.prototype=se.prototype={constructor:ue,select:function(t){'function'!=typeof t&&(t=it(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,u=e[i],s=u.length,c=r[i]=new Array(s),l=0;l<s;++l)(o=u[l])&&(a=t.call(o,o.__data__,l,u))&&('__data__'in o&&(a.__data__=o.__data__),c[l]=a);return new ue(r,this._parents)},selectAll:function(t){t='function'==typeof t?ut(t):at(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,u=e[o],s=u.length,c=0;c<s;++c)(a=u[c])&&(r.push(t.call(a,a.__data__,c,u)),i.push(a));return new ue(r,i)},selectChild:function(t){return this.select(null==t?ft:function(t){return function(){return lt.call(this.children,t)}}('function'==typeof t?t:ct(t)))},selectChildren:function(t){return this.selectAll(null==t?pt:function(t){return function(){return ht.call(this.children,t)}}('function'==typeof t?t:ct(t)))},filter:function(t){'function'!=typeof t&&(t=st(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new ue(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,vt);var n=e?mt:gt,r=this._parents,i=this._groups;'function'!=typeof t&&(t=function(t){return()=>t}(t));for(var o=i.length,a=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var l=r[c],f=i[c],h=f.length,p=bt(t.call(l,l&&l.__data__,c,r)),d=p.length,y=u[c]=new Array(d),g=a[c]=new Array(d);n(l,f,y,g,s[c]=new Array(h),p,e);for(var m,v,b=0,_=0;b<d;++b)if(m=y[b]){for(b>=_&&(_=b+1);!(v=g[_])&&++_<d;);m._next=v||null}}return(a=new ue(a,r))._enter=u,a._exit=s,a},enter:function(){return new ue(this._enter||this._groups.map(dt),this._parents)},exit:function(){return new ue(this._exit||this._groups.map(dt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return'function'==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+''),null!=e&&((i=e(i))&&(i=i.selection())),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),s=0;s<a;++s)for(var c,l=n[s],f=r[s],h=l.length,p=u[s]=new Array(h),d=0;d<h;++d)(c=l[d]||f[d])&&(p[d]=c);for(;s<i;++s)u[s]=n[s];return new ue(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=_t);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,u=n[o],s=u.length,c=i[o]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(e)}return new ue(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=K(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?xt:wt:'function'==typeof e?n.local?Ot:Mt:n.local?$t:St)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Et:'function'==typeof e?jt:Nt)(t,e,n??'')):Tt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kt:'function'==typeof e?Ct:It)(t,e)):this.node()[t]},classed:function(t,e){var n=Pt(t+'');if(arguments.length<2){for(var r=Rt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(('function'==typeof e?zt:e?Dt:Lt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Bt:('function'==typeof t?Ht:Wt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ut:('function'==typeof t?Yt:Xt)(t)):this.node().innerHTML},raise:function(){return this.each(Qt)},lower:function(){return this.each(Gt)},append:function(t){var e='function'==typeof t?t:nt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n='function'==typeof t?t:nt(t),r=null==e?Jt:'function'==typeof e?e:it(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Zt)},clone:function(t){return this.select(t?te:Kt)},datum:function(t){return arguments.length?this.property('__data__',t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((t=>{var e='',n=t.indexOf('.');return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+''),a=o.length;if(!(arguments.length<2)){for(u=e?ne:ee,r=0;r<a;++r)this.each(u(o[r],e,n));return this}var u=this.node().__on;if(u)for(var s,c=0,l=u.length;c<l;++c)for(r=0,s=u[c];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(('function'==typeof e?oe:ie)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};const de=he(le).right;he((function(t){return null===t?NaN:+t})).center;const ye=Math.sqrt(50),ge=Math.sqrt(10),me=Math.sqrt(2);function ve(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=ye?10:o>=ge?5:o>=me?2:1;let u,s,c;return i<0?(c=Math.pow(10,-i)/a,u=Math.round(t*c),s=Math.round(e*c),u/c<t&&++u,s/c>e&&--s,c=-c):(c=Math.pow(10,i)*a,u=Math.round(t/c),s=Math.round(e/c),u*c<t&&++u,s*c>e&&--s),s<u&&.5<=n&&n<2?ve(t,e,2*n):[u,s,c]}function be(t,e,n){return ve(t=+t,e=+e,n=+n)[2]}function _e(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function we(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function xe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Se(){}var $e=.7,Me=1/$e,Oe='\\s*([+-]?\\d+)\\s*',Ae='\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*',Ee='\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*',Ne=/^#([0-9a-f]{3,8})$/,je=new RegExp(`^rgb\\(${Oe},${Oe},${Oe}\\)$`),Te=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),ke=new RegExp(`^rgba\\(${Oe},${Oe},${Oe},${Ae}\\)$`),Ie=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${Ae}\\)$`),Ce=new RegExp(`^hsl\\(${Ae},${Ee},${Ee}\\)$`),Pe=new RegExp(`^hsla\\(${Ae},${Ee},${Ee},${Ae}\\)$`),Re={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function qe(){return this.rgb().formatRgb()}function Fe(t){var e,n;return t=(t+'').trim().toLowerCase(),(e=Ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?De(e):3===n?new Be(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Le(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Le(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=je.exec(t))?new Be(e[1],e[2],e[3],1):(e=Te.exec(t))?new Be(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ke.exec(t))?Le(e[1],e[2],e[3],e[4]):(e=Ie.exec(t))?Le(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ce.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=Pe.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Re.hasOwnProperty(t)?De(Re[t]):'transparent'===t?new Be(NaN,NaN,NaN,0):null}function De(t){return new Be(t>>16&255,t>>8&255,255&t,1)}function Le(t,e,n,r){return r<=0&&(t=e=n=NaN),new Be(t,e,n,r)}function ze(t,e,n,r){return 1===arguments.length?function(t){return t instanceof Se||(t=Fe(t)),t?new Be((t=t.rgb()).r,t.g,t.b,t.opacity):new Be}(t):new Be(t,e,n,r??1)}function Be(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function We(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}`}function He(){const t=Ue(this.opacity);return`${1===t?'rgb(':'rgba('}${Xe(this.r)}, ${Xe(this.g)}, ${Xe(this.b)}${1===t?')':`, ${t})`}`}function Ue(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Xe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ye(t){return((t=Xe(t))<16?'0':'')+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ze(t,e,n,r)}function Ge(t){if(t instanceof Ze)return new Ze(t.h,t.s,t.l,t.opacity);if(t instanceof Se||(t=Fe(t)),!t)return new Ze;if(t instanceof Ze)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new Ze(a,u,s,t.opacity)}function Je(t,e,n,r){return 1===arguments.length?Ge(t):new Ze(t,e,n,r??1)}function Ze(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ke(t){return(t=(t||0)%360)<0?t+360:t}function tn(t){return Math.max(0,Math.min(1,t||0))}function en(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}we(Se,Fe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ge(this).formatHsl()},formatRgb:qe,toString:qe}),we(Be,ze,xe(Se,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?$e:Math.pow($e,t),new Be(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Be(Xe(this.r),Xe(this.g),Xe(this.b),Ue(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:We,formatHex:We,formatHex8:function(){return`#${Ye(this.r)}${Ye(this.g)}${Ye(this.b)}${Ye(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:He,toString:He})),we(Ze,Je,xe(Se,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new Ze(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?$e:Math.pow($e,t),new Ze(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Be(en(t>=240?t-240:t+120,i,r),en(t,i,r),en(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ze(Ke(this.h),tn(this.s),tn(this.l),Ue(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ue(this.opacity);return`${1===t?'hsl(':'hsla('}${Ke(this.h)}, ${100*tn(this.s)}%, ${100*tn(this.l)}%${1===t?')':`, ${t})`}`}}));const nn=t=>()=>t;function rn(t,e){return n=>t+n*e}function on(t){return 1==(t=+t)?an:(e,n)=>n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,r=>Math.pow(t+r*e,n)}(e,n,t):nn(isNaN(e)?n:e)}function an(t,e){var n=e-t;return n?rn(t,n):nn(isNaN(t)?e:t)}const un=function t(e){var n=on(e);function r(t,e){var r=n((t=ze(t)).r,(e=ze(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=an(t.opacity,e.opacity);return e=>(t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+'')}return r.gamma=t,r}(1);function sn(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return o=>{for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function cn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=gn(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return t=>{for(n=0;n<i;++n)a[n]=o[n](t);return a}}function ln(t,e){var n=new Date;return t=+t,e=+e,r=>(n.setTime(t*(1-r)+e*r),n)}function fn(t,e){return t=+t,e=+e,n=>t*(1-n)+e*n}function hn(t,e){var n,r={},i={};for(n in(null===t||'object'!=typeof t)&&(t={}),(null===e||'object'!=typeof e)&&(e={}),e)n in t?r[n]=gn(t[n],e[n]):i[n]=e[n];return t=>{for(n in r)i[n]=r[n](t);return i}}var pn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,dn=new RegExp(pn.source,'g');function yn(t,e){var n,r,i,o=pn.lastIndex=dn.lastIndex=0,a=-1,u=[],s=[];for(t+='',e+='';(n=pn.exec(t))&&(r=dn.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:fn(n,r)})),o=dn.lastIndex;return o<e.length&&(i=e.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(t){return e=>t(e)+''}(s[0].x):function(t){return()=>t}(e):(e=s.length,t=>{for(var n,r=0;r<e;++r)u[(n=s[r]).i]=n.x(t);return u.join('')})}function gn(t,e){var n,r=typeof e;return null==e||'boolean'===r?nn(e):('number'===r?fn:'string'===r?(n=Fe(e))?(e=n,un):yn:e instanceof Fe?un:e instanceof Date?ln:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?sn:Array.isArray(e)?cn:'function'!=typeof e.valueOf&&'function'!=typeof e.toString||isNaN(e)?hn:fn)(t,e)}function mn(t,e){return t=+t,e=+e,n=>Math.round(t*(1-n)+e*n)}var vn,bn=180/Math.PI,_n={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wn(t,e,n,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*bn,skewX:Math.atan(s)*bn,scaleX:a,scaleY:u}}function xn(t,e,n,r){function i(t){return t.length?t.pop()+' ':''}return(o,a)=>{var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push('translate(',null,e,null,n);u.push({i:s-4,x:fn(t,i)},{i:s-2,x:fn(r,o)})}else(i||o)&&a.push('translate('+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+'rotate(',null,r)-2,x:fn(t,e)})):e&&n.push(i(n)+'rotate('+e+r)}(o.rotate,a.rotate,u,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+'skewX(',null,r)-2,x:fn(t,e)}):e&&n.push(i(n)+'skewX('+e+r)}(o.skewX,a.skewX,u,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+'scale(',null,',',null,')');a.push({i:u-4,x:fn(t,n)},{i:u-2,x:fn(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+'scale('+n+','+r+')')}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,t=>{for(var e,n=-1,r=s.length;++n<r;)u[(e=s[n]).i]=e.x(t);return u.join('')}}}var Sn=xn((function(t){const e=new('function'==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+'');return e.isIdentity?_n:wn(e.a,e.b,e.c,e.d,e.e,e.f)}),'px, ','px)','deg)'),$n=xn((function(t){return null!=t&&(vn||(vn=document.createElementNS('http://www.w3.org/2000/svg','g')),vn.setAttribute('transform',t),t=vn.transform.baseVal.consolidate())?wn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):_n}),', ',')',')');const Mn=function(t){return(e,n)=>{var r=t((e=Je(e)).h,(n=Je(n)).h),i=an(e.s,n.s),o=an(e.l,n.l),a=an(e.opacity,n.opacity);return t=>(e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+'')}}((function(t,e){var n=e-t;return n?rn(t,n>180||n<-180?n-360*Math.round(n/360):n):nn(isNaN(t)?e:t)}));function On(t){return+t}var An=[0,1];function En(t){return t}function Nn(t,e){return(e-=t=+t)?n=>(n-t)/e:function(t){return()=>t}(isNaN(e)?NaN:.5)}function jn(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Nn(i,r),o=n(a,o)):(r=Nn(r,i),o=n(o,a)),t=>o(r(t))}function Tn(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Nn(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return e=>{var n=de(t,e,1,r)-1;return o[n](i[n](e))}}function kn(){var t,e,n,r,i,o,a=An,u=An,s=gn,c=En;function l(){var t=Math.min(a.length,u.length);return c!==En&&(c=function(t,e){var n;return t>e&&(n=t,t=e,e=n),n=>Math.max(t,Math.min(e,n))}(a[0],a[t-1])),r=t>2?Tn:jn,i=o=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),u,s)))(t(c(e)))}return f.invert=n=>c(e((o||(o=r(u,a.map(t),fn)))(n))),f.domain=function(t){return arguments.length?(a=Array.from(t,On),l()):a.slice()},f.range=function(t){return arguments.length?(u=Array.from(t),l()):u.slice()},f.rangeRound=t=>(u=Array.from(t),s=mn,l()),f.clamp=function(t){return arguments.length?(c=!!t||En,l()):c!==En},f.interpolate=function(t){return arguments.length?(s=t,l()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},(n,r)=>(t=n,e=r,l())}function In(t,e,n,r){var i,o=function(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?be(e,t,n):be(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}(t,e,n);switch((r=D(r??',f')).type){case's':var a=Math.max(Math.abs(t),Math.abs(e));return null==r.precision&&!isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(V(e)/3)))-V(Math.abs(t)))}(o,a))&&(r.precision=i),X(r,a);case'':case'e':case'g':case'p':case'r':null==r.precision&&!isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,V(e)-V(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-('e'===r.type));break;case'f':case'%':null==r.precision&&!isNaN(i=function(t){return Math.max(0,-V(Math.abs(t)))}(o))&&(r.precision=i-2*('%'===r.type))}return U(r)}function Cn(t){var e=t.domain;return t.ticks=t=>{var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,o,a]=r?ve(e,t,n):ve(t,e,n);if(!(o>=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)s[t]=(o-t)/-a;else for(let t=0;t<u;++t)s[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)s[t]=(i+t)/-a;else for(let t=0;t<u;++t)s[t]=(i+t)*a;return s}(n[0],n[n.length-1],t??10)},t.tickFormat=(t,n)=>{var r=e();return In(r[0],r[r.length-1],t??10,n)},t.nice=n=>{null==n&&(n=10);var r,i,o=e(),a=0,u=o.length-1,s=o[a],c=o[u],l=10;for(c<s&&(i=s,s=c,c=i,i=a,a=u,u=i);l-- >0;){if((i=be(s,c,n))===r)return o[a]=s,o[u]=c,e(o);if(i>0)s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function Pn(){var t=kn()(En,En);return t.copy=()=>function(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}(t,Pn()),_e.apply(t,arguments),Cn(t)}function Rn(){var t,e=0,n=1,r=1,i=[.5],o=[0,1];function a(e){return null!=e&&e<=e?o[de(i,e,0,r)]:t}function u(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return a}return a.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,u()):[e,n]},a.range=function(t){return arguments.length?(r=(o=Array.from(t)).length-1,u()):o.slice()},a.invertExtent=t=>{var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length&&(t=e),a},a.thresholds=()=>i.slice(),a.copy=()=>Rn().domain([e,n]).range(o).unknown(t),_e.apply(Cn(a),arguments)}var Vn='object'==typeof global&&global&&global.Object===Object&&global,qn='object'==typeof self&&self&&self.Object===Object&&self,Fn=Vn||qn||Function('return this')(),Dn=Fn.Symbol,Ln=Object.prototype,zn=Ln.hasOwnProperty,Bn=Ln.toString,Wn=Dn?Dn.toStringTag:void 0;var Hn=Object.prototype.toString;var Un=Dn?Dn.toStringTag:void 0;function Xn(t){return null==t?void 0===t?'[object Undefined]':'[object Null]':Un&&Un in Object(t)?function(t){var e=zn.call(t,Wn),n=t[Wn];try{t[Wn]=void 0;var r=!0}catch{}var i=Bn.call(t);return r&&(e?t[Wn]=n:delete t[Wn]),i}(t):function(t){return Hn.call(t)}(t)}function Yn(t){return null!=t&&'object'==typeof t}function Qn(t){return t}var Gn=Object.prototype;function Jn(t){var e=t&&t.constructor;return t===('function'==typeof e&&e.prototype||Gn)}var Zn=function(t,e){return n=>t(e(n))}(Object.keys,Object),Kn=Object.prototype.hasOwnProperty;function tr(t){var e=typeof t;return null!=t&&('object'==e||'function'==e)}function er(t){if(!tr(t))return!1;var e=Xn(t);return'[object Function]'==e||'[object GeneratorFunction]'==e||'[object AsyncFunction]'==e||'[object Proxy]'==e}var nr=Fn['__core-js_shared__'],rr=(()=>{var t=/[^.]+$/.exec(nr&&nr.keys&&nr.keys.IE_PROTO||'');return t?'Symbol(src)_1.'+t:''})();var ir=Function.prototype.toString;function or(t){if(null!=t){try{return ir.call(t)}catch{}try{return t+''}catch{}}return''}var ar=/^\[object .+?Constructor\]$/,ur=Function.prototype,sr=Object.prototype,cr=ur.toString,lr=sr.hasOwnProperty,fr=RegExp('^'+cr.call(lr).replace(/[\\^$.*+?()[\]{}|]/g,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');function hr(t){return!(!tr(t)||function(t){return!!rr&&rr in t}(t))&&(er(t)?fr:ar).test(or(t))}function pr(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return hr(n)?n:void 0}var dr=pr(Fn,'DataView'),yr=pr(Fn,'Map'),gr=pr(Fn,'Promise'),mr=pr(Fn,'Set'),vr=pr(Fn,'WeakMap'),br='[object Map]',_r='[object Promise]',wr='[object Set]',xr='[object WeakMap]',Sr='[object DataView]',$r=or(dr),Mr=or(yr),Or=or(gr),Ar=or(mr),Er=or(vr),Nr=Xn;(dr&&Nr(new dr(new ArrayBuffer(1)))!=Sr||yr&&Nr(new yr)!=br||gr&&Nr(gr.resolve())!=_r||mr&&Nr(new mr)!=wr||vr&&Nr(new vr)!=xr)&&(Nr=t=>{var e=Xn(t),n='[object Object]'==e?t.constructor:void 0,r=n?or(n):'';if(r)switch(r){case $r:return Sr;case Mr:return br;case Or:return _r;case Ar:return wr;case Er:return xr}return e});function jr(t){return Yn(t)&&'[object Arguments]'==Xn(t)}var Tr=Object.prototype,kr=Tr.hasOwnProperty,Ir=Tr.propertyIsEnumerable,Cr=jr(function(){return arguments}())?jr:t=>Yn(t)&&kr.call(t,'callee')&&!Ir.call(t,'callee'),Pr=Array.isArray;function Rr(t){return'number'==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}var Vr='object'==typeof exports&&exports&&!exports.nodeType&&exports,qr=Vr&&'object'==typeof module&&module&&!module.nodeType&&module,Fr=qr&&qr.exports===Vr?Fn.Buffer:void 0,Dr=(Fr?Fr.isBuffer:void 0)||function(){return!1},Lr={};Lr['[object Float32Array]']=Lr['[object Float64Array]']=Lr['[object Int8Array]']=Lr['[object Int16Array]']=Lr['[object Int32Array]']=Lr['[object Uint8Array]']=Lr['[object Uint8ClampedArray]']=Lr['[object Uint16Array]']=Lr['[object Uint32Array]']=!0,Lr['[object Arguments]']=Lr['[object Array]']=Lr['[object ArrayBuffer]']=Lr['[object Boolean]']=Lr['[object DataView]']=Lr['[object Date]']=Lr['[object Error]']=Lr['[object Function]']=Lr['[object Map]']=Lr['[object Number]']=Lr['[object Object]']=Lr['[object RegExp]']=Lr['[object Set]']=Lr['[object String]']=Lr['[object WeakMap]']=!1;var zr='object'==typeof exports&&exports&&!exports.nodeType&&exports,Br=zr&&'object'==typeof module&&module&&!module.nodeType&&module,Wr=Br&&Br.exports===zr&&Vn.process,Hr=(()=>{try{return Br&&Br.require&&Br.require('util').types||Wr&&Wr.binding&&Wr.binding('util')}catch{}})(),Ur=Hr&&Hr.isTypedArray,Xr=Ur?function(t){return e=>t(e)}(Ur):function(t){return Yn(t)&&Rr(t.length)&&!!Lr[Xn(t)]},Yr=Object.prototype.hasOwnProperty;function Qr(t){if(null==t)return!0;if(function(t){return null!=t&&Rr(t.length)&&!er(t)}(t)&&(Pr(t)||'string'==typeof t||'function'==typeof t.splice||Dr(t)||Xr(t)||Cr(t)))return!t.length;var e=Nr(t);if('[object Map]'==e||'[object Set]'==e)return!t.size;if(Jn(t))return!function(t){if(!Jn(t))return Zn(t);var e=[];for(var n in Object(t))Kn.call(t,n)&&'constructor'!=n&&e.push(n);return e}(t).length;for(var n in t)if(Yr.call(t,n))return!1;return!0}function Gr(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}function Jr(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}var Zr=/\s/;var Kr=/^\s+/;function ti(t){return t&&t.slice(0,function(t){for(var e=t.length;e--&&Zr.test(t.charAt(e)););return e}(t)+1).replace(Kr,'')}var ei=/^[-+]0x[0-9a-f]+$/i,ni=/^0b[01]+$/i,ri=/^0o[0-7]+$/i,ii=parseInt;function oi(t){if('number'==typeof t)return t;if(function(t){return'symbol'==typeof t||Yn(t)&&'[object Symbol]'==Xn(t)}(t))return NaN;if(tr(t)){var e='function'==typeof t.valueOf?t.valueOf():t;t=tr(e)?e+'':e}if('string'!=typeof t)return 0===t?t:+t;t=ti(t);var n=ni.test(t);return n||ri.test(t)?ii(t.slice(2),n?2:8):ei.test(t)?NaN:+t}var ai=1/0;function ui(t){var e=function(t){return t?(t=oi(t))===ai||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}(t),n=e%1;return e==e?n?e-n:e:0}var si=4294967295,ci=Math.min;function li(t,e){if((t=ui(t))<1||t>9007199254740991)return[];var n=si,r=ci(t,si);e=function(t){return'function'==typeof t?t:Qn}(e),t-=si;for(var i=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(r,e);++n<t;)e(n);return i}function fi(t,e){return function(t){return t&&t.length?((t,e)=>{for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n})(t,Qn):0}(function(t,e){return t&&t.length?Jr(t,0,(e=void 0===e?1:ui(e))<0?0:e):[]}(t,e))}function hi({tickData:t,customSegmentStops:e,min:n,max:r}){if(!Pr(e)||Qr(e))return t;if(function(t){return t&&t.length?t[0]:void 0}(e)!==n)throw new Error(`First value should be equivalent to min value given. Current min value - ${n}`);if(Gr(e)!==r)throw new Error(`Last value should be equivalent to max value given. Current min value - ${r}`);return function(t,e){var n=null==t?0:t.length;return n?Jr(t,(e=void 0===e?1:ui(e))<0?0:e,n):[]}(e.map(((t,i)=>{if(0!==i)return(t-e[i-1])/(r-n)})))}function pi({maxSegmentLabelCount:t,segmentCount:e}){const n=parseInt(t,10),r=parseInt(e,10);return function(t){return'number'==typeof t||Yn(t)&&'[object Number]'==Xn(t)}(n)&&n>=0&&n<=r?n:r}function di(t){return t*Math.PI/180}const yi={Inside:'INSIDE',Outside:'OUTSIDE'},gi={easeLinear:'easeLinear',easeQuadIn:'easeQuadIn',easeQuadOut:'easeQuadOut',easeQuadInOut:'easeQuadInOut',easeCubicIn:'easeCubicIn',easeCubicOut:'easeCubicOut',easeCubicInOut:'easeCubicInOut',easePolyIn:'easePolyIn',easePolyOut:'easePolyOut',easePolyInOut:'easePolyInOut',easeSinIn:'easeSinIn',easeSinOut:'easeSinOut',easeSinInOut:'easeSinInOut',easeExpIn:'easeExpIn',easeExpOut:'easeExpOut',easeExpInOut:'easeExpInOut',easeCircleIn:'easeCircleIn',easeCircleOut:'easeCircleOut',easeCircleInOut:'easeCircleInOut',easeBounceIn:'easeBounceIn',easeBounceOut:'easeBounceOut',easeBounceInOut:'easeBounceInOut',easeBackIn:'easeBackIn',easeBackOut:'easeBackOut',easeBackInOut:'easeBackInOut',easeElasticIn:'easeElasticIn',easeElasticOut:'easeElasticOut',easeElasticInOut:'easeElasticInOut',easeElastic:'easeElastic'},mi=t=>t,vi={value:0,minValue:0,maxValue:1e3,forceRender:!1,width:300,height:300,paddingHorizontal:0,paddingVertical:0,fluidWidth:!1,dimensionUnit:'px',segments:5,maxSegmentLabels:-1,customSegmentStops:[],customSegmentLabels:[],needleColor:'steelblue',startColor:'#FF471A',endColor:'#33CC33',segmentColors:[],needleTransition:gi.easeQuadInOut,needleTransitionDuration:500,needleHeightRatio:.9,ringWidth:60,textColor:'#666',valueFormat:'',segmentValueFormatter:mi,currentValueText:'${value}',currentValuePlaceholderStyle:'${value}',labelFontSize:'14px',valueTextFontSize:'16px',valueTextFontWeight:'bold',svgAriaLabel:'React d3 speedometer'},bi={ringInset:20,pointerWidth:10,pointerTailLength:5,minAngle:-90,maxAngle:90,labelInset:10};function _i(t){return()=>t}const wi=Math.abs,xi=Math.atan2,Si=Math.cos,$i=Math.max,Mi=Math.min,Oi=Math.sin,Ai=Math.sqrt,Ei=1e-12,Ni=Math.PI,ji=Ni/2,Ti=2*Ni;function ki(t){return t>=1?ji:t<=-1?-ji:Math.asin(t)}const Ii=Math.PI,Ci=2*Ii,Pi=1e-6,Ri=Ci-Pi;function Vi(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class qi{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._='',this._append=null==t?Vi:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Vi;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,u=n-t,s=r-e,c=o-t,l=a-e,f=c*c+l*l;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>Pi)if(Math.abs(l*u-s*c)>Pi&&i){let h=n-o,p=r-a,d=u*u+s*s,y=h*h+p*p,g=Math.sqrt(d),m=Math.sqrt(f),v=i*Math.tan((Ii-Math.acos((d+f-y)/(2*g*m)))/2),b=v/m,_=v/g;Math.abs(b-1)>Pi&&this._append`L${t+b*c},${e+b*l}`,this._append`A${i},${i},0,0,${+(l*h>c*p)},${this._x1=t+_*u},${this._y1=e+_*s}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t=+t,e=+e,o=!!o,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),u=n*Math.sin(r),s=t+a,c=e+u,l=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${c}`:(Math.abs(this._x1-s)>Pi||Math.abs(this._y1-c)>Pi)&&this._append`L${s},${c}`,n&&(f<0&&(f=f%Ci+Ci),f>Ri?this._append`A${n},${n},0,1,${l},${t-a},${e-u}A${n},${n},0,1,${l},${this._x1=s},${this._y1=c}`:f>Pi&&this._append`A${n},${n},0,${+(f>=Ii)},${l},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Fi(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new qi(e)}function Di(t){return t.innerRadius}function Li(t){return t.outerRadius}function zi(t){return t.startAngle}function Bi(t){return t.endAngle}function Wi(t){return t&&t.padAngle}function Hi(t,e,n,r,i,o,a){var u=t-n,s=e-r,c=(a?o:-o)/Ai(u*u+s*s),l=c*s,f=-c*u,h=t+l,p=e+f,d=n+l,y=r+f,g=(h+d)/2,m=(p+y)/2,v=d-h,b=y-p,_=v*v+b*b,w=i-o,x=h*y-d*p,S=(b<0?-1:1)*Ai($i(0,w*w*_-x*x)),$=(x*b-v*S)/_,M=(-x*v-b*S)/_,O=(x*b+v*S)/_,A=(-x*v+b*S)/_,E=$-g,N=M-m,j=O-g,T=A-m;return E*E+N*N>j*j+T*T&&($=O,M=A),{cx:$,cy:M,x01:-l,y01:-f,x11:$*(i/w-1),y11:M*(i/w-1)}}function Ui(){var t=Di,e=Li,n=_i(0),r=null,i=zi,o=Bi,a=Wi,u=null,s=Fi(c);function c(){var c,l,f=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-ji,d=o.apply(this,arguments)-ji,y=wi(d-p),g=d>p;if(u||(u=c=s()),h<f&&(l=h,h=f,f=l),h>Ei)if(y>Ti-Ei)u.moveTo(h*Si(p),h*Oi(p)),u.arc(0,0,h,p,d,!g),f>Ei&&(u.moveTo(f*Si(d),f*Oi(d)),u.arc(0,0,f,d,p,g));else{var m,v,b=p,_=d,w=p,x=d,S=y,$=y,M=a.apply(this,arguments)/2,O=M>Ei&&(r?+r.apply(this,arguments):Ai(f*f+h*h)),A=Mi(wi(h-f)/2,+n.apply(this,arguments)),E=A,N=A;if(O>Ei){var j=ki(O/f*Oi(M)),T=ki(O/h*Oi(M));(S-=2*j)>Ei?(w+=j*=g?1:-1,x-=j):(S=0,w=x=(p+d)/2),($-=2*T)>Ei?(b+=T*=g?1:-1,_-=T):($=0,b=_=(p+d)/2)}var k=h*Si(b),I=h*Oi(b),C=f*Si(x),P=f*Oi(x);if(A>Ei){var R,V=h*Si(_),q=h*Oi(_),F=f*Si(w),D=f*Oi(w);if(y<Ni)if(R=function(t,e,n,r,i,o,a,u){var s=n-t,c=r-e,l=a-i,f=u-o,h=f*s-l*c;if(!(h*h<Ei))return[t+(h=(l*(e-o)-f*(t-i))/h)*s,e+h*c]}(k,I,F,D,V,q,C,P)){var L=k-R[0],z=I-R[1],B=V-R[0],W=q-R[1],H=1/Oi(function(t){return t>1?0:t<-1?Ni:Math.acos(t)}((L*B+z*W)/(Ai(L*L+z*z)*Ai(B*B+W*W)))/2),U=Ai(R[0]*R[0]+R[1]*R[1]);E=Mi(A,(f-U)/(H-1)),N=Mi(A,(h-U)/(H+1))}else E=N=0}$>Ei?N>Ei?(m=Hi(F,D,k,I,h,N,g),v=Hi(V,q,C,P,h,N,g),u.moveTo(m.cx+m.x01,m.cy+m.y01),N<A?u.arc(m.cx,m.cy,N,xi(m.y01,m.x01),xi(v.y01,v.x01),!g):(u.arc(m.cx,m.cy,N,xi(m.y01,m.x01),xi(m.y11,m.x11),!g),u.arc(0,0,h,xi(m.cy+m.y11,m.cx+m.x11),xi(v.cy+v.y11,v.cx+v.x11),!g),u.arc(v.cx,v.cy,N,xi(v.y11,v.x11),xi(v.y01,v.x01),!g))):(u.moveTo(k,I),u.arc(0,0,h,b,_,!g)):u.moveTo(k,I),f>Ei&&S>Ei?E>Ei?(m=Hi(C,P,V,q,f,-E,g),v=Hi(k,I,F,D,f,-E,g),u.lineTo(m.cx+m.x01,m.cy+m.y01),E<A?u.arc(m.cx,m.cy,E,xi(m.y01,m.x01),xi(v.y01,v.x01),!g):(u.arc(m.cx,m.cy,E,xi(m.y01,m.x01),xi(m.y11,m.x11),!g),u.arc(0,0,f,xi(m.cy+m.y11,m.cx+m.x11),xi(v.cy+v.y11,v.cx+v.x11),g),u.arc(v.cx,v.cy,E,xi(v.y11,v.x11),xi(v.y01,v.x01),!g))):u.arc(0,0,f,x,w,g):u.lineTo(C,P)}else u.moveTo(0,0);if(u.closePath(),c)return u=null,c+''||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ni/2;return[Si(r)*n,Oi(r)*n]},c.innerRadius=function(e){return arguments.length?(t='function'==typeof e?e:_i(+e),c):t},c.outerRadius=function(t){return arguments.length?(e='function'==typeof t?t:_i(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n='function'==typeof t?t:_i(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:'function'==typeof t?t:_i(+t),c):r},c.startAngle=function(t){return arguments.length?(i='function'==typeof t?t:_i(+t),c):i},c.endAngle=function(t){return arguments.length?(o='function'==typeof t?t:_i(+t),c):o},c.padAngle=function(t){return arguments.length?(a='function'==typeof t?t:_i(+t),c):a},c.context=function(t){return arguments.length?(u=t??null,c):u},c}function Xi(t){this._context=t}function Yi(t){return new Xi(t)}function Qi(t){return t[0]}function Gi(t){return t[1]}function Ji(t,e){var n=_i(!0),r=null,i=Yi,o=null,a=Fi(u);function u(u){var s,c,l,f=(u=function(t){return'object'==typeof t&&'length'in t?t:Array.from(t)}(u)).length,h=!1;for(null==r&&(o=i(l=a())),s=0;s<=f;++s)!(s<f&&n(c=u[s],s,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(c,s,u),+e(c,s,u));if(l)return o=null,l+''||null}return t='function'==typeof t?t:void 0===t?Qi:_i(t),e='function'==typeof e?e:void 0===e?Gi:_i(e),u.x=function(e){return arguments.length?(t='function'==typeof e?e:_i(+e),u):t},u.y=function(t){return arguments.length?(e='function'==typeof t?t:_i(+t),u):e},u.defined=function(t){return arguments.length?(n='function'==typeof t?t:_i(!!t),u):n},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u}function Zi(t){return t<0?-1:1}function Ki(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Zi(o)+Zi(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function to(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function eo(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function no(t){this._context=t}function ro(t){return new no(t)}Xi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},no.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:eo(this,this._t0,to(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,eo(this,to(this,n=Ki(this,t,e)),n);break;default:eo(this,this._t0,n=Ki(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},Object.create(no.prototype).point=function(t,e){no.prototype.point.call(this,e,t)};var io={value:()=>{}};function oo(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+'')||t in r||/[\s.]/.test(t))throw new Error('illegal type: '+t);r[t]=[]}return new ao(r)}function ao(t){this._=t}function uo(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function so(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=io,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ao.prototype=oo.prototype={constructor:ao,on:function(t,e){var n,r=this._,i=function(t,e){return t.trim().split(/^|\s+/).map((t=>{var n='',r=t.indexOf('.');if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error('unknown type: '+t);return{type:t,name:n}}))}(t+'',r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&'function'!=typeof e)throw new Error('invalid callback: '+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=so(r[n],t.name,e);else if(null==e)for(n in r)r[n]=so(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=uo(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ao(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error('unknown type: '+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error('unknown type: '+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var co,lo,fo=0,ho=0,po=0,yo=0,go=0,mo=0,vo='object'==typeof performance&&performance.now?performance:Date,bo='object'==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):t=>{setTimeout(t,17)};function _o(){return go||(bo(wo),go=vo.now()+mo)}function wo(){go=0}function xo(){this._call=this._time=this._next=null}function So(t,e,n){var r=new xo;return r.restart(t,e,n),r}function $o(){go=(yo=vo.now())+mo,fo=ho=0;try{!function(){_o(),++fo;for(var t,e=co;e;)(t=go-e._time)>=0&&e._call.call(void 0,t),e=e._next;--fo}()}finally{fo=0,function(){for(var t,e,n=co,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:co=e);lo=t,Oo(r)}(),go=0}}function Mo(){var t=vo.now(),e=t-yo;e>1e3&&(mo-=e,yo=t)}function Oo(t){fo||(ho&&(ho=clearTimeout(ho)),t-go>24?(t<1/0&&(ho=setTimeout($o,t-vo.now()-mo)),po&&(po=clearInterval(po))):(po||(yo=vo.now(),po=setInterval(Mo,1e3)),fo=1,bo($o)))}function Ao(t,e,n){var r=new xo;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}xo.prototype=So.prototype={constructor:xo,restart:function(t,e,n){if('function'!=typeof t)throw new TypeError('callback is not a function');n=(null==n?_o():+n)+(null==e?0:+e),!this._next&&lo!==this&&(lo?lo._next=this:co=this,lo=this),this._call=t,this._time=n,Oo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oo())}};var Eo=oo('start','end','cancel','interrupt'),No=[];function jo(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var c,l,f,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return Ao(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call('interrupt',t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call('cancel',t,t.__data__,h.index,h.group),delete i[c])}if(Ao((()=>{3===n.state&&(n.state=4,n.timer.restart(u,n.delay,n.time),u(o))})),n.state=2,n.on.call('start',t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function u(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call('end',t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=So(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:Eo,tween:No,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function To(t,e){var n=Io(t,e);if(n.state>0)throw new Error('too late; already scheduled');return n}function ko(t,e){var n=Io(t,e);if(n.state>3)throw new Error('too late; already running');return n}function Io(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error('transition not found');return n}function Co(t,e){var n,r;return function(){var i=ko(this,t),o=i.tween;if(o!==n)for(var a=0,u=(r=n=o).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Po(t,e,n){var r,i;if('function'!=typeof n)throw new Error;return function(){var o=ko(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},s=0,c=i.length;s<c;++s)if(i[s].name===e){i[s]=u;break}s===c&&i.push(u)}o.tween=i}}function Ro(t,e,n){var r=t._id;return t.each((function(){var t=ko(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),t=>Io(t,r).value[e]}function Vo(t,e){var n;return('number'==typeof e?fn:e instanceof Fe?un:(n=Fe(e))?(e=n,un):yn)(t,e)}function qo(t){return function(){this.removeAttribute(t)}}function Fo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Do(t,e,n){var r,i,o=n+'';return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function Lo(t,e,n){var r,i,o=n+'';return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function zo(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttribute(t):(a=this.getAttribute(t))===(u=s+'')?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function Bo(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(u=s+'')?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function Wo(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function Ho(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function Uo(t,e){return function(){To(this,t).delay=+e.apply(this,arguments)}}function Xo(t,e){return e=+e,function(){To(this,t).delay=e}}function Yo(t,e){return function(){ko(this,t).duration=+e.apply(this,arguments)}}function Qo(t,e){return e=+e,function(){ko(this,t).duration=e}}var Go=se.prototype.constructor;function Jo(t){return function(){this.style.removeProperty(t)}}var Zo=0;function Ko(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ta(t){return se().transition(t)}function ea(){return++Zo}var na=se.prototype;Ko.prototype=ta.prototype={constructor:Ko,select:function(t){var e=this._name,n=this._id;'function'!=typeof t&&(t=it(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,s,c=r[a],l=c.length,f=o[a]=new Array(l),h=0;h<l;++h)(u=c[h])&&(s=t.call(u,u.__data__,h,c))&&('__data__'in u&&(s.__data__=u.__data__),f[h]=s,jo(f[h],e,n,h,f,Io(u,n)));return new Ko(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;'function'!=typeof t&&(t=at(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,c=r[u],l=c.length,f=0;f<l;++f)if(s=c[f]){for(var h,p=t.call(s,s.__data__,f,c),d=Io(s,n),y=0,g=p.length;y<g;++y)(h=p[y])&&jo(h,e,n,y,p,d);o.push(p),a.push(s)}return new Ko(o,a,e,n)},selectChild:na.selectChild,selectChildren:na.selectChildren,filter:function(t){'function'!=typeof t&&(t=st(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new Ko(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=e[u],l=n[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;u<r;++u)a[u]=e[u];return new Ko(a,this._parents,this._name,this._id)},selection:function(){return new Go(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ea(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)if(a=u[c]){var l=Io(a,e);jo(a,t,n,c,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ko(r,this._parents,t,n)},call:na.call,nodes:na.nodes,node:na.node,size:na.size,empty:na.empty,each:na.each,on:function(t,e){var n=this._id;return arguments.length<2?Io(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=(t=>(t+'').trim().split(/^|\s+/).every((t=>{var e=t.indexOf('.');return e>=0&&(t=t.slice(0,e)),!t||'start'===t})))(e)?To:ko;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=K(t),r='transform'===n?$n:Vo;return this.attrTween(t,'function'==typeof e?(n.local?Bo:zo)(n,r,Ro(this,'attr.'+t,e)):null==e?(n.local?Fo:qo)(n):(n.local?Lo:Do)(n,r,e))},attrTween:function(t,e){var n='attr.'+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if('function'!=typeof e)throw new Error;var r=K(t);return this.tween(n,(r.local?Wo:Ho)(r,e))},style:function(t,e,n){var r='transform'==(t+='')?Sn:Vo;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Tt(this,t),a=(this.style.removeProperty(t),Tt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on('end.style.'+t,Jo(t)):'function'==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Tt(this,t),u=n(this),s=u+'';return null==u&&(this.style.removeProperty(t),s=u=Tt(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=e(r=a,u))}}(t,r,Ro(this,'style.'+t,e))).each(function(t,e){var n,r,i,o,a='style.'+e,u='end.'+a;return function(){var s=ko(this,t),c=s.on,l=null==s.value[a]?o||(o=Jo(e)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(u,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+'';return function(){var a=Tt(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on('end.style.'+t,null)},styleTween:function(t,e,n){var r='style.'+(t+='');if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if('function'!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,n??''))},text:function(t){return this.tween('text','function'==typeof t?function(t){return function(){var e=t(this);this.textContent=e??''}}(Ro(this,'text',t)):function(t){return function(){this.textContent=t}}(null==t?'':t+''))},textTween:function(t){var e='text';if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if('function'!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on('end.remove',function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+='',arguments.length<2){for(var r,i=Io(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Co:Po)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(('function'==typeof t?Uo:Xo)(e,t)):Io(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(('function'==typeof t?Yo:Qo)(e,t)):Io(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if('function'!=typeof e)throw new Error;return function(){ko(this,t).ease=e}}(e,t)):Io(this.node(),e).ease},easeVarying:function(t){if('function'!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if('function'!=typeof n)throw new Error;ko(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var u={value:a},s={value:()=>{0==--i&&o()}};n.each((function(){var n=ko(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:na[Symbol.iterator]};const ra=t=>+t;function ia(t){return t*t}function oa(t){return t*(2-t)}function aa(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function ua(t){return t*t*t}function sa(t){return--t*t*t+1}function ca(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var la=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),fa=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),ha=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),pa=Math.PI,da=pa/2;function ya(t){return 1==+t?1:1-Math.cos(t*da)}function ga(t){return Math.sin(t*da)}function ma(t){return(1-Math.cos(pa*t))/2}function va(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function ba(t){return va(1-+t)}function _a(t){return 1-va(t)}function wa(t){return((t*=2)<=1?va(1-t):2-va(t-1))/2}function xa(t){return 1-Math.sqrt(1-t*t)}function Sa(t){return Math.sqrt(1- --t*t)}function $a(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ma=4/11,Oa=6/11,Aa=8/11,Ea=9/11,Na=10/11,ja=21/22,Ta=7.5625;function ka(t){return 1-Ia(1-t)}function Ia(t){return(t=+t)<Ma?Ta*t*t:t<Aa?Ta*(t-=Oa)*t+.75:t<Na?Ta*(t-=Ea)*t+.9375:Ta*(t-=ja)*t+.984375}function Ca(t){return((t*=2)<=1?1-Ia(1-t):Ia(t-1)+1)/2}var Pa=1.70158,Ra=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(Pa),Va=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(Pa),qa=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(Pa),Fa=2*Math.PI,Da=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Fa);function i(t){return e*va(- --t)*Math.sin((r-t)/n)}return i.amplitude=e=>t(e,n*Fa),i.period=n=>t(e,n),i}(1,.3),La=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Fa);function i(t){return 1-e*va(t=+t)*Math.sin((t+r)/n)}return i.amplitude=e=>t(e,n*Fa),i.period=n=>t(e,n),i}(1,.3),za=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Fa);function i(t){return((t=2*t-1)<0?e*va(-t)*Math.sin((r-t)/n):2-e*va(t)*Math.sin((r+t)/n))/2}return i.amplitude=e=>t(e,n*Fa),i.period=n=>t(e,n),i}(1,.3),Ba={time:null,delay:0,duration:250,ease:ca};function Wa(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ha(t){switch(t){case gi.easeLinear:return ra;case gi.easeQuadIn:return ia;case gi.easeQuadOut:return oa;case gi.easeQuadInOut:return aa;case gi.easeCubicIn:return ua;case gi.easeCubicOut:return sa;case gi.easeCubicInOut:return ca;case gi.easePolyIn:return la;case gi.easePolyOut:return fa;case gi.easePolyInOut:return ha;case gi.easeSinIn:return ya;case gi.easeSinOut:return ga;case gi.easeSinInOut:return ma;case gi.easeExpIn:return ba;case gi.easeExpOut:return _a;case gi.easeExpInOut:return wa;case gi.easeCircleIn:return xa;case gi.easeCircleOut:return Sa;case gi.easeCircleInOut:return $a;case gi.easeBounceIn:return ka;case gi.easeBounceOut:return Ia;case gi.easeBounceInOut:return Ca;case gi.easeBackIn:return Ra;case gi.easeBackOut:return Va;case gi.easeBackInOut:return qa;case gi.easeElasticIn:return Da;case gi.easeElasticOut:return La;case gi.easeElasticInOut:return za;case gi.easeElastic:return La;default:return aa}}se.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+'',o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?'interrupt':'cancel',t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},se.prototype.transition=function(t){var e,n;t instanceof Ko?(e=t._id,t=t._name):(e=ea(),(n=Ba).time=_o(),t=null==t?null:t+'');for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)(a=u[c])&&jo(a,t,e,c,u,n||Wa(a,e));return new Ko(r,this._parents,t,e)};var Ua=Number.isNaN||(t=>'number'==typeof t&&t!=t);function Xa(t,e){return!!(t===e||Ua(t)&&Ua(e))}function Ya(t,e){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!Xa(t[n],e[n]))return!1;return!0}function Qa(t,e){void 0===e&&(e=Ya);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&e(r,n.lastArgs))return n.lastResult;var o=t.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=()=>{n=null},r}const Ga=Qa((function(t){return function({min:t,max:e,segments:n}){return Pn().range([0,1]).domain([t,e])}({min:t.minValue,max:t.maxValue,segments:t.maxSegmentLabels})})),Ja=Qa((function(t){const e=Ga(t);let n=function(t,{min:e,max:n,segments:r}){let i=[];if(i=t.ticks(r),(Gr(i)!==n||r<i.length)&&i.length>1){const t=(n-e)/r;i=[e],li(r,(n=>{i.push(e+(n+1)*t)}))}return 1===i.length&&(i=[e,n]),i}(e,{min:t.minValue,max:t.maxValue,segments:t.maxSegmentLabels});return t.customSegmentStops.length>0&&0!==t.maxSegmentLabels&&(n=t.customSegmentStops),n})),Za=Qa((function(t){const e=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}(t.majorTicks).map((e=>1/t.majorTicks));return hi({tickData:e,customSegmentStops:t.customSegmentStops,min:t.minValue,max:t.maxValue})})),Ka=Qa((function(t){const e=Za(t),n=t.maxAngle-t.minAngle,r=t.width/2;return Ui().innerRadius(r-t.ringWidth-t.ringInset).outerRadius(r-t.ringInset).startAngle(((r,i)=>{const o=fi(e,i);return di(t.minAngle+o*n)})).endAngle(((r,i)=>{const o=fi(e,i+1);return di(t.minAngle+o*n)}))}));const tu=({d3_refs:t,newValue:e,config:n})=>{const r=Ga(n)(e),i=n.maxAngle-n.minAngle,o=n.minAngle+r*i;t.pointer.transition(function({duration:t,ease:e}){return ta().duration(t).ease(e)}({duration:n.needleTransitionDuration,ease:Ha(n.needleTransition)})).attr('transform',`rotate(${o})`),t.current_value_text.text(function(t,e){const n=e.labelFormat(t),r=e.currentValuePlaceholderStyle;return e.currentValueText.replace(r,n)}(e,n))},eu=({container:t,config:e})=>{const n=function(t){return t.width/2}(e),r=function(t,e,n){return`translate(${t+e}, ${t+n})`}(n,e.paddingHorizontal,e.paddingVertical),i=function({container:t,config:e}){const n=e.width+2*e.paddingHorizontal,r=e.height+2*e.paddingVertical;return ce(t).append('svg:svg').attr('class','speedometer').attr('width',`${n}${e.dimensionUnit}`).attr('height',`${r}${e.dimensionUnit}`).attr('role','img').attr('focusable','false').attr('aria-label',e.svgAriaLabel).style('width',`${n}${e.dimensionUnit}`).style('height',`${r}${e.dimensionUnit}`)}({container:t,config:e});return function({config:t,svg:e,centerTx:n}){const r=Za(t),i=Ka(t);e.append('g').attr('class','arc').attr('transform',n).selectAll('path').data(r).enter().append('path').attr('class','speedo-segment').attr('fill',((e,n)=>!Qr(t.segmentColors)&&t.segmentColors[n]?t.segmentColors[n]:t.arcColorFn(e*n))).attr('d',i)}({config:e,svg:i,centerTx:r}),function({config:t,svg:e,centerTx:n,r}){const i=Ja(t),o=Za(t),a=Ga(t),u=t.maxAngle-t.minAngle,{customSegmentLabels:s}=t,c=Pr(s)&&!Qr(s),l=c&&s.length===o.length;if(c&&!l)throw new Error(`Custom Segment Labels should be an array with length of ${o.length}`);if(c&&l)return void function({config:t,svg:e,centerTx:n,r,ticks:i,tickData:o,scale:a,range:u}){const{customSegmentStops:s,customSegmentLabels:c}=t;function l(e,n){const r=0===s.length?a(e):fi(o,n);return t.minAngle+r*u}const f=c.map(((t,e)=>{const n=e,r=e+1,o=l(i[n],n);return(l(i[r],r)+o)/2})),h=r-t.ringWidth-t.ringInset,p=r-t.ringInset,d=p-(p-h)/2;e.append('g').attr('class','label').attr('transform',n).selectAll('text').data(c).enter().append('text').attr('transform',((e,n)=>{const i=f[n],o=`rotate(${i}) translate(0, ${t.labelInset-r})`,a=`rotate(${i}) translate(0, ${t.labelInset/2-d})`;return'OUTSIDE'===e.position?o:a})).text((t=>t.text||'')).attr('class','segment-value').style('text-anchor','middle').style('font-size',(e=>e.fontSize||t.labelFontSize)).style('font-weight','bold').style('fill',(e=>e.color||t.textColor))}({config:t,svg:e,centerTx:n,r,ticks:i,tickData:o,scale:a,range:u});e.append('g').attr('class','label').attr('transform',n).selectAll('text').data(i).enter().append('text').attr('transform',((e,n)=>{const i=0===t.customSegmentStops.length?a(e):fi(o,n);return`rotate(${t.minAngle+i*u}) translate(0, ${t.labelInset-r})`})).text((e=>t.segmentValueFormatter(t.labelFormat(e)))).attr('class','segment-value').style('text-anchor','middle').style('font-size',t.labelFontSize).style('font-weight','bold').style('fill',t.textColor)}({config:e,svg:i,centerTx:r,r:n}),{current_value_text:nu({config:e,svg:i}),pointer:ru({config:e,svg:i,r:n,centerTx:r})}};function nu({config:t,svg:e}){const n=(t.width+2*t.paddingHorizontal)/2,r=(t.width+4*t.paddingVertical)/2;return e.append('g').attr('transform',`translate(${n}, ${r})`).append('text').attr('class','current-value').attr('text-anchor','middle').attr('y',23).text(t.currentValue).style('font-size',t.valueTextFontSize).style('font-weight',t.valueTextFontWeight).style('fill',t.textColor)}function ru({config:t,svg:e,r:n,centerTx:r}){const i=function({heightRatio:t,radius:e}){if(t<0||t>1)throw new Error(`Invalid needleHeightRatio given - ${t}`);return Math.round(e*t)}({heightRatio:t.needleHeightRatio,radius:n}),o=[[t.pointerWidth/2,0],[0,-i],[-t.pointerWidth/2,0],[0,t.pointerTailLength],[t.pointerWidth/2,0]],a=Ji().curve(ro);return e.append('g').data([o]).attr('class','pointer').attr('transform',r).style('fill',t.needleColor).append('path').attr('d',a).attr('transform',`rotate(${t.minAngle})`)}class iu extends r{constructor(t){super(t),e(this,'render',(()=>n('div',{ref:t=>this.gaugeDiv=t}))),this.d3_refs={pointer:!1,current_value_text:!1}}componentDidMount(){this.renderGauge()}componentDidUpdate(){this.props.forceRender?this.renderGauge():this.updateReadings()}renderGauge(){this.config=(({PROPS:t,parentWidth:e,parentHeight:n})=>{const r={width:t.fluidWidth?e:t.width,height:t.fluidWidth?n:t.height,paddingHorizontal:t.paddingHorizontal,paddingVertical:t.paddingVertical,dimensionUnit:t.dimensionUnit,ringWidth:t.ringWidth,minValue:t.minValue,maxValue:t.maxValue,needleColor:t.needleColor,majorTicks:t.segments,customSegmentStops:t.customSegmentStops,customSegmentLabels:t.customSegmentLabels,maxSegmentLabels:pi({maxSegmentLabelCount:t.maxSegmentLabels,segmentCount:t.segments}),segmentColors:t.segmentColors,arcColorFn:t.segmentColors.length>0?Rn(t.segmentColors):Mn(ze(t.startColor),ze(t.endColor)),needleTransition:t.needleTransition,needleTransitionDuration:t.needleTransitionDuration,needleHeightRatio:t.needleHeightRatio,textColor:t.textColor,labelFormat:U(t.valueFormat),segmentValueFormatter:t.segmentValueFormatter,currentValueText:t.currentValueText,currentValuePlaceholderStyle:t.currentValuePlaceholderStyle,labelFontSize:t.labelFontSize,valueTextFontSize:t.valueTextFontSize,valueTextFontWeight:t.valueTextFontWeight,svgAriaLabel:t.svgAriaLabel};return Object.assign({},bi,r)})({PROPS:this.props,parentWidth:this.gaugeDiv.parentNode.clientWidth,parentHeight:this.gaugeDiv.parentNode.clientHeight}),ce(this.gaugeDiv).select('svg').remove(),this.d3_refs=eu({container:this.gaugeDiv,config:this.config}),tu({d3_refs:this.d3_refs,newValue:this.props.value,config:this.config})}updateReadings(){this.config=((t,e)=>({...t,...e}))(this.config,{labelFormat:U(this.props.valueFormat||''),segmentValueFormatter:this.props.segmentValueFormatter||mi,currentValueText:this.props.currentValueText||'${value}'}),tu({d3_refs:this.d3_refs,newValue:this.props.value||0,config:this.config})}}e(iu,'displayName','ReactSpeedometer'),iu.propTypes={value:P.number.isRequired,minValue:P.number.isRequired,maxValue:P.number.isRequired,forceRender:P.bool.isRequired,width:P.number.isRequired,height:P.number.isRequired,paddingHorizontal:P.number.isRequired,paddingVertical:P.number.isRequired,dimensionUnit:P.string.isRequired,fluidWidth:P.bool.isRequired,segments:P.number.isRequired,maxSegmentLabels:P.number,customSegmentStops:P.array,customSegmentLabels:P.arrayOf(P.shape({text:P.string,position:P.oneOf(['OUTSIDE','INSIDE']),fontSize:P.string,color:P.string})),needleColor:P.string.isRequired,startColor:P.string.isRequired,endColor:P.string.isRequired,segmentColors:P.array.isRequired,needleTransition:P.string.isRequired,needleTransitionDuration:P.number.isRequired,needleHeightRatio:P.number.isRequired,ringWidth:P.number.isRequired,textColor:P.string.isRequired,valueFormat:P.string.isRequired,segmentValueFormatter:P.func,currentValueText:P.string.isRequired,currentValuePlaceholderStyle:P.string.isRequired,labelFontSize:P.string.isRequired,valueTextFontSize:P.string.isRequired,valueTextFontWeight:P.string.isRequired,svgAriaLabel:P.string},iu.defaultProps=vi;export{yi as CustomSegmentLabelPosition,gi as Transition,iu as default};
