@airporting/tech-app 0.0.28 → 0.0.32
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/mf/1.js +1 -1
- package/dist/mf/119.js +1 -1
- package/dist/mf/182.js +1 -1
- package/dist/mf/364.js +2 -2
- package/dist/mf/380.js +1 -1
- package/dist/mf/429.js +33 -0
- package/dist/mf/{852.js → 439.js} +8954 -8399
- package/dist/mf/{852.js.LICENSE.txt → 439.js.LICENSE.txt} +1 -1
- package/dist/mf/541.js +1 -1
- package/dist/mf/548.js +1 -1
- package/dist/mf/622.js +1 -1
- package/dist/mf/659.js +1 -1
- package/dist/mf/724.js +1 -1
- package/dist/mf/80.js +1 -1
- package/dist/mf/880.js +1 -1
- package/dist/mf/@mf-types/compiled-types/App.d.ts +0 -1
- package/dist/mf/@mf-types/compiled-types/api/tech/sobank/exportsQuery.d.ts +2 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/synchro/jobsDefaultQuery.d.ts +1 -0
- package/dist/mf/@mf-types/compiled-types/api/tech/synchro/resetStatsQuery.d.ts +1 -1
- package/dist/mf/@mf-types/compiled-types/api/tech/synchro/tasks.d.ts +2 -1
- package/dist/mf/@mf-types/compiled-types/api/useApi.d.ts +1 -1
- package/dist/mf/@mf-types/compiled-types/gen/TechApi/index.d.ts +182 -10
- package/dist/mf/@mf-types/compiled-types/tabs/github.d.ts +2 -2
- package/dist/mf/@mf-types/compiled-types/tabs/sobank.d.ts +1 -1
- package/dist/mf/@mf-types/compiled-types/utils/date/formatDate.d.ts +1 -0
- package/dist/mf/@mf-types.zip +0 -0
- package/dist/mf/__federation_expose_amex.js +1 -1
- package/dist/mf/__federation_expose_bnpp.js +1 -1
- package/dist/mf/__federation_expose_credmut.js +1 -1
- package/dist/mf/__federation_expose_dashboard.js +10 -1
- package/dist/mf/__federation_expose_github.js +10 -1
- package/dist/mf/__federation_expose_github.js.LICENSE.txt +9 -0
- package/dist/mf/__federation_expose_payfit.js +1 -1
- package/dist/mf/__federation_expose_sobank.js +1 -1
- package/dist/mf/__federation_expose_spendesk.js +1 -1
- package/dist/mf/__federation_expose_spreadsheet.js +1 -1
- package/dist/mf/__federation_expose_synchro.js +1 -1
- package/dist/mf/__federation_expose_wise.js +1 -1
- package/dist/mf/index.js +4 -4
- package/dist/mf/mf-manifest.json +21 -16
- package/dist/mf/mf-stats.json +57 -30
- package/dist/mf/tech_app.js +3 -3
- package/package.json +35 -35
- package/dist/mf/6.js +0 -33
- package/dist/mf/980.js +0 -10
- /package/dist/mf/{6.js.LICENSE.txt → 429.js.LICENSE.txt} +0 -0
- /package/dist/mf/{980.js.LICENSE.txt → __federation_expose_dashboard.js.LICENSE.txt} +0 -0
package/dist/mf/119.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["119"],{2985:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{AreaChart:()=>AreaChart,BubbleChart:()=>BubbleChart,FunnelChart:()=>FunnelChart,RadialBarChart:()=>RadialBarChart,AreaGradient:()=>AreaGradient,CompositeChart:()=>CompositeChart,ChartTooltip:()=>ChartTooltip,DonutChart:()=>DonutChart,LineChart:()=>LineChart,RadarChart:()=>RadarChart,ChartLegend:()=>ChartLegend,Heatmap:()=>Heatmap,ScatterChart:()=>ScatterChart,PieChart:()=>PieChart,getSplitOffset:()=>getSplitOffset,getFilteredChartLegendPayload:()=>getFilteredChartLegendPayload,BarChart:()=>BarChart,Sparkline:()=>Sparkline,getFilteredChartTooltipPayload:()=>getFilteredChartTooltipPayload});var jsx_runtime=__webpack_require__(5893);var index_mjs_=__webpack_require__(207);"use client";function getSeriesLabels(series){if(!series)return{};return series.reduce((acc,item)=>{const matchFound=item.name.search(/\./);if(matchFound>=0){const key=item.name.substring(matchFound+1);acc[key]=item.label;return acc}acc[item.name]=item.label;return acc},{})}"use client";var classes={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};"use client";function updateChartTooltipPayload(payload){return payload.map(item=>{if(!item.payload||item.payload[item.name])return item;const matchFound=item.name.search(/\./);if(matchFound>=0){const newDataKey=item.name.substring(0,matchFound);const nestedPayload={...item.payload[newDataKey]};const shallowPayload=Object.entries(item.payload).reduce((acc,current)=>{const[k,v]=current;return k===newDataKey?acc:{...acc,[k]:v}},{});return{...item,name:item.name.substring(matchFound+1),payload:{...shallowPayload,...nestedPayload}}}return item})}function getFilteredChartTooltipPayload(payload,segmentId){const duplicatesFilter=updateChartTooltipPayload(payload.filter(item=>"none"!==item.fill||!item.color));if(!segmentId)return duplicatesFilter;return duplicatesFilter.filter(item=>item.name===segmentId)}function getData(item,type){if("radial"===type||"scatter"===type){if(Array.isArray(item.value))return item.value[1]-item.value[0];return item.value}if(Array.isArray(item.payload[item.dataKey]))return item.payload[item.dataKey][1]-item.payload[item.dataKey][0];return item.payload[item.name]}const defaultProps={type:"area",showColor:true};const ChartTooltip=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ChartTooltip",defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,payload,label,unit,type,segmentId,mod,series,valueFormatter,showColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"ChartTooltip",classes:classes,props,className,style,classNames,styles,unstyled,attributes});if(!payload)return null;const filteredPayload=getFilteredChartTooltipPayload(payload,segmentId);const scatterLabel="scatter"===type?payload[0]?.payload?.name:null;const labels=getSeriesLabels(series);const _label=label||scatterLabel;const items=filteredPayload.map(item=>/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{"data-type":type,...getStyles("tooltipItem"),children:[/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("tooltipItemBody"),children:[showColor&&/* @__PURE__ */(0,jsx_runtime.jsx)("svg",{...getStyles("tooltipItemColor"),children:/* @__PURE__ */(0,jsx_runtime.jsx)("circle",{r:6,fill:(0,index_mjs_.getThemeColor)(item.color,theme),width:12,height:12,cx:6,cy:6})}),/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipItemName"),children:labels[item.name]||item.name})]}),/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("tooltipItemData"),children:["function"==typeof valueFormatter?valueFormatter(getData(item,type)):getData(item,type),unit||item.unit]})]},item?.key??item.name));return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Box,{...getStyles("tooltip"),mod:[{type},mod],ref,...others,children:[_label&&/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipLabel"),children:_label}),/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipBody"),children:items})]})});ChartTooltip.displayName="@mantine/charts/ChartTooltip";"use client";var ChartLegend_module_css_classes={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};"use client";function updateChartLegendPayload(payload){return payload.map(item=>{const newDataKey=item.dataKey?.split(".").pop();return{...item,dataKey:newDataKey,payload:{...item.payload,name:newDataKey,dataKey:newDataKey}}})}function getFilteredChartLegendPayload(payload){return updateChartLegendPayload(payload.filter(item=>"none"!==item.color))}const ChartLegend=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ChartLegend",null,_props);const{classNames,className,style,styles,unstyled,vars,payload,onHighlight,legendPosition,mod,series,showColor,centered,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"ChartLegend",classes:ChartLegend_module_css_classes,props,className,style,classNames,styles,unstyled,attributes});if(!payload)return null;const filteredPayload=getFilteredChartLegendPayload(payload);const labels=getSeriesLabels(series);const items=filteredPayload.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("legendItem"),onMouseEnter:()=>onHighlight(item.dataKey),onMouseLeave:()=>onHighlight(null),"data-without-color":false===showColor||void 0,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.ColorSwatch,{color:item.color,size:12,...getStyles("legendItemColor"),withShadow:false}),/* @__PURE__ */(0,jsx_runtime.jsx)("p",{...getStyles("legendItemName"),children:labels[item.dataKey]||item.dataKey})]},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,mod:[{position:legendPosition,centered},mod],...getStyles("legend"),...others,children:items})});ChartLegend.displayName="@mantine/charts/ChartLegend";var index_js_=__webpack_require__(837);var es6_index_js_=__webpack_require__(8228);"use client";function PointLabel({x,y,value,valueFormatter}){return/* @__PURE__ */(0,jsx_runtime.jsx)("g",{transform:`translate(${x},${y})`,children:/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"top",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:valueFormatter?valueFormatter(value):value})})}"use client";function AreaGradient({color,id,withGradient,fillOpacity}){return/* @__PURE__ */(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:withGradient?/* @__PURE__ */(0,jsx_runtime.jsxs)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:[/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:"0%",stopColor:color,stopOpacity:fillOpacity}),/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:"100%",stopColor:color,stopOpacity:.01})]}):/* @__PURE__ */(0,jsx_runtime.jsx)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{stopColor:color,stopOpacity:fillOpacity??.2})})})}AreaGradient.displayName="@mantine/charts/AreaGradient";"use client";function AreaSplit({offset,id,colors,fillOpacity}){const theme=(0,index_mjs_.useMantineTheme)();return/* @__PURE__ */(0,jsx_runtime.jsxs)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:[/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset,stopColor:(0,index_mjs_.getThemeColor)(colors[0],theme),stopOpacity:fillOpacity??.2}),/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset,stopColor:(0,index_mjs_.getThemeColor)(colors[1],theme),stopOpacity:fillOpacity??.2})]})}AreaSplit.displayName="@mantine/charts/AreaSplit";"use client";function getSplitOffset({data,dataKey}){const dataMax=Math.max(...data.map(item=>item[dataKey]));const dataMin=Math.min(...data.map(item=>item[dataKey]));if(dataMax<=0)return 0;if(dataMin>=0)return 1;return dataMax/(dataMax-dataMin)}function getDefaultSplitOffset({data,series}){if(1===series.length){const dataKey=series[0].name;return getSplitOffset({data,dataKey})}return .5}"use client";var grid_chart_module_css_classes={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"};"use client";function valueToPercent(value){return`${(100*value).toFixed(0)}%`}const AreaChart_defaultProps={withXAxis:true,withYAxis:true,withDots:true,withTooltip:true,connectNulls:true,strokeWidth:2,tooltipAnimationDuration:0,fillOpacity:.2,tickLine:"y",strokeDasharray:"5 5",curveType:"monotone",gridAxis:"x",type:"default",splitColors:["green.7","red.7"],orientation:"horizontal"};const varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const AreaChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("AreaChart",AreaChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,series,withGradient,dataKey,withXAxis,withYAxis,curveType,gridProps,withDots,tickLine,strokeDasharray,gridAxis,unit,yAxisProps,xAxisProps,dotProps,activeDotProps,strokeWidth,tooltipAnimationDuration,type,legendProps,tooltipProps,withLegend,withTooltip,areaChartProps,fillOpacity,splitColors,splitOffset,connectNulls,onMouseLeave,orientation,referenceLines,dir,valueFormatter,children,areaProps,xAxisLabel,yAxisLabel,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,gridColor,textColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const baseId=(0,index_js_.useId)();const splitId=`${baseId}-split`;const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const isAnimationActive=(tooltipAnimationDuration||0)>0;const _withGradient="boolean"==typeof withGradient?withGradient:"default"===type;const stacked="stacked"===type||"percent"===type;const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"AreaChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver});const dotsAreas=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Area,{...getStyles("area"),activeDot:{fill:theme.white,stroke:color,strokeWidth:2,r:4,...activeDotProps},dot:{fill:color,fillOpacity:dimmed?0:1,strokeWidth:2,r:4,...dotProps},key:item.name,name:item.name,type:curveType,dataKey:item.name,fill:"none",strokeWidth,stroke:"none",isAnimationActive:false,connectNulls,stackId:stacked?"stack-dots":void 0,yAxisId:item.yAxisId||"left",..."function"==typeof areaProps?areaProps(item):areaProps})});const areas=series.map(item=>{const id=`${baseId}-${item.color.replace(/[^a-zA-Z0-9]/g,"")}`;const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_js_.Fragment,{children:[/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaGradient,{color,withGradient:_withGradient,id,fillOpacity})}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Area,{...getStyles("area"),activeDot:false,dot:false,name:item.name,type:curveType,dataKey:item.name,fill:"split"===type?`url(#${splitId})`:`url(#${id})`,strokeWidth,stroke:color,isAnimationActive:false,connectNulls,stackId:stacked?"stack":void 0,fillOpacity:dimmed?0:1,strokeOpacity:dimmed?.5:1,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof areaProps?areaProps(item):areaProps})]},item.name)});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const tickFormatter="percent"===type?valueToPercent:valueFormatter;const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:tickFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.AreaChart,{data,stackOffset:"percent"===type?"expand":void 0,layout:orientation,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...areaChartProps,children:[referenceLinesItems,withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?tickFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),"split"===type&&/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaSplit,{colors:splitColors,id:splitId,offset:splitOffset??getDefaultSplitOffset({data,series}),fillOpacity})}),areas,withDots&&dotsAreas,children]})})})});AreaChart.classes=grid_chart_module_css_classes;AreaChart.displayName="@mantine/charts/AreaChart";"use client";function BarChart_valueToPercent(value){return`${(100*value).toFixed(0)}%`}const BarChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",type:"default"};const BarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor,cursorFill,barLabelColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0,"--chart-cursor-fill":cursorFill?(0,index_mjs_.getThemeColor)(cursorFill,theme):void 0,"--chart-bar-label-color":barLabelColor?(0,index_mjs_.getThemeColor)(barLabelColor,theme):void 0}}));function calculateCumulativeTotal(waterfallData,dataKey){let start=0;let end=0;return waterfallData.map(item=>{if(item.standalone){for(const prop in item)if("number"==typeof item[prop]&&prop!==dataKey)item[prop]=[0,item[prop]]}else for(const prop in item)if("number"==typeof item[prop]&&prop!==dataKey){end+=item[prop];item[prop]=[start,end];start=end}return item})}function getBarFill(barProps,series){if("function"==typeof barProps)return barProps(series).fill;return barProps?.fill}const BarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("BarChart",BarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,fillOpacity,barChartProps,type,orientation,dir,valueFormatter,children,barProps,xAxisLabel,yAxisLabel,withBarValueLabel,valueLabelProps,withRightYAxis,rightYAxisLabel,rightYAxisProps,minBarSize,maxBarWidth,mod,getBarColor,gridColor,textColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const stacked="stacked"===type||"percent"===type;const tickFormatter="percent"===type?BarChart_valueToPercent:valueFormatter;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const inputData="waterfall"===type?calculateCumulativeTotal(data,dataKey):data;const getStyles=(0,index_mjs_.useStyles)({name:"BarChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:BarChart_varsResolver});const bars=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Bar,{...getStyles("bar"),key:item.name,name:item.name,dataKey:item.name,fill:color,stroke:color,isAnimationActive:false,fillOpacity:dimmed?.1:fillOpacity,strokeOpacity:dimmed?.2:0,stackId:stacked?"stack":item.stackId||void 0,yAxisId:item.yAxisId||"left",minPointSize:minBarSize,..."function"==typeof barProps?barProps(item):barProps},inputData.map((entry,index)=>{const cellColor=entry.color?(0,index_mjs_.getThemeColor)(entry.color,theme):"function"==typeof getBarColor?(0,index_mjs_.getThemeColor)(getBarColor(entry[item.name],item),theme):getBarFill(barProps,item)||color;return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:cellColor},`cell-${index}`)}),withBarValueLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:"vertical"===orientation?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:val=>tickFormatter?.(val),..."function"==typeof valueLabelProps?valueLabelProps(item):valueLabelProps}))});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:tickFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",mod:[{orientation},mod],...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.BarChart,{data:inputData,stackOffset:"percent"===type?"expand":void 0,layout:orientation,maxBarSize:maxBarWidth,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...barChartProps,children:[withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,showColor:"waterfall"!==type,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?tickFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray,fill:"var(--chart-cursor-fill)"},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,type:"waterfall"===type?"scatter":void 0,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),bars,referenceLinesItems,children]})})})});BarChart.displayName="@mantine/charts/BarChart";BarChart.classes=grid_chart_module_css_classes;var esm_index_mjs_=__webpack_require__(3863);"use client";const LineChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:true,connectNulls:true,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]};const LineChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const LineChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("LineChart",LineChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,withDots,dotProps,activeDotProps,strokeWidth,lineChartProps,connectNulls,fillOpacity,curveType,orientation,dir,valueFormatter,children,lineProps,xAxisLabel,yAxisLabel,type,gradientStops,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"LineChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:LineChart_varsResolver});const id=(0,esm_index_mjs_.useId)();const gradientId=`line-chart-gradient-${id}`;const stops=gradientStops?.map(stop=>/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:`${stop.offset}%`,stopColor:(0,index_mjs_.getThemeColor)(stop.color,theme)},stop.color));const lines=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Line,{...getStyles("line"),key:item.name,name:item.name,dataKey:item.name,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:"gradient"===type?"var(--mantine-color-gray-7)":color,stroke:"gradient"===type?"white":color,...dotProps}:false,activeDot:withDots?{fill:"gradient"===type?"var(--mantine-color-gray-7)":color,stroke:"gradient"===type?"white":color,...activeDotProps}:false,fill:color,stroke:"gradient"===type?`url(#${gradientId})`:color,strokeWidth,isAnimationActive:false,fillOpacity:dimmed?0:fillOpacity,strokeOpacity:dimmed?.5:fillOpacity,connectNulls,type:curveType,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof lineProps?lineProps(item):lineProps})});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:valueFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.LineChart,{data,layout:orientation,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...lineChartProps,children:["gradient"===type&&/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)("linearGradient",{id:gradientId,x1:"0",y1:"0",x2:"0",y2:"1",children:stops})}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,showColor:"gradient"!==type,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?valueFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,showColor:"gradient"!==type,attributes}),...tooltipProps}),lines,referenceLinesItems,children]})})})});LineChart.displayName="@mantine/charts/LineChart";LineChart.classes=grid_chart_module_css_classes;"use client";const Sparkline_classes={};const Sparkline_defaultProps={withGradient:true,connectNulls:true,fillOpacity:.6,strokeWidth:2,curveType:"linear"};function getTrendColor(data,trendColors){const first=data[0];const last=data[data.length-1];if(null===first||null===last)return trendColors.neutral||trendColors.positive;if(first<last)return trendColors.positive;if(first>last)return trendColors.negative;return trendColors.neutral||trendColors.positive}const Sparkline_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{color,data,trendColors})=>({root:{"--chart-color":trendColors?(0,index_mjs_.getThemeColor)(getTrendColor(data,trendColors),theme):color?(0,index_mjs_.getThemeColor)(color,theme):void 0}}));const Sparkline=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("Sparkline",Sparkline_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withGradient,fillOpacity,curveType,strokeWidth,trendColors,connectNulls,areaProps,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"Sparkline",classes:Sparkline_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:Sparkline_varsResolver});const id=(0,index_js_.useId)();const mappedData=(0,index_js_.useMemo)(()=>data.map((value,index)=>({value,index})),[data]);return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,dir:"ltr",children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.AreaChart,{data:mappedData,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Area,{dataKey:"value",type:curveType,fill:`url(#${id})`,stroke:"var(--chart-color, var(--mantine-color-blue-filled))",isAnimationActive:false,connectNulls,strokeWidth,fillOpacity:1,...areaProps}),/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaGradient,{id,color:"var(--chart-color, var(--mantine-color-blue-filled))",fillOpacity,withGradient})})]})})})});Sparkline.displayName="@mantine/charts/Sparkline";Sparkline.classes=Sparkline_classes;"use client";var DonutChart_module_css_classes={root:"m_a410e613",label:"m_ddb0bfe3"};"use client";const DonutChart_defaultProps={withTooltip:true,withLabelsLine:true,paddingAngle:0,thickness:20,size:160,strokeWidth:1,startAngle:0,endAngle:360,labelsType:"value",tooltipDataSource:"all"};const DonutChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,withLabels,size})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":withLabels?(0,index_mjs_.rem)(size+80):(0,index_mjs_.rem)(size)}}));const getLabelValue=(labelsType,value,percent,valueFormatter)=>{if("percent"===labelsType)return`${(100*(percent||0)).toFixed(0)}%`;if("function"==typeof valueFormatter)return valueFormatter(value||0);return value};const getLabel=(labelsType,valueFormatter)=>({x,y,cx,cy,percent,value})=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,cx,cy,textAnchor:x>cx?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:/* @__PURE__ */(0,jsx_runtime.jsx)("tspan",{x,children:getLabelValue(labelsType,value,percent,valueFormatter)})});const DonutChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("DonutChart",DonutChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,pieProps,paddingAngle,withLabels,withLabelsLine,size,thickness,strokeWidth,startAngle,endAngle,tooltipDataSource,chartLabel,children,pieChartProps,valueFormatter,strokeColor,labelsType,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"DonutChart",classes:DonutChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:DonutChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const cells=data.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.PieChart,{...pieChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Pie,{data,innerRadius:size/2-thickness,outerRadius:size/2,dataKey:"value",isAnimationActive:false,paddingAngle,startAngle,endAngle,label:withLabels?getLabel(labelsType||"value",valueFormatter):false,labelLine:withLabelsLine?{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1}:false,...pieProps,children:cells}),chartLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",...getStyles("label"),children:chartLabel}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});DonutChart.displayName="@mantine/charts/DonutChart";DonutChart.classes=DonutChart_module_css_classes;"use client";var PieChart_module_css_classes={root:"m_cd8943fd"};"use client";const PieChart_defaultProps={withTooltip:false,withLabelsLine:true,paddingAngle:0,size:160,strokeWidth:1,startAngle:0,endAngle:360,tooltipDataSource:"all",labelsPosition:"outside",labelsType:"value"};const PieChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,withLabels,size,labelsPosition})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":withLabels&&"outside"===labelsPosition?(0,index_mjs_.rem)(size+80):(0,index_mjs_.rem)(size)}}));const PieChart_getLabelValue=(labelsType,value,percent,valueFormatter)=>{if("percent"===labelsType&&"number"==typeof percent)return`${(100*percent).toFixed(0)}%`;if("function"==typeof valueFormatter&&"number"==typeof value)return valueFormatter(value);return value};const getInsideLabel=(labelsType,valueFormatter)=>({cx,cy,midAngle,innerRadius,outerRadius,value,percent})=>{const RADIAN=Math.PI/180;const radius=innerRadius+(outerRadius-innerRadius)*.5;const x=cx+radius*Math.cos(-(midAngle||0)*RADIAN);const y=cy+radius*Math.sin(-(midAngle||0)*RADIAN);return/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,textAnchor:x>cx?"start":"end",dominantBaseline:"central",className:PieChart_module_css_classes.label,children:PieChart_getLabelValue(labelsType,value,percent,valueFormatter)})};const getOutsideLabel=(labelsType,valueFormatter)=>({x,y,cx,cy,percent,value})=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,cx,cy,textAnchor:x>cx?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:/* @__PURE__ */(0,jsx_runtime.jsx)("tspan",{x,children:PieChart_getLabelValue(labelsType,value,percent,valueFormatter)})});const PieChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("PieChart",PieChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,pieProps,paddingAngle,withLabels,withLabelsLine,size,strokeWidth,startAngle,endAngle,tooltipDataSource,children,pieChartProps,labelsPosition,valueFormatter,labelsType,strokeColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"PieChart",classes:PieChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:PieChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const cells=data.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.PieChart,{...pieChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Pie,{data,innerRadius:0,outerRadius:size/2,dataKey:"value",isAnimationActive:false,paddingAngle,startAngle,endAngle,label:withLabels?"inside"===labelsPosition?getInsideLabel(labelsType||"value",valueFormatter):getOutsideLabel(labelsType||"value",valueFormatter):false,labelLine:withLabelsLine&&"outside"===labelsPosition?{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1}:false,...pieProps,children:cells}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});PieChart.displayName="@mantine/charts/PieChart";PieChart.classes=PieChart_module_css_classes;"use client";var RadarChart_module_css_classes={root:"m_1f271cf7",container:"m_cf06f58c"};"use client";const RadarChart_defaultProps={withPolarGrid:true,withPolarAngleAxis:true,withPolarRadiusAxis:false,withTooltip:false,withDots:false,tooltipAnimationDuration:0};const RadarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{gridColor,textColor})=>({root:{"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0,"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0}}));const RadarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("RadarChart",RadarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,series,dataKey,gridColor,textColor,radarProps,radarChartProps,polarGridProps,polarAngleAxisProps,polarRadiusAxisProps,tooltipProps,withPolarGrid,withPolarAngleAxis,withPolarRadiusAxis,withTooltip,tooltipAnimationDuration,children,withLegend,withDots,dotProps,activeDotProps,legendProps,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"RadarChart",classes:RadarChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:RadarChart_varsResolver});const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const radars=series.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Radar,{name:item.name,dataKey:item.name,stroke:(0,index_mjs_.getThemeColor)(item.strokeColor||item.color,theme),fill:(0,index_mjs_.getThemeColor)(item.color,theme),fillOpacity:highlightedArea?highlightedArea===item.name?item.opacity||.4:.05:item.opacity||.4,dot:withDots?{fillOpacity:1,strokeOpacity:0,strokeWidth:1,fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:(0,index_mjs_.getThemeColor)(item.color,theme),...dotProps}:false,activeDot:withDots?{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:(0,index_mjs_.getThemeColor)(item.color,theme),...activeDotProps}:false,strokeOpacity:highlightedArea?highlightedArea===item.name?1:.1:1,isAnimationActive:false,..."function"==typeof radarProps?radarProps(item):radarProps},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.RadarChart,{data,...radarChartProps,children:[withPolarGrid&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarGrid,{stroke:"var(--chart-grid-color)",...polarGridProps}),withPolarAngleAxis&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarAngleAxis,{dataKey,...polarAngleAxisProps}),withPolarRadiusAxis&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarRadiusAxis,{stroke:"var(--chart-grid-color)",...polarRadiusAxisProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...tooltipProps}),radars,withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"bottom",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"bottom",classNames:resolvedClassNames,styles:resolvedStyles,series,centered:true,attributes}),...legendProps}),children]})})})});RadarChart.displayName="@mantine/charts/RadarChart";RadarChart.classes=RadarChart_module_css_classes;"use client";function getAxis(key,dataKey){return key===dataKey.x?"x":"y"}const ScatterChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x"};const ScatterChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const ScatterChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ScatterChart",ScatterChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,referenceLines,dir,withLegend,withTooltip,withXAxis,withYAxis,xAxisProps,yAxisProps,orientation,scatterChartProps,legendProps,data,gridAxis,tickLine,strokeDasharray,gridProps,tooltipAnimationDuration,tooltipProps,children,onMouseLeave,dataKey,textColor,gridColor,xAxisLabel,yAxisLabel,unit,labels,valueFormatter,scatterProps,pointLabels,attributes,...others}=props;const getFormatter=axis=>"function"==typeof valueFormatter?valueFormatter:valueFormatter?.[axis];const xFormatter=getFormatter("x");const yFormatter=getFormatter("y");const theme=(0,index_mjs_.useMantineTheme)();const mappedData=data.map(item=>({...item,data:item.data.map(point=>({...point,name:item.name}))}));const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"ScatterChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:ScatterChart_varsResolver});const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const scatters=mappedData.map((item,index)=>{const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.Scatter,{data:item.data,fill:(0,index_mjs_.getThemeColor)(item.color,theme),isAnimationActive:false,fillOpacity:dimmed?.1:1,...scatterProps,children:[pointLabels&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{dataKey:dataKey[pointLabels],fontSize:8,dy:10}),scatterProps?.children]},index)});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ScatterChart,{margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...scatterChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{type:"number",hide:!withXAxis,dataKey:dataKey.x,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,unit:unit?.x,tickFormatter:xFormatter,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{type:"number",hide:!withYAxis,axisLine:false,dataKey:dataKey.y,tickLine:withYTickLine?{stroke:"currentColor"}:false,tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},allowDecimals:true,unit:unit?.y,tickFormatter:yFormatter,...getStyles("axis"),...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{type:"scatter",label,payload:labels?payload?.map(item=>({...item,name:labels[getAxis(item.name,dataKey)]||item.name,value:getFormatter(getAxis(item.name,dataKey))?.(item.value)??item.value})):payload?.map(item=>({...item,value:getFormatter(getAxis(item.name,dataKey))?.(item.value)??item.value})),classNames:resolvedClassNames,styles:resolvedStyles,series:data,attributes}),...tooltipProps}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload?.map((item,index)=>({...item,dataKey:data[index].name})),onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series:data,attributes}),height:44,...legendProps}),referenceLinesItems,scatters]})})})});ScatterChart.displayName="@mantine/charts/ScatterChart";ScatterChart.classes=grid_chart_module_css_classes;"use client";function getDomain(data,key){const values=data.map(item=>item[key]);return[Math.min(...values),Math.max(...values)]}function BubbleChartTooltip({active,payload,getStyles,dataKey,valueFormatter}){if(active&&payload&&payload.length){const data=payload[0]&&payload[0].payload;return/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltip"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Text,{fz:"sm",children:data[dataKey.x]}),/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Text,{fz:"sm",children:valueFormatter?valueFormatter(data[dataKey.z]):data[dataKey.z]})]})})}return null}const BubbleChart_defaultProps={color:"blue.6",withTooltip:true};const BubbleChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const BubbleChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("BubbleChart",BubbleChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,xAxisProps,yAxisProps,zAxisProps,tooltipProps,scatterProps,color,label,withTooltip,dataKey,range,valueFormatter,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"BubbleChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:BubbleChart_varsResolver});const yAxisWidth=label?void 0:{width:0};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ScatterChart,{children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.XAxis,{type:"category",dataKey:dataKey.x,interval:0,tick:{fontSize:12,fill:"currentColor"},tickLine:{transform:"translate(0, -6)",stroke:"currentColor"},stroke:"currentColor",...getStyles("axis"),...xAxisProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.YAxis,{type:"number",dataKey:dataKey.y,height:10,...yAxisWidth,tick:false,tickLine:false,axisLine:false,label:{value:label,position:"insideRight",fontSize:12,fill:"currentColor"},...getStyles("axis"),...yAxisProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ZAxis,{type:"number",dataKey:dataKey.z,domain:getDomain(data,dataKey.z),range,...zAxisProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:100,isAnimationActive:false,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:"3 3"},content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(BubbleChartTooltip,{dataKey,active:payload.active,payload:payload.payload,getStyles,valueFormatter}),...tooltipProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Scatter,{data,fill:(0,index_mjs_.getThemeColor)(color,theme),isAnimationActive:false,...scatterProps})]})})})});BubbleChart.displayName="@mantine/charts/BubbleChart";BubbleChart.classes=grid_chart_module_css_classes;"use client";const CompositeChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:true,connectNulls:true,strokeWidth:2,curveType:"monotone"};const CompositeChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const CompositeChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("CompositeChart",CompositeChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,withDots,dotProps,activeDotProps,strokeWidth,connectNulls,curveType,dir,valueFormatter,children,lineProps,xAxisLabel,yAxisLabel,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,areaProps,barProps,withBarValueLabel,minBarSize,maxBarWidth,composedChartProps,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"CompositeChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:CompositeChart_varsResolver});const lines=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;if("line"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Line,{...getStyles("line"),key:item.name,name:item.name,dataKey:item.name,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:color,stroke:color,...dotProps}:false,activeDot:withDots?{fill:"var(--mantine-color-white)",stroke:color,...activeDotProps}:false,fill:color,stroke:color,strokeWidth,isAnimationActive:false,fillOpacity:dimmed?0:1,strokeOpacity:dimmed?.5:1,connectNulls,type:curveType,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof lineProps?lineProps(item):lineProps});if("area"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Area,{...getStyles("area"),key:item.name,name:item.name,type:curveType,dataKey:item.name,fill:color,strokeWidth,stroke:color,isAnimationActive:false,connectNulls,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:color,stroke:color,...dotProps}:false,activeDot:withDots?{fill:theme.white,stroke:color,strokeWidth:2,r:4,...activeDotProps}:false,fillOpacity:dimmed?0:.2,strokeOpacity:dimmed?.5:1,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof areaProps?areaProps(item):areaProps});if("bar"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Bar,{...getStyles("bar"),key:item.name,name:item.name,dataKey:item.name,fill:color,stroke:color,isAnimationActive:false,fillOpacity:dimmed?.1:1,strokeOpacity:dimmed?.2:0,yAxisId:item.yAxisId||"left",minPointSize:minBarSize,..."function"==typeof barProps?barProps(item):barProps},withBarValueLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:val=>valueFormatter?.(val)}));return null});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,type:"number",tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:valueFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ComposedChart,{data,maxBarSize:maxBarWidth,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...composedChartProps,children:[withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,dataKey,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),lines,referenceLinesItems,children]})})})});CompositeChart.displayName="@mantine/charts/CompositeChart";CompositeChart.classes=grid_chart_module_css_classes;"use client";var RadialBarChart_module_css_classes={root:"m_cd2bd9e5",tooltip:"m_6bcc3420"};"use client";const RadialBarChart_defaultProps={barSize:20,startAngle:90,endAngle:-270,withBackground:true,withTooltip:true};const RadialBarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{emptyBackgroundColor})=>({root:{"--chart-empty-background":emptyBackgroundColor?(0,index_mjs_.getThemeColor)(emptyBackgroundColor,theme):void 0}}));const RadialBarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("RadialBarChart",RadialBarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,barSize,withBackground,dataKey,radialBarProps,radialBarChartProps,withLabels,withLegend,legendProps,withTooltip,tooltipProps,startAngle,endAngle,attributes,...others}=props;const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const getStyles=(0,index_mjs_.useStyles)({name:"RadialBarChart",classes:RadialBarChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:RadialBarChart_varsResolver});const theme=(0,index_mjs_.useMantineTheme)();const dataWithResolvedColor=data.map(({color,...item})=>{const resolvedColor=(0,index_mjs_.getThemeColor)(color,theme);return{...item,fill:resolvedColor,fillOpacity:highlightedArea?highlightedArea===item.name?item.opacity||1:.05:item.opacity||1}});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.RadialBarChart,{margin:{top:0,bottom:0,left:0,right:0},innerRadius:"10%",outerRadius:"100%",cx:"50%",cy:"50%",barSize,startAngle,endAngle,data:dataWithResolvedColor,...radialBarChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.RadialBar,{label:withLabels?{position:"insideStart",fill:"var(--mantine-color-white)",fontSize:12}:void 0,background:withBackground?{fill:"var(--chart-empty-background)"}:void 0,dataKey,isAnimationActive:false,...radialBarProps}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"bottom",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload?.map(item=>({...item,dataKey:item.payload?.name})),onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"bottom",classNames:resolvedClassNames,styles:resolvedStyles,centered:true,attributes}),...legendProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:0,isAnimationActive:false,cursor:{stroke:"var(--chart-cursor-color)"},content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Paper,{...getStyles("tooltip"),children:[/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.ColorSwatch,{color:payload?.[0]?.payload.fill,size:12,withShadow:false}),/* @__PURE__ */(0,jsx_runtime.jsx)("span",{children:payload?.[0]?.payload.name})]}),/* @__PURE__ */(0,jsx_runtime.jsx)("span",{children:payload?.[0]?.payload[dataKey]})]}),...tooltipProps})]})})})});RadialBarChart.displayName="@mantine/core/RadialBarChart";RadialBarChart.classes=RadialBarChart_module_css_classes;"use client";var FunnelChart_module_css_classes={root:"m_80d531e7"};"use client";const FunnelChart_defaultProps={withTooltip:true,size:300,strokeWidth:1,withLabels:false,labelsPosition:"right",tooltipDataSource:"all"};const FunnelChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,size})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":(0,index_mjs_.rem)(size)}}));const FunnelChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("FunnelChart",FunnelChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,strokeWidth,withLabels,size,valueFormatter,children,funnelChartProps,funnelProps,labelsPosition,tooltipDataSource,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"FunnelChart",classes:FunnelChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:FunnelChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.FunnelChart,{...funnelChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.Funnel,{data,dataKey:"value",isAnimationActive:false,stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth,...funnelProps,children:[withLabels&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:labelsPosition,fill:"inside"===labelsPosition?"var(--chart-labels-color, var(--mantine-color-white))":"var(--chart-labels-color, var(--mantine-color-dimmed))",stroke:"none",fontFamily:"var(--mantine-font-family)",fontSize:14,dataKey:entry=>"function"==typeof valueFormatter?valueFormatter(entry.value):entry.value}),data.map((entry,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(entry.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index))]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});FunnelChart.displayName="@mantine/charts/FunnelChart";FunnelChart.classes=FunnelChart_module_css_classes;"use client";function getBoundaries({data,domain}){if(Array.isArray(domain))return domain;const values=Object.values(data);return[Math.min(...values),Math.max(...values)]}"use client";function formatDate(date){return date.toISOString().split("T")[0]}function addDays(date,days){return new Date(date.getTime()+864e5*days)}function startOfWeek(date,firstDayOfWeek){let value=new Date(date);while(value.getDay()!==firstDayOfWeek)value=addDays(value,-1);return value}function endOfWeek(date,firstDayOfWeek){const day=date.getDay();const diff=(day<firstDayOfWeek?7:0)+day-firstDayOfWeek;return addDays(date,6-diff)}function getDatesRange({startDate,endDate,withOutsideDates=true,firstDayOfWeek=1}={}){const start=startDate?new Date(startDate):new Date(/* @__PURE__ */new Date().getFullYear()-1,/* @__PURE__ */new Date().getMonth(),/* @__PURE__ */new Date().getDate());const end=endDate?new Date(endDate):/* @__PURE__ */new Date;const startWeek=startOfWeek(start,firstDayOfWeek);const endWeek=endOfWeek(end,firstDayOfWeek);const dates=[];let current=startWeek;while(current<=endWeek){const week=Array.from({length:7},(_,i)=>{const day=addDays(current,i);return withOutsideDates||day>=start&&day<=end?formatDate(day):null});dates.push(week);current=addDays(current,7)}return dates}"use client";function getHeatColor({value,min,max,colors}){const percent=(value-min)/(max-min);const colorIndex=Math.round((colors.length-1)*percent);return colors[colorIndex]}"use client";function getMonthsRange(weeksData){let position=0;let current=null;const result=[];weeksData.forEach(week=>{const day=null===week[0]?week[week.length-1]:week[0];const month=new Date(day).getMonth();if(current!==month){current=month;result.push({month:current,position,size:0})}result[result.length-1].size+=1;position+=1});return result}"use client";function rotateWeekdaysNames(weekdayNames,firstDayOfWeek){const rotated=[...weekdayNames];for(let i=0;i<firstDayOfWeek;i+=1)rotated.push(rotated.shift());return rotated}"use client";var Heatmap_module_css_classes={root:"m_2ef228c3",rect:"m_2ef201c5",monthLabel:"m_7e977775",weekdayLabel:"m_c4b68f8d"};"use client";const Heatmap_defaultProps={monthLabels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdayLabels:["Sun","Mon","","Wed","","Fri",""],withOutsideDates:true,firstDayOfWeek:1,rectSize:10,weekdaysLabelsWidth:30,monthsLabelsHeight:14,gap:1,rectRadius:2,fontSize:12,colors:["var(--heatmap-level-1)","var(--heatmap-level-2)","var(--heatmap-level-3)","var(--heatmap-level-4)"]};const Heatmap=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("Heatmap",Heatmap_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,startDate,endDate,withMonthLabels,withWeekdayLabels,weekdayLabels,withOutsideDates,monthLabels,firstDayOfWeek,rectSize=10,gap=1,rectRadius,domain,colors,weekdaysLabelsWidth,monthsLabelsHeight,fontSize,getTooltipLabel,withTooltip,tooltipProps,getRectProps,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"Heatmap",classes:Heatmap_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars});const[hoveredRect,setHoveredRect]=(0,index_js_.useState)(null);const rectSizeWithGap=rectSize+gap;const weekdaysOffset=withWeekdayLabels?weekdaysLabelsWidth:0;const monthsOffset=withMonthLabels?monthsLabelsHeight:0;const[min,max]=getBoundaries({data,domain});const rotatedWeekdayLabels=(0,index_js_.useMemo)(()=>rotateWeekdaysNames(weekdayLabels,firstDayOfWeek),[weekdayLabels,firstDayOfWeek]);const datesRange=getDatesRange({startDate,endDate,withOutsideDates,firstDayOfWeek});const weeks=datesRange.map((week,weekIndex)=>{const days=week.map((date,dayIndex)=>{if(!date)return null;const hasValue=date in data&&null!==data[date];const rectValue=hasValue?data[date]:null;return/* @__PURE__ */(0,jsx_runtime.jsx)("rect",{width:rectSize,height:rectSize,x:gap,y:dayIndex*rectSizeWithGap+gap,rx:rectRadius,"data-empty":!hasValue||void 0,fill:hasValue?getHeatColor({value:data[date],min,max,colors}):void 0,onPointerEnter:withTooltip?()=>setHoveredRect({date,value:rectValue}):void 0,...getRectProps?.({date,value:rectValue}),...getStyles("rect")},date)});return/* @__PURE__ */(0,jsx_runtime.jsx)("g",{transform:`translate(${weekIndex*rectSizeWithGap}, 0)`,"data-id":"week",children:days},weekIndex)});const monthsRange=withMonthLabels?getMonthsRange(datesRange):[];const monthsLabelsNodes=withMonthLabels&&monthLabels?monthsRange.map((month,monthIndex)=>{if(month.size<3)return null;const monthLabel=monthLabels[month.month];return/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:month.position*rectSizeWithGap+gap+weekdaysOffset,y:monthsLabelsHeight-4,width:month.size*rectSizeWithGap,fontSize,...getStyles("monthLabel"),children:monthLabel},monthIndex)}):null;const weekdayLabelsNodes=withWeekdayLabels&&weekdayLabels?rotatedWeekdayLabels.map((weekdayLabel,dayIndex)=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:0,y:(dayIndex+1)*rectSizeWithGap-gap+monthsOffset,width:weekdaysLabelsWidth,fontSize,...getStyles("weekdayLabel"),children:weekdayLabel},dayIndex)):null;const label=getTooltipLabel&&hoveredRect&&withTooltip?getTooltipLabel(hoveredRect):null;return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Box,{component:"svg",ref,width:rectSizeWithGap*datesRange.length+gap+weekdaysOffset,height:7*rectSizeWithGap+gap+monthsOffset,...getStyles("root"),...others,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Tooltip.Floating,{label,disabled:!withTooltip||!label,position:"top",...tooltipProps,children:/* @__PURE__ */(0,jsx_runtime.jsxs)("g",{transform:`translate(${weekdaysOffset}, ${monthsOffset})`,"data-id":"all-weeks",children:[withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)("rect",{fill:"transparent",width:rectSizeWithGap*datesRange.length+gap,height:7*rectSizeWithGap+gap}),weeks]})}),weekdayLabelsNodes,monthsLabelsNodes]})});Heatmap.displayName="@mantine/charts/Heatmap";Heatmap.classes=Heatmap_module_css_classes}}]);
|
|
1
|
+
"use strict";(globalThis["chunk_tech_app"]=globalThis["chunk_tech_app"]||[]).push([["119"],{2985:function(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);__webpack_require__.d(__webpack_exports__,{AreaChart:()=>AreaChart,BubbleChart:()=>BubbleChart,FunnelChart:()=>FunnelChart,RadialBarChart:()=>RadialBarChart,AreaGradient:()=>AreaGradient,CompositeChart:()=>CompositeChart,ChartTooltip:()=>ChartTooltip,DonutChart:()=>DonutChart,LineChart:()=>LineChart,RadarChart:()=>RadarChart,ChartLegend:()=>ChartLegend,Heatmap:()=>Heatmap,ScatterChart:()=>ScatterChart,PieChart:()=>PieChart,getSplitOffset:()=>getSplitOffset,getFilteredChartLegendPayload:()=>getFilteredChartLegendPayload,BarChart:()=>BarChart,Sparkline:()=>Sparkline,getFilteredChartTooltipPayload:()=>getFilteredChartTooltipPayload});var jsx_runtime=__webpack_require__(5893);var index_mjs_=__webpack_require__(207);"use client";function getSeriesLabels(series){if(!series)return{};return series.reduce((acc,item)=>{const matchFound=item.name.search(/\./);if(matchFound>=0){const key=item.name.substring(matchFound+1);acc[key]=item.label;return acc}acc[item.name]=item.label;return acc},{})}"use client";var classes={tooltip:"m_e4d36c9b",tooltipLabel:"m_7f4bcb19",tooltipBody:"m_3de554dd",tooltipItemColor:"m_b30369b5",tooltipItem:"m_3de8964e",tooltipItemBody:"m_50186d10",tooltipItemName:"m_501dadf9",tooltipItemData:"m_50192318"};"use client";function updateChartTooltipPayload(payload){return payload.map(item=>{if(!item.payload||item.payload[item.name])return item;const matchFound=item.name.search(/\./);if(matchFound>=0){const newDataKey=item.name.substring(0,matchFound);const nestedPayload={...item.payload[newDataKey]};const shallowPayload=Object.entries(item.payload).reduce((acc,current)=>{const[k,v]=current;return k===newDataKey?acc:{...acc,[k]:v}},{});return{...item,name:item.name.substring(matchFound+1),payload:{...shallowPayload,...nestedPayload}}}return item})}function getFilteredChartTooltipPayload(payload,segmentId){const duplicatesFilter=updateChartTooltipPayload(payload.filter(item=>"none"!==item.fill||!item.color));if(!segmentId)return duplicatesFilter;return duplicatesFilter.filter(item=>item.name===segmentId)}function getData(item,type){if("radial"===type||"scatter"===type){if(Array.isArray(item.value))return item.value[1]-item.value[0];return item.value}if(Array.isArray(item.payload[item.dataKey]))return item.payload[item.dataKey][1]-item.payload[item.dataKey][0];return item.payload[item.name]}const defaultProps={type:"area",showColor:true};const ChartTooltip=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ChartTooltip",defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,payload,label,unit,type,segmentId,mod,series,valueFormatter,showColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"ChartTooltip",classes:classes,props,className,style,classNames,styles,unstyled,attributes});if(!payload)return null;const filteredPayload=getFilteredChartTooltipPayload(payload,segmentId);const scatterLabel="scatter"===type?payload[0]?.payload?.name:null;const labels=getSeriesLabels(series);const _label=label||scatterLabel;const items=filteredPayload.map(item=>/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{"data-type":type,...getStyles("tooltipItem"),children:[/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("tooltipItemBody"),children:[showColor&&/* @__PURE__ */(0,jsx_runtime.jsx)("svg",{...getStyles("tooltipItemColor"),children:/* @__PURE__ */(0,jsx_runtime.jsx)("circle",{r:6,fill:(0,index_mjs_.getThemeColor)(item.color,theme),width:12,height:12,cx:6,cy:6})}),/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipItemName"),children:labels[item.name]||item.name})]}),/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("tooltipItemData"),children:["function"==typeof valueFormatter?valueFormatter(getData(item,type)):getData(item,type),unit||item.unit]})]},item?.key??item.name));return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Box,{...getStyles("tooltip"),mod:[{type},mod],ref,...others,children:[_label&&/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipLabel"),children:_label}),/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltipBody"),children:items})]})});ChartTooltip.displayName="@mantine/charts/ChartTooltip";"use client";var ChartLegend_module_css_classes={legend:"m_847eaf",legendItem:"m_17da7e62",legendItemColor:"m_6e236e21",legendItemName:"m_8ff56c0d"};"use client";function updateChartLegendPayload(payload){return payload.map(item=>{const newDataKey=item.dataKey?.split(".").pop();return{...item,dataKey:newDataKey,payload:{...item.payload,name:newDataKey,dataKey:newDataKey}}})}function getFilteredChartLegendPayload(payload){return updateChartLegendPayload(payload.filter(item=>"none"!==item.color))}const ChartLegend=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ChartLegend",null,_props);const{classNames,className,style,styles,unstyled,vars,payload,onHighlight,legendPosition,mod,series,showColor,centered,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"ChartLegend",classes:ChartLegend_module_css_classes,props,className,style,classNames,styles,unstyled,attributes});if(!payload)return null;const filteredPayload=getFilteredChartLegendPayload(payload);const labels=getSeriesLabels(series);const items=filteredPayload.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsxs)("div",{...getStyles("legendItem"),onMouseEnter:()=>onHighlight(item.dataKey),onMouseLeave:()=>onHighlight(null),"data-without-color":false===showColor||void 0,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.ColorSwatch,{color:item.color,size:12,...getStyles("legendItemColor"),withShadow:false}),/* @__PURE__ */(0,jsx_runtime.jsx)("p",{...getStyles("legendItemName"),children:labels[item.dataKey]||item.dataKey})]},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,mod:[{position:legendPosition,centered},mod],...getStyles("legend"),...others,children:items})});ChartLegend.displayName="@mantine/charts/ChartLegend";var index_js_=__webpack_require__(3106);var es6_index_js_=__webpack_require__(475);"use client";function PointLabel({x,y,value,valueFormatter}){return/* @__PURE__ */(0,jsx_runtime.jsx)("g",{transform:`translate(${x},${y})`,children:/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:0,y:0,dy:-8,dx:-10,textAnchor:"top",fill:"var(--chart-text-color, var(--mantine-color-dimmed))",fontSize:8,children:valueFormatter?valueFormatter(value):value})})}"use client";function AreaGradient({color,id,withGradient,fillOpacity}){return/* @__PURE__ */(0,jsx_runtime.jsx)(jsx_runtime.Fragment,{children:withGradient?/* @__PURE__ */(0,jsx_runtime.jsxs)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:[/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:"0%",stopColor:color,stopOpacity:fillOpacity}),/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:"100%",stopColor:color,stopOpacity:.01})]}):/* @__PURE__ */(0,jsx_runtime.jsx)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{stopColor:color,stopOpacity:fillOpacity??.2})})})}AreaGradient.displayName="@mantine/charts/AreaGradient";"use client";function AreaSplit({offset,id,colors,fillOpacity}){const theme=(0,index_mjs_.useMantineTheme)();return/* @__PURE__ */(0,jsx_runtime.jsxs)("linearGradient",{id,x1:"0",y1:"0",x2:"0",y2:"1",children:[/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset,stopColor:(0,index_mjs_.getThemeColor)(colors[0],theme),stopOpacity:fillOpacity??.2}),/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset,stopColor:(0,index_mjs_.getThemeColor)(colors[1],theme),stopOpacity:fillOpacity??.2})]})}AreaSplit.displayName="@mantine/charts/AreaSplit";"use client";function getSplitOffset({data,dataKey}){const dataMax=Math.max(...data.map(item=>item[dataKey]));const dataMin=Math.min(...data.map(item=>item[dataKey]));if(dataMax<=0)return 0;if(dataMin>=0)return 1;return dataMax/(dataMax-dataMin)}function getDefaultSplitOffset({data,series}){if(1===series.length){const dataKey=series[0].name;return getSplitOffset({data,dataKey})}return .5}"use client";var grid_chart_module_css_classes={root:"m_a50f3e58",container:"m_af9188cb",grid:"m_a50a48bc",axis:"m_a507a517",axisLabel:"m_2293801d",tooltip:"m_92b296cd"};"use client";function valueToPercent(value){return`${(100*value).toFixed(0)}%`}const AreaChart_defaultProps={withXAxis:true,withYAxis:true,withDots:true,withTooltip:true,connectNulls:true,strokeWidth:2,tooltipAnimationDuration:0,fillOpacity:.2,tickLine:"y",strokeDasharray:"5 5",curveType:"monotone",gridAxis:"x",type:"default",splitColors:["green.7","red.7"],orientation:"horizontal"};const varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const AreaChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("AreaChart",AreaChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,series,withGradient,dataKey,withXAxis,withYAxis,curveType,gridProps,withDots,tickLine,strokeDasharray,gridAxis,unit,yAxisProps,xAxisProps,dotProps,activeDotProps,strokeWidth,tooltipAnimationDuration,type,legendProps,tooltipProps,withLegend,withTooltip,areaChartProps,fillOpacity,splitColors,splitOffset,connectNulls,onMouseLeave,orientation,referenceLines,dir,valueFormatter,children,areaProps,xAxisLabel,yAxisLabel,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,gridColor,textColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const baseId=(0,index_js_.useId)();const splitId=`${baseId}-split`;const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const isAnimationActive=(tooltipAnimationDuration||0)>0;const _withGradient="boolean"==typeof withGradient?withGradient:"default"===type;const stacked="stacked"===type||"percent"===type;const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"AreaChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver});const dotsAreas=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Area,{...getStyles("area"),activeDot:{fill:theme.white,stroke:color,strokeWidth:2,r:4,...activeDotProps},dot:{fill:color,fillOpacity:dimmed?0:1,strokeWidth:2,r:4,...dotProps},key:item.name,name:item.name,type:curveType,dataKey:item.name,fill:"none",strokeWidth,stroke:"none",isAnimationActive:false,connectNulls,stackId:stacked?"stack-dots":void 0,yAxisId:item.yAxisId||"left",..."function"==typeof areaProps?areaProps(item):areaProps})});const areas=series.map(item=>{const id=`${baseId}-${item.color.replace(/[^a-zA-Z0-9]/g,"")}`;const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_js_.Fragment,{children:[/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaGradient,{color,withGradient:_withGradient,id,fillOpacity})}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Area,{...getStyles("area"),activeDot:false,dot:false,name:item.name,type:curveType,dataKey:item.name,fill:"split"===type?`url(#${splitId})`:`url(#${id})`,strokeWidth,stroke:color,isAnimationActive:false,connectNulls,stackId:stacked?"stack":void 0,fillOpacity:dimmed?0:1,strokeOpacity:dimmed?.5:1,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof areaProps?areaProps(item):areaProps})]},item.name)});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const tickFormatter="percent"===type?valueToPercent:valueFormatter;const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:tickFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.AreaChart,{data,stackOffset:"percent"===type?"expand":void 0,layout:orientation,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...areaChartProps,children:[referenceLinesItems,withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?tickFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),"split"===type&&/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaSplit,{colors:splitColors,id:splitId,offset:splitOffset??getDefaultSplitOffset({data,series}),fillOpacity})}),areas,withDots&&dotsAreas,children]})})})});AreaChart.classes=grid_chart_module_css_classes;AreaChart.displayName="@mantine/charts/AreaChart";"use client";function BarChart_valueToPercent(value){return`${(100*value).toFixed(0)}%`}const BarChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",type:"default"};const BarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor,cursorFill,barLabelColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0,"--chart-cursor-fill":cursorFill?(0,index_mjs_.getThemeColor)(cursorFill,theme):void 0,"--chart-bar-label-color":barLabelColor?(0,index_mjs_.getThemeColor)(barLabelColor,theme):void 0}}));function calculateCumulativeTotal(waterfallData,dataKey){let start=0;let end=0;return waterfallData.map(item=>{if(item.standalone){for(const prop in item)if("number"==typeof item[prop]&&prop!==dataKey)item[prop]=[0,item[prop]]}else for(const prop in item)if("number"==typeof item[prop]&&prop!==dataKey){end+=item[prop];item[prop]=[start,end];start=end}return item})}function getBarFill(barProps,series){if("function"==typeof barProps)return barProps(series).fill;return barProps?.fill}const BarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("BarChart",BarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,fillOpacity,barChartProps,type,orientation,dir,valueFormatter,children,barProps,xAxisLabel,yAxisLabel,withBarValueLabel,valueLabelProps,withRightYAxis,rightYAxisLabel,rightYAxisProps,minBarSize,maxBarWidth,mod,getBarColor,gridColor,textColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const stacked="stacked"===type||"percent"===type;const tickFormatter="percent"===type?BarChart_valueToPercent:valueFormatter;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const inputData="waterfall"===type?calculateCumulativeTotal(data,dataKey):data;const getStyles=(0,index_mjs_.useStyles)({name:"BarChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:BarChart_varsResolver});const bars=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Bar,{...getStyles("bar"),key:item.name,name:item.name,dataKey:item.name,fill:color,stroke:color,isAnimationActive:false,fillOpacity:dimmed?.1:fillOpacity,strokeOpacity:dimmed?.2:0,stackId:stacked?"stack":item.stackId||void 0,yAxisId:item.yAxisId||"left",minPointSize:minBarSize,..."function"==typeof barProps?barProps(item):barProps},inputData.map((entry,index)=>{const cellColor=entry.color?(0,index_mjs_.getThemeColor)(entry.color,theme):"function"==typeof getBarColor?(0,index_mjs_.getThemeColor)(getBarColor(entry[item.name],item),theme):getBarFill(barProps,item)||color;return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:cellColor},`cell-${index}`)}),withBarValueLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:"vertical"===orientation?"right":"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:val=>tickFormatter?.(val),..."function"==typeof valueLabelProps?valueLabelProps(item):valueLabelProps}))});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:tickFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",mod:[{orientation},mod],...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.BarChart,{data:inputData,stackOffset:"percent"===type?"expand":void 0,layout:orientation,maxBarSize:maxBarWidth,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...barChartProps,children:[withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,showColor:"waterfall"!==type,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?tickFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray,fill:"var(--chart-cursor-fill)"},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,type:"waterfall"===type?"scatter":void 0,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),bars,referenceLinesItems,children]})})})});BarChart.displayName="@mantine/charts/BarChart";BarChart.classes=grid_chart_module_css_classes;var esm_index_mjs_=__webpack_require__(3863);"use client";const LineChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,fillOpacity:1,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:true,connectNulls:true,strokeWidth:2,curveType:"monotone",gradientStops:[{offset:0,color:"red"},{offset:100,color:"blue"}]};const LineChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const LineChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("LineChart",LineChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,withDots,dotProps,activeDotProps,strokeWidth,lineChartProps,connectNulls,fillOpacity,curveType,orientation,dir,valueFormatter,children,lineProps,xAxisLabel,yAxisLabel,type,gradientStops,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"LineChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:LineChart_varsResolver});const id=(0,esm_index_mjs_.useId)();const gradientId=`line-chart-gradient-${id}`;const stops=gradientStops?.map(stop=>/* @__PURE__ */(0,jsx_runtime.jsx)("stop",{offset:`${stop.offset}%`,stopColor:(0,index_mjs_.getThemeColor)(stop.color,theme)},stop.color));const lines=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Line,{...getStyles("line"),key:item.name,name:item.name,dataKey:item.name,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:"gradient"===type?"var(--mantine-color-gray-7)":color,stroke:"gradient"===type?"white":color,...dotProps}:false,activeDot:withDots?{fill:"gradient"===type?"var(--mantine-color-gray-7)":color,stroke:"gradient"===type?"white":color,...activeDotProps}:false,fill:color,stroke:"gradient"===type?`url(#${gradientId})`:color,strokeWidth,isAnimationActive:false,fillOpacity:dimmed?0:fillOpacity,strokeOpacity:dimmed?.5:fillOpacity,connectNulls,type:curveType,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof lineProps?lineProps(item):lineProps})});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,..."vertical"===orientation?{dataKey,type:"category"}:{type:"number"},tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:"vertical"===orientation?void 0:valueFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.LineChart,{data,layout:orientation,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...lineChartProps,children:["gradient"===type&&/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)("linearGradient",{id:gradientId,x1:"0",y1:"0",x2:"0",y2:"1",children:stops})}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,showColor:"gradient"!==type,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,..."vertical"===orientation?{type:"number"}:{dataKey},tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,tickFormatter:"vertical"===orientation?valueFormatter:void 0,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:"vertical"===orientation?{}:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,showColor:"gradient"!==type,attributes}),...tooltipProps}),lines,referenceLinesItems,children]})})})});LineChart.displayName="@mantine/charts/LineChart";LineChart.classes=grid_chart_module_css_classes;"use client";const Sparkline_classes={};const Sparkline_defaultProps={withGradient:true,connectNulls:true,fillOpacity:.6,strokeWidth:2,curveType:"linear"};function getTrendColor(data,trendColors){const first=data[0];const last=data[data.length-1];if(null===first||null===last)return trendColors.neutral||trendColors.positive;if(first<last)return trendColors.positive;if(first>last)return trendColors.negative;return trendColors.neutral||trendColors.positive}const Sparkline_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{color,data,trendColors})=>({root:{"--chart-color":trendColors?(0,index_mjs_.getThemeColor)(getTrendColor(data,trendColors),theme):color?(0,index_mjs_.getThemeColor)(color,theme):void 0}}));const Sparkline=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("Sparkline",Sparkline_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withGradient,fillOpacity,curveType,strokeWidth,trendColors,connectNulls,areaProps,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"Sparkline",classes:Sparkline_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:Sparkline_varsResolver});const id=(0,index_js_.useId)();const mappedData=(0,index_js_.useMemo)(()=>data.map((value,index)=>({value,index})),[data]);return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,dir:"ltr",children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.AreaChart,{data:mappedData,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Area,{dataKey:"value",type:curveType,fill:`url(#${id})`,stroke:"var(--chart-color, var(--mantine-color-blue-filled))",isAnimationActive:false,connectNulls,strokeWidth,fillOpacity:1,...areaProps}),/* @__PURE__ */(0,jsx_runtime.jsx)("defs",{children:/* @__PURE__ */(0,jsx_runtime.jsx)(AreaGradient,{id,color:"var(--chart-color, var(--mantine-color-blue-filled))",fillOpacity,withGradient})})]})})})});Sparkline.displayName="@mantine/charts/Sparkline";Sparkline.classes=Sparkline_classes;"use client";var DonutChart_module_css_classes={root:"m_a410e613",label:"m_ddb0bfe3"};"use client";const DonutChart_defaultProps={withTooltip:true,withLabelsLine:true,paddingAngle:0,thickness:20,size:160,strokeWidth:1,startAngle:0,endAngle:360,labelsType:"value",tooltipDataSource:"all"};const DonutChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,withLabels,size})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":withLabels?(0,index_mjs_.rem)(size+80):(0,index_mjs_.rem)(size)}}));const getLabelValue=(labelsType,value,percent,valueFormatter)=>{if("percent"===labelsType)return`${(100*(percent||0)).toFixed(0)}%`;if("function"==typeof valueFormatter)return valueFormatter(value||0);return value};const getLabel=(labelsType,valueFormatter)=>({x,y,cx,cy,percent,value})=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,cx,cy,textAnchor:x>cx?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:/* @__PURE__ */(0,jsx_runtime.jsx)("tspan",{x,children:getLabelValue(labelsType,value,percent,valueFormatter)})});const DonutChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("DonutChart",DonutChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,pieProps,paddingAngle,withLabels,withLabelsLine,size,thickness,strokeWidth,startAngle,endAngle,tooltipDataSource,chartLabel,children,pieChartProps,valueFormatter,strokeColor,labelsType,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"DonutChart",classes:DonutChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:DonutChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const cells=data.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.PieChart,{...pieChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Pie,{data,innerRadius:size/2-thickness,outerRadius:size/2,dataKey:"value",isAnimationActive:false,paddingAngle,startAngle,endAngle,label:withLabels?getLabel(labelsType||"value",valueFormatter):false,labelLine:withLabelsLine?{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1}:false,...pieProps,children:cells}),chartLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",...getStyles("label"),children:chartLabel}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});DonutChart.displayName="@mantine/charts/DonutChart";DonutChart.classes=DonutChart_module_css_classes;"use client";var PieChart_module_css_classes={root:"m_cd8943fd"};"use client";const PieChart_defaultProps={withTooltip:false,withLabelsLine:true,paddingAngle:0,size:160,strokeWidth:1,startAngle:0,endAngle:360,tooltipDataSource:"all",labelsPosition:"outside",labelsType:"value"};const PieChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,withLabels,size,labelsPosition})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":withLabels&&"outside"===labelsPosition?(0,index_mjs_.rem)(size+80):(0,index_mjs_.rem)(size)}}));const PieChart_getLabelValue=(labelsType,value,percent,valueFormatter)=>{if("percent"===labelsType&&"number"==typeof percent)return`${(100*percent).toFixed(0)}%`;if("function"==typeof valueFormatter&&"number"==typeof value)return valueFormatter(value);return value};const getInsideLabel=(labelsType,valueFormatter)=>({cx,cy,midAngle,innerRadius,outerRadius,value,percent})=>{const RADIAN=Math.PI/180;const radius=innerRadius+(outerRadius-innerRadius)*.5;const x=cx+radius*Math.cos(-(midAngle||0)*RADIAN);const y=cy+radius*Math.sin(-(midAngle||0)*RADIAN);return/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,textAnchor:x>cx?"start":"end",dominantBaseline:"central",className:PieChart_module_css_classes.label,children:PieChart_getLabelValue(labelsType,value,percent,valueFormatter)})};const getOutsideLabel=(labelsType,valueFormatter)=>({x,y,cx,cy,percent,value})=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x,y,cx,cy,textAnchor:x>cx?"start":"end",fill:"var(--chart-labels-color, var(--mantine-color-dimmed))",fontFamily:"var(--mantine-font-family)",fontSize:12,children:/* @__PURE__ */(0,jsx_runtime.jsx)("tspan",{x,children:PieChart_getLabelValue(labelsType,value,percent,valueFormatter)})});const PieChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("PieChart",PieChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,pieProps,paddingAngle,withLabels,withLabelsLine,size,strokeWidth,startAngle,endAngle,tooltipDataSource,children,pieChartProps,labelsPosition,valueFormatter,labelsType,strokeColor,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"PieChart",classes:PieChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:PieChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const cells=data.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.PieChart,{...pieChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Pie,{data,innerRadius:0,outerRadius:size/2,dataKey:"value",isAnimationActive:false,paddingAngle,startAngle,endAngle,label:withLabels?"inside"===labelsPosition?getInsideLabel(labelsType||"value",valueFormatter):getOutsideLabel(labelsType||"value",valueFormatter):false,labelLine:withLabelsLine&&"outside"===labelsPosition?{stroke:"var(--chart-label-color, var(--mantine-color-dimmed))",strokeWidth:1}:false,...pieProps,children:cells}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});PieChart.displayName="@mantine/charts/PieChart";PieChart.classes=PieChart_module_css_classes;"use client";var RadarChart_module_css_classes={root:"m_1f271cf7",container:"m_cf06f58c"};"use client";const RadarChart_defaultProps={withPolarGrid:true,withPolarAngleAxis:true,withPolarRadiusAxis:false,withTooltip:false,withDots:false,tooltipAnimationDuration:0};const RadarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{gridColor,textColor})=>({root:{"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0,"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0}}));const RadarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("RadarChart",RadarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,series,dataKey,gridColor,textColor,radarProps,radarChartProps,polarGridProps,polarAngleAxisProps,polarRadiusAxisProps,tooltipProps,withPolarGrid,withPolarAngleAxis,withPolarRadiusAxis,withTooltip,tooltipAnimationDuration,children,withLegend,withDots,dotProps,activeDotProps,legendProps,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"RadarChart",classes:RadarChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:RadarChart_varsResolver});const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const radars=series.map((item,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Radar,{name:item.name,dataKey:item.name,stroke:(0,index_mjs_.getThemeColor)(item.strokeColor||item.color,theme),fill:(0,index_mjs_.getThemeColor)(item.color,theme),fillOpacity:highlightedArea?highlightedArea===item.name?item.opacity||.4:.05:item.opacity||.4,dot:withDots?{fillOpacity:1,strokeOpacity:0,strokeWidth:1,fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:(0,index_mjs_.getThemeColor)(item.color,theme),...dotProps}:false,activeDot:withDots?{fill:(0,index_mjs_.getThemeColor)(item.color,theme),stroke:(0,index_mjs_.getThemeColor)(item.color,theme),...activeDotProps}:false,strokeOpacity:highlightedArea?highlightedArea===item.name?1:.1:1,isAnimationActive:false,..."function"==typeof radarProps?radarProps(item):radarProps},index));return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.RadarChart,{data,...radarChartProps,children:[withPolarGrid&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarGrid,{stroke:"var(--chart-grid-color)",...polarGridProps}),withPolarAngleAxis&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarAngleAxis,{dataKey,...polarAngleAxisProps}),withPolarRadiusAxis&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.PolarRadiusAxis,{stroke:"var(--chart-grid-color)",...polarRadiusAxisProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...tooltipProps}),radars,withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"bottom",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"bottom",classNames:resolvedClassNames,styles:resolvedStyles,series,centered:true,attributes}),...legendProps}),children]})})})});RadarChart.displayName="@mantine/charts/RadarChart";RadarChart.classes=RadarChart_module_css_classes;"use client";function getAxis(key,dataKey){return key===dataKey.x?"x":"y"}const ScatterChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x"};const ScatterChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const ScatterChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("ScatterChart",ScatterChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,referenceLines,dir,withLegend,withTooltip,withXAxis,withYAxis,xAxisProps,yAxisProps,orientation,scatterChartProps,legendProps,data,gridAxis,tickLine,strokeDasharray,gridProps,tooltipAnimationDuration,tooltipProps,children,onMouseLeave,dataKey,textColor,gridColor,xAxisLabel,yAxisLabel,unit,labels,valueFormatter,scatterProps,pointLabels,attributes,...others}=props;const getFormatter=axis=>"function"==typeof valueFormatter?valueFormatter:valueFormatter?.[axis];const xFormatter=getFormatter("x");const yFormatter=getFormatter("y");const theme=(0,index_mjs_.useMantineTheme)();const mappedData=data.map(item=>({...item,data:item.data.map(point=>({...point,name:item.name}))}));const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"ScatterChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:ScatterChart_varsResolver});const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const scatters=mappedData.map((item,index)=>{const dimmed=shouldHighlight&&highlightedArea!==item.name;return/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.Scatter,{data:item.data,fill:(0,index_mjs_.getThemeColor)(item.color,theme),isAnimationActive:false,fillOpacity:dimmed?.1:1,...scatterProps,children:[pointLabels&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{dataKey:dataKey[pointLabels],fontSize:8,dy:10}),scatterProps?.children]},index)});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ScatterChart,{margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...scatterChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{type:"number",hide:!withXAxis,dataKey:dataKey.x,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,unit:unit?.x,tickFormatter:xFormatter,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{type:"number",hide:!withYAxis,axisLine:false,dataKey:dataKey.y,tickLine:withYTickLine?{stroke:"currentColor"}:false,tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},allowDecimals:true,unit:unit?.y,tickFormatter:yFormatter,...getStyles("axis"),...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{type:"scatter",label,payload:labels?payload?.map(item=>({...item,name:labels[getAxis(item.name,dataKey)]||item.name,value:getFormatter(getAxis(item.name,dataKey))?.(item.value)??item.value})):payload?.map(item=>({...item,value:getFormatter(getAxis(item.name,dataKey))?.(item.value)??item.value})),classNames:resolvedClassNames,styles:resolvedStyles,series:data,attributes}),...tooltipProps}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload?.map((item,index)=>({...item,dataKey:data[index].name})),onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series:data,attributes}),height:44,...legendProps}),referenceLinesItems,scatters]})})})});ScatterChart.displayName="@mantine/charts/ScatterChart";ScatterChart.classes=grid_chart_module_css_classes;"use client";function getDomain(data,key){const values=data.map(item=>item[key]);return[Math.min(...values),Math.max(...values)]}function BubbleChartTooltip({active,payload,getStyles,dataKey,valueFormatter}){if(active&&payload&&payload.length){const data=payload[0]&&payload[0].payload;return/* @__PURE__ */(0,jsx_runtime.jsx)("div",{...getStyles("tooltip"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{justify:"space-between",children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Text,{fz:"sm",children:data[dataKey.x]}),/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Text,{fz:"sm",children:valueFormatter?valueFormatter(data[dataKey.z]):data[dataKey.z]})]})})}return null}const BubbleChart_defaultProps={color:"blue.6",withTooltip:true};const BubbleChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const BubbleChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("BubbleChart",BubbleChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,xAxisProps,yAxisProps,zAxisProps,tooltipProps,scatterProps,color,label,withTooltip,dataKey,range,valueFormatter,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"BubbleChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:BubbleChart_varsResolver});const yAxisWidth=label?void 0:{width:0};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ScatterChart,{children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.XAxis,{type:"category",dataKey:dataKey.x,interval:0,tick:{fontSize:12,fill:"currentColor"},tickLine:{transform:"translate(0, -6)",stroke:"currentColor"},stroke:"currentColor",...getStyles("axis"),...xAxisProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.YAxis,{type:"number",dataKey:dataKey.y,height:10,...yAxisWidth,tick:false,tickLine:false,axisLine:false,label:{value:label,position:"insideRight",fontSize:12,fill:"currentColor"},...getStyles("axis"),...yAxisProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ZAxis,{type:"number",dataKey:dataKey.z,domain:getDomain(data,dataKey.z),range,...zAxisProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:100,isAnimationActive:false,cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray:"3 3"},content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(BubbleChartTooltip,{dataKey,active:payload.active,payload:payload.payload,getStyles,valueFormatter}),...tooltipProps}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Scatter,{data,fill:(0,index_mjs_.getThemeColor)(color,theme),isAnimationActive:false,...scatterProps})]})})})});BubbleChart.displayName="@mantine/charts/BubbleChart";BubbleChart.classes=grid_chart_module_css_classes;"use client";const CompositeChart_defaultProps={withXAxis:true,withYAxis:true,withTooltip:true,tooltipAnimationDuration:0,tickLine:"y",strokeDasharray:"5 5",gridAxis:"x",withDots:true,connectNulls:true,strokeWidth:2,curveType:"monotone"};const CompositeChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{textColor,gridColor})=>({root:{"--chart-text-color":textColor?(0,index_mjs_.getThemeColor)(textColor,theme):void 0,"--chart-grid-color":gridColor?(0,index_mjs_.getThemeColor)(gridColor,theme):void 0}}));const CompositeChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("CompositeChart",CompositeChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withLegend,legendProps,series,onMouseLeave,dataKey,withTooltip,withXAxis,withYAxis,gridAxis,tickLine,xAxisProps,yAxisProps,unit,tooltipAnimationDuration,strokeDasharray,gridProps,tooltipProps,referenceLines,withDots,dotProps,activeDotProps,strokeWidth,connectNulls,curveType,dir,valueFormatter,children,lineProps,xAxisLabel,yAxisLabel,withRightYAxis,rightYAxisLabel,rightYAxisProps,withPointLabels,areaProps,barProps,withBarValueLabel,minBarSize,maxBarWidth,composedChartProps,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const withXTickLine="none"!==gridAxis&&("x"===tickLine||"xy"===tickLine);const withYTickLine="none"!==gridAxis&&("y"===tickLine||"xy"===tickLine);const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const shouldHighlight=null!==highlightedArea;const handleMouseLeave=event=>{setHighlightedArea(null);onMouseLeave?.(event)};const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});const getStyles=(0,index_mjs_.useStyles)({name:"CompositeChart",classes:grid_chart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:CompositeChart_varsResolver});const lines=series.map(item=>{const color=(0,index_mjs_.getThemeColor)(item.color,theme);const dimmed=shouldHighlight&&highlightedArea!==item.name;if("line"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Line,{...getStyles("line"),key:item.name,name:item.name,dataKey:item.name,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:color,stroke:color,...dotProps}:false,activeDot:withDots?{fill:"var(--mantine-color-white)",stroke:color,...activeDotProps}:false,fill:color,stroke:color,strokeWidth,isAnimationActive:false,fillOpacity:dimmed?0:1,strokeOpacity:dimmed?.5:1,connectNulls,type:curveType,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof lineProps?lineProps(item):lineProps});if("area"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Area,{...getStyles("area"),key:item.name,name:item.name,type:curveType,dataKey:item.name,fill:color,strokeWidth,stroke:color,isAnimationActive:false,connectNulls,dot:withDots?{fillOpacity:dimmed?0:1,strokeOpacity:dimmed?0:1,strokeWidth:1,fill:color,stroke:color,...dotProps}:false,activeDot:withDots?{fill:theme.white,stroke:color,strokeWidth:2,r:4,...activeDotProps}:false,fillOpacity:dimmed?0:.2,strokeOpacity:dimmed?.5:1,strokeDasharray:item.strokeDasharray,yAxisId:item.yAxisId||"left",label:withPointLabels?/* @__PURE__ */(0,jsx_runtime.jsx)(PointLabel,{valueFormatter}):void 0,..."function"==typeof areaProps?areaProps(item):areaProps});if("bar"===item.type)return/* @__PURE__ */(0,index_js_.createElement)(es6_index_js_.Bar,{...getStyles("bar"),key:item.name,name:item.name,dataKey:item.name,fill:color,stroke:color,isAnimationActive:false,fillOpacity:dimmed?.1:1,strokeOpacity:dimmed?.2:0,yAxisId:item.yAxisId||"left",minPointSize:minBarSize,..."function"==typeof barProps?barProps(item):barProps},withBarValueLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:"top",fontSize:12,fill:"var(--chart-bar-label-color, var(--mantine-color-dimmed))",formatter:val=>valueFormatter?.(val)}));return null});const referenceLinesItems=referenceLines?.map((line,index)=>{const color=(0,index_mjs_.getThemeColor)(line.color,theme);return/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ReferenceLine,{stroke:line.color?color:"var(--chart-grid-color)",strokeWidth:1,yAxisId:line.yAxisId||"left",...line,label:{value:line.label,fill:line.color?color:"currentColor",fontSize:12,position:line.labelPosition??"insideBottomLeft"},...getStyles("referenceLine")},index)});const sharedYAxisProps={axisLine:false,type:"number",tickLine:withYTickLine?{stroke:"currentColor"}:false,allowDecimals:true,unit,tickFormatter:valueFormatter,...getStyles("axis")};return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),onMouseLeave:handleMouseLeave,dir:dir||"ltr",...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{...getStyles("container"),children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.ComposedChart,{data,maxBarSize:maxBarWidth,margin:{bottom:xAxisLabel?30:void 0,left:yAxisLabel?10:void 0,right:yAxisLabel?5:void 0},...composedChartProps,children:[withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"top",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload,onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"top",classNames:resolvedClassNames,styles:resolvedStyles,series,attributes}),...legendProps}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.XAxis,{hide:!withXAxis,dataKey,tick:{transform:"translate(0, 10)",fontSize:12,fill:"currentColor"},stroke:"",interval:"preserveStartEnd",tickLine:withXTickLine?{stroke:"currentColor"}:false,minTickGap:5,...getStyles("axis"),...xAxisProps,children:[xAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideBottom",offset:-20,fontSize:12,...getStyles("axisLabel"),children:xAxisLabel}),xAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"left",orientation:"left",tick:{transform:"translate(-10, 0)",fontSize:12,fill:"currentColor"},hide:!withYAxis,...sharedYAxisProps,...yAxisProps,children:[yAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideLeft",angle:-90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:yAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.YAxis,{yAxisId:"right",orientation:"right",tick:{transform:"translate(10, 0)",fontSize:12,fill:"currentColor"},hide:!withRightYAxis,...sharedYAxisProps,...rightYAxisProps,children:[rightYAxisLabel&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Label,{position:"insideRight",angle:90,textAnchor:"middle",fontSize:12,offset:-5,...getStyles("axisLabel"),children:rightYAxisLabel}),yAxisProps?.children]}),/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.CartesianGrid,{strokeDasharray,vertical:"y"===gridAxis||"xy"===gridAxis,horizontal:"x"===gridAxis||"xy"===gridAxis,...getStyles("grid"),...gridProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:0!==tooltipAnimationDuration,position:{y:0},cursor:{stroke:"var(--chart-grid-color)",strokeWidth:1,strokeDasharray},content:({label,payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{label,payload,unit,classNames:resolvedClassNames,styles:resolvedStyles,series,valueFormatter,attributes}),...tooltipProps}),lines,referenceLinesItems,children]})})})});CompositeChart.displayName="@mantine/charts/CompositeChart";CompositeChart.classes=grid_chart_module_css_classes;"use client";var RadialBarChart_module_css_classes={root:"m_cd2bd9e5",tooltip:"m_6bcc3420"};"use client";const RadialBarChart_defaultProps={barSize:20,startAngle:90,endAngle:-270,withBackground:true,withTooltip:true};const RadialBarChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{emptyBackgroundColor})=>({root:{"--chart-empty-background":emptyBackgroundColor?(0,index_mjs_.getThemeColor)(emptyBackgroundColor,theme):void 0}}));const RadialBarChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("RadialBarChart",RadialBarChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,barSize,withBackground,dataKey,radialBarProps,radialBarChartProps,withLabels,withLegend,legendProps,withTooltip,tooltipProps,startAngle,endAngle,attributes,...others}=props;const[highlightedArea,setHighlightedArea]=(0,index_js_.useState)(null);const getStyles=(0,index_mjs_.useStyles)({name:"RadialBarChart",classes:RadialBarChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:RadialBarChart_varsResolver});const theme=(0,index_mjs_.useMantineTheme)();const dataWithResolvedColor=data.map(({color,...item})=>{const resolvedColor=(0,index_mjs_.getThemeColor)(color,theme);return{...item,fill:resolvedColor,fillOpacity:highlightedArea?highlightedArea===item.name?item.opacity||1:.05:item.opacity||1}});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.RadialBarChart,{margin:{top:0,bottom:0,left:0,right:0},innerRadius:"10%",outerRadius:"100%",cx:"50%",cy:"50%",barSize,startAngle,endAngle,data:dataWithResolvedColor,...radialBarChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.RadialBar,{label:withLabels?{position:"insideStart",fill:"var(--mantine-color-white)",fontSize:12}:void 0,background:withBackground?{fill:"var(--chart-empty-background)"}:void 0,dataKey,isAnimationActive:false,...radialBarProps}),withLegend&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Legend,{verticalAlign:"bottom",content:payload=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartLegend,{payload:payload.payload?.map(item=>({...item,dataKey:item.payload?.name})),onHighlight:setHighlightedArea,legendPosition:legendProps?.verticalAlign||"bottom",classNames:resolvedClassNames,styles:resolvedStyles,centered:true,attributes}),...legendProps}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:0,isAnimationActive:false,cursor:{stroke:"var(--chart-cursor-color)"},content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Paper,{...getStyles("tooltip"),children:[/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Group,{gap:"sm",children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.ColorSwatch,{color:payload?.[0]?.payload.fill,size:12,withShadow:false}),/* @__PURE__ */(0,jsx_runtime.jsx)("span",{children:payload?.[0]?.payload.name})]}),/* @__PURE__ */(0,jsx_runtime.jsx)("span",{children:payload?.[0]?.payload[dataKey]})]}),...tooltipProps})]})})})});RadialBarChart.displayName="@mantine/core/RadialBarChart";RadialBarChart.classes=RadialBarChart_module_css_classes;"use client";var FunnelChart_module_css_classes={root:"m_80d531e7"};"use client";const FunnelChart_defaultProps={withTooltip:true,size:300,strokeWidth:1,withLabels:false,labelsPosition:"right",tooltipDataSource:"all"};const FunnelChart_varsResolver=(0,index_mjs_.createVarsResolver)((theme,{strokeColor,labelColor,size})=>({root:{"--chart-stroke-color":strokeColor?(0,index_mjs_.getThemeColor)(strokeColor,theme):void 0,"--chart-labels-color":labelColor?(0,index_mjs_.getThemeColor)(labelColor,theme):void 0,"--chart-size":(0,index_mjs_.rem)(size)}}));const FunnelChart=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("FunnelChart",FunnelChart_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,withTooltip,tooltipAnimationDuration,tooltipProps,strokeWidth,withLabels,size,valueFormatter,children,funnelChartProps,funnelProps,labelsPosition,tooltipDataSource,attributes,...others}=props;const theme=(0,index_mjs_.useMantineTheme)();const getStyles=(0,index_mjs_.useStyles)({name:"FunnelChart",classes:FunnelChart_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars,varsResolver:FunnelChart_varsResolver});const{resolvedClassNames,resolvedStyles}=(0,index_mjs_.useResolvedStylesApi)({classNames,styles,props});return/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Box,{ref,size,...getStyles("root"),...others,children:/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.ResponsiveContainer,{children:/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.FunnelChart,{...funnelChartProps,children:[/* @__PURE__ */(0,jsx_runtime.jsxs)(es6_index_js_.Funnel,{data,dataKey:"value",isAnimationActive:false,stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth,...funnelProps,children:[withLabels&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.LabelList,{position:labelsPosition,fill:"inside"===labelsPosition?"var(--chart-labels-color, var(--mantine-color-white))":"var(--chart-labels-color, var(--mantine-color-dimmed))",stroke:"none",fontFamily:"var(--mantine-font-family)",fontSize:14,dataKey:entry=>"function"==typeof valueFormatter?valueFormatter(entry.value):entry.value}),data.map((entry,index)=>/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Cell,{fill:(0,index_mjs_.getThemeColor)(entry.color,theme),stroke:"var(--chart-stroke-color, var(--mantine-color-body))",strokeWidth},index))]}),withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)(es6_index_js_.Tooltip,{animationDuration:tooltipAnimationDuration,isAnimationActive:false,content:({payload})=>/* @__PURE__ */(0,jsx_runtime.jsx)(ChartTooltip,{payload:data,classNames:resolvedClassNames,styles:resolvedStyles,type:"radial",segmentId:"segment"===tooltipDataSource?payload?.[0]?.name:void 0,valueFormatter,attributes}),...tooltipProps}),children]})})})});FunnelChart.displayName="@mantine/charts/FunnelChart";FunnelChart.classes=FunnelChart_module_css_classes;"use client";function getBoundaries({data,domain}){if(Array.isArray(domain))return domain;const values=Object.values(data);return[Math.min(...values),Math.max(...values)]}"use client";function formatDate(date){return date.toISOString().split("T")[0]}function addDays(date,days){return new Date(date.getTime()+864e5*days)}function startOfWeek(date,firstDayOfWeek){let value=new Date(date);while(value.getDay()!==firstDayOfWeek)value=addDays(value,-1);return value}function endOfWeek(date,firstDayOfWeek){const day=date.getDay();const diff=(day<firstDayOfWeek?7:0)+day-firstDayOfWeek;return addDays(date,6-diff)}function getDatesRange({startDate,endDate,withOutsideDates=true,firstDayOfWeek=1}={}){const start=startDate?new Date(startDate):new Date(/* @__PURE__ */new Date().getFullYear()-1,/* @__PURE__ */new Date().getMonth(),/* @__PURE__ */new Date().getDate());const end=endDate?new Date(endDate):/* @__PURE__ */new Date;const startWeek=startOfWeek(start,firstDayOfWeek);const endWeek=endOfWeek(end,firstDayOfWeek);const dates=[];let current=startWeek;while(current<=endWeek){const week=Array.from({length:7},(_,i)=>{const day=addDays(current,i);return withOutsideDates||day>=start&&day<=end?formatDate(day):null});dates.push(week);current=addDays(current,7)}return dates}"use client";function getHeatColor({value,min,max,colors}){const percent=(value-min)/(max-min);const colorIndex=Math.round((colors.length-1)*percent);return colors[colorIndex]}"use client";function getMonthsRange(weeksData){let position=0;let current=null;const result=[];weeksData.forEach(week=>{const day=null===week[0]?week[week.length-1]:week[0];const month=new Date(day).getMonth();if(current!==month){current=month;result.push({month:current,position,size:0})}result[result.length-1].size+=1;position+=1});return result}"use client";function rotateWeekdaysNames(weekdayNames,firstDayOfWeek){const rotated=[...weekdayNames];for(let i=0;i<firstDayOfWeek;i+=1)rotated.push(rotated.shift());return rotated}"use client";var Heatmap_module_css_classes={root:"m_2ef228c3",rect:"m_2ef201c5",monthLabel:"m_7e977775",weekdayLabel:"m_c4b68f8d"};"use client";const Heatmap_defaultProps={monthLabels:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdayLabels:["Sun","Mon","","Wed","","Fri",""],withOutsideDates:true,firstDayOfWeek:1,rectSize:10,weekdaysLabelsWidth:30,monthsLabelsHeight:14,gap:1,rectRadius:2,fontSize:12,colors:["var(--heatmap-level-1)","var(--heatmap-level-2)","var(--heatmap-level-3)","var(--heatmap-level-4)"]};const Heatmap=(0,index_mjs_.factory)((_props,ref)=>{const props=(0,index_mjs_.useProps)("Heatmap",Heatmap_defaultProps,_props);const{classNames,className,style,styles,unstyled,vars,data,startDate,endDate,withMonthLabels,withWeekdayLabels,weekdayLabels,withOutsideDates,monthLabels,firstDayOfWeek,rectSize=10,gap=1,rectRadius,domain,colors,weekdaysLabelsWidth,monthsLabelsHeight,fontSize,getTooltipLabel,withTooltip,tooltipProps,getRectProps,attributes,...others}=props;const getStyles=(0,index_mjs_.useStyles)({name:"Heatmap",classes:Heatmap_module_css_classes,props,className,style,classNames,styles,unstyled,attributes,vars});const[hoveredRect,setHoveredRect]=(0,index_js_.useState)(null);const rectSizeWithGap=rectSize+gap;const weekdaysOffset=withWeekdayLabels?weekdaysLabelsWidth:0;const monthsOffset=withMonthLabels?monthsLabelsHeight:0;const[min,max]=getBoundaries({data,domain});const rotatedWeekdayLabels=(0,index_js_.useMemo)(()=>rotateWeekdaysNames(weekdayLabels,firstDayOfWeek),[weekdayLabels,firstDayOfWeek]);const datesRange=getDatesRange({startDate,endDate,withOutsideDates,firstDayOfWeek});const weeks=datesRange.map((week,weekIndex)=>{const days=week.map((date,dayIndex)=>{if(!date)return null;const hasValue=date in data&&null!==data[date];const rectValue=hasValue?data[date]:null;return/* @__PURE__ */(0,jsx_runtime.jsx)("rect",{width:rectSize,height:rectSize,x:gap,y:dayIndex*rectSizeWithGap+gap,rx:rectRadius,"data-empty":!hasValue||void 0,fill:hasValue?getHeatColor({value:data[date],min,max,colors}):void 0,onPointerEnter:withTooltip?()=>setHoveredRect({date,value:rectValue}):void 0,...getRectProps?.({date,value:rectValue}),...getStyles("rect")},date)});return/* @__PURE__ */(0,jsx_runtime.jsx)("g",{transform:`translate(${weekIndex*rectSizeWithGap}, 0)`,"data-id":"week",children:days},weekIndex)});const monthsRange=withMonthLabels?getMonthsRange(datesRange):[];const monthsLabelsNodes=withMonthLabels&&monthLabels?monthsRange.map((month,monthIndex)=>{if(month.size<3)return null;const monthLabel=monthLabels[month.month];return/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:month.position*rectSizeWithGap+gap+weekdaysOffset,y:monthsLabelsHeight-4,width:month.size*rectSizeWithGap,fontSize,...getStyles("monthLabel"),children:monthLabel},monthIndex)}):null;const weekdayLabelsNodes=withWeekdayLabels&&weekdayLabels?rotatedWeekdayLabels.map((weekdayLabel,dayIndex)=>/* @__PURE__ */(0,jsx_runtime.jsx)("text",{x:0,y:(dayIndex+1)*rectSizeWithGap-gap+monthsOffset,width:weekdaysLabelsWidth,fontSize,...getStyles("weekdayLabel"),children:weekdayLabel},dayIndex)):null;const label=getTooltipLabel&&hoveredRect&&withTooltip?getTooltipLabel(hoveredRect):null;return/* @__PURE__ */(0,jsx_runtime.jsxs)(index_mjs_.Box,{component:"svg",ref,width:rectSizeWithGap*datesRange.length+gap+weekdaysOffset,height:7*rectSizeWithGap+gap+monthsOffset,...getStyles("root"),...others,children:[/* @__PURE__ */(0,jsx_runtime.jsx)(index_mjs_.Tooltip.Floating,{label,disabled:!withTooltip||!label,position:"top",...tooltipProps,children:/* @__PURE__ */(0,jsx_runtime.jsxs)("g",{transform:`translate(${weekdaysOffset}, ${monthsOffset})`,"data-id":"all-weeks",children:[withTooltip&&/* @__PURE__ */(0,jsx_runtime.jsx)("rect",{fill:"transparent",width:rectSizeWithGap*datesRange.length+gap,height:7*rectSizeWithGap+gap}),weeks]})}),weekdayLabelsNodes,monthsLabelsNodes]})});Heatmap.displayName="@mantine/charts/Heatmap";Heatmap.classes=Heatmap_module_css_classes}}]);
|
package/dist/mf/182.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var React=__webpack_require__(
|
|
10
|
+
*/var React=__webpack_require__(3106);function formatProdErrorMessage(code){var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function noop(){}var Internals={d:{f:noop,r:function(){throw Error(formatProdErrorMessage(522))},D:noop,C:noop,L:noop,m:noop,X:noop,S:noop,M:noop},p:0,findDOMNode:null},REACT_PORTAL_TYPE=Symbol.for("react.portal");function createPortal$1(children,containerInfo,implementation){var key=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:REACT_PORTAL_TYPE,key:null==key?null:""+key,children:children,containerInfo:containerInfo,implementation:implementation}}var ReactSharedInternals=React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function getCrossOriginStringAs(as,input){if("font"===as)return"";if("string"==typeof input)return"use-credentials"===input?input:""}exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Internals;exports.createPortal=function(children,container){var key=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!container||1!==container.nodeType&&9!==container.nodeType&&11!==container.nodeType)throw Error(formatProdErrorMessage(299));return createPortal$1(children,container,null,key)};exports.flushSync=function(fn){var previousTransition=ReactSharedInternals.T,previousUpdatePriority=Internals.p;try{if(ReactSharedInternals.T=null,Internals.p=2,fn)return fn()}finally{ReactSharedInternals.T=previousTransition,Internals.p=previousUpdatePriority,Internals.d.f()}};exports.preconnect=function(href,options){"string"==typeof href&&(options?(options=options.crossOrigin,options="string"==typeof options?"use-credentials"===options?options:"":void 0):options=null,Internals.d.C(href,options))};exports.prefetchDNS=function(href){"string"==typeof href&&Internals.d.D(href)};exports.preinit=function(href,options){if("string"==typeof href&&options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin),integrity="string"==typeof options.integrity?options.integrity:void 0,fetchPriority="string"==typeof options.fetchPriority?options.fetchPriority:void 0;"style"===as?Internals.d.S(href,"string"==typeof options.precedence?options.precedence:void 0,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority}):"script"===as&&Internals.d.X(href,{crossOrigin:crossOrigin,integrity:integrity,fetchPriority:fetchPriority,nonce:"string"==typeof options.nonce?options.nonce:void 0})}};exports.preinitModule=function(href,options){if("string"==typeof href)if("object"==typeof options&&null!==options){if(null==options.as||"script"===options.as){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.M(href,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0})}}else null==options&&Internals.d.M(href)};exports.preload=function(href,options){if("string"==typeof href&&"object"==typeof options&&null!==options&&"string"==typeof options.as){var as=options.as,crossOrigin=getCrossOriginStringAs(as,options.crossOrigin);Internals.d.L(href,as,{crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0,nonce:"string"==typeof options.nonce?options.nonce:void 0,type:"string"==typeof options.type?options.type:void 0,fetchPriority:"string"==typeof options.fetchPriority?options.fetchPriority:void 0,referrerPolicy:"string"==typeof options.referrerPolicy?options.referrerPolicy:void 0,imageSrcSet:"string"==typeof options.imageSrcSet?options.imageSrcSet:void 0,imageSizes:"string"==typeof options.imageSizes?options.imageSizes:void 0,media:"string"==typeof options.media?options.media:void 0})}};exports.preloadModule=function(href,options){if("string"==typeof href)if(options){var crossOrigin=getCrossOriginStringAs(options.as,options.crossOrigin);Internals.d.m(href,{as:"string"==typeof options.as&&"script"!==options.as?options.as:void 0,crossOrigin:crossOrigin,integrity:"string"==typeof options.integrity?options.integrity:void 0})}else Internals.d.m(href)};exports.requestFormReset=function(form){Internals.d.r(form)};exports.unstable_batchedUpdates=function(fn,a){return fn(a)};exports.useFormState=function(action,initialState,permalink){return ReactSharedInternals.H.useFormState(action,initialState,permalink)};exports.useFormStatus=function(){return ReactSharedInternals.H.useHostTransitionStatus()};exports.version="19.2.0"},5970:function(module,__unused_webpack_exports,__webpack_require__){function checkDCE(){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__||"function"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(err){console.error(err)}}checkDCE();module.exports=__webpack_require__(7015)}}]);
|