import{a as F,g as W,C as D,s as v,b as u,_ as r,E as U,r as L,u as N,e as z,j as h,h as j,i as G,G as K,f as B}from"./index.4524613b.js";import{g as T,a as V,c as Z}from"./generateUtilityClasses.06032f54.js";import{u as q}from"./useId.5c752e65.js";function A(t){return F("MuiCircularProgress",t)}W("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const H=["className","color","disableShrink","size","style","thickness","value","variant"];let $=t=>t,M,R,S,E;const g=44,J=D(M||(M=$`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),O=D(R||(R=$`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),Q=t=>{const{classes:o,variant:i,color:a,disableShrink:e}=t,c={root:["root",i,`color${u(a)}`],svg:["svg"],circle:["circle",`circle${u(i)}`,e&&"circleDisableShrink"]};return G(c,A,o)},X=v("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,o)=>{const{ownerState:i}=t;return[o.root,o[i.variant],o[`color${u(i.color)}`]]}})(({ownerState:t,theme:o})=>r({display:"inline-block"},t.variant==="determinate"&&{transition:o.transitions.create("transform")},t.color!=="inherit"&&{color:(o.vars||o).palette[t.color].main}),({ownerState:t})=>t.variant==="indeterminate"&&U(S||(S=$`
      animation: ${0} 1.4s linear infinite;
    `),J)),Y=v("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,o)=>o.svg})({display:"block"}),w=v("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,o)=>{const{ownerState:i}=t;return[o.circle,o[`circle${u(i.variant)}`],i.disableShrink&&o.circleDisableShrink]}})(({ownerState:t,theme:o})=>r({stroke:"currentColor"},t.variant==="determinate"&&{transition:o.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&U(E||(E=$`
      animation: ${0} 1.4s ease-in-out infinite;
    `),O)),oo=L.exports.forwardRef(function(o,i){const a=N({props:o,name:"MuiCircularProgress"}),{className:e,color:c="primary",disableShrink:C=!1,size:l=40,style:I,thickness:p=3.6,value:m=0,variant:P="indeterminate"}=a,x=z(a,H),d=r({},a,{color:c,disableShrink:C,size:l,thickness:p,value:m,variant:P}),n=Q(d),f={},y={},k={};if(P==="determinate"){const b=2*Math.PI*((g-p)/2);f.strokeDasharray=b.toFixed(3),k["aria-valuenow"]=Math.round(m),f.strokeDashoffset=`${((100-m)/100*b).toFixed(3)}px`,y.transform="rotate(-90deg)"}return h(X,r({className:j(n.root,e),style:r({width:l,height:l},y,I),ownerState:d,ref:i,role:"progressbar"},k,x,{children:h(Y,{className:n.svg,ownerState:d,viewBox:`${g/2} ${g/2} ${g} ${g}`,children:h(w,{className:n.circle,style:f,ownerState:d,cx:g,cy:g,r:(g-p)/2,fill:"none",strokeWidth:p})})}))}),to=oo;function io(t){return V("MuiLoadingButton",t)}const ao=T("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),s=ao,ro=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],no=t=>{const{loading:o,loadingPosition:i,classes:a}=t,e={root:["root",o&&"loading"],startIcon:[o&&`startIconLoading${u(i)}`],endIcon:[o&&`endIconLoading${u(i)}`],loadingIndicator:["loadingIndicator",o&&`loadingIndicator${u(i)}`]},c=Z(e,io,a);return r({},a,c)},so=t=>t!=="ownerState"&&t!=="theme"&&t!=="sx"&&t!=="as"&&t!=="classes",eo=v(K,{shouldForwardProp:t=>so(t)||t==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(t,o)=>[o.root,o.startIconLoadingStart&&{[`& .${s.startIconLoadingStart}`]:o.startIconLoadingStart},o.endIconLoadingEnd&&{[`& .${s.endIconLoadingEnd}`]:o.endIconLoadingEnd}]})(({ownerState:t,theme:o})=>r({[`& .${s.startIconLoadingStart}, & .${s.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0}},t.loadingPosition==="center"&&{transition:o.transitions.create(["background-color","box-shadow","border-color"],{duration:o.transitions.duration.short}),[`&.${s.loading}`]:{color:"transparent"}},t.loadingPosition==="start"&&t.fullWidth&&{[`& .${s.startIconLoadingStart}, & .${s.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginRight:-8}},t.loadingPosition==="end"&&t.fullWidth&&{[`& .${s.startIconLoadingStart}, & .${s.endIconLoadingEnd}`]:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0,marginLeft:-8}})),_=v("div",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(t,o)=>{const{ownerState:i}=t;return[o.loadingIndicator,o[`loadingIndicator${u(i.loadingPosition)}`]]}})(({theme:t,ownerState:o})=>r({position:"absolute",visibility:"visible",display:"flex"},o.loadingPosition==="start"&&(o.variant==="outlined"||o.variant==="contained")&&{left:o.size==="small"?10:14},o.loadingPosition==="start"&&o.variant==="text"&&{left:6},o.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:t.palette.action.disabled},o.loadingPosition==="end"&&(o.variant==="outlined"||o.variant==="contained")&&{right:o.size==="small"?10:14},o.loadingPosition==="end"&&o.variant==="text"&&{right:6},o.loadingPosition==="start"&&o.fullWidth&&{position:"relative",left:-10},o.loadingPosition==="end"&&o.fullWidth&&{position:"relative",right:-10})),co=L.exports.forwardRef(function(o,i){const a=N({props:o,name:"MuiLoadingButton"}),{children:e,disabled:c=!1,id:C,loading:l=!1,loadingIndicator:I,loadingPosition:p="center",variant:m="text"}=a,P=z(a,ro),x=q(C),d=I!=null?I:h(to,{"aria-labelledby":x,color:"inherit",size:16}),n=r({},a,{disabled:c,loading:l,loadingIndicator:d,loadingPosition:p,variant:m}),f=no(n);return h(eo,r({disabled:c||l,id:x,ref:i},P,{variant:m,classes:f,ownerState:n,children:n.loadingPosition==="end"?B(L.exports.Fragment,{children:[e,l&&h(_,{className:f.loadingIndicator,ownerState:n,children:d})]}):B(L.exports.Fragment,{children:[l&&h(_,{className:f.loadingIndicator,ownerState:n,children:d}),e]})}))}),fo=co;export{fo as L};
