@carto/meridian-ds 1.4.2-alpha-forwarding-props.1 → 1.4.2-alpha-forwarding-props.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-BbMbtaix.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-CGnG0E-4.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:o,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=n.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?n.jsxs(a.Box,{sx:{position:"relative"},children:[n.jsx(mt,{children:c}),n.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return n.jsx(a.Button,{disabled:e||o,startIcon:u("start"),endIcon:u("end"),...s,role:"button",ref:d,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:o,inheritSize:i}){return n.jsxs(jt,{children:[t,e&&n.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(It,{children:o})]})}function Ct({InputProps:t,size:e="small",...o},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return n.jsx(a.TextField,{...o,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(a.InputAdornment,{position:"end",children:n.jsx(a.IconButton,{size:e,onClick:c,children:n.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(S.VisibilityOffOutlined,{}):n.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:o="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=o==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return n.jsxs(a.FormControl,{size:o,error:u,focused:f,disabled:p,fullWidth:x,required:M,children:[n.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&n.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&n.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),n.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:o,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(At,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&n.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:o,...i}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(St,{...i,variant:e,backgroundColor:o??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:o,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return n.jsx(a.Tooltip,{placement:e,title:t??"",children:n.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):o})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:o,MenuListProps:i,...r},l){return n.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:o,extended:t,MenuListProps:{...i,"data-width":e,"data-height":o,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:o,...i},r){return n.jsx(Et,{...i,ref:r,width:e,height:o,extended:t,"data-name":"menu-list","data-width":e,"data-height":o,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:i,...r},l){const s=k.useIntl(),d=y.useImperativeIntl(s);return n.jsx(_t,{...r,ref:l,fixed:!0,"data-name":"menu-filter",children:n.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:o,tabIndex:0,children:[n.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),d.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:o}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),o(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),o([])):(r(m),o(m)))},unselectAll:()=>{r([]),o([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:o="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=o==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return n.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:o,variant:g,endAdornment:l&&p&&n.jsx(Vt,{position:"end",size:o,children:n.jsx(a.IconButton,{onClick:D,size:o,children:n.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=n.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[n.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),n.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?n.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:o,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return n.jsx(a.InputAdornment,{position:"end",children:d?n.jsx(a.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(a.CircularProgress,{size:18})}):e?n.jsx(a.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:r,children:n.jsx(S.Cancel,{})}):n.jsx(a.Button,{onClick:s,size:o,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:o,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return n.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:n.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:o,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:o,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let T="";return g?T=I:T=i??j,T},[g,o,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:o,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=o??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return n.jsxs(n.Fragment,{children:[n.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),n.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...o},i){return n.jsx(a.Autocomplete,{...o,ref:i,disabled:t||e,popupIcon:e?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...o.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>n.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,o,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=o,{key:I,...T}=e,w=typeof o=="string"||typeof o=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return n.jsx(h.Fragment,{children:c?n.jsx(a.Divider,{}):n.jsxs(n.Fragment,{children:[d&&n.jsx(a.Divider,{}),n.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&n.jsxs(a.ListItemIcon,{children:[l||j&&n.jsx(a.Checkbox,{checked:i.selected}),b]}),n.jsxs(a.ListItemText,{children:[A(r??nt,o,C,s),v&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?o??n.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:o,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),o==null||o(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),o==null||o(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:o,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return n.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&n.jsx(N,{areAllSelected:!!o,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:o=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:i});return n.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return n.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:o||i,popupIcon:i?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...o}){return n.jsx(ce,{...o,variant:t,children:e.map((i,r)=>n.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[n.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),n.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function pe(t){return n.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...o!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(a.Portal,{children:n.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:n.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[n.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:o,title:r,children:i}),o&&n.jsx(me,{children:n.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:n.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return n.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(be,{children:[n.jsx(ye,{onClick:t,children:n.jsx(S.MenuOutlined,{})}),n.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Ce({logo:t}){return n.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return n.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return n.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:o,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return n.jsx(Te,{...s,children:n.jsxs(a.Toolbar,{children:[n.jsxs(Se,{children:[r&&n.jsx(Me,{onClickMenu:l}),e&&n.jsx(Ce,{logo:e}),o&&n.jsx(Be,{text:o}),i&&n.jsx(Ae,{text:i})]}),n.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function q({size:t,variant:e,...o}){const i=k.useIntl(),r=y.useImperativeIntl(i);return n.jsx(Re,{size:t,variant:e,children:n.jsx(a.IconButton,{...o,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:o,readOnly:i,...r}){return n.jsx(Fe,{...r,size:e,variant:o,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return n.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(G,{size:o,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:n.jsx(ut.DatePicker,{...M,label:i&&n.jsx(O,{label:i,type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>n.jsx(q,{...C,size:o,variant:e}),openPickerButton:C=>n.jsx(a.IconButton,{...C,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:o,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(o&&Z(o,t)),d=!!(e&&o&&t.getTime()>=e.getTime()&&t.getTime()<=o.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return n.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:n.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:o="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return n.jsxs(a.Box,{children:[n.jsxs(Le,{variant:o,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[n.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:o}),n.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:o})]}),t&&n.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,o,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(o?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),o&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:n.jsx(gt.TimePicker,{...C,ref:I,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>n.jsx(q,{...A,size:o,variant:e}),openPickerButton:A=>n.jsx(a.IconButton,{...A,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:n.jsx(xt.DateTimePicker,{...C,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>n.jsx(q,{...I,size:o,variant:e}),openPickerButton:I=>n.jsx(a.IconButton,{...I,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(Pe,{children:t.map((o,i)=>n.jsxs(Ne,{children:[n.jsx(qe,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(Ge,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:o="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?n.jsx(W,{size:o,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):n.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:o,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":o,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:o,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return n.jsxs(n.Fragment,{children:[n.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[n.jsxs(Ze,{children:[n.jsxs(K,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&n.jsx(a.Chip,{color:"default",label:e,...o})]}),n.jsxs(K,{children:[l,r&&n.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(a.IconButton,{onClick:r,children:d||n.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&n.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!o?"none":b},[c.palette.divider,o]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),n.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...o}){return n.jsx(nn,{severity:e,...o,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:o,alertProps:i,dark:r,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(ln,{}),n.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!o&&n.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(V,{...i,children:o})}),n.jsxs(an,{children:[n.jsx(rn,{hasAlert:!!o,children:e}),n.jsx(U,{hasAlert:!!o,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:o,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return n.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:n.jsx(ft,{onClickAway:m,children:n.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:n.jsx(dn,{children:n.jsxs(un,{children:[n.jsx(V,{severity:i,...d,children:t}),n.jsx(U,{children:o})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:o})}));function hn({currentStep:t,stepsLabels:e,...o}){return n.jsx(gn,{...o,"data-name":"dialog-stepper",children:n.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[n.jsx(mn,{completed:d,current:s,children:d?n.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-BbMbtaix.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-CGnG0E-4.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:o,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=n.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?n.jsxs(a.Box,{sx:{position:"relative"},children:[n.jsx(mt,{children:c}),n.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return n.jsx(a.Button,{disabled:e||o,startIcon:u("start"),endIcon:u("end"),...s,role:s.href?"link":"button",ref:d,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:o,inheritSize:i}){return n.jsxs(jt,{children:[t,e&&n.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(It,{children:o})]})}function Ct({InputProps:t,size:e="small",...o},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return n.jsx(a.TextField,{...o,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(a.InputAdornment,{position:"end",children:n.jsx(a.IconButton,{size:e,onClick:c,children:n.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(S.VisibilityOffOutlined,{}):n.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:o="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=o==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return n.jsxs(a.FormControl,{size:o,error:u,focused:f,disabled:p,fullWidth:x,required:M,children:[n.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&n.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&n.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),n.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:o,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(At,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&n.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:o,...i}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(St,{...i,variant:e,backgroundColor:o??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:o,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return n.jsx(a.Tooltip,{placement:e,title:t??"",children:n.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):o})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:o,MenuListProps:i,...r},l){return n.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:o,extended:t,MenuListProps:{...i,"data-width":e,"data-height":o,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:o,...i},r){return n.jsx(Et,{...i,ref:r,width:e,height:o,extended:t,"data-name":"menu-list","data-width":e,"data-height":o,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:i,...r},l){const s=k.useIntl(),d=y.useImperativeIntl(s);return n.jsx(_t,{...r,ref:l,fixed:!0,"data-name":"menu-filter",children:n.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:o,tabIndex:0,children:[n.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),d.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:o}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),o(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),o([])):(r(m),o(m)))},unselectAll:()=>{r([]),o([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:o="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=o==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return n.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:o,variant:g,endAdornment:l&&p&&n.jsx(Vt,{position:"end",size:o,children:n.jsx(a.IconButton,{onClick:D,size:o,children:n.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=n.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[n.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),n.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?n.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:o,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return n.jsx(a.InputAdornment,{position:"end",children:d?n.jsx(a.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(a.CircularProgress,{size:18})}):e?n.jsx(a.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:r,children:n.jsx(S.Cancel,{})}):n.jsx(a.Button,{onClick:s,size:o,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:o,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return n.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:n.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:o,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:o,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let T="";return g?T=I:T=i??j,T},[g,o,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:o,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=o??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return n.jsxs(n.Fragment,{children:[n.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),n.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...o},i){return n.jsx(a.Autocomplete,{...o,ref:i,disabled:t||e,popupIcon:e?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...o.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>n.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,o,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=o,{key:I,...T}=e,w=typeof o=="string"||typeof o=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return n.jsx(h.Fragment,{children:c?n.jsx(a.Divider,{}):n.jsxs(n.Fragment,{children:[d&&n.jsx(a.Divider,{}),n.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&n.jsxs(a.ListItemIcon,{children:[l||j&&n.jsx(a.Checkbox,{checked:i.selected}),b]}),n.jsxs(a.ListItemText,{children:[A(r??nt,o,C,s),v&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?o??n.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:o,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),o==null||o(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),o==null||o(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:o,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return n.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&n.jsx(N,{areAllSelected:!!o,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:o=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:i});return n.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return n.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:o||i,popupIcon:i?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...o}){return n.jsx(ce,{...o,variant:t,children:e.map((i,r)=>n.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[n.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),n.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function pe(t){return n.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...o!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(a.Portal,{children:n.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:n.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[n.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:o,title:r,children:i}),o&&n.jsx(me,{children:n.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:n.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return n.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(be,{children:[n.jsx(ye,{onClick:t,children:n.jsx(S.MenuOutlined,{})}),n.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Ce({logo:t}){return n.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return n.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return n.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:o,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return n.jsx(Te,{...s,children:n.jsxs(a.Toolbar,{children:[n.jsxs(Se,{children:[r&&n.jsx(Me,{onClickMenu:l}),e&&n.jsx(Ce,{logo:e}),o&&n.jsx(Be,{text:o}),i&&n.jsx(Ae,{text:i})]}),n.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function q({size:t,variant:e,...o}){const i=k.useIntl(),r=y.useImperativeIntl(i);return n.jsx(Re,{size:t,variant:e,children:n.jsx(a.IconButton,{...o,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:o,readOnly:i,...r}){return n.jsx(Fe,{...r,size:e,variant:o,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return n.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(G,{size:o,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:n.jsx(ut.DatePicker,{...M,label:i&&n.jsx(O,{label:i,type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>n.jsx(q,{...C,size:o,variant:e}),openPickerButton:C=>n.jsx(a.IconButton,{...C,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:o,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(o&&Z(o,t)),d=!!(e&&o&&t.getTime()>=e.getTime()&&t.getTime()<=o.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return n.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:n.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:o="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return n.jsxs(a.Box,{children:[n.jsxs(Le,{variant:o,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[n.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:o}),n.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:o})]}),t&&n.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,o,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(o?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),o&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:n.jsx(gt.TimePicker,{...C,ref:I,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>n.jsx(q,{...A,size:o,variant:e}),openPickerButton:A=>n.jsx(a.IconButton,{...A,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:n.jsx(xt.DateTimePicker,{...C,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>n.jsx(q,{...I,size:o,variant:e}),openPickerButton:I=>n.jsx(a.IconButton,{...I,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(Pe,{children:t.map((o,i)=>n.jsxs(Ne,{children:[n.jsx(qe,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(Ge,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:o="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?n.jsx(W,{size:o,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):n.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:o,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":o,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:o,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return n.jsxs(n.Fragment,{children:[n.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[n.jsxs(Ze,{children:[n.jsxs(K,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&n.jsx(a.Chip,{color:"default",label:e,...o})]}),n.jsxs(K,{children:[l,r&&n.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(a.IconButton,{onClick:r,children:d||n.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&n.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!o?"none":b},[c.palette.divider,o]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),n.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...o}){return n.jsx(nn,{severity:e,...o,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:o,alertProps:i,dark:r,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(ln,{}),n.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!o&&n.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(V,{...i,children:o})}),n.jsxs(an,{children:[n.jsx(rn,{hasAlert:!!o,children:e}),n.jsx(U,{hasAlert:!!o,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:o,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return n.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:n.jsx(ft,{onClickAway:m,children:n.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:n.jsx(dn,{children:n.jsxs(un,{children:[n.jsx(V,{severity:i,...d,children:t}),n.jsx(U,{children:o})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:o})}));function hn({currentStep:t,stepsLabels:e,...o}){return n.jsx(gn,{...o,"data-name":"dialog-stepper",children:n.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[n.jsx(mn,{completed:d,current:s,children:d?n.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;
|
package/dist/components/index.js
CHANGED
|
@@ -50,7 +50,7 @@ function Ce({
|
|
|
50
50
|
startIcon: d("start"),
|
|
51
51
|
endIcon: d("end"),
|
|
52
52
|
...l,
|
|
53
|
-
role: "button",
|
|
53
|
+
role: l.href ? "link" : "button",
|
|
54
54
|
ref: c,
|
|
55
55
|
children: /* @__PURE__ */ i(S, { variant: "inherit", color: "inherit", noWrap: !0, component: "span", children: h() })
|
|
56
56
|
}
|