1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[1205],{6749:(e,o,t)=>{t.d(o,{A:()=>r});var n=t(31529),a=t(65908);const r=(0,n.A)((0,a.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDownOutlined")},18871:(e,o,t)=>{t.d(o,{A:()=>s});var n=t(27326),a=t(85672);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"};var i=t(75890),c=function(e,o){return a.createElement(i.A,(0,n.A)({},e,{ref:o,icon:r}))};const s=a.forwardRef(c)},19103:(e,o,t)=>{t.d(o,{A:()=>s});var n=t(27326),a=t(85672);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var i=t(75890),c=function(e,o){return a.createElement(i.A,(0,n.A)({},e,{ref:o,icon:r}))};const s=a.forwardRef(c)},28579:(e,o,t)=>{t.d(o,{A:()=>I});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(10247),l=t(42081),d=t(31529),p=t(65908);const u=(0,d.A)((0,p.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),m=(0,d.A)((0,p.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),h=(0,d.A)((0,p.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var v=t(16775),f=t(38009),A=t(60308),b=t(24270),g=t(37300),w=t(10644);function y(e){return(0,w.Ay)("MuiCheckbox",e)}const x=(0,g.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),S=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],k=(0,A.Ay)(l.A,{shouldForwardProp:e=>(0,b.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,t.indeterminate&&o.indeterminate,o["size".concat((0,v.A)(t.size))],"default"!==t.color&&o["color".concat((0,v.A)(t.color))]]}})((e=>{let{theme:o,ownerState:t}=e;return(0,a.A)({color:(o.vars||o).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:o.vars?"rgba(".concat("default"===t.color?o.vars.palette.action.activeChannel:o.vars.palette[t.color].mainChannel," / ").concat(o.vars.palette.action.hoverOpacity,")"):(0,s.X4)("default"===t.color?o.palette.action.active:o.palette[t.color].main,o.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{["&.".concat(x.checked,", &.").concat(x.indeterminate)]:{color:(o.vars||o).palette[t.color].main},["&.".concat(x.disabled)]:{color:(o.vars||o).palette.action.disabled}})})),C=(0,p.jsx)(m,{}),z=(0,p.jsx)(u,{}),R=(0,p.jsx)(h,{}),I=r.forwardRef((function(e,o){var t,s;const l=(0,f.b)({props:e,name:"MuiCheckbox"}),{checkedIcon:d=C,color:u="primary",icon:m=z,indeterminate:h=!1,indeterminateIcon:A=R,inputProps:b,size:g="medium",className:w}=l,x=(0,n.A)(l,S),I=h?A:m,M=h?A:d,D=(0,a.A)({},l,{color:u,indeterminate:h,size:g}),F=(e=>{const{classes:o,indeterminate:t,color:n,size:r}=e,i={root:["root",t&&"indeterminate","color".concat((0,v.A)(n)),"size".concat((0,v.A)(r))]},s=(0,c.A)(i,y,o);return(0,a.A)({},o,s)})(D);return(0,p.jsx)(k,(0,a.A)({type:"checkbox",inputProps:(0,a.A)({"data-indeterminate":h},b),icon:r.cloneElement(I,{fontSize:null!=(t=I.props.fontSize)?t:g}),checkedIcon:r.cloneElement(M,{fontSize:null!=(s=M.props.fontSize)?s:g}),ownerState:D,ref:o,className:(0,i.A)(F.root,w)},x,{classes:F}))}))},42081:(e,o,t)=>{t.d(o,{A:()=>y});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(16775),l=t(60308),d=t(24270),p=t(11235),u=t(75520),m=t(61949),h=t(37300),v=t(10644);function f(e){return(0,v.Ay)("PrivateSwitchBase",e)}(0,h.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var A=t(65908);const b=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],g=(0,l.Ay)(m.A)((e=>{let{ownerState:o}=e;return(0,a.A)({padding:9,borderRadius:"50%"},"start"===o.edge&&{marginLeft:"small"===o.size?-3:-12},"end"===o.edge&&{marginRight:"small"===o.size?-3:-12})})),w=(0,l.Ay)("input",{shouldForwardProp:d.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),y=r.forwardRef((function(e,o){const{autoFocus:t,checked:r,checkedIcon:l,className:d,defaultChecked:m,disabled:h,disableFocusRipple:v=!1,edge:y=!1,icon:x,id:S,inputProps:k,inputRef:C,name:z,onBlur:R,onChange:I,onFocus:M,readOnly:D,required:F=!1,tabIndex:N,type:P,value:E}=e,T=(0,n.A)(e,b),[L,O]=(0,p.A)({controlled:r,default:Boolean(m),name:"SwitchBase",state:"checked"}),B=(0,u.A)();let j=h;B&&"undefined"===typeof j&&(j=B.disabled);const H="checkbox"===P||"radio"===P,V=(0,a.A)({},e,{checked:L,disabled:j,disableFocusRipple:v,edge:y}),_=(e=>{const{classes:o,checked:t,disabled:n,edge:a}=e,r={root:["root",t&&"checked",n&&"disabled",a&&"edge".concat((0,s.A)(a))],input:["input"]};return(0,c.A)(r,f,o)})(V);return(0,A.jsxs)(g,(0,a.A)({component:"span",className:(0,i.A)(_.root,d),centerRipple:!0,focusRipple:!v,disabled:j,tabIndex:null,role:void 0,onFocus:e=>{M&&M(e),B&&B.onFocus&&B.onFocus(e)},onBlur:e=>{R&&R(e),B&&B.onBlur&&B.onBlur(e)},ownerState:V,ref:o},T,{children:[(0,A.jsx)(w,(0,a.A)({autoFocus:t,checked:r,defaultChecked:m,className:_.input,disabled:j,id:H?S:void 0,name:z,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const o=e.target.checked;O(o),I&&I(e,o)},readOnly:D,ref:C,required:F,ownerState:V,tabIndex:N,type:P},"checkbox"===P&&void 0===E?{}:{value:E},k)),L?l:x]}))}))},42836:(e,o,t)=>{t.d(o,{A:()=>S});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(10247),l=t(60308),d=t(38009),p=t(78222),u=t(23440),m=t(16775),h=t(37300),v=t(10644);function f(e){return(0,v.Ay)("MuiSpeedDialAction",e)}const A=(0,h.A)("MuiSpeedDialAction",["fab","fabClosed","staticTooltip","staticTooltipClosed","staticTooltipLabel","tooltipPlacementLeft","tooltipPlacementRight"]);var b=t(65908);const g=["className","delay","FabProps","icon","id","open","TooltipClasses","tooltipOpen","tooltipPlacement","tooltipTitle"],w=(0,l.Ay)(p.A,{name:"MuiSpeedDialAction",slot:"Fab",skipVariantsResolver:!1,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.fab,!t.open&&o.fabClosed]}})((e=>{let{theme:o,ownerState:t}=e;return(0,a.A)({margin:8,color:(o.vars||o).palette.text.secondary,backgroundColor:(o.vars||o).palette.background.paper,"&:hover":{backgroundColor:o.vars?o.vars.palette.SpeedDialAction.fabHoverBg:(0,s.tL)(o.palette.background.paper,.15)},transition:"".concat(o.transitions.create("transform",{duration:o.transitions.duration.shorter}),", opacity 0.8s"),opacity:1},!t.open&&{opacity:0,transform:"scale(0)"})})),y=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltip",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.staticTooltip,!t.open&&o.staticTooltipClosed,o["tooltipPlacement".concat((0,m.A)(t.tooltipPlacement))]]}})((e=>{let{theme:o,ownerState:t}=e;return{position:"relative",display:"flex",alignItems:"center",["& .".concat(A.staticTooltipLabel)]:(0,a.A)({transition:o.transitions.create(["transform","opacity"],{duration:o.transitions.duration.shorter}),opacity:1},!t.open&&{opacity:0,transform:"scale(0.5)"},"left"===t.tooltipPlacement&&{transformOrigin:"100% 50%",right:"100%",marginRight:8},"right"===t.tooltipPlacement&&{transformOrigin:"0% 50%",left:"100%",marginLeft:8})}})),x=(0,l.Ay)("span",{name:"MuiSpeedDialAction",slot:"StaticTooltipLabel",overridesResolver:(e,o)=>o.staticTooltipLabel})((e=>{let{theme:o}=e;return(0,a.A)({position:"absolute"},o.typography.body1,{backgroundColor:(o.vars||o).palette.background.paper,borderRadius:(o.vars||o).shape.borderRadius,boxShadow:(o.vars||o).shadows[1],color:(o.vars||o).palette.text.secondary,padding:"4px 16px",wordBreak:"keep-all"})})),S=r.forwardRef((function(e,o){const t=(0,d.b)({props:e,name:"MuiSpeedDialAction"}),{className:s,delay:l=0,FabProps:p={},icon:h,id:v,open:A,TooltipClasses:S,tooltipOpen:k=!1,tooltipPlacement:C="left",tooltipTitle:z}=t,R=(0,n.A)(t,g),I=(0,a.A)({},t,{tooltipPlacement:C}),M=(e=>{const{open:o,tooltipPlacement:t,classes:n}=e,a={fab:["fab",!o&&"fabClosed"],staticTooltip:["staticTooltip","tooltipPlacement".concat((0,m.A)(t)),!o&&"staticTooltipClosed"],staticTooltipLabel:["staticTooltipLabel"]};return(0,c.A)(a,f,n)})(I),[D,F]=r.useState(k),N={transitionDelay:"".concat(l,"ms")},P=(0,b.jsx)(w,(0,a.A)({size:"small",className:(0,i.A)(M.fab,s),tabIndex:-1,role:"menuitem",ownerState:I},p,{style:(0,a.A)({},N,p.style),children:h}));return k?(0,b.jsxs)(y,(0,a.A)({id:v,ref:o,className:M.staticTooltip,ownerState:I},R,{children:[(0,b.jsx)(x,{style:N,id:"".concat(v,"-label"),className:M.staticTooltipLabel,ownerState:I,children:z}),r.cloneElement(P,{"aria-labelledby":"".concat(v,"-label")})]})):(!A&&D&&F(!1),(0,b.jsx)(u.A,(0,a.A)({id:v,ref:o,title:z,placement:C,onClose:()=>{F(!1)},onOpen:()=>{F(!0)},open:A&&D,classes:S},R,{children:P})))}))},46781:(e,o,t)=>{t.d(o,{A:()=>w});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(60308),l=t(38009),d=t(31529),p=t(65908);const u=(0,d.A)((0,p.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");var m=t(37300),h=t(10644);function v(e){return(0,h.Ay)("MuiSpeedDialIcon",e)}const f=(0,m.A)("MuiSpeedDialIcon",["root","icon","iconOpen","iconWithOpenIconOpen","openIcon","openIconOpen"]),A=["className","icon","open","openIcon"],b=(0,s.Ay)("span",{name:"MuiSpeedDialIcon",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[{["& .".concat(f.icon)]:o.icon},{["& .".concat(f.icon)]:t.open&&o.iconOpen},{["& .".concat(f.icon)]:t.open&&t.openIcon&&o.iconWithOpenIconOpen},{["& .".concat(f.openIcon)]:o.openIcon},{["& .".concat(f.openIcon)]:t.open&&o.openIconOpen},o.root]}})((e=>{let{theme:o,ownerState:t}=e;return{height:24,["& .".concat(f.icon)]:(0,a.A)({transition:o.transitions.create(["transform","opacity"],{duration:o.transitions.duration.short})},t.open&&(0,a.A)({transform:"rotate(45deg)"},t.openIcon&&{opacity:0})),["& .".concat(f.openIcon)]:(0,a.A)({position:"absolute",transition:o.transitions.create(["transform","opacity"],{duration:o.transitions.duration.short}),opacity:0,transform:"rotate(-45deg)"},t.open&&{transform:"rotate(0deg)",opacity:1})}})),g=r.forwardRef((function(e,o){const t=(0,l.b)({props:e,name:"MuiSpeedDialIcon"}),{className:s,icon:d,openIcon:m}=t,h=(0,n.A)(t,A),f=t,g=(e=>{const{classes:o,open:t,openIcon:n}=e,a={root:["root"],icon:["icon",t&&"iconOpen",n&&t&&"iconWithOpenIconOpen"],openIcon:["openIcon",t&&"openIconOpen"]};return(0,c.A)(a,v,o)})(f);function w(e,o){return r.isValidElement(e)?r.cloneElement(e,{className:o}):e}return(0,p.jsxs)(b,(0,a.A)({className:(0,i.A)(g.root,s),ref:o,ownerState:f},h,{children:[m?w(m,g.openIcon):null,d?w(d,g.icon):(0,p.jsx)(u,{className:g.icon})]}))}));g.muiName="SpeedDialIcon";const w=g},64551:(e,o,t)=>{t.d(o,{A:()=>s});var n=t(27326),a=t(85672);const r={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M922.9 701.9H327.4l29.9-60.9 496.8-.9c16.8 0 31.2-12 34.2-28.6l68.8-385.1c1.8-10.1-.9-20.5-7.5-28.4a34.99 34.99 0 00-26.6-12.5l-632-2.1-5.4-25.4c-3.4-16.2-18-28-34.6-28H96.5a35.3 35.3 0 100 70.6h125.9L246 312.8l58.1 281.3-74.8 122.1a34.96 34.96 0 00-3 36.8c6 11.9 18.1 19.4 31.5 19.4h62.8a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7h161.1a102.43 102.43 0 00-20.6 61.7c0 56.6 46 102.6 102.6 102.6s102.6-46 102.6-102.6c0-22.3-7.4-44-20.6-61.7H923c19.4 0 35.3-15.8 35.3-35.3a35.42 35.42 0 00-35.4-35.2zM305.7 253l575.8 1.9-56.4 315.8-452.3.8L305.7 253zm96.9 612.7c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6zm325.1 0c-17.4 0-31.6-14.2-31.6-31.6 0-17.4 14.2-31.6 31.6-31.6s31.6 14.2 31.6 31.6a31.6 31.6 0 01-31.6 31.6z"}}]},name:"shopping-cart",theme:"outlined"};var i=t(75890),c=function(e,o){return a.createElement(i.A,(0,n.A)({},e,{ref:o,icon:r}))};const s=a.forwardRef(c)},78222:(e,o,t)=>{t.d(o,{A:()=>w});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(61949),l=t(16775),d=t(38009),p=t(37300),u=t(10644);function m(e){return(0,u.Ay)("MuiFab",e)}const h=(0,p.A)("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]);var v=t(60308),f=t(24270),A=t(65908);const b=["children","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"],g=(0,v.Ay)(s.A,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>(0,f.A)(e)||"classes"===e,overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o[t.variant],o["size".concat((0,l.A)(t.size))],"inherit"===t.color&&o.colorInherit,o[(0,l.A)(t.size)],o[t.color]]}})((e=>{let{theme:o,ownerState:t}=e;var n,r;return(0,a.A)({},o.typography.button,{minHeight:36,transition:o.transitions.create(["background-color","box-shadow","border-color"],{duration:o.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(o.vars||o).zIndex.fab,boxShadow:(o.vars||o).shadows[6],"&:active":{boxShadow:(o.vars||o).shadows[12]},color:o.vars?o.vars.palette.text.primary:null==(n=(r=o.palette).getContrastText)?void 0:n.call(r,o.palette.grey[300]),backgroundColor:(o.vars||o).palette.grey[300],"&:hover":{backgroundColor:(o.vars||o).palette.grey.A100,"@media (hover: none)":{backgroundColor:(o.vars||o).palette.grey[300]},textDecoration:"none"},["&.".concat(h.focusVisible)]:{boxShadow:(o.vars||o).shadows[6]}},"small"===t.size&&{width:40,height:40},"medium"===t.size&&{width:48,height:48},"extended"===t.variant&&{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48},"extended"===t.variant&&"small"===t.size&&{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"extended"===t.variant&&"medium"===t.size&&{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40},"inherit"===t.color&&{color:"inherit"})}),(e=>{let{theme:o,ownerState:t}=e;return(0,a.A)({},"inherit"!==t.color&&"default"!==t.color&&null!=(o.vars||o).palette[t.color]&&{color:(o.vars||o).palette[t.color].contrastText,backgroundColor:(o.vars||o).palette[t.color].main,"&:hover":{backgroundColor:(o.vars||o).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(o.vars||o).palette[t.color].main}}})}),(e=>{let{theme:o}=e;return{["&.".concat(h.disabled)]:{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground}}})),w=r.forwardRef((function(e,o){const t=(0,d.b)({props:e,name:"MuiFab"}),{children:r,className:s,color:p="default",component:u="button",disabled:h=!1,disableFocusRipple:v=!1,focusVisibleClassName:f,size:w="large",variant:y="circular"}=t,x=(0,n.A)(t,b),S=(0,a.A)({},t,{color:p,component:u,disabled:h,disableFocusRipple:v,size:w,variant:y}),k=(e=>{const{color:o,variant:t,classes:n,size:r}=e,i={root:["root",t,"size".concat((0,l.A)(r)),"inherit"===o?"colorInherit":o]},s=(0,c.A)(i,m,n);return(0,a.A)({},n,s)})(S);return(0,A.jsx)(g,(0,a.A)({className:(0,i.A)(k.root,s),component:u,disabled:h,focusRipple:!v,focusVisibleClassName:(0,i.A)(k.focusVisible,f),ownerState:S,ref:o},x,{classes:k,children:r}))}))},78752:(e,o,t)=>{t.d(o,{A:()=>r});var n=t(31529),a=t(65908);const r=(0,n.A)((0,a.jsx)("path",{d:"M7.41 15.41 12 10.83l4.59 4.58L18 14l-6-6-6 6z"}),"KeyboardArrowUpOutlined")},95661:(e,o,t)=>{t.d(o,{A:()=>F});var n=t(84849),a=t(27326),r=t(85672),i=t(72574),c=t(25234),s=t(2978);const l=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(o,Math.min(e,t))};var d=t(60308),p=t(38009),u=t(69039),m=t(34611),h=t(78222),v=t(16775),f=t(92694),A=t(45688),b=t(11235),g=t(37300),w=t(10644);function y(e){return(0,w.Ay)("MuiSpeedDial",e)}const x=(0,g.A)("MuiSpeedDial",["root","fab","directionUp","directionDown","directionLeft","directionRight","actions","actionsClosed"]);var S=t(65908);const k=["ref"],C=["ariaLabel","FabProps","children","className","direction","hidden","icon","onBlur","onClose","onFocus","onKeyDown","onMouseEnter","onMouseLeave","onOpen","open","openIcon","TransitionComponent","transitionDuration","TransitionProps"],z=["ref"];function R(e){return"up"===e||"down"===e?"vertical":"right"===e||"left"===e?"horizontal":void 0}const I=(0,d.Ay)("div",{name:"MuiSpeedDial",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.root,o["direction".concat((0,v.A)(t.direction))]]}})((e=>{let{theme:o,ownerState:t}=e;return(0,a.A)({zIndex:(o.vars||o).zIndex.speedDial,display:"flex",alignItems:"center",pointerEvents:"none"},"up"===t.direction&&{flexDirection:"column-reverse",["& .".concat(x.actions)]:{flexDirection:"column-reverse",marginBottom:-32,paddingBottom:48}},"down"===t.direction&&{flexDirection:"column",["& .".concat(x.actions)]:{flexDirection:"column",marginTop:-32,paddingTop:48}},"left"===t.direction&&{flexDirection:"row-reverse",["& .".concat(x.actions)]:{flexDirection:"row-reverse",marginRight:-32,paddingRight:48}},"right"===t.direction&&{flexDirection:"row",["& .".concat(x.actions)]:{flexDirection:"row",marginLeft:-32,paddingLeft:48}})})),M=(0,d.Ay)(h.A,{name:"MuiSpeedDial",slot:"Fab",overridesResolver:(e,o)=>o.fab})((()=>({pointerEvents:"auto"}))),D=(0,d.Ay)("div",{name:"MuiSpeedDial",slot:"Actions",overridesResolver:(e,o)=>{const{ownerState:t}=e;return[o.actions,!t.open&&o.actionsClosed]}})((e=>{let{ownerState:o}=e;return(0,a.A)({display:"flex",pointerEvents:"auto"},!o.open&&{transition:"top 0s linear 0.2s",pointerEvents:"none"})})),F=r.forwardRef((function(e,o){const t=(0,p.b)({props:e,name:"MuiSpeedDial"}),d=(0,u.A)(),h={enter:d.transitions.duration.enteringScreen,exit:d.transitions.duration.leavingScreen},{ariaLabel:g,FabProps:{ref:w}={},children:x,className:F,direction:N="up",hidden:P=!1,icon:E,onBlur:T,onClose:L,onFocus:O,onKeyDown:B,onMouseEnter:j,onMouseLeave:H,onOpen:V,open:_,TransitionComponent:W=m.A,transitionDuration:K=h,TransitionProps:q}=t,G=(0,n.A)(t.FabProps,k),U=(0,n.A)(t,C),[X,J]=(0,b.A)({controlled:_,default:!1,name:"SpeedDial",state:"open"}),Q=(0,a.A)({},t,{open:X,direction:N}),Y=(e=>{const{classes:o,open:t,direction:n}=e,a={root:["root","direction".concat((0,v.A)(n))],fab:["fab"],actions:["actions",!t&&"actionsClosed"]};return(0,c.A)(a,y,o)})(Q),Z=(0,s.A)(),$=r.useRef(0),ee=r.useRef(),oe=r.useRef([]);oe.current=[oe.current[0]];const te=r.useCallback((e=>{oe.current[0]=e}),[]),ne=(0,A.A)(w,te),ae=(e,o)=>t=>{oe.current[e+1]=t,o&&o(t)};r.useEffect((()=>{X||($.current=0,ee.current=void 0)}),[X]);const re=e=>{"mouseleave"===e.type&&H&&H(e),"blur"===e.type&&T&&T(e),Z.clear(),"blur"===e.type?Z.start(0,(()=>{J(!1),L&&L(e,"blur")})):(J(!1),L&&L(e,"mouseLeave"))},ie=e=>{"mouseenter"===e.type&&j&&j(e),"focus"===e.type&&O&&O(e),Z.clear(),X||Z.start(0,(()=>{if(J(!0),V){V(e,{focus:"focus",mouseenter:"mouseEnter"}[e.type])}}))},ce=g.replace(/^[^a-z]+|[^\w:.-]+/gi,""),se=r.Children.toArray(x).filter((e=>r.isValidElement(e))),le=se.map(((e,o)=>{const t=e.props,{FabProps:{ref:i}={},tooltipPlacement:c}=t,s=(0,n.A)(t.FabProps,z),l=c||("vertical"===R(N)?"left":"top");return r.cloneElement(e,{FabProps:(0,a.A)({},s,{ref:ae(o,i)}),delay:30*(X?o:se.length-o),open:X,tooltipPlacement:l,id:"".concat(ce,"-action-").concat(o)})}));return(0,S.jsxs)(I,(0,a.A)({className:(0,i.A)(Y.root,F),ref:o,role:"presentation",onKeyDown:e=>{B&&B(e);const o=e.key.replace("Arrow","").toLowerCase(),{current:t=o}=ee;if("Escape"===e.key)return J(!1),oe.current[0].focus(),void(L&&L(e,"escapeKeyDown"));if(R(o)===R(t)&&void 0!==R(o)){e.preventDefault();const n=o===t?1:-1,a=l($.current+n,0,oe.current.length-1);oe.current[a].focus(),$.current=a,ee.current=t}},onBlur:re,onFocus:ie,onMouseEnter:ie,onMouseLeave:re,ownerState:Q},U,{children:[(0,S.jsx)(W,(0,a.A)({in:!P,timeout:K,unmountOnExit:!0},q,{children:(0,S.jsx)(M,(0,a.A)({color:"primary","aria-label":g,"aria-haspopup":"true","aria-expanded":X,"aria-controls":"".concat(ce,"-actions")},G,{onClick:e=>{G.onClick&&G.onClick(e),Z.clear(),X?(J(!1),L&&L(e,"toggle")):(J(!0),V&&V(e,"toggle"))},className:(0,i.A)(Y.fab,G.className),ref:ne,ownerState:Q,children:r.isValidElement(E)&&(0,f.A)(E,["SpeedDialIcon"])?r.cloneElement(E,{open:X}):E}))})),(0,S.jsx)(D,{id:"".concat(ce,"-actions"),role:"menu","aria-orientation":R(N),className:(0,i.A)(Y.actions,!X&&Y.actionsClosed),ownerState:Q,children:le})]}))}))}}]); |