@tmf_ciclica/ciclicastorybook 1.2.160 → 1.2.161
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -80,4 +80,4 @@ export default theme;`}function us(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
80
80
|
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Gu(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Ye=e=>{try{return e()}catch{}},Yu=(e="mui")=>pu(e);function _r(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=Wu({...n,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return}const{palette:a,...c}=Dr({...r,palette:{mode:i,...n==null?void 0:n.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...ji(i),...n==null?void 0:n.opacity},overlays:(n==null?void 0:n.overlays)||$i(i)},c}function Xu(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:c=Uu,colorSchemeSelector:u=n.light&&n.dark?"media":void 0,rootSelector:d=":root",...m}=e,g=Object.keys(n)[0],y=r||(n.light&&g!=="light"?"light":g),h=Yu(i),{[y]:b,light:f,dark:x,..._}=n,S={..._};let E=b;if((y==="dark"&&!("dark"in n)||y==="light"&&!("light"in n))&&(E=!0),!E)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${y}\` option is either missing or invalid.`:jt(21,y));let C;a&&(C="oklch");const v=_r(C,S,E,m,y);f&&!S.light&&_r(C,S,f,void 0,"light"),x&&!S.dark&&_r(C,S,x,void 0,"dark");let T={defaultColorScheme:y,...v,cssVarPrefix:i,colorSchemeSelector:u,rootSelector:d,getCssVar:h,colorSchemes:S,font:{...ku(v.typography),...v.font},spacing:Gu(m.spacing)};Object.keys(T.colorSchemes).forEach(I=>{const p=T.colorSchemes[I].palette,N=V=>{const W=V.split("-"),D=W[1],q=W[2];return h(V,p[D][q])};p.mode==="light"&&(O(p.common,"background","#fff"),O(p.common,"onBackground","#000")),p.mode==="dark"&&(O(p.common,"background","#000"),O(p.common,"onBackground","#fff"));function j(V,W,D){if(C){let q;return V===_t&&(q=`transparent ${((1-D)*100).toFixed(0)}%`),V===fe&&(q=`#000 ${(D*100).toFixed(0)}%`),V===pe&&(q=`#fff ${(D*100).toFixed(0)}%`),`color-mix(in ${C}, ${W}, ${q})`}return V(W,D)}if(Ku(p,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),p.mode==="light"){O(p.Alert,"errorColor",j(fe,a?h("palette-error-light"):p.error.light,.6)),O(p.Alert,"infoColor",j(fe,a?h("palette-info-light"):p.info.light,.6)),O(p.Alert,"successColor",j(fe,a?h("palette-success-light"):p.success.light,.6)),O(p.Alert,"warningColor",j(fe,a?h("palette-warning-light"):p.warning.light,.6)),O(p.Alert,"errorFilledBg",N("palette-error-main")),O(p.Alert,"infoFilledBg",N("palette-info-main")),O(p.Alert,"successFilledBg",N("palette-success-main")),O(p.Alert,"warningFilledBg",N("palette-warning-main")),O(p.Alert,"errorFilledColor",Ye(()=>p.getContrastText(p.error.main))),O(p.Alert,"infoFilledColor",Ye(()=>p.getContrastText(p.info.main))),O(p.Alert,"successFilledColor",Ye(()=>p.getContrastText(p.success.main))),O(p.Alert,"warningFilledColor",Ye(()=>p.getContrastText(p.warning.main))),O(p.Alert,"errorStandardBg",j(pe,a?h("palette-error-light"):p.error.light,.9)),O(p.Alert,"infoStandardBg",j(pe,a?h("palette-info-light"):p.info.light,.9)),O(p.Alert,"successStandardBg",j(pe,a?h("palette-success-light"):p.success.light,.9)),O(p.Alert,"warningStandardBg",j(pe,a?h("palette-warning-light"):p.warning.light,.9)),O(p.Alert,"errorIconColor",N("palette-error-main")),O(p.Alert,"infoIconColor",N("palette-info-main")),O(p.Alert,"successIconColor",N("palette-success-main")),O(p.Alert,"warningIconColor",N("palette-warning-main")),O(p.AppBar,"defaultBg",N("palette-grey-100")),O(p.Avatar,"defaultBg",N("palette-grey-400")),O(p.Button,"inheritContainedBg",N("palette-grey-300")),O(p.Button,"inheritContainedHoverBg",N("palette-grey-A100")),O(p.Chip,"defaultBorder",N("palette-grey-400")),O(p.Chip,"defaultAvatarColor",N("palette-grey-700")),O(p.Chip,"defaultIconColor",N("palette-grey-700")),O(p.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),O(p.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),O(p.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),O(p.LinearProgress,"primaryBg",j(pe,a?h("palette-primary-main"):p.primary.main,.62)),O(p.LinearProgress,"secondaryBg",j(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),O(p.LinearProgress,"errorBg",j(pe,a?h("palette-error-main"):p.error.main,.62)),O(p.LinearProgress,"infoBg",j(pe,a?h("palette-info-main"):p.info.main,.62)),O(p.LinearProgress,"successBg",j(pe,a?h("palette-success-main"):p.success.main,.62)),O(p.LinearProgress,"warningBg",j(pe,a?h("palette-warning-light"):p.warning.main,.62)),O(p.Skeleton,"bg",C?j(_t,a?h("palette-text-primary"):p.text.primary,.11):`rgba(${N("palette-text-primaryChannel")} / 0.11)`),O(p.Slider,"primaryTrack",j(pe,a?h("palette-primary-main"):p.primary.main,.62)),O(p.Slider,"secondaryTrack",j(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),O(p.Slider,"errorTrack",j(pe,a?h("palette-error-main"):p.error.main,.62)),O(p.Slider,"infoTrack",j(pe,a?h("palette-info-main"):p.info.main,.62)),O(p.Slider,"successTrack",j(pe,a?h("palette-success-main"):p.success.main,.62)),O(p.Slider,"warningTrack",j(pe,a?h("palette-warning-main"):p.warning.main,.62));const V=C?j(fe,a?h("palette-background-default"):p.background.default,.6825):En(p.background.default,.8);O(p.SnackbarContent,"bg",V),O(p.SnackbarContent,"color",Ye(()=>C?Ir.text.primary:p.getContrastText(V))),O(p.SpeedDialAction,"fabHoverBg",En(p.background.paper,.15)),O(p.StepConnector,"border",N("palette-grey-400")),O(p.StepContent,"border",N("palette-grey-400")),O(p.Switch,"defaultColor",N("palette-common-white")),O(p.Switch,"defaultDisabledColor",N("palette-grey-100")),O(p.Switch,"primaryDisabledColor",j(pe,a?h("palette-primary-main"):p.primary.main,.62)),O(p.Switch,"secondaryDisabledColor",j(pe,a?h("palette-secondary-main"):p.secondary.main,.62)),O(p.Switch,"errorDisabledColor",j(pe,a?h("palette-error-main"):p.error.main,.62)),O(p.Switch,"infoDisabledColor",j(pe,a?h("palette-info-main"):p.info.main,.62)),O(p.Switch,"successDisabledColor",j(pe,a?h("palette-success-main"):p.success.main,.62)),O(p.Switch,"warningDisabledColor",j(pe,a?h("palette-warning-main"):p.warning.main,.62)),O(p.TableCell,"border",j(pe,_t(a?h("palette-divider"):p.divider,1),.88)),O(p.Tooltip,"bg",j(_t,a?h("palette-grey-700"):p.grey[700],.92))}if(p.mode==="dark"){O(p.Alert,"errorColor",j(pe,a?h("palette-error-light"):p.error.light,.6)),O(p.Alert,"infoColor",j(pe,a?h("palette-info-light"):p.info.light,.6)),O(p.Alert,"successColor",j(pe,a?h("palette-success-light"):p.success.light,.6)),O(p.Alert,"warningColor",j(pe,a?h("palette-warning-light"):p.warning.light,.6)),O(p.Alert,"errorFilledBg",N("palette-error-dark")),O(p.Alert,"infoFilledBg",N("palette-info-dark")),O(p.Alert,"successFilledBg",N("palette-success-dark")),O(p.Alert,"warningFilledBg",N("palette-warning-dark")),O(p.Alert,"errorFilledColor",Ye(()=>p.getContrastText(p.error.dark))),O(p.Alert,"infoFilledColor",Ye(()=>p.getContrastText(p.info.dark))),O(p.Alert,"successFilledColor",Ye(()=>p.getContrastText(p.success.dark))),O(p.Alert,"warningFilledColor",Ye(()=>p.getContrastText(p.warning.dark))),O(p.Alert,"errorStandardBg",j(fe,a?h("palette-error-light"):p.error.light,.9)),O(p.Alert,"infoStandardBg",j(fe,a?h("palette-info-light"):p.info.light,.9)),O(p.Alert,"successStandardBg",j(fe,a?h("palette-success-light"):p.success.light,.9)),O(p.Alert,"warningStandardBg",j(fe,a?h("palette-warning-light"):p.warning.light,.9)),O(p.Alert,"errorIconColor",N("palette-error-main")),O(p.Alert,"infoIconColor",N("palette-info-main")),O(p.Alert,"successIconColor",N("palette-success-main")),O(p.Alert,"warningIconColor",N("palette-warning-main")),O(p.AppBar,"defaultBg",N("palette-grey-900")),O(p.AppBar,"darkBg",N("palette-background-paper")),O(p.AppBar,"darkColor",N("palette-text-primary")),O(p.Avatar,"defaultBg",N("palette-grey-600")),O(p.Button,"inheritContainedBg",N("palette-grey-800")),O(p.Button,"inheritContainedHoverBg",N("palette-grey-700")),O(p.Chip,"defaultBorder",N("palette-grey-700")),O(p.Chip,"defaultAvatarColor",N("palette-grey-300")),O(p.Chip,"defaultIconColor",N("palette-grey-300")),O(p.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),O(p.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),O(p.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),O(p.LinearProgress,"primaryBg",j(fe,a?h("palette-primary-main"):p.primary.main,.5)),O(p.LinearProgress,"secondaryBg",j(fe,a?h("palette-secondary-main"):p.secondary.main,.5)),O(p.LinearProgress,"errorBg",j(fe,a?h("palette-error-main"):p.error.main,.5)),O(p.LinearProgress,"infoBg",j(fe,a?h("palette-info-main"):p.info.main,.5)),O(p.LinearProgress,"successBg",j(fe,a?h("palette-success-main"):p.success.main,.5)),O(p.LinearProgress,"warningBg",j(fe,a?h("palette-warning-main"):p.warning.main,.5)),O(p.Skeleton,"bg",C?j(_t,a?h("palette-text-primary"):p.text.primary,.13):`rgba(${N("palette-text-primaryChannel")} / 0.13)`),O(p.Slider,"primaryTrack",j(fe,a?h("palette-primary-main"):p.primary.main,.5)),O(p.Slider,"secondaryTrack",j(fe,a?h("palette-secondary-main"):p.secondary.main,.5)),O(p.Slider,"errorTrack",j(fe,a?h("palette-error-main"):p.error.main,.5)),O(p.Slider,"infoTrack",j(fe,a?h("palette-info-main"):p.info.main,.5)),O(p.Slider,"successTrack",j(fe,a?h("palette-success-main"):p.success.main,.5)),O(p.Slider,"warningTrack",j(fe,a?h("palette-warning-light"):p.warning.main,.5));const V=C?j(pe,a?h("palette-background-default"):p.background.default,.985):En(p.background.default,.98);O(p.SnackbarContent,"bg",V),O(p.SnackbarContent,"color",Ye(()=>C?Si.text.primary:p.getContrastText(V))),O(p.SpeedDialAction,"fabHoverBg",En(p.background.paper,.15)),O(p.StepConnector,"border",N("palette-grey-600")),O(p.StepContent,"border",N("palette-grey-600")),O(p.Switch,"defaultColor",N("palette-grey-300")),O(p.Switch,"defaultDisabledColor",N("palette-grey-600")),O(p.Switch,"primaryDisabledColor",j(fe,a?h("palette-primary-main"):p.primary.main,.55)),O(p.Switch,"secondaryDisabledColor",j(fe,a?h("palette-secondary-main"):p.secondary.main,.55)),O(p.Switch,"errorDisabledColor",j(fe,a?h("palette-error-main"):p.error.main,.55)),O(p.Switch,"infoDisabledColor",j(fe,a?h("palette-info-main"):p.info.main,.55)),O(p.Switch,"successDisabledColor",j(fe,a?h("palette-success-main"):p.success.main,.55)),O(p.Switch,"warningDisabledColor",j(fe,a?h("palette-warning-light"):p.warning.main,.55)),O(p.TableCell,"border",j(fe,_t(a?h("palette-divider"):p.divider,1),.68)),O(p.Tooltip,"bg",j(_t,a?h("palette-grey-700"):p.grey[700],.92))}a||(rt(p.background,"default"),rt(p.background,"paper"),rt(p.common,"background"),rt(p.common,"onBackground"),rt(p,"divider")),Object.keys(p).forEach(V=>{const W=p[V];V!=="tonalOffset"&&!a&&W&&typeof W=="object"&&(W.main&&O(p[V],"mainChannel",rn(on(W.main))),W.light&&O(p[V],"lightChannel",rn(on(W.light))),W.dark&&O(p[V],"darkChannel",rn(on(W.dark))),W.contrastText&&O(p[V],"contrastTextChannel",rn(on(W.contrastText))),V==="text"&&(rt(p[V],"primary"),rt(p[V],"secondary")),V==="action"&&(W.active&&rt(p[V],"active"),W.selected&&rt(p[V],"selected")))})}),T=t.reduce((I,p)=>qe(I,p),T);const A={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:Hu(T),enableContrastVars:a},{vars:k,generateThemeVars:$,generateStyleSheets:P}=gu(T,A);return T.vars=k,Object.entries(T.colorSchemes[T.defaultColorScheme]).forEach(([I,p])=>{T[I]=p}),T.generateThemeVars=$,T.generateStyleSheets=P,T.generateSpacing=function(){return hi(m.spacing,Kr(this))},T.getColorSchemeSelector=yu(u),T.spacing=T.generateSpacing(),T.shouldSkipGeneratingVar=c,T.unstable_sxConfig={...Qn,...m==null?void 0:m.unstable_sxConfig},T.unstable_sx=function(p){return Ut({sx:p,theme:this})},T.toRuntimeSource=ki,T}function ds(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Qr({...n===!0?{}:n.palette,mode:t})})}function Qu(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,c=i||"light",u=o==null?void 0:o[c],d={...o,...n?{[c]:{...typeof u!="boolean"&&u,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Dr(e,...t);let m=n;"palette"in e||d[c]&&(d[c]!==!0?m=d[c].palette:c==="dark"&&(m={mode:"dark"}));const g=Dr({...e,palette:m},...t);return g.defaultColorScheme=c,g.colorSchemes=d,g.palette.mode==="light"&&(g.colorSchemes.light={...d.light!==!0&&d.light,palette:g.palette},ds(g,"dark",d.dark)),g.palette.mode==="dark"&&(g.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:g.palette},ds(g,"light",d.light)),g}return!n&&!("light"in d)&&c==="light"&&(d.light=!0),Xu({...a,colorSchemes:d,defaultColorScheme:c,...typeof r!="boolean"&&r},...t)}const Ju=Qu(),e1="$$material";function Jr(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const t1=e=>Jr(e)&&e!=="classes",Nt=tu({themeId:e1,defaultTheme:Ju,rootShouldForwardProp:t1}),Ht=fu;process.env.NODE_ENV!=="production"&&(s.node,s.object.isRequired);function n1(e){return du(e)}const r1=e=>!e||!an(e);function o1(e){return typeof e.main=="string"}function s1(e,t=[]){if(!o1(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function eo(e=[]){return([,t])=>t&&s1(t,e)}function i1(e){return Yr("MuiSlider",e)}const He=Y2("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),a1=e=>{const{open:t}=e;return{offset:ht(t&&He.valueLabelOpen),circle:He.valueLabelCircle,label:He.valueLabelLabel}};function Ei(e){const{children:t,className:n,value:r}=e,o=a1(e);return t?Q.cloneElement(t,{className:t.props.className},l.jsxs(Q.Fragment,{children:[t.props.children,l.jsx("span",{className:ht(o.offset,n),"aria-hidden":!0,children:l.jsx("span",{className:o.circle,children:l.jsx("span",{className:o.label,children:r})})})]})):null}process.env.NODE_ENV!=="production"&&(Ei.propTypes={children:s.element.isRequired,className:s.string,value:s.node});function fs(e){return e}const l1=Nt("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ge(n.color)}`],n.size!=="medium"&&t[`size${Ge(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(Ht(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${He.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${He.dragging}`]:{[`& .${He.thumb}, & .${He.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(eo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),c1=Nt("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),u1=Nt("span",{name:"MuiSlider",slot:"Track"})(Ht(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(eo()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),d1=Nt("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Ge(n.color)}`],n.size!=="medium"&&t[`thumbSize${Ge(n.size)}`]]}})(Ht(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${He.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(eo()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${He.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${He.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),Ni=Nt(Ei,{name:"MuiSlider",slot:"ValueLabel"})(Ht(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${He.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${He.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})));process.env.NODE_ENV!=="production"&&(Ni.propTypes={children:s.element.isRequired,index:s.number.isRequired,open:s.bool.isRequired,value:s.node});const f1=Nt("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Jr(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(Ht(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),p1=Nt("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Jr(e)&&e!=="markLabelActive"})(Ht(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),m1=e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:a,color:c,size:u}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",o==="vertical"&&"vertical",i==="inverted"&&"trackInverted",i===!1&&"trackFalse",c&&`color${Ge(c)}`,u&&`size${Ge(u)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",u&&`thumbSize${Ge(u)}`,c&&`thumbColor${Ge(c)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return S0(d,i1,a)},h1=({children:e})=>e,Oi=Q.forwardRef(function(t,n){const r=n1({props:t,name:"MuiSlider"}),o=k0(),{"aria-label":i,"aria-valuetext":a,"aria-labelledby":c,component:u="span",components:d={},componentsProps:m={},color:g="primary",classes:y,className:h,disableSwap:b=!1,disabled:f=!1,getAriaLabel:x,getAriaValueText:_,marks:S=!1,max:E=100,min:C=0,name:v,onChange:T,onChangeCommitted:A,orientation:k="horizontal",shiftStep:$=10,size:P="medium",step:I=1,scale:p=fs,slotProps:N,slots:j,tabIndex:V,track:W="normal",value:D,valueLabelDisplay:q="off",valueLabelFormat:te=fs,...L}=r,M={...r,isRtl:o,max:E,min:C,classes:y,disabled:f,disableSwap:b,orientation:k,marks:S,color:g,size:P,step:I,shiftStep:$,scale:p,track:W,valueLabelDisplay:q,valueLabelFormat:te},{axisProps:H,getRootProps:J,getHiddenInputProps:F,getThumbProps:K,open:re,active:ne,axis:oe,focusedThumbIndex:ee,range:G,dragging:be,marks:z,values:le,trackOffset:Ce,trackLeap:ct,getThumbStyle:De}=P0({...M,rootRef:n});M.marked=z.length>0&&z.some(je=>je.label),M.dragging=be,M.focusedThumbIndex=ee;const Ee=m1(M),tt=(j==null?void 0:j.root)??d.Root??l1,U=(j==null?void 0:j.rail)??d.Rail??c1,ae=(j==null?void 0:j.track)??d.Track??u1,me=(j==null?void 0:j.thumb)??d.Thumb??d1,_e=(j==null?void 0:j.valueLabel)??d.ValueLabel??Ni,ke=(j==null?void 0:j.mark)??d.Mark??f1,Ve=(j==null?void 0:j.markLabel)??d.MarkLabel??p1,R=(j==null?void 0:j.input)??d.Input??"input",B=(N==null?void 0:N.root)??m.root,Z=(N==null?void 0:N.rail)??m.rail,X=(N==null?void 0:N.track)??m.track,ie=(N==null?void 0:N.thumb)??m.thumb,Y=(N==null?void 0:N.valueLabel)??m.valueLabel,Ae=(N==null?void 0:N.mark)??m.mark,Re=(N==null?void 0:N.markLabel)??m.markLabel,Ne=(N==null?void 0:N.input)??m.input,We=ft({elementType:tt,getSlotProps:J,externalSlotProps:B,externalForwardedProps:L,additionalProps:{...r1(tt)&&{as:u}},ownerState:{...M,...B==null?void 0:B.ownerState},className:[Ee.root,h]}),Gt=ft({elementType:U,externalSlotProps:Z,ownerState:M,className:Ee.rail}),ia=ft({elementType:ae,externalSlotProps:X,additionalProps:{style:{...H[oe].offset(Ce),...H[oe].leap(ct)}},ownerState:{...M,...X==null?void 0:X.ownerState},className:Ee.track}),nr=ft({elementType:me,getSlotProps:K,externalSlotProps:ie,ownerState:{...M,...ie==null?void 0:ie.ownerState},className:Ee.thumb}),aa=ft({elementType:_e,externalSlotProps:Y,ownerState:{...M,...Y==null?void 0:Y.ownerState},className:Ee.valueLabel}),rr=ft({elementType:ke,externalSlotProps:Ae,ownerState:M,className:Ee.mark}),or=ft({elementType:Ve,externalSlotProps:Re,ownerState:M,className:Ee.markLabel}),la=ft({elementType:R,getSlotProps:F,externalSlotProps:Ne,ownerState:M});return l.jsxs(tt,{...We,children:[l.jsx(U,{...Gt}),l.jsx(ae,{...ia}),z.filter(je=>je.value>=C&&je.value<=E).map((je,Le)=>{const sr=Pn(je.value,C,E),gn=H[oe].offset(sr);let nt;return W===!1?nt=le.includes(je.value):nt=W==="normal"&&(G?je.value>=le[0]&&je.value<=le[le.length-1]:je.value<=le[0])||W==="inverted"&&(G?je.value<=le[0]||je.value>=le[le.length-1]:je.value>=le[0]),l.jsxs(Q.Fragment,{children:[l.jsx(ke,{"data-index":Le,...rr,...!an(ke)&&{markActive:nt},style:{...gn,...rr.style},className:ht(rr.className,nt&&Ee.markActive)}),je.label!=null?l.jsx(Ve,{"aria-hidden":!0,"data-index":Le,...or,...!an(Ve)&&{markLabelActive:nt},style:{...gn,...or.style},className:ht(Ee.markLabel,or.className,nt&&Ee.markLabelActive),children:je.label}):null]},Le)}),le.map((je,Le)=>{const sr=Pn(je,C,E),gn=H[oe].offset(sr),nt=q==="off"?h1:_e;return l.jsx(nt,{...!an(nt)&&{valueLabelFormat:te,valueLabelDisplay:q,value:typeof te=="function"?te(p(je),Le):te,index:Le,open:re===Le||ne===Le||q==="on",disabled:f},...aa,children:l.jsx(me,{"data-index":Le,...nr,className:ht(Ee.thumb,nr.className,ne===Le&&Ee.active,ee===Le&&Ee.focusVisible),style:{...gn,...De(Le),...nr.style},children:l.jsx(R,{"data-index":Le,"aria-label":x?x(Le):i,"aria-valuenow":p(je),"aria-labelledby":c,"aria-valuetext":_?_(p(je),Le):a,value:le[Le],...la})})},Le)})]})});process.env.NODE_ENV!=="production"&&(Oi.propTypes={"aria-label":Do(s.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-label"]!=null?new Error("MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider."):null),"aria-labelledby":s.string,"aria-valuetext":Do(s.string,e=>Array.isArray(e.value||e.defaultValue)&&e["aria-valuetext"]!=null?new Error("MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider."):null),children:s.node,classes:s.object,className:s.string,color:s.oneOfType([s.oneOf(["primary","secondary","error","info","success","warning"]),s.string]),components:s.shape({Input:s.elementType,Mark:s.elementType,MarkLabel:s.elementType,Rail:s.elementType,Root:s.elementType,Thumb:s.elementType,Track:s.elementType,ValueLabel:s.elementType}),componentsProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),defaultValue:s.oneOfType([s.arrayOf(s.number),s.number]),disabled:s.bool,disableSwap:s.bool,getAriaLabel:s.func,getAriaValueText:s.func,marks:s.oneOfType([s.arrayOf(s.shape({label:s.node,value:s.number.isRequired})),s.bool]),max:s.number,min:s.number,name:s.string,onChange:s.func,onChangeCommitted:s.func,orientation:s.oneOf(["horizontal","vertical"]),scale:s.func,shiftStep:s.number,size:s.oneOfType([s.oneOf(["small","medium"]),s.string]),slotProps:s.shape({input:s.oneOfType([s.func,s.object]),mark:s.oneOfType([s.func,s.object]),markLabel:s.oneOfType([s.func,s.object]),rail:s.oneOfType([s.func,s.object]),root:s.oneOfType([s.func,s.object]),thumb:s.oneOfType([s.func,s.object]),track:s.oneOfType([s.func,s.object]),valueLabel:s.oneOfType([s.func,s.shape({children:s.element,className:s.string,open:s.bool,style:s.object,value:s.node,valueLabelDisplay:s.oneOf(["auto","off","on"])})])}),slots:s.shape({input:s.elementType,mark:s.elementType,markLabel:s.elementType,rail:s.elementType,root:s.elementType,thumb:s.elementType,track:s.elementType,valueLabel:s.elementType}),step:s.number,sx:s.oneOfType([s.arrayOf(s.oneOfType([s.func,s.object,s.bool])),s.func,s.object]),tabIndex:s.number,track:s.oneOf(["inverted","normal",!1]),value:s.oneOfType([s.arrayOf(s.number),s.number]),valueLabelDisplay:s.oneOf(["auto","off","on"]),valueLabelFormat:s.oneOfType([s.func,s.string])});const g1="_slider_1prh1_2",y1="_playButton_1prh1_14",b1="_sliderOpen_1prh1_25",v1="_sliderResults_1prh1_29",Qt={slider:g1,playButton:y1,sliderOpen:b1,sliderResults:v1},Ai=({onResults:e=!1,defaultYear:t=2025,firstYear:n=2025,lastYear:r=2050,marcas:o=null,zIndex:i=10,rightBarOpen:a=!1,conditionToBeRuning:c=null,onChange:u=d=>{console.log("year changed to ",d)}})=>{const m=o||((C,v)=>{const T=[];T.push({label:"",value:C});const A=Math.ceil(C/10)*10;for(let k=A;k<v;k+=10)T.push({label:"",value:k});return T[T.length-1].value!==v&&T.push({label:"",value:v}),T})(n,r),[g,y]=w.useState(t);w.useEffect(()=>{y(t)},[t]);const h=(C,v)=>{y(v),u(v)},[b,f]=w.useState(!1);w.useEffect(()=>{t&&console.log("defaultYear changed:",t),t&&y(t)},[t]),w.useEffect(()=>{c===!1&&f(!1)},[c]);const x=()=>{f(!0)},_=()=>{f(!1)};((C,v,T=[])=>{const A=w.useRef();w.useEffect(()=>{A.current=C},[C]),w.useEffect(()=>{function k(){A.current()}{let $=setInterval(k,v);return()=>clearInterval($)}},[v,...T])})(()=>{b&&y(C=>{const v=C+1;return v>r?(u(n),n):(u(v),v)})},1e3,[n,r,b]);const E=co.createTheme({palette:{primary:{main:"#605b56"}},components:{MuiSlider:{styleOverrides:{mark:{height:10,backgroundColor:"#605b56"},valueLabel:{backgroundColor:"transparent",color:"#605b56",padding:0,top:3}}}}});return l.jsx(xa.ThemeProvider,{theme:E,children:l.jsxs(co.Box,{sx:{width:400},className:`${e?Qt.sliderResults:Qt.slider} ${a?Qt.sliderOpen:""}`,style:{zIndex:i},children:[n,l.jsx(Oi,{"aria-label":"TimeSlider",value:g,valueLabelDisplay:"on",step:1,marks:m,min:n,max:r,onChange:h,color:"primary",size:"small"}),r,!b&&l.jsx("button",{className:Qt.playButton,onClick:x,children:l.jsx("img",{src:_0,alt:"Play"})}),b&&l.jsx("button",{className:Qt.playButton,onClick:_,children:l.jsx("img",{src:w0,alt:"Pause"})})]})})};Ai.propTypes={defaultYear:s.number,onResults:s.bool,firstYear:s.number,lastYear:s.number,marcas:s.arrayOf(s.shape({label:s.string,value:s.number})),zIndex:s.number,rightBarOpen:s.bool,onChange:s.func};const x1="_TopNavMenuContainer_12mp4_2",C1="_topNavOptions_12mp4_13",_1="_active_12mp4_27",wr={TopNavMenuContainer:x1,topNavOptions:C1,active:_1},Li=({options:e=[],containerStyles:t,borderColor:n="red",textColor:r="white",onChangeNavLink:o=i=>{console.log("Changed NavLink",i)}})=>{const{t:i}=se.useTranslation();return l.jsx("div",{className:wr.TopNavMenuContainer,style:{...t},children:e.map((a,c)=>l.jsx(As.NavLink,{to:a.url,className:({isActive:u})=>`${wr.topNavOptions} ${u?wr.active:""} `,onClick:()=>o(a.url),style:({isActive:u})=>({color:r,borderBottom:u?`5px solid ${n}`:"5px solid transparent"}),children:i(a.name)},c))})};Li.propTypes={options:s.arrayOf(s.object),cssProps:s.shape({borderColor:s.string.isRequired,textColor:s.string.isRequired})};const w1="_LogInButton_1vxj5_2",S1={LogInButton:w1},Mi=({cssClass:e,notLoggedInLabel:t="Log in",loggedInLabel:n="Log out",containerStyles:r,userName:o="",isLoggedIn:i=!1,onClickLogIn:a=()=>{console.log("Login clicked")},onClickLogOut:c=()=>{console.log("Logout clicked")}})=>{const{t:u}=se.useTranslation();return l.jsx("div",{style:{...r},className:`${S1.LogInButton} link ${e}`,onClick:i?c:a,children:i?o||u(n):u(t)})};Mi.propTypes={cssClass:s.string,notLoggedInLabel:s.string,loggedInLabel:s.string,containerStyles:s.object,userName:s.string,isLoggedIn:s.bool};const T1="_elementSelector_1ox68_2",k1="_header_1ox68_14",j1="_nameDateContainer_1ox68_24",$1="_elementName_1ox68_40",E1="_elementDate_1ox68_54",N1="_buttonsContainer_1ox68_68",O1="_elementListContainer_1ox68_77",A1="_newElementButtonContainer_1ox68_81",ot={elementSelector:T1,header:k1,nameDateContainer:j1,elementName:$1,elementDate:E1,buttonsContainer:N1,elementListContainer:O1,newElementButtonContainer:A1},L1="_listElement_s4s4h_3",M1="_elementNameDate_s4s4h_19",R1="_elementNameContainer_s4s4h_30",I1="_elementName_s4s4h_19",D1="_elementDate_s4s4h_47",B1="_nameAndEye_s4s4h_50",P1="_elementButtons_s4s4h_55",V1="_moreInfoContainer_s4s4h_78",F1="_moreInfo_s4s4h_78",Ue={listElement:L1,elementNameDate:M1,elementNameContainer:R1,elementName:I1,elementDate:D1,nameAndEye:B1,elementButtons:P1,break:"_break_s4s4h_73",moreInfoContainer:V1,moreInfo:F1},z1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Eliminar'%3e%3ccircle%20id='Ellipse%20220'%20cx='15.5106'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M20.8581%2010.5548H17.5491V10.4015C17.5491%209.17493%2016.6257%208.255%2015.4714%208.255C14.3171%208.255%2013.3167%209.17493%2013.3167%2010.4015V10.5548H10.0846C9.69985%2010.5548%209.46899%2010.7848%209.46899%2011.1681C9.46899%2011.5514%209.69985%2011.7814%2010.0846%2011.7814H10.2385V21.2106C10.2385%2022.3605%2011.162%2023.3571%2012.3932%2023.3571H18.5495C19.7038%2023.3571%2020.7042%2022.4372%2020.7042%2021.2106V11.7047H20.9351C21.2429%2011.7047%2021.5507%2011.4747%2021.5507%2011.0914C21.5507%2010.7081%2021.1659%2010.5548%2020.8581%2010.5548ZM14.471%2010.4015C14.471%209.86488%2014.9327%209.40491%2015.4714%209.40491C16.01%209.40491%2016.3948%209.86488%2016.3948%2010.4015V10.5548H14.471V10.4015ZM16.3948%2018.8342V15.0011C16.3948%2014.6178%2016.6257%2014.3878%2017.0104%2014.3878C17.3952%2014.3878%2017.6261%2014.6178%2017.6261%2015.0011V18.8342C17.6261%2019.1408%2017.3952%2019.4474%2017.0104%2019.4474C16.6257%2019.4474%2016.3948%2019.1408%2016.3948%2018.8342ZM13.3167%2018.8342V15.0011C13.3167%2014.6178%2013.5475%2014.3878%2013.9323%2014.3878C14.3171%2014.3878%2014.5479%2014.6178%2014.5479%2015.0011V18.8342C14.5479%2019.1408%2014.3171%2019.4474%2013.9323%2019.4474C13.5475%2019.4474%2013.3167%2019.1408%2013.3167%2018.8342Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e",q1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209259'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.3062'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203973'%3e%3cg%20id='Rectangle%20495'%3e%3cmask%20id='path-2-inside-1_4451_10560'%20fill='white'%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'/%3e%3c/mask%3e%3crect%20x='10.4033'%20y='7.70422'%20width='12.8'%20height='12.8'%20rx='1'%20stroke='%23605B56'%20stroke-width='3'%20mask='url(%23path-2-inside-1_4451_10560)'/%3e%3c/g%3e%3cg%20id='Group%203972'%3e%3crect%20id='Rectangle%20496'%20x='7.2041'%20y='10.9042'%20width='12.8'%20height='12.8'%20rx='1'%20fill='%23605B56'/%3e%3cpath%20id='+'%20d='M16.3785%2018.0509H14.3838V20.0776H12.9331V18.0509H10.9385V16.6749H12.9331V14.6376H14.3838V16.6749H16.3785V18.0509Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",W1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%209260'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.8063'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='Vector'%20d='M8.20744%208.70422C7.34769%208.70422%206.88873%209.71735%207.45568%2010.3637L13.3518%2017.085C13.5118%2017.2675%2013.6%2017.5018%2013.6%2017.7445V23.2443C13.6%2023.6283%2013.8199%2023.9783%2014.1658%2024.1451L15.9658%2025.0128C16.6297%2025.3329%2017.4%2024.8491%2017.4%2024.112V17.7445C17.4%2017.5018%2017.4882%2017.2675%2017.6482%2017.085L23.5443%2010.3637C24.1113%209.71735%2023.6523%208.70422%2022.7926%208.70422H8.20744Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e",U1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206725'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.7148'%20r='14.3521'%20stroke='%23605B56'%20stroke-opacity='0.5'%20stroke-width='1.5'/%3e%3cg%20id='Group%206724'%3e%3cpath%20id='Vector'%20d='M17.4114%2023.3302C17.4114%2024.5419%2016.4269%2027.4724%2015.2126%2027.4724C13.9982%2027.4724%2013.0137%2024.5419%2013.0137%2023.3302C13.0137%2022.7483%2013.2453%2022.1902%2013.6577%2021.7787C14.0701%2021.3673%2014.6294%2021.1361%2015.2126%2021.1361C15.7957%2021.1361%2016.355%2021.3673%2016.7674%2021.7787C17.1798%2022.1902%2017.4114%2022.7483%2017.4114%2023.3302Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union'%20d='M15.2919%2020.6088H11.2899L11.289%2020.6078C10.6273%2020.7718%209.36856%2021.3396%209.39931%2023.2845C9.39931%2023.2845%207.41254%2021.7976%208.17372%2019.0179L8.25575%2018.7445C8.59675%2017.7118%209.66004%2016.7306%2010.7714%2016.2435C10.7337%2012.8666%2011.5045%208.19644%2015.2919%204.724V20.6088ZM10.6835%2017.4164C10.5323%2017.5091%2010.3819%2017.6125%2010.2372%2017.7279C9.77215%2018.099%209.43634%2018.5195%209.26747%2018.8988L9.20595%2019.058C8.95666%2019.8145%208.9632%2020.4347%209.07607%2020.9291C9.34144%2020.5645%209.66233%2020.2832%209.9999%2020.0746C10.2365%2019.9284%2010.4715%2019.8251%2010.6835%2019.7494V17.4164Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Union_2'%20d='M15.293%204.724C19.0931%208.20817%2019.8548%2012.8981%2019.8115%2016.2777C20.8629%2016.7859%2021.8411%2017.7218%2022.165%2018.7045C23.1398%2021.6599%2021.0225%2023.2445%2021.0225%2023.2445C21.051%2021.4361%2019.9648%2020.8184%2019.2803%2020.6088H15.293V4.724ZM19.7676%2017.3949C19.7586%2017.5313%2019.7493%2017.6646%2019.7383%2017.7943V19.7094C19.9502%2019.7851%2020.1854%2019.8884%2020.4219%2020.0345C20.7595%2020.2432%2021.0794%2020.5253%2021.3447%2020.89C21.4466%2020.444%2021.4627%2019.8956%2021.2812%2019.2367L21.2148%2019.0179C21.0772%2018.6004%2020.7157%2018.1118%2020.1846%2017.6879C20.0493%2017.58%2019.9088%2017.4829%2019.7676%2017.3949Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cg%20id='Vector_2'%3e%3cpath%20d='M12.541%208.28445C12.541%208.28445%2014.8218%209.81829%2018.0434%208.28445C18.0434%208.28445%2016.9978%206.03912%2015.2919%204.61267C15.2919%204.61267%2013.7894%205.92343%2012.541%208.28445Z'%20fill='%23FDFDFD'/%3e%3cpath%20d='M15.3057%205.29626C15.9532%205.9116%2016.4918%206.63792%2016.8867%207.2533C17.0801%207.55466%2017.2355%207.82605%2017.3516%208.03748C16.0573%208.54342%2014.966%208.52427%2014.1807%208.36951C13.781%208.29074%2013.4584%208.17533%2013.2266%208.07556C13.7607%207.14513%2014.32%206.40895%2014.7646%205.88806C14.9759%205.64056%2015.1621%205.44302%2015.3057%205.29626Z'%20stroke='%23605B56'%20stroke-opacity='0.5'/%3e%3c/g%3e%3cpath%20id='Vector_3'%20d='M17.6984%2012.9862C17.6985%2013.4539%2017.5596%2013.9111%2017.2993%2014.3001C17.039%2014.689%2016.669%2014.9922%2016.236%2015.1712C15.803%2015.3503%2015.3265%2015.3972%2014.8668%2015.3061C14.4071%2015.2149%2013.9848%2014.9898%2013.6533%2014.6591C13.3218%2014.3285%2013.0961%2013.9072%2013.0046%2013.4485C12.9131%2012.9898%2012.96%2012.5143%2013.1393%2012.0822C13.3186%2011.6501%2013.6224%2011.2808%2014.0121%2011.021C14.4018%2010.7611%2014.86%2010.6224%2015.3287%2010.6224C15.957%2010.6224%2016.5597%2010.8715%2017.004%2011.3147C17.4484%2011.758%2017.6982%2012.3593%2017.6984%2012.9862Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_4'%20d='M17.1358%2013.0038C17.1358%2013.36%2017.0299%2013.7083%2016.8316%2014.0045C16.6332%2014.3007%2016.3513%2014.5316%2016.0214%2014.6679C15.6916%2014.8042%2015.3286%2014.8399%2014.9784%2014.7704C14.6282%2014.7009%2014.3066%2014.5294%2014.0541%2014.2774C13.8017%2014.0255%2013.6297%2013.7046%2013.5601%2013.3552C13.4904%2013.0058%2013.5262%2012.6436%2013.6628%2012.3145C13.7994%2011.9853%2014.0308%2011.704%2014.3277%2011.5061C14.6245%2011.3082%2014.9736%2011.2025%2015.3306%2011.2025C15.8094%2011.2025%2016.2685%2011.3923%2016.6071%2011.7301C16.9456%2012.0679%2017.1358%2012.526%2017.1358%2013.0038Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_5'%20d='M16.7061%2013.2093C16.6508%2013.2093%2016.5978%2013.1874%2016.5588%2013.1485C16.5197%2013.1095%2016.4978%2013.0566%2016.4978%2013.0015C16.4974%2012.7236%2016.3866%2012.4572%2016.1897%2012.2607C15.9928%2012.0642%2015.7258%2011.9537%2015.4473%2011.9533C15.4175%2011.9582%2015.3869%2011.9566%2015.3578%2011.9485C15.3287%2011.9405%2015.3017%2011.9262%2015.2786%2011.9067C15.2556%2011.8872%2015.237%2011.8629%2015.2244%2011.8356C15.2117%2011.8082%2015.2051%2011.7784%2015.2051%2011.7482C15.2051%2011.7181%2015.2117%2011.6883%2015.2244%2011.6609C15.237%2011.6336%2015.2556%2011.6093%2015.2786%2011.5898C15.3017%2011.5703%2015.3287%2011.556%2015.3578%2011.5479C15.3869%2011.5399%2015.4175%2011.5383%2015.4473%2011.5432C15.8348%2011.5435%2016.2063%2011.6973%2016.4803%2011.9707C16.7543%2012.2441%2016.9084%2012.6148%2016.9088%2013.0015C16.9088%2013.0557%2016.8876%2013.1077%2016.8498%2013.1465C16.8119%2013.1854%2016.7603%2013.2079%2016.7061%2013.2093Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_6'%20d='M16.8082%2013.6607C16.8082%2013.7106%2016.7934%2013.7594%2016.7656%2013.8008C16.7378%2013.8423%2016.6984%2013.8746%2016.6522%2013.8937C16.606%2013.9128%2016.5552%2013.9178%2016.5062%2013.9081C16.4571%2013.8983%2016.4121%2013.8743%2016.3768%2013.8391C16.3414%2013.8038%2016.3173%2013.7589%2016.3076%2013.7099C16.2978%2013.661%2016.3028%2013.6103%2016.322%2013.5642C16.3411%2013.5182%2016.3735%2013.4788%2016.4151%2013.4511C16.4566%2013.4234%2016.5055%2013.4086%2016.5555%2013.4086C16.6225%2013.4086%2016.6868%2013.4351%2016.7342%2013.4824C16.7816%2013.5297%2016.8082%2013.5939%2016.8082%2013.6607Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_7'%20d='M15.6008%2016.0612C15.5633%2016.0097%2015.5141%2015.9677%2015.4573%2015.9388C15.4005%2015.9099%2015.3376%2015.8949%2015.2738%2015.8949H15.1898C15.126%2015.8948%2015.0631%2015.9099%2015.0062%2015.9388C14.9494%2015.9677%2014.9002%2016.0096%2014.8627%2016.0612C14.8627%2016.0612%2013.6074%2017.4973%2014.1816%2021.0915C14.4989%2023.0777%2015.2314%2023.6694%2015.2314%2023.6694C15.2314%2023.6694%2015.9639%2023.0777%2016.2819%2021.0915C16.8561%2017.4973%2015.6008%2016.0612%2015.6008%2016.0612Z'%20fill='%23FDFDFD'/%3e%3cpath%20id='Vector_8'%20d='M15.1468%2015.8949C15.083%2015.8948%2015.0201%2015.9099%2014.9632%2015.9388C14.9064%2015.9677%2014.8572%2016.0096%2014.8198%2016.0612C14.8198%2016.0612%2013.5645%2017.4973%2014.1387%2021.0915C14.456%2023.0777%2015.1884%2023.6694%2015.1884%2023.6694V15.8949H15.1468Z'%20fill='%23FDFDFD'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Z1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='15.3062'%20cy='15.2144'%20r='14.3521'%20stroke='%2392898A'%20stroke-width='1.5'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.9898%2012.7234V9.89008C11.9898%208.88815%2012.3811%207.92726%2013.0777%207.21879C13.7743%206.51032%2014.719%206.1123%2015.7041%206.1123C16.6892%206.1123%2017.6339%206.51032%2018.3305%207.21879C19.0271%207.92726%2019.4184%208.88815%2019.4184%209.89008V12.7234H20.347C20.8395%2012.7234%2021.3119%2012.9224%2021.6602%2013.2767C22.0084%2013.6309%2022.2041%2014.1113%2022.2041%2014.6123V21.2234C22.2041%2021.7244%2022.0084%2022.2048%2021.6602%2022.5591C21.3119%2022.9133%2020.8395%2023.1123%2020.347%2023.1123H11.0612C10.5687%2023.1123%2010.0963%2022.9133%209.74805%2022.5591C9.39976%2022.2048%209.2041%2021.7244%209.2041%2021.2234V14.6123C9.2041%2014.1113%209.39976%2013.6309%209.74805%2013.2767C10.0963%2012.9224%2010.5687%2012.7234%2011.0612%2012.7234H11.9898ZM13.847%209.89008C13.847%209.38912%2014.0426%208.90867%2014.3909%208.55444C14.7392%208.2002%2015.2116%208.00119%2015.7041%208.00119C16.1966%208.00119%2016.669%208.2002%2017.0173%208.55444C17.3656%208.90867%2017.5612%209.38912%2017.5612%209.89008V12.7234H13.847V9.89008ZM15.7041%2015.5567C15.9504%2015.5567%2016.1866%2015.6563%2016.3607%2015.8334C16.5348%2016.0105%2016.6327%2016.2507%2016.6327%2016.5012V19.3345C16.6327%2019.585%2016.5348%2019.8252%2016.3607%2020.0023C16.1866%2020.1795%2015.9504%2020.279%2015.7041%2020.279C15.4578%2020.279%2015.2216%2020.1795%2015.0475%2020.0023C14.8734%2019.8252%2014.7755%2019.585%2014.7755%2019.3345V16.5012C14.7755%2016.2507%2014.8734%2016.0105%2015.0475%2015.8334C15.2216%2015.6563%2015.4578%2015.5567%2015.7041%2015.5567Z'%20fill='%2392898A'/%3e%3c/svg%3e",H1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Editar'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.1021'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cg%20id='Group%203792'%3e%3cpath%20id='Vector%20530'%20d='M22.469%2010.8343L19.54%207.90531C19.3447%207.71005%2019.0281%207.71005%2018.8329%207.90531L8.39131%2018.3469C8.31762%2018.4206%208.2688%2018.5154%208.25167%2018.6182L7.66586%2022.1331C7.60946%2022.4715%207.90285%2022.7649%208.24126%2022.7085L11.7561%2022.1227C11.8589%2022.1055%2011.9538%2022.0567%2012.0275%2021.983L22.469%2011.5415C22.6643%2011.3462%2022.6643%2011.0296%2022.469%2010.8343Z'%20stroke='%23605B56'/%3e%3cpath%20id='Vector%20531'%20d='M9.00391%2017.7334L12.6401%2021.3695'%20stroke='%23605B56'/%3e%3cpath%20id='Vector%20614'%20d='M19.4292%207.55176L9.24805%2017.733L12.6418%2021.1267L22.823%2010.9455L19.4292%207.55176Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",K1="data:image/svg+xml,%3csvg%20width='31'%20height='31'%20viewBox='0%200%2031%2031'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%206729'%3e%3ccircle%20id='Ellipse%20219'%20cx='15.1021'%20cy='15.1021'%20r='14.3521'%20stroke='%23605B56'%20stroke-width='1.5'/%3e%3cpath%20id='i'%20d='M14%209.008C14%208.708%2014.102%208.468%2014.306%208.288C14.51%208.096%2014.78%208%2015.116%208C15.452%208%2015.722%208.096%2015.926%208.288C16.13%208.468%2016.232%208.708%2016.232%209.008C16.232%209.308%2016.13%209.554%2015.926%209.746C15.722%209.926%2015.452%2010.016%2015.116%2010.016C14.78%2010.016%2014.51%209.926%2014.306%209.746C14.102%209.554%2014%209.308%2014%209.008ZM15.926%2011.906V21.788H14.288V11.906H15.926Z'%20fill='%23605B56'/%3e%3c/g%3e%3c/svg%3e";var ps;function Br(){return Br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Br.apply(null,arguments)}var G1=function(t){return Q.createElement("svg",Br({xmlns:"http://www.w3.org/2000/svg",width:26,height:14,fill:"none"},t),ps||(ps=Q.createElement("g",{fill:"currentColor"},Q.createElement("path",{d:"M12.95.408C7.659.408 2.849 2.772.083 6.726a.47.47 0 0 0 0 .532c2.761 3.955 7.571 6.313 12.867 6.313s10.106-2.358 12.867-6.313a.47.47 0 0 0 0-.532C23.05 2.772 18.24.408 12.95.408m0 10.814A4.24 4.24 0 0 1 8.718 6.99a4.24 4.24 0 0 1 4.232-4.232 4.24 4.24 0 0 1 4.232 4.232 4.24 4.24 0 0 1-4.232 4.232"}),Q.createElement("path",{d:"M12.951 10.297a3.307 3.307 0 1 0 0-6.614 3.307 3.307 0 0 0 0 6.614"}))))};const Y1="data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205207'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='%23605B56'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e",Ri=({listelement:e,onClickElement:t,isActive:n,activeColor:r,fontColor:o,moreInfo:i,columns:a,elementButtons:c,processTooltip:u,defaultTooltip:d,showEye:m=!0})=>{const{name:g,created_at:y,id:h,isBeingProcessed:b}=e,[f,x]=w.useState(!1),{t:_}=se.useTranslation(),S=c&&c.edit&&!e.is_default&&!e.is_baseline,E=c&&c.trash&&!e.is_default&&!e.is_baseline;return l.jsxs("div",{className:Ue.listElement,style:{borderBottom:`1px solid ${o}`},children:[l.jsx("div",{className:Ue.elementNameDate,onClick:()=>t(h),children:Object.keys(a).map((C,v)=>C==="name"?l.jsx("div",{className:Ue.elementNameContainer,children:l.jsxs("div",{className:`${Ue.elementName} ${m&&Ue.nameAndEye}`,children:[m&&(n?l.jsx(G1,{style:{color:r,marginRight:9}}):l.jsx("img",{style:{marginRight:9},src:Y1,alt:"eye"})),l.jsx("span",{style:{color:n?r:o},children:g})]})},`col${v}`):C=="data"?l.jsx("div",{className:Ue.elementDate,children:y?new Date(y).toLocaleDateString():""},`col${v}data`):l.jsx("div",{className:Ue.elementDate,children:e[C]},`col${v}other`))}),l.jsxs("div",{className:Ue.elementButtons,children:[e.processing&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("img",{src:U1}),l.jsx(Je,{text:u,position:"left"})]}),c.filter&&!e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.filter.onclick(e),disabled:c.filter.disabled||!1,children:l.jsx("img",{src:W1})}),l.jsx(Je,{text:c.filter.tooltiptext,position:"left"})]}),c.copy&&!e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.copy.onclick(e),disabled:c.copy.disabled||!1,children:l.jsx("img",{src:q1})}),l.jsx(Je,{text:c.copy.tooltiptext,position:"left"})]}),S&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.edit.onclick(e),disabled:c.edit.disabled||!1,children:l.jsx("img",{src:H1})}),l.jsx(Je,{text:c.edit.tooltiptext,position:"left"})]}),c.info&&e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.info.onclick(e),disabled:c.info.disabled||!1,children:l.jsx("img",{src:K1})}),l.jsx(Je,{text:c.info.tooltiptext,position:"left"})]}),E&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("button",{onClick:()=>c.trash.onclick(e),disabled:c.trash.disabled||!1,children:l.jsx("img",{src:z1})}),l.jsx(Je,{text:c.trash.tooltiptext,position:"left"})]}),e.is_default&&l.jsxs("div",{className:"tooltip-parent",children:[l.jsx("img",{src:Z1}),l.jsx(Je,{text:d,position:"left"})]})]}),i&&l.jsx("div",{className:Ue.break}),i&&l.jsxs("div",{className:Ue.moreInfoContainer,children:[l.jsxs("div",{className:Ue.moreInfo,onClick:()=>x(!f),children:[l.jsx("span",{children:f?"-":"+"}),_(i.label)]}),i&&f&&l.jsx("div",{className:Ue.moreInfoInfo,children:e[i.info]})]})]})};Ri.propTypes={listelement:s.shape({name:s.string.isRequired,created_at:s.string,id:s.any.isRequired,isBeingProcessed:s.bool}).isRequired,onClickElement:s.func.isRequired,isActive:s.bool,activeColor:s.string,fontColor:s.string,moreInfo:s.any,columns:s.shape({name:s.string,data:s.string,ambit:s.string,escenari:s.string}),elementButtons:s.shape({copy:s.shape({onclick:s.func,tooltiptext:s.string}),delete:s.shape({onclick:s.func,tooltiptext:s.string}),filter:s.shape({onclick:s.func,tooltiptext:s.string})}),processTooltip:s.string,defaultTooltip:s.string,showEye:s.bool};const ms="data:image/svg+xml,%3csvg%20width='14'%20height='16'%20viewBox='0%200%2014%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector'%20d='M7%2015L7%201M7%2015L1%209M7%2015L13%209'%20stroke='%23605B56'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e",Ii=({elementsList:e,activeElementId:t,fontColor:n="#605B56",activeColor:r,buttonContainerStyles:o={},containerStyles:i={},newElementButton:a,onClickElement:c=b=>console.log(`OnCLickElement: ${b}`),columns:u,elementButtons:d,moreInfo:m=!1,processTooltip:g,defaultTooltip:y,showEye:h=!0})=>{const{t:b}=se.useTranslation(),[f,x]=w.useState(e);w.useEffect(()=>{e&&x(e)},[e]);const _=C=>{if(typeof C!="string")return null;if(/^\d{4}[-/]\d{2}[-/]\d{2}$/.test(C))return new Date(C);const v=/^(\d{2})[-/.]\s*(\d{2})[-/.]\s*(\d{4})$/.exec(C);if(v)return new Date(`${v[3]}-${v[2]}-${v[1]}`);const T=/^(\d{2})[-/]\s*(\d{2})[-/]\s*(\d{4})$/.exec(C);return T?parseInt(T[1])>12?new Date(`${T[3]}-${T[2]}-${T[1]}`):new Date(`${T[3]}-${T[1]}-${T[2]}`):null},S=C=>_(C)!==null,E=C=>{if(!f||f.length===0)return;let v=[...f];const T=v.find(k=>k[C]!==null&&k[C]!==void 0),A=T?S(T[C]):!1;v.sort((k,$)=>{const P=k[C],I=$[C];if(P==null&&I==null)return 0;if(P==null)return 1;if(I==null)return-1;if(A){const j=_(P),V=_(I);return!j&&!V?0:j?V?j-V:-1:1}const p=String(P||"").trim(),N=String(I||"").trim();return p.localeCompare(N)}),x(v)};return l.jsxs("div",{className:ot.elementSelector,style:{color:n,...i},children:[l.jsxs("div",{className:ot.header,style:{borderBottom:`1px solid ${n}`},children:[l.jsx("div",{className:ot.nameDateContainer,children:Object.keys(u).map(C=>C==="name"?l.jsx("div",{className:ot.elementName,children:l.jsxs("button",{onClick:()=>E("name"),children:[l.jsx("span",{children:b(u.name)}),l.jsx("img",{src:ms,alt:"order arrow"})]})},C):C==="data"?l.jsx("div",{className:ot.elementDate,children:l.jsxs("button",{onClick:()=>E("created_at"),children:[l.jsx("span",{children:b(u.data)}),l.jsx("img",{src:ms,alt:"order arrow"})]})},C):l.jsx("div",{className:ot.elementDate,children:l.jsx("span",{children:b(u[C])})},C))}),l.jsx("div",{className:ot.buttonsContainer})]}),l.jsx("div",{className:ot.elementListContainer,children:f&&f.length>0&&f.map(C=>l.jsx(Ri,{isActive:t==C.id,listelement:C,fontColor:n,activeColor:r,onClickElement:c,columns:u,elementButtons:d,moreInfo:m,processTooltip:g,defaultTooltip:y,showEye:h},`elementKey${C.id}`))}),a&&l.jsx("div",{className:ot.newElementButtonContainer,children:l.jsx(un,{style:{...o},onClick:a.onClick,borderColor:"grey",disabled:a.disabled||!1,children:b(a.label)})})]})};Ii.propTypes={elementsList:s.arrayOf(s.shape({name:s.string.isRequired,created_at:s.string,id:s.any.isRequired})).isRequired,activeElementId:s.any,fontColor:s.string,activeColor:s.string,onClickElement:s.func.isRequired,newElementButton:s.shape({label:s.string,onClick:s.func}),columns:s.shape({name:s.string,data:s.string,ambit:s.string,escenari:s.string}),elementButtons:s.shape({copy:s.shape({onclick:s.func,tooltiptext:s.string}),delete:s.shape({onclick:s.func,tooltiptext:s.string}),filter:s.shape({onclick:s.func,tooltiptext:s.string})}),buttonContainerStyles:s.object,containerStyles:s.object,onCLickNewElement:s.func,moreInfo:s.shape({label:s.string,info:s.any}),processTooltip:s.string,defaultTooltip:s.string,showEye:s.bool};const X1="_formContainer_asv64_2",Q1="_categorySelectorContainer_asv64_11",J1="_formObjectContainer_asv64_15",ed="_buttonContainer_asv64_26",Jt={formContainer:X1,categorySelectorContainer:Q1,formObjectContainer:J1,buttonContainer:ed},Pt={text:"text",password:"password",radioList:"radioList",select:"select",textDescription:"textDescription",rankingSlider:"rankingSlider"};var td=e=>e.type==="checkbox",sn=e=>e instanceof Date,to=e=>e==null;const Di=e=>typeof e=="object";var $t=e=>!to(e)&&!Array.isArray(e)&&Di(e)&&!sn(e),nd=e=>$t(e)&&e.target?td(e.target)?e.target.checked:e.target.value:e,rd=(e,t)=>t.split(".").some((n,r,o)=>!isNaN(Number(n))&&e.has(o.slice(0,r).join("."))),od=e=>{const t=e.constructor&&e.constructor.prototype;return $t(t)&&t.hasOwnProperty("isPrototypeOf")},sd=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Bi(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(sd&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!($t(e)&&od(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Bi(e[o]));return r}var Pi=e=>/^\w*$/.test(e),Pr=e=>e===void 0,id=e=>Array.isArray(e)?e.filter(Boolean):[],Vi=e=>id(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Pe=(e,t,n)=>{if(!t||!$t(e))return n;const r=(Pi(t)?[t]:Vi(t)).reduce((o,i)=>to(o)?o:o[i],e);return Pr(r)||r===e?Pr(e[t])?n:e[t]:r},Sr=e=>typeof e=="boolean",Nn=e=>typeof e=="function",hs=(e,t,n)=>{let r=-1;const o=Pi(t)?[t]:Vi(t),i=o.length,a=i-1;for(;++r<i;){const c=o[r];let u=n;if(r!==a){const d=e[c];u=$t(d)||Array.isArray(d)?d:isNaN(+o[r+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const gs={BLUR:"blur",CHANGE:"change"},ys={all:"all"},Fi=w.createContext(null);Fi.displayName="HookFormControlContext";const no=()=>w.useContext(Fi);var ad=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==ys.all&&(t._proxyFormState[a]=!r||ys.all),n&&(n[a]=!0),e[a]}});return o};const zi=typeof window<"u"?w.useLayoutEffect:w.useEffect;function ld(e){const t=no(),{control:n=t,disabled:r,name:o,exact:i}=e||{},[a,c]=w.useState(n._formState),u=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return zi(()=>n._subscribe({name:o,formState:u.current,exact:i,callback:d=>{!r&&c({...n._formState,...d})}}),[o,r,i]),w.useEffect(()=>{u.current.isValid&&n._setValid(!0)},[n]),w.useMemo(()=>ad(a,n,u.current,!1),[a,n])}var cd=e=>typeof e=="string",bs=(e,t,n,r,o)=>cd(e)?Pe(n,e,o):Array.isArray(e)?e.map(i=>Pe(n,i)):n,vs=e=>to(e)||!Di(e);function Dn(e,t,n=new WeakSet){if(vs(e)||vs(t))return Object.is(e,t);if(sn(e)&&sn(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const a=e[i];if(!o.includes(i))return!1;if(i!=="ref"){const c=t[i];if(sn(a)&&sn(c)||($t(a)||Array.isArray(a))&&($t(c)||Array.isArray(c))?!Dn(a,c,n):!Object.is(a,c))return!1}}return!0}function ud(e){const t=no(),{control:n=t,name:r,defaultValue:o,disabled:i,exact:a,compute:c}=e||{},u=w.useRef(o),d=w.useRef(c),m=w.useRef(void 0),g=w.useRef(n),y=w.useRef(r);d.current=c;const[h,b]=w.useState(()=>{const C=n._getWatch(r,u.current);return d.current?d.current(C):C}),f=w.useCallback(C=>{const v=bs(r,n._names,C||n._formValues,!1,u.current);return d.current?d.current(v):v},[n._formValues,n._names,r]),x=w.useCallback(C=>{if(!i){const v=bs(r,n._names,C||n._formValues,!1,u.current);if(d.current){const T=d.current(v);Dn(T,m.current)||(b(T),m.current=T)}else b(v)}},[n._formValues,n._names,i,r]);zi(()=>((g.current!==n||!Dn(y.current,r))&&(g.current=n,y.current=r,x()),n._subscribe({name:r,formState:{values:!0},exact:a,callback:C=>{x(C.values)}})),[n,a,r,x]),w.useEffect(()=>n._removeUnmounted());const _=g.current!==n,S=y.current,E=w.useMemo(()=>{if(i)return null;const C=!_&&!Dn(S,r);return _||C?f():null},[i,_,r,S,f]);return E!==null?E:h}function dd(e){const t=no(),{name:n,disabled:r,control:o=t,shouldUnregister:i,defaultValue:a,exact:c=!0}=e,u=rd(o._names.array,n),d=w.useMemo(()=>Pe(o._formValues,n,Pe(o._defaultValues,n,a)),[o,n,a]),m=ud({control:o,name:n,defaultValue:d,exact:c}),g=ld({control:o,name:n,exact:c}),y=w.useRef(e),h=w.useRef(void 0),b=w.useRef(o.register(n,{...e.rules,value:m,...Sr(e.disabled)?{disabled:e.disabled}:{}}));y.current=e;const f=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Pe(g.errors,n)},isDirty:{enumerable:!0,get:()=>!!Pe(g.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Pe(g.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Pe(g.validatingFields,n)},error:{enumerable:!0,get:()=>Pe(g.errors,n)}}),[g,n]),x=w.useCallback(C=>b.current.onChange({target:{value:nd(C),name:n},type:gs.CHANGE}),[n]),_=w.useCallback(()=>b.current.onBlur({target:{value:Pe(o._formValues,n),name:n},type:gs.BLUR}),[n,o._formValues]),S=w.useCallback(C=>{const v=Pe(o._fields,n);v&&v._f&&C&&(v._f.ref={focus:()=>Nn(C.focus)&&C.focus(),select:()=>Nn(C.select)&&C.select(),setCustomValidity:T=>Nn(C.setCustomValidity)&&C.setCustomValidity(T),reportValidity:()=>Nn(C.reportValidity)&&C.reportValidity()})},[o._fields,n]),E=w.useMemo(()=>({name:n,value:m,...Sr(r)||g.disabled?{disabled:g.disabled||r}:{},onChange:x,onBlur:_,ref:S}),[n,r,g.disabled,x,_,S,m]);return w.useEffect(()=>{const C=o._options.shouldUnregister||i,v=h.current;v&&v!==n&&!u&&o.unregister(v),o.register(n,{...y.current.rules,...Sr(y.current.disabled)?{disabled:y.current.disabled}:{}});const T=(A,k)=>{const $=Pe(o._fields,A);$&&$._f&&($._f.mount=k)};if(T(n,!0),C){const A=Bi(Pe(o._options.defaultValues,n,y.current.defaultValue));hs(o._defaultValues,n,A),Pr(Pe(o._formValues,n))&&hs(o._formValues,n,A)}return!u&&o.register(n),h.current=n,()=>{(u?C&&!o._state.action:C)?o.unregister(n):T(n,!1)}},[n,o,u,i]),w.useEffect(()=>{o._setDisabledField({disabled:r,name:n})},[r,n,o]),w.useMemo(()=>({field:E,formState:g,fieldState:f}),[E,g,f])}const mn=e=>e.render(dd(e)),fd=w.createContext(null);fd.displayName="HookFormContext";const pd="_textInputContainer_1o3iy_2",md="_labelContainer_1o3iy_5",hd="_inputContainer_1o3iy_8",gd="_showPasswordButton_1o3iy_14",yd="_forgotPassButton_1o3iy_26",en={textInputContainer:pd,labelContainer:md,inputContainer:hd,showPasswordButton:gd,forgotPassButton:yd},bd="_errorMessage_1xiyb_2",vd={errorMessage:bd},Kt=({errorMessage:e,errorColor:t="red",containerStyles:n})=>{const{t:r}=se.useTranslation();return l.jsx("div",{className:vd.errorMessage,style:{color:t,...n},children:e?r(e):""})},xd="data:image/svg+xml,%3csvg%20width='26'%20height='14'%20viewBox='0%200%2026%2014'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205763'%3e%3cpath%20id='Vector'%20d='M12.95%200C7.659%200%202.84899%202.3634%200.0832465%206.31776C-0.0277488%206.47963%20-0.0277488%206.68776%200.0832465%206.84962C2.84439%2010.804%207.65437%2013.1628%2012.95%2013.1628C18.2456%2013.1628%2023.0556%2010.804%2025.8168%206.84962C25.9278%206.68775%2025.9278%206.47963%2025.8168%206.31776C23.051%202.36339%2018.241%200%2012.95%200ZM12.95%2010.8132C10.619%2010.8132%208.71812%208.91238%208.71812%206.58139C8.71812%204.25041%2010.619%202.34951%2012.95%202.34951C15.281%202.34951%2017.1819%204.25038%2017.1819%206.58139C17.1819%208.91241%2015.281%2010.8132%2012.95%2010.8132Z'%20fill='white'/%3e%3cpath%20id='Vector_2'%20d='M12.9514%209.88816C14.7777%209.88816%2016.2583%208.40763%2016.2583%206.58129C16.2583%204.75495%2014.7777%203.27441%2012.9514%203.27441C11.1251%203.27441%209.64453%204.75495%209.64453%206.58129C9.64453%208.40763%2011.1251%209.88816%2012.9514%209.88816Z'%20fill='white'/%3e%3c/g%3e%3c/svg%3e",Cd="data:image/svg+xml,%3csvg%20width='26'%20height='18'%20viewBox='0%200%2026%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%205995'%3e%3cpath%20id='Vector'%20d='M12.9837%206.40625C11.1707%206.40625%209.69531%207.88162%209.69531%209.69462C9.69531%2010.0276%209.74618%2010.3514%209.83869%2010.652C9.93579%2010.9711%2010.0792%2011.2718%2010.2642%2011.54L14.8291%206.97512C14.5562%206.79013%2014.2602%206.64676%2013.9411%206.54962C13.6404%206.45712%2013.3167%206.40625%2012.9837%206.40625Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_2'%20d='M19.4938%204.44079C19.318%204.36678%2019.1191%204.40841%2018.985%204.53792L16.3534%207.16955V7.17415C16.543%207.42855%2016.7049%207.70604%2016.8344%208.00204C17.0656%208.52004%2017.1905%209.09354%2017.1905%209.69478C17.1905%2012.0165%2015.3035%2013.9035%2012.9818%2013.9035C12.3805%2013.9035%2011.807%2013.7787%2011.289%2013.5474C10.993%2013.4179%2010.7155%2013.256%2010.4611%2013.0664H10.4565L8.52788%2014.995C8.41225%2015.1153%208.36601%2015.2864%208.41225%2015.4437C8.45389%2015.6055%208.57875%2015.7304%208.74063%2015.772C10.0958%2016.1189%2011.511%2016.2947%2012.9494%2016.2947C18.245%2016.2947%2023.055%2013.9359%2025.8161%209.98153C25.9271%209.82429%2025.9271%209.61153%2025.8161%209.45427C24.2991%207.27591%2022.1115%205.54154%2019.4938%204.44079Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_3'%20d='M12.9843%2012.979C14.7973%2012.979%2016.268%2011.5082%2016.268%209.6952C16.268%209.35295%2016.2171%209.0292%2016.12%208.71933C16.0229%208.4002%2015.8749%208.10419%2015.6899%207.83594L11.125%2012.4008C11.3933%2012.5858%2011.6893%2012.7338%2012.0084%2012.831C12.3183%2012.9281%2012.6466%2012.979%2012.9843%2012.979Z'%20fill='white'%20fill-opacity='0.5'/%3e%3cpath%20id='Vector_4'%20d='M9.12048%2011.3694C8.89386%2010.856%208.769%2010.2918%208.769%209.69516C8.769%207.3734%2010.656%205.48178%2012.9824%205.48178C13.579%205.48178%2014.1433%205.60667%2014.6566%205.83329C14.9526%205.95815%2015.2347%206.12004%2015.4891%206.31428L17.3808%204.42267L21.0114%200.792026C21.1918%200.611646%2021.1918%200.315664%2021.0114%200.135285C20.831%20-0.0450949%2020.535%20-0.0450949%2020.3546%200.135285L16.8951%203.59478C15.6186%203.28491%2014.2959%203.13228%2012.95%203.13228C7.65437%203.13228%202.84439%205.49565%200.0832465%209.45464C-0.0277488%209.61191%20-0.0277488%209.82467%200.0832465%209.9819C1.48001%2011.9845%203.44563%2013.6079%205.78125%2014.7087L3.37162%2017.1183C3.19127%2017.2986%203.19127%2017.5947%203.37162%2017.775C3.46412%2017.8629%203.57975%2017.9091%203.7%2017.9091C3.82026%2017.9091%203.93588%2017.8629%204.02839%2017.775L9.60151%2012.2019C9.40727%2011.9429%209.24536%2011.6654%209.12048%2011.3694Z'%20fill='white'%20fill-opacity='0.5'/%3e%3c/g%3e%3c/svg%3e",hn=qr.create(e=>({errorColor:"red"})),Vr=({input:e,reactHookFormInstance:t})=>{const{code:n,type:r,label:o,maxLength:i,required:a,validateFunction:c,placeholder:u,errorColor:d="red",width:m=325,onClickForgotPass:g=()=>{console.log("Click on forgot password")},forgotPassLabel:y="forgot-password",onChangeExtraFunction:h=()=>{}}=e,{t:b}=se.useTranslation(),{control:f,trigger:x,clearErrors:_}=t,{errorColor:S}=hn(T=>T),[E,C]=w.useState(!1);w.useRef(a);const v=()=>r?r==="password"&&E?"text":r:"text";return l.jsx(mn,{name:n,control:f,rules:{required:a?`${b(o)} ${b("errorMessages.required")}`:!1,maxLength:i||void 0,validate:c||void 0},render:({field:T,fieldState:A})=>{var I;const{onChange:k,...$}=T,P=p=>{k(p),h&&h(p)};return l.jsxs("div",{className:en.textInputContainer,children:[l.jsxs("h3",{className:en.labelContainer,children:[b(o)," ",a&&l.jsx("label",{style:{color:A.error?d:""},children:"*"})]}),l.jsxs("div",{style:{position:"relative",width:m},className:en.inputContainer,children:[l.jsx("input",{...$,type:v(),onChange:P,placeholder:u?b(u):"",maxLength:i||void 0}),r=="password"&&l.jsx("button",{onClick:()=>C(!E),type:"button",className:en.showPasswordButton,children:l.jsx("img",{src:E?Cd:xd,alt:b("show-password")})})]}),r=="password"&&l.jsx("div",{className:en.forgotPassButton,children:l.jsx("button",{onClick:g,children:b(y)})}),l.jsx(Kt,{errorMessage:(I=A.error)==null?void 0:I.message,errorColor:S||d})]})}})},_d="_inputsContainer_10t9s_2",Vt={inputsContainer:_d},wd="_selectInputContainer_zzz6o_2",Sd="_labelContainer_zzz6o_6",Td="_selectWrapper_zzz6o_9",kd="_inputContainer_zzz6o_15",jd="_selectInput_zzz6o_2",$d="_option_zzz6o_29",Ed="_dropdownArrow_zzz6o_32",Ie={selectInputContainer:wd,labelContainer:Sd,selectWrapper:Td,inputContainer:kd,selectInput:jd,option:$d,dropdownArrow:Ed},xs="data:image/svg+xml,%3csvg%20width='19'%20height='10'%20viewBox='0%200%2019%2010'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20id='Vector%20311'%20d='M1%201.09961L8.79289%208.8925C9.18342%209.28303%209.81658%209.28303%2010.2071%208.8925L18%201.09961'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/svg%3e",qi=({input:e,reactHookFormInstance:t,onChange:n})=>{const{code:r,type:o,label:i,maxLength:a,required:c,validateFunction:u,placeholder:d,errorColor:m="red",width:g=325,options:y=[]}=e,{t:h}=se.useTranslation(),{control:b,trigger:f,clearErrors:x}=t||{},{errorColor:_}=hn(C=>C);w.useRef(c);const[S,E]=w.useState(null);return w.useEffect(()=>{S&&n&&n(S)},[S,n]),t?l.jsx(mn,{name:r,control:b,rules:{required:c?`${h(i)} ${h("errorMessages.required")}`:!1,validate:u?C=>{let v=t.getValues();return u(C,v)}:void 0},render:({field:C,fieldState:v})=>{var A;const T=y.find(k=>k.value===C.value);return l.jsxs("div",{className:Ie.selectInputContainer,children:[i&&l.jsxs("h3",{className:Ie.labelContainer,children:[h(i)," ",c&&l.jsx("label",{style:{color:v.error?m:""},children:"*"})]}),l.jsxs("div",{className:Ie.selectWrapper,children:[l.jsxs("div",{className:Ie.inputContainer,style:{width:g},children:[l.jsxs("select",{...C,value:C.value??"",onChange:k=>{const $=k.target.value,P=y.every(I=>typeof I.value=="number")?Number($):$;C.onChange(P)},className:Ie.selectInput,children:[l.jsx("option",{value:"",disabled:!0,hidden:!0,children:h(d||"selectOption")}),y.map((k,$)=>l.jsx("option",{value:k.value,className:Ie.option,children:h(k.label)},$))]}),l.jsx("img",{src:xs,alt:"Open",className:Ie.dropdownArrow})]}),T&&T.description&&l.jsx("div",{className:Ie.optionDescription,children:h(T.description)})]}),l.jsx(Kt,{errorMessage:(A=v.error)==null?void 0:A.message,errorColor:_||m})]})}}):l.jsxs("div",{className:Ie.selectInputContainer,children:[i&&l.jsxs("h3",{className:Ie.labelContainer,children:[h(i)," ",c&&l.jsx("label",{children:"*"})]}),l.jsxs("div",{className:Ie.inputContainer,style:{width:g},children:[l.jsxs("select",{value:S??"",onChange:C=>{const v=C.target.value,T=y.every(A=>typeof A.value=="number")?Number(v):v;E(T)},className:Ie.selectInput,children:[l.jsx("option",{value:"",disabled:!0,hidden:!0,children:h(d||"selectOption")}),y.map((C,v)=>l.jsx("option",{value:C.value,className:Ie.option,children:h(C.label)},v))]}),l.jsx("img",{src:xs,alt:"Open",className:Ie.dropdownArrow})]}),(()=>{const C=y.find(v=>v.value===S);return C&&C.description?l.jsx("div",{className:Ie.optionDescription,children:h(C.description)}):null})()]})},Nd="_radioButtonContainer_1e994_2",Od="_wholeInputContainer_1e994_5",Ad="_questionContainer_1e994_27",Ld="_radioQuestion_1e994_59",Md="_inputContainer_1e994_63",Rd="_radioInput_1e994_93",wt={radioButtonContainer:Nd,wholeInputContainer:Od,questionContainer:Ad,radioQuestion:Ld,inputContainer:Md,radioInput:Rd},Wi=({input:e,reactHookFormInstance:t})=>{const{code:n,label:r,required:o,validateFunction:i,errorColor:a="red",options:c=[],multi:u=!1}=e,{t:d}=se.useTranslation(),{control:m,trigger:g,clearErrors:y}=t,{errorColor:h}=hn(x=>x),b=({options:x,onChange:_,actualValue:S})=>{if(u&&S&&S.length>0){let E=S.filter(C=>C!==x);_(E)}},f=({options:x,onChange:_,actualValue:S})=>{u?S&&S.length>0?_([...S,x]):_([x]):_(x)};return w.useRef(o),l.jsx(mn,{control:m,name:n,rules:{validate:x=>o&&(x==null||x==="")?`${d(r)} ${d("errorMessages.required")}`:null},render:({formState:{errors:x},field:{onChange:_,onBlur:S,value:E,ref:C},fieldState:v})=>{var T;return l.jsx("div",{id:n+"id",className:wt.radioButtonContainer,children:l.jsxs("div",{className:wt.wholeInputContainer,children:[r&&l.jsx("div",{className:wt.questionContainer,children:l.jsxs("h3",{htmlFor:n+"id",className:`${wt.radioQuestion} ${o&&wt.required}`,children:[d(r)," ",o&&l.jsx("label",{style:{color:v.error?a:""},children:"*"})]})}),l.jsxs("div",{className:wt.inputContainer,children:[c.map(({label:A,value:k,disabled:$=!1,italicLabel:P},I)=>{const p=E&&u?E.isArray&&(E==null?void 0:E.length)>0&&E.some(N=>N===k):E===k;return l.jsxs("label",{children:[l.jsx("input",{type:"radio",checked:p,onChange:()=>{u?p?b({actualValue:E,options:c,onChange:_}):f({actualValue:E,options:c,onChange:_}):_(k)},className:wt.radioInput}),l.jsx("span",{className:"radio-custom"}),d(A)]},`inputRadio ${I}`)}),l.jsx(Kt,{errorMessage:(T=v.error)==null?void 0:T.message,errorColor:h||a})]})]})})}})},Id="_rankingSliderContainer_1dvpb_2",Dd="_labelContainer_1dvpb_6",Bd="_inputContainer_1dvpb_10",Pd="_slider_1dvpb_20",Vd="_thumb_1dvpb_27",Fd="_labels_1dvpb_37",zd="_minLabel_1dvpb_67",qd="_maxLabel_1dvpb_68",$e={rankingSliderContainer:Id,labelContainer:Dd,inputContainer:Bd,slider:Pd,thumb:Vd,labels:Fd,minLabel:zd,maxLabel:qd},ro=({input:e,reactHookFormInstance:t,onChange:n})=>{const{code:r,label:o,minValue:i=1,maxValue:a=5,defValue:c=3,thumbColor:u="#B32F5D",required:d,errorColor:m="red",labelWidth:g="300px",sliderWidth:y="300px",minText:h,maxText:b,disabled:f=!1,marks:x=Array.from({length:a-i+1},($,P)=>i+P),showMarksNumber:_=!0}=e,{t:S}=se.useTranslation(),{control:E,trigger:C,clearErrors:v}=t||{};w.useRef(d);const{errorColorForm:T}=hn($=>$),[A,k]=w.useState(c);return t?l.jsx(mn,{name:r,control:E,defaultValue:c,rules:{required:d?`${S(o)} ${S("errorMessages.required")}`:!1},render:({field:$,fieldState:P})=>{var I;return l.jsxs("div",{className:$e.rankingSliderContainer,style:{gridTemplateColumns:`${o&&g} ${y}`},children:[o&&l.jsx("p",{className:$e.labelContainer,style:{color:f?"#CCCCCC":"#605B56"},children:S(o)}),l.jsxs("div",{className:$e.inputContainer,children:[h&&l.jsx("div",{className:$e.minLabel,children:S(h)}),l.jsxs("div",{children:[l.jsx(Or,{min:i,max:a,step:1,value:$.value??c,onChange:p=>{$.onChange(p)},marks:!0,className:$e.slider,thumbClassName:$e.thumb,renderThumb:p=>l.jsx("div",{...p,style:{...p.style,backgroundColor:f?"#CCCCCC":u,cursor:f?"not-allowed":"grab"}}),trackClassName:$e.track,markClassName:$e.mark,disabled:f}),x&&l.jsx("div",{className:$e.labels,children:x.map(p=>l.jsx("span",{children:_&&p},p))})]}),b&&l.jsx("div",{className:$e.maxLabel,children:S(b)})]}),l.jsx(Kt,{errorMessage:(I=P.error)==null?void 0:I.message,errorColor:T||m})]})}}):l.jsxs("div",{className:$e.rankingSliderContainer,style:{gridTemplateColumns:`${o&&g} ${y}`},children:[o&&l.jsx("p",{className:$e.labelContainer,style:{color:f?"#CCCCCC":"#605B56"},children:S(o)}),l.jsxs("div",{className:$e.inputContainer,children:[h&&l.jsx("div",{className:$e.minLabel,children:S(h)}),l.jsxs("div",{children:[l.jsx(Or,{min:i,max:a,step:1,value:A,onChange:$=>{k($),n&&n($)},marks:!0,className:$e.slider,thumbClassName:$e.thumb,renderThumb:$=>l.jsx("div",{...$,style:{...$.style,backgroundColor:f?"#CCCCCC":u,cursor:f?"not-allowed":"grab"}}),trackClassName:$e.track,markClassName:$e.mark,disabled:f}),x&&l.jsx("div",{className:$e.labels,children:x.map($=>l.jsx("span",{children:_&&$},$))})]}),b&&l.jsx("div",{className:$e.maxLabel,children:S(b)})]})]})};ro.propTypes={input:s.shape({code:s.string,label:s.string,minValue:s.number,maxValue:s.number,defValue:s.number,thumbColor:s.string,required:s.bool,errorColor:s.string,labelWidth:s.string,sliderWidth:s.string,minText:s.string,maxText:s.string}),reactHookFormInstance:s.object};const Wd="_textDescriptionContainer_163pc_2",Ud="_textDescriptionText_163pc_6",Cs={textDescriptionContainer:Wd,textDescriptionText:Ud},Zd=({input:e,inputContainerStyles:t})=>l.jsx("div",{className:Cs.textDescriptionContainer,style:{margin:"10px 0",...t},children:l.jsx("p",{className:Cs.textDescriptionText,children:e.text})}),tn=({inputs:e,inputContainerStyles:t,reactHookFormInstance:n})=>{const{watch:r}=n,o=r(),i=w.useMemo(()=>e==null?void 0:e.map(a=>{const c=typeof a.required=="function"?a.required(o):a.required;return{...a,required:c}}),[e,o]);return l.jsx("div",{className:Vt.inputsContainer,children:i==null?void 0:i.map((a,c)=>{const{inputType:u}=a;switch(u){case Pt.text:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Vr,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Pt.password:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Vr,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Pt.select:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(qi,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Pt.radioList:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(Wi,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Pt.rankingSlider:return l.jsx("div",{className:Vt.inputContainer,style:{...t},children:l.jsx(ro,{input:a,reactHookFormInstance:n})},`${a.code}${c}`);case Pt.textDescription:return l.jsx(Zd,{input:a,inputContainerStyles:t},`${a.code}${c}`);default:return l.jsx("div",{children:l.jsx("h4",{children:"Default"})},`${a.code}${c}`)}})})},Hd="_categorySelector_1guuv_2",Kd="_sectionItemActive_1guuv_16",Gd="_sectionItem_1guuv_16",Yd="_sectionItemError_1guuv_32",nn={categorySelector:Hd,sectionItemActive:Kd,sectionItem:Gd,sectionItemError:Yd},Fr=({categories:e,onChange:t,activeCategory:n,activeColor:r,containerStyles:o={},categoriesWithErrors:i=[]})=>{const{t:a}=se.useTranslation(),c=u=>{t(u)};return l.jsx("div",{className:nn.categorySelector,style:o?{...o}:{},children:e.map((u,d)=>{const{id:m,label:g}=u,y=n==m,h=i.includes(m);return l.jsx("button",{className:`${nn.sectionItem} ${y?nn.sectionItemActive:""} ${h?nn.sectionItemError:""}`,type:"button",style:{backgroundColor:y?r:"inherit"},onClick:()=>c(m),children:l.jsx("span",{style:{color:y?"white":"inherit"},className:nn.sectionLabel,children:a(g)})},`keySection${d}`)})})},Xd=({reactHookFormInstance:e,formObject:t,CategoryComponent:n,inputContainerStyles:r,generalError:o,errorColor:i="red",submitButtonLabel:a="Submit",submitButtonStyles:c={width:325},showCategorySelector:u=!0,defaultCategory:d=null,categoryLabel:m="Select Category",activeCategory:g=null,activeCategoryColor:y="#b32f5d",categoriesWithErrors:h=[],onSubmit:b=f=>console.log("Form submitted with: ",f)})=>{const{t:f}=se.useTranslation(),{handleSubmit:x,control:_}=e;w.useEffect(()=>{i&&hn.setState(()=>({errorColor:i}))},[i]);const S=w.useMemo(()=>t?t.filter($=>$.category).map($=>{var P;return{id:$.categoryId,label:$.category,hasSubcategories:((P=$.subcategories)==null?void 0:P.length)>0}}):[],[t]),E=$=>{const P=t==null?void 0:t.find(I=>I.categoryId===$);return(P==null?void 0:P.subcategories)||[]},[C,v]=w.useState(g||d||null),[T,A]=w.useState(null);w.useEffect(()=>{!C&&S.length>0&&v(S[0].id)},[S,C]),w.useEffect(()=>{const $=E(C);!T&&($==null?void 0:$.length)>0&&A($[0].id)},[C,T,t]);const k=($,P)=>{var I;if(((I=$.subcategories)==null?void 0:I.length)>0){const p=$.subcategories;return l.jsxs("div",{children:[l.jsx("div",{className:Jt.categorySelectorContainer,children:l.jsx(Fr,{activeCategory:T,categories:p,categoriesWithErrors:h,onChange:N=>A(N),activeColor:y})},$.categoryId),p.map((N,j)=>{const V=!T||N.id===T;return n?l.jsx("div",{style:{display:V?"block":"none",width:"100%"},children:l.jsx(n,{title:N.label,children:l.jsx(tn,{inputs:N.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})},N.id)},`${N.id}${j}`):l.jsxs("div",{style:{width:"100%",display:V?"block":"none"},children:[l.jsx("h3",{style:{marginBottom:15},children:f(N.label)}),l.jsx(tn,{inputs:N.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})]},`${N.id}${j}`)})]})}return n?l.jsx(n,{title:$.category,children:l.jsx(tn,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})},$.categoryId):l.jsxs("div",{style:{width:"100%"},children:[l.jsx("h2",{children:f($.category)}),l.jsx(tn,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e})]},$.categoryId)};return l.jsxs("form",{className:Jt.formContainer,onSubmit:x(b),children:[u&&S.length>0&&l.jsx("div",{className:Jt.categorySelectorContainer,children:l.jsx(Fr,{activeCategory:C,categories:S,categoriesWithErrors:h,onChange:$=>{v($),A(null)},activeColor:y})}),l.jsx("div",{className:Jt.formObjectContainer,children:t==null?void 0:t.map(($,P)=>{const I=$.categoryId===C;return $.category?l.jsx("div",{style:{width:"100%",display:I?"block":"none"},children:k($)},$.categoryId):l.jsx(tn,{inputs:$.inputs,control:_,inputContainerStyles:r,errorColor:i,reactHookFormInstance:e},`no-category-${P}`)})}),l.jsxs("div",{className:Jt.buttonContainer,children:[l.jsx(un,{containerStyles:c,type:"submit",children:f(a)}),l.jsx(Kt,{errorMessage:o,errorColor:i})]})]})},Qd="_overlay_mnd4j_2",Jd="_modal_mnd4j_15",ef="_closeButton_mnd4j_29",tf="_icon_mnd4j_39",nf="_message_mnd4j_45",rf="_submessage_mnd4j_51",of="_buttonsContainer_mnd4j_57",sf="_buttonWrapper_mnd4j_64",pt={overlay:Qd,modal:Jd,closeButton:ef,icon:tf,message:nf,submessage:rf,buttonsContainer:of,buttonWrapper:sf},Ui=({onClose:e,icon:t,message:n,submessage:r,buttons:o,maxHeight:i="450px",maxWidth:a="450px"})=>l.jsx("div",{className:pt.overlay,children:l.jsxs("div",{className:pt.modal,style:{maxHeight:i,maxWidth:a},children:[l.jsx("button",{className:pt.closeButton,onClick:e,"aria-label":"Close modal",children:"✕"}),t&&l.jsx("img",{src:t,alt:"icon",className:pt.icon}),l.jsx("p",{className:pt.message,children:n}),r&&l.jsx("p",{className:pt.submessage,children:r}),o.length>0&&l.jsx("div",{className:pt.buttonsContainer,children:o.map((c,u)=>l.jsx("div",{className:pt.buttonWrapper,children:c},u))})]})});Ui.propTypes={onClose:s.func.isRequired,icon:s.string,message:s.string.isRequired,submessage:s.string,buttons:s.arrayOf(s.node),maxHeight:s.string,maxWidth:s.string};const af="_stepsContainer_1cyua_3",lf="_stepWrapper_1cyua_9",cf="_circleContainer_1cyua_19",uf="_circle_1cyua_19",df="_active_1cyua_39",ff="_completed_1cyua_44",pf="_label_1cyua_50",mf="_labelActive_1cyua_56",hf="_connector_1cyua_61",st={stepsContainer:af,stepWrapper:lf,circleContainer:cf,circle:uf,active:df,completed:ff,label:pf,labelActive:mf,connector:hf},oo=({steps:e,activeColor:t})=>l.jsx("div",{className:st.stepsContainer,children:e.map((n,r)=>{const o=n.status==="active",i=n.status==="completed";return l.jsxs("div",{className:st.stepWrapper,children:[l.jsxs("div",{className:st.circleContainer,children:[l.jsx("div",{className:`${st.circle}
|
|
81
81
|
${o?st.active:""}
|
|
82
82
|
${i?st.completed:""}`,style:o?{backgroundColor:t}:{},onClick:n.onClick,children:r+1}),r<e.length-1&&l.jsx("div",{className:st.connector})]}),l.jsx("div",{className:`${st.label} ${o?st.labelActive:""}`,children:n.name})]},r)})});oo.propTypes={steps:s.arrayOf(s.shape({name:s.string.isRequired,onClick:s.func,status:s.oneOf(["inactive","active","completed"]).isRequired})).isRequired,activeColor:s.string};oo.defaultProps={activeColor:"#C2185B"};const gf="_statusTextContainer_ch14r_2",yf={statusTextContainer:gf},so=({text:e,color:t})=>l.jsx("div",{className:yf.statusTextContainer,style:{background:t},children:l.jsx("span",{children:e})});so.propTypes={text:s.string,color:s.string};so.defaultProps={color:"#C2185B"};const bf="_buttonsContainer_1c7dw_2",vf="_button_1c7dw_2",xf="_active_1c7dw_20",On={buttonsContainer:bf,button:vf,active:xf},Zi=({buttons:e=[]})=>{const{t}=se.useTranslation();return l.jsx("div",{className:`${On.buttonsContainer}`,children:e.map((n,r)=>{const{isActive:o,name:i,onClick:a}=n;return l.jsx("div",{children:l.jsx("button",{onClick:a,className:`${On.button}
|
|
83
|
-
${o&&On.active}`,children:l.jsx("span",{className:On.buttonName,children:t(i)})})},r)})})};Zi.propTypes={buttons:s.arrayOf(s.shape({isActive:s.bool,name:s.string,onClick:s.func})).isRequired};const Cf="_switchContainer_194wl_2",_f="_labelRight_194wl_9",wf="_labelLeft_194wl_9",Sf="_slider_194wl_28",Tf="_disabled_194wl_54",Ft={switchContainer:Cf,labelRight:_f,labelLeft:wf,switch:"_switch_194wl_2",slider:Sf,disabled:Tf},Hi=({input:e,reactHookFormInstance:t,onChange:n,onoff:r=!0})=>{const{code:o,labelLeft:i,labelRight:a,defValue:c=!1,colorOn:u="#5A514D",disabled:d=!1,width:m=240}=e,{t:g}=se.useTranslation(),{control:y}=t||{},[h,b]=w.useState(c),f=_=>{b(_),n&&n(_)},x=(_,S)=>l.jsxs("div",{className:Ft.switchContainer,style:{width:`${m}px`},children:[i&&l.jsx("span",{className:Ft.labelLeft,style:{width:`${(m-74)/2}px`},children:g(i)}),l.jsxs("label",{className:`${Ft.switch} ${d?Ft.disabled:""}`,children:[l.jsx("input",{type:"checkbox",checked:!!_,onChange:()=>S(!_),disabled:d}),l.jsx("span",{className:Ft.slider,style:{"--switch-thumb-color":r?_?u:"#ccc":u}})]}),a&&l.jsx("span",{className:Ft.labelRight,style:{width:`${(m-74)/2}px`},children:g(a)})]});return t?l.jsx(mn,{name:o,control:y,defaultValue:c,render:({field:_})=>x(_.value,_.onChange)}):x(h,f)};Hi.propTypes={input:s.shape({code:s.string,labelLeft:s.string,labelRight:s.string,defValue:s.bool,colorOn:s.string,disabled:s.bool}),reactHookFormInstance:s.object,onChange:s.func};const kf="_overlay_1xyw2_2",jf="_popup_1xyw2_15",$f="_gif_1xyw2_25",Ef="_message_1xyw2_31",An={overlay:kf,popup:jf,gif:$f,message:Ef},Ki=({gifSrc:e,message:t})=>l.jsx("div",{className:An.overlay,children:l.jsxs("div",{className:An.popup,children:[e&&l.jsx("img",{src:e,alt:"loading animation",className:An.gif}),t&&l.jsx("p",{className:An.message,children:t})]})});Ki.propTypes={gifSrc:s.string,message:s.string};const Nf="_container_1pl8d_3",Of="_burger_1pl8d_10",Af="_menu_1pl8d_21",Lf="_menuOpen_1pl8d_35",Mf="_menuClose_1pl8d_40",Rf="_list_1pl8d_46",If="_item_1pl8d_56",Df="_button_1pl8d_91",Xe={container:Nf,burger:Of,menu:Af,menuOpen:Lf,menuClose:Mf,list:Rf,item:If,button:Df},io=({options:e,backgroundColor:t,textColor:n,iconColor:r})=>{const[o,i]=w.useState(!1),a=()=>i(b=>!b),c=()=>i(!1),u=7,d=o?11:0,m=o?13:0,g=o?-11.51666:0,y=o?-13:0,h="0.35s";return l.jsxs("div",{className:Xe.container,children:[l.jsx("button",{onClick:a,className:Xe.burger,children:l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[l.jsx("g",{style:{transform:`translateY(${d}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"9",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${m}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"7",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${y}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"33",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"20",r:"10",fill:r})}),l.jsxs("g",{stroke:t,strokeWidth:"2",strokeLinecap:"round",style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:[l.jsx("line",{x1:"17",y1:"17",x2:"23",y2:"23"}),l.jsx("line",{x1:"23",y1:"17",x2:"17",y2:"23"})]})]})}),l.jsx("div",{className:`${Xe.menu} ${o?Xe.menuOpen:Xe.menuClose}`,style:{backgroundColor:t,color:n},children:l.jsx("ul",{className:Xe.list,children:e.map((b,f)=>l.jsxs("li",{className:Xe.item,children:[b.url&&l.jsx(As.NavLink,{to:b.url,className:({isActive:x})=>`${Xe.link} ${x?Xe.active:""}`,onClick:c,style:{color:n},children:b.name}),b.onclick&&l.jsx("button",{className:Xe.button,onClick:()=>{b.onclick(),c()},children:b.name}),b.component&&b.component]},f))})})]})};io.propTypes={options:s.array.isRequired,backgroundColor:s.string,textColor:s.string,iconColor:s.string};io.defaultProps={backgroundColor:"#ffffff",textColor:"#000000",iconColor:"#000000"};const Bf="_svgContainer_1rxoe_2",Pf="_svg_1rxoe_2",_s={svgContainer:Bf,svg:Pf},Gi=({data:e,keys:t,colors:n,width:r="100%",height:o=300,margin:i={top:20,right:20,bottom:60,left:60},className:a="",showXAxisLabels:c=!0,showYAxisLabels:u=!0,showGrid:d=!0,xAxisTickRotation:m=-90,yAxisTickFormat:g=C=>C.toLocaleString("es-ES"),barPadding:y=.1,groupPadding:h=.05,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:S,yAxisLabel:E})=>{const C=w.useRef(),v=w.useRef(),[T,A]=w.useState({width:0,height:0});return w.useEffect(()=>{const k=()=>{if(v.current){const $=v.current.getBoundingClientRect().width;A({width:typeof r=="number"?r:$,height:o})}};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[r,o]),w.useEffect(()=>{if(!e||e.length===0||T.width===0)return;const k=ce.select(C.current),$=T.width,P=T.height,I=$-i.left-i.right,p=P-i.top-i.bottom;if(I<=0||p<=0)return;const N=e.map(F=>F.anyo||F.year||F.x),j=t,V=ce.min(e,F=>ce.min(j,K=>F[K]))||0,W=ce.max(e,F=>ce.max(j,K=>F[K]))||0,D=ce.scaleBand().domain(N).rangeRound([0,I]).paddingInner(y),q=ce.scaleBand().domain(j).rangeRound([0,D.bandwidth()]).padding(h),te=ce.scaleLinear().domain([Math.min(0,V),W]).nice().rangeRound([p,0]),L=ce.scaleOrdinal().domain(j).range(Array.isArray(n)?n:Object.values(n||{}));k.selectAll("*").remove();const M=k.append("g").attr("transform",`translate(${i.left},${i.top})`);_&&k.append("text").attr("x",$/2).attr("y",i.top/2).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),d&&M.append("g").attr("class","grid").selectAll("line").data(te.ticks()).enter().append("line").attr("x1",0).attr("x2",I).attr("y1",F=>te(F)).attr("y2",F=>te(F)).style("stroke","#e0e0e0").style("stroke-width",.5),c&&(M.append("g").attr("transform",`translate(0,${p})`).call(ce.axisBottom(D).tickSizeOuter(0)).attr("class","x-axis").selectAll("text").attr("transform",`translate(0,10)rotate(${m})`).style("text-anchor",m<0?"end":"middle").style("font-size","12px").style("fill","#605B56"),S&&M.append("text").attr("transform",`translate(${I/2}, ${p+i.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(S)),u&&(M.append("g").call(ce.axisLeft(te).ticks(6).tickFormat(g)).attr("class","y-axis").call(F=>F.select(".domain").remove()),E&&M.append("text").attr("transform","rotate(-90)").attr("y",0-i.left).attr("x",0-p/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(E));const J=M.append("g").selectAll(".bar-group").data(e).enter().append("g").attr("class","bar-group").attr("transform",F=>`translate(${D(F.anyo||F.year||F.x)},0)`).selectAll(".bar").data(F=>j.map(K=>({key:K,value:F[K],data:F}))).enter().append("rect").attr("class","bar").attr("x",F=>q(F.key)).attr("y",p).attr("width",q.bandwidth()).attr("height",0).attr("fill",F=>L(F.key)).style("cursor",f||x?"pointer":"default");J.transition().duration(b).attr("y",F=>te(Math.max(0,F.value))).attr("height",F=>Math.abs(te(F.value)-te(0))),f&&J.on("mouseover",function(F,K){ce.select(this).style("opacity",.8),f(F,K)}).on("mouseout",function(F,K){ce.select(this).style("opacity",1)}),x&&J.on("click",x)},[e,t,n,T,i,y,h,c,u,d,m,g,b,f,x,_,S,E]),l.jsx("div",{ref:v,className:`${_s.svgContainer} ${a}`,style:{width:r,height:o+i.top+i.bottom},children:l.jsx("svg",{ref:C,className:_s.svg,width:T.width,height:T.height})})};Gi.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.oneOfType([s.arrayOf(s.string),s.object]),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,groupPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string};const Vf="_svgContainer_7fkic_2",Ff="_svg_7fkic_2",ws={svgContainer:Vf,svg:Ff},Yi=({data:e,keys:t,colors:n,lineData:r=null,width:o="100%",height:i=300,margin:a={top:20,right:20,bottom:60,left:60},className:c="",showXAxisLabels:u=!0,showYAxisLabels:d=!0,showGrid:m=!0,xAxisTickRotation:g=-90,yAxisTickFormat:y=P=>P.toLocaleString("es-ES"),barPadding:h=.4,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:S,yAxisLabel:E,stackOrder:C="reverse",showTooltip:v=!0,reverseKeys:T=!0,minBarSlotWidth:A=60,wrapXAxisLabels:k=!0,mode:$="stacked"})=>{const P=w.useRef(),I=w.useRef();w.useRef();const[p,N]=w.useState({containerWidth:0,height:0}),{t:j}=se.useTranslation();return w.useEffect(()=>{const V=()=>{if(I.current){const W=I.current.getBoundingClientRect().width;N({containerWidth:typeof o=="number"?o:W,height:i})}};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[o,i]),w.useEffect(()=>{if(!e||e.length===0||p.containerWidth===0)return;const V=ce.select(P.current),{containerWidth:W,height:D}=p,q=W-a.left-a.right,te=e.length*A,L=Math.max(q,te),M=L+a.left+a.right,H=D-a.top-a.bottom;if(L<=0||H<=0)return;V.attr("width",M).attr("height",D);const J=$==="stacked"?T?[...t].reverse():t:[],F=U=>$==="single"?U.title:U.any||U.year||U.x,K=[];e.forEach(U=>{const ae=F(U);if($==="single"){const me=Number(U.value)||0;K.push({key:U.title,value:me,y0:Math.min(0,me),y1:Math.max(0,me),height:Math.abs(me),data:U,xKey:ae,color:U.color})}else{const me=J.map(B=>({key:B,value:Number(U[B])||0,data:U})),_e=me.filter(B=>B.value<0),ke=me.filter(B=>B.value>=0);let Ve=0;_e.forEach(B=>{const Z=Ve,X=Ve+B.value,ie=Math.abs(X-Z);K.push({key:B.key,value:B.value,y0:Math.max(Z,X),y1:Math.min(Z,X),height:ie,data:B.data,xKey:ae}),Ve=X});let R=0;ke.forEach(B=>{const Z=R,X=R+B.value,ie=X-Z;K.push({key:B.key,value:B.value,y0:Math.min(Z,X),y1:Math.max(Z,X),height:ie,data:B.data,xKey:ae}),R=X})}});const re=[ce.min(K,U=>Math.min(U.y0,U.y1))||0,ce.max(K,U=>Math.max(U.y0,U.y1))||0];let ne=[0,0];r&&r.length>0&&(ne=[ce.min(r)||0,ce.max(r)||0]);const oe=[Math.min(re[0],ne[0]),Math.max(re[1],ne[1])],ee=ce.scaleBand().domain(e.map(U=>F(U))).range([0,L]).padding(h),G=ce.scaleLinear().domain([oe[0],oe[1]]).nice(6).range([H,0]),be=t?ce.scaleOrdinal().domain(t).range(Array.isArray(n)?n:Object.values(n||{})):null,z=$==="single"?U=>U.color||(Array.isArray(n)?n[0]:Object.values(n||{})[0])||"#888":U=>be(U.key),le=r&&r.length>0?e.map((U,ae)=>{const me=ee(F(U))+ee.bandwidth()/2,_e=G(r[ae]||0);return{x:me,y:_e}}):[];V.selectAll("*").remove();const Ce=V.append("g").attr("transform",`translate(${a.left},${a.top})`);_&&V.append("text").attr("x",M/2).attr("y",a.top-4).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),m&&Ce.append("g").attr("class","grid").selectAll("line").data(G.ticks(6)).enter().append("line").attr("x1",0).attr("x2",L).attr("y1",U=>G(U)).attr("y2",U=>G(U)).style("stroke","#e0e0e0").style("stroke-width",.5);const ct=(U,ae=12)=>{if(!k||U.length<=ae)return[U];const me=Math.floor(U.length/2);let _e=me;for(let ke=me;ke>=0;ke--)if(U[ke]===" "){_e=ke;break}if(_e===me){for(let ke=me;ke<U.length;ke++)if(U[ke]===" "){_e=ke;break}}return _e===me&&(_e=me),[U.substring(0,_e),U.substring(_e+1)]};u&&(Ce.append("g").attr("class","x-axis").attr("transform",`translate(0, ${H})`).call(ce.axisBottom(ee).tickSizeOuter(0)).selectAll("text").remove(),Ce.append("g").attr("class","x-axis-labels").attr("transform",`translate(0, ${H})`).selectAll(".x-label-group").data(e).enter().append("g").attr("class","x-label-group").attr("transform",_e=>`translate(${ee(F(_e))+ee.bandwidth()/2}, 0)`).each(function(_e){const ke=String(F(_e)),Ve=ct(ke),R=ce.select(this);if(Ve.length===1)R.append("text").attr("y",19).style("text-anchor",g===0?"middle":g<0?"end":"start").style("font-size","12px").style("fill","#605B56").attr("transform",g!==0?`rotate(${g} 0 15)`:null).text(Ve[0]);else{const X=-(Ve.length*14/2)+14/2;Ve.forEach((ie,Y)=>{R.append("text").attr("x",X+Y*14).attr("y",19).style("text-anchor","end").style("font-size","11px").style("fill","#605B56").attr("transform",`rotate(${g} ${X+Y*14} 15)`).text(ie)})}}),S&&Ce.append("text").attr("transform",`translate(${L/2}, ${H+a.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(S)),d&&(Ce.append("g").attr("class","y-axis").call(ce.axisLeft(G).ticks(6).tickFormat(y)).call(U=>U.select(".domain").remove()),Ce.append("g").attr("class","y-ticks").attr("transform",`translate(${L}, 0)`).call(ce.axisLeft(G).ticks(6).tickSizeInner(L)).call(U=>U.select(".domain").remove()).call(U=>U.selectAll(".tick text").remove()),E&&Ce.append("text").attr("transform","rotate(-90)").attr("y",0-a.left).attr("x",0-H/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(E));let De;v&&(De=ce.select("body").append("div").attr("class","chart-tooltip").style("position","absolute").style("visibility","hidden").style("background","rgba(0, 0, 0, 0.8)").style("color","white").style("padding","8px").style("border-radius","4px").style("font-size","12px").style("pointer-events","none").style("z-index","1000"));const Ee=Ce.selectAll(".segment").data(K,U=>`${U.xKey}-${U.key}`);Ee.exit().remove();const tt=Ee.enter().append("rect").attr("class","segment").attr("x",U=>ee(U.xKey)).attr("width",ee.bandwidth()).attr("y",U=>G(0)).attr("height",0).attr("fill",U=>z(U)).style("cursor",f||x||v?"pointer":"default").merge(Ee);if(tt.transition().duration(b).attr("x",U=>ee(U.xKey)).attr("y",U=>Math.min(G(U.y0),G(U.y1))).attr("height",U=>Math.abs(G(U.y1)-G(U.y0))),(v||f)&&tt.on("mouseover",function(U,ae){const me=ae.value;if(v&&De){const _e=$==="single"?ae.data.title:j(ae.key);De.style("visibility","visible").html($==="single"?`<strong>${_e}</strong><br/>${y(me)}`:`<strong>${_e}</strong><br/>${ae.xKey}<br/>${y(me)}`)}ce.select(this).style("opacity",.8),f&&f(U,{key:ae.key,value:me,data:ae.data})}).on("mousemove",function(U){v&&De&&De.style("top",U.pageY-10+"px").style("left",U.pageX+10+"px")}).on("mouseout",function(){v&&De&&De.style("visibility","hidden"),ce.select(this).style("opacity",1)}),x&&tt.on("click",function(U,ae){const me=ae.value;x(U,{key:ae.key,value:me,data:ae.data})}),le&&le.length>1){const U=ce.line().x(ae=>ae.x).y(ae=>ae.y).curve(ce.curveMonotoneX);Ce.append("path").datum(le).attr("class","line").attr("d",U).attr("fill","none").attr("stroke","#ff6b6b").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round"),Ce.selectAll(".line-point").data(le).enter().append("circle").attr("class","line-point").attr("cx",ae=>ae.x).attr("cy",ae=>ae.y).attr("r",4).attr("fill","#ff6b6b").attr("stroke","white").attr("stroke-width",1)}return()=>{De&&De.remove()}},[e,t,n,r,p,a,h,u,d,m,g,y,b,f,x,_,S,E,C,v,T,k,$]),l.jsx("div",{ref:I,className:`${ws.svgContainer} ${c}`,style:{width:o,height:i+a.top+a.bottom,overflowX:"auto"},children:l.jsx("svg",{ref:P,className:ws.svg})})};Yi.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string),colors:s.oneOfType([s.arrayOf(s.string),s.object]),lineData:s.arrayOf(s.number),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string,stackOrder:s.oneOf(["reverse","ascending","descending","insideOut","none"]),showTooltip:s.bool,reverseKeys:s.bool,minBarSlotWidth:s.number,wrapXAxisLabels:s.bool,mode:s.oneOf(["single","stacked"])};const zf="_externalContainer_1er0i_2",qf="_externalSintetic_1er0i_9",Wf="_titles_1er0i_13",Uf="_titleContainer_1er0i_22",Zf="_yearTitles_1er0i_36",Hf="_yearTitle_1er0i_36",Kf="_yearDatas_1er0i_50",Gf="_yearDataContainer_1er0i_58",Yf="_yearDataContent_1er0i_66",Xf="_bigNumber_1er0i_79",Qf="_circle_1er0i_82",Jf="_totalContainer_1er0i_99",ep="_total_1er0i_99",Be={externalContainer:zf,externalSintetic:qf,titles:Wf,titleContainer:Uf,yearTitles:Zf,yearTitle:Hf,yearDatas:Kf,yearDataContainer:Gf,yearDataContent:Yf,bigNumber:Xf,circle:Qf,totalContainer:Jf,total:ep},tp=e=>{if(e>=1e3||e<=-1e3)return parseInt(e.toFixed());if(e>=100||e<=-100)return parseFloat(e.toFixed(1));if(e>=10||e<=-10)return parseFloat(e.toFixed(2));if(e>0||e<0)return parseFloat(e.toFixed(3));if(e===0)return e},np=(e,t)=>{let n=0;return t.forEach(r=>{r[e]&&(n+=r[e])}),n},Xi=({data:e,keys:t,colors:n,locales:r,total:o=!1,years:i=!1,activeGraphics:a="ind",units:c={},translate:u,getTotal:d=np,columnWidth:m=50})=>{const g=u||(h=>h),y=h=>h==="demanda_red"||h==="reduccio_demanda_red"?(c.demanda||"").replace("(","").replace(")",""):c[h]||"";return l.jsxs("div",{className:`${Be.externalContainer} ${a==="sin"?Be.externalSintetic:""}`,children:[i===!0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsx("div",{className:Be.yearTitles,children:e.map((h,b)=>l.jsx("div",{className:Be.yearTitle,style:{width:m},children:h.anyo},b))})]}),l.jsx("div",{className:Be.titles,children:t.map((h,b)=>l.jsxs("div",{className:Be.titleContainer,children:[g(r[h]),a!=="sin"&&l.jsx("span",{className:Be.circle,style:{background:n[h]}})]},b))}),o===!0&&l.jsx("div",{className:Be.totalContainer,children:t.map((h,b)=>{var f;return l.jsxs("div",{className:`${Be.total} ${d(h,e)>9999||d(h,e)<-9999?Be.bigNumber:""}`,children:[(f=d(h,e))==null?void 0:f.toLocaleString("es-ES")," ",y(h)]},b)})}),l.jsx("div",{className:Be.yearDatas,children:e.map((h,b)=>l.jsx("div",{className:Be.yearDataContainer,style:{width:m},children:t.map((f,x)=>{var _,S;return isNaN(h[f])?null:l.jsx("div",{className:`${Be.yearDataContent} ${h[f]>9999||h[f]<-9999?Be.bigNumber:""}`,children:h[f]<1e4||h[f]>-1e4?(_=tp(h[f]))==null?void 0:_.toLocaleString("es-ES"):(S=h[f])==null?void 0:S.toLocaleString("es-ES")},x)})},b))})]})};Xi.propTypes={data:s.arrayOf(s.shape({anyo:s.oneOfType([s.string,s.number]).isRequired})).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.objectOf(s.string).isRequired,locales:s.objectOf(s.string).isRequired,total:s.bool,years:s.bool,activeGraphics:s.oneOf(["ind","sin"]),units:s.objectOf(s.string),translate:s.func,getTotal:s.func,columnWidth:s.number};const rp="_speedGraphic_d1k72_2",Tr={speedGraphic:rp},Qi=({minValue:e=0,maxValue:t=100,value:n=50,title:r=!1,percent:o=!1,unit:i=!1,greenColor:a="#00CF1E",orangeColor:c="#FFAC00",redColor:u="#FF1E37"})=>{n<e&&(n=e),n>t&&(n=t);const d=(n-e)/(t-e),m=270+d*180,g=o?Math.round(d*100):n;return l.jsxs("div",{className:Tr.speedGraphic,children:[l.jsxs("svg",{width:"244",height:"130",viewBox:"0 0 244 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M0 122C0 111.944 1.2433 101.927 3.70162 92.1756L26.2619 97.8633C24.2724 105.755 23.2662 113.862 23.2662 122H0Z",fill:a}),l.jsx("path",{d:"M16.3442 61.0012C21.3714 52.2936 27.4557 44.2409 34.4588 37.0263L51.1534 53.2313C45.4859 59.0701 40.5619 65.5871 36.4934 72.6341L16.3442 61.0012Z",fill:a}),l.jsx("path",{d:"M60.9088 16.3976C69.6119 11.3628 78.9041 7.42322 88.5739 4.66843L94.9485 27.0443C87.1228 29.2737 79.6027 32.462 72.5592 36.5367L60.9088 16.3976Z",fill:c}),l.jsx("path",{d:"M121.797 0.000169508C131.851 -0.0165912 141.869 1.20965 151.623 3.65101L145.974 26.2209C138.08 24.2451 129.972 23.2527 121.835 23.2663L121.797 0.000169508Z",fill:c}),l.jsx("path",{d:"M182.623 16.1279C191.348 21.124 199.422 27.1797 206.662 34.157L190.516 50.9092C184.657 45.2625 178.123 40.3617 171.061 36.3183L182.623 16.1279Z",fill:u}),l.jsx("path",{d:"M227.238 60.2836C232.325 68.9568 236.319 78.2255 239.131 87.8788L216.794 94.3859C214.518 86.5735 211.285 79.0725 207.169 72.0533L227.238 60.2836Z",fill:u}),l.jsx("path",{d:"M4.15505 90.4316C6.75674 80.7194 10.5491 71.3662 15.4458 62.5846L35.7663 73.9155C31.8035 81.0224 28.7343 88.5919 26.6288 96.4519L4.15505 90.4316Z",fill:a}),l.jsx("path",{d:"M35.733 35.733C42.8426 28.6233 50.8039 22.4198 59.4357 17.2636L71.3671 37.2375C64.3814 41.4104 57.9384 46.4308 52.1846 52.1846L35.733 35.733Z",fill:a}),l.jsx("path",{d:"M90.3004 4.19027C100.01 1.57776 110.005 0.175523 120.058 0.0154601L120.428 23.2787C112.292 23.4082 104.203 24.543 96.3457 26.6573L90.3004 4.19027Z",fill:c}),l.jsx("path",{d:"M153.423 4.11614C163.138 6.70584 172.496 10.4866 181.284 15.3725L169.978 35.707C162.866 31.7529 155.293 28.6932 147.43 26.5973L153.423 4.11614Z",fill:c}),l.jsx("path",{d:"M239.602 89.538C242.532 100.152 244.011 111.114 244 122.125L220.734 122.101C220.743 113.19 219.546 104.319 217.175 95.7287L239.602 89.538Z",fill:u}),l.jsx("path",{d:"M207.769 35.2376C214.919 42.3062 221.168 50.2316 226.374 58.8336L206.469 70.8798C202.256 63.9183 197.199 57.5043 191.412 51.7837L207.769 35.2376Z",fill:u}),l.jsx("g",{transform:`rotate(${m} 122 122)`,children:l.jsx("path",{id:"aguja",d:"M121 119.5V33",stroke:"#605B56","stroke-width":"2"})})]}),l.jsxs("div",{className:Tr.value,children:[g,o&&"%",i&&i]}),r&&l.jsx("div",{className:Tr.title,children:r})]})};Qi.propTypes={minValue:s.number.isRequired,maxValue:s.number.isRequired,value:s.number.isRequired,percent:s.bool,title:s.string,unit:s.string,greenColor:s.string,orangeColor:s.string,redColor:s.string};const kr="#ffffff",op="#ffffff";function at(e,t,n,r){const o=(r-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function Ss(e,t,n,r,o,i){if(Math.abs(i-o)>=359.99)return n===0?`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`:[`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`,`M ${e-n} ${t} A ${n} ${n} 0 1 0 ${e+n} ${t} A ${n} ${n} 0 1 0 ${e-n} ${t} Z`].join(" ");const a=at(e,t,r,o),c=at(e,t,r,i),u=i-o>180?1:0;if(n===0)return`M ${e} ${t} L ${a.x} ${a.y} A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y} Z`;const d=at(e,t,n,i),m=at(e,t,n,o);return[`M ${a.x} ${a.y}`,`A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y}`,`L ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 0 ${m.x} ${m.y}`,"Z"].join(" ")}function sp(e,t=0){const n=e.reduce((d,m)=>d+(m.value||0),0),r=e.length;if(n<=0||r===0)return[];const o=e.map(d=>d.value/n*100),i=Math.min(t,r>0?360/r-.01:0);let a=o.map(d=>d/100*360),c=new Array(r).fill(!1);if(i>0){let d=0,m=!0;for(;m&&d<r+2;){m=!1,d+=1;for(let g=0;g<r;g++)!c[g]&&a[g]<i&&(a[g]=i,c[g]=!0,m=!0);if(m){const g=a.reduce((f,x,_)=>c[_]?f+x:f,0),y=a.map((f,x)=>x).filter(f=>!c[f]),h=360-g,b=y.reduce((f,x)=>f+o[x]/100*360,0);y.forEach(f=>{const x=o[f]/100*360;a[f]=b>0?x/b*h:h/y.length})}}}let u=0;return e.map((d,m)=>{const g=u,y=u+a[m];return u=y,{...d,sa:g,ea:y,percent:o[m]}})}function Ji(e){const t=Math.round(e*10)/10;return Number.isInteger(t)?t:t.toFixed(1)}function ip(e){return typeof e=="number"?e.toLocaleString():e}function Ts(e,t){return t?`${Ji(e.percent)}%`:ip(e.value)}function ks(e,t,n,r,o){const i=n+(r-n)/2,a=at(e,t,o,i);return{tx:a.x-e,ty:a.y-t}}const ea=({type:e="cheese",data:t=[],title:n,size:r=260,donutThickness:o=56,gapWidth:i=3,gapColor:a,backgroundColor:c="transparent",fontColor:u="black",fontColorInside:d="white",containerStyles:m={},alignLeft:g=!1,valuesArePercentages:y=!0,minSliceAngle:h=8})=>{const[b,f]=w.useState(null),[x,_]=w.useState(()=>t.map(()=>!0)),S=t.map(D=>D.title).join("|"),[E,C]=w.useState(S);S!==E&&(C(S),_(t.map(()=>!0)));const v=x.filter(Boolean).length;function T(D){_(q=>{const te=q.filter(Boolean).length;if(q[D]&&te<=1)return q;const L=[...q];return L[D]=!L[D],L}),f(null)}const A=r/2,k=r/2,$=r/2-14,P=e==="donut"?$-o:0,I=e==="donut"?$-o/2:$*.62,p=w.useMemo(()=>t.reduce((D,q,te)=>(x[te]&&D.push({...q,origIndex:te}),D),[]),[t,x]),N=w.useMemo(()=>sp(p,h),[p,h]),j=b!==null&&N.find(D=>D.origIndex===b)||null,V=N.some(D=>D.ea-D.sa>=359.99),W=a||(c==="transparent"?op:c);return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px",padding:"0px",background:c,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[l.jsxs("div",{style:{minHeight:"40px",display:"flex",flexDirection:"column",gap:"2px"},children:[n&&l.jsx("h2",{style:{margin:0,color:u,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.5px"},children:n}),l.jsx("div",{style:{height:"22px",display:"flex",alignItems:"center",gap:"8px",transition:"opacity 0.15s",opacity:j?1:0},children:j&&l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",background:j.color||kr,flexShrink:0}}),l.jsxs("span",{style:{color:u,fontSize:"14px",fontWeight:"600"},children:[j.title," —"," ",Ts(j,y),!y&&` (${Ji(j.percent)}%)`]})]})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g?"flex-start":"center",gap:"16px"},children:[l.jsxs("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,style:{overflow:"visible"},children:[N.map(D=>{const q=b===D.origIndex,{tx:te,ty:L}=q&&!V?ks(A,k,D.sa,D.ea,10):{tx:0,ty:0};return l.jsx("g",{transform:`translate(${te}, ${L})`,style:{transition:"transform 0.18s ease",pointerEvents:"none"},children:l.jsx("path",{d:Ss(A,k,P,$,D.sa,D.ea),fill:D.color||kr,style:{filter:q?"brightness(1.25)":"brightness(1)",transition:"filter 0.18s ease"}})},D.origIndex)}),!V&&N.map(D=>{const q=at(A,k,$,D.sa),te=e==="cheese"?A:at(A,k,P,D.sa).x,L=e==="cheese"?k:at(A,k,P,D.sa).y;return l.jsx("line",{x1:te,y1:L,x2:q.x,y2:q.y,stroke:W,strokeWidth:i,strokeLinecap:"butt",style:{pointerEvents:"none"}},`gap-${D.origIndex}`)}),N.map(D=>{if(D.ea-D.sa<20)return null;const q=b===D.origIndex,{tx:te,ty:L}=q&&!V?ks(A,k,D.sa,D.ea,10):{tx:0,ty:0},M=D.sa+(D.ea-D.sa)/2,H=at(A,k,I,M);return l.jsx("text",{x:H.x+te,y:H.y+L,textAnchor:"middle",dominantBaseline:"middle",fill:d,fontSize:"14",fontWeight:"700",fontFamily:"'Segoe UI', sans-serif",pointerEvents:"none",style:{transition:"x 0.18s ease, y 0.18s ease"},children:Ts(D,y)},`lbl-${D.origIndex}`)}),N.map(D=>l.jsx("path",{d:Ss(A,k,P,$,D.sa,D.ea),fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(D.origIndex),onMouseLeave:()=>f(null)},`hit-${D.origIndex}`))]}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px 24px",justifyContent:g?"flex-start":"center"},children:t.map((D,q)=>{const te=x[q],L=te&&v<=1;return l.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":te,"aria-label":`${te?"Ocultar":"Mostrar"} ${D.title}`,title:L?"Debe quedar al menos una categoría activa":te?"Ocultar del gráfico":"Mostrar en el gráfico",onClick:()=>T(q),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),T(q))},style:{display:"flex",alignItems:"center",gap:"8px",opacity:te&&(b===null||b===q)?1:.4,cursor:L?"not-allowed":"pointer",transition:"opacity 0.15s",userSelect:"none"},onMouseEnter:()=>te&&f(q),onMouseLeave:()=>f(null),children:[l.jsx("span",{style:{width:"32px",height:"14px",borderRadius:"3px",background:D.color||kr,flexShrink:0}}),l.jsx("span",{style:{color:u,fontSize:"13px",fontWeight:"400"},children:D.title})]},q)})})]})]})};ea.propTypes={type:s.oneOf(["cheese","donut"]),data:s.arrayOf(s.shape({value:s.number.isRequired,title:s.string.isRequired,color:s.string})).isRequired,title:s.string,size:s.number,donutThickness:s.number,gapWidth:s.number,gapColor:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,containerStyles:s.object,alignLeft:s.bool,valuesArePercentages:s.bool,minSliceAngle:s.number};const js=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],ta=({data:e=[],title:t,backgroundColor:n="#0d3d4a",fontColor:r="#ffffff",barHeight:o=52,animated:i=!0,borderRadius:a,containerStyles:c={},fontColorInside:u="white",borderFontColorInside:d})=>{const[m,g]=w.useState(i?0:1);w.useEffect(()=>{if(!i)return;const b=requestAnimationFrame(()=>g(1));return()=>cancelAnimationFrame(b)},[i]);const y=Math.max(...e.map(b=>b.value),1),h=a??"6px";return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0px",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",minWidth:"420px",...c},children:[t&&l.jsx("h2",{style:{margin:"0 0 20px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"18px"},children:e.map((b,f)=>{const x=b.color||js[f%js.length],_=b.value/y*100*m;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("span",{style:{color:r,fontSize:"14px",fontWeight:"400",opacity:.9},children:b.title}),l.jsxs("div",{style:{position:"relative",height:`${o}px`,background:"transparent",borderRadius:h,overflow:"hidden"},children:[l.jsx("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:`${_}%`,background:x,borderRadius:h,transition:i?"width 0.8s cubic-bezier(0.16, 1, 0.3, 1)":"none"}}),l.jsx("span",{style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:u||n,fontSize:"18px",fontWeight:"700",pointerEvents:"none",letterSpacing:"-0.3px",...d?{WebkitTextStroke:`1px ${d}`,paintOrder:"stroke fill"}:{}},children:b.value})]})]},f)})})]})};ta.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})),title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barHeight:s.number,animated:s.bool,borderRadius:s.oneOfType([s.string,s.number]),containerStyles:s.object};const $s=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],na=({data:e=[],title:t,backgroundColor:n="black",fontColor:r="#ffffff",fontColorInside:o="#0d3d4a",borderFontColorInside:i,barWidth:a=52,maxBarHeight:c=200,animated:u=!0,separatorColor:d,containerStyles:m={}})=>{const[g,y]=w.useState(u?0:1);w.useEffect(()=>{if(!u)return;const E=requestAnimationFrame(()=>requestAnimationFrame(()=>y(1)));return()=>cancelAnimationFrame(E)},[u]);const h=Math.max(...e.map(E=>E.value),1),b=d||(r==="#ffffff"?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.15)"),f=12,x=12,_=e.length*a+Math.max(0,e.length-1)*f,S={fontSize:"15px",fontWeight:"700",letterSpacing:"-0.3px",lineHeight:1,pointerEvents:"none",whiteSpace:"nowrap",...i?{WebkitTextStroke:`1px ${i}`,paintOrder:"stroke fill"}:{}};return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[t&&l.jsx("h2",{style:{margin:"0 0 24px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,overflow:"visible"},children:[l.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:`${f}px`,width:`${_}px`,height:`${c}px`},children:e.map((E,C)=>{const v=E.color||$s[C%$s.length],T=E.value===0,A=T?0:E.value/h*c*g;return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",width:`${a}px`,height:"100%"},children:T?l.jsx("span",{style:{...S,color:o,marginBottom:"6px"},children:E.value}):l.jsx("div",{style:{position:"relative",width:"100%",height:`${A}px`,background:v,borderRadius:"6px 6px 0 0",transition:u?"height 0.85s cubic-bezier(0.16, 1, 0.3, 1)":"none",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"10px"},children:l.jsx("span",{style:{...S,color:o},children:E.value})})},C)})}),l.jsx("div",{style:{width:`${_+x*2}px`,marginLeft:`-${x}px`,height:"1.5px",background:b,borderRadius:"1px"}}),l.jsx("div",{style:{display:"flex",gap:`${f}px`,width:`${_}px`,marginTop:"10px"},children:e.map((E,C)=>l.jsx("div",{style:{width:`${a}px`,textAlign:"center",color:r,fontSize:"13px",fontWeight:"400",opacity:.8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:E.title},C))})]})]})};na.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})).isRequired,title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barWidth:s.number,maxBarHeight:s.number,animated:s.bool,separatorColor:s.string,containerStyles:s.object};const ap="_percentageBarContainer_lgkme_3",lp="_barContainer_lgkme_10",cp="_segment_lgkme_19",up="_handle_lgkme_36",dp="_labelsContainer_lgkme_68",fp="_labelItem_lgkme_73",pp="_labelsListContainer_lgkme_85",mp="_labelColor_lgkme_105",hp="_labelText_lgkme_114",gp="_labelValue_lgkme_122",yp="_labelTranslation_lgkme_126",Me={percentageBarContainer:ap,barContainer:lp,segment:cp,handle:up,labelsContainer:dp,labelItem:fp,labelsListContainer:pp,labelColor:mp,labelText:hp,labelValue:gp,labelTranslation:yp},bp=2,Es=e=>{const t=e.reduce((n,r)=>n+r.value,0);return t===0?e.map(()=>100/e.length):e.map(n=>n.value/t*100)},jr=(e,t=100)=>e.map(n=>n.value/t*100),Ns=(e,t)=>{try{const r=new Function("x",`return (${t})`)(e);return isNaN(r)?"N/A":r.toFixed(2)}catch{return"N/A"}},ra=({items:e,showLabels:t="bar",showTranslations:n=!0,onChange:r,minPercentage:o=bp,maxValue:i=100,labelTextColor:a,labelValueColor:c})=>{const[u,d]=w.useState(()=>Es(e)),m=w.useRef(null),g=w.useRef(null);w.useEffect(()=>{e&&e.length>0&&d(Es(e))},[e]);const y=w.useCallback(f=>{if(!m.current||!g.current)return;const{dividerIndex:x}=m.current,_=g.current.getBoundingClientRect(),S=(f.touches?f.touches[0].clientX:f.clientX)-_.left,E=Math.max(0,Math.min(100,S/_.width*100));d(C=>{const v=[...C],T=C.slice(0,x).reduce((P,I)=>P+I,0),A=T+C[x]+C[x+1];let k=E-T,$=A-E;if(k<o&&(k=o,$=A-T-o),$<o&&($=o,k=A-T-o),v[x]=k,v[x+1]=$,r)try{const P=e.reduce((I,p)=>I+p.value,0);r(e.map((I,p)=>({...I,value:v[p]/100*P})))}catch(P){console.error("PercentageBar onChange error:",P)}return v})},[o,r,e]),h=w.useCallback(()=>{m.current&&(m.current=null,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",h),d(f=>{if(r){const x=e.reduce((_,S)=>_+S.value,0);r(e.map((_,S)=>({..._,value:f[S]/100*x})))}return f}))},[y,r,e]),b=(f,x)=>{x.preventDefault(),m.current={dividerIndex:f},document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",h)};return l.jsxs("div",{className:Me.percentageBarContainer,children:[l.jsx("div",{className:Me.barContainer,ref:g,children:e.map((f,x)=>{var _;return l.jsx("div",{className:Me.segment,style:{width:`${u[x]}%`,backgroundColor:f.color||"#ccc"},children:x>0&&l.jsx("div",{className:Me.handle,onMouseDown:S=>b(x-1,S),onTouchStart:S=>b(x-1,S),role:"slider","aria-label":`Divisor entre ${(_=e[x-1])==null?void 0:_.title} y ${f.title}`,"aria-valuenow":Math.round(u[x]),tabIndex:0})},f.id??x)})}),t==="bar"&&l.jsx("div",{className:Me.labelsContainer,children:e.map((f,x)=>l.jsxs("div",{className:Me.labelItem,style:{width:`${u[x]}%`},children:[l.jsx("span",{className:Me.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Me.labelText,style:{color:a||"#fff"},children:f.title}),l.jsxs("span",{className:Me.labelValue,style:{color:c||"#fff"},children:[jr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Me.labelTranslation,children:["(",Ns(u[x],f.translationFormula),")"]})]},f.id??x))}),t==="list"&&l.jsx("div",{className:Me.labelsListContainer,children:e.map((f,x)=>l.jsxs("div",{className:Me.labelItem,children:[l.jsx("span",{className:Me.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Me.labelText,children:f.title}),l.jsxs("span",{className:Me.labelValue,children:[jr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Me.labelTranslation,children:["(",Ns(jr(e,i)[x],f.translationFormula),")"]})]},f.id??x))})]})};ra.propTypes={items:s.arrayOf(s.shape({id:s.oneOfType([s.string,s.number]),title:s.string.isRequired,value:s.number.isRequired,color:s.string.isRequired,translationFormula:s.string})).isRequired,showLabels:s.string,showTranslations:s.bool,onChange:s.func,minPercentage:s.number,maxValue:s.number,labelTextColor:s.string,labelValueColor:s.string};const vp="_overlay_1vbid_2",xp="_modal_1vbid_16",Cp="_content_1vbid_28",_p="_iconContainer_1vbid_36",wp="_iconSvg_1vbid_43",Sp="_textContainer_1vbid_48",Tp="_title_1vbid_55",kp="_message_1vbid_62",jp="_closeButton_1vbid_69",Qe={overlay:vp,modal:xp,content:Cp,iconContainer:_p,iconSvg:wp,textContainer:Sp,title:Tp,message:kp,closeButton:jp},ao=({isOpen:e,onClose:t,title:n,message:r,isError:o=!1,isSuccess:i=!1,customIcon:a=null,iconColor:c=null,textColor:u=null,backgroundColor:d=null,borderColor:m=null,showCloseButton:g=!0,autoClose:y=!1,autoCloseDelay:h=3e3})=>{if(w.useEffect(()=>{if(y&&e){const S=setTimeout(()=>{t()},h);return()=>clearTimeout(S)}},[y,e,t,h]),!e)return null;const b=()=>{const S={};return d&&(S.backgroundColor=d),m&&(S.borderColor=m),o&&!d?(S.backgroundColor="#fff5f5",S.borderColor="#feb2b2"):i&&!d&&(S.backgroundColor="#f0fff4",S.borderColor="#9ae6b4"),S},f=()=>{const S={};return u&&(S.color=u),o&&!u?S.color="#c53030":i&&!u&&(S.color="#276749"),S},x=()=>{const S={};return c&&(S.color=c),o&&!c?S.color="#c53030":i&&!c&&(S.color="#276749"),S},_=()=>a||(o?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Qe.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}):i?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Qe.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}):null);return l.jsx("div",{className:Qe.overlay,children:l.jsx("div",{className:Qe.modal,style:b(),children:l.jsxs("div",{className:Qe.content,children:[l.jsx("div",{className:Qe.iconContainer,children:_()}),l.jsxs("div",{className:Qe.textContainer,children:[n&&l.jsx("h3",{className:Qe.title,style:f(),children:n}),l.jsx("p",{className:Qe.message,style:f(),children:r})]}),g&&l.jsx("button",{className:Qe.closeButton,onClick:t,"aria-label":"Close modal",style:f(),children:"✕"})]})})})};ao.propTypes={isOpen:s.bool.isRequired,onClose:s.func.isRequired,title:s.string,message:s.string.isRequired,isError:s.bool,isSuccess:s.bool,customIcon:s.node,iconColor:s.string,textColor:s.string,backgroundColor:s.string,borderColor:s.string,showCloseButton:s.bool,autoClose:s.bool,autoCloseDelay:s.number};ao.defaultProps={isError:!1,isSuccess:!1,showCloseButton:!0,autoClose:!1,autoCloseDelay:3e3};const $p="_header_13kbt_2",Ep="_leftComponents_13kbt_13",Np="_centerComponents_13kbt_14",Op="_rightComponents_13kbt_15",Ap="_componentsContainer_13kbt_32",St={header:$p,leftComponents:Ep,centerComponents:Np,rightComponents:Op,componentsContainer:Ap},oa=({cssProps:e,leftComponents:t=[],centerComponents:n=[],rightComponents:r=[],zIndex:o=10,height:i=60,backgroundColor:a="#605B56",isFooter:c=!1})=>l.jsxs("div",{className:St.header,style:{...e,zIndex:o,height:i,backgroundColor:a,top:c?"auto":0,bottom:c?0:"auto"},children:[l.jsx("div",{className:St.leftComponents,children:t.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))}),l.jsx("div",{className:St.centerComponents,children:n.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))}),l.jsx("div",{className:St.rightComponents,children:r.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))})]});oa.propTypes={leftComponents:s.arrayOf(s.node),centerComponents:s.arrayOf(s.node),rightComponents:s.arrayOf(s.node),cssProps:s.object,zIndex:s.number,height:s.number,backgroundColor:s.string,isFooter:s.bool};const Lp="_sidebar_1kaqu_2",Mp="_open_1kaqu_16",Rp="_content_1kaqu_20",Ip="_closeButton_1kaqu_25",Ln={sidebar:Lp,open:Mp,content:Rp,closeButton:Ip},Dp="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%203699'%3e%3cpath%20id='Vector%20223'%20d='M1%201L18.1566%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector%20224'%20d='M18.1575%201L1.00083%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",sa=({width:e="300px",children:t,showRightBar:n,onCloseBar:r})=>{const o=()=>{r()};return l.jsx("div",{className:`${Ln.sidebar} ${n?Ln.open:""}`,style:{width:n?e:0},children:n&&l.jsxs("div",{className:Ln.content,children:[l.jsx("button",{className:Ln.closeButton,onClick:o,children:l.jsx("img",{src:Dp,alt:"Close Sidebar"})}),t]})})};sa.propTypes={width:s.string,children:s.node,showRightBar:s.bool,onCloseBar:s.func};exports.AmbitSelector=Ds;exports.BarChart=Zr;exports.BurgerMenu=io;exports.ButtonsBar=Zi;exports.ButtonsList=Bs;exports.CategorySelector=Fr;exports.DropdownList=yt;exports.EditAmbit=fl;exports.ErrorMessage=Kt;exports.FiltersAmbit=Us;exports.Form=Xd;exports.GeneralButton=un;exports.Graphic=Zs;exports.GraphicLegend=Xi;exports.Groupedbarchart=Gi;exports.HeaderSection=oa;exports.HorizontalBarChart=ta;exports.IndicatorsList=Ys;exports.LangSelector=Xs;exports.Legend=Qs;exports.ListSelector=Ii;exports.Loader=Ki;exports.LogInButton=Mi;exports.LogoApp=Js;exports.MapboxMap=si;exports.MaplibreMap=ii;exports.ModalAlert=Ui;exports.PercentageBar=ra;exports.PieChart=ea;exports.RadioButtonInput=Wi;exports.RankingSlider=ro;exports.RightSidebar=sa;exports.SectionBar=ai;exports.SelectInput=qi;exports.SpeedGraphic=Qi;exports.Stackedbarchart=Yi;exports.StatusModal=ao;exports.StatusText=so;exports.Steps=oo;exports.Switch=Hi;exports.TextInput=Vr;exports.TimeSlider=Ai;exports.Tooltip=Je;exports.TopNavMenu=Li;exports.VerticalBarChart=na;
|
|
83
|
+
${o&&On.active}`,children:l.jsx("span",{className:On.buttonName,children:t(i)})})},r)})})};Zi.propTypes={buttons:s.arrayOf(s.shape({isActive:s.bool,name:s.string,onClick:s.func})).isRequired};const Cf="_switchContainer_194wl_2",_f="_labelRight_194wl_9",wf="_labelLeft_194wl_9",Sf="_slider_194wl_28",Tf="_disabled_194wl_54",Ft={switchContainer:Cf,labelRight:_f,labelLeft:wf,switch:"_switch_194wl_2",slider:Sf,disabled:Tf},Hi=({input:e,reactHookFormInstance:t,onChange:n,onoff:r=!0})=>{const{code:o,labelLeft:i,labelRight:a,defValue:c=!1,colorOn:u="#5A514D",disabled:d=!1,width:m=240}=e,{t:g}=se.useTranslation(),{control:y}=t||{},[h,b]=w.useState(c),f=_=>{b(_),n&&n(_)},x=(_,S)=>l.jsxs("div",{className:Ft.switchContainer,style:{width:`${m}px`},children:[i&&l.jsx("span",{className:Ft.labelLeft,style:{width:`${(m-74)/2}px`},children:g(i)}),l.jsxs("label",{className:`${Ft.switch} ${d?Ft.disabled:""}`,children:[l.jsx("input",{type:"checkbox",checked:!!_,onChange:()=>S(!_),disabled:d}),l.jsx("span",{className:Ft.slider,style:{"--switch-thumb-color":r?_?u:"#ccc":u}})]}),a&&l.jsx("span",{className:Ft.labelRight,style:{width:`${(m-74)/2}px`},children:g(a)})]});return t?l.jsx(mn,{name:o,control:y,defaultValue:c,render:({field:_})=>x(_.value,_.onChange)}):x(h,f)};Hi.propTypes={input:s.shape({code:s.string,labelLeft:s.string,labelRight:s.string,defValue:s.bool,colorOn:s.string,disabled:s.bool}),reactHookFormInstance:s.object,onChange:s.func};const kf="_overlay_1xyw2_2",jf="_popup_1xyw2_15",$f="_gif_1xyw2_25",Ef="_message_1xyw2_31",An={overlay:kf,popup:jf,gif:$f,message:Ef},Ki=({gifSrc:e,message:t})=>l.jsx("div",{className:An.overlay,children:l.jsxs("div",{className:An.popup,children:[e&&l.jsx("img",{src:e,alt:"loading animation",className:An.gif}),t&&l.jsx("p",{className:An.message,children:t})]})});Ki.propTypes={gifSrc:s.string,message:s.string};const Nf="_container_1pl8d_3",Of="_burger_1pl8d_10",Af="_menu_1pl8d_21",Lf="_menuOpen_1pl8d_35",Mf="_menuClose_1pl8d_40",Rf="_list_1pl8d_46",If="_item_1pl8d_56",Df="_button_1pl8d_91",Xe={container:Nf,burger:Of,menu:Af,menuOpen:Lf,menuClose:Mf,list:Rf,item:If,button:Df},io=({options:e,backgroundColor:t,textColor:n,iconColor:r})=>{const[o,i]=w.useState(!1),a=()=>i(b=>!b),c=()=>i(!1),u=7,d=o?11:0,m=o?13:0,g=o?-11.51666:0,y=o?-13:0,h="0.35s";return l.jsxs("div",{className:Xe.container,children:[l.jsx("button",{onClick:a,className:Xe.burger,children:l.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[l.jsx("g",{style:{transform:`translateY(${d}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"9",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${m}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"7",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{transform:`translate(${y}px, ${g}px)`,transition:`transform ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"33",cy:"31.51666",r:u,fill:r})}),l.jsx("g",{style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:l.jsx("circle",{cx:"20",cy:"20",r:"10",fill:r})}),l.jsxs("g",{stroke:t,strokeWidth:"2",strokeLinecap:"round",style:{opacity:o?1:0,transition:`opacity ${h} cubic-bezier(0.42, 0, 0.58, 1)`},children:[l.jsx("line",{x1:"17",y1:"17",x2:"23",y2:"23"}),l.jsx("line",{x1:"23",y1:"17",x2:"17",y2:"23"})]})]})}),l.jsx("div",{className:`${Xe.menu} ${o?Xe.menuOpen:Xe.menuClose}`,style:{backgroundColor:t,color:n},children:l.jsx("ul",{className:Xe.list,children:e.map((b,f)=>l.jsxs("li",{className:Xe.item,children:[b.url&&l.jsx(As.NavLink,{to:b.url,className:({isActive:x})=>`${Xe.link} ${x?Xe.active:""}`,onClick:c,style:{color:n},children:b.name}),b.onclick&&l.jsx("button",{className:Xe.button,onClick:()=>{b.onclick(),c()},children:b.name}),b.component&&b.component]},f))})})]})};io.propTypes={options:s.array.isRequired,backgroundColor:s.string,textColor:s.string,iconColor:s.string};io.defaultProps={backgroundColor:"#ffffff",textColor:"#000000",iconColor:"#000000"};const Bf="_svgContainer_1rxoe_2",Pf="_svg_1rxoe_2",_s={svgContainer:Bf,svg:Pf},Gi=({data:e,keys:t,colors:n,width:r="100%",height:o=300,margin:i={top:20,right:20,bottom:60,left:60},className:a="",showXAxisLabels:c=!0,showYAxisLabels:u=!0,showGrid:d=!0,xAxisTickRotation:m=-90,yAxisTickFormat:g=C=>C.toLocaleString("es-ES"),barPadding:y=.1,groupPadding:h=.05,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:S,yAxisLabel:E})=>{const C=w.useRef(),v=w.useRef(),[T,A]=w.useState({width:0,height:0});return w.useEffect(()=>{const k=()=>{if(v.current){const $=v.current.getBoundingClientRect().width;A({width:typeof r=="number"?r:$,height:o})}};return k(),window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[r,o]),w.useEffect(()=>{if(!e||e.length===0||T.width===0)return;const k=ce.select(C.current),$=T.width,P=T.height,I=$-i.left-i.right,p=P-i.top-i.bottom;if(I<=0||p<=0)return;const N=e.map(F=>F.anyo||F.year||F.x),j=t,V=ce.min(e,F=>ce.min(j,K=>F[K]))||0,W=ce.max(e,F=>ce.max(j,K=>F[K]))||0,D=ce.scaleBand().domain(N).rangeRound([0,I]).paddingInner(y),q=ce.scaleBand().domain(j).rangeRound([0,D.bandwidth()]).padding(h),te=ce.scaleLinear().domain([Math.min(0,V),W]).nice().rangeRound([p,0]),L=ce.scaleOrdinal().domain(j).range(Array.isArray(n)?n:Object.values(n||{}));k.selectAll("*").remove();const M=k.append("g").attr("transform",`translate(${i.left},${i.top})`);_&&k.append("text").attr("x",$/2).attr("y",i.top/2).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),d&&M.append("g").attr("class","grid").selectAll("line").data(te.ticks()).enter().append("line").attr("x1",0).attr("x2",I).attr("y1",F=>te(F)).attr("y2",F=>te(F)).style("stroke","#e0e0e0").style("stroke-width",.5),c&&(M.append("g").attr("transform",`translate(0,${p})`).call(ce.axisBottom(D).tickSizeOuter(0)).attr("class","x-axis").selectAll("text").attr("transform",`translate(0,10)rotate(${m})`).style("text-anchor",m<0?"end":"middle").style("font-size","12px").style("fill","#605B56"),S&&M.append("text").attr("transform",`translate(${I/2}, ${p+i.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(S)),u&&(M.append("g").call(ce.axisLeft(te).ticks(6).tickFormat(g)).attr("class","y-axis").call(F=>F.select(".domain").remove()),E&&M.append("text").attr("transform","rotate(-90)").attr("y",0-i.left).attr("x",0-p/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(E));const J=M.append("g").selectAll(".bar-group").data(e).enter().append("g").attr("class","bar-group").attr("transform",F=>`translate(${D(F.anyo||F.year||F.x)},0)`).selectAll(".bar").data(F=>j.map(K=>({key:K,value:F[K],data:F}))).enter().append("rect").attr("class","bar").attr("x",F=>q(F.key)).attr("y",p).attr("width",q.bandwidth()).attr("height",0).attr("fill",F=>L(F.key)).style("cursor",f||x?"pointer":"default");J.transition().duration(b).attr("y",F=>te(Math.max(0,F.value))).attr("height",F=>Math.abs(te(F.value)-te(0))),f&&J.on("mouseover",function(F,K){ce.select(this).style("opacity",.8),f(F,K)}).on("mouseout",function(F,K){ce.select(this).style("opacity",1)}),x&&J.on("click",x)},[e,t,n,T,i,y,h,c,u,d,m,g,b,f,x,_,S,E]),l.jsx("div",{ref:v,className:`${_s.svgContainer} ${a}`,style:{width:r,height:o+i.top+i.bottom},children:l.jsx("svg",{ref:C,className:_s.svg,width:T.width,height:T.height})})};Gi.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.oneOfType([s.arrayOf(s.string),s.object]),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,groupPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string};const Vf="_svgContainer_7fkic_2",Ff="_svg_7fkic_2",ws={svgContainer:Vf,svg:Ff},Yi=({data:e,keys:t,colors:n,lineData:r=null,width:o="100%",height:i=300,margin:a={top:20,right:20,bottom:90,left:60},className:c="",showXAxisLabels:u=!0,showYAxisLabels:d=!0,showGrid:m=!0,xAxisTickRotation:g=-90,yAxisTickFormat:y=P=>P.toLocaleString("es-ES"),barPadding:h=.4,animationDuration:b=750,onBarHover:f,onBarClick:x,title:_,xAxisLabel:S,yAxisLabel:E,stackOrder:C="reverse",showTooltip:v=!0,reverseKeys:T=!0,minBarSlotWidth:A=60,wrapXAxisLabels:k=!0,mode:$="stacked"})=>{const P=w.useRef(),I=w.useRef();w.useRef();const[p,N]=w.useState({containerWidth:0,height:0}),{t:j}=se.useTranslation();return w.useEffect(()=>{const V=()=>{if(I.current){const W=I.current.getBoundingClientRect().width;N({containerWidth:typeof o=="number"?o:W,height:i})}};return V(),window.addEventListener("resize",V),()=>window.removeEventListener("resize",V)},[o,i]),w.useEffect(()=>{if(!e||e.length===0||p.containerWidth===0)return;const V=ce.select(P.current),{containerWidth:W,height:D}=p,q=W-a.left-a.right,te=e.length*A,L=Math.max(q,te),M=L+a.left+a.right,H=D-a.top-a.bottom;if(L<=0||H<=0)return;V.attr("width",M).attr("height",D).style("overflow","visible");const J=$==="stacked"?T?[...t].reverse():t:[],F=U=>$==="single"?U.title:U.any||U.year||U.x,K=[];e.forEach(U=>{const ae=F(U);if($==="single"){const me=Number(U.value)||0;K.push({key:U.title,value:me,y0:Math.min(0,me),y1:Math.max(0,me),height:Math.abs(me),data:U,xKey:ae,color:U.color})}else{const me=J.map(B=>({key:B,value:Number(U[B])||0,data:U})),_e=me.filter(B=>B.value<0),ke=me.filter(B=>B.value>=0);let Ve=0;_e.forEach(B=>{const Z=Ve,X=Ve+B.value,ie=Math.abs(X-Z);K.push({key:B.key,value:B.value,y0:Math.max(Z,X),y1:Math.min(Z,X),height:ie,data:B.data,xKey:ae}),Ve=X});let R=0;ke.forEach(B=>{const Z=R,X=R+B.value,ie=X-Z;K.push({key:B.key,value:B.value,y0:Math.min(Z,X),y1:Math.max(Z,X),height:ie,data:B.data,xKey:ae}),R=X})}});const re=[ce.min(K,U=>Math.min(U.y0,U.y1))||0,ce.max(K,U=>Math.max(U.y0,U.y1))||0];let ne=[0,0];r&&r.length>0&&(ne=[ce.min(r)||0,ce.max(r)||0]);const oe=[Math.min(re[0],ne[0]),Math.max(re[1],ne[1])],ee=ce.scaleBand().domain(e.map(U=>F(U))).range([0,L]).padding(h),G=ce.scaleLinear().domain([oe[0],oe[1]]).nice(6).range([H,0]),be=t?ce.scaleOrdinal().domain(t).range(Array.isArray(n)?n:Object.values(n||{})):null,z=$==="single"?U=>U.color||(Array.isArray(n)?n[0]:Object.values(n||{})[0])||"#888":U=>be(U.key),le=r&&r.length>0?e.map((U,ae)=>{const me=ee(F(U))+ee.bandwidth()/2,_e=G(r[ae]||0);return{x:me,y:_e}}):[];V.selectAll("*").remove();const Ce=V.append("g").attr("transform",`translate(${a.left},${a.top})`);_&&V.append("text").attr("x",M/2).attr("y",a.top-4).attr("text-anchor","middle").style("font-size","16px").style("font-weight","bold").style("fill","#333").text(_),m&&Ce.append("g").attr("class","grid").selectAll("line").data(G.ticks(6)).enter().append("line").attr("x1",0).attr("x2",L).attr("y1",U=>G(U)).attr("y2",U=>G(U)).style("stroke","#e0e0e0").style("stroke-width",.5);const ct=(U,ae=12)=>{if(!k||U.length<=ae)return[U];const me=Math.floor(U.length/2);let _e=me;for(let ke=me;ke>=0;ke--)if(U[ke]===" "){_e=ke;break}if(_e===me){for(let ke=me;ke<U.length;ke++)if(U[ke]===" "){_e=ke;break}}return _e===me&&(_e=me),[U.substring(0,_e),U.substring(_e+1)]};u&&(Ce.append("g").attr("class","x-axis").attr("transform",`translate(0, ${H})`).call(ce.axisBottom(ee).tickSizeOuter(0)).selectAll("text").remove(),Ce.append("g").attr("class","x-axis-labels").attr("transform",`translate(0, ${H})`).selectAll(".x-label-group").data(e).enter().append("g").attr("class","x-label-group").attr("transform",_e=>`translate(${ee(F(_e))+ee.bandwidth()/2}, 0)`).each(function(_e){const ke=String(F(_e)),Ve=ct(ke),R=ce.select(this);if(Ve.length===1)R.append("text").attr("y",19).style("text-anchor",g===0?"middle":g<0?"end":"start").style("font-size","12px").style("fill","#605B56").attr("transform",g!==0?`rotate(${g} 0 15)`:null).text(Ve[0]);else{const X=-(Ve.length*14/2)+14/2;Ve.forEach((ie,Y)=>{R.append("text").attr("x",X+Y*14).attr("y",19).style("text-anchor","end").style("font-size","11px").style("fill","#605B56").attr("transform",`rotate(${g} ${X+Y*14} 15)`).text(ie)})}}),S&&Ce.append("text").attr("transform",`translate(${L/2}, ${H+a.bottom-5})`).style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(S)),d&&(Ce.append("g").attr("class","y-axis").call(ce.axisLeft(G).ticks(6).tickFormat(y)).call(U=>U.select(".domain").remove()),Ce.append("g").attr("class","y-ticks").attr("transform",`translate(${L}, 0)`).call(ce.axisLeft(G).ticks(6).tickSizeInner(L)).call(U=>U.select(".domain").remove()).call(U=>U.selectAll(".tick text").remove()),E&&Ce.append("text").attr("transform","rotate(-90)").attr("y",0-a.left).attr("x",0-H/2).attr("dy","1em").style("text-anchor","middle").style("font-size","14px").style("fill","#333").text(E));let De;v&&(De=ce.select("body").append("div").attr("class","chart-tooltip").style("position","absolute").style("visibility","hidden").style("background","rgba(0, 0, 0, 0.8)").style("color","white").style("padding","8px").style("border-radius","4px").style("font-size","12px").style("pointer-events","none").style("z-index","1000"));const Ee=Ce.selectAll(".segment").data(K,U=>`${U.xKey}-${U.key}`);Ee.exit().remove();const tt=Ee.enter().append("rect").attr("class","segment").attr("x",U=>ee(U.xKey)).attr("width",ee.bandwidth()).attr("y",U=>G(0)).attr("height",0).attr("fill",U=>z(U)).style("cursor",f||x||v?"pointer":"default").merge(Ee);if(tt.transition().duration(b).attr("x",U=>ee(U.xKey)).attr("y",U=>Math.min(G(U.y0),G(U.y1))).attr("height",U=>Math.abs(G(U.y1)-G(U.y0))),(v||f)&&tt.on("mouseover",function(U,ae){const me=ae.value;if(v&&De){const _e=$==="single"?ae.data.title:j(ae.key);De.style("visibility","visible").html($==="single"?`<strong>${_e}</strong><br/>${y(me)}`:`<strong>${_e}</strong><br/>${ae.xKey}<br/>${y(me)}`)}ce.select(this).style("opacity",.8),f&&f(U,{key:ae.key,value:me,data:ae.data})}).on("mousemove",function(U){v&&De&&De.style("top",U.pageY-10+"px").style("left",U.pageX+10+"px")}).on("mouseout",function(){v&&De&&De.style("visibility","hidden"),ce.select(this).style("opacity",1)}),x&&tt.on("click",function(U,ae){const me=ae.value;x(U,{key:ae.key,value:me,data:ae.data})}),le&&le.length>1){const U=ce.line().x(ae=>ae.x).y(ae=>ae.y).curve(ce.curveMonotoneX);Ce.append("path").datum(le).attr("class","line").attr("d",U).attr("fill","none").attr("stroke","#ff6b6b").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round"),Ce.selectAll(".line-point").data(le).enter().append("circle").attr("class","line-point").attr("cx",ae=>ae.x).attr("cy",ae=>ae.y).attr("r",4).attr("fill","#ff6b6b").attr("stroke","white").attr("stroke-width",1)}return()=>{De&&De.remove()}},[e,t,n,r,p,a,h,u,d,m,g,y,b,f,x,_,S,E,C,v,T,k,$]),l.jsx("div",{ref:I,className:`${ws.svgContainer} ${c}`,style:{width:o,height:i+a.top+a.bottom,overflowX:"auto"},children:l.jsx("svg",{ref:P,className:ws.svg})})};Yi.propTypes={data:s.arrayOf(s.object).isRequired,keys:s.arrayOf(s.string),colors:s.oneOfType([s.arrayOf(s.string),s.object]),lineData:s.arrayOf(s.number),width:s.oneOfType([s.string,s.number]),height:s.number,margin:s.shape({top:s.number,right:s.number,bottom:s.number,left:s.number}),className:s.string,showXAxisLabels:s.bool,showYAxisLabels:s.bool,showGrid:s.bool,xAxisTickRotation:s.number,yAxisTickFormat:s.func,barPadding:s.number,animationDuration:s.number,onBarHover:s.func,onBarClick:s.func,title:s.string,xAxisLabel:s.string,yAxisLabel:s.string,stackOrder:s.oneOf(["reverse","ascending","descending","insideOut","none"]),showTooltip:s.bool,reverseKeys:s.bool,minBarSlotWidth:s.number,wrapXAxisLabels:s.bool,mode:s.oneOf(["single","stacked"])};const zf="_externalContainer_1er0i_2",qf="_externalSintetic_1er0i_9",Wf="_titles_1er0i_13",Uf="_titleContainer_1er0i_22",Zf="_yearTitles_1er0i_36",Hf="_yearTitle_1er0i_36",Kf="_yearDatas_1er0i_50",Gf="_yearDataContainer_1er0i_58",Yf="_yearDataContent_1er0i_66",Xf="_bigNumber_1er0i_79",Qf="_circle_1er0i_82",Jf="_totalContainer_1er0i_99",ep="_total_1er0i_99",Be={externalContainer:zf,externalSintetic:qf,titles:Wf,titleContainer:Uf,yearTitles:Zf,yearTitle:Hf,yearDatas:Kf,yearDataContainer:Gf,yearDataContent:Yf,bigNumber:Xf,circle:Qf,totalContainer:Jf,total:ep},tp=e=>{if(e>=1e3||e<=-1e3)return parseInt(e.toFixed());if(e>=100||e<=-100)return parseFloat(e.toFixed(1));if(e>=10||e<=-10)return parseFloat(e.toFixed(2));if(e>0||e<0)return parseFloat(e.toFixed(3));if(e===0)return e},np=(e,t)=>{let n=0;return t.forEach(r=>{r[e]&&(n+=r[e])}),n},Xi=({data:e,keys:t,colors:n,locales:r,total:o=!1,years:i=!1,activeGraphics:a="ind",units:c={},translate:u,getTotal:d=np,columnWidth:m=50})=>{const g=u||(h=>h),y=h=>h==="demanda_red"||h==="reduccio_demanda_red"?(c.demanda||"").replace("(","").replace(")",""):c[h]||"";return l.jsxs("div",{className:`${Be.externalContainer} ${a==="sin"?Be.externalSintetic:""}`,children:[i===!0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{}),l.jsx("div",{className:Be.yearTitles,children:e.map((h,b)=>l.jsx("div",{className:Be.yearTitle,style:{width:m},children:h.anyo},b))})]}),l.jsx("div",{className:Be.titles,children:t.map((h,b)=>l.jsxs("div",{className:Be.titleContainer,children:[g(r[h]),a!=="sin"&&l.jsx("span",{className:Be.circle,style:{background:n[h]}})]},b))}),o===!0&&l.jsx("div",{className:Be.totalContainer,children:t.map((h,b)=>{var f;return l.jsxs("div",{className:`${Be.total} ${d(h,e)>9999||d(h,e)<-9999?Be.bigNumber:""}`,children:[(f=d(h,e))==null?void 0:f.toLocaleString("es-ES")," ",y(h)]},b)})}),l.jsx("div",{className:Be.yearDatas,children:e.map((h,b)=>l.jsx("div",{className:Be.yearDataContainer,style:{width:m},children:t.map((f,x)=>{var _,S;return isNaN(h[f])?null:l.jsx("div",{className:`${Be.yearDataContent} ${h[f]>9999||h[f]<-9999?Be.bigNumber:""}`,children:h[f]<1e4||h[f]>-1e4?(_=tp(h[f]))==null?void 0:_.toLocaleString("es-ES"):(S=h[f])==null?void 0:S.toLocaleString("es-ES")},x)})},b))})]})};Xi.propTypes={data:s.arrayOf(s.shape({anyo:s.oneOfType([s.string,s.number]).isRequired})).isRequired,keys:s.arrayOf(s.string).isRequired,colors:s.objectOf(s.string).isRequired,locales:s.objectOf(s.string).isRequired,total:s.bool,years:s.bool,activeGraphics:s.oneOf(["ind","sin"]),units:s.objectOf(s.string),translate:s.func,getTotal:s.func,columnWidth:s.number};const rp="_speedGraphic_d1k72_2",Tr={speedGraphic:rp},Qi=({minValue:e=0,maxValue:t=100,value:n=50,title:r=!1,percent:o=!1,unit:i=!1,greenColor:a="#00CF1E",orangeColor:c="#FFAC00",redColor:u="#FF1E37"})=>{n<e&&(n=e),n>t&&(n=t);const d=(n-e)/(t-e),m=270+d*180,g=o?Math.round(d*100):n;return l.jsxs("div",{className:Tr.speedGraphic,children:[l.jsxs("svg",{width:"244",height:"130",viewBox:"0 0 244 130",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M0 122C0 111.944 1.2433 101.927 3.70162 92.1756L26.2619 97.8633C24.2724 105.755 23.2662 113.862 23.2662 122H0Z",fill:a}),l.jsx("path",{d:"M16.3442 61.0012C21.3714 52.2936 27.4557 44.2409 34.4588 37.0263L51.1534 53.2313C45.4859 59.0701 40.5619 65.5871 36.4934 72.6341L16.3442 61.0012Z",fill:a}),l.jsx("path",{d:"M60.9088 16.3976C69.6119 11.3628 78.9041 7.42322 88.5739 4.66843L94.9485 27.0443C87.1228 29.2737 79.6027 32.462 72.5592 36.5367L60.9088 16.3976Z",fill:c}),l.jsx("path",{d:"M121.797 0.000169508C131.851 -0.0165912 141.869 1.20965 151.623 3.65101L145.974 26.2209C138.08 24.2451 129.972 23.2527 121.835 23.2663L121.797 0.000169508Z",fill:c}),l.jsx("path",{d:"M182.623 16.1279C191.348 21.124 199.422 27.1797 206.662 34.157L190.516 50.9092C184.657 45.2625 178.123 40.3617 171.061 36.3183L182.623 16.1279Z",fill:u}),l.jsx("path",{d:"M227.238 60.2836C232.325 68.9568 236.319 78.2255 239.131 87.8788L216.794 94.3859C214.518 86.5735 211.285 79.0725 207.169 72.0533L227.238 60.2836Z",fill:u}),l.jsx("path",{d:"M4.15505 90.4316C6.75674 80.7194 10.5491 71.3662 15.4458 62.5846L35.7663 73.9155C31.8035 81.0224 28.7343 88.5919 26.6288 96.4519L4.15505 90.4316Z",fill:a}),l.jsx("path",{d:"M35.733 35.733C42.8426 28.6233 50.8039 22.4198 59.4357 17.2636L71.3671 37.2375C64.3814 41.4104 57.9384 46.4308 52.1846 52.1846L35.733 35.733Z",fill:a}),l.jsx("path",{d:"M90.3004 4.19027C100.01 1.57776 110.005 0.175523 120.058 0.0154601L120.428 23.2787C112.292 23.4082 104.203 24.543 96.3457 26.6573L90.3004 4.19027Z",fill:c}),l.jsx("path",{d:"M153.423 4.11614C163.138 6.70584 172.496 10.4866 181.284 15.3725L169.978 35.707C162.866 31.7529 155.293 28.6932 147.43 26.5973L153.423 4.11614Z",fill:c}),l.jsx("path",{d:"M239.602 89.538C242.532 100.152 244.011 111.114 244 122.125L220.734 122.101C220.743 113.19 219.546 104.319 217.175 95.7287L239.602 89.538Z",fill:u}),l.jsx("path",{d:"M207.769 35.2376C214.919 42.3062 221.168 50.2316 226.374 58.8336L206.469 70.8798C202.256 63.9183 197.199 57.5043 191.412 51.7837L207.769 35.2376Z",fill:u}),l.jsx("g",{transform:`rotate(${m} 122 122)`,children:l.jsx("path",{id:"aguja",d:"M121 119.5V33",stroke:"#605B56","stroke-width":"2"})})]}),l.jsxs("div",{className:Tr.value,children:[g,o&&"%",i&&i]}),r&&l.jsx("div",{className:Tr.title,children:r})]})};Qi.propTypes={minValue:s.number.isRequired,maxValue:s.number.isRequired,value:s.number.isRequired,percent:s.bool,title:s.string,unit:s.string,greenColor:s.string,orangeColor:s.string,redColor:s.string};const kr="#ffffff",op="#ffffff";function at(e,t,n,r){const o=(r-90)*Math.PI/180;return{x:e+n*Math.cos(o),y:t+n*Math.sin(o)}}function Ss(e,t,n,r,o,i){if(Math.abs(i-o)>=359.99)return n===0?`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`:[`M ${e-r} ${t} A ${r} ${r} 0 1 1 ${e+r} ${t} A ${r} ${r} 0 1 1 ${e-r} ${t} Z`,`M ${e-n} ${t} A ${n} ${n} 0 1 0 ${e+n} ${t} A ${n} ${n} 0 1 0 ${e-n} ${t} Z`].join(" ");const a=at(e,t,r,o),c=at(e,t,r,i),u=i-o>180?1:0;if(n===0)return`M ${e} ${t} L ${a.x} ${a.y} A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y} Z`;const d=at(e,t,n,i),m=at(e,t,n,o);return[`M ${a.x} ${a.y}`,`A ${r} ${r} 0 ${u} 1 ${c.x} ${c.y}`,`L ${d.x} ${d.y}`,`A ${n} ${n} 0 ${u} 0 ${m.x} ${m.y}`,"Z"].join(" ")}function sp(e,t=0){const n=e.reduce((d,m)=>d+(m.value||0),0),r=e.length;if(n<=0||r===0)return[];const o=e.map(d=>d.value/n*100),i=Math.min(t,r>0?360/r-.01:0);let a=o.map(d=>d/100*360),c=new Array(r).fill(!1);if(i>0){let d=0,m=!0;for(;m&&d<r+2;){m=!1,d+=1;for(let g=0;g<r;g++)!c[g]&&a[g]<i&&(a[g]=i,c[g]=!0,m=!0);if(m){const g=a.reduce((f,x,_)=>c[_]?f+x:f,0),y=a.map((f,x)=>x).filter(f=>!c[f]),h=360-g,b=y.reduce((f,x)=>f+o[x]/100*360,0);y.forEach(f=>{const x=o[f]/100*360;a[f]=b>0?x/b*h:h/y.length})}}}let u=0;return e.map((d,m)=>{const g=u,y=u+a[m];return u=y,{...d,sa:g,ea:y,percent:o[m]}})}function Ji(e){const t=Math.round(e*10)/10;return Number.isInteger(t)?t:t.toFixed(1)}function ip(e){return typeof e=="number"?e.toLocaleString():e}function Ts(e,t){return t?`${Ji(e.percent)}%`:ip(e.value)}function ks(e,t,n,r,o){const i=n+(r-n)/2,a=at(e,t,o,i);return{tx:a.x-e,ty:a.y-t}}const ea=({type:e="cheese",data:t=[],title:n,size:r=260,donutThickness:o=56,gapWidth:i=3,gapColor:a,backgroundColor:c="transparent",fontColor:u="black",fontColorInside:d="white",containerStyles:m={},alignLeft:g=!1,valuesArePercentages:y=!0,minSliceAngle:h=8})=>{const[b,f]=w.useState(null),[x,_]=w.useState(()=>t.map(()=>!0)),S=t.map(D=>D.title).join("|"),[E,C]=w.useState(S);S!==E&&(C(S),_(t.map(()=>!0)));const v=x.filter(Boolean).length;function T(D){_(q=>{const te=q.filter(Boolean).length;if(q[D]&&te<=1)return q;const L=[...q];return L[D]=!L[D],L}),f(null)}const A=r/2,k=r/2,$=r/2-14,P=e==="donut"?$-o:0,I=e==="donut"?$-o/2:$*.62,p=w.useMemo(()=>t.reduce((D,q,te)=>(x[te]&&D.push({...q,origIndex:te}),D),[]),[t,x]),N=w.useMemo(()=>sp(p,h),[p,h]),j=b!==null&&N.find(D=>D.origIndex===b)||null,V=N.some(D=>D.ea-D.sa>=359.99),W=a||(c==="transparent"?op:c);return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"4px",padding:"0px",background:c,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[l.jsxs("div",{style:{minHeight:"40px",display:"flex",flexDirection:"column",gap:"2px"},children:[n&&l.jsx("h2",{style:{margin:0,color:u,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.5px"},children:n}),l.jsx("div",{style:{height:"22px",display:"flex",alignItems:"center",gap:"8px",transition:"opacity 0.15s",opacity:j?1:0},children:j&&l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{display:"inline-block",width:"10px",height:"10px",borderRadius:"50%",background:j.color||kr,flexShrink:0}}),l.jsxs("span",{style:{color:u,fontSize:"14px",fontWeight:"600"},children:[j.title," —"," ",Ts(j,y),!y&&` (${Ji(j.percent)}%)`]})]})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:g?"flex-start":"center",gap:"16px"},children:[l.jsxs("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,style:{overflow:"visible"},children:[N.map(D=>{const q=b===D.origIndex,{tx:te,ty:L}=q&&!V?ks(A,k,D.sa,D.ea,10):{tx:0,ty:0};return l.jsx("g",{transform:`translate(${te}, ${L})`,style:{transition:"transform 0.18s ease",pointerEvents:"none"},children:l.jsx("path",{d:Ss(A,k,P,$,D.sa,D.ea),fill:D.color||kr,style:{filter:q?"brightness(1.25)":"brightness(1)",transition:"filter 0.18s ease"}})},D.origIndex)}),!V&&N.map(D=>{const q=at(A,k,$,D.sa),te=e==="cheese"?A:at(A,k,P,D.sa).x,L=e==="cheese"?k:at(A,k,P,D.sa).y;return l.jsx("line",{x1:te,y1:L,x2:q.x,y2:q.y,stroke:W,strokeWidth:i,strokeLinecap:"butt",style:{pointerEvents:"none"}},`gap-${D.origIndex}`)}),N.map(D=>{if(D.ea-D.sa<20)return null;const q=b===D.origIndex,{tx:te,ty:L}=q&&!V?ks(A,k,D.sa,D.ea,10):{tx:0,ty:0},M=D.sa+(D.ea-D.sa)/2,H=at(A,k,I,M);return l.jsx("text",{x:H.x+te,y:H.y+L,textAnchor:"middle",dominantBaseline:"middle",fill:d,fontSize:"14",fontWeight:"700",fontFamily:"'Segoe UI', sans-serif",pointerEvents:"none",style:{transition:"x 0.18s ease, y 0.18s ease"},children:Ts(D,y)},`lbl-${D.origIndex}`)}),N.map(D=>l.jsx("path",{d:Ss(A,k,P,$,D.sa,D.ea),fill:"transparent",style:{cursor:"pointer"},onMouseEnter:()=>f(D.origIndex),onMouseLeave:()=>f(null)},`hit-${D.origIndex}`))]}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px 24px",justifyContent:g?"flex-start":"center"},children:t.map((D,q)=>{const te=x[q],L=te&&v<=1;return l.jsxs("div",{role:"button",tabIndex:0,"aria-pressed":te,"aria-label":`${te?"Ocultar":"Mostrar"} ${D.title}`,title:L?"Debe quedar al menos una categoría activa":te?"Ocultar del gráfico":"Mostrar en el gráfico",onClick:()=>T(q),onKeyDown:M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),T(q))},style:{display:"flex",alignItems:"center",gap:"8px",opacity:te&&(b===null||b===q)?1:.4,cursor:L?"not-allowed":"pointer",transition:"opacity 0.15s",userSelect:"none"},onMouseEnter:()=>te&&f(q),onMouseLeave:()=>f(null),children:[l.jsx("span",{style:{width:"32px",height:"14px",borderRadius:"3px",background:D.color||kr,flexShrink:0}}),l.jsx("span",{style:{color:u,fontSize:"13px",fontWeight:"400"},children:D.title})]},q)})})]})]})};ea.propTypes={type:s.oneOf(["cheese","donut"]),data:s.arrayOf(s.shape({value:s.number.isRequired,title:s.string.isRequired,color:s.string})).isRequired,title:s.string,size:s.number,donutThickness:s.number,gapWidth:s.number,gapColor:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,containerStyles:s.object,alignLeft:s.bool,valuesArePercentages:s.bool,minSliceAngle:s.number};const js=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],ta=({data:e=[],title:t,backgroundColor:n="#0d3d4a",fontColor:r="#ffffff",barHeight:o=52,animated:i=!0,borderRadius:a,containerStyles:c={},fontColorInside:u="white",borderFontColorInside:d})=>{const[m,g]=w.useState(i?0:1);w.useEffect(()=>{if(!i)return;const b=requestAnimationFrame(()=>g(1));return()=>cancelAnimationFrame(b)},[i]);const y=Math.max(...e.map(b=>b.value),1),h=a??"6px";return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0px",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",minWidth:"420px",...c},children:[t&&l.jsx("h2",{style:{margin:"0 0 20px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"18px"},children:e.map((b,f)=>{const x=b.color||js[f%js.length],_=b.value/y*100*m;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("span",{style:{color:r,fontSize:"14px",fontWeight:"400",opacity:.9},children:b.title}),l.jsxs("div",{style:{position:"relative",height:`${o}px`,background:"transparent",borderRadius:h,overflow:"hidden"},children:[l.jsx("div",{style:{position:"absolute",left:0,top:0,height:"100%",width:`${_}%`,background:x,borderRadius:h,transition:i?"width 0.8s cubic-bezier(0.16, 1, 0.3, 1)":"none"}}),l.jsx("span",{style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:u||n,fontSize:"18px",fontWeight:"700",pointerEvents:"none",letterSpacing:"-0.3px",...d?{WebkitTextStroke:`1px ${d}`,paintOrder:"stroke fill"}:{}},children:b.value})]})]},f)})})]})};ta.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})),title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barHeight:s.number,animated:s.bool,borderRadius:s.oneOfType([s.string,s.number]),containerStyles:s.object};const $s=["#a8d8cf","#3bbfa0","#5dd4b8","#7ed4c2","#2aa88a"],na=({data:e=[],title:t,backgroundColor:n="black",fontColor:r="#ffffff",fontColorInside:o="#0d3d4a",borderFontColorInside:i,barWidth:a=52,maxBarHeight:c=200,animated:u=!0,separatorColor:d,containerStyles:m={}})=>{const[g,y]=w.useState(u?0:1);w.useEffect(()=>{if(!u)return;const E=requestAnimationFrame(()=>requestAnimationFrame(()=>y(1)));return()=>cancelAnimationFrame(E)},[u]);const h=Math.max(...e.map(E=>E.value),1),b=d||(r==="#ffffff"?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.15)"),f=12,x=12,_=e.length*a+Math.max(0,e.length-1)*f,S={fontSize:"15px",fontWeight:"700",letterSpacing:"-0.3px",lineHeight:1,pointerEvents:"none",whiteSpace:"nowrap",...i?{WebkitTextStroke:`1px ${i}`,paintOrder:"stroke fill"}:{}};return l.jsxs("div",{style:{display:"inline-flex",flexDirection:"column",gap:"0",background:n,borderRadius:"16px",fontFamily:"'Segoe UI', sans-serif",...m},children:[t&&l.jsx("h2",{style:{margin:"0 0 24px 0",color:r,fontSize:"22px",fontWeight:"700",letterSpacing:"-0.4px"},children:t}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:0,overflow:"visible"},children:[l.jsx("div",{style:{display:"flex",alignItems:"flex-end",gap:`${f}px`,width:`${_}px`,height:`${c}px`},children:e.map((E,C)=>{const v=E.color||$s[C%$s.length],T=E.value===0,A=T?0:E.value/h*c*g;return l.jsx("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",width:`${a}px`,height:"100%"},children:T?l.jsx("span",{style:{...S,color:o,marginBottom:"6px"},children:E.value}):l.jsx("div",{style:{position:"relative",width:"100%",height:`${A}px`,background:v,borderRadius:"6px 6px 0 0",transition:u?"height 0.85s cubic-bezier(0.16, 1, 0.3, 1)":"none",display:"flex",alignItems:"flex-start",justifyContent:"center",paddingTop:"10px"},children:l.jsx("span",{style:{...S,color:o},children:E.value})})},C)})}),l.jsx("div",{style:{width:`${_+x*2}px`,marginLeft:`-${x}px`,height:"1.5px",background:b,borderRadius:"1px"}}),l.jsx("div",{style:{display:"flex",gap:`${f}px`,width:`${_}px`,marginTop:"10px"},children:e.map((E,C)=>l.jsx("div",{style:{width:`${a}px`,textAlign:"center",color:r,fontSize:"13px",fontWeight:"400",opacity:.8,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:E.title},C))})]})]})};na.propTypes={data:s.arrayOf(s.shape({title:s.string.isRequired,value:s.number.isRequired,color:s.string})).isRequired,title:s.string,backgroundColor:s.string,fontColor:s.string,fontColorInside:s.string,borderFontColorInside:s.string,barWidth:s.number,maxBarHeight:s.number,animated:s.bool,separatorColor:s.string,containerStyles:s.object};const ap="_percentageBarContainer_lgkme_3",lp="_barContainer_lgkme_10",cp="_segment_lgkme_19",up="_handle_lgkme_36",dp="_labelsContainer_lgkme_68",fp="_labelItem_lgkme_73",pp="_labelsListContainer_lgkme_85",mp="_labelColor_lgkme_105",hp="_labelText_lgkme_114",gp="_labelValue_lgkme_122",yp="_labelTranslation_lgkme_126",Me={percentageBarContainer:ap,barContainer:lp,segment:cp,handle:up,labelsContainer:dp,labelItem:fp,labelsListContainer:pp,labelColor:mp,labelText:hp,labelValue:gp,labelTranslation:yp},bp=2,Es=e=>{const t=e.reduce((n,r)=>n+r.value,0);return t===0?e.map(()=>100/e.length):e.map(n=>n.value/t*100)},jr=(e,t=100)=>e.map(n=>n.value/t*100),Ns=(e,t)=>{try{const r=new Function("x",`return (${t})`)(e);return isNaN(r)?"N/A":r.toFixed(2)}catch{return"N/A"}},ra=({items:e,showLabels:t="bar",showTranslations:n=!0,onChange:r,minPercentage:o=bp,maxValue:i=100,labelTextColor:a,labelValueColor:c})=>{const[u,d]=w.useState(()=>Es(e)),m=w.useRef(null),g=w.useRef(null);w.useEffect(()=>{e&&e.length>0&&d(Es(e))},[e]);const y=w.useCallback(f=>{if(!m.current||!g.current)return;const{dividerIndex:x}=m.current,_=g.current.getBoundingClientRect(),S=(f.touches?f.touches[0].clientX:f.clientX)-_.left,E=Math.max(0,Math.min(100,S/_.width*100));d(C=>{const v=[...C],T=C.slice(0,x).reduce((P,I)=>P+I,0),A=T+C[x]+C[x+1];let k=E-T,$=A-E;if(k<o&&(k=o,$=A-T-o),$<o&&($=o,k=A-T-o),v[x]=k,v[x+1]=$,r)try{const P=e.reduce((I,p)=>I+p.value,0);r(e.map((I,p)=>({...I,value:v[p]/100*P})))}catch(P){console.error("PercentageBar onChange error:",P)}return v})},[o,r,e]),h=w.useCallback(()=>{m.current&&(m.current=null,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",h),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",h),d(f=>{if(r){const x=e.reduce((_,S)=>_+S.value,0);r(e.map((_,S)=>({..._,value:f[S]/100*x})))}return f}))},[y,r,e]),b=(f,x)=>{x.preventDefault(),m.current={dividerIndex:f},document.addEventListener("mousemove",y),document.addEventListener("mouseup",h),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",h)};return l.jsxs("div",{className:Me.percentageBarContainer,children:[l.jsx("div",{className:Me.barContainer,ref:g,children:e.map((f,x)=>{var _;return l.jsx("div",{className:Me.segment,style:{width:`${u[x]}%`,backgroundColor:f.color||"#ccc"},children:x>0&&l.jsx("div",{className:Me.handle,onMouseDown:S=>b(x-1,S),onTouchStart:S=>b(x-1,S),role:"slider","aria-label":`Divisor entre ${(_=e[x-1])==null?void 0:_.title} y ${f.title}`,"aria-valuenow":Math.round(u[x]),tabIndex:0})},f.id??x)})}),t==="bar"&&l.jsx("div",{className:Me.labelsContainer,children:e.map((f,x)=>l.jsxs("div",{className:Me.labelItem,style:{width:`${u[x]}%`},children:[l.jsx("span",{className:Me.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Me.labelText,style:{color:a||"#fff"},children:f.title}),l.jsxs("span",{className:Me.labelValue,style:{color:c||"#fff"},children:[jr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Me.labelTranslation,children:["(",Ns(u[x],f.translationFormula),")"]})]},f.id??x))}),t==="list"&&l.jsx("div",{className:Me.labelsListContainer,children:e.map((f,x)=>l.jsxs("div",{className:Me.labelItem,children:[l.jsx("span",{className:Me.labelColor,style:{backgroundColor:f.color}}),l.jsx("span",{className:Me.labelText,children:f.title}),l.jsxs("span",{className:Me.labelValue,children:[jr(e,i)[x].toFixed(1),"%"]}),n&&f.translationFormula&&l.jsxs("span",{className:Me.labelTranslation,children:["(",Ns(jr(e,i)[x],f.translationFormula),")"]})]},f.id??x))})]})};ra.propTypes={items:s.arrayOf(s.shape({id:s.oneOfType([s.string,s.number]),title:s.string.isRequired,value:s.number.isRequired,color:s.string.isRequired,translationFormula:s.string})).isRequired,showLabels:s.string,showTranslations:s.bool,onChange:s.func,minPercentage:s.number,maxValue:s.number,labelTextColor:s.string,labelValueColor:s.string};const vp="_overlay_1vbid_2",xp="_modal_1vbid_16",Cp="_content_1vbid_28",_p="_iconContainer_1vbid_36",wp="_iconSvg_1vbid_43",Sp="_textContainer_1vbid_48",Tp="_title_1vbid_55",kp="_message_1vbid_62",jp="_closeButton_1vbid_69",Qe={overlay:vp,modal:xp,content:Cp,iconContainer:_p,iconSvg:wp,textContainer:Sp,title:Tp,message:kp,closeButton:jp},ao=({isOpen:e,onClose:t,title:n,message:r,isError:o=!1,isSuccess:i=!1,customIcon:a=null,iconColor:c=null,textColor:u=null,backgroundColor:d=null,borderColor:m=null,showCloseButton:g=!0,autoClose:y=!1,autoCloseDelay:h=3e3})=>{if(w.useEffect(()=>{if(y&&e){const S=setTimeout(()=>{t()},h);return()=>clearTimeout(S)}},[y,e,t,h]),!e)return null;const b=()=>{const S={};return d&&(S.backgroundColor=d),m&&(S.borderColor=m),o&&!d?(S.backgroundColor="#fff5f5",S.borderColor="#feb2b2"):i&&!d&&(S.backgroundColor="#f0fff4",S.borderColor="#9ae6b4"),S},f=()=>{const S={};return u&&(S.color=u),o&&!u?S.color="#c53030":i&&!u&&(S.color="#276749"),S},x=()=>{const S={};return c&&(S.color=c),o&&!c?S.color="#c53030":i&&!c&&(S.color="#276749"),S},_=()=>a||(o?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Qe.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"12"}),l.jsx("line",{x1:"12",y1:"16",x2:"12.01",y2:"16"})]}):i?l.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:Qe.iconSvg,style:x(),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[l.jsx("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),l.jsx("polyline",{points:"22 4 12 14.01 9 11.01"})]}):null);return l.jsx("div",{className:Qe.overlay,children:l.jsx("div",{className:Qe.modal,style:b(),children:l.jsxs("div",{className:Qe.content,children:[l.jsx("div",{className:Qe.iconContainer,children:_()}),l.jsxs("div",{className:Qe.textContainer,children:[n&&l.jsx("h3",{className:Qe.title,style:f(),children:n}),l.jsx("p",{className:Qe.message,style:f(),children:r})]}),g&&l.jsx("button",{className:Qe.closeButton,onClick:t,"aria-label":"Close modal",style:f(),children:"✕"})]})})})};ao.propTypes={isOpen:s.bool.isRequired,onClose:s.func.isRequired,title:s.string,message:s.string.isRequired,isError:s.bool,isSuccess:s.bool,customIcon:s.node,iconColor:s.string,textColor:s.string,backgroundColor:s.string,borderColor:s.string,showCloseButton:s.bool,autoClose:s.bool,autoCloseDelay:s.number};ao.defaultProps={isError:!1,isSuccess:!1,showCloseButton:!0,autoClose:!1,autoCloseDelay:3e3};const $p="_header_13kbt_2",Ep="_leftComponents_13kbt_13",Np="_centerComponents_13kbt_14",Op="_rightComponents_13kbt_15",Ap="_componentsContainer_13kbt_32",St={header:$p,leftComponents:Ep,centerComponents:Np,rightComponents:Op,componentsContainer:Ap},oa=({cssProps:e,leftComponents:t=[],centerComponents:n=[],rightComponents:r=[],zIndex:o=10,height:i=60,backgroundColor:a="#605B56",isFooter:c=!1})=>l.jsxs("div",{className:St.header,style:{...e,zIndex:o,height:i,backgroundColor:a,top:c?"auto":0,bottom:c?0:"auto"},children:[l.jsx("div",{className:St.leftComponents,children:t.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))}),l.jsx("div",{className:St.centerComponents,children:n.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))}),l.jsx("div",{className:St.rightComponents,children:r.map((u,d)=>l.jsx("div",{className:St.componentsContainer,children:u},d))})]});oa.propTypes={leftComponents:s.arrayOf(s.node),centerComponents:s.arrayOf(s.node),rightComponents:s.arrayOf(s.node),cssProps:s.object,zIndex:s.number,height:s.number,backgroundColor:s.string,isFooter:s.bool};const Lp="_sidebar_1kaqu_2",Mp="_open_1kaqu_16",Rp="_content_1kaqu_20",Ip="_closeButton_1kaqu_25",Ln={sidebar:Lp,open:Mp,content:Rp,closeButton:Ip},Dp="data:image/svg+xml,%3csvg%20width='19'%20height='19'%20viewBox='0%200%2019%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Group%203699'%3e%3cpath%20id='Vector%20223'%20d='M1%201L18.1566%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20id='Vector%20224'%20d='M18.1575%201L1.00083%2018.1566'%20stroke='%23605B56'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",sa=({width:e="300px",children:t,showRightBar:n,onCloseBar:r})=>{const o=()=>{r()};return l.jsx("div",{className:`${Ln.sidebar} ${n?Ln.open:""}`,style:{width:n?e:0},children:n&&l.jsxs("div",{className:Ln.content,children:[l.jsx("button",{className:Ln.closeButton,onClick:o,children:l.jsx("img",{src:Dp,alt:"Close Sidebar"})}),t]})})};sa.propTypes={width:s.string,children:s.node,showRightBar:s.bool,onCloseBar:s.func};exports.AmbitSelector=Ds;exports.BarChart=Zr;exports.BurgerMenu=io;exports.ButtonsBar=Zi;exports.ButtonsList=Bs;exports.CategorySelector=Fr;exports.DropdownList=yt;exports.EditAmbit=fl;exports.ErrorMessage=Kt;exports.FiltersAmbit=Us;exports.Form=Xd;exports.GeneralButton=un;exports.Graphic=Zs;exports.GraphicLegend=Xi;exports.Groupedbarchart=Gi;exports.HeaderSection=oa;exports.HorizontalBarChart=ta;exports.IndicatorsList=Ys;exports.LangSelector=Xs;exports.Legend=Qs;exports.ListSelector=Ii;exports.Loader=Ki;exports.LogInButton=Mi;exports.LogoApp=Js;exports.MapboxMap=si;exports.MaplibreMap=ii;exports.ModalAlert=Ui;exports.PercentageBar=ra;exports.PieChart=ea;exports.RadioButtonInput=Wi;exports.RankingSlider=ro;exports.RightSidebar=sa;exports.SectionBar=ai;exports.SelectInput=qi;exports.SpeedGraphic=Qi;exports.Stackedbarchart=Yi;exports.StatusModal=ao;exports.StatusText=so;exports.Steps=oo;exports.Switch=Hi;exports.TextInput=Vr;exports.TimeSlider=Ai;exports.Tooltip=Je;exports.TopNavMenu=Li;exports.VerticalBarChart=na;
|
package/dist/index.es.js
CHANGED
|
@@ -11004,7 +11004,7 @@ const Wf = "_svgContainer_7fkic_2", Uf = "_svg_7fkic_2", Ai = {
|
|
|
11004
11004
|
lineData: r = null,
|
|
11005
11005
|
width: o = "100%",
|
|
11006
11006
|
height: s = 300,
|
|
11007
|
-
margin: a = { top: 20, right: 20, bottom:
|
|
11007
|
+
margin: a = { top: 20, right: 20, bottom: 90, left: 60 },
|
|
11008
11008
|
className: l = "",
|
|
11009
11009
|
showXAxisLabels: c = !0,
|
|
11010
11010
|
showYAxisLabels: d = !0,
|
|
@@ -11048,7 +11048,7 @@ const Wf = "_svgContainer_7fkic_2", Uf = "_svg_7fkic_2", Ai = {
|
|
|
11048
11048
|
if (!e || e.length === 0 || p.containerWidth === 0) return;
|
|
11049
11049
|
const F = bt(B.current), { containerWidth: W, height: V } = p, q = W - a.left - a.right, ne = e.length * L, M = Math.max(q, ne), R = M + a.left + a.right, H = V - a.top - a.bottom;
|
|
11050
11050
|
if (M <= 0 || H <= 0) return;
|
|
11051
|
-
F.attr("width", R).attr("height", V);
|
|
11051
|
+
F.attr("width", R).attr("height", V).style("overflow", "visible");
|
|
11052
11052
|
const J = N === "stacked" ? S ? [...t].reverse() : t : [], z = (U) => N === "single" ? U.title : U.any || U.year || U.x, K = [];
|
|
11053
11053
|
e.forEach((U) => {
|
|
11054
11054
|
const ue = z(U);
|