@tapflowio/relay 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/RelayServer.d.ts +313 -2
- package/dist/RelayServer.d.ts.map +1 -1
- package/dist/RelayServer.js +1245 -211
- package/dist/RelayServer.js.map +1 -1
- package/dist/SessionManager.d.ts +124 -21
- package/dist/SessionManager.d.ts.map +1 -1
- package/dist/SessionManager.js +201 -22
- package/dist/SessionManager.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/types.d.ts +3 -44
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +13 -0
- package/dist/types.js.map +1 -1
- package/package.json +10 -8
- package/public/assets/{AppCenter-BRmG2FEm.js → AppCenter-DyP0aqfF.js} +2 -2
- package/public/assets/AppCenter-DyP0aqfF.js.br +0 -0
- package/public/assets/Default-D7ScPE30.js +1 -0
- package/public/assets/Default-D7ScPE30.js.br +0 -0
- package/public/assets/Invite-UmhV5rAf.js +1 -0
- package/public/assets/Invite-UmhV5rAf.js.br +0 -0
- package/public/assets/MacResources-MS4E00w3.js +1 -0
- package/public/assets/MacResources-MS4E00w3.js.br +0 -0
- package/public/assets/NotFound-BoDDivK5.js +1 -0
- package/public/assets/NotFound-BoDDivK5.js.br +0 -0
- package/public/assets/QASession-CjgJHDZ3.js +125 -0
- package/public/assets/QASession-CjgJHDZ3.js.br +0 -0
- package/public/assets/ResetPassword-CAlB6CfP.js +1 -0
- package/public/assets/ResetPassword-CAlB6CfP.js.br +0 -0
- package/public/assets/Setup-CPm2-hPJ.js +1 -0
- package/public/assets/Setup-CPm2-hPJ.js.br +0 -0
- package/public/assets/{Team-D1iwg2vL.js → Team-GEIzrM1D.js} +2 -2
- package/public/assets/Team-GEIzrM1D.js.br +0 -0
- package/public/assets/Tokens-DSeBz_CJ.js +1 -0
- package/public/assets/Tokens-DSeBz_CJ.js.br +0 -0
- package/public/assets/alert-dialog-BsXI9SVV.js +1 -0
- package/public/assets/alert-dialog-BsXI9SVV.js.br +0 -0
- package/public/assets/badge-BkdYQFsh.js +1 -0
- package/public/assets/badge-BkdYQFsh.js.br +0 -0
- package/public/assets/{build-format-BZV6gt41.js → build-format-CXuQt1X2.js} +3 -3
- package/public/assets/build-format-CXuQt1X2.js.br +0 -0
- package/public/assets/dialog-DuXZpbiF.js +11 -0
- package/public/assets/dialog-DuXZpbiF.js.br +0 -0
- package/public/assets/index-Bk2hqaHZ.css +1 -0
- package/public/assets/index-Bk2hqaHZ.css.br +0 -0
- package/public/assets/index-bitr6DIC.js +215 -0
- package/public/assets/index-bitr6DIC.js.br +0 -0
- package/public/assets/{pencil-BGrOEXS6.js → pencil-iRR275s8.js} +1 -1
- package/public/assets/pencil-iRR275s8.js.br +0 -0
- package/public/assets/table-CHmhGpHG.js +1 -0
- package/public/assets/table-CHmhGpHG.js.br +0 -0
- package/public/assets/tabs-BnbeuAOe.js +1 -0
- package/public/assets/tabs-BnbeuAOe.js.br +0 -0
- package/public/assets/{trash-2-CwlFrbEF.js → trash-2-QI162w2K.js} +1 -1
- package/public/assets/trash-2-QI162w2K.js.br +0 -0
- package/public/assets/vendor-charts-DyX5CBcf.js +5 -0
- package/public/assets/vendor-charts-DyX5CBcf.js.br +0 -0
- package/public/assets/vendor-react-AJpf4YZ0.js +49 -0
- package/public/assets/vendor-react-AJpf4YZ0.js.br +0 -0
- package/public/assets/vendor-router-ChFy8CZ1.js +12 -0
- package/public/assets/vendor-router-ChFy8CZ1.js.br +0 -0
- package/public/index.html +4 -2
- package/public/index.html.br +0 -0
- package/public/assets/AppCenter-BRmG2FEm.js.br +0 -0
- package/public/assets/Default-DTr0wqds.js +0 -1
- package/public/assets/Default-DTr0wqds.js.br +0 -0
- package/public/assets/Invite-DKsNh2GB.js +0 -1
- package/public/assets/Invite-DKsNh2GB.js.br +0 -0
- package/public/assets/MacResources-CLDdcibL.js +0 -5
- package/public/assets/MacResources-CLDdcibL.js.br +0 -0
- package/public/assets/NotFound-BtKq2uv6.js +0 -1
- package/public/assets/NotFound-BtKq2uv6.js.br +0 -0
- package/public/assets/QASession-B_5aJ67l.js +0 -130
- package/public/assets/QASession-B_5aJ67l.js.br +0 -0
- package/public/assets/ResetPassword-gp6hVQrf.js +0 -1
- package/public/assets/ResetPassword-gp6hVQrf.js.br +0 -0
- package/public/assets/Setup-DiG4Nbs7.js +0 -1
- package/public/assets/Setup-DiG4Nbs7.js.br +0 -0
- package/public/assets/Team-D1iwg2vL.js.br +0 -0
- package/public/assets/Tokens-DGtE4Xcy.js +0 -1
- package/public/assets/Tokens-DGtE4Xcy.js.br +0 -0
- package/public/assets/alert-dialog-CXwkFlF3.js +0 -1
- package/public/assets/alert-dialog-CXwkFlF3.js.br +0 -0
- package/public/assets/badge-CavXTq2x.js +0 -1
- package/public/assets/badge-CavXTq2x.js.br +0 -0
- package/public/assets/build-format-BZV6gt41.js.br +0 -0
- package/public/assets/dialog-JbKwqqS0.js +0 -11
- package/public/assets/dialog-JbKwqqS0.js.br +0 -0
- package/public/assets/index-CBnxiD7-.js +0 -274
- package/public/assets/index-CBnxiD7-.js.br +0 -0
- package/public/assets/index-Ctx3_cYz.css +0 -1
- package/public/assets/index-Ctx3_cYz.css.br +0 -0
- package/public/assets/pencil-BGrOEXS6.js.br +0 -0
- package/public/assets/table-CqOA0Bb1.js +0 -1
- package/public/assets/table-CqOA0Bb1.js.br +0 -0
- package/public/assets/tabs-BVBbhCFG.js +0 -1
- package/public/assets/tabs-BVBbhCFG.js.br +0 -0
- package/public/assets/trash-2-CwlFrbEF.js.br +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o,j as t}from"./vendor-react-AJpf4YZ0.js";import{J as l}from"./index-bitr6DIC.js";const r=o.forwardRef(({className:e,...a},s)=>t.jsx("div",{className:"relative w-full overflow-auto",children:t.jsx("table",{ref:s,className:l("w-full caption-bottom text-sm",e),...a})}));r.displayName="Table";const d=o.forwardRef(({className:e,...a},s)=>t.jsx("thead",{ref:s,className:l("[&_tr]:border-b",e),...a}));d.displayName="TableHeader";const m=o.forwardRef(({className:e,...a},s)=>t.jsx("tbody",{ref:s,className:l("[&_tr:last-child]:border-0",e),...a}));m.displayName="TableBody";const b=o.forwardRef(({className:e,...a},s)=>t.jsx("tfoot",{ref:s,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));b.displayName="TableFooter";const c=o.forwardRef(({className:e,...a},s)=>t.jsx("tr",{ref:s,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));c.displayName="TableRow";const i=o.forwardRef(({className:e,...a},s)=>t.jsx("th",{ref:s,className:l("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...a}));i.displayName="TableHead";const f=o.forwardRef(({className:e,...a},s)=>t.jsx("td",{ref:s,className:l("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...a}));f.displayName="TableCell";const n=o.forwardRef(({className:e,...a},s)=>t.jsx("caption",{ref:s,className:l("mt-4 text-sm text-muted-foreground",e),...a}));n.displayName="TableCaption";export{r as T,m as a,f as b,i as c,d,c as e};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as s,j as g}from"./vendor-react-AJpf4YZ0.js";import{u as E,t as p,q as j,K as m,s as A,Z as w,O as P,ab as L,aa as k,ae as $,J as y}from"./index-bitr6DIC.js";function D(){const t=new Uint8Array(16);return crypto.getRandomValues(t),Array.from(t,e=>e.toString(16).padStart(2,"0")).join("")}const M=location.protocol==="https:"?"wss:":"ws:",V=`${M}//${location.host}`,O=2e3,F=D();function G(){const t=new URL(V);return t.searchParams.set("client",F),t.toString()}function oe(t,e){const a=s.useRef(null),[f,n]=s.useState(!1),r=s.useRef(t),u=s.useRef(e);return s.useLayoutEffect(()=>{r.current=t,u.current=e},[t,e]),s.useEffect(()=>{let l=!1;const b=()=>{if(l)return;const d=new WebSocket(G());d.binaryType="arraybuffer",a.current=d,d.onopen=()=>n(!0),d.onclose=()=>{n(!1),l||setTimeout(b,O)},d.onmessage=c=>{var o;if(c.data instanceof ArrayBuffer){(o=u.current)==null||o.call(u,c.data);return}try{r.current(JSON.parse(c.data))}catch{}}};return b(),()=>{var d;l=!0,(d=a.current)==null||d.close()}},[]),{send:s.useCallback(l=>{var b;((b=a.current)==null?void 0:b.readyState)===WebSocket.OPEN&&a.current.send(JSON.stringify(l))},[]),connected:f}}var K=Object.defineProperty,T=(t,e)=>K(t,"name",{value:e,configurable:!0}),x="Tabs",[U,se]=P(x,[w]),I=w(),[q,C]=U(x),J=s.forwardRef(T(function(e,a){const{__scopeTabs:f,value:n,onValueChange:r,defaultValue:u,orientation:i="horizontal",dir:l,activationMode:b="automatic",...d}=e,c=L(l),[o,v]=k({prop:n,onChange:r,defaultProp:u??"",caller:x});return g.jsx(q,{scope:f,baseId:$(),value:o,onValueChange:v,orientation:i,dir:c,activationMode:b,children:g.jsx(p.div,{dir:c,"data-orientation":i,...d,ref:a})})},"Tabs")),W="TabsList",Y=s.forwardRef(T(function(e,a){const{__scopeTabs:f,loop:n=!0,...r}=e,u=C(W,f),i=I(f);return g.jsx(E,{asChild:!0,...i,orientation:u.orientation,dir:u.dir,loop:n,children:g.jsx(p.div,{role:"tablist","aria-orientation":u.orientation,...r,ref:a})})},"TabsList")),z="TabsTrigger",H=s.forwardRef(T(function(e,a){const{__scopeTabs:f,value:n,disabled:r=!1,...u}=e,i=C(z,f),l=I(f),b=R(i.baseId,n),d=h(i.baseId,n),c=n===i.value;return g.jsx(j,{asChild:!0,...l,focusable:!r,active:c,children:g.jsx(p.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":d,"data-state":c?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:b,...u,ref:a,onMouseDown:m(e.onMouseDown,o=>{!r&&o.button===0&&o.ctrlKey===!1?i.onValueChange(n):o.preventDefault()}),onKeyDown:m(e.onKeyDown,o=>{r||o.target!==o.currentTarget||[" ","Enter"].includes(o.key)&&i.onValueChange(n)}),onFocus:m(e.onFocus,()=>{const o=i.activationMode!=="manual";!c&&!r&&o&&i.onValueChange(n)})})})},"TabsTrigger")),Z="TabsContent",B=s.forwardRef(T(function(e,a){const{__scopeTabs:f,value:n,forceMount:r,children:u,...i}=e,l=C(Z,f),b=R(l.baseId,n),d=h(l.baseId,n),c=n===l.value,o=s.useRef(c);return s.useEffect(()=>{const v=requestAnimationFrame(()=>o.current=!1);return()=>cancelAnimationFrame(v)},[]),g.jsx(A,{present:r||c,children:({present:v})=>g.jsx(p.div,{"data-state":c?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":b,hidden:!v,id:d,tabIndex:0,...i,ref:a,style:{...e.style,animationDuration:o.current?"0s":void 0},children:v&&u})})},"TabsContent"));function R(t,e){return`${t}-trigger-${e}`}T(R,"makeTriggerId");function h(t,e){return`${t}-content-${e}`}T(h,"makeContentId");var Q=J,N=Y,S=H,_=B;const re=Q,X=s.forwardRef(({className:t,...e},a)=>g.jsx(N,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));X.displayName=N.displayName;const ee=s.forwardRef(({className:t,...e},a)=>g.jsx(S,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));ee.displayName=S.displayName;const te=s.forwardRef(({className:t,...e},a)=>g.jsx(_,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));te.displayName=_.displayName;export{re as T,te as a,X as b,ee as c,D as n,oe as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var ti=Object.defineProperty;var ni=(e,t,n)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>ni(e,typeof t!="symbol"?t+"":t,n);import{g as rr,j as A,i as G}from"./vendor-react-AJpf4YZ0.js";function Ve(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ri(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xt(e){let t,n,r;e.length!==2?(t=Ve,n=(u,s)=>Ve(e(u),s),r=(u,s)=>e(u)-s):(t=e===Ve||e===ri?e:ii,n=e,r=e);function i(u,s,l=0,h=u.length){if(l<h){if(t(s,s)!==0)return h;do{const f=l+h>>>1;n(u[f],s)<0?l=f+1:h=f}while(l<h)}return l}function o(u,s,l=0,h=u.length){if(l<h){if(t(s,s)!==0)return h;do{const f=l+h>>>1;n(u[f],s)<=0?l=f+1:h=f}while(l<h)}return l}function a(u,s,l=0,h=u.length){const f=i(u,s,l,h-1);return f>l&&r(u[f-1],s)>-r(u[f],s)?f-1:f}return{left:i,center:a,right:o}}function ii(){return 0}function oi(e){return e===null?NaN:+e}const ai=Xt(Ve),ui=ai.right;Xt(oi).center;const si=Math.sqrt(50),li=Math.sqrt(10),fi=Math.sqrt(2);function Be(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=si?10:o>=li?5:o>=fi?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(e*l),s=Math.round(t*l),u/l<e&&++u,s/l>t&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(e/l),s=Math.round(t/l),u*l<e&&++u,s*l>t&&--s),s<u&&.5<=n&&n<2?Be(e,t,n*2):[u,s,l]}function ci(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Be(t,e,n):Be(e,t,n);if(!(o>=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let l=0;l<u;++l)s[l]=(o-l)/-a;else for(let l=0;l<u;++l)s[l]=(o-l)*a;else if(a<0)for(let l=0;l<u;++l)s[l]=(i+l)/-a;else for(let l=0;l<u;++l)s[l]=(i+l)*a;return s}function Rt(e,t,n){return t=+t,e=+e,n=+n,Be(e,t,n)[2]}function Ft(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Rt(t,e,n):Rt(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ir(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Pe(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function He(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function pe(){}var we=.7,Se=1/we,Te="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hi=/^#([0-9a-f]{3,8})$/,pi=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),gi=new RegExp(`^rgb\\(${re},${re},${re}\\)$`),di=new RegExp(`^rgba\\(${Te},${Te},${Te},${Oe}\\)$`),mi=new RegExp(`^rgba\\(${re},${re},${re},${Oe}\\)$`),yi=new RegExp(`^hsl\\(${Oe},${re},${re}\\)$`),xi=new RegExp(`^hsla\\(${Oe},${re},${re},${Oe}\\)$`),sn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Pe(pe,Re,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ln,formatHex:ln,formatHex8:vi,formatHsl:wi,formatRgb:fn,toString:fn});function ln(){return this.rgb().formatHex()}function vi(){return this.rgb().formatHex8()}function wi(){return or(this).formatHsl()}function fn(){return this.rgb().formatRgb()}function Re(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=hi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?cn(t):n===3?new z(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ze(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ze(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=pi.exec(e))?new z(t[1],t[2],t[3],1):(t=gi.exec(e))?new z(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=di.exec(e))?ze(t[1],t[2],t[3],t[4]):(t=mi.exec(e))?ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yi.exec(e))?gn(t[1],t[2]/100,t[3]/100,1):(t=xi.exec(e))?gn(t[1],t[2]/100,t[3]/100,t[4]):sn.hasOwnProperty(e)?cn(sn[e]):e==="transparent"?new z(NaN,NaN,NaN,0):null}function cn(e){return new z(e>>16&255,e>>8&255,e&255,1)}function ze(e,t,n,r){return r<=0&&(e=t=n=NaN),new z(e,t,n,r)}function Zt(e){return e instanceof pe||(e=Re(e)),e?(e=e.rgb(),new z(e.r,e.g,e.b,e.opacity)):new z}function It(e,t,n,r){return arguments.length===1?Zt(e):new z(e,t,n,r??1)}function z(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pe(z,It,He(pe,{brighter(e){return e=e==null?Se:Math.pow(Se,e),new z(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?we:Math.pow(we,e),new z(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new z(xe(this.r),xe(this.g),xe(this.b),Ge(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hn,formatHex:hn,formatHex8:bi,formatRgb:pn,toString:pn}));function hn(){return`#${ye(this.r)}${ye(this.g)}${ye(this.b)}`}function bi(){return`#${ye(this.r)}${ye(this.g)}${ye(this.b)}${ye((isNaN(this.opacity)?1:this.opacity)*255)}`}function pn(){const e=Ge(this.opacity);return`${e===1?"rgb(":"rgba("}${xe(this.r)}, ${xe(this.g)}, ${xe(this.b)}${e===1?")":`, ${e})`}`}function Ge(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ye(e){return e=xe(e),(e<16?"0":"")+e.toString(16)}function gn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ne(e,t,n,r)}function or(e){if(e instanceof ne)return new ne(e.h,e.s,e.l,e.opacity);if(e instanceof pe||(e=Re(e)),!e)return new ne;if(e instanceof ne)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(t===o?a=(n-r)/u+(n<r)*6:n===o?a=(r-t)/u+2:a=(t-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new ne(a,u,s,e.opacity)}function Ht(e,t,n,r){return arguments.length===1?or(e):new ne(e,t,n,r??1)}function ne(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pe(ne,Ht,He(pe,{brighter(e){return e=e==null?Se:Math.pow(Se,e),new ne(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?we:Math.pow(we,e),new ne(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new z(ct(e>=240?e-240:e+120,i,r),ct(e,i,r),ct(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ne(dn(this.h),We(this.s),We(this.l),Ge(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ge(this.opacity);return`${e===1?"hsl(":"hsla("}${dn(this.h)}, ${We(this.s)*100}%, ${We(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dn(e){return e=(e||0)%360,e<0?e+360:e}function We(e){return Math.max(0,Math.min(1,e||0))}function ct(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ar=Math.PI/180,ur=180/Math.PI,Xe=18,sr=.96422,lr=1,fr=.82521,cr=4/29,Ne=6/29,hr=3*Ne*Ne,Mi=Ne*Ne*Ne;function pr(e){if(e instanceof ie)return new ie(e.l,e.a,e.b,e.opacity);if(e instanceof ue)return gr(e);e instanceof z||(e=Zt(e));var t=dt(e.r),n=dt(e.g),r=dt(e.b),i=ht((.2225045*t+.7168786*n+.0606169*r)/lr),o,a;return t===n&&n===r?o=a=i:(o=ht((.4360747*t+.3850649*n+.1430804*r)/sr),a=ht((.0139322*t+.0971045*n+.7141733*r)/fr)),new ie(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Yt(e,t,n,r){return arguments.length===1?pr(e):new ie(e,t,n,r??1)}function ie(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Pe(ie,Yt,He(pe,{brighter(e){return new ie(this.l+Xe*(e??1),this.a,this.b,this.opacity)},darker(e){return new ie(this.l-Xe*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=sr*pt(t),e=lr*pt(e),n=fr*pt(n),new z(gt(3.1338561*t-1.6168667*e-.4906146*n),gt(-.9787684*t+1.9161415*e+.033454*n),gt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function ht(e){return e>Mi?Math.pow(e,1/3):e/hr+cr}function pt(e){return e>Ne?e*e*e:hr*(e-cr)}function gt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ki(e){if(e instanceof ue)return new ue(e.h,e.c,e.l,e.opacity);if(e instanceof ie||(e=pr(e)),e.a===0&&e.b===0)return new ue(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ur;return new ue(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function zt(e,t,n,r){return arguments.length===1?ki(e):new ue(e,t,n,r??1)}function ue(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function gr(e){if(isNaN(e.h))return new ie(e.l,0,0,e.opacity);var t=e.h*ar;return new ie(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Pe(ue,zt,He(pe,{brighter(e){return new ue(this.h,this.c,this.l+Xe*(e??1),this.opacity)},darker(e){return new ue(this.h,this.c,this.l-Xe*(e??1),this.opacity)},rgb(){return gr(this).rgb()}}));var dr=-.14861,Qt=1.78277,Jt=-.29227,it=-.90649,Fe=1.97294,mn=Fe*it,yn=Fe*Qt,xn=Qt*Jt-it*dr;function Ci(e){if(e instanceof ve)return new ve(e.h,e.s,e.l,e.opacity);e instanceof z||(e=Zt(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(xn*r+mn*t-yn*n)/(xn+mn-yn),o=r-i,a=(Fe*(n-i)-Jt*o)/it,u=Math.sqrt(a*a+o*o)/(Fe*i*(1-i)),s=u?Math.atan2(a,o)*ur-120:NaN;return new ve(s<0?s+360:s,u,i,e.opacity)}function Wt(e,t,n,r){return arguments.length===1?Ci(e):new ve(e,t,n,r??1)}function ve(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pe(ve,Wt,He(pe,{brighter(e){return e=e==null?Se:Math.pow(Se,e),new ve(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?we:Math.pow(we,e),new ve(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ar,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new z(255*(t+n*(dr*r+Qt*i)),255*(t+n*(Jt*r+it*i)),255*(t+n*(Fe*r)),this.opacity)}}));const ot=e=>()=>e;function mr(e,t){return function(n){return e+n*t}}function Ti(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Kt(e,t){var n=t-e;return n?mr(e,n>180||n<-180?n-360*Math.round(n/360):n):ot(isNaN(e)?t:e)}function Ni(e){return(e=+e)==1?W:function(t,n){return n-t?Ti(t,n,e):ot(isNaN(t)?n:t)}}function W(e,t){var n=t-e;return n?mr(e,n):ot(isNaN(e)?t:e)}const jt=(function e(t){var n=Ni(t);function r(i,o){var a=n((i=It(i)).r,(o=It(o)).r),u=n(i.g,o.g),s=n(i.b,o.b),l=W(i.opacity,o.opacity);return function(h){return i.r=a(h),i.g=u(h),i.b=s(h),i.opacity=l(h),i+""}}return r.gamma=e,r})(1);function Si(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function _i(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $i(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=en(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(u){for(a=0;a<r;++a)o[a]=i[a](u);return o}}function Ei(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ze(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Pi(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=en(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var qt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mt=new RegExp(qt.source,"g");function Di(e){return function(){return e}}function Ai(e){return function(t){return e(t)+""}}function Li(e,t){var n=qt.lastIndex=mt.lastIndex=0,r,i,o,a=-1,u=[],s=[];for(e=e+"",t=t+"";(r=qt.exec(e))&&(i=mt.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),u[a]?u[a]+=o:u[++a]=o),(r=r[0])===(i=i[0])?u[a]?u[a]+=i:u[++a]=i:(u[++a]=null,s.push({i:a,x:Ze(r,i)})),n=mt.lastIndex;return n<t.length&&(o=t.slice(n),u[a]?u[a]+=o:u[++a]=o),u.length<2?s[0]?Ai(s[0].x):Di(t):(t=s.length,function(l){for(var h=0,f;h<t;++h)u[(f=s[h]).i]=f.x(l);return u.join("")})}function en(e,t){var n=typeof t,r;return t==null||n==="boolean"?ot(t):(n==="number"?Ze:n==="string"?(r=Re(t))?(t=r,jt):Li:t instanceof Re?jt:t instanceof Date?Ei:_i(t)?Si:Array.isArray(t)?$i:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Pi:Ze)(e,t)}function yr(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function xr(e){return function(t,n){var r=e((t=Ht(t)).h,(n=Ht(n)).h),i=W(t.s,n.s),o=W(t.l,n.l),a=W(t.opacity,n.opacity);return function(u){return t.h=r(u),t.s=i(u),t.l=o(u),t.opacity=a(u),t+""}}}const Ui=xr(Kt);var Oi=xr(W);function Ri(e,t){var n=W((e=Yt(e)).l,(t=Yt(t)).l),r=W(e.a,t.a),i=W(e.b,t.b),o=W(e.opacity,t.opacity);return function(a){return e.l=n(a),e.a=r(a),e.b=i(a),e.opacity=o(a),e+""}}function vr(e){return function(t,n){var r=e((t=zt(t)).h,(n=zt(n)).h),i=W(t.c,n.c),o=W(t.l,n.l),a=W(t.opacity,n.opacity);return function(u){return t.h=r(u),t.c=i(u),t.l=o(u),t.opacity=a(u),t+""}}}const Fi=vr(Kt);var Ii=vr(W);function wr(e){return(function t(n){n=+n;function r(i,o){var a=e((i=Wt(i)).h,(o=Wt(o)).h),u=W(i.s,o.s),s=W(i.l,o.l),l=W(i.opacity,o.opacity);return function(h){return i.h=a(h),i.s=u(h),i.l=s(Math.pow(h,n)),i.opacity=l(h),i+""}}return r.gamma=t,r})(1)}const Hi=wr(Kt);var Yi=wr(W);function zi(e){return function(){return e}}function Wi(e){return+e}var vn=[0,1];function Ce(e){return e}function Vt(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:zi(isNaN(t)?NaN:.5)}function ji(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function qi(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Vt(i,r),o=n(a,o)):(r=Vt(r,i),o=n(o,a)),function(u){return o(r(u))}}function Vi(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Vt(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(u){var s=ui(e,u,1,r)-1;return o[s](i[s](u))}}function br(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Bi(){var e=vn,t=vn,n=en,r,i,o,a=Ce,u,s,l;function h(){var c=Math.min(e.length,t.length);return a!==Ce&&(a=ji(e[0],e[c-1])),u=c>2?Vi:qi,s=l=null,f}function f(c){return c==null||isNaN(c=+c)?o:(s||(s=u(e.map(r),t,n)))(r(a(c)))}return f.invert=function(c){return a(i((l||(l=u(t,e.map(r),Ze)))(c)))},f.domain=function(c){return arguments.length?(e=Array.from(c,Wi),h()):e.slice()},f.range=function(c){return arguments.length?(t=Array.from(c),h()):t.slice()},f.rangeRound=function(c){return t=Array.from(c),n=yr,h()},f.clamp=function(c){return arguments.length?(a=c?!0:Ce,h()):a!==Ce},f.interpolate=function(c){return arguments.length?(n=c,h()):n},f.unknown=function(c){return arguments.length?(o=c,f):o},function(c,x){return r=c,i=x,h()}}function Mr(){return Bi()(Ce,Ce)}function Gi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Qe(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function _e(e){return e=Qe(Math.abs(e)),e?e[1]:NaN}function Xi(e,t){return function(n,r){for(var i=n.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(t)}}function Zi(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Qi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Je(e){if(!(t=Qi.exec(e)))throw new Error("invalid format: "+e);var t;return new tn({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Je.prototype=tn.prototype;function tn(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}tn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Ji(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Ke;function Ki(e,t){var n=Qe(e,t);if(!n)return Ke=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Ke=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Qe(e,Math.max(0,t+o-1))[0]}function wn(e,t){var n=Qe(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const bn={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Gi,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wn(e*100,t),r:wn,s:Ki,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Mn(e){return e}var kn=Array.prototype.map,Cn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function eo(e){var t=e.grouping===void 0||e.thousands===void 0?Mn:Xi(kn.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Mn:Zi(kn.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",u=e.minus===void 0?"−":e.minus+"",s=e.nan===void 0?"NaN":e.nan+"";function l(f,c){f=Je(f);var x=f.fill,b=f.align,v=f.sign,k=f.symbol,N=f.zero,g=f.width,d=f.comma,p=f.precision,M=f.trim,m=f.type;m==="n"?(d=!0,m="g"):bn[m]||(p===void 0&&(p=12),M=!0,m="g"),(N||x==="0"&&b==="=")&&(N=!0,x="0",b="=");var C=(c&&c.prefix!==void 0?c.prefix:"")+(k==="$"?n:k==="#"&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),U=(k==="$"?r:/[%p]/.test(m)?a:"")+(c&&c.suffix!==void 0?c.suffix:""),O=bn[m],K=/[defgprs%]/.test(m);p=p===void 0?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p));function F(T){var D=C,_=U,H,L,Z;if(m==="c")_=O(T)+_,T="";else{T=+T;var ae=T<0||1/T<0;if(T=isNaN(T)?s:O(Math.abs(T),p),M&&(T=Ji(T)),ae&&+T==0&&v!=="+"&&(ae=!1),D=(ae?v==="("?v:u:v==="-"||v==="("?"":v)+D,_=(m==="s"&&!isNaN(T)&&Ke!==void 0?Cn[8+Ke/3]:"")+_+(ae&&v==="("?")":""),K){for(H=-1,L=T.length;++H<L;)if(Z=T.charCodeAt(H),48>Z||Z>57){_=(Z===46?i+T.slice(H+1):T.slice(H))+_,T=T.slice(0,H);break}}}d&&!N&&(T=t(T,1/0));var ee=D.length+T.length+_.length,$=ee<g?new Array(g-ee+1).join(x):"";switch(d&&N&&(T=t($+T,$.length?g-_.length:1/0),$=""),b){case"<":T=D+T+_+$;break;case"=":T=D+$+T+_;break;case"^":T=$.slice(0,ee=$.length>>1)+D+T+_+$.slice(ee);break;default:T=$+D+T+_;break}return o(T)}return F.toString=function(){return f+""},F}function h(f,c){var x=Math.max(-8,Math.min(8,Math.floor(_e(c)/3)))*3,b=Math.pow(10,-x),v=l((f=Je(f),f.type="f",f),{suffix:Cn[8+x/3]});return function(k){return v(b*k)}}return{format:l,formatPrefix:h}}var je,kr,Cr;to({thousands:",",grouping:[3],currency:["$",""]});function to(e){return je=eo(e),kr=je.format,Cr=je.formatPrefix,je}function no(e){return Math.max(0,-_e(Math.abs(e)))}function ro(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_e(t)/3)))*3-_e(Math.abs(e)))}function io(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_e(t)-_e(e))+1}function oo(e,t,n,r){var i=Ft(e,t,n),o;switch(r=Je(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=ro(i,a))&&(r.precision=o),Cr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=io(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=no(i))&&(r.precision=o-(r.type==="%")*2);break}}return kr(r)}function ao(e){var t=e.domain;return e.ticks=function(n){var r=t();return ci(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return oo(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],u=r[o],s,l,h=10;for(u<a&&(l=a,a=u,u=l,l=i,i=o,o=l);h-- >0;){if(l=Rt(a,u,n),l===s)return r[i]=a,r[o]=u,t(r);if(l>0)a=Math.floor(a/l)*l,u=Math.ceil(u/l)*l;else if(l<0)a=Math.ceil(a*l)/l,u=Math.floor(u*l)/l;else break;s=l}return e},e}function Tr(){var e=Mr();return e.copy=function(){return br(e,Tr())},ir.apply(e,arguments),ao(e)}function uo(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}const yt=new Date,xt=new Date;function I(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),u=i.ceil(o);return o-a<u-o?a:u},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,u)=>{const s=[];if(o=i.ceil(o),u=u==null?1:Math.floor(u),!(o<a)||!(u>0))return s;let l;do s.push(l=new Date(+o)),t(o,u),e(o);while(l<o&&o<a);return s},i.filter=o=>I(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,u)=>{if(a>=a)if(u<0)for(;++u<=0;)for(;t(a,-1),!o(a););else for(;--u>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(yt.setTime(+o),xt.setTime(+a),e(yt),e(xt),Math.floor(n(yt,xt))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const et=I(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);et.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?I(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):et);et.range;const se=1e3,Q=se*60,le=Q*60,fe=le*24,nn=fe*7,Tn=fe*30,vt=fe*365,ce=I(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*se)},(e,t)=>(t-e)/se,e=>e.getUTCSeconds());ce.range;const at=I(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*se)},(e,t)=>{e.setTime(+e+t*Q)},(e,t)=>(t-e)/Q,e=>e.getMinutes());at.range;const Nr=I(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Q)},(e,t)=>(t-e)/Q,e=>e.getUTCMinutes());Nr.range;const ut=I(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*se-e.getMinutes()*Q)},(e,t)=>{e.setTime(+e+t*le)},(e,t)=>(t-e)/le,e=>e.getHours());ut.range;const Sr=I(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*le)},(e,t)=>(t-e)/le,e=>e.getUTCHours());Sr.range;const De=I(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Q)/fe,e=>e.getDate()-1);De.range;const st=I(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fe,e=>e.getUTCDate()-1);st.range;const so=I(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fe,e=>Math.floor(e/fe));so.range;function be(e){return I(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Q)/nn)}const Ye=be(0),tt=be(1),lo=be(2),fo=be(3),$e=be(4),co=be(5),ho=be(6);Ye.range;tt.range;lo.range;fo.range;$e.range;co.range;ho.range;function Me(e){return I(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/nn)}const rn=Me(0),nt=Me(1),po=Me(2),go=Me(3),Ee=Me(4),mo=Me(5),yo=Me(6);rn.range;nt.range;po.range;go.range;Ee.range;mo.range;yo.range;const lt=I(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lt.range;const _r=I(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());_r.range;const oe=I(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());oe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:I(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});oe.range;const he=I(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());he.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:I(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});he.range;function xo(e,t,n,r,i,o){const a=[[ce,1,se],[ce,5,5*se],[ce,15,15*se],[ce,30,30*se],[o,1,Q],[o,5,5*Q],[o,15,15*Q],[o,30,30*Q],[i,1,le],[i,3,3*le],[i,6,6*le],[i,12,12*le],[r,1,fe],[r,2,2*fe],[n,1,nn],[t,1,Tn],[t,3,3*Tn],[e,1,vt]];function u(l,h,f){const c=h<l;c&&([l,h]=[h,l]);const x=f&&typeof f.range=="function"?f:s(l,h,f),b=x?x.range(l,+h+1):[];return c?b.reverse():b}function s(l,h,f){const c=Math.abs(h-l)/f,x=Xt(([,,k])=>k).right(a,c);if(x===a.length)return e.every(Ft(l/vt,h/vt,f));if(x===0)return et.every(Math.max(Ft(l,h,f),1));const[b,v]=a[c/a[x-1][2]<a[x][2]/c?x-1:x];return b.every(v)}return[u,s]}const[vo,wo]=xo(oe,lt,Ye,De,ut,at);function wt(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bt(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ae(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function bo(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,u=e.months,s=e.shortMonths,l=Le(i),h=Ue(i),f=Le(o),c=Ue(o),x=Le(a),b=Ue(a),v=Le(u),k=Ue(u),N=Le(s),g=Ue(s),d={a:Z,A:ae,b:ee,B:$,c:null,d:Pn,e:Pn,f:jo,g:ea,G:na,H:Yo,I:zo,j:Wo,L:$r,m:qo,M:Vo,p:ge,q:Gr,Q:Ln,s:Un,S:Bo,u:Go,U:Xo,V:Zo,w:Qo,W:Jo,x:null,X:null,y:Ko,Y:ta,Z:ra,"%":An},p={a:Xr,A:Zr,b:Qr,B:Jr,c:null,d:Dn,e:Dn,f:ua,g:ya,G:va,H:ia,I:oa,j:aa,L:Pr,m:sa,M:la,p:Kr,q:ei,Q:Ln,s:Un,S:fa,u:ca,U:ha,V:pa,w:ga,W:da,x:null,X:null,y:ma,Y:xa,Z:wa,"%":An},M={a:K,A:F,b:T,B:D,c:_,d:$n,e:$n,f:Ro,g:_n,G:Sn,H:En,I:En,j:Ao,L:Oo,m:Do,M:Lo,p:O,q:Po,Q:Io,s:Ho,S:Uo,u:No,U:So,V:_o,w:To,W:$o,x:H,X:L,y:_n,Y:Sn,Z:Eo,"%":Fo};d.x=m(n,d),d.X=m(r,d),d.c=m(t,d),p.x=m(n,p),p.X=m(r,p),p.c=m(t,p);function m(w,S){return function(E){var y=[],q=-1,R=0,V=w.length,B,de,un;for(E instanceof Date||(E=new Date(+E));++q<V;)w.charCodeAt(q)===37&&(y.push(w.slice(R,q)),(de=Nn[B=w.charAt(++q)])!=null?B=w.charAt(++q):de=B==="e"?" ":"0",(un=S[B])&&(B=un(E,de)),y.push(B),R=q+1);return y.push(w.slice(R,q)),y.join("")}}function C(w,S){return function(E){var y=Ae(1900,void 0,1),q=U(y,w,E+="",0),R,V;if(q!=E.length)return null;if("Q"in y)return new Date(y.Q);if("s"in y)return new Date(y.s*1e3+("L"in y?y.L:0));if(S&&!("Z"in y)&&(y.Z=0),"p"in y&&(y.H=y.H%12+y.p*12),y.m===void 0&&(y.m="q"in y?y.q:0),"V"in y){if(y.V<1||y.V>53)return null;"w"in y||(y.w=1),"Z"in y?(R=bt(Ae(y.y,0,1)),V=R.getUTCDay(),R=V>4||V===0?nt.ceil(R):nt(R),R=st.offset(R,(y.V-1)*7),y.y=R.getUTCFullYear(),y.m=R.getUTCMonth(),y.d=R.getUTCDate()+(y.w+6)%7):(R=wt(Ae(y.y,0,1)),V=R.getDay(),R=V>4||V===0?tt.ceil(R):tt(R),R=De.offset(R,(y.V-1)*7),y.y=R.getFullYear(),y.m=R.getMonth(),y.d=R.getDate()+(y.w+6)%7)}else("W"in y||"U"in y)&&("w"in y||(y.w="u"in y?y.u%7:"W"in y?1:0),V="Z"in y?bt(Ae(y.y,0,1)).getUTCDay():wt(Ae(y.y,0,1)).getDay(),y.m=0,y.d="W"in y?(y.w+6)%7+y.W*7-(V+5)%7:y.w+y.U*7-(V+6)%7);return"Z"in y?(y.H+=y.Z/100|0,y.M+=y.Z%100,bt(y)):wt(y)}}function U(w,S,E,y){for(var q=0,R=S.length,V=E.length,B,de;q<R;){if(y>=V)return-1;if(B=S.charCodeAt(q++),B===37){if(B=S.charAt(q++),de=M[B in Nn?S.charAt(q++):B],!de||(y=de(w,E,y))<0)return-1}else if(B!=E.charCodeAt(y++))return-1}return y}function O(w,S,E){var y=l.exec(S.slice(E));return y?(w.p=h.get(y[0].toLowerCase()),E+y[0].length):-1}function K(w,S,E){var y=x.exec(S.slice(E));return y?(w.w=b.get(y[0].toLowerCase()),E+y[0].length):-1}function F(w,S,E){var y=f.exec(S.slice(E));return y?(w.w=c.get(y[0].toLowerCase()),E+y[0].length):-1}function T(w,S,E){var y=N.exec(S.slice(E));return y?(w.m=g.get(y[0].toLowerCase()),E+y[0].length):-1}function D(w,S,E){var y=v.exec(S.slice(E));return y?(w.m=k.get(y[0].toLowerCase()),E+y[0].length):-1}function _(w,S,E){return U(w,t,S,E)}function H(w,S,E){return U(w,n,S,E)}function L(w,S,E){return U(w,r,S,E)}function Z(w){return a[w.getDay()]}function ae(w){return o[w.getDay()]}function ee(w){return s[w.getMonth()]}function $(w){return u[w.getMonth()]}function ge(w){return i[+(w.getHours()>=12)]}function Gr(w){return 1+~~(w.getMonth()/3)}function Xr(w){return a[w.getUTCDay()]}function Zr(w){return o[w.getUTCDay()]}function Qr(w){return s[w.getUTCMonth()]}function Jr(w){return u[w.getUTCMonth()]}function Kr(w){return i[+(w.getUTCHours()>=12)]}function ei(w){return 1+~~(w.getUTCMonth()/3)}return{format:function(w){var S=m(w+="",d);return S.toString=function(){return w},S},parse:function(w){var S=C(w+="",!1);return S.toString=function(){return w},S},utcFormat:function(w){var S=m(w+="",p);return S.toString=function(){return w},S},utcParse:function(w){var S=C(w+="",!0);return S.toString=function(){return w},S}}}var Nn={"-":"",_:" ",0:"0"},j=/^\s*\d+/,Mo=/^%/,ko=/[\\^$*+?|[\]().{}]/g;function P(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Co(e){return e.replace(ko,"\\$&")}function Le(e){return new RegExp("^(?:"+e.map(Co).join("|")+")","i")}function Ue(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function To(e,t,n){var r=j.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function No(e,t,n){var r=j.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function So(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function _o(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $o(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Sn(e,t,n){var r=j.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function _n(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Eo(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Po(e,t,n){var r=j.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Do(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $n(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ao(e,t,n){var r=j.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function En(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Uo(e,t,n){var r=j.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Oo(e,t,n){var r=j.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ro(e,t,n){var r=j.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Fo(e,t,n){var r=Mo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Io(e,t,n){var r=j.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=j.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Pn(e,t){return P(e.getDate(),t,2)}function Yo(e,t){return P(e.getHours(),t,2)}function zo(e,t){return P(e.getHours()%12||12,t,2)}function Wo(e,t){return P(1+De.count(oe(e),e),t,3)}function $r(e,t){return P(e.getMilliseconds(),t,3)}function jo(e,t){return $r(e,t)+"000"}function qo(e,t){return P(e.getMonth()+1,t,2)}function Vo(e,t){return P(e.getMinutes(),t,2)}function Bo(e,t){return P(e.getSeconds(),t,2)}function Go(e){var t=e.getDay();return t===0?7:t}function Xo(e,t){return P(Ye.count(oe(e)-1,e),t,2)}function Er(e){var t=e.getDay();return t>=4||t===0?$e(e):$e.ceil(e)}function Zo(e,t){return e=Er(e),P($e.count(oe(e),e)+(oe(e).getDay()===4),t,2)}function Qo(e){return e.getDay()}function Jo(e,t){return P(tt.count(oe(e)-1,e),t,2)}function Ko(e,t){return P(e.getFullYear()%100,t,2)}function ea(e,t){return e=Er(e),P(e.getFullYear()%100,t,2)}function ta(e,t){return P(e.getFullYear()%1e4,t,4)}function na(e,t){var n=e.getDay();return e=n>=4||n===0?$e(e):$e.ceil(e),P(e.getFullYear()%1e4,t,4)}function ra(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+P(t/60|0,"0",2)+P(t%60,"0",2)}function Dn(e,t){return P(e.getUTCDate(),t,2)}function ia(e,t){return P(e.getUTCHours(),t,2)}function oa(e,t){return P(e.getUTCHours()%12||12,t,2)}function aa(e,t){return P(1+st.count(he(e),e),t,3)}function Pr(e,t){return P(e.getUTCMilliseconds(),t,3)}function ua(e,t){return Pr(e,t)+"000"}function sa(e,t){return P(e.getUTCMonth()+1,t,2)}function la(e,t){return P(e.getUTCMinutes(),t,2)}function fa(e,t){return P(e.getUTCSeconds(),t,2)}function ca(e){var t=e.getUTCDay();return t===0?7:t}function ha(e,t){return P(rn.count(he(e)-1,e),t,2)}function Dr(e){var t=e.getUTCDay();return t>=4||t===0?Ee(e):Ee.ceil(e)}function pa(e,t){return e=Dr(e),P(Ee.count(he(e),e)+(he(e).getUTCDay()===4),t,2)}function ga(e){return e.getUTCDay()}function da(e,t){return P(nt.count(he(e)-1,e),t,2)}function ma(e,t){return P(e.getUTCFullYear()%100,t,2)}function ya(e,t){return e=Dr(e),P(e.getUTCFullYear()%100,t,2)}function xa(e,t){return P(e.getUTCFullYear()%1e4,t,4)}function va(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Ee(e):Ee.ceil(e),P(e.getUTCFullYear()%1e4,t,4)}function wa(){return"+0000"}function An(){return"%"}function Ln(e){return+e}function Un(e){return Math.floor(+e/1e3)}var ke,Ar;ba({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ba(e){return ke=bo(e),Ar=ke.format,ke.parse,ke.utcFormat,ke.utcParse,ke}function Ma(e){return new Date(e)}function ka(e){return e instanceof Date?+e:+new Date(+e)}function Lr(e,t,n,r,i,o,a,u,s,l){var h=Mr(),f=h.invert,c=h.domain,x=l(".%L"),b=l(":%S"),v=l("%I:%M"),k=l("%I %p"),N=l("%a %d"),g=l("%b %d"),d=l("%B"),p=l("%Y");function M(m){return(s(m)<m?x:u(m)<m?b:a(m)<m?v:o(m)<m?k:r(m)<m?i(m)<m?N:g:n(m)<m?d:p)(m)}return h.invert=function(m){return new Date(f(m))},h.domain=function(m){return arguments.length?c(Array.from(m,ka)):c().map(Ma)},h.ticks=function(m){var C=c();return e(C[0],C[C.length-1],m??10)},h.tickFormat=function(m,C){return C==null?M:l(C)},h.nice=function(m){var C=c();return(!m||typeof m.range!="function")&&(m=t(C[0],C[C.length-1],m??10)),m?c(uo(C,m)):h},h.copy=function(){return br(h,Lr(e,t,n,r,i,o,a,u,s,l))},h}function Ca(){return ir.apply(Lr(vo,wo,oe,lt,Ye,De,ut,at,ce,Ar).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ta(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function Na(e,t){t.range&&("padding"in e,e.range(t.range))}function Sa(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function _a(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function $a(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function Ea(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function Pa(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const On={lab:Ri,hcl:Fi,"hcl-long":Ii,hsl:Ui,"hsl-long":Oi,cubehelix:Hi,"cubehelix-long":Yi,rgb:jt};function Da(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return On[e]}const{type:t,gamma:n}=e,r=On[t];return typeof n>"u"?r:r.gamma(n)}function Aa(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){const n=Da(t.interpolate);e.interpolate(n)}}const La=new Date(Date.UTC(2020,1,2,3,4,5)),Ua="%Y-%m-%d %H:%M";function Oa(e){return e.tickFormat(1,Ua)(La)==="2020-02-02 03:04"}const Rn={day:De,hour:ut,minute:at,month:lt,second:ce,week:Ye,year:oe},Fn={day:st,hour:Sr,minute:Nr,month:_r,second:ce,week:rn,year:he};function Ra(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){const{nice:n}=t;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{const r=e,i=Oa(r);if(typeof n=="string")r.nice(i?Fn[n]:Rn[n]);else{const{interval:o,step:a}=n,u=(i?Fn[o]:Rn[o]).every(a);u!=null&&r.nice(u)}}}}function Fa(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function Ia(e,t){if(t.reverse){const n=e.range().slice().reverse();"padding"in e,e.range(n)}}function Ha(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(yr))}function Ya(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function za(e,t){if("zero"in t&&t.zero===!0){const n=e.domain(),[r,i]=n,o=i<r,[a,u]=o?[i,r]:[r,i],s=[Math.min(0,a),Math.max(0,u)];e.domain(o?s.reverse():s)}}const Wa=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],ja={domain:Ta,nice:Ra,zero:za,interpolate:Aa,round:Ha,align:Sa,base:_a,clamp:$a,constant:Ea,exponent:Pa,padding:Fa,range:Na,reverse:Ia,unknown:Ya};function Ur(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=new Set(t),i=Wa.filter(o=>r.has(o));return function(a,u){return typeof u<"u"&&i.forEach(s=>{ja[s](a,u)}),a}}const qa=Ur("domain","range","reverse","clamp","interpolate","nice","round","zero");function Hu(e){return qa(Tr(),e)}const Va=Ur("domain","range","reverse","clamp","interpolate","nice","round");function Yu(e){return Va(Ca(),e)}function Or(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){const t=e.valueOf();if(typeof t=="number")return t}return e}function Rr(e,t){const n=e;return"ticks"in n?n.ticks(t):n.domain().filter((r,i,o)=>t==null||o.length<=t||i%Math.round((o.length-1)/t)===0)}function Ba(e){return e==null?void 0:e.toString()}var Mt={exports:{}};/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/var In;function Ga(){return In||(In=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a<arguments.length;a++){var u=arguments[a];u&&(o=i(o,r(u)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var u in o)t.call(o,u)&&o[u]&&(a=i(a,u));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Mt)),Mt.exports}var Xa=Ga();const J=rr(Xa);function Y(e){return function(){return e}}const Bt=Math.PI,Gt=2*Bt,me=1e-6,Za=Gt-me;function Fr(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Qa(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Fr;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Ja{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Fr:Qa(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,u=this._y1,s=r-t,l=i-n,h=a-t,f=u-n,c=h*h+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(c>me)if(!(Math.abs(f*s-l*h)>me)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let x=r-a,b=i-u,v=s*s+l*l,k=x*x+b*b,N=Math.sqrt(v),g=Math.sqrt(c),d=o*Math.tan((Bt-Math.acos((v+c-k)/(2*N*g)))/2),p=d/g,M=d/N;Math.abs(p-1)>me&&this._append`L${t+p*h},${n+p*f}`,this._append`A${o},${o},0,0,${+(f*x>h*b)},${this._x1=t+M*s},${this._y1=n+M*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let u=r*Math.cos(i),s=r*Math.sin(i),l=t+u,h=n+s,f=1^a,c=a?i-o:o-i;this._x1===null?this._append`M${l},${h}`:(Math.abs(this._x1-l)>me||Math.abs(this._y1-h)>me)&&this._append`L${l},${h}`,r&&(c<0&&(c=c%Gt+Gt),c>Za?this._append`A${r},${r},0,1,${f},${t-u},${n-s}A${r},${r},0,1,${f},${this._x1=l},${this._y1=h}`:c>me&&this._append`A${r},${r},0,${+(c>=Bt)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Ir(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Ja(t)}function Hr(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Yr(e){this._context=e}Yr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zr(e){return new Yr(e)}function Wr(e){return e[0]}function jr(e){return e[1]}function qr(e,t){var n=Y(!0),r=null,i=zr,o=null,a=Ir(u);e=typeof e=="function"?e:e===void 0?Wr:Y(e),t=typeof t=="function"?t:t===void 0?jr:Y(t);function u(s){var l,h=(s=Hr(s)).length,f,c=!1,x;for(r==null&&(o=i(x=a())),l=0;l<=h;++l)!(l<h&&n(f=s[l],l,s))===c&&((c=!c)?o.lineStart():o.lineEnd()),c&&o.point(+e(f,l,s),+t(f,l,s));if(x)return o=null,x+""||null}return u.x=function(s){return arguments.length?(e=typeof s=="function"?s:Y(+s),u):e},u.y=function(s){return arguments.length?(t=typeof s=="function"?s:Y(+s),u):t},u.defined=function(s){return arguments.length?(n=typeof s=="function"?s:Y(!!s),u):n},u.curve=function(s){return arguments.length?(i=s,r!=null&&(o=i(r)),u):i},u.context=function(s){return arguments.length?(s==null?r=o=null:o=i(r=s),u):r},u}function Ka(e,t,n){var r=null,i=Y(!0),o=null,a=zr,u=null,s=Ir(l);e=typeof e=="function"?e:e===void 0?Wr:Y(+e),t=typeof t=="function"?t:Y(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?jr:Y(+n);function l(f){var c,x,b,v=(f=Hr(f)).length,k,N=!1,g,d=new Array(v),p=new Array(v);for(o==null&&(u=a(g=s())),c=0;c<=v;++c){if(!(c<v&&i(k=f[c],c,f))===N)if(N=!N)x=c,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),b=c-1;b>=x;--b)u.point(d[b],p[b]);u.lineEnd(),u.areaEnd()}N&&(d[c]=+e(k,c,f),p[c]=+t(k,c,f),u.point(r?+r(k,c,f):d[c],n?+n(k,c,f):p[c]))}if(g)return u=null,g+""||null}function h(){return qr().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Y(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Y(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Y(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Y(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Y(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Y(+f),l):n},l.lineX0=l.lineY0=function(){return h().x(e).y(t)},l.lineY1=function(){return h().x(e).y(n)},l.lineX1=function(){return h().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Y(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(u=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=u=null:u=a(o=f),l):o},l}function Hn(e){return e<0?-1:1}function Yn(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Hn(o)+Hn(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function zn(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function kt(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,u=(o-r)/3;e._context.bezierCurveTo(r+u,i+u*t,o-u,a-u*n,o,a)}function rt(e){this._context=e}rt.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:kt(this,this._t0,zn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,kt(this,zn(this,n=Yn(this,e,t)),n);break;default:kt(this,this._t0,n=Yn(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};Object.create(rt.prototype).point=function(e,t){rt.prototype.point.call(this,t,e)};function zu(e){return new rt(e)}function te(e,t){e(t)}function eu(){let{x:e,x0:t,x1:n,y:r,y0:i,y1:o,defined:a,curve:u}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const s=Ka();return e&&te(s.x,e),t&&te(s.x0,t),n&&te(s.x1,n),r&&te(s.y,r),i&&te(s.y0,i),o&&te(s.y1,o),a&&s.defined(a),u&&s.curve(u),s}function tu(){let{x:e,y:t,defined:n,curve:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const i=qr();return e&&te(i.x,e),t&&te(i.y,t),n&&i.defined(n),r&&i.curve(r),i}function on(e){let{top:t=0,left:n=0,transform:r,className:i,children:o,innerRef:a,...u}=e;return A.jsx("g",{ref:a,className:J("visx-group",i),transform:r||`translate(${n}, ${t})`,...u,children:o})}function an(e){let{from:t={x:0,y:0},to:n={x:1,y:1},fill:r="transparent",className:i,innerRef:o,...a}=e;const u=t.x===n.x||t.y===n.y;return A.jsx("line",{ref:o,className:J("visx-line",i),x1:t.x,y1:t.y,x2:n.x,y2:n.y,fill:r,shapeRendering:u?"crispEdges":"auto",...a})}function Wu(e){let{children:t,data:n=[],x:r,y:i,fill:o="transparent",className:a,curve:u,innerRef:s,defined:l=()=>!0,...h}=e;const f=tu({x:r,y:i,defined:l,curve:u});return t?A.jsx(A.Fragment,{children:t({path:f})}):A.jsx("path",{ref:s,className:J("visx-linepath",a),d:f(n)||"",fill:o,strokeLinecap:"round",...h})}function ju(e){let{x:t,x0:n,x1:r,y:i,y1:o,y0:a,yScale:u,data:s=[],defined:l=()=>!0,className:h,curve:f,innerRef:c,children:x,...b}=e;const v=eu({x:t,x0:n,x1:r,defined:l,curve:f});return a==null?v.y0(u.range()[0]):te(v.y0,a),i&&!o&&te(v.y1,i),o&&!i&&te(v.y1,o),x?A.jsx(A.Fragment,{children:x({path:v})}):A.jsx("path",{ref:c,className:J("visx-area-closed",h),d:v(s)||"",...b})}function qu(e){let{className:t,innerRef:n,...r}=e;return A.jsx("rect",{ref:n,className:J("visx-bar",t),...r})}var Ct,Wn;function nu(){if(Wn)return Ct;Wn=1,Ct=e;function e(r,i,o){r instanceof RegExp&&(r=t(r,o)),i instanceof RegExp&&(i=t(i,o));var a=n(r,i,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+r.length,a[1]),post:o.slice(a[1]+i.length)}}function t(r,i){var o=i.match(r);return o?o[0]:null}e.range=n;function n(r,i,o){var a,u,s,l,h,f=o.indexOf(r),c=o.indexOf(i,f+1),x=f;if(f>=0&&c>0){for(a=[],s=o.length;x>=0&&!h;)x==f?(a.push(x),f=o.indexOf(r,x+1)):a.length==1?h=[a.pop(),c]:(u=a.pop(),u<s&&(s=u,l=c),c=o.indexOf(i,x+1)),x=f<c&&f>=0?f:c;a.length&&(h=[s,l])}return h}return Ct}var Tt,jn;function ru(){if(jn)return Tt;jn=1,Tt=e;function e(r,i,o){r instanceof RegExp&&(r=t(r,o)),i instanceof RegExp&&(i=t(i,o));var a=n(r,i,o);return a&&{start:a[0],end:a[1],pre:o.slice(0,a[0]),body:o.slice(a[0]+r.length,a[1]),post:o.slice(a[1]+i.length)}}function t(r,i){var o=i.match(r);return o?o[0]:null}e.range=n;function n(r,i,o){var a,u,s,l,h,f=o.indexOf(r),c=o.indexOf(i,f+1),x=f;if(f>=0&&c>0){if(r===i)return[f,c];for(a=[],s=o.length;x>=0&&!h;)x==f?(a.push(x),f=o.indexOf(r,x+1)):a.length==1?h=[a.pop(),c]:(u=a.pop(),u<s&&(s=u,l=c),c=o.indexOf(i,x+1)),x=f<c&&f>=0?f:c;a.length&&(h=[s,l])}return h}return Tt}var Nt,qn;function iu(){if(qn)return Nt;qn=1;var e=ru();Nt=t;function t(i,o,a){var u=i;return n(i,o).reduce(function(s,l){return s.replace(l.functionIdentifier+"("+l.matches.body+")",r(l.matches.body,l.functionIdentifier,a,u,o))},i)}function n(i,o){var a=[],u=typeof o=="string"?new RegExp("\\b("+o+")\\("):o;do{var s=u.exec(i);if(!s)return a;if(s[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+o);var l=s[1],h=s.index,f=e("(",")",i.substring(h));if(!f||f.start!==s[0].length-1)throw new SyntaxError(l+"(): missing closing ')' in the value '"+i+"'");a.push({matches:f,functionIdentifier:l}),i=f.post}while(u.test(i));return a}function r(i,o,a,u,s){return a(t(i,s,a),o,u)}return Nt}var St,Vn;function ou(){if(Vn)return St;Vn=1;var e=function(t){this.value=t};return e.math={isDegree:!0,acos:function(t){return e.math.isDegree?180/Math.PI*Math.acos(t):Math.acos(t)},add:function(t,n){return t+n},asin:function(t){return e.math.isDegree?180/Math.PI*Math.asin(t):Math.asin(t)},atan:function(t){return e.math.isDegree?180/Math.PI*Math.atan(t):Math.atan(t)},acosh:function(t){return Math.log(t+Math.sqrt(t*t-1))},asinh:function(t){return Math.log(t+Math.sqrt(t*t+1))},atanh:function(t){return Math.log((1+t)/(1-t))},C:function(t,n){var r=1,i=t-n,o=n;o<i&&(o=i,i=n);for(var a=o+1;a<=t;a++)r*=a;return r/e.math.fact(i)},changeSign:function(t){return-t},cos:function(t){return e.math.isDegree&&(t=e.math.toRadian(t)),Math.cos(t)},cosh:function(t){return(Math.pow(Math.E,t)+Math.pow(Math.E,-1*t))/2},div:function(t,n){return t/n},fact:function(t){if(t%1!==0)return"NaN";for(var n=1,r=2;r<=t;r++)n*=r;return n},inverse:function(t){return 1/t},log:function(t){return Math.log(t)/Math.log(10)},mod:function(t,n){return t%n},mul:function(t,n){return t*n},P:function(t,n){for(var r=1,i=Math.floor(t)-Math.floor(n)+1;i<=Math.floor(t);i++)r*=i;return r},Pi:function(t,n,r){for(var i=1,o=t;o<=n;o++)i*=Number(r.postfixEval({n:o}));return i},pow10x:function(t){for(var n=1;t--;)n*=10;return n},sigma:function(t,n,r){for(var i=0,o=t;o<=n;o++)i+=Number(r.postfixEval({n:o}));return i},sin:function(t){return e.math.isDegree&&(t=e.math.toRadian(t)),Math.sin(t)},sinh:function(t){return(Math.pow(Math.E,t)-Math.pow(Math.E,-1*t))/2},sub:function(t,n){return t-n},tan:function(t){return e.math.isDegree&&(t=e.math.toRadian(t)),Math.tan(t)},tanh:function(t){return e.sinha(t)/e.cosha(t)},toRadian:function(t){return t*Math.PI/180},and:function(t,n){return t&n}},e.Exception=function(t){this.message=t},St=e,St}var _t,Bn;function au(){if(Bn)return _t;Bn=1;var e=ou();function t(g,d){for(var p=0;p<g.length;p++)g[p]+=d;return g}for(var n=[{token:"sin",show:"sin",type:0,value:e.math.sin},{token:"cos",show:"cos",type:0,value:e.math.cos},{token:"tan",show:"tan",type:0,value:e.math.tan},{token:"pi",show:"π",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:e.math.P},{token:"C",show:"C",type:10,value:e.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:e.math.asin},{token:"acos",show:"acos",type:0,value:e.math.acos},{token:"atan",show:"atan",type:0,value:e.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:e.math.cosh},{token:"acosh",show:"acosh",type:0,value:e.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"÷",type:2,value:e.math.div},{token:"!",show:"!",type:7,value:e.math.fact},{token:"tanh",show:"tanh",type:0,value:e.math.tanh},{token:"atanh",show:"atanh",type:0,value:e.math.atanh},{token:"Mod",show:" Mod ",type:2,value:e.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"×",type:2,value:e.math.mul},{token:"sinh",show:"sinh",type:0,value:e.math.sinh},{token:"asinh",show:"asinh",type:0,value:e.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:e.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:e.math.add},{token:"-",show:"-",type:9,value:e.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"Σ",type:12,value:e.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"Π",type:12,value:e.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:e.math.and}],r={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},i=0;i<n.length;i++)n[i].precedence=r[n[i].type];var o={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},a={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},u={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},s={},l={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},h={1:!0},f=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function c(g,d,p,M){for(var m=0;m<M;m++)if(g[p+m]!==d[m])return!1;return!0}e.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},e.addToken=function(g){for(var d=0;d<g.length;d++){var p=g[d].token.length,M=-1;g[d].type===e.tokenTypes.FUNCTION_WITH_N_ARGS&&g[d].numberOfArguments===void 0&&(g[d].numberOfArguments=2),f[p]=f[p]||[];for(var m=0;m<f[p].length;m++)if(g[d].token===f[p][m]){M=x(f[p][m],n);break}M===-1?(n.push(g[d]),g[d].precedence=r[g[d].type],f.length<=g[d].token.length&&(f[g[d].token.length]=[]),f[g[d].token.length].push(g[d].token)):(n[M]=g[d],g[d].precedence=r[g[d].type])}};function x(g,d){for(var p=0;p<d.length;p++)if(d[p].token===g)return p;return-1}function b(g){for(var d=[],p=g.length,M,m,C,U=0;U<p;U++)if(!(U<p-1&&g[U]===" "&&g[U+1]===" ")){for(M="",m=g.length-U>f.length-2?f.length-1:g.length-U;m>0;m--)if(f[m]!==void 0)for(C=0;C<f[m].length;C++)c(g,f[m][C],U,m)&&(M=f[m][C],C=f[m].length,m=0);if(U+=M.length-1,M==="")throw new e.Exception("Can't understand after "+g.slice(U));d.push(n[x(M,n)])}return d}var v={value:e.math.changeSign,type:0,pre:21,show:"-"},k={value:")",show:")",type:5,pre:0},N={value:"(",type:4,pre:0,show:"("};return e.lex=function(g,d){var p=[N],M=[],m=g,C=o,U=0,O=s,K="",F;typeof d<"u"&&e.addToken(d);var T={},D=b(m);for(F=0;F<D.length;F++){var _=D[F];if(_.type===14){if(F>0&&F<D.length-1&&D[F+1].type===1&&(D[F-1].type===1||D[F-1].type===6))throw new e.Exception("Unexpected Space");continue}var H=_.token,L=_.type,Z=_.value,ae=_.precedence,ee=_.show,$=p[p.length-1],ge;for(ge=M.length;ge--&&M[ge]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(L)!==-1){if(C[L]!==!0)throw new e.Exception(H+" is not allowed after "+K);p.push(k),C=a,O=l,M.pop()}if(C[L]!==!0)throw new e.Exception(H+" is not allowed after "+K);if(O[L]===!0&&(L=2,Z=e.math.mul,ee="×",ae=3,F=F-1),T={value:Z,type:L,pre:ae,show:ee,numberOfArguments:_.numberOfArguments},L===0)C=o,O=s,t(M,2),p.push(T),D[F+1].type!==4&&(p.push(N),M.push(2));else if(L===1)$.type===1?($.value+=Z,t(M,1)):p.push(T),C=a,O=u;else if(L===2)C=o,O=s,t(M,2),p.push(T);else if(L===3)p.push(T),C=a,O=l;else if(L===4)t(M,1),U++,C=o,O=s,p.push(T);else if(L===5){if(!U)throw new e.Exception("Closing parenthesis are more than opening one, wait What!!!");U--,C=a,O=l,p.push(T),t(M,1)}else if(L===6){if($.hasDec)throw new e.Exception("Two decimals are not allowed in one number");$.type!==1&&($={value:0,type:1,pre:0},p.push($)),C=h,t(M,1),O=s,$.value+=Z,$.hasDec=!0}else L===7&&(C=a,O=l,t(M,1),p.push(T));L===8?(C=o,O=s,t(M,_.numberOfArguments+2),p.push(T),D[F+1].type!==4&&(p.push(N),M.push(_.numberOfArguments+2))):L===9?($.type===9?$.value===e.math.add?($.value=Z,$.show=ee,t(M,1)):$.value===e.math.sub&&ee==="-"&&($.value=e.math.add,$.show="+",t(M,1)):$.type!==5&&$.type!==7&&$.type!==1&&$.type!==3&&$.type!==13?H==="-"&&(C=o,O=s,t(M,2).push(2),p.push(v),p.push(N)):(p.push(T),t(M,2)),C=o,O=s):L===10?(C=o,O=s,t(M,2),p.push(T)):L===11?(C=o,O=s,p.push(T)):L===12?(C=o,O=s,t(M,6),p.push(T),D[F+1].type!==4&&(p.push(N),M.push(6))):L===13&&(C=a,O=l,p.push(T)),t(M,-1),K=H}for(ge=M.length;ge--;)p.push(k);if(C[5]!==!0)throw new e.Exception("complete the expression");for(;U--;)p.push(k);return p.push(k),new e(p)},_t=e,_t}var $t,Gn;function uu(){if(Gn)return $t;Gn=1;var e=au();return e.prototype.toPostfix=function(){for(var t=[],n,r,i,o,a,u=[{value:"(",type:4,pre:0}],s=this.value,l=1;l<s.length;l++)if(s[l].type===1||s[l].type===3||s[l].type===13)s[l].type===1&&(s[l].value=Number(s[l].value)),t.push(s[l]);else if(s[l].type===4)u.push(s[l]);else if(s[l].type===5)for(;(r=u.pop()).type!==4;)t.push(r);else if(s[l].type===11){for(;(r=u.pop()).type!==4;)t.push(r);u.push(r)}else{n=s[l],o=n.pre,a=u[u.length-1],i=a.pre;var h=a.value=="Math.pow"&&n.value=="Math.pow";if(o>i)u.push(n);else{for(;i>=o&&!h||h&&o<i;)r=u.pop(),a=u[u.length-1],t.push(r),i=a.pre,h=n.value=="Math.pow"&&a.value=="Math.pow";u.push(n)}}return new e(t)},$t=e,$t}var Et,Xn;function su(){if(Xn)return Et;Xn=1;var e=uu();return e.prototype.postfixEval=function(t){t=t||{},t.PI=Math.PI,t.E=Math.E;for(var n=[],r,i,o,a=this.value,u=typeof t.n<"u",s=0;s<a.length;s++)if(a[s].type===1)n.push({value:a[s].value,type:1});else if(a[s].type===3)n.push({value:t[a[s].value],type:1});else if(a[s].type===0)typeof n[n.length-1].type>"u"?n[n.length-1].value.push(a[s]):n[n.length-1].value=a[s].value(n[n.length-1].value);else if(a[s].type===7)typeof n[n.length-1].type>"u"?n[n.length-1].value.push(a[s]):n[n.length-1].value=a[s].value(n[n.length-1].value);else if(a[s].type===8){for(var l=[],h=0;h<a[s].numberOfArguments;h++)l.push(n.pop().value);n.push({type:1,value:a[s].value.apply(a[s],l.reverse())})}else a[s].type===10?(r=n.pop(),i=n.pop(),typeof i.type>"u"?(i.value=i.concat(r),i.value.push(a[s]),n.push(i)):typeof r.type>"u"?(r.unshift(i),r.push(a[s]),n.push(r)):n.push({type:1,value:a[s].value(i.value,r.value)})):a[s].type===2||a[s].type===9?(r=n.pop(),i=n.pop(),typeof i.type>"u"?(i=i.concat(r),i.push(a[s]),n.push(i)):typeof r.type>"u"?(r.unshift(i),r.push(a[s]),n.push(r)):n.push({type:1,value:a[s].value(i.value,r.value)})):a[s].type===12?(r=n.pop(),typeof r.type<"u"&&(r=[r]),i=n.pop(),o=n.pop(),n.push({type:1,value:a[s].value(o.value,i.value,new e(r))})):a[s].type===13&&(u?n.push({value:t[a[s].value],type:3}):n.push([a[s]]));if(n.length>1)throw new e.Exception("Uncaught Syntax error");return n[0].value>1e15?"Infinity":parseFloat(n[0].value.toFixed(15))},e.eval=function(t,n,r){return typeof n>"u"?this.lex(t).toPostfix().postfixEval():typeof r>"u"?typeof n.length<"u"?this.lex(t,n).toPostfix().postfixEval():this.lex(t).toPostfix().postfixEval(n):this.lex(t,n).toPostfix().postfixEval(r)},Et=e,Et}var Pt,Zn;function lu(){if(Zn)return Pt;Zn=1;var e=su();return e.prototype.formulaEval=function(){for(var t,n,r,i=[],o=this.value,a=0;a<o.length;a++)o[a].type===1||o[a].type===3?i.push({value:o[a].type===3?o[a].show:o[a].value,type:1}):o[a].type===13?i.push({value:o[a].show,type:1}):o[a].type===0?i[i.length-1]={value:o[a].show+(o[a].show!="-"?"(":"")+i[i.length-1].value+(o[a].show!="-"?")":""),type:0}:o[a].type===7?i[i.length-1]={value:(i[i.length-1].type!=1?"(":"")+i[i.length-1].value+(i[i.length-1].type!=1?")":"")+o[a].show,type:7}:o[a].type===10?(t=i.pop(),n=i.pop(),o[a].show==="P"||o[a].show==="C"?i.push({value:"<sup>"+n.value+"</sup>"+o[a].show+"<sub>"+t.value+"</sub>",type:10}):i.push({value:(n.type!=1?"(":"")+n.value+(n.type!=1?")":"")+"<sup>"+t.value+"</sup>",type:1})):o[a].type===2||o[a].type===9?(t=i.pop(),n=i.pop(),i.push({value:(n.type!=1?"(":"")+n.value+(n.type!=1?")":"")+o[a].show+(t.type!=1?"(":"")+t.value+(t.type!=1?")":""),type:o[a].type})):o[a].type===12&&(t=i.pop(),n=i.pop(),r=i.pop(),i.push({value:o[a].show+"("+r.value+","+n.value+","+t.value+")",type:12}));return i[0].value},Pt=e,Pt}var Dt,Qn;function fu(){if(Qn)return Dt;Qn=1;var e=nu(),t=iu(),n=lu(),r=100,i=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,o;Dt=a;function a(s,l){o=0,l=Math.pow(10,l===void 0?5:l),s=s.replace(/\n+/g," ");function h(c,x,b){if(o++>r)throw o=0,new Error("Call stack overflow for "+b);if(c==="")throw new Error(x+"(): '"+b+"' must contain a non-whitespace string");c=f(c,b);var v=u(c);if(v.length>1||c.indexOf("var(")>-1)return x+"("+c+")";var k=v[0]||"";k==="%"&&(c=c.replace(/\b[0-9\.]+%/g,function(d){return parseFloat(d.slice(0,-1))*.01}));var N=c.replace(new RegExp(k,"gi"),""),g;try{g=n.eval(N)}catch{return x+"("+c+")"}return k==="%"&&(g*=100),(x.length||k==="%")&&(g=Math.round(g*l)/l),g+=k,g}function f(c,x){c=c.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var b="",v=c,k;k=i.exec(v);){k[0].index>0&&(b+=v.substring(0,k[0].index));var N=e("(",")",v.substring([0].index));if(N.body==="")throw new Error("'"+c+"' must contain a non-whitespace string");var g=h(N.body,"",x);b+=N.pre+g,v=N.post}return b+v}return t(s,/((?:\-[a-z]+\-)?calc)\(/,h)}function u(s){for(var l=[],h=[],f=/[\.0-9]([%a-z]+)/gi,c=f.exec(s);c;)!c||!c[1]||(h.indexOf(c[1].toLowerCase())===-1&&(l.push(c[1]),h.push(c[1].toLowerCase())),c=f.exec(s));return l}return Dt}var cu=fu();const At=rr(cu);function hu(e,t){const n=new Map;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];const u=t(...o);if(n.has(u))return n.get(u);const s=e.apply(this,o);return n.set(u,s),s}}const Jn="__react_svg_text_measurement_id";function pu(e,t){if(typeof document>"u")return null;try{let n=document.getElementById(Jn);if(!n){const r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",Jn),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const Kn=hu(pu,(e,t)=>`${e}_${JSON.stringify(t)}`);function Lt(e){return typeof e=="number"}function er(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function gu(e){const{verticalAnchor:t="end",scaleToFit:n=!1,angle:r,width:i,lineHeight:o="1em",capHeight:a="0.71em",children:u,style:s,...l}=e,{x:h=0,y:f=0}=l,c=!er(h)||!er(f),{wordsWithWidth:x,spaceWidth:b}=G.useMemo(()=>({wordsWithWidth:(u==null?[]:u.toString().split(/(?:(?!\u00A0+)\s+)/)).map(d=>({word:d,wordWidth:Kn(d,s)||0})),spaceWidth:Kn(" ",s)||0}),[u,s]),v=G.useMemo(()=>c?[]:i||n?x.reduce((g,d)=>{let{word:p,wordWidth:M}=d;const m=g[g.length-1];if(m&&(i==null||n||(m.width||0)+M+b<i))m.words.push(p),m.width=m.width||0,m.width+=M+b;else{const C={words:[p],width:M};g.push(C)}return g},[]):[{words:u==null?[]:u.toString().split(/(?:(?!\u00A0+)\s+)/)}],[c,i,n,u,x,b]),k=G.useMemo(()=>c?"":At(t==="start"?`calc(${a})`:t==="middle"?`calc(${(v.length-1)/2} * -${o} + (${a} / 2))`:`calc(${v.length-1} * -${o})`),[c,t,a,v.length,o]),N=G.useMemo(()=>{const g=[];if(c)return"";if(Lt(h)&&Lt(f)&&Lt(i)&&n&&v.length>0){const d=v[0].width||1,p=n==="shrink-only"?Math.min(i/d,1):i/d,M=p,m=h-p*h,C=f-M*f;g.push(`matrix(${p}, 0, 0, ${M}, ${m}, ${C})`)}return r&&g.push(`rotate(${r}, ${h}, ${f})`),g.length>0?g.join(" "):""},[c,h,f,i,n,v,r]);return{wordsByLines:v,startDy:k,transform:N}}const du={overflow:"visible"};function Vr(e){const{dx:t=0,dy:n=0,textAnchor:r="start",innerRef:i,innerTextRef:o,verticalAnchor:a,angle:u,lineHeight:s="1em",scaleToFit:l=!1,capHeight:h,width:f,...c}=e,{x=0,fontSize:b}=c,{wordsByLines:v,startDy:k,transform:N}=gu(e);return A.jsx("svg",{ref:i,x:t,y:n,fontSize:b,style:du,children:v.length>0?A.jsx("text",{ref:o,transform:N,...c,textAnchor:r,children:v.map((g,d)=>A.jsx("tspan",{x,dy:d===0?k:s,children:g.words.join(" ")},d))}):null})}const X={top:"top",left:"left",bottom:"bottom"};function mu(e){let{labelOffset:t,labelProps:n,orientation:r,range:i,tickLabelFontSize:o,tickLength:a}=e;const u=r===X.left||r===X.top?-1:1;let s,l,h;if(r===X.top||r===X.bottom){const f=r===X.bottom&&typeof n.fontSize=="number"?n.fontSize:0;s=(Number(i[0])+Number(i[i.length-1]))/2,l=u*(a+t+o+f)}else s=u*((Number(i[0])+Number(i[i.length-1]))/2),l=-(a+t),h=`rotate(${u*90})`;return{x:s,y:l,transform:h}}function yu(e){let{hideTicks:t,horizontal:n,orientation:r,tickClassName:i,tickComponent:o,tickLabelProps:a,tickStroke:u="#222",tickTransform:s,ticks:l,strokeWidth:h,tickLineProps:f}=e;return l.map(c=>{let{value:x,index:b,from:v,to:k,formattedValue:N}=c;const g=a[b]??{},d=Math.max(10,typeof g.fontSize=="number"&&g.fontSize||0),p=k.y+(n&&r!==X.top?d:0);return A.jsxs(on,{className:J("visx-axis-tick",i),transform:s,children:[!t&&A.jsx(an,{from:v,to:k,stroke:u,strokeWidth:h,strokeLinecap:"square",...f}),o?o({...g,x:k.x,y:p,formattedValue:N}):A.jsx(Vr,{x:k.x,y:p,...g,children:N})]},`visx-tick-${x}-${b}`)})}const tr={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function xu(e){let{axisFromPoint:t,axisLineClassName:n,axisToPoint:r,hideAxisLine:i,hideTicks:o,horizontal:a,label:u="",labelClassName:s,labelOffset:l=14,labelProps:h,orientation:f=X.bottom,scale:c,stroke:x="#222",strokeDasharray:b,strokeWidth:v=1,tickClassName:k,tickComponent:N,tickLineProps:g,tickLabelProps:d,tickLength:p=8,tickStroke:M="#222",tickTransform:m,ticks:C,ticksComponent:U=yu}=e;const O={...tr,...h},K={...tr,...typeof d=="object"?d:null},F=C.map(D=>{let{value:_,index:H}=D;return typeof d=="function"?d(_,H,C):K}),T=Math.max(10,...F.map(D=>typeof D.fontSize=="number"?D.fontSize:0));return A.jsxs(A.Fragment,{children:[U({hideTicks:o,horizontal:a,orientation:f,scale:c,tickClassName:k,tickComponent:N,tickLabelProps:F,tickStroke:M,tickTransform:m,ticks:C,strokeWidth:v,tickLineProps:g}),!i&&A.jsx(an,{className:J("visx-axis-line",n),from:t,to:r,stroke:x,strokeWidth:v,strokeDasharray:b}),u&&A.jsx(Vr,{className:J("visx-axis-label",s),...mu({labelOffset:l,labelProps:O,orientation:f,range:c.range(),tickLabelFontSize:T,tickLength:p}),...O,children:u})]})}function vu(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"center";const n=e;if(t!=="start"&&"bandwidth"in n){let r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),i=>{const o=n(i);return typeof o=="number"?o+r:o}}return e}function wu(e){const t=e;return"tickFormat"in t?t.tickFormat():Ba}class Ie{constructor(t){ft(this,"x",0);ft(this,"y",0);let{x:n=0,y:r=0}=t;this.x=n,this.y=r}value(){return{x:this.x,y:this.y}}toArray(){return[this.x,this.y]}}function qe(e,t){let{x:n,y:r}=e;return new Ie(t?{x:n,y:r}:{x:r,y:n})}const Ut=0;function bu(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ut;return typeof e=="number"?{start:e,end:e}:{start:Ut,end:Ut,...e}}function Br(e){let{children:t=xu,axisClassName:n,hideAxisLine:r=!1,hideTicks:i=!1,hideZero:o=!1,innerRef:a,left:u=0,numTicks:s=10,orientation:l=X.bottom,rangePadding:h=0,scale:f,tickFormat:c,tickLength:x=8,tickValues:b,top:v=0,...k}=e;const N=c??wu(f),g=l===X.left,d=l===X.top,p=d||l===X.bottom,M=vu(f),m=g||d?-1:1,C=f.range(),U=bu(h),O=qe({x:Number(C[0])+.5-U.start,y:0},p),K=qe({x:Number(C[C.length-1])+.5+U.end,y:0},p),F=(b??Rr(f,s)).filter(D=>!o||D!==0&&D!=="0").map((D,_)=>({value:D,index:_})),T=F.map(D=>{let{value:_,index:H}=D;const L=Or(M(_));return{value:_,index:H,from:qe({x:L,y:0},p),to:qe({x:L,y:x*m},p),formattedValue:N(_,H,F)}});return A.jsx(on,{className:J("visx-axis",n),innerRef:a,top:v,left:u,children:t({...k,axisFromPoint:O,axisToPoint:K,hideAxisLine:r,hideTicks:i,hideZero:o,horizontal:p,numTicks:s,orientation:l,rangePadding:h,scale:f,tickFormat:N,tickLength:x,tickPosition:M,tickSign:m,ticks:T})})}const Mu={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function Vu(e){let{axisClassName:t,labelOffset:n=36,tickLength:r=8,tickLabelProps:i,...o}=e;const a=typeof i=="function"?i:{...Mu,...i};return A.jsx(Br,{axisClassName:J("visx-axis-left",t),labelOffset:n,orientation:X.left,tickLabelProps:a,tickLength:r,...o})}const ku={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Bu(e){let{axisClassName:t,labelOffset:n=8,tickLength:r=8,tickLabelProps:i,...o}=e;const a=typeof i=="function"?i:{...ku,...i};return A.jsx(Br,{axisClassName:J("visx-axis-bottom",t),labelOffset:n,orientation:X.bottom,tickLabelProps:a,tickLength:r,...o})}function Cu(e){return"bandwidth"in e?e.bandwidth():0}function Gu(e){let{top:t=0,left:n=0,scale:r,width:i,stroke:o="#eaf0f6",strokeWidth:a=1,strokeDasharray:u,className:s,children:l,numTicks:h=10,lineStyle:f,offset:c,tickValues:x,...b}=e;const v=x??Rr(r,h),k=(c??0)+Cu(r)/2,N=v.map((g,d)=>{const p=(Or(r(g))??0)+k;return{index:d,from:new Ie({x:0,y:p}),to:new Ie({x:i,y:p})}});return A.jsx(on,{className:J("visx-rows",s),top:t,left:n,children:l?l({lines:N}):N.map(g=>{let{from:d,to:p,index:M}=g;return A.jsx(an,{from:d,to:p,stroke:o,strokeWidth:a,strokeDasharray:u,style:f,...b},`row-line-${M}`)})})}function Xu(e){let{children:t,id:n,from:r,to:i,x1:o,y1:a,x2:u,y2:s,fromOffset:l="0%",fromOpacity:h=1,toOffset:f="100%",toOpacity:c=1,rotate:x,transform:b,vertical:v=!0,...k}=e,N=o,g=u,d=a,p=s;return v&&!N&&!g&&!d&&!p&&(N="0",g="0",d="0",p="1"),A.jsx("defs",{children:A.jsxs("linearGradient",{id:n,x1:N,y1:d,x2:g,y2:p,gradientTransform:x?`rotate(${x})`:b,...k,children:[!!t&&t,!t&&A.jsx("stop",{offset:l,stopColor:r,stopOpacity:h}),!t&&A.jsx("stop",{offset:f,stopColor:i,stopOpacity:c})]})})}function Tu(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{leading:r=!1}=n;let i,o=null,a;function u(){for(var s=arguments.length,l=new Array(s),h=0;h<s;h++)l[h]=arguments[h];r&&i===void 0?(e.apply(this,l),o=null):(o=l,a=this),clearTimeout(i),i=setTimeout(()=>{i=void 0,o!==null&&(e.apply(a,o),o=null,a=void 0)},t)}return u.cancel=function(){clearTimeout(i),i=void 0,o=null,a=void 0},u}const Nu=[],nr={width:0,height:0,top:0,left:0};function Su(){let{initialSize:e=nr,debounceTime:t=300,ignoreDimensions:n=Nu,enableDebounceLeadingCall:r=!0,resizeObserverPolyfill:i,externalRef:o}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const[a,u]=G.useState(null),s=G.useCallback(x=>{u(x),typeof o=="function"?o(x):o!=null&&(o.current=x)},[o]),l=G.useRef(0),[h,f]=G.useState({...nr,...e}),c=G.useMemo(()=>{const x=Array.isArray(n)?n:[n];return Tu(b=>{f(v=>Object.keys(v).filter(d=>v[d]!==b[d]).every(d=>x.includes(d))?v:b)},t,{leading:r})},[t,r,n]);return G.useEffect(()=>{if(!a){c.cancel();return}const x=i||window.ResizeObserver,b=new x(v=>{v.forEach(k=>{const{left:N,top:g,width:d,height:p}=(k==null?void 0:k.contentRect)??{};l.current=window.requestAnimationFrame(()=>{c({width:d,height:p,top:g,left:N})})})});return b.observe(a),()=>{window.cancelAnimationFrame(l.current),b.disconnect(),c.cancel()}},[a,c,i]),{parentRef:s,node:a,resize:c,...h}}const _u={width:"100%",height:"100%",position:"relative"},$u={position:"absolute",top:0,right:0,bottom:0,left:0,overflow:"hidden"};function Zu(e){let{className:t,children:n,debounceTime:r,ignoreDimensions:i,initialSize:o,parentSizeStyles:a,enableDebounceLeadingCall:u=!0,resizeObserverPolyfill:s,style:l,...h}=e;const{parentRef:f,node:c,resize:x,...b}=Su({initialSize:o,debounceTime:r,ignoreDimensions:i,enableDebounceLeadingCall:u,resizeObserverPolyfill:s}),v=a?{position:"relative",...a,...l}:{..._u,...l};return A.jsx("div",{style:v,className:t,...h,children:A.jsx("div",{style:$u,ref:f,children:n({...b,ref:c,resize:x})})})}function Qu(e){const[t,n]=G.useState({tooltipOpen:!1,...e}),r=G.useCallback(o=>n(typeof o=="function"?a=>{let{tooltipOpen:u,...s}=a;return{...o(s),tooltipOpen:!0}}:{tooltipOpen:!0,tooltipLeft:o.tooltipLeft,tooltipTop:o.tooltipTop,tooltipData:o.tooltipData}),[n]),i=G.useCallback(()=>n({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0}),[n]);return{tooltipOpen:t.tooltipOpen,tooltipLeft:t.tooltipLeft,tooltipTop:t.tooltipTop,tooltipData:t.tooltipData,updateTooltip:n,showTooltip:r,hideTooltip:i}}function Eu(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function Pu(e){return!!e&&"createSVGPoint"in e}function Du(e){return!!e&&"getScreenCTM"in e}function Au(e){return!!e&&"changedTouches"in e}function Lu(e){return!!e&&"clientX"in e}function Uu(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}const Ot={x:0,y:0};function Ou(e){if(!e)return{...Ot};if(Au(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:{...Ot};if(Lu(e))return{x:e.clientX,y:e.clientY};const t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:{...Ot}}function Ru(e,t){if(!e||!t)return null;const n=Ou(t),r=Eu(e)?e.ownerSVGElement:e,i=Du(r)?r.getScreenCTM():null;if(Pu(r)&&i){let a=r.createSVGPoint();return a.x=n.x,a.y=n.y,a=a.matrixTransform(i.inverse()),new Ie({x:a.x,y:a.y})}const o=e.getBoundingClientRect();return new Ie({x:n.x-o.left-e.clientLeft,y:n.y-o.top-e.clientTop})}function Ju(e,t){if(Uu(e)){const n=e,r=n.target;if(r)return Ru(r,n)}return null}export{ju as A,qu as B,Gu as G,an as L,Zu as P,Bu as a,Vu as b,on as c,Wu as d,Xu as e,Xt as f,Hu as g,Yu as h,Ju as l,zu as m,Qu as u};
|
|
Binary file
|