Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

victory-canvas

Package Overview
Dependencies
Maintainers
17
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-canvas - npm Package Compare versions

Comparing version 36.8.2 to 36.8.3

6

CHANGELOG.md
# victory-canvas
## 36.8.3
### Patch Changes
- Fix incorrect typescript props ([#2745](https://github.com/FormidableLabs/victory/pull/2745))
## 36.8.2

@@ -4,0 +10,0 @@

2

dist/victory-canvas.min.js

@@ -1,2 +0,2 @@

!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(t=>(()=>{var n={2596:(t,n,i)=>{var e=i(2373).Symbol;t.exports=e},6082:t=>{t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:t=>{t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:t=>{t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:(t,n,i)=>{var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:(t,n,i)=>{var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:(t,n,i)=>{var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,c){var a=-1,h=n.length;for(r||(r=o),c||(c=[]);++a<h;){var u=n[a];i>0&&r(u)?i>1?t(u,i-1,r,s,c):e(c,u):s||(c[c.length]=u)}return c}},4432:(t,n,i)=>{var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:t=>{var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:t=>{t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:(t,n,i)=>{var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:(t,n,i)=>{var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,c=n.length,a={};++s<c;){var h=n[s],u=e(t,h);i(u,h)&&o(a,r(h,t),u)}return a}},1600:t=>{t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:(t,n,i)=>{var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},7805:t=>{var n=Math.ceil,i=Math.max;t.exports=function(t,e,o,r){for(var s=-1,c=i(n((e-t)/(o||1)),0),a=Array(c);c--;)a[r?c:++s]=t,t+=o;return a}},6317:(t,n,i)=>{var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:(t,n,i)=>{var e=i(4132),o=i(9026),r=i(9099),s=i(7709),c=i(3110);t.exports=function(t,n,i,a){if(!s(t))return t;for(var h=-1,u=(n=o(n,t)).length,l=u-1,_=t;null!=_&&++h<u;){var f=c(n[h]),y=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var x=_[f];void 0===(y=a?a(x,f,_):void 0)&&(y=s(x)?x:r(n[h+1])?[]:{})}e(_,f,y),_=_[f]}return t}},6316:(t,n,i)=>{var e=i(2596),o=i(8644),r=i(163),s=i(1995),c=e?e.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return a?a.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},1367:(t,n,i)=>{var e=i(4120),o=/^\s+/;t.exports=function(t){return t?t.slice(0,e(t)+1).replace(o,""):t}},9026:(t,n,i)=>{var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},9021:(t,n,i)=>{var e=i(4132),o=i(8347);t.exports=function(t,n,i,r){var s=!i;i||(i={});for(var c=-1,a=n.length;++c<a;){var h=n[c],u=r?r(i[h],t[h],h,i,t):void 0;void 0===u&&(u=t[h]),s?o(i,h,u):e(i,h,u)}return i}},6092:(t,n,i)=>{var e=i(6317),o=i(8286);t.exports=function(t){return e((function(n,i){var e=-1,r=i.length,s=r>1?i[r-1]:void 0,c=r>2?i[2]:void 0;for(s=t.length>3&&"function"==typeof s?(r--,s):void 0,c&&o(i[0],i[1],c)&&(s=r<3?void 0:s,r=1),n=Object(n);++e<r;){var a=i[e];a&&t(n,a,e,s)}return n}))}},2507:(t,n,i)=>{var e=i(7805),o=i(8286),r=i(9139);t.exports=function(t){return function(n,i,s){return s&&"number"!=typeof s&&o(n,i,s)&&(i=s=void 0),n=r(n),void 0===i?(i=n,n=0):i=r(i),s=void 0===s?n<i?1:-1:r(s),e(n,i,s,t)}}},5525:(t,n,i)=>{var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:(t,n,i)=>{var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:(t,n,i)=>{var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:t=>{t.exports=function(t,n){return null==t?void 0:t[n]}},9817:(t,n,i)=>{var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:(t,n,i)=>{var e=i(9026),o=i(5075),r=i(163),s=i(9099),c=i(8454),a=i(3110);t.exports=function(t,n,i){for(var h=-1,u=(n=e(n,t)).length,l=!1;++h<u;){var _=a(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=u?l:!!(u=null==t?0:t.length)&&c(u)&&s(_,u)&&(r(t)||o(t))}},3608:(t,n,i)=>{var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:t=>{var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:t=>{t.exports=function(){return!1}},726:(t,n,i)=>{var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},5782:t=>{t.exports=function(){return!1}},2453:t=>{t.exports=function(t){return t}},5125:t=>{t.exports=function(t,n){return function(i){return t(n(i))}}},4280:(t,n,i)=>{var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,c=o(r.length-n,0),a=Array(c);++s<c;)a[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(a),e(t,this,h)}}},2373:(t,n,i)=>{var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:t=>{t.exports=function(t){return t}},7801:(t,n,i)=>{var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:(t,n,i)=>{var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4120:t=>{var n=/\s/;t.exports=function(t){for(var i=t.length;i--&&n.test(t.charAt(i)););return i}},156:(t,n,i)=>{var e=i(4132),o=i(9021),r=i(6092),s=i(981),c=i(5782),a=i(7747),h=Object.prototype.hasOwnProperty,u=r((function(t,n){if(c(n)||s(n))o(n,a(n),t);else for(var i in n)h.call(n,i)&&e(t,i,n[i])}));t.exports=u},1893:(t,n,i)=>{var e=i(6317),o=i(788),r=i(8286),s=i(8855),c=Object.prototype,a=c.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var u=n[i],l=s(u),_=-1,f=l.length;++_<f;){var y=l[_],x=t[y];(void 0===x||o(x,c[y])&&!a.call(t,y))&&(t[y]=u[y])}return t}));t.exports=h},788:t=>{t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:(t,n,i)=>{var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:(t,n,i)=>{var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:t=>{t.exports=function(t){return t}},5075:t=>{t.exports=function(){return!1}},163:t=>{var n=Array.isArray;t.exports=n},981:(t,n,i)=>{var e=i(9642),o=i(8454);t.exports=function(t){return null!=t&&o(t.length)&&!e(t)}},9642:(t,n,i)=>{var e=i(563),o=i(7709);t.exports=function(t){if(!o(t))return!1;var n=e(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9555:t=>{t.exports=function(t){return null==t}},7709:t=>{t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3849:(t,n,i)=>{var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,c=Object.prototype,a=s.toString,h=c.hasOwnProperty,u=a.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&a.call(i)==u}},1995:t=>{t.exports=function(){return!1}},7747:(t,n,i)=>{var e=i(5125)(Object.keys,Object);t.exports=e},8855:t=>{t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:(t,n,i)=>{var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:(t,n,i)=>{var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},8825:(t,n,i)=>{var e=i(2507)();t.exports=e},9139:(t,n,i)=>{var e=i(5812);t.exports=function(t){return t?Infinity===(t=e(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},5812:(t,n,i)=>{var e=i(1367),o=i(7709),r=i(1995),s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(o(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=o(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=e(t);var i=c.test(t);return i||a.test(t)?h(t.slice(2),i?2:8):s.test(t)?NaN:+t}},7010:(t,n,i)=>{var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:n=>{"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";e.r(o),e.d(o,{CanvasBar:()=>ct,CanvasCurve:()=>wi,CanvasGroup:()=>at,CanvasPoint:()=>Li,useCanvasContext:()=>rt});var t={};e.r(t),e.d(t,{arc:()=>F,area:()=>pt,areaRadial:()=>kt,curveBasis:()=>pn,curveBasisClosed:()=>dn,curveBasisOpen:()=>gn,curveBumpX:()=>At,curveBumpY:()=>Ct,curveBundle:()=>Tn,curveCardinal:()=>kn,curveCardinalClosed:()=>Sn,curveCardinalOpen:()=>An,curveCatmullRom:()=>jn,curveCatmullRomClosed:()=>Nn,curveCatmullRomOpen:()=>zn,curveLinear:()=>_t,curveLinearClosed:()=>qn,curveMonotoneX:()=>Zn,curveMonotoneY:()=>Vn,curveNatural:()=>Hn,curveStep:()=>Jn,curveStepAfter:()=>ti,curveStepBefore:()=>Kn,line:()=>xt,lineRadial:()=>Mt,link:()=>Nt,linkHorizontal:()=>Lt,linkRadial:()=>It,linkVertical:()=>zt,pie:()=>bt,pointRadial:()=>Ot,radialArea:()=>kt,radialLine:()=>Mt,stack:()=>ri,stackOffsetDiverging:()=>ci,stackOffsetExpand:()=>si,stackOffsetNone:()=>ni,stackOffsetSilhouette:()=>ai,stackOffsetWiggle:()=>hi,stackOrderAppearance:()=>ui,stackOrderAscending:()=>_i,stackOrderDescending:()=>yi,stackOrderInsideOut:()=>xi,stackOrderNone:()=>ii,stackOrderReverse:()=>pi,symbol:()=>_n,symbolAsterisk:()=>Dt,symbolCircle:()=>Wt,symbolCross:()=>Xt,symbolDiamond:()=>$t,symbolDiamond2:()=>Ft,symbolPlus:()=>Zt,symbolSquare:()=>Vt,symbolSquare2:()=>Gt,symbolStar:()=>Jt,symbolTriangle:()=>tn,symbolTriangle2:()=>en,symbolWye:()=>an,symbolX:()=>hn,symbols:()=>un,symbolsFill:()=>un,symbolsStroke:()=>ln});var n=e(156),i=e.n(n),r=e(9787),s=e.n(r),c=e(3849),a=e.n(c),h=e(9555),u=e.n(h),l=e(7747),_=e.n(l),f=(e(9082),e(8532),e(9642)),y=e.n(f);function x(t,n){return y()(t)?t(n):t}function p(t,n){return n.disableInlineStyles?{}:t&&_()(t).some((function(n){return y()(t[n])}))?_()(t).reduce((function(i,e){return i[e]=x(t[e],n),i}),{}):t}e(1893);const v=Math.PI,d=2*v,b=1e-6,g=d-b;function m(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function T(){return new m}m.prototype=T.prototype={constructor:m,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,c=i-t,a=e-n,h=r-t,u=s-n,l=h*h+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>b)if(Math.abs(u*c-a*h)>b&&o){var _=i-r,f=e-s,y=c*c+a*a,x=_*_+f*f,p=Math.sqrt(y),d=Math.sqrt(l),g=o*Math.tan((v-Math.acos((y+l-x)/(2*p*d)))/2),m=g/d,T=g/p;Math.abs(m-1)>b&&(this._+="L"+(t+m*h)+","+(n+m*u)),this._+="A"+o+","+o+",0,0,"+ +(u*_>h*f)+","+(this._x1=t+T*c)+","+(this._y1=n+T*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),c=i*Math.sin(e),a=t+s,h=n+c,u=1^r,l=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>b||Math.abs(this._y1-h)>b)&&(this._+="L"+a+","+h),i&&(l<0&&(l=l%d+d),l>g?this._+="A"+i+","+i+",0,1,"+u+","+(t-s)+","+(n-c)+"A"+i+","+i+",0,1,"+u+","+(this._x1=a)+","+(this._y1=h):l>b&&(this._+="A"+i+","+i+",0,"+ +(l>=v)+","+u+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};const w=T;function M(t){return function(){return t}}const k=Math.abs,O=Math.atan2,S=Math.cos,P=Math.max,A=Math.min,C=Math.sin,R=Math.sqrt,j=1e-12,E=Math.PI,N=E/2,L=2*E;function z(t){return t>1?0:t<-1?E:Math.acos(t)}function I(t){return t>=1?N:t<=-1?-N:Math.asin(t)}function q(t){return t.innerRadius}function D(t){return t.outerRadius}function W(t){return t.startAngle}function X(t){return t.endAngle}function Y(t){return t&&t.padAngle}function B(t,n,i,e,o,r,s,c){var a=i-t,h=e-n,u=s-o,l=c-r,_=l*a-u*h;if(!(_*_<j))return[t+(_=(u*(n-r)-l*(t-o))/_)*a,n+_*h]}function $(t,n,i,e,o,r,s){var c=t-i,a=n-e,h=(s?r:-r)/R(c*c+a*a),u=h*a,l=-h*c,_=t+u,f=n+l,y=i+u,x=e+l,p=(_+y)/2,v=(f+x)/2,d=y-_,b=x-f,g=d*d+b*b,m=o-r,T=_*x-y*f,w=(b<0?-1:1)*R(P(0,m*m*g-T*T)),M=(T*b-d*w)/g,k=(-T*d-b*w)/g,O=(T*b+d*w)/g,S=(-T*d+b*w)/g,A=M-p,C=k-v,j=O-p,E=S-v;return A*A+C*C>j*j+E*E&&(M=O,k=S),{cx:M,cy:k,x01:-u,y01:-l,x11:M*(o/m-1),y11:k*(o/m-1)}}function F(){var t=q,n=D,i=M(0),e=null,o=W,r=X,s=Y,c=null;function a(){var a,h,u=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-N,f=r.apply(this,arguments)-N,y=k(f-_),x=f>_;if(c||(c=a=w()),l<u&&(h=l,l=u,u=h),l>j)if(y>L-j)c.moveTo(l*S(_),l*C(_)),c.arc(0,0,l,_,f,!x),u>j&&(c.moveTo(u*S(f),u*C(f)),c.arc(0,0,u,f,_,x));else{var p,v,d=_,b=f,g=_,m=f,T=y,M=y,P=s.apply(this,arguments)/2,q=P>j&&(e?+e.apply(this,arguments):R(u*u+l*l)),D=A(k(l-u)/2,+i.apply(this,arguments)),W=D,X=D;if(q>j){var Y=I(q/u*C(P)),F=I(q/l*C(P));(T-=2*Y)>j?(g+=Y*=x?1:-1,m-=Y):(T=0,g=m=(_+f)/2),(M-=2*F)>j?(d+=F*=x?1:-1,b-=F):(M=0,d=b=(_+f)/2)}var Z=l*S(d),V=l*C(d),G=u*S(m),U=u*C(m);if(D>j){var H,Q=l*S(b),J=l*C(b),K=u*S(g),tt=u*C(g);if(y<E&&(H=B(Z,V,K,tt,Q,J,G,U))){var nt=Z-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/C(z((nt*et+it*ot)/(R(nt*nt+it*it)*R(et*et+ot*ot)))/2),st=R(H[0]*H[0]+H[1]*H[1]);W=A(D,(u-st)/(rt-1)),X=A(D,(l-st)/(rt+1))}}M>j?X>j?(p=$(K,tt,Z,V,l,X,x),v=$(Q,J,G,U,l,X,x),c.moveTo(p.cx+p.x01,p.cy+p.y01),X<D?c.arc(p.cx,p.cy,X,O(p.y01,p.x01),O(v.y01,v.x01),!x):(c.arc(p.cx,p.cy,X,O(p.y01,p.x01),O(p.y11,p.x11),!x),c.arc(0,0,l,O(p.cy+p.y11,p.cx+p.x11),O(v.cy+v.y11,v.cx+v.x11),!x),c.arc(v.cx,v.cy,X,O(v.y11,v.x11),O(v.y01,v.x01),!x))):(c.moveTo(Z,V),c.arc(0,0,l,d,b,!x)):c.moveTo(Z,V),u>j&&T>j?W>j?(p=$(G,U,Q,J,u,-W,x),v=$(Z,V,K,tt,u,-W,x),c.lineTo(p.cx+p.x01,p.cy+p.y01),W<D?c.arc(p.cx,p.cy,W,O(p.y01,p.x01),O(v.y01,v.x01),!x):(c.arc(p.cx,p.cy,W,O(p.y01,p.x01),O(p.y11,p.x11),!x),c.arc(0,0,u,O(p.cy+p.y11,p.cx+p.x11),O(v.cy+v.y11,v.cx+v.x11),x),c.arc(v.cx,v.cy,W,O(v.y11,v.x11),O(v.y01,v.x01),!x))):c.arc(0,0,u,m,g,x):c.lineTo(G,U)}else c.moveTo(0,0);if(c.closePath(),a)return c=null,a+""||null}return a.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-E/2;return[S(e)*i,C(e)*i]},a.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),a):t},a.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:M(+t),a):i},a.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:M(+t),a):e},a.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),a):o},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:M(+t),a):r},a.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:M(+t),a):s},a.context=function(t){return arguments.length?(c=null==t?null:t,a):c},a}var Z=function(t,n){return{x:t,y:n,distance:function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add:function(t){return Z(this.x+t.x,this.y+t.y)},subtract:function(t){return Z(this.x-t.x,this.y-t.y)},scalarMult:function(t){return Z(this.x*t,this.y*t)},scalarDivide:function(t){if(0===t)throw new Error("Division by 0 error");return Z(this.x/t,this.y/t)},equals:function(t){return this.x===t.x&&this.y===t.y}}},V=function(t,n){return{center:t,radius:n,hasIntersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals:function(t){var n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];var s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),c=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),a=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),h=n.x,u=n.y,l=i.x,_=i.y,f=a.x,y=a.y,x=[Z(f-c*(_-u)/r,y+c*(l-h)/r),Z(f+c*(_-u)/r,y-c*(l-h)/r)];return x.sort((function(t,n){return t.x-n.x})),x},solveX:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}};function G(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function U(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?G(Object(i),!0).forEach((function(n){H(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):G(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function H(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Q(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return J(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?J(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}var K=function(t,n){var i=t.x,e=t.x0,o=t.y,r=t.y0,s=t.horizontal,c=t.alignment||"middle",a="middle"===c?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===c?o:o-h*a,y1:"end"===c?o:o+h*a}:{x0:"start"===c?i:i-h*a,x1:"end"===c?i:i+h*a,y0:r,y1:o}},tt=function(t,n){var i=t.data,e=t.scale,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},nt=function(t){return-1*t+Math.PI/2},it=function(t,n,i){var e="".concat(n.topLeft," ").concat(n.topLeft," ").concat(i),o="".concat(n.topRight," ").concat(n.topRight," ").concat(i),r="".concat(n.bottomLeft," ").concat(n.bottomLeft," ").concat(i),s="".concat(n.bottomRight," ").concat(n.bottomRight," ").concat(i),c=["M","A ".concat(r,","),"L","A ".concat(e,","),"L","A ".concat(o,","),"L","A ".concat(s,",")].reduce((function(n,i,e){return n+"".concat(i," ").concat(t[e].x,", ").concat(t[e].y," \n")}),"");return"".concat(c," z")},et=function(t,n,i){return t.getPath?function(t,n){return(0,t.getPath)(U(U({},t),K(t,n)))}(t,n):t.horizontal?function(t,n,i){var e=K(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=function(t,n,i){var e=t.y0,o=t.y1,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,c=function(t){var c="top"===t,a=c?-1:1,h=c?o:e,u={x:r,y:h-a*i["".concat(t,"Left")]},l={x:r+i["".concat(t,"Left")],y:h},_={x:s-i["".concat(t,"Right")],y:h},f={x:s,y:h-a*i["".concat(t,"Right")]};if(l.x>_.x){var y=Z(r+i["".concat(t,"Left")],h-a*i["".concat(t,"Left")]),x=V(y,i["".concat(t,"Left")]),p=Z(s-i["".concat(t,"Right")],h-a*i["".concat(t,"Right")]),v=V(p,i["".concat(t,"Right")]),d=x.intersection(v);if(d.length>0){var b=d[n>0?1:0];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["".concat(t,"Right")]>i["".concat(t,"Left")]){var g=v.solveY(r)[c?0:1];u={x:r,y:g},l={x:r,y:g},_={x:r,y:g}}else{var m=x.solveY(s)[c?0:1];f={x:s,y:m},_={x:s,y:m},l={x:s,y:m}}}return[u,l,_,f]},a=c("top"),h=c("bottom");return[h[1],h[0]].concat(Q(a),[h[3],h[2]])}(e,o,r);return it(s,r,"0 0 1")}(t,n,i):function(t,n,i){var e=K(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=function(t,n,i){var e=t.x0,o=t.x1,r=t.y0,s=t.y1,c=function(t){var c="Left"===t,a=c?1:-1,h=c?e:o,u={x:h+a*i["bottom".concat(t)],y:r},l={x:h,y:r-n*i["bottom".concat(t)]},_={x:h,y:s+n*i["top".concat(t)]},f={x:h+a*i["top".concat(t)],y:s};if(1===n?r-i["bottom".concat(t)]<s+i["top".concat(t)]:r+i["bottom".concat(t)]>s-i["top".concat(t)]){var y=Z(h+a*i["top".concat(t)],s+n*i["top".concat(t)]),x=V(y,i["top".concat(t)]),p=Z(h+a*i["bottom".concat(t)],r-n*i["bottom".concat(t)]),v=V(p,i["bottom".concat(t)]),d=x.intersection(v);if(d.length>0){var b=d[c?0:1];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["top".concat(t)]>i["bottom".concat(t)]){var g=x.solveX(r)[c?0:1];u={x:g,y:r},l={x:g,y:r},_={x:g,y:r}}else{var m=v.solveX(s)[c?0:1];l={x:m,y:s},_={x:m,y:s},f={x:m,y:s}}}var T=[u,l,_,f];return c?T:T.reverse()};return c("Left").concat(c("Right"))}(e,o,i);return it(s,i,r)}(t,n,i)},ot=s().createContext(void 0),rt=function(){var t=s().useContext(ot);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},st=function(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(n.disableInlineStyles)return{};var e={fill:"black",stroke:t.fill||"black"};return p(i()(e,t),n)}(t.style,t),e=function(t,n){var i=n.scale,e=n.data,o=n.style;if(t)return x(t,n);if(o.width)return o.width;var r=i.x.range(),s=Math.abs(r[1]-r[0]),c=e.length+2,a=(n.barRatio||.5)*(e.length<2?8:s/c);return Math.max(1,a)}(t.barWidth,i()({},t,{style:n})),o=function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return a()(t)}(t)?function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=function(e,o){u()(t[e])?u()(t[o])||(i[e]=x(t[o],n)):i[e]=x(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i}(t,n):(i.topLeft=x(t,n),i.topRight=x(t,n),i):i}(t.cornerRadius,i()({},t,{style:n,barWidth:e}));return i()({},t,{style:n,barWidth:e,cornerRadius:o})},ct=function(t){var n,i,e=rt().canvasRef,o=st(t),r=o.polar,c=o.style,a=o.barWidth,h=o.cornerRadius,u=o.origin,l=s().useMemo((function(){var t=r?function(t,n){return function(t,n){var i,e,o=t.datum,r=t.scale,s=t.index,c=t.alignment,a=t.style,h=r.y(o._y0||0),u=r.y(void 0!==o._y1?o._y1:o._y),l=r.x(void 0!==o._x1?o._x1:o._x);if(a.width){var _=function(t,n){var i=t.scale,e=i.y.range(),o=Math.max.apply(Math,Q(e)),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r}(t,a.width),f="middle"===c?_/2:_;i="start"===c?l:l-f,e="end"===c?l:l+f}else i=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=tt(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=0===n?tt(t,i.length-1)-2*Math.PI:tt(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?c:r:(r+c)/2}(t,s),e=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=tt(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=e.x.range()[1]===2*Math.PI?tt(t,0)+2*Math.PI:e.x.range()[1],a=n===i.length-1?tt(t,0)+2*Math.PI:tt(t,n+1);return n===i.length-1&&s<2*Math.PI?c:"start"===o||"end"===o?"start"===o?r:a:(r+a)/2}(t,s);var y=function(t){return F().innerRadius(h).outerRadius(u).startAngle(nt(i)).endAngle(nt(e)).cornerRadius(n[t])()},x=function(t){var n=y("".concat(t,"Right")),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=y("".concat(t,"Left")),s=r.match(/[A-Z]/g)||[],c=r.split(/[A-Z]/).slice(1),a=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:c,leftMiddle:a}},p=function(){var t,o,r=n.topRight,s=n.topLeft,c=u*Math.abs(e-i),a=x("top"),h=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?h:f,o=r>s?l:y;else{var v,d=function(t){return t<3},b=s>r&&d(_)?1:2;if(r>s){var g=d(_)?p:p-2;v=d(p)?p-1:g}else{var m=d(p)?1:2;v=d(_)?m:p-2}t=[].concat(Q(h.slice(0,b)),Q(f.slice(v))),o=[].concat(Q(l.slice(0,b)),Q(y.slice(v)))}var T=t.indexOf("L"),w=t.slice(0,T),M=o.slice(0,T);return w.map((function(t,n){return{command:t,coords:M[n].split(",")}}))}(),v=function(){var t,o,r=n.bottomRight,s=n.bottomLeft,c=h*Math.abs(e-i),a=x("bottom"),u=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,p=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?u:f,o=r>s?l:y;else{var v=function(t,n){return t.length-n<4},d=(r>s?v(u,_):v(f,p))?-1:-3;t=[].concat(Q(f.slice(0,p+2)),Q(u.slice(d))),o=[].concat(Q(y.slice(0,p+2)),Q(l.slice(d)))}var b=t.indexOf("L"),g=t.slice(b,-1),m=o.slice(b,-1);return g.map((function(t,n){return{command:t,coords:m[n].split(",")}}))}(),d=[].concat(Q(p),Q(v)).reduce((function(t,n){return t+"".concat(n.command," ").concat(n.coords.join())}),"");return"".concat(d," z")}(t,n)}(o,h):et(o,a,h);return new Path2D(t)}),[r,a,h,o]),_=(n=l,i=s().useRef(),s().useEffect((function(){i.current=n})),i.current),f=s().useCallback((function(t,n){t.fillStyle=c.fill,t.strokeStyle=c.stroke,t.globalAlpha=c.fillOpacity,t.lineWidth=c.strokeWidth,r&&t.translate((null==u?void 0:u.x)||0,(null==u?void 0:u.y)||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[c,u,r]),y=s().useCallback((function(t){if(_){t.save();var n=c.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",f(t,_),t.stroke(_),t.restore()}}),[f,_,c]);return s().useEffect((function(){var t,n=null===(t=e.current)||void 0===t?void 0:t.getContext("2d");n&&(y(n),f(n,l))}),[e,f,r,a,h,o,l,y]),null},at=function(t){var n=s().useRef(null),i=t.children,e=t.width,o=void 0===e?0:e,r=t.height,c=void 0===r?0:r,a=t.clipWidth,h=t.padding,u=s().useCallback((function(t){return t.clearRect(0,0,o,c)}),[o,c]),l=s().useCallback((function(t){var n="number"==typeof h?h:(null==h?void 0:h.right)||0,i="number"==typeof h?h:(null==h?void 0:h.left)||0,e=o-n-i;t.clearRect(o-n,0,a?-1*(e-a):0,c)}),[o,c,h,a]);return s().createElement(ot.Provider,{value:{canvasRef:n,clear:u,clip:l}},s().createElement("foreignObject",{width:o,height:c,x:0,y:0},s().createElement("canvas",{width:o,height:c,ref:n})),i)};at.role="container";var ht=Array.prototype.slice;function ut(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lt(t){this._context=t}function _t(t){return new lt(t)}function ft(t){return t[0]}function yt(t){return t[1]}function xt(t,n){var i=M(!0),e=null,o=_t,r=null;function s(s){var c,a,h,u=(s=ut(s)).length,l=!1;for(null==e&&(r=o(h=w())),c=0;c<=u;++c)!(c<u&&i(a=s[c],c,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(a,c,s),+n(a,c,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?ft:M(t),n="function"==typeof n?n:void 0===n?yt:M(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:M(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function pt(t,n,i){var e=null,o=M(!0),r=null,s=_t,c=null;function a(a){var h,u,l,_,f,y=(a=ut(a)).length,x=!1,p=new Array(y),v=new Array(y);for(null==r&&(c=s(f=w())),h=0;h<=y;++h){if(!(h<y&&o(_=a[h],h,a))===x)if(x=!x)u=h,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),l=h-1;l>=u;--l)c.point(p[l],v[l]);c.lineEnd(),c.areaEnd()}x&&(p[h]=+t(_,h,a),v[h]=+n(_,h,a),c.point(e?+e(_,h,a):p[h],i?+i(_,h,a):v[h]))}if(f)return c=null,f+""||null}function h(){return xt().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?ft:M(+t),n="function"==typeof n?n:M(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?yt:M(+i),a.x=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),e=null,a):t},a.x0=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),a):t},a.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:M(+t),a):e},a.y=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),i=null,a):n},a.y0=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:M(+t),a):i},a.lineX0=a.lineY0=function(){return h().x(t).y(n)},a.lineY1=function(){return h().x(t).y(i)},a.lineX1=function(){return h().x(e).y(n)},a.defined=function(t){return arguments.length?(o="function"==typeof t?t:M(!!t),a):o},a.curve=function(t){return arguments.length?(s=t,null!=r&&(c=s(r)),a):s},a.context=function(t){return arguments.length?(null==t?r=c=null:c=s(r=t),a):r},a}function vt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function dt(t){return t}function bt(){var t=dt,n=vt,i=null,e=M(0),o=M(L),r=M(0);function s(s){var c,a,h,u,l,_=(s=ut(s)).length,f=0,y=new Array(_),x=new Array(_),p=+e.apply(this,arguments),v=Math.min(L,Math.max(-L,o.apply(this,arguments)-p)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),b=d*(v<0?-1:1);for(c=0;c<_;++c)(l=x[y[c]=c]=+t(s[c],c,s))>0&&(f+=l);for(null!=n?y.sort((function(t,i){return n(x[t],x[i])})):null!=i&&y.sort((function(t,n){return i(s[t],s[n])})),c=0,h=f?(v-_*b)/f:0;c<_;++c,p=u)a=y[c],u=p+((l=x[a])>0?l*h:0)+b,x[a]={data:s[a],index:c,value:l,startAngle:p,endAngle:u,padAngle:d};return x}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:M(+t),s):r},s}lt.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var gt=Tt(_t);function mt(t){this._curve=t}function Tt(t){function n(n){return new mt(t(n))}return n._curve=t,n}function wt(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Tt(t)):n()._curve},t}function Mt(){return wt(xt().curve(gt))}function kt(){var t=pt().curve(gt),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return wt(i())},delete t.lineX0,t.lineEndAngle=function(){return wt(e())},delete t.lineX1,t.lineInnerRadius=function(){return wt(o())},delete t.lineY0,t.lineOuterRadius=function(){return wt(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Tt(t)):n()._curve},t}function Ot(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}mt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class St{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class Pt{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=Ot(this._x0,this._y0),e=Ot(this._x0,this._y0=(this._y0+n)/2),o=Ot(t,this._y0),r=Ot(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function At(t){return new St(t,!0)}function Ct(t){return new St(t,!1)}function Rt(t){return new Pt(t)}function jt(t){return t.source}function Et(t){return t.target}function Nt(t){let n=jt,i=Et,e=ft,o=yt,r=null,s=null;function c(){let c;const a=ht.call(arguments),h=n.apply(this,a),u=i.apply(this,a);if(null==r&&(s=t(c=w())),s.lineStart(),a[0]=h,s.point(+e.apply(this,a),+o.apply(this,a)),a[0]=u,s.point(+e.apply(this,a),+o.apply(this,a)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(i=t,c):i},c.x=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),c):e},c.y=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),c):o},c.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),c):r},c}function Lt(){return Nt(At)}function zt(){return Nt(Ct)}function It(){const t=Nt(Rt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const qt=R(3),Dt={draw(t,n){const i=.59436*R(n+A(n/28,.75)),e=i/2,o=e*qt;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},Wt={draw(t,n){const i=R(n/E);t.moveTo(i,0),t.arc(0,0,i,0,L)}},Xt={draw(t,n){const i=R(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}},Yt=R(1/3),Bt=2*Yt,$t={draw(t,n){const i=R(n/Bt),e=i*Yt;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Ft={draw(t,n){const i=.62625*R(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Zt={draw(t,n){const i=.87559*R(n-A(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},Vt={draw(t,n){const i=R(n),e=-i/2;t.rect(e,e,i,i)}},Gt={draw(t,n){const i=.4431*R(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}},Ut=C(E/10)/C(7*E/10),Ht=C(L/10)*Ut,Qt=-S(L/10)*Ut,Jt={draw(t,n){const i=R(.8908130915292852*n),e=Ht*i,o=Qt*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=L*n/5,s=S(r),c=C(r);t.lineTo(c*i,-s*i),t.lineTo(s*e-c*o,c*e+s*o)}t.closePath()}},Kt=R(3),tn={draw(t,n){const i=-R(n/(3*Kt));t.moveTo(0,2*i),t.lineTo(-Kt*i,-i),t.lineTo(Kt*i,-i),t.closePath()}},nn=R(3),en={draw(t,n){const i=.6824*R(n),e=i/2,o=i*nn/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}},on=-.5,rn=R(3)/2,sn=1/R(12),cn=3*(sn/2+1),an={draw(t,n){const i=R(n/cn),e=i/2,o=i*sn,r=e,s=i*sn+i,c=-r,a=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(c,a),t.lineTo(on*e-rn*o,rn*e+on*o),t.lineTo(on*r-rn*s,rn*r+on*s),t.lineTo(on*c-rn*a,rn*c+on*a),t.lineTo(on*e+rn*o,on*o-rn*e),t.lineTo(on*r+rn*s,on*s-rn*r),t.lineTo(on*c+rn*a,on*a-rn*c),t.closePath()}},hn={draw(t,n){const i=.6189*R(n-A(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}},un=[Wt,Xt,$t,Vt,Jt,tn,an],ln=[Wt,Zt,hn,en,Dt,Gt,Ft];function _n(t,n){let i=null;function e(){let e;if(i||(i=e=w()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:M(t||Wt),n="function"==typeof n?n:M(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:M(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function fn(){}function yn(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function xn(t){this._context=t}function pn(t){return new xn(t)}function vn(t){this._context=t}function dn(t){return new vn(t)}function bn(t){this._context=t}function gn(t){return new bn(t)}function mn(t,n){this._basis=new xn(t),this._beta=n}xn.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:yn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},vn.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},bn.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},mn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,c=n[i]-r,a=-1;++a<=i;)e=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(o+e*s),this._beta*n[a]+(1-this._beta)*(r+e*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const Tn=function t(n){function i(t){return 1===n?new xn(t):new mn(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function wn(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Mn(t,n){this._context=t,this._k=(1-n)/6}Mn.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:wn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const kn=function t(n){function i(t){return new Mn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function On(t,n){this._context=t,this._k=(1-n)/6}On.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Sn=function t(n){function i(t){return new On(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Pn(t,n){this._context=t,this._k=(1-n)/6}Pn.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,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:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const An=function t(n){function i(t){return new Pn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Cn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>j){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,o=(o*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>j){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function Rn(t,n){this._context=t,this._alpha=n}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const jn=function t(n){function i(t){return n?new Rn(t,n):new Mn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function En(t,n){this._context=t,this._alpha=n}En.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Nn=function t(n){function i(t){return n?new En(t,n):new On(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Ln(t,n){this._context=t,this._alpha=n}Ln.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,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:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const zn=function t(n){function i(t){return n?new Ln(t,n):new Pn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function In(t){this._context=t}function qn(t){return new In(t)}function Dn(t){return t<0?-1:1}function Wn(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),c=(r*o+s*e)/(e+o);return(Dn(r)+Dn(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(c))||0}function Xn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Yn(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,c=(r-e)/3;t._context.bezierCurveTo(e+c,o+c*n,r-c,s-c*i,r,s)}function Bn(t){this._context=t}function $n(t){this._context=new Fn(t)}function Fn(t){this._context=t}function Zn(t){return new Bn(t)}function Vn(t){return new $n(t)}function Gn(t){this._context=t}function Un(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function Hn(t){return new Gn(t)}function Qn(t,n){this._context=t,this._t=n}function Jn(t){return new Qn(t,.5)}function Kn(t){return new Qn(t,0)}function ti(t){return new Qn(t,1)}function ni(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],c=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<c;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ii(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function ei(t,n){return t[n]}function oi(t){const n=[];return n.key=t,n}function ri(){var t=M([]),n=ii,i=ni,e=ei;function o(o){var r,s,c=Array.from(t.apply(this,arguments),oi),a=c.length,h=-1;for(const t of o)for(r=0,++h;r<a;++r)(c[r][h]=[0,+e(t,c[r].key,h,o)]).data=t;for(r=0,s=ut(n(c));r<a;++r)c[s[r]].index=r;return i(c,s),c}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:M(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?ii:"function"==typeof t?t:M(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?ni:t,o):i},o}function si(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}ni(t,n)}}function ci(t,n){if((c=t.length)>0)for(var i,e,o,r,s,c,a=0,h=t[n[0]].length;a<h;++a)for(r=s=0,i=0;i<c;++i)(o=(e=t[n[i]][a])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function ai(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,c=0;s<i;++s)c+=t[s][e][1]||0;o[e][1]+=o[e][0]=-c/2}ni(t,n)}}function hi(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var c=0,a=0,h=0;c<o;++c){for(var u=t[n[c]],l=u[s][1]||0,_=(l-(u[s-1][1]||0))/2,f=0;f<c;++f){var y=t[n[f]];_+=(y[s][1]||0)-(y[s-1][1]||0)}a+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,a&&(r-=h/a)}i[s-1][1]+=i[s-1][0]=r,ni(t,n)}}function ui(t){var n=t.map(li);return ii(t).sort((function(t,i){return n[t]-n[i]}))}function li(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function _i(t){var n=t.map(fi);return ii(t).sort((function(t,i){return n[t]-n[i]}))}function fi(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function yi(t){return _i(t).reverse()}function xi(t){var n,i,e=t.length,o=t.map(fi),r=ui(t),s=0,c=0,a=[],h=[];for(n=0;n<e;++n)i=r[n],s<c?(s+=o[i],a.push(i)):(c+=o[i],h.push(i));return h.reverse().concat(a)}function pi(t){return ii(t).reverse()}In.prototype={areaStart:fn,areaEnd:fn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Bn.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:Yn(this,this._t0,Xn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Yn(this,Xn(this,i=Wn(this,t,n)),i);break;default:Yn(this,this._t0,i=Wn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},($n.prototype=Object.create(Bn.prototype)).point=function(t,n){Bn.prototype.point.call(this,n,t)},Fn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},Gn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=Un(t),o=Un(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};var vi=function(t){return null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0},di=function(t){return function(n){return t.x(void 0!==n._x1?n._x1:n._x)}},bi=function(t){return function(n){return t.y(void 0!==n._y1?n._y1:n._y)}},gi=function(t){return"curve".concat(function(t){return t&&t[0].toUpperCase()+t.slice(1)}(t))},mi=function(n){var i=n.interpolation;if("function"==typeof i)return i;if("string"==typeof i){var e=n.polar,o=n.openCurve,r=(void 0===o?!e:o)?gi(i):function(t){return"".concat(gi(t),"Closed")}(i);return t[r]}return _t},Ti=function(t){var n=t.polar,i=t.scale,e=t.horizontal;return n?Mt().defined(vi).curve(mi(t)).angle(function(t){return function(n){return-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2}}(i)).radius(bi(i)):xt().defined(vi).curve(mi(t)).x(e?bi(i):di(i)).y(e?di(i):bi(i))},wi=function(t){var n=rt(),i=n.canvasRef,e=n.clear,o=n.clip,r=t.style,c=t.data,a=r.stroke,h=r.strokeWidth,u=s().useCallback((function(n){var i=Ti(t);n.strokeStyle=a,n.lineWidth=h,i.context(n)(c),n.stroke()}),[c,t,a,h]);return s().useEffect((function(){var t,n=null===(t=i.current)||void 0===t?void 0:t.getContext("2d");n&&(e(n),u(n),o(n))}),[i,u,e,o]),null},Mi=e(8825),ki=e.n(Mi);function Oi(t,n,i){return"M ".concat(t,", ").concat(n,"\n m ").concat(-i,", 0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*i,",0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*-i,",0")}function Si(t,n,i){var e=.87*i,o=t-e,r=n+e,s=t+e-o;return"M ".concat(o,", ").concat(r,"\n h").concat(s,"\n v-").concat(s,"\n h-").concat(s,"\n z")}function Pi(t,n,i){var e=.87*i,o=Math.sqrt(e*e*2);return"M ".concat(t,", ").concat(n+o,"\n l ").concat(o,", -").concat(o,"\n l -").concat(o,", -").concat(o,"\n l -").concat(o,", ").concat(o,"\n l ").concat(o,", ").concat(o,"\n z")}function Ai(t,n,i){var e=t+i,o=n-i,r=n+i/2*Math.sqrt(3);return"M ".concat(t-i,", ").concat(o,"\n L ").concat(e,", ").concat(o,"\n L ").concat(t,", ").concat(r,"\n z")}function Ci(t,n,i){var e=t+i,o=n-i/2*Math.sqrt(3),r=n+i;return"M ".concat(t-i,", ").concat(r,"\n L ").concat(e,", ").concat(r,"\n L ").concat(t,", ").concat(o,"\n z")}function Ri(t,n,i){var e=1.1*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e,"\n v-").concat(o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(o,"\n z")}function ji(t,n,i){var e=.8*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e+o,"\n v-").concat(2*o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(2*o,"\n z")}function Ei(t,n,i){var e=1.1*i,o=e-.3*e,r=t-e,s=n+o/2,c=t+e-r;return"M ".concat(r,", ").concat(s,"\n h").concat(c,"\n v-").concat(o,"\n h-").concat(c,"\n z")}function Ni(t,n,i){var e=1.35*i,o=Math.PI/5,r=ki()(10).map((function(i){var r=i%2==0?e:e/2;return"".concat(r*Math.sin(o*(i+1))+t,",\n ").concat(r*Math.cos(o*(i+1))+n)}));return"M ".concat(r.join("L")," z")}var Li=function(t){var n=rt().canvasRef,e=function(t){var n=x(t.size,t),e=p(t.style,t),o=x(t.symbol,t);return i()({},t,{size:n,style:e,symbol:o})}(t),o=s().useCallback((function(t){var n=e.style,i=function(t){var n=t.x,i=t.y,e=t.size,o=t.symbol;if(t.getPath)return t.getPath(n,i,e);var r={circle:Oi,square:Si,diamond:Pi,triangleDown:Ai,triangleUp:Ci,plus:Ri,minus:Ei,star:Ni,cross:ji};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)}(e);t.fillStyle=n.fill;var o=new Path2D(i);t.fill(o)}),[e]);return s().useEffect((function(){var t,i=null===(t=n.current)||void 0===t?void 0:t.getContext("2d");i&&o(i)}),[]),null}})(),o})()));
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react")):"function"==typeof define&&define.amd?define(["react"],n):"object"==typeof exports?exports.VictoryCanvas=n(require("react")):t.VictoryCanvas=n(t.React)}(self,(t=>(()=>{var n={2596:(t,n,i)=>{var e=i(2373).Symbol;t.exports=e},6082:t=>{t.exports=function(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}},8644:t=>{t.exports=function(t,n){for(var i=-1,e=null==t?0:t.length,o=Array(e);++i<e;)o[i]=n(t[i],i,t);return o}},9559:t=>{t.exports=function(t,n){for(var i=-1,e=n.length,o=t.length;++i<e;)t[o+i]=n[i];return t}},4132:(t,n,i)=>{var e=i(8347),o=i(788),r=Object.prototype.hasOwnProperty;t.exports=function(t,n,i){var s=t[n];r.call(t,n)&&o(s,i)&&(void 0!==i||n in t)||e(t,n,i)}},8347:(t,n,i)=>{var e=i(5525);t.exports=function(t,n,i){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[n]=i}},6457:(t,n,i)=>{var e=i(9559),o=i(3608);t.exports=function t(n,i,r,s,c){var a=-1,h=n.length;for(r||(r=o),c||(c=[]);++a<h;){var u=n[a];i>0&&r(u)?i>1?t(u,i-1,r,s,c):e(c,u):s||(c[c.length]=u)}return c}},4432:(t,n,i)=>{var e=i(9026),o=i(3110);t.exports=function(t,n){for(var i=0,r=(n=e(n,t)).length;null!=t&&i<r;)t=t[o(n[i++])];return i&&i==r?t:void 0}},563:t=>{var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},6776:t=>{t.exports=function(t,n){return null!=t&&n in Object(t)}},5436:(t,n,i)=>{var e=i(6371),o=i(5066);t.exports=function(t,n){return e(t,n,(function(n,i){return o(t,i)}))}},6371:(t,n,i)=>{var e=i(4432),o=i(6539),r=i(9026);t.exports=function(t,n,i){for(var s=-1,c=n.length,a={};++s<c;){var h=n[s],u=e(t,h);i(u,h)&&o(a,r(h,t),u)}return a}},1600:t=>{t.exports=function(t){return function(n){return null==n?void 0:n[t]}}},3301:(t,n,i)=>{var e=i(4432);t.exports=function(t){return function(n){return e(n,t)}}},7805:t=>{var n=Math.ceil,i=Math.max;t.exports=function(t,e,o,r){for(var s=-1,c=i(n((e-t)/(o||1)),0),a=Array(c);c--;)a[r?c:++s]=t,t+=o;return a}},6317:(t,n,i)=>{var e=i(5346),o=i(4280),r=i(201);t.exports=function(t,n){return r(o(t,n,e),t+"")}},6539:(t,n,i)=>{var e=i(4132),o=i(9026),r=i(9099),s=i(7709),c=i(3110);t.exports=function(t,n,i,a){if(!s(t))return t;for(var h=-1,u=(n=o(n,t)).length,l=u-1,_=t;null!=_&&++h<u;){var f=c(n[h]),y=i;if("__proto__"===f||"constructor"===f||"prototype"===f)return t;if(h!=l){var p=_[f];void 0===(y=a?a(p,f,_):void 0)&&(y=s(p)?p:r(n[h+1])?[]:{})}e(_,f,y),_=_[f]}return t}},6316:(t,n,i)=>{var e=i(2596),o=i(8644),r=i(163),s=i(1995),c=e?e.prototype:void 0,a=c?c.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(r(n))return o(n,t)+"";if(s(n))return a?a.call(n):"";var i=n+"";return"0"==i&&1/n==-1/0?"-0":i}},1367:(t,n,i)=>{var e=i(4120),o=/^\s+/;t.exports=function(t){return t?t.slice(0,e(t)+1).replace(o,""):t}},9026:(t,n,i)=>{var e=i(163),o=i(726),r=i(7801),s=i(7010);t.exports=function(t,n){return e(t)?t:o(t,n)?[t]:r(s(t))}},9021:(t,n,i)=>{var e=i(4132),o=i(8347);t.exports=function(t,n,i,r){var s=!i;i||(i={});for(var c=-1,a=n.length;++c<a;){var h=n[c],u=r?r(i[h],t[h],h,i,t):void 0;void 0===u&&(u=t[h]),s?o(i,h,u):e(i,h,u)}return i}},6092:(t,n,i)=>{var e=i(6317),o=i(8286);t.exports=function(t){return e((function(n,i){var e=-1,r=i.length,s=r>1?i[r-1]:void 0,c=r>2?i[2]:void 0;for(s=t.length>3&&"function"==typeof s?(r--,s):void 0,c&&o(i[0],i[1],c)&&(s=r<3?void 0:s,r=1),n=Object(n);++e<r;){var a=i[e];a&&t(n,a,e,s)}return n}))}},2507:(t,n,i)=>{var e=i(7805),o=i(8286),r=i(9139);t.exports=function(t){return function(n,i,s){return s&&"number"!=typeof s&&o(n,i,s)&&(i=s=void 0),n=r(n),void 0===i?(i=n,n=0):i=r(i),s=void 0===s?n<i?1:-1:r(s),e(n,i,s,t)}}},5525:(t,n,i)=>{var e=i(3743),o=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},5557:(t,n,i)=>{var e=i(2645),o=i(4280),r=i(201);t.exports=function(t){return r(o(t,void 0,e),t+"")}},2117:(t,n,i)=>{var e="object"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;t.exports=e},3743:t=>{t.exports=function(t,n){return null==t?void 0:t[n]}},9817:(t,n,i)=>{var e=i(5125)(Object.getPrototypeOf,Object);t.exports=e},3096:(t,n,i)=>{var e=i(9026),o=i(5075),r=i(163),s=i(9099),c=i(8454),a=i(3110);t.exports=function(t,n,i){for(var h=-1,u=(n=e(n,t)).length,l=!1;++h<u;){var _=a(n[h]);if(!(l=null!=t&&i(t,_)))break;t=t[_]}return l||++h!=u?l:!!(u=null==t?0:t.length)&&c(u)&&s(_,u)&&(r(t)||o(t))}},3608:(t,n,i)=>{var e=i(2596),o=i(5075),r=i(163),s=e?e.isConcatSpreadable:void 0;t.exports=function(t){return r(t)||o(t)||!!(s&&t&&t[s])}},9099:t=>{var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,i){var e=typeof t;return!!(i=null==i?9007199254740991:i)&&("number"==e||"symbol"!=e&&n.test(t))&&t>-1&&t%1==0&&t<i}},8286:t=>{t.exports=function(){return!1}},726:(t,n,i)=>{var e=i(163),o=i(1995),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,n){if(e(t))return!1;var i=typeof t;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=t&&!o(t))||s.test(t)||!r.test(t)||null!=n&&t in Object(n)}},5782:t=>{t.exports=function(){return!1}},2453:t=>{t.exports=function(t){return t}},5125:t=>{t.exports=function(t,n){return function(i){return t(n(i))}}},4280:(t,n,i)=>{var e=i(6082),o=Math.max;t.exports=function(t,n,i){return n=o(void 0===n?t.length-1:n,0),function(){for(var r=arguments,s=-1,c=o(r.length-n,0),a=Array(c);++s<c;)a[s]=r[n+s];s=-1;for(var h=Array(n+1);++s<n;)h[s]=r[s];return h[n]=i(a),e(t,this,h)}}},2373:(t,n,i)=>{var e=i(2117),o="object"==typeof self&&self&&self.Object===Object&&self,r=e||o||Function("return this")();t.exports=r},201:t=>{t.exports=function(t){return t}},7801:(t,n,i)=>{var e=i(2453),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(o,(function(t,i,e,o){n.push(e?o.replace(r,"$1"):i||t)})),n}));t.exports=s},3110:(t,n,i)=>{var e=i(1995);t.exports=function(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4120:t=>{var n=/\s/;t.exports=function(t){for(var i=t.length;i--&&n.test(t.charAt(i)););return i}},156:(t,n,i)=>{var e=i(4132),o=i(9021),r=i(6092),s=i(981),c=i(5782),a=i(7747),h=Object.prototype.hasOwnProperty,u=r((function(t,n){if(c(n)||s(n))o(n,a(n),t);else for(var i in n)h.call(n,i)&&e(t,i,n[i])}));t.exports=u},1893:(t,n,i)=>{var e=i(6317),o=i(788),r=i(8286),s=i(8855),c=Object.prototype,a=c.hasOwnProperty,h=e((function(t,n){t=Object(t);var i=-1,e=n.length,h=e>2?n[2]:void 0;for(h&&r(n[0],n[1],h)&&(e=1);++i<e;)for(var u=n[i],l=s(u),_=-1,f=l.length;++_<f;){var y=l[_],p=t[y];(void 0===p||o(p,c[y])&&!a.call(t,y))&&(t[y]=u[y])}return t}));t.exports=h},788:t=>{t.exports=function(t,n){return t===n||t!=t&&n!=n}},2645:(t,n,i)=>{var e=i(6457);t.exports=function(t){return null!=t&&t.length?e(t,1):[]}},5066:(t,n,i)=>{var e=i(6776),o=i(3096);t.exports=function(t,n){return null!=t&&o(t,n,e)}},5346:t=>{t.exports=function(t){return t}},5075:t=>{t.exports=function(){return!1}},163:t=>{var n=Array.isArray;t.exports=n},981:(t,n,i)=>{var e=i(9642),o=i(8454);t.exports=function(t){return null!=t&&o(t.length)&&!e(t)}},9642:(t,n,i)=>{var e=i(563),o=i(7709);t.exports=function(t){if(!o(t))return!1;var n=e(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},8454:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},9555:t=>{t.exports=function(t){return null==t}},7709:t=>{t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},3474:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},3849:(t,n,i)=>{var e=i(563),o=i(9817),r=i(3474),s=Function.prototype,c=Object.prototype,a=s.toString,h=c.hasOwnProperty,u=a.call(Object);t.exports=function(t){if(!r(t)||"[object Object]"!=e(t))return!1;var n=o(t);if(null===n)return!0;var i=h.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i instanceof i&&a.call(i)==u}},1995:t=>{t.exports=function(){return!1}},7747:(t,n,i)=>{var e=i(5125)(Object.keys,Object);t.exports=e},8855:t=>{t.exports=function(t){var n=[];if(null!=t)for(var i in Object(t))n.push(i);return n}},9082:(t,n,i)=>{var e=i(5436),o=i(5557)((function(t,n){return null==t?{}:e(t,n)}));t.exports=o},8532:(t,n,i)=>{var e=i(1600),o=i(3301),r=i(726),s=i(3110);t.exports=function(t){return r(t)?e(s(t)):o(t)}},8825:(t,n,i)=>{var e=i(2507)();t.exports=e},9139:(t,n,i)=>{var e=i(5812);t.exports=function(t){return t?Infinity===(t=e(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},5812:(t,n,i)=>{var e=i(1367),o=i(7709),r=i(1995),s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,a=/^0o[0-7]+$/i,h=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(r(t))return NaN;if(o(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=o(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=e(t);var i=c.test(t);return i||a.test(t)?h(t.slice(2),i?2:8):s.test(t)?NaN:+t}},7010:(t,n,i)=>{var e=i(6316);t.exports=function(t){return null==t?"":e(t)}},9787:n=>{"use strict";n.exports=t}},i={};function e(t){var o=i[t];if(void 0!==o)return o.exports;var r=i[t]={exports:{}};return n[t](r,r.exports,e),r.exports}e.n=t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},e.d=(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),e.o=(t,n)=>Object.prototype.hasOwnProperty.call(t,n),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{"use strict";e.r(o),e.d(o,{CanvasBar:()=>ct,CanvasCurve:()=>wi,CanvasGroup:()=>at,CanvasPoint:()=>Li,useCanvasContext:()=>rt});var t={};e.r(t),e.d(t,{arc:()=>F,area:()=>xt,areaRadial:()=>kt,curveBasis:()=>xn,curveBasisClosed:()=>dn,curveBasisOpen:()=>gn,curveBumpX:()=>At,curveBumpY:()=>Ct,curveBundle:()=>Tn,curveCardinal:()=>kn,curveCardinalClosed:()=>Sn,curveCardinalOpen:()=>An,curveCatmullRom:()=>jn,curveCatmullRomClosed:()=>En,curveCatmullRomOpen:()=>zn,curveLinear:()=>_t,curveLinearClosed:()=>qn,curveMonotoneX:()=>Zn,curveMonotoneY:()=>Vn,curveNatural:()=>Hn,curveStep:()=>Jn,curveStepAfter:()=>ti,curveStepBefore:()=>Kn,line:()=>pt,lineRadial:()=>Mt,link:()=>Et,linkHorizontal:()=>Lt,linkRadial:()=>It,linkVertical:()=>zt,pie:()=>bt,pointRadial:()=>Ot,radialArea:()=>kt,radialLine:()=>Mt,stack:()=>ri,stackOffsetDiverging:()=>ci,stackOffsetExpand:()=>si,stackOffsetNone:()=>ni,stackOffsetSilhouette:()=>ai,stackOffsetWiggle:()=>hi,stackOrderAppearance:()=>ui,stackOrderAscending:()=>_i,stackOrderDescending:()=>yi,stackOrderInsideOut:()=>pi,stackOrderNone:()=>ii,stackOrderReverse:()=>xi,symbol:()=>_n,symbolAsterisk:()=>Dt,symbolCircle:()=>Wt,symbolCross:()=>Xt,symbolDiamond:()=>$t,symbolDiamond2:()=>Ft,symbolPlus:()=>Zt,symbolSquare:()=>Vt,symbolSquare2:()=>Gt,symbolStar:()=>Jt,symbolTriangle:()=>tn,symbolTriangle2:()=>en,symbolWye:()=>an,symbolX:()=>hn,symbols:()=>un,symbolsFill:()=>un,symbolsStroke:()=>ln});var n=e(156),i=e.n(n),r=e(9787),s=e.n(r),c=e(3849),a=e.n(c),h=e(9555),u=e.n(h),l=e(7747),_=e.n(l),f=(e(9082),e(8532),e(9642)),y=e.n(f);function p(t,n){return y()(t)?t(n):t}function x(t,n){return n.disableInlineStyles?{}:t&&_()(t).some((function(n){return y()(t[n])}))?_()(t).reduce((function(i,e){return i[e]=p(t[e],n),i}),{}):t}e(1893);const v=Math.PI,d=2*v,b=1e-6,g=d-b;function m(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function T(){return new m}m.prototype=T.prototype={constructor:m,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,e){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+e)},bezierCurveTo:function(t,n,i,e,o,r){this._+="C"+ +t+","+ +n+","+ +i+","+ +e+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,n,i,e,o){t=+t,n=+n,i=+i,e=+e,o=+o;var r=this._x1,s=this._y1,c=i-t,a=e-n,h=r-t,u=s-n,l=h*h+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>b)if(Math.abs(u*c-a*h)>b&&o){var _=i-r,f=e-s,y=c*c+a*a,p=_*_+f*f,x=Math.sqrt(y),d=Math.sqrt(l),g=o*Math.tan((v-Math.acos((y+l-p)/(2*x*d)))/2),m=g/d,T=g/x;Math.abs(m-1)>b&&(this._+="L"+(t+m*h)+","+(n+m*u)),this._+="A"+o+","+o+",0,0,"+ +(u*_>h*f)+","+(this._x1=t+T*c)+","+(this._y1=n+T*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,i,e,o,r){t=+t,n=+n,r=!!r;var s=(i=+i)*Math.cos(e),c=i*Math.sin(e),a=t+s,h=n+c,u=1^r,l=r?e-o:o-e;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+a+","+h:(Math.abs(this._x1-a)>b||Math.abs(this._y1-h)>b)&&(this._+="L"+a+","+h),i&&(l<0&&(l=l%d+d),l>g?this._+="A"+i+","+i+",0,1,"+u+","+(t-s)+","+(n-c)+"A"+i+","+i+",0,1,"+u+","+(this._x1=a)+","+(this._y1=h):l>b&&(this._+="A"+i+","+i+",0,"+ +(l>=v)+","+u+","+(this._x1=t+i*Math.cos(o))+","+(this._y1=n+i*Math.sin(o))))},rect:function(t,n,i,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +e+"h"+-i+"Z"},toString:function(){return this._}};const w=T;function M(t){return function(){return t}}const k=Math.abs,O=Math.atan2,S=Math.cos,P=Math.max,A=Math.min,C=Math.sin,R=Math.sqrt,j=1e-12,N=Math.PI,E=N/2,L=2*N;function z(t){return t>1?0:t<-1?N:Math.acos(t)}function I(t){return t>=1?E:t<=-1?-E:Math.asin(t)}function q(t){return t.innerRadius}function D(t){return t.outerRadius}function W(t){return t.startAngle}function X(t){return t.endAngle}function Y(t){return t&&t.padAngle}function B(t,n,i,e,o,r,s,c){var a=i-t,h=e-n,u=s-o,l=c-r,_=l*a-u*h;if(!(_*_<j))return[t+(_=(u*(n-r)-l*(t-o))/_)*a,n+_*h]}function $(t,n,i,e,o,r,s){var c=t-i,a=n-e,h=(s?r:-r)/R(c*c+a*a),u=h*a,l=-h*c,_=t+u,f=n+l,y=i+u,p=e+l,x=(_+y)/2,v=(f+p)/2,d=y-_,b=p-f,g=d*d+b*b,m=o-r,T=_*p-y*f,w=(b<0?-1:1)*R(P(0,m*m*g-T*T)),M=(T*b-d*w)/g,k=(-T*d-b*w)/g,O=(T*b+d*w)/g,S=(-T*d+b*w)/g,A=M-x,C=k-v,j=O-x,N=S-v;return A*A+C*C>j*j+N*N&&(M=O,k=S),{cx:M,cy:k,x01:-u,y01:-l,x11:M*(o/m-1),y11:k*(o/m-1)}}function F(){var t=q,n=D,i=M(0),e=null,o=W,r=X,s=Y,c=null;function a(){var a,h,u=+t.apply(this,arguments),l=+n.apply(this,arguments),_=o.apply(this,arguments)-E,f=r.apply(this,arguments)-E,y=k(f-_),p=f>_;if(c||(c=a=w()),l<u&&(h=l,l=u,u=h),l>j)if(y>L-j)c.moveTo(l*S(_),l*C(_)),c.arc(0,0,l,_,f,!p),u>j&&(c.moveTo(u*S(f),u*C(f)),c.arc(0,0,u,f,_,p));else{var x,v,d=_,b=f,g=_,m=f,T=y,M=y,P=s.apply(this,arguments)/2,q=P>j&&(e?+e.apply(this,arguments):R(u*u+l*l)),D=A(k(l-u)/2,+i.apply(this,arguments)),W=D,X=D;if(q>j){var Y=I(q/u*C(P)),F=I(q/l*C(P));(T-=2*Y)>j?(g+=Y*=p?1:-1,m-=Y):(T=0,g=m=(_+f)/2),(M-=2*F)>j?(d+=F*=p?1:-1,b-=F):(M=0,d=b=(_+f)/2)}var Z=l*S(d),V=l*C(d),G=u*S(m),U=u*C(m);if(D>j){var H,Q=l*S(b),J=l*C(b),K=u*S(g),tt=u*C(g);if(y<N&&(H=B(Z,V,K,tt,Q,J,G,U))){var nt=Z-H[0],it=V-H[1],et=Q-H[0],ot=J-H[1],rt=1/C(z((nt*et+it*ot)/(R(nt*nt+it*it)*R(et*et+ot*ot)))/2),st=R(H[0]*H[0]+H[1]*H[1]);W=A(D,(u-st)/(rt-1)),X=A(D,(l-st)/(rt+1))}}M>j?X>j?(x=$(K,tt,Z,V,l,X,p),v=$(Q,J,G,U,l,X,p),c.moveTo(x.cx+x.x01,x.cy+x.y01),X<D?c.arc(x.cx,x.cy,X,O(x.y01,x.x01),O(v.y01,v.x01),!p):(c.arc(x.cx,x.cy,X,O(x.y01,x.x01),O(x.y11,x.x11),!p),c.arc(0,0,l,O(x.cy+x.y11,x.cx+x.x11),O(v.cy+v.y11,v.cx+v.x11),!p),c.arc(v.cx,v.cy,X,O(v.y11,v.x11),O(v.y01,v.x01),!p))):(c.moveTo(Z,V),c.arc(0,0,l,d,b,!p)):c.moveTo(Z,V),u>j&&T>j?W>j?(x=$(G,U,Q,J,u,-W,p),v=$(Z,V,K,tt,u,-W,p),c.lineTo(x.cx+x.x01,x.cy+x.y01),W<D?c.arc(x.cx,x.cy,W,O(x.y01,x.x01),O(v.y01,v.x01),!p):(c.arc(x.cx,x.cy,W,O(x.y01,x.x01),O(x.y11,x.x11),!p),c.arc(0,0,u,O(x.cy+x.y11,x.cx+x.x11),O(v.cy+v.y11,v.cx+v.x11),p),c.arc(v.cx,v.cy,W,O(v.y11,v.x11),O(v.y01,v.x01),!p))):c.arc(0,0,u,m,g,p):c.lineTo(G,U)}else c.moveTo(0,0);if(c.closePath(),a)return c=null,a+""||null}return a.centroid=function(){var i=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,e=(+o.apply(this,arguments)+ +r.apply(this,arguments))/2-N/2;return[S(e)*i,C(e)*i]},a.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),a):t},a.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a.cornerRadius=function(t){return arguments.length?(i="function"==typeof t?t:M(+t),a):i},a.padRadius=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:M(+t),a):e},a.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),a):o},a.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:M(+t),a):r},a.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:M(+t),a):s},a.context=function(t){return arguments.length?(c=null==t?null:t,a):c},a}var Z=function(t,n){return{x:t,y:n,distance:function(t){return Math.sqrt(Math.pow(this.x-t.x,2)+Math.pow(this.y-t.y,2))},add:function(t){return Z(this.x+t.x,this.y+t.y)},subtract:function(t){return Z(this.x-t.x,this.y-t.y)},scalarMult:function(t){return Z(this.x*t,this.y*t)},scalarDivide:function(t){if(0===t)throw new Error("Division by 0 error");return Z(this.x/t,this.y/t)},equals:function(t){return this.x===t.x&&this.y===t.y}}},V=function(t,n){return{center:t,radius:n,hasIntersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);return!(r>e+o||r<Math.abs(e-o))},equals:function(t){var n=this.center,i=t.center;return this.radius===t.radius&&n.equals(i)},intersection:function(t){var n=this.center,i=t.center,e=this.radius,o=t.radius,r=n.distance(i);if(!this.hasIntersection(t)||this.equals(t))return[];var s=(Math.pow(e,2)-Math.pow(o,2)+Math.pow(r,2))/(2*r),c=Math.sqrt(Math.pow(e,2)-Math.pow(s,2)),a=n.add(i.subtract(n).scalarMult(s).scalarDivide(r)),h=n.x,u=n.y,l=i.x,_=i.y,f=a.x,y=a.y,p=[Z(f-c*(_-u)/r,y+c*(l-h)/r),Z(f+c*(_-u)/r,y-c*(l-h)/r)];return p.sort((function(t,n){return t.x-n.x})),p},solveX:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.y,2));return[this.center.x-n,this.center.x+n]},solveY:function(t){var n=Math.sqrt(Math.pow(this.radius,2)-Math.pow(t-this.center.x,2));return[this.center.y-n,this.center.y+n]}}};function G(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}function U(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?G(Object(i),!0).forEach((function(n){H(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):G(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}function H(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Q(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return J(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?J(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,e=new Array(n);i<n;i++)e[i]=t[i];return e}var K=function(t,n){var i=t.x,e=t.x0,o=t.y,r=t.y0,s=t.horizontal,c=t.alignment||"middle",a="middle"===c?n/2:n,h=s?-1:1;return s?{x0:e,x1:i,y0:"start"===c?o:o-h*a,y1:"end"===c?o:o+h*a}:{x0:"start"===c?i:i-h*a,x1:"end"===c?i:i+h*a,y0:r,y1:o}},tt=function(t,n){var i=t.data,e=t.scale,o=void 0===i[n]._x1?"_x":"_x1";return e.x(i[n][o])},nt=function(t){return-1*t+Math.PI/2},it=function(t,n,i){var e="".concat(n.topLeft," ").concat(n.topLeft," ").concat(i),o="".concat(n.topRight," ").concat(n.topRight," ").concat(i),r="".concat(n.bottomLeft," ").concat(n.bottomLeft," ").concat(i),s="".concat(n.bottomRight," ").concat(n.bottomRight," ").concat(i),c=["M","A ".concat(r,","),"L","A ".concat(e,","),"L","A ".concat(o,","),"L","A ".concat(s,",")].reduce((function(n,i,e){return"".concat(n).concat(i," ").concat(t[e].x,", ").concat(t[e].y," \n")}),"");return"".concat(c," z")},et=function(t,n,i){return t.getPath?function(t,n){var i=t.getPath;if("function"==typeof i)return i(U(U({},t),K(t,n)))}(t,n):t.horizontal?function(t,n,i){var e=K(t,n),o=e.x0<e.x1?1:-1,r={topRight:o>0?i.topLeft:i.bottomLeft,bottomRight:o>0?i.topRight:i.bottomRight,bottomLeft:o>0?i.bottomRight:i.topRight,topLeft:o>0?i.bottomLeft:i.topLeft},s=function(t,n,i){var e=t.y0,o=t.y1,r=t.x0<t.x1?t.x0:t.x1,s=t.x0<t.x1?t.x1:t.x0,c=function(t){var c="top"===t,a=c?-1:1,h=c?o:e,u={x:r,y:h-a*i["".concat(t,"Left")]},l={x:r+i["".concat(t,"Left")],y:h},_={x:s-i["".concat(t,"Right")],y:h},f={x:s,y:h-a*i["".concat(t,"Right")]};if(l.x>_.x){var y=Z(r+i["".concat(t,"Left")],h-a*i["".concat(t,"Left")]),p=V(y,i["".concat(t,"Left")]),x=Z(s-i["".concat(t,"Right")],h-a*i["".concat(t,"Right")]),v=V(x,i["".concat(t,"Right")]),d=p.intersection(v);if(d.length>0){var b=d[n>0?1:0];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["".concat(t,"Right")]>i["".concat(t,"Left")]){var g=v.solveY(r)[c?0:1];u={x:r,y:g},l={x:r,y:g},_={x:r,y:g}}else{var m=p.solveY(s)[c?0:1];f={x:s,y:m},_={x:s,y:m},l={x:s,y:m}}}return[u,l,_,f]},a=c("top"),h=c("bottom");return[h[1],h[0]].concat(Q(a),[h[3],h[2]])}(e,o,r);return it(s,r,"0 0 1")}(t,n,i):function(t,n,i){var e=K(t,n),o=e.y0>e.y1?1:-1,r=o>0?"0 0 1":"0 0 0",s=function(t,n,i){var e=t.x0,o=t.x1,r=t.y0,s=t.y1,c=function(t){var c="Left"===t,a=c?1:-1,h=c?e:o,u={x:h+a*i["bottom".concat(t)],y:r},l={x:h,y:r-n*i["bottom".concat(t)]},_={x:h,y:s+n*i["top".concat(t)]},f={x:h+a*i["top".concat(t)],y:s};if(1===n?r-i["bottom".concat(t)]<s+i["top".concat(t)]:r+i["bottom".concat(t)]>s-i["top".concat(t)]){var y=Z(h+a*i["top".concat(t)],s+n*i["top".concat(t)]),p=V(y,i["top".concat(t)]),x=Z(h+a*i["bottom".concat(t)],r-n*i["bottom".concat(t)]),v=V(x,i["bottom".concat(t)]),d=p.intersection(v);if(d.length>0){var b=d[c?0:1];l={x:b.x,y:b.y},_={x:b.x,y:b.y}}else if(i["top".concat(t)]>i["bottom".concat(t)]){var g=p.solveX(r)[c?0:1];u={x:g,y:r},l={x:g,y:r},_={x:g,y:r}}else{var m=v.solveX(s)[c?0:1];l={x:m,y:s},_={x:m,y:s},f={x:m,y:s}}}var T=[u,l,_,f];return c?T:T.reverse()};return c("Left").concat(c("Right"))}(e,o,i);return it(s,i,r)}(t,n,i)},ot=s().createContext(void 0),rt=function(){var t=s().useContext(ot);if(!t)throw new Error("This component must be wrapped in a CanvasContext.Provider component.\n Try setting groupComponent={<CanvasGroup />} in your chart component.");return t},st=function(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(n.disableInlineStyles)return{};var e={fill:"black",stroke:t.fill||"black"};return x(i()(e,t),n)}(t.style,t),e=function(t,n){var i=n.scale,e=n.data,o=n.style;if(t)return p(t,n);if(o.width)return o.width;var r=i.x.range(),s=Math.abs(r[1]-r[0]),c=e.length+2,a=(n.barRatio||.5)*(e.length<2?8:s/c);return Math.max(1,a)}(t.barWidth,i()({},t,{style:n})),o=function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0};return t?function(t){return a()(t)}(t)?function(t,n){var i={topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},e=function(e,o){u()(t[e])?u()(t[o])||(i[e]=p(t[o],n)):i[e]=p(t[e],n)};return e("topLeft","top"),e("topRight","top"),e("bottomLeft","bottom"),e("bottomRight","bottom"),i}(t,n):(i.topLeft=p(t,n),i.topRight=p(t,n),i):i}(t.cornerRadius,i()({},t,{style:n,barWidth:e}));return i()({},t,{style:n,barWidth:e,cornerRadius:o})},ct=function(t){var n,i,e=rt().canvasRef,o=st(t),r=o.polar,c=o.style,a=o.barWidth,h=o.cornerRadius,u=o.origin,l=s().useMemo((function(){var t=r?function(t,n){return function(t,n){var i,e,o=t.datum,r=t.scale,s=t.index,c=t.alignment,a=t.style,h=r.y(o._y0||0),u=r.y(void 0!==o._y1?o._y1:o._y),l=r.x(void 0!==o._x1?o._x1:o._x);if(a.width){var _=function(t,n){var i=t.scale,e=i.y.range(),o=Math.max.apply(Math,Q(e)),r=Math.abs(i.x.range()[1]-i.x.range()[0]);return n/(2*Math.PI*o)*r}(t,a.width),f="middle"===c?_/2:_;i="start"===c?l:l-f,e="end"===c?l:l+f}else i=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=tt(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=0===n?tt(t,i.length-1)-2*Math.PI:tt(t,n-1);return 0===n&&s<2*Math.PI?e.x.range()[0]:"start"===o||"end"===o?"start"===o?c:r:(r+c)/2}(t,Number(s)),e=function(t,n){var i=t.data,e=t.scale,o=t.alignment,r=tt(t,n),s=Math.abs(e.x.range()[1]-e.x.range()[0]),c=e.x.range()[1]===2*Math.PI?tt(t,0)+2*Math.PI:e.x.range()[1],a=n===i.length-1?tt(t,0)+2*Math.PI:tt(t,n+1);return n===i.length-1&&s<2*Math.PI?c:"start"===o||"end"===o?"start"===o?r:a:(r+a)/2}(t,Number(s));var y=function(t){return F().innerRadius(h).outerRadius(u).startAngle(nt(i)).endAngle(nt(e)).cornerRadius(n[t])()},p=function(t){var n=y("".concat(t,"Right")),i=n.match(/[A-Z]/g)||[],e=n.split(/[A-Z]/).slice(1),o=i.indexOf("L"),r=y("".concat(t,"Left")),s=r.match(/[A-Z]/g)||[],c=r.split(/[A-Z]/).slice(1),a=s.indexOf("L");return{rightMoves:i,rightCoords:e,rightMiddle:o,leftMoves:s,leftCoords:c,leftMiddle:a}},x=function(){var t,o,r=n.topRight,s=n.topLeft,c=u*Math.abs(e-i),a=p("top"),h=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,x=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?h:f,o=r>s?l:y;else{var v,d=function(t){return t<3},b=s>r&&d(_)?1:2;if(r>s){var g=d(_)?x:x-2;v=d(x)?x-1:g}else{var m=d(x)?1:2;v=d(_)?m:x-2}t=[].concat(Q(h.slice(0,b)),Q(f.slice(v))),o=[].concat(Q(l.slice(0,b)),Q(y.slice(v)))}var T=t.indexOf("L"),w=t.slice(0,T),M=o.slice(0,T);return w.map((function(t,n){return{command:t,coords:M[n].split(",")}}))}(),v=function(){var t,o,r=n.bottomRight,s=n.bottomLeft,c=h*Math.abs(e-i),a=p("bottom"),u=a.rightMoves,l=a.rightCoords,_=a.rightMiddle,f=a.leftMoves,y=a.leftCoords,x=a.leftMiddle;if(r===s||c<2*r+2*s)t=r>s?u:f,o=r>s?l:y;else{var v=function(t,n){return t.length-n<4},d=(r>s?v(u,_):v(f,x))?-1:-3;t=[].concat(Q(f.slice(0,x+2)),Q(u.slice(d))),o=[].concat(Q(y.slice(0,x+2)),Q(l.slice(d)))}var b=t.indexOf("L"),g=t.slice(b,-1),m=o.slice(b,-1);return g.map((function(t,n){return{command:t,coords:m[n].split(",")}}))}(),d=[].concat(Q(x),Q(v)).reduce((function(t,n){return"".concat(t).concat(n.command," ").concat(n.coords.join())}),"");return"".concat(d," z")}(t,n)}(o,h):et(o,a,h);return new Path2D(t)}),[r,a,h,o]),_=(n=l,i=s().useRef(),s().useEffect((function(){i.current=n})),i.current),f=s().useCallback((function(t,n){t.fillStyle=c.fill,t.strokeStyle=c.stroke,t.globalAlpha=c.fillOpacity,t.lineWidth=c.strokeWidth,r&&t.translate((null==u?void 0:u.x)||0,(null==u?void 0:u.y)||0),t.fill(n),t.setTransform(1,0,0,1,0,0)}),[c,u,r]),y=s().useCallback((function(t){if(_){t.save();var n=c.strokeWidth||0;t.lineWidth=n+2,t.globalCompositeOperation="destination-out",f(t,_),t.stroke(_),t.restore()}}),[f,_,c]);return s().useEffect((function(){var t,n=null===(t=e.current)||void 0===t?void 0:t.getContext("2d");n&&(y(n),f(n,l))}),[e,f,r,a,h,o,l,y]),null},at=function(t){var n=s().useRef(null),i=t.children,e=t.width,o=void 0===e?0:e,r=t.height,c=void 0===r?0:r,a=t.clipWidth,h=t.padding,u=s().useCallback((function(t){return t.clearRect(0,0,o,c)}),[o,c]),l=s().useCallback((function(t){var n="number"==typeof h?h:(null==h?void 0:h.right)||0,i="number"==typeof h?h:(null==h?void 0:h.left)||0,e=o-n-i;t.clearRect(o-n,0,a?-1*(e-a):0,c)}),[o,c,h,a]);return s().createElement(ot.Provider,{value:{canvasRef:n,clear:u,clip:l}},s().createElement("foreignObject",{width:o,height:c,x:0,y:0},s().createElement("canvas",{width:o,height:c,ref:n})),i)};at.role="container";var ht=Array.prototype.slice;function ut(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lt(t){this._context=t}function _t(t){return new lt(t)}function ft(t){return t[0]}function yt(t){return t[1]}function pt(t,n){var i=M(!0),e=null,o=_t,r=null;function s(s){var c,a,h,u=(s=ut(s)).length,l=!1;for(null==e&&(r=o(h=w())),c=0;c<=u;++c)!(c<u&&i(a=s[c],c,s))===l&&((l=!l)?r.lineStart():r.lineEnd()),l&&r.point(+t(a,c,s),+n(a,c,s));if(h)return r=null,h+""||null}return t="function"==typeof t?t:void 0===t?ft:M(t),n="function"==typeof n?n:void 0===n?yt:M(n),s.x=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),s):t},s.y=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),s):n},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:M(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=e&&(r=o(e)),s):o},s.context=function(t){return arguments.length?(null==t?e=r=null:r=o(e=t),s):e},s}function xt(t,n,i){var e=null,o=M(!0),r=null,s=_t,c=null;function a(a){var h,u,l,_,f,y=(a=ut(a)).length,p=!1,x=new Array(y),v=new Array(y);for(null==r&&(c=s(f=w())),h=0;h<=y;++h){if(!(h<y&&o(_=a[h],h,a))===p)if(p=!p)u=h,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),l=h-1;l>=u;--l)c.point(x[l],v[l]);c.lineEnd(),c.areaEnd()}p&&(x[h]=+t(_,h,a),v[h]=+n(_,h,a),c.point(e?+e(_,h,a):x[h],i?+i(_,h,a):v[h]))}if(f)return c=null,f+""||null}function h(){return pt().defined(o).curve(s).context(r)}return t="function"==typeof t?t:void 0===t?ft:M(+t),n="function"==typeof n?n:M(void 0===n?0:+n),i="function"==typeof i?i:void 0===i?yt:M(+i),a.x=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),e=null,a):t},a.x0=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),a):t},a.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:M(+t),a):e},a.y=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),i=null,a):n},a.y0=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),a):n},a.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:M(+t),a):i},a.lineX0=a.lineY0=function(){return h().x(t).y(n)},a.lineY1=function(){return h().x(t).y(i)},a.lineX1=function(){return h().x(e).y(n)},a.defined=function(t){return arguments.length?(o="function"==typeof t?t:M(!!t),a):o},a.curve=function(t){return arguments.length?(s=t,null!=r&&(c=s(r)),a):s},a.context=function(t){return arguments.length?(null==t?r=c=null:c=s(r=t),a):r},a}function vt(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function dt(t){return t}function bt(){var t=dt,n=vt,i=null,e=M(0),o=M(L),r=M(0);function s(s){var c,a,h,u,l,_=(s=ut(s)).length,f=0,y=new Array(_),p=new Array(_),x=+e.apply(this,arguments),v=Math.min(L,Math.max(-L,o.apply(this,arguments)-x)),d=Math.min(Math.abs(v)/_,r.apply(this,arguments)),b=d*(v<0?-1:1);for(c=0;c<_;++c)(l=p[y[c]=c]=+t(s[c],c,s))>0&&(f+=l);for(null!=n?y.sort((function(t,i){return n(p[t],p[i])})):null!=i&&y.sort((function(t,n){return i(s[t],s[n])})),c=0,h=f?(v-_*b)/f:0;c<_;++c,x=u)a=y[c],u=x+((l=p[a])>0?l*h:0)+b,p[a]={data:s[a],index:c,value:l,startAngle:x,endAngle:u,padAngle:d};return p}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:M(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,i=null,s):n},s.sort=function(t){return arguments.length?(i=t,n=null,s):i},s.startAngle=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),s):e},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),s):o},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:M(+t),s):r},s}lt.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,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var gt=Tt(_t);function mt(t){this._curve=t}function Tt(t){function n(n){return new mt(t(n))}return n._curve=t,n}function wt(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Tt(t)):n()._curve},t}function Mt(){return wt(pt().curve(gt))}function kt(){var t=xt().curve(gt),n=t.curve,i=t.lineX0,e=t.lineX1,o=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return wt(i())},delete t.lineX0,t.lineEndAngle=function(){return wt(e())},delete t.lineX1,t.lineInnerRadius=function(){return wt(o())},delete t.lineY0,t.lineOuterRadius=function(){return wt(r())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Tt(t)):n()._curve},t}function Ot(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}mt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};class St{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}class Pt{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,n){if(t=+t,n=+n,0==this._point++)this._x0=t,this._y0=n;else{const i=Ot(this._x0,this._y0),e=Ot(this._x0,this._y0=(this._y0+n)/2),o=Ot(t,this._y0),r=Ot(t,n);this._context.moveTo(...i),this._context.bezierCurveTo(...e,...o,...r)}}}function At(t){return new St(t,!0)}function Ct(t){return new St(t,!1)}function Rt(t){return new Pt(t)}function jt(t){return t.source}function Nt(t){return t.target}function Et(t){let n=jt,i=Nt,e=ft,o=yt,r=null,s=null;function c(){let c;const a=ht.call(arguments),h=n.apply(this,a),u=i.apply(this,a);if(null==r&&(s=t(c=w())),s.lineStart(),a[0]=h,s.point(+e.apply(this,a),+o.apply(this,a)),a[0]=u,s.point(+e.apply(this,a),+o.apply(this,a)),s.lineEnd(),c)return s=null,c+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(i=t,c):i},c.x=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),c):e},c.y=function(t){return arguments.length?(o="function"==typeof t?t:M(+t),c):o},c.context=function(n){return arguments.length?(null==n?r=s=null:s=t(r=n),c):r},c}function Lt(){return Et(At)}function zt(){return Et(Ct)}function It(){const t=Et(Rt);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const qt=R(3),Dt={draw(t,n){const i=.59436*R(n+A(n/28,.75)),e=i/2,o=e*qt;t.moveTo(0,i),t.lineTo(0,-i),t.moveTo(-o,-e),t.lineTo(o,e),t.moveTo(-o,e),t.lineTo(o,-e)}},Wt={draw(t,n){const i=R(n/N);t.moveTo(i,0),t.arc(0,0,i,0,L)}},Xt={draw(t,n){const i=R(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}},Yt=R(1/3),Bt=2*Yt,$t={draw(t,n){const i=R(n/Bt),e=i*Yt;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},Ft={draw(t,n){const i=.62625*R(n);t.moveTo(0,-i),t.lineTo(i,0),t.lineTo(0,i),t.lineTo(-i,0),t.closePath()}},Zt={draw(t,n){const i=.87559*R(n-A(n/7,2));t.moveTo(-i,0),t.lineTo(i,0),t.moveTo(0,i),t.lineTo(0,-i)}},Vt={draw(t,n){const i=R(n),e=-i/2;t.rect(e,e,i,i)}},Gt={draw(t,n){const i=.4431*R(n);t.moveTo(i,i),t.lineTo(i,-i),t.lineTo(-i,-i),t.lineTo(-i,i),t.closePath()}},Ut=C(N/10)/C(7*N/10),Ht=C(L/10)*Ut,Qt=-S(L/10)*Ut,Jt={draw(t,n){const i=R(.8908130915292852*n),e=Ht*i,o=Qt*i;t.moveTo(0,-i),t.lineTo(e,o);for(let n=1;n<5;++n){const r=L*n/5,s=S(r),c=C(r);t.lineTo(c*i,-s*i),t.lineTo(s*e-c*o,c*e+s*o)}t.closePath()}},Kt=R(3),tn={draw(t,n){const i=-R(n/(3*Kt));t.moveTo(0,2*i),t.lineTo(-Kt*i,-i),t.lineTo(Kt*i,-i),t.closePath()}},nn=R(3),en={draw(t,n){const i=.6824*R(n),e=i/2,o=i*nn/2;t.moveTo(0,-i),t.lineTo(o,e),t.lineTo(-o,e),t.closePath()}},on=-.5,rn=R(3)/2,sn=1/R(12),cn=3*(sn/2+1),an={draw(t,n){const i=R(n/cn),e=i/2,o=i*sn,r=e,s=i*sn+i,c=-r,a=s;t.moveTo(e,o),t.lineTo(r,s),t.lineTo(c,a),t.lineTo(on*e-rn*o,rn*e+on*o),t.lineTo(on*r-rn*s,rn*r+on*s),t.lineTo(on*c-rn*a,rn*c+on*a),t.lineTo(on*e+rn*o,on*o-rn*e),t.lineTo(on*r+rn*s,on*s-rn*r),t.lineTo(on*c+rn*a,on*a-rn*c),t.closePath()}},hn={draw(t,n){const i=.6189*R(n-A(n/6,1.7));t.moveTo(-i,-i),t.lineTo(i,i),t.moveTo(-i,i),t.lineTo(i,-i)}},un=[Wt,Xt,$t,Vt,Jt,tn,an],ln=[Wt,Zt,hn,en,Dt,Gt,Ft];function _n(t,n){let i=null;function e(){let e;if(i||(i=e=w()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:M(t||Wt),n="function"==typeof n?n:M(void 0===n?64:+n),e.type=function(n){return arguments.length?(t="function"==typeof n?n:M(n),e):t},e.size=function(t){return arguments.length?(n="function"==typeof t?t:M(+t),e):n},e.context=function(t){return arguments.length?(i=null==t?null:t,e):i},e}function fn(){}function yn(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function pn(t){this._context=t}function xn(t){return new pn(t)}function vn(t){this._context=t}function dn(t){return new vn(t)}function bn(t){this._context=t}function gn(t){return new bn(t)}function mn(t,n){this._basis=new pn(t),this._beta=n}pn.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:yn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);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:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},vn.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},bn.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:yn(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},mn.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,o=t[0],r=n[0],s=t[i]-o,c=n[i]-r,a=-1;++a<=i;)e=a/i,this._basis.point(this._beta*t[a]+(1-this._beta)*(o+e*s),this._beta*n[a]+(1-this._beta)*(r+e*c));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const Tn=function t(n){function i(t){return 1===n?new pn(t):new mn(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function wn(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Mn(t,n){this._context=t,this._k=(1-n)/6}Mn.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:wn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const kn=function t(n){function i(t){return new Mn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function On(t,n){this._context=t,this._k=(1-n)/6}On.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Sn=function t(n){function i(t){return new On(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Pn(t,n){this._context=t,this._k=(1-n)/6}Pn.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,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:wn(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const An=function t(n){function i(t){return new Pn(t,n)}return i.tension=function(n){return t(+n)},i}(0);function Cn(t,n,i){var e=t._x1,o=t._y1,r=t._x2,s=t._y2;if(t._l01_a>j){var c=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,a=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*c-t._x0*t._l12_2a+t._x2*t._l01_2a)/a,o=(o*c-t._y0*t._l12_2a+t._y2*t._l01_2a)/a}if(t._l23_a>j){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*h+t._x1*t._l23_2a-n*t._l12_2a)/u,s=(s*h+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(e,o,r,s,t._x2,t._y2)}function Rn(t,n){this._context=t,this._alpha=n}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const jn=function t(n){function i(t){return n?new Rn(t,n):new Mn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Nn(t,n){this._context=t,this._alpha=n}Nn.prototype={areaStart:fn,areaEnd:fn,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)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const En=function t(n){function i(t){return n?new Nn(t,n):new On(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Ln(t,n){this._context=t,this._alpha=n}Ln.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,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:Cn(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const zn=function t(n){function i(t){return n?new Ln(t,n):new Pn(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function In(t){this._context=t}function qn(t){return new In(t)}function Dn(t){return t<0?-1:1}function Wn(t,n,i){var e=t._x1-t._x0,o=n-t._x1,r=(t._y1-t._y0)/(e||o<0&&-0),s=(i-t._y1)/(o||e<0&&-0),c=(r*o+s*e)/(e+o);return(Dn(r)+Dn(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(c))||0}function Xn(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Yn(t,n,i){var e=t._x0,o=t._y0,r=t._x1,s=t._y1,c=(r-e)/3;t._context.bezierCurveTo(e+c,o+c*n,r-c,s-c*i,r,s)}function Bn(t){this._context=t}function $n(t){this._context=new Fn(t)}function Fn(t){this._context=t}function Zn(t){return new Bn(t)}function Vn(t){return new $n(t)}function Gn(t){this._context=t}function Un(t){var n,i,e=t.length-1,o=new Array(e),r=new Array(e),s=new Array(e);for(o[0]=0,r[0]=2,s[0]=t[0]+2*t[1],n=1;n<e-1;++n)o[n]=1,r[n]=4,s[n]=4*t[n]+2*t[n+1];for(o[e-1]=2,r[e-1]=7,s[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=o[n]/r[n-1],r[n]-=i,s[n]-=i*s[n-1];for(o[e-1]=s[e-1]/r[e-1],n=e-2;n>=0;--n)o[n]=(s[n]-o[n+1])/r[n];for(r[e-1]=(t[e]+o[e-1])/2,n=0;n<e-1;++n)r[n]=2*t[n+1]-o[n+1];return[o,r]}function Hn(t){return new Gn(t)}function Qn(t,n){this._context=t,this._t=n}function Jn(t){return new Qn(t,.5)}function Kn(t){return new Qn(t,0)}function ti(t){return new Qn(t,1)}function ni(t,n){if((o=t.length)>1)for(var i,e,o,r=1,s=t[n[0]],c=s.length;r<o;++r)for(e=s,s=t[n[r]],i=0;i<c;++i)s[i][1]+=s[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function ii(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function ei(t,n){return t[n]}function oi(t){const n=[];return n.key=t,n}function ri(){var t=M([]),n=ii,i=ni,e=ei;function o(o){var r,s,c=Array.from(t.apply(this,arguments),oi),a=c.length,h=-1;for(const t of o)for(r=0,++h;r<a;++r)(c[r][h]=[0,+e(t,c[r].key,h,o)]).data=t;for(r=0,s=ut(n(c));r<a;++r)c[s[r]].index=r;return i(c,s),c}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:M(Array.from(n)),o):t},o.value=function(t){return arguments.length?(e="function"==typeof t?t:M(+t),o):e},o.order=function(t){return arguments.length?(n=null==t?ii:"function"==typeof t?t:M(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(i=null==t?ni:t,o):i},o}function si(t,n){if((e=t.length)>0){for(var i,e,o,r=0,s=t[0].length;r<s;++r){for(o=i=0;i<e;++i)o+=t[i][r][1]||0;if(o)for(i=0;i<e;++i)t[i][r][1]/=o}ni(t,n)}}function ci(t,n){if((c=t.length)>0)for(var i,e,o,r,s,c,a=0,h=t[n[0]].length;a<h;++a)for(r=s=0,i=0;i<c;++i)(o=(e=t[n[i]][a])[1]-e[0])>0?(e[0]=r,e[1]=r+=o):o<0?(e[1]=s,e[0]=s+=o):(e[0]=0,e[1]=o)}function ai(t,n){if((i=t.length)>0){for(var i,e=0,o=t[n[0]],r=o.length;e<r;++e){for(var s=0,c=0;s<i;++s)c+=t[s][e][1]||0;o[e][1]+=o[e][0]=-c/2}ni(t,n)}}function hi(t,n){if((o=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,o,r=0,s=1;s<e;++s){for(var c=0,a=0,h=0;c<o;++c){for(var u=t[n[c]],l=u[s][1]||0,_=(l-(u[s-1][1]||0))/2,f=0;f<c;++f){var y=t[n[f]];_+=(y[s][1]||0)-(y[s-1][1]||0)}a+=l,h+=_*l}i[s-1][1]+=i[s-1][0]=r,a&&(r-=h/a)}i[s-1][1]+=i[s-1][0]=r,ni(t,n)}}function ui(t){var n=t.map(li);return ii(t).sort((function(t,i){return n[t]-n[i]}))}function li(t){for(var n,i=-1,e=0,o=t.length,r=-1/0;++i<o;)(n=+t[i][1])>r&&(r=n,e=i);return e}function _i(t){var n=t.map(fi);return ii(t).sort((function(t,i){return n[t]-n[i]}))}function fi(t){for(var n,i=0,e=-1,o=t.length;++e<o;)(n=+t[e][1])&&(i+=n);return i}function yi(t){return _i(t).reverse()}function pi(t){var n,i,e=t.length,o=t.map(fi),r=ui(t),s=0,c=0,a=[],h=[];for(n=0;n<e;++n)i=r[n],s<c?(s+=o[i],a.push(i)):(c+=o[i],h.push(i));return h.reverse().concat(a)}function xi(t){return ii(t).reverse()}In.prototype={areaStart:fn,areaEnd:fn,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Bn.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:Yn(this,this._t0,Xn(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Yn(this,Xn(this,i=Wn(this,t,n)),i);break;default:Yn(this,this._t0,i=Wn(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},($n.prototype=Object.create(Bn.prototype)).point=function(t,n){Bn.prototype.point.call(this,n,t)},Fn.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,o,r){this._context.bezierCurveTo(n,t,e,i,r,o)}},Gn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=Un(t),o=Un(n),r=0,s=1;s<i;++r,++s)this._context.bezierCurveTo(e[0][r],o[0][r],e[1][r],o[1][r],t[s],n[s]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Qn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}};var vi=function(t){return null!=(void 0!==t._y1?t._y1:t._y)&&null!==t._y0},di=function(t){return function(n){return t.x(void 0!==n._x1?n._x1:n._x)}},bi=function(t){return function(n){return t.y(void 0!==n._y1?n._y1:n._y)}},gi=function(t){return"curve".concat(function(t){return t&&t[0].toUpperCase()+t.slice(1)}(t))},mi=function(n){var i=n.interpolation;if("function"==typeof i)return i;if("string"==typeof i){var e=n.polar,o=n.openCurve,r=(void 0===o?!e:o)?gi(i):function(t){return"".concat(gi(t),"Closed")}(i);return t[r]}return _t},Ti=function(t){var n=t.polar,i=t.scale,e=t.horizontal;return n?Mt().defined(vi).curve(mi(t)).angle(function(t){return function(n){return-1*t.x(void 0!==n._x1?n._x1:n._x)+Math.PI/2}}(i)).radius(bi(i)):pt().defined(vi).curve(mi(t)).x(e?bi(i):di(i)).y(e?di(i):bi(i))},wi=function(t){var n=rt(),i=n.canvasRef,e=n.clear,o=n.clip,r=t.style,c=t.data,a=r.stroke,h=r.strokeWidth,u=s().useCallback((function(n){var i=Ti(t);n.strokeStyle=a,n.lineWidth=h,i.context(n)(c),n.stroke()}),[c,t,a,h]);return s().useEffect((function(){var t,n=null===(t=i.current)||void 0===t?void 0:t.getContext("2d");n&&(e(n),u(n),o(n))}),[i,u,e,o]),null},Mi=e(8825),ki=e.n(Mi);function Oi(t,n,i){return"M ".concat(t,", ").concat(n,"\n m ").concat(-i,", 0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*i,",0\n a ").concat(i,", ").concat(i," 0 1,0 ").concat(2*-i,",0")}function Si(t,n,i){var e=.87*i,o=t-e,r=n+e,s=t+e-o;return"M ".concat(o,", ").concat(r,"\n h").concat(s,"\n v-").concat(s,"\n h-").concat(s,"\n z")}function Pi(t,n,i){var e=.87*i,o=Math.sqrt(e*e*2);return"M ".concat(t,", ").concat(n+o,"\n l ").concat(o,", -").concat(o,"\n l -").concat(o,", -").concat(o,"\n l -").concat(o,", ").concat(o,"\n l ").concat(o,", ").concat(o,"\n z")}function Ai(t,n,i){var e=t+i,o=n-i,r=n+i/2*Math.sqrt(3);return"M ".concat(t-i,", ").concat(o,"\n L ").concat(e,", ").concat(o,"\n L ").concat(t,", ").concat(r,"\n z")}function Ci(t,n,i){var e=t+i,o=n-i/2*Math.sqrt(3),r=n+i;return"M ".concat(t-i,", ").concat(r,"\n L ").concat(e,", ").concat(r,"\n L ").concat(t,", ").concat(o,"\n z")}function Ri(t,n,i){var e=1.1*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e,"\n v-").concat(o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(o,"\n z")}function ji(t,n,i){var e=.8*i,o=e/1.5;return"\n M ".concat(t-o/2,", ").concat(n+e+o,"\n v-").concat(2*o,"\n h-").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v-").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h").concat(o,"\n v").concat(o,"\n h-").concat(o,"\n v").concat(2*o,"\n z")}function Ni(t,n,i){var e=1.1*i,o=e-.3*e,r=t-e,s=n+o/2,c=t+e-r;return"M ".concat(r,", ").concat(s,"\n h").concat(c,"\n v-").concat(o,"\n h-").concat(c,"\n z")}function Ei(t,n,i){var e=1.35*i,o=Math.PI/5,r=ki()(10).map((function(i){var r=i%2==0?e:e/2;return"".concat(r*Math.sin(o*(i+1))+t,",\n ").concat(r*Math.cos(o*(i+1))+n)}));return"M ".concat(r.join("L")," z")}var Li=function(t){var n=rt().canvasRef,e=function(t){var n=p(t.size,t),e=x(t.style,t),o=p(t.symbol,t);return i()({},t,{size:n,style:e,symbol:o})}(t),o=s().useCallback((function(t){var n=e.style,i=function(t){var n=t.x,i=t.y,e=t.size,o=t.symbol;if(t.getPath)return t.getPath(n,i,e);var r={circle:Oi,square:Si,diamond:Pi,triangleDown:Ai,triangleUp:Ci,plus:Ri,minus:Ni,star:Ei,cross:ji};return("function"==typeof r[o]?r[o]:r.circle)(n,i,e)}(e);t.fillStyle=n.fill;var o=new Path2D(i);t.fill(o)}),[e]);return s().useEffect((function(){var t,i=null===(t=n.current)||void 0===t?void 0:t.getContext("2d");i&&o(i)}),[]),null}})(),o})()));
//# sourceMappingURL=victory-canvas.min.js.map

@@ -10,3 +10,3 @@ import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";

datum?: any;
getPath?: (x: number, y: number, size: number) => string;
getPath?: (props: CanvasBarProps) => string;
horizontal?: boolean;

@@ -13,0 +13,0 @@ width?: number;

@@ -10,3 +10,3 @@ import { VictoryBarAlignmentType, VictoryBarCornerRadiusObject } from "victory-bar";

datum?: any;
getPath?: (x: number, y: number, size: number) => string;
getPath?: (props: CanvasBarProps) => string;
horizontal?: boolean;

@@ -13,0 +13,0 @@ width?: number;

{
"name": "victory-canvas",
"version": "36.8.2",
"version": "36.8.3",
"description": "HTML5 Canvas Components for Victory",

@@ -25,4 +25,4 @@ "keywords": [

"prop-types": "^15.8.1",
"victory-bar": "^36.8.2",
"victory-core": "^36.8.2"
"victory-bar": "^36.8.3",
"victory-core": "^36.8.3"
},

@@ -29,0 +29,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc