gf-components 0.1.172 → 0.1.173

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/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),yt=require("styled-components"),uo=require("react-dom");function Zp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=Zp($),U_=Zp(uo);var ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F2={exports:{}},Hl={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),Ct=require("styled-components"),uo=require("react-dom");function Zp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const C=Zp($),U_=Zp(uo);var ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var F2={exports:{}},Hl={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -27,7 +27,7 @@ Check the top-level render call using <`+se+">.")}return ae}}function Le(X,ae){{
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,Ot,wt,rn,wt),fe[wt+Ot]=!0}}return X===r?Ee(Te):pt(Te),Te}}function Ve(X,ae,se){return we(X,ae,se,!0)}function Ge(X,ae,se){return we(X,ae,se,!1)}var We=Ge,rt=Ve;El.Fragment=r,El.jsx=We,El.jsxs=rt}()),El}process.env.NODE_ENV==="production"?F2.exports=q_():F2.exports=G_();var p=F2.exports;const fn=yt.createGlobalStyle`
30
+ <%s key={someKey} {...props} />`,Ot,wt,rn,wt),fe[wt+Ot]=!0}}return X===r?Ee(Te):pt(Te),Te}}function Ve(X,ae,se){return we(X,ae,se,!0)}function Ge(X,ae,se){return we(X,ae,se,!1)}var We=Ge,rt=Ve;El.Fragment=r,El.jsx=We,El.jsxs=rt}()),El}process.env.NODE_ENV==="production"?F2.exports=q_():F2.exports=G_();var p=F2.exports;const fn=Ct.createGlobalStyle`
31
31
  :root {
32
32
  /* colors */
33
33
  --gf-color-bg-base: #FFFFFF;
@@ -313,7 +313,7 @@ html body {
313
313
  top:0 !important;
314
314
  right:0 !important;
315
315
  pointer-events: none !important;
316
- `,bN=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],L0={},Pr;function yN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&L0[n])return L0[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=bN.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(L0[n]=l),l}function CN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Pr||(Pr=document.createElement("textarea"),Pr.setAttribute("tab-index","-1"),Pr.setAttribute("aria-hidden","true"),document.body.appendChild(Pr)),e.getAttribute("wrap")?Pr.setAttribute("wrap",e.getAttribute("wrap")):Pr.removeAttribute("wrap");var i=yN(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Pr.setAttribute("style","".concat(l,";").concat(pN)),Pr.value=e.value||e.placeholder||"";var c=void 0,u=void 0,d,f=Pr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Pr.value=" ";var h=Pr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var xN=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],P0=0,I0=1,A0=2,wN=C.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,h=Vt(n,xN),m=Zn(i,{value:o,postState:function(ee){return ee??""}}),g=le(m,2),v=g[0],b=g[1],y=function(ee){b(ee.target.value),d==null||d(ee)},x=C.useRef();C.useImperativeHandle(t,function(){return{textArea:x.current}});var S=C.useMemo(function(){return a&&mt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),w=le(S,2),M=w[0],E=w[1],H=!!a,_=function(){try{if(document.activeElement===x.current){var ee=x.current,Q=ee.selectionStart,K=ee.selectionEnd,J=ee.scrollTop;x.current.setSelectionRange(Q,K),x.current.scrollTop=J}}catch{}},O=C.useState(A0),k=le(O,2),A=k[0],j=k[1],V=C.useState(),T=le(V,2),L=T[0],R=T[1],I=function(){j(P0),process.env.NODE_ENV==="test"&&(f==null||f())};en(function(){H&&I()},[o,M,E,H]),en(function(){if(A===P0)j(I0);else if(A===I0){var Y=CN(x.current,!1,M,E);j(A0),R(Y)}else _()},[A]);var P=C.useRef(),N=function(){tn.cancel(P.current)},z=function(ee){A===A0&&(s==null||s(ee),a&&(N(),P.current=tn(function(){I()})))};C.useEffect(function(){return N},[]);var q=H?L:null,G=ne(ne({},c),q);return(A===P0||A===I0)&&(G.overflowY="hidden",G.overflowX="hidden"),C.createElement(Hr,{onResize:z,disabled:!(a||s)},C.createElement("textarea",ct({},h,{ref:x,style:G,className:Me(r,l,te({},"".concat(r,"-disabled"),u)),disabled:u,value:v,onChange:y})))}),SN=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$N=$.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,m=h===void 0?"rc-textarea":h,g=e.showCount,v=e.count,b=e.className,y=e.style,x=e.disabled,S=e.hidden,w=e.classNames,M=e.styles,E=e.onResize,H=e.onClear,_=e.onPressEnter,O=e.readOnly,k=e.autoSize,A=e.onKeyDown,j=Vt(e,SN),V=Zn(r,{value:i,defaultValue:r}),T=le(V,2),L=T[0],R=T[1],I=L==null?"":String(L),P=$.useState(!1),N=le(P,2),z=N[0],q=N[1],G=$.useRef(!1),Y=$.useState(null),ee=le(Y,2),Q=ee[0],K=ee[1],J=$.useRef(null),W=$.useRef(null),Z=function(){var je;return(je=W.current)===null||je===void 0?void 0:je.textArea},U=function(){Z().focus()};$.useImperativeHandle(t,function(){var Fe;return{resizableTextArea:W.current,focus:U,blur:function(){Z().blur()},nativeElement:((Fe=J.current)===null||Fe===void 0?void 0:Fe.nativeElement)||Z()}}),$.useEffect(function(){q(function(Fe){return!x&&Fe})},[x]);var F=$.useState(null),re=le(F,2),B=re[0],ie=re[1];$.useEffect(function(){if(B){var Fe;(Fe=Z()).setSelectionRange.apply(Fe,dt(B))}},[B]);var oe=JC(v,g),ve=(n=oe.max)!==null&&n!==void 0?n:c,Ce=Number(ve)>0,pe=oe.strategy(I),ye=!!ve&&pe>ve,Se=function(je,Qe){var Ze=Qe;!G.current&&oe.exceedFormatter&&oe.max&&oe.strategy(Qe)>oe.max&&(Ze=oe.exceedFormatter(Qe,{max:oe.max}),Qe!==Ze&&ie([Z().selectionStart||0,Z().selectionEnd||0])),R(Ze),W1(je.currentTarget,je,s,Ze)},me=function(je){G.current=!0,u==null||u(je)},ge=function(je){G.current=!1,Se(je,je.currentTarget.value),d==null||d(je)},ce=function(je){Se(je,je.target.value)},$e=function(je){je.key==="Enter"&&_&&_(je),A==null||A(je)},he=function(je){q(!0),o==null||o(je)},Ae=function(je){q(!1),a==null||a(je)},Ie=function(je){R(""),U(),W1(Z(),je,s)},Re=f,ke;oe.show&&(oe.showFormatter?ke=oe.showFormatter({value:I,count:pe,maxLength:ve}):ke="".concat(pe).concat(Ce?" / ".concat(ve):""),Re=$.createElement($.Fragment,null,Re,$.createElement("span",{className:Me("".concat(m,"-data-count"),w==null?void 0:w.count),style:M==null?void 0:M.count},ke)));var Ye=function(je){var Qe;E==null||E(je),(Qe=Z())!==null&&Qe!==void 0&&Qe.style.height&&K(!0)},Xe=!k&&!g&&!l;return $.createElement(QC,{ref:J,value:I,allowClear:l,handleReset:Ie,suffix:Re,prefixCls:m,classNames:ne(ne({},w),{},{affixWrapper:Me(w==null?void 0:w.affixWrapper,te(te({},"".concat(m,"-show-count"),g),"".concat(m,"-textarea-allow-clear"),l))}),disabled:x,focused:z,className:Me(b,ye&&"".concat(m,"-out-of-range")),style:ne(ne({},y),Q&&!Xe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ke=="string"?ke:void 0}},hidden:S,readOnly:O,onClear:H},$.createElement(wN,ct({},j,{autoSize:k,maxLength:c,onKeyDown:$e,onChange:ce,onFocus:he,onBlur:Ae,onCompositionStart:me,onCompositionEnd:ge,className:Me(w==null?void 0:w.textarea),style:ne(ne({},M==null?void 0:M.textarea),{},{resize:y==null?void 0:y.resize}),disabled:x,prefixCls:m,onResize:Ye,ref:W,readOnly:O})))}),MN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const _N=$.forwardRef((e,t)=>{var n,r;const{prefixCls:i,bordered:o=!0,size:a,disabled:s,status:l,allowClear:c,classNames:u,rootClassName:d,className:f,style:h,styles:m,variant:g}=e,v=MN(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:N}=Vn("TextArea");N(!("bordered"in e),"bordered","variant")}const{getPrefixCls:b,direction:y,textArea:x}=C.useContext(Lt),S=Zo(a),w=C.useContext(jo),M=s??w,{status:E,hasFeedback:H,feedbackIcon:_}=C.useContext(ba),O=Uh(E,l),k=C.useRef(null);C.useImperativeHandle(t,()=>{var N;return{resizableTextArea:(N=k.current)===null||N===void 0?void 0:N.resizableTextArea,focus:z=>{var q,G;vN((G=(q=k.current)===null||q===void 0?void 0:q.resizableTextArea)===null||G===void 0?void 0:G.textArea,z)},blur:()=>{var z;return(z=k.current)===null||z===void 0?void 0:z.blur()}}});const A=b("input",i),j=Ks(A),[V,T,L]=FC(A,j),[R,I]=qh("textArea",g,o),P=ex(c??(x==null?void 0:x.allowClear));return V(C.createElement($N,Object.assign({autoComplete:x==null?void 0:x.autoComplete},v,{style:Object.assign(Object.assign({},x==null?void 0:x.style),h),styles:Object.assign(Object.assign({},x==null?void 0:x.styles),m),disabled:M,allowClear:P,className:Me(L,j,f,d,x==null?void 0:x.className),classNames:Object.assign(Object.assign(Object.assign({},u),x==null?void 0:x.classNames),{textarea:Me({[`${A}-sm`]:S==="small",[`${A}-lg`]:S==="large"},T,u==null?void 0:u.textarea,(n=x==null?void 0:x.classNames)===null||n===void 0?void 0:n.textarea),variant:Me({[`${A}-${R}`]:I},z1(A,O)),affixWrapper:Me(`${A}-textarea-affix-wrapper`,{[`${A}-affix-wrapper-rtl`]:y==="rtl",[`${A}-affix-wrapper-sm`]:S==="small",[`${A}-affix-wrapper-lg`]:S==="large",[`${A}-textarea-show-count`]:e.showCount||((r=e.count)===null||r===void 0?void 0:r.show)},T)}),prefixCls:A,suffix:H&&C.createElement("span",{className:`${A}-textarea-suffix`},_),ref:k})))});function Z1(e){return["small","middle","large"].includes(e)}function o8(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const tx=$.createContext({latestIndex:0}),HN=tx.Provider,EN=e=>{let{className:t,index:n,children:r,split:i,style:o}=e;const{latestIndex:a}=C.useContext(tx);return r==null?null:C.createElement(C.Fragment,null,C.createElement("div",{className:t,style:o},r),n<a&&i&&C.createElement("span",{className:`${t}-split`},i))};var VN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ON=C.forwardRef((e,t)=>{var n,r,i;const{getPrefixCls:o,space:a,direction:s}=C.useContext(Lt),{size:l=(n=a==null?void 0:a.size)!==null&&n!==void 0?n:"small",align:c,className:u,rootClassName:d,children:f,direction:h="horizontal",prefixCls:m,split:g,style:v,wrap:b=!1,classNames:y,styles:x}=e,S=VN(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[w,M]=Array.isArray(l)?l:[l,l],E=Z1(M),H=Z1(w),_=o8(M),O=o8(w),k=Vr(f,{keepEmpty:!0}),A=c===void 0&&h==="horizontal"?"center":c,j=o("space",m),[V,T,L]=yy(j),R=Me(j,a==null?void 0:a.className,T,`${j}-${h}`,{[`${j}-rtl`]:s==="rtl",[`${j}-align-${A}`]:A,[`${j}-gap-row-${M}`]:E,[`${j}-gap-col-${w}`]:H},u,d,L),I=Me(`${j}-item`,(r=y==null?void 0:y.item)!==null&&r!==void 0?r:(i=a==null?void 0:a.classNames)===null||i===void 0?void 0:i.item);let P=0;const N=k.map((G,Y)=>{var ee,Q;G!=null&&(P=Y);const K=(G==null?void 0:G.key)||`${I}-${Y}`;return C.createElement(EN,{className:I,key:K,index:Y,split:g,style:(ee=x==null?void 0:x.item)!==null&&ee!==void 0?ee:(Q=a==null?void 0:a.styles)===null||Q===void 0?void 0:Q.item},G)}),z=C.useMemo(()=>({latestIndex:P}),[P]);if(k.length===0)return null;const q={};return b&&(q.flexWrap="wrap"),!H&&O&&(q.columnGap=w),!E&&_&&(q.rowGap=M),V(C.createElement("div",Object.assign({ref:t,className:R,style:Object.assign(Object.assign(Object.assign({},q),a==null?void 0:a.style),v)},S),C.createElement(HN,{value:z},N)))}),qd=ON;qd.Compact=$R;process.env.NODE_ENV!=="production"&&(qd.displayName="Space");const nx=["wrap","nowrap","wrap-reverse"],rx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],ix=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],RN=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&nx.includes(n)}},TN=(e,t)=>{const n={};return ix.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},kN=(e,t)=>{const n={};return rx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n};function jN(e,t){return Me(Object.assign(Object.assign(Object.assign({},RN(e,t)),TN(e,t)),kN(e,t)))}const LN=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},PN=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},IN=e=>{const{componentCls:t}=e,n={};return nx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},AN=e=>{const{componentCls:t}=e,n={};return ix.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},NN=e=>{const{componentCls:t}=e,n={};return rx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},FN=()=>({}),DN=yr("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,i=bn(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[LN(i),PN(i),IN(i),AN(i),NN(i)]},FN,{resetStyle:!1});var zN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Ct=$.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:i,style:o,flex:a,gap:s,children:l,vertical:c=!1,component:u="div"}=e,d=zN(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:f,direction:h,getPrefixCls:m}=$.useContext(Lt),g=m("flex",n),[v,b,y]=DN(g),x=c??(f==null?void 0:f.vertical),S=Me(i,r,f==null?void 0:f.className,g,b,y,jN(g,e),{[`${g}-rtl`]:h==="rtl",[`${g}-gap-${s}`]:Z1(s),[`${g}-vertical`]:x}),w=Object.assign(Object.assign({},f==null?void 0:f.style),o);return a&&(w.flex=a),s&&!Z1(s)&&(w.gap=s),v($.createElement(u,Object.assign({ref:t,className:S,style:w},Tr(d,["justify","wrap","align"])),l))});process.env.NODE_ENV!=="production"&&(Ct.displayName="Flex");var BN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},WN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:BN}))},ox=C.forwardRef(WN);process.env.NODE_ENV!=="production"&&(ox.displayName="ArrowDownOutlined");var ZN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},UN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:ZN}))},ax=C.forwardRef(UN);process.env.NODE_ENV!=="production"&&(ax.displayName="ArrowUpOutlined");var qN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},GN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:qN}))},sx=C.forwardRef(GN);process.env.NODE_ENV!=="production"&&(sx.displayName="CopyOutlined");var YN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},KN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:YN}))},lx=C.forwardRef(KN);process.env.NODE_ENV!=="production"&&(lx.displayName="DownloadOutlined");var XN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},QN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:XN}))},cx=C.forwardRef(QN);process.env.NODE_ENV!=="production"&&(cx.displayName="EditOutlined");var JN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},eF=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:JN}))},ux=C.forwardRef(eF);process.env.NODE_ENV!=="production"&&(ux.displayName="EnterOutlined");var tF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},nF=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:tF}))},dx=C.forwardRef(nF);process.env.NODE_ENV!=="production"&&(dx.displayName="InfoCircleOutlined");var rF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const iF={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-flex"},K3=C.forwardRef((e,t)=>{const n=u=>{const{keyCode:d}=u;d===Pe.ENTER&&u.preventDefault()},r=u=>{const{keyCode:d}=u,{onClick:f}=e;d===Pe.ENTER&&f&&f()},{style:i,noStyle:o,disabled:a,tabIndex:s=0}=e,l=rF(e,["style","noStyle","disabled","tabIndex"]);let c={};return o||(c=Object.assign({},iF)),a&&(c.pointerEvents="none"),c=Object.assign(Object.assign({},c),i),C.createElement("div",Object.assign({role:"button",tabIndex:s,ref:t},l,{onKeyDown:n,onKeyUp:r,style:c}))}),oF=(e,t,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:e,lineHeight:t}},aF=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[`
316
+ `,bN=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],L0={},Pr;function yN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&L0[n])return L0[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),a=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=bN.map(function(c){return"".concat(c,":").concat(r.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return t&&n&&(L0[n]=l),l}function CN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Pr||(Pr=document.createElement("textarea"),Pr.setAttribute("tab-index","-1"),Pr.setAttribute("aria-hidden","true"),document.body.appendChild(Pr)),e.getAttribute("wrap")?Pr.setAttribute("wrap",e.getAttribute("wrap")):Pr.removeAttribute("wrap");var i=yN(e,t),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;Pr.setAttribute("style","".concat(l,";").concat(pN)),Pr.value=e.value||e.placeholder||"";var c=void 0,u=void 0,d,f=Pr.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=o),n!==null||r!==null){Pr.value=" ";var h=Pr.scrollHeight-o;n!==null&&(c=h*n,s==="border-box"&&(c=c+o+a),f=Math.max(c,f)),r!==null&&(u=h*r,s==="border-box"&&(u=u+o+a),d=f>u?"":"hidden",f=Math.min(u,f))}var m={height:f,overflowY:d,resize:"none"};return c&&(m.minHeight=c),u&&(m.maxHeight=u),m}var xN=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],P0=0,I0=1,A0=2,wN=C.forwardRef(function(e,t){var n=e,r=n.prefixCls,i=n.defaultValue,o=n.value,a=n.autoSize,s=n.onResize,l=n.className,c=n.style,u=n.disabled,d=n.onChange,f=n.onInternalAutoSize,h=Vt(n,xN),m=Zn(i,{value:o,postState:function(ee){return ee??""}}),g=le(m,2),v=g[0],b=g[1],y=function(ee){b(ee.target.value),d==null||d(ee)},x=C.useRef();C.useImperativeHandle(t,function(){return{textArea:x.current}});var S=C.useMemo(function(){return a&&mt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),w=le(S,2),M=w[0],E=w[1],H=!!a,_=function(){try{if(document.activeElement===x.current){var ee=x.current,Q=ee.selectionStart,K=ee.selectionEnd,J=ee.scrollTop;x.current.setSelectionRange(Q,K),x.current.scrollTop=J}}catch{}},O=C.useState(A0),k=le(O,2),A=k[0],j=k[1],V=C.useState(),T=le(V,2),L=T[0],R=T[1],I=function(){j(P0),process.env.NODE_ENV==="test"&&(f==null||f())};en(function(){H&&I()},[o,M,E,H]),en(function(){if(A===P0)j(I0);else if(A===I0){var Y=CN(x.current,!1,M,E);j(A0),R(Y)}else _()},[A]);var P=C.useRef(),N=function(){tn.cancel(P.current)},z=function(ee){A===A0&&(s==null||s(ee),a&&(N(),P.current=tn(function(){I()})))};C.useEffect(function(){return N},[]);var q=H?L:null,G=ne(ne({},c),q);return(A===P0||A===I0)&&(G.overflowY="hidden",G.overflowX="hidden"),C.createElement(Hr,{onResize:z,disabled:!(a||s)},C.createElement("textarea",ct({},h,{ref:x,style:G,className:Me(r,l,te({},"".concat(r,"-disabled"),u)),disabled:u,value:v,onChange:y})))}),SN=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$N=$.forwardRef(function(e,t){var n,r=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,h=e.prefixCls,m=h===void 0?"rc-textarea":h,g=e.showCount,v=e.count,b=e.className,y=e.style,x=e.disabled,S=e.hidden,w=e.classNames,M=e.styles,E=e.onResize,H=e.onClear,_=e.onPressEnter,O=e.readOnly,k=e.autoSize,A=e.onKeyDown,j=Vt(e,SN),V=Zn(r,{value:i,defaultValue:r}),T=le(V,2),L=T[0],R=T[1],I=L==null?"":String(L),P=$.useState(!1),N=le(P,2),z=N[0],q=N[1],G=$.useRef(!1),Y=$.useState(null),ee=le(Y,2),Q=ee[0],K=ee[1],J=$.useRef(null),W=$.useRef(null),Z=function(){var je;return(je=W.current)===null||je===void 0?void 0:je.textArea},U=function(){Z().focus()};$.useImperativeHandle(t,function(){var Fe;return{resizableTextArea:W.current,focus:U,blur:function(){Z().blur()},nativeElement:((Fe=J.current)===null||Fe===void 0?void 0:Fe.nativeElement)||Z()}}),$.useEffect(function(){q(function(Fe){return!x&&Fe})},[x]);var F=$.useState(null),re=le(F,2),B=re[0],ie=re[1];$.useEffect(function(){if(B){var Fe;(Fe=Z()).setSelectionRange.apply(Fe,dt(B))}},[B]);var oe=JC(v,g),ve=(n=oe.max)!==null&&n!==void 0?n:c,Ce=Number(ve)>0,pe=oe.strategy(I),ye=!!ve&&pe>ve,Se=function(je,Qe){var Ze=Qe;!G.current&&oe.exceedFormatter&&oe.max&&oe.strategy(Qe)>oe.max&&(Ze=oe.exceedFormatter(Qe,{max:oe.max}),Qe!==Ze&&ie([Z().selectionStart||0,Z().selectionEnd||0])),R(Ze),W1(je.currentTarget,je,s,Ze)},me=function(je){G.current=!0,u==null||u(je)},ge=function(je){G.current=!1,Se(je,je.currentTarget.value),d==null||d(je)},ce=function(je){Se(je,je.target.value)},$e=function(je){je.key==="Enter"&&_&&_(je),A==null||A(je)},he=function(je){q(!0),o==null||o(je)},Ae=function(je){q(!1),a==null||a(je)},Ie=function(je){R(""),U(),W1(Z(),je,s)},Re=f,ke;oe.show&&(oe.showFormatter?ke=oe.showFormatter({value:I,count:pe,maxLength:ve}):ke="".concat(pe).concat(Ce?" / ".concat(ve):""),Re=$.createElement($.Fragment,null,Re,$.createElement("span",{className:Me("".concat(m,"-data-count"),w==null?void 0:w.count),style:M==null?void 0:M.count},ke)));var Ye=function(je){var Qe;E==null||E(je),(Qe=Z())!==null&&Qe!==void 0&&Qe.style.height&&K(!0)},Xe=!k&&!g&&!l;return $.createElement(QC,{ref:J,value:I,allowClear:l,handleReset:Ie,suffix:Re,prefixCls:m,classNames:ne(ne({},w),{},{affixWrapper:Me(w==null?void 0:w.affixWrapper,te(te({},"".concat(m,"-show-count"),g),"".concat(m,"-textarea-allow-clear"),l))}),disabled:x,focused:z,className:Me(b,ye&&"".concat(m,"-out-of-range")),style:ne(ne({},y),Q&&!Xe?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ke=="string"?ke:void 0}},hidden:S,readOnly:O,onClear:H},$.createElement(wN,ct({},j,{autoSize:k,maxLength:c,onKeyDown:$e,onChange:ce,onFocus:he,onBlur:Ae,onCompositionStart:me,onCompositionEnd:ge,className:Me(w==null?void 0:w.textarea),style:ne(ne({},M==null?void 0:M.textarea),{},{resize:y==null?void 0:y.resize}),disabled:x,prefixCls:m,onResize:Ye,ref:W,readOnly:O})))}),MN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const _N=$.forwardRef((e,t)=>{var n,r;const{prefixCls:i,bordered:o=!0,size:a,disabled:s,status:l,allowClear:c,classNames:u,rootClassName:d,className:f,style:h,styles:m,variant:g}=e,v=MN(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant"]);if(process.env.NODE_ENV!=="production"){const{deprecated:N}=Vn("TextArea");N(!("bordered"in e),"bordered","variant")}const{getPrefixCls:b,direction:y,textArea:x}=C.useContext(Lt),S=Zo(a),w=C.useContext(jo),M=s??w,{status:E,hasFeedback:H,feedbackIcon:_}=C.useContext(ba),O=Uh(E,l),k=C.useRef(null);C.useImperativeHandle(t,()=>{var N;return{resizableTextArea:(N=k.current)===null||N===void 0?void 0:N.resizableTextArea,focus:z=>{var q,G;vN((G=(q=k.current)===null||q===void 0?void 0:q.resizableTextArea)===null||G===void 0?void 0:G.textArea,z)},blur:()=>{var z;return(z=k.current)===null||z===void 0?void 0:z.blur()}}});const A=b("input",i),j=Ks(A),[V,T,L]=FC(A,j),[R,I]=qh("textArea",g,o),P=ex(c??(x==null?void 0:x.allowClear));return V(C.createElement($N,Object.assign({autoComplete:x==null?void 0:x.autoComplete},v,{style:Object.assign(Object.assign({},x==null?void 0:x.style),h),styles:Object.assign(Object.assign({},x==null?void 0:x.styles),m),disabled:M,allowClear:P,className:Me(L,j,f,d,x==null?void 0:x.className),classNames:Object.assign(Object.assign(Object.assign({},u),x==null?void 0:x.classNames),{textarea:Me({[`${A}-sm`]:S==="small",[`${A}-lg`]:S==="large"},T,u==null?void 0:u.textarea,(n=x==null?void 0:x.classNames)===null||n===void 0?void 0:n.textarea),variant:Me({[`${A}-${R}`]:I},z1(A,O)),affixWrapper:Me(`${A}-textarea-affix-wrapper`,{[`${A}-affix-wrapper-rtl`]:y==="rtl",[`${A}-affix-wrapper-sm`]:S==="small",[`${A}-affix-wrapper-lg`]:S==="large",[`${A}-textarea-show-count`]:e.showCount||((r=e.count)===null||r===void 0?void 0:r.show)},T)}),prefixCls:A,suffix:H&&C.createElement("span",{className:`${A}-textarea-suffix`},_),ref:k})))});function Z1(e){return["small","middle","large"].includes(e)}function o8(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const tx=$.createContext({latestIndex:0}),HN=tx.Provider,EN=e=>{let{className:t,index:n,children:r,split:i,style:o}=e;const{latestIndex:a}=C.useContext(tx);return r==null?null:C.createElement(C.Fragment,null,C.createElement("div",{className:t,style:o},r),n<a&&i&&C.createElement("span",{className:`${t}-split`},i))};var VN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const ON=C.forwardRef((e,t)=>{var n,r,i;const{getPrefixCls:o,space:a,direction:s}=C.useContext(Lt),{size:l=(n=a==null?void 0:a.size)!==null&&n!==void 0?n:"small",align:c,className:u,rootClassName:d,children:f,direction:h="horizontal",prefixCls:m,split:g,style:v,wrap:b=!1,classNames:y,styles:x}=e,S=VN(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[w,M]=Array.isArray(l)?l:[l,l],E=Z1(M),H=Z1(w),_=o8(M),O=o8(w),k=Vr(f,{keepEmpty:!0}),A=c===void 0&&h==="horizontal"?"center":c,j=o("space",m),[V,T,L]=yy(j),R=Me(j,a==null?void 0:a.className,T,`${j}-${h}`,{[`${j}-rtl`]:s==="rtl",[`${j}-align-${A}`]:A,[`${j}-gap-row-${M}`]:E,[`${j}-gap-col-${w}`]:H},u,d,L),I=Me(`${j}-item`,(r=y==null?void 0:y.item)!==null&&r!==void 0?r:(i=a==null?void 0:a.classNames)===null||i===void 0?void 0:i.item);let P=0;const N=k.map((G,Y)=>{var ee,Q;G!=null&&(P=Y);const K=(G==null?void 0:G.key)||`${I}-${Y}`;return C.createElement(EN,{className:I,key:K,index:Y,split:g,style:(ee=x==null?void 0:x.item)!==null&&ee!==void 0?ee:(Q=a==null?void 0:a.styles)===null||Q===void 0?void 0:Q.item},G)}),z=C.useMemo(()=>({latestIndex:P}),[P]);if(k.length===0)return null;const q={};return b&&(q.flexWrap="wrap"),!H&&O&&(q.columnGap=w),!E&&_&&(q.rowGap=M),V(C.createElement("div",Object.assign({ref:t,className:R,style:Object.assign(Object.assign(Object.assign({},q),a==null?void 0:a.style),v)},S),C.createElement(HN,{value:z},N)))}),qd=ON;qd.Compact=$R;process.env.NODE_ENV!=="production"&&(qd.displayName="Space");const nx=["wrap","nowrap","wrap-reverse"],rx=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],ix=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],RN=(e,t)=>{const n=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${n}`]:n&&nx.includes(n)}},TN=(e,t)=>{const n={};return ix.forEach(r=>{n[`${e}-align-${r}`]=t.align===r}),n[`${e}-align-stretch`]=!t.align&&!!t.vertical,n},kN=(e,t)=>{const n={};return rx.forEach(r=>{n[`${e}-justify-${r}`]=t.justify===r}),n};function jN(e,t){return Me(Object.assign(Object.assign(Object.assign({},RN(e,t)),TN(e,t)),kN(e,t)))}const LN=e=>{const{componentCls:t}=e;return{[t]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},PN=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},IN=e=>{const{componentCls:t}=e,n={};return nx.forEach(r=>{n[`${t}-wrap-${r}`]={flexWrap:r}}),n},AN=e=>{const{componentCls:t}=e,n={};return ix.forEach(r=>{n[`${t}-align-${r}`]={alignItems:r}}),n},NN=e=>{const{componentCls:t}=e,n={};return rx.forEach(r=>{n[`${t}-justify-${r}`]={justifyContent:r}}),n},FN=()=>({}),DN=yr("Flex",e=>{const{paddingXS:t,padding:n,paddingLG:r}=e,i=bn(e,{flexGapSM:t,flexGap:n,flexGapLG:r});return[LN(i),PN(i),IN(i),AN(i),NN(i)]},FN,{resetStyle:!1});var zN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const yt=$.forwardRef((e,t)=>{const{prefixCls:n,rootClassName:r,className:i,style:o,flex:a,gap:s,children:l,vertical:c=!1,component:u="div"}=e,d=zN(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:f,direction:h,getPrefixCls:m}=$.useContext(Lt),g=m("flex",n),[v,b,y]=DN(g),x=c??(f==null?void 0:f.vertical),S=Me(i,r,f==null?void 0:f.className,g,b,y,jN(g,e),{[`${g}-rtl`]:h==="rtl",[`${g}-gap-${s}`]:Z1(s),[`${g}-vertical`]:x}),w=Object.assign(Object.assign({},f==null?void 0:f.style),o);return a&&(w.flex=a),s&&!Z1(s)&&(w.gap=s),v($.createElement(u,Object.assign({ref:t,className:S,style:w},Tr(d,["justify","wrap","align"])),l))});process.env.NODE_ENV!=="production"&&(yt.displayName="Flex");var BN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},WN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:BN}))},ox=C.forwardRef(WN);process.env.NODE_ENV!=="production"&&(ox.displayName="ArrowDownOutlined");var ZN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"},UN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:ZN}))},ax=C.forwardRef(UN);process.env.NODE_ENV!=="production"&&(ax.displayName="ArrowUpOutlined");var qN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},GN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:qN}))},sx=C.forwardRef(GN);process.env.NODE_ENV!=="production"&&(sx.displayName="CopyOutlined");var YN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},KN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:YN}))},lx=C.forwardRef(KN);process.env.NODE_ENV!=="production"&&(lx.displayName="DownloadOutlined");var XN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},QN=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:XN}))},cx=C.forwardRef(QN);process.env.NODE_ENV!=="production"&&(cx.displayName="EditOutlined");var JN={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},eF=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:JN}))},ux=C.forwardRef(eF);process.env.NODE_ENV!=="production"&&(ux.displayName="EnterOutlined");var tF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},nF=function(t,n){return C.createElement(Rn,ct({},t,{ref:n,icon:tF}))},dx=C.forwardRef(nF);process.env.NODE_ENV!=="production"&&(dx.displayName="InfoCircleOutlined");var rF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const iF={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-flex"},K3=C.forwardRef((e,t)=>{const n=u=>{const{keyCode:d}=u;d===Pe.ENTER&&u.preventDefault()},r=u=>{const{keyCode:d}=u,{onClick:f}=e;d===Pe.ENTER&&f&&f()},{style:i,noStyle:o,disabled:a,tabIndex:s=0}=e,l=rF(e,["style","noStyle","disabled","tabIndex"]);let c={};return o||(c=Object.assign({},iF)),a&&(c.pointerEvents="none"),c=Object.assign(Object.assign({},c),i),C.createElement("div",Object.assign({role:"button",tabIndex:s,ref:t},l,{onKeyDown:n,onKeyUp:r,style:c}))}),oF=(e,t,n,r)=>{const{titleMarginBottom:i,fontWeightStrong:o}=r;return{marginBottom:i,color:n,fontWeight:o,fontSize:e,lineHeight:t}},aF=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[`
317
317
  h${r}&,
318
318
  div&-h${r},
319
319
  div&-h${r} > textarea,
@@ -329,29 +329,29 @@ html body {
329
329
  ${t}-collapse,
330
330
  ${t}-edit,
331
331
  ${t}-copy
332
- `]:Object.assign(Object.assign({},Xb(e)),{marginInlineStart:e.marginXXS})}),cF(e)),uF(e)),dF()),{"&-rtl":{direction:"rtl"}})}},hF=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),fx=yr("Typography",e=>[fF(e)],hF),gF=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=C.createElement(ux,null)}=e,m=C.useRef(null),g=C.useRef(!1),v=C.useRef(),[b,y]=C.useState(l);C.useEffect(()=>{y(l)},[l]),C.useEffect(()=>{var T;if(!((T=m.current)===null||T===void 0)&&T.resizableTextArea){const{textArea:L}=m.current.resizableTextArea;L.focus();const{length:R}=L.value;L.setSelectionRange(R,R)}},[]);const x=T=>{let{target:L}=T;y(L.value.replace(/[\n\r]/g,""))},S=()=>{g.current=!0},w=()=>{g.current=!1},M=T=>{let{keyCode:L}=T;g.current||(v.current=L)},E=()=>{c(b.trim())},H=T=>{let{keyCode:L,ctrlKey:R,altKey:I,metaKey:P,shiftKey:N}=T;v.current===L&&!g.current&&!R&&!I&&!P&&!N&&(L===Pe.ENTER?(E(),d==null||d()):L===Pe.ESC&&u())},_=()=>{E()},O=f?`${t}-${f}`:"",[k,A,j]=fx(t),V=Me(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl"},r,O,A,j);return k(C.createElement("div",{className:V,style:i},C.createElement(_N,{ref:m,maxLength:a,value:b,onChange:x,onKeyDown:M,onKeyUp:H,onCompositionStart:S,onCompositionEnd:w,onBlur:_,"aria-label":n,rows:1,autoSize:s}),h!==null?jd(h,{className:`${t}-edit-content-confirm`}):null))};var vF=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},mF=vF,a8={"text/plain":"Text","text/html":"Url",default:"Text"},pF="Copy to clipboard: #{key}, Enter";function bF(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function yF(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{i=mF(),o=document.createRange(),a=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(u){if(u.stopPropagation(),t.format)if(u.preventDefault(),typeof u.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=a8[t.format]||a8.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=bF("message"in t?t.message:pF),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var CF=yF;const xF=xn(CF);var wF=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const SF=e=>{let{copyConfig:t,children:n}=e;const[r,i]=C.useState(!1),[o,a]=C.useState(!1),s=C.useRef(null),l=()=>{s.current&&clearTimeout(s.current)},c={};t.format&&(c.format=t.format),C.useEffect(()=>l,[]);const u=Wn(d=>wF(void 0,void 0,void 0,function*(){var f;d==null||d.preventDefault(),d==null||d.stopPropagation(),a(!0);try{const h=typeof t.text=="function"?yield t.text():t.text;xF(h||String(n)||"",c),a(!1),i(!0),l(),s.current=setTimeout(()=>{i(!1)},3e3),(f=t.onCopy)===null||f===void 0||f.call(t,d)}catch(h){throw a(!1),h}}));return{copied:r,copyLoading:o,onClick:u}};function N0(e,t){return C.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const $F=e=>{const t=$.useRef();return $.useEffect(()=>{t.current=e}),t.current},MF=(e,t)=>{const n=C.useRef(!1);C.useEffect(()=>{n.current?e():n.current=!0},t)};var _F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const o4=C.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=e,u=_F(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,typography:h}=C.useContext(Lt),m=l??f;let g=t;a&&(g=Ur(t,a)),process.env.NODE_ENV!=="production"&&Vn("Typography").deprecated(!a,"setContentRef","ref");const v=d("typography",n),[b,y,x]=fx(v),S=Me(v,h==null?void 0:h.className,{[`${v}-rtl`]:m==="rtl"},i,o,y,x),w=Object.assign(Object.assign({},h==null?void 0:h.style),c);return b(C.createElement(r,Object.assign({className:S,style:w,ref:g},u),s))});process.env.NODE_ENV!=="production"&&(o4.displayName="Typography");function s8(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Gu(e,t,n){return e===!0||e===void 0?t:e||n&&t}function HF(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),!(n.left<=r.left&&r.right<=n.right&&n.top<=r.top&&r.bottom<=n.bottom)}const EF=e=>{const{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:o,icon:a,loading:s,tabIndex:l,onCopy:c}=e,u=s8(o),d=s8(a),{copied:f,copy:h}=r??{},m=n?Gu(u[1],f):Gu(u[0],h),v=typeof m=="string"?m:n?f:h;return C.createElement(su,{key:"copy",title:m},C.createElement(K3,{className:Me(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":v,tabIndex:l},n?Gu(d[1],C.createElement(Gh,null),!0):Gu(d[0],s?C.createElement(Ld,null):C.createElement(sx,null),!0)))},Yu=C.forwardRef((e,t)=>{let{style:n,children:r}=e;const i=C.useRef(null);return C.useImperativeHandle(t,()=>({isExceed:()=>{const o=i.current;return o.scrollHeight>o.clientHeight},getHeight:()=>i.current.clientHeight})),C.createElement("span",{"aria-hidden":!0,ref:i,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},r)});function hx(e){const t=typeof e;return t==="string"||t==="number"}function VF(e){let t=0;return e.forEach(n=>{hx(n)?t+=String(n).length:t+=1}),t}function l8(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],s=hx(o)?String(o).length:1,l=n+s;if(l>t){const c=t-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return e}const F0=0,D0=1,z0=2,B0=3,c8=4,Ku={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function OF(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=e,c=C.useMemo(()=>Vr(r),[r]),u=C.useMemo(()=>VF(c),[r]),d=C.useMemo(()=>i(c,!1),[r]),[f,h]=C.useState(null),m=C.useRef(null),g=C.useRef(null),v=C.useRef(null),b=C.useRef(null),y=C.useRef(null),[x,S]=C.useState(!1),[w,M]=C.useState(F0),[E,H]=C.useState(0),[_,O]=C.useState(null);en(()=>{M(t&&n&&u?D0:F0)},[n,r,o,t,c]),en(()=>{var V,T,L,R;if(w===D0){M(z0);const I=g.current&&getComputedStyle(g.current).whiteSpace;O(I)}else if(w===z0){const I=!!(!((V=v.current)===null||V===void 0)&&V.isExceed());M(I?B0:c8),h(I?[0,u]:null),S(I);const P=((T=v.current)===null||T===void 0?void 0:T.getHeight())||0,N=o===1?0:((L=b.current)===null||L===void 0?void 0:L.getHeight())||0,z=((R=y.current)===null||R===void 0?void 0:R.getHeight())||0,q=N+z,G=Math.max(P,q);H(G+1),l(I)}},[w]);const k=f?Math.ceil((f[0]+f[1])/2):0;en(()=>{var V;const[T,L]=f||[0,0];if(T!==L){const I=(((V=m.current)===null||V===void 0?void 0:V.getHeight())||0)>E;let P=k;L-T===1&&(P=I?T:L),h(I?[T,P]:[P,L])}},[f,k]);const A=C.useMemo(()=>{if(!t)return i(c,!1);if(w!==B0||!f||f[0]!==f[1]){const V=i(c,!1);return w!==c8&&w!==F0?C.createElement("span",{style:Object.assign(Object.assign({},Ku),{WebkitLineClamp:o})},V):V}return i(a?c:l8(c,f[0]),x)},[a,w,f,c].concat(dt(s))),j={width:n,margin:0,padding:0,whiteSpace:_==="nowrap"?"normal":"inherit"};return C.createElement(C.Fragment,null,A,w===z0&&C.createElement(C.Fragment,null,C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:o}),ref:v},d),C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:o-1}),ref:b},d),C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:1}),ref:y},i([],!0))),w===B0&&f&&f[0]!==f[1]&&C.createElement(Yu,{style:Object.assign(Object.assign({},j),{top:400}),ref:m},i(l8(c,k),!0)),w===D0&&C.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const gx=e=>{let{enableEllipsis:t,isEllipsis:n,children:r,tooltipProps:i}=e;return!(i!=null&&i.title)||!t?r:C.createElement(su,Object.assign({open:n?void 0:!1},i),r)};process.env.NODE_ENV!=="production"&&(gx.displayName="EllipsisTooltip");var RF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function TF(e,t){let{mark:n,code:r,underline:i,delete:o,strong:a,keyboard:s,italic:l}=e,c=t;function u(d,f){f&&(c=C.createElement(d,{},c))}return u("strong",a),u("u",i),u("del",o),u("code",r),u("mark",n),u("kbd",s),u("i",l),c}const kF="...",Gd=C.forwardRef((e,t)=>{var n,r,i;const{prefixCls:o,className:a,style:s,type:l,disabled:c,children:u,ellipsis:d,editable:f,copyable:h,component:m,title:g}=e,v=RF(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:b,direction:y}=C.useContext(Lt),[x]=Lb("Text"),S=C.useRef(null),w=C.useRef(null),M=b("typography",o),E=Tr(v,["mark","code","delete","underline","strong","keyboard","italic"]),[H,_]=N0(f),[O,k]=Zn(!1,{value:_.editing}),{triggerType:A=["icon"]}=_,j=de=>{var He;de&&((He=_.onStart)===null||He===void 0||He.call(_)),k(de)},V=$F(O);MF(()=>{var de;!O&&V&&((de=w.current)===null||de===void 0||de.focus())},[O]);const T=de=>{de==null||de.preventDefault(),j(!0)},L=de=>{var He;(He=_.onChange)===null||He===void 0||He.call(_,de),j(!1)},R=()=>{var de;(de=_.onCancel)===null||de===void 0||de.call(_),j(!1)},[I,P]=N0(h),{copied:N,copyLoading:z,onClick:q}=SF({copyConfig:P,children:u}),[G,Y]=C.useState(!1),[ee,Q]=C.useState(!1),[K,J]=C.useState(!1),[W,Z]=C.useState(!1),[U,F]=C.useState(!0),[re,B]=N0(d,{expandable:!1,symbol:de=>de?x==null?void 0:x.collapse:x==null?void 0:x.expand}),[ie,oe]=Zn(B.defaultExpanded||!1,{value:B.expanded}),ve=re&&(!ie||B.expandable==="collapsible"),{rows:Ce=1}=B,pe=C.useMemo(()=>ve&&(B.suffix!==void 0||B.onEllipsis||B.expandable||H||I),[ve,B,H,I]);en(()=>{re&&!pe&&(Y(u9("webkitLineClamp")),Q(u9("textOverflow")))},[pe,re]);const[ye,Se]=C.useState(ve),me=C.useMemo(()=>pe?!1:Ce===1?ee:G,[pe,ee,G]);en(()=>{Se(me&&ve)},[me,ve]);const ge=ve&&(ye?W:K),ce=ve&&Ce===1&&ye,$e=ve&&Ce>1&&ye,he=(de,He)=>{var Ke;oe(He.expanded),(Ke=B.onExpand)===null||Ke===void 0||Ke.call(B,de,He)},[Ae,Ie]=C.useState(0),Re=de=>{let{offsetWidth:He}=de;Ie(He)},ke=de=>{var He;J(de),K!==de&&((He=B.onEllipsis)===null||He===void 0||He.call(B,de))};C.useEffect(()=>{const de=S.current;if(re&&ye&&de){const He=HF(de);W!==He&&Z(He)}},[re,ye,u,$e,U,Ae]),C.useEffect(()=>{const de=S.current;if(typeof IntersectionObserver>"u"||!de||!ye||!ve)return;const He=new IntersectionObserver(()=>{F(!!de.offsetParent)});return He.observe(de),()=>{He.disconnect()}},[ye,ve]);let Ye={};B.tooltip===!0?Ye={title:(n=_.text)!==null&&n!==void 0?n:u}:C.isValidElement(B.tooltip)?Ye={title:B.tooltip}:typeof B.tooltip=="object"?Ye=Object.assign({title:(r=_.text)!==null&&r!==void 0?r:u},B.tooltip):Ye={title:B.tooltip};const Xe=C.useMemo(()=>{const de=He=>["string","number"].includes(typeof He);if(!(!re||ye)){if(de(_.text))return _.text;if(de(u))return u;if(de(g))return g;if(de(Ye.title))return Ye.title}},[re,ye,g,Ye.title,ge]);if(O)return C.createElement(gF,{value:(i=_.text)!==null&&i!==void 0?i:typeof u=="string"?u:"",onSave:L,onCancel:R,onEnd:_.onEnd,prefixCls:M,className:a,style:s,direction:y,component:m,maxLength:_.maxLength,autoSize:_.autoSize,enterIcon:_.enterIcon});const Fe=()=>{const{expandable:de,symbol:He}=B;return de?C.createElement(K3,{key:"expand",className:`${M}-${ie?"collapse":"expand"}`,onClick:Ke=>he(Ke,{expanded:!ie}),"aria-label":ie?x.collapse:x==null?void 0:x.expand},typeof He=="function"?He(ie):He):null},je=()=>{if(!H)return;const{icon:de,tooltip:He,tabIndex:Ke}=_,nt=Vr(He)[0]||(x==null?void 0:x.edit),Ne=typeof nt=="string"?nt:"";return A.includes("icon")?C.createElement(su,{key:"edit",title:He===!1?"":nt},C.createElement(K3,{ref:w,className:`${M}-edit`,onClick:T,"aria-label":Ne,tabIndex:Ke},de||C.createElement(cx,{role:"button"}))):null},Qe=()=>I?C.createElement(EF,Object.assign({key:"copy"},P,{prefixCls:M,copied:N,locale:x,onCopy:q,loading:z,iconOnly:u==null})):null,Ze=de=>[de&&Fe(),je(),Qe()],qe=de=>[de&&!ie&&C.createElement("span",{"aria-hidden":!0,key:"ellipsis"},kF),B.suffix,Ze(de)];return C.createElement(Hr,{onResize:Re,disabled:!ve},de=>C.createElement(gx,{tooltipProps:Ye,enableEllipsis:ve,isEllipsis:ge},C.createElement(o4,Object.assign({className:Me({[`${M}-${l}`]:l,[`${M}-disabled`]:c,[`${M}-ellipsis`]:re,[`${M}-ellipsis-single-line`]:ce,[`${M}-ellipsis-multiple-line`]:$e},a),prefixCls:o,style:Object.assign(Object.assign({},s),{WebkitLineClamp:$e?Ce:void 0}),component:m,ref:Ur(de,S,t),direction:y,onClick:A.includes("text")?T:void 0,"aria-label":Xe==null?void 0:Xe.toString(),title:g},E),C.createElement(OF,{enableMeasure:ve&&!ye,text:u,rows:Ce,width:Ae,onEllipsis:ke,expanded:ie,miscDeps:[N,ie,z,H,I]},(He,Ke)=>TF(e,C.createElement(C.Fragment,null,He.length>0&&Ke&&!ie&&Xe?C.createElement("span",{key:"show-content","aria-hidden":!0},He):He,qe(Ke)))))))});var jF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const LF=C.forwardRef((e,t)=>{var{ellipsis:n,rel:r}=e,i=jF(e,["ellipsis","rel"]);if(process.env.NODE_ENV!=="production"){const a=Vn("Typography.Link");process.env.NODE_ENV!=="production"&&a(typeof n!="object","usage","`ellipsis` only supports boolean value.")}const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,C.createElement(Gd,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),PF=C.forwardRef((e,t)=>C.createElement(Gd,Object.assign({ref:t},e,{component:"div"})));var IF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const AF=(e,t)=>{var{ellipsis:n}=e,r=IF(e,["ellipsis"]);const i=C.useMemo(()=>n&&typeof n=="object"?Tr(n,["expandable","rows"]):n,[n]);if(process.env.NODE_ENV!=="production"){const o=Vn("Typography.Text");process.env.NODE_ENV!=="production"&&o(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props.")}return C.createElement(Gd,Object.assign({ref:t},r,{ellipsis:i,component:"span"}))},NF=C.forwardRef(AF);var FF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const u8=[1,2,3,4,5],DF=C.forwardRef((e,t)=>{const{level:n=1}=e,r=FF(e,["level"]);let i;if(process.env.NODE_ENV!=="production"){const o=Vn("Typography.Title");process.env.NODE_ENV!=="production"&&o(u8.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.")}return u8.includes(n)?i=`h${n}`:i="h1",C.createElement(Gd,Object.assign({ref:t},r,{component:i}))}),bo=o4;bo.Text=NF;bo.Link=LF;bo.Title=DF;bo.Paragraph=PF;const zF=yt(ru)`
332
+ `]:Object.assign(Object.assign({},Xb(e)),{marginInlineStart:e.marginXXS})}),cF(e)),uF(e)),dF()),{"&-rtl":{direction:"rtl"}})}},hF=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),fx=yr("Typography",e=>[fF(e)],hF),gF=e=>{const{prefixCls:t,"aria-label":n,className:r,style:i,direction:o,maxLength:a,autoSize:s=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:f,enterIcon:h=C.createElement(ux,null)}=e,m=C.useRef(null),g=C.useRef(!1),v=C.useRef(),[b,y]=C.useState(l);C.useEffect(()=>{y(l)},[l]),C.useEffect(()=>{var T;if(!((T=m.current)===null||T===void 0)&&T.resizableTextArea){const{textArea:L}=m.current.resizableTextArea;L.focus();const{length:R}=L.value;L.setSelectionRange(R,R)}},[]);const x=T=>{let{target:L}=T;y(L.value.replace(/[\n\r]/g,""))},S=()=>{g.current=!0},w=()=>{g.current=!1},M=T=>{let{keyCode:L}=T;g.current||(v.current=L)},E=()=>{c(b.trim())},H=T=>{let{keyCode:L,ctrlKey:R,altKey:I,metaKey:P,shiftKey:N}=T;v.current===L&&!g.current&&!R&&!I&&!P&&!N&&(L===Pe.ENTER?(E(),d==null||d()):L===Pe.ESC&&u())},_=()=>{E()},O=f?`${t}-${f}`:"",[k,A,j]=fx(t),V=Me(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl"},r,O,A,j);return k(C.createElement("div",{className:V,style:i},C.createElement(_N,{ref:m,maxLength:a,value:b,onChange:x,onKeyDown:M,onKeyUp:H,onCompositionStart:S,onCompositionEnd:w,onBlur:_,"aria-label":n,rows:1,autoSize:s}),h!==null?jd(h,{className:`${t}-edit-content-confirm`}):null))};var vF=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(i){e.addRange(i)}),t&&t.focus()}},mF=vF,a8={"text/plain":"Text","text/html":"Url",default:"Text"},pF="Copy to clipboard: #{key}, Enter";function bF(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function yF(e,t){var n,r,i,o,a,s,l=!1;t||(t={}),n=t.debug||!1;try{i=mF(),o=document.createRange(),a=document.getSelection(),s=document.createElement("span"),s.textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",function(u){if(u.stopPropagation(),t.format)if(u.preventDefault(),typeof u.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=a8[t.format]||a8.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(s),o.selectNodeContents(s),a.addRange(o);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){n&&console.error("unable to copy using execCommand: ",u),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=bF("message"in t?t.message:pF),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(o):a.removeAllRanges()),s&&document.body.removeChild(s),i()}return l}var CF=yF;const xF=xn(CF);var wF=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?o(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})};const SF=e=>{let{copyConfig:t,children:n}=e;const[r,i]=C.useState(!1),[o,a]=C.useState(!1),s=C.useRef(null),l=()=>{s.current&&clearTimeout(s.current)},c={};t.format&&(c.format=t.format),C.useEffect(()=>l,[]);const u=Wn(d=>wF(void 0,void 0,void 0,function*(){var f;d==null||d.preventDefault(),d==null||d.stopPropagation(),a(!0);try{const h=typeof t.text=="function"?yield t.text():t.text;xF(h||String(n)||"",c),a(!1),i(!0),l(),s.current=setTimeout(()=>{i(!1)},3e3),(f=t.onCopy)===null||f===void 0||f.call(t,d)}catch(h){throw a(!1),h}}));return{copied:r,copyLoading:o,onClick:u}};function N0(e,t){return C.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const $F=e=>{const t=$.useRef();return $.useEffect(()=>{t.current=e}),t.current},MF=(e,t)=>{const n=C.useRef(!1);C.useEffect(()=>{n.current?e():n.current=!0},t)};var _F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const o4=C.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:i,rootClassName:o,setContentRef:a,children:s,direction:l,style:c}=e,u=_F(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:d,direction:f,typography:h}=C.useContext(Lt),m=l??f;let g=t;a&&(g=Ur(t,a)),process.env.NODE_ENV!=="production"&&Vn("Typography").deprecated(!a,"setContentRef","ref");const v=d("typography",n),[b,y,x]=fx(v),S=Me(v,h==null?void 0:h.className,{[`${v}-rtl`]:m==="rtl"},i,o,y,x),w=Object.assign(Object.assign({},h==null?void 0:h.style),c);return b(C.createElement(r,Object.assign({className:S,style:w,ref:g},u),s))});process.env.NODE_ENV!=="production"&&(o4.displayName="Typography");function s8(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Gu(e,t,n){return e===!0||e===void 0?t:e||n&&t}function HF(e){const t=document.createElement("em");e.appendChild(t),process.env.NODE_ENV!=="production"&&(t.className="ant-typography-css-ellipsis-content-measure");const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),!(n.left<=r.left&&r.right<=n.right&&n.top<=r.top&&r.bottom<=n.bottom)}const EF=e=>{const{prefixCls:t,copied:n,locale:r,iconOnly:i,tooltips:o,icon:a,loading:s,tabIndex:l,onCopy:c}=e,u=s8(o),d=s8(a),{copied:f,copy:h}=r??{},m=n?Gu(u[1],f):Gu(u[0],h),v=typeof m=="string"?m:n?f:h;return C.createElement(su,{key:"copy",title:m},C.createElement(K3,{className:Me(`${t}-copy`,{[`${t}-copy-success`]:n,[`${t}-copy-icon-only`]:i}),onClick:c,"aria-label":v,tabIndex:l},n?Gu(d[1],C.createElement(Gh,null),!0):Gu(d[0],s?C.createElement(Ld,null):C.createElement(sx,null),!0)))},Yu=C.forwardRef((e,t)=>{let{style:n,children:r}=e;const i=C.useRef(null);return C.useImperativeHandle(t,()=>({isExceed:()=>{const o=i.current;return o.scrollHeight>o.clientHeight},getHeight:()=>i.current.clientHeight})),C.createElement("span",{"aria-hidden":!0,ref:i,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},n)},r)});function hx(e){const t=typeof e;return t==="string"||t==="number"}function VF(e){let t=0;return e.forEach(n=>{hx(n)?t+=String(n).length:t+=1}),t}function l8(e,t){let n=0;const r=[];for(let i=0;i<e.length;i+=1){if(n===t)return r;const o=e[i],s=hx(o)?String(o).length:1,l=n+s;if(l>t){const c=t-n;return r.push(String(o).slice(0,c)),r}r.push(o),n=l}return e}const F0=0,D0=1,z0=2,B0=3,c8=4,Ku={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function OF(e){const{enableMeasure:t,width:n,text:r,children:i,rows:o,expanded:a,miscDeps:s,onEllipsis:l}=e,c=C.useMemo(()=>Vr(r),[r]),u=C.useMemo(()=>VF(c),[r]),d=C.useMemo(()=>i(c,!1),[r]),[f,h]=C.useState(null),m=C.useRef(null),g=C.useRef(null),v=C.useRef(null),b=C.useRef(null),y=C.useRef(null),[x,S]=C.useState(!1),[w,M]=C.useState(F0),[E,H]=C.useState(0),[_,O]=C.useState(null);en(()=>{M(t&&n&&u?D0:F0)},[n,r,o,t,c]),en(()=>{var V,T,L,R;if(w===D0){M(z0);const I=g.current&&getComputedStyle(g.current).whiteSpace;O(I)}else if(w===z0){const I=!!(!((V=v.current)===null||V===void 0)&&V.isExceed());M(I?B0:c8),h(I?[0,u]:null),S(I);const P=((T=v.current)===null||T===void 0?void 0:T.getHeight())||0,N=o===1?0:((L=b.current)===null||L===void 0?void 0:L.getHeight())||0,z=((R=y.current)===null||R===void 0?void 0:R.getHeight())||0,q=N+z,G=Math.max(P,q);H(G+1),l(I)}},[w]);const k=f?Math.ceil((f[0]+f[1])/2):0;en(()=>{var V;const[T,L]=f||[0,0];if(T!==L){const I=(((V=m.current)===null||V===void 0?void 0:V.getHeight())||0)>E;let P=k;L-T===1&&(P=I?T:L),h(I?[T,P]:[P,L])}},[f,k]);const A=C.useMemo(()=>{if(!t)return i(c,!1);if(w!==B0||!f||f[0]!==f[1]){const V=i(c,!1);return w!==c8&&w!==F0?C.createElement("span",{style:Object.assign(Object.assign({},Ku),{WebkitLineClamp:o})},V):V}return i(a?c:l8(c,f[0]),x)},[a,w,f,c].concat(dt(s))),j={width:n,margin:0,padding:0,whiteSpace:_==="nowrap"?"normal":"inherit"};return C.createElement(C.Fragment,null,A,w===z0&&C.createElement(C.Fragment,null,C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:o}),ref:v},d),C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:o-1}),ref:b},d),C.createElement(Yu,{style:Object.assign(Object.assign(Object.assign({},j),Ku),{WebkitLineClamp:1}),ref:y},i([],!0))),w===B0&&f&&f[0]!==f[1]&&C.createElement(Yu,{style:Object.assign(Object.assign({},j),{top:400}),ref:m},i(l8(c,k),!0)),w===D0&&C.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const gx=e=>{let{enableEllipsis:t,isEllipsis:n,children:r,tooltipProps:i}=e;return!(i!=null&&i.title)||!t?r:C.createElement(su,Object.assign({open:n?void 0:!1},i),r)};process.env.NODE_ENV!=="production"&&(gx.displayName="EllipsisTooltip");var RF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function TF(e,t){let{mark:n,code:r,underline:i,delete:o,strong:a,keyboard:s,italic:l}=e,c=t;function u(d,f){f&&(c=C.createElement(d,{},c))}return u("strong",a),u("u",i),u("del",o),u("code",r),u("mark",n),u("kbd",s),u("i",l),c}const kF="...",Gd=C.forwardRef((e,t)=>{var n,r,i;const{prefixCls:o,className:a,style:s,type:l,disabled:c,children:u,ellipsis:d,editable:f,copyable:h,component:m,title:g}=e,v=RF(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:b,direction:y}=C.useContext(Lt),[x]=Lb("Text"),S=C.useRef(null),w=C.useRef(null),M=b("typography",o),E=Tr(v,["mark","code","delete","underline","strong","keyboard","italic"]),[H,_]=N0(f),[O,k]=Zn(!1,{value:_.editing}),{triggerType:A=["icon"]}=_,j=de=>{var He;de&&((He=_.onStart)===null||He===void 0||He.call(_)),k(de)},V=$F(O);MF(()=>{var de;!O&&V&&((de=w.current)===null||de===void 0||de.focus())},[O]);const T=de=>{de==null||de.preventDefault(),j(!0)},L=de=>{var He;(He=_.onChange)===null||He===void 0||He.call(_,de),j(!1)},R=()=>{var de;(de=_.onCancel)===null||de===void 0||de.call(_),j(!1)},[I,P]=N0(h),{copied:N,copyLoading:z,onClick:q}=SF({copyConfig:P,children:u}),[G,Y]=C.useState(!1),[ee,Q]=C.useState(!1),[K,J]=C.useState(!1),[W,Z]=C.useState(!1),[U,F]=C.useState(!0),[re,B]=N0(d,{expandable:!1,symbol:de=>de?x==null?void 0:x.collapse:x==null?void 0:x.expand}),[ie,oe]=Zn(B.defaultExpanded||!1,{value:B.expanded}),ve=re&&(!ie||B.expandable==="collapsible"),{rows:Ce=1}=B,pe=C.useMemo(()=>ve&&(B.suffix!==void 0||B.onEllipsis||B.expandable||H||I),[ve,B,H,I]);en(()=>{re&&!pe&&(Y(u9("webkitLineClamp")),Q(u9("textOverflow")))},[pe,re]);const[ye,Se]=C.useState(ve),me=C.useMemo(()=>pe?!1:Ce===1?ee:G,[pe,ee,G]);en(()=>{Se(me&&ve)},[me,ve]);const ge=ve&&(ye?W:K),ce=ve&&Ce===1&&ye,$e=ve&&Ce>1&&ye,he=(de,He)=>{var Ke;oe(He.expanded),(Ke=B.onExpand)===null||Ke===void 0||Ke.call(B,de,He)},[Ae,Ie]=C.useState(0),Re=de=>{let{offsetWidth:He}=de;Ie(He)},ke=de=>{var He;J(de),K!==de&&((He=B.onEllipsis)===null||He===void 0||He.call(B,de))};C.useEffect(()=>{const de=S.current;if(re&&ye&&de){const He=HF(de);W!==He&&Z(He)}},[re,ye,u,$e,U,Ae]),C.useEffect(()=>{const de=S.current;if(typeof IntersectionObserver>"u"||!de||!ye||!ve)return;const He=new IntersectionObserver(()=>{F(!!de.offsetParent)});return He.observe(de),()=>{He.disconnect()}},[ye,ve]);let Ye={};B.tooltip===!0?Ye={title:(n=_.text)!==null&&n!==void 0?n:u}:C.isValidElement(B.tooltip)?Ye={title:B.tooltip}:typeof B.tooltip=="object"?Ye=Object.assign({title:(r=_.text)!==null&&r!==void 0?r:u},B.tooltip):Ye={title:B.tooltip};const Xe=C.useMemo(()=>{const de=He=>["string","number"].includes(typeof He);if(!(!re||ye)){if(de(_.text))return _.text;if(de(u))return u;if(de(g))return g;if(de(Ye.title))return Ye.title}},[re,ye,g,Ye.title,ge]);if(O)return C.createElement(gF,{value:(i=_.text)!==null&&i!==void 0?i:typeof u=="string"?u:"",onSave:L,onCancel:R,onEnd:_.onEnd,prefixCls:M,className:a,style:s,direction:y,component:m,maxLength:_.maxLength,autoSize:_.autoSize,enterIcon:_.enterIcon});const Fe=()=>{const{expandable:de,symbol:He}=B;return de?C.createElement(K3,{key:"expand",className:`${M}-${ie?"collapse":"expand"}`,onClick:Ke=>he(Ke,{expanded:!ie}),"aria-label":ie?x.collapse:x==null?void 0:x.expand},typeof He=="function"?He(ie):He):null},je=()=>{if(!H)return;const{icon:de,tooltip:He,tabIndex:Ke}=_,nt=Vr(He)[0]||(x==null?void 0:x.edit),Ne=typeof nt=="string"?nt:"";return A.includes("icon")?C.createElement(su,{key:"edit",title:He===!1?"":nt},C.createElement(K3,{ref:w,className:`${M}-edit`,onClick:T,"aria-label":Ne,tabIndex:Ke},de||C.createElement(cx,{role:"button"}))):null},Qe=()=>I?C.createElement(EF,Object.assign({key:"copy"},P,{prefixCls:M,copied:N,locale:x,onCopy:q,loading:z,iconOnly:u==null})):null,Ze=de=>[de&&Fe(),je(),Qe()],qe=de=>[de&&!ie&&C.createElement("span",{"aria-hidden":!0,key:"ellipsis"},kF),B.suffix,Ze(de)];return C.createElement(Hr,{onResize:Re,disabled:!ve},de=>C.createElement(gx,{tooltipProps:Ye,enableEllipsis:ve,isEllipsis:ge},C.createElement(o4,Object.assign({className:Me({[`${M}-${l}`]:l,[`${M}-disabled`]:c,[`${M}-ellipsis`]:re,[`${M}-ellipsis-single-line`]:ce,[`${M}-ellipsis-multiple-line`]:$e},a),prefixCls:o,style:Object.assign(Object.assign({},s),{WebkitLineClamp:$e?Ce:void 0}),component:m,ref:Ur(de,S,t),direction:y,onClick:A.includes("text")?T:void 0,"aria-label":Xe==null?void 0:Xe.toString(),title:g},E),C.createElement(OF,{enableMeasure:ve&&!ye,text:u,rows:Ce,width:Ae,onEllipsis:ke,expanded:ie,miscDeps:[N,ie,z,H,I]},(He,Ke)=>TF(e,C.createElement(C.Fragment,null,He.length>0&&Ke&&!ie&&Xe?C.createElement("span",{key:"show-content","aria-hidden":!0},He):He,qe(Ke)))))))});var jF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const LF=C.forwardRef((e,t)=>{var{ellipsis:n,rel:r}=e,i=jF(e,["ellipsis","rel"]);if(process.env.NODE_ENV!=="production"){const a=Vn("Typography.Link");process.env.NODE_ENV!=="production"&&a(typeof n!="object","usage","`ellipsis` only supports boolean value.")}const o=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return delete o.navigate,C.createElement(Gd,Object.assign({},o,{ref:t,ellipsis:!!n,component:"a"}))}),PF=C.forwardRef((e,t)=>C.createElement(Gd,Object.assign({ref:t},e,{component:"div"})));var IF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const AF=(e,t)=>{var{ellipsis:n}=e,r=IF(e,["ellipsis"]);const i=C.useMemo(()=>n&&typeof n=="object"?Tr(n,["expandable","rows"]):n,[n]);if(process.env.NODE_ENV!=="production"){const o=Vn("Typography.Text");process.env.NODE_ENV!=="production"&&o(typeof n!="object"||!n||!("expandable"in n)&&!("rows"in n),"usage","`ellipsis` do not support `expandable` or `rows` props.")}return C.createElement(Gd,Object.assign({ref:t},r,{ellipsis:i,component:"span"}))},NF=C.forwardRef(AF);var FF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const u8=[1,2,3,4,5],DF=C.forwardRef((e,t)=>{const{level:n=1}=e,r=FF(e,["level"]);let i;if(process.env.NODE_ENV!=="production"){const o=Vn("Typography.Title");process.env.NODE_ENV!=="production"&&o(u8.includes(n),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.")}return u8.includes(n)?i=`h${n}`:i="h1",C.createElement(Gd,Object.assign({ref:t},r,{component:i}))}),bo=o4;bo.Text=NF;bo.Link=LF;bo.Title=DF;bo.Paragraph=PF;const zF=Ct(ru)`
333
333
  border-radius: var(--gf-radius-sm);
334
- ${e=>e.type==="primary"&&yt.css`
334
+ ${e=>e.type==="primary"&&Ct.css`
335
335
  background: var(--gf-color-button-primary);
336
336
  `}
337
- `,a4=({type:e="default",disabled:t=!1,onClick:n,...r})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(zF,{type:e,disabled:t,onClick:n,...r})]}),vx=({disabled:e=!1,onClick:t,...n})=>p.jsx(p.Fragment,{children:p.jsx(a4,{type:"default",disabled:e,onClick:t,icon:p.jsx(lx,{}),iconPosition:"start",children:"Download",...n})}),mx=({disabled:e=!1,open:t,onClick:n,...r})=>p.jsx(p.Fragment,{children:p.jsx(a4,{type:"link",disabled:e,onClick:n,icon:t?p.jsx(XC,{}):p.jsx(Yh,{}),iconPosition:"end",...r})}),BF=yt(uu.Group)`
338
- `,WF=yt(uu.Button)`
337
+ `,a4=({type:e="default",disabled:t=!1,onClick:n,...r})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(zF,{type:e,disabled:t,onClick:n,...r})]}),vx=({disabled:e=!1,onClick:t,...n})=>p.jsx(p.Fragment,{children:p.jsx(a4,{type:"default",disabled:e,onClick:t,icon:p.jsx(lx,{}),iconPosition:"start",children:"Download",...n})}),mx=({disabled:e=!1,open:t,onClick:n,...r})=>p.jsx(p.Fragment,{children:p.jsx(a4,{type:"link",disabled:e,onClick:n,icon:t?p.jsx(XC,{}):p.jsx(Yh,{}),iconPosition:"end",...r})}),BF=Ct(uu.Group)`
338
+ `,WF=Ct(uu.Button)`
339
339
  height: 24px;
340
340
  font: var(--gf-label-md-default);
341
341
  color: --gf-color-text-primary;
342
- `,ZF=({content:e,handler:t,disabled:n=!1,...r})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(Wo,{theme:{components:{Radio:{borderRadius:2,colorBorder:"#EAECF0",colorPrimary:"#152BEE"}}},children:p.jsx(BF,{disabled:n,onChange:t,defaultValue:0,...r,children:e.map(i=>p.jsx(WF,{value:i.key,disabled:i.disabled,children:i.label},`gf-control-button-${i.key}`))})})]}),UF=yt(Ud)`
342
+ `,ZF=({content:e,handler:t,disabled:n=!1,...r})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(Wo,{theme:{components:{Radio:{borderRadius:2,colorBorder:"#EAECF0",colorPrimary:"#152BEE"}}},children:p.jsx(BF,{disabled:n,onChange:t,defaultValue:0,...r,children:e.map(i=>p.jsx(WF,{value:i.key,disabled:i.disabled,children:i.label},`gf-control-button-${i.key}`))})})]}),UF=Ct(Ud)`
343
343
  border-radius: var(--gf-radius-sm);
344
344
  border-color: var(--gf-color-border-base);
345
- ${e=>e.cardtype==="default"&&yt.css`
345
+ ${e=>e.cardtype==="default"&&Ct.css`
346
346
  background: var(--gf-color-bg-base);
347
347
  `}
348
- ${e=>e.cardtype==="grey"&&yt.css`
348
+ ${e=>e.cardtype==="grey"&&Ct.css`
349
349
  background: var(--gf-color-bg-tertiary);
350
350
  `}
351
- ${e=>e.cardtype==="debug"&&yt.css`
351
+ ${e=>e.cardtype==="debug"&&Ct.css`
352
352
  background: var(--gf-color-bg-debug);
353
353
  `}
354
- `,du=({cardtype:e,padding:t=32,...n})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(UF,{cardtype:e,styles:{header:{padding:t},body:{padding:t}},...n})]}),{Text:px}=bo,bx=yt(du)`
354
+ `,du=({cardtype:e,padding:t=32,...n})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(UF,{cardtype:e,styles:{header:{padding:t},body:{padding:t}},...n})]}),{Text:px}=bo,bx=Ct(du)`
355
355
  &:hover {
356
356
  cursor: pointer;
357
357
  border: 1px solid var(--gf-color-primary-hover);
@@ -361,87 +361,87 @@ html body {
361
361
  svg:hover {
362
362
  fill: var(--gf-color-primary-hover);
363
363
  }
364
- `,qF=yt(px)`
364
+ `,qF=Ct(px)`
365
365
  font: var(--gf-header-h5);
366
366
  ${bx}:hover & {
367
367
  color: var(--gf-color-primary-hover);
368
368
  }
369
- `,GF=yt(px)`
369
+ `,GF=Ct(px)`
370
370
  font: var(--gf-label-md-default);
371
371
  color: var(--gf-color-text-secondary);
372
- `,YF=({disabled:e=!1,icon:t=dx,title:n="Title",description:r,onClick:i,...o})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(bx,{onClick:i,padding:24,cardtype:"default",...o,children:[p.jsxs(ho,{gutter:16,children:[p.jsx(br,{span:1,children:t}),p.jsx(br,{span:23,children:p.jsx(qF,{children:n})})]}),p.jsxs(ho,{gutter:16,children:[p.jsx(br,{span:1}),p.jsx(br,{span:23,children:p.jsx(GF,{children:r})})]})]})]}),{Text:yx}=bo,KF=yt(yx)`
372
+ `,YF=({disabled:e=!1,icon:t=dx,title:n="Title",description:r,onClick:i,...o})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(bx,{onClick:i,padding:24,cardtype:"default",...o,children:[p.jsxs(ho,{gutter:16,children:[p.jsx(br,{span:1,children:t}),p.jsx(br,{span:23,children:p.jsx(qF,{children:n})})]}),p.jsxs(ho,{gutter:16,children:[p.jsx(br,{span:1}),p.jsx(br,{span:23,children:p.jsx(GF,{children:r})})]})]})]}),{Text:yx}=bo,KF=Ct(yx)`
373
373
  color: var(--gf-color-text-primary) !important;
374
- ${e=>e.type==="primary"&&yt.css`
374
+ ${e=>e.type==="primary"&&Ct.css`
375
375
  font: var(--gf-header-h2);
376
376
  `}
377
- ${e=>e.type==="secondary"&&yt.css`
377
+ ${e=>e.type==="secondary"&&Ct.css`
378
378
  font: var(--gf-header-h4);
379
379
  font-weight: bold;
380
380
  `}
381
- ${e=>e.type==="header"&&yt.css`
381
+ ${e=>e.type==="header"&&Ct.css`
382
382
  font: var(--gf-header-h1);
383
383
  `}
384
- `,XF=yt(yx)`
385
- ${e=>e.type==="primary"&&yt.css`
384
+ `,XF=Ct(yx)`
385
+ ${e=>e.type==="primary"&&Ct.css`
386
386
  font: var(--gf-label-xl-default);
387
387
  color: var(--gf-color-text-primary) !important;
388
388
  `}
389
- ${e=>e.type==="secondary"&&yt.css`
389
+ ${e=>e.type==="secondary"&&Ct.css`
390
390
  font: var(--gf-label-lg-default);
391
391
  color: var(--gf-color-text-secondary) !important;
392
392
  `}
393
- ${e=>e.type==="header"&&yt.css`
393
+ ${e=>e.type==="header"&&Ct.css`
394
394
  font: var(--gf-label-xl-default);
395
395
  color: var(--gf-color-text-secondary) !important;
396
396
  `}
397
- `,Cx=({title:e,subtitle:t,type:n="primary",align:r="start"})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(qd,{className:"gf-full-width",direction:"vertical",size:8,align:r,children:[p.jsx(KF,{type:n,children:e}),p.jsx(XF,{type:n,children:t})]})]}),{Text:QF}=bo,JF=yt(du)`
397
+ `,Cx=({title:e,subtitle:t,type:n="primary",align:r="start"})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(qd,{className:"gf-full-width",direction:"vertical",size:8,align:r,children:[p.jsx(KF,{type:n,children:e}),p.jsx(XF,{type:n,children:t})]})]}),{Text:QF}=bo,JF=Ct(du)`
398
398
  border-radius: var(--gf-radius-sm);
399
399
  border-color: var(--gf-color-border-base);
400
- ${e=>e.cardtype==="default"&&yt.css`
400
+ ${e=>e.cardtype==="default"&&Ct.css`
401
401
  background: var(--gf-color-bg-base);
402
402
  `}
403
- ${e=>e.cardtype==="grey"&&yt.css`
403
+ ${e=>e.cardtype==="grey"&&Ct.css`
404
404
  background: var(--gf-color-bg-tertiary);
405
405
  `}
406
- ${e=>e.cardtype==="debug"&&yt.css`
406
+ ${e=>e.cardtype==="debug"&&Ct.css`
407
407
  background: var(--gf-color-bg-debug);
408
408
  `}
409
- `,eD=yt(QF)`
409
+ `,eD=Ct(QF)`
410
410
  font: var(--gf-header-h5);
411
411
  color: var(--gf-color-text-primary);
412
412
  font-weight: bold;
413
- `,tD=yt(ru)`
413
+ `,tD=Ct(ru)`
414
414
  height: 22px;
415
415
  padding: 0px;
416
416
  font: var(--gf-label-md-default);
417
417
  color: var(--gf-color-button-primary);
418
418
  text-decoration-line: underline;
419
- `,nD=({title:e,subtitle:t,text:n,listTitle:r,items:i,gap:o,...a})=>{const s=l=>{if(typeof l!="string"){const c=l.current.getBoundingClientRect().top+window.scrollY-(o||0);window.scroll({top:c,behavior:"smooth"})}};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(JF,{cardtype:"default",...a,children:[p.jsxs(Ct,{vertical:!0,gap:24,style:{alignItems:"start"},children:[p.jsx(Cx,{title:e,subtitle:t,type:"header"}),n]}),p.jsx("div",{style:{borderBottom:"1px solid #f0f0f0",margin:"32px -32px 32px -32px"}}),p.jsxs(Ct,{vertical:!0,gap:8,style:{alignItems:"start"},children:[p.jsx(eD,{children:r||"Table of contents"}),i.map((l,c)=>p.jsx(tD,{type:"link",href:typeof l.href=="string"?l.href:void 0,onClick:()=>s(l.href),children:l.name},`button-select-item-${c}`))]})]})]})},rD=({tabList:e,tabContent:t,tabBarExtraContent:n,expandContent:r,expandLabel:i,padding:o=24,handleDownload:a,...s})=>{var m;const[l,c]=$.useState((m=e==null?void 0:e[0])==null?void 0:m.key),[u,d]=$.useState(!1),f=g=>{c(g)},h=()=>{d(g=>!g)};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(du,{className:"gf-full-width gf-override-ant-card-actions",tabList:e,cardtype:"default",activeTabKey:l,onTabChange:f,tabBarExtraContent:p.jsxs(Ct,{gap:8,align:"center",children:[n,p.jsx(vx,{onClick:a==null?void 0:a[l]})]}),actions:r!=null&&r[l]?[p.jsxs(Ct,{vertical:!0,children:[p.jsx(mx,{open:u,onClick:h,children:i}),u&&(r==null?void 0:r[l])]})]:void 0,styles:{header:{padding:"0px 24px"},body:{padding:o}},...s,children:t==null?void 0:t[l]})]})},{Paragraph:u7e,Text:s4}=bo,iD=yt(du)`
419
+ `,nD=({title:e,subtitle:t,text:n,listTitle:r,items:i,gap:o,...a})=>{const s=l=>{if(typeof l!="string"){const c=l.current.getBoundingClientRect().top+window.scrollY-(o||0);window.scroll({top:c,behavior:"smooth"})}};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(JF,{cardtype:"default",...a,children:[p.jsxs(yt,{vertical:!0,gap:24,style:{alignItems:"start"},children:[p.jsx(Cx,{title:e,subtitle:t,type:"header"}),n]}),p.jsx("div",{style:{borderBottom:"1px solid #f0f0f0",margin:"32px -32px 32px -32px"}}),p.jsxs(yt,{vertical:!0,gap:8,style:{alignItems:"start"},children:[p.jsx(eD,{children:r||"Table of contents"}),i.map((l,c)=>p.jsx(tD,{type:"link",href:typeof l.href=="string"?l.href:void 0,onClick:()=>s(l.href),children:l.name},`button-select-item-${c}`))]})]})]})},rD=({tabList:e,tabContent:t,tabBarExtraContent:n,expandContent:r,expandLabel:i,padding:o=24,handleDownload:a,...s})=>{var m;const[l,c]=$.useState((m=e==null?void 0:e[0])==null?void 0:m.key),[u,d]=$.useState(!1),f=g=>{c(g)},h=()=>{d(g=>!g)};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(du,{className:"gf-full-width gf-override-ant-card-actions",tabList:e,cardtype:"default",activeTabKey:l,onTabChange:f,tabBarExtraContent:p.jsxs(yt,{gap:8,align:"center",children:[n,p.jsx(vx,{onClick:a==null?void 0:a[l]})]}),actions:r!=null&&r[l]?[p.jsxs(yt,{vertical:!0,children:[p.jsx(mx,{open:u,onClick:h,children:i}),u&&(r==null?void 0:r[l])]})]:void 0,styles:{header:{padding:"0px 24px"},body:{padding:o}},...s,children:t==null?void 0:t[l]})]})},{Paragraph:u7e,Text:s4}=bo,iD=Ct(du)`
420
420
  min-width: 226px;
421
- `,oD=yt(s4)`
421
+ `,oD=Ct(s4)`
422
422
  font: var(--gf-header-h1);
423
- `,aD=yt(s4)`
423
+ `,aD=Ct(s4)`
424
424
  font: var(--gf-label-md-italic);
425
425
  color: var(--gf-color-text-tertiary);
426
- `,sD=yt(s4)`
426
+ `,sD=Ct(s4)`
427
427
  font: var(--gf-label-lg-default);
428
428
  color: var(--gf-color-text-secondary);
429
- `,xx=({percent:e,cost:t,description:n,editable:r,...i})=>{const[o,a]=$.useState(n),s=r?{onChange:a}:!1;return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(iD,{cardtype:"grey",padding:24,...i,children:p.jsxs(Ct,{vertical:!0,gap:8,children:[p.jsxs(Ct,{gap:16,align:"center",wrap:!0,children:[p.jsx(oD,{children:e}),p.jsx(aD,{children:t})]}),p.jsx(sD,{editable:s,children:o})]})})]})},{Text:lD}=bo,cD=yt.a`
429
+ `,xx=({percent:e,cost:t,description:n,editable:r,...i})=>{const[o,a]=$.useState(n),s=r?{onChange:a}:!1;return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(iD,{cardtype:"grey",padding:24,...i,children:p.jsxs(yt,{vertical:!0,gap:8,children:[p.jsxs(yt,{gap:16,align:"center",wrap:!0,children:[p.jsx(oD,{children:e}),p.jsx(aD,{children:t})]}),p.jsx(sD,{editable:s,children:o})]})})]})},{Text:lD}=bo,cD=Ct.a`
430
430
  text-decoration: none;
431
- `,uD=yt(lD)`
431
+ `,uD=Ct(lD)`
432
432
  font: var(--gf-label-md-default);
433
433
  line-height: 150%;
434
434
  color: ${e=>e.type==="light"?"white":"var(--gf-color-text-secondary)"}
435
- `,Yd=({label:e,href:t,icon:n,type:r,placement:i="left",...o})=>{const a=p.jsx("div",{style:{width:16,height:16,display:"flex",justifyContent:"center",alignItems:"center"},children:n});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(cD,{href:t,...o,children:p.jsxs(qd,{direction:"horizontal",size:8,align:"center",style:{textAlign:"left"},children:[n&&i==="left"&&a,p.jsx(uD,{type:r,children:e}),n&&i==="right"&&a]})})]})},wx=()=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},viewBox:"0 0 16 17",fill:"none",children:p.jsx("path",{d:"M14.1674 10.5211L11.4504 9.31407C11.1681 9.18782 10.8519 9.15859 10.5512 9.23096C10.2506 9.30332 9.98233 9.4732 9.78838 9.71407L9.00538 10.6931C7.72168 9.86934 6.62893 8.78067 5.80038 7.50007L6.77938 6.71707C7.02003 6.52318 7.18977 6.25511 7.26212 5.95466C7.33448 5.65421 7.30539 5.33826 7.17938 5.05607L5.97938 2.33207C5.84476 2.02875 5.60677 1.78311 5.30786 1.63897C5.00895 1.49482 4.66855 1.46155 4.34738 1.54507L2.04738 2.14507C1.71408 2.23182 1.42444 2.43838 1.23387 2.72526C1.04329 3.01214 0.965148 3.3592 1.01438 3.70007C1.44298 6.67478 2.82344 9.43069 4.94914 11.5553C7.07484 13.6799 9.83145 15.059 12.8064 15.4861C13.1473 15.5343 13.4941 15.4553 13.7804 15.264C14.0667 15.0726 14.2725 14.7825 14.3584 14.4491L14.9584 12.1491C15.0418 11.828 15.008 11.4876 14.863 11.1892C14.718 10.8908 14.4714 10.6539 14.1674 10.5211Z",fill:"#152BEE"})}),Sx=()=>p.jsxs("svg",{style:{width:"100%",height:"100%"},viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxs("g",{clipPath:"url(#clip0_907_17408)",children:[p.jsx("path",{d:"M8.93333 10.2336C8.65931 10.4212 8.33178 10.5148 8 10.5003C7.66822 10.5148 7.34069 10.4212 7.06667 10.2336L0 6.43359V13.1669C0 13.6974 0.210714 14.2061 0.585786 14.5811C0.960859 14.9562 1.46957 15.1669 2 15.1669H14C14.5304 15.1669 15.0391 14.9562 15.4142 14.5811C15.7893 14.2061 16 13.6974 16 13.1669V6.43359L8.93333 10.2336Z",fill:"#152BEE"}),p.jsx("path",{d:"M14 1.8335H2.00001C1.46958 1.8335 0.960869 2.04421 0.585796 2.41928C0.210723 2.79436 9.8296e-06 3.30306 9.8296e-06 3.8335V4.50016C-0.00062718 4.62038 0.029707 4.73873 0.0880899 4.84382C0.146473 4.94891 0.230936 5.03719 0.333343 5.10016L7.66668 9.10016C7.76904 9.15405 7.8848 9.17721 8.00001 9.16683C8.11522 9.17721 8.23098 9.15405 8.33334 9.10016L15.6667 5.10016C15.7691 5.03719 15.8535 4.94891 15.9119 4.84382C15.9703 4.73873 16.0006 4.62038 16 4.50016V3.8335C16 3.30306 15.7893 2.79436 15.4142 2.41928C15.0392 2.04421 14.5304 1.8335 14 1.8335Z",fill:"#152BEE"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_907_17408",children:p.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"})})})]}),$x=()=>p.jsx("svg",{style:{width:"100%",height:"100%"},viewBox:"0 0 10 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M10 5.5C10 2.74167 7.75833 0.5 5 0.5C2.24167 0.5 0 2.74167 0 5.5C0 9.25 5 14.6667 5 14.6667C5 14.6667 10 9.25 10 5.5ZM3.33333 5.5C3.33333 4.58333 4.08333 3.83333 5 3.83333C5.91667 3.83333 6.66667 4.58333 6.66667 5.5C6.66667 5.94203 6.49107 6.36595 6.17851 6.67851C5.86595 6.99107 5.44203 7.16667 5 7.16667C4.55797 7.16667 4.13405 6.99107 3.82149 6.67851C3.50893 6.36595 3.33333 5.94203 3.33333 5.5Z",fill:"#152BEE"})}),dD=({label:e,href:t,icon:n=p.jsx(Sx,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),fD=({label:e,href:t,icon:n=p.jsx($x,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),hD=({label:e,href:t,icon:n=p.jsx(wx,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),gD=yt.div`
436
- ${e=>e.columns&&e.columns>1&&yt.css`
435
+ `,Yd=({label:e,href:t,icon:n,type:r,placement:i="left",...o})=>{const a=p.jsx("div",{style:{width:16,height:16,display:"flex",justifyContent:"center",alignItems:"center"},children:n});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(cD,{href:t,...o,children:p.jsxs(qd,{direction:"horizontal",size:8,align:"center",style:{textAlign:"left"},children:[n&&i==="left"&&a,p.jsx(uD,{type:r,children:e}),n&&i==="right"&&a]})})]})},wx=()=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},viewBox:"0 0 16 17",fill:"none",children:p.jsx("path",{d:"M14.1674 10.5211L11.4504 9.31407C11.1681 9.18782 10.8519 9.15859 10.5512 9.23096C10.2506 9.30332 9.98233 9.4732 9.78838 9.71407L9.00538 10.6931C7.72168 9.86934 6.62893 8.78067 5.80038 7.50007L6.77938 6.71707C7.02003 6.52318 7.18977 6.25511 7.26212 5.95466C7.33448 5.65421 7.30539 5.33826 7.17938 5.05607L5.97938 2.33207C5.84476 2.02875 5.60677 1.78311 5.30786 1.63897C5.00895 1.49482 4.66855 1.46155 4.34738 1.54507L2.04738 2.14507C1.71408 2.23182 1.42444 2.43838 1.23387 2.72526C1.04329 3.01214 0.965148 3.3592 1.01438 3.70007C1.44298 6.67478 2.82344 9.43069 4.94914 11.5553C7.07484 13.6799 9.83145 15.059 12.8064 15.4861C13.1473 15.5343 13.4941 15.4553 13.7804 15.264C14.0667 15.0726 14.2725 14.7825 14.3584 14.4491L14.9584 12.1491C15.0418 11.828 15.008 11.4876 14.863 11.1892C14.718 10.8908 14.4714 10.6539 14.1674 10.5211Z",fill:"#152BEE"})}),Sx=()=>p.jsxs("svg",{style:{width:"100%",height:"100%"},viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxs("g",{clipPath:"url(#clip0_907_17408)",children:[p.jsx("path",{d:"M8.93333 10.2336C8.65931 10.4212 8.33178 10.5148 8 10.5003C7.66822 10.5148 7.34069 10.4212 7.06667 10.2336L0 6.43359V13.1669C0 13.6974 0.210714 14.2061 0.585786 14.5811C0.960859 14.9562 1.46957 15.1669 2 15.1669H14C14.5304 15.1669 15.0391 14.9562 15.4142 14.5811C15.7893 14.2061 16 13.6974 16 13.1669V6.43359L8.93333 10.2336Z",fill:"#152BEE"}),p.jsx("path",{d:"M14 1.8335H2.00001C1.46958 1.8335 0.960869 2.04421 0.585796 2.41928C0.210723 2.79436 9.8296e-06 3.30306 9.8296e-06 3.8335V4.50016C-0.00062718 4.62038 0.029707 4.73873 0.0880899 4.84382C0.146473 4.94891 0.230936 5.03719 0.333343 5.10016L7.66668 9.10016C7.76904 9.15405 7.8848 9.17721 8.00001 9.16683C8.11522 9.17721 8.23098 9.15405 8.33334 9.10016L15.6667 5.10016C15.7691 5.03719 15.8535 4.94891 15.9119 4.84382C15.9703 4.73873 16.0006 4.62038 16 4.50016V3.8335C16 3.30306 15.7893 2.79436 15.4142 2.41928C15.0392 2.04421 14.5304 1.8335 14 1.8335Z",fill:"#152BEE"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_907_17408",children:p.jsx("rect",{width:"16",height:"16",fill:"white",transform:"translate(0 0.5)"})})})]}),$x=()=>p.jsx("svg",{style:{width:"100%",height:"100%"},viewBox:"0 0 10 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M10 5.5C10 2.74167 7.75833 0.5 5 0.5C2.24167 0.5 0 2.74167 0 5.5C0 9.25 5 14.6667 5 14.6667C5 14.6667 10 9.25 10 5.5ZM3.33333 5.5C3.33333 4.58333 4.08333 3.83333 5 3.83333C5.91667 3.83333 6.66667 4.58333 6.66667 5.5C6.66667 5.94203 6.49107 6.36595 6.17851 6.67851C5.86595 6.99107 5.44203 7.16667 5 7.16667C4.55797 7.16667 4.13405 6.99107 3.82149 6.67851C3.50893 6.36595 3.33333 5.94203 3.33333 5.5Z",fill:"#152BEE"})}),dD=({label:e,href:t,icon:n=p.jsx(Sx,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),fD=({label:e,href:t,icon:n=p.jsx($x,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),hD=({label:e,href:t,icon:n=p.jsx(wx,{}),type:r="light",placement:i="left",...o})=>p.jsx(Yd,{label:e,icon:n,href:t,type:r,...o}),gD=Ct.div`
436
+ ${e=>e.columns&&e.columns>1&&Ct.css`
437
437
  column-count: ${e.columns};
438
438
  `}
439
439
  text-align: ${e=>e.textalign};
440
440
  column-gap: 40px;
441
- `,vD=yt.div`
441
+ `,vD=Ct.div`
442
442
  font: var(--gf-label-lg-default);
443
443
  color: var(--gf-color-text-secondary);
444
- `,mD=({id:e,text:t,columns:n,textalign:r="justify",gap:i="1em",style:o,className:a,editable:s})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(gD,{id:e,columns:n,textalign:r,style:o||{},className:a||"",contentEditable:s,suppressContentEditableWarning:s,children:t==null?void 0:t.map((l,c)=>p.jsx(vD,{dangerouslySetInnerHTML:{__html:l},style:{marginBottom:i}},`${e}-${c}`))})]}),pD=({metricsData:e,className:t=null,gap:n=null,justify:r="center",wrap:i=!0,style:o={},full:a=!1})=>p.jsx(Ct,{className:t,gap:n||10,justify:r,wrap:i,style:o,children:e==null?void 0:e.map((s,l)=>p.jsx(xx,{percent:s.percent,description:s.description,cost:s.cost,editable:s.editable,style:{width:a?"100%":`${100/e.length-1}%`}},`metrics-${l}`))});var bD=typeof ku=="object"&&ku&&ku.Object===Object&&ku,Mx=bD,yD=Mx,CD=typeof self=="object"&&self&&self.Object===Object&&self,xD=yD||CD||Function("return this")(),Mi=xD,wD=Mi,SD=wD.Symbol,Qs=SD,d8=Qs,_x=Object.prototype,$D=_x.hasOwnProperty,MD=_x.toString,jl=d8?d8.toStringTag:void 0;function _D(e){var t=$D.call(e,jl),n=e[jl];try{e[jl]=void 0;var r=!0}catch{}var i=MD.call(e);return r&&(t?e[jl]=n:delete e[jl]),i}var HD=_D,ED=Object.prototype,VD=ED.toString;function OD(e){return VD.call(e)}var RD=OD,f8=Qs,TD=HD,kD=RD,jD="[object Null]",LD="[object Undefined]",h8=f8?f8.toStringTag:void 0;function PD(e){return e==null?e===void 0?LD:jD:h8&&h8 in Object(e)?TD(e):kD(e)}var yo=PD;function ID(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _i=ID,AD=yo,ND=_i,FD="[object AsyncFunction]",DD="[object Function]",zD="[object GeneratorFunction]",BD="[object Proxy]";function WD(e){if(!ND(e))return!1;var t=AD(e);return t==DD||t==zD||t==FD||t==BD}var Kd=WD;const Js=xn(Kd);var ZD=Mi,UD=ZD["__core-js_shared__"],qD=UD,W0=qD,g8=function(){var e=/[^.]+$/.exec(W0&&W0.keys&&W0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GD(e){return!!g8&&g8 in e}var YD=GD,KD=Function.prototype,XD=KD.toString;function QD(e){if(e!=null){try{return XD.call(e)}catch{}try{return e+""}catch{}}return""}var Hx=QD,JD=Kd,ez=YD,tz=_i,nz=Hx,rz=/[\\^$.*+?()[\]{}|]/g,iz=/^\[object .+?Constructor\]$/,oz=Function.prototype,az=Object.prototype,sz=oz.toString,lz=az.hasOwnProperty,cz=RegExp("^"+sz.call(lz).replace(rz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uz(e){if(!tz(e)||ez(e))return!1;var t=JD(e)?cz:iz;return t.test(nz(e))}var dz=uz;function fz(e,t){return e==null?void 0:e[t]}var hz=fz,gz=dz,vz=hz;function mz(e,t){var n=vz(e,t);return gz(n)?n:void 0}var Ia=mz,pz=Ia,bz=pz(Object,"create"),Xd=bz,v8=Xd;function yz(){this.__data__=v8?v8(null):{},this.size=0}var Cz=yz;function xz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wz=xz,Sz=Xd,$z="__lodash_hash_undefined__",Mz=Object.prototype,_z=Mz.hasOwnProperty;function Hz(e){var t=this.__data__;if(Sz){var n=t[e];return n===$z?void 0:n}return _z.call(t,e)?t[e]:void 0}var Ez=Hz,Vz=Xd,Oz=Object.prototype,Rz=Oz.hasOwnProperty;function Tz(e){var t=this.__data__;return Vz?t[e]!==void 0:Rz.call(t,e)}var kz=Tz,jz=Xd,Lz="__lodash_hash_undefined__";function Pz(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jz&&t===void 0?Lz:t,this}var Iz=Pz,Az=Cz,Nz=wz,Fz=Ez,Dz=kz,zz=Iz;function el(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}el.prototype.clear=Az;el.prototype.delete=Nz;el.prototype.get=Fz;el.prototype.has=Dz;el.prototype.set=zz;var Bz=el;function Wz(){this.__data__=[],this.size=0}var Zz=Wz;function Uz(e,t){return e===t||e!==e&&t!==t}var fu=Uz,qz=fu;function Gz(e,t){for(var n=e.length;n--;)if(qz(e[n][0],t))return n;return-1}var Qd=Gz,Yz=Qd,Kz=Array.prototype,Xz=Kz.splice;function Qz(e){var t=this.__data__,n=Yz(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xz.call(t,n,1),--this.size,!0}var Jz=Qz,eB=Qd;function tB(e){var t=this.__data__,n=eB(t,e);return n<0?void 0:t[n][1]}var nB=tB,rB=Qd;function iB(e){return rB(this.__data__,e)>-1}var oB=iB,aB=Qd;function sB(e,t){var n=this.__data__,r=aB(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lB=sB,cB=Zz,uB=Jz,dB=nB,fB=oB,hB=lB;function tl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tl.prototype.clear=cB;tl.prototype.delete=uB;tl.prototype.get=dB;tl.prototype.has=fB;tl.prototype.set=hB;var Jd=tl,gB=Ia,vB=Mi,mB=gB(vB,"Map"),l4=mB,m8=Bz,pB=Jd,bB=l4;function yB(){this.size=0,this.__data__={hash:new m8,map:new(bB||pB),string:new m8}}var CB=yB;function xB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var wB=xB,SB=wB;function $B(e,t){var n=e.__data__;return SB(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ef=$B,MB=ef;function _B(e){var t=MB(this,e).delete(e);return this.size-=t?1:0,t}var HB=_B,EB=ef;function VB(e){return EB(this,e).get(e)}var OB=VB,RB=ef;function TB(e){return RB(this,e).has(e)}var kB=TB,jB=ef;function LB(e,t){var n=jB(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var PB=LB,IB=CB,AB=HB,NB=OB,FB=kB,DB=PB;function nl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nl.prototype.clear=IB;nl.prototype.delete=AB;nl.prototype.get=NB;nl.prototype.has=FB;nl.prototype.set=DB;var c4=nl,zB="__lodash_hash_undefined__";function BB(e){return this.__data__.set(e,zB),this}var WB=BB;function ZB(e){return this.__data__.has(e)}var UB=ZB,qB=c4,GB=WB,YB=UB;function U1(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qB;++t<n;)this.add(e[t])}U1.prototype.add=U1.prototype.push=GB;U1.prototype.has=YB;var u4=U1;function KB(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var XB=KB;function QB(e){return e!==e}var JB=QB;function eW(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var tW=eW,nW=XB,rW=JB,iW=tW;function oW(e,t,n){return t===t?iW(e,t,n):nW(e,rW,n)}var aW=oW,sW=aW;function lW(e,t){var n=e==null?0:e.length;return!!n&&sW(e,t,0)>-1}var Ex=lW;function cW(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Vx=cW;function uW(e,t){return e.has(t)}var d4=uW,dW=Ia,fW=Mi,hW=dW(fW,"Set"),Ox=hW;function gW(){}var vW=gW;function mW(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var f4=mW,Z0=Ox,pW=vW,bW=f4,yW=1/0,CW=Z0&&1/bW(new Z0([,-0]))[1]==yW?function(e){return new Z0(e)}:pW,xW=CW,wW=u4,SW=Ex,$W=Vx,MW=d4,_W=xW,HW=f4,EW=200;function VW(e,t,n){var r=-1,i=SW,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=$W;else if(o>=EW){var c=t?null:_W(e);if(c)return HW(c);a=!1,i=MW,l=new wW}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var Rx=VW,OW=Rx;function RW(e){return e&&e.length?OW(e):[]}var TW=RW;const X3=xn(TW);var Q3={exports:{}},Xu={exports:{}},Kt={};/** @license React v16.13.1
444
+ `,mD=({id:e,text:t,columns:n,textalign:r="justify",gap:i="1em",style:o,className:a,editable:s})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(gD,{id:e,columns:n,textalign:r,style:o||{},className:a||"",contentEditable:s,suppressContentEditableWarning:s,children:t==null?void 0:t.map((l,c)=>p.jsx(vD,{dangerouslySetInnerHTML:{__html:l},style:{marginBottom:i}},`${e}-${c}`))})]}),pD=({metricsData:e,className:t=null,gap:n=null,justify:r="center",wrap:i=!0,style:o={},full:a=!1})=>p.jsx(yt,{className:t,gap:n||10,justify:r,wrap:i,style:o,children:e==null?void 0:e.map((s,l)=>p.jsx(xx,{percent:s.percent,description:s.description,cost:s.cost,editable:s.editable,style:{width:a?"100%":`${100/e.length-1}%`}},`metrics-${l}`))});var bD=typeof ku=="object"&&ku&&ku.Object===Object&&ku,Mx=bD,yD=Mx,CD=typeof self=="object"&&self&&self.Object===Object&&self,xD=yD||CD||Function("return this")(),Mi=xD,wD=Mi,SD=wD.Symbol,Qs=SD,d8=Qs,_x=Object.prototype,$D=_x.hasOwnProperty,MD=_x.toString,jl=d8?d8.toStringTag:void 0;function _D(e){var t=$D.call(e,jl),n=e[jl];try{e[jl]=void 0;var r=!0}catch{}var i=MD.call(e);return r&&(t?e[jl]=n:delete e[jl]),i}var HD=_D,ED=Object.prototype,VD=ED.toString;function OD(e){return VD.call(e)}var RD=OD,f8=Qs,TD=HD,kD=RD,jD="[object Null]",LD="[object Undefined]",h8=f8?f8.toStringTag:void 0;function PD(e){return e==null?e===void 0?LD:jD:h8&&h8 in Object(e)?TD(e):kD(e)}var yo=PD;function ID(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var _i=ID,AD=yo,ND=_i,FD="[object AsyncFunction]",DD="[object Function]",zD="[object GeneratorFunction]",BD="[object Proxy]";function WD(e){if(!ND(e))return!1;var t=AD(e);return t==DD||t==zD||t==FD||t==BD}var Kd=WD;const Js=xn(Kd);var ZD=Mi,UD=ZD["__core-js_shared__"],qD=UD,W0=qD,g8=function(){var e=/[^.]+$/.exec(W0&&W0.keys&&W0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GD(e){return!!g8&&g8 in e}var YD=GD,KD=Function.prototype,XD=KD.toString;function QD(e){if(e!=null){try{return XD.call(e)}catch{}try{return e+""}catch{}}return""}var Hx=QD,JD=Kd,ez=YD,tz=_i,nz=Hx,rz=/[\\^$.*+?()[\]{}|]/g,iz=/^\[object .+?Constructor\]$/,oz=Function.prototype,az=Object.prototype,sz=oz.toString,lz=az.hasOwnProperty,cz=RegExp("^"+sz.call(lz).replace(rz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uz(e){if(!tz(e)||ez(e))return!1;var t=JD(e)?cz:iz;return t.test(nz(e))}var dz=uz;function fz(e,t){return e==null?void 0:e[t]}var hz=fz,gz=dz,vz=hz;function mz(e,t){var n=vz(e,t);return gz(n)?n:void 0}var Ia=mz,pz=Ia,bz=pz(Object,"create"),Xd=bz,v8=Xd;function yz(){this.__data__=v8?v8(null):{},this.size=0}var Cz=yz;function xz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wz=xz,Sz=Xd,$z="__lodash_hash_undefined__",Mz=Object.prototype,_z=Mz.hasOwnProperty;function Hz(e){var t=this.__data__;if(Sz){var n=t[e];return n===$z?void 0:n}return _z.call(t,e)?t[e]:void 0}var Ez=Hz,Vz=Xd,Oz=Object.prototype,Rz=Oz.hasOwnProperty;function Tz(e){var t=this.__data__;return Vz?t[e]!==void 0:Rz.call(t,e)}var kz=Tz,jz=Xd,Lz="__lodash_hash_undefined__";function Pz(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jz&&t===void 0?Lz:t,this}var Iz=Pz,Az=Cz,Nz=wz,Fz=Ez,Dz=kz,zz=Iz;function el(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}el.prototype.clear=Az;el.prototype.delete=Nz;el.prototype.get=Fz;el.prototype.has=Dz;el.prototype.set=zz;var Bz=el;function Wz(){this.__data__=[],this.size=0}var Zz=Wz;function Uz(e,t){return e===t||e!==e&&t!==t}var fu=Uz,qz=fu;function Gz(e,t){for(var n=e.length;n--;)if(qz(e[n][0],t))return n;return-1}var Qd=Gz,Yz=Qd,Kz=Array.prototype,Xz=Kz.splice;function Qz(e){var t=this.__data__,n=Yz(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xz.call(t,n,1),--this.size,!0}var Jz=Qz,eB=Qd;function tB(e){var t=this.__data__,n=eB(t,e);return n<0?void 0:t[n][1]}var nB=tB,rB=Qd;function iB(e){return rB(this.__data__,e)>-1}var oB=iB,aB=Qd;function sB(e,t){var n=this.__data__,r=aB(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var lB=sB,cB=Zz,uB=Jz,dB=nB,fB=oB,hB=lB;function tl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}tl.prototype.clear=cB;tl.prototype.delete=uB;tl.prototype.get=dB;tl.prototype.has=fB;tl.prototype.set=hB;var Jd=tl,gB=Ia,vB=Mi,mB=gB(vB,"Map"),l4=mB,m8=Bz,pB=Jd,bB=l4;function yB(){this.size=0,this.__data__={hash:new m8,map:new(bB||pB),string:new m8}}var CB=yB;function xB(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var wB=xB,SB=wB;function $B(e,t){var n=e.__data__;return SB(t)?n[typeof t=="string"?"string":"hash"]:n.map}var ef=$B,MB=ef;function _B(e){var t=MB(this,e).delete(e);return this.size-=t?1:0,t}var HB=_B,EB=ef;function VB(e){return EB(this,e).get(e)}var OB=VB,RB=ef;function TB(e){return RB(this,e).has(e)}var kB=TB,jB=ef;function LB(e,t){var n=jB(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var PB=LB,IB=CB,AB=HB,NB=OB,FB=kB,DB=PB;function nl(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nl.prototype.clear=IB;nl.prototype.delete=AB;nl.prototype.get=NB;nl.prototype.has=FB;nl.prototype.set=DB;var c4=nl,zB="__lodash_hash_undefined__";function BB(e){return this.__data__.set(e,zB),this}var WB=BB;function ZB(e){return this.__data__.has(e)}var UB=ZB,qB=c4,GB=WB,YB=UB;function U1(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qB;++t<n;)this.add(e[t])}U1.prototype.add=U1.prototype.push=GB;U1.prototype.has=YB;var u4=U1;function KB(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var XB=KB;function QB(e){return e!==e}var JB=QB;function eW(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var tW=eW,nW=XB,rW=JB,iW=tW;function oW(e,t,n){return t===t?iW(e,t,n):nW(e,rW,n)}var aW=oW,sW=aW;function lW(e,t){var n=e==null?0:e.length;return!!n&&sW(e,t,0)>-1}var Ex=lW;function cW(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Vx=cW;function uW(e,t){return e.has(t)}var d4=uW,dW=Ia,fW=Mi,hW=dW(fW,"Set"),Ox=hW;function gW(){}var vW=gW;function mW(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var f4=mW,Z0=Ox,pW=vW,bW=f4,yW=1/0,CW=Z0&&1/bW(new Z0([,-0]))[1]==yW?function(e){return new Z0(e)}:pW,xW=CW,wW=u4,SW=Ex,$W=Vx,MW=d4,_W=xW,HW=f4,EW=200;function VW(e,t,n){var r=-1,i=SW,o=e.length,a=!0,s=[],l=s;if(n)a=!1,i=$W;else if(o>=EW){var c=t?null:_W(e);if(c)return HW(c);a=!1,i=MW,l=new wW}else l=t?[]:s;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else i(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var Rx=VW,OW=Rx;function RW(e){return e&&e.length?OW(e):[]}var TW=RW;const X3=xn(TW);var Q3={exports:{}},Xu={exports:{}},Kt={};/** @license React v16.13.1
445
445
  * react-is.production.min.js
446
446
  *
447
447
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -486,21 +486,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
486
486
  L`+r+" "+r+`
487
487
  L0 `+r+`
488
488
  L`+r/2+` 0
489
- `,fill:i,opacity:a,strokeWidth:l,stroke:c===void 0?"transparent":c,style:{pointerEvents:"none"}})})};function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ua.apply(this,arguments)}var qie={top:0,right:0,bottom:0,left:0},M7=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,o=e.itemCount,a=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var l=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:ua({},qie,i),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,h=(o-1)*r;return n==="row"?d=a*o+h+c:n==="column"&&(f=s*o+h+u),{width:d,height:f,padding:l}},y$=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},C$=function(e){var t,n,r,i,o,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,i=f/2,a="central",l?(r=d,o="end"):(r=c+u,o="start");break;case"right-to-left":t=d-c,n=(f-c)/2,i=f/2,a="central",l?(r=0,o="start"):(r=d-c-u,o="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,o="middle",l?(i=f,a="alphabetic"):(i=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,o="middle",l?(i=0,a="text-before-edge"):(i=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:o,labelAlignment:a}},Gie={circle:Bie,diamond:Wie,square:Zie,triangle:Uie},Yie=function(e){var t,n,r,i,o,a,s,l,c,u,d,f=e.x,h=e.y,m=e.width,g=e.height,v=e.data,b=e.direction,y=b===void 0?"left-to-right":b,x=e.justify,S=x!==void 0&&x,w=e.textColor,M=e.background,E=M===void 0?"transparent":M,H=e.opacity,_=H===void 0?1:H,O=e.symbolShape,k=O===void 0?"square":O,A=e.symbolSize,j=A===void 0?16:A,V=e.symbolSpacing,T=V===void 0?8:V,L=e.symbolBorderWidth,R=L===void 0?0:L,I=e.symbolBorderColor,P=I===void 0?"transparent":I,N=e.onClick,z=e.onMouseEnter,q=e.onMouseLeave,G=e.toggleSerie,Y=e.effects,ee=$.useState({}),Q=ee[0],K=ee[1],J=Zt(),W=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on==="hover"}).reduce(function(me,ge){return ua({},me,ge.style)},{});K(Se)}z==null||z(v,ye)},[z,v,Y]),Z=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on!=="hover"}).reduce(function(me,ge){return ua({},me,ge.style)},{});K(Se)}q==null||q(v,ye)},[q,v,Y]),U=C$({direction:y,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:j,symbolSpacing:T,width:m,height:g}),F=U.symbolX,re=U.symbolY,B=U.labelX,ie=U.labelY,oe=U.labelAnchor,ve=U.labelAlignment,Ce=[N,z,q,G].some(function(ye){return ye!==void 0}),pe=typeof k=="function"?k:Gie[k];return p.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:_},children:[p.jsx("rect",{width:m,height:g,fill:(r=Q.itemBackground)!=null?r:E,style:{cursor:Ce?"pointer":"auto"},onClick:function(ye){N==null||N(v,ye),G==null||G(v.id)},onMouseEnter:W,onMouseLeave:Z}),C.createElement(pe,ua({id:v.id,x:F,y:re,size:(i=Q.symbolSize)!=null?i:j,fill:(o=(a=v.fill)!=null?a:v.color)!=null?o:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:R,borderColor:(l=Q.symbolBorderColor)!=null?l:P},v.hidden?J.legends.hidden.symbol:void 0)),p.jsx("text",{textAnchor:oe,style:ua({},w7(J.legends.text),{fill:(c=(u=(d=Q.itemTextColor)!=null?d:w)!=null?u:J.legends.text.fill)!=null?c:"black",dominantBaseline:ve,pointerEvents:"none",userSelect:"none"},v.hidden?J.legends.hidden.text:void 0),x:B,y:ie,children:v.label})]})},Kie=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,o=e.padding,a=o===void 0?0:o,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemTextColor,v=e.itemBackground,b=v===void 0?"transparent":v,y=e.itemOpacity,x=y===void 0?1:y,S=e.symbolShape,w=e.symbolSize,M=e.symbolSpacing,E=e.symbolBorderWidth,H=e.symbolBorderColor,_=e.onClick,O=e.onMouseEnter,k=e.onMouseLeave,A=e.toggleSerie,j=M7({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:m,direction:i,padding:a}).padding,V=i==="row"?c+m:0,T=i==="column"?u+m:0;return p.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(L,R){return p.jsx(Yie,{data:L,x:R*V+j.left,y:R*T+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:g,background:b,opacity:x,symbolShape:S,symbolSize:w,symbolSpacing:M,symbolBorderWidth:E,symbolBorderColor:H,onClick:_,onMouseEnter:O,onMouseLeave:k,toggleSerie:A},R)})})},Pf=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,o=i===void 0?0:i,a=e.translateY,s=a===void 0?0:a,l=e.anchor,c=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemWidth,v=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,w=e.symbolShape,M=e.symbolSize,E=e.symbolSpacing,H=e.symbolBorderWidth,_=e.symbolBorderColor,O=e.onClick,k=e.onMouseEnter,A=e.onMouseLeave,j=e.toggleSerie,V=e.effects,T=M7({itemCount:t.length,itemsSpacing:m,itemWidth:g,itemHeight:v,direction:c,padding:d}),L=T.width,R=T.height,I=y$({anchor:l,translateX:o,translateY:s,containerWidth:n,containerHeight:r,width:L,height:R}),P=I.x,N=I.y;return p.jsx(Kie,{data:t,x:P,y:N,direction:c,padding:d,justify:f,effects:V,itemsSpacing:m,itemWidth:g,itemHeight:v,itemDirection:b,itemTextColor:y,itemBackground:x,itemOpacity:S,symbolShape:w,symbolSize:M,symbolSpacing:E,symbolBorderWidth:H,symbolBorderColor:_,onClick:O,onMouseEnter:k,onMouseLeave:A,toggleSerie:typeof j=="boolean"?void 0:j})},Xie={start:"left",middle:"center",end:"right"},x$=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,o=t.translateX,a=o===void 0?0:o,s=t.translateY,l=s===void 0?0:s,c=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,m=h!==void 0&&h,g=t.itemsSpacing,v=g===void 0?0:g,b=t.itemWidth,y=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,w=t.itemTextColor,M=t.symbolSize,E=M===void 0?16:M,H=t.symbolSpacing,_=H===void 0?8:H,O=t.theme,k=M7({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:v,direction:u,padding:f}),A=k.width,j=k.height,V=k.padding,T=y$({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:i,width:A,height:j}),L=T.x,R=T.y,I=u==="row"?b+v:0,P=u==="column"?y+v:0;e.save(),e.translate(L,R),e.font=O.legends.text.fontSize+"px "+(O.legends.text.fontFamily||"sans-serif"),n.forEach(function(N,z){var q,G,Y=z*I+V.left,ee=z*P+V.top,Q=C$({direction:S,justify:m,symbolSize:E,symbolSpacing:_,width:b,height:y}),K=Q.symbolX,J=Q.symbolY,W=Q.labelX,Z=Q.labelY,U=Q.labelAnchor,F=Q.labelAlignment;e.fillStyle=(q=N.color)!=null?q:"black",e.fillRect(Y+K,ee+J,E,E),e.textAlign=Xie[U],F==="central"&&(e.textBaseline="middle"),e.fillStyle=(G=w??O.legends.text.fill)!=null?G:"black",e.fillText(String(N.label),Y+W,ee+Z)}),e.restore()};function Qie(e){return e.target.depth}function Jie(e){return e.depth}function eoe(e,t){return t-1-e.height}function w$(e,t){return e.sourceLinks.length?e.depth:t-1}function toe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?kS(e.sourceLinks,Qie)-1:0}function c1(e){return function(){return e}}function Nm(e,t){return pd(e.source,t.source)||e.index-t.index}function Fm(e,t){return pd(e.target,t.target)||e.index-t.index}function pd(e,t){return e.y0-t.y0}function x2(e){return e.value}function noe(e){return e.index}function roe(e){return e.nodes}function ioe(e){return e.links}function Dm(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function zm({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function ooe(){let e=0,t=0,n=1,r=1,i=24,o=8,a,s=noe,l=w$,c,u,d=roe,f=ioe,h=6;function m(){const T={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return g(T),v(T),b(T),y(T),w(T),zm(T),T}m.update=function(T){return zm(T),T},m.nodeId=function(T){return arguments.length?(s=typeof T=="function"?T:c1(T),m):s},m.nodeAlign=function(T){return arguments.length?(l=typeof T=="function"?T:c1(T),m):l},m.nodeSort=function(T){return arguments.length?(c=T,m):c},m.nodeWidth=function(T){return arguments.length?(i=+T,m):i},m.nodePadding=function(T){return arguments.length?(o=a=+T,m):o},m.nodes=function(T){return arguments.length?(d=typeof T=="function"?T:c1(T),m):d},m.links=function(T){return arguments.length?(f=typeof T=="function"?T:c1(T),m):f},m.linkSort=function(T){return arguments.length?(u=T,m):u},m.size=function(T){return arguments.length?(e=t=0,n=+T[0],r=+T[1],m):[n-e,r-t]},m.extent=function(T){return arguments.length?(e=+T[0][0],n=+T[1][0],t=+T[0][1],r=+T[1][1],m):[[e,t],[n,r]]},m.iterations=function(T){return arguments.length?(h=+T,m):h};function g({nodes:T,links:L}){for(const[I,P]of T.entries())P.index=I,P.sourceLinks=[],P.targetLinks=[];const R=new Map(T.map((I,P)=>[s(I,P,T),I]));for(const[I,P]of L.entries()){P.index=I;let{source:N,target:z}=P;typeof N!="object"&&(N=P.source=Dm(R,N)),typeof z!="object"&&(z=P.target=Dm(R,z)),N.sourceLinks.push(P),z.targetLinks.push(P)}if(u!=null)for(const{sourceLinks:I,targetLinks:P}of T)I.sort(u),P.sort(u)}function v({nodes:T}){for(const L of T)L.value=L.fixedValue===void 0?Math.max(v2(L.sourceLinks,x2),v2(L.targetLinks,x2)):L.fixedValue}function b({nodes:T}){const L=T.length;let R=new Set(T),I=new Set,P=0;for(;R.size;){for(const N of R){N.depth=P;for(const{target:z}of N.sourceLinks)I.add(z)}if(++P>L)throw new Error("circular link");R=I,I=new Set}}function y({nodes:T}){const L=T.length;let R=new Set(T),I=new Set,P=0;for(;R.size;){for(const N of R){N.height=P;for(const{source:z}of N.targetLinks)I.add(z)}if(++P>L)throw new Error("circular link");R=I,I=new Set}}function x({nodes:T}){const L=sm(T,P=>P.depth)+1,R=(n-e-i)/(L-1),I=new Array(L);for(const P of T){const N=Math.max(0,Math.min(L-1,Math.floor(l.call(null,P,L))));P.layer=N,P.x0=e+N*R,P.x1=P.x0+i,I[N]?I[N].push(P):I[N]=[P]}if(c)for(const P of I)P.sort(c);return I}function S(T){const L=kS(T,R=>(r-t-(R.length-1)*a)/v2(R,x2));for(const R of T){let I=t;for(const P of R){P.y0=I,P.y1=I+P.value*L,I=P.y1+a;for(const N of P.sourceLinks)N.width=N.value*L}I=(r-I+a)/(R.length+1);for(let P=0;P<R.length;++P){const N=R[P];N.y0+=I*(P+1),N.y1+=I*(P+1)}A(R)}}function w(T){const L=x(T);a=Math.min(o,(r-t)/(sm(L,R=>R.length)-1)),S(L);for(let R=0;R<h;++R){const I=Math.pow(.99,R),P=Math.max(1-I,(R+1)/h);E(L,I,P),M(L,I,P)}}function M(T,L,R){for(let I=1,P=T.length;I<P;++I){const N=T[I];for(const z of N){let q=0,G=0;for(const{source:ee,value:Q}of z.targetLinks){let K=Q*(z.layer-ee.layer);q+=j(ee,z)*K,G+=K}if(!(G>0))continue;let Y=(q/G-z.y0)*L;z.y0+=Y,z.y1+=Y,k(z)}c===void 0&&N.sort(pd),H(N,R)}}function E(T,L,R){for(let I=T.length,P=I-2;P>=0;--P){const N=T[P];for(const z of N){let q=0,G=0;for(const{target:ee,value:Q}of z.sourceLinks){let K=Q*(ee.layer-z.layer);q+=V(z,ee)*K,G+=K}if(!(G>0))continue;let Y=(q/G-z.y0)*L;z.y0+=Y,z.y1+=Y,k(z)}c===void 0&&N.sort(pd),H(N,R)}}function H(T,L){const R=T.length>>1,I=T[R];O(T,I.y0-a,R-1,L),_(T,I.y1+a,R+1,L),O(T,r,T.length-1,L),_(T,t,0,L)}function _(T,L,R,I){for(;R<T.length;++R){const P=T[R],N=(L-P.y0)*I;N>1e-6&&(P.y0+=N,P.y1+=N),L=P.y1+a}}function O(T,L,R,I){for(;R>=0;--R){const P=T[R],N=(P.y1-L)*I;N>1e-6&&(P.y0-=N,P.y1-=N),L=P.y0-a}}function k({sourceLinks:T,targetLinks:L}){if(u===void 0){for(const{source:{sourceLinks:R}}of L)R.sort(Fm);for(const{target:{targetLinks:R}}of T)R.sort(Nm)}}function A(T){if(u===void 0)for(const{sourceLinks:L,targetLinks:R}of T)L.sort(Fm),R.sort(Nm)}function j(T,L){let R=T.y0-(T.sourceLinks.length-1)*a/2;for(const{target:I,width:P}of T.sourceLinks){if(I===L)break;R+=P+a}for(const{source:I,width:P}of L.targetLinks){if(I===T)break;R-=P}return R}function V(T,L){let R=L.y0-(L.targetLinks.length-1)*a/2;for(const{source:I,width:P}of L.targetLinks){if(I===T)break;R+=P+a}for(const{target:I,width:P}of T.sourceLinks){if(I===L)break;R-=P}return R}return m}function aoe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var soe=aoe,loe=sl,coe=$u;function uoe(e,t){return e&&loe(t,coe(t),e)}var doe=uoe,foe=sl,hoe=pu;function goe(e,t){return e&&foe(t,hoe(t),e)}var voe=goe,moe=sl,poe=y7;function boe(e,t){return moe(e,poe(e),t)}var yoe=boe,Coe=b7,xoe=R4,woe=y7,Soe=US,$oe=Object.getOwnPropertySymbols,Moe=$oe?function(e){for(var t=[];e;)Coe(t,woe(e)),e=xoe(e);return t}:Soe,S$=Moe,_oe=sl,Hoe=S$;function Eoe(e,t){return _oe(e,Hoe(e),t)}var Voe=Eoe,Ooe=WS,Roe=S$,Toe=pu;function koe(e){return Ooe(e,Toe,Roe)}var $$=koe,joe=Object.prototype,Loe=joe.hasOwnProperty;function Poe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Loe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ioe=Poe,Aoe=O4;function Noe(e,t){var n=t?Aoe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Foe=Noe,Doe=/\w*$/;function zoe(e){var t=new e.constructor(e.source,Doe.exec(e));return t.lastIndex=e.lastIndex,t}var Boe=zoe,Bm=Qs,Wm=Bm?Bm.prototype:void 0,Zm=Wm?Wm.valueOf:void 0;function Woe(e){return Zm?Object(Zm.call(e)):{}}var Zoe=Woe,Uoe=O4,qoe=Foe,Goe=Boe,Yoe=Zoe,Koe=$w,Xoe="[object Boolean]",Qoe="[object Date]",Joe="[object Map]",eae="[object Number]",tae="[object RegExp]",nae="[object Set]",rae="[object String]",iae="[object Symbol]",oae="[object ArrayBuffer]",aae="[object DataView]",sae="[object Float32Array]",lae="[object Float64Array]",cae="[object Int8Array]",uae="[object Int16Array]",dae="[object Int32Array]",fae="[object Uint8Array]",hae="[object Uint8ClampedArray]",gae="[object Uint16Array]",vae="[object Uint32Array]";function mae(e,t,n){var r=e.constructor;switch(t){case oae:return Uoe(e);case Xoe:case Qoe:return new r(+e);case aae:return qoe(e,n);case sae:case lae:case cae:case uae:case dae:case fae:case hae:case gae:case vae:return Koe(e,n);case Joe:return new r;case eae:case rae:return new r(e);case tae:return Goe(e);case nae:return new r;case iae:return Yoe(e)}}var pae=mae,bae=Tf,yae=Gr,Cae="[object Map]";function xae(e){return yae(e)&&bae(e)==Cae}var wae=xae,Sae=wae,$ae=al,Um=hf,qm=Um&&Um.isMap,Mae=qm?$ae(qm):Sae,_ae=Mae,Hae=Tf,Eae=Gr,Vae="[object Set]";function Oae(e){return Eae(e)&&Hae(e)==Vae}var Rae=Oae,Tae=Rae,kae=al,Gm=hf,Ym=Gm&&Gm.isSet,jae=Ym?kae(Ym):Tae,Lae=jae,Pae=uf,Iae=soe,Aae=P4,Nae=doe,Fae=voe,Dae=ww,zae=Mw,Bae=yoe,Wae=Voe,Zae=qS,Uae=$$,qae=Tf,Gae=Ioe,Yae=pae,Kae=Hw,Xae=xr,Qae=ff,Jae=_ae,ese=_i,tse=Lae,nse=$u,rse=pu,ise=1,ose=2,ase=4,M$="[object Arguments]",sse="[object Array]",lse="[object Boolean]",cse="[object Date]",use="[object Error]",_$="[object Function]",dse="[object GeneratorFunction]",fse="[object Map]",hse="[object Number]",H$="[object Object]",gse="[object RegExp]",vse="[object Set]",mse="[object String]",pse="[object Symbol]",bse="[object WeakMap]",yse="[object ArrayBuffer]",Cse="[object DataView]",xse="[object Float32Array]",wse="[object Float64Array]",Sse="[object Int8Array]",$se="[object Int16Array]",Mse="[object Int32Array]",_se="[object Uint8Array]",Hse="[object Uint8ClampedArray]",Ese="[object Uint16Array]",Vse="[object Uint32Array]",un={};un[M$]=un[sse]=un[yse]=un[Cse]=un[lse]=un[cse]=un[xse]=un[wse]=un[Sse]=un[$se]=un[Mse]=un[fse]=un[hse]=un[H$]=un[gse]=un[vse]=un[mse]=un[pse]=un[_se]=un[Hse]=un[Ese]=un[Vse]=!0;un[use]=un[_$]=un[bse]=!1;function H1(e,t,n,r,i,o){var a,s=t&ise,l=t&ose,c=t&ase;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!ese(e))return e;var u=Xae(e);if(u){if(a=Gae(e),!s)return zae(e,a)}else{var d=qae(e),f=d==_$||d==dse;if(Qae(e))return Dae(e,s);if(d==H$||d==M$||f&&!i){if(a=l||f?{}:Kae(e),!s)return l?Wae(e,Fae(a,e)):Bae(e,Nae(a,e))}else{if(!un[d])return i?e:{};a=Yae(e,d,s)}}o||(o=new Pae);var h=o.get(e);if(h)return h;o.set(e,a),tse(e)?e.forEach(function(v){a.add(H1(v,t,n,v,e,o))}):Jae(e)&&e.forEach(function(v,b){a.set(b,H1(v,t,n,b,e,o))});var m=c?l?Uae:Zae:l?rse:nse,g=u?void 0:m(e);return Iae(g||e,function(v,b){g&&(b=v,v=e[b]),Aae(a,b,H1(v,t,n,b,e,o))}),a}var E$=H1,Ose=E$,Rse=1,Tse=4;function kse(e){return Ose(e,Rse|Tse)}var jse=kse;const V$=xn(jse);function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}var w2={container:{display:"flex",alignItems:"center"},sourceChip:{marginRight:7},targetChip:{marginLeft:7,marginRight:7}},Lse={center:toe,justify:w$,start:Jie,end:eoe},Pse=function(e){return Lse[e]},Nt={layout:"horizontal",align:"center",sort:"auto",colors:{scheme:"nivo"},nodeOpacity:.75,nodeHoverOpacity:1,nodeHoverOthersOpacity:.15,nodeThickness:12,nodeSpacing:12,nodeInnerPadding:0,nodeBorderWidth:1,nodeBorderColor:{from:"color",modifiers:[["darker",.5]]},nodeBorderRadius:0,linkOpacity:.25,linkHoverOpacity:.6,linkHoverOthersOpacity:.15,linkContract:0,linkBlendMode:"multiply",enableLinkGradient:!1,enableLabels:!0,label:"id",labelPosition:"inside",labelPadding:9,labelOrientation:"horizontal",labelTextColor:{from:"color",modifiers:[["darker",.8]]},isInteractive:!0,nodeTooltip:function(e){var t=e.node;return p.jsx(Is,{id:t.label,enableChip:!0,color:t.color})},linkTooltip:function(e){var t=e.link;return p.jsx(Is,{id:p.jsxs("span",{style:w2.container,children:[p.jsx(Q1,{color:t.source.color,style:w2.sourceChip}),p.jsx("strong",{children:t.source.label})," > ",p.jsx("strong",{children:t.target.label}),p.jsx(Q1,{color:t.target.color,style:w2.targetChip}),p.jsx("strong",{children:t.formattedValue})]})})},legends:[],layers:["links","nodes","labels","legends"],role:"img",animate:!0,motionConfig:"gentle"},Ise=function(e){return e.id},Ase=function(e){var t=e.data,n=e.valueFormat,r=e.layout,i=e.width,o=e.height,a=e.sort,s=e.align,l=e.colors,c=e.nodeThickness,u=e.nodeSpacing,d=e.nodeInnerPadding,f=e.nodeBorderColor,h=e.label,m=e.labelTextColor,g=$.useState(null),v=g[0],b=g[1],y=$.useState(null),x=y[0],S=y[1],w=$.useMemo(function(){if(a!=="auto")return a==="input"?null:a==="ascending"?function(I,P){return I.value-P.value}:a==="descending"?function(I,P){return P.value-I.value}:a},[a]),M=a==="input"?null:void 0,E=$.useMemo(function(){return typeof s=="function"?s:Pse(s)},[s]),H=Zt(),_=Mu(l,"id"),O=Er(f,H),k=yi(h),A=Er(m,H),j=Io(n),V=$.useMemo(function(){return function(I){var P=I.data,N=I.formatValue,z=I.layout,q=I.alignFunction,G=I.sortFunction,Y=I.linkSortMode,ee=I.nodeThickness,Q=I.nodeSpacing,K=I.nodeInnerPadding,J=I.width,W=I.height,Z=I.getColor,U=I.getLabel,F=ooe().nodeAlign(q).nodeSort(G).linkSort(Y).nodeWidth(ee).nodePadding(Q).size(z==="horizontal"?[J,W]:[W,J]).nodeId(Ise),re=V$(P);return F(re),re.nodes.forEach(function(B){if(B.color=Z(B),B.label=U(B),B.formattedValue=N(B.value),z==="horizontal")B.x=B.x0+K,B.y=B.y0,B.width=Math.max(B.x1-B.x0-2*K,0),B.height=Math.max(B.y1-B.y0,0);else{B.x=B.y0,B.y=B.x0+K,B.width=Math.max(B.y1-B.y0,0),B.height=Math.max(B.x1-B.x0-2*K,0);var ie=B.x0,oe=B.x1;B.x0=B.y0,B.x1=B.y1,B.y0=ie,B.y1=oe}}),re.links.forEach(function(B){B.formattedValue=N(B.value),B.color=B.source.color,B.pos0=B.y0,B.pos1=B.y1,B.thickness=B.width,delete B.y0,delete B.y1,delete B.width}),re}({data:t,formatValue:j,layout:r,alignFunction:E,sortFunction:w,linkSortMode:M,nodeThickness:c,nodeSpacing:u,nodeInnerPadding:d,width:i,height:o,getColor:_,getLabel:k})},[t,j,r,E,w,M,c,u,d,i,o,_,k]),T=V.nodes,L=V.links,R=$.useMemo(function(){return T.map(function(I){return{id:I.id,label:I.label,color:I.color}})},[T]);return{nodes:T,links:L,legendData:R,getNodeBorderColor:O,currentNode:v,setCurrentNode:b,currentLink:x,setCurrentLink:S,getLabelTextColor:A}},Nse=function(e){var t=e.node,n=e.x,r=e.y,i=e.width,o=e.height,a=e.color,s=e.opacity,l=e.borderWidth,c=e.borderColor,u=e.borderRadius,d=e.setCurrent,f=e.isInteractive,h=e.onClick,m=e.tooltip,g=Dn(),v=g.animate,b=g.config,y=Qt({x:n,y:r,width:i,height:o,opacity:s,color:a,config:b,immediate:!v}),x=ui(),S=x.showTooltipFromEvent,w=x.hideTooltip,M=$.useCallback(function(O){d(t),S($.createElement(m,{node:t}),O,"left")},[d,t,S,m]),E=$.useCallback(function(O){S($.createElement(m,{node:t}),O,"left")},[S,t,m]),H=$.useCallback(function(){d(null),w()},[d,w]),_=$.useCallback(function(O){h==null||h(t,O)},[h,t]);return p.jsx(et.rect,{x:y.x,y:y.y,rx:u,ry:u,width:y.width.to(function(O){return Math.max(O,0)}),height:y.height.to(function(O){return Math.max(O,0)}),fill:y.color,fillOpacity:y.opacity,strokeWidth:l,stroke:c,strokeOpacity:s,onMouseEnter:f?M:void 0,onMouseMove:f?E:void 0,onMouseLeave:f?H:void 0,onClick:f?_:void 0})},Fse=function(e){var t=e.nodes,n=e.nodeOpacity,r=e.nodeHoverOpacity,i=e.nodeHoverOthersOpacity,o=e.borderWidth,a=e.getBorderColor,s=e.borderRadius,l=e.setCurrentNode,c=e.currentNode,u=e.currentLink,d=e.isCurrentNode,f=e.isInteractive,h=e.onClick,m=e.tooltip,g=function(v){return c||u?d(v)?r:i:n};return p.jsx(p.Fragment,{children:t.map(function(v){return p.jsx(Nse,{node:v,x:v.x,y:v.y,width:v.width,height:v.height,color:v.color,opacity:g(v),borderWidth:o,borderColor:a(v),borderRadius:s,setCurrent:l,isInteractive:f,onClick:h,tooltip:m},v.id)})})},Dse=function(e){var t=e.id,n=e.layout,r=e.startColor,i=e.endColor;return p.jsxs("linearGradient",$a({id:t,spreadMethod:"pad"},n==="horizontal"?{x1:"0%",x2:"100%",y1:"0%",y2:"0%"}:{x1:"0%",x2:"0%",y1:"0%",y2:"100%"},{children:[p.jsx("stop",{offset:"0%",stopColor:r}),p.jsx("stop",{offset:"100%",stopColor:i})]}))},zse=function(e){var t=e.link,n=e.layout,r=e.path,i=e.color,o=e.opacity,a=e.blendMode,s=e.enableGradient,l=e.setCurrent,c=e.tooltip,u=e.isInteractive,d=e.onClick,f=t.source.id+"."+t.target.id+"."+t.index,h=Dn(),m=h.animate,g=h.config,v=jf(r),b=Qt({color:i,opacity:o,config:g,immediate:!m}),y=ui(),x=y.showTooltipFromEvent,S=y.hideTooltip,w=$.useCallback(function(_){l(t),x($.createElement(c,{link:t}),_,"left")},[l,t,x,c]),M=$.useCallback(function(_){x($.createElement(c,{link:t}),_,"left")},[x,t,c]),E=$.useCallback(function(){l(null),S()},[l,S]),H=$.useCallback(function(_){d==null||d(t,_)},[d,t]);return p.jsxs(p.Fragment,{children:[s&&p.jsx(Dse,{id:f,layout:n,startColor:t.startColor||t.source.color,endColor:t.endColor||t.target.color}),p.jsx(et.path,{fill:s?'url("#'+encodeURI(f)+'")':b.color,d:v,fillOpacity:b.opacity,onMouseEnter:u?w:void 0,onMouseMove:u?M:void 0,onMouseLeave:u?E:void 0,onClick:u?H:void 0,style:{mixBlendMode:a}})]})},Bse=function(e){var t=e.links,n=e.layout,r=e.linkOpacity,i=e.linkHoverOpacity,o=e.linkHoverOthersOpacity,a=e.linkContract,s=e.linkBlendMode,l=e.enableLinkGradient,c=e.setCurrentLink,u=e.currentLink,d=e.currentNode,f=e.isCurrentLink,h=e.isInteractive,m=e.onClick,g=e.tooltip,v=function(y){return d||u?f(y)?i:o:r},b=$.useMemo(function(){return n==="horizontal"?(y=qc().curve(Su),function(x,S){var w=Math.max(1,x.thickness-2*S)/2,M=.12*(x.target.x0-x.source.x1),E=[[x.source.x1,x.pos0-w],[x.source.x1+M,x.pos0-w],[x.target.x0-M,x.pos1-w],[x.target.x0,x.pos1-w],[x.target.x0,x.pos1+w],[x.target.x0-M,x.pos1+w],[x.source.x1+M,x.pos0+w],[x.source.x1,x.pos0+w],[x.source.x1,x.pos0-w]];return y(E)+"Z"}):function(){var x=qc().curve(Of);return function(S,w){var M=Math.max(1,S.thickness-2*w)/2,E=.12*(S.target.y0-S.source.y1),H=[[S.pos0+M,S.source.y1],[S.pos0+M,S.source.y1+E],[S.pos1+M,S.target.y0-E],[S.pos1+M,S.target.y0],[S.pos1-M,S.target.y0],[S.pos1-M,S.target.y0-E],[S.pos0-M,S.source.y1+E],[S.pos0-M,S.source.y1],[S.pos0+M,S.source.y1]];return x(H)+"Z"}}();var y},[n]);return p.jsx(p.Fragment,{children:t.map(function(y){return p.jsx(zse,{link:y,layout:n,path:b(y,a),color:y.color,opacity:v(y),blendMode:s,enableGradient:l,setCurrent:c,isInteractive:h,onClick:m,tooltip:g},y.source.id+"."+y.target.id+"."+y.index)})})},Wse=function(e){var t=e.nodes,n=e.layout,r=e.width,i=e.height,o=e.labelPosition,a=e.labelPadding,s=e.labelOrientation,l=e.getLabelTextColor,c=Zt(),u=s==="vertical"?-90:0,d=t.map(function(v){var b,y,x;return n==="horizontal"?(y=v.y+v.height/2,v.x<r/2?o==="inside"?(b=v.x1+a,x=s==="vertical"?"middle":"start"):(b=v.x-a,x=s==="vertical"?"middle":"end"):o==="inside"?(b=v.x-a,x=s==="vertical"?"middle":"end"):(b=v.x1+a,x=s==="vertical"?"middle":"start")):n==="vertical"&&(b=v.x+v.width/2,v.y<i/2?o==="inside"?(y=v.y1+a,x=s==="vertical"?"end":"middle"):(y=v.y-a,x=s==="vertical"?"start":"middle"):o==="inside"?(y=v.y-a,x=s==="vertical"?"start":"middle"):(y=v.y1+a,x=s==="vertical"?"end":"middle")),{id:v.id,label:v.label,x:b,y,textAnchor:x,color:l(v)}}),f=Dn(),h=f.animate,m=f.config,g=fw(d.length,d.map(function(v){return{transform:"translate("+v.x+", "+v.y+") rotate("+u+")",color:v.color,config:m,immediate:!h}}));return p.jsx(p.Fragment,{children:g.map(function(v,b){var y=d[b];return p.jsx(et.text,{dominantBaseline:"central",textAnchor:y.textAnchor,transform:v.transform,style:$a({},c.labels.text,{fill:v.color,pointerEvents:"none"}),children:y.label},y.id)})})},Zse=["isInteractive","animate","motionConfig","theme","renderWrapper"],Use=function(e){var t=e.data,n=e.valueFormat,r=e.layout,i=r===void 0?Nt.layout:r,o=e.sort,a=o===void 0?Nt.sort:o,s=e.align,l=s===void 0?Nt.align:s,c=e.width,u=e.height,d=e.margin,f=e.colors,h=f===void 0?Nt.colors:f,m=e.nodeThickness,g=m===void 0?Nt.nodeThickness:m,v=e.nodeSpacing,b=v===void 0?Nt.nodeThickness:v,y=e.nodeInnerPadding,x=y===void 0?Nt.nodeInnerPadding:y,S=e.nodeBorderColor,w=S===void 0?Nt.nodeBorderColor:S,M=e.nodeOpacity,E=M===void 0?Nt.nodeOpacity:M,H=e.nodeHoverOpacity,_=H===void 0?Nt.nodeHoverOpacity:H,O=e.nodeHoverOthersOpacity,k=O===void 0?Nt.nodeHoverOthersOpacity:O,A=e.nodeBorderWidth,j=A===void 0?Nt.nodeBorderWidth:A,V=e.nodeBorderRadius,T=V===void 0?Nt.nodeBorderRadius:V,L=e.linkOpacity,R=L===void 0?Nt.linkOpacity:L,I=e.linkHoverOpacity,P=I===void 0?Nt.linkHoverOpacity:I,N=e.linkHoverOthersOpacity,z=N===void 0?Nt.linkHoverOthersOpacity:N,q=e.linkContract,G=q===void 0?Nt.linkContract:q,Y=e.linkBlendMode,ee=Y===void 0?Nt.linkBlendMode:Y,Q=e.enableLinkGradient,K=Q===void 0?Nt.enableLinkGradient:Q,J=e.enableLabels,W=J===void 0?Nt.enableLabels:J,Z=e.labelPosition,U=Z===void 0?Nt.labelPosition:Z,F=e.labelPadding,re=F===void 0?Nt.labelPadding:F,B=e.labelOrientation,ie=B===void 0?Nt.labelOrientation:B,oe=e.label,ve=oe===void 0?Nt.label:oe,Ce=e.labelTextColor,pe=Ce===void 0?Nt.labelTextColor:Ce,ye=e.nodeTooltip,Se=ye===void 0?Nt.nodeTooltip:ye,me=e.linkTooltip,ge=me===void 0?Nt.linkTooltip:me,ce=e.isInteractive,$e=ce===void 0?Nt.isInteractive:ce,he=e.onClick,Ae=e.legends,Ie=Ae===void 0?Nt.legends:Ae,Re=e.layers,ke=Re===void 0?Nt.layers:Re,Ye=e.role,Xe=Ye===void 0?Nt.role:Ye,Fe=e.ariaLabel,je=e.ariaLabelledBy,Qe=e.ariaDescribedBy,Ze=Za(c,u,d),qe=Ze.margin,de=Ze.innerWidth,He=Ze.innerHeight,Ke=Ze.outerWidth,nt=Ze.outerHeight,Ne=Ase({data:t,valueFormat:n,layout:i,width:de,height:He,sort:a,align:l,colors:h,nodeThickness:g,nodeSpacing:b,nodeInnerPadding:x,nodeBorderColor:w,label:ve,labelTextColor:pe}),ze=Ne.nodes,De=Ne.links,Je=Ne.legendData,tt=Ne.getNodeBorderColor,Be=Ne.currentNode,Le=Ne.setCurrentNode,ut=Ne.currentLink,pt=Ne.setCurrentLink,Ee=Ne.getLabelTextColor,fe=function(){return!1},we=function(){return!1};if(ut&&(fe=function(rt){var X=rt.id;return X===ut.source.id||X===ut.target.id},we=function(rt){var X=rt.source,ae=rt.target;return X.id===ut.source.id&&ae.id===ut.target.id}),Be){var Ve=[Be.id];De.filter(function(rt){var X=rt.source,ae=rt.target;return X.id===Be.id||ae.id===Be.id}).forEach(function(rt){var X=rt.source,ae=rt.target;Ve.push(X.id),Ve.push(ae.id)}),Ve=X3(Ve),fe=function(rt){var X=rt.id;return Ve.includes(X)},we=function(rt){var X=rt.source,ae=rt.target;return X.id===Be.id||ae.id===Be.id}}var Ge={links:De,nodes:ze,margin:qe,width:c,height:u,outerWidth:Ke,outerHeight:nt},We={links:null,nodes:null,labels:null,legends:null};return ke.includes("links")&&(We.links=p.jsx(Bse,{links:De,layout:i,linkContract:G,linkOpacity:R,linkHoverOpacity:P,linkHoverOthersOpacity:z,linkBlendMode:ee,enableLinkGradient:K,setCurrentLink:pt,currentNode:Be,currentLink:ut,isCurrentLink:we,isInteractive:$e,onClick:he,tooltip:ge},"links")),ke.includes("nodes")&&(We.nodes=p.jsx(Fse,{nodes:ze,nodeOpacity:E,nodeHoverOpacity:_,nodeHoverOthersOpacity:k,borderWidth:j,borderRadius:T,getBorderColor:tt,setCurrentNode:Le,currentNode:Be,currentLink:ut,isCurrentNode:fe,isInteractive:$e,onClick:he,tooltip:Se},"nodes")),ke.includes("labels")&&W&&(We.labels=p.jsx(Wse,{nodes:ze,layout:i,width:de,height:He,labelPosition:U,labelPadding:re,labelOrientation:ie,getLabelTextColor:Ee},"labels")),ke.includes("legends")&&(We.legends=p.jsx($.Fragment,{children:Ie.map(function(rt,X){return p.jsx(Pf,$a({},rt,{containerWidth:de,containerHeight:He,data:Je}),"legend"+X)})},"legends")),p.jsx(wl,{width:Ke,height:nt,margin:qe,role:Xe,ariaLabel:Fe,ariaLabelledBy:je,ariaDescribedBy:Qe,children:ke.map(function(rt,X){var ae;return typeof rt=="function"?p.jsx($.Fragment,{children:$.createElement(rt,Ge)},X):(ae=We==null?void 0:We[rt])!=null?ae:null})})},qse=function(e){var t=e.isInteractive,n=t===void 0?Nt.isInteractive:t,r=e.animate,i=r===void 0?Nt.animate:r,o=e.motionConfig,a=o===void 0?Nt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=function(u,d){if(u==null)return{};var f,h,m={},g=Object.keys(u);for(h=0;h<g.length;h++)f=g[h],d.indexOf(f)>=0||(m[f]=u[f]);return m}(e,Zse);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(Use,$a({isInteractive:n},c))})},O$=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(qse,$a({width:n,height:r},e))}})};const Gse={background:"white",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px",font:"var(--gf-label-lg-default)"},Un=({id:e=null,style:t={},body:n=null})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{id:e,style:{...Gse,...t},children:n||p.jsx("span",{children:"Custom tooltip"})})]}),Yse=({sankeyData:e,linktooltip:t=null,nodetooltip:n=null,customStyle:r={},customMargin:i={}})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{style:{width:"100%",height:600,...r},children:p.jsx(O$,{labelPosition:"outside",data:e,margin:{top:20,right:120,bottom:20,left:120,...i},nodeTooltip:({node:o})=>p.jsx(Un,{body:(n==null?void 0:n({node:o}))||p.jsx("span",{children:"Sankey node tooltip"})}),linkTooltip:({link:o})=>p.jsx(Un,{body:(t==null?void 0:t({link:o}))||p.jsx("span",{children:"Sankey link tooltip"})})})})]});function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dn.apply(this,arguments)}var Kse={pointerEvents:"none"},Xse=function(e){var t=e.label,n=e.style,r=Zt();return p.jsx(et.g,{transform:n.transform,opacity:n.progress,style:Kse,children:p.jsx(et.text,{textAnchor:"middle",dominantBaseline:"central",style:dn({},r.labels.text,{fill:n.textColor}),children:t})})},R$=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},Qse=function(e,t){return e.filter(function(n){return Math.abs(Lf(n.arc.endAngle-n.arc.startAngle))>=t})},Jse={startAngle:{enter:function(e){return dn({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return dn({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return dn({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return dn({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return dn({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return dn({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return dn({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return dn({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return dn({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return dn({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return dn({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return dn({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},T$=function(e,t){return $.useMemo(function(){var n=Jse[e];return{enter:function(r){return dn({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return dn({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return dn({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},ele=function(e,t){var n=mie(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return ma(n,r)},tle=function(e){return function(t,n,r,i){return On([t,n,r,i],function(o,a,s,l){var c=ele({startAngle:o,endAngle:a,innerRadius:s,outerRadius:l},e);return"translate("+c.x+","+c.y+")"})}},nle=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var i=Dn(),o=i.animate,a=i.config,s=T$(n,r);return{transition:Cr(e,{keys:function(l){return l.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:a,immediate:!o}),interpolate:tle(t)}},rle=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,o=e.radiusOffset,a=e.skipAngle,s=e.textColor,l=e.component,c=l===void 0?Xse:l,u=yi(i),d=Zt(),f=Er(s,d),h=$.useMemo(function(){return n.filter(function(y){return Math.abs(Lf(y.arc.endAngle-y.arc.startAngle))>=a})},[n,a]),m=nle(h,o,r),g=m.transition,v=m.interpolate,b=c;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(y,x){return $.createElement(b,{key:x.id,datum:x,label:u(x),style:dn({},y,{transform:v(y.startAngle,y.endAngle,y.innerRadius,y.outerRadius),textColor:f(x)})})})})},ile=function(e){var t=e.label,n=e.style,r=Zt();return p.jsxs(et.g,{opacity:n.opacity,children:[p.jsx(et.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),p.jsx(et.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:dn({},r.labels.text,{fill:n.textColor}),children:t})]})},ole=function(e){var t=R$(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},k$=function(e,t,n,r){var i,o,a=R$(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=ma(a,e.outerRadius+t),l=ma(a,e.outerRadius+t+n);return a<Math.PI/2||a>1.5*Math.PI?(i="after",o={x:l.x+r,y:l.y}):(i="before",o={x:l.x-r,y:l.y}),{side:i,points:[s,l,o]}},ale=qc().x(function(e){return e.x}).y(function(e){return e.y}),sle=function(e,t,n,r,i,o,a){return On([e,t,n,r,i,o,a],function(s,l,c,u,d,f,h){var m=k$({startAngle:s,endAngle:l,innerRadius:c,outerRadius:u},d,f,h).points;return ale(m)})},lle=function(e,t,n,r){return On([e,t,n,r],function(i,o,a,s){return ole({startAngle:i,endAngle:o,innerRadius:a,outerRadius:s})})},cle=function(e,t,n,r,i,o,a,s){return On([e,t,n,r,i,o,a,s],function(l,c,u,d,f,h,m,g){var v=k$({startAngle:l,endAngle:c,innerRadius:u,outerRadius:d},f,h,m),b=v.points,y=v.side,x=b[2];return y==="before"?x.x-=g:x.x+=g,"translate("+x.x+","+x.y+")"})},ule=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,o=e.straightLength,a=e.skipAngle,s=a===void 0?0:a,l=e.textOffset,c=e.linkColor,u=e.textColor,d=Dn(),f=d.animate,h=d.config,m=Zt(),g=Er(c,m),v=Er(u,m),b=function(x,S){return $.useMemo(function(){return Qse(x,S)},[x,S])}(t,s),y=function(x){var S=x.offset,w=x.diagonalLength,M=x.straightLength,E=x.textOffset,H=x.getLinkColor,_=x.getTextColor;return $.useMemo(function(){return{enter:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:E,linkColor:H(O),textColor:_(O),opacity:0}},update:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:w,straightLength:M,textOffset:E,linkColor:H(O),textColor:_(O),opacity:1}},leave:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:E,linkColor:H(O),textColor:_(O),opacity:0}}}},[w,M,E,H,_,S])}({offset:r,diagonalLength:i,straightLength:o,textOffset:l,getLinkColor:g,getTextColor:v});return{transition:Cr(b,{keys:function(x){return x.id},initial:y.update,from:y.enter,enter:y.update,update:y.update,leave:y.leave,config:h,immediate:!f}),interpolateLink:sle,interpolateTextAnchor:lle,interpolateTextPosition:cle}},dle=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,o=e.offset,a=e.diagonalLength,s=e.straightLength,l=e.strokeWidth,c=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,h=f===void 0?ile:f,m=yi(r),g=ule({data:n,skipAngle:i,offset:o,diagonalLength:a,straightLength:s,textOffset:c,linkColor:d,textColor:u}),v=g.transition,b=g.interpolateLink,y=g.interpolateTextAnchor,x=g.interpolateTextPosition,S=h;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(w,M){return $.createElement(S,{key:M.id,datum:M,label:m(M),style:dn({},w,{thickness:l,path:b(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius,w.offset,w.diagonalLength,w.straightLength),textAnchor:y(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius),textPosition:x(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius,w.offset,w.diagonalLength,w.straightLength,w.textOffset)})})})})},fle=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=$.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),l=$.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),c=$.useCallback(function(d){return o==null?void 0:o(t,d)},[o,t]),u=$.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]);return p.jsx(et.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?l:void 0,onMouseMove:o?c:void 0,onMouseLeave:a?u:void 0})},hle=function(e,t,n,r,i){return On([e,t,n,r],function(o,a,s,l){return i({startAngle:o,endAngle:a,innerRadius:Math.max(0,s),outerRadius:Math.max(0,l)})})},gle=function(e,t,n){t===void 0&&(t="innerRadius");var r=Dn(),i=r.animate,o=r.config,a=T$(t,n);return{transition:Cr(e,{keys:function(s){return s.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:o,immediate:!i}),interpolate:hle}},vle=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,o=e.borderColor,a=e.onClick,s=e.onMouseEnter,l=e.onMouseMove,c=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?fle:d,h=Zt(),m=Er(o,h),g=gle(n,u,{enter:function(x){return{opacity:0,color:x.color,borderColor:m(x)}},update:function(x){return{opacity:1,color:x.color,borderColor:m(x)}},leave:function(x){return{opacity:0,color:x.color,borderColor:m(x)}}}),v=g.transition,b=g.interpolate,y=f;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,S){return $.createElement(y,{key:S.id,datum:S,style:dn({},x,{borderWidth:i,path:b(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius,r)}),onClick:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:c})})})},mle=function(e,t,n,r,i,o){o===void 0&&(o=!0);var a=[],s=ma(Dr(r),n);a.push([s.x,s.y]);var l=ma(Dr(i),n);a.push([l.x,l.y]);for(var c=Math.round(Math.min(r,i));c<=Math.round(Math.max(r,i));c++)if(c%90==0){var u=ma(Dr(c),n);a.push([u.x,u.y])}a=a.map(function(v){var b=v[0],y=v[1];return[e+b,t+y]}),o&&a.push([e,t]);var d=a.map(function(v){return v[0]}),f=a.map(function(v){return v[1]}),h=Math.min.apply(Math,d),m=Math.max.apply(Math,d),g=Math.min.apply(Math,f);return{points:a,x:h,y:g,width:m-h,height:Math.max.apply(Math,f)-g}},ple=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,o=i===void 0?0:i;return $.useMemo(function(){return aee().innerRadius(function(a){return a.innerRadius}).outerRadius(function(a){return a.outerRadius}).cornerRadius(r).padAngle(o)},[r,o])};function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ao.apply(this,arguments)}function j$(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Km,ble=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,o=e.toggleSerie;return p.jsx(p.Fragment,{children:r.map(function(a,s){var l;return p.jsx(Pf,Ao({},a,{containerWidth:t,containerHeight:n,data:(l=a.data)!=null?l:i,toggleSerie:a.toggleSerie?o:void 0}),s)})})},bt={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return p.jsx(Is,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Km=window.devicePixelRatio)!=null?Km:1},yle=["points"],Cle=function(e){var t=e.data,n=e.id,r=n===void 0?bt.id:n,i=e.value,o=i===void 0?bt.value:i,a=e.valueFormat,s=e.colors,l=s===void 0?bt.colors:s,c=yi(r),u=yi(o),d=Io(a),f=Mu(l,"id");return $.useMemo(function(){return t.map(function(h){var m,g=c(h),v=u(h),b={id:g,label:(m=h.label)!=null?m:g,hidden:!1,value:v,formattedValue:d(v),data:h};return Ao({},b,{color:f(b)})})},[t,c,u,d,f])},xle=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,o=e.outerRadius,a=e.padAngle,s=e.sortByValue,l=e.activeId,c=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,h=$.useMemo(function(){var b=cee().value(function(y){return y.value}).startAngle(Dr(n)).endAngle(Dr(r)).padAngle(Dr(a));return s||b.sortValues(null),b},[n,r,a,s]),m=$.useMemo(function(){var b=t.filter(function(y){return!d.includes(y.id)});return{dataWithArc:h(b).map(function(y){var x=Math.abs(y.endAngle-y.startAngle);return Ao({},y.data,{arc:{index:y.index,startAngle:y.startAngle,endAngle:y.endAngle,innerRadius:l===y.data.id?i-c:i,outerRadius:l===y.data.id?o+u:o,thickness:o-i,padAngle:y.padAngle,angle:x,angleDeg:Lf(x)}})}),legendData:t.map(function(y){return{id:y.id,label:y.label,color:y.color,hidden:d.includes(y.id),data:y}})}},[h,t,d,l,i,c,o,u]),g=m.legendData,v=$.useRef(f);return $.useEffect(function(){typeof v.current=="function"&&v.current(g)},[v,g]),m},wle=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,o=$.useState(i||r===void 0?null:r),a=o[0],s=o[1];return{activeId:i?t:a,setActiveId:$.useCallback(function(l){n&&n(l),i||s(l)},[i,n,s])}},Sle=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,o=i===void 0?bt.innerRadius:i,a=e.startAngle,s=a===void 0?bt.startAngle:a,l=e.endAngle,c=l===void 0?bt.endAngle:l,u=e.padAngle,d=u===void 0?bt.padAngle:u,f=e.sortByValue,h=f===void 0?bt.sortByValue:f,m=e.cornerRadius,g=m===void 0?bt.cornerRadius:m,v=e.fit,b=v===void 0?bt.fit:v,y=e.activeInnerRadiusOffset,x=y===void 0?bt.activeInnerRadiusOffset:y,S=e.activeOuterRadiusOffset,w=S===void 0?bt.activeOuterRadiusOffset:S,M=e.activeId,E=e.onActiveIdChange,H=e.defaultActiveId,_=e.forwardLegendData,O=wle({activeId:M,onActiveIdChange:E,defaultActiveId:H}),k=O.activeId,A=O.setActiveId,j=$.useState([]),V=j[0],T=j[1],L=$.useMemo(function(){var P,N=Math.min(n,r)/2,z=N*Math.min(o,1),q=n/2,G=r/2;if(b){var Y=mle(q,G,N,s-90,c-90),ee=Y.points,Q=j$(Y,yle),K=Math.min(n/Q.width,r/Q.height),J={width:Q.width*K,height:Q.height*K};J.x=(n-J.width)/2,J.y=(r-J.height)/2,q=(q-Q.x)/Q.width*Q.width*K+J.x,G=(G-Q.y)/Q.height*Q.height*K+J.y,P={box:Q,ratio:K,points:ee},N*=K,z*=K}return{centerX:q,centerY:G,radius:N,innerRadius:z,debug:P}},[n,r,o,s,c,b]),R=xle({data:t,startAngle:s,endAngle:c,innerRadius:L.innerRadius,outerRadius:L.radius,padAngle:d,sortByValue:h,activeId:k,activeInnerRadiusOffset:x,activeOuterRadiusOffset:w,hiddenIds:V,forwardLegendData:_}),I=$.useCallback(function(P){T(function(N){return N.indexOf(P)>-1?N.filter(function(z){return z!==P}):[].concat(N,[P])})},[]);return Ao({arcGenerator:ple({cornerRadius:g,padAngle:Dr(d)}),activeId:k,setActiveId:A,toggleSerie:I},R,L)},$le=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,o=e.radius,a=e.innerRadius;return $.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:o,innerRadius:a}},[t,n,r,i,o,a])},Mle=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,o=e.borderColor,a=e.isInteractive,s=e.onClick,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,h=e.transitionMode,m=ui(),g=m.showTooltipFromEvent,v=m.hideTooltip,b=$.useMemo(function(){if(a)return function(w,M){s==null||s(w,M)}},[a,s]),y=$.useMemo(function(){if(a)return function(w,M){g($.createElement(f,{datum:w}),M),d(w.id),l==null||l(w,M)}},[a,g,d,l,f]),x=$.useMemo(function(){if(a)return function(w,M){g($.createElement(f,{datum:w}),M),c==null||c(w,M)}},[a,g,c,f]),S=$.useMemo(function(){if(a)return function(w,M){v(),d(null),u==null||u(w,M)}},[a,v,d,u]);return p.jsx(vle,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:o,transitionMode:h,onClick:b,onMouseEnter:y,onMouseMove:x,onMouseLeave:S})},_le=["isInteractive","animate","motionConfig","theme","renderWrapper"],Hle=function(e){var t=e.data,n=e.id,r=n===void 0?bt.id:n,i=e.value,o=i===void 0?bt.value:i,a=e.valueFormat,s=e.sortByValue,l=s===void 0?bt.sortByValue:s,c=e.layers,u=c===void 0?bt.layers:c,d=e.startAngle,f=d===void 0?bt.startAngle:d,h=e.endAngle,m=h===void 0?bt.endAngle:h,g=e.padAngle,v=g===void 0?bt.padAngle:g,b=e.fit,y=b===void 0?bt.fit:b,x=e.innerRadius,S=x===void 0?bt.innerRadius:x,w=e.cornerRadius,M=w===void 0?bt.cornerRadius:w,E=e.activeInnerRadiusOffset,H=E===void 0?bt.activeInnerRadiusOffset:E,_=e.activeOuterRadiusOffset,O=_===void 0?bt.activeOuterRadiusOffset:_,k=e.width,A=e.height,j=e.margin,V=e.colors,T=V===void 0?bt.colors:V,L=e.borderWidth,R=L===void 0?bt.borderWidth:L,I=e.borderColor,P=I===void 0?bt.borderColor:I,N=e.enableArcLabels,z=N===void 0?bt.enableArcLabels:N,q=e.arcLabel,G=q===void 0?bt.arcLabel:q,Y=e.arcLabelsSkipAngle,ee=Y===void 0?bt.arcLabelsSkipAngle:Y,Q=e.arcLabelsTextColor,K=Q===void 0?bt.arcLabelsTextColor:Q,J=e.arcLabelsRadiusOffset,W=J===void 0?bt.arcLabelsRadiusOffset:J,Z=e.arcLabelsComponent,U=e.enableArcLinkLabels,F=U===void 0?bt.enableArcLinkLabels:U,re=e.arcLinkLabel,B=re===void 0?bt.arcLinkLabel:re,ie=e.arcLinkLabelsSkipAngle,oe=ie===void 0?bt.arcLinkLabelsSkipAngle:ie,ve=e.arcLinkLabelsOffset,Ce=ve===void 0?bt.arcLinkLabelsOffset:ve,pe=e.arcLinkLabelsDiagonalLength,ye=pe===void 0?bt.arcLinkLabelsDiagonalLength:pe,Se=e.arcLinkLabelsStraightLength,me=Se===void 0?bt.arcLinkLabelsStraightLength:Se,ge=e.arcLinkLabelsThickness,ce=ge===void 0?bt.arcLinkLabelsThickness:ge,$e=e.arcLinkLabelsTextOffset,he=$e===void 0?bt.arcLinkLabelsTextOffset:$e,Ae=e.arcLinkLabelsTextColor,Ie=Ae===void 0?bt.arcLinkLabelsTextColor:Ae,Re=e.arcLinkLabelsColor,ke=Re===void 0?bt.arcLinkLabelsColor:Re,Ye=e.arcLinkLabelComponent,Xe=e.defs,Fe=Xe===void 0?bt.defs:Xe,je=e.fill,Qe=je===void 0?bt.fill:je,Ze=e.isInteractive,qe=Ze===void 0?bt.isInteractive:Ze,de=e.onClick,He=e.onMouseEnter,Ke=e.onMouseMove,nt=e.onMouseLeave,Ne=e.tooltip,ze=Ne===void 0?bt.tooltip:Ne,De=e.activeId,Je=e.onActiveIdChange,tt=e.defaultActiveId,Be=e.transitionMode,Le=Be===void 0?bt.transitionMode:Be,ut=e.legends,pt=ut===void 0?bt.legends:ut,Ee=e.forwardLegendData,fe=e.role,we=fe===void 0?bt.role:fe,Ve=Za(k,A,j),Ge=Ve.outerWidth,We=Ve.outerHeight,rt=Ve.margin,X=Ve.innerWidth,ae=Ve.innerHeight,se=Cle({data:t,id:r,value:o,valueFormat:a,colors:T}),Oe=Sle({data:se,width:X,height:ae,fit:y,innerRadius:S,startAngle:f,endAngle:m,padAngle:v,sortByValue:l,cornerRadius:M,activeInnerRadiusOffset:H,activeOuterRadiusOffset:O,activeId:De,onActiveIdChange:Je,defaultActiveId:tt,forwardLegendData:Ee}),it=Oe.dataWithArc,at=Oe.legendData,st=Oe.arcGenerator,ft=Oe.centerX,be=Oe.centerY,xe=Oe.radius,Te=Oe.innerRadius,ot=Oe.setActiveId,vt=Oe.toggleSerie,wt=$7(Fe,it,Qe),ht={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes("arcs")&&(ht.arcs=p.jsx(Mle,{center:[ft,be],data:it,arcGenerator:st,borderWidth:R,borderColor:P,isInteractive:qe,onClick:de,onMouseEnter:He,onMouseMove:Ke,onMouseLeave:nt,setActiveId:ot,tooltip:ze,transitionMode:Le},"arcs")),F&&u.includes("arcLinkLabels")&&(ht.arcLinkLabels=p.jsx(dle,{center:[ft,be],data:it,label:B,skipAngle:oe,offset:Ce,diagonalLength:ye,straightLength:me,strokeWidth:ce,textOffset:he,textColor:Ie,linkColor:ke,component:Ye},"arcLinkLabels")),z&&u.includes("arcLabels")&&(ht.arcLabels=p.jsx(rle,{center:[ft,be],data:it,label:G,radiusOffset:W,skipAngle:ee,textColor:K,transitionMode:Le,component:Z},"arcLabels")),pt.length>0&&u.includes("legends")&&(ht.legends=p.jsx(ble,{width:X,height:ae,data:at,legends:pt,toggleSerie:vt},"legends"));var Ot=$le({dataWithArc:it,arcGenerator:st,centerX:ft,centerY:be,radius:xe,innerRadius:Te});return p.jsx(wl,{width:Ge,height:We,margin:rt,defs:wt,role:we,children:u.map(function(rn,At){return ht[rn]!==void 0?ht[rn]:typeof rn=="function"?p.jsx($.Fragment,{children:$.createElement(rn,Ot)},At):null})})},Ele=function(e){var t=e.isInteractive,n=t===void 0?bt.isInteractive:t,r=e.animate,i=r===void 0?bt.animate:r,o=e.motionConfig,a=o===void 0?bt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=j$(e,_le);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(Hle,Ao({isInteractive:n},c))})},Vle=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(Ele,Ao({width:n,height:r},e))}})};const Ole=yt.span`
489
+ `,fill:i,opacity:a,strokeWidth:l,stroke:c===void 0?"transparent":c,style:{pointerEvents:"none"}})})};function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ua.apply(this,arguments)}var qie={top:0,right:0,bottom:0,left:0},M7=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,o=e.itemCount,a=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var l=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:ua({},qie,i),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,h=(o-1)*r;return n==="row"?d=a*o+h+c:n==="column"&&(f=s*o+h+u),{width:d,height:f,padding:l}},y$=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},C$=function(e){var t,n,r,i,o,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,i=f/2,a="central",l?(r=d,o="end"):(r=c+u,o="start");break;case"right-to-left":t=d-c,n=(f-c)/2,i=f/2,a="central",l?(r=0,o="start"):(r=d-c-u,o="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,o="middle",l?(i=f,a="alphabetic"):(i=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,o="middle",l?(i=0,a="text-before-edge"):(i=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:o,labelAlignment:a}},Gie={circle:Bie,diamond:Wie,square:Zie,triangle:Uie},Yie=function(e){var t,n,r,i,o,a,s,l,c,u,d,f=e.x,h=e.y,m=e.width,g=e.height,v=e.data,b=e.direction,y=b===void 0?"left-to-right":b,x=e.justify,S=x!==void 0&&x,w=e.textColor,M=e.background,E=M===void 0?"transparent":M,H=e.opacity,_=H===void 0?1:H,O=e.symbolShape,k=O===void 0?"square":O,A=e.symbolSize,j=A===void 0?16:A,V=e.symbolSpacing,T=V===void 0?8:V,L=e.symbolBorderWidth,R=L===void 0?0:L,I=e.symbolBorderColor,P=I===void 0?"transparent":I,N=e.onClick,z=e.onMouseEnter,q=e.onMouseLeave,G=e.toggleSerie,Y=e.effects,ee=$.useState({}),Q=ee[0],K=ee[1],J=Zt(),W=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on==="hover"}).reduce(function(me,ge){return ua({},me,ge.style)},{});K(Se)}z==null||z(v,ye)},[z,v,Y]),Z=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on!=="hover"}).reduce(function(me,ge){return ua({},me,ge.style)},{});K(Se)}q==null||q(v,ye)},[q,v,Y]),U=C$({direction:y,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:j,symbolSpacing:T,width:m,height:g}),F=U.symbolX,re=U.symbolY,B=U.labelX,ie=U.labelY,oe=U.labelAnchor,ve=U.labelAlignment,Ce=[N,z,q,G].some(function(ye){return ye!==void 0}),pe=typeof k=="function"?k:Gie[k];return p.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:_},children:[p.jsx("rect",{width:m,height:g,fill:(r=Q.itemBackground)!=null?r:E,style:{cursor:Ce?"pointer":"auto"},onClick:function(ye){N==null||N(v,ye),G==null||G(v.id)},onMouseEnter:W,onMouseLeave:Z}),C.createElement(pe,ua({id:v.id,x:F,y:re,size:(i=Q.symbolSize)!=null?i:j,fill:(o=(a=v.fill)!=null?a:v.color)!=null?o:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:R,borderColor:(l=Q.symbolBorderColor)!=null?l:P},v.hidden?J.legends.hidden.symbol:void 0)),p.jsx("text",{textAnchor:oe,style:ua({},w7(J.legends.text),{fill:(c=(u=(d=Q.itemTextColor)!=null?d:w)!=null?u:J.legends.text.fill)!=null?c:"black",dominantBaseline:ve,pointerEvents:"none",userSelect:"none"},v.hidden?J.legends.hidden.text:void 0),x:B,y:ie,children:v.label})]})},Kie=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,o=e.padding,a=o===void 0?0:o,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemTextColor,v=e.itemBackground,b=v===void 0?"transparent":v,y=e.itemOpacity,x=y===void 0?1:y,S=e.symbolShape,w=e.symbolSize,M=e.symbolSpacing,E=e.symbolBorderWidth,H=e.symbolBorderColor,_=e.onClick,O=e.onMouseEnter,k=e.onMouseLeave,A=e.toggleSerie,j=M7({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:m,direction:i,padding:a}).padding,V=i==="row"?c+m:0,T=i==="column"?u+m:0;return p.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(L,R){return p.jsx(Yie,{data:L,x:R*V+j.left,y:R*T+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:g,background:b,opacity:x,symbolShape:S,symbolSize:w,symbolSpacing:M,symbolBorderWidth:E,symbolBorderColor:H,onClick:_,onMouseEnter:O,onMouseLeave:k,toggleSerie:A},R)})})},Pf=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,o=i===void 0?0:i,a=e.translateY,s=a===void 0?0:a,l=e.anchor,c=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemWidth,v=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,w=e.symbolShape,M=e.symbolSize,E=e.symbolSpacing,H=e.symbolBorderWidth,_=e.symbolBorderColor,O=e.onClick,k=e.onMouseEnter,A=e.onMouseLeave,j=e.toggleSerie,V=e.effects,T=M7({itemCount:t.length,itemsSpacing:m,itemWidth:g,itemHeight:v,direction:c,padding:d}),L=T.width,R=T.height,I=y$({anchor:l,translateX:o,translateY:s,containerWidth:n,containerHeight:r,width:L,height:R}),P=I.x,N=I.y;return p.jsx(Kie,{data:t,x:P,y:N,direction:c,padding:d,justify:f,effects:V,itemsSpacing:m,itemWidth:g,itemHeight:v,itemDirection:b,itemTextColor:y,itemBackground:x,itemOpacity:S,symbolShape:w,symbolSize:M,symbolSpacing:E,symbolBorderWidth:H,symbolBorderColor:_,onClick:O,onMouseEnter:k,onMouseLeave:A,toggleSerie:typeof j=="boolean"?void 0:j})},Xie={start:"left",middle:"center",end:"right"},x$=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,o=t.translateX,a=o===void 0?0:o,s=t.translateY,l=s===void 0?0:s,c=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,m=h!==void 0&&h,g=t.itemsSpacing,v=g===void 0?0:g,b=t.itemWidth,y=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,w=t.itemTextColor,M=t.symbolSize,E=M===void 0?16:M,H=t.symbolSpacing,_=H===void 0?8:H,O=t.theme,k=M7({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:v,direction:u,padding:f}),A=k.width,j=k.height,V=k.padding,T=y$({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:i,width:A,height:j}),L=T.x,R=T.y,I=u==="row"?b+v:0,P=u==="column"?y+v:0;e.save(),e.translate(L,R),e.font=O.legends.text.fontSize+"px "+(O.legends.text.fontFamily||"sans-serif"),n.forEach(function(N,z){var q,G,Y=z*I+V.left,ee=z*P+V.top,Q=C$({direction:S,justify:m,symbolSize:E,symbolSpacing:_,width:b,height:y}),K=Q.symbolX,J=Q.symbolY,W=Q.labelX,Z=Q.labelY,U=Q.labelAnchor,F=Q.labelAlignment;e.fillStyle=(q=N.color)!=null?q:"black",e.fillRect(Y+K,ee+J,E,E),e.textAlign=Xie[U],F==="central"&&(e.textBaseline="middle"),e.fillStyle=(G=w??O.legends.text.fill)!=null?G:"black",e.fillText(String(N.label),Y+W,ee+Z)}),e.restore()};function Qie(e){return e.target.depth}function Jie(e){return e.depth}function eoe(e,t){return t-1-e.height}function w$(e,t){return e.sourceLinks.length?e.depth:t-1}function toe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?kS(e.sourceLinks,Qie)-1:0}function c1(e){return function(){return e}}function Nm(e,t){return pd(e.source,t.source)||e.index-t.index}function Fm(e,t){return pd(e.target,t.target)||e.index-t.index}function pd(e,t){return e.y0-t.y0}function x2(e){return e.value}function noe(e){return e.index}function roe(e){return e.nodes}function ioe(e){return e.links}function Dm(e,t){const n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function zm({nodes:e}){for(const t of e){let n=t.y0,r=n;for(const i of t.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of t.targetLinks)i.y1=r+i.width/2,r+=i.width}}function ooe(){let e=0,t=0,n=1,r=1,i=24,o=8,a,s=noe,l=w$,c,u,d=roe,f=ioe,h=6;function m(){const T={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return g(T),v(T),b(T),y(T),w(T),zm(T),T}m.update=function(T){return zm(T),T},m.nodeId=function(T){return arguments.length?(s=typeof T=="function"?T:c1(T),m):s},m.nodeAlign=function(T){return arguments.length?(l=typeof T=="function"?T:c1(T),m):l},m.nodeSort=function(T){return arguments.length?(c=T,m):c},m.nodeWidth=function(T){return arguments.length?(i=+T,m):i},m.nodePadding=function(T){return arguments.length?(o=a=+T,m):o},m.nodes=function(T){return arguments.length?(d=typeof T=="function"?T:c1(T),m):d},m.links=function(T){return arguments.length?(f=typeof T=="function"?T:c1(T),m):f},m.linkSort=function(T){return arguments.length?(u=T,m):u},m.size=function(T){return arguments.length?(e=t=0,n=+T[0],r=+T[1],m):[n-e,r-t]},m.extent=function(T){return arguments.length?(e=+T[0][0],n=+T[1][0],t=+T[0][1],r=+T[1][1],m):[[e,t],[n,r]]},m.iterations=function(T){return arguments.length?(h=+T,m):h};function g({nodes:T,links:L}){for(const[I,P]of T.entries())P.index=I,P.sourceLinks=[],P.targetLinks=[];const R=new Map(T.map((I,P)=>[s(I,P,T),I]));for(const[I,P]of L.entries()){P.index=I;let{source:N,target:z}=P;typeof N!="object"&&(N=P.source=Dm(R,N)),typeof z!="object"&&(z=P.target=Dm(R,z)),N.sourceLinks.push(P),z.targetLinks.push(P)}if(u!=null)for(const{sourceLinks:I,targetLinks:P}of T)I.sort(u),P.sort(u)}function v({nodes:T}){for(const L of T)L.value=L.fixedValue===void 0?Math.max(v2(L.sourceLinks,x2),v2(L.targetLinks,x2)):L.fixedValue}function b({nodes:T}){const L=T.length;let R=new Set(T),I=new Set,P=0;for(;R.size;){for(const N of R){N.depth=P;for(const{target:z}of N.sourceLinks)I.add(z)}if(++P>L)throw new Error("circular link");R=I,I=new Set}}function y({nodes:T}){const L=T.length;let R=new Set(T),I=new Set,P=0;for(;R.size;){for(const N of R){N.height=P;for(const{source:z}of N.targetLinks)I.add(z)}if(++P>L)throw new Error("circular link");R=I,I=new Set}}function x({nodes:T}){const L=sm(T,P=>P.depth)+1,R=(n-e-i)/(L-1),I=new Array(L);for(const P of T){const N=Math.max(0,Math.min(L-1,Math.floor(l.call(null,P,L))));P.layer=N,P.x0=e+N*R,P.x1=P.x0+i,I[N]?I[N].push(P):I[N]=[P]}if(c)for(const P of I)P.sort(c);return I}function S(T){const L=kS(T,R=>(r-t-(R.length-1)*a)/v2(R,x2));for(const R of T){let I=t;for(const P of R){P.y0=I,P.y1=I+P.value*L,I=P.y1+a;for(const N of P.sourceLinks)N.width=N.value*L}I=(r-I+a)/(R.length+1);for(let P=0;P<R.length;++P){const N=R[P];N.y0+=I*(P+1),N.y1+=I*(P+1)}A(R)}}function w(T){const L=x(T);a=Math.min(o,(r-t)/(sm(L,R=>R.length)-1)),S(L);for(let R=0;R<h;++R){const I=Math.pow(.99,R),P=Math.max(1-I,(R+1)/h);E(L,I,P),M(L,I,P)}}function M(T,L,R){for(let I=1,P=T.length;I<P;++I){const N=T[I];for(const z of N){let q=0,G=0;for(const{source:ee,value:Q}of z.targetLinks){let K=Q*(z.layer-ee.layer);q+=j(ee,z)*K,G+=K}if(!(G>0))continue;let Y=(q/G-z.y0)*L;z.y0+=Y,z.y1+=Y,k(z)}c===void 0&&N.sort(pd),H(N,R)}}function E(T,L,R){for(let I=T.length,P=I-2;P>=0;--P){const N=T[P];for(const z of N){let q=0,G=0;for(const{target:ee,value:Q}of z.sourceLinks){let K=Q*(ee.layer-z.layer);q+=V(z,ee)*K,G+=K}if(!(G>0))continue;let Y=(q/G-z.y0)*L;z.y0+=Y,z.y1+=Y,k(z)}c===void 0&&N.sort(pd),H(N,R)}}function H(T,L){const R=T.length>>1,I=T[R];O(T,I.y0-a,R-1,L),_(T,I.y1+a,R+1,L),O(T,r,T.length-1,L),_(T,t,0,L)}function _(T,L,R,I){for(;R<T.length;++R){const P=T[R],N=(L-P.y0)*I;N>1e-6&&(P.y0+=N,P.y1+=N),L=P.y1+a}}function O(T,L,R,I){for(;R>=0;--R){const P=T[R],N=(P.y1-L)*I;N>1e-6&&(P.y0-=N,P.y1-=N),L=P.y0-a}}function k({sourceLinks:T,targetLinks:L}){if(u===void 0){for(const{source:{sourceLinks:R}}of L)R.sort(Fm);for(const{target:{targetLinks:R}}of T)R.sort(Nm)}}function A(T){if(u===void 0)for(const{sourceLinks:L,targetLinks:R}of T)L.sort(Fm),R.sort(Nm)}function j(T,L){let R=T.y0-(T.sourceLinks.length-1)*a/2;for(const{target:I,width:P}of T.sourceLinks){if(I===L)break;R+=P+a}for(const{source:I,width:P}of L.targetLinks){if(I===T)break;R-=P}return R}function V(T,L){let R=L.y0-(L.targetLinks.length-1)*a/2;for(const{source:I,width:P}of L.targetLinks){if(I===T)break;R+=P+a}for(const{target:I,width:P}of T.sourceLinks){if(I===L)break;R-=P}return R}return m}function aoe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var soe=aoe,loe=sl,coe=$u;function uoe(e,t){return e&&loe(t,coe(t),e)}var doe=uoe,foe=sl,hoe=pu;function goe(e,t){return e&&foe(t,hoe(t),e)}var voe=goe,moe=sl,poe=y7;function boe(e,t){return moe(e,poe(e),t)}var yoe=boe,Coe=b7,xoe=R4,woe=y7,Soe=US,$oe=Object.getOwnPropertySymbols,Moe=$oe?function(e){for(var t=[];e;)Coe(t,woe(e)),e=xoe(e);return t}:Soe,S$=Moe,_oe=sl,Hoe=S$;function Eoe(e,t){return _oe(e,Hoe(e),t)}var Voe=Eoe,Ooe=WS,Roe=S$,Toe=pu;function koe(e){return Ooe(e,Toe,Roe)}var $$=koe,joe=Object.prototype,Loe=joe.hasOwnProperty;function Poe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Loe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ioe=Poe,Aoe=O4;function Noe(e,t){var n=t?Aoe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Foe=Noe,Doe=/\w*$/;function zoe(e){var t=new e.constructor(e.source,Doe.exec(e));return t.lastIndex=e.lastIndex,t}var Boe=zoe,Bm=Qs,Wm=Bm?Bm.prototype:void 0,Zm=Wm?Wm.valueOf:void 0;function Woe(e){return Zm?Object(Zm.call(e)):{}}var Zoe=Woe,Uoe=O4,qoe=Foe,Goe=Boe,Yoe=Zoe,Koe=$w,Xoe="[object Boolean]",Qoe="[object Date]",Joe="[object Map]",eae="[object Number]",tae="[object RegExp]",nae="[object Set]",rae="[object String]",iae="[object Symbol]",oae="[object ArrayBuffer]",aae="[object DataView]",sae="[object Float32Array]",lae="[object Float64Array]",cae="[object Int8Array]",uae="[object Int16Array]",dae="[object Int32Array]",fae="[object Uint8Array]",hae="[object Uint8ClampedArray]",gae="[object Uint16Array]",vae="[object Uint32Array]";function mae(e,t,n){var r=e.constructor;switch(t){case oae:return Uoe(e);case Xoe:case Qoe:return new r(+e);case aae:return qoe(e,n);case sae:case lae:case cae:case uae:case dae:case fae:case hae:case gae:case vae:return Koe(e,n);case Joe:return new r;case eae:case rae:return new r(e);case tae:return Goe(e);case nae:return new r;case iae:return Yoe(e)}}var pae=mae,bae=Tf,yae=Gr,Cae="[object Map]";function xae(e){return yae(e)&&bae(e)==Cae}var wae=xae,Sae=wae,$ae=al,Um=hf,qm=Um&&Um.isMap,Mae=qm?$ae(qm):Sae,_ae=Mae,Hae=Tf,Eae=Gr,Vae="[object Set]";function Oae(e){return Eae(e)&&Hae(e)==Vae}var Rae=Oae,Tae=Rae,kae=al,Gm=hf,Ym=Gm&&Gm.isSet,jae=Ym?kae(Ym):Tae,Lae=jae,Pae=uf,Iae=soe,Aae=P4,Nae=doe,Fae=voe,Dae=ww,zae=Mw,Bae=yoe,Wae=Voe,Zae=qS,Uae=$$,qae=Tf,Gae=Ioe,Yae=pae,Kae=Hw,Xae=xr,Qae=ff,Jae=_ae,ese=_i,tse=Lae,nse=$u,rse=pu,ise=1,ose=2,ase=4,M$="[object Arguments]",sse="[object Array]",lse="[object Boolean]",cse="[object Date]",use="[object Error]",_$="[object Function]",dse="[object GeneratorFunction]",fse="[object Map]",hse="[object Number]",H$="[object Object]",gse="[object RegExp]",vse="[object Set]",mse="[object String]",pse="[object Symbol]",bse="[object WeakMap]",yse="[object ArrayBuffer]",Cse="[object DataView]",xse="[object Float32Array]",wse="[object Float64Array]",Sse="[object Int8Array]",$se="[object Int16Array]",Mse="[object Int32Array]",_se="[object Uint8Array]",Hse="[object Uint8ClampedArray]",Ese="[object Uint16Array]",Vse="[object Uint32Array]",un={};un[M$]=un[sse]=un[yse]=un[Cse]=un[lse]=un[cse]=un[xse]=un[wse]=un[Sse]=un[$se]=un[Mse]=un[fse]=un[hse]=un[H$]=un[gse]=un[vse]=un[mse]=un[pse]=un[_se]=un[Hse]=un[Ese]=un[Vse]=!0;un[use]=un[_$]=un[bse]=!1;function H1(e,t,n,r,i,o){var a,s=t&ise,l=t&ose,c=t&ase;if(n&&(a=i?n(e,r,i,o):n(e)),a!==void 0)return a;if(!ese(e))return e;var u=Xae(e);if(u){if(a=Gae(e),!s)return zae(e,a)}else{var d=qae(e),f=d==_$||d==dse;if(Qae(e))return Dae(e,s);if(d==H$||d==M$||f&&!i){if(a=l||f?{}:Kae(e),!s)return l?Wae(e,Fae(a,e)):Bae(e,Nae(a,e))}else{if(!un[d])return i?e:{};a=Yae(e,d,s)}}o||(o=new Pae);var h=o.get(e);if(h)return h;o.set(e,a),tse(e)?e.forEach(function(v){a.add(H1(v,t,n,v,e,o))}):Jae(e)&&e.forEach(function(v,b){a.set(b,H1(v,t,n,b,e,o))});var m=c?l?Uae:Zae:l?rse:nse,g=u?void 0:m(e);return Iae(g||e,function(v,b){g&&(b=v,v=e[b]),Aae(a,b,H1(v,t,n,b,e,o))}),a}var E$=H1,Ose=E$,Rse=1,Tse=4;function kse(e){return Ose(e,Rse|Tse)}var jse=kse;const V$=xn(jse);function $a(){return $a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$a.apply(this,arguments)}var w2={container:{display:"flex",alignItems:"center"},sourceChip:{marginRight:7},targetChip:{marginLeft:7,marginRight:7}},Lse={center:toe,justify:w$,start:Jie,end:eoe},Pse=function(e){return Lse[e]},Nt={layout:"horizontal",align:"center",sort:"auto",colors:{scheme:"nivo"},nodeOpacity:.75,nodeHoverOpacity:1,nodeHoverOthersOpacity:.15,nodeThickness:12,nodeSpacing:12,nodeInnerPadding:0,nodeBorderWidth:1,nodeBorderColor:{from:"color",modifiers:[["darker",.5]]},nodeBorderRadius:0,linkOpacity:.25,linkHoverOpacity:.6,linkHoverOthersOpacity:.15,linkContract:0,linkBlendMode:"multiply",enableLinkGradient:!1,enableLabels:!0,label:"id",labelPosition:"inside",labelPadding:9,labelOrientation:"horizontal",labelTextColor:{from:"color",modifiers:[["darker",.8]]},isInteractive:!0,nodeTooltip:function(e){var t=e.node;return p.jsx(Is,{id:t.label,enableChip:!0,color:t.color})},linkTooltip:function(e){var t=e.link;return p.jsx(Is,{id:p.jsxs("span",{style:w2.container,children:[p.jsx(Q1,{color:t.source.color,style:w2.sourceChip}),p.jsx("strong",{children:t.source.label})," > ",p.jsx("strong",{children:t.target.label}),p.jsx(Q1,{color:t.target.color,style:w2.targetChip}),p.jsx("strong",{children:t.formattedValue})]})})},legends:[],layers:["links","nodes","labels","legends"],role:"img",animate:!0,motionConfig:"gentle"},Ise=function(e){return e.id},Ase=function(e){var t=e.data,n=e.valueFormat,r=e.layout,i=e.width,o=e.height,a=e.sort,s=e.align,l=e.colors,c=e.nodeThickness,u=e.nodeSpacing,d=e.nodeInnerPadding,f=e.nodeBorderColor,h=e.label,m=e.labelTextColor,g=$.useState(null),v=g[0],b=g[1],y=$.useState(null),x=y[0],S=y[1],w=$.useMemo(function(){if(a!=="auto")return a==="input"?null:a==="ascending"?function(I,P){return I.value-P.value}:a==="descending"?function(I,P){return P.value-I.value}:a},[a]),M=a==="input"?null:void 0,E=$.useMemo(function(){return typeof s=="function"?s:Pse(s)},[s]),H=Zt(),_=Mu(l,"id"),O=Er(f,H),k=yi(h),A=Er(m,H),j=Io(n),V=$.useMemo(function(){return function(I){var P=I.data,N=I.formatValue,z=I.layout,q=I.alignFunction,G=I.sortFunction,Y=I.linkSortMode,ee=I.nodeThickness,Q=I.nodeSpacing,K=I.nodeInnerPadding,J=I.width,W=I.height,Z=I.getColor,U=I.getLabel,F=ooe().nodeAlign(q).nodeSort(G).linkSort(Y).nodeWidth(ee).nodePadding(Q).size(z==="horizontal"?[J,W]:[W,J]).nodeId(Ise),re=V$(P);return F(re),re.nodes.forEach(function(B){if(B.color=Z(B),B.label=U(B),B.formattedValue=N(B.value),z==="horizontal")B.x=B.x0+K,B.y=B.y0,B.width=Math.max(B.x1-B.x0-2*K,0),B.height=Math.max(B.y1-B.y0,0);else{B.x=B.y0,B.y=B.x0+K,B.width=Math.max(B.y1-B.y0,0),B.height=Math.max(B.x1-B.x0-2*K,0);var ie=B.x0,oe=B.x1;B.x0=B.y0,B.x1=B.y1,B.y0=ie,B.y1=oe}}),re.links.forEach(function(B){B.formattedValue=N(B.value),B.color=B.source.color,B.pos0=B.y0,B.pos1=B.y1,B.thickness=B.width,delete B.y0,delete B.y1,delete B.width}),re}({data:t,formatValue:j,layout:r,alignFunction:E,sortFunction:w,linkSortMode:M,nodeThickness:c,nodeSpacing:u,nodeInnerPadding:d,width:i,height:o,getColor:_,getLabel:k})},[t,j,r,E,w,M,c,u,d,i,o,_,k]),T=V.nodes,L=V.links,R=$.useMemo(function(){return T.map(function(I){return{id:I.id,label:I.label,color:I.color}})},[T]);return{nodes:T,links:L,legendData:R,getNodeBorderColor:O,currentNode:v,setCurrentNode:b,currentLink:x,setCurrentLink:S,getLabelTextColor:A}},Nse=function(e){var t=e.node,n=e.x,r=e.y,i=e.width,o=e.height,a=e.color,s=e.opacity,l=e.borderWidth,c=e.borderColor,u=e.borderRadius,d=e.setCurrent,f=e.isInteractive,h=e.onClick,m=e.tooltip,g=Dn(),v=g.animate,b=g.config,y=Qt({x:n,y:r,width:i,height:o,opacity:s,color:a,config:b,immediate:!v}),x=ui(),S=x.showTooltipFromEvent,w=x.hideTooltip,M=$.useCallback(function(O){d(t),S($.createElement(m,{node:t}),O,"left")},[d,t,S,m]),E=$.useCallback(function(O){S($.createElement(m,{node:t}),O,"left")},[S,t,m]),H=$.useCallback(function(){d(null),w()},[d,w]),_=$.useCallback(function(O){h==null||h(t,O)},[h,t]);return p.jsx(et.rect,{x:y.x,y:y.y,rx:u,ry:u,width:y.width.to(function(O){return Math.max(O,0)}),height:y.height.to(function(O){return Math.max(O,0)}),fill:y.color,fillOpacity:y.opacity,strokeWidth:l,stroke:c,strokeOpacity:s,onMouseEnter:f?M:void 0,onMouseMove:f?E:void 0,onMouseLeave:f?H:void 0,onClick:f?_:void 0})},Fse=function(e){var t=e.nodes,n=e.nodeOpacity,r=e.nodeHoverOpacity,i=e.nodeHoverOthersOpacity,o=e.borderWidth,a=e.getBorderColor,s=e.borderRadius,l=e.setCurrentNode,c=e.currentNode,u=e.currentLink,d=e.isCurrentNode,f=e.isInteractive,h=e.onClick,m=e.tooltip,g=function(v){return c||u?d(v)?r:i:n};return p.jsx(p.Fragment,{children:t.map(function(v){return p.jsx(Nse,{node:v,x:v.x,y:v.y,width:v.width,height:v.height,color:v.color,opacity:g(v),borderWidth:o,borderColor:a(v),borderRadius:s,setCurrent:l,isInteractive:f,onClick:h,tooltip:m},v.id)})})},Dse=function(e){var t=e.id,n=e.layout,r=e.startColor,i=e.endColor;return p.jsxs("linearGradient",$a({id:t,spreadMethod:"pad"},n==="horizontal"?{x1:"0%",x2:"100%",y1:"0%",y2:"0%"}:{x1:"0%",x2:"0%",y1:"0%",y2:"100%"},{children:[p.jsx("stop",{offset:"0%",stopColor:r}),p.jsx("stop",{offset:"100%",stopColor:i})]}))},zse=function(e){var t=e.link,n=e.layout,r=e.path,i=e.color,o=e.opacity,a=e.blendMode,s=e.enableGradient,l=e.setCurrent,c=e.tooltip,u=e.isInteractive,d=e.onClick,f=t.source.id+"."+t.target.id+"."+t.index,h=Dn(),m=h.animate,g=h.config,v=jf(r),b=Qt({color:i,opacity:o,config:g,immediate:!m}),y=ui(),x=y.showTooltipFromEvent,S=y.hideTooltip,w=$.useCallback(function(_){l(t),x($.createElement(c,{link:t}),_,"left")},[l,t,x,c]),M=$.useCallback(function(_){x($.createElement(c,{link:t}),_,"left")},[x,t,c]),E=$.useCallback(function(){l(null),S()},[l,S]),H=$.useCallback(function(_){d==null||d(t,_)},[d,t]);return p.jsxs(p.Fragment,{children:[s&&p.jsx(Dse,{id:f,layout:n,startColor:t.startColor||t.source.color,endColor:t.endColor||t.target.color}),p.jsx(et.path,{fill:s?'url("#'+encodeURI(f)+'")':b.color,d:v,fillOpacity:b.opacity,onMouseEnter:u?w:void 0,onMouseMove:u?M:void 0,onMouseLeave:u?E:void 0,onClick:u?H:void 0,style:{mixBlendMode:a}})]})},Bse=function(e){var t=e.links,n=e.layout,r=e.linkOpacity,i=e.linkHoverOpacity,o=e.linkHoverOthersOpacity,a=e.linkContract,s=e.linkBlendMode,l=e.enableLinkGradient,c=e.setCurrentLink,u=e.currentLink,d=e.currentNode,f=e.isCurrentLink,h=e.isInteractive,m=e.onClick,g=e.tooltip,v=function(y){return d||u?f(y)?i:o:r},b=$.useMemo(function(){return n==="horizontal"?(y=qc().curve(Su),function(x,S){var w=Math.max(1,x.thickness-2*S)/2,M=.12*(x.target.x0-x.source.x1),E=[[x.source.x1,x.pos0-w],[x.source.x1+M,x.pos0-w],[x.target.x0-M,x.pos1-w],[x.target.x0,x.pos1-w],[x.target.x0,x.pos1+w],[x.target.x0-M,x.pos1+w],[x.source.x1+M,x.pos0+w],[x.source.x1,x.pos0+w],[x.source.x1,x.pos0-w]];return y(E)+"Z"}):function(){var x=qc().curve(Of);return function(S,w){var M=Math.max(1,S.thickness-2*w)/2,E=.12*(S.target.y0-S.source.y1),H=[[S.pos0+M,S.source.y1],[S.pos0+M,S.source.y1+E],[S.pos1+M,S.target.y0-E],[S.pos1+M,S.target.y0],[S.pos1-M,S.target.y0],[S.pos1-M,S.target.y0-E],[S.pos0-M,S.source.y1+E],[S.pos0-M,S.source.y1],[S.pos0+M,S.source.y1]];return x(H)+"Z"}}();var y},[n]);return p.jsx(p.Fragment,{children:t.map(function(y){return p.jsx(zse,{link:y,layout:n,path:b(y,a),color:y.color,opacity:v(y),blendMode:s,enableGradient:l,setCurrent:c,isInteractive:h,onClick:m,tooltip:g},y.source.id+"."+y.target.id+"."+y.index)})})},Wse=function(e){var t=e.nodes,n=e.layout,r=e.width,i=e.height,o=e.labelPosition,a=e.labelPadding,s=e.labelOrientation,l=e.getLabelTextColor,c=Zt(),u=s==="vertical"?-90:0,d=t.map(function(v){var b,y,x;return n==="horizontal"?(y=v.y+v.height/2,v.x<r/2?o==="inside"?(b=v.x1+a,x=s==="vertical"?"middle":"start"):(b=v.x-a,x=s==="vertical"?"middle":"end"):o==="inside"?(b=v.x-a,x=s==="vertical"?"middle":"end"):(b=v.x1+a,x=s==="vertical"?"middle":"start")):n==="vertical"&&(b=v.x+v.width/2,v.y<i/2?o==="inside"?(y=v.y1+a,x=s==="vertical"?"end":"middle"):(y=v.y-a,x=s==="vertical"?"start":"middle"):o==="inside"?(y=v.y-a,x=s==="vertical"?"start":"middle"):(y=v.y1+a,x=s==="vertical"?"end":"middle")),{id:v.id,label:v.label,x:b,y,textAnchor:x,color:l(v)}}),f=Dn(),h=f.animate,m=f.config,g=fw(d.length,d.map(function(v){return{transform:"translate("+v.x+", "+v.y+") rotate("+u+")",color:v.color,config:m,immediate:!h}}));return p.jsx(p.Fragment,{children:g.map(function(v,b){var y=d[b];return p.jsx(et.text,{dominantBaseline:"central",textAnchor:y.textAnchor,transform:v.transform,style:$a({},c.labels.text,{fill:v.color,pointerEvents:"none"}),children:y.label},y.id)})})},Zse=["isInteractive","animate","motionConfig","theme","renderWrapper"],Use=function(e){var t=e.data,n=e.valueFormat,r=e.layout,i=r===void 0?Nt.layout:r,o=e.sort,a=o===void 0?Nt.sort:o,s=e.align,l=s===void 0?Nt.align:s,c=e.width,u=e.height,d=e.margin,f=e.colors,h=f===void 0?Nt.colors:f,m=e.nodeThickness,g=m===void 0?Nt.nodeThickness:m,v=e.nodeSpacing,b=v===void 0?Nt.nodeThickness:v,y=e.nodeInnerPadding,x=y===void 0?Nt.nodeInnerPadding:y,S=e.nodeBorderColor,w=S===void 0?Nt.nodeBorderColor:S,M=e.nodeOpacity,E=M===void 0?Nt.nodeOpacity:M,H=e.nodeHoverOpacity,_=H===void 0?Nt.nodeHoverOpacity:H,O=e.nodeHoverOthersOpacity,k=O===void 0?Nt.nodeHoverOthersOpacity:O,A=e.nodeBorderWidth,j=A===void 0?Nt.nodeBorderWidth:A,V=e.nodeBorderRadius,T=V===void 0?Nt.nodeBorderRadius:V,L=e.linkOpacity,R=L===void 0?Nt.linkOpacity:L,I=e.linkHoverOpacity,P=I===void 0?Nt.linkHoverOpacity:I,N=e.linkHoverOthersOpacity,z=N===void 0?Nt.linkHoverOthersOpacity:N,q=e.linkContract,G=q===void 0?Nt.linkContract:q,Y=e.linkBlendMode,ee=Y===void 0?Nt.linkBlendMode:Y,Q=e.enableLinkGradient,K=Q===void 0?Nt.enableLinkGradient:Q,J=e.enableLabels,W=J===void 0?Nt.enableLabels:J,Z=e.labelPosition,U=Z===void 0?Nt.labelPosition:Z,F=e.labelPadding,re=F===void 0?Nt.labelPadding:F,B=e.labelOrientation,ie=B===void 0?Nt.labelOrientation:B,oe=e.label,ve=oe===void 0?Nt.label:oe,Ce=e.labelTextColor,pe=Ce===void 0?Nt.labelTextColor:Ce,ye=e.nodeTooltip,Se=ye===void 0?Nt.nodeTooltip:ye,me=e.linkTooltip,ge=me===void 0?Nt.linkTooltip:me,ce=e.isInteractive,$e=ce===void 0?Nt.isInteractive:ce,he=e.onClick,Ae=e.legends,Ie=Ae===void 0?Nt.legends:Ae,Re=e.layers,ke=Re===void 0?Nt.layers:Re,Ye=e.role,Xe=Ye===void 0?Nt.role:Ye,Fe=e.ariaLabel,je=e.ariaLabelledBy,Qe=e.ariaDescribedBy,Ze=Za(c,u,d),qe=Ze.margin,de=Ze.innerWidth,He=Ze.innerHeight,Ke=Ze.outerWidth,nt=Ze.outerHeight,Ne=Ase({data:t,valueFormat:n,layout:i,width:de,height:He,sort:a,align:l,colors:h,nodeThickness:g,nodeSpacing:b,nodeInnerPadding:x,nodeBorderColor:w,label:ve,labelTextColor:pe}),ze=Ne.nodes,De=Ne.links,Je=Ne.legendData,tt=Ne.getNodeBorderColor,Be=Ne.currentNode,Le=Ne.setCurrentNode,ut=Ne.currentLink,pt=Ne.setCurrentLink,Ee=Ne.getLabelTextColor,fe=function(){return!1},we=function(){return!1};if(ut&&(fe=function(rt){var X=rt.id;return X===ut.source.id||X===ut.target.id},we=function(rt){var X=rt.source,ae=rt.target;return X.id===ut.source.id&&ae.id===ut.target.id}),Be){var Ve=[Be.id];De.filter(function(rt){var X=rt.source,ae=rt.target;return X.id===Be.id||ae.id===Be.id}).forEach(function(rt){var X=rt.source,ae=rt.target;Ve.push(X.id),Ve.push(ae.id)}),Ve=X3(Ve),fe=function(rt){var X=rt.id;return Ve.includes(X)},we=function(rt){var X=rt.source,ae=rt.target;return X.id===Be.id||ae.id===Be.id}}var Ge={links:De,nodes:ze,margin:qe,width:c,height:u,outerWidth:Ke,outerHeight:nt},We={links:null,nodes:null,labels:null,legends:null};return ke.includes("links")&&(We.links=p.jsx(Bse,{links:De,layout:i,linkContract:G,linkOpacity:R,linkHoverOpacity:P,linkHoverOthersOpacity:z,linkBlendMode:ee,enableLinkGradient:K,setCurrentLink:pt,currentNode:Be,currentLink:ut,isCurrentLink:we,isInteractive:$e,onClick:he,tooltip:ge},"links")),ke.includes("nodes")&&(We.nodes=p.jsx(Fse,{nodes:ze,nodeOpacity:E,nodeHoverOpacity:_,nodeHoverOthersOpacity:k,borderWidth:j,borderRadius:T,getBorderColor:tt,setCurrentNode:Le,currentNode:Be,currentLink:ut,isCurrentNode:fe,isInteractive:$e,onClick:he,tooltip:Se},"nodes")),ke.includes("labels")&&W&&(We.labels=p.jsx(Wse,{nodes:ze,layout:i,width:de,height:He,labelPosition:U,labelPadding:re,labelOrientation:ie,getLabelTextColor:Ee},"labels")),ke.includes("legends")&&(We.legends=p.jsx($.Fragment,{children:Ie.map(function(rt,X){return p.jsx(Pf,$a({},rt,{containerWidth:de,containerHeight:He,data:Je}),"legend"+X)})},"legends")),p.jsx(wl,{width:Ke,height:nt,margin:qe,role:Xe,ariaLabel:Fe,ariaLabelledBy:je,ariaDescribedBy:Qe,children:ke.map(function(rt,X){var ae;return typeof rt=="function"?p.jsx($.Fragment,{children:$.createElement(rt,Ge)},X):(ae=We==null?void 0:We[rt])!=null?ae:null})})},qse=function(e){var t=e.isInteractive,n=t===void 0?Nt.isInteractive:t,r=e.animate,i=r===void 0?Nt.animate:r,o=e.motionConfig,a=o===void 0?Nt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=function(u,d){if(u==null)return{};var f,h,m={},g=Object.keys(u);for(h=0;h<g.length;h++)f=g[h],d.indexOf(f)>=0||(m[f]=u[f]);return m}(e,Zse);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(Use,$a({isInteractive:n},c))})},O$=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(qse,$a({width:n,height:r},e))}})};const Gse={background:"white",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px",font:"var(--gf-label-lg-default)"},Un=({id:e=null,style:t={},body:n=null})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{id:e,style:{...Gse,...t},children:n||p.jsx("span",{children:"Custom tooltip"})})]}),Yse=({sankeyData:e,linktooltip:t=null,nodetooltip:n=null,customStyle:r={},customMargin:i={}})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{style:{width:"100%",height:600,...r},children:p.jsx(O$,{labelPosition:"outside",data:e,margin:{top:20,right:120,bottom:20,left:120,...i},nodeTooltip:({node:o})=>p.jsx(Un,{body:(n==null?void 0:n({node:o}))||p.jsx("span",{children:"Sankey node tooltip"})}),linkTooltip:({link:o})=>p.jsx(Un,{body:(t==null?void 0:t({link:o}))||p.jsx("span",{children:"Sankey link tooltip"})})})})]});function dn(){return dn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dn.apply(this,arguments)}var Kse={pointerEvents:"none"},Xse=function(e){var t=e.label,n=e.style,r=Zt();return p.jsx(et.g,{transform:n.transform,opacity:n.progress,style:Kse,children:p.jsx(et.text,{textAnchor:"middle",dominantBaseline:"central",style:dn({},r.labels.text,{fill:n.textColor}),children:t})})},R$=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},Qse=function(e,t){return e.filter(function(n){return Math.abs(Lf(n.arc.endAngle-n.arc.startAngle))>=t})},Jse={startAngle:{enter:function(e){return dn({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return dn({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return dn({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return dn({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return dn({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return dn({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return dn({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return dn({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return dn({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return dn({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return dn({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return dn({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return dn({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},T$=function(e,t){return $.useMemo(function(){var n=Jse[e];return{enter:function(r){return dn({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return dn({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return dn({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},ele=function(e,t){var n=mie(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return ma(n,r)},tle=function(e){return function(t,n,r,i){return On([t,n,r,i],function(o,a,s,l){var c=ele({startAngle:o,endAngle:a,innerRadius:s,outerRadius:l},e);return"translate("+c.x+","+c.y+")"})}},nle=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var i=Dn(),o=i.animate,a=i.config,s=T$(n,r);return{transition:Cr(e,{keys:function(l){return l.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:a,immediate:!o}),interpolate:tle(t)}},rle=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,o=e.radiusOffset,a=e.skipAngle,s=e.textColor,l=e.component,c=l===void 0?Xse:l,u=yi(i),d=Zt(),f=Er(s,d),h=$.useMemo(function(){return n.filter(function(y){return Math.abs(Lf(y.arc.endAngle-y.arc.startAngle))>=a})},[n,a]),m=nle(h,o,r),g=m.transition,v=m.interpolate,b=c;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:g(function(y,x){return $.createElement(b,{key:x.id,datum:x,label:u(x),style:dn({},y,{transform:v(y.startAngle,y.endAngle,y.innerRadius,y.outerRadius),textColor:f(x)})})})})},ile=function(e){var t=e.label,n=e.style,r=Zt();return p.jsxs(et.g,{opacity:n.opacity,children:[p.jsx(et.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),p.jsx(et.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:dn({},r.labels.text,{fill:n.textColor}),children:t})]})},ole=function(e){var t=R$(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},k$=function(e,t,n,r){var i,o,a=R$(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=ma(a,e.outerRadius+t),l=ma(a,e.outerRadius+t+n);return a<Math.PI/2||a>1.5*Math.PI?(i="after",o={x:l.x+r,y:l.y}):(i="before",o={x:l.x-r,y:l.y}),{side:i,points:[s,l,o]}},ale=qc().x(function(e){return e.x}).y(function(e){return e.y}),sle=function(e,t,n,r,i,o,a){return On([e,t,n,r,i,o,a],function(s,l,c,u,d,f,h){var m=k$({startAngle:s,endAngle:l,innerRadius:c,outerRadius:u},d,f,h).points;return ale(m)})},lle=function(e,t,n,r){return On([e,t,n,r],function(i,o,a,s){return ole({startAngle:i,endAngle:o,innerRadius:a,outerRadius:s})})},cle=function(e,t,n,r,i,o,a,s){return On([e,t,n,r,i,o,a,s],function(l,c,u,d,f,h,m,g){var v=k$({startAngle:l,endAngle:c,innerRadius:u,outerRadius:d},f,h,m),b=v.points,y=v.side,x=b[2];return y==="before"?x.x-=g:x.x+=g,"translate("+x.x+","+x.y+")"})},ule=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,o=e.straightLength,a=e.skipAngle,s=a===void 0?0:a,l=e.textOffset,c=e.linkColor,u=e.textColor,d=Dn(),f=d.animate,h=d.config,m=Zt(),g=Er(c,m),v=Er(u,m),b=function(x,S){return $.useMemo(function(){return Qse(x,S)},[x,S])}(t,s),y=function(x){var S=x.offset,w=x.diagonalLength,M=x.straightLength,E=x.textOffset,H=x.getLinkColor,_=x.getTextColor;return $.useMemo(function(){return{enter:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:E,linkColor:H(O),textColor:_(O),opacity:0}},update:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:w,straightLength:M,textOffset:E,linkColor:H(O),textColor:_(O),opacity:1}},leave:function(O){return{startAngle:O.arc.startAngle,endAngle:O.arc.endAngle,innerRadius:O.arc.innerRadius,outerRadius:O.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:E,linkColor:H(O),textColor:_(O),opacity:0}}}},[w,M,E,H,_,S])}({offset:r,diagonalLength:i,straightLength:o,textOffset:l,getLinkColor:g,getTextColor:v});return{transition:Cr(b,{keys:function(x){return x.id},initial:y.update,from:y.enter,enter:y.update,update:y.update,leave:y.leave,config:h,immediate:!f}),interpolateLink:sle,interpolateTextAnchor:lle,interpolateTextPosition:cle}},dle=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,o=e.offset,a=e.diagonalLength,s=e.straightLength,l=e.strokeWidth,c=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,h=f===void 0?ile:f,m=yi(r),g=ule({data:n,skipAngle:i,offset:o,diagonalLength:a,straightLength:s,textOffset:c,linkColor:d,textColor:u}),v=g.transition,b=g.interpolateLink,y=g.interpolateTextAnchor,x=g.interpolateTextPosition,S=h;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(w,M){return $.createElement(S,{key:M.id,datum:M,label:m(M),style:dn({},w,{thickness:l,path:b(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius,w.offset,w.diagonalLength,w.straightLength),textAnchor:y(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius),textPosition:x(w.startAngle,w.endAngle,w.innerRadius,w.outerRadius,w.offset,w.diagonalLength,w.straightLength,w.textOffset)})})})})},fle=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=$.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),l=$.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),c=$.useCallback(function(d){return o==null?void 0:o(t,d)},[o,t]),u=$.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]);return p.jsx(et.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?l:void 0,onMouseMove:o?c:void 0,onMouseLeave:a?u:void 0})},hle=function(e,t,n,r,i){return On([e,t,n,r],function(o,a,s,l){return i({startAngle:o,endAngle:a,innerRadius:Math.max(0,s),outerRadius:Math.max(0,l)})})},gle=function(e,t,n){t===void 0&&(t="innerRadius");var r=Dn(),i=r.animate,o=r.config,a=T$(t,n);return{transition:Cr(e,{keys:function(s){return s.id},initial:a.update,from:a.enter,enter:a.update,update:a.update,leave:a.leave,config:o,immediate:!i}),interpolate:hle}},vle=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,o=e.borderColor,a=e.onClick,s=e.onMouseEnter,l=e.onMouseMove,c=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?fle:d,h=Zt(),m=Er(o,h),g=gle(n,u,{enter:function(x){return{opacity:0,color:x.color,borderColor:m(x)}},update:function(x){return{opacity:1,color:x.color,borderColor:m(x)}},leave:function(x){return{opacity:0,color:x.color,borderColor:m(x)}}}),v=g.transition,b=g.interpolate,y=f;return p.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,S){return $.createElement(y,{key:S.id,datum:S,style:dn({},x,{borderWidth:i,path:b(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius,r)}),onClick:a,onMouseEnter:s,onMouseMove:l,onMouseLeave:c})})})},mle=function(e,t,n,r,i,o){o===void 0&&(o=!0);var a=[],s=ma(Dr(r),n);a.push([s.x,s.y]);var l=ma(Dr(i),n);a.push([l.x,l.y]);for(var c=Math.round(Math.min(r,i));c<=Math.round(Math.max(r,i));c++)if(c%90==0){var u=ma(Dr(c),n);a.push([u.x,u.y])}a=a.map(function(v){var b=v[0],y=v[1];return[e+b,t+y]}),o&&a.push([e,t]);var d=a.map(function(v){return v[0]}),f=a.map(function(v){return v[1]}),h=Math.min.apply(Math,d),m=Math.max.apply(Math,d),g=Math.min.apply(Math,f);return{points:a,x:h,y:g,width:m-h,height:Math.max.apply(Math,f)-g}},ple=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,o=i===void 0?0:i;return $.useMemo(function(){return aee().innerRadius(function(a){return a.innerRadius}).outerRadius(function(a){return a.outerRadius}).cornerRadius(r).padAngle(o)},[r,o])};function Ao(){return Ao=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ao.apply(this,arguments)}function j$(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Km,ble=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,o=e.toggleSerie;return p.jsx(p.Fragment,{children:r.map(function(a,s){var l;return p.jsx(Pf,Ao({},a,{containerWidth:t,containerHeight:n,data:(l=a.data)!=null?l:i,toggleSerie:a.toggleSerie?o:void 0}),s)})})},bt={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return p.jsx(Is,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Km=window.devicePixelRatio)!=null?Km:1},yle=["points"],Cle=function(e){var t=e.data,n=e.id,r=n===void 0?bt.id:n,i=e.value,o=i===void 0?bt.value:i,a=e.valueFormat,s=e.colors,l=s===void 0?bt.colors:s,c=yi(r),u=yi(o),d=Io(a),f=Mu(l,"id");return $.useMemo(function(){return t.map(function(h){var m,g=c(h),v=u(h),b={id:g,label:(m=h.label)!=null?m:g,hidden:!1,value:v,formattedValue:d(v),data:h};return Ao({},b,{color:f(b)})})},[t,c,u,d,f])},xle=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,o=e.outerRadius,a=e.padAngle,s=e.sortByValue,l=e.activeId,c=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,h=$.useMemo(function(){var b=cee().value(function(y){return y.value}).startAngle(Dr(n)).endAngle(Dr(r)).padAngle(Dr(a));return s||b.sortValues(null),b},[n,r,a,s]),m=$.useMemo(function(){var b=t.filter(function(y){return!d.includes(y.id)});return{dataWithArc:h(b).map(function(y){var x=Math.abs(y.endAngle-y.startAngle);return Ao({},y.data,{arc:{index:y.index,startAngle:y.startAngle,endAngle:y.endAngle,innerRadius:l===y.data.id?i-c:i,outerRadius:l===y.data.id?o+u:o,thickness:o-i,padAngle:y.padAngle,angle:x,angleDeg:Lf(x)}})}),legendData:t.map(function(y){return{id:y.id,label:y.label,color:y.color,hidden:d.includes(y.id),data:y}})}},[h,t,d,l,i,c,o,u]),g=m.legendData,v=$.useRef(f);return $.useEffect(function(){typeof v.current=="function"&&v.current(g)},[v,g]),m},wle=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,o=$.useState(i||r===void 0?null:r),a=o[0],s=o[1];return{activeId:i?t:a,setActiveId:$.useCallback(function(l){n&&n(l),i||s(l)},[i,n,s])}},Sle=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,o=i===void 0?bt.innerRadius:i,a=e.startAngle,s=a===void 0?bt.startAngle:a,l=e.endAngle,c=l===void 0?bt.endAngle:l,u=e.padAngle,d=u===void 0?bt.padAngle:u,f=e.sortByValue,h=f===void 0?bt.sortByValue:f,m=e.cornerRadius,g=m===void 0?bt.cornerRadius:m,v=e.fit,b=v===void 0?bt.fit:v,y=e.activeInnerRadiusOffset,x=y===void 0?bt.activeInnerRadiusOffset:y,S=e.activeOuterRadiusOffset,w=S===void 0?bt.activeOuterRadiusOffset:S,M=e.activeId,E=e.onActiveIdChange,H=e.defaultActiveId,_=e.forwardLegendData,O=wle({activeId:M,onActiveIdChange:E,defaultActiveId:H}),k=O.activeId,A=O.setActiveId,j=$.useState([]),V=j[0],T=j[1],L=$.useMemo(function(){var P,N=Math.min(n,r)/2,z=N*Math.min(o,1),q=n/2,G=r/2;if(b){var Y=mle(q,G,N,s-90,c-90),ee=Y.points,Q=j$(Y,yle),K=Math.min(n/Q.width,r/Q.height),J={width:Q.width*K,height:Q.height*K};J.x=(n-J.width)/2,J.y=(r-J.height)/2,q=(q-Q.x)/Q.width*Q.width*K+J.x,G=(G-Q.y)/Q.height*Q.height*K+J.y,P={box:Q,ratio:K,points:ee},N*=K,z*=K}return{centerX:q,centerY:G,radius:N,innerRadius:z,debug:P}},[n,r,o,s,c,b]),R=xle({data:t,startAngle:s,endAngle:c,innerRadius:L.innerRadius,outerRadius:L.radius,padAngle:d,sortByValue:h,activeId:k,activeInnerRadiusOffset:x,activeOuterRadiusOffset:w,hiddenIds:V,forwardLegendData:_}),I=$.useCallback(function(P){T(function(N){return N.indexOf(P)>-1?N.filter(function(z){return z!==P}):[].concat(N,[P])})},[]);return Ao({arcGenerator:ple({cornerRadius:g,padAngle:Dr(d)}),activeId:k,setActiveId:A,toggleSerie:I},R,L)},$le=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,o=e.radius,a=e.innerRadius;return $.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:o,innerRadius:a}},[t,n,r,i,o,a])},Mle=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,o=e.borderColor,a=e.isInteractive,s=e.onClick,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,h=e.transitionMode,m=ui(),g=m.showTooltipFromEvent,v=m.hideTooltip,b=$.useMemo(function(){if(a)return function(w,M){s==null||s(w,M)}},[a,s]),y=$.useMemo(function(){if(a)return function(w,M){g($.createElement(f,{datum:w}),M),d(w.id),l==null||l(w,M)}},[a,g,d,l,f]),x=$.useMemo(function(){if(a)return function(w,M){g($.createElement(f,{datum:w}),M),c==null||c(w,M)}},[a,g,c,f]),S=$.useMemo(function(){if(a)return function(w,M){v(),d(null),u==null||u(w,M)}},[a,v,d,u]);return p.jsx(vle,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:o,transitionMode:h,onClick:b,onMouseEnter:y,onMouseMove:x,onMouseLeave:S})},_le=["isInteractive","animate","motionConfig","theme","renderWrapper"],Hle=function(e){var t=e.data,n=e.id,r=n===void 0?bt.id:n,i=e.value,o=i===void 0?bt.value:i,a=e.valueFormat,s=e.sortByValue,l=s===void 0?bt.sortByValue:s,c=e.layers,u=c===void 0?bt.layers:c,d=e.startAngle,f=d===void 0?bt.startAngle:d,h=e.endAngle,m=h===void 0?bt.endAngle:h,g=e.padAngle,v=g===void 0?bt.padAngle:g,b=e.fit,y=b===void 0?bt.fit:b,x=e.innerRadius,S=x===void 0?bt.innerRadius:x,w=e.cornerRadius,M=w===void 0?bt.cornerRadius:w,E=e.activeInnerRadiusOffset,H=E===void 0?bt.activeInnerRadiusOffset:E,_=e.activeOuterRadiusOffset,O=_===void 0?bt.activeOuterRadiusOffset:_,k=e.width,A=e.height,j=e.margin,V=e.colors,T=V===void 0?bt.colors:V,L=e.borderWidth,R=L===void 0?bt.borderWidth:L,I=e.borderColor,P=I===void 0?bt.borderColor:I,N=e.enableArcLabels,z=N===void 0?bt.enableArcLabels:N,q=e.arcLabel,G=q===void 0?bt.arcLabel:q,Y=e.arcLabelsSkipAngle,ee=Y===void 0?bt.arcLabelsSkipAngle:Y,Q=e.arcLabelsTextColor,K=Q===void 0?bt.arcLabelsTextColor:Q,J=e.arcLabelsRadiusOffset,W=J===void 0?bt.arcLabelsRadiusOffset:J,Z=e.arcLabelsComponent,U=e.enableArcLinkLabels,F=U===void 0?bt.enableArcLinkLabels:U,re=e.arcLinkLabel,B=re===void 0?bt.arcLinkLabel:re,ie=e.arcLinkLabelsSkipAngle,oe=ie===void 0?bt.arcLinkLabelsSkipAngle:ie,ve=e.arcLinkLabelsOffset,Ce=ve===void 0?bt.arcLinkLabelsOffset:ve,pe=e.arcLinkLabelsDiagonalLength,ye=pe===void 0?bt.arcLinkLabelsDiagonalLength:pe,Se=e.arcLinkLabelsStraightLength,me=Se===void 0?bt.arcLinkLabelsStraightLength:Se,ge=e.arcLinkLabelsThickness,ce=ge===void 0?bt.arcLinkLabelsThickness:ge,$e=e.arcLinkLabelsTextOffset,he=$e===void 0?bt.arcLinkLabelsTextOffset:$e,Ae=e.arcLinkLabelsTextColor,Ie=Ae===void 0?bt.arcLinkLabelsTextColor:Ae,Re=e.arcLinkLabelsColor,ke=Re===void 0?bt.arcLinkLabelsColor:Re,Ye=e.arcLinkLabelComponent,Xe=e.defs,Fe=Xe===void 0?bt.defs:Xe,je=e.fill,Qe=je===void 0?bt.fill:je,Ze=e.isInteractive,qe=Ze===void 0?bt.isInteractive:Ze,de=e.onClick,He=e.onMouseEnter,Ke=e.onMouseMove,nt=e.onMouseLeave,Ne=e.tooltip,ze=Ne===void 0?bt.tooltip:Ne,De=e.activeId,Je=e.onActiveIdChange,tt=e.defaultActiveId,Be=e.transitionMode,Le=Be===void 0?bt.transitionMode:Be,ut=e.legends,pt=ut===void 0?bt.legends:ut,Ee=e.forwardLegendData,fe=e.role,we=fe===void 0?bt.role:fe,Ve=Za(k,A,j),Ge=Ve.outerWidth,We=Ve.outerHeight,rt=Ve.margin,X=Ve.innerWidth,ae=Ve.innerHeight,se=Cle({data:t,id:r,value:o,valueFormat:a,colors:T}),Oe=Sle({data:se,width:X,height:ae,fit:y,innerRadius:S,startAngle:f,endAngle:m,padAngle:v,sortByValue:l,cornerRadius:M,activeInnerRadiusOffset:H,activeOuterRadiusOffset:O,activeId:De,onActiveIdChange:Je,defaultActiveId:tt,forwardLegendData:Ee}),it=Oe.dataWithArc,at=Oe.legendData,st=Oe.arcGenerator,ft=Oe.centerX,be=Oe.centerY,xe=Oe.radius,Te=Oe.innerRadius,ot=Oe.setActiveId,vt=Oe.toggleSerie,wt=$7(Fe,it,Qe),ht={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes("arcs")&&(ht.arcs=p.jsx(Mle,{center:[ft,be],data:it,arcGenerator:st,borderWidth:R,borderColor:P,isInteractive:qe,onClick:de,onMouseEnter:He,onMouseMove:Ke,onMouseLeave:nt,setActiveId:ot,tooltip:ze,transitionMode:Le},"arcs")),F&&u.includes("arcLinkLabels")&&(ht.arcLinkLabels=p.jsx(dle,{center:[ft,be],data:it,label:B,skipAngle:oe,offset:Ce,diagonalLength:ye,straightLength:me,strokeWidth:ce,textOffset:he,textColor:Ie,linkColor:ke,component:Ye},"arcLinkLabels")),z&&u.includes("arcLabels")&&(ht.arcLabels=p.jsx(rle,{center:[ft,be],data:it,label:G,radiusOffset:W,skipAngle:ee,textColor:K,transitionMode:Le,component:Z},"arcLabels")),pt.length>0&&u.includes("legends")&&(ht.legends=p.jsx(ble,{width:X,height:ae,data:at,legends:pt,toggleSerie:vt},"legends"));var Ot=$le({dataWithArc:it,arcGenerator:st,centerX:ft,centerY:be,radius:xe,innerRadius:Te});return p.jsx(wl,{width:Ge,height:We,margin:rt,defs:wt,role:we,children:u.map(function(rn,At){return ht[rn]!==void 0?ht[rn]:typeof rn=="function"?p.jsx($.Fragment,{children:$.createElement(rn,Ot)},At):null})})},Ele=function(e){var t=e.isInteractive,n=t===void 0?bt.isInteractive:t,r=e.animate,i=r===void 0?bt.animate:r,o=e.motionConfig,a=o===void 0?bt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=j$(e,_le);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(Hle,Ao({isInteractive:n},c))})},Vle=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(Ele,Ao({width:n,height:r},e))}})};const Ole=Ct.span`
490
490
  color: black;
491
491
  font: var(--gf-label-md-default);
492
492
  font-weight: 600;
493
493
  font-size: 20px;
494
- `,Rle=yt.span`
494
+ `,Rle=Ct.span`
495
495
  font: var(--gf-label-md-default);
496
496
  color: var(--gf-color-text-secondary);
497
497
  font-size: 10px;
498
- `,Tle=({pieChartData:e,title:t,isEmpty:n,sortByValue:r=!0,arcLabel:i=null,tooltip:o=null,customStyle:a={},customMargin:s={},height:l=600,legendWidth:c="50%"})=>{const[u,d]=$.useState([]),f=({centerX:m,centerY:g,dataWithArc:v})=>(u.length||d(v),p.jsx("text",{x:m,y:g,textAnchor:"middle",dominantBaseline:"central",style:{fontSize:"16px",font:"var(--gf-label-md-default)",fontWeight:400},children:n?"Data niet openbaar beschikbaar":""})),h=({data:m})=>p.jsx(Ct,{gap:16,className:"gf-full",justify:"center",wrap:!0,style:{width:c},children:m==null?void 0:m.map((g,v)=>p.jsxs(Ct,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:g.color}}),p.jsx(Rle,{children:g.label})]},`legend-${v}`))});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:8,align:"center",style:{width:"100%"},children:[p.jsx(Ole,{children:t}),p.jsx("div",{style:{width:"100%",height:l},children:p.jsx(Vle,{colors:n?{scheme:"greys"}:{datum:"data.color"},data:e,sortByValue:r,enableArcLabels:!n,arcLabel:m=>(i==null?void 0:i(m))||m.formattedValue,enableArcLinkLabels:!1,margin:{top:50,right:80,bottom:50,left:80,...s},innerRadius:.5,padAngle:.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["darker",2]]},isInteractive:!n,layers:["arcs","arcLabels","arcLinkLabels","legends",f],tooltip:m=>p.jsx(Un,{body:(o==null?void 0:o(m))||p.jsx("span",{children:"Pie chart tooltip"})})})}),!n&&p.jsx(h,{data:u})]})]})};var kle=uf,jle=C7,Lle=1,Ple=2;function Ile(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var l=s[0],c=e[l],u=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new kle;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?jle(u,c,Lle|Ple,r,d):f))return!1}}return!0}var Ale=Ile,Nle=_i;function Fle(e){return e===e&&!Nle(e)}var L$=Fle,Dle=L$,zle=$u;function Ble(e){for(var t=zle(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Dle(i)]}return t}var Wle=Ble;function Zle(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var P$=Zle,Ule=Ale,qle=Wle,Gle=P$;function Yle(e){var t=qle(e);return t.length==1&&t[0][2]?Gle(t[0][0],t[0][1]):function(n){return n===e||Ule(n,e,t)}}var Kle=Yle,Xle=C7,Qle=Nw,Jle=AS,ece=N4,tce=L$,nce=P$,rce=cl,ice=1,oce=2;function ace(e,t){return ece(e)&&tce(t)?nce(rce(e),t):function(n){var r=Qle(n,e);return r===void 0&&r===t?Jle(n,e):Xle(t,r,ice|oce)}}var sce=ace;function lce(e){return function(t){return t==null?void 0:t[e]}}var cce=lce,uce=yu;function dce(e){return function(t){return uce(t,e)}}var fce=dce,hce=cce,gce=fce,vce=N4,mce=cl;function pce(e){return vce(e)?hce(mce(e)):gce(e)}var bce=pce,yce=Kle,Cce=sce,xce=vf,wce=xr,Sce=bce;function $ce(e){return typeof e=="function"?e:e==null?xce:typeof e=="object"?wce(e)?Cce(e[0],e[1]):yce(e):Sce(e)}var _7=$ce,Mce=_7,_ce=Rx;function Hce(e,t){return e&&e.length?_ce(e,Mce(t)):[]}var Ece=Hce;const L5=xn(Ece);var Vce=xw,Oce=$u;function Rce(e,t){return e&&Vce(e,t,Oce)}var Tce=Rce,kce=ol;function jce(e,t){return function(n,r){if(n==null)return n;if(!kce(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var Lce=jce,Pce=Tce,Ice=Lce,Ace=Ice(Pce),I$=Ace,Nce=I$,Fce=ol;function Dce(e,t){var n=-1,r=Fce(e)?Array(e.length):[];return Nce(e,function(i,o,a){r[++n]=t(i,o,a)}),r}var zce=Dce;function Bce(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var Wce=Bce,Xm=mf;function Zce(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,o=Xm(e),a=t!==void 0,s=t===null,l=t===t,c=Xm(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}var Uce=Zce,qce=Uce;function Gce(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=qce(i[r],o[r]);if(l){if(r>=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Yce=Gce,S2=pf,Kce=yu,Xce=_7,Qce=zce,Jce=Wce,eue=al,tue=Yce,nue=vf,rue=xr;function iue(e,t,n){t.length?t=S2(t,function(o){return rue(o)?function(a){return Kce(a,o.length===1?o[0]:o)}:o}):t=[nue];var r=-1;t=S2(t,eue(Xce));var i=Qce(e,function(o,a,s){var l=S2(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Jce(i,function(o,a){return tue(o,a,n)})}var oue=iue,aue=FS,sue=oue,lue=I4,Qm=Pw,cue=lue(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Qm(e,t[0],t[1])?t=[]:n>2&&Qm(t[0],t[1],t[2])&&(t=[t[0]]),sue(e,aue(t,1),[])}),uue=cue;const due=xn(uue);var fue=yo,hue=Gr,gue="[object Date]";function vue(e){return hue(e)&&fue(e)==gue}var mue=vue,pue=mue,bue=al,Jm=hf,ep=Jm&&Jm.isDate,yue=ep?bue(ep):pue,Cue=yue;const xue=xn(Cue);var $2=new Date,M2=new Date;function Mn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Mn(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return $2.setTime(+o),M2.setTime(+a),e($2),e(M2),Math.floor(n($2,M2))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var po=Mn(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});po.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mn(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):po};po.range;var bd=1e3,Zs=6e4,yd=36e5,A$=6048e5,Ma=Mn(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*bd)},function(e,t){return(t-e)/bd},function(e){return e.getUTCSeconds()});Ma.range;var If=Mn(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*bd)},function(e,t){e.setTime(+e+t*Zs)},function(e,t){return(t-e)/Zs},function(e){return e.getMinutes()});If.range;var Af=Mn(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*bd-e.getMinutes()*Zs)},function(e,t){e.setTime(+e+t*yd)},function(e,t){return(t-e)/yd},function(e){return e.getHours()});Af.range;function qa(e){return Mn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zs)/A$})}var _a=qa(0),Nf=qa(1),Ff=qa(2),Df=qa(3),zf=qa(4),Bf=qa(5),Wf=qa(6);_a.range;Nf.range;Ff.range;Df.range;zf.range;Bf.range;Wf.range;var Zf=Mn(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});Zf.range;var _u=Mn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});_u.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Mn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};_u.range;var Uf=Mn(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Zs)},function(e,t){return(t-e)/Zs},function(e){return e.getUTCMinutes()});Uf.range;var qf=Mn(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*yd)},function(e,t){return(t-e)/yd},function(e){return e.getUTCHours()});qf.range;function Ga(e){return Mn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/A$})}var Ha=Ga(0),Gf=Ga(1),Yf=Ga(2),Kf=Ga(3),Xf=Ga(4),Qf=Ga(5),Jf=Ga(6);Ha.range;Gf.range;Yf.range;Kf.range;Xf.range;Qf.range;Jf.range;var e0=Mn(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});e0.range;var Hu=Mn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Hu.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Mn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};Hu.range;function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ia.apply(this,arguments)}var us=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],wue={millisecond:[],second:us.slice(0,1),minute:us.slice(0,2),hour:us.slice(0,3),day:us.slice(0,4),month:us.slice(0,5),year:us.slice(0,6)},Sue=function(e){return function(t){return wue[e].forEach(function(n){n(t)}),t}},N$=function(e){var t=e.format,n=t===void 0?"native":t,r=e.precision,i=r===void 0?"millisecond":r,o=e.useUTC,a=o===void 0||o,s=Sue(i);return function(l){if(l===void 0)return l;if(n==="native"||l instanceof Date)return s(l);var c=a?p7(n):m7(n);return s(c(l))}},$ue=function(e,t,n,r){var i,o,a,s,l=e.min,c=l===void 0?0:l,u=e.max,d=u===void 0?"auto":u,f=e.stacked,h=f!==void 0&&f,m=e.reverse,g=m!==void 0&&m,v=e.clamp,b=v!==void 0&&v,y=e.nice,x=y!==void 0&&y;c==="auto"?i=h===!0?(o=t.minStacked)!=null?o:0:t.min:i=c,d==="auto"?a=h===!0?(s=t.maxStacked)!=null?s:0:t.max:a=d;var S=Go().rangeRound(r==="x"?[0,n]:[n,0]).domain(g?[a,i]:[i,a]).clamp(b);return x===!0?S.nice():typeof x=="number"&&S.nice(x),Mue(S,h)},Mue=function(e,t){t===void 0&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},_ue=function(e,t,n){var r=Kw().range([0,n]).domain(t.all);return r.type="point",r},Hue=function(e,t,n,r){var i=e.round,o=i===void 0||i,a=Ns().range(r==="x"?[0,n]:[n,0]).domain(t.all).round(o);return Eue(a)},Eue=function(e){var t=e;return t.type="band",t},Vue=function(e,t,n){var r,i,o=e.format,a=o===void 0?"native":o,s=e.precision,l=s===void 0?"millisecond":s,c=e.min,u=c===void 0?"auto":c,d=e.max,f=d===void 0?"auto":d,h=e.useUTC,m=h===void 0||h,g=e.nice,v=g!==void 0&&g,b=N$({format:a,precision:l,useUTC:m});r=u==="auto"?b(t.min):a!=="native"?b(u):u,i=f==="auto"?b(t.max):a!=="native"?b(f):f;var y=m?dS():uS();y.range([0,n]),r&&i&&y.domain([r,i]),v===!0?y.nice():typeof v!="object"&&typeof v!="number"||y.nice(v);var x=y;return x.type="time",x.useUTC=m,x},Oue=function(e,t,n,r){var i,o=e.base,a=o===void 0?10:o,s=e.min,l=s===void 0?"auto":s,c=e.max,u=c===void 0?"auto":c;if(t.all.some(function(g){return g===0}))throw new Error("a log scale domain must not include or cross zero");var d,f,h=!1;if(t.all.filter(function(g){return g!=null}).forEach(function(g){h||(i===void 0?i=Math.sign(g):Math.sign(g)!==i&&(h=!0))}),h)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d=l==="auto"?t.min:l,f=u==="auto"?t.max:u;var m=K4().domain([d,f]).rangeRound(r==="x"?[0,n]:[n,0]).base(a).nice();return m.type="log",m},Rue=function(e,t,n,r){var i,o,a=e.constant,s=a===void 0?1:a,l=e.min,c=l===void 0?"auto":l,u=e.max,d=u===void 0?"auto":u,f=e.reverse,h=f!==void 0&&f;i=c==="auto"?t.min:c,o=d==="auto"?t.max:d;var m=X4().constant(s).rangeRound(r==="x"?[0,n]:[n,0]).nice();h===!0?m.domain([o,i]):m.domain([i,o]);var g=m;return g.type="symlog",g},Tue=function(e){return e==="x"?"y":"x"},kue=function(e,t){return e===t},jue=function(e,t){return e.getTime()===t.getTime()};function tp(e,t,n,r){switch(e.type){case"linear":return $ue(e,t,n,r);case"point":return _ue(e,t,n);case"band":return Hue(e,t,n,r);case"time":return Vue(e,t,n);case"log":return Oue(e,t,n,r);case"symlog":return Rue(e,t,n,r);default:throw new Error("invalid scale spec")}}var np=function(e,t,n){var r;if("stacked"in n&&n.stacked){var i=e.data[t==="x"?"xStacked":"yStacked"];return i==null?null:n(i)}return(r=n(e.data[t]))!=null?r:null},F$=function(e,t,n,r,i){var o=e.map(function(u){return function(d){return ia({},d,{data:d.data.map(function(f){return{data:ia({},f)}})})}(u)}),a=Lue(o,t,n);"stacked"in t&&t.stacked===!0&&Pue(a,o),"stacked"in n&&n.stacked===!0&&Iue(a,o);var s=tp(t,a.x,r,"x"),l=tp(n,a.y,i,"y"),c=o.map(function(u){return ia({},u,{data:u.data.map(function(d){return ia({},d,{position:{x:np(d,"x",s),y:np(d,"y",l)}})})})});return ia({},a,{series:c,xScale:s,yScale:l})},Lue=function(e,t,n){return{x:rp(e,"x",t),y:rp(e,"y",n)}},rp=function(e,t,n,r){var i={},o=i.getValue,a=o===void 0?function(m){return m.data[t]}:o,s=i.setValue,l=s===void 0?function(m,g){m.data[t]=g}:s;if(n.type==="linear")e.forEach(function(m){m.data.forEach(function(g){var v=a(g);v&&l(g,parseFloat(String(v)))})});else if(n.type==="time"&&n.format!=="native"){var c=N$(n);e.forEach(function(m){m.data.forEach(function(g){var v=a(g);v&&l(g,c(v))})})}var u=[];switch(e.forEach(function(m){m.data.forEach(function(g){u.push(a(g))})}),n.type){case"linear":var d=due(X3(u).filter(function(m){return m!==null}),function(m){return m});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=L5(u,function(m){return m.getTime()}).slice(0).sort(function(m,g){return g.getTime()-m.getTime()}).reverse();return{all:f,min:f[0],max:ue(f)};default:var h=X3(u);return{all:h,min:h[0],max:ue(h)}}},D$=function(e,t,n){var r=Tue(e),i=[];t[r].all.forEach(function(o){var a=xue(o)?jue:kue,s=[];n.forEach(function(l){var c=l.data.find(function(h){return a(h.data[r],o)}),u=null,d=null;if(c!==void 0){if((u=c.data[e])!==null){var f=ue(s);f===void 0?d=u:f!==null&&(d=f+u)}c.data[e==="x"?"xStacked":"yStacked"]=d}s.push(d),d!==null&&i.push(d)})}),t[e].minStacked=Math.min.apply(Math,i),t[e].maxStacked=Math.max.apply(Math,i)},Pue=function(e,t){return D$("x",e,t)},Iue=function(e,t){return D$("y",e,t)},z$=function(e){var t=e.bandwidth();if(t===0)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(r){var i;return((i=e(r))!=null?i:0)+n}},B$={millisecond:[po,po],second:[Ma,Ma],minute:[If,Uf],hour:[Af,qf],day:[Mn(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),Mn(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[_a,Ha],sunday:[_a,Ha],monday:[Nf,Gf],tuesday:[Ff,Yf],wednesday:[Df,Kf],thursday:[zf,Xf],friday:[Bf,Qf],saturday:[Wf,Jf],month:[Zf,e0],year:[_u,Hu]},Aue=Object.keys(B$),Nue=new RegExp("^every\\s*(\\d+)?\\s*("+Aue.join("|")+")s?$","i"),W$=function(e,t){if(Array.isArray(t))return t;if(typeof t=="string"&&"useUTC"in e){var n=t.match(Nue);if(n){var r=n[1],i=n[2],o=B$[i][e.useUTC?1:0];if(i==="day"){var a,s,l=e.domain(),c=l[0],u=l[1],d=new Date(u);return d.setDate(d.getDate()+1),(a=(s=o.every(Number(r??1)))==null?void 0:s.range(c,d))!=null?a:[]}if(r===void 0)return e.ticks(o);var f=o.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(t===void 0)return e.ticks();if(typeof(h=t)=="number"&&isFinite(h)&&Math.floor(h)===h)return e.ticks(t)}var h;return e.domain()};function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}var Z$=function(e){var t,n=e.axis,r=e.scale,i=e.ticksPosition,o=e.tickValues,a=e.tickSize,s=e.tickPadding,l=e.tickRotation,c=e.truncateTickAt,u=e.engine,d=u===void 0?"svg":u,f=W$(r,o),h=bie[d],m="bandwidth"in r?z$(r):r,g={lineX:0,lineY:0},v={textX:0,textY:0},b=typeof document=="object"&&document.dir==="rtl",y=h.align.center,x=h.baseline.center;return n==="x"?(t=function(S){var w;return{x:(w=m(S))!=null?w:0,y:0}},g.lineY=a*(i==="after"?1:-1),v.textY=(a+s)*(i==="after"?1:-1),x=i==="after"?h.baseline.top:h.baseline.bottom,l===0?y=h.align.center:i==="after"&&l<0||i==="before"&&l>0?(y=h.align[b?"left":"right"],x=h.baseline.center):(i==="after"&&l>0||i==="before"&&l<0)&&(y=h.align[b?"right":"left"],x=h.baseline.center)):(t=function(S){var w;return{x:0,y:(w=m(S))!=null?w:0}},g.lineX=a*(i==="after"?1:-1),v.textX=(a+s)*(i==="after"?1:-1),y=i==="after"?h.align.left:h.align.right),{ticks:f.map(function(S){var w=typeof S=="string"?function(M){var E=String(M).length;return c&&c>0&&E>c?""+String(M).slice(0,c).concat("..."):""+M}(S):S;return zr({key:S instanceof Date?""+S.valueOf():""+S,value:w},t(S),g,v)}),textAlign:y,textBaseline:x}},U$=function(e,t){if(e===void 0||typeof e=="function")return e;if(t.type==="time"){var n=Wa(e);return function(r){return n(r instanceof Date?r:new Date(r))}}return Da(e)},P5=function(e){var t,n=e.width,r=e.height,i=e.scale,o=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||W$(i,a)),l="bandwidth"in i?z$(i):i,c=o==="x"?s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:(d=l(u))!=null?d:0,x2:(f=l(u))!=null?f:0,y1:0,y2:r}}):s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:0,x2:n,y1:(d=l(u))!=null?d:0,y2:(f=l(u))!=null?f:0}});return c},Fue=$.memo(function(e){var t,n=e.value,r=e.format,i=e.lineX,o=e.lineY,a=e.onClick,s=e.textBaseline,l=e.textAnchor,c=e.animatedProps,u=Zt(),d=u.axis.ticks.line,f=u.axis.ticks.text,h=(t=r==null?void 0:r(n))!=null?t:n,m=$.useMemo(function(){var g={opacity:c.opacity};return a?{style:zr({},g,{cursor:"pointer"}),onClick:function(v){return a(v,h)}}:{style:g}},[c.opacity,a,h]);return p.jsxs(et.g,zr({transform:c.transform},m,{children:[p.jsx("line",{x1:0,x2:i,y1:0,y2:o,style:d}),f.outlineWidth>0&&p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+h}),p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:w7(f),children:""+h})]}))}),Due=function(e){var t=e.axis,n=e.scale,r=e.x,i=r===void 0?0:r,o=e.y,a=o===void 0?0:o,s=e.length,l=e.ticksPosition,c=e.tickValues,u=e.tickSize,d=u===void 0?5:u,f=e.tickPadding,h=f===void 0?5:f,m=e.tickRotation,g=m===void 0?0:m,v=e.format,b=e.renderTick,y=b===void 0?Fue:b,x=e.truncateTickAt,S=e.legend,w=e.legendPosition,M=w===void 0?"end":w,E=e.legendOffset,H=E===void 0?0:E,_=e.onClick,O=e.ariaHidden,k=Zt(),A=k.axis.legend.text,j=$.useMemo(function(){return U$(v,n)},[v,n]),V=Z$({axis:t,scale:n,ticksPosition:l,tickValues:c,tickSize:d,tickPadding:h,tickRotation:g,truncateTickAt:x}),T=V.ticks,L=V.textAlign,R=V.textBaseline,I=null;if(S!==void 0){var P,N=0,z=0,q=0;t==="y"?(q=-90,N=H,M==="start"?(P="start",z=s):M==="middle"?(P="middle",z=s/2):M==="end"&&(P="end")):(z=H,M==="start"?P="start":M==="middle"?(P="middle",N=s/2):M==="end"&&(P="end",N=s)),I=p.jsxs(p.Fragment,{children:[A.outlineWidth>0&&p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:zr({dominantBaseline:"central"},A),strokeWidth:2*A.outlineWidth,stroke:A.outlineColor,strokeLinejoin:"round",children:S}),p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:zr({dominantBaseline:"central"},A),children:S})]})}var G=Dn(),Y=G.animate,ee=G.config,Q=Qt({transform:"translate("+i+","+a+")",lineX2:t==="x"?s:0,lineY2:t==="x"?0:s,config:ee,immediate:!Y}),K=$.useCallback(function(Z){return{opacity:1,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),J=$.useCallback(function(Z){return{opacity:0,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),W=Cr(T,{keys:function(Z){return Z.key},initial:K,from:J,enter:K,update:K,leave:{opacity:0},config:ee,immediate:!Y});return p.jsxs(et.g,{transform:Q.transform,"aria-hidden":O,children:[W(function(Z,U,F,re){return C.createElement(y,zr({tickIndex:re,format:j,rotate:g,textBaseline:R,textAnchor:L,truncateTickAt:x,animatedProps:Z},U,_?{onClick:_}:{}))}),p.jsx(et.line,{style:k.axis.domain.line,x1:0,x2:Q.lineX2,y1:0,y2:Q.lineY2}),I]})},zue=$.memo(Due),q$=["top","right","bottom","left"],G$=$.memo(function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,o={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return p.jsx(p.Fragment,{children:q$.map(function(a){var s=o[a];if(!s)return null;var l=a==="top"||a==="bottom";return p.jsx(zue,zr({},s,{axis:l?"x":"y",x:a==="right"?r:0,y:a==="bottom"?i:0,scale:l?t:n,length:l?r:i,ticksPosition:a==="top"||a==="left"?"before":"after",truncateTickAt:s.truncateTickAt}),a)})})}),Bue=$.memo(function(e){var t=e.animatedProps,n=Zt();return p.jsx(et.line,zr({},t,n.grid.line))}),ip=$.memo(function(e){var t=e.lines,n=Dn(),r=n.animate,i=n.config,o=Cr(t,{keys:function(a){return a.key},initial:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},from:function(a){return{opacity:0,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},enter:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},update:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},leave:{opacity:0},config:i,immediate:!r});return p.jsx("g",{children:o(function(a,s){return $.createElement(Bue,zr({},s,{key:s.key,animatedProps:a}))})})}),Y$=$.memo(function(e){var t=e.width,n=e.height,r=e.xScale,i=e.yScale,o=e.xValues,a=e.yValues,s=$.useMemo(function(){return!!r&&P5({width:t,height:n,scale:r,axis:"x",values:o})},[r,o,t,n]),l=$.useMemo(function(){return!!i&&P5({width:t,height:n,scale:i,axis:"y",values:a})},[n,t,i,a]);return p.jsxs(p.Fragment,{children:[s&&p.jsx(ip,{lines:s}),l&&p.jsx(ip,{lines:l})]})}),Wue=function(e,t){var n,r=t.axis,i=t.scale,o=t.x,a=o===void 0?0:o,s=t.y,l=s===void 0?0:s,c=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,h=f===void 0?5:f,m=t.tickPadding,g=m===void 0?5:m,v=t.tickRotation,b=v===void 0?0:v,y=t.format,x=t.legend,S=t.legendPosition,w=S===void 0?"end":S,M=t.legendOffset,E=M===void 0?0:M,H=t.theme,_=Z$({axis:r,scale:i,ticksPosition:u,tickValues:d,tickSize:h,tickPadding:g,tickRotation:b,engine:"canvas"}),O=_.ticks,k=_.textAlign,A=_.textBaseline;e.save(),e.translate(a,l),e.textAlign=k,e.textBaseline=A;var j=H.axis.ticks.text;e.font=(j.fontWeight?j.fontWeight+" ":"")+j.fontSize+"px "+j.fontFamily,((n=H.axis.domain.line.strokeWidth)!=null?n:0)>0&&(e.lineWidth=Number(H.axis.domain.line.strokeWidth),e.lineCap="square",H.axis.domain.line.stroke&&(e.strokeStyle=H.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo(r==="x"?c:0,r==="x"?0:c),e.stroke());var V=typeof y=="function"?y:function(P){return""+P};if(O.forEach(function(P){var N;((N=H.axis.ticks.line.strokeWidth)!=null?N:0)>0&&(e.lineWidth=Number(H.axis.ticks.line.strokeWidth),e.lineCap="square",H.axis.ticks.line.stroke&&(e.strokeStyle=H.axis.ticks.line.stroke),e.beginPath(),e.moveTo(P.x,P.y),e.lineTo(P.x+P.lineX,P.y+P.lineY),e.stroke());var z=V(P.value);e.save(),e.translate(P.x+P.textX,P.y+P.textY),e.rotate(Dr(b)),j.outlineWidth>0&&(e.strokeStyle=j.outlineColor,e.lineWidth=2*j.outlineWidth,e.lineJoin="round",e.strokeText(""+z,0,0)),H.axis.ticks.text.fill&&(e.fillStyle=j.fill),e.fillText(""+z,0,0),e.restore()}),x!==void 0){var T=0,L=0,R=0,I="center";r==="y"?(R=-90,T=E,w==="start"?(I="start",L=c):w==="middle"?(I="center",L=c/2):w==="end"&&(I="end")):(L=E,w==="start"?I="start":w==="middle"?(I="center",T=c/2):w==="end"&&(I="end",T=c)),e.translate(T,L),e.rotate(Dr(R)),e.font=(H.axis.legend.text.fontWeight?H.axis.legend.text.fontWeight+" ":"")+H.axis.legend.text.fontSize+"px "+H.axis.legend.text.fontFamily,H.axis.legend.text.fill&&(e.fillStyle=H.axis.legend.text.fill),e.textAlign=I,e.textBaseline="middle",e.fillText(x,0,0)}e.restore()},K$=function(e,t){var n=t.xScale,r=t.yScale,i=t.width,o=t.height,a=t.top,s=t.right,l=t.bottom,c=t.left,u=t.theme,d={top:a,right:s,bottom:l,left:c};q$.forEach(function(f){var h=d[f];if(!h)return null;var m=f==="top"||f==="bottom",g=f==="top"||f==="left"?"before":"after",v=m?n:r,b=U$(h.format,v);Wue(e,zr({},h,{axis:m?"x":"y",x:f==="right"?i:0,y:f==="bottom"?o:0,scale:v,format:b,length:m?i:o,ticksPosition:g,theme:u}))})},Cd=function(e,t){var n=t.width,r=t.height,i=t.scale,o=t.axis,a=t.values;P5({width:n,height:r,scale:i,axis:o,values:a}).forEach(function(s){e.beginPath(),e.moveTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.stroke()})},Zue=I$;function Uue(e,t){var n=[];return Zue(e,function(r,i,o){t(r,i,o)&&n.push(r)}),n}var que=Uue,Gue=ZS,Yue=que,Kue=_7,Xue=xr;function Que(e,t){var n=Xue(e)?Gue:Yue;return n(e,Kue(t))}var Jue=Que;const H7=xn(Jue);var e1e=yo,t1e=Gr,n1e="[object Number]";function r1e(e){return typeof e=="number"||t1e(e)&&e1e(e)==n1e}var i1e=r1e;const Ea=xn(i1e);function o1e(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var X$=o1e,a1e=yu,s1e=X$;function l1e(e,t){return t.length<2?e:a1e(e,s1e(t,0,-1))}var c1e=l1e,u1e=ll,d1e=Uw,f1e=c1e,h1e=cl;function g1e(e,t){return t=u1e(t,e),e=f1e(e,t),e==null||delete e[h1e(d1e(t))]}var v1e=g1e,m1e=j4;function p1e(e){return m1e(e)?void 0:e}var b1e=p1e,y1e=pf,C1e=E$,x1e=v1e,w1e=ll,S1e=sl,$1e=b1e,M1e=DS,_1e=$$,H1e=1,E1e=2,V1e=4,O1e=M1e(function(e,t){var n={};if(e==null)return n;var r=!1;t=y1e(t,function(o){return o=w1e(o,e),r||(r=o.length>1),o}),S1e(e,_1e(e),n),r&&(n=C1e(n,H1e|E1e|V1e,$1e));for(var i=t.length;i--;)x1e(n,t[i]);return n}),R1e=O1e;const Ya=xn(R1e);function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},No.apply(this,arguments)}var I5={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},T1e=function(e){var t=typeof e;return $.isValidElement(e)||t==="string"||t==="function"||t==="object"},k1e=function(e){var t=typeof e;return t==="string"||t==="function"},Gc=function(e){return e.type==="circle"},A5=function(e){return e.type==="dot"},Yc=function(e){return e.type==="rect"},j1e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(o,a){var s=a.offset||0;return[].concat(o,H7(t,a.match).map(function(l){var c=r(l),u=i(l);return(Gc(a)||Yc(a))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),No({},Ya(a,["match","offset"]),c,u,{size:a.size||u.size,datum:l})}))},[])},L1e=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return pie(Lf(i))},P1e=function(e){var t,n,r=e.x,i=e.y,o=e.noteX,a=e.noteY,s=e.noteWidth,l=s===void 0?I5.noteWidth:s,c=e.noteTextOffset,u=c===void 0?I5.noteTextOffset:c;if(Ea(o))t=r+o;else{if(o.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=o.abs}if(Ea(a))n=i+a;else{if(a.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=i,h=L1e(r,i,t,n);if(Gc(e)){var m=ma(Dr(h),e.size/2);d+=m.x,f+=m.y}if(Yc(e)){var g=Math.round((h+90)/45)%8;g===0&&(f-=e.height/2),g===1&&(d+=e.width/2,f-=e.height/2),g===2&&(d+=e.width/2),g===3&&(d+=e.width/2,f+=e.height/2),g===4&&(f+=e.height/2),g===5&&(d-=e.width/2,f+=e.height/2),g===6&&(d-=e.width/2),g===7&&(d-=e.width/2,f-=e.height/2)}var v=t,b=t;return(h+90)%360>180?(v-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[v,n-u],angle:h+90}},I1e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return $.useMemo(function(){return j1e({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},A1e=function(e){return $.useMemo(function(){return P1e(e)},[e])},N1e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=Zt(),a=Dn(),s=a.animate,l=a.config,c=Qt({x:n,y:r,config:l,immediate:!s});return typeof i=="function"?$.createElement(i,{x:n,y:r,datum:t}):p.jsxs(p.Fragment,{children:[o.annotations.text.outlineWidth>0&&p.jsx(et.text,{x:c.x,y:c.y,style:No({},o.annotations.text,{strokeLinejoin:"round",strokeWidth:2*o.annotations.text.outlineWidth,stroke:o.annotations.text.outlineColor}),children:i}),p.jsx(et.text,{x:c.x,y:c.y,style:Ya(o.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},op=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=Zt(),o=$.useMemo(function(){var l=t[0];return t.slice(1).reduce(function(c,u){return c+" L"+u[0]+","+u[1]},"M"+l[0]+","+l[1])},[t]),a=jf(o);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=No({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),p.jsx(et.path,{fill:"none",d:a,style:s})},F1e=function(e){var t=e.x,n=e.y,r=e.size,i=Zt(),o=Dn(),a=o.animate,s=o.config,l=Qt({x:t,y:n,radius:r/2,config:s,immediate:!a});return p.jsxs(p.Fragment,{children:[i.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:No({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.outline})]})},D1e=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?I5.dotSize:r,o=Zt(),a=Dn(),s=a.animate,l=a.config,c=Qt({x:t,y:n,radius:i/2,config:l,immediate:!s});return p.jsxs(p.Fragment,{children:[o.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:No({},o.annotations.outline,{fill:"none",strokeWidth:2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:o.annotations.symbol})]})},z1e=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.borderRadius,a=o===void 0?6:o,s=Zt(),l=Dn(),c=l.animate,u=l.config,d=Qt({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!c});return p.jsxs(p.Fragment,{children:[s.annotations.outline.outlineWidth>0&&p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:No({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:s.annotations.outline})]})},B1e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=A1e(e);if(!T1e(i))throw new Error("note should be a valid react element");return p.jsxs(p.Fragment,{children:[p.jsx(op,{points:o.points,isOutline:!0}),Gc(e)&&p.jsx(F1e,{x:n,y:r,size:e.size}),A5(e)&&p.jsx(D1e,{x:n,y:r,size:e.size}),Yc(e)&&p.jsx(z1e,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),p.jsx(op,{points:o.points}),p.jsx(N1e,{datum:t,x:o.text[0],y:o.text[1],note:i})]})},ap=function(e,t){t.forEach(function(n,r){var i=n[0],o=n[1];r===0?e.moveTo(i,o):e.lineTo(i,o)})},W1e=function(e,t){var n=t.annotations,r=t.theme;n.length!==0&&(e.save(),n.forEach(function(i){if(!k1e(i.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),ap(e,i.computed.points),e.stroke(),e.lineCap="butt"),Gc(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),A5(i)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),Yc(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),ap(e,i.computed.points),e.stroke(),Gc(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),A5(i)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.fill()),Yc(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),typeof i.note=="function"?i.note(e,{datum:i.datum,x:i.computed.text[0],y:i.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(i.note,i.computed.text[0],i.computed.text[1]),e.lineJoin="miter"),e.fillText(i.note,i.computed.text[0],i.computed.text[1]))}),e.restore())};const co=11102230246251565e-32,nr=134217729,Z1e=(3+8*co)*co;function _2(e,t,n,r,i){let o,a,s,l,c=t[0],u=r[0],d=0,f=0;u>c==u>-c?(o=c,c=t[++d]):(o=u,u=r[++f]);let h=0;if(d<e&&f<n)for(u>c==u>-c?(a=c+o,s=o-(a-c),c=t[++d]):(a=u+o,s=o-(a-u),u=r[++f]),o=a,s!==0&&(i[h++]=s);d<e&&f<n;)u>c==u>-c?(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=t[++d]):(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=r[++f]),o=a,s!==0&&(i[h++]=s);for(;d<e;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=t[++d],o=a,s!==0&&(i[h++]=s);for(;f<n;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=r[++f],o=a,s!==0&&(i[h++]=s);return(o!==0||h===0)&&(i[h++]=o),h}function U1e(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function Eu(e){return new Float64Array(e)}const q1e=(3+16*co)*co,G1e=(2+12*co)*co,Y1e=(9+64*co)*co*co,ds=Eu(4),sp=Eu(8),lp=Eu(12),cp=Eu(16),dr=Eu(4);function K1e(e,t,n,r,i,o,a){let s,l,c,u,d,f,h,m,g,v,b,y,x,S,w,M,E,H;const _=e-i,O=n-i,k=t-o,A=r-o;S=_*A,f=nr*_,h=f-(f-_),m=_-h,f=nr*A,g=f-(f-A),v=A-g,w=m*v-(S-h*g-m*g-h*v),M=k*O,f=nr*k,h=f-(f-k),m=k-h,f=nr*O,g=f-(f-O),v=O-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,ds[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,ds[1]=x-(b+d)+(d-M),H=y+b,d=H-y,ds[2]=y-(H-d)+(b-d),ds[3]=H;let j=U1e(4,ds),V=G1e*a;if(j>=V||-j>=V||(d=e-_,s=e-(_+d)+(d-i),d=n-O,c=n-(O+d)+(d-i),d=t-k,l=t-(k+d)+(d-o),d=r-A,u=r-(A+d)+(d-o),s===0&&l===0&&c===0&&u===0)||(V=Y1e*a+Z1e*Math.abs(j),j+=_*u+A*s-(k*c+O*l),j>=V||-j>=V))return j;S=s*A,f=nr*s,h=f-(f-s),m=s-h,f=nr*A,g=f-(f-A),v=A-g,w=m*v-(S-h*g-m*g-h*v),M=l*O,f=nr*l,h=f-(f-l),m=l-h,f=nr*O,g=f-(f-O),v=O-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const T=_2(4,ds,4,dr,sp);S=_*u,f=nr*_,h=f-(f-_),m=_-h,f=nr*u,g=f-(f-u),v=u-g,w=m*v-(S-h*g-m*g-h*v),M=k*c,f=nr*k,h=f-(f-k),m=k-h,f=nr*c,g=f-(f-c),v=c-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const L=_2(T,sp,4,dr,lp);S=s*u,f=nr*s,h=f-(f-s),m=s-h,f=nr*u,g=f-(f-u),v=u-g,w=m*v-(S-h*g-m*g-h*v),M=l*c,f=nr*l,h=f-(f-l),m=l-h,f=nr*c,g=f-(f-c),v=c-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const R=_2(L,lp,4,dr,cp);return cp[R-1]}function u1(e,t,n,r,i,o){const a=(t-o)*(n-i),s=(e-i)*(r-o),l=a-s,c=Math.abs(a+s);return Math.abs(l)>=q1e*c?l:-K1e(e,t,n,r,i,o,c)}const up=Math.pow(2,-52),d1=new Uint32Array(512);class xd{static from(t,n=tde,r=nde){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=t[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new xd(o)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=t.length>>1;let s=1/0,l=1/0,c=-1/0,u=-1/0;for(let _=0;_<a;_++){const O=t[2*_],k=t[2*_+1];O<s&&(s=O),k<l&&(l=k),O>c&&(c=O),k>u&&(u=k),this._ids[_]=_}const d=(s+c)/2,f=(l+u)/2;let h,m,g;for(let _=0,O=1/0;_<a;_++){const k=H2(d,f,t[2*_],t[2*_+1]);k<O&&(h=_,O=k)}const v=t[2*h],b=t[2*h+1];for(let _=0,O=1/0;_<a;_++){if(_===h)continue;const k=H2(v,b,t[2*_],t[2*_+1]);k<O&&k>0&&(m=_,O=k)}let y=t[2*m],x=t[2*m+1],S=1/0;for(let _=0;_<a;_++){if(_===h||_===m)continue;const O=J1e(v,b,y,x,t[2*_],t[2*_+1]);O<S&&(g=_,S=O)}let w=t[2*g],M=t[2*g+1];if(S===1/0){for(let k=0;k<a;k++)this._dists[k]=t[2*k]-t[0]||t[2*k+1]-t[1];Cs(this._ids,this._dists,0,a-1);const _=new Uint32Array(a);let O=0;for(let k=0,A=-1/0;k<a;k++){const j=this._ids[k],V=this._dists[j];V>A&&(_[O++]=j,A=V)}this.hull=_.subarray(0,O),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(u1(v,b,y,x,w,M)<0){const _=m,O=y,k=x;m=g,y=w,x=M,g=_,w=O,M=k}const E=ede(v,b,y,x,w,M);this._cx=E.x,this._cy=E.y;for(let _=0;_<a;_++)this._dists[_]=H2(t[2*_],t[2*_+1],E.x,E.y);Cs(this._ids,this._dists,0,a-1),this._hullStart=h;let H=3;r[h]=n[g]=m,r[m]=n[h]=g,r[g]=n[m]=h,i[h]=0,i[m]=1,i[g]=2,o.fill(-1),o[this._hashKey(v,b)]=h,o[this._hashKey(y,x)]=m,o[this._hashKey(w,M)]=g,this.trianglesLen=0,this._addTriangle(h,m,g,-1,-1,-1);for(let _=0,O,k;_<this._ids.length;_++){const A=this._ids[_],j=t[2*A],V=t[2*A+1];if(_>0&&Math.abs(j-O)<=up&&Math.abs(V-k)<=up||(O=j,k=V,A===h||A===m||A===g))continue;let T=0;for(let N=0,z=this._hashKey(j,V);N<this._hashSize&&(T=o[(z+N)%this._hashSize],!(T!==-1&&T!==r[T]));N++);T=n[T];let L=T,R;for(;R=r[L],u1(j,V,t[2*L],t[2*L+1],t[2*R],t[2*R+1])>=0;)if(L=R,L===T){L=-1;break}if(L===-1)continue;let I=this._addTriangle(L,A,r[L],-1,-1,i[L]);i[A]=this._legalize(I+2),i[L]=I,H++;let P=r[L];for(;R=r[P],u1(j,V,t[2*P],t[2*P+1],t[2*R],t[2*R+1])<0;)I=this._addTriangle(P,A,R,i[A],-1,i[P]),i[A]=this._legalize(I+2),r[P]=P,H--,P=R;if(L===T)for(;R=n[L],u1(j,V,t[2*R],t[2*R+1],t[2*L],t[2*L+1])<0;)I=this._addTriangle(R,A,L,-1,i[L],i[R]),this._legalize(I+2),i[R]=I,r[L]=L,H--,L=R;this._hullStart=n[A]=L,r[L]=n[P]=A,r[A]=P,o[this._hashKey(j,V)]=A,o[this._hashKey(t[2*L],t[2*L+1])]=L}this.hull=new Uint32Array(H);for(let _=0,O=this._hullStart;_<H;_++)this.hull[_]=O,O=r[O];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(X1e(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[t],l=t-t%3;if(a=l+(t+2)%3,s===-1){if(o===0)break;t=d1[--o];continue}const c=s-s%3,u=l+(t+1)%3,d=c+(s+2)%3,f=n[a],h=n[t],m=n[u],g=n[d];if(Q1e(i[2*f],i[2*f+1],i[2*h],i[2*h+1],i[2*m],i[2*m+1],i[2*g],i[2*g+1])){n[t]=g,n[s]=f;const b=r[d];if(b===-1){let x=this._hullStart;do{if(this._hullTri[x]===d){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,b),this._link(s,r[a]),this._link(a,d);const y=c+(s+1)%3;o<d1.length&&(d1[o++]=y)}else{if(o===0)break;t=d1[--o]}}return a}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function X1e(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function H2(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function Q1e(e,t,n,r,i,o,a,s){const l=e-a,c=t-s,u=n-a,d=r-s,f=i-a,h=o-s,m=l*l+c*c,g=u*u+d*d,v=f*f+h*h;return l*(d*v-g*h)-c*(u*v-g*f)+m*(u*h-d*f)<0}function J1e(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),h=(c*u-s*d)*f,m=(a*d-l*u)*f;return h*h+m*m}function ede(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),h=e+(c*u-s*d)*f,m=t+(a*d-l*u)*f;return{x:h,y:m}}function Cs(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=e[i],a=t[o];let s=i-1;for(;s>=n&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;ql(e,i,o),t[e[n]]>t[e[r]]&&ql(e,n,r),t[e[o]]>t[e[r]]&&ql(e,o,r),t[e[n]]>t[e[o]]&&ql(e,n,o);const s=e[o],l=t[s];for(;;){do o++;while(t[e[o]]<l);do a--;while(t[e[a]]>l);if(a<o)break;ql(e,o,a)}e[n+1]=e[a],e[a]=s,r-o+1>=a-n?(Cs(e,t,o,r),Cs(e,t,n,a-1)):(Cs(e,t,n,a-1),Cs(e,t,o,r))}}function ql(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function tde(e){return e[0]}function nde(e){return e[1]}const dp=1e-6;class da{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>dp||Math.abs(this._y1-o)>dp)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class N5{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class rde{constructor(t,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,v=0,b=r.length,y,x;g<b;g+=3,v+=2){const S=r[g]*2,w=r[g+1]*2,M=r[g+2]*2,E=t[S],H=t[S+1],_=t[w],O=t[w+1],k=t[M],A=t[M+1],j=_-E,V=O-H,T=k-E,L=A-H,R=(j*L-V*T)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const P of n)o+=t[P*2],a+=t[P*2+1];o/=n.length,a/=n.length}const I=1e9*Math.sign((o-E)*L-(a-H)*T);y=(E+k)/2-I*L,x=(H+A)/2+I*T}else{const I=1/R,P=j*j+V*V,N=T*T+L*L;y=E+(L*P-V*N)*I,x=H+(j*N-T*P)*I}s[v]=y,s[v+1]=x}let l=n[n.length-1],c,u=l*4,d,f=t[2*l],h,m=t[2*l+1];i.fill(0);for(let g=0;g<n.length;++g)l=n[g],c=u,d=f,h=m,u=l*4,f=t[2*l],m=t[2*l+1],i[c+2]=i[u]=h-m,i[c+3]=i[u+1]=f-d}render(t){const n=t==null?t=new da:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let u=0,d=r.length;u<d;++u){const f=r[u];if(f<u)continue;const h=Math.floor(u/3)*2,m=Math.floor(f/3)*2,g=a[h],v=a[h+1],b=a[m],y=a[m+1];this._renderSegment(g,v,b,y,t)}let l,c=o[o.length-1];for(let u=0;u<o.length;++u){l=c,c=o[u];const d=Math.floor(i[c]/3)*2,f=a[d],h=a[d+1],m=l*4,g=this._project(f,h,s[m+2],s[m+3]);g&&this._renderSegment(f,h,g[0],g[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new da:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const r=n==null?n=new da:void 0,i=this._clip(t);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,r=t.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(t){const n=new N5;return this.renderCell(t,n),n.value()}_renderSegment(t,n,r,i,o){let a;const s=this._regioncode(t,n),l=this._regioncode(r,i);s===0&&l===0?(o.moveTo(t,n),o.lineTo(r,i)):(a=this._clipSegment(t,n,r,i,s,l))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(t,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(t,n,r)===t}*neighbors(t){const n=this._clip(t);if(n)for(const r of this.delaunay.neighbors(t)){const i=this._clip(r);if(i){e:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,l=i.length;s<l;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+l-2)%l]&&n[(o+3)%a]===i[(s+l-1)%l]){yield r;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[t];if(a===-1)return null;const s=[];let l=a;do{const c=Math.floor(l/3);if(s.push(n[c*2],n[c*2+1]),l=l%3===2?l-2:l+1,o[l]!==t)break;l=i[l]}while(l!==a&&l!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:r}=this,i=t*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,n))}_clipFinite(t,n){const r=n.length;let i=null,o,a,s=n[r-2],l=n[r-1],c,u=this._regioncode(s,l),d,f=0;for(let h=0;h<r;h+=2)if(o=s,a=l,s=n[h],l=n[h+1],c=u,u=this._regioncode(s,l),c===0&&u===0)d=f,f=0,i?i.push(s,l):i=[s,l];else{let m,g,v,b,y;if(c===0){if((m=this._clipSegment(o,a,s,l,c,u))===null)continue;[g,v,b,y]=m}else{if((m=this._clipSegment(s,l,o,a,u,c))===null)continue;[b,y,g,v]=m,d=f,f=this._edgecode(g,v),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(g,v):i=[g,v]}d=f,f=this._edgecode(b,y),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(b,y):i=[b,y]}if(i)d=f,f=this._edgecode(i[0],i[1]),d&&f&&this._edge(t,d,f,i,i.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(t,n,r,i,o,a){const s=o<a;for(s&&([t,n,r,i,o,a]=[r,i,t,n,a,o]);;){if(o===0&&a===0)return s?[r,i,t,n]:[t,n,r,i];if(o&a)return null;let l,c,u=o||a;u&8?(l=t+(r-t)*(this.ymax-n)/(i-n),c=this.ymax):u&4?(l=t+(r-t)*(this.ymin-n)/(i-n),c=this.ymin):u&2?(c=n+(i-n)*(this.xmax-t)/(r-t),l=this.xmax):(c=n+(i-n)*(this.xmin-t)/(r-t),l=this.xmin),o?(t=l,n=c,o=this._regioncode(t,n)):(r=l,i=c,a=this._regioncode(r,i))}}_clipInfinite(t,n,r,i,o,a){let s=Array.from(n),l;if((l=this._project(s[0],s[1],r,i))&&s.unshift(l[0],l[1]),(l=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(l[0],l[1]),s=this._clipFinite(t,s))for(let c=0,u=s.length,d,f=this._edgecode(s[u-2],s[u-1]);c<u;c+=2)d=f,f=this._edgecode(s[c],s[c+1]),d&&f&&(c=this._edge(t,d,f,s,c),u=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(t,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(t,n,r,i){let o=1/0,a,s,l;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(l=this.ymin,s=t+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(l=this.ymax,s=t+(o=a)*r)}if(r>0){if(t>=this.xmax)return null;(a=(this.xmax-t)/r)<o&&(s=this.xmax,l=n+(o=a)*i)}else if(r<0){if(t<=this.xmin)return null;(a=(this.xmin-t)/r)<o&&(s=this.xmin,l=n+(o=a)*i)}return[s,l]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const r=(n+2)%t.length,i=(n+4)%t.length;(t[n]===t[r]&&t[r]===t[i]||t[n+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),n-=2)}t.length||(t=null)}return t}}const ide=2*Math.PI,fs=Math.pow;function ode(e){return e[0]}function ade(e){return e[1]}function sde(e){const{triangles:t,coords:n}=e;for(let r=0;r<t.length;r+=3){const i=2*t[r],o=2*t[r+1],a=2*t[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function lde(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class E7{static from(t,n=ode,r=ade,i){return new E7("length"in t?cde(t,n,r,i):Float64Array.from(ude(t,n,r,i)))}constructor(t){this._delaunator=new xd(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&sde(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const l=this.collinear[0],c=this.collinear[this.collinear.length-1],u=[n[2*l],n[2*l+1],n[2*c],n[2*c+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f<h;++f){const m=lde(n[2*f],n[2*f+1],d);n[2*f]=m[0],n[2*f+1]=m[1]}this._delaunator=new xd(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let l=0,c=r.length;l<c;++l){const u=o[l%3===2?l-2:l+1];(r[l]===-1||a[u]===-1)&&(a[u]=l)}for(let l=0,c=i.length;l<c;++l)s[i[l]]=l;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new rde(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const d=s.indexOf(t);d>0&&(yield s[d-1]),d<s.length-1&&(yield s[d+1]);return}const l=n[t];if(l===-1)return;let c=l,u=-1;do{if(yield u=a[c],c=c%3===2?c-2:c+1,a[c]!==t)return;if(c=o[c],c===-1){const d=r[(i[t]+1)%r.length];d!==u&&(yield d);return}}while(c!==l)}find(t,n,r=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,t,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(t,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:l,points:c}=this;if(i[t]===-1||!c.length)return(t+1)%(c.length>>1);let u=t,d=fs(n-c[t*2],2)+fs(r-c[t*2+1],2);const f=i[t];let h=f;do{let m=l[h];const g=fs(n-c[m*2],2)+fs(r-c[m*2+1],2);if(g<d&&(d=g,u=m),h=h%3===2?h-2:h+1,l[h]!==t)break;if(h=s[h],h===-1){if(h=o[(a[t]+1)%o.length],h!==m&&fs(n-c[h*2],2)+fs(r-c[h*2+1],2)<d)return h;break}}while(h!==f);return u}render(t){const n=t==null?t=new da:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const l=i[a];if(l<a)continue;const c=o[a]*2,u=o[l]*2;t.moveTo(r[c],r[c+1]),t.lineTo(r[u],r[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const r=t==null?t=new da:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],l=i[o+1];t.moveTo(s+n,l),t.arc(s,l,n,0,ide)}return r&&r.value()}renderHull(t){const n=t==null?t=new da:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;t.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const l=2*r[s];t.lineTo(i[l],i[l+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new N5;return this.renderHull(t),t.value()}renderTriangle(t,n){const r=n==null?n=new da:void 0,{points:i,triangles:o}=this,a=o[t*=3]*2,s=o[t+1]*2,l=o[t+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[l],i[l+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,r=t.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new N5;return this.renderTriangle(t,n),n.value()}}function cde(e,t,n,r){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=e[a];o[a*2]=t.call(r,s,a,e),o[a*2+1]=n.call(r,s,a,e)}return o}function*ude(e,t,n,r){let i=0;for(const o of e)yield t.call(r,o,i,e),yield n.call(r,o,i,e),++i}var V7=function(e){return[e.x,e.y]},Vu=e$,Q$="cursor",J$="top",dde=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?V7:n,i=e.margin,o=i===void 0?Vu:i;return t.map(function(a){var s=r(a),l=s[0],c=s[1];return[l+o.left,c+o.top]})},fde=function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,o=i===void 0?Vu:i,a=e.debug,s=E7.from(t),l=a?s.voronoi([0,0,o.left+n+o.right,o.top+r+o.bottom]):void 0;return{points:t,delaunay:s,voronoi:l}},O7=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?V7:n,i=e.width,o=e.height,a=e.margin,s=a===void 0?Vu:a,l=e.debug;return $.useMemo(function(){return fde({points:dde({points:t,margin:s,getNodePosition:r}),width:i,height:o,margin:s,debug:l})},[t,i,o,s,l])},hde=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,i=r===void 0?V7:r,o=e.delaunay,a=e.setCurrent,s=e.margin,l=s===void 0?Vu:s,c=e.detectionRadius,u=c===void 0?1/0:c,d=e.isInteractive,f=d===void 0||d,h=e.onMouseEnter,m=e.onMouseMove,g=e.onMouseLeave,v=e.onClick,b=e.onTouchStart,y=e.onTouchMove,x=e.onTouchEnd,S=e.enableTouchCrosshair,w=S!==void 0&&S,M=e.tooltip,E=e.tooltipPosition,H=E===void 0?Q$:E,_=e.tooltipAnchor,O=_===void 0?J$:_,k=$.useState(null),A=k[0],j=k[1],V=$.useRef(null);$.useEffect(function(){V.current=A},[V,A]);var T=$.useCallback(function(J){if(!t.current)return null;var W=S7(t.current,J),Z=W[0],U=W[1],F=o.find(Z,U),re=F!==void 0?n[F]:null;if(re&&u!==1/0){var B=i(re),ie=B[0],oe=B[1];Hie(Z,U,ie+l.left,oe+l.top)>u&&(F=null,re=null)}return F===null||re===null?null:[F,re]},[t,o,n,i,l,u]),L=ui(),R=L.showTooltipAt,I=L.showTooltipFromEvent,P=L.hideTooltip,N=$.useMemo(function(){if(M)return H==="cursor"?function(J,W){I(M(J),W,O)}:function(J){var W=i(J),Z=W[0],U=W[1];R(M(J),[Z+l.left,U+l.top],O)}},[R,I,M,H,O,i,l]),z=$.useCallback(function(J){var W=T(J);if(j(W),a==null||a(W?W[1]:null),W){var Z=W[1];N==null||N(Z,J),h==null||h(W[1],J)}},[T,j,a,N,h]),q=$.useCallback(function(J){var W=T(J);if(j(W),W){var Z=W[0],U=W[1];if(a==null||a(U),N==null||N(U,J),V.current){var F=V.current,re=F[0],B=F[1];Z!==re?g==null||g(B,J):m==null||m(U,J)}else h==null||h(U,J)}else a==null||a(null),P==null||P(),V.current&&(g==null||g(V.current[1],J))},[T,j,V,h,m,g,N,P]),G=$.useCallback(function(J){j(null),a==null||a(null),P(),g&&V.current&&g(V.current[1],J)},[j,a,V,P,g]),Y=$.useCallback(function(J){var W=T(J);j(W),W&&(v==null||v(W[1],J))},[T,j,v]),ee=$.useCallback(function(J){var W=T(J);w&&(j(W),a==null||a(W?W[1]:null)),W&&(b==null||b(W[1],J))},[T,j,a,w,b]),Q=$.useCallback(function(J){var W=T(J);w&&(j(W),a==null||a(W?W[1]:null)),W&&(y==null||y(W[1],J))},[T,j,a,w,y]),K=$.useCallback(function(J){w&&(j(null),a==null||a(null)),x&&V.current&&x(V.current[1],J)},[w,j,a,x,V]);return{current:A,handleMouseEnter:f?z:void 0,handleMouseMove:f?q:void 0,handleMouseLeave:f?G:void 0,handleClick:f?Y:void 0,handleTouchStart:f?ee:void 0,handleTouchMove:f?Q:void 0,handleTouchEnd:f?K:void 0}},eM=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.margin,o=i===void 0?Vu:i,a=e.getNodePosition,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd,g=e.enableTouchCrosshair,v=g!==void 0&&g,b=e.detectionRadius,y=b===void 0?1/0:b,x=e.tooltip,S=e.tooltipPosition,w=S===void 0?Q$:S,M=e.tooltipAnchor,E=M===void 0?J$:M,H=e.debug,_=$.useRef(null),O=O7({points:t,getNodePosition:a,width:n,height:r,margin:o,debug:H}),k=O.delaunay,A=O.voronoi,j=hde({elementRef:_,nodes:t,delaunay:k,margin:o,detectionRadius:y,setCurrent:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:m,enableTouchCrosshair:v,tooltip:x,tooltipPosition:w,tooltipAnchor:E}),V=j.current,T=j.handleMouseEnter,L=j.handleMouseMove,R=j.handleMouseLeave,I=j.handleClick,P=j.handleTouchStart,N=j.handleTouchMove,z=j.handleTouchEnd,q=$.useMemo(function(){if(H&&A)return A.render()},[H,A]);return p.jsxs("g",{ref:_,transform:"translate("+-o.left+","+-o.top+")",children:[H&&A&&p.jsxs(p.Fragment,{children:[p.jsx("path",{d:q,stroke:"red",strokeWidth:1,opacity:.75}),y<1/0&&p.jsx("path",{stroke:"red",strokeWidth:.35,fill:"none",d:k.renderPoints(void 0,y)}),V&&p.jsx("path",{fill:"pink",opacity:.35,d:A.renderCell(V[0])})]}),p.jsx("rect",{"data-ref":"mesh-interceptor",width:o.left+n+o.right,height:o.top+r+o.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:T,onMouseMove:L,onMouseLeave:R,onTouchStart:P,onTouchMove:N,onTouchEnd:z,onClick:I})]})},tM=function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()},nM=function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()};function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Or.apply(this,arguments)}function rM(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var gde=function(e){if(typeof e=="function")return e;if(Ea(e))return function(){return e};if(function(n){return Uo(n)}(e)){if(!wf(e.key))throw new Error("symbolSize is invalid, key should be a string pointing to the property to use to determine node size");if(!Array.isArray(e.values)||e.values.length!==2)throw new Error("symbolSize is invalid, values spec should be an array containing two values, min and max");if(!Array.isArray(e.sizes)||e.sizes.length!==2)throw new Error("symbolSize is invalid, sizes spec should be an array containing two values, min and max");var t=Go().domain([e.values[0],e.values[1]]).range([e.sizes[0],e.sizes[1]]);return function(n){return t(yn(n,e.key))}}throw new Error("nodeSize is invalid, it should be either a function, a number or an object")},iM=function(e){var t,n=e.data,r=e.xScaleSpec,i=e.xFormat,o=e.yScaleSpec,a=e.yFormat,s=e.width,l=e.height,c=e.nodeId,u=e.nodeSize,d=e.colors,f=$.useMemo(function(){return F$(n,r,o,s,l)},[n,r,o,s,l]),h=f.series,m=f.xScale,g=f.yScale,v=Io(i),b=Io(a),y=yi(c),x=$.useMemo(function(){return function(M){var E=M.series,H=M.formatX,_=M.formatY,O=M.getNodeId,k=[];return E.forEach(function(A){A.data.forEach(function(j,V){var T={index:k.length,serieIndex:V,serieId:A.id,x:j.position.x,xValue:j.data.x,formattedX:H(j.data.x),y:j.position.y,yValue:j.data.y,formattedY:_(j.data.y),data:j.data};k.push(Or({},T,{id:O(T)}))})}),k}({series:h,formatX:v,formatY:b,getNodeId:y})},[h,v,b,y]),S=$.useMemo(function(){return gde(t)},[t=u]),w=Mu(d,"serieId");return{xScale:m,yScale:g,nodes:$.useMemo(function(){return x.map(function(M){return Or({},M,{size:S(M),color:w({serieId:M.serieId})})})},[x,S,w]),legendData:$.useMemo(function(){return h.map(function(M){return{id:M.id,label:M.id,color:w({serieId:M.id})}})},[h,w])}},oM=function(e,t){return I1e({data:e,annotations:t,getPosition:function(n){return{x:n.x,y:n.y}},getDimensions:function(n){return{size:n.size,width:n.size,height:n.size}}})},vde=function(e){return e/2},aM={xScale:{type:"linear",min:0,max:"auto"},yScale:{type:"linear",min:0,max:"auto"},enableGridX:!0,enableGridY:!0,axisBottom:{},axisLeft:{},nodeId:function(e){return e.serieId+"."+e.index},nodeSize:9,nodeComponent:function(e){var t=e.node,n=e.style,r=e.blendMode,i=e.isInteractive,o=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=$.useCallback(function(h){return o==null?void 0:o(t,h)},[t,o]),u=$.useCallback(function(h){return a==null?void 0:a(t,h)},[t,a]),d=$.useCallback(function(h){return s==null?void 0:s(t,h)},[t,s]),f=$.useCallback(function(h){return l==null?void 0:l(t,h)},[t,l]);return p.jsx(et.circle,{cx:n.x,cy:n.y,r:n.size.to(vde),fill:n.color,style:{mixBlendMode:r},onMouseEnter:i?c:void 0,onMouseMove:i?u:void 0,onMouseLeave:i?d:void 0,onClick:i?f:void 0})},colors:{scheme:"nivo"},isInteractive:!0,debugMesh:!1,tooltip:function(e){var t=e.node;return p.jsx(Is,{id:t.serieId,value:"x: "+t.formattedX+", y: "+t.formattedY,enableChip:!0,color:t.color})},markers:[],legends:[],annotations:[]},pn=Or({},aM,{blendMode:"normal",layers:["grid","axes","nodes","markers","mesh","legends","annotations"],role:"img",useMesh:!0,animate:!0,motionConfig:"default"}),rr=Or({},aM,{layers:["grid","axes","nodes","mesh","legends","annotations"],pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,renderNode:function(e,t){e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.fillStyle=t.color,e.fill()}}),mde=function(e){var t=e.nodes,n=e.annotations,r=oM(t,n);return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(B1e,Or({},i),o)})})},pde=function(e){return e.id},E2=function(e){return{x:e.x,y:e.y,size:e.size,color:e.color}},bde=function(e){return{x:e.x,y:e.y,size:0,color:e.color}},yde=function(e){var t=e.nodes,n=e.nodeComponent,r=e.isInteractive,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.tooltip,c=e.blendMode,u=Dn(),d=u.animate,f=u.config,h=Cr(t,{keys:pde,from:E2,enter:E2,update:E2,leave:bde,config:f,immediate:!d}),m=ui(),g=m.showTooltipFromEvent,v=m.hideTooltip,b=$.useCallback(function(w,M){g($.createElement(l,{node:w}),M),i==null||i(w,M)},[l,g,i]),y=$.useCallback(function(w,M){g($.createElement(l,{node:w}),M),o==null||o(w,M)},[l,g,o]),x=$.useCallback(function(w,M){v(),a==null||a(w,M)},[v,a]),S=$.useCallback(function(w,M){return s==null?void 0:s(w,M)},[s]);return p.jsx(p.Fragment,{children:h(function(w,M){return $.createElement(n,{node:M,style:w,blendMode:c,isInteractive:r,onMouseEnter:r?b:void 0,onMouseMove:r?y:void 0,onMouseLeave:r?x:void 0,onClick:r?S:void 0})})})},Cde=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.tooltip,c=e.debug,u=ui(),d=u.showTooltipFromEvent,f=u.hideTooltip,h=$.useCallback(function(b,y){d($.createElement(l,{node:b}),y),i&&i(b,y)},[d,l,i]),m=$.useCallback(function(b,y){d($.createElement(l,{node:b}),y),o&&o(b,y)},[d,l,o]),g=$.useCallback(function(b,y){f(),a&&a(b,y)},[f,a]),v=$.useCallback(function(b,y){s&&s(b,y)},[s]);return p.jsx(eM,{nodes:t,width:n,height:r,onMouseEnter:h,onMouseMove:m,onMouseLeave:g,onClick:v,debug:c})},xde=["isInteractive","animate","motionConfig","theme","renderWrapper"],wde=function(e){var t=e.data,n=e.xScale,r=n===void 0?pn.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?pn.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.margin,d=e.layers,f=d===void 0?pn.layers:d,h=e.colors,m=h===void 0?pn.colors:h,g=e.blendMode,v=g===void 0?pn.blendMode:g,b=e.nodeId,y=b===void 0?pn.nodeId:b,x=e.nodeSize,S=x===void 0?pn.nodeSize:x,w=e.nodeComponent,M=w===void 0?pn.nodeComponent:w,E=e.enableGridX,H=E===void 0?pn.enableGridX:E,_=e.enableGridY,O=_===void 0?pn.enableGridY:_,k=e.gridXValues,A=e.gridYValues,j=e.axisTop,V=e.axisRight,T=e.axisBottom,L=T===void 0?pn.axisBottom:T,R=e.axisLeft,I=R===void 0?pn.axisLeft:R,P=e.annotations,N=P===void 0?pn.annotations:P,z=e.isInteractive,q=z===void 0?pn.isInteractive:z,G=e.useMesh,Y=G===void 0?pn.useMesh:G,ee=e.debugMesh,Q=ee===void 0?pn.debugMesh:ee,K=e.onMouseEnter,J=e.onMouseMove,W=e.onMouseLeave,Z=e.onClick,U=e.tooltip,F=U===void 0?pn.tooltip:U,re=e.markers,B=re===void 0?pn.markers:re,ie=e.legends,oe=ie===void 0?pn.legends:ie,ve=e.role,Ce=ve===void 0?pn.role:ve,pe=e.ariaLabel,ye=e.ariaLabelledBy,Se=e.ariaDescribedBy,me=Za(l,c,u),ge=me.margin,ce=me.innerWidth,$e=me.innerHeight,he=me.outerWidth,Ae=me.outerHeight,Ie=iM({data:t,xScaleSpec:r,xFormat:i,yScaleSpec:a,yFormat:s,width:ce,height:$e,nodeId:y,nodeSize:S,colors:m}),Re=Ie.xScale,ke=Ie.yScale,Ye=Ie.nodes,Xe=Ie.legendData,Fe=$.useMemo(function(){return{xScale:Re,yScale:ke,nodes:Ye,margin:ge,innerWidth:ce,innerHeight:$e,outerWidth:he,outerHeight:Ae}},[Re,ke,Ye,ge,ce,$e,he,Ae]),je={grid:null,axes:null,nodes:null,markers:null,mesh:null,annotations:null,legends:null};return f.includes("grid")&&(je.grid=p.jsx(Y$,{width:ce,height:$e,xScale:H?Re:null,yScale:O?ke:null,xValues:k,yValues:A},"grid")),f.includes("axes")&&(je.axes=p.jsx(G$,{xScale:Re,yScale:ke,width:ce,height:$e,top:j,right:V,bottom:L,left:I},"axes")),f.includes("nodes")&&(je.nodes=p.jsx(yde,{nodes:Ye,nodeComponent:M,isInteractive:q,tooltip:F,blendMode:v,onMouseEnter:K,onMouseMove:J,onMouseLeave:W,onClick:Z},"nodes")),f.includes("markers")&&(je.markers=p.jsx(h$,{markers:B,width:ce,height:$e,xScale:Re,yScale:ke},"markers")),f.includes("mesh")&&q&&Y&&(je.mesh=p.jsx(Cde,{nodes:Ye,width:ce,height:$e,onMouseEnter:K,onMouseMove:J,onMouseLeave:W,onClick:Z,tooltip:F,debug:Q},"mesh")),f.includes("annotations")&&(je.annotations=p.jsx(mde,{nodes:Ye,annotations:N},"annotations")),f.includes("legends")&&(je.legends=oe.map(function(Qe,Ze){return p.jsx(Pf,Or({},Qe,{containerWidth:ce,containerHeight:$e,data:Xe}),Ze)})),p.jsx(wl,{width:he,height:Ae,margin:ge,role:Ce,ariaLabel:pe,ariaLabelledBy:ye,ariaDescribedBy:Se,children:f.map(function(Qe,Ze){if(typeof Qe=="string"&&je[Qe]!==void 0)return je[Qe];if(typeof Qe=="function")return p.jsx($.Fragment,{children:$.createElement(Qe,Fe)},Ze);throw new Error("Unknown layer ("+Qe+")")})})},Sde=function(e){var t=e.isInteractive,n=t===void 0?pn.isInteractive:t,r=e.animate,i=r===void 0?pn.animate:r,o=e.motionConfig,a=o===void 0?pn.motionConfig:o,s=e.theme,l=e.renderWrapper,c=rM(e,xde);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(wde,Or({isInteractive:n},c))})},sM=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(Sde,Or({width:n,height:r},e))}})},$de=["isInteractive","renderWrapper","theme"],Mde=function(e){var t=e.data,n=e.xScale,r=n===void 0?rr.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?rr.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.margin,d=e.pixelRatio,f=d===void 0?rr.pixelRatio:d,h=e.layers,m=h===void 0?rr.layers:h,g=e.colors,v=g===void 0?rr.colors:g,b=e.nodeId,y=b===void 0?pn.nodeId:b,x=e.nodeSize,S=x===void 0?rr.nodeSize:x,w=e.renderNode,M=w===void 0?rr.renderNode:w,E=e.enableGridX,H=E===void 0?rr.enableGridX:E,_=e.gridXValues,O=e.enableGridY,k=O===void 0?rr.enableGridY:O,A=e.gridYValues,j=e.axisTop,V=e.axisRight,T=e.axisBottom,L=T===void 0?rr.axisBottom:T,R=e.axisLeft,I=R===void 0?rr.axisLeft:R,P=e.annotations,N=P===void 0?rr.annotations:P,z=e.isInteractive,q=z===void 0?rr.isInteractive:z,G=e.debugMesh,Y=G===void 0?rr.debugMesh:G,ee=e.onMouseEnter,Q=e.onMouseMove,K=e.onMouseLeave,J=e.onClick,W=e.tooltip,Z=W===void 0?rr.tooltip:W,U=e.legends,F=U===void 0?rr.legends:U,re=e.canvasRef,B=$.useRef(null),ie=Zt(),oe=$.useState(null),ve=oe[0],Ce=oe[1],pe=Za(l,c,u),ye=pe.margin,Se=pe.innerWidth,me=pe.innerHeight,ge=pe.outerWidth,ce=pe.outerHeight,$e=iM({data:t,xScaleSpec:r,xFormat:i,yScaleSpec:a,yFormat:s,width:Se,height:me,nodeId:y,nodeSize:S,colors:v}),he=$e.xScale,Ae=$e.yScale,Ie=$e.nodes,Re=$e.legendData,ke=oM(Ie,N),Ye=O7({points:Ie,width:Se,height:me,debug:Y}),Xe=Ye.delaunay,Fe=Ye.voronoi,je=$.useMemo(function(){return{xScale:he,yScale:Ae,nodes:Ie,margin:ye,innerWidth:Se,innerHeight:me,outerWidth:ge,outerHeight:ce}},[he,Ae,Ie,ye,Se,me,ge,ce]);$.useEffect(function(){if(B.current){B.current.width=ge*f,B.current.height=ce*f;var Ne=B.current.getContext("2d");Ne.scale(f,f),Ne.fillStyle=ie.background,Ne.fillRect(0,0,ge,ce),Ne.translate(ye.left,ye.top),m.forEach(function(ze){if(ze==="grid")Ne.lineWidth=ie.grid.line.strokeWidth,Ne.strokeStyle=ie.grid.line.stroke,H&&Cd(Ne,{width:Se,height:me,scale:he,axis:"x",values:_}),k&&Cd(Ne,{width:Se,height:me,scale:Ae,axis:"y",values:A});else if(ze==="annotations")W1e(Ne,{annotations:ke,theme:ie});else if(ze==="axes")K$(Ne,{xScale:he,yScale:Ae,width:Se,height:me,top:j,right:V,bottom:L,left:I,theme:ie});else if(ze==="nodes")Ie.forEach(function(De){M(Ne,De)});else if(ze==="mesh")Y&&(tM(Ne,Fe),ve&&nM(Ne,Fe,ve.index));else if(ze==="legends")F.forEach(function(De){x$(Ne,Or({},De,{data:Re,containerWidth:Se,containerHeight:me,theme:ie}))});else{if(typeof ze!="function")throw new Error("Invalid layer: "+ze);ze(Ne,je)}})}},[B,Se,me,ge,ce,ye.top,ye.left,f,M,m,je,ie,he,Ae,Ie,H,k,j,V,L,I,F,Re,Y,Fe,ve,ke]);var Qe=ui(),Ze=Qe.showTooltipFromEvent,qe=Qe.hideTooltip,de=$.useCallback(function(Ne){var ze=S7(B.current,Ne),De=ze[0],Je=ze[1];if(!v$(ye.left,ye.top,Se,me,De,Je))return null;var tt=Xe.find(De-ye.left,Je-ye.top);return Ie[tt]},[B,ye,Se,me,Xe]),He=$.useCallback(function(Ne){var ze=de(Ne);Ce(ze),ze?(Ze($.createElement(Z,{node:ze}),Ne),ve&&ve.id!==ze.id&&(K&&K(ve,Ne),ee&&ee(ze,Ne)),ve||ee&&ee(ze,Ne),Q&&Q(ze,Ne)):(qe(),ve&&K&&K(ve,Ne))},[de,ve,Ce,Ze,qe,Z,ee,Q,K]),Ke=$.useCallback(function(Ne){qe(),Ce(null),ve&&K&&K(ve,Ne)},[qe,ve,Ce,K]),nt=$.useCallback(function(Ne){if(J){var ze=de(Ne);ze&&J(ze,Ne)}},[de,J]);return p.jsx("canvas",{ref:function(Ne){B.current=Ne,re&&"current"in re&&(re.current=Ne)},width:ge*f,height:ce*f,style:{width:ge,height:ce,cursor:q?"auto":"normal"},onMouseEnter:q?He:void 0,onMouseMove:q?He:void 0,onMouseLeave:q?Ke:void 0,onClick:q?nt:void 0})},_de=$.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,o=rM(e,$de);return p.jsx(Ua,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:p.jsx(Mde,Or({},o,{canvasRef:t}))})});$.forwardRef(function(e,t){return p.jsx(Yo,{children:function(n){var r=n.width,i=n.height;return p.jsx(_de,Or({width:r,height:i},e,{ref:t}))}})});const Hde=({x1:e,x2:t,y1:n,y2:r})=>p.jsx("g",{children:p.jsx("line",{x1:e,y1:n,x2:t,y2:r,stroke:"red",strokeWidth:"3"})}),Ede=({scatterPlotData:e,style:t={},margin:n={},axisBottom:r={},axisLeft:i={},tooltip:o=null})=>{var h,m;const a=e==null?void 0:e.line,s=a==null?void 0:a.x1,l=a==null?void 0:a.y1,c=a==null?void 0:a.x2,u=a==null?void 0:a.y2,d=(m=(h=e==null?void 0:e.points)==null?void 0:h.data)==null?void 0:m.map(g=>g.y);Math.min(l,u,...d);const f=Math.max(l,u,...d);return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{style:{width:"100%",height:600,...t},children:p.jsx(sM,{data:[e==null?void 0:e.points],margin:{top:20,right:120,bottom:100,left:120,...n},xScale:{type:"point"},yScale:{type:"linear",min:0,max:f,reverse:!1},axisBottom:{orient:"bottom",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:46,truncateTickAt:0,legend:"axisBottom",...r},axisLeft:{orient:"left",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-60,truncateTickAt:0,legend:"axisLeft",...i},layers:["grid","markers","axes","nodes","legends",g=>p.jsx(Hde,{x1:g.xScale(s),y1:g.yScale(l),x2:g.xScale(c),y2:g.yScale(u)})],tooltip:({node:g})=>p.jsx(Un,{body:(o==null?void 0:o({node:g}))||p.jsx("span",{children:"Scatterplot tooltip"})})})})]})};function Vde(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var Ode=Vde;function Rde(e){return function(t){return e==null?void 0:e[t]}}var Tde=Rde,kde=Tde,jde={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Lde=kde(jde),Pde=Lde,Ide=Pde,Ade=bu,Nde=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fde="\\u0300-\\u036f",Dde="\\ufe20-\\ufe2f",zde="\\u20d0-\\u20ff",Bde=Fde+Dde+zde,Wde="["+Bde+"]",Zde=RegExp(Wde,"g");function Ude(e){return e=Ade(e),e&&e.replace(Nde,Ide).replace(Zde,"")}var qde=Ude,Gde=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Yde(e){return e.match(Gde)||[]}var Kde=Yde,Xde=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Qde(e){return Xde.test(e)}var Jde=Qde,lM="\\ud800-\\udfff",efe="\\u0300-\\u036f",tfe="\\ufe20-\\ufe2f",nfe="\\u20d0-\\u20ff",rfe=efe+tfe+nfe,cM="\\u2700-\\u27bf",uM="a-z\\xdf-\\xf6\\xf8-\\xff",ife="\\xac\\xb1\\xd7\\xf7",ofe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",afe="\\u2000-\\u206f",sfe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dM="A-Z\\xc0-\\xd6\\xd8-\\xde",lfe="\\ufe0e\\ufe0f",fM=ife+ofe+afe+sfe,hM="['’]",fp="["+fM+"]",cfe="["+rfe+"]",gM="\\d+",ufe="["+cM+"]",vM="["+uM+"]",mM="[^"+lM+fM+gM+cM+uM+dM+"]",dfe="\\ud83c[\\udffb-\\udfff]",ffe="(?:"+cfe+"|"+dfe+")",hfe="[^"+lM+"]",pM="(?:\\ud83c[\\udde6-\\uddff]){2}",bM="[\\ud800-\\udbff][\\udc00-\\udfff]",vs="["+dM+"]",gfe="\\u200d",hp="(?:"+vM+"|"+mM+")",vfe="(?:"+vs+"|"+mM+")",gp="(?:"+hM+"(?:d|ll|m|re|s|t|ve))?",vp="(?:"+hM+"(?:D|LL|M|RE|S|T|VE))?",yM=ffe+"?",CM="["+lfe+"]?",mfe="(?:"+gfe+"(?:"+[hfe,pM,bM].join("|")+")"+CM+yM+")*",pfe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bfe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yfe=CM+yM+mfe,Cfe="(?:"+[ufe,pM,bM].join("|")+")"+yfe,xfe=RegExp([vs+"?"+vM+"+"+gp+"(?="+[fp,vs,"$"].join("|")+")",vfe+"+"+vp+"(?="+[fp,vs+hp,"$"].join("|")+")",vs+"?"+hp+"+"+gp,vs+"+"+vp,bfe,pfe,gM,Cfe].join("|"),"g");function wfe(e){return e.match(xfe)||[]}var Sfe=wfe,$fe=Kde,Mfe=Jde,_fe=bu,Hfe=Sfe;function Efe(e,t,n){return e=_fe(e),t=n?void 0:t,t===void 0?Mfe(e)?Hfe(e):$fe(e):e.match(t)||[]}var Vfe=Efe,Ofe=Ode,Rfe=qde,Tfe=Vfe,kfe="['’]",jfe=RegExp(kfe,"g");function Lfe(e){return function(t){return Ofe(Tfe(Rfe(t).replace(jfe,"")),e,"")}}var Pfe=Lfe,Ife=X$;function Afe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Ife(e,t,n)}var Nfe=Afe,Ffe="\\ud800-\\udfff",Dfe="\\u0300-\\u036f",zfe="\\ufe20-\\ufe2f",Bfe="\\u20d0-\\u20ff",Wfe=Dfe+zfe+Bfe,Zfe="\\ufe0e\\ufe0f",Ufe="\\u200d",qfe=RegExp("["+Ufe+Ffe+Wfe+Zfe+"]");function Gfe(e){return qfe.test(e)}var xM=Gfe;function Yfe(e){return e.split("")}var Kfe=Yfe,wM="\\ud800-\\udfff",Xfe="\\u0300-\\u036f",Qfe="\\ufe20-\\ufe2f",Jfe="\\u20d0-\\u20ff",e0e=Xfe+Qfe+Jfe,t0e="\\ufe0e\\ufe0f",n0e="["+wM+"]",F5="["+e0e+"]",D5="\\ud83c[\\udffb-\\udfff]",r0e="(?:"+F5+"|"+D5+")",SM="[^"+wM+"]",$M="(?:\\ud83c[\\udde6-\\uddff]){2}",MM="[\\ud800-\\udbff][\\udc00-\\udfff]",i0e="\\u200d",_M=r0e+"?",HM="["+t0e+"]?",o0e="(?:"+i0e+"(?:"+[SM,$M,MM].join("|")+")"+HM+_M+")*",a0e=HM+_M+o0e,s0e="(?:"+[SM+F5+"?",F5,$M,MM,n0e].join("|")+")",l0e=RegExp(D5+"(?="+D5+")|"+s0e+a0e,"g");function c0e(e){return e.match(l0e)||[]}var u0e=c0e,d0e=Kfe,f0e=xM,h0e=u0e;function g0e(e){return f0e(e)?h0e(e):d0e(e)}var v0e=g0e,m0e=Nfe,p0e=xM,b0e=v0e,y0e=bu;function C0e(e){return function(t){t=y0e(t);var n=p0e(t)?b0e(t):void 0,r=n?n[0]:t.charAt(0),i=n?m0e(n,1).join(""):t.slice(1);return r[e]()+i}}var x0e=C0e,w0e=x0e,S0e=w0e("toUpperCase"),$0e=S0e,M0e=Pfe,_0e=$0e,H0e=M0e(function(e,t,n){return e+(n?" ":"")+_0e(t)}),E0e=H0e;const V0e=xn(E0e);function O0e(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function R0e(){return this.eachAfter(O0e)}function T0e(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function k0e(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function j0e(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function L0e(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function P0e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function I0e(e){for(var t=this,n=A0e(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function A0e(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N0e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function F0e(){var e=[];return this.each(function(t){e.push(t)}),e}function D0e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function z0e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function R7(e,t){var n=new wd(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,c;for(t==null&&(t=W0e);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new wd(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(U0e)}function B0e(){return R7(this).eachBefore(Z0e)}function W0e(e){return e.children}function Z0e(e){e.data=e.data.data}function U0e(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wd(e){this.data=e,this.depth=this.height=0,this.parent=null}wd.prototype=R7.prototype={constructor:wd,count:R0e,each:T0e,eachAfter:j0e,eachBefore:k0e,sum:L0e,sort:P0e,path:I0e,ancestors:N0e,descendants:F0e,leaves:D0e,links:z0e,copy:B0e};function q0e(e){if(typeof e!="function")throw new Error;return e}function Gl(){return 0}function Yl(e){return function(){return e}}function G0e(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function T7(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function k7(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var Y0e=(1+Math.sqrt(5))/2;function K0e(e,t,n,r,i,o){for(var a=[],s=t.children,l,c,u=0,d=0,f=s.length,h,m,g=t.value,v,b,y,x,S,w,M;u<f;){h=i-n,m=o-r;do v=s[d++].value;while(!v&&d<f);for(b=y=v,w=Math.max(m/h,h/m)/(g*e),M=v*v*w,S=Math.max(y/M,M/b);d<f;++d){if(v+=c=s[d].value,c<b&&(b=c),c>y&&(y=c),M=v*v*w,x=Math.max(y/M,M/b),x>S){v-=c;break}S=x}a.push(l={value:v,dice:h<m,children:s.slice(u,d)}),l.dice?T7(l,n,r,i,g?r+=m*v/g:o):k7(l,n,r,g?n+=h*v/g:i,o),g-=v,u=d}return a}const EM=function e(t){function n(r,i,o,a,s){K0e(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Y0e);function X0e(){var e=EM,t=!1,n=1,r=1,i=[0],o=Gl,a=Gl,s=Gl,l=Gl,c=Gl;function u(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(d),i=[0],t&&f.eachBefore(G0e),f}function d(f){var h=i[f.depth],m=f.x0+h,g=f.y0+h,v=f.x1-h,b=f.y1-h;v<m&&(m=v=(m+v)/2),b<g&&(g=b=(g+b)/2),f.x0=m,f.y0=g,f.x1=v,f.y1=b,f.children&&(h=i[f.depth+1]=o(f)/2,m+=c(f)-h,g+=a(f)-h,v-=s(f)-h,b-=l(f)-h,v<m&&(m=v=(m+v)/2),b<g&&(g=b=(g+b)/2),e(f,m,g,v,b))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(n=+f[0],r=+f[1],u):[n,r]},u.tile=function(f){return arguments.length?(e=q0e(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Yl(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Yl(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Yl(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Yl(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Yl(+f),u):c},u}function Q0e(e,t,n,r,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,n,r,i);function u(d,f,h,m,g,v,b){if(d>=f-1){var y=o[d];y.x0=m,y.y0=g,y.x1=v,y.y1=b;return}for(var x=c[d],S=h/2+x,w=d+1,M=f-1;w<M;){var E=w+M>>>1;c[E]<S?w=E+1:M=E}S-c[w-1]<c[w]-S&&d+1<w&&--w;var H=c[w]-x,_=h-H;if(v-m>b-g){var O=(m*_+v*H)/h;u(d,w,H,m,g,O,b),u(w,f,_,O,g,v,b)}else{var k=(g*_+b*H)/h;u(d,w,H,m,g,v,k),u(w,f,_,m,k,v,b)}}}function J0e(e,t,n,r,i){(e.depth&1?k7:T7)(e,t,n,r,i)}function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rr.apply(this,arguments)}function e2e(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var t2e=function(e,t){return On([e,t],function(n,r){return"translate("+n+","+r+")"})},n2e=function(e,t){return On([e,t],function(n,r){return"translate("+n+"px, "+r+"px)"})},mp=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+r+","+i+") rotate("+o+")"})},r2e=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+r+"px,"+i+"px) rotate("+o+"deg)"})},i2e=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+(r-(o===0?0:5))+"px,"+(i-(o===0?5:0))+"px) rotate("+o+"deg)"})},o2e=$.memo(function(e){var t=e.node,n=e.animatedProps,r=e.borderWidth,i=e.enableLabel,o=e.enableParentLabel,a=e.labelSkipSize,s=Zt(),l=i&&t.isLeaf&&(a===0||Math.min(t.width,t.height)>a),c=o&&t.isParent;return p.jsxs(et.g,{transform:t2e(n.x,n.y),children:[p.jsx(et.rect,{"data-testid":"node."+t.id,width:On(n.width,function(u){return Math.max(u,0)}),height:On(n.height,function(u){return Math.max(u,0)}),fill:t.fill?t.fill:n.color,strokeWidth:r,stroke:t.borderColor,fillOpacity:t.opacity,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseLeave:t.onMouseLeave,onClick:t.onClick}),l&&p.jsx(et.text,{"data-testid":"label."+t.id,textAnchor:"middle",dominantBaseline:"central",style:Rr({},s.labels.text,{fill:t.labelTextColor,pointerEvents:"none"}),fillOpacity:n.labelOpacity,transform:mp(n.labelX,n.labelY,n.labelRotation),children:t.label}),c&&p.jsx(et.text,{"data-testid":"parentLabel."+t.id,dominantBaseline:"central",style:Rr({},s.labels.text,{fill:t.parentLabelTextColor,pointerEvents:"none"}),fillOpacity:n.parentLabelOpacity,transform:mp(n.parentLabelX,n.parentLabelY,n.parentLabelRotation),children:t.parentLabel})]})}),a2e=$.memo(function(e){var t=e.node;return p.jsx(Is,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})}),s2e=$.memo(function(e){var t=e.node,n=e.animatedProps,r=e.borderWidth,i=e.enableLabel,o=e.enableParentLabel,a=e.labelSkipSize,s=Zt(),l=i&&t.isLeaf&&(a===0||Math.min(t.width,t.height)>a),c=o&&t.isParent;return p.jsxs(et.div,{"data-testid":"node."+t.id,id:t.path.replace(/[^\w]/gi,"-"),style:{boxSizing:"border-box",position:"absolute",top:0,left:0,transform:n2e(n.x,n.y),width:n.width,height:n.height,borderWidth:r,borderStyle:"solid",borderColor:t.borderColor,overflow:"hidden"},children:[p.jsx(et.div,{style:{boxSizing:"border-box",position:"absolute",top:0,left:0,opacity:t.opacity,width:n.width,height:n.height,background:n.color},onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseLeave:t.onMouseLeave,onClick:t.onClick}),l&&p.jsx(et.span,{"data-testid":"label."+t.id,style:Rr({},s.labels.text,{position:"absolute",display:"flex",top:-5,left:-5,width:10,height:10,justifyContent:"center",alignItems:"center",whiteSpace:"nowrap",color:t.labelTextColor,transformOrigin:"center center",transform:r2e(n.labelX,n.labelY,n.labelRotation),opacity:n.labelOpacity,pointerEvents:"none"}),children:t.label}),c&&p.jsx(et.span,{"data-testid":"parentLabel."+t.id,style:Rr({},s.labels.text,{position:"absolute",display:"flex",justifyContent:"flex-start",alignItems:"center",whiteSpace:"nowrap",width:10,height:10,color:t.parentLabelTextColor,transformOrigin:"top left",transform:i2e(n.parentLabelX,n.parentLabelY,n.parentLabelRotation),opacity:n.parentLabelOpacity,pointerEvents:"none"}),children:t.parentLabel})]})}),$n={layers:["nodes"],identity:"id",value:"value",tile:"squarify",leavesOnly:!1,innerPadding:0,outerPadding:0,colors:{scheme:"nivo"},colorBy:"pathComponents.1",nodeOpacity:.33,enableLabel:!0,label:"formattedValue",labelSkipSize:0,labelTextColor:{from:"color",modifiers:[["darker",1]]},orientLabel:!0,enableParentLabel:!0,parentLabel:"id",parentLabelSize:20,parentLabelPosition:"top",parentLabelPadding:6,parentLabelTextColor:{from:"color",modifiers:[["darker",1]]},borderWidth:1,borderColor:{from:"color",modifiers:[["darker",1]]},isInteractive:!0,tooltip:a2e,role:"img",animate:!0,motionConfig:"gentle"},Ut=Rr({},$n,{nodeComponent:o2e,defs:[],fill:[]});Rr({},$n,{nodeComponent:s2e});Rr({},$n,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var l2e={binary:Q0e,dice:T7,slice:k7,sliceDice:J0e,squarify:EM},c2e=function(e){var t=e.root,n=e.getValue;return $.useMemo(function(){return R7(t).sum(n)},[t,n])},u2e=function(e){var t=e.data,n=e.width,r=e.height,i=e.identity,o=i===void 0?$n.identity:i,a=e.value,s=a===void 0?$n.value:a,l=e.valueFormat,c=e.leavesOnly,u=c===void 0?$n.leavesOnly:c,d=e.tile,f=d===void 0?$n.tile:d,h=e.innerPadding,m=h===void 0?$n.innerPadding:h,g=e.outerPadding,v=g===void 0?$n.outerPadding:g,b=e.label,y=b===void 0?$n.label:b,x=e.orientLabel,S=x===void 0?$n.orientLabel:x,w=e.enableParentLabel,M=w===void 0?$n.enableParentLabel:w,E=e.parentLabel,H=E===void 0?$n.parentLabel:E,_=e.parentLabelSize,O=_===void 0?$n.parentLabelSize:_,k=e.parentLabelPosition,A=k===void 0?$n.parentLabelPosition:k,j=e.parentLabelPadding,V=j===void 0?$n.parentLabelPadding:j,T=e.colors,L=T===void 0?$n.colors:T,R=e.colorBy,I=R===void 0?$n.colorBy:R,P=e.nodeOpacity,N=P===void 0?$n.nodeOpacity:P,z=e.borderColor,q=z===void 0?$n.borderColor:z,G=e.labelTextColor,Y=G===void 0?$n.labelTextColor:G,ee=e.parentLabelTextColor,Q=ee===void 0?$n.parentLabelTextColor:ee,K=yi(o),J=yi(s),W=Io(l),Z=yi(y),U=yi(H),F=function(me){var ge=me.width,ce=me.height,$e=me.tile,he=me.innerPadding,Ae=me.outerPadding,Ie=me.enableParentLabel,Re=me.parentLabelSize,ke=me.parentLabelPosition,Ye=me.leavesOnly;return $.useMemo(function(){var Xe=X0e().size([ge,ce]).tile(l2e[$e]).round(!0).paddingInner(he).paddingOuter(Ae);if(Ie&&!Ye){var Fe=Re+2*Ae;Xe["padding"+V0e(ke)](Fe)}return Xe},[ge,ce,$e,he,Ae,Ie,Re,ke,Ye])}({width:n,height:r,tile:f,innerPadding:m,outerPadding:v,enableParentLabel:M,parentLabelSize:O,parentLabelPosition:A,leavesOnly:u}),re=c2e({root:t,getValue:J}),B=$.useMemo(function(){var me=V$(re);return F(me),u?me.leaves():me.descendants()},[re,F,u]),ie=$.useMemo(function(){return B.map(function(me){var ge=function(Ae,Ie){var Re=Ae.ancestors().map(function(ke){return Ie(ke.data)}).reverse();return{path:Re.join("."),pathComponents:Re}}(me,K),ce=ge.path,$e=ge.pathComponents,he={id:K(me.data),path:ce,pathComponents:$e,data:Ya(me.data,"children"),x:me.x0,y:me.y0,width:me.x1-me.x0,height:me.y1-me.y0,value:me.value,formattedValue:W(me.value),treeDepth:me.depth,treeHeight:me.height,isParent:me.height>0,isLeaf:me.height===0,parentLabelX:0,parentLabelY:0,parentLabelRotation:0};return he.labelRotation=S&&he.height>he.width?-90:0,A==="top"&&(he.parentLabelX=v+V,he.parentLabelY=v+O/2),A==="right"&&(he.parentLabelX=he.width-v-O/2,he.parentLabelY=he.height-v-V,he.parentLabelRotation=-90),A==="bottom"&&(he.parentLabelX=v+V,he.parentLabelY=he.height-v-O/2),A==="left"&&(he.parentLabelX=v+O/2,he.parentLabelY=he.height-v-V,he.parentLabelRotation=-90),he.label=Z(he),he.parentLabel=U(he),he})},[B,K,W,Z,S,U,O,A,V,v]),oe=Zt(),ve=Mu(L,I),Ce=Er(q,oe),pe=Er(Y,oe),ye=Er(Q,oe),Se=$.useMemo(function(){return ie.map(function(me){var ge=Rr({},me,{color:ve(me),opacity:N});return ge.borderColor=Ce(ge),ge.labelTextColor=pe(ge),ge.parentLabelTextColor=ye(ge),ge})},[ie,ve,N,Ce,pe,ye]);return{hierarchy:re,nodes:Se,layout:F}},d2e=function(e){var t=e.nodes;return $.useMemo(function(){return{nodes:t}},[t])},V2=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,labelX:e.width/2,labelY:e.height/2,labelRotation:e.labelRotation,labelOpacity:1,parentLabelX:e.parentLabelX,parentLabelY:e.parentLabelY,parentLabelRotation:e.parentLabelRotation,parentLabelOpacity:1}},pp=function(e){return{x:e.x+e.width/2,y:e.y+e.height/2,width:0,height:0,color:e.color,labelX:0,labelY:0,labelRotation:e.labelRotation,labelOpacity:0,parentLabelX:0,parentLabelY:0,parentLabelRotation:e.parentLabelRotation,parentLabelOpacity:0}},f2e=$.memo(function(e){var t=e.nodes,n=e.nodeComponent,r=e.borderWidth,i=e.enableLabel,o=e.labelSkipSize,a=e.enableParentLabel,s=function(f,h){var m=h.isInteractive,g=h.onMouseEnter,v=h.onMouseMove,b=h.onMouseLeave,y=h.onClick,x=h.tooltip,S=ui(),w=S.showTooltipFromEvent,M=S.hideTooltip,E=$.useCallback(function(A,j){w($.createElement(x,{node:A}),j,"left")},[w,x]),H=$.useCallback(function(A,j){E(A,j),g==null||g(A,j)},[g,E]),_=$.useCallback(function(A,j){E(A,j),v==null||v(A,j)},[v,E]),O=$.useCallback(function(A,j){M(),b==null||b(A,j)},[b,M]),k=$.useCallback(function(A,j){y==null||y(A,j)},[y]);return $.useMemo(function(){return f.map(function(A){return m?Rr({},A,{onMouseEnter:function(j){return H(A,j)},onMouseMove:function(j){return _(A,j)},onMouseLeave:function(j){return O(A,j)},onClick:function(j){return k(A,j)}}):A})},[m,f,H,_,O,k])}(t,{isInteractive:e.isInteractive,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,onClick:e.onClick,tooltip:e.tooltip}),l=Dn(),c=l.animate,u=l.config,d=Cr(s,{keys:function(f){return f.path},initial:V2,from:pp,enter:V2,update:V2,leave:pp,config:u,immediate:!c});return p.jsx(p.Fragment,{children:d(function(f,h){return $.createElement(n,{key:h.path,node:h,animatedProps:f,borderWidth:r,enableLabel:i,labelSkipSize:o,enableParentLabel:a})})})}),h2e=["isInteractive","animate","motionConfig","theme","renderWrapper"],g2e=function(e){var t=e.data,n=e.identity,r=n===void 0?Ut.identity:n,i=e.value,o=i===void 0?Ut.value:i,a=e.valueFormat,s=e.tile,l=s===void 0?Ut.tile:s,c=e.nodeComponent,u=c===void 0?Ut.nodeComponent:c,d=e.innerPadding,f=d===void 0?Ut.innerPadding:d,h=e.outerPadding,m=h===void 0?Ut.outerPadding:h,g=e.leavesOnly,v=g===void 0?Ut.leavesOnly:g,b=e.width,y=e.height,x=e.margin,S=e.layers,w=S===void 0?Ut.layers:S,M=e.colors,E=M===void 0?Ut.colors:M,H=e.colorBy,_=H===void 0?Ut.colorBy:H,O=e.nodeOpacity,k=O===void 0?Ut.nodeOpacity:O,A=e.borderWidth,j=A===void 0?Ut.borderWidth:A,V=e.borderColor,T=V===void 0?Ut.borderColor:V,L=e.defs,R=L===void 0?Ut.defs:L,I=e.fill,P=I===void 0?Ut.fill:I,N=e.enableLabel,z=N===void 0?Ut.enableLabel:N,q=e.label,G=q===void 0?Ut.label:q,Y=e.labelTextColor,ee=Y===void 0?Ut.labelTextColor:Y,Q=e.orientLabel,K=Q===void 0?Ut.orientLabel:Q,J=e.labelSkipSize,W=J===void 0?Ut.labelSkipSize:J,Z=e.enableParentLabel,U=Z===void 0?Ut.enableParentLabel:Z,F=e.parentLabel,re=F===void 0?Ut.parentLabel:F,B=e.parentLabelSize,ie=B===void 0?Ut.parentLabelSize:B,oe=e.parentLabelPosition,ve=oe===void 0?Ut.parentLabelPosition:oe,Ce=e.parentLabelPadding,pe=Ce===void 0?Ut.parentLabelPadding:Ce,ye=e.parentLabelTextColor,Se=ye===void 0?Ut.parentLabelTextColor:ye,me=e.isInteractive,ge=me===void 0?Ut.isInteractive:me,ce=e.onMouseEnter,$e=e.onMouseMove,he=e.onMouseLeave,Ae=e.onClick,Ie=e.tooltip,Re=Ie===void 0?Ut.tooltip:Ie,ke=e.role,Ye=e.ariaLabel,Xe=e.ariaLabelledBy,Fe=e.ariaDescribedBy,je=Za(b,y,x),Qe=je.margin,Ze=je.innerWidth,qe=je.innerHeight,de=je.outerWidth,He=je.outerHeight,Ke=u2e({data:t,identity:r,value:o,valueFormat:a,leavesOnly:v,width:Ze,height:qe,tile:l,innerPadding:f,outerPadding:m,colors:E,colorBy:_,nodeOpacity:k,borderColor:T,label:G,labelTextColor:ee,orientLabel:K,enableParentLabel:U,parentLabel:re,parentLabelSize:ie,parentLabelPosition:ve,parentLabelPadding:pe,parentLabelTextColor:Se}).nodes,nt={nodes:null};w.includes("nodes")&&(nt.nodes=p.jsx(f2e,{nodes:Ke,nodeComponent:u,borderWidth:j,enableLabel:z,labelSkipSize:W,enableParentLabel:U,isInteractive:ge,onMouseEnter:ce,onMouseMove:$e,onMouseLeave:he,onClick:Ae,tooltip:Re},"nodes"));var Ne=d2e({nodes:Ke}),ze=$7(R,Ke,P);return p.jsx(wl,{width:de,height:He,margin:Qe,defs:ze,role:ke,ariaLabel:Ye,ariaLabelledBy:Xe,ariaDescribedBy:Fe,children:w.map(function(De,Je){var tt;return typeof De=="function"?p.jsx($.Fragment,{children:$.createElement(De,Ne)},Je):(tt=nt==null?void 0:nt[De])!=null?tt:null})})},v2e=function(e){var t=e.isInteractive,n=t===void 0?Ut.isInteractive:t,r=e.animate,i=r===void 0?Ut.animate:r,o=e.motionConfig,a=o===void 0?Ut.motionConfig:o,s=e.theme,l=e.renderWrapper,c=e2e(e,h2e);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(g2e,Rr({isInteractive:n},c))})},m2e=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(v2e,Rr({width:n,height:r},e))}})};function p2e(e,t){if(e.startsWith("rgba"))return e.replace(/rgba?\((\d+), (\d+), (\d+),? ([\d.]+)?\)/,(n,r,i,o,a)=>`rgba(${r}, ${i}, ${o}, ${t})`);if(e.startsWith("rgb"))return e.replace(/rgb\((\d+), (\d+), (\d+)\)/,(n,r,i,o)=>`rgba(${r}, ${i}, ${o}, ${t})`);if(e.startsWith("hsl"))return e.replace(/hsl\((\d+), (\d+)%?, (\d+)%?\)/,(n,r,i,o)=>`hsla(${r}, ${i}%, ${o}%, ${t})`);if(e.startsWith("hsla"))return e.replace(/hsla?\((\d+), (\d+)%?, (\d+)%?,? ([\d.]+)?\)/,(n,r,i,o,a)=>`hsla(${r}, ${i}%, ${o}%, ${t})`);if(e.startsWith("#")){const n=b2e(e);return`rgba(${n.r}, ${n.g}, ${n.b}, ${t})`}throw new Error("Unsupported color format")}function b2e(e){const t=e.startsWith("#")?e.slice(1):e,n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return{r:n,g:r,b:i}}const y2e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},C2e=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;y2e(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},x2e=({treeMapData:e,style:t={},colors:n={scheme:"nivo"},identity:r="name",value:i="loc",margin:o={},nodeOpacity:a=.67,labelTextColor:s="black",borderColor:l="white",labelTitle:c="name",labelTitleSize:u=16,labelText:d="name",labelTextSize:f=12,labelPadding:h=10,labelGap:m=10,labelLineHeight:g=14,tooltip:v=null})=>{const b=$.useRef(null),[y,x]=$.useState({width:0,height:0});$.useEffect(()=>{if(!(b!=null&&b.current))return;const M=()=>{const H=b.current.getBoundingClientRect();x({width:H.width,height:H.height})},E=new ResizeObserver(M);return E.observe(b==null?void 0:b.current),M(),()=>{E.disconnect()}},[]);const S=({node:M})=>{var L,R;const E=$.useRef(null),H=$.useRef(null),[_,O]=$.useState(!1),[k,A]=$.useState(!1),j=()=>{if(!(E!=null&&E.current)||!(H!=null&&H.current))return;const I=E.current.getBoundingClientRect(),P=H.current.getBoundingClientRect(),N=Math.max([P,I]);O(I.height>M.height-h*2||I.width>M.width-h*2),A(P.height+I.height+g>M.height-h*2||N>M.width-h*2)};$.useEffect(()=>{j()},[]);const V=((L=M==null?void 0:M.data)==null?void 0:L[d])||"Text",T=C2e(V,M.width-h*2,f);return M.isParent?p.jsx(p.Fragment,{}):p.jsxs("g",{transform:`translate(${M.x}, ${M.y})`,children:[p.jsx("rect",{width:M.width,height:M.height,style:{fill:p2e(M.color,a),stroke:l,strokeWidth:1}}),!_&&p.jsx("text",{ref:E,dominantBaseline:"hanging",x:h,y:h,style:{fill:s,font:"var(--gf-label-lg-default)",fontWeight:"bold",fontSize:u},children:((R=M==null?void 0:M.data)==null?void 0:R[c])||"Title"}),!_&&!k&&p.jsx("text",{ref:H,dominantBaseline:"hanging",children:T.map((I,P)=>p.jsx("tspan",{x:h,y:h+u+m+g*P,style:{fill:s,font:"var(--gf-label-lg-default)",fontSize:f},children:I},P))})]})},w=({nodes:M})=>M.map(E=>p.jsx(S,{node:E},E.id));return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{gap:16,vertical:!0,children:[p.jsx("div",{ref:b,style:{width:"100%",height:600,...t},children:p.jsx(m2e,{data:e,colors:n,identity:r,value:i,margin:{top:10,right:10,bottom:10,left:10,...o},enableParentLabel:!1,enableLabel:!1,nodeOpacity:0,borderWidth:0,tooltip:({node:M})=>p.jsx(Un,{body:(v==null?void 0:v({node:M}))||p.jsx("span",{children:"Treemap tooltip"})}),layers:[w,"nodes"]})}),p.jsx("p",{style:{padding:"0 10px",fontFamily:"Roboto, sans-serif",fontSize:14,lineHeight:"22px",color:"#475467"},children:"In de grafiek hierboven zijn alle afvalstromen uitgesplitst per EURAL-code, een zescijferige code uit de Europese Afvallijst (EWL) die in heel Europa wordt gebruikt om afval te classificeren. De code geeft de bron van het afval aan, het proces of de activiteit waaruit het afkomstig is en het specifieke type afval, zoals bouw- of huishoudelijk afval. Een asterisk (*) achter de code betekent dat het afval gevaarlijk is."})]})]})};var w2e=bu,S2e=0;function $2e(e){var t=++S2e;return w2e(e)+t}var M2e=$2e;const _2e=xn(M2e);function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hr.apply(this,arguments)}var j7=$.memo(function(e){var t=e.point;return p.jsx(Is,{id:p.jsxs("span",{children:["x: ",p.jsx("strong",{children:t.data.xFormatted}),", y:"," ",p.jsx("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),VM=$.memo(function(e){var t=e.slice,n=e.axis,r=Zt(),i=n==="x"?"y":"x";return p.jsx(mw,{rows:t.points.map(function(o){return[p.jsx(Q1,{color:o.serieColor,style:r.tooltip.chip},"chip"),o.serieId,p.jsx("span",{style:r.tooltip.tableCellValue,children:o.data[i+"Formatted"]},"value")]})})}),OM={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:j7,enableSlices:!1,debugSlices:!1,sliceTooltip:VM,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},Mo=hr({},OM,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img"});hr({},OM,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var H2e=function(e){var t=e.curve;return $.useMemo(function(){return qc().defined(function(n){return n.x!==null&&n.y!==null}).x(function(n){return n.x}).y(function(n){return n.y}).curve(JS(t))},[t])},E2e=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return $.useMemo(function(){return bS().defined(function(i){return i.x!==null&&i.y!==null}).x(function(i){return i.x}).y1(function(i){return i.y}).curve(JS(t)).y0(n(r))},[t,n,r])},V2e=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,i=e.width,o=e.height;return $.useMemo(function(){if(n===!1)return[];if(n==="x"){var a=new Map;return r.forEach(function(l){l.data.x!==null&&l.data.y!==null&&(a.has(l.x)?a.get(l.x).push(l):a.set(l.x,[l]))}),Array.from(a.entries()).sort(function(l,c){return l[0]-c[0]}).map(function(l,c,u){var d,f,h=l[0],m=l[1],g=u[c-1],v=u[c+1];return d=g?h-(h-g[0])/2:h,f=v?h-d+(v[0]-h)/2:i-d,{id:"slice:"+t+":"+h,x0:d,x:h,y0:0,y:0,width:f,height:o,points:m.reverse()}})}if(n==="y"){var s=new Map;return r.forEach(function(l){l.data.x!==null&&l.data.y!==null&&(s.has(l.y)?s.get(l.y).push(l):s.set(l.y,[l]))}),Array.from(s.entries()).sort(function(l,c){return l[0]-c[0]}).map(function(l,c,u){var d,f,h=l[0],m=l[1],g=u[c-1],v=u[c+1];return d=g?h-(h-g[0])/2:h,f=v?h-d+(v[0]-h)/2:o-d,{id:h,x0:0,x:0,y0:d,y:h,width:i,height:f,points:m.reverse()}})}},[t,n,o,r,i])},O2e="line",RM=function(e){var t=e.data,n=e.xScale,r=n===void 0?Mo.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?Mo.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.colors,d=u===void 0?Mo.colors:u,f=e.curve,h=f===void 0?Mo.curve:f,m=e.areaBaselineValue,g=m===void 0?Mo.areaBaselineValue:m,v=e.pointColor,b=v===void 0?Mo.pointColor:v,y=e.pointBorderColor,x=y===void 0?Mo.pointBorderColor:y,S=e.enableSlices,w=S===void 0?Mo.enableSlicesTooltip:S,M=$.useState(_2e(O2e))[0],E=Io(i),H=Io(s),_=Mu(d,"id"),O=Zt(),k=Er(b,O),A=Er(x,O),j=$.useState([]),V=j[0],T=j[1],L=$.useMemo(function(){return F$(t.filter(function(Q){return V.indexOf(Q.id)===-1}),r,a,l,c)},[t,V,r,a,l,c]),R=L.xScale,I=L.yScale,P=L.series,N=$.useMemo(function(){var Q=t.map(function(J){return{id:J.id,label:J.id,color:_(J)}}),K=Q.map(function(J){return hr({},P.find(function(W){return W.id===J.id}),{color:J.color})}).filter(function(J){return!!J.id});return{legendData:Q.map(function(J){return hr({},J,{hidden:!K.find(function(W){return W.id===J.id})})}).reverse(),series:K}},[t,P,_]),z=N.legendData,q=N.series,G=$.useCallback(function(Q){T(function(K){return K.indexOf(Q)>-1?K.filter(function(J){return J!==Q}):[].concat(K,[Q])})},[]),Y=function(Q){var K=Q.series,J=Q.getPointColor,W=Q.getPointBorderColor,Z=Q.formatX,U=Q.formatY;return $.useMemo(function(){return K.reduce(function(F,re){return[].concat(F,re.data.filter(function(B){return B.position.x!==null&&B.position.y!==null}).map(function(B,ie){var oe={id:re.id+"."+ie,index:F.length+ie,serieId:re.id,serieColor:re.color,x:B.position.x,y:B.position.y};return oe.color=J(re),oe.borderColor=W(oe),oe.data=hr({},B.data,{xFormatted:Z(B.data.x),yFormatted:U(B.data.y)}),oe}))},[])},[K,J,W,Z,U])}({series:q,getPointColor:k,getPointBorderColor:A,formatX:E,formatY:H}),ee=V2e({componentId:M,enableSlices:w,points:Y,width:l,height:c});return{legendData:z,toggleSerie:G,lineGenerator:H2e({curve:h}),areaGenerator:E2e({curve:h,yScale:I,areaBaselineValue:g}),getColor:_,series:q,xScale:R,yScale:I,slices:ee,points:Y}},R2e=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,i=e.fill,o=e.path,a=Dn(),s=a.animate,l=a.config,c=jf(o),u=Qt({color:r,config:l,immediate:!s});return p.jsx(et.path,{d:c,fill:i||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},T2e=$.memo(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,i=e.lines.slice(0).reverse();return p.jsx("g",{children:i.map(function(o){return p.jsx(R2e,hr({path:t(o.data.map(function(a){return a.position}))},hr({areaOpacity:n,areaBlendMode:r},o)),o.id)})})}),k2e=$.memo(function(e){var t=e.lineGenerator,n=e.points,r=e.color,i=e.thickness,o=$.useMemo(function(){return t(n)},[t,n]),a=jf(o);return p.jsx(et.path,{d:a,fill:"none",strokeWidth:i,stroke:r})}),j2e=$.memo(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(i){var o=i.id,a=i.data,s=i.color;return p.jsx(k2e,{id:o,points:a.map(function(l){return l.position}),lineGenerator:n,color:s,thickness:r},o)})}),L2e=$.memo(function(e){var t=e.slice,n=e.slices,r=e.axis,i=e.debug,o=e.tooltip,a=e.isCurrent,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd,g=ui(),v=g.showTooltipFromEvent,b=g.hideTooltip,y=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),s(t),l&&l(t,_)},[v,o,t,r,s,l]),x=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),c&&c(t,_)},[v,o,t,r,c]),S=$.useCallback(function(_){b(),s(null),u&&u(t,_)},[b,s,u,t]),w=$.useCallback(function(_){d&&d(t,_)},[t,d]),M=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),s(t),f&&f(t,_)},[r,f,s,v,t,o]),E=$.useCallback(function(_){var O=_.touches[0],k=document.elementFromPoint(O.clientX,O.clientY),A=k==null?void 0:k.getAttribute("data-ref");if(A){var j=n.find(function(V){return V.id===A});j&&(v($.createElement(o,{slice:j,axis:r}),_,"right"),s(j))}h&&h(t,_)},[r,h,s,v,t,n,o]),H=$.useCallback(function(_){b(),s(null),m&&m(t,_)},[b,s,m,t]);return p.jsx("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:i?1:0,strokeOpacity:.75,fill:"red",fillOpacity:a&&i?.35:0,onMouseEnter:y,onMouseMove:x,onMouseLeave:S,onClick:w,onTouchStart:M,onTouchMove:E,onTouchEnd:H,"data-ref":t.id})}),P2e=$.memo(function(e){var t=e.slices,n=e.axis,r=e.debug,i=e.height,o=e.tooltip,a=e.current,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd;return t.map(function(g){return p.jsx(L2e,{slice:g,slices:t,axis:n,debug:r,height:i,tooltip:o,setCurrent:s,isCurrent:a!==null&&a.id===g.id,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:m},g.id)})}),I2e=$.memo(function(e){var t=e.points,n=e.symbol,r=e.size,i=e.borderWidth,o=e.enableLabel,a=e.label,s=e.labelYOffset,l=Zt(),c=Mie(a),u=t.slice(0).reverse().map(function(d){return{id:d.id,x:d.x,y:d.y,datum:d.data,fill:d.color,stroke:d.borderColor,label:o?c(d):null}});return p.jsx("g",{children:u.map(function(d){return p.jsx(wie,{x:d.x,y:d.y,datum:d.datum,symbol:n,size:r,color:d.fill,borderWidth:i,borderColor:d.stroke,label:d.label,labelYOffset:s,theme:l},d.id)})})}),A2e=$.memo(function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,o=e.setCurrent,a=e.onMouseEnter,s=e.onMouseMove,l=e.onMouseLeave,c=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,h=e.tooltip,m=e.debug,g=e.enableTouchCrosshair,v=ui(),b=v.showTooltipAt,y=v.hideTooltip,x=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),a&&a(O,k)},[b,h,a,i]),S=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),s&&s(O,k)},[b,h,i.left,i.top,s]),w=$.useCallback(function(O,k){y(),l&&l(O,k)},[y,l]),M=$.useCallback(function(O,k){c&&c(O,k)},[c]),E=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),u&&u(O,k)},[i.left,i.top,u,b,h]),H=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),d&&d(O,k)},[i.left,i.top,d,b,h]),_=$.useCallback(function(O,k){y(),f&&f(O,k)},[f,y]);return p.jsx(eM,{nodes:t,width:n,height:r,setCurrent:o,onMouseEnter:x,onMouseMove:S,onMouseLeave:w,onClick:M,onTouchStart:E,onTouchMove:H,onTouchEnd:_,enableTouchCrosshair:g,debug:m})}),N2e=g$(function(e){var t=e.data,n=e.xScale,r=n===void 0?{type:"point"}:n,i=e.xFormat,o=e.yScale,a=o===void 0?{type:"linear",min:0,max:"auto"}:o,s=e.yFormat,l=e.layers,c=l===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:l,u=e.curve,d=u===void 0?"linear":u,f=e.areaBaselineValue,h=f===void 0?0:f,m=e.colors,g=m===void 0?{scheme:"nivo"}:m,v=e.margin,b=e.width,y=e.height,x=e.axisTop,S=e.axisRight,w=e.axisBottom,M=w===void 0?{}:w,E=e.axisLeft,H=E===void 0?{}:E,_=e.enableGridX,O=_===void 0||_,k=e.enableGridY,A=k===void 0||k,j=e.gridXValues,V=e.gridYValues,T=e.lineWidth,L=T===void 0?2:T,R=e.enableArea,I=R!==void 0&&R,P=e.areaOpacity,N=P===void 0?.2:P,z=e.areaBlendMode,q=z===void 0?"normal":z,G=e.enablePoints,Y=G===void 0||G,ee=e.pointSymbol,Q=e.pointSize,K=Q===void 0?6:Q,J=e.pointColor,W=J===void 0?{from:"color"}:J,Z=e.pointBorderWidth,U=Z===void 0?0:Z,F=e.pointBorderColor,re=F===void 0?{theme:"background"}:F,B=e.enablePointLabel,ie=B!==void 0&&B,oe=e.pointLabel,ve=oe===void 0?"data.yFormatted":oe,Ce=e.pointLabelYOffset,pe=e.defs,ye=pe===void 0?[]:pe,Se=e.fill,me=Se===void 0?[]:Se,ge=e.markers,ce=e.legends,$e=ce===void 0?[]:ce,he=e.isInteractive,Ae=he===void 0||he,Ie=e.useMesh,Re=Ie!==void 0&&Ie,ke=e.debugMesh,Ye=ke!==void 0&&ke,Xe=e.onMouseEnter,Fe=e.onMouseMove,je=e.onMouseLeave,Qe=e.onClick,Ze=e.onTouchStart,qe=e.onTouchMove,de=e.onTouchEnd,He=e.tooltip,Ke=He===void 0?j7:He,nt=e.enableSlices,Ne=nt!==void 0&&nt,ze=e.debugSlices,De=ze!==void 0&&ze,Je=e.sliceTooltip,tt=Je===void 0?VM:Je,Be=e.enableCrosshair,Le=Be===void 0||Be,ut=e.crosshairType,pt=ut===void 0?"bottom-left":ut,Ee=e.enableTouchCrosshair,fe=Ee!==void 0&&Ee,we=e.role,Ve=we===void 0?"img":we,Ge=Za(b,y,v),We=Ge.margin,rt=Ge.innerWidth,X=Ge.innerHeight,ae=Ge.outerWidth,se=Ge.outerHeight,Oe=RM({data:t,xScale:r,xFormat:i,yScale:a,yFormat:s,width:rt,height:X,colors:g,curve:d,areaBaselineValue:h,pointColor:W,pointBorderColor:re,enableSlices:Ne}),it=Oe.legendData,at=Oe.toggleSerie,st=Oe.lineGenerator,ft=Oe.areaGenerator,be=Oe.series,xe=Oe.xScale,Te=Oe.yScale,ot=Oe.slices,vt=Oe.points,wt=Zt(),ht=Er(W,wt),Ot=Er(re,wt),rn=$.useState(null),At=rn[0],hn=rn[1],lr=$.useState(null),Ft=lr[0],Tn=lr[1],lt={grid:p.jsx(Y$,{theme:wt,width:rt,height:X,xScale:O?xe:null,yScale:A?Te:null,xValues:j,yValues:V},"grid"),markers:p.jsx(h$,{markers:ge,width:rt,height:X,xScale:xe,yScale:Te,theme:wt},"markers"),axes:p.jsx(G$,{xScale:xe,yScale:Te,width:rt,height:X,theme:wt,top:x,right:S,bottom:M,left:H},"axes"),areas:null,lines:p.jsx(j2e,{lines:be,lineGenerator:st,lineWidth:L},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:$e.map(function(cn,gn){return p.jsx(Pf,hr({},cn,{containerWidth:rt,containerHeight:X,data:cn.data||it,theme:wt,toggleSerie:cn.toggleSerie?at:void 0}),"legend."+gn)})},_n=$7(ye,be,me);return I&&(lt.areas=p.jsx(T2e,{areaGenerator:ft,areaOpacity:N,areaBlendMode:q,lines:be},"areas")),Ae&&Ne!==!1&&(lt.slices=p.jsx(P2e,{slices:ot,axis:Ne,debug:De,height:X,tooltip:tt,current:Ft,setCurrent:Tn,onMouseEnter:Xe,onMouseMove:Fe,onMouseLeave:je,onClick:Qe,onTouchStart:Ze,onTouchMove:qe,onTouchEnd:de},"slices")),Y&&(lt.points=p.jsx(I2e,{points:vt,symbol:ee,size:K,color:ht,borderWidth:U,borderColor:Ot,enableLabel:ie,label:ve,labelYOffset:Ce},"points")),Ae&&Le&&(At!==null&&(lt.crosshair=p.jsx(h5,{width:rt,height:X,x:At.x,y:At.y,type:pt},"crosshair")),Ft!==null&&(lt.crosshair=p.jsx(h5,{width:rt,height:X,x:Ft.x,y:Ft.y,type:Ne},"crosshair"))),Ae&&Re&&Ne===!1&&(lt.mesh=p.jsx(A2e,{points:vt,width:rt,height:X,margin:We,current:At,setCurrent:hn,onMouseEnter:Xe,onMouseMove:Fe,onMouseLeave:je,onClick:Qe,onTouchStart:Ze,onTouchMove:qe,onTouchEnd:de,tooltip:Ke,enableTouchCrosshair:fe,debug:Ye},"mesh")),p.jsx(wl,{defs:_n,width:ae,height:se,margin:We,role:Ve,children:c.map(function(cn,gn){return typeof cn=="function"?p.jsx($.Fragment,{children:cn(hr({},e,{innerWidth:rt,innerHeight:X,series:be,slices:ot,points:vt,xScale:xe,yScale:Te,lineGenerator:st,areaGenerator:ft,currentPoint:At,setCurrentPoint:hn,currentSlice:Ft,setCurrentSlice:Tn}))},gn):lt[cn]})})}),F2e=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(N2e,hr({width:n,height:r},e))}})},D2e=g$(function(e){var t=$.useRef(null),n=e.width,r=e.height,i=e.margin,o=e.pixelRatio,a=o===void 0?typeof window<"u"&&window.devicePixelRatio||1:o,s=e.data,l=e.xScale,c=l===void 0?{type:"point"}:l,u=e.xFormat,d=e.yScale,f=d===void 0?{type:"linear",min:0,max:"auto"}:d,h=e.yFormat,m=e.curve,g=m===void 0?"linear":m,v=e.layers,b=v===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:v,y=e.colors,x=y===void 0?{scheme:"nivo"}:y,S=e.lineWidth,w=S===void 0?2:S,M=e.enableArea,E=M!==void 0&&M,H=e.areaBaselineValue,_=H===void 0?0:H,O=e.areaOpacity,k=O===void 0?.2:O,A=e.enablePoints,j=A===void 0||A,V=e.pointSize,T=V===void 0?6:V,L=e.pointColor,R=L===void 0?{from:"color"}:L,I=e.pointBorderWidth,P=I===void 0?0:I,N=e.pointBorderColor,z=N===void 0?{theme:"background"}:N,q=e.enableGridX,G=q===void 0||q,Y=e.gridXValues,ee=e.enableGridY,Q=ee===void 0||ee,K=e.gridYValues,J=e.axisTop,W=e.axisRight,Z=e.axisBottom,U=Z===void 0?{}:Z,F=e.axisLeft,re=F===void 0?{}:F,B=e.legends,ie=B===void 0?[]:B,oe=e.isInteractive,ve=oe===void 0||oe,Ce=e.debugMesh,pe=Ce!==void 0&&Ce,ye=e.onMouseLeave,Se=e.onClick,me=e.tooltip,ge=me===void 0?j7:me,ce=e.canvasRef,$e=Za(n,r,i),he=$e.margin,Ae=$e.innerWidth,Ie=$e.innerHeight,Re=$e.outerWidth,ke=$e.outerHeight,Ye=Zt(),Xe=$.useState(null),Fe=Xe[0],je=Xe[1],Qe=RM({data:s,xScale:c,xFormat:u,yScale:f,yFormat:h,width:Ae,height:Ie,colors:x,curve:g,areaBaselineValue:_,pointColor:R,pointBorderColor:z}),Ze=Qe.lineGenerator,qe=Qe.areaGenerator,de=Qe.series,He=Qe.xScale,Ke=Qe.yScale,nt=Qe.points,Ne=O7({points:nt,width:Ae,height:Ie,debug:pe}),ze=Ne.delaunay,De=Ne.voronoi;$.useEffect(function(){ce&&(ce.current=t.current),t.current.width=Re*a,t.current.height=ke*a;var fe=t.current.getContext("2d");fe.scale(a,a),fe.fillStyle=Ye.background,fe.fillRect(0,0,Re,ke),fe.translate(he.left,he.top),b.forEach(function(we){if(typeof we=="function"&&we({ctx:fe,innerWidth:Ae,innerHeight:Ie,series:de,points:nt,xScale:He,yScale:Ke,lineWidth:w,lineGenerator:Ze,areaGenerator:qe,currentPoint:Fe,setCurrentPoint:je}),we==="grid"&&Ye.grid.line.strokeWidth>0&&(fe.lineWidth=Ye.grid.line.strokeWidth,fe.strokeStyle=Ye.grid.line.stroke,G&&Cd(fe,{width:Ae,height:Ie,scale:He,axis:"x",values:Y}),Q&&Cd(fe,{width:Ae,height:Ie,scale:Ke,axis:"y",values:K})),we==="axes"&&K$(fe,{xScale:He,yScale:Ke,width:Ae,height:Ie,top:J,right:W,bottom:U,left:re,theme:Ye}),we==="areas"&&E===!0){fe.save(),fe.globalAlpha=k,qe.context(fe);for(var Ve=de.length-1;Ve>=0;Ve--)fe.fillStyle=de[Ve].color,fe.beginPath(),qe(de[Ve].data.map(function(We){return We.position})),fe.fill();fe.restore()}if(we==="lines"&&(Ze.context(fe),de.forEach(function(We){fe.strokeStyle=We.color,fe.lineWidth=w,fe.beginPath(),Ze(We.data.map(function(rt){return rt.position})),fe.stroke()})),we==="points"&&j===!0&&T>0&&nt.forEach(function(We){fe.fillStyle=We.color,fe.beginPath(),fe.arc(We.x,We.y,T/2,0,2*Math.PI),fe.fill(),P>0&&(fe.strokeStyle=We.borderColor,fe.lineWidth=P,fe.stroke())}),we==="mesh"&&pe===!0&&(tM(fe,De),Fe&&nM(fe,De,Fe.index)),we==="legends"){var Ge=de.map(function(We){return{id:We.id,label:We.id,color:We.color}}).reverse();ie.forEach(function(We){x$(fe,hr({},We,{data:We.data||Ge,containerWidth:Ae,containerHeight:Ie,theme:Ye}))})}})},[t,Re,ke,b,Ye,Ze,de,He,Ke,G,Y,Q,K,J,W,U,re,ie,nt,j,T,Fe]);var Je=$.useCallback(function(fe){var we=S7(t.current,fe),Ve=we[0],Ge=we[1];if(!v$(he.left,he.top,Ae,Ie,Ve,Ge))return null;var We=ze.find(Ve-he.left,Ge-he.top);return nt[We]},[t,he,Ae,Ie,ze]),tt=ui(),Be=tt.showTooltipFromEvent,Le=tt.hideTooltip,ut=$.useCallback(function(fe){var we=Je(fe);je(we),we?Be($.createElement(ge,{point:we}),fe):Le()},[Je,je,Be,Le,ge]),pt=$.useCallback(function(fe){Le(),je(null),Fe&&ye&&ye(Fe,fe)},[Le,je,ye]),Ee=$.useCallback(function(fe){if(Se){var we=Je(fe);we&&Se(we,fe)}},[Je,Se]);return p.jsx("canvas",{ref:t,width:Re*a,height:ke*a,style:{width:Re,height:ke,cursor:ve?"auto":"normal"},onMouseEnter:ve?ut:void 0,onMouseMove:ve?ut:void 0,onMouseLeave:ve?pt:void 0,onClick:ve?Ee:void 0})}),z2e=$.forwardRef(function(e,t){return p.jsx(D2e,hr({},e,{canvasRef:t}))});$.forwardRef(function(e,t){return p.jsx(Yo,{children:function(n){var r=n.width,i=n.height;return p.jsx(z2e,hr({width:r,height:i},e,{ref:t}))}})});const B2e=yt.span`
498
+ `,Tle=({pieChartData:e,title:t,isEmpty:n,sortByValue:r=!0,arcLabel:i=null,tooltip:o=null,customStyle:a={},customMargin:s={},height:l=600,legendWidth:c="50%"})=>{const[u,d]=$.useState([]),f=({centerX:m,centerY:g,dataWithArc:v})=>(u.length||d(v),p.jsx("text",{x:m,y:g,textAnchor:"middle",dominantBaseline:"central",style:{fontSize:"16px",font:"var(--gf-label-md-default)",fontWeight:400},children:n?"Data niet openbaar beschikbaar":""})),h=({data:m})=>p.jsx(yt,{gap:16,className:"gf-full",justify:"center",wrap:!0,style:{width:c},children:m==null?void 0:m.map((g,v)=>p.jsxs(yt,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:g.color}}),p.jsx(Rle,{children:g.label})]},`legend-${v}`))});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:8,align:"center",style:{width:"100%"},children:[p.jsx(Ole,{children:t}),p.jsx("div",{style:{width:"100%",height:l},children:p.jsx(Vle,{colors:n?{scheme:"greys"}:{datum:"data.color"},data:e,sortByValue:r,enableArcLabels:!n,arcLabel:m=>(i==null?void 0:i(m))||m.formattedValue,enableArcLinkLabels:!1,margin:{top:50,right:80,bottom:50,left:80,...s},innerRadius:.5,padAngle:.7,cornerRadius:3,activeOuterRadiusOffset:8,borderWidth:1,borderColor:{from:"color",modifiers:[["darker",.2]]},arcLabelsSkipAngle:10,arcLabelsTextColor:{from:"color",modifiers:[["darker",2]]},isInteractive:!n,layers:["arcs","arcLabels","arcLinkLabels","legends",f],tooltip:m=>p.jsx(Un,{body:(o==null?void 0:o(m))||p.jsx("span",{children:"Pie chart tooltip"})})})}),!n&&p.jsx(h,{data:u})]})]})};var kle=uf,jle=C7,Lle=1,Ple=2;function Ile(e,t,n,r){var i=n.length,o=i,a=!r;if(e==null)return!o;for(e=Object(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=n[i];var l=s[0],c=e[l],u=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new kle;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?jle(u,c,Lle|Ple,r,d):f))return!1}}return!0}var Ale=Ile,Nle=_i;function Fle(e){return e===e&&!Nle(e)}var L$=Fle,Dle=L$,zle=$u;function Ble(e){for(var t=zle(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Dle(i)]}return t}var Wle=Ble;function Zle(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var P$=Zle,Ule=Ale,qle=Wle,Gle=P$;function Yle(e){var t=qle(e);return t.length==1&&t[0][2]?Gle(t[0][0],t[0][1]):function(n){return n===e||Ule(n,e,t)}}var Kle=Yle,Xle=C7,Qle=Nw,Jle=AS,ece=N4,tce=L$,nce=P$,rce=cl,ice=1,oce=2;function ace(e,t){return ece(e)&&tce(t)?nce(rce(e),t):function(n){var r=Qle(n,e);return r===void 0&&r===t?Jle(n,e):Xle(t,r,ice|oce)}}var sce=ace;function lce(e){return function(t){return t==null?void 0:t[e]}}var cce=lce,uce=yu;function dce(e){return function(t){return uce(t,e)}}var fce=dce,hce=cce,gce=fce,vce=N4,mce=cl;function pce(e){return vce(e)?hce(mce(e)):gce(e)}var bce=pce,yce=Kle,Cce=sce,xce=vf,wce=xr,Sce=bce;function $ce(e){return typeof e=="function"?e:e==null?xce:typeof e=="object"?wce(e)?Cce(e[0],e[1]):yce(e):Sce(e)}var _7=$ce,Mce=_7,_ce=Rx;function Hce(e,t){return e&&e.length?_ce(e,Mce(t)):[]}var Ece=Hce;const L5=xn(Ece);var Vce=xw,Oce=$u;function Rce(e,t){return e&&Vce(e,t,Oce)}var Tce=Rce,kce=ol;function jce(e,t){return function(n,r){if(n==null)return n;if(!kce(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++o<i)&&r(a[o],o,a)!==!1;);return n}}var Lce=jce,Pce=Tce,Ice=Lce,Ace=Ice(Pce),I$=Ace,Nce=I$,Fce=ol;function Dce(e,t){var n=-1,r=Fce(e)?Array(e.length):[];return Nce(e,function(i,o,a){r[++n]=t(i,o,a)}),r}var zce=Dce;function Bce(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var Wce=Bce,Xm=mf;function Zce(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,o=Xm(e),a=t!==void 0,s=t===null,l=t===t,c=Xm(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!l)return-1}return 0}var Uce=Zce,qce=Uce;function Gce(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;++r<a;){var l=qce(i[r],o[r]);if(l){if(r>=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var Yce=Gce,S2=pf,Kce=yu,Xce=_7,Qce=zce,Jce=Wce,eue=al,tue=Yce,nue=vf,rue=xr;function iue(e,t,n){t.length?t=S2(t,function(o){return rue(o)?function(a){return Kce(a,o.length===1?o[0]:o)}:o}):t=[nue];var r=-1;t=S2(t,eue(Xce));var i=Qce(e,function(o,a,s){var l=S2(t,function(c){return c(o)});return{criteria:l,index:++r,value:o}});return Jce(i,function(o,a){return tue(o,a,n)})}var oue=iue,aue=FS,sue=oue,lue=I4,Qm=Pw,cue=lue(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Qm(e,t[0],t[1])?t=[]:n>2&&Qm(t[0],t[1],t[2])&&(t=[t[0]]),sue(e,aue(t,1),[])}),uue=cue;const due=xn(uue);var fue=yo,hue=Gr,gue="[object Date]";function vue(e){return hue(e)&&fue(e)==gue}var mue=vue,pue=mue,bue=al,Jm=hf,ep=Jm&&Jm.isDate,yue=ep?bue(ep):pue,Cue=yue;const xue=xn(Cue);var $2=new Date,M2=new Date;function Mn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Mn(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},n&&(i.count=function(o,a){return $2.setTime(+o),M2.setTime(+a),e($2),e(M2),Math.floor(n($2,M2))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?function(a){return r(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var po=Mn(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});po.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mn(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):po};po.range;var bd=1e3,Zs=6e4,yd=36e5,A$=6048e5,Ma=Mn(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*bd)},function(e,t){return(t-e)/bd},function(e){return e.getUTCSeconds()});Ma.range;var If=Mn(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*bd)},function(e,t){e.setTime(+e+t*Zs)},function(e,t){return(t-e)/Zs},function(e){return e.getMinutes()});If.range;var Af=Mn(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*bd-e.getMinutes()*Zs)},function(e,t){e.setTime(+e+t*yd)},function(e,t){return(t-e)/yd},function(e){return e.getHours()});Af.range;function qa(e){return Mn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Zs)/A$})}var _a=qa(0),Nf=qa(1),Ff=qa(2),Df=qa(3),zf=qa(4),Bf=qa(5),Wf=qa(6);_a.range;Nf.range;Ff.range;Df.range;zf.range;Bf.range;Wf.range;var Zf=Mn(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});Zf.range;var _u=Mn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});_u.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Mn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};_u.range;var Uf=Mn(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Zs)},function(e,t){return(t-e)/Zs},function(e){return e.getUTCMinutes()});Uf.range;var qf=Mn(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*yd)},function(e,t){return(t-e)/yd},function(e){return e.getUTCHours()});qf.range;function Ga(e){return Mn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/A$})}var Ha=Ga(0),Gf=Ga(1),Yf=Ga(2),Kf=Ga(3),Xf=Ga(4),Qf=Ga(5),Jf=Ga(6);Ha.range;Gf.range;Yf.range;Kf.range;Xf.range;Qf.range;Jf.range;var e0=Mn(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});e0.range;var Hu=Mn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Hu.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Mn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};Hu.range;function ia(){return ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ia.apply(this,arguments)}var us=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],wue={millisecond:[],second:us.slice(0,1),minute:us.slice(0,2),hour:us.slice(0,3),day:us.slice(0,4),month:us.slice(0,5),year:us.slice(0,6)},Sue=function(e){return function(t){return wue[e].forEach(function(n){n(t)}),t}},N$=function(e){var t=e.format,n=t===void 0?"native":t,r=e.precision,i=r===void 0?"millisecond":r,o=e.useUTC,a=o===void 0||o,s=Sue(i);return function(l){if(l===void 0)return l;if(n==="native"||l instanceof Date)return s(l);var c=a?p7(n):m7(n);return s(c(l))}},$ue=function(e,t,n,r){var i,o,a,s,l=e.min,c=l===void 0?0:l,u=e.max,d=u===void 0?"auto":u,f=e.stacked,h=f!==void 0&&f,m=e.reverse,g=m!==void 0&&m,v=e.clamp,b=v!==void 0&&v,y=e.nice,x=y!==void 0&&y;c==="auto"?i=h===!0?(o=t.minStacked)!=null?o:0:t.min:i=c,d==="auto"?a=h===!0?(s=t.maxStacked)!=null?s:0:t.max:a=d;var S=Go().rangeRound(r==="x"?[0,n]:[n,0]).domain(g?[a,i]:[i,a]).clamp(b);return x===!0?S.nice():typeof x=="number"&&S.nice(x),Mue(S,h)},Mue=function(e,t){t===void 0&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},_ue=function(e,t,n){var r=Kw().range([0,n]).domain(t.all);return r.type="point",r},Hue=function(e,t,n,r){var i=e.round,o=i===void 0||i,a=Ns().range(r==="x"?[0,n]:[n,0]).domain(t.all).round(o);return Eue(a)},Eue=function(e){var t=e;return t.type="band",t},Vue=function(e,t,n){var r,i,o=e.format,a=o===void 0?"native":o,s=e.precision,l=s===void 0?"millisecond":s,c=e.min,u=c===void 0?"auto":c,d=e.max,f=d===void 0?"auto":d,h=e.useUTC,m=h===void 0||h,g=e.nice,v=g!==void 0&&g,b=N$({format:a,precision:l,useUTC:m});r=u==="auto"?b(t.min):a!=="native"?b(u):u,i=f==="auto"?b(t.max):a!=="native"?b(f):f;var y=m?dS():uS();y.range([0,n]),r&&i&&y.domain([r,i]),v===!0?y.nice():typeof v!="object"&&typeof v!="number"||y.nice(v);var x=y;return x.type="time",x.useUTC=m,x},Oue=function(e,t,n,r){var i,o=e.base,a=o===void 0?10:o,s=e.min,l=s===void 0?"auto":s,c=e.max,u=c===void 0?"auto":c;if(t.all.some(function(g){return g===0}))throw new Error("a log scale domain must not include or cross zero");var d,f,h=!1;if(t.all.filter(function(g){return g!=null}).forEach(function(g){h||(i===void 0?i=Math.sign(g):Math.sign(g)!==i&&(h=!0))}),h)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d=l==="auto"?t.min:l,f=u==="auto"?t.max:u;var m=K4().domain([d,f]).rangeRound(r==="x"?[0,n]:[n,0]).base(a).nice();return m.type="log",m},Rue=function(e,t,n,r){var i,o,a=e.constant,s=a===void 0?1:a,l=e.min,c=l===void 0?"auto":l,u=e.max,d=u===void 0?"auto":u,f=e.reverse,h=f!==void 0&&f;i=c==="auto"?t.min:c,o=d==="auto"?t.max:d;var m=X4().constant(s).rangeRound(r==="x"?[0,n]:[n,0]).nice();h===!0?m.domain([o,i]):m.domain([i,o]);var g=m;return g.type="symlog",g},Tue=function(e){return e==="x"?"y":"x"},kue=function(e,t){return e===t},jue=function(e,t){return e.getTime()===t.getTime()};function tp(e,t,n,r){switch(e.type){case"linear":return $ue(e,t,n,r);case"point":return _ue(e,t,n);case"band":return Hue(e,t,n,r);case"time":return Vue(e,t,n);case"log":return Oue(e,t,n,r);case"symlog":return Rue(e,t,n,r);default:throw new Error("invalid scale spec")}}var np=function(e,t,n){var r;if("stacked"in n&&n.stacked){var i=e.data[t==="x"?"xStacked":"yStacked"];return i==null?null:n(i)}return(r=n(e.data[t]))!=null?r:null},F$=function(e,t,n,r,i){var o=e.map(function(u){return function(d){return ia({},d,{data:d.data.map(function(f){return{data:ia({},f)}})})}(u)}),a=Lue(o,t,n);"stacked"in t&&t.stacked===!0&&Pue(a,o),"stacked"in n&&n.stacked===!0&&Iue(a,o);var s=tp(t,a.x,r,"x"),l=tp(n,a.y,i,"y"),c=o.map(function(u){return ia({},u,{data:u.data.map(function(d){return ia({},d,{position:{x:np(d,"x",s),y:np(d,"y",l)}})})})});return ia({},a,{series:c,xScale:s,yScale:l})},Lue=function(e,t,n){return{x:rp(e,"x",t),y:rp(e,"y",n)}},rp=function(e,t,n,r){var i={},o=i.getValue,a=o===void 0?function(m){return m.data[t]}:o,s=i.setValue,l=s===void 0?function(m,g){m.data[t]=g}:s;if(n.type==="linear")e.forEach(function(m){m.data.forEach(function(g){var v=a(g);v&&l(g,parseFloat(String(v)))})});else if(n.type==="time"&&n.format!=="native"){var c=N$(n);e.forEach(function(m){m.data.forEach(function(g){var v=a(g);v&&l(g,c(v))})})}var u=[];switch(e.forEach(function(m){m.data.forEach(function(g){u.push(a(g))})}),n.type){case"linear":var d=due(X3(u).filter(function(m){return m!==null}),function(m){return m});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=L5(u,function(m){return m.getTime()}).slice(0).sort(function(m,g){return g.getTime()-m.getTime()}).reverse();return{all:f,min:f[0],max:ue(f)};default:var h=X3(u);return{all:h,min:h[0],max:ue(h)}}},D$=function(e,t,n){var r=Tue(e),i=[];t[r].all.forEach(function(o){var a=xue(o)?jue:kue,s=[];n.forEach(function(l){var c=l.data.find(function(h){return a(h.data[r],o)}),u=null,d=null;if(c!==void 0){if((u=c.data[e])!==null){var f=ue(s);f===void 0?d=u:f!==null&&(d=f+u)}c.data[e==="x"?"xStacked":"yStacked"]=d}s.push(d),d!==null&&i.push(d)})}),t[e].minStacked=Math.min.apply(Math,i),t[e].maxStacked=Math.max.apply(Math,i)},Pue=function(e,t){return D$("x",e,t)},Iue=function(e,t){return D$("y",e,t)},z$=function(e){var t=e.bandwidth();if(t===0)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(r){var i;return((i=e(r))!=null?i:0)+n}},B$={millisecond:[po,po],second:[Ma,Ma],minute:[If,Uf],hour:[Af,qf],day:[Mn(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),Mn(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[_a,Ha],sunday:[_a,Ha],monday:[Nf,Gf],tuesday:[Ff,Yf],wednesday:[Df,Kf],thursday:[zf,Xf],friday:[Bf,Qf],saturday:[Wf,Jf],month:[Zf,e0],year:[_u,Hu]},Aue=Object.keys(B$),Nue=new RegExp("^every\\s*(\\d+)?\\s*("+Aue.join("|")+")s?$","i"),W$=function(e,t){if(Array.isArray(t))return t;if(typeof t=="string"&&"useUTC"in e){var n=t.match(Nue);if(n){var r=n[1],i=n[2],o=B$[i][e.useUTC?1:0];if(i==="day"){var a,s,l=e.domain(),c=l[0],u=l[1],d=new Date(u);return d.setDate(d.getDate()+1),(a=(s=o.every(Number(r??1)))==null?void 0:s.range(c,d))!=null?a:[]}if(r===void 0)return e.ticks(o);var f=o.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(t===void 0)return e.ticks();if(typeof(h=t)=="number"&&isFinite(h)&&Math.floor(h)===h)return e.ticks(t)}var h;return e.domain()};function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}var Z$=function(e){var t,n=e.axis,r=e.scale,i=e.ticksPosition,o=e.tickValues,a=e.tickSize,s=e.tickPadding,l=e.tickRotation,c=e.truncateTickAt,u=e.engine,d=u===void 0?"svg":u,f=W$(r,o),h=bie[d],m="bandwidth"in r?z$(r):r,g={lineX:0,lineY:0},v={textX:0,textY:0},b=typeof document=="object"&&document.dir==="rtl",y=h.align.center,x=h.baseline.center;return n==="x"?(t=function(S){var w;return{x:(w=m(S))!=null?w:0,y:0}},g.lineY=a*(i==="after"?1:-1),v.textY=(a+s)*(i==="after"?1:-1),x=i==="after"?h.baseline.top:h.baseline.bottom,l===0?y=h.align.center:i==="after"&&l<0||i==="before"&&l>0?(y=h.align[b?"left":"right"],x=h.baseline.center):(i==="after"&&l>0||i==="before"&&l<0)&&(y=h.align[b?"right":"left"],x=h.baseline.center)):(t=function(S){var w;return{x:0,y:(w=m(S))!=null?w:0}},g.lineX=a*(i==="after"?1:-1),v.textX=(a+s)*(i==="after"?1:-1),y=i==="after"?h.align.left:h.align.right),{ticks:f.map(function(S){var w=typeof S=="string"?function(M){var E=String(M).length;return c&&c>0&&E>c?""+String(M).slice(0,c).concat("..."):""+M}(S):S;return zr({key:S instanceof Date?""+S.valueOf():""+S,value:w},t(S),g,v)}),textAlign:y,textBaseline:x}},U$=function(e,t){if(e===void 0||typeof e=="function")return e;if(t.type==="time"){var n=Wa(e);return function(r){return n(r instanceof Date?r:new Date(r))}}return Da(e)},P5=function(e){var t,n=e.width,r=e.height,i=e.scale,o=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||W$(i,a)),l="bandwidth"in i?z$(i):i,c=o==="x"?s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:(d=l(u))!=null?d:0,x2:(f=l(u))!=null?f:0,y1:0,y2:r}}):s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:0,x2:n,y1:(d=l(u))!=null?d:0,y2:(f=l(u))!=null?f:0}});return c},Fue=$.memo(function(e){var t,n=e.value,r=e.format,i=e.lineX,o=e.lineY,a=e.onClick,s=e.textBaseline,l=e.textAnchor,c=e.animatedProps,u=Zt(),d=u.axis.ticks.line,f=u.axis.ticks.text,h=(t=r==null?void 0:r(n))!=null?t:n,m=$.useMemo(function(){var g={opacity:c.opacity};return a?{style:zr({},g,{cursor:"pointer"}),onClick:function(v){return a(v,h)}}:{style:g}},[c.opacity,a,h]);return p.jsxs(et.g,zr({transform:c.transform},m,{children:[p.jsx("line",{x1:0,x2:i,y1:0,y2:o,style:d}),f.outlineWidth>0&&p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+h}),p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:w7(f),children:""+h})]}))}),Due=function(e){var t=e.axis,n=e.scale,r=e.x,i=r===void 0?0:r,o=e.y,a=o===void 0?0:o,s=e.length,l=e.ticksPosition,c=e.tickValues,u=e.tickSize,d=u===void 0?5:u,f=e.tickPadding,h=f===void 0?5:f,m=e.tickRotation,g=m===void 0?0:m,v=e.format,b=e.renderTick,y=b===void 0?Fue:b,x=e.truncateTickAt,S=e.legend,w=e.legendPosition,M=w===void 0?"end":w,E=e.legendOffset,H=E===void 0?0:E,_=e.onClick,O=e.ariaHidden,k=Zt(),A=k.axis.legend.text,j=$.useMemo(function(){return U$(v,n)},[v,n]),V=Z$({axis:t,scale:n,ticksPosition:l,tickValues:c,tickSize:d,tickPadding:h,tickRotation:g,truncateTickAt:x}),T=V.ticks,L=V.textAlign,R=V.textBaseline,I=null;if(S!==void 0){var P,N=0,z=0,q=0;t==="y"?(q=-90,N=H,M==="start"?(P="start",z=s):M==="middle"?(P="middle",z=s/2):M==="end"&&(P="end")):(z=H,M==="start"?P="start":M==="middle"?(P="middle",N=s/2):M==="end"&&(P="end",N=s)),I=p.jsxs(p.Fragment,{children:[A.outlineWidth>0&&p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:zr({dominantBaseline:"central"},A),strokeWidth:2*A.outlineWidth,stroke:A.outlineColor,strokeLinejoin:"round",children:S}),p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:zr({dominantBaseline:"central"},A),children:S})]})}var G=Dn(),Y=G.animate,ee=G.config,Q=Qt({transform:"translate("+i+","+a+")",lineX2:t==="x"?s:0,lineY2:t==="x"?0:s,config:ee,immediate:!Y}),K=$.useCallback(function(Z){return{opacity:1,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),J=$.useCallback(function(Z){return{opacity:0,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),W=Cr(T,{keys:function(Z){return Z.key},initial:K,from:J,enter:K,update:K,leave:{opacity:0},config:ee,immediate:!Y});return p.jsxs(et.g,{transform:Q.transform,"aria-hidden":O,children:[W(function(Z,U,F,re){return C.createElement(y,zr({tickIndex:re,format:j,rotate:g,textBaseline:R,textAnchor:L,truncateTickAt:x,animatedProps:Z},U,_?{onClick:_}:{}))}),p.jsx(et.line,{style:k.axis.domain.line,x1:0,x2:Q.lineX2,y1:0,y2:Q.lineY2}),I]})},zue=$.memo(Due),q$=["top","right","bottom","left"],G$=$.memo(function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,o={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return p.jsx(p.Fragment,{children:q$.map(function(a){var s=o[a];if(!s)return null;var l=a==="top"||a==="bottom";return p.jsx(zue,zr({},s,{axis:l?"x":"y",x:a==="right"?r:0,y:a==="bottom"?i:0,scale:l?t:n,length:l?r:i,ticksPosition:a==="top"||a==="left"?"before":"after",truncateTickAt:s.truncateTickAt}),a)})})}),Bue=$.memo(function(e){var t=e.animatedProps,n=Zt();return p.jsx(et.line,zr({},t,n.grid.line))}),ip=$.memo(function(e){var t=e.lines,n=Dn(),r=n.animate,i=n.config,o=Cr(t,{keys:function(a){return a.key},initial:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},from:function(a){return{opacity:0,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},enter:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},update:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},leave:{opacity:0},config:i,immediate:!r});return p.jsx("g",{children:o(function(a,s){return $.createElement(Bue,zr({},s,{key:s.key,animatedProps:a}))})})}),Y$=$.memo(function(e){var t=e.width,n=e.height,r=e.xScale,i=e.yScale,o=e.xValues,a=e.yValues,s=$.useMemo(function(){return!!r&&P5({width:t,height:n,scale:r,axis:"x",values:o})},[r,o,t,n]),l=$.useMemo(function(){return!!i&&P5({width:t,height:n,scale:i,axis:"y",values:a})},[n,t,i,a]);return p.jsxs(p.Fragment,{children:[s&&p.jsx(ip,{lines:s}),l&&p.jsx(ip,{lines:l})]})}),Wue=function(e,t){var n,r=t.axis,i=t.scale,o=t.x,a=o===void 0?0:o,s=t.y,l=s===void 0?0:s,c=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,h=f===void 0?5:f,m=t.tickPadding,g=m===void 0?5:m,v=t.tickRotation,b=v===void 0?0:v,y=t.format,x=t.legend,S=t.legendPosition,w=S===void 0?"end":S,M=t.legendOffset,E=M===void 0?0:M,H=t.theme,_=Z$({axis:r,scale:i,ticksPosition:u,tickValues:d,tickSize:h,tickPadding:g,tickRotation:b,engine:"canvas"}),O=_.ticks,k=_.textAlign,A=_.textBaseline;e.save(),e.translate(a,l),e.textAlign=k,e.textBaseline=A;var j=H.axis.ticks.text;e.font=(j.fontWeight?j.fontWeight+" ":"")+j.fontSize+"px "+j.fontFamily,((n=H.axis.domain.line.strokeWidth)!=null?n:0)>0&&(e.lineWidth=Number(H.axis.domain.line.strokeWidth),e.lineCap="square",H.axis.domain.line.stroke&&(e.strokeStyle=H.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo(r==="x"?c:0,r==="x"?0:c),e.stroke());var V=typeof y=="function"?y:function(P){return""+P};if(O.forEach(function(P){var N;((N=H.axis.ticks.line.strokeWidth)!=null?N:0)>0&&(e.lineWidth=Number(H.axis.ticks.line.strokeWidth),e.lineCap="square",H.axis.ticks.line.stroke&&(e.strokeStyle=H.axis.ticks.line.stroke),e.beginPath(),e.moveTo(P.x,P.y),e.lineTo(P.x+P.lineX,P.y+P.lineY),e.stroke());var z=V(P.value);e.save(),e.translate(P.x+P.textX,P.y+P.textY),e.rotate(Dr(b)),j.outlineWidth>0&&(e.strokeStyle=j.outlineColor,e.lineWidth=2*j.outlineWidth,e.lineJoin="round",e.strokeText(""+z,0,0)),H.axis.ticks.text.fill&&(e.fillStyle=j.fill),e.fillText(""+z,0,0),e.restore()}),x!==void 0){var T=0,L=0,R=0,I="center";r==="y"?(R=-90,T=E,w==="start"?(I="start",L=c):w==="middle"?(I="center",L=c/2):w==="end"&&(I="end")):(L=E,w==="start"?I="start":w==="middle"?(I="center",T=c/2):w==="end"&&(I="end",T=c)),e.translate(T,L),e.rotate(Dr(R)),e.font=(H.axis.legend.text.fontWeight?H.axis.legend.text.fontWeight+" ":"")+H.axis.legend.text.fontSize+"px "+H.axis.legend.text.fontFamily,H.axis.legend.text.fill&&(e.fillStyle=H.axis.legend.text.fill),e.textAlign=I,e.textBaseline="middle",e.fillText(x,0,0)}e.restore()},K$=function(e,t){var n=t.xScale,r=t.yScale,i=t.width,o=t.height,a=t.top,s=t.right,l=t.bottom,c=t.left,u=t.theme,d={top:a,right:s,bottom:l,left:c};q$.forEach(function(f){var h=d[f];if(!h)return null;var m=f==="top"||f==="bottom",g=f==="top"||f==="left"?"before":"after",v=m?n:r,b=U$(h.format,v);Wue(e,zr({},h,{axis:m?"x":"y",x:f==="right"?i:0,y:f==="bottom"?o:0,scale:v,format:b,length:m?i:o,ticksPosition:g,theme:u}))})},Cd=function(e,t){var n=t.width,r=t.height,i=t.scale,o=t.axis,a=t.values;P5({width:n,height:r,scale:i,axis:o,values:a}).forEach(function(s){e.beginPath(),e.moveTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.stroke()})},Zue=I$;function Uue(e,t){var n=[];return Zue(e,function(r,i,o){t(r,i,o)&&n.push(r)}),n}var que=Uue,Gue=ZS,Yue=que,Kue=_7,Xue=xr;function Que(e,t){var n=Xue(e)?Gue:Yue;return n(e,Kue(t))}var Jue=Que;const H7=xn(Jue);var e1e=yo,t1e=Gr,n1e="[object Number]";function r1e(e){return typeof e=="number"||t1e(e)&&e1e(e)==n1e}var i1e=r1e;const Ea=xn(i1e);function o1e(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}var X$=o1e,a1e=yu,s1e=X$;function l1e(e,t){return t.length<2?e:a1e(e,s1e(t,0,-1))}var c1e=l1e,u1e=ll,d1e=Uw,f1e=c1e,h1e=cl;function g1e(e,t){return t=u1e(t,e),e=f1e(e,t),e==null||delete e[h1e(d1e(t))]}var v1e=g1e,m1e=j4;function p1e(e){return m1e(e)?void 0:e}var b1e=p1e,y1e=pf,C1e=E$,x1e=v1e,w1e=ll,S1e=sl,$1e=b1e,M1e=DS,_1e=$$,H1e=1,E1e=2,V1e=4,O1e=M1e(function(e,t){var n={};if(e==null)return n;var r=!1;t=y1e(t,function(o){return o=w1e(o,e),r||(r=o.length>1),o}),S1e(e,_1e(e),n),r&&(n=C1e(n,H1e|E1e|V1e,$1e));for(var i=t.length;i--;)x1e(n,t[i]);return n}),R1e=O1e;const Ya=xn(R1e);function No(){return No=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},No.apply(this,arguments)}var I5={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},T1e=function(e){var t=typeof e;return $.isValidElement(e)||t==="string"||t==="function"||t==="object"},k1e=function(e){var t=typeof e;return t==="string"||t==="function"},Gc=function(e){return e.type==="circle"},A5=function(e){return e.type==="dot"},Yc=function(e){return e.type==="rect"},j1e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(o,a){var s=a.offset||0;return[].concat(o,H7(t,a.match).map(function(l){var c=r(l),u=i(l);return(Gc(a)||Yc(a))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),No({},Ya(a,["match","offset"]),c,u,{size:a.size||u.size,datum:l})}))},[])},L1e=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return pie(Lf(i))},P1e=function(e){var t,n,r=e.x,i=e.y,o=e.noteX,a=e.noteY,s=e.noteWidth,l=s===void 0?I5.noteWidth:s,c=e.noteTextOffset,u=c===void 0?I5.noteTextOffset:c;if(Ea(o))t=r+o;else{if(o.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=o.abs}if(Ea(a))n=i+a;else{if(a.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=i,h=L1e(r,i,t,n);if(Gc(e)){var m=ma(Dr(h),e.size/2);d+=m.x,f+=m.y}if(Yc(e)){var g=Math.round((h+90)/45)%8;g===0&&(f-=e.height/2),g===1&&(d+=e.width/2,f-=e.height/2),g===2&&(d+=e.width/2),g===3&&(d+=e.width/2,f+=e.height/2),g===4&&(f+=e.height/2),g===5&&(d-=e.width/2,f+=e.height/2),g===6&&(d-=e.width/2),g===7&&(d-=e.width/2,f-=e.height/2)}var v=t,b=t;return(h+90)%360>180?(v-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[v,n-u],angle:h+90}},I1e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return $.useMemo(function(){return j1e({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},A1e=function(e){return $.useMemo(function(){return P1e(e)},[e])},N1e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=Zt(),a=Dn(),s=a.animate,l=a.config,c=Qt({x:n,y:r,config:l,immediate:!s});return typeof i=="function"?$.createElement(i,{x:n,y:r,datum:t}):p.jsxs(p.Fragment,{children:[o.annotations.text.outlineWidth>0&&p.jsx(et.text,{x:c.x,y:c.y,style:No({},o.annotations.text,{strokeLinejoin:"round",strokeWidth:2*o.annotations.text.outlineWidth,stroke:o.annotations.text.outlineColor}),children:i}),p.jsx(et.text,{x:c.x,y:c.y,style:Ya(o.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},op=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=Zt(),o=$.useMemo(function(){var l=t[0];return t.slice(1).reduce(function(c,u){return c+" L"+u[0]+","+u[1]},"M"+l[0]+","+l[1])},[t]),a=jf(o);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=No({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),p.jsx(et.path,{fill:"none",d:a,style:s})},F1e=function(e){var t=e.x,n=e.y,r=e.size,i=Zt(),o=Dn(),a=o.animate,s=o.config,l=Qt({x:t,y:n,radius:r/2,config:s,immediate:!a});return p.jsxs(p.Fragment,{children:[i.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:No({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.outline})]})},D1e=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?I5.dotSize:r,o=Zt(),a=Dn(),s=a.animate,l=a.config,c=Qt({x:t,y:n,radius:i/2,config:l,immediate:!s});return p.jsxs(p.Fragment,{children:[o.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:No({},o.annotations.outline,{fill:"none",strokeWidth:2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:o.annotations.symbol})]})},z1e=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.borderRadius,a=o===void 0?6:o,s=Zt(),l=Dn(),c=l.animate,u=l.config,d=Qt({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!c});return p.jsxs(p.Fragment,{children:[s.annotations.outline.outlineWidth>0&&p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:No({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:s.annotations.outline})]})},B1e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=A1e(e);if(!T1e(i))throw new Error("note should be a valid react element");return p.jsxs(p.Fragment,{children:[p.jsx(op,{points:o.points,isOutline:!0}),Gc(e)&&p.jsx(F1e,{x:n,y:r,size:e.size}),A5(e)&&p.jsx(D1e,{x:n,y:r,size:e.size}),Yc(e)&&p.jsx(z1e,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),p.jsx(op,{points:o.points}),p.jsx(N1e,{datum:t,x:o.text[0],y:o.text[1],note:i})]})},ap=function(e,t){t.forEach(function(n,r){var i=n[0],o=n[1];r===0?e.moveTo(i,o):e.lineTo(i,o)})},W1e=function(e,t){var n=t.annotations,r=t.theme;n.length!==0&&(e.save(),n.forEach(function(i){if(!k1e(i.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),ap(e,i.computed.points),e.stroke(),e.lineCap="butt"),Gc(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),A5(i)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),Yc(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),ap(e,i.computed.points),e.stroke(),Gc(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),A5(i)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.fill()),Yc(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),typeof i.note=="function"?i.note(e,{datum:i.datum,x:i.computed.text[0],y:i.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(i.note,i.computed.text[0],i.computed.text[1]),e.lineJoin="miter"),e.fillText(i.note,i.computed.text[0],i.computed.text[1]))}),e.restore())};const co=11102230246251565e-32,nr=134217729,Z1e=(3+8*co)*co;function _2(e,t,n,r,i){let o,a,s,l,c=t[0],u=r[0],d=0,f=0;u>c==u>-c?(o=c,c=t[++d]):(o=u,u=r[++f]);let h=0;if(d<e&&f<n)for(u>c==u>-c?(a=c+o,s=o-(a-c),c=t[++d]):(a=u+o,s=o-(a-u),u=r[++f]),o=a,s!==0&&(i[h++]=s);d<e&&f<n;)u>c==u>-c?(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=t[++d]):(a=o+u,l=a-o,s=o-(a-l)+(u-l),u=r[++f]),o=a,s!==0&&(i[h++]=s);for(;d<e;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=t[++d],o=a,s!==0&&(i[h++]=s);for(;f<n;)a=o+u,l=a-o,s=o-(a-l)+(u-l),u=r[++f],o=a,s!==0&&(i[h++]=s);return(o!==0||h===0)&&(i[h++]=o),h}function U1e(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function Eu(e){return new Float64Array(e)}const q1e=(3+16*co)*co,G1e=(2+12*co)*co,Y1e=(9+64*co)*co*co,ds=Eu(4),sp=Eu(8),lp=Eu(12),cp=Eu(16),dr=Eu(4);function K1e(e,t,n,r,i,o,a){let s,l,c,u,d,f,h,m,g,v,b,y,x,S,w,M,E,H;const _=e-i,O=n-i,k=t-o,A=r-o;S=_*A,f=nr*_,h=f-(f-_),m=_-h,f=nr*A,g=f-(f-A),v=A-g,w=m*v-(S-h*g-m*g-h*v),M=k*O,f=nr*k,h=f-(f-k),m=k-h,f=nr*O,g=f-(f-O),v=O-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,ds[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,ds[1]=x-(b+d)+(d-M),H=y+b,d=H-y,ds[2]=y-(H-d)+(b-d),ds[3]=H;let j=U1e(4,ds),V=G1e*a;if(j>=V||-j>=V||(d=e-_,s=e-(_+d)+(d-i),d=n-O,c=n-(O+d)+(d-i),d=t-k,l=t-(k+d)+(d-o),d=r-A,u=r-(A+d)+(d-o),s===0&&l===0&&c===0&&u===0)||(V=Y1e*a+Z1e*Math.abs(j),j+=_*u+A*s-(k*c+O*l),j>=V||-j>=V))return j;S=s*A,f=nr*s,h=f-(f-s),m=s-h,f=nr*A,g=f-(f-A),v=A-g,w=m*v-(S-h*g-m*g-h*v),M=l*O,f=nr*l,h=f-(f-l),m=l-h,f=nr*O,g=f-(f-O),v=O-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const T=_2(4,ds,4,dr,sp);S=_*u,f=nr*_,h=f-(f-_),m=_-h,f=nr*u,g=f-(f-u),v=u-g,w=m*v-(S-h*g-m*g-h*v),M=k*c,f=nr*k,h=f-(f-k),m=k-h,f=nr*c,g=f-(f-c),v=c-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const L=_2(T,sp,4,dr,lp);S=s*u,f=nr*s,h=f-(f-s),m=s-h,f=nr*u,g=f-(f-u),v=u-g,w=m*v-(S-h*g-m*g-h*v),M=l*c,f=nr*l,h=f-(f-l),m=l-h,f=nr*c,g=f-(f-c),v=c-g,E=m*v-(M-h*g-m*g-h*v),b=w-E,d=w-b,dr[0]=w-(b+d)+(d-E),y=S+b,d=y-S,x=S-(y-d)+(b-d),b=x-M,d=x-b,dr[1]=x-(b+d)+(d-M),H=y+b,d=H-y,dr[2]=y-(H-d)+(b-d),dr[3]=H;const R=_2(L,lp,4,dr,cp);return cp[R-1]}function u1(e,t,n,r,i,o){const a=(t-o)*(n-i),s=(e-i)*(r-o),l=a-s,c=Math.abs(a+s);return Math.abs(l)>=q1e*c?l:-K1e(e,t,n,r,i,o,c)}const up=Math.pow(2,-52),d1=new Uint32Array(512);class xd{static from(t,n=tde,r=nde){const i=t.length,o=new Float64Array(i*2);for(let a=0;a<i;a++){const s=t[a];o[2*a]=n(s),o[2*a+1]=r(s)}return new xd(o)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:o}=this,a=t.length>>1;let s=1/0,l=1/0,c=-1/0,u=-1/0;for(let _=0;_<a;_++){const O=t[2*_],k=t[2*_+1];O<s&&(s=O),k<l&&(l=k),O>c&&(c=O),k>u&&(u=k),this._ids[_]=_}const d=(s+c)/2,f=(l+u)/2;let h,m,g;for(let _=0,O=1/0;_<a;_++){const k=H2(d,f,t[2*_],t[2*_+1]);k<O&&(h=_,O=k)}const v=t[2*h],b=t[2*h+1];for(let _=0,O=1/0;_<a;_++){if(_===h)continue;const k=H2(v,b,t[2*_],t[2*_+1]);k<O&&k>0&&(m=_,O=k)}let y=t[2*m],x=t[2*m+1],S=1/0;for(let _=0;_<a;_++){if(_===h||_===m)continue;const O=J1e(v,b,y,x,t[2*_],t[2*_+1]);O<S&&(g=_,S=O)}let w=t[2*g],M=t[2*g+1];if(S===1/0){for(let k=0;k<a;k++)this._dists[k]=t[2*k]-t[0]||t[2*k+1]-t[1];Cs(this._ids,this._dists,0,a-1);const _=new Uint32Array(a);let O=0;for(let k=0,A=-1/0;k<a;k++){const j=this._ids[k],V=this._dists[j];V>A&&(_[O++]=j,A=V)}this.hull=_.subarray(0,O),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(u1(v,b,y,x,w,M)<0){const _=m,O=y,k=x;m=g,y=w,x=M,g=_,w=O,M=k}const E=ede(v,b,y,x,w,M);this._cx=E.x,this._cy=E.y;for(let _=0;_<a;_++)this._dists[_]=H2(t[2*_],t[2*_+1],E.x,E.y);Cs(this._ids,this._dists,0,a-1),this._hullStart=h;let H=3;r[h]=n[g]=m,r[m]=n[h]=g,r[g]=n[m]=h,i[h]=0,i[m]=1,i[g]=2,o.fill(-1),o[this._hashKey(v,b)]=h,o[this._hashKey(y,x)]=m,o[this._hashKey(w,M)]=g,this.trianglesLen=0,this._addTriangle(h,m,g,-1,-1,-1);for(let _=0,O,k;_<this._ids.length;_++){const A=this._ids[_],j=t[2*A],V=t[2*A+1];if(_>0&&Math.abs(j-O)<=up&&Math.abs(V-k)<=up||(O=j,k=V,A===h||A===m||A===g))continue;let T=0;for(let N=0,z=this._hashKey(j,V);N<this._hashSize&&(T=o[(z+N)%this._hashSize],!(T!==-1&&T!==r[T]));N++);T=n[T];let L=T,R;for(;R=r[L],u1(j,V,t[2*L],t[2*L+1],t[2*R],t[2*R+1])>=0;)if(L=R,L===T){L=-1;break}if(L===-1)continue;let I=this._addTriangle(L,A,r[L],-1,-1,i[L]);i[A]=this._legalize(I+2),i[L]=I,H++;let P=r[L];for(;R=r[P],u1(j,V,t[2*P],t[2*P+1],t[2*R],t[2*R+1])<0;)I=this._addTriangle(P,A,R,i[A],-1,i[P]),i[A]=this._legalize(I+2),r[P]=P,H--,P=R;if(L===T)for(;R=n[L],u1(j,V,t[2*R],t[2*R+1],t[2*L],t[2*L+1])<0;)I=this._addTriangle(R,A,L,-1,i[L],i[R]),this._legalize(I+2),i[R]=I,r[L]=L,H--,L=R;this._hullStart=n[A]=L,r[L]=n[P]=A,r[A]=P,o[this._hashKey(j,V)]=A,o[this._hashKey(t[2*L],t[2*L+1])]=L}this.hull=new Uint32Array(H);for(let _=0,O=this._hullStart;_<H;_++)this.hull[_]=O,O=r[O];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(X1e(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:r,coords:i}=this;let o=0,a=0;for(;;){const s=r[t],l=t-t%3;if(a=l+(t+2)%3,s===-1){if(o===0)break;t=d1[--o];continue}const c=s-s%3,u=l+(t+1)%3,d=c+(s+2)%3,f=n[a],h=n[t],m=n[u],g=n[d];if(Q1e(i[2*f],i[2*f+1],i[2*h],i[2*h+1],i[2*m],i[2*m+1],i[2*g],i[2*g+1])){n[t]=g,n[s]=f;const b=r[d];if(b===-1){let x=this._hullStart;do{if(this._hullTri[x]===d){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,b),this._link(s,r[a]),this._link(a,d);const y=c+(s+1)%3;o<d1.length&&(d1[o++]=y)}else{if(o===0)break;t=d1[--o]}}return a}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,r,i,o,a){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function X1e(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function H2(e,t,n,r){const i=e-n,o=t-r;return i*i+o*o}function Q1e(e,t,n,r,i,o,a,s){const l=e-a,c=t-s,u=n-a,d=r-s,f=i-a,h=o-s,m=l*l+c*c,g=u*u+d*d,v=f*f+h*h;return l*(d*v-g*h)-c*(u*v-g*f)+m*(u*h-d*f)<0}function J1e(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),h=(c*u-s*d)*f,m=(a*d-l*u)*f;return h*h+m*m}function ede(e,t,n,r,i,o){const a=n-e,s=r-t,l=i-e,c=o-t,u=a*a+s*s,d=l*l+c*c,f=.5/(a*c-s*l),h=e+(c*u-s*d)*f,m=t+(a*d-l*u)*f;return{x:h,y:m}}function Cs(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const o=e[i],a=t[o];let s=i-1;for(;s>=n&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{const i=n+r>>1;let o=n+1,a=r;ql(e,i,o),t[e[n]]>t[e[r]]&&ql(e,n,r),t[e[o]]>t[e[r]]&&ql(e,o,r),t[e[n]]>t[e[o]]&&ql(e,n,o);const s=e[o],l=t[s];for(;;){do o++;while(t[e[o]]<l);do a--;while(t[e[a]]>l);if(a<o)break;ql(e,o,a)}e[n+1]=e[a],e[a]=s,r-o+1>=a-n?(Cs(e,t,o,r),Cs(e,t,n,a-1)):(Cs(e,t,n,a-1),Cs(e,t,o,r))}}function ql(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function tde(e){return e[0]}function nde(e){return e[1]}const dp=1e-6;class da{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,o=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${o}`:(Math.abs(this._x1-i)>dp||Math.abs(this._y1-o)>dp)&&(this._+="L"+i+","+o),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=o}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class N5{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class rde{constructor(t,[n,r,i,o]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((o=+o)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=o,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let g=0,v=0,b=r.length,y,x;g<b;g+=3,v+=2){const S=r[g]*2,w=r[g+1]*2,M=r[g+2]*2,E=t[S],H=t[S+1],_=t[w],O=t[w+1],k=t[M],A=t[M+1],j=_-E,V=O-H,T=k-E,L=A-H,R=(j*L-V*T)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const P of n)o+=t[P*2],a+=t[P*2+1];o/=n.length,a/=n.length}const I=1e9*Math.sign((o-E)*L-(a-H)*T);y=(E+k)/2-I*L,x=(H+A)/2+I*T}else{const I=1/R,P=j*j+V*V,N=T*T+L*L;y=E+(L*P-V*N)*I,x=H+(j*N-T*P)*I}s[v]=y,s[v+1]=x}let l=n[n.length-1],c,u=l*4,d,f=t[2*l],h,m=t[2*l+1];i.fill(0);for(let g=0;g<n.length;++g)l=n[g],c=u,d=f,h=m,u=l*4,f=t[2*l],m=t[2*l+1],i[c+2]=i[u]=h-m,i[c+3]=i[u+1]=f-d}render(t){const n=t==null?t=new da:void 0,{delaunay:{halfedges:r,inedges:i,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let u=0,d=r.length;u<d;++u){const f=r[u];if(f<u)continue;const h=Math.floor(u/3)*2,m=Math.floor(f/3)*2,g=a[h],v=a[h+1],b=a[m],y=a[m+1];this._renderSegment(g,v,b,y,t)}let l,c=o[o.length-1];for(let u=0;u<o.length;++u){l=c,c=o[u];const d=Math.floor(i[c]/3)*2,f=a[d],h=a[d+1],m=l*4,g=this._project(f,h,s[m+2],s[m+3]);g&&this._renderSegment(f,h,g[0],g[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new da:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const r=n==null?n=new da:void 0,i=this._clip(t);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let o=i.length;for(;i[0]===i[o-2]&&i[1]===i[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(i[a]!==i[a-2]||i[a+1]!==i[a-1])&&n.lineTo(i[a],i[a+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,r=t.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(t){const n=new N5;return this.renderCell(t,n),n.value()}_renderSegment(t,n,r,i,o){let a;const s=this._regioncode(t,n),l=this._regioncode(r,i);s===0&&l===0?(o.moveTo(t,n),o.lineTo(r,i)):(a=this._clipSegment(t,n,r,i,s,l))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(t,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(t,n,r)===t}*neighbors(t){const n=this._clip(t);if(n)for(const r of this.delaunay.neighbors(t)){const i=this._clip(r);if(i){e:for(let o=0,a=n.length;o<a;o+=2)for(let s=0,l=i.length;s<l;s+=2)if(n[o]===i[s]&&n[o+1]===i[s+1]&&n[(o+2)%a]===i[(s+l-2)%l]&&n[(o+3)%a]===i[(s+l-1)%l]){yield r;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:o}}=this,a=r[t];if(a===-1)return null;const s=[];let l=a;do{const c=Math.floor(l/3);if(s.push(n[c*2],n[c*2+1]),l=l%3===2?l-2:l+1,o[l]!==t)break;l=i[l]}while(l!==a&&l!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:r}=this,i=t*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,n))}_clipFinite(t,n){const r=n.length;let i=null,o,a,s=n[r-2],l=n[r-1],c,u=this._regioncode(s,l),d,f=0;for(let h=0;h<r;h+=2)if(o=s,a=l,s=n[h],l=n[h+1],c=u,u=this._regioncode(s,l),c===0&&u===0)d=f,f=0,i?i.push(s,l):i=[s,l];else{let m,g,v,b,y;if(c===0){if((m=this._clipSegment(o,a,s,l,c,u))===null)continue;[g,v,b,y]=m}else{if((m=this._clipSegment(s,l,o,a,u,c))===null)continue;[b,y,g,v]=m,d=f,f=this._edgecode(g,v),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(g,v):i=[g,v]}d=f,f=this._edgecode(b,y),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(b,y):i=[b,y]}if(i)d=f,f=this._edgecode(i[0],i[1]),d&&f&&this._edge(t,d,f,i,i.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(t,n,r,i,o,a){const s=o<a;for(s&&([t,n,r,i,o,a]=[r,i,t,n,a,o]);;){if(o===0&&a===0)return s?[r,i,t,n]:[t,n,r,i];if(o&a)return null;let l,c,u=o||a;u&8?(l=t+(r-t)*(this.ymax-n)/(i-n),c=this.ymax):u&4?(l=t+(r-t)*(this.ymin-n)/(i-n),c=this.ymin):u&2?(c=n+(i-n)*(this.xmax-t)/(r-t),l=this.xmax):(c=n+(i-n)*(this.xmin-t)/(r-t),l=this.xmin),o?(t=l,n=c,o=this._regioncode(t,n)):(r=l,i=c,a=this._regioncode(r,i))}}_clipInfinite(t,n,r,i,o,a){let s=Array.from(n),l;if((l=this._project(s[0],s[1],r,i))&&s.unshift(l[0],l[1]),(l=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(l[0],l[1]),s=this._clipFinite(t,s))for(let c=0,u=s.length,d,f=this._edgecode(s[u-2],s[u-1]);c<u;c+=2)d=f,f=this._edgecode(s[c],s[c+1]),d&&f&&(c=this._edge(t,d,f,s,c),u=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,n,r,i,o){for(;n!==r;){let a,s;switch(n){case 5:n=4;continue;case 4:n=6,a=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,a=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,a=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,a=this.xmin,s=this.ymin;break}(i[o]!==a||i[o+1]!==s)&&this.contains(t,a,s)&&(i.splice(o,0,a,s),o+=2)}return o}_project(t,n,r,i){let o=1/0,a,s,l;if(i<0){if(n<=this.ymin)return null;(a=(this.ymin-n)/i)<o&&(l=this.ymin,s=t+(o=a)*r)}else if(i>0){if(n>=this.ymax)return null;(a=(this.ymax-n)/i)<o&&(l=this.ymax,s=t+(o=a)*r)}if(r>0){if(t>=this.xmax)return null;(a=(this.xmax-t)/r)<o&&(s=this.xmax,l=n+(o=a)*i)}else if(r<0){if(t<=this.xmin)return null;(a=(this.xmin-t)/r)<o&&(s=this.xmin,l=n+(o=a)*i)}return[s,l]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const r=(n+2)%t.length,i=(n+4)%t.length;(t[n]===t[r]&&t[r]===t[i]||t[n+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),n-=2)}t.length||(t=null)}return t}}const ide=2*Math.PI,fs=Math.pow;function ode(e){return e[0]}function ade(e){return e[1]}function sde(e){const{triangles:t,coords:n}=e;for(let r=0;r<t.length;r+=3){const i=2*t[r],o=2*t[r+1],a=2*t[r+2];if((n[a]-n[i])*(n[o+1]-n[i+1])-(n[o]-n[i])*(n[a+1]-n[i+1])>1e-10)return!1}return!0}function lde(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class E7{static from(t,n=ode,r=ade,i){return new E7("length"in t?cde(t,n,r,i):Float64Array.from(ude(t,n,r,i)))}constructor(t){this._delaunator=new xd(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&sde(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const l=this.collinear[0],c=this.collinear[this.collinear.length-1],u=[n[2*l],n[2*l+1],n[2*c],n[2*c+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f<h;++f){const m=lde(n[2*f],n[2*f+1],d);n[2*f]=m[0],n[2*f+1]=m[1]}this._delaunator=new xd(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let l=0,c=r.length;l<c;++l){const u=o[l%3===2?l-2:l+1];(r[l]===-1||a[u]===-1)&&(a[u]=l)}for(let l=0,c=i.length;l<c;++l)s[i[l]]=l;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],a[i[0]]=1,i.length===2&&(a[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new rde(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:o,triangles:a,collinear:s}=this;if(s){const d=s.indexOf(t);d>0&&(yield s[d-1]),d<s.length-1&&(yield s[d+1]);return}const l=n[t];if(l===-1)return;let c=l,u=-1;do{if(yield u=a[c],c=c%3===2?c-2:c+1,a[c]!==t)return;if(c=o[c],c===-1){const d=r[(i[t]+1)%r.length];d!==u&&(yield d);return}}while(c!==l)}find(t,n,r=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const i=r;let o;for(;(o=this._step(r,t,n))>=0&&o!==r&&o!==i;)r=o;return o}_step(t,n,r){const{inedges:i,hull:o,_hullIndex:a,halfedges:s,triangles:l,points:c}=this;if(i[t]===-1||!c.length)return(t+1)%(c.length>>1);let u=t,d=fs(n-c[t*2],2)+fs(r-c[t*2+1],2);const f=i[t];let h=f;do{let m=l[h];const g=fs(n-c[m*2],2)+fs(r-c[m*2+1],2);if(g<d&&(d=g,u=m),h=h%3===2?h-2:h+1,l[h]!==t)break;if(h=s[h],h===-1){if(h=o[(a[t]+1)%o.length],h!==m&&fs(n-c[h*2],2)+fs(r-c[h*2+1],2)<d)return h;break}}while(h!==f);return u}render(t){const n=t==null?t=new da:void 0,{points:r,halfedges:i,triangles:o}=this;for(let a=0,s=i.length;a<s;++a){const l=i[a];if(l<a)continue;const c=o[a]*2,u=o[l]*2;t.moveTo(r[c],r[c+1]),t.lineTo(r[u],r[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const r=t==null?t=new da:void 0,{points:i}=this;for(let o=0,a=i.length;o<a;o+=2){const s=i[o],l=i[o+1];t.moveTo(s+n,l),t.arc(s,l,n,0,ide)}return r&&r.value()}renderHull(t){const n=t==null?t=new da:void 0,{hull:r,points:i}=this,o=r[0]*2,a=r.length;t.moveTo(i[o],i[o+1]);for(let s=1;s<a;++s){const l=2*r[s];t.lineTo(i[l],i[l+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new N5;return this.renderHull(t),t.value()}renderTriangle(t,n){const r=n==null?n=new da:void 0,{points:i,triangles:o}=this,a=o[t*=3]*2,s=o[t+1]*2,l=o[t+2]*2;return n.moveTo(i[a],i[a+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[l],i[l+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,r=t.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new N5;return this.renderTriangle(t,n),n.value()}}function cde(e,t,n,r){const i=e.length,o=new Float64Array(i*2);for(let a=0;a<i;++a){const s=e[a];o[a*2]=t.call(r,s,a,e),o[a*2+1]=n.call(r,s,a,e)}return o}function*ude(e,t,n,r){let i=0;for(const o of e)yield t.call(r,o,i,e),yield n.call(r,o,i,e),++i}var V7=function(e){return[e.x,e.y]},Vu=e$,Q$="cursor",J$="top",dde=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?V7:n,i=e.margin,o=i===void 0?Vu:i;return t.map(function(a){var s=r(a),l=s[0],c=s[1];return[l+o.left,c+o.top]})},fde=function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,o=i===void 0?Vu:i,a=e.debug,s=E7.from(t),l=a?s.voronoi([0,0,o.left+n+o.right,o.top+r+o.bottom]):void 0;return{points:t,delaunay:s,voronoi:l}},O7=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?V7:n,i=e.width,o=e.height,a=e.margin,s=a===void 0?Vu:a,l=e.debug;return $.useMemo(function(){return fde({points:dde({points:t,margin:s,getNodePosition:r}),width:i,height:o,margin:s,debug:l})},[t,i,o,s,l])},hde=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,i=r===void 0?V7:r,o=e.delaunay,a=e.setCurrent,s=e.margin,l=s===void 0?Vu:s,c=e.detectionRadius,u=c===void 0?1/0:c,d=e.isInteractive,f=d===void 0||d,h=e.onMouseEnter,m=e.onMouseMove,g=e.onMouseLeave,v=e.onClick,b=e.onTouchStart,y=e.onTouchMove,x=e.onTouchEnd,S=e.enableTouchCrosshair,w=S!==void 0&&S,M=e.tooltip,E=e.tooltipPosition,H=E===void 0?Q$:E,_=e.tooltipAnchor,O=_===void 0?J$:_,k=$.useState(null),A=k[0],j=k[1],V=$.useRef(null);$.useEffect(function(){V.current=A},[V,A]);var T=$.useCallback(function(J){if(!t.current)return null;var W=S7(t.current,J),Z=W[0],U=W[1],F=o.find(Z,U),re=F!==void 0?n[F]:null;if(re&&u!==1/0){var B=i(re),ie=B[0],oe=B[1];Hie(Z,U,ie+l.left,oe+l.top)>u&&(F=null,re=null)}return F===null||re===null?null:[F,re]},[t,o,n,i,l,u]),L=ui(),R=L.showTooltipAt,I=L.showTooltipFromEvent,P=L.hideTooltip,N=$.useMemo(function(){if(M)return H==="cursor"?function(J,W){I(M(J),W,O)}:function(J){var W=i(J),Z=W[0],U=W[1];R(M(J),[Z+l.left,U+l.top],O)}},[R,I,M,H,O,i,l]),z=$.useCallback(function(J){var W=T(J);if(j(W),a==null||a(W?W[1]:null),W){var Z=W[1];N==null||N(Z,J),h==null||h(W[1],J)}},[T,j,a,N,h]),q=$.useCallback(function(J){var W=T(J);if(j(W),W){var Z=W[0],U=W[1];if(a==null||a(U),N==null||N(U,J),V.current){var F=V.current,re=F[0],B=F[1];Z!==re?g==null||g(B,J):m==null||m(U,J)}else h==null||h(U,J)}else a==null||a(null),P==null||P(),V.current&&(g==null||g(V.current[1],J))},[T,j,V,h,m,g,N,P]),G=$.useCallback(function(J){j(null),a==null||a(null),P(),g&&V.current&&g(V.current[1],J)},[j,a,V,P,g]),Y=$.useCallback(function(J){var W=T(J);j(W),W&&(v==null||v(W[1],J))},[T,j,v]),ee=$.useCallback(function(J){var W=T(J);w&&(j(W),a==null||a(W?W[1]:null)),W&&(b==null||b(W[1],J))},[T,j,a,w,b]),Q=$.useCallback(function(J){var W=T(J);w&&(j(W),a==null||a(W?W[1]:null)),W&&(y==null||y(W[1],J))},[T,j,a,w,y]),K=$.useCallback(function(J){w&&(j(null),a==null||a(null)),x&&V.current&&x(V.current[1],J)},[w,j,a,x,V]);return{current:A,handleMouseEnter:f?z:void 0,handleMouseMove:f?q:void 0,handleMouseLeave:f?G:void 0,handleClick:f?Y:void 0,handleTouchStart:f?ee:void 0,handleTouchMove:f?Q:void 0,handleTouchEnd:f?K:void 0}},eM=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.margin,o=i===void 0?Vu:i,a=e.getNodePosition,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd,g=e.enableTouchCrosshair,v=g!==void 0&&g,b=e.detectionRadius,y=b===void 0?1/0:b,x=e.tooltip,S=e.tooltipPosition,w=S===void 0?Q$:S,M=e.tooltipAnchor,E=M===void 0?J$:M,H=e.debug,_=$.useRef(null),O=O7({points:t,getNodePosition:a,width:n,height:r,margin:o,debug:H}),k=O.delaunay,A=O.voronoi,j=hde({elementRef:_,nodes:t,delaunay:k,margin:o,detectionRadius:y,setCurrent:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:m,enableTouchCrosshair:v,tooltip:x,tooltipPosition:w,tooltipAnchor:E}),V=j.current,T=j.handleMouseEnter,L=j.handleMouseMove,R=j.handleMouseLeave,I=j.handleClick,P=j.handleTouchStart,N=j.handleTouchMove,z=j.handleTouchEnd,q=$.useMemo(function(){if(H&&A)return A.render()},[H,A]);return p.jsxs("g",{ref:_,transform:"translate("+-o.left+","+-o.top+")",children:[H&&A&&p.jsxs(p.Fragment,{children:[p.jsx("path",{d:q,stroke:"red",strokeWidth:1,opacity:.75}),y<1/0&&p.jsx("path",{stroke:"red",strokeWidth:.35,fill:"none",d:k.renderPoints(void 0,y)}),V&&p.jsx("path",{fill:"pink",opacity:.35,d:A.renderCell(V[0])})]}),p.jsx("rect",{"data-ref":"mesh-interceptor",width:o.left+n+o.right,height:o.top+r+o.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:T,onMouseMove:L,onMouseLeave:R,onTouchStart:P,onTouchMove:N,onTouchEnd:z,onClick:I})]})},tM=function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()},nM=function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()};function Or(){return Or=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Or.apply(this,arguments)}function rM(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var gde=function(e){if(typeof e=="function")return e;if(Ea(e))return function(){return e};if(function(n){return Uo(n)}(e)){if(!wf(e.key))throw new Error("symbolSize is invalid, key should be a string pointing to the property to use to determine node size");if(!Array.isArray(e.values)||e.values.length!==2)throw new Error("symbolSize is invalid, values spec should be an array containing two values, min and max");if(!Array.isArray(e.sizes)||e.sizes.length!==2)throw new Error("symbolSize is invalid, sizes spec should be an array containing two values, min and max");var t=Go().domain([e.values[0],e.values[1]]).range([e.sizes[0],e.sizes[1]]);return function(n){return t(yn(n,e.key))}}throw new Error("nodeSize is invalid, it should be either a function, a number or an object")},iM=function(e){var t,n=e.data,r=e.xScaleSpec,i=e.xFormat,o=e.yScaleSpec,a=e.yFormat,s=e.width,l=e.height,c=e.nodeId,u=e.nodeSize,d=e.colors,f=$.useMemo(function(){return F$(n,r,o,s,l)},[n,r,o,s,l]),h=f.series,m=f.xScale,g=f.yScale,v=Io(i),b=Io(a),y=yi(c),x=$.useMemo(function(){return function(M){var E=M.series,H=M.formatX,_=M.formatY,O=M.getNodeId,k=[];return E.forEach(function(A){A.data.forEach(function(j,V){var T={index:k.length,serieIndex:V,serieId:A.id,x:j.position.x,xValue:j.data.x,formattedX:H(j.data.x),y:j.position.y,yValue:j.data.y,formattedY:_(j.data.y),data:j.data};k.push(Or({},T,{id:O(T)}))})}),k}({series:h,formatX:v,formatY:b,getNodeId:y})},[h,v,b,y]),S=$.useMemo(function(){return gde(t)},[t=u]),w=Mu(d,"serieId");return{xScale:m,yScale:g,nodes:$.useMemo(function(){return x.map(function(M){return Or({},M,{size:S(M),color:w({serieId:M.serieId})})})},[x,S,w]),legendData:$.useMemo(function(){return h.map(function(M){return{id:M.id,label:M.id,color:w({serieId:M.id})}})},[h,w])}},oM=function(e,t){return I1e({data:e,annotations:t,getPosition:function(n){return{x:n.x,y:n.y}},getDimensions:function(n){return{size:n.size,width:n.size,height:n.size}}})},vde=function(e){return e/2},aM={xScale:{type:"linear",min:0,max:"auto"},yScale:{type:"linear",min:0,max:"auto"},enableGridX:!0,enableGridY:!0,axisBottom:{},axisLeft:{},nodeId:function(e){return e.serieId+"."+e.index},nodeSize:9,nodeComponent:function(e){var t=e.node,n=e.style,r=e.blendMode,i=e.isInteractive,o=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=$.useCallback(function(h){return o==null?void 0:o(t,h)},[t,o]),u=$.useCallback(function(h){return a==null?void 0:a(t,h)},[t,a]),d=$.useCallback(function(h){return s==null?void 0:s(t,h)},[t,s]),f=$.useCallback(function(h){return l==null?void 0:l(t,h)},[t,l]);return p.jsx(et.circle,{cx:n.x,cy:n.y,r:n.size.to(vde),fill:n.color,style:{mixBlendMode:r},onMouseEnter:i?c:void 0,onMouseMove:i?u:void 0,onMouseLeave:i?d:void 0,onClick:i?f:void 0})},colors:{scheme:"nivo"},isInteractive:!0,debugMesh:!1,tooltip:function(e){var t=e.node;return p.jsx(Is,{id:t.serieId,value:"x: "+t.formattedX+", y: "+t.formattedY,enableChip:!0,color:t.color})},markers:[],legends:[],annotations:[]},pn=Or({},aM,{blendMode:"normal",layers:["grid","axes","nodes","markers","mesh","legends","annotations"],role:"img",useMesh:!0,animate:!0,motionConfig:"default"}),rr=Or({},aM,{layers:["grid","axes","nodes","mesh","legends","annotations"],pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,renderNode:function(e,t){e.beginPath(),e.arc(t.x,t.y,t.size/2,0,2*Math.PI),e.fillStyle=t.color,e.fill()}}),mde=function(e){var t=e.nodes,n=e.annotations,r=oM(t,n);return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(B1e,Or({},i),o)})})},pde=function(e){return e.id},E2=function(e){return{x:e.x,y:e.y,size:e.size,color:e.color}},bde=function(e){return{x:e.x,y:e.y,size:0,color:e.color}},yde=function(e){var t=e.nodes,n=e.nodeComponent,r=e.isInteractive,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.tooltip,c=e.blendMode,u=Dn(),d=u.animate,f=u.config,h=Cr(t,{keys:pde,from:E2,enter:E2,update:E2,leave:bde,config:f,immediate:!d}),m=ui(),g=m.showTooltipFromEvent,v=m.hideTooltip,b=$.useCallback(function(w,M){g($.createElement(l,{node:w}),M),i==null||i(w,M)},[l,g,i]),y=$.useCallback(function(w,M){g($.createElement(l,{node:w}),M),o==null||o(w,M)},[l,g,o]),x=$.useCallback(function(w,M){v(),a==null||a(w,M)},[v,a]),S=$.useCallback(function(w,M){return s==null?void 0:s(w,M)},[s]);return p.jsx(p.Fragment,{children:h(function(w,M){return $.createElement(n,{node:M,style:w,blendMode:c,isInteractive:r,onMouseEnter:r?b:void 0,onMouseMove:r?y:void 0,onMouseLeave:r?x:void 0,onClick:r?S:void 0})})})},Cde=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.tooltip,c=e.debug,u=ui(),d=u.showTooltipFromEvent,f=u.hideTooltip,h=$.useCallback(function(b,y){d($.createElement(l,{node:b}),y),i&&i(b,y)},[d,l,i]),m=$.useCallback(function(b,y){d($.createElement(l,{node:b}),y),o&&o(b,y)},[d,l,o]),g=$.useCallback(function(b,y){f(),a&&a(b,y)},[f,a]),v=$.useCallback(function(b,y){s&&s(b,y)},[s]);return p.jsx(eM,{nodes:t,width:n,height:r,onMouseEnter:h,onMouseMove:m,onMouseLeave:g,onClick:v,debug:c})},xde=["isInteractive","animate","motionConfig","theme","renderWrapper"],wde=function(e){var t=e.data,n=e.xScale,r=n===void 0?pn.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?pn.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.margin,d=e.layers,f=d===void 0?pn.layers:d,h=e.colors,m=h===void 0?pn.colors:h,g=e.blendMode,v=g===void 0?pn.blendMode:g,b=e.nodeId,y=b===void 0?pn.nodeId:b,x=e.nodeSize,S=x===void 0?pn.nodeSize:x,w=e.nodeComponent,M=w===void 0?pn.nodeComponent:w,E=e.enableGridX,H=E===void 0?pn.enableGridX:E,_=e.enableGridY,O=_===void 0?pn.enableGridY:_,k=e.gridXValues,A=e.gridYValues,j=e.axisTop,V=e.axisRight,T=e.axisBottom,L=T===void 0?pn.axisBottom:T,R=e.axisLeft,I=R===void 0?pn.axisLeft:R,P=e.annotations,N=P===void 0?pn.annotations:P,z=e.isInteractive,q=z===void 0?pn.isInteractive:z,G=e.useMesh,Y=G===void 0?pn.useMesh:G,ee=e.debugMesh,Q=ee===void 0?pn.debugMesh:ee,K=e.onMouseEnter,J=e.onMouseMove,W=e.onMouseLeave,Z=e.onClick,U=e.tooltip,F=U===void 0?pn.tooltip:U,re=e.markers,B=re===void 0?pn.markers:re,ie=e.legends,oe=ie===void 0?pn.legends:ie,ve=e.role,Ce=ve===void 0?pn.role:ve,pe=e.ariaLabel,ye=e.ariaLabelledBy,Se=e.ariaDescribedBy,me=Za(l,c,u),ge=me.margin,ce=me.innerWidth,$e=me.innerHeight,he=me.outerWidth,Ae=me.outerHeight,Ie=iM({data:t,xScaleSpec:r,xFormat:i,yScaleSpec:a,yFormat:s,width:ce,height:$e,nodeId:y,nodeSize:S,colors:m}),Re=Ie.xScale,ke=Ie.yScale,Ye=Ie.nodes,Xe=Ie.legendData,Fe=$.useMemo(function(){return{xScale:Re,yScale:ke,nodes:Ye,margin:ge,innerWidth:ce,innerHeight:$e,outerWidth:he,outerHeight:Ae}},[Re,ke,Ye,ge,ce,$e,he,Ae]),je={grid:null,axes:null,nodes:null,markers:null,mesh:null,annotations:null,legends:null};return f.includes("grid")&&(je.grid=p.jsx(Y$,{width:ce,height:$e,xScale:H?Re:null,yScale:O?ke:null,xValues:k,yValues:A},"grid")),f.includes("axes")&&(je.axes=p.jsx(G$,{xScale:Re,yScale:ke,width:ce,height:$e,top:j,right:V,bottom:L,left:I},"axes")),f.includes("nodes")&&(je.nodes=p.jsx(yde,{nodes:Ye,nodeComponent:M,isInteractive:q,tooltip:F,blendMode:v,onMouseEnter:K,onMouseMove:J,onMouseLeave:W,onClick:Z},"nodes")),f.includes("markers")&&(je.markers=p.jsx(h$,{markers:B,width:ce,height:$e,xScale:Re,yScale:ke},"markers")),f.includes("mesh")&&q&&Y&&(je.mesh=p.jsx(Cde,{nodes:Ye,width:ce,height:$e,onMouseEnter:K,onMouseMove:J,onMouseLeave:W,onClick:Z,tooltip:F,debug:Q},"mesh")),f.includes("annotations")&&(je.annotations=p.jsx(mde,{nodes:Ye,annotations:N},"annotations")),f.includes("legends")&&(je.legends=oe.map(function(Qe,Ze){return p.jsx(Pf,Or({},Qe,{containerWidth:ce,containerHeight:$e,data:Xe}),Ze)})),p.jsx(wl,{width:he,height:Ae,margin:ge,role:Ce,ariaLabel:pe,ariaLabelledBy:ye,ariaDescribedBy:Se,children:f.map(function(Qe,Ze){if(typeof Qe=="string"&&je[Qe]!==void 0)return je[Qe];if(typeof Qe=="function")return p.jsx($.Fragment,{children:$.createElement(Qe,Fe)},Ze);throw new Error("Unknown layer ("+Qe+")")})})},Sde=function(e){var t=e.isInteractive,n=t===void 0?pn.isInteractive:t,r=e.animate,i=r===void 0?pn.animate:r,o=e.motionConfig,a=o===void 0?pn.motionConfig:o,s=e.theme,l=e.renderWrapper,c=rM(e,xde);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(wde,Or({isInteractive:n},c))})},sM=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(Sde,Or({width:n,height:r},e))}})},$de=["isInteractive","renderWrapper","theme"],Mde=function(e){var t=e.data,n=e.xScale,r=n===void 0?rr.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?rr.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.margin,d=e.pixelRatio,f=d===void 0?rr.pixelRatio:d,h=e.layers,m=h===void 0?rr.layers:h,g=e.colors,v=g===void 0?rr.colors:g,b=e.nodeId,y=b===void 0?pn.nodeId:b,x=e.nodeSize,S=x===void 0?rr.nodeSize:x,w=e.renderNode,M=w===void 0?rr.renderNode:w,E=e.enableGridX,H=E===void 0?rr.enableGridX:E,_=e.gridXValues,O=e.enableGridY,k=O===void 0?rr.enableGridY:O,A=e.gridYValues,j=e.axisTop,V=e.axisRight,T=e.axisBottom,L=T===void 0?rr.axisBottom:T,R=e.axisLeft,I=R===void 0?rr.axisLeft:R,P=e.annotations,N=P===void 0?rr.annotations:P,z=e.isInteractive,q=z===void 0?rr.isInteractive:z,G=e.debugMesh,Y=G===void 0?rr.debugMesh:G,ee=e.onMouseEnter,Q=e.onMouseMove,K=e.onMouseLeave,J=e.onClick,W=e.tooltip,Z=W===void 0?rr.tooltip:W,U=e.legends,F=U===void 0?rr.legends:U,re=e.canvasRef,B=$.useRef(null),ie=Zt(),oe=$.useState(null),ve=oe[0],Ce=oe[1],pe=Za(l,c,u),ye=pe.margin,Se=pe.innerWidth,me=pe.innerHeight,ge=pe.outerWidth,ce=pe.outerHeight,$e=iM({data:t,xScaleSpec:r,xFormat:i,yScaleSpec:a,yFormat:s,width:Se,height:me,nodeId:y,nodeSize:S,colors:v}),he=$e.xScale,Ae=$e.yScale,Ie=$e.nodes,Re=$e.legendData,ke=oM(Ie,N),Ye=O7({points:Ie,width:Se,height:me,debug:Y}),Xe=Ye.delaunay,Fe=Ye.voronoi,je=$.useMemo(function(){return{xScale:he,yScale:Ae,nodes:Ie,margin:ye,innerWidth:Se,innerHeight:me,outerWidth:ge,outerHeight:ce}},[he,Ae,Ie,ye,Se,me,ge,ce]);$.useEffect(function(){if(B.current){B.current.width=ge*f,B.current.height=ce*f;var Ne=B.current.getContext("2d");Ne.scale(f,f),Ne.fillStyle=ie.background,Ne.fillRect(0,0,ge,ce),Ne.translate(ye.left,ye.top),m.forEach(function(ze){if(ze==="grid")Ne.lineWidth=ie.grid.line.strokeWidth,Ne.strokeStyle=ie.grid.line.stroke,H&&Cd(Ne,{width:Se,height:me,scale:he,axis:"x",values:_}),k&&Cd(Ne,{width:Se,height:me,scale:Ae,axis:"y",values:A});else if(ze==="annotations")W1e(Ne,{annotations:ke,theme:ie});else if(ze==="axes")K$(Ne,{xScale:he,yScale:Ae,width:Se,height:me,top:j,right:V,bottom:L,left:I,theme:ie});else if(ze==="nodes")Ie.forEach(function(De){M(Ne,De)});else if(ze==="mesh")Y&&(tM(Ne,Fe),ve&&nM(Ne,Fe,ve.index));else if(ze==="legends")F.forEach(function(De){x$(Ne,Or({},De,{data:Re,containerWidth:Se,containerHeight:me,theme:ie}))});else{if(typeof ze!="function")throw new Error("Invalid layer: "+ze);ze(Ne,je)}})}},[B,Se,me,ge,ce,ye.top,ye.left,f,M,m,je,ie,he,Ae,Ie,H,k,j,V,L,I,F,Re,Y,Fe,ve,ke]);var Qe=ui(),Ze=Qe.showTooltipFromEvent,qe=Qe.hideTooltip,de=$.useCallback(function(Ne){var ze=S7(B.current,Ne),De=ze[0],Je=ze[1];if(!v$(ye.left,ye.top,Se,me,De,Je))return null;var tt=Xe.find(De-ye.left,Je-ye.top);return Ie[tt]},[B,ye,Se,me,Xe]),He=$.useCallback(function(Ne){var ze=de(Ne);Ce(ze),ze?(Ze($.createElement(Z,{node:ze}),Ne),ve&&ve.id!==ze.id&&(K&&K(ve,Ne),ee&&ee(ze,Ne)),ve||ee&&ee(ze,Ne),Q&&Q(ze,Ne)):(qe(),ve&&K&&K(ve,Ne))},[de,ve,Ce,Ze,qe,Z,ee,Q,K]),Ke=$.useCallback(function(Ne){qe(),Ce(null),ve&&K&&K(ve,Ne)},[qe,ve,Ce,K]),nt=$.useCallback(function(Ne){if(J){var ze=de(Ne);ze&&J(ze,Ne)}},[de,J]);return p.jsx("canvas",{ref:function(Ne){B.current=Ne,re&&"current"in re&&(re.current=Ne)},width:ge*f,height:ce*f,style:{width:ge,height:ce,cursor:q?"auto":"normal"},onMouseEnter:q?He:void 0,onMouseMove:q?He:void 0,onMouseLeave:q?Ke:void 0,onClick:q?nt:void 0})},_de=$.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,o=rM(e,$de);return p.jsx(Ua,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:p.jsx(Mde,Or({},o,{canvasRef:t}))})});$.forwardRef(function(e,t){return p.jsx(Yo,{children:function(n){var r=n.width,i=n.height;return p.jsx(_de,Or({width:r,height:i},e,{ref:t}))}})});const Hde=({x1:e,x2:t,y1:n,y2:r})=>p.jsx("g",{children:p.jsx("line",{x1:e,y1:n,x2:t,y2:r,stroke:"red",strokeWidth:"3"})}),Ede=({scatterPlotData:e,style:t={},margin:n={},axisBottom:r={},axisLeft:i={},tooltip:o=null})=>{var h,m;const a=e==null?void 0:e.line,s=a==null?void 0:a.x1,l=a==null?void 0:a.y1,c=a==null?void 0:a.x2,u=a==null?void 0:a.y2,d=(m=(h=e==null?void 0:e.points)==null?void 0:h.data)==null?void 0:m.map(g=>g.y);Math.min(l,u,...d);const f=Math.max(l,u,...d);return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{style:{width:"100%",height:600,...t},children:p.jsx(sM,{data:[e==null?void 0:e.points],margin:{top:20,right:120,bottom:100,left:120,...n},xScale:{type:"point"},yScale:{type:"linear",min:0,max:f,reverse:!1},axisBottom:{orient:"bottom",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:46,truncateTickAt:0,legend:"axisBottom",...r},axisLeft:{orient:"left",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-60,truncateTickAt:0,legend:"axisLeft",...i},layers:["grid","markers","axes","nodes","legends",g=>p.jsx(Hde,{x1:g.xScale(s),y1:g.yScale(l),x2:g.xScale(c),y2:g.yScale(u)})],tooltip:({node:g})=>p.jsx(Un,{body:(o==null?void 0:o({node:g}))||p.jsx("span",{children:"Scatterplot tooltip"})})})})]})};function Vde(e,t,n,r){var i=-1,o=e==null?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}var Ode=Vde;function Rde(e){return function(t){return e==null?void 0:e[t]}}var Tde=Rde,kde=Tde,jde={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Lde=kde(jde),Pde=Lde,Ide=Pde,Ade=bu,Nde=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Fde="\\u0300-\\u036f",Dde="\\ufe20-\\ufe2f",zde="\\u20d0-\\u20ff",Bde=Fde+Dde+zde,Wde="["+Bde+"]",Zde=RegExp(Wde,"g");function Ude(e){return e=Ade(e),e&&e.replace(Nde,Ide).replace(Zde,"")}var qde=Ude,Gde=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Yde(e){return e.match(Gde)||[]}var Kde=Yde,Xde=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Qde(e){return Xde.test(e)}var Jde=Qde,lM="\\ud800-\\udfff",efe="\\u0300-\\u036f",tfe="\\ufe20-\\ufe2f",nfe="\\u20d0-\\u20ff",rfe=efe+tfe+nfe,cM="\\u2700-\\u27bf",uM="a-z\\xdf-\\xf6\\xf8-\\xff",ife="\\xac\\xb1\\xd7\\xf7",ofe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",afe="\\u2000-\\u206f",sfe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dM="A-Z\\xc0-\\xd6\\xd8-\\xde",lfe="\\ufe0e\\ufe0f",fM=ife+ofe+afe+sfe,hM="['’]",fp="["+fM+"]",cfe="["+rfe+"]",gM="\\d+",ufe="["+cM+"]",vM="["+uM+"]",mM="[^"+lM+fM+gM+cM+uM+dM+"]",dfe="\\ud83c[\\udffb-\\udfff]",ffe="(?:"+cfe+"|"+dfe+")",hfe="[^"+lM+"]",pM="(?:\\ud83c[\\udde6-\\uddff]){2}",bM="[\\ud800-\\udbff][\\udc00-\\udfff]",vs="["+dM+"]",gfe="\\u200d",hp="(?:"+vM+"|"+mM+")",vfe="(?:"+vs+"|"+mM+")",gp="(?:"+hM+"(?:d|ll|m|re|s|t|ve))?",vp="(?:"+hM+"(?:D|LL|M|RE|S|T|VE))?",yM=ffe+"?",CM="["+lfe+"]?",mfe="(?:"+gfe+"(?:"+[hfe,pM,bM].join("|")+")"+CM+yM+")*",pfe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bfe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",yfe=CM+yM+mfe,Cfe="(?:"+[ufe,pM,bM].join("|")+")"+yfe,xfe=RegExp([vs+"?"+vM+"+"+gp+"(?="+[fp,vs,"$"].join("|")+")",vfe+"+"+vp+"(?="+[fp,vs+hp,"$"].join("|")+")",vs+"?"+hp+"+"+gp,vs+"+"+vp,bfe,pfe,gM,Cfe].join("|"),"g");function wfe(e){return e.match(xfe)||[]}var Sfe=wfe,$fe=Kde,Mfe=Jde,_fe=bu,Hfe=Sfe;function Efe(e,t,n){return e=_fe(e),t=n?void 0:t,t===void 0?Mfe(e)?Hfe(e):$fe(e):e.match(t)||[]}var Vfe=Efe,Ofe=Ode,Rfe=qde,Tfe=Vfe,kfe="['’]",jfe=RegExp(kfe,"g");function Lfe(e){return function(t){return Ofe(Tfe(Rfe(t).replace(jfe,"")),e,"")}}var Pfe=Lfe,Ife=X$;function Afe(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Ife(e,t,n)}var Nfe=Afe,Ffe="\\ud800-\\udfff",Dfe="\\u0300-\\u036f",zfe="\\ufe20-\\ufe2f",Bfe="\\u20d0-\\u20ff",Wfe=Dfe+zfe+Bfe,Zfe="\\ufe0e\\ufe0f",Ufe="\\u200d",qfe=RegExp("["+Ufe+Ffe+Wfe+Zfe+"]");function Gfe(e){return qfe.test(e)}var xM=Gfe;function Yfe(e){return e.split("")}var Kfe=Yfe,wM="\\ud800-\\udfff",Xfe="\\u0300-\\u036f",Qfe="\\ufe20-\\ufe2f",Jfe="\\u20d0-\\u20ff",e0e=Xfe+Qfe+Jfe,t0e="\\ufe0e\\ufe0f",n0e="["+wM+"]",F5="["+e0e+"]",D5="\\ud83c[\\udffb-\\udfff]",r0e="(?:"+F5+"|"+D5+")",SM="[^"+wM+"]",$M="(?:\\ud83c[\\udde6-\\uddff]){2}",MM="[\\ud800-\\udbff][\\udc00-\\udfff]",i0e="\\u200d",_M=r0e+"?",HM="["+t0e+"]?",o0e="(?:"+i0e+"(?:"+[SM,$M,MM].join("|")+")"+HM+_M+")*",a0e=HM+_M+o0e,s0e="(?:"+[SM+F5+"?",F5,$M,MM,n0e].join("|")+")",l0e=RegExp(D5+"(?="+D5+")|"+s0e+a0e,"g");function c0e(e){return e.match(l0e)||[]}var u0e=c0e,d0e=Kfe,f0e=xM,h0e=u0e;function g0e(e){return f0e(e)?h0e(e):d0e(e)}var v0e=g0e,m0e=Nfe,p0e=xM,b0e=v0e,y0e=bu;function C0e(e){return function(t){t=y0e(t);var n=p0e(t)?b0e(t):void 0,r=n?n[0]:t.charAt(0),i=n?m0e(n,1).join(""):t.slice(1);return r[e]()+i}}var x0e=C0e,w0e=x0e,S0e=w0e("toUpperCase"),$0e=S0e,M0e=Pfe,_0e=$0e,H0e=M0e(function(e,t,n){return e+(n?" ":"")+_0e(t)}),E0e=H0e;const V0e=xn(E0e);function O0e(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function R0e(){return this.eachAfter(O0e)}function T0e(e){var t=this,n,r=[t],i,o,a;do for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);while(r.length);return this}function k0e(e){for(var t=this,n=[t],r,i;t=n.pop();)if(e(t),r=t.children,r)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function j0e(e){for(var t=this,n=[t],r=[],i,o,a;t=n.pop();)if(r.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this}function L0e(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function P0e(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function I0e(e){for(var t=this,n=A0e(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function A0e(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N0e(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function F0e(){var e=[];return this.each(function(t){e.push(t)}),e}function D0e(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function z0e(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function R7(e,t){var n=new wd(e),r=+e.value&&(n.value=e.value),i,o=[n],a,s,l,c;for(t==null&&(t=W0e);i=o.pop();)if(r&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new wd(s[l])),a.parent=i,a.depth=i.depth+1;return n.eachBefore(U0e)}function B0e(){return R7(this).eachBefore(Z0e)}function W0e(e){return e.children}function Z0e(e){e.data=e.data.data}function U0e(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wd(e){this.data=e,this.depth=this.height=0,this.parent=null}wd.prototype=R7.prototype={constructor:wd,count:R0e,each:T0e,eachAfter:j0e,eachBefore:k0e,sum:L0e,sort:P0e,path:I0e,ancestors:N0e,descendants:F0e,leaves:D0e,links:z0e,copy:B0e};function q0e(e){if(typeof e!="function")throw new Error;return e}function Gl(){return 0}function Yl(e){return function(){return e}}function G0e(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function T7(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(r-t)/e.value;++s<l;)a=o[s],a.y0=n,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function k7(e,t,n,r,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-n)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=r,a.y0=n,a.y1=n+=a.value*c}var Y0e=(1+Math.sqrt(5))/2;function K0e(e,t,n,r,i,o){for(var a=[],s=t.children,l,c,u=0,d=0,f=s.length,h,m,g=t.value,v,b,y,x,S,w,M;u<f;){h=i-n,m=o-r;do v=s[d++].value;while(!v&&d<f);for(b=y=v,w=Math.max(m/h,h/m)/(g*e),M=v*v*w,S=Math.max(y/M,M/b);d<f;++d){if(v+=c=s[d].value,c<b&&(b=c),c>y&&(y=c),M=v*v*w,x=Math.max(y/M,M/b),x>S){v-=c;break}S=x}a.push(l={value:v,dice:h<m,children:s.slice(u,d)}),l.dice?T7(l,n,r,i,g?r+=m*v/g:o):k7(l,n,r,g?n+=h*v/g:i,o),g-=v,u=d}return a}const EM=function e(t){function n(r,i,o,a,s){K0e(t,r,i,o,a,s)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Y0e);function X0e(){var e=EM,t=!1,n=1,r=1,i=[0],o=Gl,a=Gl,s=Gl,l=Gl,c=Gl;function u(f){return f.x0=f.y0=0,f.x1=n,f.y1=r,f.eachBefore(d),i=[0],t&&f.eachBefore(G0e),f}function d(f){var h=i[f.depth],m=f.x0+h,g=f.y0+h,v=f.x1-h,b=f.y1-h;v<m&&(m=v=(m+v)/2),b<g&&(g=b=(g+b)/2),f.x0=m,f.y0=g,f.x1=v,f.y1=b,f.children&&(h=i[f.depth+1]=o(f)/2,m+=c(f)-h,g+=a(f)-h,v-=s(f)-h,b-=l(f)-h,v<m&&(m=v=(m+v)/2),b<g&&(g=b=(g+b)/2),e(f,m,g,v,b))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(n=+f[0],r=+f[1],u):[n,r]},u.tile=function(f){return arguments.length?(e=q0e(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Yl(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Yl(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Yl(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Yl(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Yl(+f),u):c},u}function Q0e(e,t,n,r,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,n,r,i);function u(d,f,h,m,g,v,b){if(d>=f-1){var y=o[d];y.x0=m,y.y0=g,y.x1=v,y.y1=b;return}for(var x=c[d],S=h/2+x,w=d+1,M=f-1;w<M;){var E=w+M>>>1;c[E]<S?w=E+1:M=E}S-c[w-1]<c[w]-S&&d+1<w&&--w;var H=c[w]-x,_=h-H;if(v-m>b-g){var O=(m*_+v*H)/h;u(d,w,H,m,g,O,b),u(w,f,_,O,g,v,b)}else{var k=(g*_+b*H)/h;u(d,w,H,m,g,v,k),u(w,f,_,m,k,v,b)}}}function J0e(e,t,n,r,i){(e.depth&1?k7:T7)(e,t,n,r,i)}function Rr(){return Rr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rr.apply(this,arguments)}function e2e(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var t2e=function(e,t){return On([e,t],function(n,r){return"translate("+n+","+r+")"})},n2e=function(e,t){return On([e,t],function(n,r){return"translate("+n+"px, "+r+"px)"})},mp=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+r+","+i+") rotate("+o+")"})},r2e=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+r+"px,"+i+"px) rotate("+o+"deg)"})},i2e=function(e,t,n){return On([e,t,n],function(r,i,o){return"translate("+(r-(o===0?0:5))+"px,"+(i-(o===0?5:0))+"px) rotate("+o+"deg)"})},o2e=$.memo(function(e){var t=e.node,n=e.animatedProps,r=e.borderWidth,i=e.enableLabel,o=e.enableParentLabel,a=e.labelSkipSize,s=Zt(),l=i&&t.isLeaf&&(a===0||Math.min(t.width,t.height)>a),c=o&&t.isParent;return p.jsxs(et.g,{transform:t2e(n.x,n.y),children:[p.jsx(et.rect,{"data-testid":"node."+t.id,width:On(n.width,function(u){return Math.max(u,0)}),height:On(n.height,function(u){return Math.max(u,0)}),fill:t.fill?t.fill:n.color,strokeWidth:r,stroke:t.borderColor,fillOpacity:t.opacity,onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseLeave:t.onMouseLeave,onClick:t.onClick}),l&&p.jsx(et.text,{"data-testid":"label."+t.id,textAnchor:"middle",dominantBaseline:"central",style:Rr({},s.labels.text,{fill:t.labelTextColor,pointerEvents:"none"}),fillOpacity:n.labelOpacity,transform:mp(n.labelX,n.labelY,n.labelRotation),children:t.label}),c&&p.jsx(et.text,{"data-testid":"parentLabel."+t.id,dominantBaseline:"central",style:Rr({},s.labels.text,{fill:t.parentLabelTextColor,pointerEvents:"none"}),fillOpacity:n.parentLabelOpacity,transform:mp(n.parentLabelX,n.parentLabelY,n.parentLabelRotation),children:t.parentLabel})]})}),a2e=$.memo(function(e){var t=e.node;return p.jsx(Is,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})}),s2e=$.memo(function(e){var t=e.node,n=e.animatedProps,r=e.borderWidth,i=e.enableLabel,o=e.enableParentLabel,a=e.labelSkipSize,s=Zt(),l=i&&t.isLeaf&&(a===0||Math.min(t.width,t.height)>a),c=o&&t.isParent;return p.jsxs(et.div,{"data-testid":"node."+t.id,id:t.path.replace(/[^\w]/gi,"-"),style:{boxSizing:"border-box",position:"absolute",top:0,left:0,transform:n2e(n.x,n.y),width:n.width,height:n.height,borderWidth:r,borderStyle:"solid",borderColor:t.borderColor,overflow:"hidden"},children:[p.jsx(et.div,{style:{boxSizing:"border-box",position:"absolute",top:0,left:0,opacity:t.opacity,width:n.width,height:n.height,background:n.color},onMouseEnter:t.onMouseEnter,onMouseMove:t.onMouseMove,onMouseLeave:t.onMouseLeave,onClick:t.onClick}),l&&p.jsx(et.span,{"data-testid":"label."+t.id,style:Rr({},s.labels.text,{position:"absolute",display:"flex",top:-5,left:-5,width:10,height:10,justifyContent:"center",alignItems:"center",whiteSpace:"nowrap",color:t.labelTextColor,transformOrigin:"center center",transform:r2e(n.labelX,n.labelY,n.labelRotation),opacity:n.labelOpacity,pointerEvents:"none"}),children:t.label}),c&&p.jsx(et.span,{"data-testid":"parentLabel."+t.id,style:Rr({},s.labels.text,{position:"absolute",display:"flex",justifyContent:"flex-start",alignItems:"center",whiteSpace:"nowrap",width:10,height:10,color:t.parentLabelTextColor,transformOrigin:"top left",transform:i2e(n.parentLabelX,n.parentLabelY,n.parentLabelRotation),opacity:n.parentLabelOpacity,pointerEvents:"none"}),children:t.parentLabel})]})}),$n={layers:["nodes"],identity:"id",value:"value",tile:"squarify",leavesOnly:!1,innerPadding:0,outerPadding:0,colors:{scheme:"nivo"},colorBy:"pathComponents.1",nodeOpacity:.33,enableLabel:!0,label:"formattedValue",labelSkipSize:0,labelTextColor:{from:"color",modifiers:[["darker",1]]},orientLabel:!0,enableParentLabel:!0,parentLabel:"id",parentLabelSize:20,parentLabelPosition:"top",parentLabelPadding:6,parentLabelTextColor:{from:"color",modifiers:[["darker",1]]},borderWidth:1,borderColor:{from:"color",modifiers:[["darker",1]]},isInteractive:!0,tooltip:a2e,role:"img",animate:!0,motionConfig:"gentle"},Ut=Rr({},$n,{nodeComponent:o2e,defs:[],fill:[]});Rr({},$n,{nodeComponent:s2e});Rr({},$n,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var l2e={binary:Q0e,dice:T7,slice:k7,sliceDice:J0e,squarify:EM},c2e=function(e){var t=e.root,n=e.getValue;return $.useMemo(function(){return R7(t).sum(n)},[t,n])},u2e=function(e){var t=e.data,n=e.width,r=e.height,i=e.identity,o=i===void 0?$n.identity:i,a=e.value,s=a===void 0?$n.value:a,l=e.valueFormat,c=e.leavesOnly,u=c===void 0?$n.leavesOnly:c,d=e.tile,f=d===void 0?$n.tile:d,h=e.innerPadding,m=h===void 0?$n.innerPadding:h,g=e.outerPadding,v=g===void 0?$n.outerPadding:g,b=e.label,y=b===void 0?$n.label:b,x=e.orientLabel,S=x===void 0?$n.orientLabel:x,w=e.enableParentLabel,M=w===void 0?$n.enableParentLabel:w,E=e.parentLabel,H=E===void 0?$n.parentLabel:E,_=e.parentLabelSize,O=_===void 0?$n.parentLabelSize:_,k=e.parentLabelPosition,A=k===void 0?$n.parentLabelPosition:k,j=e.parentLabelPadding,V=j===void 0?$n.parentLabelPadding:j,T=e.colors,L=T===void 0?$n.colors:T,R=e.colorBy,I=R===void 0?$n.colorBy:R,P=e.nodeOpacity,N=P===void 0?$n.nodeOpacity:P,z=e.borderColor,q=z===void 0?$n.borderColor:z,G=e.labelTextColor,Y=G===void 0?$n.labelTextColor:G,ee=e.parentLabelTextColor,Q=ee===void 0?$n.parentLabelTextColor:ee,K=yi(o),J=yi(s),W=Io(l),Z=yi(y),U=yi(H),F=function(me){var ge=me.width,ce=me.height,$e=me.tile,he=me.innerPadding,Ae=me.outerPadding,Ie=me.enableParentLabel,Re=me.parentLabelSize,ke=me.parentLabelPosition,Ye=me.leavesOnly;return $.useMemo(function(){var Xe=X0e().size([ge,ce]).tile(l2e[$e]).round(!0).paddingInner(he).paddingOuter(Ae);if(Ie&&!Ye){var Fe=Re+2*Ae;Xe["padding"+V0e(ke)](Fe)}return Xe},[ge,ce,$e,he,Ae,Ie,Re,ke,Ye])}({width:n,height:r,tile:f,innerPadding:m,outerPadding:v,enableParentLabel:M,parentLabelSize:O,parentLabelPosition:A,leavesOnly:u}),re=c2e({root:t,getValue:J}),B=$.useMemo(function(){var me=V$(re);return F(me),u?me.leaves():me.descendants()},[re,F,u]),ie=$.useMemo(function(){return B.map(function(me){var ge=function(Ae,Ie){var Re=Ae.ancestors().map(function(ke){return Ie(ke.data)}).reverse();return{path:Re.join("."),pathComponents:Re}}(me,K),ce=ge.path,$e=ge.pathComponents,he={id:K(me.data),path:ce,pathComponents:$e,data:Ya(me.data,"children"),x:me.x0,y:me.y0,width:me.x1-me.x0,height:me.y1-me.y0,value:me.value,formattedValue:W(me.value),treeDepth:me.depth,treeHeight:me.height,isParent:me.height>0,isLeaf:me.height===0,parentLabelX:0,parentLabelY:0,parentLabelRotation:0};return he.labelRotation=S&&he.height>he.width?-90:0,A==="top"&&(he.parentLabelX=v+V,he.parentLabelY=v+O/2),A==="right"&&(he.parentLabelX=he.width-v-O/2,he.parentLabelY=he.height-v-V,he.parentLabelRotation=-90),A==="bottom"&&(he.parentLabelX=v+V,he.parentLabelY=he.height-v-O/2),A==="left"&&(he.parentLabelX=v+O/2,he.parentLabelY=he.height-v-V,he.parentLabelRotation=-90),he.label=Z(he),he.parentLabel=U(he),he})},[B,K,W,Z,S,U,O,A,V,v]),oe=Zt(),ve=Mu(L,I),Ce=Er(q,oe),pe=Er(Y,oe),ye=Er(Q,oe),Se=$.useMemo(function(){return ie.map(function(me){var ge=Rr({},me,{color:ve(me),opacity:N});return ge.borderColor=Ce(ge),ge.labelTextColor=pe(ge),ge.parentLabelTextColor=ye(ge),ge})},[ie,ve,N,Ce,pe,ye]);return{hierarchy:re,nodes:Se,layout:F}},d2e=function(e){var t=e.nodes;return $.useMemo(function(){return{nodes:t}},[t])},V2=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,labelX:e.width/2,labelY:e.height/2,labelRotation:e.labelRotation,labelOpacity:1,parentLabelX:e.parentLabelX,parentLabelY:e.parentLabelY,parentLabelRotation:e.parentLabelRotation,parentLabelOpacity:1}},pp=function(e){return{x:e.x+e.width/2,y:e.y+e.height/2,width:0,height:0,color:e.color,labelX:0,labelY:0,labelRotation:e.labelRotation,labelOpacity:0,parentLabelX:0,parentLabelY:0,parentLabelRotation:e.parentLabelRotation,parentLabelOpacity:0}},f2e=$.memo(function(e){var t=e.nodes,n=e.nodeComponent,r=e.borderWidth,i=e.enableLabel,o=e.labelSkipSize,a=e.enableParentLabel,s=function(f,h){var m=h.isInteractive,g=h.onMouseEnter,v=h.onMouseMove,b=h.onMouseLeave,y=h.onClick,x=h.tooltip,S=ui(),w=S.showTooltipFromEvent,M=S.hideTooltip,E=$.useCallback(function(A,j){w($.createElement(x,{node:A}),j,"left")},[w,x]),H=$.useCallback(function(A,j){E(A,j),g==null||g(A,j)},[g,E]),_=$.useCallback(function(A,j){E(A,j),v==null||v(A,j)},[v,E]),O=$.useCallback(function(A,j){M(),b==null||b(A,j)},[b,M]),k=$.useCallback(function(A,j){y==null||y(A,j)},[y]);return $.useMemo(function(){return f.map(function(A){return m?Rr({},A,{onMouseEnter:function(j){return H(A,j)},onMouseMove:function(j){return _(A,j)},onMouseLeave:function(j){return O(A,j)},onClick:function(j){return k(A,j)}}):A})},[m,f,H,_,O,k])}(t,{isInteractive:e.isInteractive,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseLeave:e.onMouseLeave,onClick:e.onClick,tooltip:e.tooltip}),l=Dn(),c=l.animate,u=l.config,d=Cr(s,{keys:function(f){return f.path},initial:V2,from:pp,enter:V2,update:V2,leave:pp,config:u,immediate:!c});return p.jsx(p.Fragment,{children:d(function(f,h){return $.createElement(n,{key:h.path,node:h,animatedProps:f,borderWidth:r,enableLabel:i,labelSkipSize:o,enableParentLabel:a})})})}),h2e=["isInteractive","animate","motionConfig","theme","renderWrapper"],g2e=function(e){var t=e.data,n=e.identity,r=n===void 0?Ut.identity:n,i=e.value,o=i===void 0?Ut.value:i,a=e.valueFormat,s=e.tile,l=s===void 0?Ut.tile:s,c=e.nodeComponent,u=c===void 0?Ut.nodeComponent:c,d=e.innerPadding,f=d===void 0?Ut.innerPadding:d,h=e.outerPadding,m=h===void 0?Ut.outerPadding:h,g=e.leavesOnly,v=g===void 0?Ut.leavesOnly:g,b=e.width,y=e.height,x=e.margin,S=e.layers,w=S===void 0?Ut.layers:S,M=e.colors,E=M===void 0?Ut.colors:M,H=e.colorBy,_=H===void 0?Ut.colorBy:H,O=e.nodeOpacity,k=O===void 0?Ut.nodeOpacity:O,A=e.borderWidth,j=A===void 0?Ut.borderWidth:A,V=e.borderColor,T=V===void 0?Ut.borderColor:V,L=e.defs,R=L===void 0?Ut.defs:L,I=e.fill,P=I===void 0?Ut.fill:I,N=e.enableLabel,z=N===void 0?Ut.enableLabel:N,q=e.label,G=q===void 0?Ut.label:q,Y=e.labelTextColor,ee=Y===void 0?Ut.labelTextColor:Y,Q=e.orientLabel,K=Q===void 0?Ut.orientLabel:Q,J=e.labelSkipSize,W=J===void 0?Ut.labelSkipSize:J,Z=e.enableParentLabel,U=Z===void 0?Ut.enableParentLabel:Z,F=e.parentLabel,re=F===void 0?Ut.parentLabel:F,B=e.parentLabelSize,ie=B===void 0?Ut.parentLabelSize:B,oe=e.parentLabelPosition,ve=oe===void 0?Ut.parentLabelPosition:oe,Ce=e.parentLabelPadding,pe=Ce===void 0?Ut.parentLabelPadding:Ce,ye=e.parentLabelTextColor,Se=ye===void 0?Ut.parentLabelTextColor:ye,me=e.isInteractive,ge=me===void 0?Ut.isInteractive:me,ce=e.onMouseEnter,$e=e.onMouseMove,he=e.onMouseLeave,Ae=e.onClick,Ie=e.tooltip,Re=Ie===void 0?Ut.tooltip:Ie,ke=e.role,Ye=e.ariaLabel,Xe=e.ariaLabelledBy,Fe=e.ariaDescribedBy,je=Za(b,y,x),Qe=je.margin,Ze=je.innerWidth,qe=je.innerHeight,de=je.outerWidth,He=je.outerHeight,Ke=u2e({data:t,identity:r,value:o,valueFormat:a,leavesOnly:v,width:Ze,height:qe,tile:l,innerPadding:f,outerPadding:m,colors:E,colorBy:_,nodeOpacity:k,borderColor:T,label:G,labelTextColor:ee,orientLabel:K,enableParentLabel:U,parentLabel:re,parentLabelSize:ie,parentLabelPosition:ve,parentLabelPadding:pe,parentLabelTextColor:Se}).nodes,nt={nodes:null};w.includes("nodes")&&(nt.nodes=p.jsx(f2e,{nodes:Ke,nodeComponent:u,borderWidth:j,enableLabel:z,labelSkipSize:W,enableParentLabel:U,isInteractive:ge,onMouseEnter:ce,onMouseMove:$e,onMouseLeave:he,onClick:Ae,tooltip:Re},"nodes"));var Ne=d2e({nodes:Ke}),ze=$7(R,Ke,P);return p.jsx(wl,{width:de,height:He,margin:Qe,defs:ze,role:ke,ariaLabel:Ye,ariaLabelledBy:Xe,ariaDescribedBy:Fe,children:w.map(function(De,Je){var tt;return typeof De=="function"?p.jsx($.Fragment,{children:$.createElement(De,Ne)},Je):(tt=nt==null?void 0:nt[De])!=null?tt:null})})},v2e=function(e){var t=e.isInteractive,n=t===void 0?Ut.isInteractive:t,r=e.animate,i=r===void 0?Ut.animate:r,o=e.motionConfig,a=o===void 0?Ut.motionConfig:o,s=e.theme,l=e.renderWrapper,c=e2e(e,h2e);return p.jsx(Ua,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(g2e,Rr({isInteractive:n},c))})},m2e=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(v2e,Rr({width:n,height:r},e))}})};function p2e(e,t){if(e.startsWith("rgba"))return e.replace(/rgba?\((\d+), (\d+), (\d+),? ([\d.]+)?\)/,(n,r,i,o,a)=>`rgba(${r}, ${i}, ${o}, ${t})`);if(e.startsWith("rgb"))return e.replace(/rgb\((\d+), (\d+), (\d+)\)/,(n,r,i,o)=>`rgba(${r}, ${i}, ${o}, ${t})`);if(e.startsWith("hsl"))return e.replace(/hsl\((\d+), (\d+)%?, (\d+)%?\)/,(n,r,i,o)=>`hsla(${r}, ${i}%, ${o}%, ${t})`);if(e.startsWith("hsla"))return e.replace(/hsla?\((\d+), (\d+)%?, (\d+)%?,? ([\d.]+)?\)/,(n,r,i,o,a)=>`hsla(${r}, ${i}%, ${o}%, ${t})`);if(e.startsWith("#")){const n=b2e(e);return`rgba(${n.r}, ${n.g}, ${n.b}, ${t})`}throw new Error("Unsupported color format")}function b2e(e){const t=e.startsWith("#")?e.slice(1):e,n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16);return{r:n,g:r,b:i}}const y2e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},C2e=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;y2e(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},x2e=({treeMapData:e,style:t={},colors:n={scheme:"nivo"},identity:r="name",value:i="loc",margin:o={},nodeOpacity:a=.67,labelTextColor:s="black",borderColor:l="white",labelTitle:c="name",labelTitleSize:u=16,labelText:d="name",labelTextSize:f=12,labelPadding:h=10,labelGap:m=10,labelLineHeight:g=14,tooltip:v=null})=>{const b=$.useRef(null),[y,x]=$.useState({width:0,height:0});$.useEffect(()=>{if(!(b!=null&&b.current))return;const M=()=>{const H=b.current.getBoundingClientRect();x({width:H.width,height:H.height})},E=new ResizeObserver(M);return E.observe(b==null?void 0:b.current),M(),()=>{E.disconnect()}},[]);const S=({node:M})=>{var L,R;const E=$.useRef(null),H=$.useRef(null),[_,O]=$.useState(!1),[k,A]=$.useState(!1),j=()=>{if(!(E!=null&&E.current)||!(H!=null&&H.current))return;const I=E.current.getBoundingClientRect(),P=H.current.getBoundingClientRect(),N=Math.max([P,I]);O(I.height>M.height-h*2||I.width>M.width-h*2),A(P.height+I.height+g>M.height-h*2||N>M.width-h*2)};$.useEffect(()=>{j()},[]);const V=((L=M==null?void 0:M.data)==null?void 0:L[d])||"Text",T=C2e(V,M.width-h*2,f);return M.isParent?p.jsx(p.Fragment,{}):p.jsxs("g",{transform:`translate(${M.x}, ${M.y})`,children:[p.jsx("rect",{width:M.width,height:M.height,style:{fill:p2e(M.color,a),stroke:l,strokeWidth:1}}),!_&&p.jsx("text",{ref:E,dominantBaseline:"hanging",x:h,y:h,style:{fill:s,font:"var(--gf-label-lg-default)",fontWeight:"bold",fontSize:u},children:((R=M==null?void 0:M.data)==null?void 0:R[c])||"Title"}),!_&&!k&&p.jsx("text",{ref:H,dominantBaseline:"hanging",children:T.map((I,P)=>p.jsx("tspan",{x:h,y:h+u+m+g*P,style:{fill:s,font:"var(--gf-label-lg-default)",fontSize:f},children:I},P))})]})},w=({nodes:M})=>M.map(E=>p.jsx(S,{node:E},E.id));return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{gap:16,vertical:!0,children:[p.jsx("div",{ref:b,style:{width:"100%",height:600,...t},children:p.jsx(m2e,{data:e,colors:n,identity:r,value:i,margin:{top:10,right:10,bottom:10,left:10,...o},enableParentLabel:!1,enableLabel:!1,nodeOpacity:0,borderWidth:0,tooltip:({node:M})=>p.jsx(Un,{body:(v==null?void 0:v({node:M}))||p.jsx("span",{children:"Treemap tooltip"})}),layers:[w,"nodes"]})}),p.jsx("p",{style:{padding:"0 10px",fontFamily:"Roboto, sans-serif",fontSize:14,lineHeight:"22px",color:"#475467"},children:"In de grafiek hierboven zijn alle afvalstromen uitgesplitst per EURAL-code, een zescijferige code uit de Europese Afvallijst (EWL) die in heel Europa wordt gebruikt om afval te classificeren. De code geeft de bron van het afval aan, het proces of de activiteit waaruit het afkomstig is en het specifieke type afval, zoals bouw- of huishoudelijk afval. Een asterisk (*) achter de code betekent dat het afval gevaarlijk is."})]})]})};var w2e=bu,S2e=0;function $2e(e){var t=++S2e;return w2e(e)+t}var M2e=$2e;const _2e=xn(M2e);function hr(){return hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hr.apply(this,arguments)}var j7=$.memo(function(e){var t=e.point;return p.jsx(Is,{id:p.jsxs("span",{children:["x: ",p.jsx("strong",{children:t.data.xFormatted}),", y:"," ",p.jsx("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),VM=$.memo(function(e){var t=e.slice,n=e.axis,r=Zt(),i=n==="x"?"y":"x";return p.jsx(mw,{rows:t.points.map(function(o){return[p.jsx(Q1,{color:o.serieColor,style:r.tooltip.chip},"chip"),o.serieId,p.jsx("span",{style:r.tooltip.tableCellValue,children:o.data[i+"Formatted"]},"value")]})})}),OM={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:j7,enableSlices:!1,debugSlices:!1,sliceTooltip:VM,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},Mo=hr({},OM,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img"});hr({},OM,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var H2e=function(e){var t=e.curve;return $.useMemo(function(){return qc().defined(function(n){return n.x!==null&&n.y!==null}).x(function(n){return n.x}).y(function(n){return n.y}).curve(JS(t))},[t])},E2e=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return $.useMemo(function(){return bS().defined(function(i){return i.x!==null&&i.y!==null}).x(function(i){return i.x}).y1(function(i){return i.y}).curve(JS(t)).y0(n(r))},[t,n,r])},V2e=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,i=e.width,o=e.height;return $.useMemo(function(){if(n===!1)return[];if(n==="x"){var a=new Map;return r.forEach(function(l){l.data.x!==null&&l.data.y!==null&&(a.has(l.x)?a.get(l.x).push(l):a.set(l.x,[l]))}),Array.from(a.entries()).sort(function(l,c){return l[0]-c[0]}).map(function(l,c,u){var d,f,h=l[0],m=l[1],g=u[c-1],v=u[c+1];return d=g?h-(h-g[0])/2:h,f=v?h-d+(v[0]-h)/2:i-d,{id:"slice:"+t+":"+h,x0:d,x:h,y0:0,y:0,width:f,height:o,points:m.reverse()}})}if(n==="y"){var s=new Map;return r.forEach(function(l){l.data.x!==null&&l.data.y!==null&&(s.has(l.y)?s.get(l.y).push(l):s.set(l.y,[l]))}),Array.from(s.entries()).sort(function(l,c){return l[0]-c[0]}).map(function(l,c,u){var d,f,h=l[0],m=l[1],g=u[c-1],v=u[c+1];return d=g?h-(h-g[0])/2:h,f=v?h-d+(v[0]-h)/2:o-d,{id:h,x0:0,x:0,y0:d,y:h,width:i,height:f,points:m.reverse()}})}},[t,n,o,r,i])},O2e="line",RM=function(e){var t=e.data,n=e.xScale,r=n===void 0?Mo.xScale:n,i=e.xFormat,o=e.yScale,a=o===void 0?Mo.yScale:o,s=e.yFormat,l=e.width,c=e.height,u=e.colors,d=u===void 0?Mo.colors:u,f=e.curve,h=f===void 0?Mo.curve:f,m=e.areaBaselineValue,g=m===void 0?Mo.areaBaselineValue:m,v=e.pointColor,b=v===void 0?Mo.pointColor:v,y=e.pointBorderColor,x=y===void 0?Mo.pointBorderColor:y,S=e.enableSlices,w=S===void 0?Mo.enableSlicesTooltip:S,M=$.useState(_2e(O2e))[0],E=Io(i),H=Io(s),_=Mu(d,"id"),O=Zt(),k=Er(b,O),A=Er(x,O),j=$.useState([]),V=j[0],T=j[1],L=$.useMemo(function(){return F$(t.filter(function(Q){return V.indexOf(Q.id)===-1}),r,a,l,c)},[t,V,r,a,l,c]),R=L.xScale,I=L.yScale,P=L.series,N=$.useMemo(function(){var Q=t.map(function(J){return{id:J.id,label:J.id,color:_(J)}}),K=Q.map(function(J){return hr({},P.find(function(W){return W.id===J.id}),{color:J.color})}).filter(function(J){return!!J.id});return{legendData:Q.map(function(J){return hr({},J,{hidden:!K.find(function(W){return W.id===J.id})})}).reverse(),series:K}},[t,P,_]),z=N.legendData,q=N.series,G=$.useCallback(function(Q){T(function(K){return K.indexOf(Q)>-1?K.filter(function(J){return J!==Q}):[].concat(K,[Q])})},[]),Y=function(Q){var K=Q.series,J=Q.getPointColor,W=Q.getPointBorderColor,Z=Q.formatX,U=Q.formatY;return $.useMemo(function(){return K.reduce(function(F,re){return[].concat(F,re.data.filter(function(B){return B.position.x!==null&&B.position.y!==null}).map(function(B,ie){var oe={id:re.id+"."+ie,index:F.length+ie,serieId:re.id,serieColor:re.color,x:B.position.x,y:B.position.y};return oe.color=J(re),oe.borderColor=W(oe),oe.data=hr({},B.data,{xFormatted:Z(B.data.x),yFormatted:U(B.data.y)}),oe}))},[])},[K,J,W,Z,U])}({series:q,getPointColor:k,getPointBorderColor:A,formatX:E,formatY:H}),ee=V2e({componentId:M,enableSlices:w,points:Y,width:l,height:c});return{legendData:z,toggleSerie:G,lineGenerator:H2e({curve:h}),areaGenerator:E2e({curve:h,yScale:I,areaBaselineValue:g}),getColor:_,series:q,xScale:R,yScale:I,slices:ee,points:Y}},R2e=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,i=e.fill,o=e.path,a=Dn(),s=a.animate,l=a.config,c=jf(o),u=Qt({color:r,config:l,immediate:!s});return p.jsx(et.path,{d:c,fill:i||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},T2e=$.memo(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,i=e.lines.slice(0).reverse();return p.jsx("g",{children:i.map(function(o){return p.jsx(R2e,hr({path:t(o.data.map(function(a){return a.position}))},hr({areaOpacity:n,areaBlendMode:r},o)),o.id)})})}),k2e=$.memo(function(e){var t=e.lineGenerator,n=e.points,r=e.color,i=e.thickness,o=$.useMemo(function(){return t(n)},[t,n]),a=jf(o);return p.jsx(et.path,{d:a,fill:"none",strokeWidth:i,stroke:r})}),j2e=$.memo(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(i){var o=i.id,a=i.data,s=i.color;return p.jsx(k2e,{id:o,points:a.map(function(l){return l.position}),lineGenerator:n,color:s,thickness:r},o)})}),L2e=$.memo(function(e){var t=e.slice,n=e.slices,r=e.axis,i=e.debug,o=e.tooltip,a=e.isCurrent,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd,g=ui(),v=g.showTooltipFromEvent,b=g.hideTooltip,y=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),s(t),l&&l(t,_)},[v,o,t,r,s,l]),x=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),c&&c(t,_)},[v,o,t,r,c]),S=$.useCallback(function(_){b(),s(null),u&&u(t,_)},[b,s,u,t]),w=$.useCallback(function(_){d&&d(t,_)},[t,d]),M=$.useCallback(function(_){v($.createElement(o,{slice:t,axis:r}),_,"right"),s(t),f&&f(t,_)},[r,f,s,v,t,o]),E=$.useCallback(function(_){var O=_.touches[0],k=document.elementFromPoint(O.clientX,O.clientY),A=k==null?void 0:k.getAttribute("data-ref");if(A){var j=n.find(function(V){return V.id===A});j&&(v($.createElement(o,{slice:j,axis:r}),_,"right"),s(j))}h&&h(t,_)},[r,h,s,v,t,n,o]),H=$.useCallback(function(_){b(),s(null),m&&m(t,_)},[b,s,m,t]);return p.jsx("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:i?1:0,strokeOpacity:.75,fill:"red",fillOpacity:a&&i?.35:0,onMouseEnter:y,onMouseMove:x,onMouseLeave:S,onClick:w,onTouchStart:M,onTouchMove:E,onTouchEnd:H,"data-ref":t.id})}),P2e=$.memo(function(e){var t=e.slices,n=e.axis,r=e.debug,i=e.height,o=e.tooltip,a=e.current,s=e.setCurrent,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,m=e.onTouchEnd;return t.map(function(g){return p.jsx(L2e,{slice:g,slices:t,axis:n,debug:r,height:i,tooltip:o,setCurrent:s,isCurrent:a!==null&&a.id===g.id,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:m},g.id)})}),I2e=$.memo(function(e){var t=e.points,n=e.symbol,r=e.size,i=e.borderWidth,o=e.enableLabel,a=e.label,s=e.labelYOffset,l=Zt(),c=Mie(a),u=t.slice(0).reverse().map(function(d){return{id:d.id,x:d.x,y:d.y,datum:d.data,fill:d.color,stroke:d.borderColor,label:o?c(d):null}});return p.jsx("g",{children:u.map(function(d){return p.jsx(wie,{x:d.x,y:d.y,datum:d.datum,symbol:n,size:r,color:d.fill,borderWidth:i,borderColor:d.stroke,label:d.label,labelYOffset:s,theme:l},d.id)})})}),A2e=$.memo(function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,o=e.setCurrent,a=e.onMouseEnter,s=e.onMouseMove,l=e.onMouseLeave,c=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,h=e.tooltip,m=e.debug,g=e.enableTouchCrosshair,v=ui(),b=v.showTooltipAt,y=v.hideTooltip,x=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),a&&a(O,k)},[b,h,a,i]),S=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),s&&s(O,k)},[b,h,i.left,i.top,s]),w=$.useCallback(function(O,k){y(),l&&l(O,k)},[y,l]),M=$.useCallback(function(O,k){c&&c(O,k)},[c]),E=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),u&&u(O,k)},[i.left,i.top,u,b,h]),H=$.useCallback(function(O,k){b($.createElement(h,{point:O}),[O.x+i.left,O.y+i.top],"top"),d&&d(O,k)},[i.left,i.top,d,b,h]),_=$.useCallback(function(O,k){y(),f&&f(O,k)},[f,y]);return p.jsx(eM,{nodes:t,width:n,height:r,setCurrent:o,onMouseEnter:x,onMouseMove:S,onMouseLeave:w,onClick:M,onTouchStart:E,onTouchMove:H,onTouchEnd:_,enableTouchCrosshair:g,debug:m})}),N2e=g$(function(e){var t=e.data,n=e.xScale,r=n===void 0?{type:"point"}:n,i=e.xFormat,o=e.yScale,a=o===void 0?{type:"linear",min:0,max:"auto"}:o,s=e.yFormat,l=e.layers,c=l===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:l,u=e.curve,d=u===void 0?"linear":u,f=e.areaBaselineValue,h=f===void 0?0:f,m=e.colors,g=m===void 0?{scheme:"nivo"}:m,v=e.margin,b=e.width,y=e.height,x=e.axisTop,S=e.axisRight,w=e.axisBottom,M=w===void 0?{}:w,E=e.axisLeft,H=E===void 0?{}:E,_=e.enableGridX,O=_===void 0||_,k=e.enableGridY,A=k===void 0||k,j=e.gridXValues,V=e.gridYValues,T=e.lineWidth,L=T===void 0?2:T,R=e.enableArea,I=R!==void 0&&R,P=e.areaOpacity,N=P===void 0?.2:P,z=e.areaBlendMode,q=z===void 0?"normal":z,G=e.enablePoints,Y=G===void 0||G,ee=e.pointSymbol,Q=e.pointSize,K=Q===void 0?6:Q,J=e.pointColor,W=J===void 0?{from:"color"}:J,Z=e.pointBorderWidth,U=Z===void 0?0:Z,F=e.pointBorderColor,re=F===void 0?{theme:"background"}:F,B=e.enablePointLabel,ie=B!==void 0&&B,oe=e.pointLabel,ve=oe===void 0?"data.yFormatted":oe,Ce=e.pointLabelYOffset,pe=e.defs,ye=pe===void 0?[]:pe,Se=e.fill,me=Se===void 0?[]:Se,ge=e.markers,ce=e.legends,$e=ce===void 0?[]:ce,he=e.isInteractive,Ae=he===void 0||he,Ie=e.useMesh,Re=Ie!==void 0&&Ie,ke=e.debugMesh,Ye=ke!==void 0&&ke,Xe=e.onMouseEnter,Fe=e.onMouseMove,je=e.onMouseLeave,Qe=e.onClick,Ze=e.onTouchStart,qe=e.onTouchMove,de=e.onTouchEnd,He=e.tooltip,Ke=He===void 0?j7:He,nt=e.enableSlices,Ne=nt!==void 0&&nt,ze=e.debugSlices,De=ze!==void 0&&ze,Je=e.sliceTooltip,tt=Je===void 0?VM:Je,Be=e.enableCrosshair,Le=Be===void 0||Be,ut=e.crosshairType,pt=ut===void 0?"bottom-left":ut,Ee=e.enableTouchCrosshair,fe=Ee!==void 0&&Ee,we=e.role,Ve=we===void 0?"img":we,Ge=Za(b,y,v),We=Ge.margin,rt=Ge.innerWidth,X=Ge.innerHeight,ae=Ge.outerWidth,se=Ge.outerHeight,Oe=RM({data:t,xScale:r,xFormat:i,yScale:a,yFormat:s,width:rt,height:X,colors:g,curve:d,areaBaselineValue:h,pointColor:W,pointBorderColor:re,enableSlices:Ne}),it=Oe.legendData,at=Oe.toggleSerie,st=Oe.lineGenerator,ft=Oe.areaGenerator,be=Oe.series,xe=Oe.xScale,Te=Oe.yScale,ot=Oe.slices,vt=Oe.points,wt=Zt(),ht=Er(W,wt),Ot=Er(re,wt),rn=$.useState(null),At=rn[0],hn=rn[1],lr=$.useState(null),Ft=lr[0],Tn=lr[1],lt={grid:p.jsx(Y$,{theme:wt,width:rt,height:X,xScale:O?xe:null,yScale:A?Te:null,xValues:j,yValues:V},"grid"),markers:p.jsx(h$,{markers:ge,width:rt,height:X,xScale:xe,yScale:Te,theme:wt},"markers"),axes:p.jsx(G$,{xScale:xe,yScale:Te,width:rt,height:X,theme:wt,top:x,right:S,bottom:M,left:H},"axes"),areas:null,lines:p.jsx(j2e,{lines:be,lineGenerator:st,lineWidth:L},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:$e.map(function(cn,gn){return p.jsx(Pf,hr({},cn,{containerWidth:rt,containerHeight:X,data:cn.data||it,theme:wt,toggleSerie:cn.toggleSerie?at:void 0}),"legend."+gn)})},_n=$7(ye,be,me);return I&&(lt.areas=p.jsx(T2e,{areaGenerator:ft,areaOpacity:N,areaBlendMode:q,lines:be},"areas")),Ae&&Ne!==!1&&(lt.slices=p.jsx(P2e,{slices:ot,axis:Ne,debug:De,height:X,tooltip:tt,current:Ft,setCurrent:Tn,onMouseEnter:Xe,onMouseMove:Fe,onMouseLeave:je,onClick:Qe,onTouchStart:Ze,onTouchMove:qe,onTouchEnd:de},"slices")),Y&&(lt.points=p.jsx(I2e,{points:vt,symbol:ee,size:K,color:ht,borderWidth:U,borderColor:Ot,enableLabel:ie,label:ve,labelYOffset:Ce},"points")),Ae&&Le&&(At!==null&&(lt.crosshair=p.jsx(h5,{width:rt,height:X,x:At.x,y:At.y,type:pt},"crosshair")),Ft!==null&&(lt.crosshair=p.jsx(h5,{width:rt,height:X,x:Ft.x,y:Ft.y,type:Ne},"crosshair"))),Ae&&Re&&Ne===!1&&(lt.mesh=p.jsx(A2e,{points:vt,width:rt,height:X,margin:We,current:At,setCurrent:hn,onMouseEnter:Xe,onMouseMove:Fe,onMouseLeave:je,onClick:Qe,onTouchStart:Ze,onTouchMove:qe,onTouchEnd:de,tooltip:Ke,enableTouchCrosshair:fe,debug:Ye},"mesh")),p.jsx(wl,{defs:_n,width:ae,height:se,margin:We,role:Ve,children:c.map(function(cn,gn){return typeof cn=="function"?p.jsx($.Fragment,{children:cn(hr({},e,{innerWidth:rt,innerHeight:X,series:be,slices:ot,points:vt,xScale:xe,yScale:Te,lineGenerator:st,areaGenerator:ft,currentPoint:At,setCurrentPoint:hn,currentSlice:Ft,setCurrentSlice:Tn}))},gn):lt[cn]})})}),F2e=function(e){return p.jsx(Yo,{children:function(t){var n=t.width,r=t.height;return p.jsx(N2e,hr({width:n,height:r},e))}})},D2e=g$(function(e){var t=$.useRef(null),n=e.width,r=e.height,i=e.margin,o=e.pixelRatio,a=o===void 0?typeof window<"u"&&window.devicePixelRatio||1:o,s=e.data,l=e.xScale,c=l===void 0?{type:"point"}:l,u=e.xFormat,d=e.yScale,f=d===void 0?{type:"linear",min:0,max:"auto"}:d,h=e.yFormat,m=e.curve,g=m===void 0?"linear":m,v=e.layers,b=v===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:v,y=e.colors,x=y===void 0?{scheme:"nivo"}:y,S=e.lineWidth,w=S===void 0?2:S,M=e.enableArea,E=M!==void 0&&M,H=e.areaBaselineValue,_=H===void 0?0:H,O=e.areaOpacity,k=O===void 0?.2:O,A=e.enablePoints,j=A===void 0||A,V=e.pointSize,T=V===void 0?6:V,L=e.pointColor,R=L===void 0?{from:"color"}:L,I=e.pointBorderWidth,P=I===void 0?0:I,N=e.pointBorderColor,z=N===void 0?{theme:"background"}:N,q=e.enableGridX,G=q===void 0||q,Y=e.gridXValues,ee=e.enableGridY,Q=ee===void 0||ee,K=e.gridYValues,J=e.axisTop,W=e.axisRight,Z=e.axisBottom,U=Z===void 0?{}:Z,F=e.axisLeft,re=F===void 0?{}:F,B=e.legends,ie=B===void 0?[]:B,oe=e.isInteractive,ve=oe===void 0||oe,Ce=e.debugMesh,pe=Ce!==void 0&&Ce,ye=e.onMouseLeave,Se=e.onClick,me=e.tooltip,ge=me===void 0?j7:me,ce=e.canvasRef,$e=Za(n,r,i),he=$e.margin,Ae=$e.innerWidth,Ie=$e.innerHeight,Re=$e.outerWidth,ke=$e.outerHeight,Ye=Zt(),Xe=$.useState(null),Fe=Xe[0],je=Xe[1],Qe=RM({data:s,xScale:c,xFormat:u,yScale:f,yFormat:h,width:Ae,height:Ie,colors:x,curve:g,areaBaselineValue:_,pointColor:R,pointBorderColor:z}),Ze=Qe.lineGenerator,qe=Qe.areaGenerator,de=Qe.series,He=Qe.xScale,Ke=Qe.yScale,nt=Qe.points,Ne=O7({points:nt,width:Ae,height:Ie,debug:pe}),ze=Ne.delaunay,De=Ne.voronoi;$.useEffect(function(){ce&&(ce.current=t.current),t.current.width=Re*a,t.current.height=ke*a;var fe=t.current.getContext("2d");fe.scale(a,a),fe.fillStyle=Ye.background,fe.fillRect(0,0,Re,ke),fe.translate(he.left,he.top),b.forEach(function(we){if(typeof we=="function"&&we({ctx:fe,innerWidth:Ae,innerHeight:Ie,series:de,points:nt,xScale:He,yScale:Ke,lineWidth:w,lineGenerator:Ze,areaGenerator:qe,currentPoint:Fe,setCurrentPoint:je}),we==="grid"&&Ye.grid.line.strokeWidth>0&&(fe.lineWidth=Ye.grid.line.strokeWidth,fe.strokeStyle=Ye.grid.line.stroke,G&&Cd(fe,{width:Ae,height:Ie,scale:He,axis:"x",values:Y}),Q&&Cd(fe,{width:Ae,height:Ie,scale:Ke,axis:"y",values:K})),we==="axes"&&K$(fe,{xScale:He,yScale:Ke,width:Ae,height:Ie,top:J,right:W,bottom:U,left:re,theme:Ye}),we==="areas"&&E===!0){fe.save(),fe.globalAlpha=k,qe.context(fe);for(var Ve=de.length-1;Ve>=0;Ve--)fe.fillStyle=de[Ve].color,fe.beginPath(),qe(de[Ve].data.map(function(We){return We.position})),fe.fill();fe.restore()}if(we==="lines"&&(Ze.context(fe),de.forEach(function(We){fe.strokeStyle=We.color,fe.lineWidth=w,fe.beginPath(),Ze(We.data.map(function(rt){return rt.position})),fe.stroke()})),we==="points"&&j===!0&&T>0&&nt.forEach(function(We){fe.fillStyle=We.color,fe.beginPath(),fe.arc(We.x,We.y,T/2,0,2*Math.PI),fe.fill(),P>0&&(fe.strokeStyle=We.borderColor,fe.lineWidth=P,fe.stroke())}),we==="mesh"&&pe===!0&&(tM(fe,De),Fe&&nM(fe,De,Fe.index)),we==="legends"){var Ge=de.map(function(We){return{id:We.id,label:We.id,color:We.color}}).reverse();ie.forEach(function(We){x$(fe,hr({},We,{data:We.data||Ge,containerWidth:Ae,containerHeight:Ie,theme:Ye}))})}})},[t,Re,ke,b,Ye,Ze,de,He,Ke,G,Y,Q,K,J,W,U,re,ie,nt,j,T,Fe]);var Je=$.useCallback(function(fe){var we=S7(t.current,fe),Ve=we[0],Ge=we[1];if(!v$(he.left,he.top,Ae,Ie,Ve,Ge))return null;var We=ze.find(Ve-he.left,Ge-he.top);return nt[We]},[t,he,Ae,Ie,ze]),tt=ui(),Be=tt.showTooltipFromEvent,Le=tt.hideTooltip,ut=$.useCallback(function(fe){var we=Je(fe);je(we),we?Be($.createElement(ge,{point:we}),fe):Le()},[Je,je,Be,Le,ge]),pt=$.useCallback(function(fe){Le(),je(null),Fe&&ye&&ye(Fe,fe)},[Le,je,ye]),Ee=$.useCallback(function(fe){if(Se){var we=Je(fe);we&&Se(we,fe)}},[Je,Se]);return p.jsx("canvas",{ref:t,width:Re*a,height:ke*a,style:{width:Re,height:ke,cursor:ve?"auto":"normal"},onMouseEnter:ve?ut:void 0,onMouseMove:ve?ut:void 0,onMouseLeave:ve?pt:void 0,onClick:ve?Ee:void 0})}),z2e=$.forwardRef(function(e,t){return p.jsx(D2e,hr({},e,{canvasRef:t}))});$.forwardRef(function(e,t){return p.jsx(Yo,{children:function(n){var r=n.width,i=n.height;return p.jsx(z2e,hr({width:r,height:i},e,{ref:t}))}})});const B2e=Ct.span`
499
499
  font: var(--gf-label-md-default);
500
500
  color: var(--gf-color-text-secondary);
501
- `,bp={A:"#39b54a",B:"#8cc63f",C:"#d9e021",D:"#fcee21",E:"#fbb03b",F:"#f7931e",G:"#f15a24",H:"#cc3333",I:"#4d4d4d"},W2e={A:"Direct hoogwaardig inzetten",B:"Indirect hoogwaardig inzetten",C:"Voorbereiding voor recycling",D:"Microbiologische verwerking",E:"Grondreiniging",F:"Verbranding met opbrengst",G:"Verbranden",H:"Storten",I:"Opslag"},Z2e=()=>p.jsx("div",{style:{marginTop:10,marginLeft:10,whiteSpace:"nowrap"},children:Object.keys(bp).map((e,t)=>p.jsxs(Ct,{gap:8,align:"center",children:[p.jsx("div",{style:{backgroundColor:bp[e],minWidth:22,minHeight:22,border:"1px solid gray"}}),p.jsx(B2e,{children:`${e} ${W2e[e]}`})]},`legend-${t}`))}),U2e=({trendsData:e,height:t=null,margin:n={},colors:r=null,xLeg:i,yLeg:o,tooltip:a=null})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(ho,{style:{width:"100%"},children:[p.jsx(br,{span:6,children:p.jsx(Z2e,{})}),p.jsx(br,{span:18,children:p.jsx("div",{style:{width:"100%",height:t||600},children:p.jsx(F2e,{data:e,margin:{top:20,right:20,bottom:60,left:90,...n},colors:r||{scheme:"nivo"},xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto",reverse:!1},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:-45,legend:i,legendOffset:50,legendPosition:"middle"},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:o,legendOffset:-70,legendPosition:"middle"},pointSize:10,pointColor:{theme:"background"},pointBorderWidth:2,pointBorderColor:{from:"serieColor"},pointLabelYOffset:-12,useMesh:!0,tooltip:s=>p.jsx(Un,{body:(a==null?void 0:a(s))||p.jsx("span",{children:"Line tooltip"})})})})})]})]}),q2e=yt.h3`
501
+ `,bp={A:"#39b54a",B:"#8cc63f",C:"#d9e021",D:"#fcee21",E:"#fbb03b",F:"#f7931e",G:"#f15a24",H:"#cc3333",I:"#4d4d4d"},W2e={A:"Direct hoogwaardig inzetten",B:"Indirect hoogwaardig inzetten",C:"Voorbereiding voor recycling",D:"Microbiologische verwerking",E:"Grondreiniging",F:"Verbranding met opbrengst",G:"Verbranden",H:"Storten",I:"Opslag"},Z2e=()=>p.jsx("div",{style:{marginTop:10,marginLeft:10,whiteSpace:"nowrap"},children:Object.keys(bp).map((e,t)=>p.jsxs(yt,{gap:8,align:"center",children:[p.jsx("div",{style:{backgroundColor:bp[e],minWidth:22,minHeight:22,border:"1px solid gray"}}),p.jsx(B2e,{children:`${e} ${W2e[e]}`})]},`legend-${t}`))}),U2e=({trendsData:e,height:t=null,margin:n={},colors:r=null,xLeg:i,yLeg:o,tooltip:a=null})=>p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(ho,{style:{width:"100%"},children:[p.jsx(br,{span:6,children:p.jsx(Z2e,{})}),p.jsx(br,{span:18,children:p.jsx("div",{style:{width:"100%",height:t||600},children:p.jsx(F2e,{data:e,margin:{top:20,right:20,bottom:60,left:90,...n},colors:r||{scheme:"nivo"},xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto",reverse:!1},axisTop:null,axisRight:null,axisBottom:{tickSize:5,tickPadding:5,tickRotation:-45,legend:i,legendOffset:50,legendPosition:"middle"},axisLeft:{tickSize:5,tickPadding:5,tickRotation:0,legend:o,legendOffset:-70,legendPosition:"middle"},pointSize:10,pointColor:{theme:"background"},pointBorderWidth:2,pointBorderColor:{from:"serieColor"},pointLabelYOffset:-12,useMesh:!0,tooltip:s=>p.jsx(Un,{body:(a==null?void 0:a(s))||p.jsx("span",{children:"Line tooltip"})})})})})]})]}),q2e=Ct.span`
502
502
  color: var(--gf-color-button-primary);
503
- `,G2e=({selectors:e,setter:t,style:n})=>{const r=24/e.length;return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(ho,{gutter:20,style:{width:"100%",...n},children:e.map((i,o)=>p.jsxs(br,{span:r,children:[p.jsx(q2e,{children:i.title}),p.jsx(Pa,{defaultValue:i.defaultValue,style:{width:"100%"},onChange:a=>{t(i.key,a)},options:i.options})]},`col-${o}`))})]})},yp=yt.span`
503
+ font-size: 16px;
504
+ font-weight: 500;
505
+ line-height: 24px;
506
+ `,G2e=({selectors:e,setter:t,style:n})=>{const r=24/e.length;return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(ho,{gutter:20,style:{width:"100%",...n},children:e.map((i,o)=>p.jsx(br,{span:r,children:p.jsxs(yt,{vertical:!0,gap:10,children:[p.jsx(q2e,{children:i.title}),p.jsx(Pa,{defaultValue:i.defaultValue,style:{width:"100%"},onChange:a=>{t(i.key,a)},options:i.options})]})},`col-${o}`))})]})},yp=Ct.span`
504
507
  font: var(--gf-label-md-default);
505
508
  color: var(--gf-color-text-secondary);
506
509
  `,O2={A:"#39b54a",B:"#8cc63f",C:"#d9e021",D:"#fcee21",E:"#fbb03b",F:"#f7931e",G:"#f15a24",H:"#cc3333",I:"#4d4d4d"},Y2e={A:"Direct hoogwaardig inzetten",B:"Indirect hoogwaardig inzetten",C:"Voorbereiding voor recycling",D:"Microbiologische verwerking",E:"Grondreiniging",F:"Verbranding met opbrengst",G:"Verbranden",H:"Storten",I:"Opslag"},K2e=({data:e,margin:t={},height:n=null,nodeTooltip:r=null,linkTooltip:i=null})=>{e.nodes=e.nodes.map(b=>({...b,nodeColor:O2[b.rank]})),e.links=e.links.map(b=>({...b,startColor:O2[b.target_rank],endColor:O2[b.target_rank]}));const h=b=>`${b.pct>1?b.pct.toFixed(0):b.pct>.1?b.pct.toFixed(1):"<0.1"}%`,m=({node:b})=>{const y=b.sourceLinks.length?-280:30,x=b.height/2-32/2;return p.jsx("g",{transform:`translate(${b.x0+y}, ${b.y0+x})`,children:p.jsx("foreignObject",{width:270,height:32,children:p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",color:"black",textAlign:"center",padding:"2px",border:`2px solid ${b.color}`,whiteSpace:"nowrap"},children:[p.jsx(yp,{children:p.jsx("b",{children:`${b.rank} - ${Y2e[b.rank]}`})}),p.jsx(yp,{children:h(b)})]})})})},g=({nodes:b})=>b.map(y=>p.jsx(m,{node:y},y.id)),v=({nodes:b})=>{function y(S,w){if(!S.length)return{min:null,max:null};let M=S[0][w],E=S[0][w];for(const H of S){const _=H[w];_<M&&(M=_),_>E&&(E=_)}return{min:M,max:E}}const x=y(b,"x0");return p.jsxs(p.Fragment,{children:[p.jsxs("g",{transform:`
@@ -557,25 +560,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
557
560
  L`+r+" "+r+`
558
561
  L0 `+r+`
559
562
  L`+r/2+` 0
560
- `,fill:i,opacity:a,strokeWidth:l,stroke:c===void 0?"transparent":c,style:{pointerEvents:"none"}})})};function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(this,arguments)}var Y5e={top:0,right:0,bottom:0,left:0},z7=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,o=e.itemCount,a=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var l=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:fa({},Y5e,i),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,h=(o-1)*r;return n==="row"?d=a*o+h+c:n==="column"&&(f=s*o+h+u),{width:d,height:f,padding:l}},u_=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},d_=function(e){var t,n,r,i,o,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,i=f/2,a="central",l?(r=d,o="end"):(r=c+u,o="start");break;case"right-to-left":t=d-c,n=(f-c)/2,i=f/2,a="central",l?(r=0,o="start"):(r=d-c-u,o="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,o="middle",l?(i=f,a="alphabetic"):(i=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,o="middle",l?(i=0,a="text-before-edge"):(i=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:o,labelAlignment:a}},K5e={circle:Z5e,diamond:U5e,square:q5e,triangle:G5e},X5e=function(e){var t,n,r,i,o,a,s,l,c,u,d,f=e.x,h=e.y,m=e.width,g=e.height,v=e.data,b=e.direction,y=b===void 0?"left-to-right":b,x=e.justify,S=x!==void 0&&x,w=e.textColor,M=e.background,E=M===void 0?"transparent":M,H=e.opacity,_=H===void 0?1:H,O=e.symbolShape,k=O===void 0?"square":O,A=e.symbolSize,j=A===void 0?16:A,V=e.symbolSpacing,T=V===void 0?8:V,L=e.symbolBorderWidth,R=L===void 0?0:L,I=e.symbolBorderColor,P=I===void 0?"transparent":I,N=e.onClick,z=e.onMouseEnter,q=e.onMouseLeave,G=e.toggleSerie,Y=e.effects,ee=$.useState({}),Q=ee[0],K=ee[1],J=Pn(),W=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on==="hover"}).reduce(function(me,ge){return fa({},me,ge.style)},{});K(Se)}z==null||z(v,ye)},[z,v,Y]),Z=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on!=="hover"}).reduce(function(me,ge){return fa({},me,ge.style)},{});K(Se)}q==null||q(v,ye)},[q,v,Y]),U=d_({direction:y,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:j,symbolSpacing:T,width:m,height:g}),F=U.symbolX,re=U.symbolY,B=U.labelX,ie=U.labelY,oe=U.labelAnchor,ve=U.labelAlignment,Ce=[N,z,q,G].some(function(ye){return ye!==void 0}),pe=typeof k=="function"?k:K5e[k];return p.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:_},children:[p.jsx("rect",{width:m,height:g,fill:(r=Q.itemBackground)!=null?r:E,style:{cursor:Ce?"pointer":"auto"},onClick:function(ye){N==null||N(v,ye),G==null||G(v.id)},onMouseEnter:W,onMouseLeave:Z}),C.createElement(pe,fa({id:v.id,x:F,y:re,size:(i=Q.symbolSize)!=null?i:j,fill:(o=(a=v.fill)!=null?a:v.color)!=null?o:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:R,borderColor:(l=Q.symbolBorderColor)!=null?l:P},v.hidden?J.legends.hidden.symbol:void 0)),p.jsx("text",{textAnchor:oe,style:fa({},A7(J.legends.text),{fill:(c=(u=(d=Q.itemTextColor)!=null?d:w)!=null?u:J.legends.text.fill)!=null?c:"black",dominantBaseline:ve,pointerEvents:"none",userSelect:"none"},v.hidden?J.legends.hidden.text:void 0),x:B,y:ie,children:v.label})]})},Q5e=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,o=e.padding,a=o===void 0?0:o,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemTextColor,v=e.itemBackground,b=v===void 0?"transparent":v,y=e.itemOpacity,x=y===void 0?1:y,S=e.symbolShape,w=e.symbolSize,M=e.symbolSpacing,E=e.symbolBorderWidth,H=e.symbolBorderColor,_=e.onClick,O=e.onMouseEnter,k=e.onMouseLeave,A=e.toggleSerie,j=z7({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:m,direction:i,padding:a}).padding,V=i==="row"?c+m:0,T=i==="column"?u+m:0;return p.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(L,R){return p.jsx(X5e,{data:L,x:R*V+j.left,y:R*T+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:g,background:b,opacity:x,symbolShape:S,symbolSize:w,symbolSpacing:M,symbolBorderWidth:E,symbolBorderColor:H,onClick:_,onMouseEnter:O,onMouseLeave:k,toggleSerie:A},R)})})},J5e=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,o=i===void 0?0:i,a=e.translateY,s=a===void 0?0:a,l=e.anchor,c=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemWidth,v=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,w=e.symbolShape,M=e.symbolSize,E=e.symbolSpacing,H=e.symbolBorderWidth,_=e.symbolBorderColor,O=e.onClick,k=e.onMouseEnter,A=e.onMouseLeave,j=e.toggleSerie,V=e.effects,T=z7({itemCount:t.length,itemsSpacing:m,itemWidth:g,itemHeight:v,direction:c,padding:d}),L=T.width,R=T.height,I=u_({anchor:l,translateX:o,translateY:s,containerWidth:n,containerHeight:r,width:L,height:R}),P=I.x,N=I.y;return p.jsx(Q5e,{data:t,x:P,y:N,direction:c,padding:d,justify:f,effects:V,itemsSpacing:m,itemWidth:g,itemHeight:v,itemDirection:b,itemTextColor:y,itemBackground:x,itemOpacity:S,symbolShape:w,symbolSize:M,symbolSpacing:E,symbolBorderWidth:H,symbolBorderColor:_,onClick:O,onMouseEnter:k,onMouseLeave:A,toggleSerie:typeof j=="boolean"?void 0:j})},ehe={start:"left",middle:"center",end:"right"},the=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,o=t.translateX,a=o===void 0?0:o,s=t.translateY,l=s===void 0?0:s,c=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,m=h!==void 0&&h,g=t.itemsSpacing,v=g===void 0?0:g,b=t.itemWidth,y=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,w=t.itemTextColor,M=t.symbolSize,E=M===void 0?16:M,H=t.symbolSpacing,_=H===void 0?8:H,O=t.theme,k=z7({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:v,direction:u,padding:f}),A=k.width,j=k.height,V=k.padding,T=u_({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:i,width:A,height:j}),L=T.x,R=T.y,I=u==="row"?b+v:0,P=u==="column"?y+v:0;e.save(),e.translate(L,R),e.font=O.legends.text.fontSize+"px "+(O.legends.text.fontFamily||"sans-serif"),n.forEach(function(N,z){var q,G,Y=z*I+V.left,ee=z*P+V.top,Q=d_({direction:S,justify:m,symbolSize:E,symbolSpacing:_,width:b,height:y}),K=Q.symbolX,J=Q.symbolY,W=Q.labelX,Z=Q.labelY,U=Q.labelAnchor,F=Q.labelAlignment;e.fillStyle=(q=N.color)!=null?q:"black",e.fillRect(Y+K,ee+J,E,E),e.textAlign=ehe[U],F==="central"&&(e.textBaseline="middle"),e.fillStyle=(G=w??O.legends.text.fill)!=null?G:"black",e.fillText(String(N.label),Y+W,ee+Z)}),e.restore()};function zt(){return zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zt.apply(this,arguments)}function Sl(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Hp,nhe=function(e){var t=e.bars,n=e.annotations,r=a_({data:t,annotations:n,getPosition:function(i){return{x:i.x+i.width/2,y:i.y+i.height/2}},getDimensions:function(i){var o=i.height,a=i.width;return{width:a,height:o,size:Math.max(a,o)}}});return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(O5e,zt({},i),o)})})},rhe=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return p.jsx(p.Fragment,{children:r.map(function(o,a){var s,l=o[0],c=o[1];return p.jsx(J5e,zt({},l,{containerWidth:t,containerHeight:n,data:(s=l.data)!=null?s:c,toggleSerie:l.toggleSerie&&l.dataFrom==="keys"?i:void 0}),a)})})},ihe=["data"],ohe=function(e){var t,n=e.bar,r=n.data,i=Sl(n,ihe),o=e.style,a=o.borderColor,s=o.color,l=o.height,c=o.labelColor,u=o.labelOpacity,d=o.labelX,f=o.labelY,h=o.transform,m=o.width,g=o.textAnchor,v=e.borderRadius,b=e.borderWidth,y=e.label,x=e.shouldRenderLabel,S=e.isInteractive,w=e.onClick,M=e.onMouseEnter,E=e.onMouseLeave,H=e.tooltip,_=e.isFocusable,O=e.ariaLabel,k=e.ariaLabelledBy,A=e.ariaDescribedBy,j=e.ariaDisabled,V=e.ariaHidden,T=Pn(),L=LM(),R=L.showTooltipFromEvent,I=L.showTooltipAt,P=L.hideTooltip,N=$.useMemo(function(){return function(){return $.createElement(H,zt({},i,r))}},[H,i,r]),z=$.useCallback(function(K){w==null||w(zt({color:i.color},r),K)},[i,r,w]),q=$.useCallback(function(K){return R(N(),K)},[R,N]),G=$.useCallback(function(K){M==null||M(r,K),R(N(),K)},[r,M,R,N]),Y=$.useCallback(function(K){E==null||E(r,K),P()},[r,P,E]),ee=$.useCallback(function(){I(N(),[i.absX+i.width/2,i.absY])},[I,N,i]),Q=$.useCallback(function(){P()},[P]);return p.jsxs(et.g,{transform:h,children:[p.jsx(et.rect,{width:On(m,function(K){return Math.max(K,0)}),height:On(l,function(K){return Math.max(K,0)}),rx:v,ry:v,fill:(t=r.fill)!=null?t:s,strokeWidth:b,stroke:a,focusable:_,tabIndex:_?0:void 0,"aria-label":O?O(r):void 0,"aria-labelledby":k?k(r):void 0,"aria-describedby":A?A(r):void 0,"aria-disabled":j?j(r):void 0,"aria-hidden":V?V(r):void 0,onMouseEnter:S?G:void 0,onMouseMove:S?q:void 0,onMouseLeave:S?Y:void 0,onClick:S?z:void 0,onFocus:S&&_?ee:void 0,onBlur:S&&_?Q:void 0}),x&&p.jsx(et.text,{x:d,y:f,textAnchor:g,dominantBaseline:"central",fillOpacity:u,style:zt({},T.labels.text,{pointerEvents:"none",fill:c}),children:y})]})},ahe=["color","label"],she=function(e){var t=e.color,n=e.label,r=Sl(e,ahe);return p.jsx(g3e,{id:n,value:r.formattedValue,enableChip:!0,color:t})},qt={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelPosition:"middle",labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:she,tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},sn=zt({},qt,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:ohe,defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),An=zt({},qt,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:typeof window<"u"&&(Hp=window.devicePixelRatio)!=null?Hp:1}),f_=function(e,t,n,r,i,o){return D7(r,{all:e.map(t),min:0,max:0},i,o).padding(n)},h_=function(e,t){return e.map(function(n){return zt({},t.reduce(function(r,i){return r[i]=null,r},{}),n)})},t0=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},n0=function(e){return[e,Number(e)]};function g_(e,t,n,r){return e===void 0&&(e=qt.layout),t===void 0&&(t=qt.reverse),n===void 0&&(n=qt.labelPosition),r===void 0&&(r=qt.labelOffset),function(i,o){var a=r*(t?-1:1);if(e==="horizontal"){var s=i/2;return n==="start"?s=t?i:0:n==="end"&&(s=t?0:i),{labelX:s+a,labelY:o/2,textAnchor:n==="middle"?"middle":t?"end":"start"}}var l=o/2;return n==="start"?l=t?0:o:n==="end"&&(l=t?o:0),{labelX:i/2,labelY:l-a,textAnchor:"middle"}}}var lhe=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],B7=function(e,t){return e>t},v_=function(e,t){return e<t},m_=function(e,t){return Array.from(" ".repeat(t-e),function(n,r){return e+r})},che=function(e){return B7(e,0)?0:e},uhe=function(e,t,n,r){var i=e.data,o=e.formatValue,a=e.getColor,s=e.getIndex,l=e.getTooltipLabel,c=e.innerPadding,u=c===void 0?0:c,d=e.keys,f=e.xScale,h=e.yScale,m=e.margin,g=n?v_:B7,v=i.map(t0),b=[];return d.forEach(function(y,x){return m_(0,f.domain().length).forEach(function(S){var w,M,E,H=n0(i[S][y]),_=H[0],O=H[1],k=s(i[S]),A=((w=f(k))!=null?w:0)+t*x+u*x,j=g(M=O,0)?(E=h(M))!=null?E:0:r,V=function(L,R){var I;return g(L,0)?r-R:((I=h(L))!=null?I:0)-r}(O,j),T={id:y,value:_===null?_:O,formattedValue:o(O),hidden:!1,index:S,indexValue:k,data:v[S]};b.push({key:y+"."+T.indexValue,index:b.length,data:T,x:A,y:j,absX:m.left+A,absY:m.top+j,width:t,height:V,color:a(T),label:l(T)})})}),b},dhe=function(e,t,n,r){var i=e.data,o=e.formatValue,a=e.getIndex,s=e.getColor,l=e.getTooltipLabel,c=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,h=e.yScale,m=e.margin,g=n?v_:B7,v=i.map(t0),b=[];return c.forEach(function(y,x){return m_(0,h.domain().length).forEach(function(S){var w,M,E,H=n0(i[S][y]),_=H[0],O=H[1],k=a(i[S]),A=g(M=O,0)?r:(E=f(M))!=null?E:0,j=((w=h(k))!=null?w:0)+t*x+d*x,V=function(L,R){var I;return g(L,0)?((I=f(L))!=null?I:0)-r:r-R}(O,A),T={id:y,value:_===null?_:O,formattedValue:o(O),hidden:!1,index:S,indexValue:k,data:v[S]};b.push({key:y+"."+T.indexValue,index:b.length,data:T,x:A,y:j,absX:m.left+A,absY:m.top+j,width:V,height:t,color:s(T),label:l(T)})})}),b},fhe=function(e){var t,n,r=e.layout,i=e.minValue,o=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=c===void 0?0:c,d=e.innerPadding,f=d===void 0?0:d,h=e.valueScale,m=e.indexScale,g=e.hiddenIds,v=g===void 0?[]:g,b=Sl(e,lhe),y=b.keys.filter(function(N){return!v.includes(N)}),x=h_(b.data,y),S=r==="vertical"?["y","x",s]:["x","y",l],w=S[0],M=S[1],E=S[2],H=f_(x,b.getIndex,u,m,E,M),_=zt({max:o,min:i,reverse:a},h),O=_.min==="auto"?che:function(N){return N},k=x.reduce(function(N,z){return[].concat(N,y.map(function(q){return z[q]}))},[]).filter(Boolean),A=O(Math.min.apply(Math,k)),j=(n=Math.max.apply(Math,k),isFinite(n)?n:0),V=D7(_,{all:k,min:A,max:j},w==="x"?s:l,w),T=r==="vertical"?[H,V]:[V,H],L=T[0],R=T[1],I=(H.bandwidth()-f*(y.length-1))/y.length,P=[zt({},b,{data:x,keys:y,innerPadding:f,xScale:L,yScale:R}),I,_.reverse,(t=V(0))!=null?t:0];return{xScale:L,yScale:R,bars:I>0?r==="vertical"?uhe.apply(void 0,P):dhe.apply(void 0,P):[]}},hhe=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],ghe=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},vhe=function(e,t,n){var r=e.formatValue,i=e.getColor,o=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(h){return c.domain().forEach(function(m,g){var v,b,y=h[g],x=(v=c(o(y.data)))!=null?v:0,S=((b=function(O){return u(O[n?0:1])}(y))!=null?b:0)+.5*s,w=function(O,k){var A;return((A=u(O[n?1:0]))!=null?A:0)-k}(y,S)-s,M=n0(y.data[h.key]),E=M[0],H=M[1],_={id:h.key,value:E===null?E:H,formattedValue:r(H),hidden:!1,index:g,indexValue:m,data:t0(y.data)};f.push({key:h.key+"."+m,index:f.length,data:_,x,y:S,absX:d.left+x,absY:d.top+S,width:t,height:w,color:i(_),label:a(_)})})}),f},mhe=function(e,t,n){var r=e.formatValue,i=e.getColor,o=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(h){return u.domain().forEach(function(m,g){var v,b,y=h[g],x=(v=u(o(y.data)))!=null?v:0,S=((b=function(O){return c(O[n?1:0])}(y))!=null?b:0)+.5*s,w=function(O,k){var A;return((A=c(O[n?0:1]))!=null?A:0)-k}(y,S)-s,M=n0(y.data[h.key]),E=M[0],H=M[1],_={id:h.key,value:E===null?E:H,formattedValue:r(H),hidden:!1,index:g,indexValue:m,data:t0(y.data)};f.push({key:h.key+"."+m,index:f.length,data:_,x:S,y:x,absX:d.left+S,absY:d.top+x,width:w,height:t,color:i(_),label:a(_)})})}),f},phe=function(e){var t,n=e.data,r=e.layout,i=e.minValue,o=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=c===void 0?0:c,d=e.valueScale,f=e.indexScale,h=e.hiddenIds,m=h===void 0?[]:h,g=Sl(e,hhe),v=g.keys.filter(function(I){return!m.includes(I)}),b=fee().keys(v).offset(hee)(h_(n,v)),y=r==="vertical"?["y","x",s]:["x","y",l],x=y[0],S=y[1],w=y[2],M=f_(n,g.getIndex,u,f,w,S),E=zt({max:o,min:i,reverse:a},d),H=(t=ghe(b),d.type==="log"?t.filter(function(I){return I!==0}):t),_=Math.min.apply(Math,H),O=Math.max.apply(Math,H),k=D7(E,{all:H,min:_,max:O},x==="x"?s:l,x),A=r==="vertical"?[M,k]:[k,M],j=A[0],V=A[1],T=g.innerPadding>0?g.innerPadding:0,L=M.bandwidth(),R=[zt({},g,{innerPadding:T,stackedData:b,xScale:j,yScale:V}),L,E.reverse];return{xScale:j,yScale:V,bars:L>0?r==="vertical"?vhe.apply(void 0,R):mhe.apply(void 0,R):[]}},bhe=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,o=e.layout,a=e.legendLabel,s=e.reverse,l=QM(a??(r==="indexes"?"indexValue":"id"));return r==="indexes"?function(c,u,d){var f=L5(c.map(function(h){var m,g;return{id:(m=h.data.indexValue)!=null?m:"",label:d(h.data),hidden:h.data.hidden,color:(g=h.color)!=null?g:"#000"}}),function(h){return h.id});return u==="horizontal"&&f.reverse(),f}(t,o,l):function(c,u,d,f,h,m){var g=L5(c.map(function(v){var b;return{id:v.data.id,label:m(v.data),hidden:v.data.hidden,color:(b=v.color)!=null?b:"#000"}}),function(v){return v.id});return(u==="vertical"&&f==="stacked"&&d==="column"&&h!==!0||u==="horizontal"&&f==="stacked"&&h===!0)&&g.reverse(),g}(t,o,n,i,s,l)},Ep=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},yhe=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},Che=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},xhe=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},p_=function(e){var t=e.indexBy,n=t===void 0?qt.indexBy:t,r=e.keys,i=r===void 0?qt.keys:r,o=e.label,a=o===void 0?qt.label:o,s=e.tooltipLabel,l=s===void 0?qt.tooltipLabel:s,c=e.valueFormat,u=e.colors,d=u===void 0?qt.colors:u,f=e.colorBy,h=f===void 0?qt.colorBy:f,m=e.borderColor,g=m===void 0?qt.borderColor:m,v=e.labelTextColor,b=v===void 0?qt.labelTextColor:v,y=e.groupMode,x=y===void 0?qt.groupMode:y,S=e.layout,w=S===void 0?qt.layout:S,M=e.reverse,E=M===void 0?qt.reverse:M,H=e.data,_=e.minValue,O=_===void 0?qt.minValue:_,k=e.maxValue,A=k===void 0?qt.maxValue:k,j=e.margin,V=e.width,T=e.height,L=e.padding,R=L===void 0?qt.padding:L,I=e.innerPadding,P=I===void 0?qt.innerPadding:I,N=e.valueScale,z=N===void 0?qt.valueScale:N,q=e.indexScale,G=q===void 0?qt.indexScale:q,Y=e.initialHiddenIds,ee=Y===void 0?qt.initialHiddenIds:Y,Q=e.enableLabel,K=Q===void 0?qt.enableLabel:Q,J=e.labelSkipWidth,W=J===void 0?qt.labelSkipWidth:J,Z=e.labelSkipHeight,U=Z===void 0?qt.labelSkipHeight:Z,F=e.legends,re=F===void 0?qt.legends:F,B=e.legendLabel,ie=e.totalsOffset,oe=ie===void 0?qt.totalsOffset:ie,ve=$.useState(ee??[]),Ce=ve[0],pe=ve[1],ye=$.useCallback(function(de){pe(function(He){return He.indexOf(de)>-1?He.filter(function(Ke){return Ke!==de}):[].concat(He,[de])})},[]),Se=R2(n),me=R2(a),ge=R2(l),ce=I7(c),$e=Pn(),he=W5e(d,h),Ae=_p(g,$e),Ie=_p(b,$e),Re=(x==="grouped"?fhe:phe)({layout:w,reverse:E,data:H,getIndex:Se,keys:i,minValue:O,maxValue:A,width:V,height:T,getColor:he,padding:R,innerPadding:P,valueScale:z,indexScale:G,hiddenIds:Ce,formatValue:ce,getTooltipLabel:ge,margin:j}),ke=Re.bars,Ye=Re.xScale,Xe=Re.yScale,Fe=$.useMemo(function(){return ke.filter(function(de){return de.data.value!==null}).map(function(de,He){return zt({},de,{index:He})})},[ke]),je=$.useCallback(function(de){var He=de.width,Ke=de.height;return!!K&&!(W>0&&He<W)&&!(U>0&&Ke<U)},[K,W,U]),Qe=$.useMemo(function(){return i.map(function(de){var He=ke.find(function(Ke){return Ke.data.id===de});return zt({},He,{data:zt({id:de},He==null?void 0:He.data,{hidden:Ce.includes(de)})})})},[Ce,i,ke]),Ze=$.useMemo(function(){return re.map(function(de){return[de,bhe({bars:de.dataFrom==="keys"?Qe:ke,direction:de.direction,from:de.dataFrom,groupMode:x,layout:w,legendLabel:B,reverse:E})]})},[re,Qe,ke,x,w,B,E]),qe=$.useMemo(function(){return function(de,He,Ke,nt,Ne,ze,De){nt===void 0&&(nt=qt.layout),Ne===void 0&&(Ne=qt.groupMode);var Je=[];if(de.length===0)return Je;var tt=new Map,Be=de[0].width,Le=de[0].height;if(Ne==="stacked"){var ut=new Map;de.forEach(function(fe){var we=fe.data,Ve=we.indexValue,Ge=we.value;Ep(tt,Ve,Number(Ge)),yhe(ut,Ve,Number(Ge))}),ut.forEach(function(fe,we){var Ve,Ge,We,rt=tt.get(we)||0;nt==="vertical"?(Ve=He(we),Ge=Ke(fe),We=Ke(fe/2)):(Ve=He(fe),Ge=Ke(we),We=He(fe/2)),Ve+=nt==="vertical"?Be/2:ze,Ge+=nt==="vertical"?-ze:Le/2,Je.push({key:"total_"+we,x:Ve,y:Ge,value:rt,formattedValue:De(rt),animationOffset:We})})}else if(Ne==="grouped"){var pt=new Map,Ee=new Map;de.forEach(function(fe){var we=fe.data,Ve=we.indexValue,Ge=we.value;Ep(tt,Ve,Number(Ge)),Che(pt,Ve,Number(Ge)),xhe(Ee,Ve)}),pt.forEach(function(fe,we){var Ve,Ge,We,rt=tt.get(we)||0,X=Ee.get(we);nt==="vertical"?(Ve=He(we),Ge=Ke(fe),We=Ke(fe/2)):(Ve=He(fe),Ge=Ke(we),We=He(fe/2)),Ve+=nt==="vertical"?X*Be/2:ze,Ge+=nt==="vertical"?-ze:X*Le/2,Je.push({key:"total_"+we,x:Ve,y:Ge,value:rt,formattedValue:De(rt),animationOffset:We})})}return Je}(ke,Ye,Xe,w,x,oe,ce)},[ke,Ye,Xe,w,x,oe,ce]);return{bars:ke,barsWithValue:Fe,xScale:Ye,yScale:Xe,getIndex:Se,getLabel:me,getTooltipLabel:ge,formatValue:ce,getColor:he,getBorderColor:Ae,getLabelColor:Ie,shouldRenderBarLabel:je,hiddenIds:Ce,toggleSerie:ye,legendsWithData:Ze,barTotals:qe}},whe=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,o=i===void 0?sn.layout:i,a=Pn();return Cr(t,{keys:function(s){return s.key},from:function(s){return{x:o==="vertical"?s.x:s.animationOffset,y:o==="vertical"?s.animationOffset:s.y,labelOpacity:0}},enter:function(s){return{x:s.x,y:s.y,labelOpacity:1}},update:function(s){return{x:s.x,y:s.y,labelOpacity:1}},leave:function(s){return{x:o==="vertical"?s.x:s.animationOffset,y:o==="vertical"?s.animationOffset:s.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(s,l){return p.jsx(et.text,{x:s.x,y:s.y,fillOpacity:s.labelOpacity,style:zt({},a.labels.text,{pointerEvents:"none",fill:a.text.fill}),fontWeight:"bold",fontSize:a.labels.text.fontSize,fontFamily:a.labels.text.fontFamily,textAnchor:o==="vertical"?"middle":"start",alignmentBaseline:o==="vertical"?"alphabetic":"middle",children:l.formattedValue},l.key)})},She=["isInteractive","animate","motionConfig","theme","renderWrapper"],$he=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,o=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,m=e.padding,g=e.innerPadding,v=e.axisTop,b=e.axisRight,y=e.axisBottom,x=y===void 0?sn.axisBottom:y,S=e.axisLeft,w=S===void 0?sn.axisLeft:S,M=e.enableGridX,E=M===void 0?sn.enableGridX:M,H=e.enableGridY,_=H===void 0?sn.enableGridY:H,O=e.gridXValues,k=e.gridYValues,A=e.layers,j=A===void 0?sn.layers:A,V=e.barComponent,T=V===void 0?sn.barComponent:V,L=e.enableLabel,R=L===void 0?sn.enableLabel:L,I=e.label,P=e.labelSkipWidth,N=P===void 0?sn.labelSkipWidth:P,z=e.labelSkipHeight,q=z===void 0?sn.labelSkipHeight:z,G=e.labelTextColor,Y=e.labelPosition,ee=Y===void 0?sn.labelPosition:Y,Q=e.labelOffset,K=Q===void 0?sn.labelOffset:Q,J=e.markers,W=J===void 0?sn.markers:J,Z=e.colorBy,U=e.colors,F=e.defs,re=F===void 0?sn.defs:F,B=e.fill,ie=B===void 0?sn.fill:B,oe=e.borderRadius,ve=oe===void 0?sn.borderRadius:oe,Ce=e.borderWidth,pe=Ce===void 0?sn.borderWidth:Ce,ye=e.borderColor,Se=e.annotations,me=Se===void 0?sn.annotations:Se,ge=e.legendLabel,ce=e.tooltipLabel,$e=e.valueFormat,he=e.isInteractive,Ae=he===void 0?sn.isInteractive:he,Ie=e.tooltip,Re=Ie===void 0?sn.tooltip:Ie,ke=e.onClick,Ye=e.onMouseEnter,Xe=e.onMouseLeave,Fe=e.legends,je=e.role,Qe=je===void 0?sn.role:je,Ze=e.ariaLabel,qe=e.ariaLabelledBy,de=e.ariaDescribedBy,He=e.isFocusable,Ke=He===void 0?sn.isFocusable:He,nt=e.barAriaLabel,Ne=e.barAriaLabelledBy,ze=e.barAriaDescribedBy,De=e.barAriaHidden,Je=e.barAriaDisabled,tt=e.initialHiddenIds,Be=e.enableTotals,Le=Be===void 0?sn.enableTotals:Be,ut=e.totalsOffset,pt=ut===void 0?sn.totalsOffset:ut,Ee=di(),fe=Ee.animate,we=Ee.config,Ve=AM(o,a,i),Ge=Ve.outerWidth,We=Ve.outerHeight,rt=Ve.margin,X=Ve.innerWidth,ae=Ve.innerHeight,se=p_({indexBy:n,label:I,tooltipLabel:ce,valueFormat:$e,colors:U,colorBy:Z,borderColor:ye,labelTextColor:G,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:rt,width:X,height:ae,padding:m,innerPadding:g,valueScale:f,indexScale:h,enableLabel:R,labelSkipWidth:N,labelSkipHeight:q,legends:Fe,legendLabel:ge,initialHiddenIds:tt,totalsOffset:pt}),Oe=se.bars,it=se.barsWithValue,at=se.xScale,st=se.yScale,ft=se.getLabel,be=se.getTooltipLabel,xe=se.getBorderColor,Te=se.getLabelColor,ot=se.shouldRenderBarLabel,vt=se.toggleSerie,wt=se.legendsWithData,ht=se.barTotals,Ot=se.getColor,rn=g_(l,c,ee,K),At=Cr(it,{keys:function(lt){return lt.key},from:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:0,labelColor:Te(lt),labelOpacity:0},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+(lt.y+lt.height)+")",width:lt.width},l==="vertical"?{}:{height:lt.height,transform:"translate("+lt.x+", "+lt.y+")",width:0})},enter:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:lt.height,labelColor:Te(lt),labelOpacity:1},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+lt.y+")",width:lt.width})},update:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:lt.height,labelColor:Te(lt),labelOpacity:1},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+lt.y+")",width:lt.width})},leave:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:0,labelColor:Te(lt),labelOpacity:0},rn(lt.width,lt.height),{labelY:0,transform:"translate("+lt.x+", "+(lt.y+lt.height)+")",width:lt.width},l==="vertical"?{}:zt({},rn(lt.width,lt.height),{labelX:0,height:lt.height,transform:"translate("+lt.x+", "+lt.y+")",width:0}))},config:we,immediate:!fe,initial:fe?void 0:null}),hn=$.useMemo(function(){return{borderRadius:ve,borderWidth:pe,enableLabel:R,isInteractive:Ae,labelSkipWidth:N,labelSkipHeight:q,onClick:ke,onMouseEnter:Ye,onMouseLeave:Xe,getTooltipLabel:be,tooltip:Re,isFocusable:Ke,ariaLabel:nt,ariaLabelledBy:Ne,ariaDescribedBy:ze,ariaHidden:De,ariaDisabled:Je}},[ve,pe,R,be,Ae,q,N,ke,Ye,Xe,Re,Ke,nt,Ne,ze,De,Je]),lr=Q3e(re,Oe,ie,{dataKey:"data",targetKey:"data.fill"}),Ft={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};j.includes("annotations")&&(Ft.annotations=p.jsx(nhe,{bars:Oe,annotations:me},"annotations")),j.includes("axes")&&(Ft.axes=p.jsx(v5e,{xScale:at,yScale:st,width:X,height:ae,top:v,right:b,bottom:x,left:w},"axes")),j.includes("bars")&&(Ft.bars=p.jsx($.Fragment,{children:At(function(lt,_n){return $.createElement(T,zt({},hn,{bar:_n,style:lt,shouldRenderLabel:ot(_n),label:ft(_n.data)}))})},"bars")),j.includes("grid")&&(Ft.grid=p.jsx(p5e,{width:X,height:ae,xScale:E?at:null,yScale:_?st:null,xValues:O,yValues:k},"grid")),j.includes("legends")&&(Ft.legends=p.jsx(rhe,{width:X,height:ae,legends:wt,toggleSerie:vt},"legends")),j.includes("markers")&&(Ft.markers=p.jsx(q3e,{markers:W,width:X,height:ae,xScale:at,yScale:st},"markers")),j.includes("totals")&&Le&&(Ft.totals=p.jsx(whe,{data:ht,springConfig:we,animate:fe,layout:l},"totals"));var Tn=$.useMemo(function(){return zt({},hn,{margin:rt,width:o,height:a,innerWidth:X,innerHeight:ae,bars:Oe,legendData:wt,enableLabel:R,xScale:at,yScale:st,tooltip:Re,getTooltipLabel:be,onClick:ke,onMouseEnter:Ye,onMouseLeave:Xe,getColor:Ot})},[hn,rt,o,a,X,ae,Oe,wt,R,at,st,Re,be,ke,Ye,Xe,Ot]);return p.jsx(qM,{width:Ge,height:We,margin:rt,defs:lr,role:Qe,ariaLabel:Ze,ariaLabelledBy:qe,ariaDescribedBy:de,isFocusable:Ke,children:j.map(function(lt,_n){var cn;return typeof lt=="function"?p.jsx($.Fragment,{children:$.createElement(lt,Tn)},_n):(cn=Ft==null?void 0:Ft[lt])!=null?cn:null})})},Mhe=function(e){var t=e.isInteractive,n=t===void 0?sn.isInteractive:t,r=e.animate,i=r===void 0?sn.animate:r,o=e.motionConfig,a=o===void 0?sn.motionConfig:o,s=e.theme,l=e.renderWrapper,c=Sl(e,She);return p.jsx(N7,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx($he,zt({isInteractive:n},c))})},_he=["isInteractive","renderWrapper","theme"],j2=function(e,t,n,r){return e.find(function(i){return G3e(i.x+t.left,i.y+t.top,i.width,i.height,n,r)})},Hhe=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,o=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,m=e.padding,g=e.innerPadding,v=e.axisTop,b=e.axisRight,y=e.axisBottom,x=y===void 0?An.axisBottom:y,S=e.axisLeft,w=S===void 0?An.axisLeft:S,M=e.enableGridX,E=M===void 0?An.enableGridX:M,H=e.enableGridY,_=H===void 0?An.enableGridY:H,O=e.gridXValues,k=e.gridYValues,A=e.labelPosition,j=A===void 0?An.labelPosition:A,V=e.labelOffset,T=V===void 0?An.labelOffset:V,L=e.layers,R=L===void 0?An.layers:L,I=e.renderBar,P=I===void 0?function(be,xe){var Te=xe.bar,ot=Te.color,vt=Te.height,wt=Te.width,ht=Te.x,Ot=Te.y,rn=xe.borderColor,At=xe.borderRadius,hn=xe.borderWidth,lr=xe.label,Ft=xe.labelColor,Tn=xe.shouldRenderLabel,lt=xe.labelX,_n=xe.labelY,cn=xe.textAnchor;if(be.fillStyle=ot,hn>0&&(be.strokeStyle=rn,be.lineWidth=hn),be.beginPath(),At>0){var gn=Math.min(At,vt);be.moveTo(ht+gn,Ot),be.lineTo(ht+wt-gn,Ot),be.quadraticCurveTo(ht+wt,Ot,ht+wt,Ot+gn),be.lineTo(ht+wt,Ot+vt-gn),be.quadraticCurveTo(ht+wt,Ot+vt,ht+wt-gn,Ot+vt),be.lineTo(ht+gn,Ot+vt),be.quadraticCurveTo(ht,Ot+vt,ht,Ot+vt-gn),be.lineTo(ht,Ot+gn),be.quadraticCurveTo(ht,Ot,ht+gn,Ot),be.closePath()}else be.rect(ht,Ot,wt,vt);be.fill(),hn>0&&be.stroke(),Tn&&(be.textBaseline="middle",be.textAlign=cn==="middle"?"center":cn,be.fillStyle=Ft,be.fillText(lr,ht+lt,Ot+_n))}:I,N=e.enableLabel,z=N===void 0?An.enableLabel:N,q=e.label,G=e.labelSkipWidth,Y=G===void 0?An.labelSkipWidth:G,ee=e.labelSkipHeight,Q=ee===void 0?An.labelSkipHeight:ee,K=e.labelTextColor,J=e.colorBy,W=e.colors,Z=e.borderRadius,U=Z===void 0?An.borderRadius:Z,F=e.borderWidth,re=F===void 0?An.borderWidth:F,B=e.borderColor,ie=e.annotations,oe=ie===void 0?An.annotations:ie,ve=e.legendLabel,Ce=e.tooltipLabel,pe=e.valueFormat,ye=e.isInteractive,Se=ye===void 0?An.isInteractive:ye,me=e.tooltip,ge=me===void 0?An.tooltip:me,ce=e.onClick,$e=e.onMouseEnter,he=e.onMouseLeave,Ae=e.legends,Ie=e.pixelRatio,Re=Ie===void 0?An.pixelRatio:Ie,ke=e.canvasRef,Ye=e.enableTotals,Xe=Ye===void 0?An.enableTotals:Ye,Fe=e.totalsOffset,je=Fe===void 0?An.totalsOffset:Fe,Qe=$.useRef(null),Ze=Pn(),qe=AM(o,a,i),de=qe.margin,He=qe.innerWidth,Ke=qe.innerHeight,nt=qe.outerWidth,Ne=qe.outerHeight,ze=p_({indexBy:n,label:q,tooltipLabel:Ce,valueFormat:pe,colors:W,colorBy:J,borderColor:B,labelTextColor:K,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:de,width:He,height:Ke,padding:m,innerPadding:g,valueScale:f,indexScale:h,enableLabel:z,labelSkipWidth:Y,labelSkipHeight:Q,legends:Ae,legendLabel:ve,totalsOffset:je}),De=ze.bars,Je=ze.barsWithValue,tt=ze.xScale,Be=ze.yScale,Le=ze.getLabel,ut=ze.getTooltipLabel,pt=ze.getBorderColor,Ee=ze.getLabelColor,fe=ze.shouldRenderBarLabel,we=ze.legendsWithData,Ve=ze.barTotals,Ge=ze.getColor,We=LM(),rt=We.showTooltipFromEvent,X=We.hideTooltip,ae=$5e({annotations:a_({data:De,annotations:oe,getPosition:function(be){return{x:be.x,y:be.y}},getDimensions:function(be){var xe=be.width,Te=be.height;return{width:xe,height:Te,size:Math.max(xe,Te)}}})}),se=$.useMemo(function(){return{borderRadius:U,borderWidth:re,isInteractive:Se,isFocusable:!1,labelSkipWidth:Y,labelSkipHeight:Q,margin:de,width:o,height:a,innerWidth:He,innerHeight:Ke,bars:De,legendData:we,enableLabel:z,xScale:tt,yScale:Be,tooltip:ge,getTooltipLabel:ut,onClick:ce,onMouseEnter:$e,onMouseLeave:he,getColor:Ge}},[U,re,Se,Y,Q,de,o,a,He,Ke,De,we,z,tt,Be,ge,ut,ce,$e,he,Ge]),Oe=I7(pe),it=g_(l,c,j,T);$.useEffect(function(){var be,xe=(be=Qe.current)==null?void 0:be.getContext("2d");Qe.current&&xe&&(Qe.current.width=nt*Re,Qe.current.height=Ne*Re,xe.scale(Re,Re),xe.fillStyle=Ze.background,xe.fillRect(0,0,nt,Ne),xe.translate(de.left,de.top),R.forEach(function(Te){Te==="grid"?typeof Ze.grid.line.strokeWidth=="number"&&Ze.grid.line.strokeWidth>0&&(xe.lineWidth=Ze.grid.line.strokeWidth,xe.strokeStyle=Ze.grid.line.stroke,E&&wp(xe,{width:He,height:Ke,scale:tt,axis:"x",values:O}),_&&wp(xe,{width:He,height:Ke,scale:Be,axis:"y",values:k})):Te==="axes"?y5e(xe,{xScale:tt,yScale:Be,width:He,height:Ke,top:v,right:b,bottom:x,left:w,theme:Ze}):Te==="bars"?Je.forEach(function(ot){P(xe,zt({bar:ot,borderColor:pt(ot),borderRadius:U,borderWidth:re,label:Le(ot.data),labelColor:Ee(ot),shouldRenderLabel:fe(ot)},it(ot.width,ot.height)))}):Te==="legends"?we.forEach(function(ot){var vt=ot[0],wt=ot[1];the(xe,zt({},vt,{data:wt,containerWidth:He,containerHeight:Ke,theme:Ze}))}):Te==="annotations"?R5e(xe,{annotations:ae,theme:Ze}):Te==="totals"&&Xe?function(ot,vt,wt,ht){ht===void 0&&(ht=An.layout),ot.fillStyle=wt.text.fill,ot.font="bold "+wt.labels.text.fontSize+"px "+wt.labels.text.fontFamily,ot.textBaseline=ht==="vertical"?"alphabetic":"middle",ot.textAlign=ht==="vertical"?"center":"start",vt.forEach(function(Ot){ot.fillText(Ot.formattedValue,Ot.x,Ot.y)})}(xe,Ve,Ze,l):typeof Te=="function"&&Te(xe,se)}),xe.save())},[x,w,b,v,Je,U,re,ae,E,_,pt,Le,Ee,O,k,s,a,Ke,He,se,R,l,we,de.left,de.top,Ne,nt,Re,P,tt,Be,c,fe,Ze,o,Ve,Xe,Oe,it]);var at=$.useCallback(function(be){if(De&&Qe.current){var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt!==void 0?(rt($.createElement(ge,zt({},vt.data,{color:vt.color,label:vt.label,value:Number(vt.data.value)})),be),be.type==="mouseenter"&&($e==null||$e(vt.data,be))):X()}},[X,de,$e,De,rt,ge]),st=$.useCallback(function(be){if(De&&Qe.current){X();var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt&&(he==null||he(vt.data,be))}},[X,de,he,De]),ft=$.useCallback(function(be){if(De&&Qe.current){var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt!==void 0&&(ce==null||ce(zt({},vt.data,{color:vt.color}),be))}},[de,ce,De]);return p.jsx("canvas",{ref:function(be){Qe.current=be,ke&&"current"in ke&&(ke.current=be)},width:nt*Re,height:Ne*Re,style:{width:nt,height:Ne,cursor:Se?"auto":"normal"},onMouseEnter:Se?at:void 0,onMouseMove:Se?at:void 0,onMouseLeave:Se?st:void 0,onClick:Se?ft:void 0})},Ehe=$.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,o=Sl(e,_he);return p.jsx(N7,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:p.jsx(Hhe,zt({},o,{canvasRef:t}))})}),$l=function(e){return p.jsx(F7,{children:function(t){var n=t.width,r=t.height;return p.jsx(Mhe,zt({width:n,height:r},e))}})};$.forwardRef(function(e,t){return p.jsx(F7,{children:function(n){var r=n.width,i=n.height;return p.jsx(Ehe,zt({width:r,height:i},e,{ref:t}))}})});const X5=12,b_=14,Vhe=yt.tspan`
563
+ `,fill:i,opacity:a,strokeWidth:l,stroke:c===void 0?"transparent":c,style:{pointerEvents:"none"}})})};function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fa.apply(this,arguments)}var Y5e={top:0,right:0,bottom:0,left:0},z7=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,o=e.itemCount,a=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var l=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:fa({},Y5e,i),c=l.left+l.right,u=l.top+l.bottom,d=a+c,f=s+u,h=(o-1)*r;return n==="row"?d=a*o+h+c:n==="column"&&(f=s*o+h+u),{width:d,height:f,padding:l}},u_=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},d_=function(e){var t,n,r,i,o,a,s=e.direction,l=e.justify,c=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-c)/2,i=f/2,a="central",l?(r=d,o="end"):(r=c+u,o="start");break;case"right-to-left":t=d-c,n=(f-c)/2,i=f/2,a="central",l?(r=0,o="start"):(r=d-c-u,o="end");break;case"top-to-bottom":t=(d-c)/2,n=0,r=d/2,o="middle",l?(i=f,a="alphabetic"):(i=c+u,a="text-before-edge");break;case"bottom-to-top":t=(d-c)/2,n=f-c,r=d/2,o="middle",l?(i=0,a="text-before-edge"):(i=f-c-u,a="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:o,labelAlignment:a}},K5e={circle:Z5e,diamond:U5e,square:q5e,triangle:G5e},X5e=function(e){var t,n,r,i,o,a,s,l,c,u,d,f=e.x,h=e.y,m=e.width,g=e.height,v=e.data,b=e.direction,y=b===void 0?"left-to-right":b,x=e.justify,S=x!==void 0&&x,w=e.textColor,M=e.background,E=M===void 0?"transparent":M,H=e.opacity,_=H===void 0?1:H,O=e.symbolShape,k=O===void 0?"square":O,A=e.symbolSize,j=A===void 0?16:A,V=e.symbolSpacing,T=V===void 0?8:V,L=e.symbolBorderWidth,R=L===void 0?0:L,I=e.symbolBorderColor,P=I===void 0?"transparent":I,N=e.onClick,z=e.onMouseEnter,q=e.onMouseLeave,G=e.toggleSerie,Y=e.effects,ee=$.useState({}),Q=ee[0],K=ee[1],J=Pn(),W=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on==="hover"}).reduce(function(me,ge){return fa({},me,ge.style)},{});K(Se)}z==null||z(v,ye)},[z,v,Y]),Z=$.useCallback(function(ye){if(Y){var Se=Y.filter(function(me){return me.on!=="hover"}).reduce(function(me,ge){return fa({},me,ge.style)},{});K(Se)}q==null||q(v,ye)},[q,v,Y]),U=d_({direction:y,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:j,symbolSpacing:T,width:m,height:g}),F=U.symbolX,re=U.symbolY,B=U.labelX,ie=U.labelY,oe=U.labelAnchor,ve=U.labelAlignment,Ce=[N,z,q,G].some(function(ye){return ye!==void 0}),pe=typeof k=="function"?k:K5e[k];return p.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:_},children:[p.jsx("rect",{width:m,height:g,fill:(r=Q.itemBackground)!=null?r:E,style:{cursor:Ce?"pointer":"auto"},onClick:function(ye){N==null||N(v,ye),G==null||G(v.id)},onMouseEnter:W,onMouseLeave:Z}),C.createElement(pe,fa({id:v.id,x:F,y:re,size:(i=Q.symbolSize)!=null?i:j,fill:(o=(a=v.fill)!=null?a:v.color)!=null?o:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:R,borderColor:(l=Q.symbolBorderColor)!=null?l:P},v.hidden?J.legends.hidden.symbol:void 0)),p.jsx("text",{textAnchor:oe,style:fa({},A7(J.legends.text),{fill:(c=(u=(d=Q.itemTextColor)!=null?d:w)!=null?u:J.legends.text.fill)!=null?c:"black",dominantBaseline:ve,pointerEvents:"none",userSelect:"none"},v.hidden?J.legends.hidden.text:void 0),x:B,y:ie,children:v.label})]})},Q5e=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,o=e.padding,a=o===void 0?0:o,s=e.justify,l=e.effects,c=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemTextColor,v=e.itemBackground,b=v===void 0?"transparent":v,y=e.itemOpacity,x=y===void 0?1:y,S=e.symbolShape,w=e.symbolSize,M=e.symbolSpacing,E=e.symbolBorderWidth,H=e.symbolBorderColor,_=e.onClick,O=e.onMouseEnter,k=e.onMouseLeave,A=e.toggleSerie,j=z7({itemCount:t.length,itemWidth:c,itemHeight:u,itemsSpacing:m,direction:i,padding:a}).padding,V=i==="row"?c+m:0,T=i==="column"?u+m:0;return p.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(L,R){return p.jsx(X5e,{data:L,x:R*V+j.left,y:R*T+j.top,width:c,height:u,direction:f,justify:s,effects:l,textColor:g,background:b,opacity:x,symbolShape:S,symbolSize:w,symbolSpacing:M,symbolBorderWidth:E,symbolBorderColor:H,onClick:_,onMouseEnter:O,onMouseLeave:k,toggleSerie:A},R)})})},J5e=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,o=i===void 0?0:i,a=e.translateY,s=a===void 0?0:a,l=e.anchor,c=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,m=h===void 0?0:h,g=e.itemWidth,v=e.itemHeight,b=e.itemDirection,y=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,w=e.symbolShape,M=e.symbolSize,E=e.symbolSpacing,H=e.symbolBorderWidth,_=e.symbolBorderColor,O=e.onClick,k=e.onMouseEnter,A=e.onMouseLeave,j=e.toggleSerie,V=e.effects,T=z7({itemCount:t.length,itemsSpacing:m,itemWidth:g,itemHeight:v,direction:c,padding:d}),L=T.width,R=T.height,I=u_({anchor:l,translateX:o,translateY:s,containerWidth:n,containerHeight:r,width:L,height:R}),P=I.x,N=I.y;return p.jsx(Q5e,{data:t,x:P,y:N,direction:c,padding:d,justify:f,effects:V,itemsSpacing:m,itemWidth:g,itemHeight:v,itemDirection:b,itemTextColor:y,itemBackground:x,itemOpacity:S,symbolShape:w,symbolSize:M,symbolSpacing:E,symbolBorderWidth:H,symbolBorderColor:_,onClick:O,onMouseEnter:k,onMouseLeave:A,toggleSerie:typeof j=="boolean"?void 0:j})},ehe={start:"left",middle:"center",end:"right"},the=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,o=t.translateX,a=o===void 0?0:o,s=t.translateY,l=s===void 0?0:s,c=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,m=h!==void 0&&h,g=t.itemsSpacing,v=g===void 0?0:g,b=t.itemWidth,y=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,w=t.itemTextColor,M=t.symbolSize,E=M===void 0?16:M,H=t.symbolSpacing,_=H===void 0?8:H,O=t.theme,k=z7({itemCount:n.length,itemWidth:b,itemHeight:y,itemsSpacing:v,direction:u,padding:f}),A=k.width,j=k.height,V=k.padding,T=u_({anchor:c,translateX:a,translateY:l,containerWidth:r,containerHeight:i,width:A,height:j}),L=T.x,R=T.y,I=u==="row"?b+v:0,P=u==="column"?y+v:0;e.save(),e.translate(L,R),e.font=O.legends.text.fontSize+"px "+(O.legends.text.fontFamily||"sans-serif"),n.forEach(function(N,z){var q,G,Y=z*I+V.left,ee=z*P+V.top,Q=d_({direction:S,justify:m,symbolSize:E,symbolSpacing:_,width:b,height:y}),K=Q.symbolX,J=Q.symbolY,W=Q.labelX,Z=Q.labelY,U=Q.labelAnchor,F=Q.labelAlignment;e.fillStyle=(q=N.color)!=null?q:"black",e.fillRect(Y+K,ee+J,E,E),e.textAlign=ehe[U],F==="central"&&(e.textBaseline="middle"),e.fillStyle=(G=w??O.legends.text.fill)!=null?G:"black",e.fillText(String(N.label),Y+W,ee+Z)}),e.restore()};function zt(){return zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zt.apply(this,arguments)}function Sl(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Hp,nhe=function(e){var t=e.bars,n=e.annotations,r=a_({data:t,annotations:n,getPosition:function(i){return{x:i.x+i.width/2,y:i.y+i.height/2}},getDimensions:function(i){var o=i.height,a=i.width;return{width:a,height:o,size:Math.max(a,o)}}});return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(O5e,zt({},i),o)})})},rhe=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return p.jsx(p.Fragment,{children:r.map(function(o,a){var s,l=o[0],c=o[1];return p.jsx(J5e,zt({},l,{containerWidth:t,containerHeight:n,data:(s=l.data)!=null?s:c,toggleSerie:l.toggleSerie&&l.dataFrom==="keys"?i:void 0}),a)})})},ihe=["data"],ohe=function(e){var t,n=e.bar,r=n.data,i=Sl(n,ihe),o=e.style,a=o.borderColor,s=o.color,l=o.height,c=o.labelColor,u=o.labelOpacity,d=o.labelX,f=o.labelY,h=o.transform,m=o.width,g=o.textAnchor,v=e.borderRadius,b=e.borderWidth,y=e.label,x=e.shouldRenderLabel,S=e.isInteractive,w=e.onClick,M=e.onMouseEnter,E=e.onMouseLeave,H=e.tooltip,_=e.isFocusable,O=e.ariaLabel,k=e.ariaLabelledBy,A=e.ariaDescribedBy,j=e.ariaDisabled,V=e.ariaHidden,T=Pn(),L=LM(),R=L.showTooltipFromEvent,I=L.showTooltipAt,P=L.hideTooltip,N=$.useMemo(function(){return function(){return $.createElement(H,zt({},i,r))}},[H,i,r]),z=$.useCallback(function(K){w==null||w(zt({color:i.color},r),K)},[i,r,w]),q=$.useCallback(function(K){return R(N(),K)},[R,N]),G=$.useCallback(function(K){M==null||M(r,K),R(N(),K)},[r,M,R,N]),Y=$.useCallback(function(K){E==null||E(r,K),P()},[r,P,E]),ee=$.useCallback(function(){I(N(),[i.absX+i.width/2,i.absY])},[I,N,i]),Q=$.useCallback(function(){P()},[P]);return p.jsxs(et.g,{transform:h,children:[p.jsx(et.rect,{width:On(m,function(K){return Math.max(K,0)}),height:On(l,function(K){return Math.max(K,0)}),rx:v,ry:v,fill:(t=r.fill)!=null?t:s,strokeWidth:b,stroke:a,focusable:_,tabIndex:_?0:void 0,"aria-label":O?O(r):void 0,"aria-labelledby":k?k(r):void 0,"aria-describedby":A?A(r):void 0,"aria-disabled":j?j(r):void 0,"aria-hidden":V?V(r):void 0,onMouseEnter:S?G:void 0,onMouseMove:S?q:void 0,onMouseLeave:S?Y:void 0,onClick:S?z:void 0,onFocus:S&&_?ee:void 0,onBlur:S&&_?Q:void 0}),x&&p.jsx(et.text,{x:d,y:f,textAnchor:g,dominantBaseline:"central",fillOpacity:u,style:zt({},T.labels.text,{pointerEvents:"none",fill:c}),children:y})]})},ahe=["color","label"],she=function(e){var t=e.color,n=e.label,r=Sl(e,ahe);return p.jsx(g3e,{id:n,value:r.formattedValue,enableChip:!0,color:t})},qt={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelPosition:"middle",labelOffset:0,labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:she,tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},sn=zt({},qt,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:ohe,defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),An=zt({},qt,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:typeof window<"u"&&(Hp=window.devicePixelRatio)!=null?Hp:1}),f_=function(e,t,n,r,i,o){return D7(r,{all:e.map(t),min:0,max:0},i,o).padding(n)},h_=function(e,t){return e.map(function(n){return zt({},t.reduce(function(r,i){return r[i]=null,r},{}),n)})},t0=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},n0=function(e){return[e,Number(e)]};function g_(e,t,n,r){return e===void 0&&(e=qt.layout),t===void 0&&(t=qt.reverse),n===void 0&&(n=qt.labelPosition),r===void 0&&(r=qt.labelOffset),function(i,o){var a=r*(t?-1:1);if(e==="horizontal"){var s=i/2;return n==="start"?s=t?i:0:n==="end"&&(s=t?0:i),{labelX:s+a,labelY:o/2,textAnchor:n==="middle"?"middle":t?"end":"start"}}var l=o/2;return n==="start"?l=t?0:o:n==="end"&&(l=t?o:0),{labelX:i/2,labelY:l-a,textAnchor:"middle"}}}var lhe=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],B7=function(e,t){return e>t},v_=function(e,t){return e<t},m_=function(e,t){return Array.from(" ".repeat(t-e),function(n,r){return e+r})},che=function(e){return B7(e,0)?0:e},uhe=function(e,t,n,r){var i=e.data,o=e.formatValue,a=e.getColor,s=e.getIndex,l=e.getTooltipLabel,c=e.innerPadding,u=c===void 0?0:c,d=e.keys,f=e.xScale,h=e.yScale,m=e.margin,g=n?v_:B7,v=i.map(t0),b=[];return d.forEach(function(y,x){return m_(0,f.domain().length).forEach(function(S){var w,M,E,H=n0(i[S][y]),_=H[0],O=H[1],k=s(i[S]),A=((w=f(k))!=null?w:0)+t*x+u*x,j=g(M=O,0)?(E=h(M))!=null?E:0:r,V=function(L,R){var I;return g(L,0)?r-R:((I=h(L))!=null?I:0)-r}(O,j),T={id:y,value:_===null?_:O,formattedValue:o(O),hidden:!1,index:S,indexValue:k,data:v[S]};b.push({key:y+"."+T.indexValue,index:b.length,data:T,x:A,y:j,absX:m.left+A,absY:m.top+j,width:t,height:V,color:a(T),label:l(T)})})}),b},dhe=function(e,t,n,r){var i=e.data,o=e.formatValue,a=e.getIndex,s=e.getColor,l=e.getTooltipLabel,c=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,h=e.yScale,m=e.margin,g=n?v_:B7,v=i.map(t0),b=[];return c.forEach(function(y,x){return m_(0,h.domain().length).forEach(function(S){var w,M,E,H=n0(i[S][y]),_=H[0],O=H[1],k=a(i[S]),A=g(M=O,0)?r:(E=f(M))!=null?E:0,j=((w=h(k))!=null?w:0)+t*x+d*x,V=function(L,R){var I;return g(L,0)?((I=f(L))!=null?I:0)-r:r-R}(O,A),T={id:y,value:_===null?_:O,formattedValue:o(O),hidden:!1,index:S,indexValue:k,data:v[S]};b.push({key:y+"."+T.indexValue,index:b.length,data:T,x:A,y:j,absX:m.left+A,absY:m.top+j,width:V,height:t,color:s(T),label:l(T)})})}),b},fhe=function(e){var t,n,r=e.layout,i=e.minValue,o=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=c===void 0?0:c,d=e.innerPadding,f=d===void 0?0:d,h=e.valueScale,m=e.indexScale,g=e.hiddenIds,v=g===void 0?[]:g,b=Sl(e,lhe),y=b.keys.filter(function(N){return!v.includes(N)}),x=h_(b.data,y),S=r==="vertical"?["y","x",s]:["x","y",l],w=S[0],M=S[1],E=S[2],H=f_(x,b.getIndex,u,m,E,M),_=zt({max:o,min:i,reverse:a},h),O=_.min==="auto"?che:function(N){return N},k=x.reduce(function(N,z){return[].concat(N,y.map(function(q){return z[q]}))},[]).filter(Boolean),A=O(Math.min.apply(Math,k)),j=(n=Math.max.apply(Math,k),isFinite(n)?n:0),V=D7(_,{all:k,min:A,max:j},w==="x"?s:l,w),T=r==="vertical"?[H,V]:[V,H],L=T[0],R=T[1],I=(H.bandwidth()-f*(y.length-1))/y.length,P=[zt({},b,{data:x,keys:y,innerPadding:f,xScale:L,yScale:R}),I,_.reverse,(t=V(0))!=null?t:0];return{xScale:L,yScale:R,bars:I>0?r==="vertical"?uhe.apply(void 0,P):dhe.apply(void 0,P):[]}},hhe=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],ghe=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},vhe=function(e,t,n){var r=e.formatValue,i=e.getColor,o=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(h){return c.domain().forEach(function(m,g){var v,b,y=h[g],x=(v=c(o(y.data)))!=null?v:0,S=((b=function(O){return u(O[n?0:1])}(y))!=null?b:0)+.5*s,w=function(O,k){var A;return((A=u(O[n?1:0]))!=null?A:0)-k}(y,S)-s,M=n0(y.data[h.key]),E=M[0],H=M[1],_={id:h.key,value:E===null?E:H,formattedValue:r(H),hidden:!1,index:g,indexValue:m,data:t0(y.data)};f.push({key:h.key+"."+m,index:f.length,data:_,x,y:S,absX:d.left+x,absY:d.top+S,width:t,height:w,color:i(_),label:a(_)})})}),f},mhe=function(e,t,n){var r=e.formatValue,i=e.getColor,o=e.getIndex,a=e.getTooltipLabel,s=e.innerPadding,l=e.stackedData,c=e.xScale,u=e.yScale,d=e.margin,f=[];return l.forEach(function(h){return u.domain().forEach(function(m,g){var v,b,y=h[g],x=(v=u(o(y.data)))!=null?v:0,S=((b=function(O){return c(O[n?1:0])}(y))!=null?b:0)+.5*s,w=function(O,k){var A;return((A=c(O[n?0:1]))!=null?A:0)-k}(y,S)-s,M=n0(y.data[h.key]),E=M[0],H=M[1],_={id:h.key,value:E===null?E:H,formattedValue:r(H),hidden:!1,index:g,indexValue:m,data:t0(y.data)};f.push({key:h.key+"."+m,index:f.length,data:_,x:S,y:x,absX:d.left+S,absY:d.top+x,width:w,height:t,color:i(_),label:a(_)})})}),f},phe=function(e){var t,n=e.data,r=e.layout,i=e.minValue,o=e.maxValue,a=e.reverse,s=e.width,l=e.height,c=e.padding,u=c===void 0?0:c,d=e.valueScale,f=e.indexScale,h=e.hiddenIds,m=h===void 0?[]:h,g=Sl(e,hhe),v=g.keys.filter(function(I){return!m.includes(I)}),b=fee().keys(v).offset(hee)(h_(n,v)),y=r==="vertical"?["y","x",s]:["x","y",l],x=y[0],S=y[1],w=y[2],M=f_(n,g.getIndex,u,f,w,S),E=zt({max:o,min:i,reverse:a},d),H=(t=ghe(b),d.type==="log"?t.filter(function(I){return I!==0}):t),_=Math.min.apply(Math,H),O=Math.max.apply(Math,H),k=D7(E,{all:H,min:_,max:O},x==="x"?s:l,x),A=r==="vertical"?[M,k]:[k,M],j=A[0],V=A[1],T=g.innerPadding>0?g.innerPadding:0,L=M.bandwidth(),R=[zt({},g,{innerPadding:T,stackedData:b,xScale:j,yScale:V}),L,E.reverse];return{xScale:j,yScale:V,bars:L>0?r==="vertical"?vhe.apply(void 0,R):mhe.apply(void 0,R):[]}},bhe=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,o=e.layout,a=e.legendLabel,s=e.reverse,l=QM(a??(r==="indexes"?"indexValue":"id"));return r==="indexes"?function(c,u,d){var f=L5(c.map(function(h){var m,g;return{id:(m=h.data.indexValue)!=null?m:"",label:d(h.data),hidden:h.data.hidden,color:(g=h.color)!=null?g:"#000"}}),function(h){return h.id});return u==="horizontal"&&f.reverse(),f}(t,o,l):function(c,u,d,f,h,m){var g=L5(c.map(function(v){var b;return{id:v.data.id,label:m(v.data),hidden:v.data.hidden,color:(b=v.color)!=null?b:"#000"}}),function(v){return v.id});return(u==="vertical"&&f==="stacked"&&d==="column"&&h!==!0||u==="horizontal"&&f==="stacked"&&h===!0)&&g.reverse(),g}(t,o,n,i,s,l)},Ep=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},yhe=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},Che=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},xhe=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},p_=function(e){var t=e.indexBy,n=t===void 0?qt.indexBy:t,r=e.keys,i=r===void 0?qt.keys:r,o=e.label,a=o===void 0?qt.label:o,s=e.tooltipLabel,l=s===void 0?qt.tooltipLabel:s,c=e.valueFormat,u=e.colors,d=u===void 0?qt.colors:u,f=e.colorBy,h=f===void 0?qt.colorBy:f,m=e.borderColor,g=m===void 0?qt.borderColor:m,v=e.labelTextColor,b=v===void 0?qt.labelTextColor:v,y=e.groupMode,x=y===void 0?qt.groupMode:y,S=e.layout,w=S===void 0?qt.layout:S,M=e.reverse,E=M===void 0?qt.reverse:M,H=e.data,_=e.minValue,O=_===void 0?qt.minValue:_,k=e.maxValue,A=k===void 0?qt.maxValue:k,j=e.margin,V=e.width,T=e.height,L=e.padding,R=L===void 0?qt.padding:L,I=e.innerPadding,P=I===void 0?qt.innerPadding:I,N=e.valueScale,z=N===void 0?qt.valueScale:N,q=e.indexScale,G=q===void 0?qt.indexScale:q,Y=e.initialHiddenIds,ee=Y===void 0?qt.initialHiddenIds:Y,Q=e.enableLabel,K=Q===void 0?qt.enableLabel:Q,J=e.labelSkipWidth,W=J===void 0?qt.labelSkipWidth:J,Z=e.labelSkipHeight,U=Z===void 0?qt.labelSkipHeight:Z,F=e.legends,re=F===void 0?qt.legends:F,B=e.legendLabel,ie=e.totalsOffset,oe=ie===void 0?qt.totalsOffset:ie,ve=$.useState(ee??[]),Ce=ve[0],pe=ve[1],ye=$.useCallback(function(de){pe(function(He){return He.indexOf(de)>-1?He.filter(function(Ke){return Ke!==de}):[].concat(He,[de])})},[]),Se=R2(n),me=R2(a),ge=R2(l),ce=I7(c),$e=Pn(),he=W5e(d,h),Ae=_p(g,$e),Ie=_p(b,$e),Re=(x==="grouped"?fhe:phe)({layout:w,reverse:E,data:H,getIndex:Se,keys:i,minValue:O,maxValue:A,width:V,height:T,getColor:he,padding:R,innerPadding:P,valueScale:z,indexScale:G,hiddenIds:Ce,formatValue:ce,getTooltipLabel:ge,margin:j}),ke=Re.bars,Ye=Re.xScale,Xe=Re.yScale,Fe=$.useMemo(function(){return ke.filter(function(de){return de.data.value!==null}).map(function(de,He){return zt({},de,{index:He})})},[ke]),je=$.useCallback(function(de){var He=de.width,Ke=de.height;return!!K&&!(W>0&&He<W)&&!(U>0&&Ke<U)},[K,W,U]),Qe=$.useMemo(function(){return i.map(function(de){var He=ke.find(function(Ke){return Ke.data.id===de});return zt({},He,{data:zt({id:de},He==null?void 0:He.data,{hidden:Ce.includes(de)})})})},[Ce,i,ke]),Ze=$.useMemo(function(){return re.map(function(de){return[de,bhe({bars:de.dataFrom==="keys"?Qe:ke,direction:de.direction,from:de.dataFrom,groupMode:x,layout:w,legendLabel:B,reverse:E})]})},[re,Qe,ke,x,w,B,E]),qe=$.useMemo(function(){return function(de,He,Ke,nt,Ne,ze,De){nt===void 0&&(nt=qt.layout),Ne===void 0&&(Ne=qt.groupMode);var Je=[];if(de.length===0)return Je;var tt=new Map,Be=de[0].width,Le=de[0].height;if(Ne==="stacked"){var ut=new Map;de.forEach(function(fe){var we=fe.data,Ve=we.indexValue,Ge=we.value;Ep(tt,Ve,Number(Ge)),yhe(ut,Ve,Number(Ge))}),ut.forEach(function(fe,we){var Ve,Ge,We,rt=tt.get(we)||0;nt==="vertical"?(Ve=He(we),Ge=Ke(fe),We=Ke(fe/2)):(Ve=He(fe),Ge=Ke(we),We=He(fe/2)),Ve+=nt==="vertical"?Be/2:ze,Ge+=nt==="vertical"?-ze:Le/2,Je.push({key:"total_"+we,x:Ve,y:Ge,value:rt,formattedValue:De(rt),animationOffset:We})})}else if(Ne==="grouped"){var pt=new Map,Ee=new Map;de.forEach(function(fe){var we=fe.data,Ve=we.indexValue,Ge=we.value;Ep(tt,Ve,Number(Ge)),Che(pt,Ve,Number(Ge)),xhe(Ee,Ve)}),pt.forEach(function(fe,we){var Ve,Ge,We,rt=tt.get(we)||0,X=Ee.get(we);nt==="vertical"?(Ve=He(we),Ge=Ke(fe),We=Ke(fe/2)):(Ve=He(fe),Ge=Ke(we),We=He(fe/2)),Ve+=nt==="vertical"?X*Be/2:ze,Ge+=nt==="vertical"?-ze:X*Le/2,Je.push({key:"total_"+we,x:Ve,y:Ge,value:rt,formattedValue:De(rt),animationOffset:We})})}return Je}(ke,Ye,Xe,w,x,oe,ce)},[ke,Ye,Xe,w,x,oe,ce]);return{bars:ke,barsWithValue:Fe,xScale:Ye,yScale:Xe,getIndex:Se,getLabel:me,getTooltipLabel:ge,formatValue:ce,getColor:he,getBorderColor:Ae,getLabelColor:Ie,shouldRenderBarLabel:je,hiddenIds:Ce,toggleSerie:ye,legendsWithData:Ze,barTotals:qe}},whe=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,o=i===void 0?sn.layout:i,a=Pn();return Cr(t,{keys:function(s){return s.key},from:function(s){return{x:o==="vertical"?s.x:s.animationOffset,y:o==="vertical"?s.animationOffset:s.y,labelOpacity:0}},enter:function(s){return{x:s.x,y:s.y,labelOpacity:1}},update:function(s){return{x:s.x,y:s.y,labelOpacity:1}},leave:function(s){return{x:o==="vertical"?s.x:s.animationOffset,y:o==="vertical"?s.animationOffset:s.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(s,l){return p.jsx(et.text,{x:s.x,y:s.y,fillOpacity:s.labelOpacity,style:zt({},a.labels.text,{pointerEvents:"none",fill:a.text.fill}),fontWeight:"bold",fontSize:a.labels.text.fontSize,fontFamily:a.labels.text.fontFamily,textAnchor:o==="vertical"?"middle":"start",alignmentBaseline:o==="vertical"?"alphabetic":"middle",children:l.formattedValue},l.key)})},She=["isInteractive","animate","motionConfig","theme","renderWrapper"],$he=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,o=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,m=e.padding,g=e.innerPadding,v=e.axisTop,b=e.axisRight,y=e.axisBottom,x=y===void 0?sn.axisBottom:y,S=e.axisLeft,w=S===void 0?sn.axisLeft:S,M=e.enableGridX,E=M===void 0?sn.enableGridX:M,H=e.enableGridY,_=H===void 0?sn.enableGridY:H,O=e.gridXValues,k=e.gridYValues,A=e.layers,j=A===void 0?sn.layers:A,V=e.barComponent,T=V===void 0?sn.barComponent:V,L=e.enableLabel,R=L===void 0?sn.enableLabel:L,I=e.label,P=e.labelSkipWidth,N=P===void 0?sn.labelSkipWidth:P,z=e.labelSkipHeight,q=z===void 0?sn.labelSkipHeight:z,G=e.labelTextColor,Y=e.labelPosition,ee=Y===void 0?sn.labelPosition:Y,Q=e.labelOffset,K=Q===void 0?sn.labelOffset:Q,J=e.markers,W=J===void 0?sn.markers:J,Z=e.colorBy,U=e.colors,F=e.defs,re=F===void 0?sn.defs:F,B=e.fill,ie=B===void 0?sn.fill:B,oe=e.borderRadius,ve=oe===void 0?sn.borderRadius:oe,Ce=e.borderWidth,pe=Ce===void 0?sn.borderWidth:Ce,ye=e.borderColor,Se=e.annotations,me=Se===void 0?sn.annotations:Se,ge=e.legendLabel,ce=e.tooltipLabel,$e=e.valueFormat,he=e.isInteractive,Ae=he===void 0?sn.isInteractive:he,Ie=e.tooltip,Re=Ie===void 0?sn.tooltip:Ie,ke=e.onClick,Ye=e.onMouseEnter,Xe=e.onMouseLeave,Fe=e.legends,je=e.role,Qe=je===void 0?sn.role:je,Ze=e.ariaLabel,qe=e.ariaLabelledBy,de=e.ariaDescribedBy,He=e.isFocusable,Ke=He===void 0?sn.isFocusable:He,nt=e.barAriaLabel,Ne=e.barAriaLabelledBy,ze=e.barAriaDescribedBy,De=e.barAriaHidden,Je=e.barAriaDisabled,tt=e.initialHiddenIds,Be=e.enableTotals,Le=Be===void 0?sn.enableTotals:Be,ut=e.totalsOffset,pt=ut===void 0?sn.totalsOffset:ut,Ee=di(),fe=Ee.animate,we=Ee.config,Ve=AM(o,a,i),Ge=Ve.outerWidth,We=Ve.outerHeight,rt=Ve.margin,X=Ve.innerWidth,ae=Ve.innerHeight,se=p_({indexBy:n,label:I,tooltipLabel:ce,valueFormat:$e,colors:U,colorBy:Z,borderColor:ye,labelTextColor:G,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:rt,width:X,height:ae,padding:m,innerPadding:g,valueScale:f,indexScale:h,enableLabel:R,labelSkipWidth:N,labelSkipHeight:q,legends:Fe,legendLabel:ge,initialHiddenIds:tt,totalsOffset:pt}),Oe=se.bars,it=se.barsWithValue,at=se.xScale,st=se.yScale,ft=se.getLabel,be=se.getTooltipLabel,xe=se.getBorderColor,Te=se.getLabelColor,ot=se.shouldRenderBarLabel,vt=se.toggleSerie,wt=se.legendsWithData,ht=se.barTotals,Ot=se.getColor,rn=g_(l,c,ee,K),At=Cr(it,{keys:function(lt){return lt.key},from:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:0,labelColor:Te(lt),labelOpacity:0},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+(lt.y+lt.height)+")",width:lt.width},l==="vertical"?{}:{height:lt.height,transform:"translate("+lt.x+", "+lt.y+")",width:0})},enter:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:lt.height,labelColor:Te(lt),labelOpacity:1},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+lt.y+")",width:lt.width})},update:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:lt.height,labelColor:Te(lt),labelOpacity:1},rn(lt.width,lt.height),{transform:"translate("+lt.x+", "+lt.y+")",width:lt.width})},leave:function(lt){return zt({borderColor:xe(lt),color:lt.color,height:0,labelColor:Te(lt),labelOpacity:0},rn(lt.width,lt.height),{labelY:0,transform:"translate("+lt.x+", "+(lt.y+lt.height)+")",width:lt.width},l==="vertical"?{}:zt({},rn(lt.width,lt.height),{labelX:0,height:lt.height,transform:"translate("+lt.x+", "+lt.y+")",width:0}))},config:we,immediate:!fe,initial:fe?void 0:null}),hn=$.useMemo(function(){return{borderRadius:ve,borderWidth:pe,enableLabel:R,isInteractive:Ae,labelSkipWidth:N,labelSkipHeight:q,onClick:ke,onMouseEnter:Ye,onMouseLeave:Xe,getTooltipLabel:be,tooltip:Re,isFocusable:Ke,ariaLabel:nt,ariaLabelledBy:Ne,ariaDescribedBy:ze,ariaHidden:De,ariaDisabled:Je}},[ve,pe,R,be,Ae,q,N,ke,Ye,Xe,Re,Ke,nt,Ne,ze,De,Je]),lr=Q3e(re,Oe,ie,{dataKey:"data",targetKey:"data.fill"}),Ft={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};j.includes("annotations")&&(Ft.annotations=p.jsx(nhe,{bars:Oe,annotations:me},"annotations")),j.includes("axes")&&(Ft.axes=p.jsx(v5e,{xScale:at,yScale:st,width:X,height:ae,top:v,right:b,bottom:x,left:w},"axes")),j.includes("bars")&&(Ft.bars=p.jsx($.Fragment,{children:At(function(lt,_n){return $.createElement(T,zt({},hn,{bar:_n,style:lt,shouldRenderLabel:ot(_n),label:ft(_n.data)}))})},"bars")),j.includes("grid")&&(Ft.grid=p.jsx(p5e,{width:X,height:ae,xScale:E?at:null,yScale:_?st:null,xValues:O,yValues:k},"grid")),j.includes("legends")&&(Ft.legends=p.jsx(rhe,{width:X,height:ae,legends:wt,toggleSerie:vt},"legends")),j.includes("markers")&&(Ft.markers=p.jsx(q3e,{markers:W,width:X,height:ae,xScale:at,yScale:st},"markers")),j.includes("totals")&&Le&&(Ft.totals=p.jsx(whe,{data:ht,springConfig:we,animate:fe,layout:l},"totals"));var Tn=$.useMemo(function(){return zt({},hn,{margin:rt,width:o,height:a,innerWidth:X,innerHeight:ae,bars:Oe,legendData:wt,enableLabel:R,xScale:at,yScale:st,tooltip:Re,getTooltipLabel:be,onClick:ke,onMouseEnter:Ye,onMouseLeave:Xe,getColor:Ot})},[hn,rt,o,a,X,ae,Oe,wt,R,at,st,Re,be,ke,Ye,Xe,Ot]);return p.jsx(qM,{width:Ge,height:We,margin:rt,defs:lr,role:Qe,ariaLabel:Ze,ariaLabelledBy:qe,ariaDescribedBy:de,isFocusable:Ke,children:j.map(function(lt,_n){var cn;return typeof lt=="function"?p.jsx($.Fragment,{children:$.createElement(lt,Tn)},_n):(cn=Ft==null?void 0:Ft[lt])!=null?cn:null})})},Mhe=function(e){var t=e.isInteractive,n=t===void 0?sn.isInteractive:t,r=e.animate,i=r===void 0?sn.animate:r,o=e.motionConfig,a=o===void 0?sn.motionConfig:o,s=e.theme,l=e.renderWrapper,c=Sl(e,She);return p.jsx(N7,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx($he,zt({isInteractive:n},c))})},_he=["isInteractive","renderWrapper","theme"],j2=function(e,t,n,r){return e.find(function(i){return G3e(i.x+t.left,i.y+t.top,i.width,i.height,n,r)})},Hhe=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,o=e.width,a=e.height,s=e.groupMode,l=e.layout,c=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,m=e.padding,g=e.innerPadding,v=e.axisTop,b=e.axisRight,y=e.axisBottom,x=y===void 0?An.axisBottom:y,S=e.axisLeft,w=S===void 0?An.axisLeft:S,M=e.enableGridX,E=M===void 0?An.enableGridX:M,H=e.enableGridY,_=H===void 0?An.enableGridY:H,O=e.gridXValues,k=e.gridYValues,A=e.labelPosition,j=A===void 0?An.labelPosition:A,V=e.labelOffset,T=V===void 0?An.labelOffset:V,L=e.layers,R=L===void 0?An.layers:L,I=e.renderBar,P=I===void 0?function(be,xe){var Te=xe.bar,ot=Te.color,vt=Te.height,wt=Te.width,ht=Te.x,Ot=Te.y,rn=xe.borderColor,At=xe.borderRadius,hn=xe.borderWidth,lr=xe.label,Ft=xe.labelColor,Tn=xe.shouldRenderLabel,lt=xe.labelX,_n=xe.labelY,cn=xe.textAnchor;if(be.fillStyle=ot,hn>0&&(be.strokeStyle=rn,be.lineWidth=hn),be.beginPath(),At>0){var gn=Math.min(At,vt);be.moveTo(ht+gn,Ot),be.lineTo(ht+wt-gn,Ot),be.quadraticCurveTo(ht+wt,Ot,ht+wt,Ot+gn),be.lineTo(ht+wt,Ot+vt-gn),be.quadraticCurveTo(ht+wt,Ot+vt,ht+wt-gn,Ot+vt),be.lineTo(ht+gn,Ot+vt),be.quadraticCurveTo(ht,Ot+vt,ht,Ot+vt-gn),be.lineTo(ht,Ot+gn),be.quadraticCurveTo(ht,Ot,ht+gn,Ot),be.closePath()}else be.rect(ht,Ot,wt,vt);be.fill(),hn>0&&be.stroke(),Tn&&(be.textBaseline="middle",be.textAlign=cn==="middle"?"center":cn,be.fillStyle=Ft,be.fillText(lr,ht+lt,Ot+_n))}:I,N=e.enableLabel,z=N===void 0?An.enableLabel:N,q=e.label,G=e.labelSkipWidth,Y=G===void 0?An.labelSkipWidth:G,ee=e.labelSkipHeight,Q=ee===void 0?An.labelSkipHeight:ee,K=e.labelTextColor,J=e.colorBy,W=e.colors,Z=e.borderRadius,U=Z===void 0?An.borderRadius:Z,F=e.borderWidth,re=F===void 0?An.borderWidth:F,B=e.borderColor,ie=e.annotations,oe=ie===void 0?An.annotations:ie,ve=e.legendLabel,Ce=e.tooltipLabel,pe=e.valueFormat,ye=e.isInteractive,Se=ye===void 0?An.isInteractive:ye,me=e.tooltip,ge=me===void 0?An.tooltip:me,ce=e.onClick,$e=e.onMouseEnter,he=e.onMouseLeave,Ae=e.legends,Ie=e.pixelRatio,Re=Ie===void 0?An.pixelRatio:Ie,ke=e.canvasRef,Ye=e.enableTotals,Xe=Ye===void 0?An.enableTotals:Ye,Fe=e.totalsOffset,je=Fe===void 0?An.totalsOffset:Fe,Qe=$.useRef(null),Ze=Pn(),qe=AM(o,a,i),de=qe.margin,He=qe.innerWidth,Ke=qe.innerHeight,nt=qe.outerWidth,Ne=qe.outerHeight,ze=p_({indexBy:n,label:q,tooltipLabel:Ce,valueFormat:pe,colors:W,colorBy:J,borderColor:B,labelTextColor:K,groupMode:s,layout:l,reverse:c,data:t,keys:r,minValue:u,maxValue:d,margin:de,width:He,height:Ke,padding:m,innerPadding:g,valueScale:f,indexScale:h,enableLabel:z,labelSkipWidth:Y,labelSkipHeight:Q,legends:Ae,legendLabel:ve,totalsOffset:je}),De=ze.bars,Je=ze.barsWithValue,tt=ze.xScale,Be=ze.yScale,Le=ze.getLabel,ut=ze.getTooltipLabel,pt=ze.getBorderColor,Ee=ze.getLabelColor,fe=ze.shouldRenderBarLabel,we=ze.legendsWithData,Ve=ze.barTotals,Ge=ze.getColor,We=LM(),rt=We.showTooltipFromEvent,X=We.hideTooltip,ae=$5e({annotations:a_({data:De,annotations:oe,getPosition:function(be){return{x:be.x,y:be.y}},getDimensions:function(be){var xe=be.width,Te=be.height;return{width:xe,height:Te,size:Math.max(xe,Te)}}})}),se=$.useMemo(function(){return{borderRadius:U,borderWidth:re,isInteractive:Se,isFocusable:!1,labelSkipWidth:Y,labelSkipHeight:Q,margin:de,width:o,height:a,innerWidth:He,innerHeight:Ke,bars:De,legendData:we,enableLabel:z,xScale:tt,yScale:Be,tooltip:ge,getTooltipLabel:ut,onClick:ce,onMouseEnter:$e,onMouseLeave:he,getColor:Ge}},[U,re,Se,Y,Q,de,o,a,He,Ke,De,we,z,tt,Be,ge,ut,ce,$e,he,Ge]),Oe=I7(pe),it=g_(l,c,j,T);$.useEffect(function(){var be,xe=(be=Qe.current)==null?void 0:be.getContext("2d");Qe.current&&xe&&(Qe.current.width=nt*Re,Qe.current.height=Ne*Re,xe.scale(Re,Re),xe.fillStyle=Ze.background,xe.fillRect(0,0,nt,Ne),xe.translate(de.left,de.top),R.forEach(function(Te){Te==="grid"?typeof Ze.grid.line.strokeWidth=="number"&&Ze.grid.line.strokeWidth>0&&(xe.lineWidth=Ze.grid.line.strokeWidth,xe.strokeStyle=Ze.grid.line.stroke,E&&wp(xe,{width:He,height:Ke,scale:tt,axis:"x",values:O}),_&&wp(xe,{width:He,height:Ke,scale:Be,axis:"y",values:k})):Te==="axes"?y5e(xe,{xScale:tt,yScale:Be,width:He,height:Ke,top:v,right:b,bottom:x,left:w,theme:Ze}):Te==="bars"?Je.forEach(function(ot){P(xe,zt({bar:ot,borderColor:pt(ot),borderRadius:U,borderWidth:re,label:Le(ot.data),labelColor:Ee(ot),shouldRenderLabel:fe(ot)},it(ot.width,ot.height)))}):Te==="legends"?we.forEach(function(ot){var vt=ot[0],wt=ot[1];the(xe,zt({},vt,{data:wt,containerWidth:He,containerHeight:Ke,theme:Ze}))}):Te==="annotations"?R5e(xe,{annotations:ae,theme:Ze}):Te==="totals"&&Xe?function(ot,vt,wt,ht){ht===void 0&&(ht=An.layout),ot.fillStyle=wt.text.fill,ot.font="bold "+wt.labels.text.fontSize+"px "+wt.labels.text.fontFamily,ot.textBaseline=ht==="vertical"?"alphabetic":"middle",ot.textAlign=ht==="vertical"?"center":"start",vt.forEach(function(Ot){ot.fillText(Ot.formattedValue,Ot.x,Ot.y)})}(xe,Ve,Ze,l):typeof Te=="function"&&Te(xe,se)}),xe.save())},[x,w,b,v,Je,U,re,ae,E,_,pt,Le,Ee,O,k,s,a,Ke,He,se,R,l,we,de.left,de.top,Ne,nt,Re,P,tt,Be,c,fe,Ze,o,Ve,Xe,Oe,it]);var at=$.useCallback(function(be){if(De&&Qe.current){var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt!==void 0?(rt($.createElement(ge,zt({},vt.data,{color:vt.color,label:vt.label,value:Number(vt.data.value)})),be),be.type==="mouseenter"&&($e==null||$e(vt.data,be))):X()}},[X,de,$e,De,rt,ge]),st=$.useCallback(function(be){if(De&&Qe.current){X();var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt&&(he==null||he(vt.data,be))}},[X,de,he,De]),ft=$.useCallback(function(be){if(De&&Qe.current){var xe=T2(Qe.current,be),Te=xe[0],ot=xe[1],vt=j2(De,de,Te,ot);vt!==void 0&&(ce==null||ce(zt({},vt.data,{color:vt.color}),be))}},[de,ce,De]);return p.jsx("canvas",{ref:function(be){Qe.current=be,ke&&"current"in ke&&(ke.current=be)},width:nt*Re,height:Ne*Re,style:{width:nt,height:Ne,cursor:Se?"auto":"normal"},onMouseEnter:Se?at:void 0,onMouseMove:Se?at:void 0,onMouseLeave:Se?st:void 0,onClick:Se?ft:void 0})},Ehe=$.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,o=Sl(e,_he);return p.jsx(N7,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:p.jsx(Hhe,zt({},o,{canvasRef:t}))})}),$l=function(e){return p.jsx(F7,{children:function(t){var n=t.width,r=t.height;return p.jsx(Mhe,zt({width:n,height:r},e))}})};$.forwardRef(function(e,t){return p.jsx(F7,{children:function(n){var r=n.width,i=n.height;return p.jsx(Ehe,zt({width:r,height:i},e,{ref:t}))}})});const X5=12,b_=14,Vhe=Ct.tspan`
561
564
  font: var(--gf-label-md-default);
562
565
  color: var(--gf-color-text-secondary);
563
566
  font-size: ${X5}px;
564
567
  line-height: ${b_}px;
565
- `,Ohe=(e,t,n=12)=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n}px Roboto, sans-serif`;const o=e.split(" "),a=[];let s=o[0];for(let l=1;l<o.length;l++){const c=`${s} ${o[l]}`;i.measureText(c).width>t?(a.push(s),s=o[l]):s=c}return a.push(s),a},Rhe=({data:e=null,height:t=600,margin:n={},labelWidth:r=120,labelPadding:i=20,keys:o=null,indexBy:a=null,tooltip:s=null,legendTitle:l="Legend title"})=>{const c=({bar:g})=>{var O,k;const v=$.useRef(null),[b,y]=$.useState(0),x=g.data.data,S=(O=na==null?void 0:na[x==null?void 0:x[a]])==null?void 0:O.key,w=(k=na==null?void 0:na[x==null?void 0:x[a]])==null?void 0:k.name,M=`${S}. ${w}`,E=Ohe(M,r,X5);$.useEffect(()=>{if(v.current){const A=v.current.getBoundingClientRect();y(A.height)}},[]);const H=r+i,_=g.y+g.height/2-b/2;return p.jsx("g",{ref:v,transform:`translate(-${H}, ${_})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:E.map((A,j)=>p.jsx(Vhe,{x:j==0?0:S<10?14:20,dy:j>0?b_:X5,children:A},j))})})};let u=null;const d=({bars:g})=>g.map((v,b)=>{var y;if(name=(y=v==null?void 0:v.data)==null?void 0:y.id,!(name!==u&&u!==null))return u=name,p.jsx(c,{bar:v},`bar-label-${b}`)}),f=e.map(g=>g==null?void 0:g.total),h=Go().domain([0,Math.max(...f)]).nice().ticks(5),m=e.slice().reverse();return p.jsx("div",{style:{height:t+20},children:p.jsx($l,{data:m,colors:({id:g,data:v})=>String(v[`${g}Color`]),keys:o,indexBy:a,margin:{top:50,right:10,bottom:0,left:140,...n},layout:"horizontal",enableGridY:!1,enableGridX:!0,padding:.5,enableLabel:!1,axisTop:{tickSize:5,tickValues:h,legend:l,legendPosition:"middle",legendOffset:-40},gridXValues:h,axisBottom:null,axisLeft:null,layers:["grid","axes","bars",d],tooltip:g=>p.jsx(Un,{body:(s==null?void 0:s(g))||p.jsx("span",{children:"Overview barchart tooltip"})})})})},The=({sankey:e={},bar:t={}})=>{const n=$.useRef(null),[r,i]=$.useState(null),o=()=>{n.current&&i(n.current.clientHeight)};return $.useEffect(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),p.jsx(p.Fragment,{children:p.jsxs(ho,{gutter:[24,0],children:[p.jsxs(br,{span:12,children:[p.jsx(u3e,{ref:n,...e}),p.jsx(Ct,{justify:"center",style:{marginTop:16,width:"100%"},children:p.jsx(d3e,{})})]}),p.jsx(br,{span:12,children:p.jsx(Rhe,{...t,height:r})})]})})},Vp=({data:e,graph:t,stroke:n,strokeWidth:r,dashed:i})=>p.jsx("g",{children:p.jsx("line",{x1:t.xScale(e==null?void 0:e.x1),y1:t.yScale(e==null?void 0:e.y1),x2:t.xScale(e==null?void 0:e.x2),y2:t.yScale(e==null?void 0:e.y2),stroke:n||"red",strokeWidth:r||3,strokeDasharray:i?"10, 5":null})}),khe=({data:e,color:t,graph:n})=>{const r=bS().x(i=>n.xScale(i==null?void 0:i.x)).y0(i=>n.yScale(i==null?void 0:i.y0)).y1(i=>n.yScale(i==null?void 0:i.y1)).curve(Su);return p.jsx("path",{d:r(e),fill:t||"#3daff7",fillOpacity:.3})},jhe=yt.span`
568
+ `,Ohe=(e,t,n=12)=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n}px Roboto, sans-serif`;const o=e.split(" "),a=[];let s=o[0];for(let l=1;l<o.length;l++){const c=`${s} ${o[l]}`;i.measureText(c).width>t?(a.push(s),s=o[l]):s=c}return a.push(s),a},Rhe=({data:e=null,height:t=600,margin:n={},labelWidth:r=120,labelPadding:i=20,keys:o=null,indexBy:a=null,tooltip:s=null,legendTitle:l="Legend title"})=>{const c=({bar:g})=>{var O,k;const v=$.useRef(null),[b,y]=$.useState(0),x=g.data.data,S=(O=na==null?void 0:na[x==null?void 0:x[a]])==null?void 0:O.key,w=(k=na==null?void 0:na[x==null?void 0:x[a]])==null?void 0:k.name,M=`${S}. ${w}`,E=Ohe(M,r,X5);$.useEffect(()=>{if(v.current){const A=v.current.getBoundingClientRect();y(A.height)}},[]);const H=r+i,_=g.y+g.height/2-b/2;return p.jsx("g",{ref:v,transform:`translate(-${H}, ${_})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:E.map((A,j)=>p.jsx(Vhe,{x:j==0?0:S<10?14:20,dy:j>0?b_:X5,children:A},j))})})};let u=null;const d=({bars:g})=>g.map((v,b)=>{var y;if(name=(y=v==null?void 0:v.data)==null?void 0:y.id,!(name!==u&&u!==null))return u=name,p.jsx(c,{bar:v},`bar-label-${b}`)}),f=e.map(g=>g==null?void 0:g.total),h=Go().domain([0,Math.max(...f)]).nice().ticks(5),m=e.slice().reverse();return p.jsx("div",{style:{height:t+20},children:p.jsx($l,{data:m,colors:({id:g,data:v})=>String(v[`${g}Color`]),keys:o,indexBy:a,margin:{top:50,right:10,bottom:0,left:140,...n},layout:"horizontal",enableGridY:!1,enableGridX:!0,padding:.5,enableLabel:!1,axisTop:{tickSize:5,tickValues:h,legend:l,legendPosition:"middle",legendOffset:-40},gridXValues:h,axisBottom:null,axisLeft:null,layers:["grid","axes","bars",d],tooltip:g=>p.jsx(Un,{body:(s==null?void 0:s(g))||p.jsx("span",{children:"Overview barchart tooltip"})})})})},The=({sankey:e={},bar:t={}})=>{const n=$.useRef(null),[r,i]=$.useState(null),o=()=>{n.current&&i(n.current.clientHeight)};return $.useEffect(()=>(o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}),[]),p.jsx(p.Fragment,{children:p.jsxs(ho,{gutter:[24,0],children:[p.jsxs(br,{span:12,children:[p.jsx(u3e,{ref:n,...e}),p.jsx(yt,{justify:"center",style:{marginTop:16,width:"100%"},children:p.jsx(d3e,{})})]}),p.jsx(br,{span:12,children:p.jsx(Rhe,{...t,height:r})})]})})},Vp=({data:e,graph:t,stroke:n,strokeWidth:r,dashed:i})=>p.jsx("g",{children:p.jsx("line",{x1:t.xScale(e==null?void 0:e.x1),y1:t.yScale(e==null?void 0:e.y1),x2:t.xScale(e==null?void 0:e.x2),y2:t.yScale(e==null?void 0:e.y2),stroke:n||"red",strokeWidth:r||3,strokeDasharray:i?"10, 5":null})}),khe=({data:e,color:t,graph:n})=>{const r=bS().x(i=>n.xScale(i==null?void 0:i.x)).y0(i=>n.yScale(i==null?void 0:i.y0)).y1(i=>n.yScale(i==null?void 0:i.y1)).curve(Su);return p.jsx("path",{d:r(e),fill:t||"#3daff7",fillOpacity:.3})},jhe=Ct.span`
566
569
  font: var(--gf-label-sm-default);
567
570
  color: var(--gf-color-text-primary);
568
- `,an={domestic:"hsl(42, 89%, 49%)",raw:"hsl(331, 100%, 36%)",abiotic:"hsl(0, 0%, 49%)",goal:"hsl(182, 30%, 45%)"},L2=e=>e.reduce((t,n)=>n<t?n:t,1/0),P2=e=>e.reduce((t,n)=>n>t?n:t,-1/0),Lhe=({data:e,style:t={},height:n=600,margin:r={},xScale:i={},yScale:o={},axisBottom:a={},axisLeft:s={},tooltip:l=null,maxYear:c=2030})=>{const u=e.map(_=>_==null?void 0:_.points),d=e.map(_=>_==null?void 0:_.area),f=d.map(_=>_==null?void 0:_.id),h=_=>d.map((O,k)=>p.jsx(khe,{data:O==null?void 0:O.data,color:an==null?void 0:an[O==null?void 0:O.id],graph:_},`area-${k}`)),m=e.map(_=>_==null?void 0:_.line),g=_=>m.map((O,k)=>p.jsx(Vp,{data:O==null?void 0:O.data,stroke:an==null?void 0:an[O==null?void 0:O.id],graph:_},`line-${k}`)),v=e.filter(_=>(_==null?void 0:_.goal)!==void 0).map(_=>_==null?void 0:_.goal);v.length&&f.push("goal");const b=_=>v.map((O,k)=>p.jsx(Vp,{data:O,graph:_,stroke:an==null?void 0:an.goal,dashed:!0},`goal-${k}`)),y=d.map(_=>_.data.map(O=>O.x)).flat(),x=L2(y);P2(y);const S=d.map(_=>_.data.map(O=>O.y0)).flat(),w=d.map(_=>_.data.map(O=>O.y1)).flat(),M=Math.min(L2(S),L2(w)),E=Math.max(P2(S),P2(w)),H=({data:_})=>{const O=({color:L})=>p.jsx("div",{style:{minWidth:8,minHeight:4,backgroundColor:L}}),k=({color:L})=>p.jsx("div",{style:{minWidth:8,minHeight:8,borderRadius:4,backgroundColor:L}}),A=(L,R=.3)=>L.replace("hsl","hsla").replace(")",`, ${R})`),j=["abiotic","goal"],V=_.filter(L=>!j.includes(L))[0],T=[{name:"Totaal",color:an==null?void 0:an[V],shape:"line"},{name:"Abiotisch",color:an==null?void 0:an.abiotic,shape:"line"},...v.length?[{name:"Doelstelling 2030",color:an==null?void 0:an.goal,shape:"line"}]:[],{name:"Betrouwbaarheidsmarge",color:A(an==null?void 0:an[V]),shape:"circle"},{name:"Betrouwbaarheidsmarge",color:A(an==null?void 0:an.abiotic),shape:"circle"}];return p.jsx(Ct,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:T.map((L,R)=>p.jsxs(Ct,{gap:4,align:"center",children:[L.shape==="line"?p.jsx(O,{color:L.color}):p.jsx(k,{color:L.color}),p.jsx(jhe,{children:L.name})]},`legend-${R}`))})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{width:"100%",height:n,...t},children:p.jsx(sM,{data:u,colors:_=>an==null?void 0:an[_==null?void 0:_.serieId],margin:{top:20,right:120,bottom:60,left:120,...r},xScale:{type:"linear",min:x,max:c,...i},yScale:{type:"linear",min:M<0?M:0,max:E,...o},axisBottom:{orient:"bottom",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:46,truncateTickAt:0,legend:"axisBottom",...a},axisLeft:{orient:"left",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-60,truncateTickAt:0,legend:"axisLeft",...s},layers:["grid","markers","axes","legends",h,g,b,"nodes"],tooltip:({node:_})=>p.jsx(Un,{body:(l==null?void 0:l({node:_}))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(H,{data:f})]})]})},Q5=12,W7=14,Op=yt.tspan`
571
+ `,an={domestic:"hsl(42, 89%, 49%)",raw:"hsl(331, 100%, 36%)",abiotic:"hsl(0, 0%, 49%)",goal:"hsl(182, 30%, 45%)"},L2=e=>e.reduce((t,n)=>n<t?n:t,1/0),P2=e=>e.reduce((t,n)=>n>t?n:t,-1/0),Lhe=({data:e,style:t={},height:n=600,margin:r={},xScale:i={},yScale:o={},axisBottom:a={},axisLeft:s={},tooltip:l=null,maxYear:c=2030})=>{const u=e.map(_=>_==null?void 0:_.points),d=e.map(_=>_==null?void 0:_.area),f=d.map(_=>_==null?void 0:_.id),h=_=>d.map((O,k)=>p.jsx(khe,{data:O==null?void 0:O.data,color:an==null?void 0:an[O==null?void 0:O.id],graph:_},`area-${k}`)),m=e.map(_=>_==null?void 0:_.line),g=_=>m.map((O,k)=>p.jsx(Vp,{data:O==null?void 0:O.data,stroke:an==null?void 0:an[O==null?void 0:O.id],graph:_},`line-${k}`)),v=e.filter(_=>(_==null?void 0:_.goal)!==void 0).map(_=>_==null?void 0:_.goal);v.length&&f.push("goal");const b=_=>v.map((O,k)=>p.jsx(Vp,{data:O,graph:_,stroke:an==null?void 0:an.goal,dashed:!0},`goal-${k}`)),y=d.map(_=>_.data.map(O=>O.x)).flat(),x=L2(y);P2(y);const S=d.map(_=>_.data.map(O=>O.y0)).flat(),w=d.map(_=>_.data.map(O=>O.y1)).flat(),M=Math.min(L2(S),L2(w)),E=Math.max(P2(S),P2(w)),H=({data:_})=>{const O=({color:L})=>p.jsx("div",{style:{minWidth:8,minHeight:4,backgroundColor:L}}),k=({color:L})=>p.jsx("div",{style:{minWidth:8,minHeight:8,borderRadius:4,backgroundColor:L}}),A=(L,R=.3)=>L.replace("hsl","hsla").replace(")",`, ${R})`),j=["abiotic","goal"],V=_.filter(L=>!j.includes(L))[0],T=[{name:"Totaal",color:an==null?void 0:an[V],shape:"line"},{name:"Abiotisch",color:an==null?void 0:an.abiotic,shape:"line"},...v.length?[{name:"Doelstelling 2030",color:an==null?void 0:an.goal,shape:"line"}]:[],{name:"Betrouwbaarheidsmarge",color:A(an==null?void 0:an[V]),shape:"circle"},{name:"Betrouwbaarheidsmarge",color:A(an==null?void 0:an.abiotic),shape:"circle"}];return p.jsx(yt,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:T.map((L,R)=>p.jsxs(yt,{gap:4,align:"center",children:[L.shape==="line"?p.jsx(O,{color:L.color}):p.jsx(k,{color:L.color}),p.jsx(jhe,{children:L.name})]},`legend-${R}`))})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{width:"100%",height:n,...t},children:p.jsx(sM,{data:u,colors:_=>an==null?void 0:an[_==null?void 0:_.serieId],margin:{top:20,right:120,bottom:60,left:120,...r},xScale:{type:"linear",min:x,max:c,...i},yScale:{type:"linear",min:M<0?M:0,max:E,...o},axisBottom:{orient:"bottom",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:46,truncateTickAt:0,legend:"axisBottom",...a},axisLeft:{orient:"left",tickSize:5,tickPadding:5,tickRotation:0,legendPosition:"middle",legendOffset:-60,truncateTickAt:0,legend:"axisLeft",...s},layers:["grid","markers","axes","legends",h,g,b,"nodes"],tooltip:({node:_})=>p.jsx(Un,{body:(l==null?void 0:l({node:_}))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(H,{data:f})]})]})},Q5=12,W7=14,Op=Ct.tspan`
569
572
  font: var(--gf-label-md-default);
570
573
  color: var(--gf-color-text-secondary);
571
574
  font-size: ${Q5}px;
572
575
  line-height: ${W7}px;
573
- `,Phe=yt.span`
576
+ `,Phe=Ct.span`
574
577
  font: var(--gf-label-md-default);
575
578
  color: var(--gf-color-text-secondary);
576
579
  font-size: 10px;
577
580
  line-height: ${W7}px;
578
- `,y_=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},Ihe=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;y_(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},Ahe=({data:e=[],height:t=600,margin:n={},padding:r=.5,keys:i=null,indexBy:o=null,tooltip:a=null,enableLabel:s=!1,label:l=null,keyLabelWidth:c=120,keyLabelPadding:u=20,axisBottom:d={},axisTop:f={},layers:h=["grid","axes"],zeroMarker:m=!1,defs:g=[],fill:v=[],enableGridY:b=!1,enableGridX:y=!1})=>{const x=({bar:k})=>{var P;const A=$.useRef(null),[j,V]=$.useState(0),T=((P=k==null?void 0:k.data)==null?void 0:P.indexValue)||"label",L=Ihe(T,c,Q5);$.useEffect(()=>{if(A.current){const N=A.current.getBoundingClientRect();V(N.height)}},[]);const R=c+u,I=k.y+k.height/2-j/2;return p.jsx("g",{ref:A,transform:`translate(-${R}, ${I})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:L.map((N,z)=>p.jsx(Op,{x:0,dy:z>0?W7:Q5,children:N},z))})})};let S=null;const w=({bars:k})=>k.map((A,j)=>{var V;if(name=(V=A==null?void 0:A.data)==null?void 0:V.id,!(name!==S&&S!==null))return S=name,p.jsx(x,{bar:A},`bar-label-${j}`)}),M=({bar:k})=>{const j=l==null?void 0:l(k.data),V=y_(j,10),T=V.actualBoundingBoxRight+V.actualBoundingBoxLeft,L=V.actualBoundingBoxAscent+V.actualBoundingBoxDescent;if(T>=k.width)return p.jsx(p.Fragment,{});const R=k.x+k.width/2-T/2,I=k.y+k.height/2+L/2;return p.jsx("g",{transform:`translate(${R}, ${I})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:p.jsx(Op,{style:{fontSize:10},children:j||"label"})})})},E=({bars:k})=>k.map((A,j)=>p.jsx(M,{bar:A},`bar-inner-label-${j}`)),H=({data:k,keys:A})=>{g.reduce((V,T)=>(V[T.id]={...T},delete V[T.id].id,V),{}),v.reduce((V,T)=>(T.match&&T.match.id&&(V[T.match.id]=T.id),V),{});const j=A==null?void 0:A.map(V=>{var T;return{name:V,color:(T=k[0])==null?void 0:T[`${V}Color`],defs:g}});return p.jsx(Ct,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:j.map((V,T)=>p.jsxs(Ct,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:V.color}}),p.jsx(Phe,{children:V.name})]},`legend-${T}`))})},_=k=>{var V;let A=null,j=0;return(V=k==null?void 0:k.bars)==null||V.forEach(T=>{var L,R;((L=T==null?void 0:T.data)==null?void 0:L.id)!==A&&A!==null||(A=(R=T==null?void 0:T.data)==null?void 0:R.id,T.x>j&&(j=T.x))}),p.jsx("g",{children:p.jsx("line",{x1:j,y1:0,x2:j,y2:(k==null?void 0:k.height)-40+5,stroke:"black",strokeWidth:3})})},O=e.slice().reverse();return h.push("bars"),s&&h.push(E),m&&h.push(_),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{height:t},children:p.jsx($l,{data:O,colors:({id:k,data:A})=>String(A[`${k}Color`]),defs:g,fill:v,keys:i,indexBy:o,margin:{top:-10,right:0,bottom:50,left:140,...n},layout:"horizontal",enableGridY:b,enableGridX:y,padding:r,enableLabel:!1,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,...d},axisTop:f,axisLeft:null,layers:[...h,w],tooltip:k=>p.jsx(Un,{body:(a==null?void 0:a(k))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(H,{data:e,keys:i})]})]})};function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oa.apply(this,arguments)}var Nhe={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Rp=function(e,t){return"translate("+e+"px, "+t+"px)"},C_=$.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,o=zn(),a=fi(),s=a.animate,l=a.config,c=M_(),u=c[0],d=c[1],f=$.useRef(!1),h=void 0,m=!1,g=d.width>0&&d.height>0,v=Math.round(n[0]),b=Math.round(n[1]);g&&(r==="top"?(v-=d.width/2,b-=d.height+14):r==="right"?(v+=14,b-=d.height/2):r==="bottom"?(v-=d.width/2,b+=14):r==="left"?(v-=d.width+14,b-=d.height/2):r==="center"&&(v-=d.width/2,b-=d.height/2),h={transform:Rp(v,b)},f.current||(m=!0),f.current=[v,b]);var y=Qt({to:h,config:l,immediate:!s||m}),x=Oa({},Nhe,o.tooltip.wrapper,{transform:(t=y.transform)!=null?t:Rp(v,b),opacity:y.transform?1:0});return p.jsx(et.div,{ref:u,style:x,children:i})});C_.displayName="TooltipWrapper";var Fhe=$.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return p.jsx("span",{style:Oa({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Dhe=$.memo(function(e){var t,n=e.id,r=e.value,i=e.format,o=e.enableChip,a=o!==void 0&&o,s=e.color,l=e.renderContent,c=zn(),u=H_(i);if(typeof l=="function")t=l();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=p.jsxs("div",{style:c.tooltip.basic,children:[a&&p.jsx(Fhe,{color:s,style:c.tooltip.chip}),d!==void 0?p.jsxs("span",{children:[n,": ",p.jsx("strong",{children:""+d})]}):n]})}return p.jsx("div",{style:c.tooltip.container,children:t})}),zhe={width:"100%",borderCollapse:"collapse"},Bhe=$.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,o=e.renderContent,a=zn();return i.length?(t=typeof o=="function"?o():p.jsxs("div",{children:[n&&n,p.jsx("table",{style:Oa({},zhe,a.tooltip.table),children:p.jsx("tbody",{children:i.map(function(s,l){return p.jsx("tr",{children:s.map(function(c,u){return p.jsx("td",{style:a.tooltip.tableCell,children:c},u)})},l)})})})]}),p.jsx("div",{style:a.tooltip.container,children:t})):null});Bhe.displayName="TableTooltip";var J5=$.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,o=zn(),a=fi(),s=a.animate,l=a.config,c=$.useMemo(function(){return Oa({},o.crosshair.line,{pointerEvents:"none"})},[o.crosshair.line]),u=Qt({x1:t,x2:n,y1:r,y2:i,config:l,immediate:!s});return p.jsx(et.line,Oa({},u,{fill:"none",style:c}))});J5.displayName="CrosshairLine";var Whe=$.memo(function(e){var t,n,r=e.width,i=e.height,o=e.type,a=e.x,s=e.y;return o==="cross"?(t={x0:a,x1:a,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):o==="top-left"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):o==="top"?t={x0:a,x1:a,y0:0,y1:s}:o==="top-right"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):o==="right"?n={x0:a,x1:r,y0:s,y1:s}:o==="bottom-right"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:a,x1:r,y0:s,y1:s}):o==="bottom"?t={x0:a,x1:a,y0:s,y1:i}:o==="bottom-left"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:0,x1:a,y0:s,y1:s}):o==="left"?n={x0:0,x1:a,y0:s,y1:s}:o==="x"?t={x0:a,x1:a,y0:0,y1:i}:o==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),p.jsxs(p.Fragment,{children:[t&&p.jsx(J5,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&p.jsx(J5,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Whe.displayName="Crosshair";var x_=$.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),eh={isVisible:!1,position:[null,null],content:null,anchor:null},w_=$.createContext(eh),Zhe=function(e){var t=$.useState(eh),n=t[0],r=t[1],i=$.useCallback(function(s,l,c){var u=l[0],d=l[1];c===void 0&&(c="top"),r({isVisible:!0,position:[u,d],anchor:c,content:s})},[r]),o=$.useCallback(function(s,l,c){c===void 0&&(c="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in l?l.touches[0]:l,m=h.clientX,g=h.clientY,v=(m-u.left)*f,b=(g-u.top)*f;c!=="left"&&c!=="right"||(c=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,b],anchor:c,content:s})},[e,r]),a=$.useCallback(function(){r(eh)},[r]);return{actions:$.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:o,hideTooltip:a}},[i,o,a]),state:n}},Uhe=function(){var e=$.useContext(x_);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},qhe=function(){var e=$.useContext(w_);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},Ghe=function(e){return e.isVisible},Yhe=function(){var e=qhe();return Ghe(e)?p.jsx(C_,{position:e.position,anchor:e.anchor,children:e.content}):null},Khe=function(e){var t=e.container,n=e.children,r=Zhe(t),i=r.actions,o=r.state;return p.jsx(x_.Provider,{value:i,children:p.jsx(w_.Provider,{value:o,children:n})})},Xhe={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(this,arguments)}function Z7(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Qhe=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Jhe=function(e,t){return Fo({},t,e)},e4e=function(e,t){var n=A4({},e,t);return Qhe.forEach(function(r){ri(n,r,Jhe(yn(n,r),n.text))}),n},S_=$.createContext(),$_=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,o=i===void 0?"default":i,a=$.useMemo(function(){var s=wf(o)?Aa[o]:o;return{animate:r,config:s}},[r,o]);return p.jsx(S_.Provider,{value:a,children:t})},Md={animate:D.bool,motionConfig:D.oneOfType([D.oneOf(Object.keys(Aa)),D.shape({mass:D.number,tension:D.number,friction:D.number,clamp:D.bool,precision:D.number,velocity:D.number,duration:D.number,easing:D.func})])};$_.propTypes={children:D.node.isRequired,animate:Md.animate,config:Md.motionConfig};var fi=function(){return $.useContext(S_)},t4e=function(e){var t=fi(),n=t.animate,r=t.config,i=function(s){var l=$.useRef();return $.useEffect(function(){l.current=s},[s]),l.current}(e),o=$.useMemo(function(){return xf(i,e)},[i,e]),a=Qt({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return On(a,o)},n4e={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:ue(Hi),PRGn:ue(Ei),PiYG:ue(Vi),PuOr:ue(Oi),RdBu:ue(Ri),RdGy:ue(Ti),RdYlBu:ue(ki),RdYlGn:ue(ji),spectral:ue(Li),blues:ue(Gi),greens:ue(Yi),greys:ue(Ki),oranges:ue(Ji),purples:ue(Xi),reds:ue(Qi),BuGn:ue(Pi),BuPu:ue(Ii),GnBu:ue(Ai),OrRd:ue(Ni),PuBuGn:ue(Fi),PuBu:ue(Di),PuRd:ue(zi),RdPu:ue(Bi),YlGnBu:ue(Wi),YlGn:ue(Zi),YlOrBr:ue(Ui),YlOrRd:ue(qi)},r4e=Object.keys(n4e);ue(Hi),ue(Ei),ue(Vi),ue(Oi),ue(Ri),ue(Ti),ue(ki),ue(ji),ue(Li),ue(Gi),ue(Yi),ue(Ki),ue(Ji),ue(Xi),ue(Qi),ue(Pi),ue(Ii),ue(Ai),ue(Ni),ue(Fi),ue(Di),ue(zi),ue(Bi),ue(Wi),ue(Zi),ue(Ui),ue(qi);D.oneOfType([D.oneOf(r4e),D.func,D.arrayOf(D.string)]);var i4e={basis:U6,basisClosed:q6,basisOpen:G6,bundle:Y6,cardinal:X6,cardinalClosed:J6,cardinalOpen:t7,catmullRom:r7,catmullRomClosed:i7,catmullRomOpen:o7,linear:wu,linearClosed:a7,monotoneX:Su,monotoneY:Of,natural:s7,step:l7,stepAfter:u7,stepBefore:c7},U7=Object.keys(i4e);U7.filter(function(e){return e.endsWith("Closed")});Cl(U7,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");Cl(U7,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");D.shape({top:D.number,right:D.number,bottom:D.number,left:D.number}).isRequired;var o4e=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];D.oneOf(o4e);_r(Co);var a4e={top:0,right:0,bottom:0,left:0},s4e=function(e,t,n){return n===void 0&&(n={}),$.useMemo(function(){var r=Fo({},a4e,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},M_=function(){var e=$.useRef(null),t=$.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=$.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(o){var a=o[0];return r(a.contentRect)})})[0];return $.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},l4e=function(e){return $.useMemo(function(){return e4e(Xhe,e)},[e])},__=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?Wa(e.slice("5")):Da(e):function(t){return""+t}},H_=function(e){return $.useMemo(function(){return __(e)},[e])},E_=$.createContext(),c4e={},V_=function(e){var t=e.theme,n=t===void 0?c4e:t,r=e.children,i=l4e(n);return p.jsx(E_.Provider,{value:i,children:r})};V_.propTypes={children:D.node.isRequired,theme:D.object};var zn=function(){return $.useContext(E_)},u4e=["outlineWidth","outlineColor","outlineOpacity"],O_=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Z7(e,u4e)},R_=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?$.cloneElement(r,{},t):t};R_.propTypes={children:D.node.isRequired,condition:D.bool.isRequired,wrapper:D.element.isRequired};var d4e={position:"relative"},T_=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,o=e.isInteractive,a=o===void 0||o,s=e.animate,l=e.motionConfig,c=$.useRef(null);return p.jsx(V_,{theme:n,children:p.jsx($_,{animate:s,config:l,children:p.jsx(Khe,{container:c,children:p.jsxs(R_,{condition:i,wrapper:p.jsx("div",{style:d4e,ref:c}),children:[t,a&&p.jsx(Yhe,{})]})})})})};T_.propTypes={children:D.element.isRequired,isInteractive:D.bool,renderWrapper:D.bool,theme:D.object,animate:D.bool,motionConfig:D.oneOfType([D.string,Md.motionConfig])};D.func.isRequired,D.bool,D.bool,D.object.isRequired,D.bool.isRequired,D.oneOfType([D.string,Md.motionConfig]);var k_=function(e){var t=e.children,n=M_(),r=n[0],i=n[1],o=i.width>0&&i.height>0;return p.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:o&&t({width:i.width,height:i.height})})};k_.propTypes={children:D.func.isRequired};var f4e=["id","colors"],j_=function(e){var t=e.id,n=e.colors,r=Z7(e,f4e);return p.jsx("linearGradient",Fo({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var o=i.offset,a=i.color,s=i.opacity;return p.jsx("stop",{offset:o+"%",stopColor:a,stopOpacity:s!==void 0?s:1},o)})}))};j_.propTypes={id:D.string.isRequired,colors:D.arrayOf(D.shape({offset:D.number.isRequired,color:D.string.isRequired,opacity:D.number})).isRequired,gradientTransform:D.string};var h4e={linearGradient:j_},Jl={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},th=$.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Jl.background:n,i=e.color,o=i===void 0?Jl.color:i,a=e.size,s=a===void 0?Jl.size:a,l=e.padding,c=l===void 0?Jl.padding:l,u=e.stagger,d=u===void 0?Jl.stagger:u,f=s+c,h=s/2,m=c/2;return d===!0&&(f=2*s+2*c),p.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[p.jsx("rect",{width:f,height:f,fill:r}),p.jsx("circle",{cx:m+h,cy:m+h,r:h,fill:o}),d&&p.jsx("circle",{cx:1.5*c+s+h,cy:1.5*c+s+h,r:h,fill:o})]})});th.displayName="PatternDots",th.propTypes={id:D.string.isRequired,color:D.string.isRequired,background:D.string.isRequired,size:D.number.isRequired,padding:D.number.isRequired,stagger:D.bool.isRequired};var nh=function(e){return e*Math.PI/180},g4e=function(e){return 180*e/Math.PI},v4e=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},m4e=function(e){var t=e%360;return t<0&&(t+=360),t},p4e={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},ec={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},rh=$.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?ec.spacing:n,i=e.rotation,o=i===void 0?ec.rotation:i,a=e.background,s=a===void 0?ec.background:a,l=e.color,c=l===void 0?ec.color:l,u=e.lineWidth,d=u===void 0?ec.lineWidth:u,f=Math.round(o)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var m,g=h,v=h;return f===0?m=`
581
+ `,y_=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},Ihe=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;y_(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},Ahe=({data:e=[],height:t=600,margin:n={},padding:r=.5,keys:i=null,indexBy:o=null,tooltip:a=null,enableLabel:s=!1,label:l=null,keyLabelWidth:c=120,keyLabelPadding:u=20,axisBottom:d={},axisTop:f={},layers:h=["grid","axes"],zeroMarker:m=!1,defs:g=[],fill:v=[],enableGridY:b=!1,enableGridX:y=!1})=>{const x=({bar:k})=>{var P;const A=$.useRef(null),[j,V]=$.useState(0),T=((P=k==null?void 0:k.data)==null?void 0:P.indexValue)||"label",L=Ihe(T,c,Q5);$.useEffect(()=>{if(A.current){const N=A.current.getBoundingClientRect();V(N.height)}},[]);const R=c+u,I=k.y+k.height/2-j/2;return p.jsx("g",{ref:A,transform:`translate(-${R}, ${I})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:L.map((N,z)=>p.jsx(Op,{x:0,dy:z>0?W7:Q5,children:N},z))})})};let S=null;const w=({bars:k})=>k.map((A,j)=>{var V;if(name=(V=A==null?void 0:A.data)==null?void 0:V.id,!(name!==S&&S!==null))return S=name,p.jsx(x,{bar:A},`bar-label-${j}`)}),M=({bar:k})=>{const j=l==null?void 0:l(k.data),V=y_(j,10),T=V.actualBoundingBoxRight+V.actualBoundingBoxLeft,L=V.actualBoundingBoxAscent+V.actualBoundingBoxDescent;if(T>=k.width)return p.jsx(p.Fragment,{});const R=k.x+k.width/2-T/2,I=k.y+k.height/2+L/2;return p.jsx("g",{transform:`translate(${R}, ${I})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:p.jsx(Op,{style:{fontSize:10},children:j||"label"})})})},E=({bars:k})=>k.map((A,j)=>p.jsx(M,{bar:A},`bar-inner-label-${j}`)),H=({data:k,keys:A})=>{g.reduce((V,T)=>(V[T.id]={...T},delete V[T.id].id,V),{}),v.reduce((V,T)=>(T.match&&T.match.id&&(V[T.match.id]=T.id),V),{});const j=A==null?void 0:A.map(V=>{var T;return{name:V,color:(T=k[0])==null?void 0:T[`${V}Color`],defs:g}});return p.jsx(yt,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:j.map((V,T)=>p.jsxs(yt,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:V.color}}),p.jsx(Phe,{children:V.name})]},`legend-${T}`))})},_=k=>{var V;let A=null,j=0;return(V=k==null?void 0:k.bars)==null||V.forEach(T=>{var L,R;((L=T==null?void 0:T.data)==null?void 0:L.id)!==A&&A!==null||(A=(R=T==null?void 0:T.data)==null?void 0:R.id,T.x>j&&(j=T.x))}),p.jsx("g",{children:p.jsx("line",{x1:j,y1:0,x2:j,y2:(k==null?void 0:k.height)-40+5,stroke:"black",strokeWidth:3})})},O=e.slice().reverse();return h.push("bars"),s&&h.push(E),m&&h.push(_),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{height:t},children:p.jsx($l,{data:O,colors:({id:k,data:A})=>String(A[`${k}Color`]),defs:g,fill:v,keys:i,indexBy:o,margin:{top:-10,right:0,bottom:50,left:140,...n},layout:"horizontal",enableGridY:b,enableGridX:y,padding:r,enableLabel:!1,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,...d},axisTop:f,axisLeft:null,layers:[...h,w],tooltip:k=>p.jsx(Un,{body:(a==null?void 0:a(k))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(H,{data:e,keys:i})]})]})};function Oa(){return Oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oa.apply(this,arguments)}var Nhe={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Rp=function(e,t){return"translate("+e+"px, "+t+"px)"},C_=$.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,o=zn(),a=fi(),s=a.animate,l=a.config,c=M_(),u=c[0],d=c[1],f=$.useRef(!1),h=void 0,m=!1,g=d.width>0&&d.height>0,v=Math.round(n[0]),b=Math.round(n[1]);g&&(r==="top"?(v-=d.width/2,b-=d.height+14):r==="right"?(v+=14,b-=d.height/2):r==="bottom"?(v-=d.width/2,b+=14):r==="left"?(v-=d.width+14,b-=d.height/2):r==="center"&&(v-=d.width/2,b-=d.height/2),h={transform:Rp(v,b)},f.current||(m=!0),f.current=[v,b]);var y=Qt({to:h,config:l,immediate:!s||m}),x=Oa({},Nhe,o.tooltip.wrapper,{transform:(t=y.transform)!=null?t:Rp(v,b),opacity:y.transform?1:0});return p.jsx(et.div,{ref:u,style:x,children:i})});C_.displayName="TooltipWrapper";var Fhe=$.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return p.jsx("span",{style:Oa({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Dhe=$.memo(function(e){var t,n=e.id,r=e.value,i=e.format,o=e.enableChip,a=o!==void 0&&o,s=e.color,l=e.renderContent,c=zn(),u=H_(i);if(typeof l=="function")t=l();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=p.jsxs("div",{style:c.tooltip.basic,children:[a&&p.jsx(Fhe,{color:s,style:c.tooltip.chip}),d!==void 0?p.jsxs("span",{children:[n,": ",p.jsx("strong",{children:""+d})]}):n]})}return p.jsx("div",{style:c.tooltip.container,children:t})}),zhe={width:"100%",borderCollapse:"collapse"},Bhe=$.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,o=e.renderContent,a=zn();return i.length?(t=typeof o=="function"?o():p.jsxs("div",{children:[n&&n,p.jsx("table",{style:Oa({},zhe,a.tooltip.table),children:p.jsx("tbody",{children:i.map(function(s,l){return p.jsx("tr",{children:s.map(function(c,u){return p.jsx("td",{style:a.tooltip.tableCell,children:c},u)})},l)})})})]}),p.jsx("div",{style:a.tooltip.container,children:t})):null});Bhe.displayName="TableTooltip";var J5=$.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,o=zn(),a=fi(),s=a.animate,l=a.config,c=$.useMemo(function(){return Oa({},o.crosshair.line,{pointerEvents:"none"})},[o.crosshair.line]),u=Qt({x1:t,x2:n,y1:r,y2:i,config:l,immediate:!s});return p.jsx(et.line,Oa({},u,{fill:"none",style:c}))});J5.displayName="CrosshairLine";var Whe=$.memo(function(e){var t,n,r=e.width,i=e.height,o=e.type,a=e.x,s=e.y;return o==="cross"?(t={x0:a,x1:a,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):o==="top-left"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:0,x1:a,y0:s,y1:s}):o==="top"?t={x0:a,x1:a,y0:0,y1:s}:o==="top-right"?(t={x0:a,x1:a,y0:0,y1:s},n={x0:a,x1:r,y0:s,y1:s}):o==="right"?n={x0:a,x1:r,y0:s,y1:s}:o==="bottom-right"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:a,x1:r,y0:s,y1:s}):o==="bottom"?t={x0:a,x1:a,y0:s,y1:i}:o==="bottom-left"?(t={x0:a,x1:a,y0:s,y1:i},n={x0:0,x1:a,y0:s,y1:s}):o==="left"?n={x0:0,x1:a,y0:s,y1:s}:o==="x"?t={x0:a,x1:a,y0:0,y1:i}:o==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),p.jsxs(p.Fragment,{children:[t&&p.jsx(J5,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&p.jsx(J5,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Whe.displayName="Crosshair";var x_=$.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),eh={isVisible:!1,position:[null,null],content:null,anchor:null},w_=$.createContext(eh),Zhe=function(e){var t=$.useState(eh),n=t[0],r=t[1],i=$.useCallback(function(s,l,c){var u=l[0],d=l[1];c===void 0&&(c="top"),r({isVisible:!0,position:[u,d],anchor:c,content:s})},[r]),o=$.useCallback(function(s,l,c){c===void 0&&(c="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in l?l.touches[0]:l,m=h.clientX,g=h.clientY,v=(m-u.left)*f,b=(g-u.top)*f;c!=="left"&&c!=="right"||(c=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,b],anchor:c,content:s})},[e,r]),a=$.useCallback(function(){r(eh)},[r]);return{actions:$.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:o,hideTooltip:a}},[i,o,a]),state:n}},Uhe=function(){var e=$.useContext(x_);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},qhe=function(){var e=$.useContext(w_);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},Ghe=function(e){return e.isVisible},Yhe=function(){var e=qhe();return Ghe(e)?p.jsx(C_,{position:e.position,anchor:e.anchor,children:e.content}):null},Khe=function(e){var t=e.container,n=e.children,r=Zhe(t),i=r.actions,o=r.state;return p.jsx(x_.Provider,{value:i,children:p.jsx(w_.Provider,{value:o,children:n})})},Xhe={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(this,arguments)}function Z7(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Qhe=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Jhe=function(e,t){return Fo({},t,e)},e4e=function(e,t){var n=A4({},e,t);return Qhe.forEach(function(r){ri(n,r,Jhe(yn(n,r),n.text))}),n},S_=$.createContext(),$_=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,o=i===void 0?"default":i,a=$.useMemo(function(){var s=wf(o)?Aa[o]:o;return{animate:r,config:s}},[r,o]);return p.jsx(S_.Provider,{value:a,children:t})},Md={animate:D.bool,motionConfig:D.oneOfType([D.oneOf(Object.keys(Aa)),D.shape({mass:D.number,tension:D.number,friction:D.number,clamp:D.bool,precision:D.number,velocity:D.number,duration:D.number,easing:D.func})])};$_.propTypes={children:D.node.isRequired,animate:Md.animate,config:Md.motionConfig};var fi=function(){return $.useContext(S_)},t4e=function(e){var t=fi(),n=t.animate,r=t.config,i=function(s){var l=$.useRef();return $.useEffect(function(){l.current=s},[s]),l.current}(e),o=$.useMemo(function(){return xf(i,e)},[i,e]),a=Qt({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return On(a,o)},n4e={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:ue(Hi),PRGn:ue(Ei),PiYG:ue(Vi),PuOr:ue(Oi),RdBu:ue(Ri),RdGy:ue(Ti),RdYlBu:ue(ki),RdYlGn:ue(ji),spectral:ue(Li),blues:ue(Gi),greens:ue(Yi),greys:ue(Ki),oranges:ue(Ji),purples:ue(Xi),reds:ue(Qi),BuGn:ue(Pi),BuPu:ue(Ii),GnBu:ue(Ai),OrRd:ue(Ni),PuBuGn:ue(Fi),PuBu:ue(Di),PuRd:ue(zi),RdPu:ue(Bi),YlGnBu:ue(Wi),YlGn:ue(Zi),YlOrBr:ue(Ui),YlOrRd:ue(qi)},r4e=Object.keys(n4e);ue(Hi),ue(Ei),ue(Vi),ue(Oi),ue(Ri),ue(Ti),ue(ki),ue(ji),ue(Li),ue(Gi),ue(Yi),ue(Ki),ue(Ji),ue(Xi),ue(Qi),ue(Pi),ue(Ii),ue(Ai),ue(Ni),ue(Fi),ue(Di),ue(zi),ue(Bi),ue(Wi),ue(Zi),ue(Ui),ue(qi);D.oneOfType([D.oneOf(r4e),D.func,D.arrayOf(D.string)]);var i4e={basis:U6,basisClosed:q6,basisOpen:G6,bundle:Y6,cardinal:X6,cardinalClosed:J6,cardinalOpen:t7,catmullRom:r7,catmullRomClosed:i7,catmullRomOpen:o7,linear:wu,linearClosed:a7,monotoneX:Su,monotoneY:Of,natural:s7,step:l7,stepAfter:u7,stepBefore:c7},U7=Object.keys(i4e);U7.filter(function(e){return e.endsWith("Closed")});Cl(U7,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");Cl(U7,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");D.shape({top:D.number,right:D.number,bottom:D.number,left:D.number}).isRequired;var o4e=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];D.oneOf(o4e);_r(Co);var a4e={top:0,right:0,bottom:0,left:0},s4e=function(e,t,n){return n===void 0&&(n={}),$.useMemo(function(){var r=Fo({},a4e,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},M_=function(){var e=$.useRef(null),t=$.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=$.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(o){var a=o[0];return r(a.contentRect)})})[0];return $.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},l4e=function(e){return $.useMemo(function(){return e4e(Xhe,e)},[e])},__=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?Wa(e.slice("5")):Da(e):function(t){return""+t}},H_=function(e){return $.useMemo(function(){return __(e)},[e])},E_=$.createContext(),c4e={},V_=function(e){var t=e.theme,n=t===void 0?c4e:t,r=e.children,i=l4e(n);return p.jsx(E_.Provider,{value:i,children:r})};V_.propTypes={children:D.node.isRequired,theme:D.object};var zn=function(){return $.useContext(E_)},u4e=["outlineWidth","outlineColor","outlineOpacity"],O_=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Z7(e,u4e)},R_=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?$.cloneElement(r,{},t):t};R_.propTypes={children:D.node.isRequired,condition:D.bool.isRequired,wrapper:D.element.isRequired};var d4e={position:"relative"},T_=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,o=e.isInteractive,a=o===void 0||o,s=e.animate,l=e.motionConfig,c=$.useRef(null);return p.jsx(V_,{theme:n,children:p.jsx($_,{animate:s,config:l,children:p.jsx(Khe,{container:c,children:p.jsxs(R_,{condition:i,wrapper:p.jsx("div",{style:d4e,ref:c}),children:[t,a&&p.jsx(Yhe,{})]})})})})};T_.propTypes={children:D.element.isRequired,isInteractive:D.bool,renderWrapper:D.bool,theme:D.object,animate:D.bool,motionConfig:D.oneOfType([D.string,Md.motionConfig])};D.func.isRequired,D.bool,D.bool,D.object.isRequired,D.bool.isRequired,D.oneOfType([D.string,Md.motionConfig]);var k_=function(e){var t=e.children,n=M_(),r=n[0],i=n[1],o=i.width>0&&i.height>0;return p.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:o&&t({width:i.width,height:i.height})})};k_.propTypes={children:D.func.isRequired};var f4e=["id","colors"],j_=function(e){var t=e.id,n=e.colors,r=Z7(e,f4e);return p.jsx("linearGradient",Fo({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var o=i.offset,a=i.color,s=i.opacity;return p.jsx("stop",{offset:o+"%",stopColor:a,stopOpacity:s!==void 0?s:1},o)})}))};j_.propTypes={id:D.string.isRequired,colors:D.arrayOf(D.shape({offset:D.number.isRequired,color:D.string.isRequired,opacity:D.number})).isRequired,gradientTransform:D.string};var h4e={linearGradient:j_},Jl={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},th=$.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Jl.background:n,i=e.color,o=i===void 0?Jl.color:i,a=e.size,s=a===void 0?Jl.size:a,l=e.padding,c=l===void 0?Jl.padding:l,u=e.stagger,d=u===void 0?Jl.stagger:u,f=s+c,h=s/2,m=c/2;return d===!0&&(f=2*s+2*c),p.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[p.jsx("rect",{width:f,height:f,fill:r}),p.jsx("circle",{cx:m+h,cy:m+h,r:h,fill:o}),d&&p.jsx("circle",{cx:1.5*c+s+h,cy:1.5*c+s+h,r:h,fill:o})]})});th.displayName="PatternDots",th.propTypes={id:D.string.isRequired,color:D.string.isRequired,background:D.string.isRequired,size:D.number.isRequired,padding:D.number.isRequired,stagger:D.bool.isRequired};var nh=function(e){return e*Math.PI/180},g4e=function(e){return 180*e/Math.PI},v4e=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},m4e=function(e){var t=e%360;return t<0&&(t+=360),t},p4e={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},ec={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},rh=$.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?ec.spacing:n,i=e.rotation,o=i===void 0?ec.rotation:i,a=e.background,s=a===void 0?ec.background:a,l=e.color,c=l===void 0?ec.color:l,u=e.lineWidth,d=u===void 0?ec.lineWidth:u,f=Math.round(o)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var m,g=h,v=h;return f===0?m=`
579
582
  M 0 0 L `+g+` 0
580
583
  M 0 `+v+" L "+g+" "+v+`
581
584
  `:f===90?m=`
@@ -590,52 +593,52 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
590
593
  M `+-g+" "+2*v+" L "+2*g+" "+-v+`
591
594
  M 0 `+2*v+" L "+2*g+` 0
592
595
  `),p.jsxs("pattern",{id:t,width:g,height:v,patternUnits:"userSpaceOnUse",children:[p.jsx("rect",{width:g,height:v,fill:s,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),p.jsx("path",{d:m,strokeWidth:d,stroke:c,strokeLinecap:"square"})]})});rh.displayName="PatternLines",rh.propTypes={id:D.string.isRequired,spacing:D.number.isRequired,rotation:D.number.isRequired,background:D.string.isRequired,color:D.string.isRequired,lineWidth:D.number.isRequired};var tc={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},ih=$.memo(function(e){var t=e.id,n=e.color,r=n===void 0?tc.color:n,i=e.background,o=i===void 0?tc.background:i,a=e.size,s=a===void 0?tc.size:a,l=e.padding,c=l===void 0?tc.padding:l,u=e.stagger,d=u===void 0?tc.stagger:u,f=s+c,h=c/2;return d===!0&&(f=2*s+2*c),p.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[p.jsx("rect",{width:f,height:f,fill:o}),p.jsx("rect",{x:h,y:h,width:s,height:s,fill:r}),d&&p.jsx("rect",{x:1.5*c+s,y:1.5*c+s,width:s,height:s,fill:r})]})});ih.displayName="PatternSquares",ih.propTypes={id:D.string.isRequired,color:D.string.isRequired,background:D.string.isRequired,size:D.number.isRequired,padding:D.number.isRequired,stagger:D.bool.isRequired};var b4e={patternDots:th,patternLines:rh,patternSquares:ih},y4e=["type"],oh=Fo({},h4e,b4e),L_=function(e){var t=e.defs;return!t||t.length<1?null:p.jsx("defs",{"aria-hidden":!0,children:t.map(function(n){var r=n.type,i=Z7(n,y4e);return oh[r]?$.createElement(oh[r],Fo({key:i.id},i)):null})})};L_.propTypes={defs:D.arrayOf(D.shape({type:D.oneOf(Object.keys(oh)).isRequired,id:D.string.isRequired}))};var C4e=$.memo(L_),P_=function(e){var t=e.width,n=e.height,r=e.margin,i=e.defs,o=e.children,a=e.role,s=e.ariaLabel,l=e.ariaLabelledBy,c=e.ariaDescribedBy,u=e.isFocusable,d=zn();return p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:a,"aria-label":s,"aria-labelledby":l,"aria-describedby":c,focusable:u,tabIndex:u?0:void 0,children:[p.jsx(C4e,{defs:i}),p.jsx("rect",{width:t,height:n,fill:d.background}),p.jsx("g",{transform:"translate("+r.left+","+r.top+")",children:o})]})};P_.propTypes={width:D.number.isRequired,height:D.number.isRequired,margin:D.shape({top:D.number.isRequired,left:D.number.isRequired}).isRequired,defs:D.array,children:D.oneOfType([D.arrayOf(D.node),D.node]).isRequired,role:D.string,isFocusable:D.bool,ariaLabel:D.string,ariaLabelledBy:D.string,ariaDescribedBy:D.string};var I_=function(e){var t=e.size,n=e.color,r=e.borderWidth,i=e.borderColor;return p.jsx("circle",{r:t/2,fill:n,stroke:i,strokeWidth:r,style:{pointerEvents:"none"}})};I_.propTypes={size:D.number.isRequired,color:D.string.isRequired,borderWidth:D.number.isRequired,borderColor:D.string.isRequired};var x4e=$.memo(I_),A_=function(e){var t=e.x,n=e.y,r=e.symbol,i=r===void 0?x4e:r,o=e.size,a=e.datum,s=e.color,l=e.borderWidth,c=e.borderColor,u=e.label,d=e.labelTextAnchor,f=d===void 0?"middle":d,h=e.labelYOffset,m=h===void 0?-12:h,g=zn(),v=fi(),b=v.animate,y=v.config,x=Qt({transform:"translate("+t+", "+n+")",config:y,immediate:!b});return p.jsxs(et.g,{transform:x.transform,style:{pointerEvents:"none"},children:[$.createElement(i,{size:o,color:s,datum:a,borderWidth:l,borderColor:c}),u&&p.jsx("text",{textAnchor:f,y:m,style:O_(g.dots.text),children:u})]})};A_.propTypes={x:D.number.isRequired,y:D.number.isRequired,datum:D.object.isRequired,size:D.number.isRequired,color:D.string.isRequired,borderWidth:D.number.isRequired,borderColor:D.string.isRequired,symbol:D.oneOfType([D.func,D.object]),label:D.oneOfType([D.string,D.number]),labelTextAnchor:D.oneOf(["start","middle","end"]),labelYOffset:D.number};$.memo(A_);var N_=function(e){var t=e.width,n=e.height,r=e.axis,i=e.scale,o=e.value,a=e.lineStyle,s=e.textStyle,l=e.legend,c=e.legendNode,u=e.legendPosition,d=u===void 0?"top-right":u,f=e.legendOffsetX,h=f===void 0?14:f,m=e.legendOffsetY,g=m===void 0?14:m,v=e.legendOrientation,b=v===void 0?"horizontal":v,y=zn(),x=0,S=0,w=0,M=0;if(r==="y"?(w=i(o),S=t):(x=i(o),M=n),l&&!c){var E=function(H){var _=H.axis,O=H.width,k=H.height,A=H.position,j=H.offsetX,V=H.offsetY,T=H.orientation,L=0,R=0,I=T==="vertical"?-90:0,P="start";if(_==="x")switch(A){case"top-left":L=-j,R=V,P="end";break;case"top":R=-V,P=T==="horizontal"?"middle":"start";break;case"top-right":L=j,R=V,P=T==="horizontal"?"start":"end";break;case"right":L=j,R=k/2,P=T==="horizontal"?"start":"middle";break;case"bottom-right":L=j,R=k-V,P="start";break;case"bottom":R=k+V,P=T==="horizontal"?"middle":"end";break;case"bottom-left":R=k-V,L=-j,P=T==="horizontal"?"end":"start";break;case"left":L=-j,R=k/2,P=T==="horizontal"?"end":"middle"}else switch(A){case"top-left":L=j,R=-V,P="start";break;case"top":L=O/2,R=-V,P=T==="horizontal"?"middle":"start";break;case"top-right":L=O-j,R=-V,P=T==="horizontal"?"end":"start";break;case"right":L=O+j,P=T==="horizontal"?"start":"middle";break;case"bottom-right":L=O-j,R=V,P="end";break;case"bottom":L=O/2,R=V,P=T==="horizontal"?"middle":"end";break;case"bottom-left":L=j,R=V,P=T==="horizontal"?"start":"end";break;case"left":L=-j,P=T==="horizontal"?"end":"middle"}return{x:L,y:R,rotation:I,textAnchor:P}}({axis:r,width:t,height:n,position:d,offsetX:h,offsetY:g,orientation:b});c=p.jsx("text",{transform:"translate("+E.x+", "+E.y+") rotate("+E.rotation+")",textAnchor:E.textAnchor,dominantBaseline:"central",style:s,children:l})}return p.jsxs("g",{transform:"translate("+x+", "+w+")",children:[p.jsx("line",{x1:0,x2:S,y1:0,y2:M,stroke:y.markers.lineColor,strokeWidth:y.markers.lineStrokeWidth,style:a}),c]})};N_.propTypes={width:D.number.isRequired,height:D.number.isRequired,axis:D.oneOf(["x","y"]).isRequired,scale:D.func.isRequired,value:D.oneOfType([D.number,D.string,D.instanceOf(Date)]).isRequired,lineStyle:D.object,textStyle:D.object,legend:D.string,legendPosition:D.oneOf(["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]),legendOffsetX:D.number.isRequired,legendOffsetY:D.number.isRequired,legendOrientation:D.oneOf(["horizontal","vertical"]).isRequired};var w4e=$.memo(N_),F_=function(e){var t=e.markers,n=e.width,r=e.height,i=e.xScale,o=e.yScale;return t&&t.length!==0?t.map(function(a,s){return p.jsx(w4e,Fo({},a,{width:n,height:r,scale:a.axis==="y"?o:i}),s)}):null};F_.propTypes={width:D.number.isRequired,height:D.number.isRequired,xScale:D.func.isRequired,yScale:D.func.isRequired,markers:D.arrayOf(D.shape({axis:D.oneOf(["x","y"]).isRequired,value:D.oneOfType([D.number,D.string,D.instanceOf(Date)]).isRequired,lineStyle:D.object,textStyle:D.object}))};$.memo(F_);var S4e=function(e){return Js(e)?e:function(t){return yn(t,e)}},$4e=function(e){return $.useMemo(function(){return S4e(e)},[e])},Tp=function(e){var t=e;return t.type="band",t},D_=function(e){var t=e.bandwidth();if(t===0)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(r){var i;return((i=e(r))!=null?i:0)+n}},z_={millisecond:[po,po],second:[Ma,Ma],minute:[If,Uf],hour:[Af,qf],day:[Mn(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),Mn(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[_a,Ha],sunday:[_a,Ha],monday:[Nf,Gf],tuesday:[Ff,Yf],wednesday:[Df,Kf],thursday:[zf,Xf],friday:[Bf,Qf],saturday:[Wf,Jf],month:[Zf,e0],year:[_u,Hu]},M4e=Object.keys(z_),_4e=new RegExp("^every\\s*(\\d+)?\\s*("+M4e.join("|")+")s?$","i"),B_=function(e,t){if(Array.isArray(t))return t;if(typeof t=="string"&&"useUTC"in e){var n=t.match(_4e);if(n){var r=n[1],i=n[2],o=z_[i][e.useUTC?1:0];if(i==="day"){var a,s,l=e.domain(),c=l[0],u=l[1],d=new Date(u);return d.setDate(d.getDate()+1),(a=(s=o.every(Number(r??1)))==null?void 0:s.range(c,d))!=null?a:[]}if(r===void 0)return e.ticks(o);var f=o.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(t===void 0)return e.ticks();if(typeof(h=t)=="number"&&isFinite(h)&&Math.floor(h)===h)return e.ticks(t)}var h;return e.domain()};function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},si.apply(this,arguments)}var H4e=function(e){var t,n=e.axis,r=e.scale,i=e.ticksPosition,o=e.tickValues,a=e.tickSize,s=e.tickPadding,l=e.tickRotation,c=e.truncateTickAt,u=e.engine,d=u===void 0?"svg":u,f=B_(r,o),h=p4e[d],m="bandwidth"in r?D_(r):r,g={lineX:0,lineY:0},v={textX:0,textY:0},b=typeof document=="object"&&document.dir==="rtl",y=h.align.center,x=h.baseline.center;return n==="x"?(t=function(S){var w;return{x:(w=m(S))!=null?w:0,y:0}},g.lineY=a*(i==="after"?1:-1),v.textY=(a+s)*(i==="after"?1:-1),x=i==="after"?h.baseline.top:h.baseline.bottom,l===0?y=h.align.center:i==="after"&&l<0||i==="before"&&l>0?(y=h.align[b?"left":"right"],x=h.baseline.center):(i==="after"&&l>0||i==="before"&&l<0)&&(y=h.align[b?"right":"left"],x=h.baseline.center)):(t=function(S){var w;return{x:0,y:(w=m(S))!=null?w:0}},g.lineX=a*(i==="after"?1:-1),v.textX=(a+s)*(i==="after"?1:-1),y=i==="after"?h.align.left:h.align.right),{ticks:f.map(function(S){var w=typeof S=="string"?function(M){var E=String(M).length;return c&&c>0&&E>c?""+String(M).slice(0,c).concat("..."):""+M}(S):S;return si({key:S instanceof Date?""+S.valueOf():""+S,value:w},t(S),g,v)}),textAlign:y,textBaseline:x}},E4e=function(e,t){if(e===void 0||typeof e=="function")return e;if(t.type==="time"){var n=Wa(e);return function(r){return n(r instanceof Date?r:new Date(r))}}return Da(e)},kp=function(e){var t,n=e.width,r=e.height,i=e.scale,o=e.axis,a=e.values,s=(t=a,(Array.isArray(t)?a:void 0)||B_(i,a)),l="bandwidth"in i?D_(i):i,c=o==="x"?s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:(d=l(u))!=null?d:0,x2:(f=l(u))!=null?f:0,y1:0,y2:r}}):s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:0,x2:n,y1:(d=l(u))!=null?d:0,y2:(f=l(u))!=null?f:0}});return c},V4e=$.memo(function(e){var t,n=e.value,r=e.format,i=e.lineX,o=e.lineY,a=e.onClick,s=e.textBaseline,l=e.textAnchor,c=e.animatedProps,u=zn(),d=u.axis.ticks.line,f=u.axis.ticks.text,h=(t=r==null?void 0:r(n))!=null?t:n,m=$.useMemo(function(){var g={opacity:c.opacity};return a?{style:si({},g,{cursor:"pointer"}),onClick:function(v){return a(v,h)}}:{style:g}},[c.opacity,a,h]);return p.jsxs(et.g,si({transform:c.transform},m,{children:[p.jsx("line",{x1:0,x2:i,y1:0,y2:o,style:d}),f.outlineWidth>0&&p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+h}),p.jsx(et.text,{dominantBaseline:s,textAnchor:l,transform:c.textTransform,style:O_(f),children:""+h})]}))}),O4e=function(e){var t=e.axis,n=e.scale,r=e.x,i=r===void 0?0:r,o=e.y,a=o===void 0?0:o,s=e.length,l=e.ticksPosition,c=e.tickValues,u=e.tickSize,d=u===void 0?5:u,f=e.tickPadding,h=f===void 0?5:f,m=e.tickRotation,g=m===void 0?0:m,v=e.format,b=e.renderTick,y=b===void 0?V4e:b,x=e.truncateTickAt,S=e.legend,w=e.legendPosition,M=w===void 0?"end":w,E=e.legendOffset,H=E===void 0?0:E,_=e.onClick,O=e.ariaHidden,k=zn(),A=k.axis.legend.text,j=$.useMemo(function(){return E4e(v,n)},[v,n]),V=H4e({axis:t,scale:n,ticksPosition:l,tickValues:c,tickSize:d,tickPadding:h,tickRotation:g,truncateTickAt:x}),T=V.ticks,L=V.textAlign,R=V.textBaseline,I=null;if(S!==void 0){var P,N=0,z=0,q=0;t==="y"?(q=-90,N=H,M==="start"?(P="start",z=s):M==="middle"?(P="middle",z=s/2):M==="end"&&(P="end")):(z=H,M==="start"?P="start":M==="middle"?(P="middle",N=s/2):M==="end"&&(P="end",N=s)),I=p.jsxs(p.Fragment,{children:[A.outlineWidth>0&&p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:si({dominantBaseline:"central"},A),strokeWidth:2*A.outlineWidth,stroke:A.outlineColor,strokeLinejoin:"round",children:S}),p.jsx("text",{transform:"translate("+N+", "+z+") rotate("+q+")",textAnchor:P,style:si({dominantBaseline:"central"},A),children:S})]})}var G=fi(),Y=G.animate,ee=G.config,Q=Qt({transform:"translate("+i+","+a+")",lineX2:t==="x"?s:0,lineY2:t==="x"?0:s,config:ee,immediate:!Y}),K=$.useCallback(function(Z){return{opacity:1,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),J=$.useCallback(function(Z){return{opacity:0,transform:"translate("+Z.x+","+Z.y+")",textTransform:"translate("+Z.textX+","+Z.textY+") rotate("+g+")"}},[g]),W=Cr(T,{keys:function(Z){return Z.key},initial:K,from:J,enter:K,update:K,leave:{opacity:0},config:ee,immediate:!Y});return p.jsxs(et.g,{transform:Q.transform,"aria-hidden":O,children:[W(function(Z,U,F,re){return C.createElement(y,si({tickIndex:re,format:j,rotate:g,textBaseline:R,textAnchor:L,truncateTickAt:x,animatedProps:Z},U,_?{onClick:_}:{}))}),p.jsx(et.line,{style:k.axis.domain.line,x1:0,x2:Q.lineX2,y1:0,y2:Q.lineY2}),I]})},R4e=$.memo(O4e),T4e=["top","right","bottom","left"],k4e=$.memo(function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,o={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return p.jsx(p.Fragment,{children:T4e.map(function(a){var s=o[a];if(!s)return null;var l=a==="top"||a==="bottom";return p.jsx(R4e,si({},s,{axis:l?"x":"y",x:a==="right"?r:0,y:a==="bottom"?i:0,scale:l?t:n,length:l?r:i,ticksPosition:a==="top"||a==="left"?"before":"after",truncateTickAt:s.truncateTickAt}),a)})})}),j4e=$.memo(function(e){var t=e.animatedProps,n=zn();return p.jsx(et.line,si({},t,n.grid.line))}),jp=$.memo(function(e){var t=e.lines,n=fi(),r=n.animate,i=n.config,o=Cr(t,{keys:function(a){return a.key},initial:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},from:function(a){return{opacity:0,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},enter:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},update:function(a){return{opacity:1,x1:a.x1,x2:a.x2,y1:a.y1,y2:a.y2}},leave:{opacity:0},config:i,immediate:!r});return p.jsx("g",{children:o(function(a,s){return $.createElement(j4e,si({},s,{key:s.key,animatedProps:a}))})})}),L4e=$.memo(function(e){var t=e.width,n=e.height,r=e.xScale,i=e.yScale,o=e.xValues,a=e.yValues,s=$.useMemo(function(){return!!r&&kp({width:t,height:n,scale:r,axis:"x",values:o})},[r,o,t,n]),l=$.useMemo(function(){return!!i&&kp({width:t,height:n,scale:i,axis:"y",values:a})},[n,t,i,a]);return p.jsxs(p.Fragment,{children:[s&&p.jsx(jp,{lines:s}),l&&p.jsx(jp,{lines:l})]})});function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}function Lp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P4e(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(i,o){if(i){if(typeof i=="string")return Lp(i,o);var a=Object.prototype.toString.call(i).slice(8,-1);return a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set"?Array.from(i):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Lp(i,o):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
593
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I4e={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:fl,accent:hl,dark2:gl,paired:vl,pastel1:ml,pastel2:pl,set1:bl,set2:yl,set3:Co,tableau10:a6},A4e={brown_blueGreen:Hi,purpleRed_green:Ei,pink_yellowGreen:Vi,purple_orange:Oi,red_blue:Ri,red_grey:Ti,red_yellow_blue:ki,red_yellow_green:ji,spectral:Li},N4e={brown_blueGreen:s6,purpleRed_green:l6,pink_yellowGreen:c6,purple_orange:u6,red_blue:d6,red_grey:f6,red_yellow_blue:h6,red_yellow_green:g6,spectral:v6},F4e={blues:Gi,greens:Yi,greys:Ki,oranges:Ji,purples:Xi,reds:Qi,blue_green:Pi,blue_purple:Ii,green_blue:Ai,orange_red:Ni,purple_blue_green:Fi,purple_blue:Di,purple_red:zi,red_purple:Bi,yellow_green_blue:Wi,yellow_green:Zi,yellow_orange_brown:Ui,yellow_orange_red:qi},D4e={blues:E6,greens:V6,greys:O6,oranges:k6,purples:R6,reds:T6,turbo:F6,viridis:D6,inferno:B6,magma:z6,plasma:W6,cividis:j6,warm:P6,cool:I6,cubehelixDefault:L6,blue_green:m6,blue_purple:p6,green_blue:b6,orange_red:y6,purple_blue_green:C6,purple_blue:x6,purple_red:w6,red_purple:S6,yellow_green_blue:$6,yellow_green:M6,yellow_orange_brown:_6,yellow_orange_red:H6};_d({},I4e,A4e,F4e);var z4e={rainbow:A6,sinebow:N6},q7=_d({},N4e,D4e,z4e),B4e=function(e,t){if(typeof e=="function")return e;if(Uo(e)){if(function(l){return l.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=yn(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(l){return l.from!==void 0}(e)){var r=function(l){return yn(l,e.from)};if(Array.isArray(e.modifiers)){for(var i,o=[],a=function(){var l=i.value,c=l[0],u=l[1];if(c==="brighter")o.push(function(d){return d.brighter(u)});else if(c==="darker")o.push(function(d){return d.darker(u)});else{if(c!=="opacity")throw new Error("Invalid color modifier: '"+c+"', must be one of: 'brighter', 'darker', 'opacity'");o.push(function(d){return d.opacity=u,d})}},s=P4e(e.modifiers);!(i=s()).done;)a();return o.length===0?r:function(l){return o.reduce(function(c,u){return u(c)},Lo(r(l))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},Pp=function(e,t){return $.useMemo(function(){return B4e(e,t)},[e,t])};D.oneOfType([D.string,D.func,D.shape({theme:D.string.isRequired}),D.shape({from:D.string.isRequired,modifiers:D.arrayOf(D.array)})]);var W4e={scheme:"turbo"},Z4e=function(e,t){var n=e.minValue,r=e.maxValue,i=n!==void 0?n:t.min,o=r!==void 0?r:t.max,a=hS().domain([i,o]).clamp(!0);if("colors"in e)a.range(e.colors);else if("interpolator"in e)a.interpolator(e.interpolator);else{var s,l=(s=e.scheme)!=null?s:W4e.scheme;a.interpolator(q7[l])}return a},Ip={scheme:"red_yellow_blue",divergeAt:.5},U4e=function(e,t){var n,r=e.minValue,i=e.maxValue,o=r!==void 0?r:t.min,a=i!==void 0?i:t.max,s=[o,o+(a-o)/2,a],l=.5-((n=e.divergeAt)!=null?n:Ip.divergeAt),c=C5().domain(s).clamp(!0),u=function(h){return String(h)};if("colors"in e)u=C5().domain(s.map(function(h){return h-l*(a-o)})).range(e.colors).interpolator();else if("interpolator"in e)u=e.interpolator;else{var d,f=(d=e.scheme)!=null?d:Ip.scheme;u=q7[f]}return c.interpolator(function(h){return u(h+l)})},Ap={scheme:"turbo",steps:7},q4e=function(e,t){var n=tS().domain(e.domain||[t.min,t.max]).nice();if("colors"in e)n.range(e.colors);else{var r=e.scheme||Ap.scheme,i=e.steps===void 0?Ap.steps:e.steps,o=q7[r],a=Array.from({length:i}).map(function(s,l){return o(l*(1/(i-1)))});n.range(a)}return n},G4e=function(e,t){if(function(n){return n.type==="sequential"}(e))return Z4e(e,t);if(function(n){return n.type==="diverging"}(e))return U4e(e,t);if(function(n){return n.type==="quantize"}(e))return q4e(e,t);throw new Error("Invalid continuous color scale config")},Y4e=function(e,t){var n=e.domain();if("thresholds"in e){var r=[],i=Go().domain(n).range([0,1]);return e.range().forEach(function(a,s){var l=e.invertExtent(a),c=l[0],u=l[1];r.push({key:s+".0",offset:i(c),stopColor:a}),r.push({key:s+".1",offset:i(u),stopColor:a})}),r}var o=e.copy();return n.length===2?o.domain([0,1]):n.length===3&&o.domain([0,.5,1]),o.ticks(t).map(function(a){return{key:""+a,offset:a,stopColor:""+o(a)}})};function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hd.apply(this,arguments)}var Cn={length:200,thickness:16,direction:"row",tickPosition:"after",tickSize:4,tickSpacing:3,tickOverlap:!1,tickFormat:function(e){return""+e},titleAlign:"start",titleOffset:4},K4e=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},X4e=function(e){var t,n=e.scale,r=e.ticks,i=e.length,o=i===void 0?Cn.length:i,a=e.thickness,s=a===void 0?Cn.thickness:a,l=e.direction,c=l===void 0?Cn.direction:l,u=e.tickPosition,d=u===void 0?Cn.tickPosition:u,f=e.tickSize,h=f===void 0?Cn.tickSize:f,m=e.tickSpacing,g=m===void 0?Cn.tickSpacing:m,v=e.tickOverlap,b=v===void 0?Cn.tickOverlap:v,y=e.tickFormat,x=y===void 0?Cn.tickFormat:y,S=e.title,w=e.titleAlign,M=w===void 0?Cn.titleAlign:w,E=e.titleOffset,H=E===void 0?Cn.titleOffset:E,_=c==="column"?[].concat(n.domain()).reverse():n.domain(),O=Go().domain(_);_.length===2?O.range([0,o]):_.length===3&&O.range([0,o/2,o]),t="thresholds"in n?[_[0]].concat(n.thresholds(),[_[1]]):Array.isArray(r)?r:n.ticks(r);var k,A,j,V,T,L,R=Y4e(n,32),I=__(x),P=[],N=0,z=0;if(c==="row"){var q,G,Y;k=o,A=s,z=1;var ee;T=0,j=M==="start"?0:M==="middle"?o/2:o,d==="before"?(q=-h,G=b?s:0,Y=-h-g,ee="alphabetic",V=s+H,L="hanging"):(q=b?0:s,Y=(G=s+h)+g,ee="hanging",V=-H,L="alphabetic"),t.forEach(function(Z){var U=O(Z);P.push({x1:U,y1:q,x2:U,y2:G,text:I(Z),textX:U,textY:Y,textHorizontalAlign:"middle",textVerticalAlign:ee})})}else{var Q,K,J,W;k=s,A=o,N=1,T=-90,V=M==="start"?o:M==="middle"?o/2:0,d==="before"?(K=b?s:0,J=(Q=-h)-g,W="end",j=s+H,L="hanging"):(Q=b?0:s,J=(K=s+h)+g,W="start",j=-H,L="alphabetic"),t.forEach(function(Z){var U=O(Z);P.push({x1:Q,y1:U,x2:K,y2:U,text:I(Z),textX:J,textY:U,textHorizontalAlign:W,textVerticalAlign:"central"})})}return{width:k,height:A,gradientX1:0,gradientY1:N,gradientX2:z,gradientY2:0,colorStops:R,ticks:P,titleText:S,titleX:j,titleY:V,titleRotation:T,titleHorizontalAlign:M,titleVerticalAlign:L}},Q4e=function(e){var t=e.scale,n=e.ticks,r=e.length,i=r===void 0?Cn.length:r,o=e.thickness,a=o===void 0?Cn.thickness:o,s=e.direction,l=s===void 0?Cn.direction:s,c=e.tickPosition,u=c===void 0?Cn.tickPosition:c,d=e.tickSize,f=d===void 0?Cn.tickSize:d,h=e.tickSpacing,m=h===void 0?Cn.tickSpacing:h,g=e.tickOverlap,v=g===void 0?Cn.tickOverlap:g,b=e.tickFormat,y=b===void 0?Cn.tickFormat:b,x=e.title,S=e.titleAlign,w=S===void 0?Cn.titleAlign:S,M=e.titleOffset,E=X4e({scale:t,ticks:n,length:i,thickness:a,direction:l,tickPosition:u,tickSize:f,tickSpacing:m,tickOverlap:v,tickFormat:y,title:x,titleAlign:w,titleOffset:M===void 0?Cn.titleOffset:M}),H=E.width,_=E.height,O=E.gradientX1,k=E.gradientY1,A=E.gradientX2,j=E.gradientY2,V=E.ticks,T=E.colorStops,L=E.titleText,R=E.titleX,I=E.titleY,P=E.titleRotation,N=E.titleVerticalAlign,z=E.titleHorizontalAlign,q=zn(),G="ContinuousColorsLegendSvgGradient."+l+"."+T.map(function(Y){return Y.offset}).join("_");return p.jsxs("g",{children:[p.jsx("defs",{children:p.jsx("linearGradient",{id:G,x1:O,y1:k,x2:A,y2:j,children:T.map(function(Y){return p.jsx("stop",Hd({},Y))})})}),L&&p.jsx("text",{transform:"translate("+R+", "+I+") rotate("+P+")",textAnchor:z,dominantBaseline:N,style:q.legends.title.text,children:L}),p.jsx("rect",{width:H,height:_,fill:"url(#"+G}),V.map(function(Y,ee){return p.jsxs($.Fragment,{children:[p.jsx("line",{x1:Y.x1,y1:Y.y1,x2:Y.x2,y2:Y.y2,style:q.legends.ticks.line}),p.jsx("text",{x:Y.textX,y:Y.textY,textAnchor:Y.textHorizontalAlign,dominantBaseline:Y.textVerticalAlign,style:q.legends.ticks.text,children:Y.text})]},ee)})]})},J4e=["containerWidth","containerHeight","anchor","translateX","translateY","length","thickness","direction"],e6e=function(e){var t,n,r=e.containerWidth,i=e.containerHeight,o=e.anchor,a=e.translateX,s=a===void 0?0:a,l=e.translateY,c=l===void 0?0:l,u=e.length,d=u===void 0?Cn.length:u,f=e.thickness,h=f===void 0?Cn.thickness:f,m=e.direction,g=m===void 0?Cn.direction:m,v=function(S,w){if(S==null)return{};var M,E,H={},_=Object.keys(S);for(E=0;E<_.length;E++)M=_[E],w.indexOf(M)>=0||(H[M]=S[M]);return H}(e,J4e);g==="row"?(t=d,n=h):(t=h,n=d);var b=K4e({anchor:o,translateX:s,translateY:c,containerWidth:r,containerHeight:i,width:t,height:n}),y=b.x,x=b.y;return p.jsx("g",{transform:"translate("+y+", "+x+")",children:p.jsx(Q4e,Hd({length:d,thickness:h,direction:g},v))})};function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}var ah={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},t6e=function(e){var t=typeof e;return $.isValidElement(e)||t==="string"||t==="function"||t==="object"},G7=function(e){return e.type==="circle"},n6e=function(e){return e.type==="dot"},Y7=function(e){return e.type==="rect"},r6e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(o,a){var s=a.offset||0;return[].concat(o,H7(t,a.match).map(function(l){var c=r(l),u=i(l);return(G7(a)||Y7(a))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),Do({},Ya(a,["match","offset"]),c,u,{size:a.size||u.size,datum:l})}))},[])},i6e=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return m4e(g4e(i))},o6e=function(e){var t,n,r=e.x,i=e.y,o=e.noteX,a=e.noteY,s=e.noteWidth,l=s===void 0?ah.noteWidth:s,c=e.noteTextOffset,u=c===void 0?ah.noteTextOffset:c;if(Ea(o))t=r+o;else{if(o.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=o.abs}if(Ea(a))n=i+a;else{if(a.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=i,h=i6e(r,i,t,n);if(G7(e)){var m=v4e(nh(h),e.size/2);d+=m.x,f+=m.y}if(Y7(e)){var g=Math.round((h+90)/45)%8;g===0&&(f-=e.height/2),g===1&&(d+=e.width/2,f-=e.height/2),g===2&&(d+=e.width/2),g===3&&(d+=e.width/2,f+=e.height/2),g===4&&(f+=e.height/2),g===5&&(d-=e.width/2,f+=e.height/2),g===6&&(d-=e.width/2),g===7&&(d-=e.width/2,f-=e.height/2)}var v=t,b=t;return(h+90)%360>180?(v-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[v,n-u],angle:h+90}},a6e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return $.useMemo(function(){return r6e({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},s6e=function(e){return $.useMemo(function(){return o6e(e)},[e])},l6e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=zn(),a=fi(),s=a.animate,l=a.config,c=Qt({x:n,y:r,config:l,immediate:!s});return typeof i=="function"?$.createElement(i,{x:n,y:r,datum:t}):p.jsxs(p.Fragment,{children:[o.annotations.text.outlineWidth>0&&p.jsx(et.text,{x:c.x,y:c.y,style:Do({},o.annotations.text,{strokeLinejoin:"round",strokeWidth:2*o.annotations.text.outlineWidth,stroke:o.annotations.text.outlineColor}),children:i}),p.jsx(et.text,{x:c.x,y:c.y,style:Ya(o.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},Np=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=zn(),o=$.useMemo(function(){var l=t[0];return t.slice(1).reduce(function(c,u){return c+" L"+u[0]+","+u[1]},"M"+l[0]+","+l[1])},[t]),a=t4e(o);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=Do({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),p.jsx(et.path,{fill:"none",d:a,style:s})},c6e=function(e){var t=e.x,n=e.y,r=e.size,i=zn(),o=fi(),a=o.animate,s=o.config,l=Qt({x:t,y:n,radius:r/2,config:s,immediate:!a});return p.jsxs(p.Fragment,{children:[i.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:Do({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.outline})]})},u6e=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?ah.dotSize:r,o=zn(),a=fi(),s=a.animate,l=a.config,c=Qt({x:t,y:n,radius:i/2,config:l,immediate:!s});return p.jsxs(p.Fragment,{children:[o.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:Do({},o.annotations.outline,{fill:"none",strokeWidth:2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:o.annotations.symbol})]})},d6e=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.borderRadius,a=o===void 0?6:o,s=zn(),l=fi(),c=l.animate,u=l.config,d=Qt({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!c});return p.jsxs(p.Fragment,{children:[s.annotations.outline.outlineWidth>0&&p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:Do({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:s.annotations.outline})]})},f6e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=s6e(e);if(!t6e(i))throw new Error("note should be a valid react element");return p.jsxs(p.Fragment,{children:[p.jsx(Np,{points:o.points,isOutline:!0}),G7(e)&&p.jsx(c6e,{x:n,y:r,size:e.size}),n6e(e)&&p.jsx(u6e,{x:n,y:r,size:e.size}),Y7(e)&&p.jsx(d6e,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),p.jsx(Np,{points:o.points}),p.jsx(l6e,{datum:t,x:o.text[0],y:o.text[1],note:i})]})};function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vr.apply(this,arguments)}function h6e(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Qn={layers:["grid","axes","cells","legends","annotations"],forceSquare:!1,xInnerPadding:0,xOuterPadding:0,yInnerPadding:0,yOuterPadding:0,sizeVariation:!1,opacity:1,activeOpacity:1,inactiveOpacity:.15,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableGridX:!1,enableGridY:!1,enableLabels:!0,label:"formattedValue",labelTextColor:{from:"color",modifiers:[["darker",2]]},colors:{type:"sequential",scheme:"brown_blueGreen"},emptyColor:"#000000",legends:[],annotations:[],isInteractive:!0,hoverTarget:"rowColumn",tooltip:$.memo(function(e){var t=e.cell;return t.formattedValue===null?null:p.jsx(Dhe,{id:t.serieId+" - "+t.data.x,value:t.formattedValue,enableChip:!0,color:t.color})}),animate:!0,motionConfig:"gentle"},Dt=vr({},Qn,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},borderRadius:0,cellComponent:"rect"});vr({},Qn,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},renderCell:"rect",pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var g6e=function(e){var t=e.width,n=e.height,r=e.rows,i=e.columns,o=t,a=n,s=0,l=0;if(e.forceSquare){var c=Math.max(t/i,0),u=Math.max(n/r,0),d=Math.min(c,u);s=(t-(o=d*i))/2,l=(n-(a=d*r))/2}return{offsetX:s,offsetY:l,width:o,height:a}},v6e=function(e){var t=e.data,n=e.width,r=e.height,i=e.xInnerPadding,o=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare,c=new Set,u=[],d=[],f=[];t.forEach(function(H){u.push(H.id),H.data.forEach(function(_){c.add(_.x);var O=null;_.y!==void 0&&_.y!==null&&(d.push(_.y),O=_.y),f.push({id:H.id+"."+_.x,serieId:H.id,value:O,data:_})})});var h=Array.from(c),m=g6e({width:n,height:r,columns:h.length,rows:u.length,forceSquare:l}),g=m.width,v=m.height,b=m.offsetX,y=m.offsetY,x=Tp(Ns().domain(h).range([0,g]).paddingOuter(o).paddingInner(i)),S=Tp(Ns().domain(u).range([0,v]).paddingOuter(s).paddingInner(a)),w=x.bandwidth(),M=S.bandwidth(),E=f.map(function(H){return vr({},H,{x:x(H.data.x)+w/2,y:S(H.serieId)+M/2,width:w,height:M})});return{width:g,height:v,offsetX:b,offsetY:y,xScale:x,yScale:S,minValue:Math.min.apply(Math,d),maxValue:Math.max.apply(Math,d),cells:E}},m6e=function(e,t,n){if(!e)return function(){return 1};var r=Go().domain(e.values?e.values:[t,n]).range(e.sizes);return function(i){return i===null?1:r(i)}},p6e=function(e){return{x:e.x,y:e.y}},b6e=function(e){return{size:Math.max(e.width,e.height),width:e.width,height:e.height}},y6e=function(e){var t=e.data,n=e.width,r=e.height,i=e.xInnerPadding,o=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare;return $.useMemo(function(){return v6e({data:t,width:n,height:r,xInnerPadding:i,xOuterPadding:o,yInnerPadding:a,yOuterPadding:s,forceSquare:l})},[t,n,r,i,o,a,s,l])},C6e={cell:function(e,t){return e.id===t.id},row:function(e,t){return e.serieId===t.serieId},column:function(e,t){return e.data.x===t.data.x},rowColumn:function(e,t){return e.serieId===t.serieId||e.data.x===t.data.x}},x6e=function(e){var t,n,r,i=e.cells,o=e.minValue,a=e.maxValue,s=e.sizeVariation,l=e.colors,c=e.emptyColor,u=e.opacity,d=e.activeOpacity,f=e.inactiveOpacity,h=e.borderColor,m=e.label,g=e.labelTextColor,v=e.valueFormat,b=e.activeIds,y=$.useMemo(function(){return m6e(t,n,r)},[t=s,n=o,r=a]),x=$.useMemo(function(){return typeof l=="function"?null:G4e(l,{min:o,max:a})},[l,o,a]),S=$.useCallback(function(O){if(O.value!==null){if(typeof l=="function")return l(O);if(x!==null)return x(O.value)}return c},[l,x,c]),w=zn(),M=Pp(h,w),E=Pp(g,w),H=H_(v),_=$4e(m);return{cells:$.useMemo(function(){return i.map(function(O){var k=u;b.length>0&&(k=b.includes(O.id)?d:f);var A=y(O.value),j=vr({},O,{width:O.width*A,height:O.height*A,formattedValue:O.value!==null?H(O.value):null,opacity:k});return j.label=_(j),j.color=S(j),j.borderColor=M(j),j.labelTextColor=E(j),j})},[i,y,S,M,E,H,_,b,u,d,f]),colorScale:x}},w6e=function(e){var t=e.data,n=e.valueFormat,r=e.width,i=e.height,o=e.xOuterPadding,a=o===void 0?Qn.xOuterPadding:o,s=e.xInnerPadding,l=s===void 0?Qn.xInnerPadding:s,c=e.yOuterPadding,u=c===void 0?Qn.yOuterPadding:c,d=e.yInnerPadding,f=d===void 0?Qn.yInnerPadding:d,h=e.forceSquare,m=h===void 0?Qn.forceSquare:h,g=e.sizeVariation,v=g===void 0?Qn.sizeVariation:g,b=e.colors,y=b===void 0?Qn.colors:b,x=e.emptyColor,S=x===void 0?Qn.emptyColor:x,w=e.opacity,M=w===void 0?Qn.opacity:w,E=e.activeOpacity,H=E===void 0?Qn.activeOpacity:E,_=e.inactiveOpacity,O=_===void 0?Qn.inactiveOpacity:_,k=e.borderColor,A=k===void 0?Qn.borderColor:k,j=e.label,V=j===void 0?Qn.label:j,T=e.labelTextColor,L=T===void 0?Qn.labelTextColor:T,R=e.hoverTarget,I=R===void 0?Qn.hoverTarget:R,P=$.useState(null),N=P[0],z=P[1],q=y6e({data:t,width:r,height:i,xOuterPadding:a,xInnerPadding:l,yOuterPadding:u,yInnerPadding:f,forceSquare:m}),G=q.width,Y=q.height,ee=q.offsetX,Q=q.offsetY,K=q.cells,J=q.xScale,W=q.yScale,Z=q.minValue,U=q.maxValue,F=$.useMemo(function(){if(!N)return[];var B=C6e[I];return K.filter(function(ie){return B(ie,N)}).map(function(ie){return ie.id})},[K,N,I]),re=x6e({cells:K,minValue:Z,maxValue:U,sizeVariation:v,colors:y,emptyColor:S,opacity:M,activeOpacity:H,inactiveOpacity:O,borderColor:A,label:V,labelTextColor:L,valueFormat:n,activeIds:F});return{width:G,height:Y,offsetX:ee,offsetY:Q,cells:re.cells,xScale:J,yScale:W,colorScale:re.colorScale,activeCell:N,setActiveCell:z}},S6e=function(e,t){return a6e({data:e,annotations:t,getPosition:p6e,getDimensions:b6e})},$6e=$.memo(function(e){var t=e.cell,n=e.borderWidth,r=e.borderRadius,i=e.animatedProps,o=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=e.enableLabels,u=zn(),d=$.useMemo(function(){return{onMouseEnter:o?o(t):void 0,onMouseMove:a?a(t):void 0,onMouseLeave:s?s(t):void 0,onClick:l?l(t):void 0}},[t,o,a,s,l]);return p.jsxs(et.g,vr({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:i.opacity},d,{transform:On([i.x,i.y,i.scale],function(f,h,m){return"translate("+f+", "+h+") scale("+m+")"}),children:[p.jsx(et.rect,{transform:On([i.width,i.height],function(f,h){return"translate("+-.5*f+", "+-.5*h+")"}),fill:i.color,width:i.width,height:i.height,stroke:i.borderColor,strokeWidth:n,rx:r,ry:r},t.id),c&&p.jsx(et.text,{textAnchor:"middle",dominantBaseline:"central",fill:i.labelTextColor,style:vr({},u.labels.text,{fill:void 0,userSelect:"none"}),children:t.label})]}))}),M6e=$.memo(function(e){var t=e.cell,n=e.borderWidth,r=e.animatedProps,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.enableLabels,c=zn(),u=$.useMemo(function(){return{onMouseEnter:i?i(t):void 0,onMouseMove:o?o(t):void 0,onMouseLeave:a?a(t):void 0,onClick:s?s(t):void 0}},[t,i,o,a,s]);return p.jsxs(et.g,vr({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:r.opacity},u,{transform:On([r.x,r.y],function(d,f){return"translate("+d+", "+f+")"}),children:[p.jsx(et.circle,{r:On([r.width,r.height],function(d,f){return Math.min(d,f)/2}),fill:r.color,fillOpacity:r.opacity,strokeWidth:n,stroke:r.borderColor}),l&&p.jsx(et.text,{dominantBaseline:"central",textAnchor:"middle",fill:r.labelTextColor,style:vr({},c.labels.text,{fill:void 0}),children:t.label})]}))}),_6e=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},I2=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:e.opacity,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:1}},H6e=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},E6e=function(e){var t,n=e.cells,r=e.cellComponent,i=e.borderRadius,o=e.borderWidth,a=e.isInteractive,s=e.setActiveCell,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.tooltip,h=e.enableLabels,m=fi(),g=m.animate,v=m.config,b=Cr(n,{keys:function(_){return _.id},initial:I2,from:_6e,enter:I2,update:I2,leave:H6e,config:v,immediate:!g}),y=Uhe(),x=y.showTooltipFromEvent,S=y.hideTooltip,w=$.useMemo(function(){if(a)return function(_){return function(O){x($.createElement(f,{cell:_}),O),s(_),l==null||l(_,O)}}},[a,x,f,s,l]),M=$.useMemo(function(){if(a)return function(_){return function(O){x($.createElement(f,{cell:_}),O),c==null||c(_,O)}}},[a,x,f,c]),E=$.useMemo(function(){if(a)return function(_){return function(O){S(),s(null),u==null||u(_,O)}}},[a,S,s,u]),H=$.useMemo(function(){if(a)return function(_){return function(O){d==null||d(_,O)}}},[a,d]);return t=r==="rect"?$6e:r==="circle"?M6e:r,p.jsx(p.Fragment,{children:b(function(_,O){return $.createElement(t,{cell:O,borderRadius:i,borderWidth:o,animatedProps:_,enableLabels:h,onMouseEnter:w,onMouseMove:M,onMouseLeave:E,onClick:H})})})},V6e=function(e){var t=e.cells,n=e.annotations,r=S6e(t,n);return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(f6e,vr({},i),o)})})},O6e=["isInteractive","animate","motionConfig","theme","renderWrapper"],R6e=function(e){var t=e.data,n=e.layers,r=n===void 0?Dt.layers:n,i=e.valueFormat,o=e.width,a=e.height,s=e.margin,l=e.forceSquare,c=l===void 0?Dt.forceSquare:l,u=e.xInnerPadding,d=u===void 0?Dt.xInnerPadding:u,f=e.xOuterPadding,h=f===void 0?Dt.xOuterPadding:f,m=e.yInnerPadding,g=m===void 0?Dt.yInnerPadding:m,v=e.yOuterPadding,b=v===void 0?Dt.yOuterPadding:v,y=e.sizeVariation,x=y===void 0?Dt.sizeVariation:y,S=e.cellComponent,w=S===void 0?Dt.cellComponent:S,M=e.opacity,E=M===void 0?Dt.opacity:M,H=e.activeOpacity,_=H===void 0?Dt.activeOpacity:H,O=e.inactiveOpacity,k=O===void 0?Dt.inactiveOpacity:O,A=e.borderRadius,j=A===void 0?Dt.borderRadius:A,V=e.borderWidth,T=V===void 0?Dt.borderWidth:V,L=e.borderColor,R=L===void 0?Dt.borderColor:L,I=e.enableGridX,P=I===void 0?Dt.enableGridX:I,N=e.enableGridY,z=N===void 0?Dt.enableGridY:N,q=e.axisTop,G=q===void 0?Dt.axisTop:q,Y=e.axisRight,ee=Y===void 0?Dt.axisRight:Y,Q=e.axisBottom,K=Q===void 0?Dt.axisBottom:Q,J=e.axisLeft,W=J===void 0?Dt.axisLeft:J,Z=e.enableLabels,U=Z===void 0?Dt.enableLabels:Z,F=e.label,re=F===void 0?Dt.label:F,B=e.labelTextColor,ie=B===void 0?Dt.labelTextColor:B,oe=e.colors,ve=oe===void 0?Dt.colors:oe,Ce=e.emptyColor,pe=Ce===void 0?Dt.emptyColor:Ce,ye=e.legends,Se=ye===void 0?Dt.legends:ye,me=e.annotations,ge=me===void 0?Dt.annotations:me,ce=e.isInteractive,$e=ce===void 0?Dt.isInteractive:ce,he=e.onMouseEnter,Ae=e.onMouseMove,Ie=e.onMouseLeave,Re=e.onClick,ke=e.hoverTarget,Ye=ke===void 0?Dt.hoverTarget:ke,Xe=e.tooltip,Fe=Xe===void 0?Dt.tooltip:Xe,je=e.role,Qe=e.ariaLabel,Ze=e.ariaLabelledBy,qe=e.ariaDescribedBy,de=s4e(o,a,s),He=de.margin,Ke=de.innerWidth,nt=de.innerHeight,Ne=de.outerWidth,ze=de.outerHeight,De=w6e({data:t,valueFormat:i,width:Ke,height:nt,forceSquare:c,xInnerPadding:d,xOuterPadding:h,yInnerPadding:g,yOuterPadding:b,sizeVariation:x,colors:ve,emptyColor:pe,opacity:E,activeOpacity:_,inactiveOpacity:k,borderColor:R,label:re,labelTextColor:ie,hoverTarget:Ye}),Je=De.width,tt=De.height,Be=De.offsetX,Le=De.offsetY,ut=De.xScale,pt=De.yScale,Ee=De.cells,fe=De.colorScale,we=De.activeCell,Ve=De.setActiveCell,Ge=$.useMemo(function(){return vr({},He,{top:He.top+Le,left:He.left+Be})},[He,Be,Le]),We={grid:null,axes:null,cells:null,legends:null,annotations:null};r.includes("grid")&&(We.grid=p.jsx(L4e,{width:Je,height:tt,xScale:P?ut:null,yScale:z?pt:null},"grid")),r.includes("axes")&&(We.axes=p.jsx(k4e,{xScale:ut,yScale:pt,width:Je,height:tt,top:G,right:ee,bottom:K,left:W},"axes")),r.includes("cells")&&(We.cells=p.jsx($.Fragment,{children:p.jsx(E6e,{cells:Ee,cellComponent:w,borderRadius:j,borderWidth:T,isInteractive:$e,setActiveCell:Ve,onMouseEnter:he,onMouseMove:Ae,onMouseLeave:Ie,onClick:Re,tooltip:Fe,enableLabels:U})},"cells")),r.includes("legends")&&fe!==null&&(We.legends=p.jsx($.Fragment,{children:Se.map(function(X,ae){return $.createElement(e6e,vr({},X,{key:ae,containerWidth:Je,containerHeight:tt,scale:fe}))})},"legends")),r.includes("annotations")&&ge.length>0&&(We.annotations=p.jsx(V6e,{cells:Ee,annotations:ge},"annotations"));var rt={cells:Ee,activeCell:we,setActiveCell:Ve};return p.jsx(P_,{width:Ne,height:ze,margin:Object.assign({},Ge,{top:Ge.top,left:Ge.left}),role:je,ariaLabel:Qe,ariaLabelledBy:Ze,ariaDescribedBy:qe,children:r.map(function(X,ae){var se;return typeof X=="function"?p.jsx($.Fragment,{children:$.createElement(X,rt)},ae):(se=We==null?void 0:We[X])!=null?se:null})})},T6e=function(e){var t=e.isInteractive,n=t===void 0?Dt.isInteractive:t,r=e.animate,i=r===void 0?Dt.animate:r,o=e.motionConfig,a=o===void 0?Dt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=h6e(e,O6e);return p.jsx(T_,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(R6e,vr({isInteractive:n},c))})},k6e=function(e){return p.jsx(k_,{children:function(t){var n=t.width,r=t.height;return p.jsx(T6e,vr({width:n,height:r},e))}})};const Ra=12,Jc=14,xs=yt.tspan`
596
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I4e={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:fl,accent:hl,dark2:gl,paired:vl,pastel1:ml,pastel2:pl,set1:bl,set2:yl,set3:Co,tableau10:a6},A4e={brown_blueGreen:Hi,purpleRed_green:Ei,pink_yellowGreen:Vi,purple_orange:Oi,red_blue:Ri,red_grey:Ti,red_yellow_blue:ki,red_yellow_green:ji,spectral:Li},N4e={brown_blueGreen:s6,purpleRed_green:l6,pink_yellowGreen:c6,purple_orange:u6,red_blue:d6,red_grey:f6,red_yellow_blue:h6,red_yellow_green:g6,spectral:v6},F4e={blues:Gi,greens:Yi,greys:Ki,oranges:Ji,purples:Xi,reds:Qi,blue_green:Pi,blue_purple:Ii,green_blue:Ai,orange_red:Ni,purple_blue_green:Fi,purple_blue:Di,purple_red:zi,red_purple:Bi,yellow_green_blue:Wi,yellow_green:Zi,yellow_orange_brown:Ui,yellow_orange_red:qi},D4e={blues:E6,greens:V6,greys:O6,oranges:k6,purples:R6,reds:T6,turbo:F6,viridis:D6,inferno:B6,magma:z6,plasma:W6,cividis:j6,warm:P6,cool:I6,cubehelixDefault:L6,blue_green:m6,blue_purple:p6,green_blue:b6,orange_red:y6,purple_blue_green:C6,purple_blue:x6,purple_red:w6,red_purple:S6,yellow_green_blue:$6,yellow_green:M6,yellow_orange_brown:_6,yellow_orange_red:H6};_d({},I4e,A4e,F4e);var z4e={rainbow:A6,sinebow:N6},q7=_d({},N4e,D4e,z4e),B4e=function(e,t){if(typeof e=="function")return e;if(Uo(e)){if(function(l){return l.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=yn(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(l){return l.from!==void 0}(e)){var r=function(l){return yn(l,e.from)};if(Array.isArray(e.modifiers)){for(var i,o=[],a=function(){var l=i.value,c=l[0],u=l[1];if(c==="brighter")o.push(function(d){return d.brighter(u)});else if(c==="darker")o.push(function(d){return d.darker(u)});else{if(c!=="opacity")throw new Error("Invalid color modifier: '"+c+"', must be one of: 'brighter', 'darker', 'opacity'");o.push(function(d){return d.opacity=u,d})}},s=P4e(e.modifiers);!(i=s()).done;)a();return o.length===0?r:function(l){return o.reduce(function(c,u){return u(c)},Lo(r(l))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},Pp=function(e,t){return $.useMemo(function(){return B4e(e,t)},[e,t])};D.oneOfType([D.string,D.func,D.shape({theme:D.string.isRequired}),D.shape({from:D.string.isRequired,modifiers:D.arrayOf(D.array)})]);var W4e={scheme:"turbo"},Z4e=function(e,t){var n=e.minValue,r=e.maxValue,i=n!==void 0?n:t.min,o=r!==void 0?r:t.max,a=hS().domain([i,o]).clamp(!0);if("colors"in e)a.range(e.colors);else if("interpolator"in e)a.interpolator(e.interpolator);else{var s,l=(s=e.scheme)!=null?s:W4e.scheme;a.interpolator(q7[l])}return a},Ip={scheme:"red_yellow_blue",divergeAt:.5},U4e=function(e,t){var n,r=e.minValue,i=e.maxValue,o=r!==void 0?r:t.min,a=i!==void 0?i:t.max,s=[o,o+(a-o)/2,a],l=.5-((n=e.divergeAt)!=null?n:Ip.divergeAt),c=C5().domain(s).clamp(!0),u=function(h){return String(h)};if("colors"in e)u=C5().domain(s.map(function(h){return h-l*(a-o)})).range(e.colors).interpolator();else if("interpolator"in e)u=e.interpolator;else{var d,f=(d=e.scheme)!=null?d:Ip.scheme;u=q7[f]}return c.interpolator(function(h){return u(h+l)})},Ap={scheme:"turbo",steps:7},q4e=function(e,t){var n=tS().domain(e.domain||[t.min,t.max]).nice();if("colors"in e)n.range(e.colors);else{var r=e.scheme||Ap.scheme,i=e.steps===void 0?Ap.steps:e.steps,o=q7[r],a=Array.from({length:i}).map(function(s,l){return o(l*(1/(i-1)))});n.range(a)}return n},G4e=function(e,t){if(function(n){return n.type==="sequential"}(e))return Z4e(e,t);if(function(n){return n.type==="diverging"}(e))return U4e(e,t);if(function(n){return n.type==="quantize"}(e))return q4e(e,t);throw new Error("Invalid continuous color scale config")},Y4e=function(e,t){var n=e.domain();if("thresholds"in e){var r=[],i=Go().domain(n).range([0,1]);return e.range().forEach(function(a,s){var l=e.invertExtent(a),c=l[0],u=l[1];r.push({key:s+".0",offset:i(c),stopColor:a}),r.push({key:s+".1",offset:i(u),stopColor:a})}),r}var o=e.copy();return n.length===2?o.domain([0,1]):n.length===3&&o.domain([0,.5,1]),o.ticks(t).map(function(a){return{key:""+a,offset:a,stopColor:""+o(a)}})};function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hd.apply(this,arguments)}var Cn={length:200,thickness:16,direction:"row",tickPosition:"after",tickSize:4,tickSpacing:3,tickOverlap:!1,tickFormat:function(e){return""+e},titleAlign:"start",titleOffset:4},K4e=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,o=e.containerHeight,a=e.width,s=e.height,l=n,c=r;switch(t){case"top":l+=(i-a)/2;break;case"top-right":l+=i-a;break;case"right":l+=i-a,c+=(o-s)/2;break;case"bottom-right":l+=i-a,c+=o-s;break;case"bottom":l+=(i-a)/2,c+=o-s;break;case"bottom-left":c+=o-s;break;case"left":c+=(o-s)/2;break;case"center":l+=(i-a)/2,c+=(o-s)/2}return{x:l,y:c}},X4e=function(e){var t,n=e.scale,r=e.ticks,i=e.length,o=i===void 0?Cn.length:i,a=e.thickness,s=a===void 0?Cn.thickness:a,l=e.direction,c=l===void 0?Cn.direction:l,u=e.tickPosition,d=u===void 0?Cn.tickPosition:u,f=e.tickSize,h=f===void 0?Cn.tickSize:f,m=e.tickSpacing,g=m===void 0?Cn.tickSpacing:m,v=e.tickOverlap,b=v===void 0?Cn.tickOverlap:v,y=e.tickFormat,x=y===void 0?Cn.tickFormat:y,S=e.title,w=e.titleAlign,M=w===void 0?Cn.titleAlign:w,E=e.titleOffset,H=E===void 0?Cn.titleOffset:E,_=c==="column"?[].concat(n.domain()).reverse():n.domain(),O=Go().domain(_);_.length===2?O.range([0,o]):_.length===3&&O.range([0,o/2,o]),t="thresholds"in n?[_[0]].concat(n.thresholds(),[_[1]]):Array.isArray(r)?r:n.ticks(r);var k,A,j,V,T,L,R=Y4e(n,32),I=__(x),P=[],N=0,z=0;if(c==="row"){var q,G,Y;k=o,A=s,z=1;var ee;T=0,j=M==="start"?0:M==="middle"?o/2:o,d==="before"?(q=-h,G=b?s:0,Y=-h-g,ee="alphabetic",V=s+H,L="hanging"):(q=b?0:s,Y=(G=s+h)+g,ee="hanging",V=-H,L="alphabetic"),t.forEach(function(Z){var U=O(Z);P.push({x1:U,y1:q,x2:U,y2:G,text:I(Z),textX:U,textY:Y,textHorizontalAlign:"middle",textVerticalAlign:ee})})}else{var Q,K,J,W;k=s,A=o,N=1,T=-90,V=M==="start"?o:M==="middle"?o/2:0,d==="before"?(K=b?s:0,J=(Q=-h)-g,W="end",j=s+H,L="hanging"):(Q=b?0:s,J=(K=s+h)+g,W="start",j=-H,L="alphabetic"),t.forEach(function(Z){var U=O(Z);P.push({x1:Q,y1:U,x2:K,y2:U,text:I(Z),textX:J,textY:U,textHorizontalAlign:W,textVerticalAlign:"central"})})}return{width:k,height:A,gradientX1:0,gradientY1:N,gradientX2:z,gradientY2:0,colorStops:R,ticks:P,titleText:S,titleX:j,titleY:V,titleRotation:T,titleHorizontalAlign:M,titleVerticalAlign:L}},Q4e=function(e){var t=e.scale,n=e.ticks,r=e.length,i=r===void 0?Cn.length:r,o=e.thickness,a=o===void 0?Cn.thickness:o,s=e.direction,l=s===void 0?Cn.direction:s,c=e.tickPosition,u=c===void 0?Cn.tickPosition:c,d=e.tickSize,f=d===void 0?Cn.tickSize:d,h=e.tickSpacing,m=h===void 0?Cn.tickSpacing:h,g=e.tickOverlap,v=g===void 0?Cn.tickOverlap:g,b=e.tickFormat,y=b===void 0?Cn.tickFormat:b,x=e.title,S=e.titleAlign,w=S===void 0?Cn.titleAlign:S,M=e.titleOffset,E=X4e({scale:t,ticks:n,length:i,thickness:a,direction:l,tickPosition:u,tickSize:f,tickSpacing:m,tickOverlap:v,tickFormat:y,title:x,titleAlign:w,titleOffset:M===void 0?Cn.titleOffset:M}),H=E.width,_=E.height,O=E.gradientX1,k=E.gradientY1,A=E.gradientX2,j=E.gradientY2,V=E.ticks,T=E.colorStops,L=E.titleText,R=E.titleX,I=E.titleY,P=E.titleRotation,N=E.titleVerticalAlign,z=E.titleHorizontalAlign,q=zn(),G="ContinuousColorsLegendSvgGradient."+l+"."+T.map(function(Y){return Y.offset}).join("_");return p.jsxs("g",{children:[p.jsx("defs",{children:p.jsx("linearGradient",{id:G,x1:O,y1:k,x2:A,y2:j,children:T.map(function(Y){return p.jsx("stop",Hd({},Y))})})}),L&&p.jsx("text",{transform:"translate("+R+", "+I+") rotate("+P+")",textAnchor:z,dominantBaseline:N,style:q.legends.title.text,children:L}),p.jsx("rect",{width:H,height:_,fill:"url(#"+G}),V.map(function(Y,ee){return p.jsxs($.Fragment,{children:[p.jsx("line",{x1:Y.x1,y1:Y.y1,x2:Y.x2,y2:Y.y2,style:q.legends.ticks.line}),p.jsx("text",{x:Y.textX,y:Y.textY,textAnchor:Y.textHorizontalAlign,dominantBaseline:Y.textVerticalAlign,style:q.legends.ticks.text,children:Y.text})]},ee)})]})},J4e=["containerWidth","containerHeight","anchor","translateX","translateY","length","thickness","direction"],e6e=function(e){var t,n,r=e.containerWidth,i=e.containerHeight,o=e.anchor,a=e.translateX,s=a===void 0?0:a,l=e.translateY,c=l===void 0?0:l,u=e.length,d=u===void 0?Cn.length:u,f=e.thickness,h=f===void 0?Cn.thickness:f,m=e.direction,g=m===void 0?Cn.direction:m,v=function(S,w){if(S==null)return{};var M,E,H={},_=Object.keys(S);for(E=0;E<_.length;E++)M=_[E],w.indexOf(M)>=0||(H[M]=S[M]);return H}(e,J4e);g==="row"?(t=d,n=h):(t=h,n=d);var b=K4e({anchor:o,translateX:s,translateY:c,containerWidth:r,containerHeight:i,width:t,height:n}),y=b.x,x=b.y;return p.jsx("g",{transform:"translate("+y+", "+x+")",children:p.jsx(Q4e,Hd({length:d,thickness:h,direction:g},v))})};function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Do.apply(this,arguments)}var ah={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},t6e=function(e){var t=typeof e;return $.isValidElement(e)||t==="string"||t==="function"||t==="object"},G7=function(e){return e.type==="circle"},n6e=function(e){return e.type==="dot"},Y7=function(e){return e.type==="rect"},r6e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(o,a){var s=a.offset||0;return[].concat(o,H7(t,a.match).map(function(l){var c=r(l),u=i(l);return(G7(a)||Y7(a))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),Do({},Ya(a,["match","offset"]),c,u,{size:a.size||u.size,datum:l})}))},[])},i6e=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return m4e(g4e(i))},o6e=function(e){var t,n,r=e.x,i=e.y,o=e.noteX,a=e.noteY,s=e.noteWidth,l=s===void 0?ah.noteWidth:s,c=e.noteTextOffset,u=c===void 0?ah.noteTextOffset:c;if(Ea(o))t=r+o;else{if(o.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=o.abs}if(Ea(a))n=i+a;else{if(a.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=a.abs}var d=r,f=i,h=i6e(r,i,t,n);if(G7(e)){var m=v4e(nh(h),e.size/2);d+=m.x,f+=m.y}if(Y7(e)){var g=Math.round((h+90)/45)%8;g===0&&(f-=e.height/2),g===1&&(d+=e.width/2,f-=e.height/2),g===2&&(d+=e.width/2),g===3&&(d+=e.width/2,f+=e.height/2),g===4&&(f+=e.height/2),g===5&&(d-=e.width/2,f+=e.height/2),g===6&&(d-=e.width/2),g===7&&(d-=e.width/2,f-=e.height/2)}var v=t,b=t;return(h+90)%360>180?(v-=l,b-=l):b+=l,{points:[[d,f],[t,n],[b,n]],text:[v,n-u],angle:h+90}},a6e=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return $.useMemo(function(){return r6e({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},s6e=function(e){return $.useMemo(function(){return o6e(e)},[e])},l6e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=zn(),a=fi(),s=a.animate,l=a.config,c=Qt({x:n,y:r,config:l,immediate:!s});return typeof i=="function"?$.createElement(i,{x:n,y:r,datum:t}):p.jsxs(p.Fragment,{children:[o.annotations.text.outlineWidth>0&&p.jsx(et.text,{x:c.x,y:c.y,style:Do({},o.annotations.text,{strokeLinejoin:"round",strokeWidth:2*o.annotations.text.outlineWidth,stroke:o.annotations.text.outlineColor}),children:i}),p.jsx(et.text,{x:c.x,y:c.y,style:Ya(o.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},Np=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=zn(),o=$.useMemo(function(){var l=t[0];return t.slice(1).reduce(function(c,u){return c+" L"+u[0]+","+u[1]},"M"+l[0]+","+l[1])},[t]),a=t4e(o);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=Do({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),p.jsx(et.path,{fill:"none",d:a,style:s})},c6e=function(e){var t=e.x,n=e.y,r=e.size,i=zn(),o=fi(),a=o.animate,s=o.config,l=Qt({x:t,y:n,radius:r/2,config:s,immediate:!a});return p.jsxs(p.Fragment,{children:[i.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:Do({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:l.x,cy:l.y,r:l.radius,style:i.annotations.outline})]})},u6e=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?ah.dotSize:r,o=zn(),a=fi(),s=a.animate,l=a.config,c=Qt({x:t,y:n,radius:i/2,config:l,immediate:!s});return p.jsxs(p.Fragment,{children:[o.annotations.outline.outlineWidth>0&&p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:Do({},o.annotations.outline,{fill:"none",strokeWidth:2*o.annotations.outline.outlineWidth,stroke:o.annotations.outline.outlineColor,opacity:o.annotations.outline.outlineOpacity})}),p.jsx(et.circle,{cx:c.x,cy:c.y,r:c.radius,style:o.annotations.symbol})]})},d6e=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o=e.borderRadius,a=o===void 0?6:o,s=zn(),l=fi(),c=l.animate,u=l.config,d=Qt({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!c});return p.jsxs(p.Fragment,{children:[s.annotations.outline.outlineWidth>0&&p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:Do({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),p.jsx(et.rect,{x:d.x,y:d.y,rx:a,ry:a,width:d.width,height:d.height,style:s.annotations.outline})]})},f6e=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,o=s6e(e);if(!t6e(i))throw new Error("note should be a valid react element");return p.jsxs(p.Fragment,{children:[p.jsx(Np,{points:o.points,isOutline:!0}),G7(e)&&p.jsx(c6e,{x:n,y:r,size:e.size}),n6e(e)&&p.jsx(u6e,{x:n,y:r,size:e.size}),Y7(e)&&p.jsx(d6e,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),p.jsx(Np,{points:o.points}),p.jsx(l6e,{datum:t,x:o.text[0],y:o.text[1],note:i})]})};function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vr.apply(this,arguments)}function h6e(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Qn={layers:["grid","axes","cells","legends","annotations"],forceSquare:!1,xInnerPadding:0,xOuterPadding:0,yInnerPadding:0,yOuterPadding:0,sizeVariation:!1,opacity:1,activeOpacity:1,inactiveOpacity:.15,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",.8]]},enableGridX:!1,enableGridY:!1,enableLabels:!0,label:"formattedValue",labelTextColor:{from:"color",modifiers:[["darker",2]]},colors:{type:"sequential",scheme:"brown_blueGreen"},emptyColor:"#000000",legends:[],annotations:[],isInteractive:!0,hoverTarget:"rowColumn",tooltip:$.memo(function(e){var t=e.cell;return t.formattedValue===null?null:p.jsx(Dhe,{id:t.serieId+" - "+t.data.x,value:t.formattedValue,enableChip:!0,color:t.color})}),animate:!0,motionConfig:"gentle"},Dt=vr({},Qn,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},borderRadius:0,cellComponent:"rect"});vr({},Qn,{axisTop:{},axisRight:null,axisBottom:null,axisLeft:{},renderCell:"rect",pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var g6e=function(e){var t=e.width,n=e.height,r=e.rows,i=e.columns,o=t,a=n,s=0,l=0;if(e.forceSquare){var c=Math.max(t/i,0),u=Math.max(n/r,0),d=Math.min(c,u);s=(t-(o=d*i))/2,l=(n-(a=d*r))/2}return{offsetX:s,offsetY:l,width:o,height:a}},v6e=function(e){var t=e.data,n=e.width,r=e.height,i=e.xInnerPadding,o=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare,c=new Set,u=[],d=[],f=[];t.forEach(function(H){u.push(H.id),H.data.forEach(function(_){c.add(_.x);var O=null;_.y!==void 0&&_.y!==null&&(d.push(_.y),O=_.y),f.push({id:H.id+"."+_.x,serieId:H.id,value:O,data:_})})});var h=Array.from(c),m=g6e({width:n,height:r,columns:h.length,rows:u.length,forceSquare:l}),g=m.width,v=m.height,b=m.offsetX,y=m.offsetY,x=Tp(Ns().domain(h).range([0,g]).paddingOuter(o).paddingInner(i)),S=Tp(Ns().domain(u).range([0,v]).paddingOuter(s).paddingInner(a)),w=x.bandwidth(),M=S.bandwidth(),E=f.map(function(H){return vr({},H,{x:x(H.data.x)+w/2,y:S(H.serieId)+M/2,width:w,height:M})});return{width:g,height:v,offsetX:b,offsetY:y,xScale:x,yScale:S,minValue:Math.min.apply(Math,d),maxValue:Math.max.apply(Math,d),cells:E}},m6e=function(e,t,n){if(!e)return function(){return 1};var r=Go().domain(e.values?e.values:[t,n]).range(e.sizes);return function(i){return i===null?1:r(i)}},p6e=function(e){return{x:e.x,y:e.y}},b6e=function(e){return{size:Math.max(e.width,e.height),width:e.width,height:e.height}},y6e=function(e){var t=e.data,n=e.width,r=e.height,i=e.xInnerPadding,o=e.xOuterPadding,a=e.yInnerPadding,s=e.yOuterPadding,l=e.forceSquare;return $.useMemo(function(){return v6e({data:t,width:n,height:r,xInnerPadding:i,xOuterPadding:o,yInnerPadding:a,yOuterPadding:s,forceSquare:l})},[t,n,r,i,o,a,s,l])},C6e={cell:function(e,t){return e.id===t.id},row:function(e,t){return e.serieId===t.serieId},column:function(e,t){return e.data.x===t.data.x},rowColumn:function(e,t){return e.serieId===t.serieId||e.data.x===t.data.x}},x6e=function(e){var t,n,r,i=e.cells,o=e.minValue,a=e.maxValue,s=e.sizeVariation,l=e.colors,c=e.emptyColor,u=e.opacity,d=e.activeOpacity,f=e.inactiveOpacity,h=e.borderColor,m=e.label,g=e.labelTextColor,v=e.valueFormat,b=e.activeIds,y=$.useMemo(function(){return m6e(t,n,r)},[t=s,n=o,r=a]),x=$.useMemo(function(){return typeof l=="function"?null:G4e(l,{min:o,max:a})},[l,o,a]),S=$.useCallback(function(O){if(O.value!==null){if(typeof l=="function")return l(O);if(x!==null)return x(O.value)}return c},[l,x,c]),w=zn(),M=Pp(h,w),E=Pp(g,w),H=H_(v),_=$4e(m);return{cells:$.useMemo(function(){return i.map(function(O){var k=u;b.length>0&&(k=b.includes(O.id)?d:f);var A=y(O.value),j=vr({},O,{width:O.width*A,height:O.height*A,formattedValue:O.value!==null?H(O.value):null,opacity:k});return j.label=_(j),j.color=S(j),j.borderColor=M(j),j.labelTextColor=E(j),j})},[i,y,S,M,E,H,_,b,u,d,f]),colorScale:x}},w6e=function(e){var t=e.data,n=e.valueFormat,r=e.width,i=e.height,o=e.xOuterPadding,a=o===void 0?Qn.xOuterPadding:o,s=e.xInnerPadding,l=s===void 0?Qn.xInnerPadding:s,c=e.yOuterPadding,u=c===void 0?Qn.yOuterPadding:c,d=e.yInnerPadding,f=d===void 0?Qn.yInnerPadding:d,h=e.forceSquare,m=h===void 0?Qn.forceSquare:h,g=e.sizeVariation,v=g===void 0?Qn.sizeVariation:g,b=e.colors,y=b===void 0?Qn.colors:b,x=e.emptyColor,S=x===void 0?Qn.emptyColor:x,w=e.opacity,M=w===void 0?Qn.opacity:w,E=e.activeOpacity,H=E===void 0?Qn.activeOpacity:E,_=e.inactiveOpacity,O=_===void 0?Qn.inactiveOpacity:_,k=e.borderColor,A=k===void 0?Qn.borderColor:k,j=e.label,V=j===void 0?Qn.label:j,T=e.labelTextColor,L=T===void 0?Qn.labelTextColor:T,R=e.hoverTarget,I=R===void 0?Qn.hoverTarget:R,P=$.useState(null),N=P[0],z=P[1],q=y6e({data:t,width:r,height:i,xOuterPadding:a,xInnerPadding:l,yOuterPadding:u,yInnerPadding:f,forceSquare:m}),G=q.width,Y=q.height,ee=q.offsetX,Q=q.offsetY,K=q.cells,J=q.xScale,W=q.yScale,Z=q.minValue,U=q.maxValue,F=$.useMemo(function(){if(!N)return[];var B=C6e[I];return K.filter(function(ie){return B(ie,N)}).map(function(ie){return ie.id})},[K,N,I]),re=x6e({cells:K,minValue:Z,maxValue:U,sizeVariation:v,colors:y,emptyColor:S,opacity:M,activeOpacity:H,inactiveOpacity:O,borderColor:A,label:V,labelTextColor:L,valueFormat:n,activeIds:F});return{width:G,height:Y,offsetX:ee,offsetY:Q,cells:re.cells,xScale:J,yScale:W,colorScale:re.colorScale,activeCell:N,setActiveCell:z}},S6e=function(e,t){return a6e({data:e,annotations:t,getPosition:p6e,getDimensions:b6e})},$6e=$.memo(function(e){var t=e.cell,n=e.borderWidth,r=e.borderRadius,i=e.animatedProps,o=e.onMouseEnter,a=e.onMouseMove,s=e.onMouseLeave,l=e.onClick,c=e.enableLabels,u=zn(),d=$.useMemo(function(){return{onMouseEnter:o?o(t):void 0,onMouseMove:a?a(t):void 0,onMouseLeave:s?s(t):void 0,onClick:l?l(t):void 0}},[t,o,a,s,l]);return p.jsxs(et.g,vr({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:i.opacity},d,{transform:On([i.x,i.y,i.scale],function(f,h,m){return"translate("+f+", "+h+") scale("+m+")"}),children:[p.jsx(et.rect,{transform:On([i.width,i.height],function(f,h){return"translate("+-.5*f+", "+-.5*h+")"}),fill:i.color,width:i.width,height:i.height,stroke:i.borderColor,strokeWidth:n,rx:r,ry:r},t.id),c&&p.jsx(et.text,{textAnchor:"middle",dominantBaseline:"central",fill:i.labelTextColor,style:vr({},u.labels.text,{fill:void 0,userSelect:"none"}),children:t.label})]}))}),M6e=$.memo(function(e){var t=e.cell,n=e.borderWidth,r=e.animatedProps,i=e.onMouseEnter,o=e.onMouseMove,a=e.onMouseLeave,s=e.onClick,l=e.enableLabels,c=zn(),u=$.useMemo(function(){return{onMouseEnter:i?i(t):void 0,onMouseMove:o?o(t):void 0,onMouseLeave:a?a(t):void 0,onClick:s?s(t):void 0}},[t,i,o,a,s]);return p.jsxs(et.g,vr({"data-testid":"cell."+t.id,style:{cursor:"pointer"},opacity:r.opacity},u,{transform:On([r.x,r.y],function(d,f){return"translate("+d+", "+f+")"}),children:[p.jsx(et.circle,{r:On([r.width,r.height],function(d,f){return Math.min(d,f)/2}),fill:r.color,fillOpacity:r.opacity,strokeWidth:n,stroke:r.borderColor}),l&&p.jsx(et.text,{dominantBaseline:"central",textAnchor:"middle",fill:r.labelTextColor,style:vr({},c.labels.text,{fill:void 0}),children:t.label})]}))}),_6e=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},I2=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:e.opacity,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:1}},H6e=function(e){return{x:e.x,y:e.y,width:e.width,height:e.height,color:e.color,opacity:0,borderColor:e.borderColor,labelTextColor:e.labelTextColor,scale:0}},E6e=function(e){var t,n=e.cells,r=e.cellComponent,i=e.borderRadius,o=e.borderWidth,a=e.isInteractive,s=e.setActiveCell,l=e.onMouseEnter,c=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.tooltip,h=e.enableLabels,m=fi(),g=m.animate,v=m.config,b=Cr(n,{keys:function(_){return _.id},initial:I2,from:_6e,enter:I2,update:I2,leave:H6e,config:v,immediate:!g}),y=Uhe(),x=y.showTooltipFromEvent,S=y.hideTooltip,w=$.useMemo(function(){if(a)return function(_){return function(O){x($.createElement(f,{cell:_}),O),s(_),l==null||l(_,O)}}},[a,x,f,s,l]),M=$.useMemo(function(){if(a)return function(_){return function(O){x($.createElement(f,{cell:_}),O),c==null||c(_,O)}}},[a,x,f,c]),E=$.useMemo(function(){if(a)return function(_){return function(O){S(),s(null),u==null||u(_,O)}}},[a,S,s,u]),H=$.useMemo(function(){if(a)return function(_){return function(O){d==null||d(_,O)}}},[a,d]);return t=r==="rect"?$6e:r==="circle"?M6e:r,p.jsx(p.Fragment,{children:b(function(_,O){return $.createElement(t,{cell:O,borderRadius:i,borderWidth:o,animatedProps:_,enableLabels:h,onMouseEnter:w,onMouseMove:M,onMouseLeave:E,onClick:H})})})},V6e=function(e){var t=e.cells,n=e.annotations,r=S6e(t,n);return p.jsx(p.Fragment,{children:r.map(function(i,o){return p.jsx(f6e,vr({},i),o)})})},O6e=["isInteractive","animate","motionConfig","theme","renderWrapper"],R6e=function(e){var t=e.data,n=e.layers,r=n===void 0?Dt.layers:n,i=e.valueFormat,o=e.width,a=e.height,s=e.margin,l=e.forceSquare,c=l===void 0?Dt.forceSquare:l,u=e.xInnerPadding,d=u===void 0?Dt.xInnerPadding:u,f=e.xOuterPadding,h=f===void 0?Dt.xOuterPadding:f,m=e.yInnerPadding,g=m===void 0?Dt.yInnerPadding:m,v=e.yOuterPadding,b=v===void 0?Dt.yOuterPadding:v,y=e.sizeVariation,x=y===void 0?Dt.sizeVariation:y,S=e.cellComponent,w=S===void 0?Dt.cellComponent:S,M=e.opacity,E=M===void 0?Dt.opacity:M,H=e.activeOpacity,_=H===void 0?Dt.activeOpacity:H,O=e.inactiveOpacity,k=O===void 0?Dt.inactiveOpacity:O,A=e.borderRadius,j=A===void 0?Dt.borderRadius:A,V=e.borderWidth,T=V===void 0?Dt.borderWidth:V,L=e.borderColor,R=L===void 0?Dt.borderColor:L,I=e.enableGridX,P=I===void 0?Dt.enableGridX:I,N=e.enableGridY,z=N===void 0?Dt.enableGridY:N,q=e.axisTop,G=q===void 0?Dt.axisTop:q,Y=e.axisRight,ee=Y===void 0?Dt.axisRight:Y,Q=e.axisBottom,K=Q===void 0?Dt.axisBottom:Q,J=e.axisLeft,W=J===void 0?Dt.axisLeft:J,Z=e.enableLabels,U=Z===void 0?Dt.enableLabels:Z,F=e.label,re=F===void 0?Dt.label:F,B=e.labelTextColor,ie=B===void 0?Dt.labelTextColor:B,oe=e.colors,ve=oe===void 0?Dt.colors:oe,Ce=e.emptyColor,pe=Ce===void 0?Dt.emptyColor:Ce,ye=e.legends,Se=ye===void 0?Dt.legends:ye,me=e.annotations,ge=me===void 0?Dt.annotations:me,ce=e.isInteractive,$e=ce===void 0?Dt.isInteractive:ce,he=e.onMouseEnter,Ae=e.onMouseMove,Ie=e.onMouseLeave,Re=e.onClick,ke=e.hoverTarget,Ye=ke===void 0?Dt.hoverTarget:ke,Xe=e.tooltip,Fe=Xe===void 0?Dt.tooltip:Xe,je=e.role,Qe=e.ariaLabel,Ze=e.ariaLabelledBy,qe=e.ariaDescribedBy,de=s4e(o,a,s),He=de.margin,Ke=de.innerWidth,nt=de.innerHeight,Ne=de.outerWidth,ze=de.outerHeight,De=w6e({data:t,valueFormat:i,width:Ke,height:nt,forceSquare:c,xInnerPadding:d,xOuterPadding:h,yInnerPadding:g,yOuterPadding:b,sizeVariation:x,colors:ve,emptyColor:pe,opacity:E,activeOpacity:_,inactiveOpacity:k,borderColor:R,label:re,labelTextColor:ie,hoverTarget:Ye}),Je=De.width,tt=De.height,Be=De.offsetX,Le=De.offsetY,ut=De.xScale,pt=De.yScale,Ee=De.cells,fe=De.colorScale,we=De.activeCell,Ve=De.setActiveCell,Ge=$.useMemo(function(){return vr({},He,{top:He.top+Le,left:He.left+Be})},[He,Be,Le]),We={grid:null,axes:null,cells:null,legends:null,annotations:null};r.includes("grid")&&(We.grid=p.jsx(L4e,{width:Je,height:tt,xScale:P?ut:null,yScale:z?pt:null},"grid")),r.includes("axes")&&(We.axes=p.jsx(k4e,{xScale:ut,yScale:pt,width:Je,height:tt,top:G,right:ee,bottom:K,left:W},"axes")),r.includes("cells")&&(We.cells=p.jsx($.Fragment,{children:p.jsx(E6e,{cells:Ee,cellComponent:w,borderRadius:j,borderWidth:T,isInteractive:$e,setActiveCell:Ve,onMouseEnter:he,onMouseMove:Ae,onMouseLeave:Ie,onClick:Re,tooltip:Fe,enableLabels:U})},"cells")),r.includes("legends")&&fe!==null&&(We.legends=p.jsx($.Fragment,{children:Se.map(function(X,ae){return $.createElement(e6e,vr({},X,{key:ae,containerWidth:Je,containerHeight:tt,scale:fe}))})},"legends")),r.includes("annotations")&&ge.length>0&&(We.annotations=p.jsx(V6e,{cells:Ee,annotations:ge},"annotations"));var rt={cells:Ee,activeCell:we,setActiveCell:Ve};return p.jsx(P_,{width:Ne,height:ze,margin:Object.assign({},Ge,{top:Ge.top,left:Ge.left}),role:je,ariaLabel:Qe,ariaLabelledBy:Ze,ariaDescribedBy:qe,children:r.map(function(X,ae){var se;return typeof X=="function"?p.jsx($.Fragment,{children:$.createElement(X,rt)},ae):(se=We==null?void 0:We[X])!=null?se:null})})},T6e=function(e){var t=e.isInteractive,n=t===void 0?Dt.isInteractive:t,r=e.animate,i=r===void 0?Dt.animate:r,o=e.motionConfig,a=o===void 0?Dt.motionConfig:o,s=e.theme,l=e.renderWrapper,c=h6e(e,O6e);return p.jsx(T_,{animate:i,isInteractive:n,motionConfig:a,renderWrapper:l,theme:s,children:p.jsx(R6e,vr({isInteractive:n},c))})},k6e=function(e){return p.jsx(k_,{children:function(t){var n=t.width,r=t.height;return p.jsx(T6e,vr({width:n,height:r},e))}})};const Ra=12,Jc=14,xs=Ct.tspan`
594
597
  font: var(--gf-label-md-default);
595
598
  color: var(--gf-color-text-secondary);
596
599
  font-size: ${Ra}px;
597
600
  line-height: ${Jc}px;
598
601
  transition: font-weight 0.1s ease-in-out; /* smooth hover */
599
602
  `,j6e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},W_=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;j6e(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},f1=$.memo(({cell:e,text:t,transX:n,transY:r,textAnchor:i="start",textStyle:o={},hoveredRow:a,yLabelWidth:s})=>{t=t||"label";const l=$.useMemo(()=>W_(t,s,Ra),[t,s]),c=l.length*Jc;return r=r||e.y-c/2,p.jsx("g",{transform:`translate(-${n}, ${r})`,children:p.jsx("text",{textAnchor:i,children:l.map((u,d)=>p.jsx(xs,{x:0,dy:d>0?Jc:Ra,style:{...o,fontWeight:t===a?"bold":"normal"},children:u},d))})})}),Fp=$.memo(({cell:e,text:t,transX:n,transY:r,textAnchor:i="start",textStyle:o={},rotate:a=-90,hoveredCol:s,xLabelWidth:l,xLabelPadding:c,scalePadding:u,scaleTextPadding:d})=>{var m;t=t||((m=e==null?void 0:e.data)==null?void 0:m.x)||"label";const f=$.useMemo(()=>W_(t,l,Ra),[t,l]),h=f.length*Jc;return n=n||e.x-h/2,r=r||-(c+u+d),p.jsx("g",{transform:`translate(${n}, ${r}) rotate(${a})`,children:p.jsx("text",{textAnchor:i,children:f.map((g,v)=>p.jsx(xs,{x:0,dy:v>0?Jc:Ra,style:{...o,fontWeight:t===s?"bold":"normal"},children:g},v))})})}),L6e=({data:e,height:t=1300,margin:n={},xLabelWidth:r=120,xLabelPadding:i=20,yLabelWidth:o=200,yLabelPadding:a=40,yNumeralWidth:s=30,yNumeralPadding:l=50,scalePadding:c=10,scaleTextPadding:u=5,tooltip:d=null})=>{const f=o+a+s+l+c+u,[h,m]=$.useState({row:null,col:null}),g=$.useRef(null),[v,b]=$.useState({width:0,height:0});$.useEffect(()=>{if(!(g!=null&&g.current))return;const V=()=>{const L=g.current.getBoundingClientRect();b({width:L.width,height:L.height})},T=new ResizeObserver(V);return T.observe(g.current),V(),()=>T.disconnect()},[]);const y=$.useMemo(()=>e.reduce((V,T)=>(V[T.id]=T.worth,V),{}),[e]);let x=null;const S=({cells:V})=>V.map((T,L)=>{const R=T==null?void 0:T.serieId;return R===x?null:(x=R,p.jsx(f1,{cell:T,text:R,transX:f,hoveredRow:h.row,yLabelWidth:o},`cell-ylabel-${L}`))}),w=()=>p.jsx(f1,{text:"Goederengroep",transX:f,transY:-20,textStyle:{fontWeight:"bold"},yLabelWidth:o});x=null;const M=({cells:V})=>V.map((T,L)=>{var I;const R=T==null?void 0:T.serieId;return R===x?null:(x=R,p.jsx(f1,{cell:T,text:(I=y[R])==null?void 0:I.toString(),transX:l,textAnchor:"end",hoveredRow:h.row,yLabelWidth:o},`cell-ynumeral-${L}`))}),E=()=>p.jsx(f1,{text:"Invoerwaarde in mln €",transX:l,transY:-20,textStyle:{fontWeight:"bold"},textAnchor:"end",yLabelWidth:o});x=null;const H=({cells:V})=>V.map((T,L)=>(T==null?void 0:T.serieId)!==x?null:p.jsx(Fp,{cell:T,hoveredCol:h.col,xLabelWidth:r,xLabelPadding:i,scalePadding:c,scaleTextPadding:u},`cell-xlabel-${L}`)),_=()=>p.jsx(Fp,{text:"Kritieke grondstoffen",transX:(v.width-f)/2-r/2,transY:-(i+c+u+r),rotate:0,textStyle:{fontWeight:"bold"},xLabelWidth:r,xLabelPadding:i,scalePadding:c,scaleTextPadding:u}),O=()=>p.jsxs("g",{children:[p.jsxs("defs",{children:[p.jsx("marker",{id:"arrow-left",markerWidth:"5",markerHeight:"5",refX:"0",refY:"2.5",orient:"auto",children:p.jsx("path",{d:"M5,0 L0,2.5 L5,5 Z",fill:"black"})}),p.jsx("marker",{id:"arrow-right",markerWidth:"5",markerHeight:"5",refX:"5",refY:"2.5",orient:"auto",children:p.jsx("path",{d:"M0,0 L5,2.5 L0,5 Z",fill:"black"})})]}),p.jsx("line",{x1:"0",y1:-c,x2:v.width-f,y2:-c,stroke:"black",strokeWidth:"1",markerStart:"url(#arrow-left)",markerEnd:"url(#arrow-right)"}),p.jsx("text",{transform:`translate(10, -${c+u})`,children:p.jsx(xs,{children:"Heel kritiek (40 “Zie toelichting”)"})}),p.jsx("text",{textAnchor:"end",transform:`translate(${v.width-f-10}, -${c+u})`,children:p.jsx(xs,{children:"Minder kritiek (0 “Zie toelichting”)"})})]}),k=()=>p.jsxs("g",{children:[p.jsxs("defs",{children:[p.jsx("marker",{id:"arrow-up",markerWidth:"5",markerHeight:"5",refX:"2.5",refY:"2.5",orient:"auto",children:p.jsx("path",{d:"M5,0 L0,2.5 L5,5 Z",fill:"black"})}),p.jsx("marker",{id:"arrow-down",markerWidth:"5",markerHeight:"5",refX:"5",refY:"2.5",orient:"auto",children:p.jsx("path",{d:"M0,0 L5,2.5 L0,5 Z",fill:"black"})})]}),p.jsx("line",{x1:-c,y1:"5",x2:-c,y2:v.height-(r+i+c+u)-80,stroke:"black",strokeWidth:"1",markerStart:"url(#arrow-up)",markerEnd:"url(#arrow-down)"}),p.jsx("text",{transform:`translate(-${c+u+Ra}, 10) rotate(90)`,children:p.jsx(xs,{children:"Veel ingevoerd"})}),p.jsx("text",{textAnchor:"end",transform:`translate(-${c+u+Ra},
600
- ${v.height-(r+i+c+u)-10-80}) rotate(90)`,children:p.jsx(xs,{children:"Weinig ingevoerd"})})]}),A=V=>{var T;m({row:V==null?void 0:V.serieId,col:(T=V==null?void 0:V.data)==null?void 0:T.x})},j=()=>{m({row:null,col:null})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{ref:g,style:{height:t},children:p.jsx(k6e,{data:e,margin:{top:r+i+c+u,right:0,bottom:80,left:f,...n},enableLabels:!1,colors:{type:"diverging",scheme:"oranges",minValue:0,maxValue:100,divergeAt:.5},emptyColor:"#FFFFFF",axisTop:null,axisLeft:null,layers:["legends","cells",S,w,M,E,H,_,O,k],tooltip:V=>p.jsx(Un,{body:(d==null?void 0:d(V))||p.jsx("span",{children:"Tooltip"})}),legends:[{anchor:"bottom",translateX:0,translateY:60,length:v.width-f-20,thickness:24,direction:"row",tickPosition:"after",tickSize:3,tickSpacing:4,tickOverlap:!1,title:"Kritieke grondstoffen per goederengroep (%)",titleAlign:"middle",titleOffset:10}],onMouseEnter:A,onMouseLeave:j})})]})},P6e=({data:e,graph:t,stroke:n,strokeWidth:r,dashed:i})=>p.jsx("g",{children:p.jsx("line",{x1:0,y1:t.yScale(e),x2:t.innerWidth,y2:t.yScale(e),stroke:n||"red",strokeWidth:r||1,strokeDasharray:i?"10, 5":null})}),sh=yt.tspan`
603
+ ${v.height-(r+i+c+u)-10-80}) rotate(90)`,children:p.jsx(xs,{children:"Weinig ingevoerd"})})]}),A=V=>{var T;m({row:V==null?void 0:V.serieId,col:(T=V==null?void 0:V.data)==null?void 0:T.x})},j=()=>{m({row:null,col:null})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx("div",{ref:g,style:{height:t},children:p.jsx(k6e,{data:e,margin:{top:r+i+c+u,right:0,bottom:80,left:f,...n},enableLabels:!1,colors:{type:"diverging",scheme:"oranges",minValue:0,maxValue:100,divergeAt:.5},emptyColor:"#FFFFFF",axisTop:null,axisLeft:null,layers:["legends","cells",S,w,M,E,H,_,O,k],tooltip:V=>p.jsx(Un,{body:(d==null?void 0:d(V))||p.jsx("span",{children:"Tooltip"})}),legends:[{anchor:"bottom",translateX:0,translateY:60,length:v.width-f-20,thickness:24,direction:"row",tickPosition:"after",tickSize:3,tickSpacing:4,tickOverlap:!1,title:"Kritieke grondstoffen per goederengroep (%)",titleAlign:"middle",titleOffset:10}],onMouseEnter:A,onMouseLeave:j})})]})},P6e=({data:e,graph:t,stroke:n,strokeWidth:r,dashed:i})=>p.jsx("g",{children:p.jsx("line",{x1:0,y1:t.yScale(e),x2:t.innerWidth,y2:t.yScale(e),stroke:n||"red",strokeWidth:r||1,strokeDasharray:i?"10, 5":null})}),sh=Ct.tspan`
601
604
  color: var(--Text-colorText, #1D2939);
602
605
  font-family: 'Roboto', sans-serif;
603
606
  font-size: ${({$size:e=14})=>`${e}px`};
604
607
  font-style: normal;
605
608
  font-weight: 400;
606
609
  line-height: ${({$lineHeight:e=22})=>`${e}px`};
607
- `,A2={vervangen:{colors:{renew:"#86AA49",other:"#D0D5DD"},legend:{renew:"Hernieuwbare en secundaire grondstoffen",other:"Overige grondstoffen"},text:"Doel 2035: Verhogen naar 55%",increase:!0,unit:"%",targets:[{value:50,name:"Doel 2030",color:"#FFAB2E"},{value:55,name:"Doel 2035",color:"#1094D7"}]},besparen:{colors:{raw:"#92DAE1"},legend:{raw:"Grondstoffen gebruik"},text:"Doel 2035: Verlagen met 15% ten op zichte van 2016",targets:[{name:"Doel 2030",color:"#FFAB2E"},{name:"Doel 2035",color:"#1094D7"}]},behouden_hoeveelheid:{colors:{high:"#226123",other:"#84B08D",low:"#D0D5DD"},legend:{high:"Hoogwaardige recycling",other:"Overige recycling",low:"Verbranden/Storten"},text:"Doel 2035: Verlagen van totale hoeveelheid afval ten op zichte van 2016",unit:"kt"},behouden_verwerking:{colors:{high:"#226123",other:"#84B08D",low:"#D0D5DD"},legend:{high:"Hoogwaardige recycling",other:"Overige recycling",low:"Verbranden/Storten"},text:"Doel 2035: Verhogen van percentage gerecycled afval naar minimaal 82% waarvan minimaal 15% hoogwaardige recycling",unit:"%",targets:[{name:"Doel Hoogwaardig 2035",color:"#226123",value:15},{name:"Doel Recycling 2035",color:"#84B08D",value:82}]}},I6e=({increase:e,text:t})=>p.jsxs(Ct,{gap:8,align:"center",style:{padding:"4px 8px",borderRadius:4,border:"1px solid #A6C6FB",background:"#F0F6FF",color:"#152BEE"},children:[e?p.jsx(ax,{}):p.jsx(ox,{}),p.jsx(sh,{children:t})]}),A6e=({legend:e,targets:t,colors:n})=>{var r;return p.jsxs(Ct,{gap:16,justify:"center",align:"center",children:[(r=Object.entries(e))==null?void 0:r.map(([i,o],a)=>p.jsxs(Ct,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:16,background:n[i]}}),p.jsx(sh,{$size:12,$height:14,children:o})]},a)),t==null?void 0:t.map((i,o)=>p.jsxs(Ct,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:1,borderTop:`1px dashed ${i==null?void 0:i.color}`}}),p.jsx(sh,{$size:12,$height:14,children:`${i==null?void 0:i.name}`})]},o))]})},N6e=({data:e,goal:t,height:n=500,padding:r=.2,indexBy:i="year",valueFormat:o=null,margin:a={},axisBottom:s={},axisLeft:l={},tooltip:c=null})=>{var M;const u=A2==null?void 0:A2[t],d=(M=u==null?void 0:u.targets)==null?void 0:M.map((E,H)=>{var _;return{...E,...(_=e==null?void 0:e.targets)==null?void 0:_[H]}}),f=(e==null?void 0:e.unit)||(u==null?void 0:u.unit),h=f==="%"?"Percentage (%)":`Gewicht (${f})`,m=e==null?void 0:e.data,g=u==null?void 0:u.colors,v=Object.keys(g),b=u==null?void 0:u.text,y=u==null?void 0:u.increase,x=u.legend,S=Math.max(...m.map(E=>v.filter(H=>H in E).reduce((H,_)=>H+E[_],0))),w=E=>p.jsx(p.Fragment,{children:d==null?void 0:d.map((H,_)=>p.jsx(P6e,{data:H==null?void 0:H.value,graph:E,stroke:H==null?void 0:H.color,dashed:!0}))});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:16,style:{width:"100%"},children:[p.jsx(I6e,{increase:y,text:b}),p.jsx("div",{style:{width:"100%",height:n},children:p.jsx($l,{data:m,keys:v,indexBy:i,colors:E=>g==null?void 0:g[E==null?void 0:E.id],enableLabel:!1,margin:{left:50,bottom:35,top:10,right:0},padding:r,valueFormat:E=>(o==null?void 0:o(E))||E,minValue:0,maxValue:S,axisBottom:{tickSize:0,legendPosition:"middle",legendOffset:30,legend:"Jaar",...s},axisLeft:{tickSize:0,tickValues:5,legendPosition:"middle",legendOffset:-40,legend:h,...l},gridYValues:5,layers:["grid","axes","bars",w],tooltip:E=>p.jsx(Un,{body:(c==null?void 0:c(E))||p.jsx("span",{children:"Tooltip"})}),theme:{text:{fontFamily:"Roboto, sans-serif",fill:"#667085"}}})}),p.jsx(A6e,{legend:x,colors:g,targets:d})]})]})},lh=12,K7=14,F6e=yt.tspan`
610
+ `,A2={vervangen:{colors:{renew:"#86AA49",other:"#D0D5DD"},legend:{renew:"Hernieuwbare en secundaire grondstoffen",other:"Overige grondstoffen"},text:"Doel 2035: Verhogen naar 55%",increase:!0,unit:"%",targets:[{value:50,name:"Doel 2030",color:"#FFAB2E"},{value:55,name:"Doel 2035",color:"#1094D7"}]},besparen:{colors:{raw:"#92DAE1"},legend:{raw:"Grondstoffen gebruik"},text:"Doel 2035: Verlagen met 15% ten op zichte van 2016",targets:[{name:"Doel 2030",color:"#FFAB2E"},{name:"Doel 2035",color:"#1094D7"}]},behouden_hoeveelheid:{colors:{high:"#226123",other:"#84B08D",low:"#D0D5DD"},legend:{high:"Hoogwaardige recycling",other:"Overige recycling",low:"Verbranden/Storten"},text:"Doel 2035: Verlagen van totale hoeveelheid afval ten op zichte van 2016",unit:"kt"},behouden_verwerking:{colors:{high:"#226123",other:"#84B08D",low:"#D0D5DD"},legend:{high:"Hoogwaardige recycling",other:"Overige recycling",low:"Verbranden/Storten"},text:"Doel 2035: Verhogen van percentage gerecycled afval naar minimaal 82% waarvan minimaal 15% hoogwaardige recycling",unit:"%",targets:[{name:"Doel Hoogwaardig 2035",color:"#226123",value:15},{name:"Doel Recycling 2035",color:"#84B08D",value:82}]}},I6e=({increase:e,text:t})=>p.jsxs(yt,{gap:8,align:"center",style:{padding:"4px 8px",borderRadius:4,border:"1px solid #A6C6FB",background:"#F0F6FF",color:"#152BEE"},children:[e?p.jsx(ax,{}):p.jsx(ox,{}),p.jsx(sh,{children:t})]}),A6e=({legend:e,targets:t,colors:n})=>{var r;return p.jsxs(yt,{gap:16,justify:"center",align:"center",children:[(r=Object.entries(e))==null?void 0:r.map(([i,o],a)=>p.jsxs(yt,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:16,background:n[i]}}),p.jsx(sh,{$size:12,$height:14,children:o})]},a)),t==null?void 0:t.map((i,o)=>p.jsxs(yt,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:1,borderTop:`1px dashed ${i==null?void 0:i.color}`}}),p.jsx(sh,{$size:12,$height:14,children:`${i==null?void 0:i.name}`})]},o))]})},N6e=({data:e,goal:t,height:n=500,padding:r=.2,indexBy:i="year",valueFormat:o=null,margin:a={},axisBottom:s={},axisLeft:l={},tooltip:c=null})=>{var M;const u=A2==null?void 0:A2[t],d=(M=u==null?void 0:u.targets)==null?void 0:M.map((E,H)=>{var _;return{...E,...(_=e==null?void 0:e.targets)==null?void 0:_[H]}}),f=(e==null?void 0:e.unit)||(u==null?void 0:u.unit),h=f==="%"?"Percentage (%)":`Gewicht (${f})`,m=e==null?void 0:e.data,g=u==null?void 0:u.colors,v=Object.keys(g),b=u==null?void 0:u.text,y=u==null?void 0:u.increase,x=u.legend,S=Math.max(...m.map(E=>v.filter(H=>H in E).reduce((H,_)=>H+E[_],0))),w=E=>p.jsx(p.Fragment,{children:d==null?void 0:d.map((H,_)=>p.jsx(P6e,{data:H==null?void 0:H.value,graph:E,stroke:H==null?void 0:H.color,dashed:!0}))});return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:16,style:{width:"100%"},children:[p.jsx(I6e,{increase:y,text:b}),p.jsx("div",{style:{width:"100%",height:n},children:p.jsx($l,{data:m,keys:v,indexBy:i,colors:E=>g==null?void 0:g[E==null?void 0:E.id],enableLabel:!1,margin:{left:50,bottom:35,top:10,right:0},padding:r,valueFormat:E=>(o==null?void 0:o(E))||E,minValue:0,maxValue:S,axisBottom:{tickSize:0,legendPosition:"middle",legendOffset:30,legend:"Jaar",...s},axisLeft:{tickSize:0,tickValues:5,legendPosition:"middle",legendOffset:-40,legend:h,...l},gridYValues:5,layers:["grid","axes","bars",w],tooltip:E=>p.jsx(Un,{body:(c==null?void 0:c(E))||p.jsx("span",{children:"Tooltip"})}),theme:{text:{fontFamily:"Roboto, sans-serif",fill:"#667085"}}})}),p.jsx(A6e,{legend:x,colors:g,targets:d})]})]})},lh=12,K7=14,F6e=Ct.tspan`
608
611
  font: var(--gf-label-md-default);
609
612
  color: var(--gf-color-text-secondary);
610
613
  font-size: ${lh}px;
611
614
  line-height: ${K7}px;
612
- `,D6e=yt.span`
615
+ `,D6e=Ct.span`
613
616
  font: var(--gf-label-md-default);
614
617
  color: var(--gf-color-text-secondary);
615
618
  font-size: 10px;
616
619
  line-height: ${K7}px;
617
- `,z6e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},B6e=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;z6e(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},nc={crm:{color:"hsl(36, 100%, 50%)",name:"Kritikaliteit index",legend:"Kritikaliteit index"},value:{color:"hsl(197, 100%, 19%)",name:"Aantal unieke kritieke grondstoffen",legend:"Aantal unieke kritieke grondstoffen"}},W6e=({data:e=[],height:t=1300,margin:n={},padding:r=.3,innerPadding:i=3,keys:o=Object.keys(nc),indexBy:a="material",tooltip:s=null,enableLabel:l=!1,label:c=null,keyLabelWidth:u=200,keyLabelPadding:d=20,graphGap:f=40,axisBottom:h={},layers:m=["grid","axes","bars","markers"],defs:g=[],fill:v=[],leftSpan:b=14,rightSpan:y=10})=>{const x=({bar:V})=>{var q;const T=$.useRef(null),[L,R]=$.useState(0),I=((q=V==null?void 0:V.data)==null?void 0:q.indexValue)||"label",P=B6e(I,u,lh);$.useEffect(()=>{if(T.current){const G=T.current.getBoundingClientRect();R(G.height)}},[]);const N=d,z=V.y+V.height/2-L/2;return p.jsx("g",{ref:T,transform:`translate(-${N}, ${z})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:P.map((G,Y)=>p.jsx(F6e,{x:0,dy:Y>0?K7:lh,textAnchor:"end",children:G},Y))})})};let S=null;const w=({bars:V})=>V.map((T,L)=>{var R;if(name=(R=T==null?void 0:T.data)==null?void 0:R.id,!(name!==S&&S!==null))return S=name,p.jsx(x,{bar:T},`bar-label-${L}`)}),M=({bar:V})=>{var N;const T=((N=V==null?void 0:V.data)==null?void 0:N.id)===o[0],L=T?0:-f/2,R=k*(T?b:y)/24,I=T?R-u-f/2:R-f/2,P=(V==null?void 0:V.y)+(V==null?void 0:V.height)/2;return p.jsx("g",{children:p.jsx("line",{x1:L,y1:P,x2:I,y2:P,stroke:"#e1e1e1",strokeWidth:"1"})})},E=({bars:V})=>V.map((T,L)=>p.jsx(M,{bar:T},`bar-grid-${L}`)),H=({data:V,keys:T})=>{g.reduce((R,I)=>(R[I.id]={...I},delete R[I.id].id,R),{}),v.reduce((R,I)=>(I.match&&I.match.id&&(R[I.match.id]=I.id),R),{});const L=T==null?void 0:T.map(R=>{var I,P;return{name:(I=nc[R])==null?void 0:I.name,color:(P=nc[R])==null?void 0:P.color,defs:g}});return p.jsx(Ct,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:L.map((R,I)=>p.jsxs(Ct,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:8,minHeight:8,backgroundColor:R.color}}),p.jsx(D6e,{children:R.name})]},`legend-${I}`))})},_=({value:V,labels:T})=>{var L;return p.jsx("div",{style:{height:t},children:p.jsx($l,{data:j,colors:({id:R,data:I})=>{var P;return(P=nc[R])==null?void 0:P.color},defs:g,fill:v,keys:[V],indexBy:a,groupMode:"grouped",margin:{right:f/2,bottom:50,left:T?u+d:f/2,...n},layout:"horizontal",enableGridY:!1,enableGridX:!0,padding:r,innerPadding:i,enableLabel:!1,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,legend:(L=nc[V])==null?void 0:L.legend},axisLeft:null,layers:[E,...m,...T?[w]:[]],tooltip:R=>p.jsx(Un,{body:(s==null?void 0:s(R))||p.jsx("span",{children:"Tooltip"})}),markers:[{axis:"x",value:0,lineStyle:{stroke:"#000000",strokeWidth:1}}]})})},O=$.useRef(null),[k,A]=$.useState(0);$.useEffect(()=>{const V=new ResizeObserver(T=>{for(let L of T)A(L.contentRect.width)});return O.current&&V.observe(O.current),()=>V.disconnect()},[]);const j=e.slice().reverse();return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:8,style:{width:"100%"},ref:O,children:[p.jsx(H,{data:e,keys:o}),p.jsxs(ho,{gutter:[0,0],children:[p.jsx(br,{span:b,children:p.jsx(_,{value:o[0],labels:!0})}),p.jsx(br,{span:y,children:p.jsx(_,{value:o[1]})})]})]})]})},Z6e=({x1:e,x2:t,y1:n,y2:r})=>p.jsx("g",{children:p.jsx("line",{x1:e,y1:n,x2:t,y2:r,stroke:"#152BEE",strokeWidth:"3"})}),U6e=12,Z_=14,q6e=yt.tspan`
620
+ `,z6e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},B6e=(e,t,n=12)=>{const r=e.split(" "),i=[];let o=r[0];for(let a=1;a<r.length;a++){const s=`${o} ${r[a]}`;z6e(s,n).width>t?(i.push(o),o=r[a]):o=s}return i.push(o),i},nc={crm:{color:"hsl(36, 100%, 50%)",name:"Kritikaliteit index",legend:"Kritikaliteit index"},value:{color:"hsl(197, 100%, 19%)",name:"Aantal unieke kritieke grondstoffen",legend:"Aantal unieke kritieke grondstoffen"}},W6e=({data:e=[],height:t=1300,margin:n={},padding:r=.3,innerPadding:i=3,keys:o=Object.keys(nc),indexBy:a="material",tooltip:s=null,enableLabel:l=!1,label:c=null,keyLabelWidth:u=200,keyLabelPadding:d=20,graphGap:f=40,axisBottom:h={},layers:m=["grid","axes","bars","markers"],defs:g=[],fill:v=[],leftSpan:b=14,rightSpan:y=10})=>{const x=({bar:V})=>{var q;const T=$.useRef(null),[L,R]=$.useState(0),I=((q=V==null?void 0:V.data)==null?void 0:q.indexValue)||"label",P=B6e(I,u,lh);$.useEffect(()=>{if(T.current){const G=T.current.getBoundingClientRect();R(G.height)}},[]);const N=d,z=V.y+V.height/2-L/2;return p.jsx("g",{ref:T,transform:`translate(-${N}, ${z})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:P.map((G,Y)=>p.jsx(F6e,{x:0,dy:Y>0?K7:lh,textAnchor:"end",children:G},Y))})})};let S=null;const w=({bars:V})=>V.map((T,L)=>{var R;if(name=(R=T==null?void 0:T.data)==null?void 0:R.id,!(name!==S&&S!==null))return S=name,p.jsx(x,{bar:T},`bar-label-${L}`)}),M=({bar:V})=>{var N;const T=((N=V==null?void 0:V.data)==null?void 0:N.id)===o[0],L=T?0:-f/2,R=k*(T?b:y)/24,I=T?R-u-f/2:R-f/2,P=(V==null?void 0:V.y)+(V==null?void 0:V.height)/2;return p.jsx("g",{children:p.jsx("line",{x1:L,y1:P,x2:I,y2:P,stroke:"#e1e1e1",strokeWidth:"1"})})},E=({bars:V})=>V.map((T,L)=>p.jsx(M,{bar:T},`bar-grid-${L}`)),H=({data:V,keys:T})=>{g.reduce((R,I)=>(R[I.id]={...I},delete R[I.id].id,R),{}),v.reduce((R,I)=>(I.match&&I.match.id&&(R[I.match.id]=I.id),R),{});const L=T==null?void 0:T.map(R=>{var I,P;return{name:(I=nc[R])==null?void 0:I.name,color:(P=nc[R])==null?void 0:P.color,defs:g}});return p.jsx(yt,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:L.map((R,I)=>p.jsxs(yt,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:8,minHeight:8,backgroundColor:R.color}}),p.jsx(D6e,{children:R.name})]},`legend-${I}`))})},_=({value:V,labels:T})=>{var L;return p.jsx("div",{style:{height:t},children:p.jsx($l,{data:j,colors:({id:R,data:I})=>{var P;return(P=nc[R])==null?void 0:P.color},defs:g,fill:v,keys:[V],indexBy:a,groupMode:"grouped",margin:{right:f/2,bottom:50,left:T?u+d:f/2,...n},layout:"horizontal",enableGridY:!1,enableGridX:!0,padding:r,innerPadding:i,enableLabel:!1,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,legend:(L=nc[V])==null?void 0:L.legend},axisLeft:null,layers:[E,...m,...T?[w]:[]],tooltip:R=>p.jsx(Un,{body:(s==null?void 0:s(R))||p.jsx("span",{children:"Tooltip"})}),markers:[{axis:"x",value:0,lineStyle:{stroke:"#000000",strokeWidth:1}}]})})},O=$.useRef(null),[k,A]=$.useState(0);$.useEffect(()=>{const V=new ResizeObserver(T=>{for(let L of T)A(L.contentRect.width)});return O.current&&V.observe(O.current),()=>V.disconnect()},[]);const j=e.slice().reverse();return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:8,style:{width:"100%"},ref:O,children:[p.jsx(H,{data:e,keys:o}),p.jsxs(ho,{gutter:[0,0],children:[p.jsx(br,{span:b,children:p.jsx(_,{value:o[0],labels:!0})}),p.jsx(br,{span:y,children:p.jsx(_,{value:o[1]})})]})]})]})},Z6e=({x1:e,x2:t,y1:n,y2:r})=>p.jsx("g",{children:p.jsx("line",{x1:e,y1:n,x2:t,y2:r,stroke:"#152BEE",strokeWidth:"3"})}),U6e=12,Z_=14,q6e=Ct.tspan`
618
621
  font: var(--gf-label-md-default);
619
622
  color: var(--gf-color-text-secondary);
620
623
  font-size: ${U6e}px;
621
624
  line-height: ${Z_}px;
622
- `,G6e=yt.span`
625
+ `,G6e=Ct.span`
623
626
  font: var(--gf-label-md-default);
624
627
  color: var(--gf-color-text-secondary);
625
628
  font-size: 10px;
626
629
  line-height: ${Z_}px;
627
- `,Y6e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},K6e=({data:e,height:t=500,padding:n=.2,keys:r=[],indexBy:i="year",margin:o={},axisBottom:a={},axisLeft:s={},color:l={},tooltip:c=null,label:u=null})=>{const d=e==null?void 0:e.line,f=d==null?void 0:d.x1,h=d==null?void 0:d.y1,m=d==null?void 0:d.x2,g=d==null?void 0:d.y2,v=Math.max(h,g),b=({bar:S})=>{const M=(u==null?void 0:u(S.data))||p.jsx(p.Fragment,{}),E=Y6e(M,10),H=E.width,_=E.fontBoundingBoxAscent+E.fontBoundingBoxDescent;if(_>=S.height)return p.jsx(p.Fragment,{});const O=S.x+S.width/2-H/2,k=S.y+S.height/2+_/2;return p.jsx("g",{transform:`translate(${O}, ${k})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:p.jsx(q6e,{style:{fontSize:10},children:M})})})},y=({bars:S})=>S.map((w,M)=>p.jsx(b,{bar:w},`bar-inner-label-${M}`)),x=({data:S,keys:w})=>{const M=w==null?void 0:w.map(E=>({name:E,color:l[E]}));return p.jsx(Ct,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:M.map((E,H)=>p.jsxs(Ct,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:E.color}}),p.jsx(G6e,{children:E.name})]},`legend-${H}`))})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{height:t},children:p.jsx($l,{data:e==null?void 0:e.data,keys:r,indexBy:i,colors:({id:S,data:w})=>l[S]||"orange",enableLabel:!1,yScale:{type:"linear",min:0,max:v,reverse:!1},margin:{left:50,bottom:50,top:10,right:50,...o},padding:n,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,...a},axisLeft:{tickSize:5,legendPosition:"middle",legendOffset:-40,...s},layers:["grid","axes","bars",y,S=>p.jsx(Z6e,{x1:S.xScale(f),y1:S.yScale(h),x2:S.xScale(m)+S.xScale.bandwidth(),y2:S.yScale(g)})],tooltip:S=>p.jsx(Un,{body:(c==null?void 0:c(S))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(x,{data:e,keys:r})]})]})},Dp={goodsRenewable:"#36CFC9",goodsNotRenewable:"#BDE7E3",goodsMixed:"#00474F",wasteRenewable:"#FFA940",wasteNotRenewable:"#EEDBBB",wasteMixed:"#873800"},N2={goodsRenewable:"Goederen - Hernieuwbare materialen",goodsNotRenewable:"Goederen - Niet-hernieuwbare materialen",goodsMixed:"Goederen - Gemengde materialen",wasteRenewable:"Afval - Hernieuwbare materialen",wasteNotRenewable:"Afval - Niet-hernieuwbare materialen",wasteMixed:"Afval - Gemengde materialen"},X6e=({data:e,height:t=400,colorMap:n=Dp,margin:r={},padding:i=.3,innerPadding:o=4,tooltip:a=null,axisBottom:s={},axisLeft:l={}})=>{const c=d=>d.bars.map((f,h)=>{const m=f.data.id,g=f.data.data,v=m==null?void 0:m.replace("Total",""),b=g==null?void 0:g[`${v}Total`],y=(g==null?void 0:g[`${v}Renewable`])||0,x=(g==null?void 0:g[`${v}NotRenewable`])||0,S=(g==null?void 0:g[`${v}Mixed`])||0,w=b?f.height*y/b:0,M=b?f.height*x/b:0,E=b?f.height*S/b:0;return p.jsxs("g",{children:[p.jsx("rect",{x:f.x,y:f.y+M+E,width:f.width,height:w,fill:n[`${v}Renewable`]}),p.jsx("rect",{x:f.x,y:f.y+E,width:f.width,height:M,fill:n[`${v}NotRenewable`]}),p.jsx("rect",{x:f.x,y:f.y,width:f.width,height:E,fill:n[`${v}Mixed`]})]},h)}),u=()=>p.jsx(Ct,{justify:"center",gap:16,wrap:!0,children:Object.entries(Dp).map(([d,f],h)=>p.jsxs(Ct,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:16,background:f}}),p.jsx("span",{style:{fontSize:12},children:N2==null?void 0:N2[d]})]},h))});return console.log(e),p.jsxs(Ct,{vertical:!0,gap:8,children:[p.jsx("div",{style:{position:"relative",height:t,width:"100%",overflow:"visible"},children:p.jsx($l,{data:e,keys:["goodsTotal","wasteTotal"],indexBy:"year",groupMode:"grouped",padding:i,innerPadding:o,enableLabel:!1,colors:d=>"rgba(0, 0, 0, 0)",margin:{top:50,right:0,bottom:50,left:60,...r},axisLeft:{legend:"Gewicht (Mt)",legendPosition:"middle",legendOffset:-40,...l},axisBottom:{legend:"Jaar",legendPosition:"middle",legendOffset:40,...s},layers:["axes","grid",c,"bars"],tooltip:d=>p.jsx(Un,{body:(a==null?void 0:a(d))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(u,{})]})},Q6e=yt.span`
630
+ `,Y6e=(e,t=12)=>{const r=document.createElement("canvas").getContext("2d");return r.font=`${t}px Roboto, sans-serif`,r.measureText(e)},K6e=({data:e,height:t=500,padding:n=.2,keys:r=[],indexBy:i="year",margin:o={},axisBottom:a={},axisLeft:s={},color:l={},tooltip:c=null,label:u=null})=>{const d=e==null?void 0:e.line,f=d==null?void 0:d.x1,h=d==null?void 0:d.y1,m=d==null?void 0:d.x2,g=d==null?void 0:d.y2,v=Math.max(h,g),b=({bar:S})=>{const M=(u==null?void 0:u(S.data))||p.jsx(p.Fragment,{}),E=Y6e(M,10),H=E.width,_=E.fontBoundingBoxAscent+E.fontBoundingBoxDescent;if(_>=S.height)return p.jsx(p.Fragment,{});const O=S.x+S.width/2-H/2,k=S.y+S.height/2+_/2;return p.jsx("g",{transform:`translate(${O}, ${k})`,children:p.jsx("text",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignmentBaseline:"middle"},children:p.jsx(q6e,{style:{fontSize:10},children:M})})})},y=({bars:S})=>S.map((w,M)=>p.jsx(b,{bar:w},`bar-inner-label-${M}`)),x=({data:S,keys:w})=>{const M=w==null?void 0:w.map(E=>({name:E,color:l[E]}));return p.jsx(yt,{gap:16,className:"gf-full",justify:"center",wrap:!0,children:M.map((E,H)=>p.jsxs(yt,{gap:8,align:"center",children:[p.jsx("div",{style:{minWidth:16,minHeight:16,backgroundColor:E.color}}),p.jsx(G6e,{children:E.name})]},`legend-${H}`))})};return p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{vertical:!0,gap:8,style:{width:"100%"},children:[p.jsx("div",{style:{height:t},children:p.jsx($l,{data:e==null?void 0:e.data,keys:r,indexBy:i,colors:({id:S,data:w})=>l[S]||"orange",enableLabel:!1,yScale:{type:"linear",min:0,max:v,reverse:!1},margin:{left:50,bottom:50,top:10,right:50,...o},padding:n,axisBottom:{tickSize:5,legendPosition:"middle",legendOffset:40,...a},axisLeft:{tickSize:5,legendPosition:"middle",legendOffset:-40,...s},layers:["grid","axes","bars",y,S=>p.jsx(Z6e,{x1:S.xScale(f),y1:S.yScale(h),x2:S.xScale(m)+S.xScale.bandwidth(),y2:S.yScale(g)})],tooltip:S=>p.jsx(Un,{body:(c==null?void 0:c(S))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(x,{data:e,keys:r})]})]})},Dp={goodsRenewable:"#36CFC9",goodsNotRenewable:"#BDE7E3",goodsMixed:"#00474F",wasteRenewable:"#FFA940",wasteNotRenewable:"#EEDBBB",wasteMixed:"#873800"},N2={goodsRenewable:"Goederen - Hernieuwbare materialen",goodsNotRenewable:"Goederen - Niet-hernieuwbare materialen",goodsMixed:"Goederen - Gemengde materialen",wasteRenewable:"Afval - Hernieuwbare materialen",wasteNotRenewable:"Afval - Niet-hernieuwbare materialen",wasteMixed:"Afval - Gemengde materialen"},X6e=({data:e,height:t=400,colorMap:n=Dp,margin:r={},padding:i=.3,innerPadding:o=4,tooltip:a=null,axisBottom:s={},axisLeft:l={}})=>{const c=d=>d.bars.map((f,h)=>{const m=f.data.id,g=f.data.data,v=m==null?void 0:m.replace("Total",""),b=g==null?void 0:g[`${v}Total`],y=(g==null?void 0:g[`${v}Renewable`])||0,x=(g==null?void 0:g[`${v}NotRenewable`])||0,S=(g==null?void 0:g[`${v}Mixed`])||0,w=b?f.height*y/b:0,M=b?f.height*x/b:0,E=b?f.height*S/b:0;return p.jsxs("g",{children:[p.jsx("rect",{x:f.x,y:f.y+M+E,width:f.width,height:w,fill:n[`${v}Renewable`]}),p.jsx("rect",{x:f.x,y:f.y+E,width:f.width,height:M,fill:n[`${v}NotRenewable`]}),p.jsx("rect",{x:f.x,y:f.y,width:f.width,height:E,fill:n[`${v}Mixed`]})]},h)}),u=()=>p.jsx(yt,{justify:"center",gap:16,wrap:!0,children:Object.entries(Dp).map(([d,f],h)=>p.jsxs(yt,{align:"center",gap:8,children:[p.jsx("div",{style:{width:16,height:16,background:f}}),p.jsx("span",{style:{fontSize:12},children:N2==null?void 0:N2[d]})]},h))});return console.log(e),p.jsxs(yt,{vertical:!0,gap:8,children:[p.jsx("div",{style:{position:"relative",height:t,width:"100%",overflow:"visible"},children:p.jsx($l,{data:e,keys:["goodsTotal","wasteTotal"],indexBy:"year",groupMode:"grouped",padding:i,innerPadding:o,enableLabel:!1,colors:d=>"rgba(0, 0, 0, 0)",margin:{top:50,right:0,bottom:50,left:60,...r},axisLeft:{legend:"Gewicht (Mt)",legendPosition:"middle",legendOffset:-40,...l},axisBottom:{legend:"Jaar",legendPosition:"middle",legendOffset:40,...s},layers:["axes","grid",c,"bars"],tooltip:d=>p.jsx(Un,{body:(a==null?void 0:a(d))||p.jsx("span",{children:"Tooltip"})})})}),p.jsx(u,{})]})},Q6e=Ct.span`
628
631
  font: var(--gf-label-md-default);
629
632
  font-size: 14px;
630
633
  line-height: 22px;
631
634
  font-weight: 400;
632
635
  color: var(--gf-color-button-primary);
633
636
  transition: color 150ms ease, font-weight 150ms ease;
634
- `,J6e=({items:e,width:t=226,offset:n=0,rootMargin:r=80,containerStyle:i={}})=>{const[o,a]=$.useState(0),s=$.useRef(0);$.useEffect(()=>{s.current=o},[o]);const l=$.useRef(!1),c=$.useRef(null),u=f=>{l.current=!0,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},f)},d=f=>{var g,v;a(f),u(800);const h=(v=(g=e==null?void 0:e[f])==null?void 0:g.href)==null?void 0:v.current;if(!h)return;const m=h.getBoundingClientRect().top+window.pageYOffset-n;window.scrollTo({top:m,behavior:"smooth"})};return $.useEffect(()=>{const f=(e||[]).map((g,v)=>{var b;return{key:v,el:(b=g.href)==null?void 0:b.current}}).filter(g=>g.el);if(!f.length)return;const h=new Map,m=new IntersectionObserver(g=>{if(l.current)return;for(const y of g)h.set(y.target,{is:y.isIntersecting,top:y.boundingClientRect.top,ratio:y.intersectionRatio});const v=[];for(const{key:y,el:x}of f){const S=h.get(x);S!=null&&S.is&&v.push({key:y,el:x,...S})}if(!v.length)return;const b=v.sort((y,x)=>Math.abs(y.top-n)-Math.abs(x.top-n)||x.ratio-y.ratio)[0];b&&b.key!==s.current&&a(b.key)},{root:null,threshold:[0,.01,.1,.2],rootMargin:`-${n}px 0px -${r}% 0px`});return f.forEach(({el:g})=>m.observe(g)),()=>{m.disconnect(),c.current&&clearTimeout(c.current)}},[e,n,r]),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(Ct,{align:"stretch",children:[p.jsxs(Ct,{gap:8,vertical:!0,align:"flex-start",style:{width:t,height:"fit-content",paddingTop:48,top:n,position:"sticky",paddingRight:8,...i},children:[p.jsx("span",{style:{fontSize:12},children:"Inhoudsopgave".toUpperCase()}),e==null?void 0:e.map((f,h)=>{const m=h===o;return p.jsx("div",{onClick:()=>d(h),style:{width:"100%",boxSizing:"border-box",padding:8,cursor:"pointer",background:m?"#F0F6FF":"transparent",transition:"background 150ms ease"},children:p.jsx(Q6e,{children:f==null?void 0:f.name})},h)})]}),p.jsx("div",{style:{borderRight:"1px solid #DAE1ED"}})]})]})},e7e=({success:e})=>p.jsxs(Ct,{gap:8,justify:"center",align:"center",style:{padding:"4px 16px 4px 12px",borderRadius:24,border:"1px solid",borderColor:e?"#B7EB8F":"#FFE58F",background:e?"#F6FFED":"#FFFBE6",color:e?"#389E0D":"#AD6800",textAlign:"center",fontSize:14,fontWeight:400,lineHeight:"22px"},children:[e&&p.jsx(vy,{}),e?"2035 doel behaald":"2035 doel nog niet behaald"]}),t7e=({color:e,name:t})=>p.jsx(p.Fragment,{children:t.toLowerCase()!=="reduction"?p.jsxs(Ct,{gap:4,align:"center",children:[p.jsx("div",{style:{minWidth:7,minHeight:7,borderRadius:3.5,background:e}}),p.jsx("span",{style:{color:"#667085",fontSize:12,fontWeight:400,lineHeight:"14px"},children:t})]}):null}),n7e=({legend:e})=>p.jsx(Ct,{gap:8,justify:"center",wrap:!0,children:e.map((t,n)=>p.jsx(t7e,{color:t==null?void 0:t.color,name:t==null?void 0:t.name},n))}),r7e=({title:e,subtitle:t,legend:n,success:r})=>p.jsxs(Ct,{vertical:!0,gap:16,style:{flexGrow:1,padding:16,boxSizing:"border-box",width:"100%"},children:[p.jsxs(Ct,{gap:8,vertical:!0,children:[p.jsxs(Ct,{gap:8,justify:"space-between",children:[p.jsx("span",{style:{color:"#1D2939",textAlign:"center",fontSize:16,fontWeight:500,lineHeight:"24px"},children:e}),p.jsx(e7e,{success:r})]}),p.jsx("span",{style:{color:"#475467",fontSize:14,fontWeight:400,lineHeight:"22px"},children:t})]}),p.jsx(n7e,{legend:n})]});function zp({color:e="white",transform:t="",style:n,className:r,showVerticalLine:i=!1}){return p.jsxs("span",{className:r,style:{display:"inline-flex",alignItems:"stretch",width:"100%",height:8,overflow:"visible",transform:t,...n},children:[i&&p.jsx("svg",{viewBox:"0 0 1 8",preserveAspectRatio:"none",style:{width:1,height:8,flex:"0 0 1px"},children:p.jsx("rect",{x:"0",y:"0",width:"1",height:"8",fill:e})}),p.jsx("svg",{viewBox:"0 0 1 8",preserveAspectRatio:"none",style:{flex:1,height:8},children:p.jsx("rect",{x:"0",y:"3.5",width:"1",height:"1",fill:e})}),p.jsx("svg",{viewBox:"0 0 4 8",preserveAspectRatio:"xMinYMid meet",style:{width:4,height:8,flex:"0 0 4px",marginLeft:-3},children:p.jsx("path",{d:"M0 1 L3 4 L0 7",fill:"none",stroke:e,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})})]})}const i7e=({title:e,data:t,legend:n,curr:r,bold:i})=>{const o=(t==null?void 0:t.unit)==="%";return p.jsxs(Ct,{justify:"space-between",align:"center",children:[p.jsx("span",{style:{color:"#475467",textAlign:"center",fontSize:14,fontWeight:i?700:400,lineHeight:"22px"},children:e}),p.jsx(Ct,{gap:8,children:n.map((a,s)=>{var d,f;const l=(d=t==null?void 0:t.value)==null?void 0:d[a==null?void 0:a.key],c=t==null?void 0:t.unit,u=Math.round(l/((f=t==null?void 0:t.value)==null?void 0:f.total)*100);return p.jsx(Ct,{gap:4,align:"center",children:!(a!=null&&a.hide)&&!((a==null?void 0:a.key)==="reduction"&&(a!=null&&a.lower)&&!r)&&!((a==null?void 0:a.key)==="reduction"&&u===0)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{minWidth:7,minHeight:7,borderRadius:3.5,background:a==null?void 0:a.color}}),p.jsx("span",{style:{color:"#667085",fontSize:12,fontWeight:400,lineHeight:"14px"},children:(a==null?void 0:a.key)==="reduction"?u>0?`↓${u}%`:null:a!=null&&a.lower&&!r?"↓totaal omlaag":`${o&&!r?"Minstens ":""}${l}${c}`})]})},s)})})]})},o7e=({data:e,curr:t,legend:n})=>{var a;const r=(e==null?void 0:e.unit)==="%",i=(a=n==null?void 0:n.filter(s=>s.key!=="reduction"))==null?void 0:a.length,o=8;return p.jsx(Ct,{children:n==null?void 0:n.map((s,l)=>{var f;const c=((f=e==null?void 0:e.value)==null?void 0:f[s==null?void 0:s.key])/100*100,u=(s==null?void 0:s.arrow)&&!t&&c>o,d=o/c*100;return p.jsxs($.Fragment,{children:[(s==null?void 0:s.key)!=="reduction"&&p.jsx("div",{style:{width:`${c}%`,height:16,position:"relative",borderRadius:i===1?12:l===0?"12px 0 0 12px":l===i-1?"0 12px 12px 0":0,borderRight:i!==1&&l<i-1?"1px solid #FFF":"none",background:r&&!t&&!(s!=null&&s.hide)?`repeating-linear-gradient(
637
+ `,J6e=({items:e,width:t=226,offset:n=0,rootMargin:r=80,containerStyle:i={}})=>{const[o,a]=$.useState(0),s=$.useRef(0);$.useEffect(()=>{s.current=o},[o]);const l=$.useRef(!1),c=$.useRef(null),u=f=>{l.current=!0,c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{l.current=!1},f)},d=f=>{var g,v;a(f),u(800);const h=(v=(g=e==null?void 0:e[f])==null?void 0:g.href)==null?void 0:v.current;if(!h)return;const m=h.getBoundingClientRect().top+window.pageYOffset-n;window.scrollTo({top:m,behavior:"smooth"})};return $.useEffect(()=>{const f=(e||[]).map((g,v)=>{var b;return{key:v,el:(b=g.href)==null?void 0:b.current}}).filter(g=>g.el);if(!f.length)return;const h=new Map,m=new IntersectionObserver(g=>{if(l.current)return;for(const y of g)h.set(y.target,{is:y.isIntersecting,top:y.boundingClientRect.top,ratio:y.intersectionRatio});const v=[];for(const{key:y,el:x}of f){const S=h.get(x);S!=null&&S.is&&v.push({key:y,el:x,...S})}if(!v.length)return;const b=v.sort((y,x)=>Math.abs(y.top-n)-Math.abs(x.top-n)||x.ratio-y.ratio)[0];b&&b.key!==s.current&&a(b.key)},{root:null,threshold:[0,.01,.1,.2],rootMargin:`-${n}px 0px -${r}% 0px`});return f.forEach(({el:g})=>m.observe(g)),()=>{m.disconnect(),c.current&&clearTimeout(c.current)}},[e,n,r]),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsxs(yt,{align:"stretch",children:[p.jsxs(yt,{gap:8,vertical:!0,align:"flex-start",style:{width:t,height:"fit-content",paddingTop:48,top:n,position:"sticky",paddingRight:8,...i},children:[p.jsx("span",{style:{fontSize:12},children:"Inhoudsopgave".toUpperCase()}),e==null?void 0:e.map((f,h)=>{const m=h===o;return p.jsx("div",{onClick:()=>d(h),style:{width:"100%",boxSizing:"border-box",padding:8,cursor:"pointer",background:m?"#F0F6FF":"transparent",transition:"background 150ms ease"},children:p.jsx(Q6e,{children:f==null?void 0:f.name})},h)})]}),p.jsx("div",{style:{borderRight:"1px solid #DAE1ED"}})]})]})},e7e=({success:e})=>p.jsxs(yt,{gap:8,justify:"center",align:"center",style:{padding:"4px 16px 4px 12px",borderRadius:24,border:"1px solid",borderColor:e?"#B7EB8F":"#FFE58F",background:e?"#F6FFED":"#FFFBE6",color:e?"#389E0D":"#AD6800",textAlign:"center",fontSize:14,fontWeight:400,lineHeight:"22px"},children:[e&&p.jsx(vy,{}),e?"2035 doel behaald":"2035 doel nog niet behaald"]}),t7e=({color:e,name:t})=>p.jsx(p.Fragment,{children:t.toLowerCase()!=="reduction"?p.jsxs(yt,{gap:4,align:"center",children:[p.jsx("div",{style:{minWidth:7,minHeight:7,borderRadius:3.5,background:e}}),p.jsx("span",{style:{color:"#667085",fontSize:12,fontWeight:400,lineHeight:"14px"},children:t})]}):null}),n7e=({legend:e})=>p.jsx(yt,{gap:8,justify:"center",wrap:!0,children:e.map((t,n)=>p.jsx(t7e,{color:t==null?void 0:t.color,name:t==null?void 0:t.name},n))}),r7e=({title:e,subtitle:t,legend:n,success:r})=>p.jsxs(yt,{vertical:!0,gap:16,style:{flexGrow:1,padding:16,boxSizing:"border-box",width:"100%"},children:[p.jsxs(yt,{gap:8,vertical:!0,children:[p.jsxs(yt,{gap:8,justify:"space-between",children:[p.jsx("span",{style:{color:"#1D2939",textAlign:"center",fontSize:16,fontWeight:500,lineHeight:"24px"},children:e}),p.jsx(e7e,{success:r})]}),p.jsx("span",{style:{color:"#475467",fontSize:14,fontWeight:400,lineHeight:"22px"},children:t})]}),p.jsx(n7e,{legend:n})]});function zp({color:e="white",transform:t="",style:n,className:r,showVerticalLine:i=!1}){return p.jsxs("span",{className:r,style:{display:"inline-flex",alignItems:"stretch",width:"100%",height:8,overflow:"visible",transform:t,...n},children:[i&&p.jsx("svg",{viewBox:"0 0 1 8",preserveAspectRatio:"none",style:{width:1,height:8,flex:"0 0 1px"},children:p.jsx("rect",{x:"0",y:"0",width:"1",height:"8",fill:e})}),p.jsx("svg",{viewBox:"0 0 1 8",preserveAspectRatio:"none",style:{flex:1,height:8},children:p.jsx("rect",{x:"0",y:"3.5",width:"1",height:"1",fill:e})}),p.jsx("svg",{viewBox:"0 0 4 8",preserveAspectRatio:"xMinYMid meet",style:{width:4,height:8,flex:"0 0 4px",marginLeft:-3},children:p.jsx("path",{d:"M0 1 L3 4 L0 7",fill:"none",stroke:e,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})})]})}const i7e=({title:e,data:t,legend:n,curr:r,bold:i})=>{const o=(t==null?void 0:t.unit)==="%";return p.jsxs(yt,{justify:"space-between",align:"center",children:[p.jsx("span",{style:{color:"#475467",textAlign:"center",fontSize:14,fontWeight:i?700:400,lineHeight:"22px"},children:e}),p.jsx(yt,{gap:8,children:n.map((a,s)=>{var d,f;const l=(d=t==null?void 0:t.value)==null?void 0:d[a==null?void 0:a.key],c=t==null?void 0:t.unit,u=Math.round(l/((f=t==null?void 0:t.value)==null?void 0:f.total)*100);return p.jsx(yt,{gap:4,align:"center",children:!(a!=null&&a.hide)&&!((a==null?void 0:a.key)==="reduction"&&(a!=null&&a.lower)&&!r)&&!((a==null?void 0:a.key)==="reduction"&&u===0)&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{minWidth:7,minHeight:7,borderRadius:3.5,background:a==null?void 0:a.color}}),p.jsx("span",{style:{color:"#667085",fontSize:12,fontWeight:400,lineHeight:"14px"},children:(a==null?void 0:a.key)==="reduction"?u>0?`↓${u}%`:null:a!=null&&a.lower&&!r?"↓totaal omlaag":`${o&&!r?"Minstens ":""}${l}${c}`})]})},s)})})]})},o7e=({data:e,curr:t,legend:n})=>{var a;const r=(e==null?void 0:e.unit)==="%",i=(a=n==null?void 0:n.filter(s=>s.key!=="reduction"))==null?void 0:a.length,o=8;return p.jsx(yt,{children:n==null?void 0:n.map((s,l)=>{var f;const c=((f=e==null?void 0:e.value)==null?void 0:f[s==null?void 0:s.key])/100*100,u=(s==null?void 0:s.arrow)&&!t&&c>o,d=o/c*100;return p.jsxs($.Fragment,{children:[(s==null?void 0:s.key)!=="reduction"&&p.jsx("div",{style:{width:`${c}%`,height:16,position:"relative",borderRadius:i===1?12:l===0?"12px 0 0 12px":l===i-1?"0 12px 12px 0":0,borderRight:i!==1&&l<i-1?"1px solid #FFF":"none",background:r&&!t&&!(s!=null&&s.hide)?`repeating-linear-gradient(
635
638
  -60deg,
636
639
  rgba(255,255,255,0.1) 0px,
637
640
  rgba(255,255,255,0.1) 1px,
638
641
  transparent 1px,
639
642
  transparent 3px
640
- ), ${s==null?void 0:s.color}`:s==null?void 0:s.color},children:u&&p.jsx(Ct,{align:"center",style:{width:`${d}%`,height:"100%"},children:p.jsx(zp,{})})}),(s==null?void 0:s.key)==="reduction"&&c>0&&p.jsx(Ct,{align:"center",style:{width:`${c}%`,height:"100%"},children:p.jsx(zp,{color:"#98A2B3",rotate:180,transform:"rotate(180deg)",showVerticalLine:!0})})]},l)})})},Bp=({title:e="",data:t,legend:n,curr:r=!1,bold:i=!1})=>p.jsxs(Ct,{gap:4,vertical:!0,children:[p.jsx(i7e,{title:e,data:t,curr:r,bold:i,legend:n}),p.jsx(o7e,{data:t,legend:n,curr:r})]}),Wp=({data:e,legend:t,curr:n=!1,year:r=2023})=>p.jsxs(Ct,{gap:16,vertical:!0,style:{width:"100%",boxSizing:"border-box",padding:16,background:n?"#FFFFFF":"#F2F4F7"},children:[p.jsx(Bp,{title:n?"Begintpunt (2016)":"Doel (2030)",data:{value:e==null?void 0:e.begin,unit:e==null?void 0:e.unit},legend:t,curr:n}),p.jsx(Bp,{title:n?`Huidig (${r})`:"Doel (2035)",data:{value:e==null?void 0:e.curr,unit:e==null?void 0:e.unit},bold:n,curr:n,legend:t})]}),Kr={vervangen:{title:"Vervangen",subtitle:"Aandeel hernieuwbare en secundaire grondstoffen verhogen naar minimaal 55% (gebaseerd op DMI).",check:[(e,t)=>{var n;return((n=e==null?void 0:e.curr)==null?void 0:n.renew)>=55}],goals:{begin:{renew:50,other:50},curr:{renew:55,other:45},unit:"%"},legend:[{key:"renew",name:"Hernieuwbare & secundaire grondstoffen",color:"#86AA49"},{key:"other",name:"Overige grondstoffen",color:"#D0D5DD",hide:!0,arrow:!0}]},besparen:{title:"Besparen",subtitle:"Grondstoffengebruik verlagen met 15% ten op zichte van 2016 (gebaseerd op DMI).",check:[(e,t)=>{var i,o;const n=(i=e==null?void 0:e.curr)==null?void 0:i.raw,r=(o=e==null?void 0:e.begin)==null?void 0:o.raw;return(r-n)/r*100>=15}],legend:[{key:"raw",name:"Grondstoffengebruik",color:"#7BC6CE"},{key:"reduction",name:"Reduction",color:"#D0D5DD"}]},behouden_hoeveelheid:{title:"Behouden (Hoeveelheid)",subtitle:"De totale hoeveelheid afval verlagen ten op zichte van 2016.",check:[(e,t)=>{var i,o;const n=(i=e==null?void 0:e.curr)==null?void 0:i.raw,r=(o=e==null?void 0:e.begin)==null?void 0:o.raw;return n<r}],lower:!0,legend:[{key:"raw",name:"Totale hoeveelheid afval",color:"#809399"},{key:"reduction",name:"Reduction",color:"#D0D5DD"}]},behouden_verwerking:{title:"Behouden (Verwerking)",subtitle:"Percentage gerecycled afval verhogen naar minimaal 82% waarvan minimaal 15% hoogwaardige recycling.",check:[(e,t)=>{var r,i;return((r=e==null?void 0:e.curr)==null?void 0:r.high)+((i=e==null?void 0:e.curr)==null?void 0:i.other)>=82},(e,t)=>{var n;return((n=e==null?void 0:e.curr)==null?void 0:n.high)>=15}],goals:{begin:{high:11,other:69,low:20},curr:{high:15,other:67,low:18},unit:"%"},legend:[{key:"high",name:"Hoogwaardige recycling",color:"#226123"},{key:"other",name:"Overige recycling",color:"#84B08D"},{key:"low",name:"Verbranden/Storten",color:"#D0D5DD"}]}},a7e=()=>p.jsx("div",{style:{height:1,width:"100%",background:"#DAE1ED"}}),s7e=({children:e})=>{const t=e==null?void 0:e.length;return p.jsx(Ct,{vertical:!0,align:"center",style:{height:"100%",borderRadius:8,border:"1px solid #DAE1ED",overflow:"hidden"},children:e.map((n,r)=>p.jsxs($.Fragment,{children:[n,r<t-1?p.jsx(a7e,{}):p.jsx(p.Fragment,{})]},r))})};function l7e(e,t,n=[]){return n.every(r=>typeof r=="function"&&r(e,t))}const c7e=({data:e,year:t})=>(Object.keys(Kr).forEach(n=>{var a,s,l;Kr[n].goals=((a=e[n])==null?void 0:a.goals)||Kr[n].goals,Kr[n].legend=Kr[n].legend.map(c=>{var u;return{...c,lower:(u=Kr[n])==null?void 0:u.lower}});const r=(s=Kr[n])==null?void 0:s.check;(l=Kr[n])==null||l.reduce;const i=e[n],o=Kr[n].goals;Kr[n].success=l7e(i,o,r)}),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(ho,{gutter:[16,16],children:Object.entries(Kr).map(([n,r],i)=>p.jsx(br,{span:12,children:p.jsxs(s7e,{children:[p.jsx(r7e,{title:r==null?void 0:r.title,subtitle:r==null?void 0:r.subtitle,legend:r==null?void 0:r.legend,success:r==null?void 0:r.success}),p.jsx(Wp,{year:t,data:e==null?void 0:e[n],curr:!0,legend:r==null?void 0:r.legend}),p.jsx(Wp,{year:t,data:r==null?void 0:r.goals,legend:r==null?void 0:r.legend})]})},i))})]}));exports.AddressLink=fD;exports.Anchor=J6e;exports.BarChart=Ahe;exports.BenchmarkSankey=K2e;exports.ButtonControls=ZF;exports.CrmValueChart=W6e;exports.CustomToolTip=Un;exports.Description=mD;exports.DomRawChart=Lhe;exports.DownloadButton=vx;exports.EmailLink=dD;exports.ExpandButton=mx;exports.GFButton=a4;exports.GFCard=du;exports.GFMetricsGrid=pD;exports.GoalChart=N6e;exports.ImpactTrend=K6e;exports.Link=Yd;exports.LocationIcon=$x;exports.MailIcon=Sx;exports.MaterialHeatmap=L6e;exports.Metrics=xx;exports.NPCE=c7e;exports.NavCard=YF;exports.PhoneIcon=wx;exports.PhoneLink=hD;exports.PieChart=Tle;exports.QuickNavCard=nD;exports.RenewableTrend=X6e;exports.Sankey=Yse;exports.ScatterPlot=Ede;exports.TabCard=rD;exports.Title=Cx;exports.TreeMap=x2e;exports.Trends=U2e;exports.VisSelectors=G2e;exports.WasteOverview=The;
643
+ ), ${s==null?void 0:s.color}`:s==null?void 0:s.color},children:u&&p.jsx(yt,{align:"center",style:{width:`${d}%`,height:"100%"},children:p.jsx(zp,{})})}),(s==null?void 0:s.key)==="reduction"&&c>0&&p.jsx(yt,{align:"center",style:{width:`${c}%`,height:"100%"},children:p.jsx(zp,{color:"#98A2B3",rotate:180,transform:"rotate(180deg)",showVerticalLine:!0})})]},l)})})},Bp=({title:e="",data:t,legend:n,curr:r=!1,bold:i=!1})=>p.jsxs(yt,{gap:4,vertical:!0,children:[p.jsx(i7e,{title:e,data:t,curr:r,bold:i,legend:n}),p.jsx(o7e,{data:t,legend:n,curr:r})]}),Wp=({data:e,legend:t,curr:n=!1,year:r=2023})=>p.jsxs(yt,{gap:16,vertical:!0,style:{width:"100%",boxSizing:"border-box",padding:16,background:n?"#FFFFFF":"#F2F4F7"},children:[p.jsx(Bp,{title:n?"Begintpunt (2016)":"Doel (2030)",data:{value:e==null?void 0:e.begin,unit:e==null?void 0:e.unit},legend:t,curr:n}),p.jsx(Bp,{title:n?`Huidig (${r})`:"Doel (2035)",data:{value:e==null?void 0:e.curr,unit:e==null?void 0:e.unit},bold:n,curr:n,legend:t})]}),Kr={vervangen:{title:"Vervangen",subtitle:"Aandeel hernieuwbare en secundaire grondstoffen verhogen naar minimaal 55% (gebaseerd op DMI).",check:[(e,t)=>{var n;return((n=e==null?void 0:e.curr)==null?void 0:n.renew)>=55}],goals:{begin:{renew:50,other:50},curr:{renew:55,other:45},unit:"%"},legend:[{key:"renew",name:"Hernieuwbare & secundaire grondstoffen",color:"#86AA49"},{key:"other",name:"Overige grondstoffen",color:"#D0D5DD",hide:!0,arrow:!0}]},besparen:{title:"Besparen",subtitle:"Grondstoffengebruik verlagen met 15% ten op zichte van 2016 (gebaseerd op DMI).",check:[(e,t)=>{var i,o;const n=(i=e==null?void 0:e.curr)==null?void 0:i.raw,r=(o=e==null?void 0:e.begin)==null?void 0:o.raw;return(r-n)/r*100>=15}],legend:[{key:"raw",name:"Grondstoffengebruik",color:"#7BC6CE"},{key:"reduction",name:"Reduction",color:"#D0D5DD"}]},behouden_hoeveelheid:{title:"Behouden (Hoeveelheid)",subtitle:"De totale hoeveelheid afval verlagen ten op zichte van 2016.",check:[(e,t)=>{var i,o;const n=(i=e==null?void 0:e.curr)==null?void 0:i.raw,r=(o=e==null?void 0:e.begin)==null?void 0:o.raw;return n<r}],lower:!0,legend:[{key:"raw",name:"Totale hoeveelheid afval",color:"#809399"},{key:"reduction",name:"Reduction",color:"#D0D5DD"}]},behouden_verwerking:{title:"Behouden (Verwerking)",subtitle:"Percentage gerecycled afval verhogen naar minimaal 82% waarvan minimaal 15% hoogwaardige recycling.",check:[(e,t)=>{var r,i;return((r=e==null?void 0:e.curr)==null?void 0:r.high)+((i=e==null?void 0:e.curr)==null?void 0:i.other)>=82},(e,t)=>{var n;return((n=e==null?void 0:e.curr)==null?void 0:n.high)>=15}],goals:{begin:{high:11,other:69,low:20},curr:{high:15,other:67,low:18},unit:"%"},legend:[{key:"high",name:"Hoogwaardige recycling",color:"#226123"},{key:"other",name:"Overige recycling",color:"#84B08D"},{key:"low",name:"Verbranden/Storten",color:"#D0D5DD"}]}},a7e=()=>p.jsx("div",{style:{height:1,width:"100%",background:"#DAE1ED"}}),s7e=({children:e})=>{const t=e==null?void 0:e.length;return p.jsx(yt,{vertical:!0,align:"center",style:{height:"100%",borderRadius:8,border:"1px solid #DAE1ED",overflow:"hidden"},children:e.map((n,r)=>p.jsxs($.Fragment,{children:[n,r<t-1?p.jsx(a7e,{}):p.jsx(p.Fragment,{})]},r))})};function l7e(e,t,n=[]){return n.every(r=>typeof r=="function"&&r(e,t))}const c7e=({data:e,year:t})=>(Object.keys(Kr).forEach(n=>{var a,s,l;Kr[n].goals=((a=e[n])==null?void 0:a.goals)||Kr[n].goals,Kr[n].legend=Kr[n].legend.map(c=>{var u;return{...c,lower:(u=Kr[n])==null?void 0:u.lower}});const r=(s=Kr[n])==null?void 0:s.check;(l=Kr[n])==null||l.reduce;const i=e[n],o=Kr[n].goals;Kr[n].success=l7e(i,o,r)}),p.jsxs(p.Fragment,{children:[p.jsx(fn,{}),p.jsx(ho,{gutter:[16,16],children:Object.entries(Kr).map(([n,r],i)=>p.jsx(br,{span:12,children:p.jsxs(s7e,{children:[p.jsx(r7e,{title:r==null?void 0:r.title,subtitle:r==null?void 0:r.subtitle,legend:r==null?void 0:r.legend,success:r==null?void 0:r.success}),p.jsx(Wp,{year:t,data:e==null?void 0:e[n],curr:!0,legend:r==null?void 0:r.legend}),p.jsx(Wp,{year:t,data:r==null?void 0:r.goals,legend:r==null?void 0:r.legend})]})},i))})]}));exports.AddressLink=fD;exports.Anchor=J6e;exports.BarChart=Ahe;exports.BenchmarkSankey=K2e;exports.ButtonControls=ZF;exports.CrmValueChart=W6e;exports.CustomToolTip=Un;exports.Description=mD;exports.DomRawChart=Lhe;exports.DownloadButton=vx;exports.EmailLink=dD;exports.ExpandButton=mx;exports.GFButton=a4;exports.GFCard=du;exports.GFMetricsGrid=pD;exports.GoalChart=N6e;exports.ImpactTrend=K6e;exports.Link=Yd;exports.LocationIcon=$x;exports.MailIcon=Sx;exports.MaterialHeatmap=L6e;exports.Metrics=xx;exports.NPCE=c7e;exports.NavCard=YF;exports.PhoneIcon=wx;exports.PhoneLink=hD;exports.PieChart=Tle;exports.QuickNavCard=nD;exports.RenewableTrend=X6e;exports.Sankey=Yse;exports.ScatterPlot=Ede;exports.TabCard=rD;exports.Title=Cx;exports.TreeMap=x2e;exports.Trends=U2e;exports.VisSelectors=G2e;exports.WasteOverview=The;
641
644
  //# sourceMappingURL=index.cjs.js.map