email-builder-online 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs
CHANGED
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
animation: ${0} 1.4s linear infinite;
|
|
100
100
|
`),PX)),BX=Re("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),UX=Re("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.circle,e[`circle${Ne(n.variant)}`],n.disableShrink&&e.circleDisableShrink]}})(({ownerState:t,theme:e})=>I({stroke:"currentColor"},t.variant==="determinate"&&{transition:e.transitions.create("stroke-dashoffset")},t.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink&&Xb(H2||(H2=gy`
|
|
101
101
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
102
|
-
`),LX)),Zs=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate"}=r,p=Be(r,OX),m=I({},r,{color:a,disableShrink:s,size:o,thickness:c,value:u,variant:d}),h=MX(m),g={},_={},b={};if(d==="determinate"){const y=2*Math.PI*((dl-c)/2);g.strokeDasharray=y.toFixed(3),b["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*y).toFixed(3)}px`,_.transform="rotate(-90deg)"}return f.jsx(FX,I({className:$e(h.root,i),style:I({width:o,height:o},_,l),ownerState:m,ref:n,role:"progressbar"},b,p,{children:f.jsx(BX,{className:h.svg,ownerState:m,viewBox:`${dl/2} ${dl/2} ${dl} ${dl}`,children:f.jsx(UX,{className:h.circle,style:g,ownerState:m,cx:dl,cy:dl,r:(dl-c)/2,fill:"none",strokeWidth:c})})}))});function V2(t){return t.substring(2).toLowerCase()}function $X(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function zX(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=t,s=P.useRef(!1),o=P.useRef(null),l=P.useRef(!1),c=P.useRef(!1);P.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=er(hu(e),o),d=$r(h=>{const g=c.current;c.current=!1;const _=hr(o.current);if(!l.current||!o.current||"clientX"in h&&$X(h,_))return;if(s.current){s.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(o.current)>-1:b=!_.documentElement.contains(h.target)||o.current.contains(h.target),!b&&(n||!g)&&i(h)}),p=h=>g=>{c.current=!0;const _=e.props[h];_&&_(g)},m={ref:u};return a!==!1&&(m[a]=p(a)),P.useEffect(()=>{if(a!==!1){const h=V2(a),g=hr(o.current),_=()=>{s.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",_),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",_)}}},[d,a]),r!==!1&&(m[r]=p(r)),P.useEffect(()=>{if(r!==!1){const h=V2(r),g=hr(o.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),f.jsx(P.Fragment,{children:P.cloneElement(e,m)})}const Rm=EW({createStyledComponent:Re("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${Ne(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Dt({props:t,name:"MuiContainer"})}),qX=(t,e)=>I({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),GX=t=>I({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),jX=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,o])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=o.palette)==null?void 0:l.mode}});let i=I({html:qX(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:I({margin:0},GX(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const a=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return a&&(i=[i,a]),i};function d6(t){const e=Dt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return f.jsxs(P.Fragment,{children:[f.jsx(Fk,{styles:i=>jX(i,r)}),n]})}function HX(t){const e=hr(t);return e.body===t?Lo(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Xf(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function W2(t){return parseInt(Lo(t).getComputedStyle(t).paddingRight,10)||0}function VX(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function Y2(t,e,n,r,i){const a=[e,n,...r];[].forEach.call(t.children,s=>{const o=a.indexOf(s)===-1,l=!VX(s);o&&l&&Xf(s,i)})}function Pv(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function WX(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(HX(r)){const s=F4(hr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${W2(r)+s}px`;const o=hr(r).querySelectorAll(".mui-fixed");[].forEach.call(o,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${W2(l)+s}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=hr(r).body;else{const s=r.parentElement,o=Lo(r);a=s?.nodeName==="HTML"&&o.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:s,property:o})=>{a?s.style.setProperty(o,a):s.style.removeProperty(o)})}}function YX(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class KX{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Xf(e.modalRef,!1);const i=YX(n);Y2(n,e.mount,e.modalRef,i,!0);const a=Pv(this.containers,s=>s.container===n);return a!==-1?(this.containers[a].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=Pv(this.containers,a=>a.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=WX(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=Pv(this.containers,s=>s.modals.indexOf(e)!==-1),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(e),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),e.modalRef&&Xf(e.modalRef,n),Y2(a.container,e.mount,e.modalRef,a.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&Xf(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const QX=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function XX(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function ZX(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function JX(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||ZX(t))}function eZ(t){const e=[],n=[];return Array.from(t.querySelectorAll(QX)).forEach((r,i)=>{const a=XX(r);a===-1||!JX(r)||(a===0?e.push(r):n.push({documentOrder:i,tabIndex:a,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function tZ(){return!0}function nZ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=eZ,isEnabled:s=tZ,open:o}=t,l=P.useRef(!1),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=P.useRef(null),m=P.useRef(!1),h=P.useRef(null),g=er(hu(e),h),_=P.useRef(null);P.useEffect(()=>{!o||!h.current||(m.current=!n)},[n,o]),P.useEffect(()=>{if(!o||!h.current)return;const v=hr(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[o]),P.useEffect(()=>{if(!o||!h.current)return;const v=hr(h.current),E=x=>{_.current=x,!(r||!s()||x.key!=="Tab")&&v.activeElement===h.current&&x.shiftKey&&(l.current=!0,u.current&&u.current.focus())},S=()=>{const x=h.current;if(x===null)return;if(!v.hasFocus()||!s()||l.current){l.current=!1;return}if(x.contains(v.activeElement)||r&&v.activeElement!==c.current&&v.activeElement!==u.current)return;if(v.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let w=[];if((v.activeElement===c.current||v.activeElement===u.current)&&(w=a(h.current)),w.length>0){var N,R;const T=!!((N=_.current)!=null&&N.shiftKey&&((R=_.current)==null?void 0:R.key)==="Tab"),B=w[0],A=w[w.length-1];typeof B!="string"&&typeof A!="string"&&(T?A.focus():B.focus())}else x.focus()};v.addEventListener("focusin",S),v.addEventListener("keydown",E,!0);const k=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(k),v.removeEventListener("focusin",S),v.removeEventListener("keydown",E,!0)}},[n,r,i,s,o,a]);const b=v=>{d.current===null&&(d.current=v.relatedTarget),m.current=!0,p.current=v.target;const E=e.props.onFocus;E&&E(v)},y=v=>{d.current===null&&(d.current=v.relatedTarget),m.current=!0};return f.jsxs(P.Fragment,{children:[f.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:g,onFocus:b}),f.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}function rZ(t){return typeof t=="function"?t():t}function iZ(t){return t?t.props.hasOwnProperty("in"):!1}const aZ=new KX;function sZ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=aZ,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:o,children:l,onClose:c,open:u,rootRef:d}=t,p=P.useRef({}),m=P.useRef(null),h=P.useRef(null),g=er(h,d),[_,b]=P.useState(!u),y=iZ(l);let v=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(v=!1);const E=()=>hr(m.current),S=()=>(p.current.modalRef=h.current,p.current.mount=m.current,p.current),k=()=>{i.mount(S(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},x=$r(()=>{const O=rZ(e)||E().body;i.add(S(),O),h.current&&k()}),w=P.useCallback(()=>i.isTopModal(S()),[i]),N=$r(O=>{m.current=O,O&&(u&&w()?k():h.current&&Xf(h.current,v))}),R=P.useCallback(()=>{i.remove(S(),v)},[v,i]);P.useEffect(()=>()=>{R()},[R]),P.useEffect(()=>{u?x():(!y||!a)&&R()},[u,R,y,a,x]);const T=O=>$=>{var z;(z=O.onKeyDown)==null||z.call(O,$),!($.key!=="Escape"||$.which===229||!w())&&(n||($.stopPropagation(),c&&c($,"escapeKeyDown")))},B=O=>$=>{var z;(z=O.onClick)==null||z.call(O,$),$.target===$.currentTarget&&c&&c($,"backdropClick")};return{getRootProps:(O={})=>{const $=zc(t);delete $.onTransitionEnter,delete $.onTransitionExited;const z=I({},$,O);return I({role:"presentation"},z,{onKeyDown:T(z),ref:g})},getBackdropProps:(O={})=>{const $=O;return I({"aria-hidden":!0},$,{onClick:B($),open:u})},getTransitionProps:()=>{const O=()=>{b(!1),s&&s()},$=()=>{b(!0),o&&o(),a&&R()};return{onEnter:t2(O,l?.props.onEnter),onExited:t2($,l?.props.onExited)}},rootRef:g,portalRef:N,isTopModal:w,exited:_,hasTransition:y}}function oZ(t){return wt("MuiModal",t)}Nt("MuiModal",["root","hidden","backdrop"]);const lZ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],cZ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},oZ,r)},uZ=Re("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>I({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),dZ=Re(c6,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),p6=P.forwardRef(function(e,n){var r,i,a,s,o,l;const c=Dt({name:"MuiModal",props:e}),{BackdropComponent:u=dZ,BackdropProps:d,className:p,closeAfterTransition:m=!1,children:h,container:g,component:_,components:b={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:S=!1,disablePortal:k=!1,disableRestoreFocus:x=!1,disableScrollLock:w=!1,hideBackdrop:N=!1,keepMounted:R=!1,onBackdropClick:T,open:B,slotProps:A,slots:L}=c,M=Be(c,lZ),O=I({},c,{closeAfterTransition:m,disableAutoFocus:v,disableEnforceFocus:E,disableEscapeKeyDown:S,disablePortal:k,disableRestoreFocus:x,disableScrollLock:w,hideBackdrop:N,keepMounted:R}),{getRootProps:$,getBackdropProps:z,getTransitionProps:X,portalRef:W,isTopModal:te,exited:pe,hasTransition:ye}=sZ(I({},O,{rootRef:n})),ae=I({},O,{exited:pe}),oe=cZ(ae),le={};if(h.props.tabIndex===void 0&&(le.tabIndex="-1"),ye){const{onEnter:he,onExited:Ee}=X();le.onEnter=he,le.onExited=Ee}const H=(r=(i=L?.root)!=null?i:b.Root)!=null?r:uZ,Z=(a=(s=L?.backdrop)!=null?s:b.Backdrop)!=null?a:u,ee=(o=A?.root)!=null?o:y.root,se=(l=A?.backdrop)!=null?l:y.backdrop,ie=Nr({elementType:H,externalSlotProps:ee,externalForwardedProps:M,getSlotProps:$,additionalProps:{ref:n,as:_},ownerState:ae,className:$e(p,ee?.className,oe?.root,!ae.open&&ae.exited&&oe?.hidden)}),ve=Nr({elementType:Z,externalSlotProps:se,additionalProps:d,getSlotProps:he=>z(I({},he,{onClick:Ee=>{T&&T(Ee),he!=null&&he.onClick&&he.onClick(Ee)}})),className:$e(se?.className,d?.className,oe?.backdrop),ownerState:ae});return!R&&!B&&(!ye||pe)?null:f.jsx(o6,{ref:W,container:g,disablePortal:k,children:f.jsxs(H,I({},ie,{children:[!N&&u?f.jsx(Z,I({},ve)):null,f.jsx(nZ,{disableEnforceFocus:E,disableAutoFocus:v,disableRestoreFocus:x,isEnabled:te,open:B,children:P.cloneElement(h,le)})]}))})});function pZ(t){return wt("MuiDialog",t)}const Lv=Nt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),f6=P.createContext({}),fZ=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],mZ=Re(c6,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),hZ=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=t,s={root:["root"],container:["container",`scroll${Ne(n)}`],paper:["paper",`paperScroll${Ne(n)}`,`paperWidth${Ne(String(r))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return Rt(s,pZ,e)},gZ=Re(p6,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),_Z=Re("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Ne(n.scroll)}`]]}})(({ownerState:t})=>I({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),bZ=Re(gu,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Ne(n.scroll)}`],e[`paperWidth${Ne(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>I({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${Lv.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${Lv.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Lv.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),yZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialog"}),i=kr(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":o,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:_,onClick:b,onClose:y,open:v,PaperComponent:E=gu,PaperProps:S={},scroll:k="paper",TransitionComponent:x=Uk,transitionDuration:w=a,TransitionProps:N}=r,R=Be(r,fZ),T=I({},r,{disableEscapeKeyDown:p,fullScreen:m,fullWidth:h,maxWidth:g,scroll:k}),B=hZ(T),A=P.useRef(),L=z=>{A.current=z.target===z.currentTarget},M=z=>{b&&b(z),A.current&&(A.current=null,_&&_(z),y&&y(z,"backdropClick"))},O=Eh(o),$=P.useMemo(()=>({titleId:O}),[O]);return f.jsx(gZ,I({className:$e(B.root,d),closeAfterTransition:!0,components:{Backdrop:mZ},componentsProps:{backdrop:I({transitionDuration:w,as:l},c)},disableEscapeKeyDown:p,onClose:y,open:v,ref:n,onClick:M,ownerState:T},R,{children:f.jsx(x,I({appear:!0,in:v,timeout:w,role:"presentation"},N,{children:f.jsx(_Z,{className:$e(B.container),onMouseDown:L,ownerState:T,children:f.jsx(bZ,I({as:E,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":O},S,{className:$e(B.paper,S.className),ownerState:T,children:f.jsx(f6.Provider,{value:$,children:u})}))})}))}))});function vZ(t){return wt("MuiDialogActions",t)}Nt("MuiDialogActions",["root","spacing"]);const EZ=["className","disableSpacing"],SZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},vZ,e)},TZ=Re("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>I({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),CZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:a=!1}=r,s=Be(r,EZ),o=I({},r,{disableSpacing:a}),l=SZ(o);return f.jsx(TZ,I({className:$e(l.root,i),ownerState:o,ref:n},s))});function xZ(t){return wt("MuiDialogContent",t)}Nt("MuiDialogContent",["root","dividers"]);function kZ(t){return wt("MuiDialogTitle",t)}const wZ=Nt("MuiDialogTitle",["root"]),DZ=["className","dividers"],AZ=t=>{const{classes:e,dividers:n}=t;return Rt({root:["root",n&&"dividers"]},xZ,e)},NZ=Re("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>I({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${wZ.root} + &`]:{paddingTop:0}})),RZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogContent"}),{className:i,dividers:a=!1}=r,s=Be(r,DZ),o=I({},r,{dividers:a}),l=AZ(o);return f.jsx(NZ,I({className:$e(l.root,i),ownerState:o,ref:n},s))});function IZ(t){return wt("MuiDialogContentText",t)}Nt("MuiDialogContentText",["root"]);const OZ=["children","className"],PZ=t=>{const{classes:e}=t,r=Rt({root:["root"]},IZ,e);return I({},e,r)},LZ=Re(mr,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),MZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogContentText"}),{className:i}=r,a=Be(r,OZ),s=PZ(a);return f.jsx(LZ,I({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:a,className:$e(s.root,i)},r,{classes:s}))}),FZ=["className","id"],BZ=t=>{const{classes:e}=t;return Rt({root:["root"]},kZ,e)},UZ=Re(mr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),$Z=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogTitle"}),{className:i,id:a}=r,s=Be(r,FZ),o=r,l=BZ(o),{titleId:c=a}=P.useContext(f6);return f.jsx(UZ,I({component:"h2",className:$e(l.root,i),ownerState:o,ref:n,variant:"h6",id:a??c},s))});function zZ(t){return wt("MuiDivider",t)}const K2=Nt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),qZ=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],GZ=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:a,orientation:s,textAlign:o,variant:l}=t;return Rt({root:["root",e&&"absolute",l,a&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",o==="right"&&s!=="vertical"&&"textAlignRight",o==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},zZ,r)},jZ=Re("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>I({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:zt.alpha(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>I({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>I({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),HZ=Re("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>I({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),Fo=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDivider"}),{absolute:i=!1,children:a,className:s,component:o=a?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=o!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth"}=r,h=Be(r,qZ),g=I({},r,{absolute:i,component:o,flexItem:l,light:c,orientation:u,role:d,textAlign:p,variant:m}),_=GZ(g);return f.jsx(jZ,I({as:o,className:$e(_.root,s),role:d,ref:n,ownerState:g},h,{children:a?f.jsx(HZ,{className:_.wrapper,ownerState:g,children:a}):null}))});Fo.muiSkipListHighlight=!0;const VZ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],WZ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},nX,e);return I({},e,i)},YZ=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...py(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return I({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},[`&.${_c.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},[`&.${_c.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:o}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_c.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_c.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_c.disabled}, .${_c.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${_c.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&I({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),KZ=Re(hy,{name:"MuiFilledInput",slot:"Input",overridesResolver:fy})(({theme:t,ownerState:e})=>I({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),$k=P.forwardRef(function(e,n){var r,i,a,s;const o=Dt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:m,slots:h={},type:g="text"}=o,_=Be(o,VZ),b=I({},o,{fullWidth:u,inputComponent:d,multiline:p,type:g}),y=WZ(o),v={root:{ownerState:b},input:{ownerState:b}},E=m??c?Ci(v,m??c):v,S=(r=(i=h.root)!=null?i:l.Root)!=null?r:YZ,k=(a=(s=h.input)!=null?s:l.Input)!=null?a:KZ;return f.jsx(Bk,I({slots:{root:S,input:k},componentsProps:E,fullWidth:u,inputComponent:d,multiline:p,ref:n,type:g},_,{classes:y}))});$k.muiName="Input";function QZ(t){return wt("MuiFormControl",t)}Nt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const XZ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ZZ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${Ne(n)}`,r&&"fullWidth"]};return Rt(i,QZ,e)},JZ=Re("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,e[`margin${Ne(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>I({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),eJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormControl"}),{children:i,className:a,color:s="primary",component:o="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:m="none",required:h=!1,size:g="medium",variant:_="outlined"}=r,b=Be(r,XZ),y=I({},r,{color:s,component:o,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:m,required:h,size:g,variant:_}),v=ZZ(y),[E,S]=P.useState(()=>{let A=!1;return i&&P.Children.forEach(i,L=>{if(!Dv(L,["Input","Select"]))return;const M=Dv(L,["Select"])?L.props.input:L;M&&KQ(M.props)&&(A=!0)}),A}),[k,x]=P.useState(()=>{let A=!1;return i&&P.Children.forEach(i,L=>{Dv(L,["Input","Select"])&&(J_(L.props,!0)||J_(L.props.inputProps,!0))&&(A=!0)}),A}),[w,N]=P.useState(!1);l&&w&&N(!1);const R=u!==void 0&&!l?u:w;let T;const B=P.useMemo(()=>({adornedStart:E,setAdornedStart:S,color:s,disabled:l,error:c,filled:k,focused:R,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{N(!1)},onEmpty:()=>{x(!1)},onFilled:()=>{x(!0)},onFocus:()=>{N(!0)},registerEffect:T,required:h,variant:_}),[E,s,l,c,k,R,d,p,T,h,g,_]);return f.jsx(Mk.Provider,{value:B,children:f.jsx(JZ,I({as:o,ownerState:y,className:$e(v.root,a),ref:n},b,{children:i}))})}),Fn=AW({createStyledComponent:Re("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Dt({props:t,name:"MuiStack"})});function tJ(t){return wt("MuiFormHelperText",t)}const Q2=Nt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var X2;const nJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],rJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:a,filled:s,focused:o,required:l}=t,c={root:["root",i&&"disabled",a&&"error",r&&`size${Ne(r)}`,n&&"contained",o&&"focused",s&&"filled",l&&"required"]};return Rt(c,tJ,e)},iJ=Re("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Ne(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Q2.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Q2.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),aJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormHelperText"}),{children:i,className:a,component:s="p"}=r,o=Be(r,nJ),l=Rp(),c=Np({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=I({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=rJ(u);return f.jsx(iJ,I({as:s,ownerState:u,className:$e(d.root,a),ref:n},o,{children:i===" "?X2||(X2=f.jsx("span",{className:"notranslate",children:""})):i}))});function sJ(t){return wt("MuiFormLabel",t)}const Zf=Nt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),oJ=["children","className","color","component","disabled","error","filled","focused","required"],lJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:a,filled:s,required:o}=t,l={root:["root",`color${Ne(n)}`,i&&"disabled",a&&"error",s&&"filled",r&&"focused",o&&"required"],asterisk:["asterisk",a&&"error"]};return Rt(l,sJ,e)},cJ=Re("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Zf.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Zf.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Zf.error}`]:{color:(t.vars||t).palette.error.main}})),uJ=Re("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Zf.error}`]:{color:(t.vars||t).palette.error.main}})),dJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormLabel"}),{children:i,className:a,component:s="label"}=r,o=Be(r,oJ),l=Rp(),c=Np({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=I({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=lJ(u);return f.jsxs(cJ,I({as:s,ownerState:u,className:$e(d.root,a),ref:n},o,{children:[i,c.required&&f.jsxs(uJ,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),pJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function DC(t){return`scale(${t}, ${t**2})`}const fJ={entering:{opacity:1,transform:DC(1)},entered:{opacity:1,transform:"none"}},Mv=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Im=P.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:a,easing:s,in:o,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:m,style:h,timeout:g="auto",TransitionComponent:_=Es}=e,b=Be(e,pJ),y=Dl(),v=P.useRef(),E=kr(),S=P.useRef(null),k=er(S,hu(a),n),x=M=>O=>{if(M){const $=S.current;O===void 0?M($):M($,O)}},w=x(u),N=x((M,O)=>{Q4(M);const{duration:$,delay:z,easing:X}=Kd({style:h,timeout:g,easing:s},{mode:"enter"});let W;g==="auto"?(W=E.transitions.getAutoHeightDuration(M.clientHeight),v.current=W):W=$,M.style.transition=[E.transitions.create("opacity",{duration:W,delay:z}),E.transitions.create("transform",{duration:Mv?W:W*.666,delay:z,easing:X})].join(","),l&&l(M,O)}),R=x(c),T=x(m),B=x(M=>{const{duration:O,delay:$,easing:z}=Kd({style:h,timeout:g,easing:s},{mode:"exit"});let X;g==="auto"?(X=E.transitions.getAutoHeightDuration(M.clientHeight),v.current=X):X=O,M.style.transition=[E.transitions.create("opacity",{duration:X,delay:$}),E.transitions.create("transform",{duration:Mv?X:X*.666,delay:Mv?$:$||X*.333,easing:z})].join(","),M.style.opacity=0,M.style.transform=DC(.75),d&&d(M)}),A=x(p),L=M=>{g==="auto"&&y.start(v.current||0,M),r&&r(S.current,M)};return f.jsx(_,I({appear:i,in:o,nodeRef:S,onEnter:N,onEntered:R,onEntering:w,onExit:B,onExited:A,onExiting:T,addEndListener:L,timeout:g==="auto"?null:g},b,{children:(M,O)=>P.cloneElement(a,I({style:I({opacity:0,transform:DC(.75),visibility:M==="exited"&&!o?"hidden":void 0},fJ[M],h,a.props.style),ref:k},O))}))});Im.muiSupportAuto=!0;const mJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],hJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},eX,e);return I({},e,i)},gJ=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...py(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),I({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${rf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${rf.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${rf.disabled}, .${rf.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${rf.disabled}:before`]:{borderBottomStyle:"dotted"}})}),_J=Re(hy,{name:"MuiInput",slot:"Input",overridesResolver:fy})({}),zk=P.forwardRef(function(e,n){var r,i,a,s;const o=Dt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:p="input",multiline:m=!1,slotProps:h,slots:g={},type:_="text"}=o,b=Be(o,mJ),y=hJ(o),E={root:{ownerState:{disableUnderline:l}}},S=h??u?Ci(h??u,E):E,k=(r=(i=g.root)!=null?i:c.Root)!=null?r:gJ,x=(a=(s=g.input)!=null?s:c.Input)!=null?a:_J;return f.jsx(Bk,I({slots:{root:k,input:x},slotProps:S,fullWidth:d,inputComponent:p,multiline:m,ref:n,type:_},b,{classes:y}))});zk.muiName="Input";function bJ(t){return wt("MuiInputLabel",t)}Nt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const yJ=["disableAnimation","margin","shrink","variant","className"],vJ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:a,variant:s,required:o}=t,l={root:["root",n&&"formControl",!a&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Ne(r)}`,s],asterisk:[o&&"asterisk"]},c=Rt(l,bJ,e);return I({},e,c)},EJ=Re(dJ,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Zf.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>I({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&I({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&I({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&I({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),SJ=P.forwardRef(function(e,n){const r=Dt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:a,className:s}=r,o=Be(r,yJ),l=Rp();let c=a;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Np({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=I({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),p=vJ(d);return f.jsx(EJ,I({"data-shrink":c,ownerState:d,ref:n,className:$e(p.root,s)},o,{classes:p}))});function TJ(t){return wt("MuiLink",t)}const CJ=Nt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),m6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},xJ=t=>m6[t]||t,kJ=({theme:t,ownerState:e})=>{const n=xJ(e.color),r=Wd(t,`palette.${n}`,!1)||e.color,i=Wd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:zt.alpha(r,.4)},wJ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],DJ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,a={root:["root",`underline${Ne(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(a,TJ,e)},AJ=Re(mr,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${Ne(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>I({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&I({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:kJ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${CJ.focusVisible}`]:{outline:"auto"}})),NJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiLink"}),{className:i,color:a="primary",component:s="a",onBlur:o,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,m=Be(r,wJ),{isFocusVisibleRef:h,onBlur:g,onFocus:_,ref:b}=ly(),[y,v]=P.useState(!1),E=er(n,b),S=N=>{g(N),h.current===!1&&v(!1),o&&o(N)},k=N=>{_(N),h.current===!0&&v(!0),l&&l(N)},x=I({},r,{color:a,component:s,focusVisible:y,underline:u,variant:d}),w=DJ(x);return f.jsx(AJ,I({color:a,className:$e(w.root,i),classes:c,component:s,onBlur:S,onFocus:k,ref:E,ownerState:x,variant:d,sx:[...Object.keys(m6).includes(a)?[]:[{color:a}],...Array.isArray(p)?p:[p]]},m))}),Zc=P.createContext({});function RJ(t){return wt("MuiList",t)}Nt("MuiList",["root","padding","dense","subheader"]);const IJ=["children","className","component","dense","disablePadding","subheader"],OJ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},RJ,e)},PJ=Re("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>I({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Om=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiList"}),{children:i,className:a,component:s="ul",dense:o=!1,disablePadding:l=!1,subheader:c}=r,u=Be(r,IJ),d=P.useMemo(()=>({dense:o}),[o]),p=I({},r,{component:s,dense:o,disablePadding:l}),m=OJ(p);return f.jsx(Zc.Provider,{value:d,children:f.jsxs(PJ,I({as:s,className:$e(m.root,a),ref:n,ownerState:p},u,{children:[c,i]}))})});function LJ(t){return wt("MuiListItemButton",t)}const af=Nt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),MJ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],FJ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},BJ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:a,divider:s,selected:o}=t,c=Rt({root:["root",r&&"dense",!a&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",o&&"selected"]},LJ,n);return I({},n,c)},UJ=Re(Oa,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:FJ})(({theme:t,ownerState:e})=>I({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${af.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${af.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${af.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${af.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${af.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),eb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:a=!1,component:s="div",children:o,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:m}=r,h=Be(r,MJ),g=P.useContext(Zc),_=P.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=P.useRef(null);zi(()=>{a&&b.current&&b.current.focus()},[a]);const y=I({},r,{alignItems:i,dense:_.dense,disableGutters:c,divider:u,selected:p}),v=BJ(y),E=er(b,n);return f.jsx(Zc.Provider,{value:_,children:f.jsx(UJ,I({ref:E,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:$e(v.focusVisible,d),ownerState:y,className:$e(v.root,m)},h,{classes:v,children:o}))})});function $J(t){return wt("MuiListItemIcon",t)}const Z2=Nt("MuiListItemIcon",["root","alignItemsFlexStart"]),zJ=["className"],qJ=t=>{const{alignItems:e,classes:n}=t;return Rt({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},$J,n)},GJ=Re("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>I({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),tb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemIcon"}),{className:i}=r,a=Be(r,zJ),s=P.useContext(Zc),o=I({},r,{alignItems:s.alignItems}),l=qJ(o);return f.jsx(GJ,I({className:$e(l.root,i),ownerState:o,ref:n},a))});function jJ(t){return wt("MuiListItemText",t)}const nb=Nt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),HJ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],VJ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:a}=t;return Rt({root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},jJ,e)},WJ=Re("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nb.primary}`]:e.primary},{[`& .${nb.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>I({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),rb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemText"}),{children:i,className:a,disableTypography:s=!1,inset:o=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,p=Be(r,HJ),{dense:m}=P.useContext(Zc);let h=l??i,g=u;const _=I({},r,{disableTypography:s,inset:o,primary:!!h,secondary:!!g,dense:m}),b=VJ(_);return h!=null&&h.type!==mr&&!s&&(h=f.jsx(mr,I({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==mr&&!s&&(g=f.jsx(mr,I({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),f.jsxs(WJ,I({className:$e(b.root,a),ownerState:_,ref:n},p,{children:[h,g]}))}),YJ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Fv(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function J2(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function h6(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function sf(t,e,n,r,i,a){let s=!1,o=i(t,e,e?n:!1);for(;o;){if(o===t.firstChild){if(s)return!1;s=!0}const l=r?!1:o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||!h6(o,a)||l)o=i(t,o,n);else return o.focus(),!0}return!1}const KJ=P.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:a=!1,children:s,className:o,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=Be(e,YJ),m=P.useRef(null),h=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});zi(()=>{i&&m.current.focus()},[i]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:E})=>{const S=!m.current.style.width;if(v.clientHeight<m.current.clientHeight&&S){const k=`${F4(hr(v))}px`;m.current.style[E==="rtl"?"paddingLeft":"paddingRight"]=k,m.current.style.width=`calc(100% + ${k})`}return m.current}}),[]);const g=v=>{const E=m.current,S=v.key,k=hr(E).activeElement;if(S==="ArrowDown")v.preventDefault(),sf(E,k,c,l,Fv);else if(S==="ArrowUp")v.preventDefault(),sf(E,k,c,l,J2);else if(S==="Home")v.preventDefault(),sf(E,null,c,l,Fv);else if(S==="End")v.preventDefault(),sf(E,null,c,l,J2);else if(S.length===1){const x=h.current,w=S.toLowerCase(),N=performance.now();x.keys.length>0&&(N-x.lastTime>500?(x.keys=[],x.repeating=!0,x.previousKeyMatched=!0):x.repeating&&w!==x.keys[0]&&(x.repeating=!1)),x.lastTime=N,x.keys.push(w);const R=k&&!x.repeating&&h6(k,x);x.previousKeyMatched&&(R||sf(E,k,!1,l,Fv,x))?v.preventDefault():x.previousKeyMatched=!1}u&&u(v)},_=er(m,n);let b=-1;P.Children.forEach(s,(v,E)=>{if(!P.isValidElement(v)){b===E&&(b+=1,b>=s.length&&(b=-1));return}v.props.disabled||(d==="selectedMenu"&&v.props.selected||b===-1)&&(b=E),b===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const y=P.Children.map(s,(v,E)=>{if(E===b){const S={};return a&&(S.autoFocus=!0),v.props.tabIndex===void 0&&d==="selectedMenu"&&(S.tabIndex=0),P.cloneElement(v,S)}return v});return f.jsx(Om,I({role:"menu",ref:_,className:o,onKeyDown:g,tabIndex:i?0:-1},p,{children:y}))});function QJ(t){return wt("MuiPopover",t)}Nt("MuiPopover",["root","paper"]);const XJ=["onEntering"],ZJ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],JJ=["slotProps"];function eN(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function tN(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function nN(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Bv(t){return typeof t=="function"?t():t}const eee=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},QJ,e)},tee=Re(p6,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),g6=Re(gu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),es=P.forwardRef(function(e,n){var r,i,a;const s=Dt({props:e,name:"MuiPopover"}),{action:o,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:m,container:h,elevation:g=8,marginThreshold:_=16,open:b,PaperProps:y={},slots:v,slotProps:E,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:k=Im,transitionDuration:x="auto",TransitionProps:{onEntering:w}={},disableScrollLock:N=!1}=s,R=Be(s.TransitionProps,XJ),T=Be(s,ZJ),B=(r=E?.paper)!=null?r:y,A=P.useRef(),L=er(A,B.ref),M=I({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:_,externalPaperSlotProps:B,transformOrigin:S,TransitionComponent:k,transitionDuration:x,TransitionProps:R}),O=eee(M),$=P.useCallback(()=>{if(d==="anchorPosition")return u;const he=Bv(l),De=(he&&he.nodeType===1?he:hr(A.current).body).getBoundingClientRect();return{top:De.top+eN(De,c.vertical),left:De.left+tN(De,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),z=P.useCallback(he=>({vertical:eN(he,S.vertical),horizontal:tN(he,S.horizontal)}),[S.horizontal,S.vertical]),X=P.useCallback(he=>{const Ee={width:he.offsetWidth,height:he.offsetHeight},De=z(Ee);if(d==="none")return{top:null,left:null,transformOrigin:nN(De)};const ft=$();let yt=ft.top-De.vertical,mt=ft.left-De.horizontal;const nn=yt+Ee.height,tt=mt+Ee.width,dt=Lo(Bv(l)),on=dt.innerHeight-_,qt=dt.innerWidth-_;if(_!==null&&yt<_){const st=yt-_;yt-=st,De.vertical+=st}else if(_!==null&&nn>on){const st=nn-on;yt-=st,De.vertical+=st}if(_!==null&&mt<_){const st=mt-_;mt-=st,De.horizontal+=st}else if(tt>qt){const st=tt-qt;mt-=st,De.horizontal+=st}return{top:`${Math.round(yt)}px`,left:`${Math.round(mt)}px`,transformOrigin:nN(De)}},[l,d,$,z,_]),[W,te]=P.useState(b),pe=P.useCallback(()=>{const he=A.current;if(!he)return;const Ee=X(he);Ee.top!==null&&(he.style.top=Ee.top),Ee.left!==null&&(he.style.left=Ee.left),he.style.transformOrigin=Ee.transformOrigin,te(!0)},[X]);P.useEffect(()=>(N&&window.addEventListener("scroll",pe),()=>window.removeEventListener("scroll",pe)),[l,N,pe]);const ye=(he,Ee)=>{w&&w(he,Ee),pe()},ae=()=>{te(!1)};P.useEffect(()=>{b&&pe()}),P.useImperativeHandle(o,()=>b?{updatePosition:()=>{pe()}}:null,[b,pe]),P.useEffect(()=>{if(!b)return;const he=sy(()=>{pe()}),Ee=Lo(l);return Ee.addEventListener("resize",he),()=>{he.clear(),Ee.removeEventListener("resize",he)}},[l,b,pe]);let oe=x;x==="auto"&&!k.muiSupportAuto&&(oe=void 0);const le=h||(l?hr(Bv(l)).body:void 0),H=(i=v?.root)!=null?i:tee,Z=(a=v?.paper)!=null?a:g6,ee=Nr({elementType:Z,externalSlotProps:I({},B,{style:W?B.style:I({},B.style,{opacity:0})}),additionalProps:{elevation:g,ref:L},ownerState:M,className:$e(O.paper,B?.className)}),se=Nr({elementType:H,externalSlotProps:E?.root||{},externalForwardedProps:T,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:le,open:b},ownerState:M,className:$e(O.root,m)}),{slotProps:ie}=se,ve=Be(se,JJ);return f.jsx(H,I({},ve,!Rl(H)&&{slotProps:ie,disableScrollLock:N},{children:f.jsx(k,I({appear:!0,in:b,onEntering:ye,onExited:ae,timeout:oe},R,{children:f.jsx(Z,I({},ee,{children:p}))}))}))});function nee(t){return wt("MuiMenu",t)}Nt("MuiMenu",["root","paper","list"]);const ree=["onEntering"],iee=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],aee={vertical:"top",horizontal:"right"},see={vertical:"top",horizontal:"left"},oee=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},nee,e)},lee=Re(es,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),cee=Re(g6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),uee=Re(KJ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),qk=P.forwardRef(function(e,n){var r,i;const a=Dt({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:o,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:m={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:_}={},variant:b="selectedMenu",slots:y={},slotProps:v={}}=a,E=Be(a.TransitionProps,ree),S=Be(a,iee),k=Th(),x=I({},a,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:_,PaperProps:m,transitionDuration:g,TransitionProps:E,variant:b}),w=oee(x),N=s&&!c&&p,R=P.useRef(null),T=(z,X)=>{R.current&&R.current.adjustStyleForScrollbar(z,{direction:k?"rtl":"ltr"}),_&&_(z,X)},B=z=>{z.key==="Tab"&&(z.preventDefault(),d&&d(z,"tabKeyDown"))};let A=-1;P.Children.map(o,(z,X)=>{P.isValidElement(z)&&(z.props.disabled||(b==="selectedMenu"&&z.props.selected||A===-1)&&(A=X))});const L=(r=y.paper)!=null?r:cee,M=(i=v.paper)!=null?i:m,O=Nr({elementType:y.root,externalSlotProps:v.root,ownerState:x,className:[w.root,l]}),$=Nr({elementType:L,externalSlotProps:M,ownerState:x,className:w.paper});return f.jsx(lee,I({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?aee:see,slots:{paper:L,root:y.root},slotProps:{root:O,paper:$},open:p,ref:n,transitionDuration:g,TransitionProps:I({onEntering:T},E),ownerState:x},S,{classes:h,children:f.jsx(uee,I({onKeyDown:B,actions:R,autoFocus:s&&(A===-1||c),autoFocusItem:N,variant:b},u,{className:$e(w.list,u.className),children:o}))}))});function dee(t){return wt("MuiMenuItem",t)}const of=Nt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),pee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],fee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},mee=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:a,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",a&&"selected"]},dee,s);return I({},s,l)},hee=Re(Oa,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:fee})(({theme:t,ownerState:e})=>I({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${of.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${of.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${of.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${of.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${of.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${K2.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${K2.inset}`]:{marginLeft:52},[`& .${nb.root}`]:{marginTop:0,marginBottom:0},[`& .${nb.inset}`]:{paddingLeft:36},[`& .${Z2.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&I({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${Z2.root} svg`]:{fontSize:"1.25rem"}}))),ts=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:a="li",dense:s=!1,divider:o=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,m=Be(r,pee),h=P.useContext(Zc),g=P.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),_=P.useRef(null);zi(()=>{i&&_.current&&_.current.focus()},[i]);const b=I({},r,{dense:g.dense,divider:o,disableGutters:l}),y=mee(r),v=er(_,n);let E;return r.disabled||(E=d!==void 0?d:-1),f.jsx(Zc.Provider,{value:g,children:f.jsx(hee,I({ref:v,role:u,tabIndex:E,component:a,focusVisibleClassName:$e(y.focusVisible,c),className:$e(y.root,p)},m,{ownerState:b,classes:y}))})});function gee(t){return wt("MuiNativeSelect",t)}const Gk=Nt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),_ee=["className","disabled","error","IconComponent","inputRef","variant"],bee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:a,error:s}=t,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Ne(n)}`,a&&"iconOpen",r&&"disabled"]};return Rt(o,gee,e)},_6=({ownerState:t,theme:e})=>I({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":I({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Gk.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),yee=Re("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Hi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${Gk.multiple}`]:e.multiple}]}})(_6),b6=({ownerState:t,theme:e})=>I({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Gk.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),vee=Re("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ne(n.variant)}`],n.open&&e.iconOpen]}})(b6),Eee=P.forwardRef(function(e,n){const{className:r,disabled:i,error:a,IconComponent:s,inputRef:o,variant:l="standard"}=e,c=Be(e,_ee),u=I({},e,{disabled:i,variant:l,error:a}),d=bee(u);return f.jsxs(P.Fragment,{children:[f.jsx(yee,I({ownerState:u,className:$e(d.select,r),disabled:i,ref:o||n},c)),e.multiple?null:f.jsx(vee,{as:s,ownerState:u,className:d.icon})]})});var rN;const See=["children","classes","className","label","notched"],Tee=Re("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Hi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Cee=Re("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Hi})(({ownerState:t,theme:e})=>I({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&I({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function xee(t){const{className:e,label:n,notched:r}=t,i=Be(t,See),a=n!=null&&n!=="",s=I({},t,{notched:r,withLabel:a});return f.jsx(Tee,I({"aria-hidden":!0,className:e,ownerState:s},i,{children:f.jsx(Cee,{ownerState:s,children:a?f.jsx("span",{children:n}):rN||(rN=f.jsx("span",{className:"notranslate",children:""}))})}))}const kee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],wee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tX,e);return I({},e,r)},Dee=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:py})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return I({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${ul.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${ul.focused} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${ul.error} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${ul.disabled} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&I({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Aee=Re(xee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Nee=Re(hy,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:fy})(({theme:t,ownerState:e})=>I({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),jk=P.forwardRef(function(e,n){var r,i,a,s,o;const l=Dt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:m=!1,notched:h,slots:g={},type:_="text"}=l,b=Be(l,kee),y=wee(l),v=Rp(),E=Np({props:l,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=I({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:v,fullWidth:u,hiddenLabel:E.hiddenLabel,multiline:m,size:E.size,type:_}),k=(r=(i=g.root)!=null?i:c.Root)!=null?r:Dee,x=(a=(s=g.input)!=null?s:c.Input)!=null?a:Nee;return f.jsx(Bk,I({slots:{root:k,input:x},renderSuffix:w=>f.jsx(Aee,{ownerState:S,className:y.notchedOutline,label:p!=null&&p!==""&&E.required?o||(o=f.jsxs(P.Fragment,{children:[p," ","*"]})):p,notched:typeof h<"u"?h:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:_},b,{classes:I({},y,{notchedOutline:null})}))});jk.muiName="Input";function Ree(t){return wt("MuiSelect",t)}const lf=Nt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var iN;const Iee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Oee=Re("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${lf.select}`]:e.select},{[`&.${lf.select}`]:e[n.variant]},{[`&.${lf.error}`]:e.error},{[`&.${lf.multiple}`]:e.multiple}]}})(_6,{[`&.${lf.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Pee=Re("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ne(n.variant)}`],n.open&&e.iconOpen]}})(b6),Lee=Re("input",{shouldForwardProp:t=>cy(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function aN(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Mee(t){return t==null||typeof t=="string"&&!t.trim()}const Fee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:a,error:s}=t,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Ne(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(o,Ree,e)},Bee=P.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":a,autoFocus:s,autoWidth:o,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:m,error:h=!1,IconComponent:g,inputRef:_,labelId:b,MenuProps:y={},multiple:v,name:E,onBlur:S,onChange:k,onClose:x,onFocus:w,onOpen:N,open:R,readOnly:T,renderValue:B,SelectDisplayProps:A={},tabIndex:L,value:M,variant:O="standard"}=e,$=Be(e,Iee),[z,X]=Q_({controlled:M,default:d,name:"Select"}),[W,te]=Q_({controlled:R,default:u,name:"Select"}),pe=P.useRef(null),ye=P.useRef(null),[ae,oe]=P.useState(null),{current:le}=P.useRef(R!=null),[H,Z]=P.useState(),ee=er(n,_),se=P.useCallback(ke=>{ye.current=ke,ke&&oe(ke)},[]),ie=ae?.parentNode;P.useImperativeHandle(ee,()=>({focus:()=>{ye.current.focus()},node:pe.current,value:z}),[z]),P.useEffect(()=>{u&&W&&ae&&!le&&(Z(o?null:ie.clientWidth),ye.current.focus())},[ae,o]),P.useEffect(()=>{s&&ye.current.focus()},[s]),P.useEffect(()=>{if(!b)return;const ke=hr(ye.current).getElementById(b);if(ke){const lt=()=>{getSelection().isCollapsed&&ye.current.focus()};return ke.addEventListener("click",lt),()=>{ke.removeEventListener("click",lt)}}},[b]);const ve=(ke,lt)=>{ke?N&&N(lt):x&&x(lt),le||(Z(o?null:ie.clientWidth),te(ke))},he=ke=>{ke.button===0&&(ke.preventDefault(),ye.current.focus(),ve(!0,ke))},Ee=ke=>{ve(!1,ke)},De=P.Children.toArray(l),ft=ke=>{const lt=De.find(xe=>xe.props.value===ke.target.value);lt!==void 0&&(X(lt.props.value),k&&k(ke,lt))},yt=ke=>lt=>{let xe;if(lt.currentTarget.hasAttribute("tabindex")){if(v){xe=Array.isArray(z)?z.slice():[];const we=z.indexOf(ke.props.value);we===-1?xe.push(ke.props.value):xe.splice(we,1)}else xe=ke.props.value;if(ke.props.onClick&&ke.props.onClick(lt),z!==xe&&(X(xe),k)){const we=lt.nativeEvent||lt,rt=new we.constructor(we.type,we);Object.defineProperty(rt,"target",{writable:!0,value:{value:xe,name:E}}),k(rt,ke)}v||ve(!1,lt)}},mt=ke=>{T||[" ","ArrowUp","ArrowDown","Enter"].indexOf(ke.key)!==-1&&(ke.preventDefault(),ve(!0,ke))},nn=ae!==null&&W,tt=ke=>{!nn&&S&&(Object.defineProperty(ke,"target",{writable:!0,value:{value:z,name:E}}),S(ke))};delete $["aria-invalid"];let dt,on;const qt=[];let st=!1;(J_({value:z})||m)&&(B?dt=B(z):st=!0);const Wt=De.map(ke=>{if(!P.isValidElement(ke))return null;let lt;if(v){if(!Array.isArray(z))throw new Error(Po(2));lt=z.some(xe=>aN(xe,ke.props.value)),lt&&st&&qt.push(ke.props.children)}else lt=aN(z,ke.props.value),lt&&st&&(on=ke.props.children);return P.cloneElement(ke,{"aria-selected":lt?"true":"false",onClick:yt(ke),onKeyUp:xe=>{xe.key===" "&&xe.preventDefault(),ke.props.onKeyUp&&ke.props.onKeyUp(xe)},role:"option",selected:lt,value:void 0,"data-value":ke.props.value})});st&&(v?qt.length===0?dt=null:dt=qt.reduce((ke,lt,xe)=>(ke.push(lt),xe<qt.length-1&&ke.push(", "),ke),[]):dt=on);let Bt=H;!o&&le&&ae&&(Bt=ie.clientWidth);let Gt;typeof L<"u"?Gt=L:Gt=p?null:0;const ge=A.id||(E?`mui-component-select-${E}`:void 0),ce=I({},e,{variant:O,value:z,open:nn,error:h}),Ie=Fee(ce),ut=I({},y.PaperProps,(r=y.slotProps)==null?void 0:r.paper),ot=Eh();return f.jsxs(P.Fragment,{children:[f.jsx(Oee,I({ref:se,tabIndex:Gt,role:"combobox","aria-controls":ot,"aria-disabled":p?"true":void 0,"aria-expanded":nn?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[b,ge].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:mt,onMouseDown:p||T?null:he,onBlur:tt,onFocus:w},A,{ownerState:ce,className:$e(A.className,Ie.select,c),id:ge,children:Mee(dt)?iN||(iN=f.jsx("span",{className:"notranslate",children:""})):dt})),f.jsx(Lee,I({"aria-invalid":h,value:Array.isArray(z)?z.join(","):z,name:E,ref:pe,"aria-hidden":!0,onChange:ft,tabIndex:-1,disabled:p,className:Ie.nativeInput,autoFocus:s,ownerState:ce},$)),f.jsx(Pee,{as:g,className:Ie.icon,ownerState:ce}),f.jsx(qk,I({id:`menu-${E||""}`,anchorEl:ie,open:nn,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:I({"aria-labelledby":b,role:"listbox","aria-multiselectable":v?"true":void 0,disableListWrap:!0,id:ot},y.MenuListProps),slotProps:I({},y.slotProps,{paper:I({},ut,{style:I({minWidth:Bt},ut!=null?ut.style:null)})}),children:Wt}))]})}),Uee=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],$ee=["root"],zee=t=>{const{classes:e}=t;return e},Hk={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Hi(t)&&t!=="variant",slot:"Root"},qee=Re(zk,Hk)(""),Gee=Re(jk,Hk)(""),jee=Re($k,Hk)(""),Vk=P.forwardRef(function(e,n){const r=Dt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:a,classes:s={},className:o,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=rX,id:d,input:p,inputProps:m,label:h,labelId:g,MenuProps:_,multiple:b=!1,native:y=!1,onClose:v,onOpen:E,open:S,renderValue:k,SelectDisplayProps:x,variant:w="outlined"}=r,N=Be(r,Uee),R=y?Eee:Bee,T=Rp(),B=Np({props:r,muiFormControl:T,states:["variant","error"]}),A=B.variant||w,L=I({},r,{variant:A,classes:s}),M=zee(L),O=Be(M,$ee),$=p||{standard:f.jsx(qee,{ownerState:L}),outlined:f.jsx(Gee,{label:h,ownerState:L}),filled:f.jsx(jee,{ownerState:L})}[A],z=er(n,hu($));return f.jsx(P.Fragment,{children:P.cloneElement($,I({inputComponent:R,inputProps:I({children:a,error:B.error,IconComponent:u,variant:A,type:void 0,multiple:b},y?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:_,onClose:v,onOpen:E,open:S,renderValue:k,SelectDisplayProps:I({id:d},x)},m,{classes:m?Ci(O,m.classes):O},p?p.props.inputProps:{})},(b&&y||c)&&A==="outlined"?{notched:!0}:{},{ref:z,className:$e($.props.className,o,M.root)},!p&&{variant:A},N))})});Vk.muiName="Select";function Hee(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}const Vee=2;function y6(t,e){return t-e}function sN(t,e){var n;const{index:r}=(n=t.reduce((i,a,s)=>{const o=Math.abs(e-a);return i===null||o<i.distance||o===i.distance?{distance:o,index:s}:i},null))!=null?n:{};return r}function bg(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function ib(t,e,n){return(t-e)*100/(n-e)}function Wee(t,e,n){return(n-e)*t+e}function Yee(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function Kee(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(Yee(e)))}function oN({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort(y6)}function yg({sliderRef:t,activeIndex:e,setActive:n}){var r,i;const a=hr(t.current);if(!((r=t.current)!=null&&r.contains(a.activeElement))||Number(a==null||(i=a.activeElement)==null?void 0:i.getAttribute("data-index"))!==e){var s;(s=t.current)==null||s.querySelector(`[type="range"][data-index="${e}"]`).focus()}n&&n(e)}function vg(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?Hee(t,e):!1}const Qee={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Xee=t=>t;let Eg;function lN(){return Eg===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Eg=CSS.supports("touch-action","none"):Eg=!0),Eg}function Zee(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:s=!1,max:o=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:m,scale:h=Xee,step:g=1,shiftStep:_=10,tabIndex:b,value:y}=t,v=P.useRef(void 0),[E,S]=P.useState(-1),[k,x]=P.useState(-1),[w,N]=P.useState(!1),R=P.useRef(0),[T,B]=Q_({controlled:y,default:n??l,name:"Slider"}),A=u&&((ge,ce,Ie)=>{const ut=ge.nativeEvent||ge,ot=new ut.constructor(ut.type,ut);Object.defineProperty(ot,"target",{writable:!0,value:{value:ce,name:c}}),u(ot,ce,Ie)}),L=Array.isArray(T);let M=L?T.slice().sort(y6):[T];M=M.map(ge=>ge==null?l:Ac(ge,l,o));const O=s===!0&&g!==null?[...Array(Math.floor((o-l)/g)+1)].map((ge,ce)=>({value:l+g*ce})):s||[],$=O.map(ge=>ge.value),{isFocusVisibleRef:z,onBlur:X,onFocus:W,ref:te}=ly(),[pe,ye]=P.useState(-1),ae=P.useRef(null),oe=er(te,ae),le=er(m,oe),H=ge=>ce=>{var Ie;const ut=Number(ce.currentTarget.getAttribute("data-index"));W(ce),z.current===!0&&ye(ut),x(ut),ge==null||(Ie=ge.onFocus)==null||Ie.call(ge,ce)},Z=ge=>ce=>{var Ie;X(ce),z.current===!1&&ye(-1),x(-1),ge==null||(Ie=ge.onBlur)==null||Ie.call(ge,ce)},ee=(ge,ce)=>{const Ie=Number(ge.currentTarget.getAttribute("data-index")),ut=M[Ie],ot=$.indexOf(ut);let ke=ce;if(O&&g==null){const lt=$[$.length-1];ke>lt?ke=lt:ke<$[0]?ke=$[0]:ke=ke<ut?$[ot-1]:$[ot+1]}if(ke=Ac(ke,l,o),L){i&&(ke=Ac(ke,M[Ie-1]||-1/0,M[Ie+1]||1/0));const lt=ke;ke=oN({values:M,newValue:ke,index:Ie});let xe=Ie;i||(xe=ke.indexOf(lt)),yg({sliderRef:ae,activeIndex:xe})}B(ke),ye(Ie),A&&!vg(ke,T)&&A(ge,ke,Ie),d&&d(ge,ke)},se=ge=>ce=>{var Ie;if(g!==null){const ut=Number(ce.currentTarget.getAttribute("data-index")),ot=M[ut];let ke=null;(ce.key==="ArrowLeft"||ce.key==="ArrowDown")&&ce.shiftKey||ce.key==="PageDown"?ke=Math.max(ot-_,l):((ce.key==="ArrowRight"||ce.key==="ArrowUp")&&ce.shiftKey||ce.key==="PageUp")&&(ke=Math.min(ot+_,o)),ke!==null&&(ee(ce,ke),ce.preventDefault())}ge==null||(Ie=ge.onKeyDown)==null||Ie.call(ge,ce)};zi(()=>{if(r&&ae.current.contains(document.activeElement)){var ge;(ge=document.activeElement)==null||ge.blur()}},[r]),r&&E!==-1&&S(-1),r&&pe!==-1&&ye(-1);const ie=ge=>ce=>{var Ie;(Ie=ge.onChange)==null||Ie.call(ge,ce),ee(ce,ce.target.valueAsNumber)},ve=P.useRef(void 0);let he=p;a&&p==="horizontal"&&(he+="-reverse");const Ee=({finger:ge,move:ce=!1})=>{const{current:Ie}=ae,{width:ut,height:ot,bottom:ke,left:lt}=Ie.getBoundingClientRect();let xe;he.indexOf("vertical")===0?xe=(ke-ge.y)/ot:xe=(ge.x-lt)/ut,he.indexOf("-reverse")!==-1&&(xe=1-xe);let we;if(we=Wee(xe,l,o),g)we=Kee(we,g,l);else{const ct=sN($,we);we=$[ct]}we=Ac(we,l,o);let rt=0;if(L){ce?rt=ve.current:rt=sN(M,we),i&&(we=Ac(we,M[rt-1]||-1/0,M[rt+1]||1/0));const ct=we;we=oN({values:M,newValue:we,index:rt}),i&&ce||(rt=we.indexOf(ct),ve.current=rt)}return{newValue:we,activeIndex:rt}},De=$r(ge=>{const ce=bg(ge,v);if(!ce)return;if(R.current+=1,ge.type==="mousemove"&&ge.buttons===0){ft(ge);return}const{newValue:Ie,activeIndex:ut}=Ee({finger:ce,move:!0});yg({sliderRef:ae,activeIndex:ut,setActive:S}),B(Ie),!w&&R.current>Vee&&N(!0),A&&!vg(Ie,T)&&A(ge,Ie,ut)}),ft=$r(ge=>{const ce=bg(ge,v);if(N(!1),!ce)return;const{newValue:Ie}=Ee({finger:ce,move:!0});S(-1),ge.type==="touchend"&&x(-1),d&&d(ge,Ie),v.current=void 0,mt()}),yt=$r(ge=>{if(r)return;lN()||ge.preventDefault();const ce=ge.changedTouches[0];ce!=null&&(v.current=ce.identifier);const Ie=bg(ge,v);if(Ie!==!1){const{newValue:ot,activeIndex:ke}=Ee({finger:Ie});yg({sliderRef:ae,activeIndex:ke,setActive:S}),B(ot),A&&!vg(ot,T)&&A(ge,ot,ke)}R.current=0;const ut=hr(ae.current);ut.addEventListener("touchmove",De,{passive:!0}),ut.addEventListener("touchend",ft,{passive:!0})}),mt=P.useCallback(()=>{const ge=hr(ae.current);ge.removeEventListener("mousemove",De),ge.removeEventListener("mouseup",ft),ge.removeEventListener("touchmove",De),ge.removeEventListener("touchend",ft)},[ft,De]);P.useEffect(()=>{const{current:ge}=ae;return ge.addEventListener("touchstart",yt,{passive:lN()}),()=>{ge.removeEventListener("touchstart",yt),mt()}},[mt,yt]),P.useEffect(()=>{r&&mt()},[r,mt]);const nn=ge=>ce=>{var Ie;if((Ie=ge.onMouseDown)==null||Ie.call(ge,ce),r||ce.defaultPrevented||ce.button!==0)return;ce.preventDefault();const ut=bg(ce,v);if(ut!==!1){const{newValue:ke,activeIndex:lt}=Ee({finger:ut});yg({sliderRef:ae,activeIndex:lt,setActive:S}),B(ke),A&&!vg(ke,T)&&A(ce,ke,lt)}R.current=0;const ot=hr(ae.current);ot.addEventListener("mousemove",De,{passive:!0}),ot.addEventListener("mouseup",ft)},tt=ib(L?M[0]:l,l,o),dt=ib(M[M.length-1],l,o)-tt,on=(ge={})=>{const ce=zc(ge),Ie={onMouseDown:nn(ce||{})},ut=I({},ce,Ie);return I({},ge,{ref:le},ut)},qt=ge=>ce=>{var Ie;(Ie=ge.onMouseOver)==null||Ie.call(ge,ce);const ut=Number(ce.currentTarget.getAttribute("data-index"));x(ut)},st=ge=>ce=>{var Ie;(Ie=ge.onMouseLeave)==null||Ie.call(ge,ce),x(-1)};return{active:E,axis:he,axisProps:Qee,dragging:w,focusedThumbIndex:pe,getHiddenInputProps:(ge={})=>{var ce;const Ie=zc(ge),ut={onChange:ie(Ie||{}),onFocus:H(Ie||{}),onBlur:Z(Ie||{}),onKeyDown:se(Ie||{})},ot=I({},Ie,ut);return I({tabIndex:b,"aria-labelledby":e,"aria-orientation":p,"aria-valuemax":h(o),"aria-valuemin":h(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(ce=t.step)!=null?ce:void 0,disabled:r},ge,ot,{style:I({},rW,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:on,getThumbProps:(ge={})=>{const ce=zc(ge),Ie={onMouseOver:qt(ce||{}),onMouseLeave:st(ce||{})};return I({},ge,ce,Ie)},marks:O,open:k,range:L,rootRef:le,trackLeap:dt,trackOffset:tt,values:M,getThumbStyle:ge=>({pointerEvents:E!==-1&&E!==ge?"none":void 0})}}const Jee=t=>!t||!Rl(t);function ete(t){return wt("MuiSlider",t)}const Da=Nt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),tte=t=>{const{open:e}=t;return{offset:$e(e&&Da.valueLabelOpen),circle:Da.valueLabelCircle,label:Da.valueLabelLabel}};function nte(t){const{children:e,className:n,value:r}=t,i=tte(t);return e?P.cloneElement(e,{className:$e(e.props.className)},f.jsxs(P.Fragment,{children:[e.props.children,f.jsx("span",{className:$e(i.offset,n),"aria-hidden":!0,children:f.jsx("span",{className:i.circle,children:f.jsx("span",{className:i.label,children:r})})})]})):null}const rte=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function cN(t){return t}const ite=Re("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${Ne(n.color)}`],n.size!=="medium"&&e[`size${Ne(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(({theme:t})=>{var e;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Da.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${Da.dragging}`]:{[`& .${Da.thumb}, & .${Da.track}`]:{transition:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),ate=Re("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ste=Re("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>{var e;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:I({},t.vars?{backgroundColor:t.vars.palette.Slider[`${n}Track`],borderColor:t.vars.palette.Slider[`${n}Track`]}:I({backgroundColor:zt.lighten(t.palette[n].main,.62),borderColor:zt.lighten(t.palette[n].main,.62)},t.applyStyles("dark",{backgroundColor:zt.darken(t.palette[n].main,.5)}),t.applyStyles("dark",{borderColor:zt.darken(t.palette[n].main,.5)})))}))]}}),ote=Re("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${Ne(n.color)}`],n.size!=="medium"&&e[`thumbSize${Ne(n.size)}`]]}})(({theme:t})=>{var e;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Da.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${Da.focusVisible}`]:I({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${zt.alpha(t.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Da.active}`]:I({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${zt.alpha(t.palette[n].main,.16)}`})}}))]}}),lte=Re(nte,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t})=>I({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Da.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Da.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),cte=Re("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>cy(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),ute=Re("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>cy(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t})=>I({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),dte=t=>{const{disabled:e,dragging:n,marked:r,orientation:i,track:a,classes:s,color:o,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",o&&`color${Ne(o)}`,l&&`size${Ne(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${Ne(l)}`,o&&`thumbColor${Ne(o)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Rt(c,ete,s)},pte=({children:t})=>t,fte=P.forwardRef(function(e,n){var r,i,a,s,o,l,c,u,d,p,m,h,g,_,b,y,v,E,S,k,x,w,N,R;const T=Dt({props:e,name:"MuiSlider"}),B=Th(),{"aria-label":A,"aria-valuetext":L,"aria-labelledby":M,component:O="span",components:$={},componentsProps:z={},color:X="primary",classes:W,className:te,disableSwap:pe=!1,disabled:ye=!1,getAriaLabel:ae,getAriaValueText:oe,marks:le=!1,max:H=100,min:Z=0,orientation:ee="horizontal",shiftStep:se=10,size:ie="medium",step:ve=1,scale:he=cN,slotProps:Ee,slots:De,track:ft="normal",valueLabelDisplay:yt="off",valueLabelFormat:mt=cN}=T,nn=Be(T,rte),tt=I({},T,{isRtl:B,max:H,min:Z,classes:W,disabled:ye,disableSwap:pe,orientation:ee,marks:le,color:X,size:ie,step:ve,shiftStep:se,scale:he,track:ft,valueLabelDisplay:yt,valueLabelFormat:mt}),{axisProps:dt,getRootProps:on,getHiddenInputProps:qt,getThumbProps:st,open:Wt,active:Bt,axis:Gt,focusedThumbIndex:ge,range:ce,dragging:Ie,marks:ut,values:ot,trackOffset:ke,trackLeap:lt,getThumbStyle:xe}=Zee(I({},tt,{rootRef:n}));tt.marked=ut.length>0&&ut.some(hn=>hn.label),tt.dragging=Ie,tt.focusedThumbIndex=ge;const we=dte(tt),rt=(r=(i=De?.root)!=null?i:$.Root)!=null?r:ite,ct=(a=(s=De?.rail)!=null?s:$.Rail)!=null?a:ate,It=(o=(l=De?.track)!=null?l:$.Track)!=null?o:ste,Ke=(c=(u=De?.thumb)!=null?u:$.Thumb)!=null?c:ote,un=(d=(p=De?.valueLabel)!=null?p:$.ValueLabel)!=null?d:lte,rn=(m=(h=De?.mark)!=null?h:$.Mark)!=null?m:cte,ln=(g=(_=De?.markLabel)!=null?_:$.MarkLabel)!=null?g:ute,V=(b=(y=De?.input)!=null?y:$.Input)!=null?b:"input",_e=(v=Ee?.root)!=null?v:z.root,Pe=(E=Ee?.rail)!=null?E:z.rail,j=(S=Ee?.track)!=null?S:z.track,fe=(k=Ee?.thumb)!=null?k:z.thumb,U=(x=Ee?.valueLabel)!=null?x:z.valueLabel,Q=(w=Ee?.mark)!=null?w:z.mark,ne=(N=Ee?.markLabel)!=null?N:z.markLabel,ue=(R=Ee?.input)!=null?R:z.input,ze=Nr({elementType:rt,getSlotProps:on,externalSlotProps:_e,externalForwardedProps:nn,additionalProps:I({},Jee(rt)&&{as:O}),ownerState:I({},tt,_e?.ownerState),className:[we.root,te]}),Ye=Nr({elementType:ct,externalSlotProps:Pe,ownerState:tt,className:we.rail}),Ct=Nr({elementType:It,externalSlotProps:j,additionalProps:{style:I({},dt[Gt].offset(ke),dt[Gt].leap(lt))},ownerState:I({},tt,j?.ownerState),className:we.track}),$t=Nr({elementType:Ke,getSlotProps:st,externalSlotProps:fe,ownerState:I({},tt,fe?.ownerState),className:we.thumb}),nr=Nr({elementType:un,externalSlotProps:U,ownerState:I({},tt,U?.ownerState),className:we.valueLabel}),ir=Nr({elementType:rn,externalSlotProps:Q,ownerState:tt,className:we.mark}),Er=Nr({elementType:ln,externalSlotProps:ne,ownerState:tt,className:we.markLabel}),bi=Nr({elementType:V,getSlotProps:qt,externalSlotProps:ue,ownerState:tt});return f.jsxs(rt,I({},ze,{children:[f.jsx(ct,I({},Ye)),f.jsx(It,I({},Ct)),ut.filter(hn=>hn.value>=Z&&hn.value<=H).map((hn,an)=>{const Yi=ib(hn.value,Z,H),ni=dt[Gt].offset(Yi);let Fr;return ft===!1?Fr=ot.indexOf(hn.value)!==-1:Fr=ft==="normal"&&(ce?hn.value>=ot[0]&&hn.value<=ot[ot.length-1]:hn.value<=ot[0])||ft==="inverted"&&(ce?hn.value<=ot[0]||hn.value>=ot[ot.length-1]:hn.value>=ot[0]),f.jsxs(P.Fragment,{children:[f.jsx(rn,I({"data-index":an},ir,!Rl(rn)&&{markActive:Fr},{style:I({},ni,ir.style),className:$e(ir.className,Fr&&we.markActive)})),hn.label!=null?f.jsx(ln,I({"aria-hidden":!0,"data-index":an},Er,!Rl(ln)&&{markLabelActive:Fr},{style:I({},ni,Er.style),className:$e(we.markLabel,Er.className,Fr&&we.markLabelActive),children:hn.label})):null]},an)}),ot.map((hn,an)=>{const Yi=ib(hn,Z,H),ni=dt[Gt].offset(Yi),Fr=yt==="off"?pte:un;return f.jsx(Fr,I({},!Rl(Fr)&&{valueLabelFormat:mt,valueLabelDisplay:yt,value:typeof mt=="function"?mt(he(hn),an):mt,index:an,open:Wt===an||Bt===an||yt==="on",disabled:ye},nr,{children:f.jsx(Ke,I({"data-index":an},$t,{className:$e(we.thumb,$t.className,Bt===an&&we.active,ge===an&&we.focusVisible),style:I({},ni,xe(an),$t.style),children:f.jsx(V,I({"data-index":an,"aria-label":ae?ae(an):A,"aria-valuenow":he(hn),"aria-labelledby":M,"aria-valuetext":oe?oe(he(hn),an):L,value:ot[an]},bi))}))}),an)})]}))});function mte(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:a}=t,s=Dl();P.useEffect(()=>{if(!i)return;function b(y){y.defaultPrevented||(y.key==="Escape"||y.key==="Esc")&&r?.(y,"escapeKeyDown")}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const o=$r((b,y)=>{r?.(b,y)}),l=$r(b=>{!r||b==null||s.start(b,()=>{o(null,"timeout")})});P.useEffect(()=>(i&&l(e),s.clear),[i,e,l,s]);const c=b=>{r?.(b,"clickaway")},u=s.clear,d=P.useCallback(()=>{e!=null&&l(a??e*.5)},[e,a,l]),p=b=>y=>{const v=b.onBlur;v?.(y),d()},m=b=>y=>{const v=b.onFocus;v?.(y),u()},h=b=>y=>{const v=b.onMouseEnter;v?.(y),u()},g=b=>y=>{const v=b.onMouseLeave;v?.(y),d()};return P.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const y=I({},zc(t),zc(b));return I({role:"presentation"},b,y,{onBlur:p(y),onFocus:m(y),onMouseEnter:h(y),onMouseLeave:g(y)})},onClickAway:c}}function hte(t){return wt("MuiSnackbarContent",t)}Nt("MuiSnackbarContent",["root","message","action"]);const gte=["action","className","message","role"],_te=t=>{const{classes:e}=t;return Rt({root:["root"],action:["action"],message:["message"]},hte,e)},bte=Re(gu,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=zt.emphasize(t.palette.background.default,e);return I({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),yte=Re("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),vte=Re("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Ete=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiSnackbarContent"}),{action:i,className:a,message:s,role:o="alert"}=r,l=Be(r,gte),c=r,u=_te(c);return f.jsxs(bte,I({role:o,square:!0,elevation:6,className:$e(u.root,a),ownerState:c,ref:n},l,{children:[f.jsx(yte,{className:u.message,ownerState:c,children:s}),i?f.jsx(vte,{className:u.action,ownerState:c,children:i}):null]}))});function Ste(t){return wt("MuiSnackbar",t)}Nt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Tte=["onEnter","onExited"],Cte=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],xte=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${Ne(n.vertical)}${Ne(n.horizontal)}`]};return Rt(r,Ste,e)},uN=Re("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${Ne(n.anchorOrigin.vertical)}${Ne(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return I({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:I({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),kte=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiSnackbar"}),i=kr(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:o,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:h=!1,message:g,open:_,TransitionComponent:b=Im,transitionDuration:y=a,TransitionProps:{onEnter:v,onExited:E}={}}=r,S=Be(r.TransitionProps,Tte),k=Be(r,Cte),x=I({},r,{anchorOrigin:{vertical:o,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:y}),w=xte(x),{getRootProps:N,onClickAway:R}=mte(I({},x)),[T,B]=P.useState(!0),A=Nr({elementType:uN,getSlotProps:N,externalForwardedProps:k,ownerState:x,additionalProps:{ref:n},className:[w.root,d]}),L=O=>{B(!0),E&&E(O)},M=(O,$)=>{B(!1),v&&v(O,$)};return!_&&T?null:f.jsx(zX,I({onClickAway:R},p,{children:f.jsx(uN,I({},A,{children:f.jsx(b,I({appear:!0,in:_,timeout:y,direction:o==="top"?"down":"up",onEnter:M,onExited:L},S,{children:u||f.jsx(Ete,I({message:g,action:s},m))}))}))}))});function wte(t){return wt("MuiTooltip",t)}const Al=Nt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Dte=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Ate(t){return Math.round(t*1e5)/1e5}const Nte=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:a}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Ne(a.split("-")[0])}`],arrow:["arrow"]};return Rt(s,wte,e)},Rte=Re(l6,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>I({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Al.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Al.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Al.arrow}`]:I({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Al.arrow}`]:I({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Ite=Re("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${Ne(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>I({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:zt.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Ate(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Al.popper}[data-popper-placement*="left"] &`]:I({transformOrigin:"right center"},e.isRtl?I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):I({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Al.popper}[data-popper-placement*="right"] &`]:I({transformOrigin:"left center"},e.isRtl?I({marginRight:"14px"},e.touch&&{marginRight:"24px"}):I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Al.popper}[data-popper-placement*="top"] &`]:I({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Al.popper}[data-popper-placement*="bottom"] &`]:I({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Ote=Re("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:zt.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Sg=!1;const dN=new Sh;let cf={x:0,y:0};function Tg(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const Bn=P.forwardRef(function(e,n){var r,i,a,s,o,l,c,u,d,p,m,h,g,_,b,y,v,E,S;const k=Dt({props:e,name:"MuiTooltip"}),{arrow:x=!1,children:w,components:N={},componentsProps:R={},describeChild:T=!1,disableFocusListener:B=!1,disableHoverListener:A=!1,disableInteractive:L=!1,disableTouchListener:M=!1,enterDelay:O=100,enterNextDelay:$=0,enterTouchDelay:z=700,followCursor:X=!1,id:W,leaveDelay:te=0,leaveTouchDelay:pe=1500,onClose:ye,onOpen:ae,open:oe,placement:le="bottom",PopperComponent:H,PopperProps:Z={},slotProps:ee={},slots:se={},title:ie,TransitionComponent:ve=Im,TransitionProps:he}=k,Ee=Be(k,Dte),De=P.isValidElement(w)?w:f.jsx("span",{children:w}),ft=kr(),yt=Th(),[mt,nn]=P.useState(),[tt,dt]=P.useState(null),on=P.useRef(!1),qt=L||X,st=Dl(),Wt=Dl(),Bt=Dl(),Gt=Dl(),[ge,ce]=Q_({controlled:oe,default:!1,name:"Tooltip",state:"open"});let Ie=ge;const ut=Eh(W),ot=P.useRef(),ke=$r(()=>{ot.current!==void 0&&(document.body.style.WebkitUserSelect=ot.current,ot.current=void 0),Gt.clear()});P.useEffect(()=>ke,[ke]);const lt=jt=>{dN.clear(),Sg=!0,ce(!0),ae&&!Ie&&ae(jt)},xe=$r(jt=>{dN.start(800+te,()=>{Sg=!1}),ce(!1),ye&&Ie&&ye(jt),st.start(ft.transitions.duration.shortest,()=>{on.current=!1})}),we=jt=>{on.current&&jt.type!=="touchstart"||(mt&&mt.removeAttribute("title"),Wt.clear(),Bt.clear(),O||Sg&&$?Wt.start(Sg?$:O,()=>{lt(jt)}):lt(jt))},rt=jt=>{Wt.clear(),Bt.start(te,()=>{xe(jt)})},{isFocusVisibleRef:ct,onBlur:It,onFocus:Ke,ref:un}=ly(),[,rn]=P.useState(!1),ln=jt=>{It(jt),ct.current===!1&&(rn(!1),rt(jt))},V=jt=>{mt||nn(jt.currentTarget),Ke(jt),ct.current===!0&&(rn(!0),we(jt))},_e=jt=>{on.current=!0;const Dr=De.props;Dr.onTouchStart&&Dr.onTouchStart(jt)},Pe=jt=>{_e(jt),Bt.clear(),st.clear(),ke(),ot.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Gt.start(z,()=>{document.body.style.WebkitUserSelect=ot.current,we(jt)})},j=jt=>{De.props.onTouchEnd&&De.props.onTouchEnd(jt),ke(),Bt.start(pe,()=>{xe(jt)})};P.useEffect(()=>{if(!Ie)return;function jt(Dr){(Dr.key==="Escape"||Dr.key==="Esc")&&xe(Dr)}return document.addEventListener("keydown",jt),()=>{document.removeEventListener("keydown",jt)}},[xe,Ie]);const fe=er(hu(De),un,nn,n);!ie&&ie!==0&&(Ie=!1);const U=P.useRef(),Q=jt=>{const Dr=De.props;Dr.onMouseMove&&Dr.onMouseMove(jt),cf={x:jt.clientX,y:jt.clientY},U.current&&U.current.update()},ne={},ue=typeof ie=="string";T?(ne.title=!Ie&&ue&&!A?ie:null,ne["aria-describedby"]=Ie?ut:null):(ne["aria-label"]=ue?ie:null,ne["aria-labelledby"]=Ie&&!ue?ut:null);const ze=I({},ne,Ee,De.props,{className:$e(Ee.className,De.props.className),onTouchStart:_e,ref:fe},X?{onMouseMove:Q}:{}),Ye={};M||(ze.onTouchStart=Pe,ze.onTouchEnd=j),A||(ze.onMouseOver=Tg(we,ze.onMouseOver),ze.onMouseLeave=Tg(rt,ze.onMouseLeave),qt||(Ye.onMouseOver=we,Ye.onMouseLeave=rt)),B||(ze.onFocus=Tg(V,ze.onFocus),ze.onBlur=Tg(ln,ze.onBlur),qt||(Ye.onFocus=V,Ye.onBlur=ln));const Ct=P.useMemo(()=>{var jt;let Dr=[{name:"arrow",enabled:!!tt,options:{element:tt,padding:4}}];return(jt=Z.popperOptions)!=null&&jt.modifiers&&(Dr=Dr.concat(Z.popperOptions.modifiers)),I({},Z.popperOptions,{modifiers:Dr})},[tt,Z]),$t=I({},k,{isRtl:yt,arrow:x,disableInteractive:qt,placement:le,PopperComponentProp:H,touch:on.current}),nr=Nte($t),ir=(r=(i=se.popper)!=null?i:N.Popper)!=null?r:Rte,Er=(a=(s=(o=se.transition)!=null?o:N.Transition)!=null?s:ve)!=null?a:Im,bi=(l=(c=se.tooltip)!=null?c:N.Tooltip)!=null?l:Ite,hn=(u=(d=se.arrow)!=null?d:N.Arrow)!=null?u:Ote,an=Sd(ir,I({},Z,(p=ee.popper)!=null?p:R.popper,{className:$e(nr.popper,Z?.className,(m=(h=ee.popper)!=null?h:R.popper)==null?void 0:m.className)}),$t),Yi=Sd(Er,I({},he,(g=ee.transition)!=null?g:R.transition),$t),ni=Sd(bi,I({},(_=ee.tooltip)!=null?_:R.tooltip,{className:$e(nr.tooltip,(b=(y=ee.tooltip)!=null?y:R.tooltip)==null?void 0:b.className)}),$t),Fr=Sd(hn,I({},(v=ee.arrow)!=null?v:R.arrow,{className:$e(nr.arrow,(E=(S=ee.arrow)!=null?S:R.arrow)==null?void 0:E.className)}),$t);return f.jsxs(P.Fragment,{children:[P.cloneElement(De,ze),f.jsx(ir,I({as:H??l6,placement:le,anchorEl:X?{getBoundingClientRect:()=>({top:cf.y,left:cf.x,right:cf.x,bottom:cf.y,width:0,height:0})}:mt,popperRef:U,open:mt?Ie:!1,id:ut,transition:!0},Ye,an,{popperOptions:Ct,children:({TransitionProps:jt})=>f.jsx(Er,I({timeout:ft.transitions.duration.shorter},jt,Yi,{children:f.jsxs(bi,I({},ni,{children:[ie,x?f.jsx(hn,I({},Fr,{ref:dt})):null]}))}))}))]})});function Pte(t){return wt("MuiTab",t)}const pl=Nt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Lte=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Mte=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:a,label:s,selected:o,disabled:l}=t,c={root:["root",a&&s&&"labelIcon",`textColor${Ne(n)}`,r&&"fullWidth",i&&"wrapped",o&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,Pte,e)},Fte=Re(Oa,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${Ne(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${pl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>I({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${pl.iconWrapper}`]:I({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${pl.selected}`]:{opacity:1},[`&.${pl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${pl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${pl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${pl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${pl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Oc=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTab"}),{className:i,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:o,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:p,onClick:m,onFocus:h,selected:g,selectionFollowsFocus:_,textColor:b="inherit",value:y,wrapped:v=!1}=r,E=Be(r,Lte),S=I({},r,{disabled:a,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:o,textColor:b,wrapped:v}),k=Mte(S),x=l&&d&&P.isValidElement(l)?P.cloneElement(l,{className:$e(k.iconWrapper,l.props.className)}):l,w=R=>{!g&&p&&p(R,y),m&&m(R)},N=R=>{_&&!g&&p&&p(R,y),h&&h(R)};return f.jsxs(Fte,I({focusRipple:!s,className:$e(k.root,i),ref:n,role:"tab","aria-selected":g,disabled:a,onClick:w,onFocus:N,ownerState:S,tabIndex:g?0:-1},E,{children:[c==="top"||c==="start"?f.jsxs(P.Fragment,{children:[x,d]}):f.jsxs(P.Fragment,{children:[d,x]}),u]}))}),Bte=nt(f.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ute=nt(f.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function $te(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function zte(t,e,n,r={},i=()=>{}){const{ease:a=$te,duration:s=300}=r;let o=null;const l=e[t];let c=!1;const u=()=>{c=!0},d=p=>{if(c){i(new Error("Animation cancelled"));return}o===null&&(o=p);const m=Math.min(1,(p-o)/s);if(e[t]=a(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const qte=["onChange"],Gte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function jte(t){const{onChange:e}=t,n=Be(t,qte),r=P.useRef(),i=P.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return zi(()=>{const s=sy(()=>{const l=r.current;a(),l!==r.current&&e(r.current)}),o=Lo(i.current);return o.addEventListener("resize",s),()=>{s.clear(),o.removeEventListener("resize",s)}},[e]),P.useEffect(()=>{a(),e(r.current)},[e]),f.jsx("div",I({style:Gte},n,{ref:i}))}function Hte(t){return wt("MuiTabScrollButton",t)}const Vte=Nt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Wte=["className","slots","slotProps","direction","orientation","disabled"],Yte=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},Hte,e)},Kte=Re(Oa,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>I({width:40,flexShrink:0,opacity:.8,[`&.${Vte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Qte=P.forwardRef(function(e,n){var r,i;const a=Dt({props:e,name:"MuiTabScrollButton"}),{className:s,slots:o={},slotProps:l={},direction:c}=a,u=Be(a,Wte),d=Th(),p=I({isRtl:d},a),m=Yte(p),h=(r=o.StartScrollButtonIcon)!=null?r:Bte,g=(i=o.EndScrollButtonIcon)!=null?i:Ute,_=Nr({elementType:h,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),b=Nr({elementType:g,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return f.jsx(Kte,I({component:"div",className:$e(m.root,s),ref:n,role:null,ownerState:p,tabIndex:null},u,{children:c==="left"?f.jsx(h,I({},_)):f.jsx(g,I({},b))}))});function Xte(t){return wt("MuiTabs",t)}const Uv=Nt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Zte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],pN=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,fN=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,Cg=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const a=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||a)i=n(t,i);else{i.focus();return}}},Jte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:s,scrollButtonsHideMobile:o,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",o&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Xte,l)},ene=Re("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Uv.scrollButtons}`]:e.scrollButtons},{[`& .${Uv.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>I({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${Uv.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),tne=Re("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>I({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),nne=Re("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>I({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),rne=Re("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>I({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),ine=Re(jte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),mN={},v6=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTabs"}),i=kr(),a=Th(),{"aria-label":s,"aria-labelledby":o,action:l,centered:c=!1,children:u,className:d,component:p="div",allowScrollButtonsMobile:m=!1,indicatorColor:h="primary",onChange:g,orientation:_="horizontal",ScrollButtonComponent:b=Qte,scrollButtons:y="auto",selectionFollowsFocus:v,slots:E={},slotProps:S={},TabIndicatorProps:k={},TabScrollButtonProps:x={},textColor:w="primary",value:N,variant:R="standard",visibleScrollbar:T=!1}=r,B=Be(r,Zte),A=R==="scrollable",L=_==="vertical",M=L?"scrollTop":"scrollLeft",O=L?"top":"left",$=L?"bottom":"right",z=L?"clientHeight":"clientWidth",X=L?"height":"width",W=I({},r,{component:p,allowScrollButtonsMobile:m,indicatorColor:h,orientation:_,vertical:L,scrollButtons:y,textColor:w,variant:R,visibleScrollbar:T,fixed:!A,hideScrollbar:A&&!T,scrollableX:A&&!L,scrollableY:A&&L,centered:c&&!A,scrollButtonsHideMobile:!m}),te=Jte(W),pe=Nr({elementType:E.StartScrollButtonIcon,externalSlotProps:S.startScrollButtonIcon,ownerState:W}),ye=Nr({elementType:E.EndScrollButtonIcon,externalSlotProps:S.endScrollButtonIcon,ownerState:W}),[ae,oe]=P.useState(!1),[le,H]=P.useState(mN),[Z,ee]=P.useState(!1),[se,ie]=P.useState(!1),[ve,he]=P.useState(!1),[Ee,De]=P.useState({overflow:"hidden",scrollbarWidth:0}),ft=new Map,yt=P.useRef(null),mt=P.useRef(null),nn=()=>{const xe=yt.current;let we;if(xe){const ct=xe.getBoundingClientRect();we={clientWidth:xe.clientWidth,scrollLeft:xe.scrollLeft,scrollTop:xe.scrollTop,scrollLeftNormalized:tW(xe,a?"rtl":"ltr"),scrollWidth:xe.scrollWidth,top:ct.top,bottom:ct.bottom,left:ct.left,right:ct.right}}let rt;if(xe&&N!==!1){const ct=mt.current.children;if(ct.length>0){const It=ct[ft.get(N)];rt=It?It.getBoundingClientRect():null}}return{tabsMeta:we,tabMeta:rt}},tt=$r(()=>{const{tabsMeta:xe,tabMeta:we}=nn();let rt=0,ct;if(L)ct="top",we&&xe&&(rt=we.top-xe.top+xe.scrollTop);else if(ct=a?"right":"left",we&&xe){const Ke=a?xe.scrollLeftNormalized+xe.clientWidth-xe.scrollWidth:xe.scrollLeft;rt=(a?-1:1)*(we[ct]-xe[ct]+Ke)}const It={[ct]:rt,[X]:we?we[X]:0};if(isNaN(le[ct])||isNaN(le[X]))H(It);else{const Ke=Math.abs(le[ct]-It[ct]),un=Math.abs(le[X]-It[X]);(Ke>=1||un>=1)&&H(It)}}),dt=(xe,{animation:we=!0}={})=>{we?zte(M,yt.current,xe,{duration:i.transitions.duration.standard}):yt.current[M]=xe},on=xe=>{let we=yt.current[M];L?we+=xe:(we+=xe*(a?-1:1),we*=a&&B4()==="reverse"?-1:1),dt(we)},qt=()=>{const xe=yt.current[z];let we=0;const rt=Array.from(mt.current.children);for(let ct=0;ct<rt.length;ct+=1){const It=rt[ct];if(we+It[z]>xe){ct===0&&(we=xe);break}we+=It[z]}return we},st=()=>{on(-1*qt())},Wt=()=>{on(qt())},Bt=P.useCallback(xe=>{De({overflow:null,scrollbarWidth:xe})},[]),Gt=()=>{const xe={};xe.scrollbarSizeListener=A?f.jsx(ine,{onChange:Bt,className:$e(te.scrollableX,te.hideScrollbar)}):null;const rt=A&&(y==="auto"&&(Z||se)||y===!0);return xe.scrollButtonStart=rt?f.jsx(b,I({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:pe},orientation:_,direction:a?"right":"left",onClick:st,disabled:!Z},x,{className:$e(te.scrollButtons,x.className)})):null,xe.scrollButtonEnd=rt?f.jsx(b,I({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ye},orientation:_,direction:a?"left":"right",onClick:Wt,disabled:!se},x,{className:$e(te.scrollButtons,x.className)})):null,xe},ge=$r(xe=>{const{tabsMeta:we,tabMeta:rt}=nn();if(!(!rt||!we)){if(rt[O]<we[O]){const ct=we[M]+(rt[O]-we[O]);dt(ct,{animation:xe})}else if(rt[$]>we[$]){const ct=we[M]+(rt[$]-we[$]);dt(ct,{animation:xe})}}}),ce=$r(()=>{A&&y!==!1&&he(!ve)});P.useEffect(()=>{const xe=sy(()=>{yt.current&&tt()});let we;const rt=Ke=>{Ke.forEach(un=>{un.removedNodes.forEach(rn=>{var ln;(ln=we)==null||ln.unobserve(rn)}),un.addedNodes.forEach(rn=>{var ln;(ln=we)==null||ln.observe(rn)})}),xe(),ce()},ct=Lo(yt.current);ct.addEventListener("resize",xe);let It;return typeof ResizeObserver<"u"&&(we=new ResizeObserver(xe),Array.from(mt.current.children).forEach(Ke=>{we.observe(Ke)})),typeof MutationObserver<"u"&&(It=new MutationObserver(rt),It.observe(mt.current,{childList:!0})),()=>{var Ke,un;xe.clear(),ct.removeEventListener("resize",xe),(Ke=It)==null||Ke.disconnect(),(un=we)==null||un.disconnect()}},[tt,ce]),P.useEffect(()=>{const xe=Array.from(mt.current.children),we=xe.length;if(typeof IntersectionObserver<"u"&&we>0&&A&&y!==!1){const rt=xe[0],ct=xe[we-1],It={root:yt.current,threshold:.99},Ke=V=>{ee(!V[0].isIntersecting)},un=new IntersectionObserver(Ke,It);un.observe(rt);const rn=V=>{ie(!V[0].isIntersecting)},ln=new IntersectionObserver(rn,It);return ln.observe(ct),()=>{un.disconnect(),ln.disconnect()}}},[A,y,ve,u?.length]),P.useEffect(()=>{oe(!0)},[]),P.useEffect(()=>{tt()}),P.useEffect(()=>{ge(mN!==le)},[ge,le]),P.useImperativeHandle(l,()=>({updateIndicator:tt,updateScrollButtons:ce}),[tt,ce]);const Ie=f.jsx(rne,I({},k,{className:$e(te.indicator,k.className),ownerState:W,style:I({},le,k.style)}));let ut=0;const ot=P.Children.map(u,xe=>{if(!P.isValidElement(xe))return null;const we=xe.props.value===void 0?ut:xe.props.value;ft.set(we,ut);const rt=we===N;return ut+=1,P.cloneElement(xe,I({fullWidth:R==="fullWidth",indicator:rt&&!ae&&Ie,selected:rt,selectionFollowsFocus:v,onChange:g,textColor:w,value:we},ut===1&&N===!1&&!xe.props.tabIndex?{tabIndex:0}:{}))}),ke=xe=>{const we=mt.current,rt=hr(we).activeElement;if(rt.getAttribute("role")!=="tab")return;let It=_==="horizontal"?"ArrowLeft":"ArrowUp",Ke=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&a&&(It="ArrowRight",Ke="ArrowLeft"),xe.key){case It:xe.preventDefault(),Cg(we,rt,fN);break;case Ke:xe.preventDefault(),Cg(we,rt,pN);break;case"Home":xe.preventDefault(),Cg(we,null,pN);break;case"End":xe.preventDefault(),Cg(we,null,fN);break}},lt=Gt();return f.jsxs(ene,I({className:$e(te.root,d),ownerState:W,ref:n,as:p},B,{children:[lt.scrollButtonStart,lt.scrollbarSizeListener,f.jsxs(tne,{className:te.scroller,ownerState:W,style:{overflow:Ee.overflow,[L?`margin${a?"Left":"Right"}`:"marginBottom"]:T?void 0:-Ee.scrollbarWidth},ref:yt,children:[f.jsx(nne,{"aria-label":s,"aria-labelledby":o,"aria-orientation":_==="vertical"?"vertical":null,className:te.flexContainer,ownerState:W,onKeyDown:ke,ref:mt,role:"tablist",children:ot}),ae&&Ie]}),lt.scrollButtonEnd]}))});function ane(t){return wt("MuiTextField",t)}Nt("MuiTextField",["root"]);const sne=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],one={standard:zk,filled:$k,outlined:jk},lne=t=>{const{classes:e}=t;return Rt({root:["root"]},ane,e)},cne=Re(eJ,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),wh=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:a=!1,children:s,className:o,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:_,inputProps:b,InputProps:y,inputRef:v,label:E,maxRows:S,minRows:k,multiline:x=!1,name:w,onBlur:N,onChange:R,onFocus:T,placeholder:B,required:A=!1,rows:L,select:M=!1,SelectProps:O,type:$,value:z,variant:X="outlined"}=r,W=Be(r,sne),te=I({},r,{autoFocus:a,color:l,disabled:u,error:d,fullWidth:m,multiline:x,required:A,select:M,variant:X}),pe=lne(te),ye={};X==="outlined"&&(_&&typeof _.shrink<"u"&&(ye.notched=_.shrink),ye.label=E),M&&((!O||!O.native)&&(ye.id=void 0),ye["aria-describedby"]=void 0);const ae=Eh(g),oe=h&&ae?`${ae}-helper-text`:void 0,le=E&&ae?`${ae}-label`:void 0,H=one[X],Z=f.jsx(H,I({"aria-describedby":oe,autoComplete:i,autoFocus:a,defaultValue:c,fullWidth:m,multiline:x,name:w,rows:L,maxRows:S,minRows:k,type:$,value:z,id:ae,inputRef:v,onBlur:N,onChange:R,onFocus:T,placeholder:B,inputProps:b},ye,y));return f.jsxs(cne,I({className:$e(pe.root,o),disabled:u,error:d,fullWidth:m,ref:n,required:A,color:l,variant:X,ownerState:te},W,{children:[E!=null&&E!==""&&f.jsx(SJ,I({htmlFor:ae,id:le},_,{children:E})),M?f.jsx(Vk,I({"aria-describedby":oe,id:ae,labelId:le,value:z,input:Z},O,{children:s})):Z,h&&f.jsx(aJ,I({id:oe},p,{children:h}))]}))});function une(t){return wt("MuiToggleButton",t)}const Td=Nt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),E6=P.createContext({}),S6=P.createContext(void 0);function dne(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.indexOf(t)>=0:t===e}const pne=["value"],fne=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],mne=t=>{const{classes:e,fullWidth:n,selected:r,disabled:i,size:a,color:s}=t,o={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${Ne(a)}`,s]};return Rt(o,une,e)},hne=Re(Oa,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${Ne(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),I({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${Td.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:je(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Td.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:je(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:je(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:je(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),kn=P.forwardRef(function(e,n){const r=P.useContext(E6),{value:i}=r,a=Be(r,pne),s=P.useContext(S6),o=Yd(I({},a,{selected:dne(e.value,i)}),e),l=Dt({props:o,name:"MuiToggleButton"}),{children:c,className:u,color:d="standard",disabled:p=!1,disableFocusRipple:m=!1,fullWidth:h=!1,onChange:g,onClick:_,selected:b,size:y="medium",value:v}=l,E=Be(l,fne),S=I({},l,{color:d,disabled:p,disableFocusRipple:m,fullWidth:h,size:y}),k=mne(S),x=N=>{_&&(_(N,v),N.defaultPrevented)||g&&g(N,v)},w=s||"";return f.jsx(hne,I({className:$e(a.className,k.root,u,w),disabled:p,focusRipple:!m,ref:n,onClick:x,onChange:g,value:v,ownerState:S,"aria-pressed":b},E,{children:c}))});function gne(t){return wt("MuiToggleButtonGroup",t)}const lr=Nt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),_ne=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],bne=t=>{const{classes:e,orientation:n,fullWidth:r,disabled:i}=t,a={root:["root",n==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${Ne(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Rt(a,gne,e)},yne=Re("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${lr.grouped}`]:e.grouped},{[`& .${lr.grouped}`]:e[`grouped${Ne(n.orientation)}`]},{[`& .${lr.firstButton}`]:e.firstButton},{[`& .${lr.lastButton}`]:e.lastButton},{[`& .${lr.middleButton}`]:e.middleButton},e.root,n.orientation==="vertical"&&e.vertical,n.fullWidth&&e.fullWidth]}})(({ownerState:t,theme:e})=>I({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${lr.grouped}`]:I({},t.orientation==="horizontal"?{[`&.${lr.selected} + .${lr.grouped}.${lr.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${lr.selected} + .${lr.grouped}.${lr.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${lr.firstButton},& .${lr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${lr.lastButton},& .${lr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${lr.firstButton},& .${lr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${lr.lastButton},& .${lr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${lr.lastButton}.${Td.disabled},& .${lr.middleButton}.${Td.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${lr.lastButton}.${Td.disabled},& .${lr.middleButton}.${Td.disabled}`]:{borderTop:"1px solid transparent"}})),Dh=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:a,color:s="standard",disabled:o=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:p="medium",value:m}=r,h=Be(r,_ne),g=I({},r,{disabled:o,fullWidth:c,orientation:d,size:p}),_=bne(g),b=P.useCallback((x,w)=>{if(!u)return;const N=m&&m.indexOf(w);let R;m&&N>=0?(R=m.slice(),R.splice(N,1)):R=m?m.concat(w):[w],u(x,R)},[u,m]),y=P.useCallback((x,w)=>{u&&u(x,m===w?null:w)},[u,m]),v=P.useMemo(()=>({className:_.grouped,onChange:l?y:b,value:m,size:p,fullWidth:c,color:s,disabled:o}),[_.grouped,l,y,b,m,p,c,s,o]),E=nW(i),S=E.length,k=x=>{const w=x===0,N=x===S-1;return w&&N?"":w?_.firstButton:N?_.lastButton:_.middleButton};return f.jsx(yne,I({role:"group",className:$e(_.root,a),ref:n,ownerState:g},h,{children:f.jsx(E6.Provider,{value:v,children:E.map((x,w)=>f.jsx(S6.Provider,{value:k(w),children:x},w))})}))});var vne=Object.defineProperty,Ene=(t,e,n)=>e in t?vne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xg=(t,e,n)=>Ene(t,typeof e!="symbol"?e+"":e,n);const Sne={stringify:t=>t?"true":"false",parse:t=>/^[ty1-9]/i.test(t)},Tne={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{if(typeof window<"u"&&t in window)return window[t];if(typeof global<"u"&&t in global)return global[t]})();return typeof r=="function"?r.bind(n):void 0}},Cne={stringify:t=>JSON.stringify(t),parse:t=>JSON.parse(t)};function xne(t){return t.replace(/([a-z0-9])([A-Z])/g,(e,n,r)=>`${n}-${r.toLowerCase()}`)}function T6(t){return t.replace(/[-:]([a-z])/g,(e,n)=>`${n.toUpperCase()}`)}const kne={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{const i=T6(e);if(typeof n<"u"&&i in n.container)return n.container[i]})();return typeof r=="function"?r.bind(n):void 0}},wne={stringify:t=>`${t}`,parse:t=>parseFloat(t)},Dne={stringify:t=>t,parse:t=>t},$v={string:Dne,number:wne,boolean:Sne,function:Tne,method:kne,json:Cne},uf=Symbol.for("r2wc.render"),kg=Symbol.for("r2wc.connected"),bc=Symbol.for("r2wc.context"),Qi=Symbol.for("r2wc.props");function C6(t,e,n){var r,i,a;e.props||(e.props=t.propTypes?Object.keys(t.propTypes):[]),e.events||(e.events=[]);const s=Array.isArray(e.props)?e.props.slice():Object.keys(e.props),o=Array.isArray(e.events)?e.events.slice():Object.keys(e.events),l={},c={},u={},d={};for(const m of s){l[m]=Array.isArray(e.props)?"string":e.props[m];const h=xne(m);u[m]=h,d[h]=m}for(const m of o)c[m]=Array.isArray(e.events)?{}:e.events[m];class p extends HTMLElement{constructor(){super(),xg(this,a,!0),xg(this,i),xg(this,r,{}),xg(this,"container"),e.shadow?this.container=this.attachShadow({mode:e.shadow}):this.container=this,this[Qi].container=this.container;for(const h of s){const g=u[h],_=this.getAttribute(g),b=l[h],y=b?$v[b]:null;if(b==="method"){const v=T6(g);Object.defineProperty(this[Qi].container,v,{enumerable:!0,configurable:!0,get(){return this[Qi][v]},set(E){this[Qi][v]=E,this[uf]()}}),this[Qi][h]=y.parse(_,g,this)}y!=null&&y.parse&&_&&(this[Qi][h]=y.parse(_,g,this))}for(const h of o)this[Qi][h]=g=>{const _=h.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:g,...c[h]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[kg]=!0,this[uf]()}disconnectedCallback(){this[kg]=!1,this[bc]&&n.unmount(this[bc]),delete this[bc]}attributeChangedCallback(h,g,_){const b=d[h],y=l[b],v=y?$v[y]:null;b in l&&v!=null&&v.parse&&_&&(this[Qi][b]=v.parse(_,h,this),this[uf]())}[(a=kg,i=bc,r=Qi,uf)](){this[kg]&&(this[bc]?n.update(this[bc],this[Qi]):this[bc]=n.mount(this.container,t,this[Qi]))}}for(const m of s){const h=u[m],g=l[m];Object.defineProperty(p.prototype,m,{enumerable:!0,configurable:!0,get(){return this[Qi][m]},set(_){this[Qi][m]=_;const b=g?$v[g]:null;if(b!=null&&b.stringify){const y=b.stringify(_,h,this);this.getAttribute(h)!==y&&this.setAttribute(h,y)}else this[uf]()}})}return p}function Ane(t,e,n){const r=a4.createRoot(t),i=D.createElement(e,n);return r.render(i),{root:r,ReactComponent:e}}function Nne({root:t,ReactComponent:e},n){const r=D.createElement(e,n);t.render(r)}function Rne({root:t}){t.unmount()}function Ine(t,e={}){return C6(t,e,{mount:Ane,update:Nne,unmount:Rne})}const One={},hN=t=>{let e;const n=new Set,r=(u,d)=>{const p=typeof u=="function"?u(e):u;if(!Object.is(p,e)){const m=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(h=>h(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(One?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},x6=t=>t?hN(t):hN;var zv={exports:{}},qv={},Gv={exports:{}},jv={};var gN;function Pne(){if(gN)return jv;gN=1;var t=D;function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue;function o(d,p){var m=p(),h=r({inst:{value:m,getSnapshot:p}}),g=h[0].inst,_=h[1];return a(function(){g.value=m,g.getSnapshot=p,l(g)&&_({inst:g})},[d,m,p]),i(function(){return l(g)&&_({inst:g}),d(function(){l(g)&&_({inst:g})})},[d]),s(m),m}function l(d){var p=d.getSnapshot;d=d.value;try{var m=p();return!n(d,m)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return jv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,jv}var _N;function Lne(){return _N||(_N=1,Gv.exports=Pne()),Gv.exports}var bN;function Mne(){if(bN)return qv;bN=1;var t=D,e=Lne();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,a=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return qv.useSyncExternalStoreWithSelector=function(c,u,d,p,m){var h=a(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function b(k){if(!y){if(y=!0,v=k,k=p(k),m!==void 0&&g.hasValue){var x=g.value;if(m(x,k))return E=x}return E=k}if(x=E,r(v,k))return x;var w=p(k);return m!==void 0&&m(x,w)?(v=k,x):(v=k,E=w)}var y=!1,v,E,S=d===void 0?null:d;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,d,p,m]);var _=i(c,h[0],h[1]);return s(function(){g.hasValue=!0,g.value=_},[_]),l(_),_},qv}var yN;function Fne(){return yN||(yN=1,zv.exports=Mne()),zv.exports}var Bne=Fne();const Une=mu(Bne),k6={},{useDebugValue:$ne}=D,{useSyncExternalStoreWithSelector:zne}=Une;let vN=!1;const qne=t=>t;function Gne(t,e=qne,n){(k6?"production":void 0)!=="production"&&n&&!vN&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),vN=!0);const r=zne(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return $ne(r),r}const EN=t=>{(k6?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?x6(t):t,n=(r,i)=>Gne(e,r,i);return Object.assign(n,e),n},w6=t=>t?EN(t):EN,Cd=600,AC=370,Co="50px",jne=["#DC2626","#EF4444","#F87171","#EC4899","#BE185D","#7C2D12","#EA580C","#F97316","#FBBF24","#D97706","#A16207","#92400E","#059669","#10B981","#22C55E","#65A30D","#166534","#064E3B","#2563EB","#3B82F6","#60A5FA","#0EA5E9","#0891B2","#1E40AF","#7C3AED","#A855F7","#FFFFFF","#000000","#F9FAFB","#111827","","","","",""],Hne={root:{type:"EmailLayout",data:{backdropColor:"#F5F5F5",canvasColor:"#FFFFFF",textColor:"#262626",fontFamily:"MODERN_SANS",linkGlobal:{linkColor:"#2563EB",underline:!0},childrenIds:["block-1770764305315","block-1729890971319"],showVersion:!0}},"block-1729890971319":{type:"CustomEditor",data:{style:{fontSize:16,fontWeight:"normal",padding:{top:16,bottom:16,right:24,left:24},mobilePadding:{top:16,bottom:16,right:24,left:24},borderColor:"#000000",borderTop:0,borderBottom:0,borderLeft:0,borderRight:0},props:{html:"<p>Start bringing your ideas to life <strong>here! 🤩</strong></p>"},editorBackgroundColor:null}},"block-1770764305315":{type:"Wysiwyg",data:{props:{html:"<p>Start bringing your ideas to life 🤟, <strong>double-click</strong> here!</p>"},style:{padding:{top:16,bottom:16,left:24,right:24},mobilePadding:null,fontSize:16,fontWeight:"normal",borderColor:"#000000",borderTop:0,borderBottom:0,borderLeft:0,borderRight:0}}}},ab=["Spacer","Divider","Container",null],Bl=w6(()=>({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null}));function Vne(){return Bl(t=>t.stackUndo.length>0||t.pendingOriginalDocument!==null)}function Wne(){return Bl(t=>t.stackRedo.length>0)}function D6(){return Bl.getState()}function _y(){return Bl.getState().stackUndo}function A6(){return Bl.getState().stackRedo}function Pc(t){Bl.setState(t)}function Yne(){const{pendingUndoTimeout:t}=Bl.getState();t&&clearTimeout(t),Bl.setState({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null})}function N6(t){const e={...t};for(const[n,r]of Object.entries(e))r.type==="CustomEditor"&&(e[n]={...r,type:"Wysiwyg"});return e}const sb=385,Pm="https://maildrill.s3.eu-south-1.amazonaws.com/assets/emailbuilder-placeholder.jpg";let Hv=null;const Kne=2e3;function Ah(){Hv&&clearTimeout(Hv),Hv=setTimeout(()=>{const t=new CustomEvent("email-builder-auto-save",{detail:!0});window.dispatchEvent(t)},Kne)}const R6=()=>({document:N6(JSON.parse(JSON.stringify(Hne))),selectedBlockId:null,selectedSidebarTab:"styles",selectedMainTab:"editor",selectedScreenSize:"desktop",windowWidth:0,inspectorDrawerOpen:!0,samplesDrawerOpen:!0,inspectorDrawerWidth:sb,devMode:!1,imageUploading:{uploading:!1,id:""},disableEdition:!1,disableUpdate:!1,freeMode:!1,minHeight:"calc(100dvh - 65px)",color:{primary:"",secondary:""},galleryImages:!0,imagePlaceholder:Pm,darkMode:!0,colorPicker:{paletteColors:jne,isLocked:!1},tour:!1,stickyHeader:!0,heightContent:"calc(100dvh - 50px)",containerGrow:!0,wysiwygInlineEditingBlockId:null}),Oe=w6(()=>R6()),Qne=t=>{const e=R6();return x6(()=>({...e,...t,document:e.document}))},Xne=D.createContext(Oe),Zne=({store:t=Oe,children:e})=>f.jsx(Xne.Provider,{value:t,children:e});function I6(){const t=Oe(e=>e.document[Oe(n=>n.selectedBlockId)||""]);return t?t.type:null}function SN(t){return Oe.setState({windowWidth:t})}function Jne(){return Oe(t=>t.devMode)}function ere(t){return Oe.setState({devMode:t})}function O6(){return Oe(t=>t.document)}function P6(t){return Oe(e=>e.document[t])}function L6(t){return Oe(e=>e.document[t]?.type)}function tre(t){return Oe(e=>e.selectedBlockId===t)}function Zl(){return Oe(t=>t.selectedBlockId)}function M6(){return Oe(t=>t.wysiwygInlineEditingBlockId)}function TN(t){return Oe.setState({wysiwygInlineEditingBlockId:t})}function wr(){return Oe(t=>t.selectedScreenSize)}function by(){return Oe(t=>t.selectedMainTab)}function wg(t){return t==="preview"&&Ma(null),Oe.setState({inspectorDrawerOpen:t==="editor"}),Oe.setState({selectedMainTab:t})}function so(){return Oe(t=>t.selectedSidebarTab)}function nre(){return Oe(t=>t.inspectorDrawerOpen)}function yy(){return Oe(t=>t.imageUploading)}function rre(){return Oe(t=>t.disableEdition)}function Ma(t){tp();const e=Oe.getState().document[t||""]?.type,n=ab.includes(e||null)?"styles":"block-configuration",r={};return t!==null&&Oe.getState().selectedMainTab==="editor"&&(r.inspectorDrawerOpen=!0),Oe.setState({selectedBlockId:t,selectedSidebarTab:n,...r})}function ire(t){return Oe.setState({selectedSidebarTab:t})}function Jf(t){const e=Oe.getState().document,n=N6(t);return Nh(e,n),Yne(),Oe.setState({document:n,selectedSidebarTab:"styles",selectedBlockId:null})}const NC=(t,e,n=5,r=0)=>{if(t===e)return!0;if(t===null||e===null||t===void 0||e===void 0)return t===e;if(typeof t!=typeof e)return!1;if(typeof t!="object")return t===e;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(r<n){if(!NC(t[s],e[s],n,r+1))return!1}else if(t[s]!==e[s])return!1;return!0}if(r>=n)try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(const s of i){if(!a.includes(s))return!1;const o=t[s],l=e[s];if(!NC(o,l,n,r+1))return!1}return!0},are=1e3;let Lc=null,Rd=null,Id=null;function F6(t){const e=Oe.getState().document;Nh(e,t)}function Nh(t,e){Id=t,Rd=e,Lc&&clearTimeout(Lc),Lc=setTimeout(()=>{B6(Id,Rd),Lc=null,Rd=null,Id=null},are)}function tp(){Lc&&(clearTimeout(Lc),Lc=null),Rd&&Id&&(B6(Id,Rd),Rd=null,Id=null);const{pendingUndoTimeout:t,pendingOriginalDocument:e}=D6();if(t&&(clearTimeout(t),e)){const n=[..._y()];Pc({stackUndo:[...n,JSON.stringify(e)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})}}function B6(t,e){const{pendingUndoTimeout:i,pendingOriginalDocument:a,lastChange:s}=D6();let o=!0,l=null;const c=(m,h)=>{if(m?.type==="Image"&&h?.type==="Image"){const g=m.data.props?.width,_=h.data.props?.width;return g==null&&typeof _=="number"}return!1};if(t===e)return null;const u=Object.keys(t),d=Object.keys(e);if(u.length!==d.length)l=d.find(m=>!t[m])||u.find(m=>!e[m])||null;else for(const m of d){const h=t[m],g=e[m];if(h!==g){if(h&&g&&c(h,g)){o=!1;break}if(!NC(h,g)){l=m;break}}}if(o&&l!==null){const m=Date.now(),h=[..._y()];if(h.length>=50&&h.shift(),l)if(s&&s.blockId===l&&m-s.timestamp<400){i&&clearTimeout(i);const g=setTimeout(()=>{Pc({stackUndo:[...h,JSON.stringify(a)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null,stackRedo:[]})},400);Pc({pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:m}})}else{i&&clearTimeout(i);const g=setTimeout(()=>{Pc({stackUndo:[...h,JSON.stringify(t)],stackRedo:[],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})},400);Pc({pendingOriginalDocument:t,pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:m}})}}return null}function Rh(t,e=!0){const n=Oe.getState().document,r={...n,...t},i=()=>{Oe.setState({document:r}),e&&Promise.resolve().then(()=>{Nh(n,r)}),Ah();const a=new CustomEvent("email-builder-auto-save",{detail:e});window.dispatchEvent(a)};return e?(D.startTransition(i),Oe.getState()):i()}function ob(t){return Oe.setState({selectedScreenSize:t})}function Od(t,e){return Oe.setState({imageUploading:{uploading:t,id:e||""}})}function U6(t){return Oe.setState({disableEdition:t})}function sre(){return Oe.getState().document.root.data}function _u(){return Oe(t=>t.document?.root?.data)}function CN(){tp();const t=Oe.getState().document,e=_y(),n=A6();if(e.length===0)return;const r=[...e],i=r.pop();if(!i)return;const a=Oe.getState().selectedBlockId,s=JSON.parse(i);Pc({stackUndo:r,stackRedo:[...n,JSON.stringify(t)]}),s.root.data.childrenIds.includes(a)||Ma(null),Oe.setState({document:s})}function xN(){tp();const t=Oe.getState().document,e=_y(),n=A6();if(n.length===0)return;const r=[...n],i=r.pop();if(!i)return;const a=Oe.getState().selectedBlockId,s=JSON.parse(i);Pc({stackUndo:[...e,JSON.stringify(t)],stackRedo:r}),s?.root?.data?.childrenIds?.includes(a)||Ma(null),Oe.setState({document:s})}function ore(t){return Oe.setState({color:t})}function lre(t){return Oe.setState({galleryImages:t})}function $6(){return Oe.getState().galleryImages}function cre(t){return Oe.setState({imagePlaceholder:t})}function ure(){return Oe.getState().imagePlaceholder}function dre(t){return Oe.setState({freeMode:t})}function vy(){return Oe.getState().freeMode}function pre(t){return Oe.setState({darkMode:t})}function fre(t){return Oe.setState({heightContent:t})}function mre(t){return Oe.setState({containerGrow:t})}function hre(){return Oe.getState().containerGrow}function lb(t,e,n,r=!0){Ih({draggedId:e,targetId:t})&&console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");const i=Oe.getState().document,a=JSON.parse(JSON.stringify({...i})),s=u=>{if(!u||t===e)return u;const d=u.indexOf(e);return d<0?u:u.toSpliced(d,1)},o=u=>{if(!u||t===e)return u;const d=u.indexOf(t);if(d<0)return u;const p=n==="up"?d:d+1;return u.toSpliced(p,0,e)};let l=null,c=null;for(const[u,d]of Object.entries(a)){const p=d;if(c)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(e)&&(c=u,a[u]={...p,data:{...p.data,childrenIds:s(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(e)&&(c=u,a[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:s(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){let m=!1;const h=p.data.props.columns.map((g,_)=>g?.childrenIds?.includes(e)?(c=`${u}-column-${_}`,m=!0,{...g,childrenIds:s(g.childrenIds)}):g);m&&(a[u]={...p,data:{...p.data,props:{...p.data.props,columns:h}}})}break}}if(l=null,r)for(const[u,d]of Object.entries(a)){const p=d;if(l)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(t)&&(l=u,a[u]={...p,data:{...p.data,childrenIds:o(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(t)&&(l=u,a[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:o(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){const m=p.data.props.columns.map((h,g)=>h?.childrenIds?.includes(t)?(l=`${u}-column-${g}`,{...h,childrenIds:o(h.childrenIds)}):h);a[u]={...p,data:{...p.data,props:{...p.data.props,columns:m}}}}break}}return Rh(a)}function gre({parentId:t,blockId:e,indexArray:n}){if(Ih({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}lb("",e,"down",!1);const r=Oe.getState().document,i=JSON.parse(JSON.stringify({...r}));if(!i[t])return;const a=i[t],s=[...a.data.props.columns||[]];return s[n||0]={childrenIds:[e]},i[t]={type:"ColumnsContainer",data:{...a.data,props:{...a.data.props,columns:s}}},Rh(i)}function _re({parentId:t,blockId:e}){if(Ih({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}lb("",e,"down",!1);const n=Oe.getState().document,r=JSON.parse(JSON.stringify({...n}));if(!r[t])return;const i=r[t];return r[t]={type:"Container",data:{...i.data,props:{...i.data.props,childrenIds:[e]}}},Rh(r)}function Ih({draggedId:t,targetId:e}){if(t===e)return!0;const n=Oe.getState().document;function r(i,a){const s=n[i];if(!s)return!1;let o=[];switch(s.type){case"EmailLayout":o=s.data.childrenIds||[];break;case"Container":o=s.data.props?.childrenIds||[];break;case"ColumnsContainer":s.data.props?.columns&&s.data.props.columns.forEach(l=>{l?.childrenIds&&(o=[...o,...l.childrenIds])});break}if(o.includes(a))return!0;for(const l of o)if(r(l,a))return!0;return!1}return r(t,e)}function bre(){return Oe(t=>t.colorPicker)}function Vv(t){Oe.setState(e=>({colorPicker:{...e.colorPicker,...t}}))}function z6(t,e){const n=Oe.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const a={...n,[t]:i},s=n;D.startTransition(()=>{Oe.setState({document:a}),Promise.resolve().then(()=>{Nh(s,a)})}),Ah()}function yre(t,e){const n=Oe.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const a={...n,[t]:i},s=n;Oe.setState({document:a}),Promise.resolve().then(()=>{Nh(s,a)}),Ah()}function q6(t,e){z6(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function vre(t,e){yre(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function RC(t,e,n,r){Oe.setState(a=>{const s=a.document,o=s[t];if(!o)return a;const l=o.type==="EmailLayout"?{...o,data:{...o.data,childrenIds:r}}:{...o,data:{...o.data,props:{...o.data?.props,childrenIds:r}}};return{...a,document:{...s,[e]:n,[t]:l}}});const i=Oe.getState().document;D.startTransition(()=>{Promise.resolve().then(()=>F6(i))}),Ah()}function Ere(t){Oe.setState(n=>({...n,document:{...n.document,...t}}));const e=Oe.getState().document;D.startTransition(()=>{Promise.resolve().then(()=>F6(e))}),Ah()}function Ul(t,e){z6(t,e)}function G6(t,e){Ul(t,n=>{const r=n.data?.props||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,props:i}}})}function Sre(t,e,n){Ul(t,r=>r.data?.props?.[e]===n?r:{...r,data:{...r.data,props:{...r.data.props,[e]:n}}})}function j6(t,e){Ul(t,n=>{const r=n.data?.style||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,style:i}}})}function Tre(t,e,n){Ul(t,r=>r.data?.style?.[e]===n?r:{...r,data:{...r.data,style:{...r.data.style,[e]:n}}})}function Cre(t,e){G6(t,n=>({...n,...e}))}function xre(t,e){j6(t,n=>({...n,...e}))}const kre=nt(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Wk=nt(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),H6=nt(f.jsx("path",{d:"M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z"}),"AlignHorizontalLeftOutlined"),V6=nt(f.jsx("path",{d:"M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z"}),"AlignHorizontalRightOutlined"),W6=nt(f.jsx("path",{d:"M22 22H2v-2h20zM10 2H7v16h3zm7 6h-3v10h3z"}),"AlignVerticalBottomOutlined"),Y6=nt(f.jsx("path",{d:"M22 2v2H2V2zM7 22h3V6H7zm7-6h3V6h-3z"}),"AlignVerticalTopOutlined"),wre=nt(f.jsx("path",{d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18z"}),"AspectRatioOutlined"),Dre=nt(f.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),kN=nt(f.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome"),Are=nt(f.jsx("path",{d:"M9 11H7v2h2zm4 4h-2v2h2zM9 3H7v2h2zm4 8h-2v2h2zM5 3H3v2h2zm8 4h-2v2h2zm4 4h-2v2h2zm-4-8h-2v2h2zm4 0h-2v2h2zm2 10h2v-2h-2zm0 4h2v-2h-2zM5 7H3v2h2zm14-4v2h2V3zm0 6h2V7h-2zM5 11H3v2h2zM3 21h18v-2H3zm2-6H3v2h2z"}),"BorderBottomOutlined"),Nre=nt(f.jsx("path",{d:"M11 21h2v-2h-2zm0-4h2v-2h-2zm0-12h2V3h-2zm0 4h2V7h-2zm0 4h2v-2h-2zm-4 8h2v-2H7zM7 5h2V3H7zm0 8h2v-2H7zm-4 8h2V3H3zM19 9h2V7h-2zm-4 12h2v-2h-2zm4-4h2v-2h-2zm0-14v2h2V3zm0 10h2v-2h-2zm0 8h2v-2h-2zm-4-8h2v-2h-2zm0-8h2V3h-2z"}),"BorderLeftOutlined"),Rre=nt(f.jsx("path",{d:"M13 7h-2v2h2zm0 4h-2v2h2zm4 0h-2v2h2zM3 3v18h18V3zm16 16H5V5h14zm-6-4h-2v2h2zm-4-4H7v2h2z"}),"BorderOuterOutlined"),Ire=nt(f.jsx("path",{d:"M7 21h2v-2H7zM3 5h2V3H3zm4 0h2V3H7zm0 8h2v-2H7zm-4 8h2v-2H3zm8 0h2v-2h-2zm-8-8h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm8 8h2v-2h-2zm4-4h2v-2h-2zm4-10v18h2V3zm-4 18h2v-2h-2zm0-16h2V3h-2zm-4 8h2v-2h-2zm0-8h2V3h-2zm0 4h2V7h-2z"}),"BorderRightOutlined"),Ore=nt(f.jsx("path",{d:"M7 21h2v-2H7zm0-8h2v-2H7zm4 0h2v-2h-2zm0 8h2v-2h-2zm-8-4h2v-2H3zm0 4h2v-2H3zm0-8h2v-2H3zm0-4h2V7H3zm8 8h2v-2h-2zm8-8h2V7h-2zm0 4h2v-2h-2zM3 3v2h18V3zm16 14h2v-2h-2zm-4 4h2v-2h-2zM11 9h2V7h-2zm8 12h2v-2h-2zm-4-8h2v-2h-2z"}),"BorderTopOutlined"),Yk=nt(f.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),wN=nt(f.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopyOutlined"),Pre=nt(f.jsx("path",{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 10H5V8h14z"}),"Crop32Outlined"),Lre=nt(f.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Mre=nt(f.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Fre=nt(f.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),K6=nt(f.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),Bre=nt(f.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenterOutlined"),Q6=nt(f.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),X6=nt(f.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Ure=nt(f.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeftOutlined"),Z6=nt(f.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),$re=nt(f.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRightOutlined"),J6=nt(f.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),e9=nt(f.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),t9=nt(f.jsx("path",{d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27z"}),"FormatColorReset"),n9=nt(f.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),r9=nt(f.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),i9=nt(f.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),a9=nt(f.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),zre=nt(f.jsx("path",{d:"M10.27 12h3.46c.93 0 1.63-.83 1.48-1.75l-.3-1.79C14.67 7.04 13.44 6 12 6S9.33 7.04 9.09 8.47l-.3 1.79c-.15.91.55 1.74 1.48 1.74m-8.61-.89c-.13.26-.18.57-.1.88.16.69.76 1.03 1.53 1h1.95c.83 0 1.51-.58 1.51-1.29 0-.14-.03-.27-.07-.4-.01-.03-.01-.05.01-.08.09-.16.14-.34.14-.53 0-.31-.14-.6-.36-.82-.03-.03-.03-.06-.02-.1.07-.2.07-.43.01-.65-.16-.43-.55-.72-.99-.74-.03 0-.05-.01-.07-.03-.17-.21-.48-.35-.83-.35-.3 0-.57.1-.75.26-.03.03-.06.03-.09.02-.14-.06-.3-.09-.46-.09-.65 0-1.18.49-1.24 1.12 0 .02-.01.04-.03.06-.29.26-.46.65-.41 1.05.03.22.12.43.25.6.03.02.03.06.02.09m14.58 2.54c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74m-15.02.93C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58m21.56 0c-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57c0-.81-.48-1.53-1.22-1.85M22 11v-.5c0-1.1-.9-2-2-2h-2c-.42 0-.65.48-.39.81l.7.63c-.19.31-.31.67-.31 1.06 0 1.1.9 2 2 2s2-.9 2-2"}),"Groups2"),s9=nt(f.jsx("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"HeightOutlined"),qre=nt(f.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRuleOutlined"),Gre=nt(f.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),o9=nt(f.jsx("path",{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9"}),"ImageSearchOutlined"),jre=nt(f.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zm-7-2h2v-3h3V9h-3V6h-2v3h-3v2h3z"}),"LibraryAddOutlined"),l9=nt(f.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Oh=nt(f.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),Ph=nt(f.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen"),Hre=nt(f.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H4V5h16z"}),"MonitorOutlined"),Vre=nt(f.jsx("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined"),Wre=nt(f.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphoneOutlined"),c9=nt(f.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"PhotoOutlined"),Yre=nt(f.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),df=nt(f.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCorner"),Kre=nt(f.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCornerOutlined"),Qre=nt(f.jsx("path",{d:"M22 9v6c0 1.1-.9 2-2 2h-1v-2h1V9H4v6h6v2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2m-7.5 10 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62zm-2.5 5 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62z"}),"SmartButtonOutlined"),DN=nt(f.jsx("path",{d:"M18 9v4H6V9H4v6h16V9z"}),"SpaceBar"),Xre=nt(f.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFieldsOutlined"),Zre=nt(f.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottomOutlined"),Jre=nt(f.jsx("path",{d:"M8 19h3v4h2v-4h3l-4-4zm8-14h-3V1h-2v4H8l4 4zM4 11v2h16v-2z"}),"VerticalAlignCenterOutlined"),eie=nt(f.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTopOutlined"),tie=nt(f.jsx("path",{d:"M3 5v14h18V5zm5.33 12H5V7h3.33zm5.34 0h-3.33V7h3.33zM19 17h-3.33V7H19z"}),"ViewColumnOutlined"),nie=nt(f.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M4 18V6h2v12zm4 0V6h8v12zm12 0h-2V6h2z"}),"WidthWideOutlined");var bn;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},t.getValidEnumValues=i=>{const a=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},t.find=(i,a)=>{for(const s of i)if(a(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(bn||(bn={}));var IC;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(IC||(IC={}));const Je=bn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=t=>{switch(typeof t){case"undefined":return Je.undefined;case"string":return Je.string;case"number":return Number.isNaN(t)?Je.nan:Je.number;case"boolean":return Je.boolean;case"function":return Je.function;case"bigint":return Je.bigint;case"symbol":return Je.symbol;case"object":return Array.isArray(t)?Je.array:t===null?Je.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Je.promise:typeof Map<"u"&&t instanceof Map?Je.map:typeof Set<"u"&&t instanceof Set?Je.set:typeof Date<"u"&&t instanceof Date?Je.date:Je.object;default:return Je.unknown}},Me=bn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),rie=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class sa extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof sa))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sa.create=t=>new sa(t);const np=(t,e)=>{let n;switch(t.code){case Me.invalid_type:t.received===Je.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,bn.jsonStringifyReplacer)}`;break;case Me.unrecognized_keys:n=`Unrecognized key(s) in object: ${bn.joinValues(t.keys,", ")}`;break;case Me.invalid_union:n="Invalid input";break;case Me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${bn.joinValues(t.options)}`;break;case Me.invalid_enum_value:n=`Invalid enum value. Expected ${bn.joinValues(t.options)}, received '${t.received}'`;break;case Me.invalid_arguments:n="Invalid function arguments";break;case Me.invalid_return_type:n="Invalid function return type";break;case Me.invalid_date:n="Invalid date";break;case Me.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:bn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Me.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Me.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Me.custom:n="Invalid input";break;case Me.invalid_intersection_types:n="Intersection results could not be merged";break;case Me.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Me.not_finite:n="Number must be finite";break;default:n=e.defaultError,bn.assertNever(t)}return{message:n}};let u9=np;function iie(t){u9=t}function cb(){return u9}const ub=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,a=[...n,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:e,defaultError:o}).message;return{...i,path:a,message:o}},aie=[];function We(t,e){const n=cb(),r=ub({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===np?void 0:np].filter(i=>!!i)});t.common.issues.push(r)}class fi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Ot;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const a=await i.key,s=await i.value;r.push({key:a,value:s})}return fi.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return Ot;a.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[a.value]=s.value)}return{status:e.value,value:r}}}const Ot=Object.freeze({status:"aborted"}),xd=t=>({status:"dirty",value:t}),wi=t=>({status:"valid",value:t}),OC=t=>t.status==="aborted",PC=t=>t.status==="dirty",Jc=t=>t.status==="valid",Lm=t=>typeof Promise<"u"&&t instanceof Promise;var ht;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ht||(ht={}));class Js{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const AN=(t,e)=>{if(Jc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sa(t.common.issues);return this._error=n,this._error}}};function Kt(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,o)=>{const{message:l}=t;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}class tn{get description(){return this._def.description}_getType(e){return wo(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:wo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fi,ctx:{common:e.parent.common,data:e.data,parsedType:wo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Lm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)},i=this._parseSync({data:e,path:r.path,parent:r});return AN(r,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Jc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Jc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)},i=this._parse({data:e,path:r.path,parent:r}),a=await(Lm(i)?i:Promise.resolve(i));return AN(r,a)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const s=e(i),o=()=>a.addIssue({code:Me.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new fs({schema:this,typeName:Lt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Vs.create(this,this._def)}nullable(){return Gl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return os.create(this)}promise(){return ip.create(this,this._def)}or(e){return Um.create([this,e],this._def)}and(e){return $m.create(this,e,this._def)}transform(e){return new fs({...Kt(this._def),schema:this,typeName:Lt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Hm({...Kt(this._def),innerType:this,defaultValue:n,typeName:Lt.ZodDefault})}brand(){return new Kk({typeName:Lt.ZodBranded,type:this,...Kt(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Vm({...Kt(this._def),innerType:this,catchValue:n,typeName:Lt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Lh.create(this,e)}readonly(){return Wm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sie=/^c[^\s-]{8,}$/i,oie=/^[0-9a-z]+$/,lie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uie=/^[a-z0-9_-]{21}$/i,die=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pie=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fie=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mie="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wv;const hie=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gie=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_ie=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bie=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yie=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vie=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d9="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Eie=new RegExp(`^${d9}$`);function p9(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Sie(t){return new RegExp(`^${p9(t)}$`)}function f9(t){let e=`${d9}T${p9(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Tie(t,e){return!!((e==="v4"||!e)&&hie.test(t)||(e==="v6"||!e)&&_ie.test(t))}function Cie(t,e){if(!die.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function xie(t,e){return!!((e==="v4"||!e)&&gie.test(t)||(e==="v6"||!e)&&bie.test(t))}class rs extends tn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Je.string){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.string,received:a.parsedType}),Ot}const r=new fi;let i;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const s=e.data.length>a.value,o=e.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(e,i),s?We(i,{code:Me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&We(i,{code:Me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")fie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"email",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Wv||(Wv=new RegExp(mie,"u")),Wv.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"emoji",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")cie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"uuid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")uie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"nanoid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")sie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cuid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")oie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cuid2",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")lie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"ulid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),We(i,{validation:"url",code:Me.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"regex",code:Me.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?f9(a).test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Eie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Sie(a).test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?pie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"duration",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Tie(e.data,a.version)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"ip",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Cie(e.data,a.alg)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"jwt",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?xie(e.data,a.version)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cidr",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?yie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"base64",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?vie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"base64url",code:Me.invalid_string,message:a.message}),r.dirty()):bn.assertNever(a);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Me.invalid_string,...ht.errToObj(r)})}_addCheck(e){return new rs({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ht.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ht.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ht.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ht.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ht.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ht.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ht.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ht.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ht.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ht.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ht.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ht.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ht.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ht.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ht.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ht.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ht.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...ht.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ht.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ht.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ht.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ht.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ht.errToObj(n)})}nonempty(e){return this.min(1,ht.errToObj(e))}trim(){return new rs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}rs.create=t=>new rs({checks:[],typeName:Lt.ZodString,coerce:t?.coerce??!1,...Kt(t)});function kie(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return a%s/10**i}class $l extends tn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Je.number){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.number,received:a.parsedType}),Ot}let r;const i=new fi;for(const a of this._def.checks)a.kind==="int"?bn.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),We(r,{code:Me.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?kie(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_finite,message:a.message}),i.dirty()):bn.assertNever(a);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ht.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ht.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ht.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ht.toString(n))}setLimit(e,n,r,i){return new $l({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ht.toString(i)}]})}_addCheck(e){return new $l({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ht.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ht.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&bn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}$l.create=t=>new $l({checks:[],typeName:Lt.ZodNumber,coerce:t?.coerce||!1,...Kt(t)});class zl extends tn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Je.bigint)return this._getInvalidInput(e);let r;const i=new fi;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):bn.assertNever(a);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return We(n,{code:Me.invalid_type,expected:Je.bigint,received:n.parsedType}),Ot}gte(e,n){return this.setLimit("min",e,!0,ht.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ht.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ht.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ht.toString(n))}setLimit(e,n,r,i){return new zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ht.toString(i)}]})}_addCheck(e){return new zl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}zl.create=t=>new zl({checks:[],typeName:Lt.ZodBigInt,coerce:t?.coerce??!1,...Kt(t)});class Mm extends tn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Je.boolean){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.boolean,received:r.parsedType}),Ot}return wi(e.data)}}Mm.create=t=>new Mm({typeName:Lt.ZodBoolean,coerce:t?.coerce||!1,...Kt(t)});class eu extends tn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Je.date){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.date,received:a.parsedType}),Ot}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_date}),Ot}const r=new fi;let i;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):bn.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ht.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ht.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}eu.create=t=>new eu({checks:[],coerce:t?.coerce||!1,typeName:Lt.ZodDate,...Kt(t)});class db extends tn{_parse(e){if(this._getType(e)!==Je.symbol){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.symbol,received:r.parsedType}),Ot}return wi(e.data)}}db.create=t=>new db({typeName:Lt.ZodSymbol,...Kt(t)});class Fm extends tn{_parse(e){if(this._getType(e)!==Je.undefined){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.undefined,received:r.parsedType}),Ot}return wi(e.data)}}Fm.create=t=>new Fm({typeName:Lt.ZodUndefined,...Kt(t)});class Bm extends tn{_parse(e){if(this._getType(e)!==Je.null){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.null,received:r.parsedType}),Ot}return wi(e.data)}}Bm.create=t=>new Bm({typeName:Lt.ZodNull,...Kt(t)});class rp extends tn{constructor(){super(...arguments),this._any=!0}_parse(e){return wi(e.data)}}rp.create=t=>new rp({typeName:Lt.ZodAny,...Kt(t)});class Gc extends tn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wi(e.data)}}Gc.create=t=>new Gc({typeName:Lt.ZodUnknown,...Kt(t)});class Bo extends tn{_parse(e){const n=this._getOrReturnCtx(e);return We(n,{code:Me.invalid_type,expected:Je.never,received:n.parsedType}),Ot}}Bo.create=t=>new Bo({typeName:Lt.ZodNever,...Kt(t)});class pb extends tn{_parse(e){if(this._getType(e)!==Je.undefined){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.void,received:r.parsedType}),Ot}return wi(e.data)}}pb.create=t=>new pb({typeName:Lt.ZodVoid,...Kt(t)});class os extends tn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Je.array)return We(n,{code:Me.invalid_type,expected:Je.array,received:n.parsedType}),Ot;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(s||o)&&(We(n,{code:s?Me.too_big:Me.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(We(n,{code:Me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(We(n,{code:Me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>i.type._parseAsync(new Js(n,s,n.path,o)))).then(s=>fi.mergeArray(r,s));const a=[...n.data].map((s,o)=>i.type._parseSync(new Js(n,s,n.path,o)));return fi.mergeArray(r,a)}get element(){return this._def.type}min(e,n){return new os({...this._def,minLength:{value:e,message:ht.toString(n)}})}max(e,n){return new os({...this._def,maxLength:{value:e,message:ht.toString(n)}})}length(e,n){return new os({...this._def,exactLength:{value:e,message:ht.toString(n)}})}nonempty(e){return this.min(1,e)}}os.create=(t,e)=>new os({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Lt.ZodArray,...Kt(e)});function dd(t){if(t instanceof pr){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Vs.create(dd(r))}return new pr({...t._def,shape:()=>e})}else return t instanceof os?new os({...t._def,type:dd(t.element)}):t instanceof Vs?Vs.create(dd(t.unwrap())):t instanceof Gl?Gl.create(dd(t.unwrap())):t instanceof eo?eo.create(t.items.map(e=>dd(e))):t}class pr extends tn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=bn.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Je.object){const c=this._getOrReturnCtx(e);return We(c,{code:Me.invalid_type,expected:Je.object,received:c.parsedType}),Ot}const{status:r,ctx:i}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Bo&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const u=a[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Js(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Bo){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(We(i,{code:Me.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Js(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>fi.mergeObjectSync(r,c)):fi.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ht.errToObj,new pr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ht.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new pr({...this._def,unknownKeys:"strip"})}passthrough(){return new pr({...this._def,unknownKeys:"passthrough"})}extend(e){return new pr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new pr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Lt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new pr({...this._def,catchall:e})}pick(e){const n={};for(const r of bn.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new pr({...this._def,shape:()=>n})}omit(e){const n={};for(const r of bn.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new pr({...this._def,shape:()=>n})}deepPartial(){return dd(this)}partial(e){const n={};for(const r of bn.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new pr({...this._def,shape:()=>n})}required(e){const n={};for(const r of bn.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Vs;)a=a._def.innerType;n[r]=a}return new pr({...this._def,shape:()=>n})}keyof(){return m9(bn.objectKeys(this.shape))}}pr.create=(t,e)=>new pr({shape:()=>t,unknownKeys:"strip",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});pr.strictCreate=(t,e)=>new pr({shape:()=>t,unknownKeys:"strict",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});pr.lazycreate=(t,e)=>new pr({shape:t,unknownKeys:"strip",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});class Um extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new sa(o.ctx.common.issues));return We(n,{code:Me.invalid_union,unionErrors:s}),Ot}if(n.common.async)return Promise.all(r.map(async a=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(l=>new sa(l));return We(n,{code:Me.invalid_union,unionErrors:o}),Ot}}get options(){return this._def.options}}Um.create=(t,e)=>new Um({options:t,typeName:Lt.ZodUnion,...Kt(e)});const xo=t=>t instanceof qm?xo(t.schema):t instanceof fs?xo(t.innerType()):t instanceof Gm?[t.value]:t instanceof ql?t.options:t instanceof jm?bn.objectValues(t.enum):t instanceof Hm?xo(t._def.innerType):t instanceof Fm?[void 0]:t instanceof Bm?[null]:t instanceof Vs?[void 0,...xo(t.unwrap())]:t instanceof Gl?[null,...xo(t.unwrap())]:t instanceof Kk||t instanceof Wm?xo(t.unwrap()):t instanceof Vm?xo(t._def.innerType):[];class Ey extends tn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.object)return We(n,{code:Me.invalid_type,expected:Je.object,received:n.parsedType}),Ot;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(We(n,{code:Me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ot)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const a of n){const s=xo(a.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of s){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,a)}}return new Ey({typeName:Lt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Kt(r)})}}function LC(t,e){const n=wo(t),r=wo(e);if(t===e)return{valid:!0,data:t};if(n===Je.object&&r===Je.object){const i=bn.objectKeys(e),a=bn.objectKeys(t).filter(o=>i.indexOf(o)!==-1),s={...t,...e};for(const o of a){const l=LC(t[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(n===Je.array&&r===Je.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let a=0;a<t.length;a++){const s=t[a],o=e[a],l=LC(s,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Je.date&&r===Je.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class $m extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(a,s)=>{if(OC(a)||OC(s))return Ot;const o=LC(a.value,s.value);return o.valid?((PC(a)||PC(s))&&n.dirty(),{status:n.value,value:o.data}):(We(r,{code:Me.invalid_intersection_types}),Ot)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,s])=>i(a,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}$m.create=(t,e,n)=>new $m({left:t,right:e,typeName:Lt.ZodIntersection,...Kt(n)});class eo extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.array)return We(r,{code:Me.invalid_type,expected:Je.array,received:r.parsedType}),Ot;if(r.data.length<this._def.items.length)return We(r,{code:Me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ot;!this._def.rest&&r.data.length>this._def.items.length&&(We(r,{code:Me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Js(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(a).then(s=>fi.mergeArray(n,s)):fi.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new eo({...this._def,rest:e})}}eo.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new eo({items:t,typeName:Lt.ZodTuple,rest:null,...Kt(e)})};class zm extends tn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.object)return We(r,{code:Me.invalid_type,expected:Je.object,received:r.parsedType}),Ot;const i=[],a=this._def.keyType,s=this._def.valueType;for(const o in r.data)i.push({key:a._parse(new Js(r,o,r.path,o)),value:s._parse(new Js(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?fi.mergeObjectAsync(n,i):fi.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof tn?new zm({keyType:e,valueType:n,typeName:Lt.ZodRecord,...Kt(r)}):new zm({keyType:rs.create(),valueType:e,typeName:Lt.ZodRecord,...Kt(n)})}}class fb extends tn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.map)return We(r,{code:Me.invalid_type,expected:Je.map,received:r.parsedType}),Ot;const i=this._def.keyType,a=this._def.valueType,s=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new Js(r,o,r.path,[c,"key"])),value:a._parse(new Js(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ot;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ot;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}fb.create=(t,e,n)=>new fb({valueType:e,keyType:t,typeName:Lt.ZodMap,...Kt(n)});class tu extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.set)return We(r,{code:Me.invalid_type,expected:Je.set,received:r.parsedType}),Ot;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(We(r,{code:Me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(We(r,{code:Me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ot;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>a._parse(new Js(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,n){return new tu({...this._def,minSize:{value:e,message:ht.toString(n)}})}max(e,n){return new tu({...this._def,maxSize:{value:e,message:ht.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}tu.create=(t,e)=>new tu({valueType:t,minSize:null,maxSize:null,typeName:Lt.ZodSet,...Kt(e)});class Pd extends tn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.function)return We(n,{code:Me.invalid_type,expected:Je.function,received:n.parsedType}),Ot;function r(o,l){return ub({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cb(),np].filter(c=>!!c),issueData:{code:Me.invalid_arguments,argumentsError:l}})}function i(o,l){return ub({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cb(),np].filter(c=>!!c),issueData:{code:Me.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ip){const o=this;return wi(async function(...l){const c=new sa([]),u=await o._def.args.parseAsync(l,a).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(s,this,u);return await o._def.returns._def.type.parseAsync(d,a).catch(m=>{throw c.addIssue(i(d,m)),c})})}else{const o=this;return wi(function(...l){const c=o._def.args.safeParse(l,a);if(!c.success)throw new sa([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=o._def.returns.safeParse(u,a);if(!d.success)throw new sa([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pd({...this._def,args:eo.create(e).rest(Gc.create())})}returns(e){return new Pd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Pd({args:e||eo.create([]).rest(Gc.create()),returns:n||Gc.create(),typeName:Lt.ZodFunction,...Kt(r)})}}class qm extends tn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qm.create=(t,e)=>new qm({getter:t,typeName:Lt.ZodLazy,...Kt(e)});class Gm extends tn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return We(n,{received:n.data,code:Me.invalid_literal,expected:this._def.value}),Ot}return{status:"valid",value:e.data}}get value(){return this._def.value}}Gm.create=(t,e)=>new Gm({value:t,typeName:Lt.ZodLiteral,...Kt(e)});function m9(t,e){return new ql({values:t,typeName:Lt.ZodEnum,...Kt(e)})}class ql extends tn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return We(n,{expected:bn.joinValues(r),received:n.parsedType,code:Me.invalid_type}),Ot}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return We(n,{received:n.data,code:Me.invalid_enum_value,options:r}),Ot}return wi(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ql.create(e,{...this._def,...n})}exclude(e,n=this._def){return ql.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ql.create=m9;class jm extends tn{_parse(e){const n=bn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Je.string&&r.parsedType!==Je.number){const i=bn.objectValues(n);return We(r,{expected:bn.joinValues(i),received:r.parsedType,code:Me.invalid_type}),Ot}if(this._cache||(this._cache=new Set(bn.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=bn.objectValues(n);return We(r,{received:r.data,code:Me.invalid_enum_value,options:i}),Ot}return wi(e.data)}get enum(){return this._def.values}}jm.create=(t,e)=>new jm({values:t,typeName:Lt.ZodNativeEnum,...Kt(e)});class ip extends tn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.promise&&n.common.async===!1)return We(n,{code:Me.invalid_type,expected:Je.promise,received:n.parsedType}),Ot;const r=n.parsedType===Je.promise?n.data:Promise.resolve(n.data);return wi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ip.create=(t,e)=>new ip({type:t,typeName:Lt.ZodPromise,...Kt(e)});class fs extends tn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Lt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:s=>{We(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(r.data,a);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return Ot;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ot:l.status==="dirty"||n.value==="dirty"?xd(l.value):l});{if(n.value==="aborted")return Ot;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?Ot:o.status==="dirty"||n.value==="dirty"?xd(o.value):o}}if(i.type==="refinement"){const s=o=>{const l=i.refinement(o,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ot:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Ot:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Jc(s))return Ot;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Jc(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:n.value,value:o})):Ot);bn.assertNever(i)}}fs.create=(t,e,n)=>new fs({schema:t,typeName:Lt.ZodEffects,effect:e,...Kt(n)});fs.createWithPreprocess=(t,e,n)=>new fs({schema:e,effect:{type:"preprocess",transform:t},typeName:Lt.ZodEffects,...Kt(n)});class Vs extends tn{_parse(e){return this._getType(e)===Je.undefined?wi(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Vs.create=(t,e)=>new Vs({innerType:t,typeName:Lt.ZodOptional,...Kt(e)});class Gl extends tn{_parse(e){return this._getType(e)===Je.null?wi(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gl.create=(t,e)=>new Gl({innerType:t,typeName:Lt.ZodNullable,...Kt(e)});class Hm extends tn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Je.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Hm.create=(t,e)=>new Hm({innerType:t,typeName:Lt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Kt(e)});class Vm extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Lm(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new sa(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Vm.create=(t,e)=>new Vm({innerType:t,typeName:Lt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Kt(e)});class mb extends tn{_parse(e){if(this._getType(e)!==Je.nan){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.nan,received:r.parsedType}),Ot}return{status:"valid",value:e.data}}}mb.create=t=>new mb({typeName:Lt.ZodNaN,...Kt(t)});const wie=Symbol("zod_brand");class Kk extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Lh extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ot:a.status==="dirty"?(n.dirty(),xd(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ot:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new Lh({in:e,out:n,typeName:Lt.ZodPipeline})}}class Wm extends tn{_parse(e){const n=this._def.innerType._parse(e),r=i=>(Jc(i)&&(i.value=Object.freeze(i.value)),i);return Lm(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Wm.create=(t,e)=>new Wm({innerType:t,typeName:Lt.ZodReadonly,...Kt(e)});function NN(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function h9(t,e={},n){return t?rp.create().superRefine((r,i)=>{const a=t(r);if(a instanceof Promise)return a.then(s=>{if(!s){const o=NN(e,r),l=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:l})}});if(!a){const s=NN(e,r),o=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:o})}}):rp.create()}const Die={object:pr.lazycreate};var Lt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Lt||(Lt={}));const Aie=(t,e={message:`Input not instance of ${t.name}`})=>h9(n=>n instanceof t,e),kt=rs.create,Fe=$l.create,Nie=mb.create,Rie=zl.create,Uo=Mm.create,Iie=eu.create,Oie=db.create,Pie=Fm.create,Lie=Bm.create,Mie=rp.create,Fie=Gc.create,Bie=Bo.create,Uie=pb.create,jc=os.create,xt=pr.create,$ie=pr.strictCreate,Hc=Um.create,g9=Ey.create,zie=$m.create,Qk=eo.create,_9=zm.create,qie=fb.create,Gie=tu.create,jie=Pd.create,Hie=qm.create,hb=Gm.create,jn=ql.create,Vie=jm.create,Wie=ip.create,RN=fs.create,Yie=Vs.create,Kie=Gl.create,Qie=fs.createWithPreprocess,Xie=Lh.create,Zie=()=>kt().optional(),Jie=()=>Fe().optional(),eae=()=>Uo().optional(),tae={string:(t=>rs.create({...t,coerce:!0})),number:(t=>$l.create({...t,coerce:!0})),boolean:(t=>Mm.create({...t,coerce:!0})),bigint:(t=>zl.create({...t,coerce:!0})),date:(t=>eu.create({...t,coerce:!0}))},nae=Ot,Ln=Object.freeze(Object.defineProperty({__proto__:null,BRAND:wie,DIRTY:xd,EMPTY_PATH:aie,INVALID:Ot,NEVER:nae,OK:wi,ParseStatus:fi,Schema:tn,ZodAny:rp,ZodArray:os,ZodBigInt:zl,ZodBoolean:Mm,ZodBranded:Kk,ZodCatch:Vm,ZodDate:eu,ZodDefault:Hm,ZodDiscriminatedUnion:Ey,ZodEffects:fs,ZodEnum:ql,ZodError:sa,get ZodFirstPartyTypeKind(){return Lt},ZodFunction:Pd,ZodIntersection:$m,ZodIssueCode:Me,ZodLazy:qm,ZodLiteral:Gm,ZodMap:fb,ZodNaN:mb,ZodNativeEnum:jm,ZodNever:Bo,ZodNull:Bm,ZodNullable:Gl,ZodNumber:$l,ZodObject:pr,ZodOptional:Vs,ZodParsedType:Je,ZodPipeline:Lh,ZodPromise:ip,ZodReadonly:Wm,ZodRecord:zm,ZodSchema:tn,ZodSet:tu,ZodString:rs,ZodSymbol:db,ZodTransformer:fs,ZodTuple:eo,ZodType:tn,ZodUndefined:Fm,ZodUnion:Um,ZodUnknown:Gc,ZodVoid:pb,addIssueToContext:We,any:Mie,array:jc,bigint:Rie,boolean:Uo,coerce:tae,custom:h9,date:Iie,datetimeRegex:f9,defaultErrorMap:np,discriminatedUnion:g9,effect:RN,enum:jn,function:jie,getErrorMap:cb,getParsedType:wo,instanceof:Aie,intersection:zie,isAborted:OC,isAsync:Lm,isDirty:PC,isValid:Jc,late:Die,lazy:Hie,literal:hb,makeIssue:ub,map:qie,nan:Nie,nativeEnum:Vie,never:Bie,null:Lie,nullable:Kie,number:Fe,object:xt,get objectUtil(){return IC},oboolean:eae,onumber:Jie,optional:Yie,ostring:Zie,pipeline:Xie,preprocess:Qie,promise:Wie,quotelessJson:rie,record:_9,set:Gie,setErrorMap:iie,strictObject:$ie,string:kt,symbol:Oie,transformer:RN,tuple:Qk,undefined:Pie,union:Hc,unknown:Fie,get util(){return bn},void:Uie},Symbol.toStringTag,{value:"Module"}));function Dg(t,e){return!t||t&&t[e]===0?"initial":t[e]!==void 0?`${t[e]}px solid ${t?.color??"black"}`:"initial"}function di({className:t,background:e,backgroundColor:n,padding:r={top:0,right:0,bottom:0,left:0},width:i,align:a,children:s,border:o,borderRadius:l,isParent:c=!0,overflow:u="visible"}){const d=t?`a${t}`:"";return f.jsx("table",{className:t,width:i,border:0,cellSpacing:"0",cellPadding:"0",style:{width:i,minWidth:i,backgroundColor:n??void 0,background:e??void 0,borderRadius:l??"initial",borderTop:Dg(o,"top"),borderBottom:Dg(o,"bottom"),borderLeft:Dg(o,"left"),borderRight:Dg(o,"right"),overflow:u,borderCollapse:"initial"},children:f.jsxs("tbody",{children:[f.jsxs("tr",{height:r.top,style:{height:`${r.top}px`},className:c?`t${t}`:`it${t}`,children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),f.jsxs("tr",{children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{className:d,align:a,children:s}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),f.jsxs("tr",{height:r.bottom,style:{height:`${r.bottom}px`},className:c?`b${t}`:`ib${t}`,children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]})]})})}const Ko=(t,e)=>{const n=/#([0-9a-fA-F]{3,6})\b/;return n.test(t)?t.replace(n,e):t.trim()===""?e:t.replace(/^(\S+)/,`$1 ${e}`)};function gb(t){const e=t?.shape??"rectangle";if(typeof e=="string")switch(e){case"rectangle":return;case"pill":return 9999;default:return}else if(typeof e=="object"&&e!==null){const{topLeft:n=0,topRight:r=0,bottomLeft:i=0,bottomRight:a=0}=e;return`${r}px ${n}px ${a}px ${i}px`}}function b9(t,e){const n=new RegExp(`${e}\\s*:\\s*([^;"']+)`,"gi"),r=[];let i;for(;(i=n.exec(t))!==null;)r.push(i[1].trim());return r}function is(t){const n=new DOMParser().parseFromString(t,"text/html");return n.body.querySelectorAll("*").forEach(r=>{r.childNodes.forEach(i=>{if(i.nodeType===Node.TEXT_NODE){let a=i.textContent??"";a=a.replace(/ {2,}/g,o=>" ".repeat(o.length-1)+" ");const s=document.createElement("span");s.innerHTML=a,r.replaceChild(s.firstChild,i)}})}),n.body.innerHTML}function rae(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=(e>>>0)*16777619;return e>>>0}function iae(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(t===0)return"a";let n="";for(;t>0;)n=e[t%62]+n,t=Math.floor(t/62);return n}function Mn(t){const e=rae(t);return`b${iae(e)}`}const IN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),y9=xt({style:xt({textAlign:jn(["left","center","right"]).optional().nullable(),padding:IN,mobilePadding:IN,backgroundColor:kt().optional()}).passthrough().optional().nullable(),props:xt({size:Fe().gt(0).optional().nullable(),shape:jn(["circle","square","rounded"]).optional().nullable(),imageUrl:kt().optional().nullable(),alt:kt().optional().nullable()}).optional().nullable()}).passthrough(),Mc={size:64,imageUrl:"",alt:"",shape:"square"};function v9({style:t,props:e,blockId:n}){const r=e?.size??Mc.size,i=e?.imageUrl??Mc.imageUrl,a=e?.alt??Mc.alt;e?.shape??Mc.shape;const s=yy(),o={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},l=f.jsx(di,{isParent:!1,children:f.jsxs(f.Fragment,{children:[f.jsx("img",{alt:a??"",src:i??"",width:r,style:{width:r,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:t?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:s.uploading&&s.id===n?.5:1,transition:"opacity 0.2s ease-in-out"}}),s.uploading&&s.id===n&&f.jsx("div",{style:o,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]})}),c=Mn(n);return f.jsx(di,{className:`${c}`,padding:t.padding,backgroundColor:t.backgroundColor,align:t.textAlign,width:"100%",children:l})}function Ga({title:t,children:e}){return f.jsxs(Rm,{sx:{padding:"0!important",paddingTop:"1rem!important"},children:[f.jsx(mr,{sx:{fontWeight:"bold",mb:2,pb:1,color:"text.primary",fontSize:"1.25rem",borderBottom:n=>`1px solid ${n.palette.divider}`},children:t}),f.jsx(Fn,{spacing:2,gap:1,mb:3,children:e})]})}const Xn=({label:t})=>{const e=kr();return t?f.jsx("p",{style:{fontWeight:"bold",color:e.palette.text.primary},children:t}):null},mi=({children:t})=>f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.3rem"},children:t.map(e=>e)}),aae=Re(bt)(({theme:t})=>({display:"flex",alignItems:"center",border:`1px solid ${t.palette.divider}`,borderRadius:"8px",padding:"4px",minWidth:58,maxWidth:"fit-content",backgroundColor:t.palette.background.paper,"&:hover":{borderColor:t.palette.primary.main},"&:focus-within":{borderColor:t.palette.primary.main,boxShadow:`0 0 0 1px ${t.palette.primary.main}`}})),sae=Re("input")(({theme:t})=>({border:"none",outline:"none",background:"transparent",textAlign:"center",width:"27px",minWidth:"27px",maxWidth:"27px",padding:"0!important",lineHeight:"normal",fontSize:"0.9rem",color:t.palette.text.primary,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),ON=Re(vt)(({theme:t})=>({padding:"0",color:t.palette.primary.main,"&:hover":{backgroundColor:je(t.palette.primary.main,.04)},"& .MuiSvgIcon-root":{fontSize:14}}));function yr({iconLabel:t,label:e,value:n,setValue:r,units:i,min:a=0,max:s,step:o=void 0,marks:l=!0,...c}){const u=n??a,[d,p]=D.useState(u.toString()),m=E=>{let S=E;S<a&&(S=a),s!==void 0&&S>s&&(S=s),r(S),p(S.toString())},h=E=>{const S=E.target.value;if(p(S),S!==""){const k=Number(S);isNaN(k)||k>=a&&r(k)}},g=()=>{if(d===""||isNaN(Number(d)))p(u.toString());else{const E=Number(d);m(E)}},_=E=>{E.key==="Enter"&&g()};D.useEffect(()=>{p((n??a).toString())},[n,a]);const b=()=>{const E=u+1;m(E)},y=()=>{const E=u-1;m(E)},v=(E,S)=>{typeof S=="number"&&r(S)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:e}),f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:2,justifyContent:"space-between",width:"100%",children:[f.jsx(bt,{sx:{minWidth:24,lineHeight:1,flexShrink:0},children:t}),f.jsx(fte,{...c,value:u,min:a,max:s||1e3,step:o,color:"primary",marks:l,onChange:v}),f.jsxs(aae,{children:[f.jsx(sae,{type:"number",value:d,onChange:h,onBlur:g,onKeyDown:_,min:a,max:s,step:o}),f.jsxs(bt,{sx:{display:"flex",flexDirection:"column",ml:.5},children:[f.jsx(ON,{onClick:b,disabled:s!==void 0&&u>=s,children:f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})}),f.jsx(ON,{onClick:y,disabled:u<=a,children:f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",style:{transform:"rotate(180deg)"},children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})})]})]}),f.jsx(mr,{variant:"caption",color:"text.secondary",sx:{fontSize:"16px",ml:"4px!important"},children:i})]})]})}function Nc({label:t,defaultValue:e,onChange:n,...r}){const[i,a]=D.useState(e??0);return e!=i&&a(e),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(yr,{value:i??0,setValue:s=>{a(s),n(s)},...r})]})}function Xk(t,e){const n=D.useRef(null),r=D.useRef(t),i=D.useRef([]);r.current=t;const a=D.useCallback((...s)=>{i.current=s,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...s),n.current=null},e)},[e]);return a.flush=D.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,r.current(...i.current))},[]),a}const Ld=36,Zk=8,Sy={width:"100%","& .MuiInputBase-root":{"&:not(.MuiInputBase-multiline)":{height:`${Ld}px`}},"& .MuiOutlinedInput-root":{borderRadius:`${Zk}px`,"&:not(.MuiInputBase-multiline)":{height:`${Ld}px`}},"& .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",height:"unset"}},E9={width:"100%",height:`${Ld}px`,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",display:"flex",alignItems:"center",borderRadius:`${Zk}px`};function nu({helperText:t,label:e,placeholder:n,rows:r,InputProps:i,defaultValue:a,onChange:s}){const[o,l]=D.useState(a);D.useEffect(()=>{o!==a&&l(a)},[a]);const c=Xk(d=>{s(d)},150),u=typeof r=="number"&&r>1;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[f.jsx(Xn,{label:e}),f.jsx(wh,{fullWidth:!0,multiline:u,minRows:r,variant:"outlined",placeholder:n,helperText:t,InputProps:i,value:o,sx:Sy,onChange:d=>{const p=d.target.value;l(p),c(p)},onBlur:()=>{c.flush()}})]})}function oae({onClick:t,disabled:e,primary:n=!1}){const{t:r}=pn.useTranslation("inspector");return f.jsx(vt,{"aria-label":r("inputs.common.close"),onClick:t,disabled:e,sx:{position:"absolute",right:8,top:8,color:i=>n?"brand.blue":i.palette.grey[500],"&:hover":{opacity:.8}},children:f.jsx(Yk,{})})}function lae({imageUrl:t,saving:e=!1}){return f.jsxs(CX,{sx:{position:"relative"},children:[e&&f.jsx(Fn,{justifyContent:"center",alignItems:"center",sx:{position:"absolute",top:7,left:0,width:"100%",height:"314px",zIndex:20,backgroundColor:"#212121AA",mb:1},children:f.jsx(Zs,{size:48,thickness:6,color:"inherit",sx:{color:"white"}})}),f.jsx(RX,{component:"img",sx:{objectFit:"contain",width:"100%",height:"326px"},image:t,alt:"Generated Image"})]})}function cae({value:t,onChange:e,disabled:n}){return f.jsxs(f.Fragment,{children:[f.jsx(mr,{sx:{fontSize:"14px",fontWeight:700},children:"Image description"}),f.jsx(wh,{disabled:n,autoFocus:!0,margin:"dense",id:"prompt",placeholder:"Enter a detailed description here...",type:"text",fullWidth:!0,multiline:!0,rows:4,variant:"outlined",value:t,onChange:r=>e(r.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:"8px"}}})]})}const uae=t=>({400:{code:400,title:t.title||"Invalid Request",message:t.message||"The request was invalid. Please check your input and try again.",action:t.action||"Modify your prompt and try again"},401:{code:401,title:t.title||"Authentication Required",message:t.message||"You need to be authenticated to perform this action.",action:t.action||"Please log in and try again"},403:{code:403,title:t.title||"Access Denied",message:t.message||"You don't have permission to perform this action.",action:t.action||"Contact support if you believe this is a mistake"},404:{code:404,title:t.title||"Not Found",message:t.message||"The requested resource was not found.",action:t.action||"Try again or use a different prompt"},422:{code:422,title:t.title||"Invalid Input",message:t.message||"The provided input cannot be processed.",action:t.action||"Modify your prompt and try again"},429:{code:429,title:t.title||"Too Many Requests",message:t.message||"You've made too many requests. Please wait a moment.",action:t.action||"Please wait a few minutes before trying again"},500:{code:500,title:t.title||"Server Error",message:t.message||"An unexpected error occurred on our servers.",action:t.action||"Please try again later"},502:{code:502,title:t.title||"Bad Gateway",message:t.message||"The server received an invalid response.",action:t.action||"Please try again later"},503:{code:503,title:t.title||"Service Unavailable",message:t.message||"The service is temporarily unavailable.",action:t.action||"Please try again later"}})[t.code]||{code:t.code,title:"Unexpected Error",message:"An unexpected error occurred.",action:"Please try again later"};function S9({src:t,style:e}){const[n,r]=D.useState(!1),[i,a]=D.useState(!1),[s,o]=D.useState(""),[l,c]=D.useState(null),[u,d]=D.useState(!1),[p,m]=D.useState(null),[h,g]=D.useState(!1),_=()=>{r(!0),m(null)},b=()=>{i||(r(!1),a(!1),c(null),o(""),d(!1),m(null),g(!1))},y=()=>{const S=l&&!u?"store-ai-image":"request-ai-image",k=l&&!u?l:s;m(null),S==="store-ai-image"?(g(!0),a(!1),setTimeout(()=>{a(!1),b()},2e3)):a(!0),window.dispatchEvent(new CustomEvent(S,{detail:k}))},v=()=>{d(!0),c(null),m(null),g(!1)};D.useEffect(()=>{const S=k=>{const{detail:x}=k;if(a(!1),x.error){m(uae(x.error));return}if(!x.success||!x.url){m({code:0,title:"Generation Failed",message:"Failed to generate the image.",action:"Please try again"});return}c(x.url),d(!1)};return window.addEventListener("generated-image",S),()=>{window.removeEventListener("generated-image",S)}},[]),D.useEffect(()=>{b()},[t]);const E=!l||u;return f.jsxs(f.Fragment,{children:[f.jsx(ia,{style:e,startIcon:f.jsx(kN,{className:"w-4 h-4"}),variant:"contained",onClick:_,children:"Generate"}),f.jsx(yZ,{open:n,onClose:b,maxWidth:"sm",fullWidth:!0,className:"backgroundTranspatent",children:f.jsxs("form",{style:{background:"white"},onSubmit:S=>{S.preventDefault(),y()},children:[f.jsxs($Z,{sx:{fontWeight:700,fontSize:"24px",color:p?"#EF4444":"inherit"},children:[p?"Image generation failed":i?"Generating Your Image":l?"Your Image is ready":"Create your image",f.jsx(oae,{onClick:b,disabled:i,primary:!0})]}),f.jsxs(RZ,{children:[f.jsx(MZ,{sx:{pb:1,color:p?"#7F1D1D":"inherit"},children:p?"Try simplifying your prompt or describing something else. If the issue persists, please try again later.":i?"Hang tight! This may take a few seconds as we bring your image to life.":E?"Describe the image you want us to generate. Be specific to get the best results.":"Here’s your image. Not quite right? You can tweak it and try again."}),l&&!u?f.jsxs(Fn,{sx:{position:"relative"},children:[f.jsx(lae,{imageUrl:l,saving:h}),f.jsxs(Il,{variant:"outlined",severity:"warning",icon:!1,children:[f.jsx("b",{children:"IMPORTANT:"})," Regenerating will discard this image, and it won't be saved in your gallery. To keep it, make sure to ",f.jsx("b",{children:"Insert the image"})," first."]})]}):i&&!l?f.jsx(Fn,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:S=>S.palette.mainColor[50],height:"326px",width:"100%"},children:f.jsx(Zs,{size:48,thickness:6})}):f.jsx(cae,{value:s,onChange:o,disabled:i})]}),!i&&f.jsxs(CZ,{className:"p-6",children:[l&&!u&&f.jsx(ia,{startIcon:f.jsx(Yre,{className:"w-4 h-4"}),onClick:v,variant:"outlined",disabled:i,children:"Regenerate"}),!l&&!u&&f.jsx(ia,{className:"primary",onClick:b,variant:"text",disabled:u,children:"Cancel"}),f.jsxs(ia,{startIcon:l&&!u?f.jsx(Dre,{className:"w-4 h-4"}):f.jsx(kN,{className:"w-4 h-4"}),onClick:y,variant:"contained",disabled:!s||s?.length<20,children:[l&&!u?"Insert Image":"Generate image",i&&f.jsx(Zs,{size:16,className:"ml-2"})]})]})]})})]})}const dae=({className:t,...e})=>f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",className:t,"aria-hidden":"true",focusable:"false",...e,children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 3l6 6l6-6"})}),pae=Re(Vk)(({theme:t})=>({fontFamily:t.typography.fontFamily,color:t.palette.text.primary,backgroundColor:t.palette.background.paper,width:"100%",height:`${Ld}px`,"&.MuiInputBase-root, &.MuiOutlinedInput-root":{height:`${Ld}px`,minHeight:`${Ld}px`,boxSizing:"border-box",borderRadius:`${Zk}px`},"&& .MuiSelect-select, && .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"36px",lineHeight:"20px",minHeight:"unset"},"& .MuiSelect-icon":{color:t.palette.secondary.main,right:12,top:"calc(50% - 4px)",transition:"transform 200ms ease",pointerEvents:"none"},"& .MuiSelect-iconOpen":{transform:"rotate(180deg)"},"&:hover":{backgroundColor:t.palette.action.hover},"&.Mui-focused":{borderColor:t.palette.primary.main}})),jl=D.forwardRef((t,e)=>{const n=kr();return f.jsx(pae,{ref:e,...t,IconComponent:dae,MenuProps:{PaperProps:{sx:{backgroundColor:n.palette.background.paper,color:n.palette.text.primary}},...t.MenuProps}})});jl.displayName="CustomSelect";const fae=({defaultValue:t,onChange:e,values:n})=>{const r=Zl(),{t:i}=pn.useTranslation("inspector"),a=()=>f.jsx(Dm,{viewBox:"0 0 18 18",fontSize:"small",children:f.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"#F59E0B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),s=H=>{if(!H)return{url:"",repeat:"no-repeat",position:"center center",size:"cover"};const Z=H.match(/url\("([^"]+)"\)/),ee=Z?Z[1]:"";let se="no-repeat";H.includes("repeat-x")?se="repeat-x":H.includes("repeat-y")?se="repeat-y":H.includes("repeat")&&!H.includes("no-repeat")&&(se="repeat");let ie="center center";const ve=["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"];for(const Ee of ve)if(H.includes(Ee)){ie=Ee;break}let he="cover";return H.includes("contain")?he="contain":H.includes("auto")&&(he="auto"),{url:ee,repeat:se,position:ie,size:he}},o=H=>H.url?`url("${H.url}") ${H.repeat} ${H.position} / ${H.size}`:"",[l,c]=D.useState(t||null),[u,d]=D.useState(s(t)),[p,m]=D.useState(!1),[h,g]=D.useState(window.emailAIGeneration||!1),[,_]=D.useState(null),[b,y]=D.useState(s(t).url||""),[v,E]=D.useState(!1),[S,k]=D.useState(""),[x,w]=D.useState(!1),N=D.useRef(null),R=vy(),[T,B]=D.useState(()=>sessionStorage.getItem("hideBackgroundImageWarning")==="true"),A=(H,Z)=>{const ee={...u,...H};if(d(ee),ee.url){const se=o(ee);c(se),e(se,Z)}else console.error("Update params error: ",ee)},L=(H,Z)=>{if(!H)return!1;const ee=H?.toLowerCase(),se=ee.includes(".svg")||ee.includes("svg"),ie=Z&&(Z.includes("image/svg+xml")||Z.includes("svg"));return se||!!ie},M=async H=>{try{E(!0),k(""),w(!1);try{new URL(H)}catch{return k("Invalid URL format"),!1}const Z=new AbortController,ee=setTimeout(()=>Z.abort(),1e4);try{const se=await fetch(H,{method:"HEAD",signal:Z.signal});if(clearTimeout(ee),!se.ok)return k(`HTTP ${se.status}: ${se.statusText}`),!1;const ie=se.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(Ee=>ie&&ie.toLowerCase().includes(Ee.toLowerCase()))?(L(H,ie)&&w(!0),k(""),!0):(k("URL does not point to an image"),!1)}catch(se){return clearTimeout(ee),se.name==="AbortError"?(k("Request timeout - URL took too long to respond"),!1):new Promise(ie=>{const ve=new Image,he=setTimeout(()=>{k("Request timeout - URL took too long to respond"),ie(!1)},1e4);ve.onload=()=>{clearTimeout(he),L(H)&&w(!0),k(""),ie(!0)},ve.onerror=()=>{clearTimeout(he),k("Cannot access image - CORS policy, network error, or invalid URL"),ie(!1)},ve.src=H})}}catch{return k("Unexpected error occurred while validating URL"),!1}finally{E(!1)}},O=async()=>{b.trim()&&await M(b.trim())&&A({url:b.trim()})},$=H=>{H.key==="Enter"&&O()},z=H=>{y(H.target.value),S&&k(""),x&&w(!1)},X=H=>{const Z=["image/png","image/jpeg","image/gif"],se=Array.from(H),ie=se.filter(he=>Z.includes(he.type)&&he.size<=5242880);if(ie.length!==se.length&&alert(i("inputs.common.invalidFiles")),ie.length===0)return;const ve=ie.map(he=>new Promise(Ee=>{const De=new FileReader;De.onload=ft=>Ee(ft.target?.result),De.readAsDataURL(he)}));Promise.all(ve).then(he=>{const Ee={images:he,id:r||"",styles:n};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:Ee})),Od(!0,r||"")})},W=H=>{H.preventDefault(),m(!0)},te=()=>{m(!1)},pe=H=>{H.preventDefault(),m(!1);const Z=H.dataTransfer.files;X(Z)},ye=()=>{const H=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(H)},ae=()=>{d({url:"",repeat:"no-repeat",position:"center center",size:"cover"}),c(null),e(null),y(""),w(!1)},oe=H=>{switch(H){case"top left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.26523 9.79159L5.17094 5.17183M5.17094 5.17183L9.79071 5.26611M5.17094 5.17183L10.8278 10.8287",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.7998 7.33333L7.9998 4M7.9998 4L11.1998 7.33333M7.9998 4V12",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.20841 5.2662L10.8282 5.17192M10.8282 5.17192L10.7339 9.79169M10.8282 5.17192L5.17132 10.8288",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M7.33333 11.2002L4 8.00019M4 8.00019L7.33333 4.8002M4 8.00019L12 8.0002",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.66667 4.7998L12 7.9998M12 7.9998L8.66667 11.1998M12 7.9998L4 7.9998",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.79062 10.7348L5.17085 10.8291M5.17085 10.8291L5.26513 6.20929M5.17085 10.8291L10.8277 5.1722",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M11.1998 8.66667L7.9998 12M7.9998 12L4.7998 8.66667M7.9998 12L7.99981 4",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.7338 6.20938L10.8281 10.8291M10.8281 10.8291L6.20831 10.7349M10.8281 10.8291L5.17122 5.17229",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});default:return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})}},le=H=>({"top left":i("inputs.backgroundImage.positions.topLeft"),"top center":i("inputs.backgroundImage.positions.topCenter"),"top right":i("inputs.backgroundImage.positions.topRight"),"center left":i("inputs.backgroundImage.positions.centerLeft"),"center center":i("inputs.backgroundImage.positions.center"),"center right":i("inputs.backgroundImage.positions.centerRight"),"bottom left":i("inputs.backgroundImage.positions.bottomLeft"),"bottom center":i("inputs.backgroundImage.positions.bottomCenter"),"bottom right":i("inputs.backgroundImage.positions.bottomRight")})[H]??i("inputs.backgroundImage.positions.center");return D.useEffect(()=>{const H=ve=>{const{detail:he}=ve;Od(!1,he.id||""),A({url:he.url},he.styles),U6(!1),y(he.url)},Z=ve=>{Od(ve?.detail?.uploading??!1,ve?.detail?.id??"")},ee=ve=>{const{detail:he}=ve;g(he)},se=()=>{N?.current?.click()},ie=ve=>{const{detail:he}=ve;if(he&&!he.includes("url("))A({url:he},he.styles),y(he);else{const Ee=s(he);d(Ee),c(he),e(he),y(Ee.url)}};return window.addEventListener("email-builder-set-image",ie),window.addEventListener("email-builder-upload-image-receive",H),window.addEventListener("email-builder-ai-generation",ee),window.addEventListener("email-builder-upload-file",se),window.addEventListener("email-builder-toggle-upload-file",Z),()=>{window.removeEventListener("email-builder-ai-generation",ee),window.removeEventListener("email-builder-upload-image-receive",H),window.removeEventListener("email-builder-set-image",ie),window.removeEventListener("email-builder-upload-file",se),window.removeEventListener("email-builder-toggle-upload-file",Z)}},[u]),D.useEffect(()=>{t&&w(L(u.url))},[t,u.url]),D.useEffect(()=>{if(t!==l){const H=s(t);d(H),c(t||null),y(H.url||"")}},[t]),f.jsxs(mi,{children:[f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.label")}),!T&&f.jsx(Bn,{title:"Some email clients don’t support background images. Add a background color as fallback.",placement:"top",children:f.jsx(vt,{size:"small",sx:{p:0},children:f.jsx(a,{})})})]}),f.jsx("div",{style:{display:"flex",gap:8},children:R?f.jsxs(bt,{sx:{width:"100%"},children:[f.jsxs(Fn,{direction:"row",spacing:1,children:[f.jsx(wh,{fullWidth:!0,placeholder:i("inputs.image.urlPlaceholder"),value:b,onChange:z,onKeyPress:$,error:!!S,disabled:v,sx:Sy}),f.jsx(ia,{variant:"contained",onClick:O,disabled:!b.trim()||v,sx:{minWidth:"auto",px:2,position:"relative"},children:v?f.jsx(Zs,{size:20,color:"inherit"}):"Add"})]}),S&&f.jsx(Il,{severity:"error",sx:{mt:1,fontSize:"0.875rem",maxHeight:"70px"},children:S}),x&&f.jsx(Il,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},action:f.jsx(vt,{"aria-label":i("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{w(!1)},children:f.jsx(Yk,{fontSize:"inherit"})}),children:i("inputs.common.svgWarning")}),u.url&&f.jsxs(bt,{sx:{position:"relative",maxWidth:"50%",display:"block",margin:"0.5rem auto 0 auto"},children:[f.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),f.jsx(vt,{onClick:ae,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:f.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]})]}):f.jsxs(f.Fragment,{children:[u.url&&f.jsxs(bt,{sx:{position:"relative",maxWidth:"40%"},children:[f.jsx("div",{style:{borderRadius:"8px",border:"2px solid #E5E5E5",height:"100%",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"},children:f.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"100%"}})}),f.jsx(vt,{onClick:ae,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:f.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]}),f.jsxs(bt,{onDragOver:W,onDragLeave:te,onDrop:pe,sx:{width:"100%",minWidth:"40%",border:"2px solid",borderColor:p?"primary.main":"#E5E5E5",borderRadius:"8px",padding:"24px 8px 36px 8px",textAlign:"center",bgcolor:p?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[f.jsx(bt,{sx:{display:"flex",justifyContent:"center"},children:f.jsx(c9,{sx:{fontSize:32,color:"primary"}})}),f.jsxs("label",{style:{cursor:"pointer"},children:[f.jsx("input",{ref:N,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:H=>{const Z=H.target.files;Z&&Z.length>0&&X(Array.from(Z))}}),f.jsx(mr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:i("inputs.common.uploadFile")}),f.jsxs(mr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",i("inputs.common.dragAndDrop")]})]}),f.jsx(mr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:i("inputs.common.fileInfo")})]})]})}),u.url&&f.jsxs(bt,{sx:{mt:2},children:[f.jsxs(bt,{sx:{mb:2},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.fillType")}),f.jsxs(Dh,{value:u.size,exclusive:!0,onChange:(H,Z)=>{Z!==null&&A({size:Z})},size:"small",fullWidth:!0,children:[f.jsx(kn,{value:"cover",children:i("inputs.backgroundImage.fillOptions.cover")}),f.jsx(kn,{value:"contain",children:i("inputs.backgroundImage.fillOptions.contain")}),f.jsx(kn,{value:"auto",children:i("inputs.backgroundImage.fillOptions.auto")})]})]}),f.jsxs(Fn,{direction:"row",spacing:2,sx:{mb:2},children:[f.jsxs("div",{style:{flex:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.repeat")}),f.jsxs(jl,{style:{width:"100%"},value:u.repeat,size:"small",onChange:H=>A({repeat:H.target.value}),children:[f.jsx(ts,{value:"no-repeat",children:i("inputs.backgroundImage.repeatOptions.none")}),f.jsx(ts,{value:"repeat",children:i("inputs.backgroundImage.repeatOptions.repeat")}),f.jsx(ts,{value:"repeat-x",children:i("inputs.backgroundImage.repeatOptions.repeatX")}),f.jsx(ts,{value:"repeat-y",children:i("inputs.backgroundImage.repeatOptions.repeatY")})]})]}),f.jsxs("div",{style:{flex:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.position")}),f.jsx(jl,{style:{width:"100%"},value:u.position,size:"small",onChange:H=>A({position:H.target.value}),renderValue:H=>f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1,paddingRight:"1rem"},children:[oe(H),le(H)]}),children:["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"].map(H=>f.jsx(ts,{sx:{padding:"0.5rem 1rem 0.5rem 0.5rem!important "},value:H,children:f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[oe(H),le(H)]})},H))})]})]})]}),!R&&x&&f.jsx(Il,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},children:i("inputs.common.svgWarning")}),$6()&&!R&&f.jsxs(f.Fragment,{children:[f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:1,sx:{mt:2},children:[f.jsx(Fo,{sx:{flexGrow:1}}),f.jsx(mr,{sx:{color:"text.secondary"},children:"or"}),f.jsx(Fo,{sx:{flexGrow:1}})]}),f.jsxs(Fn,{flexDirection:"row",gap:2,sx:{mt:2},children:[f.jsx(ia,{variant:"outlined",onClick:ye,startIcon:f.jsx(o9,{}),sx:{width:"100%"},children:"Browse gallery"}),h&&f.jsx(S9,{src:u.url,style:{width:"100%",margin:0}})]})]})]})};function Ip(){return(Ip=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Ty(t,e){if(t==null)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)e.indexOf(n=a[r])>=0||(i[n]=t[n]);return i}function Ym(t){var e=D.useRef(t),n=D.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Km=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},em=function(t){return"touches"in t},MC=function(t){return t&&t.ownerDocument.defaultView||self},PN=function(t,e,n){var r=t.getBoundingClientRect(),i=em(e)?(function(a,s){for(var o=0;o<a.length;o++)if(a[o].identifier===s)return a[o];return a[0]})(e.touches,n):e;return{left:Km((i.pageX-(r.left+MC(t).pageXOffset))/r.width),top:Km((i.pageY-(r.top+MC(t).pageYOffset))/r.height)}},LN=function(t){!em(t)&&t.preventDefault()},T9=D.memo(function(t){var e=t.onMove,n=t.onKey,r=Ty(t,["onMove","onKey"]),i=D.useRef(null),a=Ym(e),s=Ym(n),o=D.useRef(null),l=D.useRef(!1),c=D.useMemo(function(){var m=function(_){LN(_),(em(_)?_.touches.length>0:_.buttons>0)&&i.current?a(PN(i.current,_,o.current)):g(!1)},h=function(){return g(!1)};function g(_){var b=l.current,y=MC(i.current),v=_?y.addEventListener:y.removeEventListener;v(b?"touchmove":"mousemove",m),v(b?"touchend":"mouseup",h)}return[function(_){var b=_.nativeEvent,y=i.current;if(y&&(LN(b),!(function(E,S){return S&&!em(E)})(b,l.current)&&y)){if(em(b)){l.current=!0;var v=b.changedTouches||[];v.length&&(o.current=v[0].identifier)}y.focus(),a(PN(y,b,o.current)),g(!0)}},function(_){var b=_.which||_.keyCode;b<37||b>40||(_.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},g]},[s,a]),u=c[0],d=c[1],p=c[2];return D.useEffect(function(){return p},[p]),D.createElement("div",Ip({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),Jk=function(t){return t.filter(Boolean).join(" ")},C9=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,a=Jk(["react-colorful__pointer",t.className]);return D.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},D.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Xr=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},mae=function(t){return yae(FC(t))},FC=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Xr(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Xr(parseInt(t.substring(6,8),16)/255,2):1}},hae=function(t){return bae(_ae(t))},gae=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:Xr(t.h),s:Xr(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:Xr(i/2),a:Xr(r,2)}},BC=function(t){var e=gae(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},_ae=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var a=Math.floor(e),s=r*(1-n),o=r*(1-(e-a)*n),l=r*(1-(1-e+a)*n),c=a%6;return{r:Xr(255*[r,o,s,s,l,r][c]),g:Xr(255*[l,r,r,o,s,s][c]),b:Xr(255*[s,s,l,r,r,o][c]),a:Xr(i,2)}},Ag=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},bae=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=i<1?Ag(Xr(255*i)):"";return"#"+Ag(e)+Ag(n)+Ag(r)+a},yae=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=Math.max(e,n,r),s=a-Math.min(e,n,r),o=s?a===e?(n-r)/s:a===n?2+(r-e)/s:4+(e-n)/s:0;return{h:Xr(60*(o<0?o+6:o)),s:Xr(a?s/a*100:0),v:Xr(a/255*100),a:i}},vae=D.memo(function(t){var e=t.hue,n=t.onChange,r=Jk(["react-colorful__hue",t.className]);return D.createElement("div",{className:r},D.createElement(T9,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Km(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Xr(e),"aria-valuemax":"360","aria-valuemin":"0"},D.createElement(C9,{className:"react-colorful__hue-pointer",left:e/360,color:BC({h:e,s:100,v:100,a:1})})))}),Eae=D.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:BC({h:e.h,s:100,v:100,a:1})};return D.createElement("div",{className:"react-colorful__saturation",style:r},D.createElement(T9,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Km(e.s+100*i.left,0,100),v:Km(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Xr(e.s)+"%, Brightness "+Xr(e.v)+"%"},D.createElement(C9,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:BC(e)})))}),x9=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Sae=function(t,e){return t.toLowerCase()===e.toLowerCase()||x9(FC(t),FC(e))};function Tae(t,e,n){var r=Ym(n),i=D.useState(function(){return t.toHsva(e)}),a=i[0],s=i[1],o=D.useRef({color:e,hsva:a});D.useEffect(function(){if(!t.equal(e,o.current.color)){var c=t.toHsva(e);o.current={hsva:c,color:e},s(c)}},[e,t]),D.useEffect(function(){var c;x9(a,o.current.hsva)||t.equal(c=t.fromHsva(a),o.current.color)||(o.current={hsva:a,color:c},r(c))},[a,t,r]);var l=D.useCallback(function(c){s(function(u){return Object.assign({},u,c)})},[]);return[a,l]}var Cae=typeof window<"u"?D.useLayoutEffect:D.useEffect,xae=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},MN=new Map,kae=function(t){Cae(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!MN.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,MN.set(e,n);var r=xae();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},wae=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,a=t.onChange,s=Ty(t,["className","colorModel","color","onChange"]),o=D.useRef(null);kae(o);var l=Tae(n,i,a),c=l[0],u=l[1],d=Jk(["react-colorful",e]);return D.createElement("div",Ip({},s,{ref:o,className:d}),D.createElement(Eae,{hsva:c,onChange:u}),D.createElement(vae,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},Dae={defaultColor:"000",toHsva:mae,fromHsva:function(t){return hae({h:t.h,s:t.s,v:t.v,a:1})},equal:Sae},Aae=function(t){return D.createElement(wae,Ip({},t,{colorModel:Dae}))},Nae=/^#?([0-9A-F]{3,8})$/i,Rae=function(t){var e=t.color,n=e===void 0?"":e,r=t.onChange,i=t.onBlur,a=t.escape,s=t.validate,o=t.format,l=t.process,c=Ty(t,["color","onChange","onBlur","escape","validate","format","process"]),u=D.useState(function(){return a(n)}),d=u[0],p=u[1],m=Ym(r),h=Ym(i),g=D.useCallback(function(b){var y=a(b.target.value);p(y),s(y)&&m(l?l(y):y)},[a,l,s,m]),_=D.useCallback(function(b){s(b.target.value)||p(a(n)),h(b)},[n,a,s,h]);return D.useEffect(function(){p(a(n))},[n,a]),D.createElement("input",Ip({},c,{value:o?o(d):d,spellCheck:"false",onChange:g,onBlur:_}))},FN=function(t){return"#"+t},Iae=function(t){var e=t.prefixed,n=t.alpha,r=Ty(t,["prefixed","alpha"]),i=D.useCallback(function(s){return s.replace(/([^0-9A-F]+)/gi,"").substring(0,n?8:6)},[n]),a=D.useCallback(function(s){return(function(o,l){var c=Nae.exec(o),u=c?c[1].length:0;return u===3||u===6||!!l&&u===4||!!l&&u===8})(s,n)},[n]);return D.createElement(Rae,Ip({},r,{escape:i,format:e?FN:void 0,process:FN,validate:a}))};const BN={width:24,height:24};function Oae({paletteColors:t,isLocked:e,onToggleLock:n,onChange:r}){const i=kr(),a=t.slice(30);return f.jsxs(Fn,{spacing:1,children:[f.jsx("div",{style:{height:1,width:"100%",margin:"8px 0",backgroundColor:i.palette.grey[400]}}),f.jsxs(bt,{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",children:[a.map((s,o)=>f.jsx(ia,{sx:{...BN,backgroundColor:s,border:"1px solid",margin:"0!important",borderColor:i.palette.grey[50],minWidth:24,display:"inline-flex","&:hover":{backgroundColor:s,borderColor:"grey.500"}},onClick:()=>r&&r(s)},o+29)),n&&f.jsx(ia,{onClick:n,sx:{backgroundColor:"transparent",border:"1px solid",...BN,minWidth:24,margin:"0!important",borderColor:e?i.palette.error.main:i.palette.divider,display:"inline-flex",color:e?i.palette.error.main:i.palette.text.secondary,"&:hover":{backgroundColor:e?i.palette.error.light+"20":"action.hover",borderColor:e?i.palette.error.main:i.palette.text.secondary}},title:e?"Unlock recent colors":"Lock recent colors",children:e?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})]})]})}const Pae={p:1,".react-colorful__pointer ":{width:16,height:16},".react-colorful__saturation":{mb:1,borderRadius:"8px"},".react-colorful__last-control":{borderRadius:"8px"},".react-colorful__hue-pointer":{width:"4px",borderRadius:"8px",height:24,cursor:"col-resize"},".react-colorful__saturation-pointer":{cursor:"all-scroll"},input:{padding:1,border:"1px solid",borderColor:"grey.300",borderRadius:"8px",width:"100%"}},UN=(t,e)=>{if(!t||t.trim()==="")return e;const r=e.slice(-5),i=e.slice(0,30),a=r.filter(o=>o!==t&&o!==""),s=[t,...a].slice(0,5);for(;s.length<5;)s.push("");return[...i,...s]};function Qm({value:t,nullable:e,onChange:n}){const[r,i]=D.useState(t||"#000000"),[a,s]=D.useState(null),{paletteColors:o,isLocked:l}=bre(),[c,u]=D.useState(!1),d=kr(),p=D.useCallback(b=>{if(l)return;a&&clearTimeout(a);const y=setTimeout(()=>{const v=UN(b,o);Vv({paletteColors:v})},300);s(y)},[a,l,o]),m=()=>{const b=!l;if(Vv({isLocked:b}),!b&&r){const y=UN(r,o);Vv({isLocked:b,paletteColors:y})}},h=b=>{u(!0),i(b)},g=()=>{n(r),p(r)},_=b=>{i(b),n(b),p(b)};return D.useEffect(()=>{t!==r&&i(t||"#000000")},[t]),D.useEffect(()=>()=>{a&&clearTimeout(a)},[a]),f.jsxs(Fn,{spacing:1,sx:Pae,children:[f.jsx(Aae,{color:r,onChange:h,onMouseUp:g,onTouchEnd:g,onMouseLeave:b=>c?g():null}),f.jsx(Oae,{isLocked:l,onToggleLock:m,paletteColors:o,value:t,nullable:e,onChange:b=>{b?(i(b),n(b),p(b)):n(null)}}),f.jsxs(bt,{pt:1,display:"flex",gap:1,alignItems:"center",children:[f.jsx(Iae,{prefixed:!0,color:r,onChange:_,style:{flex:1,backgroundColor:d.palette.background.paper,color:d.palette.text.primary,padding:"1px 4px",fontSize:"12px"}}),e&&f.jsx(ia,{onClick:()=>n&&n(null),sx:{backgroundColor:"transparent",width:24,height:24,minWidth:24,margin:"0!important",borderColor:d.palette.divider,display:"inline-flex","&:hover":{backgroundColor:"action.hover",borderColor:d.palette.text.secondary}},children:f.jsx(t9,{color:"primary",fontSize:"small"})})]})]})}function k9({label:t,defaultValue:e,onChange:n,nullable:r,compact:i=!1,...a}){const[s,o]=D.useState(null),[l,c]=D.useState(e),{t:u}=pn.useTranslation("inspector");D.useEffect(()=>{l!==e&&c(e)},[e]);const d=b=>{o(b.currentTarget)},p=i?{border:"1px solid",borderColor:"cadet.400",width:28,height:28,borderRadius:"8px",bgcolor:"#FFFFFF"}:{border:t?"1px solid":"",borderColor:"cadet.400",width:"100%",height:36,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",borderRadius:"8px",bgcolor:"#FFFFFF"},m=b=>{c(b),n(b)},h=()=>!r||typeof l!="string"||l.trim().length===0?null:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:u("inputs.background.reset"),placement:"left",children:f.jsx(bt,{sx:{minWidth:24,lineHeight:1,flexShrink:0,pr:"4px",display:"grid",placeItems:"center"},onClick:()=>m(null),children:f.jsx(t9,{sx:{color:"primary.main"}})})}),g=l?f.jsx(Oa,{onClick:d,sx:{...p,bgcolor:l}}):f.jsx(Oa,{onClick:d,sx:{...p},children:f.jsx(Wk,{fontSize:"small"})}),_=f.jsx(qk,{anchorEl:s,open:!!s,onClose:()=>o(null),sx:{"& .MuiPaper-root":{boxShadow:"0 4px 6px rgba(0, 0, 0, 0.4);",borderRadius:1,maxWidth:"200px",transform:"translateX(-100%) !important;"}},MenuListProps:{sx:{height:"auto",padding:0}},children:f.jsx(Qm,{value:l||"",nullable:r,onChange:b=>m(b)})});return i?f.jsxs(f.Fragment,{children:[g,_]}):f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(Fn,{direction:"row",alignContent:"center",spacing:1,children:[g,h()]}),_]})}function Vc(t){return f.jsx(k9,{...t,nullable:!1})}function Yv(t){return f.jsx(k9,{...t,nullable:!0})}const $N=({mobile:t=!1,label:e,borderColor:n,borderTop:r,borderBottom:i,borderLeft:a,borderRight:s,onChange:o})=>{const{t:l}=pn.useTranslation("inspector"),c=()=>t?{top:"borderTopMobile",bottom:"borderBottomMobile",left:"borderLeftMobile",right:"borderRightMobile"}:{top:"borderTop",bottom:"borderBottom",left:"borderLeft",right:"borderRight"},u=x=>{const w=Object.values(x);return w.every(N=>N===w[0])},d=c(),p={[d.top]:r??0,[d.bottom]:i??0,[d.left]:a??0,[d.right]:s??0},[m,h]=D.useState(()=>u(p)?"all":"custom"),[g,_]=D.useState(n??"#000000"),[b,y]=D.useState(p);D.useEffect(()=>{n!==g&&_(n??"#000000");const x={[d.top]:r??0,[d.bottom]:i??0,[d.left]:a??0,[d.right]:s??0};Object.keys(x).some(N=>b[N]!==x[N])&&(y(x),u(x)||h("custom"))},[n,r,i,a,s,t]);const v=()=>{if(m!=="all"){const x=b[d.top]??0;S(x),h("all")}else h("custom")},E=x=>{_(x),o({borderColor:x,...b})},S=x=>{const w={[d.top]:x,[d.bottom]:x,[d.left]:x,[d.right]:x};y(w),o({...w,borderColor:g})},k=(x,w)=>{y(R=>({...R,[w]:x}));const N={...b,borderColor:g,[w]:x};u(N)||h("custom"),o(N)};return f.jsxs("div",{children:[f.jsxs(Fn,{direction:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:e}),f.jsxs(Fn,{direction:"row",spacing:1,alignItems:"center",children:[f.jsx(Vc,{defaultValue:g,onChange:E,compact:!0}),f.jsx(Bn,{title:l(m==="all"?"border.unlockBorders":"border.lockBordersTogether"),children:f.jsx(vt,{size:"small",onClick:v,sx:{color:m==="all"?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:m==="all"?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]})]}),m==="all"&&f.jsx(Nc,{label:"",iconLabel:f.jsx(Rre,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:S}),m==="custom"&&f.jsxs(Fn,{spacing:2,children:[f.jsx(Nc,{label:"",iconLabel:f.jsx(Ore,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:x=>k(x,d.top)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Are,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.bottom],onChange:x=>k(x,d.bottom)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Nre,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.left],onChange:x=>k(x,d.left)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Ire,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.right],onChange:x=>k(x,d.right)})]})]})},ap=[{key:"INHERIT",label:"Inherit",value:"inherit"},{key:"LATO",label:"Lato",value:'"Lato", sans-serif'},{key:"MERRIWEATHER",label:"Merriweather",value:'"Merriweather", serif'},{key:"MONTSERRAT",label:"Montserrat",value:'"Montserrat", sans-serif'},{key:"OPEN_SANS",label:"Open Sans",value:'"Open Sans", sans-serif'},{key:"OSWALD",label:"Oswald",value:'"Oswald", sans-serif'},{key:"PACIFICO",label:"Pacifico",value:'"Pacifico", cursive'},{key:"PLAYFAIR",label:"Playfair",value:'"Playfair", serif'},{key:"ROBOTO",label:"Roboto",value:'"Roboto", sans-serif'},{key:"MODERN_SANS",label:"Modern sans",value:'"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif'}],Ol={FAMILY:"MODERN_SANS",SIZE:16},Jl=jn(["MODERN_SANS","LATO","MERRIWEATHER","MONTSERRAT","OPEN_SANS","OSWALD","PACIFICO","PLAYFAIR","ROBOTO","INHERIT"]).nullable().optional(),zN=t=>ap.find(e=>e.key===t)?.value;function ms(t){const e=sre();let n=zN(t);return n||(n=zN(e?.fontFamily),n||"inherit")}const Lae=ap.map(t=>f.jsx(ts,{value:t.key,sx:{fontFamily:t.value},children:t.label},t.key));function w9({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,a]=D.useState(n??r);D.useEffect(()=>{i!==n&&a(n??r)},[n]);const s=o=>{const l=o?.target?.value;a(l),e(l===null?null:l)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(jl,{style:{width:"100%"},value:i,size:"small",onChange:s,children:Lae})]})}function qN({label:t,defaultValue:e=16,onChange:n,maxValue:r,minValue:i,step:a}){const[s,o]=D.useState(e);D.useEffect(()=>{s!==e&&o(e)},[e]);const l=c=>{o(c),n(c)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(yr,{iconLabel:f.jsx(Xre,{sx:{fontSize:16,color:"text.primary"}}),value:s,setValue:l,units:"px",step:a??2,min:i||8,max:r||48})]})}function ec({label:t,children:e,defaultValue:n,onChange:r}){const[i,a]=D.useState(n);return D.useEffect(()=>{n!==i&&a(n)},[n]),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(bt,{sx:{...E9,paddingLeft:"0px",paddingRight:"0px"},children:f.jsx(Dh,{exclusive:!0,fullWidth:!0,value:i,size:"small",sx:{width:"100%"},onChange:(s,o)=>{if(typeof o!="string")throw new Error("RadioGroupInput can only receive string values");a(o),r(o)},children:e})})]})}function Mae({label:t,defaultValue:e,onChange:n}){const[r,i]=D.useState(e);return D.useEffect(()=>{r!==e&&i(e)},[e]),f.jsxs(ec,{label:t,defaultValue:r,onChange:a=>{i(a),n(a)},children:[f.jsx(kn,{value:"normal",children:"Regular"}),f.jsx(kn,{value:"bold",children:"Bold"})]})}const GN=({label:t,defaultValue:e,onChange:n})=>{const{t:r}=pn.useTranslation("inspector"),i=t??r("inputs.common.height");return f.jsx(yr,{label:i,iconLabel:f.jsx(s9,{sx:{color:"text.secondary"}}),units:"px",step:1,min:1,max:100,marks:!1,value:e??1,setValue:n})},Fae=[{key:"1",value:"1",label:"Simple (1.0)"},{key:"1.15",value:"1.15",label:"Compact (1.15)"},{key:"1.5",value:"1.5",label:"Normal (1.5)"},{key:"2",value:"2",label:"Relaxed (2.0)"},{key:"2.5",value:"2.5",label:"Wide (2.5)"},{key:"3",value:"3",label:"Loose (3.0)"},{key:"4",value:"4",label:"Very Loose (4.0)"}],Bae=Fae.map(t=>f.jsx(ts,{value:t.key,children:t.label},t.key));function Uae({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,a]=D.useState(n?.toString()??r);D.useEffect(()=>{i!==n?.toString()&&a(n?.toString()??r)},[n]);const s=o=>{const l=o?.target?.value;a(l),e(l===r?null:parseFloat(l))};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(jl,{style:{width:"100%"},value:i,size:"small",onChange:s,children:[f.jsx(ts,{value:r,children:"Default value"}),Bae]})]})}function jN({label:t,defaultValue:e,onChange:n}){const{t:i}=pn.useTranslation("inspector"),[a,s]=D.useState(()=>e||{top:0,left:0,bottom:0,right:0});D.useEffect(()=>{e&&(e.top!==a.top||e.left!==a.left||e.bottom!==a.bottom||e.right!==a.right)&&s(e)},[e]);const[o,l]=D.useState(!1);function c(d,p){let m;o?m={top:p,bottom:p,left:p,right:p}:m={...a,[d]:p},s(m),n(m)}const u=()=>{if(!o){const d={top:a.top,bottom:a.top,left:a.top,right:a.top};s(d),n(d)}l(!o)};return f.jsxs(mi,{children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:t}),f.jsx(Bn,{title:i(o?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:u,sx:{marginTop:"0!important",color:o?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:o?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),o?f.jsx(yr,{iconLabel:f.jsx("span",{children:i("inputs.responsiveSize.allSides")}),value:a.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(Y6,{sx:{fontSize:16,color:"text.primary"}}),value:a.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(W6,{sx:{fontSize:16,color:"text.primary"}}),value:a.bottom,setValue:d=>c("bottom",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(H6,{sx:{fontSize:16,color:"text.primary"}}),value:a.left,setValue:d=>c("left",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(V6,{sx:{fontSize:16,color:"text.primary"}}),value:a.right,setValue:d=>c("right",d),units:"px",step:16,min:0,max:120,marks:!0})]})]})}const $ae=({label:t,defaultValue:e,onChange:n,maxValue:r=600,shapeSteps:i=8})=>{const{t:a}=pn.useTranslation("inspector"),[s,o]=D.useState(()=>typeof e=="object"&&e!==null?"rectangle":e||"rectangle"),[l,c]=D.useState(()=>typeof e=="object"&&e!==null?e:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}),[u,d]=D.useState(!1);D.useEffect(()=>{typeof e=="object"&&e!==null?(c(e),o("rounded")):e&&o(e)},[e]);const p=b=>{o(b),n(b==="rounded"?l:b)},m=(b,y)=>{let v;u?v={topLeft:y,topRight:y,bottomLeft:y,bottomRight:y}:v={...l,[b]:y},c(v),n(v)},h=()=>{if(!u){const b={topLeft:l.topLeft,topRight:l.topLeft,bottomLeft:l.topLeft,bottomRight:l.topLeft};c(b),n(b)}d(!u)},g=r,_=t||a("shape.label");return f.jsxs(f.Fragment,{children:[f.jsxs(ec,{label:_,defaultValue:s,onChange:p,children:[f.jsx(kn,{value:"rectangle",children:a("shape.square")}),f.jsx(kn,{value:"pill",children:a("shape.pill")}),f.jsx(kn,{value:"rounded",children:a("shape.custom")})]}),s==="rounded"&&f.jsxs(Fn,{spacing:2,alignItems:"flexStart",pb:1,children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:a("shape.borderRadius")}),f.jsx(Bn,{title:a(u?"shape.unlockTooltip":"shape.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:h,sx:{marginTop:"0!important",color:u?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:u?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),u?f.jsx(f.Fragment,{children:f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16}}),value:l.topRight,setValue:b=>m("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g})}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(0deg)"}}),value:l.topLeft,setValue:b=>m("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(270deg)"}}),value:l.topRight,setValue:b=>m("topRight",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(180deg)"}}),value:l.bottomLeft,setValue:b=>m("bottomLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(90deg)"}}),value:l.bottomRight,setValue:b=>m("bottomRight",b),units:"px",min:0,step:i,marks:i>1,max:g})]})]})]})};function HN({label:t,defaultValue:e,onChange:n}){const[r,i]=D.useState(e??"left");return D.useEffect(()=>{e!==r&&i(e??"left")},[e]),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(ec,{label:"",defaultValue:r,onChange:a=>{i(a),n(a)},children:[f.jsx(kn,{value:"left",children:f.jsx(Ure,{fontSize:"small"})}),f.jsx(kn,{value:"center",children:f.jsx(Bre,{fontSize:"small"})}),f.jsx(kn,{value:"right",children:f.jsx($re,{fontSize:"small"})})]})]})}const VN=({label:t,defaultValue:e,onChange:n,step:r,...i})=>{const{t:a}=pn.useTranslation("inspector"),s=t??a("inputs.common.width");return f.jsx(yr,{label:s,iconLabel:f.jsx(s9,{sx:{color:"text.primary",transform:"rotate(90deg)"}}),units:"%",step:r,min:1,max:100,marks:!1,value:e??1,setValue:n,...i})};function zae({name:t,value:e,onChange:n,shapeMaxValue:r,shapeSteps:i}){const a=wr(),s=_u(),{t:o}=pn.useTranslation("inspector"),l=(m,h)=>{const g=e[m],_=e[h];return g??_},c=(m,h)=>{n(h?{...e,...h,[t]:m}:{...e,[t]:m})},u=m=>{n({...e,...m})},p=(()=>{switch(t){case"textAlignMobile":return l("textAlignMobile","textAlign");case"mobilePadding":return l("mobilePadding","padding");case"fontSizeMobile":return l("fontSizeMobile","fontSize")??16;case"heightMobile":return l("heightMobile","height");case"widthMobile":return l("widthMobile","width");case"borderMobile":return{borderTop:l("borderTopMobile","borderTop"),borderBottom:l("borderBottomMobile","borderBottom"),borderLeft:l("borderLeftMobile","borderLeft"),borderRight:l("borderRightMobile","borderRight")};default:return e[t]??null}})();switch(t){case"backgroundColor":return f.jsx(Yv,{label:o("properties.backgroundColor"),defaultValue:p??s?.canvasColor,onChange:c});case"background":return f.jsx(fae,{defaultValue:p,onChange:(m,h)=>c(m,h),values:e});case"borderColor":return f.jsx(Yv,{label:o("properties.border"),defaultValue:p,onChange:c});case"borderRadius":return f.jsx(Nc,{iconLabel:f.jsx(Kre,{}),units:"px",step:4,marks:!0,min:0,max:48,label:o("properties.borderRadius"),defaultValue:p,onChange:c});case"color":return f.jsx(Yv,{label:o("properties.color"),defaultValue:p,onChange:c});case"fontFamily":return f.jsx(w9,{label:o("properties.fontFamily"),defaultValue:p,onChange:c});case"fontWeight":return f.jsx(Mae,{label:o("properties.fontWeight"),defaultValue:p,onChange:c});case"textAlign":return a==="desktop"&&f.jsx(HN,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"textAlignMobile":return a!="desktop"&&f.jsx(HN,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"padding":return a==="desktop"&&f.jsx(jN,{label:o("properties.padding"),defaultValue:p,onChange:c});case"mobilePadding":return a!="desktop"&&f.jsx(jN,{label:o("properties.padding"),defaultValue:p,onChange:c});case"fontSize":return a==="desktop"&&f.jsx(qN,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p??16,onChange:c});case"fontSizeMobile":return a!="desktop"&&f.jsx(qN,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p,onChange:c});case"lineHeight":return f.jsx(Uae,{label:o("properties.lineHeight"),defaultValue:p??1.5,onChange:c});case"shape":return f.jsx($ae,{shapeSteps:i,maxValue:r,label:o("properties.shape"),defaultValue:p,onChange:c});case"height":return a==="desktop"&&f.jsx(GN,{label:o("properties.height"),defaultValue:p,onChange:c});case"heightMobile":return a!="desktop"&&f.jsx(GN,{label:o("properties.height"),defaultValue:p,onChange:c});case"width":return a==="desktop"&&f.jsx(VN,{label:o("properties.width"),defaultValue:p,onChange:c});case"widthMobile":return a!="desktop"&&f.jsx(VN,{label:o("properties.width"),defaultValue:p,onChange:c});case"border":return a==="desktop"&&f.jsx($N,{label:o("properties.border"),borderColor:e.borderColor??null,borderTop:e.borderTop??null,borderBottom:e.borderBottom??null,borderLeft:e.borderLeft??null,borderRight:e.borderRight??null,onChange:u});case"borderMobile":return a!="desktop"&&f.jsx($N,{mobile:!0,label:o("properties.border"),borderColor:e.borderColor??null,borderTop:p.borderTop??null,borderBottom:p.borderBottom??null,borderLeft:p.borderLeft??null,borderRight:p.borderRight??null,onChange:u});default:return null}}function Ti({names:t,value:e,onChange:n,disabledCSSValidation:r=!1,shapeMaxValue:i,shapeSteps:a}){const s=so(),o=I6();return(r||s=="css"||ab.includes(o||""))&&f.jsx(f.Fragment,{children:t.map(l=>f.jsx(zae,{shapeMaxValue:i,shapeSteps:a,name:l,value:e||{},onChange:n},l))})}const ew=t=>t?["http","mailto:","tel:","sms:","whatsapp:"].some(n=>t.startsWith(n))?t:`//${t}`:"#",_b=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),Op=t=>t?{top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}:{top:0,right:0,bottom:0,left:0},qae=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),tw=xt({style:xt({padding:_b,mobilePadding:_b,background:kt().nullable().optional(),backgroundColor:kt().regex(/^#[0-9a-fA-F]{6}$/).optional().nullable(),textAlign:jn(["center","left","right"]).optional().nullable(),textAlignMobile:jn(["center","left","right"]).optional().nullable(),shape:Hc([jn(["rectangle","pill"]),qae]).optional().nullable()}),props:xt({touched:Uo().optional().nullable(),scale:Fe().optional().nullable(),size:kt().optional().nullable(),sizeMobile:kt().optional().nullable(),width:Fe().optional().nullable(),widthMobile:Fe().optional().nullable(),scaleMobile:Fe().optional().nullable(),touchedMobile:Uo().optional().nullable(),original_width:Fe().optional().nullable(),height:Fe().optional().nullable(),url:kt().optional().nullable(),alt:kt().optional().nullable(),linkHref:kt().optional().nullable(),contentAlignment:jn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough();function D9({style:t,props:e,blockId:n}){const r=wr(),i=yy(),a={padding:Op(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding),backgroundColor:t?.backgroundColor??void 0,textAlign:r=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign??void 0},s=(_,b)=>_==="fill"?"100%":_==="scale"?`${b}%`:e?.width,o=e?.linkHref??null,l=r=="desktop"?s(e?.size,e?.scale):s(e?.sizeMobile,e?.scaleMobile),c={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},u=t?.background??"",d=t?.backgroundColor,p=d?Ko(u,d):u,m=_=>{const b=_.currentTarget;setTimeout(()=>{if(!e?.width&&b.offsetWidth){const y=b.offsetWidth;q6(n,{...e,width:y})}},100)},h=f.jsxs(f.Fragment,{children:[f.jsx("img",{alt:e?.alt??"",src:e?.url??"",width:l,onLoad:m,style:{width:l,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:e?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:i.uploading&&i.id===n?.5:1,transition:"opacity 0.2s ease-in-out",borderRadius:gb(t)}}),i.uploading&&i.id===n&&f.jsx("div",{style:c,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]}),g=Mn(n);return o?f.jsx(di,{className:`${g}`,padding:a.padding,background:p,align:a.textAlign,width:"100%",children:f.jsx("a",{href:ew(o),style:{textDecoration:"none",display:"block",width:"100%",height:"100%"},target:"_blank",children:h})}):f.jsx(di,{className:`${g}`,padding:a.padding,background:p,align:a.textAlign,width:"100%",children:h})}const A9=({data:t,setData:e,blockId:n})=>{const{t:r}=pn.useTranslation("inspector"),[i,a]=D.useState(!1),[s,o]=D.useState(window.emailAIGeneration||!1),[,l]=D.useState(null),[c,u]=D.useState(""),[d,p]=D.useState(!1),[m,h]=D.useState(""),[g,_]=D.useState(!1),b=D.useRef(null),y=vy(),[v,E]=D.useState(null);D.useEffect(()=>{const O=window.__emailBuilderCustomImageProvider;O&&(E(O),setTimeout(()=>{n&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:n,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},100))},[]);const S=O=>{const $=tw.safeParse(O);$.success?(e($.data),l(null)):l($.error)},k=(O,$)=>{const z=O.toLowerCase(),X=z.includes(".svg")||z.includes("svg"),W=$&&($.includes("image/svg+xml")||$.includes("svg"));return X||!!W},x=async O=>{try{p(!0),h(""),_(!1);try{new URL(O)}catch{return h(r("inputs.image.invalidUrl")),!1}const $=new AbortController,z=setTimeout(()=>$.abort(),1e4);try{const X=await fetch(O,{method:"HEAD",signal:$.signal});if(clearTimeout(z),!X.ok)return h(`HTTP ${X.status}: ${X.statusText}`),!1;const W=X.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(ye=>W&&W.toLowerCase().includes(ye.toLowerCase()))?(k(O,W)&&_(!0),h(""),!0):(h(r("inputs.image.notImage")),!1)}catch(X){return clearTimeout(z),X.name==="AbortError"?(h(r("inputs.image.timeout")),!1):new Promise(W=>{const te=new Image,pe=setTimeout(()=>{h(r("inputs.image.timeout")),W(!1)},1e4);te.onload=()=>{clearTimeout(pe),k(O)&&_(!0),h(""),W(!0)},te.onerror=()=>{clearTimeout(pe),h("Cannot access image - CORS policy, network error, or invalid URL"),W(!1)},te.src=O})}}catch{return h("Unexpected error occurred while validating URL"),!1}finally{p(!1)}},w=async()=>{c.trim()&&await x(c.trim())&&(S({...t,props:{...t.props,url:c.trim()}}),u(""))},N=O=>{O.key==="Enter"&&w()},R=O=>{u(O.target.value),m&&h(""),g&&_(!1)},T=O=>{const $=["image/png","image/jpeg","image/gif"],X=O.filter(te=>$.includes(te.type)&&te.size<=5242880);if(X.length!==O.length&&alert(r("inputs.common.invalidFiles")),X.length===0)return;const W=X.map(te=>new Promise(pe=>{const ye=new FileReader;ye.onload=ae=>pe(ae.target?.result),ye.readAsDataURL(te)}));Promise.all(W).then(te=>{const pe={images:te,id:n||""};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:pe})),Od(!0,n||"")})},B=O=>{O.preventDefault(),a(!0)},A=O=>{const $=O.currentTarget.getBoundingClientRect(),z=O.clientX,X=O.clientY;(z<$.left||z>=$.right||X<$.top||X>=$.bottom)&&a(!1)},L=O=>{O.preventDefault(),a(!1);const $=Array.from(O.dataTransfer.files);$.length>0&&T($)},M=()=>{const O=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(O)};return D.useEffect(()=>{const O=te=>{const{detail:pe}=te;Od(!1,pe.id||""),S({...t,props:{...t.props,url:pe.url}}),U6(!1)},$=te=>{Od(te?.detail?.uploading??!1,te?.detail?.id??"")},z=te=>{const{detail:pe}=te;o(pe)},X=()=>{b?.current?.click()},W=te=>{const{detail:pe}=te;S({...t,props:{...t.props,url:pe}})};return window.addEventListener("email-builder-set-image",W),window.addEventListener("email-builder-upload-image-receive",O),window.addEventListener("email-builder-ai-generation",z),window.addEventListener("email-builder-upload-file",X),window.addEventListener("email-builder-toggle-upload-file",$),()=>{window.removeEventListener("email-builder-toggle-upload-file",$),window.removeEventListener("email-builder-ai-generation",z),window.removeEventListener("email-builder-upload-image-receive",O),window.removeEventListener("email-builder-set-image",W),window.removeEventListener("email-builder-upload-file",X)}},[t]),D.useEffect(()=>{t.props?.url&&_(k(t.props.url))},[t.props?.url]),f.jsxs(Fn,{gap:1,children:[v?f.jsx(bt,{sx:{mb:2},children:v}):f.jsx("div",{style:{display:"flex",gap:8},children:y?f.jsxs(mi,{children:[f.jsx(Xn,{label:r("inputs.image.urlLabel")}),f.jsxs(Fn,{direction:"row",spacing:1,children:[f.jsx(wh,{fullWidth:!0,placeholder:r("inputs.image.urlPlaceholder"),value:c,onChange:R,onKeyPress:N,error:!!m,disabled:d,sx:{...Sy,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:m?"error.main":"#E5E5E5"},"&:hover fieldset":{borderColor:m?"error.main":"primary.main"},"&.Mui-focused fieldset":{borderColor:m?"error.main":"primary.main"}}}}),f.jsx(ia,{variant:"contained",onClick:w,disabled:!c.trim()||d,sx:{minWidth:"auto",px:2,position:"relative"},children:d?f.jsx(Zs,{size:20,color:"inherit"}):r("inputs.common.add")})]}),m&&f.jsx(Il,{severity:"error",sx:{mt:1,fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:m}),g&&f.jsx(Il,{severity:"warning",sx:{mt:1,marginX:"4px",fontSize:"0.875rem",top:0,"& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},action:f.jsx(vt,{"aria-label":r("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{_(!1)},children:f.jsx(Yk,{fontSize:"inherit"})}),children:r("inputs.common.svgWarning")}),f.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"70%",margin:"0.5rem auto 0 auto",objectFit:"contain",display:"block",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#fff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}})]}):f.jsxs(f.Fragment,{children:[f.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"50%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),f.jsxs(bt,{onDragOver:B,onDragLeave:A,onDrop:L,sx:{width:"100%",border:"2px solid",borderColor:i?"primary.main":"#E5E5E5",borderRadius:"8px",padding:4,textAlign:"center",bgcolor:i?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[f.jsx(bt,{sx:{display:"flex",justifyContent:"center",mb:2},children:f.jsx(c9,{sx:{fontSize:32,color:"primary"}})}),f.jsxs("label",{style:{cursor:"pointer"},children:[f.jsx("input",{ref:b,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:O=>{const $=O.target.files;$&&$.length>0&&T(Array.from($))}}),f.jsx(mr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:r("inputs.common.uploadFile")}),f.jsxs(mr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",r("inputs.common.dragAndDrop")]})]}),f.jsx(mr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("inputs.common.fileInfo")})]})]})}),!v&&!y&&g&&f.jsx(Il,{severity:"warning",sx:{fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."}),!v&&$6()&&!y&&f.jsxs(f.Fragment,{children:[f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:1,children:[f.jsx(Fo,{sx:{flexGrow:1}}),f.jsx(mr,{sx:{color:"text.secondary"},children:"or"}),f.jsx(Fo,{sx:{flexGrow:1}})]}),f.jsxs(Fn,{flexDirection:"row",gap:2,children:[f.jsx(ia,{variant:"outlined",onClick:M,startIcon:f.jsx(o9,{}),sx:{color:"mainColor.main",borderColor:"mainColor.light","&:hover":{borderColor:"mainColor.main",backgroundColor:"action.hover"}},style:{width:"100%"},children:"Browse gallery"}),s&&f.jsx(S9,{src:t.props?.url,style:{width:"100%",margin:0}})]})]})]})};function Gae({data:t,setData:e}){const[,n]=D.useState(null),r=Zl(),{t:i}=pn.useTranslation("inspector"),a=c=>{const u=y9.safeParse(c);u.success?(e(u.data),n(null)):n(u.error)},s=t.props?.size??Mc.size,o=t.props?.alt??Mc.alt;t.props?.shape??Mc.shape;const l=so();return D.useEffect(()=>{const c=u=>{const{detail:d}=u;a({...t,props:{...t.props,alt:o}}),a({...t,props:{...t.props,imageUrl:d}})};return window.addEventListener("email-builder-set-image",c),()=>{window.removeEventListener("email-builder-set-image",c)}},[t,a]),f.jsxs(Ga,{title:i("inputs.panels.avatar.title"),children:[l=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(A9,{data:t,setData:c=>e({...t,props:{...t.props,imageUrl:c.props.url,alt:o}}),blockId:r}),f.jsx(Nc,{label:i("inputs.panels.avatar.sizeLabel"),iconLabel:f.jsx(wre,{sx:{color:"text.secondary"}}),units:"px",step:3,min:32,max:256,defaultValue:s,onChange:c=>{a({...t,props:{...t.props,size:c}})}}),f.jsx(nu,{label:i("inputs.panels.avatar.altLabel"),defaultValue:o,onChange:c=>{a({...t,props:{...t.props,alt:c}})}})]}),f.jsx(Ti,{names:["textAlign","backgroundColor","padding","mobilePadding"],value:t.style,onChange:c=>a({...t,style:c})})]})}const Kv=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),WN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),jae=t=>({top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}),Hae=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),YN=xt({top:Fe().min(0).optional(),bottom:Fe().min(0).optional(),left:Fe().min(0).optional(),right:Fe().min(0).optional()}),N9=xt({style:xt({backgroundColor:Kv,fontSize:Fe().min(0).optional().nullable(),fontSizeMobile:Fe().min(0).optional().nullable(),fontFamily:Jl,background:kt().nullable().optional(),fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),textAlignMobile:jn(["left","center","right"]).optional().nullable(),padding:WN,mobilePadding:WN,shape:Hc([jn(["rectangle","pill"]),Hae]).optional().nullable()}).passthrough().optional().nullable(),props:xt({buttonBackgroundColor:Kv,buttonTextColor:Kv,fullWidth:Uo().optional().nullable(),fullWidthMobile:Uo().optional().nullable(),size:Hc([jn(["x-small","small","medium"]),YN]).optional().nullable(),sizeMobile:Hc([jn(["x-small","small","medium"]),YN]).optional().nullable(),text:kt().optional().nullable(),url:kt().optional().nullable()}).optional().nullable()}).passthrough();function KN(t){if(typeof t!="string")return t;switch(t){case"x-small":return{top:4,bottom:4,right:8,left:8};case"small":return{top:8,bottom:8,right:12,left:12};case"medium":default:return{top:12,bottom:12,left:20,right:20}}}const xl={text:"",url:"",fullWidth:!1,size:"medium",buttonBackgroundColor:"#999999"};function R9({style:t,props:e,blockId:n}){const r=_u(),i=wr(),a=e?.text??xl.text,s=e?.url??xl.url,o=i==="desktop"?e?.fullWidth??!1:e?.fullWidthMobile??e?.fullWidth??!1,l=e?.buttonTextColor??r.textColor,c=e?.buttonBackgroundColor??xl.buttonBackgroundColor,u={backgroundColor:t?.backgroundColor??void 0,textAlign:i=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign,padding:jae(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},d={color:l,fontSize:i=="desktop"?t?.fontSize??16:t?.fontSizeMobile??t?.fontSize??16,fontFamily:ms(t?.fontFamily),fontWeight:t?.fontWeight??"bold",display:"inline-block",textDecoration:"none"},p={color:t?.borderColor??void 0,top:i=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:i=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:i=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:i=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},m=t?.background??"",h=t?.backgroundColor,g=h?Ko(m,h):m,_=Mn(n);return f.jsx(di,{background:g,backgroundColor:h,padding:u.padding,align:u.textAlign,width:"100%",className:`c${_}`,children:f.jsx("a",{href:ew(s),target:"_blank",className:`abtn-${_}`,children:f.jsx(di,{className:_,padding:i=="desktop"?KN(e?.size):KN(e?.sizeMobile??e?.size),borderRadius:gb(t),background:c,backgroundColor:c,isParent:!1,align:"center",width:o?"100%":void 0,border:p,children:f.jsx("span",{className:`btn${_}`,style:d,children:a})})})})}function Vae({size:t,sizeMobile:e,onChange:n,label:r,maxValue:i=100,paddingSteps:a=8}){const{t:s}=pn.useTranslation("inspector"),o=r??s("inputs.common.size"),l=wr(),[c,u]=D.useState(()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?y:{top:8,bottom:8,left:16,right:16}}),[d,p]=D.useState(!1);D.useEffect(()=>{const y=l==="desktop"?t:e!==void 0?e:t;typeof y=="object"&&y!==null&&u(y)},[t,e,l]);const m=()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?"custom":y},h=y=>{if(l==="desktop"){const v={size:y==="custom"?c:y};e==null&&(v.sizeMobile=y==="custom"?c:y),n(v)}else n({sizeMobile:y==="custom"?c:y})},g=(y,v)=>{let E;d?E={top:v,bottom:v,left:v,right:v}:E={...c,[y]:v},u(E),n(l==="desktop"?{size:E}:{sizeMobile:E})},_=()=>{if(!d){const v={top:16,bottom:16,left:16,right:16};u(v),n(l==="desktop"?{size:v}:{sizeMobile:v})}p(!d)},b=m();return f.jsxs(Fn,{spacing:2,children:[f.jsxs(ec,{label:o,defaultValue:b,onChange:h,children:[f.jsx(kn,{value:"x-small",children:s("inputs.responsiveSize.options.xSmall")}),f.jsx(kn,{value:"small",children:s("inputs.responsiveSize.options.small")}),f.jsx(kn,{value:"medium",children:s("inputs.responsiveSize.options.medium")}),f.jsx(kn,{value:"custom",children:s("inputs.responsiveSize.options.custom")})]}),b==="custom"&&f.jsxs(Fn,{spacing:2,alignItems:"flexStart",pb:1,children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:s("inputs.responsiveSize.customPadding")}),f.jsx(Bn,{title:s(d?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:_,sx:{marginTop:"0!important",color:d?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:d?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),d?f.jsx(yr,{iconLabel:s("inputs.responsiveSize.allSides"),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:a,marks:a>1,max:i}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(Y6,{sx:{fontSize:16}}),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(W6,{sx:{fontSize:16}}),value:c.bottom,setValue:y=>g("bottom",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(H6,{sx:{fontSize:16}}),value:c.left,setValue:y=>g("left",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(V6,{sx:{fontSize:16}}),value:c.right,setValue:y=>g("right",y),units:"px",min:0,step:a,marks:a>1,max:i})]})]})]})}function Wae({fullWidth:t,fullWidthMobile:e,onChange:n,label:r="Width"}){const i=wr(),{t:a}=pn.useTranslation("inspector"),s=()=>i==="desktop"?t:e!==void 0?e:t,o=c=>{const u=c==="FULL_WIDTH";if(i==="desktop"){const d={fullWidth:u};e==null&&(d.fullWidthMobile=u),n(d)}else n({fullWidthMobile:u})},l=s();return f.jsxs(ec,{label:r,defaultValue:l?"FULL_WIDTH":"AUTO",onChange:o,children:[f.jsx(kn,{value:"FULL_WIDTH",children:a("inputs.width.full")}),f.jsx(kn,{value:"AUTO",children:a("inputs.width.auto")})]})}function Yae({data:t,setData:e}){const[,n]=D.useState(null),r=_u(),{t:i}=pn.useTranslation("inspector"),a=g=>{const _=N9.safeParse(g);_.success?(e(_.data),n(null)):n(_.error)},s=t.props?.text??xl.text,o=t.props?.url??xl.url,l=t.props?.fullWidth??xl.fullWidth,c=t.props?.size??xl.size,u=t.props?.buttonTextColor??r.textColor,d=t.props?.buttonBackgroundColor??xl.buttonBackgroundColor,p=t.props?.fullWidthMobile,m=t.props?.sizeMobile,h=so();return f.jsxs(Ga,{title:i("inputs.panels.button.title"),children:[h=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(Ti,{disabledCSSValidation:!0,names:["fontFamily","fontSize","fontSizeMobile","fontWeight"],value:t.style,onChange:g=>a({...t,style:g})}),f.jsx(nu,{label:i("inputs.panels.button.textLabel"),defaultValue:s,onChange:g=>a({...t,props:{...t.props,text:g}})}),f.jsx(nu,{label:i("inputs.panels.button.targetLabel"),placeholder:i("inputs.panels.button.targetPlaceholder"),defaultValue:o,onChange:g=>a({...t,props:{...t.props,url:g}})}),f.jsx(Wae,{label:i("properties.width"),fullWidth:l,fullWidthMobile:p,onChange:g=>a({...t,props:{...t.props,...g}})}),f.jsx(Vae,{size:c,sizeMobile:m,onChange:g=>a({...t,props:{...t.props,...g}})}),f.jsx(Vc,{label:i("inputs.panels.button.textColor"),defaultValue:u,onChange:g=>a({...t,props:{...t.props,buttonTextColor:g}})}),f.jsx(Vc,{label:i("inputs.panels.button.buttonColor"),defaultValue:d,onChange:g=>a({...t,props:{...t.props,buttonBackgroundColor:g}})})]}),f.jsx(Ti,{names:["shape","textAlign","textAlignMobile","backgroundColor","border","borderMobile","padding","mobilePadding"],value:t.style,shapeMaxValue:80,onChange:g=>a({...t,style:g})})]})}const Kae=Qk([Fe().nullish(),Fe().nullish(),Fe().nullish()]).optional().nullable(),I9=xt({style:xt({background:kt().nullable().optional(),backgroundColor:kt().nullable().optional(),padding:_b,mobilePadding:_b}).optional().nullable(),props:xt({fixedWidths:Kae,columnsCount:Hc([hb(2),hb(3)]).optional().nullable(),layout:kt().optional().nullable(),contentAlignment:jn(["top","middle","bottom"]).optional().nullable(),contentAlignmentMobile:jn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough(),Qae={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},tm={columnsCount:2,contentAlignment:"middle"};function QN({style:t,columns:e,props:n,blockId:r}){const i=wr(),a=yy(),s={padding:Op(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},o={columnsCount:n?.columnsCount??tm.columnsCount,contentAlignment:i=="desktop"?n?.contentAlignment??tm.contentAlignment:n?.contentAlignmentMobile??n?.contentAlignment??tm.contentAlignment,fixedWidths:n?.fixedWidths,blockId:r},l=t?.background??"",c=t?.backgroundColor,u=c?Ko(l,c):l,d=Mn(r);return f.jsxs(di,{background:u,backgroundColor:c,className:`${d}`,padding:s.padding,width:"100%",children:[a.uploading&&a.id===r?f.jsx("div",{style:Qae,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}):f.jsx(f.Fragment,{}),f.jsx("table",{border:0,cellSpacing:"0",cellPadding:"0",style:{width:"100%"},children:f.jsx("tbody",{style:{width:"100%"},children:f.jsxs("tr",{style:{width:"100%"},children:[f.jsx(Qv,{index:0,props:o,columns:e}),f.jsx(Qv,{index:1,props:o,columns:e}),f.jsx(Qv,{index:2,props:o,columns:e})]})})})]})}function Qv({index:t,props:e,columns:n}){const r=e?.contentAlignment??tm.contentAlignment;if((e?.columnsCount??tm.columnsCount)===2&&t===2)return null;const a={boxSizing:"border-box",verticalAlign:r,width:`${e.fixedWidths?.[t]}%`??void 0},s=(n&&n[t])??null,o=e.blockId?Mn(e.blockId):"";return f.jsx("td",{className:`col${o}`,style:a,children:s})}const Xae=I9.shape.props.unwrap().unwrap().shape,nw=xt({style:I9.shape.style,props:xt({...Xae,columns:Qk([xt({childrenIds:jc(kt())}),xt({childrenIds:jc(kt())}),xt({childrenIds:jc(kt())})])}).optional().nullable()}).passthrough(),Zae=(t,e,n)=>{if(!t||!document)return;const r=Mn(t),i=document.querySelector(`.${r}`);if(!i)return;const a=i.parentElement;if(!a)return;const s=Math.ceil(a.getBoundingClientRect().width);n.props?.touched||n.props?.width!==s&&e({...n,props:{...n.props,width:s}})},Jae=t=>{if(!t||!document)return;const e=Mn(t),n=document.querySelector(`.${e}`);if(!n)return;const r=n.parentElement;if(!r)return;const i=Math.ceil(r.getBoundingClientRect().width);return i||null},ese={desktop:"contentAlignment",mobile:"contentAlignmentMobile"};function tse({data:t,updateData:e}){const{t:n}=pn.useTranslation("inspector"),r=wr(),i=ese[r]||"contentAlignment",a=t.props?.[i]??t.props?.contentAlignment,s=o=>{e({...t,props:{...t.props,[i]:o}})};return f.jsxs(ec,{label:n("inputs.alignment.label"),defaultValue:a,onChange:s,children:[f.jsx(kn,{value:"top",children:f.jsx(eie,{fontSize:"small"})}),f.jsx(kn,{value:"middle",children:f.jsx(Jre,{fontSize:"small"})}),f.jsx(kn,{value:"bottom",children:f.jsx(Zre,{fontSize:"small"})})]})}const pf={grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(100px, 1fr))",gap:"16px",width:"100%"},card:{cursor:"pointer",border:"1px solid #e5e7eb",borderRadius:"8px",backgroundColor:"primary"},cardContent:{padding:"8px"},layoutPreview:{display:"flex",gap:"4px",height:"30px",width:"100%",justifyContent:"space-between"}},nse=({defaultValue:t,onChange:e,columns:n})=>{const{t:r}=pn.useTranslation("inspector"),[i,a]=D.useState(t||"layout-50-50"),s=kr();D.useEffect(()=>{i!==t&&a(t==="layout-33-34-33"?"layout-33-33-33":t)},[t]);const o=[{id:"layout-50-50",distribution:[50,50,null]},{id:"layout-55-45",distribution:[55,45,null]},{id:"layout-45-55",distribution:[45,55,null]},{id:"layout-60-40",distribution:[60,40,null]},{id:"layout-40-60",distribution:[40,60,null]},{id:"layout-70-30",distribution:[70,30,null]},{id:"layout-30-70",distribution:[30,70,null]},{id:"layout-75-25",distribution:[75,25,null]},{id:"layout-25-75",distribution:[25,75,null]},{id:"layout-80-20",distribution:[80,20,null]},{id:"layout-20-80",distribution:[20,80,null]}],l=[{id:"layout-33-33-33",distribution:[33.34,33.33,33.33]},{id:"layout-30-40-30",distribution:[30,40,30]},{id:"layout-25-50-25",distribution:[25,50,25]},{id:"layout-20-60-20",distribution:[20,60,20]},{id:"layout-50-25-25",distribution:[50,25,25]},{id:"layout-25-25-50",distribution:[25,25,50]},{id:"layout-60-20-20",distribution:[60,20,20]},{id:"layout-20-20-60",distribution:[20,20,60]},{id:"layout-40-30-30",distribution:[40,30,30]},{id:"layout-30-30-40",distribution:[30,30,40]},{id:"layout-40-20-40",distribution:[40,20,40]}],[c,u]=D.useState(l),d=(p,m)=>{a(p),e({layout:p,fixedWidths:m})};return D.useEffect(()=>{if(n===2)u(o),o.findIndex(p=>p.id==t)===-1&&d("layout-50-50",[50,50,null]);else{if(u(l),t==="layout-33-34-33"){d("layout-33-33-33",[33.34,33.33,33.33]);return}l.findIndex(p=>p.id==t)===-1&&d("layout-33-33-33",[33.34,33.33,33.33])}},[n]),D.useEffect(()=>{t==="layout-33-34-33"&&d("layout-33-33-33",[33.34,33.33,33.33])},[t]),f.jsxs(mi,{children:[f.jsx(Xn,{label:r("inputs.layout.label")}),f.jsx("div",{style:pf.grid,children:c.map((p,m)=>f.jsx("div",{onClick:()=>d(p.id,p.distribution),style:{...pf.card,gridColumn:m===0?"span 2":void 0,border:i===p.id?`2px solid ${s.palette.secondary.main}`:pf.card.border},children:f.jsx("div",{style:pf.cardContent,children:f.jsx("div",{style:pf.layoutPreview,children:p.distribution.map((h,g)=>f.jsx("div",{style:{width:`${h}%`,backgroundColor:i===p.id?s.palette.secondary.main:"#e5e7eb",borderRadius:"4px",transition:"background-color 0.2s ease",display:"grid",placeItems:"center",fontSize:"12px",color:i===p.id?"white":"black"}},g))})})},p.id))})]})};function rse({data:t,setData:e}){const[,n]=D.useState(null),[r,i]=D.useState(t.props?.columnsCount??2),a=so(),s=wr(),{t:o}=pn.useTranslation("inspector"),l=m=>{const h=Oe.getState().document,g=m.filter(_=>h[_]?.type==="Image");s==="desktop"&&g.map(_=>Zae(_,e,h[_].data))},c=m=>{const h=nw.safeParse(m);h.success?(h.data.props.columns.map(g=>l(g.childrenIds)),e(h.data),r&&h.data.props?.columnsCount!==r&&i(h.data.props?.columnsCount??2),n(null)):(console.error("Error on columns: ",h.error),n(h.error))},u={layout:"layout-50-50",fixedWidths:[50,50,null],columnsCount:2},d={layout:"layout-33-34-33",fixedWidths:[33,34,33],columnsCount:3},p=m=>{const h=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:[...t.props.columns];return m==="2"?{...u,columns:h}:{...d,columns:h}};return f.jsxs(Ga,{title:o("inputs.panels.columns.title"),children:[a=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsxs(ec,{label:o("inputs.panels.columns.countLabel"),defaultValue:t.props?.columnsCount===2?"2":"3",onChange:m=>{const h=p(m);c({...t,props:{...t.props,...h}})},children:[f.jsx(kn,{style:{fontWeight:"bold"},value:"2",children:"2"}),f.jsx(kn,{style:{fontWeight:"bold"},value:"3",children:"3"})]}),f.jsx(nse,{columns:t.props?.columnsCount??3,defaultValue:t.props?.layout,onChange:({layout:m,fixedWidths:h})=>{const g=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:t.props.columns;c({...t,props:{...t.props,layout:m,fixedWidths:h,columns:g}})}})]}),a=="css"&&f.jsxs(f.Fragment,{children:[f.jsx(tse,{data:t,updateData:e}),f.jsx(Ti,{names:["backgroundColor","background","padding","mobilePadding"],value:t.style,onChange:m=>c({...t,style:m})})]})]})}const XN=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),ZN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),ise=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),JN={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},ase=xt({style:xt({backgroundColor:XN,background:kt().nullable().optional(),borderColor:XN,borderRadius:Fe().optional().nullable(),borderTop:Fe().optional().nullable(),borderBottom:Fe().optional().nullable(),borderLeft:Fe().optional().nullable(),borderRight:Fe().optional().nullable(),borderTopMobile:Fe().optional().nullable(),borderBottomMobile:Fe().optional().nullable(),borderLeftMobile:Fe().optional().nullable(),borderRightMobile:Fe().optional().nullable(),shape:Hc([jn(["rectangle","pill"]),ise]).optional().nullable(),padding:ZN,mobilePadding:ZN}).optional().nullable()}).passthrough();function sse({style:t,children:e,blockId:n}){const r=wr(),i=yy(),a={border:{color:t?.borderColor??void 0,top:r=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:r=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:r=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:r=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},padding:Op(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},s=t?.background??"",o=t?.backgroundColor,l=o?Ko(s,o):s,c=Mn(n);return e?f.jsx(di,{className:`${c}`,background:l,backgroundColor:t?.backgroundColor,borderRadius:gb(t),padding:a.padding,width:"100%",border:a.border,children:f.jsxs(f.Fragment,{children:[i.uploading&&i.id===n&&f.jsx("div",{style:JN,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}),e]})}):f.jsx(di,{className:`${c}`,background:l,backgroundColor:o,borderRadius:gb(t),padding:a.padding,width:"100%",border:a.border,children:f.jsx("div",{children:i.uploading&&i.id===n&&f.jsx("div",{style:JN,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})})})}const O9=xt({style:ase.shape.style,props:xt({childrenIds:jc(kt()).optional().nullable()}).optional().nullable()}).passthrough();function P9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=O9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.container.title"),children:f.jsx(Ti,{names:["backgroundColor","background","border","borderMobile","shape","padding","mobilePadding"],value:t.style,shapeSteps:30,onChange:a=>i({...t,style:a})})})}const ose=t=>e=>e.document[t],lse=(t,e)=>n=>n.document[t]?.data?.props?.[e],cse=t=>e=>e.document[t]?.data?.style;function use(t){return Oe(ose(t))}function dse(t,e){return Oe(lse(t,e))}function pse(t){return Oe(cse(t))}function fse(t){const e=D.useCallback(l=>{Ul(t,l)},[t]),n=D.useCallback(l=>{G6(t,l)},[t]),r=D.useCallback((l,c)=>{Sre(t,l,c)},[t]),i=D.useCallback(l=>{j6(t,l)},[t]),a=D.useCallback((l,c)=>{Tre(t,l,c)},[t]),s=D.useCallback(l=>{Cre(t,l)},[t]),o=D.useCallback(l=>{xre(t,l)},[t]);return D.useMemo(()=>({updateBlock:e,updateProps:n,updateProp:r,updateStyles:i,updateStyle:a,batchUpdateProps:s,batchUpdateStyles:o}),[e,n,r,i,a,s,o])}const eR=t=>{const e=Zl();L6(e??""),M6();const n=so();_u();const{t:r}=pn.useTranslation("inspector");dse(e??"","html");const i=pse(e??""),{updateProp:a,updateStyles:s}=fse(e??"");if(!e)return null;const o=l=>{s(()=>l)};return f.jsxs(Ga,{title:r("inputs.panels.text.title"),children:[n==="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{display:"flex",gap:"8px"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(Ti,{disabledCSSValidation:!0,names:["fontFamily"],value:i,onChange:o})}),f.jsx("div",{style:{flex:1},children:f.jsx(Ti,{disabledCSSValidation:!0,names:["lineHeight"],value:i,onChange:o})})]}),f.jsx(Ti,{disabledCSSValidation:!0,names:["fontSize","fontSizeMobile"],value:i,onChange:o}),f.jsx(bt,{sx:{m:1,p:1.5,border:"1px dashed",borderColor:"divider",borderRadius:1},children:f.jsx(mr,{color:"text.secondary",fontSize:14,children:r("inputs.panels.text.doubleClickToEdit","Double-click on the block in the canvas to edit the content")})})]}),n==="css"&&f.jsx(Ti,{names:["backgroundColor","border","borderMobile","padding","mobilePadding"],value:i,onChange:o})]})},mse=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),tR=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),L9=xt({style:xt({background:kt().nullable().optional(),backgroundColor:mse,padding:tR,mobilePadding:tR,height:Fe().optional().nullable(),heightMobile:Fe().optional().nullable(),color:kt().optional().nullable(),width:Fe().optional().nullable(),widthMobile:Fe().optional().nullable(),textAlign:kt().optional().nullable(),textAlignMobile:kt().optional().nullable()}).passthrough().optional().nullable()}).passthrough(),yc={height:1,color:"#333333",width:100,textAlign:"left"};function M9({style:t,blockId:e}){const n=wr(),r=Op(n==="desktop"?t?.padding:t?.mobilePadding??t?.padding),i=n==="desktop"?t?.height??yc.height:t?.heightMobile??t?.height??yc.height,a=t?.color??yc.color,s=n==="desktop"?(t?.width??yc.width)+"%":(t?.widthMobile??t?.width??yc.width)+"%",o=n==="desktop"?t?.textAlign??yc.textAlign:t?.textAlignMobile??t?.textAlign??yc.textAlign,l=t?.background??"",c=t?.backgroundColor??"",u=c?Ko(l,c):l,d=Mn(e);return f.jsx(di,{className:`c${d}`,background:u,backgroundColor:c,width:"100%",padding:r,align:o,children:f.jsx(di,{display:"inline-block",className:`${d}`,background:a,backgroundColor:c,width:s,padding:{top:i,bottom:0,left:0,right:0},isParent:!1,children:f.jsx("div",{})})})}function F9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=L9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.divider.title"),children:f.jsx(Ti,{names:["width","widthMobile","height","heightMobile","color","backgroundColor","textAlign","textAlignMobile","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})})}const ff=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),B9=xt({backdropColor:ff,borderColor:ff,borderRadius:Fe().optional().nullable(),canvasColor:ff,textColor:ff,fontFamily:Jl,childrenIds:jc(kt()).optional().nullable(),linkGlobal:xt({linkColor:ff,underline:Uo()}).optional().nullable(),showVersion:Uo().optional().nullable()}),hse=({label:t,linkColor:e,underline:n=!1,onChange:r})=>{const[i,a]=D.useState(e??"#FF0000"),[s,o]=D.useState(n),l=kr(),{t:c}=pn.useTranslation("inspector"),u=t??c("inputs.links.color"),d=s?"enabled":"disabled",p={width:"100%","& .MuiToggleButton-root":{flex:1,color:l.palette.text.primary,borderColor:l.palette.grey[300],minWidth:"40px","&.Mui-selected":{backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText,borderColor:l.palette.primary.main,"&:hover":{backgroundColor:l.palette.primary.dark}},"&:hover":{backgroundColor:l.palette.grey[100]}}};D.useEffect(()=>{e!==i&&a(e??"#FF0000")},[e]),D.useEffect(()=>{n!==s&&o(n)},[n]);const m=g=>{const _=g??"#FF0000";a(_),r({linkColor:_,underline:s})},h=(g,_)=>{if(!_)return;const b=_==="enabled";o(b),r({linkColor:i,underline:b})};return f.jsx(Fn,{spacing:2,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px",gap:"16px"},children:[f.jsx(Vc,{label:u,defaultValue:i,onChange:m}),f.jsxs("div",{children:[f.jsx(Xn,{label:c("inputs.links.underline")}),f.jsx(bt,{sx:{...E9,padding:0,mt:1},children:f.jsxs(Dh,{value:d,exclusive:!0,size:"small",onChange:h,sx:p,children:[f.jsx(kn,{value:"enabled",children:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOn"),children:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia subrayado",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("title",{children:"aiia subrayado"}),f.jsx("rect",{width:"20",height:"20",fill:"none"}),f.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"}),f.jsx("line",{x1:"6",y1:"31",x2:"34",y2:"31",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),f.jsx(kn,{value:"disabled",children:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOff"),children:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("title",{children:"aiia"}),f.jsx("rect",{width:"20",height:"20",fill:"none"}),f.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"})]})})})]})})]})]})})},gse="email-builder-online",_se="3.3.0",Xv={name:gse,version:_se};function U9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=B9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsxs(Ga,{title:r("inputs.panels.emailLayout.title"),children:[f.jsx(Vc,{label:r("inputs.panels.emailLayout.backgroundColor"),defaultValue:t.backdropColor??"#F5F5F5",onChange:a=>i({...t,backdropColor:a})}),f.jsx(Vc,{label:r("inputs.panels.emailLayout.canvasColor"),defaultValue:t.canvasColor??"#FFFFFF",onChange:a=>i({...t,canvasColor:a})}),f.jsx(w9,{label:r("inputs.panels.emailLayout.fontFamily"),defaultValue:t.fontFamily||Ol.FAMILY,onChange:a=>i({...t,fontFamily:a})}),f.jsx(Vc,{label:r("inputs.panels.emailLayout.textColor"),defaultValue:t.textColor??"#262626",onChange:a=>i({...t,textColor:a})}),f.jsx(hse,{label:r("inputs.panels.emailLayout.linksLabel"),linkColor:t.linkGlobal?.linkColor||"#000000",underline:t.linkGlobal?.underline||!1,onChange:a=>i({...t,linkGlobal:a})}),t.showVersion&&f.jsx(bt,{color:"text.secondary",sx:{display:"flex",justifyContent:"flex-end",mt:2},children:f.jsxs(bt,{sx:{textAlign:"right"},children:[f.jsxs(mr,{variant:"body2",children:[r("inputs.panels.emailLayout.version"),": ",Xv.version]}),f.jsx(NJ,{href:`https://www.npmjs.com/package/${Xv.name}`,target:"_blank",rel:"noopener noreferrer",sx:{fontSize:"0.875rem",mt:.5,display:"inline-block"},children:Xv.name})]})})]})}const nR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),bse=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),yse=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,$9=xt({props:xt({text:kt().optional().nullable(),level:jn(["h1","h2","h3"]).optional().nullable()}).optional().nullable(),style:xt({color:nR,backgroundColor:nR,fontFamily:Jl,fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),padding:bse}).optional().nullable()}),bb={level:"h2",text:""};function z9({props:t,style:e}){const n=t?.level??bb.level,r=t?.text??bb.text,i={color:e?.color??void 0,backgroundColor:e?.backgroundColor??void 0,fontWeight:e?.fontWeight??"bold",textAlign:e?.textAlign??void 0,margin:0,fontFamily:ms(e?.fontFamily),fontSize:vse(n),padding:yse(e?.padding)};switch(n){case"h1":return f.jsx("h1",{style:i,children:r});case"h2":return f.jsx("h2",{style:i,children:r});case"h3":return f.jsx("h3",{style:i,children:r})}}function vse(t){switch(t){case"h1":return 32;case"h2":return 24;case"h3":return 20}}function Ese({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=s=>{const o=$9.safeParse(s);o.success?(e(o.data),n(null)):n(o.error)},a=so();return f.jsxs(Ga,{title:r("inputs.panels.heading.title"),children:[a=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(nu,{label:r("inputs.panels.heading.contentLabel"),rows:3,defaultValue:t.props?.text??bb.text,onChange:s=>{i({...t,props:{...t.props,text:s}})}}),f.jsxs(ec,{label:r("inputs.panels.heading.levelLabel"),defaultValue:t.props?.level??bb.level,onChange:s=>{i({...t,props:{...t.props,level:s}})},children:[f.jsx(kn,{value:"h1",children:"H1"}),f.jsx(kn,{value:"h2",children:"H2"}),f.jsx(kn,{value:"h3",children:"H3"})]})]}),f.jsx(Ti,{names:["color","backgroundColor","fontFamily","fontWeight","textAlign","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})]})}const rR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),Sse=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),Tse=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,q9=xt({style:xt({color:rR,backgroundColor:rR,fontFamily:Jl,fontSize:Fe().min(0).optional().nullable(),textAlign:jn(["left","right","center"]).optional().nullable(),padding:Sse}).optional().nullable(),props:xt({contents:kt().optional().nullable()}).optional().nullable()});function G9({style:t,props:e}){const n=e?.contents,r={color:t?.color??void 0,backgroundColor:t?.backgroundColor??void 0,fontFamily:ms(t?.fontFamily),fontSize:t?.fontSize??void 0,textAlign:t?.textAlign??void 0,padding:Tse(t?.padding)};return n?f.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:n}}):f.jsx("div",{style:r})}function Cse({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=s=>{const o=q9.safeParse(s);o.success?(e(o.data),n(null)):n(o.error)},a=so();return f.jsxs(Ga,{title:r("inputs.panels.html.title"),children:[a=="block-configuration"&&f.jsx(f.Fragment,{children:f.jsx(nu,{label:r("inputs.panels.html.contentLabel"),rows:5,defaultValue:t.props?.contents??"",onChange:s=>i({...t,props:{...t.props,contents:s}})})}),f.jsx(Ti,{names:["color","backgroundColor","fontFamily","fontSize","textAlign","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})]})}const xse=(t,e,n)=>{const r=wr();D.useEffect(()=>{const i=()=>{if(!t||!document||r=="mobile")return;const o=Mn(t),l=document.querySelector(`.${o}`);if(!l)return;const c=l.parentElement;if(!c)return;const u=Math.ceil(c.getBoundingClientRect().width);n.props?.size===void 0||n.props?.size==="original"||n.props?.touched&&n.props?.width<=u||n.props?.width!==u&&!n.props?.touched&&e({...n,props:{...n.props,width:u}})};i();const a=new ResizeObserver(i),s=document.querySelector(`.${Mn(t)}`);return s?.parentElement&&a.observe(s.parentElement),()=>{a.disconnect()}},[t,e,n,r])},kse=({defaultValue:t="original",scale:e=100,onChange:n})=>{const[r,i]=D.useState(t),[a,s]=D.useState(e);wr();const o=kr(),{t:l}=pn.useTranslation("inspector"),c={container:{width:"100%"},label:{color:o.palette.text.primary},toggleGroup:{width:"100%",backgroundColor:o.palette.background.paper,padding:"4px",borderRadius:"8px"},toggleButton:{flex:1,padding:"6px 16px",textTransform:"none",fontSize:"14px",color:o.palette.text.primary,"&.Mui-selected":{backgroundColor:o.palette.grey[200],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.grey[300]}},"&:hover":{backgroundColor:o.palette.grey[100]}},sliderContainer:{marginTop:"16px",padding:"0 8px"},slider:{"& .MuiSlider-thumb":{backgroundColor:o.palette.primary.main,"&:hover":{boxShadow:`0 0 0 8px ${o.palette.primary.main}20`}},"& .MuiSlider-rail":{backgroundColor:o.palette.grey[300]},"& .MuiSlider-track":{backgroundColor:o.palette.primary.main}},scaleValue:{color:o.palette.text.secondary}};D.useEffect(()=>{(t!==r||e!==a)&&(t!==r&&i(t),t==="scale"&&s(e))},[t,e]);const u=(p,m)=>{m!==null&&(i(m),n&&n({mode:m,scale:m==="scale"?a:void 0}))},d=p=>{s(p),n&&n({mode:r,scale:p})};return f.jsxs(mi,{children:[f.jsx(Xn,{label:l("inputs.sizeSelector.label")}),f.jsxs(bt,{sx:c.container,children:[f.jsxs(Dh,{value:r,exclusive:!0,onChange:u,sx:c.toggleGroup,children:[f.jsx(kn,{value:"original",sx:c.toggleButton,children:l("inputs.sizeSelector.contain")}),f.jsx(kn,{value:"fill",sx:c.toggleButton,children:l("inputs.sizeSelector.cover")}),f.jsx(kn,{value:"scale",sx:c.toggleButton,children:l("inputs.sizeSelector.scale")})]}),f.jsx(X4,{in:r==="scale",children:f.jsx(bt,{sx:c.sliderContainer,children:f.jsx(yr,{iconLabel:f.jsx(nie,{}),value:a,setValue:d,marks:!1,units:"%",min:1,max:100})})})]})]})};function wse({data:t,setData:e}){const[n,r]=D.useState(null),i=Zl(),a=so(),s=wr(),{t:o}=pn.useTranslation("inspector");xse(i||"",e,t),D.useEffect(()=>{i&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:i,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},[i,t.props?.url,t.props?.alt]);const l=D.useCallback(g=>{const _=tw.safeParse(g);_.success?JSON.stringify(t)!==JSON.stringify(_.data)&&(e(_.data),r(null)):r(_.error)},[t,e]),c=D.useCallback((g,_,b)=>{const y=Jae(i)||Cd,v={...g.props};if(b&&(v.touchedMobile=!0),_.mode==="original"){const E=g.props?.original_width??null;return b?{...v,sizeMobile:_.mode,widthMobile:E}:{...v,size:_.mode,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:E}}if(_.mode==="fill")return b?{...v,sizeMobile:_.mode,widthMobile:null}:{...v,size:_.mode,width:null,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:null};if(_.mode==="scale"){const E=Math.ceil(y/100*_.scale);return b?{...v,sizeMobile:_.mode,scaleMobile:_.scale,widthMobile:E}:{...v,size:_.mode,scale:_.scale,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,scaleMobile:v.touchedMobile?v.scaleMobile:_.scale,widthMobile:v.touchedMobile?v.widthMobile:E}}return v},[i]),u=D.useCallback((g,_)=>{const b=c(t,g,_);l({...t,props:b})},[t,l,c]),d=D.useMemo(()=>s!=="desktop"?{size:t.props?.touchedMobile?t.props?.sizeMobile:t.props?.size??"original",scale:t.props?.touchedMobile?t.props?.scaleMobile:t.props?.scale}:{size:t.props?.size??"original",scale:t.props?.scale},[s,t.props?.touchedMobile,t.props?.sizeMobile,t.props?.size,t.props?.scaleMobile,t.props?.scale]),p=D.useCallback(g=>{l({...t,props:{...t.props,alt:g}})},[t,l]),m=D.useCallback(g=>{const _=g.trim().length===0?null:g.trim();l({...t,props:{...t.props,linkHref:_}})},[t,l]),h=D.useCallback(g=>{l({...t,style:g})},[t,l]);return f.jsxs(Ga,{title:o("inputs.panels.image.title"),children:[a==="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(A9,{data:t,setData:e,blockId:i}),f.jsx(nu,{label:o("inputs.panels.image.altLabel"),placeholder:o("inputs.panels.image.altPlaceholder"),defaultValue:t.props?.alt??"",onChange:p}),f.jsx(nu,{label:o("inputs.panels.image.urlLabel"),placeholder:o("inputs.panels.image.urlPlaceholder"),defaultValue:t.props?.linkHref??"",onChange:m}),f.jsx(kse,{defaultValue:d.size,scale:d.scale??void 0,onChange:g=>u(g,s!=="desktop")})]}),f.jsx(Ti,{names:["textAlign","textAlignMobile","backgroundColor","shape","padding","mobilePadding"],value:t.style,shapeMaxValue:300,shapeSteps:20,onChange:h})]})}const iR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),aR=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),j9=xt({style:xt({color:iR,backgroundColor:iR,background:kt().nullable().optional(),fontSize:Fe().gte(0).optional().nullable(),fontFamily:Jl,fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),padding:aR,mobilePadding:aR,optionSize:jn(["small","medium","large"]).optional().nullable(),theme:jn(["light","dark","colored"]).optional().nullable()}).passthrough().optional().nullable(),gap:Fe().optional(),items:jc(xt({id:kt(),key:kt(),label:kt(),iconName:kt(),theme:kt(),size:kt(),sizePx:kt(),url:kt(),href:kt().optional().nullable()}))}).passthrough();function H9({style:t,items:e,blockId:n,gap:r=1,gapMobile:i}){const a=wr(),s=t?.background??"",o=t?.backgroundColor,l=o?Ko(s,o):s,c={color:t?.color??void 0,background:l,backgroundColor:t?.backgroundColor,fontSize:t?.fontSize??16,fontFamily:ms(t?.fontFamily),fontWeight:t?.fontWeight??void 0,textAlign:a=="desktop"?t?.textAlign:t?.textAlignMobile??t?.textAlign,padding:a=="desktop"?t?.padding:t?.mobilePadding??t?.padding},u=a==="desktop"?r:i??r,d=Mn(n);return f.jsx(Dse,{blockId:`${d}`,items:e,wStyle:c,gap:u})}const Dse=({items:t,blockId:e,wStyle:n,gap:r})=>{const i=a=>{switch(a){case 0:return"first";case t.length-1:return"last";default:return"inside"}};return f.jsx(di,{className:e,background:n.background,backgroundColor:n.backgroundColor,padding:n?.padding,align:n.textAlign,width:"100%",children:f.jsx("table",{style:{display:"inline-block"},border:0,cellSpacing:"0",cellPadding:"0",children:f.jsx("tbody",{children:f.jsx("tr",{children:t.map((a,s)=>{const o=i(s);return f.jsxs(D.Fragment,{children:[o!=="first"&&f.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)}),f.jsx("td",{id:`${a.id}-${a.url}`,width:a.sizePx,style:{textAlign:"center",whiteSpace:"nowrap"},children:f.jsx("a",{target:"_blank",href:ew(a.href),style:{textDecoration:"none"},children:f.jsx("img",{src:a.url,alt:a.key,style:{width:a.sizePx||36,height:a.sizePx||36,display:"block"}})},`item_${s}`)},`${a.id}-${a.url}`),o!=="last"&&f.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)})]},a.id)})})})})})},Ase="https://maildrill-dev.s3.us-east-2.amazonaws.com/icons/",Nse={positive:!0,original:!0,negative:!0},Rse={small:!0,medium:!0,large:!0,xlarge:!0},de={theme:"positive",size:"medium"},Cn=(t,e,n="medium")=>{const r=rw.find(a=>a.key===n)?.value,i=V9.find(a=>a.key===e)?.value;return`${Ase}${t}_${i}_${r}.png`},Pn=t=>rw.find(e=>e.key===t)?.value||"36px",rw=[{value:"24px",key:"small",label:"Small"},{value:"36px",key:"medium",label:"Medium"},{value:"48px",key:"large",label:"Large"}],V9=[{value:"Positive",key:"positive",label:"Light"},{value:"Original",key:"original",label:"Color"},{value:"Negative",key:"negative",label:"Dark"}],x_=[{key:"facebook",label:"Facebook",iconName:"Facebook",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Facebook",de.theme,de.size),href:"https://www.facebook.com/your-profile"},{key:"web",label:"Web",iconName:"Web",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Web",de.theme,de.size),href:"https://www.google.com"},{key:"mail",label:"Mail",iconName:"Mail",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Mail",de.theme,de.size),href:"https://mail.google.com/"},{key:"apple",label:"Apple",iconName:"Apple",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Apple",de.theme,de.size),href:"https://www.apple.com/"},{key:"bluesky",label:"Bluesky",iconName:"Bluesky",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Bluesky",de.theme,de.size),href:"https://bsky.app/"},{key:"clubhouse",label:"ClubHouse",iconName:"Clubhouse",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Clubhouse",de.theme,de.size),href:"https://www.clubhouse.com/"},{key:"dribbble",label:"Dribbble",iconName:"Dribbble",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Dribbble",de.theme,de.size),href:"https://dribbble.com/"},{key:"figma",label:"Figma",iconName:"Figma",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Figma",de.theme,de.size),href:"https://www.figma.com/"},{key:"github",label:"Github",iconName:"Github",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Github",de.theme,de.size),href:"https://github.com/"},{key:"google",label:"Google",iconName:"Google",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Google",de.theme,de.size),href:"https://google.com/"},{key:"instagram",label:"Instagram",iconName:"Instagram",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Instagram",de.theme,de.size),href:"https://www.instagram.com/your-profile"},{key:"linkedin",label:"LinkedIn",iconName:"LinkedIn",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("LinkedIn",de.theme,de.size),href:"https://www.linkedin.com/in/your-profile"},{key:"medium-social",label:"Medium",iconName:"Medium",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Medium",de.theme,de.size),href:"https://medium.com/"},{key:"messenger",label:"Messenger",iconName:"Messenger",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Messenger",de.theme,de.size),href:"https://www.messenger.com/"},{key:"pinterest",label:"Pinterest",iconName:"Pinterest",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Pinterest",de.theme,de.size),href:"https://www.pinterest.com/"},{key:"reddit",label:"Reddit",iconName:"Reddit",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Reddit",de.theme,de.size),href:"https://www.reddit.com/"},{key:"signal",label:"Signal",iconName:"Signal",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Signal",de.theme,de.size),href:"https://signal.org/"},{key:"snapchat",label:"Snapchat",iconName:"Snapchat",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Snapchat",de.theme,de.size),href:"https://www.snapchat.com/"},{key:"spotify",label:"Spotify",iconName:"Spotify",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Spotify",de.theme,de.size),href:"https://www.spotify.com/"},{key:"telegram",label:"Telegram",iconName:"Telegram",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Telegram",de.theme,de.size),href:"https://t.me/your-profile"},{key:"threads",label:"Threads",iconName:"Threads",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Threads",de.theme,de.size),href:"https://www.threads.net/"},{key:"tiktok",label:"TikTok",iconName:"TikTok",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("TikTok",de.theme,de.size),href:"https://www.tiktok.com/@your-profile"},{key:"tumblr",label:"Tumblr",iconName:"Tumblr",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Tumblr",de.theme,de.size),href:"https://www.tumblr.com/"},{key:"twitch",label:"Twitch",iconName:"Twitch",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Twitch",de.theme,de.size),href:"https://www.twitch.tv/"},{key:"vk",label:"VK",iconName:"VK",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("VK",de.theme,de.size),href:"https://vk.com/"},{key:"whatsapp",label:"WhatsApp",iconName:"WhatsApp",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("WhatsApp",de.theme,de.size),href:"https://www.whatsapp.com/"},{key:"x",label:"X",iconName:"X",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("X",de.theme,de.size),href:"https://x.com/your-profile"},{key:"youtube",label:"YouTube",iconName:"YouTube",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("YouTube",de.theme,de.size),href:"https://www.youtube.com/channel/your-channel-id"}];function Rf(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const Ise=({element:t,index:e,moveItem:n,onSelectChange:r,onUrlChange:i,onRemove:a,onDuplicate:s,canRemove:o,theme:l})=>{const c=D.useRef(null),[u,d]=D.useState(null),{t:p}=pn.useTranslation("inspector"),m=N=>{const R=N.getClientOffset(),T=c.current?.getBoundingClientRect();if(!R||!T)return null;const B=(T.bottom-T.top)/2;return R.y-T.top<B?"up":"down"},[{handlerId:h,isOver:g},_]=jd.useDrop(()=>({accept:"social-media-item",collect(N){return{handlerId:N.getHandlerId(),isOver:N.isOver({shallow:!0})}},hover(N,R){if(!c.current)return;if(N.index===e){d(null);return}if(!R.isOver({shallow:!0})){d(null);return}const A=m(R);d(A)},drop(N,R){if(d(null),!c.current)return;const T=N.index,B=e;if(T===B)return;const A=m(R);let L=B;A==="down"&&(L=B+1),T<L&&(L=L-1),setTimeout(()=>{n(T,L)},0),N.index=L},end:()=>{d(null)}}),[t.id,e,n]),[{isDragging:b},y]=jd.useDrag(()=>({type:"social-media-item",item:()=>({id:t.id,index:e}),collect:N=>({isDragging:N.isDragging()}),end:()=>{d(null)}}),[t.id,e]);D.useEffect(()=>{g||d(null)},[g]);const v=b?.4:1;D.useEffect(()=>{if(c.current&&y&&_){const N=c.current;y(N),_(N)}},[y,_]);const E=()=>{setTimeout(()=>a(e),0)},S=()=>{setTimeout(()=>s(e),0)},k=N=>{const R=N.target.value;setTimeout(()=>r(e,R,t),0)},x=N=>{const R=N.target.value;setTimeout(()=>i(e,R,t),0)},w=()=>f.jsxs("div",{style:{height:"3px",background:l.palette.secondary.main,position:"relative",color:l.palette.secondary.main,margin:"4px 0"},children:[f.jsx("svg",{style:{position:"absolute",left:"-25px",top:"50%",transform:"translateY(-50%)"},width:"20",height:"20",viewBox:"0 0 32 32",children:f.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})}),f.jsx("svg",{style:{position:"absolute",right:"-25px",top:"50%",transform:"translateY(-50%) scaleX(-1)"},width:"20",height:"20",viewBox:"0 0 32 32",children:f.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})})]});return f.jsxs(f.Fragment,{children:[u==="up"&&f.jsx(w,{}),f.jsxs(Fn,{ref:c,"data-handler-id":h,sx:{border:1,borderColor:"divider",padding:1,paddingTop:0,borderRadius:1,backgroundColor:"background.paper",marginBottom:1.5,opacity:v,cursor:b?"grabbing":"grab",boxShadow:b?l.shadows[3]:"none"},gap:1,children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${l.palette.divider}`},children:[f.jsx("div",{style:{display:"flex",alignItems:"center"},children:f.jsx(Mre,{sx:{color:b?"primary.main":"text.secondary",cursor:"grab",marginLeft:-.9,"&:hover":{color:"primary.main"}}})}),f.jsxs("div",{children:[f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:"Duplicate",placement:"left",children:f.jsx(vt,{color:"primary",size:"small",onClick:S,children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M18 2.5H9C7.9 2.5 7 3.4 7 4.5V16.5C7 17.6 7.9 18.5 9 18.5H18C19.1 18.5 20 17.6 20 16.5V4.5C20 3.4 19.1 2.5 18 2.5ZM18 16.5H9V4.5H18V16.5ZM3 15.5V13.5H5V15.5H3ZM3 10H5V12H3V10ZM10 20.5H12V22.5H10V20.5ZM3 19V17H5V19H3ZM5 22.5C3.9 22.5 3 21.6 3 20.5H5V22.5ZM8.5 22.5H6.5V20.5H8.5V22.5ZM13.5 22.5V20.5H15.5C15.5 21.6 14.6 22.5 13.5 22.5ZM5 6.5V8.5H3C3 7.4 3.9 6.5 5 6.5Z",fill:"currentColor"})})})}),o&&f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:"Remove",placement:"left",children:f.jsx(vt,{color:"error",size:"small",onClick:E,children:f.jsx(Lre,{sx:{fontSize:20}})})})]})]}),f.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[f.jsx(Xn,{label:p("inputs.social.icon")}),f.jsx(jl,{fullWidth:!0,labelId:"demo-simple-select-label",id:"demo-simple-select",value:t.key,size:"small",onChange:k,children:x_.map(N=>f.jsx(ts,{value:N.key,children:N.label},`${t.id}_${N.key}`))})]}),f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[f.jsx(Xn,{label:p("inputs.social.url")}),f.jsx(wh,{size:"small",fullWidth:!0,value:t.href??"",onChange:x,variant:"outlined",placeholder:"https://your-website.com",sx:Sy})]})]})]}),u==="down"&&f.jsx(w,{})]})};function Ose({items:t=[],onChange:e}){const{t:n}=pn.useTranslation("inspector"),r=kr(),[i,a]=D.useState(()=>t.map(_=>({..._,id:_.id||Rf()}))),[s,o]=D.useState(t[0]?.theme||"default"),[l,c]=D.useState(t[0]?.size||"medium");D.useEffect(()=>{t.length>0&&(o(t[0].theme),c(t[0].size),a(t.map(_=>({..._,id:_.id||Rf()}))))},[t]);const u=(_,b)=>{a(y=>{const v=[...y],[E]=v.splice(_,1);return v.splice(b,0,E),e&&setTimeout(()=>e(v),0),v})},d=()=>{a(_=>{const b={...x_[0],theme:s,size:l,sizePx:Pn(l),url:Cn(x_[0].iconName,s,l),id:Rf()},y=[..._,b];return e&&setTimeout(()=>e(y),0),y})},p=_=>{a(b=>{const y=b.filter((v,E)=>E!==_);return e&&setTimeout(()=>e(y),0),y})},m=(_,b,y)=>{let v=[...i];if(b in Nse?(o(b),v=v.map(E=>{const S=Cn(E.iconName,b,E.size);return{...E,theme:b,url:S}})):b in Rse&&(c(b),v=v.map(E=>{const S=Cn(E.iconName,E.theme,b),k=Pn(b);return{...E,size:b,sizePx:k,url:S}})),_!==null&&y){const E=x_.find(S=>S.key===b);E&&(v=v.map((S,k)=>{const x={key:E.key,label:E.label,iconName:E.iconName,href:E.href},w=Cn(x.iconName,y.theme,y.size);return k===_?{...S,...x,url:w,id:y.id}:S}))}a(v),e&&setTimeout(()=>e(v),0)},h=(_,b,y)=>{const v=i.map((E,S)=>S===_?{...y,href:b}:E);a(v),e&&setTimeout(()=>e(v),0)},g=_=>{a(b=>{const y={...JSON.parse(JSON.stringify(b[_])),id:Rf()},v=[...b.slice(0,_+1),y,...b.slice(_+1)];return e&&setTimeout(()=>e(v),0),v})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{marginBottom:"1rem",display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:"1rem"},children:[f.jsxs(mi,{children:[f.jsx(Xn,{label:n("inputs.social.theme")}),f.jsx(jl,{fullWidth:!0,labelId:"theme-selector",id:"theme-selector",value:s,size:"small",onChange:_=>m(null,_.target.value,null),children:V9.map(_=>f.jsx(ts,{value:_.key,children:_.label},`${_.key}`))})]}),f.jsxs(mi,{children:[f.jsx(Xn,{label:n("inputs.social.size")}),f.jsx(jl,{fullWidth:!0,labelId:"size-selector",id:"size-selector",value:l,size:"small",onChange:_=>m(null,_.target.value,null),children:rw.map(_=>f.jsx(ts,{value:_.key,children:_.label},`${_.key}`))})]})]}),i?.map((_,b)=>f.jsx(Ise,{element:_,index:b,moveItem:u,onSelectChange:m,onUrlChange:h,onRemove:p,onDuplicate:g,canRemove:i.length>1,theme:r},_.id)),f.jsx(ia,{onClick:d,sx:{borderRadius:1},variant:"contained",endIcon:f.jsx(kre,{}),children:"Add"})]})}const Pse=({data:t,setData:e})=>{const[,n]=D.useState(null),r=wr(),{t:i}=pn.useTranslation("inspector"),a=u=>{const d=j9.safeParse(u);d.success?(e(d.data),n(null)):n(d.error)},s=u=>{a({...t,items:u})},o=u=>{a({...t,style:u})},l=(u,d=!1)=>{if(d){a({...t,gapMobile:u});return}a({...t,gap:u})},c=so();return f.jsxs(Ga,{title:i("inputs.panels.social.title"),children:[c=="block-configuration"&&f.jsx(bt,{sx:{minWidth:120,margin:1},children:f.jsx(Ose,{items:t?.items||[],onChange:s})}),c=="css"&&f.jsxs(f.Fragment,{children:[f.jsxs(mi,{children:[f.jsx(Xn,{label:i("inputs.panels.social.gap")}),r=="desktop"?f.jsx(yr,{iconLabel:f.jsx(DN,{sx:{color:"text.primary"}}),value:t?.gap??4,setValue:l,marks:!0,step:4,units:"px",min:0,max:40}):f.jsx(yr,{iconLabel:f.jsx(DN,{sx:{color:"text.primary"}}),value:t?.gapMobile??t?.gap??4,setValue:u=>l(u,!0),marks:!0,step:4,units:"px",min:0,max:40})]}),f.jsx(Ti,{names:["textAlign","textAlignMobile","backgroundColor","padding","mobilePadding"],value:t.style,onChange:u=>o(u)})]})]})},Lse=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),W9=xt({style:xt({height:Fe().optional().nullable(),heightMobile:Fe().optional().nullable(),background:kt().nullable().optional(),backgroundColor:Lse}).optional().nullable()}),sR={height:16};function Y9({style:t,blockId:e}){const r=wr()==="desktop"?t?.height??sR.height:t?.heightMobile??t?.height??sR.height,i=t?.background??"",a=t?.backgroundColor??"",s=a?Ko(i,a):i,o={width:"100%",minWidth:"100%",backgroundColor:a||void 0,background:s||void 0},l=Mn(e);return f.jsx("table",{className:l,width:"100%",style:o,children:f.jsx("tbody",{children:f.jsx("tr",{className:`it${l}`,height:r,style:{height:r},children:f.jsx("td",{})})})})}function K9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=W9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.spacer.title"),children:f.jsx(Ti,{names:["height","heightMobile","backgroundColor"],value:t.style,onChange:a=>i({...t,style:a})})})}function oR(t){return f.jsx(bt,{sx:{m:3,p:1,border:"1px dashed",borderColor:"divider"},children:f.jsx(mr,{color:"text.secondary",children:t})})}function Mse(){const t=Zl(),e=P6(t||"");if(!t)return oR("Click on a block to inspect.");if(!e)return oR(`Block with id ${t} was not found. Click on a block to reset.`);const{data:n,type:r}=e,i=D.useCallback(a=>{Ul(t,()=>a)},[t]);switch(r){case"Avatar":return f.jsx(Gae,{data:n,setData:a=>i({type:r,data:a})},t);case"Button":return f.jsx(Yae,{data:n,setData:a=>i({type:r,data:a})},t);case"ColumnsContainer":return f.jsx(rse,{data:n,setData:a=>i({type:r,data:a})},t);case"Container":return f.jsx(P9,{data:n,setData:a=>i({type:r,data:a})},t);case"Divider":return f.jsx(F9,{data:n,setData:a=>i({type:r,data:a})},t);case"Heading":return f.jsx(Ese,{data:n,setData:a=>i({type:r,data:a})},t);case"Html":return f.jsx(Cse,{data:n,setData:a=>i({type:r,data:a})},t);case"Image":return f.jsx(wse,{data:n,setData:a=>i({type:r,data:a})},t);case"EmailLayout":return f.jsx(U9,{data:n,setData:a=>i({type:r,data:a})},t);case"Spacer":return f.jsx(K9,{data:n,setData:a=>i({type:r,data:a})},t);case"CustomEditor":return f.jsx(eR,{data:n,setData:a=>i({type:r,data:a})},t);case"Wysiwyg":return f.jsx(eR,{data:n,setData:a=>i({type:r,data:a})},t);case"SocialMedia":return f.jsx(Pse,{data:n,setData:a=>i({type:r,data:a})},t);default:return f.jsx("pre",{children:JSON.stringify(e,null," ")})}}const Fse=D.memo(Mse);function Bse(){const t=Zl(),e=use(t??"root");if(!e)return null;const{data:n,type:r}=e,i=D.useCallback(s=>{t&&Ul(t,()=>s)},[t]),a=D.useCallback(s=>{Ul("root",()=>s)},[]);switch(r){case"Container":return f.jsx(P9,{data:n,setData:s=>i({type:r,data:s})},t);case"Divider":return f.jsx(F9,{data:n,setData:s=>i({type:r,data:s})},t);case"Spacer":return f.jsx(K9,{data:n,setData:s=>i({type:r,data:s})},t);case"EmailLayout":return f.jsx(U9,{data:n,setData:s=>a({type:r,data:s})},"root");default:return f.jsx("pre",{children:JSON.stringify(e,null," ")})}}function Use({sticky:t,heightContent:e}){const n=so(),r=I6(),i=Zl(),a=wr(),s=kr(),{t:o}=pn.useTranslation("inspector"),l=()=>{const m={position:"absolute",top:"1rem",right:"0rem",height:"24px",lineHeight:"normal",width:"fit",fontSize:"12px"};switch(n){case"block-configuration":case"css":return f.jsxs("div",{style:{position:"relative"},children:[f.jsx(wC,{color:"primary",sx:m,label:`${o(a==="desktop"?"header.desktop":"header.mobile")}`}),f.jsx(Fse,{})]});case"styles":return f.jsxs("div",{style:{position:"relative"},children:[f.jsx(Bse,{}),f.jsx(wC,{color:"primary",sx:m,label:`${o(a==="desktop"?"header.desktop":"header.mobile")}`})]})}},c=()=>f.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:f.jsx("path",{d:"M3.83398 5H17.1673M3.83398 10H17.1673M3.83398 15H9.66732",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),u=()=>f.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:f.jsx("path",{d:"M5.83333 17.5C3.99238 17.5 2.5 16.0076 2.5 14.1667V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5H7.5C8.42047 2.5 9.16667 3.24619 9.16667 4.16667V14.1667C9.16667 16.0076 7.67428 17.5 5.83333 17.5ZM5.83333 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V12.5C17.5 11.5795 16.7538 10.8333 15.8333 10.8333H13.8807M9.16669 6.11927L10.5474 4.73858C11.1983 4.0877 12.2535 4.0877 12.9044 4.73858L15.2614 7.0956C15.9123 7.74647 15.9123 8.80175 15.2614 9.45262L8.19036 16.5237M5.83333 14.1667H5.84167",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});D.useEffect(()=>{const m=h=>{const g=h.target;SN(g.innerWidth)};return window&&SN(window.innerWidth),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[n]);const d=(m,h)=>{ire(h)},p=t?e?`calc(${e} - ${Co})`:void 0:e??void 0;return f.jsxs(Rm,{sx:m=>({width:sb,padding:"0!important",margin:"0!important",height:p,maxHeight:p,display:"flex",flexDirection:"column",overflow:"hidden",position:t?"sticky":"static",top:t?Co:0,backgroundColor:`${m.palette.background.paper} !important`}),children:[f.jsx(bt,{sx:{position:"sticky",top:0,zIndex:1,backgroundColor:`${s.palette.background.paper} !important`},children:f.jsxs(v6,{sx:{backgroundColor:`${s.palette.background.paper} !important`},value:n,onChange:d,children:[i!=null&&!ab.includes(r||"")&&[f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"block-configuration",label:o("header.content"),icon:f.jsx(c,{}),iconPosition:"start"},"block-configuration"),f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"css",label:o("header.styles"),icon:f.jsx(u,{}),iconPosition:"start"},"css")],ab.includes(r)&&[f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"styles",label:o("header.styles"),icon:f.jsx(u,{}),iconPosition:"start"},"styles")]]})}),f.jsx(Rm,{sx:m=>({flex:"1 1 auto",minHeight:0,overflowY:"auto",px:2,backgroundColor:`${m.palette.background.paper} !important`}),children:l()})]})}const Q9=({children:t,topOffset:e=0,zIndex:n=10,className:r="",style:i={},disabled:a=!1,threshold:s=null,...o})=>{const[l,c]=D.useState(!1),[u,d]=D.useState({width:0,height:0}),[p,m]=D.useState({left:0}),[h,g]=D.useState(0),[_,b]=D.useState(!1),y=D.useRef(null),v=D.useRef(null),E=D.useRef(null);D.useEffect(()=>{if(a){c(!1),b(!1),g(0);return}const x=v.current,w=y.current;if(!x||!w)return;let N=null;s&&(s.startsWith("#")?N=document.getElementById(s.slice(1)):(s.startsWith("."),N=document.querySelector(s)));const R=()=>{const M=w.getBoundingClientRect();d({width:M.width,height:M.height}),m({left:M.left})},T=()=>{if(!N||!w)return{offset:0,isPushed:!1};const M=N.getBoundingClientRect(),O=w.getBoundingClientRect(),$=e+O.height;if(M.top<$){const z=$-M.top,X=O.height+20;return{offset:-Math.min(z,X),isPushed:!0}}return{offset:0,isPushed:!1}},B=new IntersectionObserver(([M])=>{const O=!M.isIntersecting;if(O&&!l&&R(),c(O),O&&s){const{offset:$,isPushed:z}=T();g($),b(z)}else O||(g(0),b(!1))},{threshold:0,rootMargin:`-${e}px 0px 0px 0px`}),A=new ResizeObserver(()=>{R()}),L=()=>{if(s&&l){const{offset:M,isPushed:O}=T();g(M),b(O)}};return B.observe(x),A.observe(w),s&&window.addEventListener("scroll",L,{passive:!0}),R(),()=>{B.disconnect(),A.disconnect(),s&&window.removeEventListener("scroll",L)}},[e,l,a,s]);const S=!a&&l,k=S?`${e+h}px`:"auto";return f.jsxs("div",{ref:E,className:r,...o,children:[!a&&f.jsx("div",{ref:v,style:{height:"1px",position:"absolute",top:`-${e+1}px`,left:0,right:0,pointerEvents:"none"}}),S&&f.jsx("div",{style:{height:`${u.height}px`,width:`${u.width}px`}}),f.jsx("div",{ref:y,style:{position:S?"fixed":"static",top:k,width:"auto",height:"auto",zIndex:S?n:"auto",transition:_?"none":"box-shadow 0.2s ease-in-out, top 0.3s ease-out",..._&&h<-u.height*.3&&{opacity:Math.max(0,1+(h+u.height*.3)/(u.height*.7))},...i},children:t})]})};var Zv,lR;function iw(){if(lR)return Zv;lR=1;var t={"&":"&","<":"<",">":">",'"':""","'":"'"},e={"&":"&","<":"<",">":">",""":'"',"'":"'"},n=/(&|<|>|"|')/g,r=/[&<>"']/g;function i(l){return t[l]}function a(l){return e[l]}function s(l){return l==null?"":String(l).replace(r,i)}function o(l){return l==null?"":String(l).replace(n,a)}return s.options=o.options={},Zv={encode:s,escape:s,decode:o,unescape:o,version:"1.0.0-browser"},Zv}var Jv,cR;function $se(){if(cR)return Jv;cR=1;function t(e){for(var n=Array.prototype.slice.call(arguments,1),r,i;n.length;){r=n.shift();for(i in r)r.hasOwnProperty(i)&&(Object.prototype.toString.call(e[i])==="[object Object]"?e[i]=t(e[i],r[i]):e[i]=r[i])}return e}return Jv=t,Jv}var eE,uR;function X9(){return uR||(uR=1,eE=function(e){return typeof e=="string"?e.toLowerCase():e}),eE}var tE,dR;function Z9(){if(dR)return tE;dR=1;function t(n){return n.reduce(e,{})}function e(n,r){return n[r]=!0,n}return tE=t,tE}var nE,pR;function J9(){if(pR)return nE;pR=1;var t=Z9(),e=["background","base","cite","href","longdesc","src","usemap"];return nE={uris:t(e)},nE}var rE,fR;function e5(){if(fR)return rE;fR=1;var t=Z9(),e=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];return rE={voids:t(e)},rE}var iE,mR;function zse(){if(mR)return iE;mR=1;var t=iw(),e=X9();J9();var n=e5(),r=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,i=/^<\s*\/\s*([\w:-]+)[^>]*>/,a=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,s=/^</,o=/^<\s*\//;function l(){var u=[];return u.lastItem=function(){return u[u.length-1]},u}function c(u,d){for(var p=l(),m=u,h;u;)g();S();function g(){h=!0,_();var k=u===m;m=u,k&&(u="")}function _(){u.substr(0,4)==="<!--"?y():o.test(u)?b(i,S):s.test(u)&&b(r,E),v()}function b(k,x){var w=u.match(k);w&&(u=u.substring(w[0].length),w[0].replace(k,x),h=!1)}function y(){var k=u.indexOf("-->");k>=0&&(d.comment&&d.comment(u.substring(4,k)),u=u.substring(k+3),h=!1)}function v(){if(h){var k,x=u.indexOf("<");x>=0?(k=u.substring(0,x),u=u.substring(x)):(k=u,u=""),d.chars&&d.chars(k)}}function E(k,x,w,N){var R={},T=e(x),B=n.voids[T]||!!N;w.replace(a,A),B||p.push(T),d.start&&d.start(T,R,B);function A(L,M,O,$,z){O===void 0&&$===void 0&&z===void 0?R[M]=void 0:R[M]=t.decode(O||$||z||"")}}function S(k,x){var w,N=0,R=e(x);if(R)for(N=p.length-1;N>=0&&p[N]!==R;N--);if(N>=0){for(w=p.length-1;w>=N;w--)d.end&&d.end(p[w]);p.length=N}}}return iE=c,iE}var aE,hR;function qse(){if(hR)return aE;hR=1;var t=iw(),e=X9(),n=J9(),r=e5();function i(a,s){var o,l=s||{};return _(),{start:u,end:d,chars:m};function c(b){a.push(b)}function u(b,y,v){var E=e(b);if(o.ignoring){h(E);return}if((l.allowedTags||[]).indexOf(E)===-1){h(E);return}if(l.filter&&!l.filter({tag:E,attrs:y})){h(E);return}c("<"),c(E),Object.keys(y).forEach(S),c(v?"/>":">");function S(k){var x=y[k],w=(l.allowedClasses||{})[E]||[],N=(l.allowedAttributes||{})[E]||[],R,T=e(k);T==="class"&&N.indexOf(T)===-1?(x=x.split(" ").filter(B).join(" ").trim(),R=x.length):R=N.indexOf(T)!==-1&&(n.uris[T]!==!0||p(x)),R&&(c(" "),c(k),typeof x=="string"&&(c('="'),c(t.encode(x)),c('"')));function B(A){return w&&w.indexOf(A)!==-1}}}function d(b){var y=e(b),v=(l.allowedTags||[]).indexOf(y)!==-1;v&&o.ignoring===!1?(c("</"),c(y),c(">")):g(y)}function p(b){var y=b[0];if(y==="#"||y==="/")return!0;var v=b.indexOf(":");if(v===-1)return!0;var E=b.indexOf("?");if(E!==-1&&v>E)return!0;var S=b.indexOf("#");if(S!==-1&&v>S)return!0;return l.allowedSchemes.some(k);function k(x){return b.indexOf(x+":")===0}}function m(b){o.ignoring===!1&&c(l.transformText?l.transformText(b):b)}function h(b){r.voids[b]||(o.ignoring===!1?o={ignoring:b,depth:1}:o.ignoring===b&&o.depth++)}function g(b){o.ignoring===b&&--o.depth<=0&&_()}function _(){o={ignoring:!1,depth:0}}}return aE=i,aE}var sE,gR;function Gse(){if(gR)return sE;gR=1;var t={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};return sE=t,sE}var oE,_R;function jse(){if(_R)return oE;_R=1,iw();var t=$se(),e=zse(),n=qse(),r=Gse();function i(a,s,o){var l=[],c=o===!0?s:t({},r,s),u=n(l,c);return e(a,u),l.join("")}return i.defaults=r,oE=i,oE}var Hse=jse();const Vse=mu(Hse);function aw(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let bu=aw();function t5(t){bu=t}const n5=/[&<>"']/,Wse=new RegExp(n5.source,"g"),r5=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Yse=new RegExp(r5.source,"g"),Kse={"&":"&","<":"<",">":">",'"':""","'":"'"},bR=t=>Kse[t];function ea(t,e){if(e){if(n5.test(t))return t.replace(Wse,bR)}else if(r5.test(t))return t.replace(Yse,bR);return t}const Qse=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Xse(t){return t.replace(Qse,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Zse=/(^|[^\[])\^/g;function Gn(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Zse,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}function yR(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const nm={exec:()=>null};function vR(t,e){const n=t.replace(/\|/g,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function Ng(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function Jse(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function ER(t,e,n,r){const i=e.href,a=e.title?ea(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const o={type:"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:a,text:ea(s)}}function eoe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
|
|
102
|
+
`),LX)),Zs=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:s=!1,size:o=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate"}=r,p=Be(r,OX),m=I({},r,{color:a,disableShrink:s,size:o,thickness:c,value:u,variant:d}),h=MX(m),g={},_={},b={};if(d==="determinate"){const y=2*Math.PI*((dl-c)/2);g.strokeDasharray=y.toFixed(3),b["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*y).toFixed(3)}px`,_.transform="rotate(-90deg)"}return f.jsx(FX,I({className:$e(h.root,i),style:I({width:o,height:o},_,l),ownerState:m,ref:n,role:"progressbar"},b,p,{children:f.jsx(BX,{className:h.svg,ownerState:m,viewBox:`${dl/2} ${dl/2} ${dl} ${dl}`,children:f.jsx(UX,{className:h.circle,style:g,ownerState:m,cx:dl,cy:dl,r:(dl-c)/2,fill:"none",strokeWidth:c})})}))});function V2(t){return t.substring(2).toLowerCase()}function $X(t,e){return e.documentElement.clientWidth<t.clientX||e.documentElement.clientHeight<t.clientY}function zX(t){const{children:e,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:a="onTouchEnd"}=t,s=P.useRef(!1),o=P.useRef(null),l=P.useRef(!1),c=P.useRef(!1);P.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=er(hu(e),o),d=$r(h=>{const g=c.current;c.current=!1;const _=hr(o.current);if(!l.current||!o.current||"clientX"in h&&$X(h,_))return;if(s.current){s.current=!1;return}let b;h.composedPath?b=h.composedPath().indexOf(o.current)>-1:b=!_.documentElement.contains(h.target)||o.current.contains(h.target),!b&&(n||!g)&&i(h)}),p=h=>g=>{c.current=!0;const _=e.props[h];_&&_(g)},m={ref:u};return a!==!1&&(m[a]=p(a)),P.useEffect(()=>{if(a!==!1){const h=V2(a),g=hr(o.current),_=()=>{s.current=!0};return g.addEventListener(h,d),g.addEventListener("touchmove",_),()=>{g.removeEventListener(h,d),g.removeEventListener("touchmove",_)}}},[d,a]),r!==!1&&(m[r]=p(r)),P.useEffect(()=>{if(r!==!1){const h=V2(r),g=hr(o.current);return g.addEventListener(h,d),()=>{g.removeEventListener(h,d)}}},[d,r]),f.jsx(P.Fragment,{children:P.cloneElement(e,m)})}const Rm=EW({createStyledComponent:Re("div",{name:"MuiContainer",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`maxWidth${Ne(String(n.maxWidth))}`],n.fixed&&e.fixed,n.disableGutters&&e.disableGutters]}}),useThemeProps:t=>Dt({props:t,name:"MuiContainer"})}),qX=(t,e)=>I({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},e&&!t.vars&&{colorScheme:t.palette.mode}),GX=t=>I({color:(t.vars||t).palette.text.primary},t.typography.body1,{backgroundColor:(t.vars||t).palette.background.default,"@media print":{backgroundColor:(t.vars||t).palette.common.white}}),jX=(t,e=!1)=>{var n;const r={};e&&t.colorSchemes&&Object.entries(t.colorSchemes).forEach(([s,o])=>{var l;r[t.getColorSchemeSelector(s).replace(/\s*&/,"")]={colorScheme:(l=o.palette)==null?void 0:l.mode}});let i=I({html:qX(t,e),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:t.typography.fontWeightBold},body:I({margin:0},GX(t),{"&::backdrop":{backgroundColor:(t.vars||t).palette.background.default}})},r);const a=(n=t.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return a&&(i=[i,a]),i};function d6(t){const e=Dt({props:t,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=e;return f.jsxs(P.Fragment,{children:[f.jsx(Fk,{styles:i=>jX(i,r)}),n]})}function HX(t){const e=hr(t);return e.body===t?Lo(t).innerWidth>e.documentElement.clientWidth:t.scrollHeight>t.clientHeight}function Xf(t,e){e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden")}function W2(t){return parseInt(Lo(t).getComputedStyle(t).paddingRight,10)||0}function VX(t){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(t.tagName)!==-1,r=t.tagName==="INPUT"&&t.getAttribute("type")==="hidden";return n||r}function Y2(t,e,n,r,i){const a=[e,n,...r];[].forEach.call(t.children,s=>{const o=a.indexOf(s)===-1,l=!VX(s);o&&l&&Xf(s,i)})}function Pv(t,e){let n=-1;return t.some((r,i)=>e(r)?(n=i,!0):!1),n}function WX(t,e){const n=[],r=t.container;if(!e.disableScrollLock){if(HX(r)){const s=F4(hr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${W2(r)+s}px`;const o=hr(r).querySelectorAll(".mui-fixed");[].forEach.call(o,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${W2(l)+s}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=hr(r).body;else{const s=r.parentElement,o=Lo(r);a=s?.nodeName==="HTML"&&o.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:s,property:o})=>{a?s.style.setProperty(o,a):s.style.removeProperty(o)})}}function YX(t){const e=[];return[].forEach.call(t.children,n=>{n.getAttribute("aria-hidden")==="true"&&e.push(n)}),e}class KX{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,n){let r=this.modals.indexOf(e);if(r!==-1)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Xf(e.modalRef,!1);const i=YX(n);Y2(n,e.mount,e.modalRef,i,!0);const a=Pv(this.containers,s=>s.container===n);return a!==-1?(this.containers[a].modals.push(e),r):(this.containers.push({modals:[e],container:n,restore:null,hiddenSiblings:i}),r)}mount(e,n){const r=Pv(this.containers,a=>a.modals.indexOf(e)!==-1),i=this.containers[r];i.restore||(i.restore=WX(i,n))}remove(e,n=!0){const r=this.modals.indexOf(e);if(r===-1)return r;const i=Pv(this.containers,s=>s.modals.indexOf(e)!==-1),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(e),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),e.modalRef&&Xf(e.modalRef,n),Y2(a.container,e.mount,e.modalRef,a.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=a.modals[a.modals.length-1];s.modalRef&&Xf(s.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}const QX=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function XX(t){const e=parseInt(t.getAttribute("tabindex")||"",10);return Number.isNaN(e)?t.contentEditable==="true"||(t.nodeName==="AUDIO"||t.nodeName==="VIDEO"||t.nodeName==="DETAILS")&&t.getAttribute("tabindex")===null?0:t.tabIndex:e}function ZX(t){if(t.tagName!=="INPUT"||t.type!=="radio"||!t.name)return!1;const e=r=>t.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=e(`[name="${t.name}"]:checked`);return n||(n=e(`[name="${t.name}"]`)),n!==t}function JX(t){return!(t.disabled||t.tagName==="INPUT"&&t.type==="hidden"||ZX(t))}function eZ(t){const e=[],n=[];return Array.from(t.querySelectorAll(QX)).forEach((r,i)=>{const a=XX(r);a===-1||!JX(r)||(a===0?e.push(r):n.push({documentOrder:i,tabIndex:a,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(e)}function tZ(){return!0}function nZ(t){const{children:e,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=eZ,isEnabled:s=tZ,open:o}=t,l=P.useRef(!1),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=P.useRef(null),m=P.useRef(!1),h=P.useRef(null),g=er(hu(e),h),_=P.useRef(null);P.useEffect(()=>{!o||!h.current||(m.current=!n)},[n,o]),P.useEffect(()=>{if(!o||!h.current)return;const v=hr(h.current);return h.current.contains(v.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),m.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[o]),P.useEffect(()=>{if(!o||!h.current)return;const v=hr(h.current),E=x=>{_.current=x,!(r||!s()||x.key!=="Tab")&&v.activeElement===h.current&&x.shiftKey&&(l.current=!0,u.current&&u.current.focus())},S=()=>{const x=h.current;if(x===null)return;if(!v.hasFocus()||!s()||l.current){l.current=!1;return}if(x.contains(v.activeElement)||r&&v.activeElement!==c.current&&v.activeElement!==u.current)return;if(v.activeElement!==p.current)p.current=null;else if(p.current!==null)return;if(!m.current)return;let w=[];if((v.activeElement===c.current||v.activeElement===u.current)&&(w=a(h.current)),w.length>0){var N,R;const T=!!((N=_.current)!=null&&N.shiftKey&&((R=_.current)==null?void 0:R.key)==="Tab"),B=w[0],A=w[w.length-1];typeof B!="string"&&typeof A!="string"&&(T?A.focus():B.focus())}else x.focus()};v.addEventListener("focusin",S),v.addEventListener("keydown",E,!0);const k=setInterval(()=>{v.activeElement&&v.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(k),v.removeEventListener("focusin",S),v.removeEventListener("keydown",E,!0)}},[n,r,i,s,o,a]);const b=v=>{d.current===null&&(d.current=v.relatedTarget),m.current=!0,p.current=v.target;const E=e.props.onFocus;E&&E(v)},y=v=>{d.current===null&&(d.current=v.relatedTarget),m.current=!0};return f.jsxs(P.Fragment,{children:[f.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),P.cloneElement(e,{ref:g,onFocus:b}),f.jsx("div",{tabIndex:o?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}function rZ(t){return typeof t=="function"?t():t}function iZ(t){return t?t.props.hasOwnProperty("in"):!1}const aZ=new KX;function sZ(t){const{container:e,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=aZ,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:o,children:l,onClose:c,open:u,rootRef:d}=t,p=P.useRef({}),m=P.useRef(null),h=P.useRef(null),g=er(h,d),[_,b]=P.useState(!u),y=iZ(l);let v=!0;(t["aria-hidden"]==="false"||t["aria-hidden"]===!1)&&(v=!1);const E=()=>hr(m.current),S=()=>(p.current.modalRef=h.current,p.current.mount=m.current,p.current),k=()=>{i.mount(S(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},x=$r(()=>{const O=rZ(e)||E().body;i.add(S(),O),h.current&&k()}),w=P.useCallback(()=>i.isTopModal(S()),[i]),N=$r(O=>{m.current=O,O&&(u&&w()?k():h.current&&Xf(h.current,v))}),R=P.useCallback(()=>{i.remove(S(),v)},[v,i]);P.useEffect(()=>()=>{R()},[R]),P.useEffect(()=>{u?x():(!y||!a)&&R()},[u,R,y,a,x]);const T=O=>$=>{var z;(z=O.onKeyDown)==null||z.call(O,$),!($.key!=="Escape"||$.which===229||!w())&&(n||($.stopPropagation(),c&&c($,"escapeKeyDown")))},B=O=>$=>{var z;(z=O.onClick)==null||z.call(O,$),$.target===$.currentTarget&&c&&c($,"backdropClick")};return{getRootProps:(O={})=>{const $=zc(t);delete $.onTransitionEnter,delete $.onTransitionExited;const z=I({},$,O);return I({role:"presentation"},z,{onKeyDown:T(z),ref:g})},getBackdropProps:(O={})=>{const $=O;return I({"aria-hidden":!0},$,{onClick:B($),open:u})},getTransitionProps:()=>{const O=()=>{b(!1),s&&s()},$=()=>{b(!0),o&&o(),a&&R()};return{onEnter:t2(O,l?.props.onEnter),onExited:t2($,l?.props.onExited)}},rootRef:g,portalRef:N,isTopModal:w,exited:_,hasTransition:y}}function oZ(t){return wt("MuiModal",t)}Nt("MuiModal",["root","hidden","backdrop"]);const lZ=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],cZ=t=>{const{open:e,exited:n,classes:r}=t;return Rt({root:["root",!e&&n&&"hidden"],backdrop:["backdrop"]},oZ,r)},uZ=Re("div",{name:"MuiModal",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.open&&n.exited&&e.hidden]}})(({theme:t,ownerState:e})=>I({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!e.open&&e.exited&&{visibility:"hidden"})),dZ=Re(c6,{name:"MuiModal",slot:"Backdrop",overridesResolver:(t,e)=>e.backdrop})({zIndex:-1}),p6=P.forwardRef(function(e,n){var r,i,a,s,o,l;const c=Dt({name:"MuiModal",props:e}),{BackdropComponent:u=dZ,BackdropProps:d,className:p,closeAfterTransition:m=!1,children:h,container:g,component:_,components:b={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:S=!1,disablePortal:k=!1,disableRestoreFocus:x=!1,disableScrollLock:w=!1,hideBackdrop:N=!1,keepMounted:R=!1,onBackdropClick:T,open:B,slotProps:A,slots:L}=c,M=Be(c,lZ),O=I({},c,{closeAfterTransition:m,disableAutoFocus:v,disableEnforceFocus:E,disableEscapeKeyDown:S,disablePortal:k,disableRestoreFocus:x,disableScrollLock:w,hideBackdrop:N,keepMounted:R}),{getRootProps:$,getBackdropProps:z,getTransitionProps:X,portalRef:W,isTopModal:te,exited:pe,hasTransition:ye}=sZ(I({},O,{rootRef:n})),ae=I({},O,{exited:pe}),oe=cZ(ae),le={};if(h.props.tabIndex===void 0&&(le.tabIndex="-1"),ye){const{onEnter:he,onExited:Ee}=X();le.onEnter=he,le.onExited=Ee}const H=(r=(i=L?.root)!=null?i:b.Root)!=null?r:uZ,Z=(a=(s=L?.backdrop)!=null?s:b.Backdrop)!=null?a:u,ee=(o=A?.root)!=null?o:y.root,se=(l=A?.backdrop)!=null?l:y.backdrop,ie=Nr({elementType:H,externalSlotProps:ee,externalForwardedProps:M,getSlotProps:$,additionalProps:{ref:n,as:_},ownerState:ae,className:$e(p,ee?.className,oe?.root,!ae.open&&ae.exited&&oe?.hidden)}),ve=Nr({elementType:Z,externalSlotProps:se,additionalProps:d,getSlotProps:he=>z(I({},he,{onClick:Ee=>{T&&T(Ee),he!=null&&he.onClick&&he.onClick(Ee)}})),className:$e(se?.className,d?.className,oe?.backdrop),ownerState:ae});return!R&&!B&&(!ye||pe)?null:f.jsx(o6,{ref:W,container:g,disablePortal:k,children:f.jsxs(H,I({},ie,{children:[!N&&u?f.jsx(Z,I({},ve)):null,f.jsx(nZ,{disableEnforceFocus:E,disableAutoFocus:v,disableRestoreFocus:x,isEnabled:te,open:B,children:P.cloneElement(h,le)})]}))})});function pZ(t){return wt("MuiDialog",t)}const Lv=Nt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),f6=P.createContext({}),fZ=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],mZ=Re(c6,{name:"MuiDialog",slot:"Backdrop",overrides:(t,e)=>e.backdrop})({zIndex:-1}),hZ=t=>{const{classes:e,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=t,s={root:["root"],container:["container",`scroll${Ne(n)}`],paper:["paper",`paperScroll${Ne(n)}`,`paperWidth${Ne(String(r))}`,i&&"paperFullWidth",a&&"paperFullScreen"]};return Rt(s,pZ,e)},gZ=Re(p6,{name:"MuiDialog",slot:"Root",overridesResolver:(t,e)=>e.root})({"@media print":{position:"absolute !important"}}),_Z=Re("div",{name:"MuiDialog",slot:"Container",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.container,e[`scroll${Ne(n.scroll)}`]]}})(({ownerState:t})=>I({height:"100%","@media print":{height:"auto"},outline:0},t.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},t.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),bZ=Re(gu,{name:"MuiDialog",slot:"Paper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.paper,e[`scrollPaper${Ne(n.scroll)}`],e[`paperWidth${Ne(String(n.maxWidth))}`],n.fullWidth&&e.paperFullWidth,n.fullScreen&&e.paperFullScreen]}})(({theme:t,ownerState:e})=>I({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},e.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},e.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!e.maxWidth&&{maxWidth:"calc(100% - 64px)"},e.maxWidth==="xs"&&{maxWidth:t.breakpoints.unit==="px"?Math.max(t.breakpoints.values.xs,444):`max(${t.breakpoints.values.xs}${t.breakpoints.unit}, 444px)`,[`&.${Lv.paperScrollBody}`]:{[t.breakpoints.down(Math.max(t.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},e.maxWidth&&e.maxWidth!=="xs"&&{maxWidth:`${t.breakpoints.values[e.maxWidth]}${t.breakpoints.unit}`,[`&.${Lv.paperScrollBody}`]:{[t.breakpoints.down(t.breakpoints.values[e.maxWidth]+64)]:{maxWidth:"calc(100% - 64px)"}}},e.fullWidth&&{width:"calc(100% - 64px)"},e.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Lv.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),yZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialog"}),i=kr(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":o,BackdropComponent:l,BackdropProps:c,children:u,className:d,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:h=!1,maxWidth:g="sm",onBackdropClick:_,onClick:b,onClose:y,open:v,PaperComponent:E=gu,PaperProps:S={},scroll:k="paper",TransitionComponent:x=Uk,transitionDuration:w=a,TransitionProps:N}=r,R=Be(r,fZ),T=I({},r,{disableEscapeKeyDown:p,fullScreen:m,fullWidth:h,maxWidth:g,scroll:k}),B=hZ(T),A=P.useRef(),L=z=>{A.current=z.target===z.currentTarget},M=z=>{b&&b(z),A.current&&(A.current=null,_&&_(z),y&&y(z,"backdropClick"))},O=Eh(o),$=P.useMemo(()=>({titleId:O}),[O]);return f.jsx(gZ,I({className:$e(B.root,d),closeAfterTransition:!0,components:{Backdrop:mZ},componentsProps:{backdrop:I({transitionDuration:w,as:l},c)},disableEscapeKeyDown:p,onClose:y,open:v,ref:n,onClick:M,ownerState:T},R,{children:f.jsx(x,I({appear:!0,in:v,timeout:w,role:"presentation"},N,{children:f.jsx(_Z,{className:$e(B.container),onMouseDown:L,ownerState:T,children:f.jsx(bZ,I({as:E,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":O},S,{className:$e(B.paper,S.className),ownerState:T,children:f.jsx(f6.Provider,{value:$,children:u})}))})}))}))});function vZ(t){return wt("MuiDialogActions",t)}Nt("MuiDialogActions",["root","spacing"]);const EZ=["className","disableSpacing"],SZ=t=>{const{classes:e,disableSpacing:n}=t;return Rt({root:["root",!n&&"spacing"]},vZ,e)},TZ=Re("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disableSpacing&&e.spacing]}})(({ownerState:t})=>I({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!t.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),CZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogActions"}),{className:i,disableSpacing:a=!1}=r,s=Be(r,EZ),o=I({},r,{disableSpacing:a}),l=SZ(o);return f.jsx(TZ,I({className:$e(l.root,i),ownerState:o,ref:n},s))});function xZ(t){return wt("MuiDialogContent",t)}Nt("MuiDialogContent",["root","dividers"]);function kZ(t){return wt("MuiDialogTitle",t)}const wZ=Nt("MuiDialogTitle",["root"]),DZ=["className","dividers"],AZ=t=>{const{classes:e,dividers:n}=t;return Rt({root:["root",n&&"dividers"]},xZ,e)},NZ=Re("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.dividers&&e.dividers]}})(({theme:t,ownerState:e})=>I({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},e.dividers?{padding:"16px 24px",borderTop:`1px solid ${(t.vars||t).palette.divider}`,borderBottom:`1px solid ${(t.vars||t).palette.divider}`}:{[`.${wZ.root} + &`]:{paddingTop:0}})),RZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogContent"}),{className:i,dividers:a=!1}=r,s=Be(r,DZ),o=I({},r,{dividers:a}),l=AZ(o);return f.jsx(NZ,I({className:$e(l.root,i),ownerState:o,ref:n},s))});function IZ(t){return wt("MuiDialogContentText",t)}Nt("MuiDialogContentText",["root"]);const OZ=["children","className"],PZ=t=>{const{classes:e}=t,r=Rt({root:["root"]},IZ,e);return I({},e,r)},LZ=Re(mr,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(t,e)=>e.root})({}),MZ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogContentText"}),{className:i}=r,a=Be(r,OZ),s=PZ(a);return f.jsx(LZ,I({component:"p",variant:"body1",color:"text.secondary",ref:n,ownerState:a,className:$e(s.root,i)},r,{classes:s}))}),FZ=["className","id"],BZ=t=>{const{classes:e}=t;return Rt({root:["root"]},kZ,e)},UZ=Re(mr,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(t,e)=>e.root})({padding:"16px 24px",flex:"0 0 auto"}),$Z=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDialogTitle"}),{className:i,id:a}=r,s=Be(r,FZ),o=r,l=BZ(o),{titleId:c=a}=P.useContext(f6);return f.jsx(UZ,I({component:"h2",className:$e(l.root,i),ownerState:o,ref:n,variant:"h6",id:a??c},s))});function zZ(t){return wt("MuiDivider",t)}const K2=Nt("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),qZ=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],GZ=t=>{const{absolute:e,children:n,classes:r,flexItem:i,light:a,orientation:s,textAlign:o,variant:l}=t;return Rt({root:["root",e&&"absolute",l,a&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",o==="right"&&s!=="vertical"&&"textAlignRight",o==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},zZ,r)},jZ=Re("div",{name:"MuiDivider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.absolute&&e.absolute,e[n.variant],n.light&&e.light,n.orientation==="vertical"&&e.vertical,n.flexItem&&e.flexItem,n.children&&e.withChildren,n.children&&n.orientation==="vertical"&&e.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&e.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&e.textAlignLeft]}})(({theme:t,ownerState:e})=>I({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(t.vars||t).palette.divider,borderBottomWidth:"thin"},e.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},e.light&&{borderColor:t.vars?`rgba(${t.vars.palette.dividerChannel} / 0.08)`:zt.alpha(t.palette.divider,.08)},e.variant==="inset"&&{marginLeft:72},e.variant==="middle"&&e.orientation==="horizontal"&&{marginLeft:t.spacing(2),marginRight:t.spacing(2)},e.variant==="middle"&&e.orientation==="vertical"&&{marginTop:t.spacing(1),marginBottom:t.spacing(1)},e.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},e.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:t})=>I({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation!=="vertical"&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(t.vars||t).palette.divider}`,borderTopStyle:"inherit"}}),({theme:t,ownerState:e})=>I({},e.children&&e.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(t.vars||t).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:t})=>I({},t.textAlign==="right"&&t.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},t.textAlign==="left"&&t.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),HZ=Re("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.wrapper,n.orientation==="vertical"&&e.wrapperVertical]}})(({theme:t,ownerState:e})=>I({display:"inline-block",paddingLeft:`calc(${t.spacing(1)} * 1.2)`,paddingRight:`calc(${t.spacing(1)} * 1.2)`},e.orientation==="vertical"&&{paddingTop:`calc(${t.spacing(1)} * 1.2)`,paddingBottom:`calc(${t.spacing(1)} * 1.2)`})),Fo=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiDivider"}),{absolute:i=!1,children:a,className:s,component:o=a?"div":"hr",flexItem:l=!1,light:c=!1,orientation:u="horizontal",role:d=o!=="hr"?"separator":void 0,textAlign:p="center",variant:m="fullWidth"}=r,h=Be(r,qZ),g=I({},r,{absolute:i,component:o,flexItem:l,light:c,orientation:u,role:d,textAlign:p,variant:m}),_=GZ(g);return f.jsx(jZ,I({as:o,className:$e(_.root,s),role:d,ref:n,ownerState:g},h,{children:a?f.jsx(HZ,{className:_.wrapper,ownerState:g,children:a}):null}))});Fo.muiSkipListHighlight=!0;const VZ=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],WZ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},nX,e);return I({},e,i)},YZ=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...py(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{var n;const r=t.palette.mode==="light",i=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",s=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return I({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:s,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},[`&.${_c.focused}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},[`&.${_c.disabled}`]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:o}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(n=(t.vars||t).palette[e.color||"primary"])==null?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${_c.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${_c.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`:i}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${_c.disabled}, .${_c.error}):before`]:{borderBottom:`1px solid ${(t.vars||t).palette.text.primary}`},[`&.${_c.disabled}:before`]:{borderBottomStyle:"dotted"}},e.startAdornment&&{paddingLeft:12},e.endAdornment&&{paddingRight:12},e.multiline&&I({padding:"25px 12px 8px"},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9}))}),KZ=Re(hy,{name:"MuiFilledInput",slot:"Input",overridesResolver:fy})(({theme:t,ownerState:e})=>I({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{paddingTop:21,paddingBottom:4},e.hiddenLabel&&{paddingTop:16,paddingBottom:17},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0},e.hiddenLabel&&e.size==="small"&&{paddingTop:8,paddingBottom:9},e.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),$k=P.forwardRef(function(e,n){var r,i,a,s;const o=Dt({props:e,name:"MuiFilledInput"}),{components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:m,slots:h={},type:g="text"}=o,_=Be(o,VZ),b=I({},o,{fullWidth:u,inputComponent:d,multiline:p,type:g}),y=WZ(o),v={root:{ownerState:b},input:{ownerState:b}},E=m??c?Ci(v,m??c):v,S=(r=(i=h.root)!=null?i:l.Root)!=null?r:YZ,k=(a=(s=h.input)!=null?s:l.Input)!=null?a:KZ;return f.jsx(Bk,I({slots:{root:S,input:k},componentsProps:E,fullWidth:u,inputComponent:d,multiline:p,ref:n,type:g},_,{classes:y}))});$k.muiName="Input";function QZ(t){return wt("MuiFormControl",t)}Nt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const XZ=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],ZZ=t=>{const{classes:e,margin:n,fullWidth:r}=t,i={root:["root",n!=="none"&&`margin${Ne(n)}`,r&&"fullWidth"]};return Rt(i,QZ,e)},JZ=Re("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,e[`margin${Ne(t.margin)}`],t.fullWidth&&e.fullWidth)})(({ownerState:t})=>I({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},t.margin==="normal"&&{marginTop:16,marginBottom:8},t.margin==="dense"&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})),eJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormControl"}),{children:i,className:a,color:s="primary",component:o="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:p=!1,margin:m="none",required:h=!1,size:g="medium",variant:_="outlined"}=r,b=Be(r,XZ),y=I({},r,{color:s,component:o,disabled:l,error:c,fullWidth:d,hiddenLabel:p,margin:m,required:h,size:g,variant:_}),v=ZZ(y),[E,S]=P.useState(()=>{let A=!1;return i&&P.Children.forEach(i,L=>{if(!Dv(L,["Input","Select"]))return;const M=Dv(L,["Select"])?L.props.input:L;M&&KQ(M.props)&&(A=!0)}),A}),[k,x]=P.useState(()=>{let A=!1;return i&&P.Children.forEach(i,L=>{Dv(L,["Input","Select"])&&(J_(L.props,!0)||J_(L.props.inputProps,!0))&&(A=!0)}),A}),[w,N]=P.useState(!1);l&&w&&N(!1);const R=u!==void 0&&!l?u:w;let T;const B=P.useMemo(()=>({adornedStart:E,setAdornedStart:S,color:s,disabled:l,error:c,filled:k,focused:R,fullWidth:d,hiddenLabel:p,size:g,onBlur:()=>{N(!1)},onEmpty:()=>{x(!1)},onFilled:()=>{x(!0)},onFocus:()=>{N(!0)},registerEffect:T,required:h,variant:_}),[E,s,l,c,k,R,d,p,T,h,g,_]);return f.jsx(Mk.Provider,{value:B,children:f.jsx(JZ,I({as:o,ownerState:y,className:$e(v.root,a),ref:n},b,{children:i}))})}),Fn=AW({createStyledComponent:Re("div",{name:"MuiStack",slot:"Root",overridesResolver:(t,e)=>e.root}),useThemeProps:t=>Dt({props:t,name:"MuiStack"})});function tJ(t){return wt("MuiFormHelperText",t)}const Q2=Nt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var X2;const nJ=["children","className","component","disabled","error","filled","focused","margin","required","variant"],rJ=t=>{const{classes:e,contained:n,size:r,disabled:i,error:a,filled:s,focused:o,required:l}=t,c={root:["root",i&&"disabled",a&&"error",r&&`size${Ne(r)}`,n&&"contained",o&&"focused",s&&"filled",l&&"required"]};return Rt(c,tJ,e)},iJ=Re("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.size&&e[`size${Ne(n.size)}`],n.contained&&e.contained,n.filled&&e.filled]}})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Q2.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Q2.error}`]:{color:(t.vars||t).palette.error.main}},e.size==="small"&&{marginTop:4},e.contained&&{marginLeft:14,marginRight:14})),aJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormHelperText"}),{children:i,className:a,component:s="p"}=r,o=Be(r,nJ),l=Rp(),c=Np({props:r,muiFormControl:l,states:["variant","size","disabled","error","filled","focused","required"]}),u=I({},r,{component:s,contained:c.variant==="filled"||c.variant==="outlined",variant:c.variant,size:c.size,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=rJ(u);return f.jsx(iJ,I({as:s,ownerState:u,className:$e(d.root,a),ref:n},o,{children:i===" "?X2||(X2=f.jsx("span",{className:"notranslate",children:""})):i}))});function sJ(t){return wt("MuiFormLabel",t)}const Zf=Nt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),oJ=["children","className","color","component","disabled","error","filled","focused","required"],lJ=t=>{const{classes:e,color:n,focused:r,disabled:i,error:a,filled:s,required:o}=t,l={root:["root",`color${Ne(n)}`,i&&"disabled",a&&"error",s&&"filled",r&&"focused",o&&"required"],asterisk:["asterisk",a&&"error"]};return Rt(l,sJ,e)},cJ=Re("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:t},e)=>I({},e.root,t.color==="secondary"&&e.colorSecondary,t.filled&&e.filled)})(({theme:t,ownerState:e})=>I({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${Zf.focused}`]:{color:(t.vars||t).palette[e.color].main},[`&.${Zf.disabled}`]:{color:(t.vars||t).palette.text.disabled},[`&.${Zf.error}`]:{color:(t.vars||t).palette.error.main}})),uJ=Re("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(t,e)=>e.asterisk})(({theme:t})=>({[`&.${Zf.error}`]:{color:(t.vars||t).palette.error.main}})),dJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiFormLabel"}),{children:i,className:a,component:s="label"}=r,o=Be(r,oJ),l=Rp(),c=Np({props:r,muiFormControl:l,states:["color","required","focused","disabled","error","filled"]}),u=I({},r,{color:c.color||"primary",component:s,disabled:c.disabled,error:c.error,filled:c.filled,focused:c.focused,required:c.required}),d=lJ(u);return f.jsxs(cJ,I({as:s,ownerState:u,className:$e(d.root,a),ref:n},o,{children:[i,c.required&&f.jsxs(uJ,{ownerState:u,"aria-hidden":!0,className:d.asterisk,children:[" ","*"]})]}))}),pJ=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function DC(t){return`scale(${t}, ${t**2})`}const fJ={entering:{opacity:1,transform:DC(1)},entered:{opacity:1,transform:"none"}},Mv=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Im=P.forwardRef(function(e,n){const{addEndListener:r,appear:i=!0,children:a,easing:s,in:o,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:m,style:h,timeout:g="auto",TransitionComponent:_=Es}=e,b=Be(e,pJ),y=Dl(),v=P.useRef(),E=kr(),S=P.useRef(null),k=er(S,hu(a),n),x=M=>O=>{if(M){const $=S.current;O===void 0?M($):M($,O)}},w=x(u),N=x((M,O)=>{Q4(M);const{duration:$,delay:z,easing:X}=Kd({style:h,timeout:g,easing:s},{mode:"enter"});let W;g==="auto"?(W=E.transitions.getAutoHeightDuration(M.clientHeight),v.current=W):W=$,M.style.transition=[E.transitions.create("opacity",{duration:W,delay:z}),E.transitions.create("transform",{duration:Mv?W:W*.666,delay:z,easing:X})].join(","),l&&l(M,O)}),R=x(c),T=x(m),B=x(M=>{const{duration:O,delay:$,easing:z}=Kd({style:h,timeout:g,easing:s},{mode:"exit"});let X;g==="auto"?(X=E.transitions.getAutoHeightDuration(M.clientHeight),v.current=X):X=O,M.style.transition=[E.transitions.create("opacity",{duration:X,delay:$}),E.transitions.create("transform",{duration:Mv?X:X*.666,delay:Mv?$:$||X*.333,easing:z})].join(","),M.style.opacity=0,M.style.transform=DC(.75),d&&d(M)}),A=x(p),L=M=>{g==="auto"&&y.start(v.current||0,M),r&&r(S.current,M)};return f.jsx(_,I({appear:i,in:o,nodeRef:S,onEnter:N,onEntered:R,onEntering:w,onExit:B,onExited:A,onExiting:T,addEndListener:L,timeout:g==="auto"?null:g},b,{children:(M,O)=>P.cloneElement(a,I({style:I({opacity:0,transform:DC(.75),visibility:M==="exited"&&!o?"hidden":void 0},fJ[M],h,a.props.style),ref:k},O))}))});Im.muiSupportAuto=!0;const mJ=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],hJ=t=>{const{classes:e,disableUnderline:n}=t,i=Rt({root:["root",!n&&"underline"],input:["input"]},eX,e);return I({},e,i)},gJ=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiInput",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[...py(t,e),!n.disableUnderline&&e.underline]}})(({theme:t,ownerState:e})=>{let r=t.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(r=`rgba(${t.vars.palette.common.onBackgroundChannel} / ${t.vars.opacity.inputUnderline})`),I({position:"relative"},e.formControl&&{"label + &":{marginTop:16}},!e.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(t.vars||t).palette[e.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${rf.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${rf.error}`]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:`1px solid ${r}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${rf.disabled}, .${rf.error}):before`]:{borderBottom:`2px solid ${(t.vars||t).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${r}`}},[`&.${rf.disabled}:before`]:{borderBottomStyle:"dotted"}})}),_J=Re(hy,{name:"MuiInput",slot:"Input",overridesResolver:fy})({}),zk=P.forwardRef(function(e,n){var r,i,a,s;const o=Dt({props:e,name:"MuiInput"}),{disableUnderline:l,components:c={},componentsProps:u,fullWidth:d=!1,inputComponent:p="input",multiline:m=!1,slotProps:h,slots:g={},type:_="text"}=o,b=Be(o,mJ),y=hJ(o),E={root:{ownerState:{disableUnderline:l}}},S=h??u?Ci(h??u,E):E,k=(r=(i=g.root)!=null?i:c.Root)!=null?r:gJ,x=(a=(s=g.input)!=null?s:c.Input)!=null?a:_J;return f.jsx(Bk,I({slots:{root:k,input:x},slotProps:S,fullWidth:d,inputComponent:p,multiline:m,ref:n,type:_},b,{classes:y}))});zk.muiName="Input";function bJ(t){return wt("MuiInputLabel",t)}Nt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const yJ=["disableAnimation","margin","shrink","variant","className"],vJ=t=>{const{classes:e,formControl:n,size:r,shrink:i,disableAnimation:a,variant:s,required:o}=t,l={root:["root",n&&"formControl",!a&&"animated",i&&"shrink",r&&r!=="normal"&&`size${Ne(r)}`,s],asterisk:[o&&"asterisk"]},c=Rt(l,bJ,e);return I({},e,c)},EJ=Re(dJ,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Zf.asterisk}`]:e.asterisk},e.root,n.formControl&&e.formControl,n.size==="small"&&e.sizeSmall,n.shrink&&e.shrink,!n.disableAnimation&&e.animated,n.focused&&e.focused,e[n.variant]]}})(({theme:t,ownerState:e})=>I({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},e.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},e.size==="small"&&{transform:"translate(0, 17px) scale(1)"},e.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!e.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},e.variant==="filled"&&I({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(12px, 13px) scale(1)"},e.shrink&&I({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},e.size==="small"&&{transform:"translate(12px, 4px) scale(0.75)"})),e.variant==="outlined"&&I({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},e.size==="small"&&{transform:"translate(14px, 9px) scale(1)"},e.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))),SJ=P.forwardRef(function(e,n){const r=Dt({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:a,className:s}=r,o=Be(r,yJ),l=Rp();let c=a;typeof c>"u"&&l&&(c=l.filled||l.focused||l.adornedStart);const u=Np({props:r,muiFormControl:l,states:["size","variant","required","focused"]}),d=I({},r,{disableAnimation:i,formControl:l,shrink:c,size:u.size,variant:u.variant,required:u.required,focused:u.focused}),p=vJ(d);return f.jsx(EJ,I({"data-shrink":c,ownerState:d,ref:n,className:$e(p.root,s)},o,{classes:p}))});function TJ(t){return wt("MuiLink",t)}const CJ=Nt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),m6={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},xJ=t=>m6[t]||t,kJ=({theme:t,ownerState:e})=>{const n=xJ(e.color),r=Wd(t,`palette.${n}`,!1)||e.color,i=Wd(t,`palette.${n}Channel`);return"vars"in t&&i?`rgba(${i} / 0.4)`:zt.alpha(r,.4)},wJ=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],DJ=t=>{const{classes:e,component:n,focusVisible:r,underline:i}=t,a={root:["root",`underline${Ne(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Rt(a,TJ,e)},AJ=Re(mr,{name:"MuiLink",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`underline${Ne(n.underline)}`],n.component==="button"&&e.button]}})(({theme:t,ownerState:e})=>I({},e.underline==="none"&&{textDecoration:"none"},e.underline==="hover"&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},e.underline==="always"&&I({textDecoration:"underline"},e.color!=="inherit"&&{textDecorationColor:kJ({theme:t,ownerState:e})},{"&:hover":{textDecorationColor:"inherit"}}),e.component==="button"&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${CJ.focusVisible}`]:{outline:"auto"}})),NJ=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiLink"}),{className:i,color:a="primary",component:s="a",onBlur:o,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=r,m=Be(r,wJ),{isFocusVisibleRef:h,onBlur:g,onFocus:_,ref:b}=ly(),[y,v]=P.useState(!1),E=er(n,b),S=N=>{g(N),h.current===!1&&v(!1),o&&o(N)},k=N=>{_(N),h.current===!0&&v(!0),l&&l(N)},x=I({},r,{color:a,component:s,focusVisible:y,underline:u,variant:d}),w=DJ(x);return f.jsx(AJ,I({color:a,className:$e(w.root,i),classes:c,component:s,onBlur:S,onFocus:k,ref:E,ownerState:x,variant:d,sx:[...Object.keys(m6).includes(a)?[]:[{color:a}],...Array.isArray(p)?p:[p]]},m))}),Zc=P.createContext({});function RJ(t){return wt("MuiList",t)}Nt("MuiList",["root","padding","dense","subheader"]);const IJ=["children","className","component","dense","disablePadding","subheader"],OJ=t=>{const{classes:e,disablePadding:n,dense:r,subheader:i}=t;return Rt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},RJ,e)},PJ=Re("ul",{name:"MuiList",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,!n.disablePadding&&e.padding,n.dense&&e.dense,n.subheader&&e.subheader]}})(({ownerState:t})=>I({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})),Om=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiList"}),{children:i,className:a,component:s="ul",dense:o=!1,disablePadding:l=!1,subheader:c}=r,u=Be(r,IJ),d=P.useMemo(()=>({dense:o}),[o]),p=I({},r,{component:s,dense:o,disablePadding:l}),m=OJ(p);return f.jsx(Zc.Provider,{value:d,children:f.jsxs(PJ,I({as:s,className:$e(m.root,a),ref:n,ownerState:p},u,{children:[c,i]}))})});function LJ(t){return wt("MuiListItemButton",t)}const af=Nt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),MJ=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],FJ=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},BJ=t=>{const{alignItems:e,classes:n,dense:r,disabled:i,disableGutters:a,divider:s,selected:o}=t,c=Rt({root:["root",r&&"dense",!a&&"gutters",s&&"divider",i&&"disabled",e==="flex-start"&&"alignItemsFlexStart",o&&"selected"]},LJ,n);return I({},n,c)},UJ=Re(Oa,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:FJ})(({theme:t,ownerState:e})=>I({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${af.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${af.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${af.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${af.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${af.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),eb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemButton"}),{alignItems:i="center",autoFocus:a=!1,component:s="div",children:o,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:m}=r,h=Be(r,MJ),g=P.useContext(Zc),_=P.useMemo(()=>({dense:l||g.dense||!1,alignItems:i,disableGutters:c}),[i,g.dense,l,c]),b=P.useRef(null);zi(()=>{a&&b.current&&b.current.focus()},[a]);const y=I({},r,{alignItems:i,dense:_.dense,disableGutters:c,divider:u,selected:p}),v=BJ(y),E=er(b,n);return f.jsx(Zc.Provider,{value:_,children:f.jsx(UJ,I({ref:E,href:h.href||h.to,component:(h.href||h.to)&&s==="div"?"button":s,focusVisibleClassName:$e(v.focusVisible,d),ownerState:y,className:$e(v.root,m)},h,{classes:v,children:o}))})});function $J(t){return wt("MuiListItemIcon",t)}const Z2=Nt("MuiListItemIcon",["root","alignItemsFlexStart"]),zJ=["className"],qJ=t=>{const{alignItems:e,classes:n}=t;return Rt({root:["root",e==="flex-start"&&"alignItemsFlexStart"]},$J,n)},GJ=Re("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.alignItems==="flex-start"&&e.alignItemsFlexStart]}})(({theme:t,ownerState:e})=>I({minWidth:56,color:(t.vars||t).palette.action.active,flexShrink:0,display:"inline-flex"},e.alignItems==="flex-start"&&{marginTop:8})),tb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemIcon"}),{className:i}=r,a=Be(r,zJ),s=P.useContext(Zc),o=I({},r,{alignItems:s.alignItems}),l=qJ(o);return f.jsx(GJ,I({className:$e(l.root,i),ownerState:o,ref:n},a))});function jJ(t){return wt("MuiListItemText",t)}const nb=Nt("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),HJ=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],VJ=t=>{const{classes:e,inset:n,primary:r,secondary:i,dense:a}=t;return Rt({root:["root",n&&"inset",a&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},jJ,e)},WJ=Re("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${nb.primary}`]:e.primary},{[`& .${nb.secondary}`]:e.secondary},e.root,n.inset&&e.inset,n.primary&&n.secondary&&e.multiline,n.dense&&e.dense]}})(({ownerState:t})=>I({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},t.primary&&t.secondary&&{marginTop:6,marginBottom:6},t.inset&&{paddingLeft:56})),rb=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiListItemText"}),{children:i,className:a,disableTypography:s=!1,inset:o=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d}=r,p=Be(r,HJ),{dense:m}=P.useContext(Zc);let h=l??i,g=u;const _=I({},r,{disableTypography:s,inset:o,primary:!!h,secondary:!!g,dense:m}),b=VJ(_);return h!=null&&h.type!==mr&&!s&&(h=f.jsx(mr,I({variant:m?"body2":"body1",className:b.primary,component:c!=null&&c.variant?void 0:"span",display:"block"},c,{children:h}))),g!=null&&g.type!==mr&&!s&&(g=f.jsx(mr,I({variant:"body2",className:b.secondary,color:"text.secondary",display:"block"},d,{children:g}))),f.jsxs(WJ,I({className:$e(b.root,a),ownerState:_,ref:n},p,{children:[h,g]}))}),YJ=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Fv(t,e,n){return t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:n?null:t.firstChild}function J2(t,e,n){return t===e?n?t.firstChild:t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:n?null:t.lastChild}function h6(t,e){if(e===void 0)return!0;let n=t.innerText;return n===void 0&&(n=t.textContent),n=n.trim().toLowerCase(),n.length===0?!1:e.repeating?n[0]===e.keys[0]:n.indexOf(e.keys.join(""))===0}function sf(t,e,n,r,i,a){let s=!1,o=i(t,e,e?n:!1);for(;o;){if(o===t.firstChild){if(s)return!1;s=!0}const l=r?!1:o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||!h6(o,a)||l)o=i(t,o,n);else return o.focus(),!0}return!1}const KJ=P.forwardRef(function(e,n){const{actions:r,autoFocus:i=!1,autoFocusItem:a=!1,children:s,className:o,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=Be(e,YJ),m=P.useRef(null),h=P.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});zi(()=>{i&&m.current.focus()},[i]),P.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(v,{direction:E})=>{const S=!m.current.style.width;if(v.clientHeight<m.current.clientHeight&&S){const k=`${F4(hr(v))}px`;m.current.style[E==="rtl"?"paddingLeft":"paddingRight"]=k,m.current.style.width=`calc(100% + ${k})`}return m.current}}),[]);const g=v=>{const E=m.current,S=v.key,k=hr(E).activeElement;if(S==="ArrowDown")v.preventDefault(),sf(E,k,c,l,Fv);else if(S==="ArrowUp")v.preventDefault(),sf(E,k,c,l,J2);else if(S==="Home")v.preventDefault(),sf(E,null,c,l,Fv);else if(S==="End")v.preventDefault(),sf(E,null,c,l,J2);else if(S.length===1){const x=h.current,w=S.toLowerCase(),N=performance.now();x.keys.length>0&&(N-x.lastTime>500?(x.keys=[],x.repeating=!0,x.previousKeyMatched=!0):x.repeating&&w!==x.keys[0]&&(x.repeating=!1)),x.lastTime=N,x.keys.push(w);const R=k&&!x.repeating&&h6(k,x);x.previousKeyMatched&&(R||sf(E,k,!1,l,Fv,x))?v.preventDefault():x.previousKeyMatched=!1}u&&u(v)},_=er(m,n);let b=-1;P.Children.forEach(s,(v,E)=>{if(!P.isValidElement(v)){b===E&&(b+=1,b>=s.length&&(b=-1));return}v.props.disabled||(d==="selectedMenu"&&v.props.selected||b===-1)&&(b=E),b===E&&(v.props.disabled||v.props.muiSkipListHighlight||v.type.muiSkipListHighlight)&&(b+=1,b>=s.length&&(b=-1))});const y=P.Children.map(s,(v,E)=>{if(E===b){const S={};return a&&(S.autoFocus=!0),v.props.tabIndex===void 0&&d==="selectedMenu"&&(S.tabIndex=0),P.cloneElement(v,S)}return v});return f.jsx(Om,I({role:"menu",ref:_,className:o,onKeyDown:g,tabIndex:i?0:-1},p,{children:y}))});function QJ(t){return wt("MuiPopover",t)}Nt("MuiPopover",["root","paper"]);const XJ=["onEntering"],ZJ=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],JJ=["slotProps"];function eN(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.height/2:e==="bottom"&&(n=t.height),n}function tN(t,e){let n=0;return typeof e=="number"?n=e:e==="center"?n=t.width/2:e==="right"&&(n=t.width),n}function nN(t){return[t.horizontal,t.vertical].map(e=>typeof e=="number"?`${e}px`:e).join(" ")}function Bv(t){return typeof t=="function"?t():t}const eee=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"]},QJ,e)},tee=Re(p6,{name:"MuiPopover",slot:"Root",overridesResolver:(t,e)=>e.root})({}),g6=Re(gu,{name:"MuiPopover",slot:"Paper",overridesResolver:(t,e)=>e.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),es=P.forwardRef(function(e,n){var r,i,a;const s=Dt({props:e,name:"MuiPopover"}),{action:o,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:m,container:h,elevation:g=8,marginThreshold:_=16,open:b,PaperProps:y={},slots:v,slotProps:E,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:k=Im,transitionDuration:x="auto",TransitionProps:{onEntering:w}={},disableScrollLock:N=!1}=s,R=Be(s.TransitionProps,XJ),T=Be(s,ZJ),B=(r=E?.paper)!=null?r:y,A=P.useRef(),L=er(A,B.ref),M=I({},s,{anchorOrigin:c,anchorReference:d,elevation:g,marginThreshold:_,externalPaperSlotProps:B,transformOrigin:S,TransitionComponent:k,transitionDuration:x,TransitionProps:R}),O=eee(M),$=P.useCallback(()=>{if(d==="anchorPosition")return u;const he=Bv(l),De=(he&&he.nodeType===1?he:hr(A.current).body).getBoundingClientRect();return{top:De.top+eN(De,c.vertical),left:De.left+tN(De,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),z=P.useCallback(he=>({vertical:eN(he,S.vertical),horizontal:tN(he,S.horizontal)}),[S.horizontal,S.vertical]),X=P.useCallback(he=>{const Ee={width:he.offsetWidth,height:he.offsetHeight},De=z(Ee);if(d==="none")return{top:null,left:null,transformOrigin:nN(De)};const ft=$();let yt=ft.top-De.vertical,mt=ft.left-De.horizontal;const nn=yt+Ee.height,tt=mt+Ee.width,dt=Lo(Bv(l)),on=dt.innerHeight-_,qt=dt.innerWidth-_;if(_!==null&&yt<_){const st=yt-_;yt-=st,De.vertical+=st}else if(_!==null&&nn>on){const st=nn-on;yt-=st,De.vertical+=st}if(_!==null&&mt<_){const st=mt-_;mt-=st,De.horizontal+=st}else if(tt>qt){const st=tt-qt;mt-=st,De.horizontal+=st}return{top:`${Math.round(yt)}px`,left:`${Math.round(mt)}px`,transformOrigin:nN(De)}},[l,d,$,z,_]),[W,te]=P.useState(b),pe=P.useCallback(()=>{const he=A.current;if(!he)return;const Ee=X(he);Ee.top!==null&&(he.style.top=Ee.top),Ee.left!==null&&(he.style.left=Ee.left),he.style.transformOrigin=Ee.transformOrigin,te(!0)},[X]);P.useEffect(()=>(N&&window.addEventListener("scroll",pe),()=>window.removeEventListener("scroll",pe)),[l,N,pe]);const ye=(he,Ee)=>{w&&w(he,Ee),pe()},ae=()=>{te(!1)};P.useEffect(()=>{b&&pe()}),P.useImperativeHandle(o,()=>b?{updatePosition:()=>{pe()}}:null,[b,pe]),P.useEffect(()=>{if(!b)return;const he=sy(()=>{pe()}),Ee=Lo(l);return Ee.addEventListener("resize",he),()=>{he.clear(),Ee.removeEventListener("resize",he)}},[l,b,pe]);let oe=x;x==="auto"&&!k.muiSupportAuto&&(oe=void 0);const le=h||(l?hr(Bv(l)).body:void 0),H=(i=v?.root)!=null?i:tee,Z=(a=v?.paper)!=null?a:g6,ee=Nr({elementType:Z,externalSlotProps:I({},B,{style:W?B.style:I({},B.style,{opacity:0})}),additionalProps:{elevation:g,ref:L},ownerState:M,className:$e(O.paper,B?.className)}),se=Nr({elementType:H,externalSlotProps:E?.root||{},externalForwardedProps:T,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:le,open:b},ownerState:M,className:$e(O.root,m)}),{slotProps:ie}=se,ve=Be(se,JJ);return f.jsx(H,I({},ve,!Rl(H)&&{slotProps:ie,disableScrollLock:N},{children:f.jsx(k,I({appear:!0,in:b,onEntering:ye,onExited:ae,timeout:oe},R,{children:f.jsx(Z,I({},ee,{children:p}))}))}))});function nee(t){return wt("MuiMenu",t)}Nt("MuiMenu",["root","paper","list"]);const ree=["onEntering"],iee=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],aee={vertical:"top",horizontal:"right"},see={vertical:"top",horizontal:"left"},oee=t=>{const{classes:e}=t;return Rt({root:["root"],paper:["paper"],list:["list"]},nee,e)},lee=Re(es,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(t,e)=>e.root})({}),cee=Re(g6,{name:"MuiMenu",slot:"Paper",overridesResolver:(t,e)=>e.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),uee=Re(KJ,{name:"MuiMenu",slot:"List",overridesResolver:(t,e)=>e.list})({outline:0}),qk=P.forwardRef(function(e,n){var r,i;const a=Dt({props:e,name:"MuiMenu"}),{autoFocus:s=!0,children:o,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:m={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:_}={},variant:b="selectedMenu",slots:y={},slotProps:v={}}=a,E=Be(a.TransitionProps,ree),S=Be(a,iee),k=Th(),x=I({},a,{autoFocus:s,disableAutoFocusItem:c,MenuListProps:u,onEntering:_,PaperProps:m,transitionDuration:g,TransitionProps:E,variant:b}),w=oee(x),N=s&&!c&&p,R=P.useRef(null),T=(z,X)=>{R.current&&R.current.adjustStyleForScrollbar(z,{direction:k?"rtl":"ltr"}),_&&_(z,X)},B=z=>{z.key==="Tab"&&(z.preventDefault(),d&&d(z,"tabKeyDown"))};let A=-1;P.Children.map(o,(z,X)=>{P.isValidElement(z)&&(z.props.disabled||(b==="selectedMenu"&&z.props.selected||A===-1)&&(A=X))});const L=(r=y.paper)!=null?r:cee,M=(i=v.paper)!=null?i:m,O=Nr({elementType:y.root,externalSlotProps:v.root,ownerState:x,className:[w.root,l]}),$=Nr({elementType:L,externalSlotProps:M,ownerState:x,className:w.paper});return f.jsx(lee,I({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:k?"right":"left"},transformOrigin:k?aee:see,slots:{paper:L,root:y.root},slotProps:{root:O,paper:$},open:p,ref:n,transitionDuration:g,TransitionProps:I({onEntering:T},E),ownerState:x},S,{classes:h,children:f.jsx(uee,I({onKeyDown:B,actions:R,autoFocus:s&&(A===-1||c),autoFocusItem:N,variant:b},u,{className:$e(w.list,u.className),children:o}))}))});function dee(t){return wt("MuiMenuItem",t)}const of=Nt("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),pee=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],fee=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.divider&&e.divider,!n.disableGutters&&e.gutters]},mee=t=>{const{disabled:e,dense:n,divider:r,disableGutters:i,selected:a,classes:s}=t,l=Rt({root:["root",n&&"dense",e&&"disabled",!i&&"gutters",r&&"divider",a&&"selected"]},dee,s);return I({},s,l)},hee=Re(Oa,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:fee})(({theme:t,ownerState:e})=>I({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${of.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${of.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${of.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:zt.alpha(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${of.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${of.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},[`& + .${K2.root}`]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},[`& + .${K2.inset}`]:{marginLeft:52},[`& .${nb.root}`]:{marginTop:0,marginBottom:0},[`& .${nb.inset}`]:{paddingLeft:36},[`& .${Z2.root}`]:{minWidth:36}},!e.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},e.dense&&I({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{[`& .${Z2.root} svg`]:{fontSize:"1.25rem"}}))),ts=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiMenuItem"}),{autoFocus:i=!1,component:a="li",dense:s=!1,divider:o=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=r,m=Be(r,pee),h=P.useContext(Zc),g=P.useMemo(()=>({dense:s||h.dense||!1,disableGutters:l}),[h.dense,s,l]),_=P.useRef(null);zi(()=>{i&&_.current&&_.current.focus()},[i]);const b=I({},r,{dense:g.dense,divider:o,disableGutters:l}),y=mee(r),v=er(_,n);let E;return r.disabled||(E=d!==void 0?d:-1),f.jsx(Zc.Provider,{value:g,children:f.jsx(hee,I({ref:v,role:u,tabIndex:E,component:a,focusVisibleClassName:$e(y.focusVisible,c),className:$e(y.root,p)},m,{ownerState:b,classes:y}))})});function gee(t){return wt("MuiNativeSelect",t)}const Gk=Nt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),_ee=["className","disabled","error","IconComponent","inputRef","variant"],bee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:a,error:s}=t,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Ne(n)}`,a&&"iconOpen",r&&"disabled"]};return Rt(o,gee,e)},_6=({ownerState:t,theme:e})=>I({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":I({},e.vars?{backgroundColor:`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:e.palette.mode==="light"?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${Gk.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},t.variant==="filled"&&{"&&&":{paddingRight:32}},t.variant==="outlined"&&{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}),yee=Re("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Hi,overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.select,e[n.variant],n.error&&e.error,{[`&.${Gk.multiple}`]:e.multiple}]}})(_6),b6=({ownerState:t,theme:e})=>I({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Gk.disabled}`]:{color:(e.vars||e).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},t.variant==="filled"&&{right:7},t.variant==="outlined"&&{right:7}),vee=Re("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ne(n.variant)}`],n.open&&e.iconOpen]}})(b6),Eee=P.forwardRef(function(e,n){const{className:r,disabled:i,error:a,IconComponent:s,inputRef:o,variant:l="standard"}=e,c=Be(e,_ee),u=I({},e,{disabled:i,variant:l,error:a}),d=bee(u);return f.jsxs(P.Fragment,{children:[f.jsx(yee,I({ownerState:u,className:$e(d.select,r),disabled:i,ref:o||n},c)),e.multiple?null:f.jsx(vee,{as:s,ownerState:u,className:d.icon})]})});var rN;const See=["children","classes","className","label","notched"],Tee=Re("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Hi})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Cee=Re("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Hi})(({ownerState:t,theme:e})=>I({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})},t.withLabel&&I({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})})));function xee(t){const{className:e,label:n,notched:r}=t,i=Be(t,See),a=n!=null&&n!=="",s=I({},t,{notched:r,withLabel:a});return f.jsx(Tee,I({"aria-hidden":!0,className:e,ownerState:s},i,{children:f.jsx(Cee,{ownerState:s,children:a?f.jsx("span",{children:n}):rN||(rN=f.jsx("span",{className:"notranslate",children:""}))})}))}const kee=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],wee=t=>{const{classes:e}=t,r=Rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tX,e);return I({},e,r)},Dee=Re(my,{shouldForwardProp:t=>Hi(t)||t==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:py})(({theme:t,ownerState:e})=>{const n=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return I({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,[`&:hover .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{[`&:hover .${ul.notchedOutline}`]:{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${ul.focused} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette[e.color].main,borderWidth:2},[`&.${ul.error} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.error.main},[`&.${ul.disabled} .${ul.notchedOutline}`]:{borderColor:(t.vars||t).palette.action.disabled}},e.startAdornment&&{paddingLeft:14},e.endAdornment&&{paddingRight:14},e.multiline&&I({padding:"16.5px 14px"},e.size==="small"&&{padding:"8.5px 14px"}))}),Aee=Re(xee,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(t,e)=>e.notchedOutline})(({theme:t})=>{const e=t.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.23)`:e}}),Nee=Re(hy,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:fy})(({theme:t,ownerState:e})=>I({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:t.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:t.palette.mode==="light"?null:"#fff",caretColor:t.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},e.size==="small"&&{padding:"8.5px 14px"},e.multiline&&{padding:0},e.startAdornment&&{paddingLeft:0},e.endAdornment&&{paddingRight:0})),jk=P.forwardRef(function(e,n){var r,i,a,s,o;const l=Dt({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:m=!1,notched:h,slots:g={},type:_="text"}=l,b=Be(l,kee),y=wee(l),v=Rp(),E=Np({props:l,muiFormControl:v,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=I({},l,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:v,fullWidth:u,hiddenLabel:E.hiddenLabel,multiline:m,size:E.size,type:_}),k=(r=(i=g.root)!=null?i:c.Root)!=null?r:Dee,x=(a=(s=g.input)!=null?s:c.Input)!=null?a:Nee;return f.jsx(Bk,I({slots:{root:k,input:x},renderSuffix:w=>f.jsx(Aee,{ownerState:S,className:y.notchedOutline,label:p!=null&&p!==""&&E.required?o||(o=f.jsxs(P.Fragment,{children:[p," ","*"]})):p,notched:typeof h<"u"?h:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:u,inputComponent:d,multiline:m,ref:n,type:_},b,{classes:I({},y,{notchedOutline:null})}))});jk.muiName="Input";function Ree(t){return wt("MuiSelect",t)}const lf=Nt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var iN;const Iee=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],Oee=Re("div",{name:"MuiSelect",slot:"Select",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`&.${lf.select}`]:e.select},{[`&.${lf.select}`]:e[n.variant]},{[`&.${lf.error}`]:e.error},{[`&.${lf.multiple}`]:e.multiple}]}})(_6,{[`&.${lf.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Pee=Re("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.icon,n.variant&&e[`icon${Ne(n.variant)}`],n.open&&e.iconOpen]}})(b6),Lee=Re("input",{shouldForwardProp:t=>cy(t)&&t!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(t,e)=>e.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function aN(t,e){return typeof e=="object"&&e!==null?t===e:String(t)===String(e)}function Mee(t){return t==null||typeof t=="string"&&!t.trim()}const Fee=t=>{const{classes:e,variant:n,disabled:r,multiple:i,open:a,error:s}=t,o={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${Ne(n)}`,a&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Rt(o,Ree,e)},Bee=P.forwardRef(function(e,n){var r;const{"aria-describedby":i,"aria-label":a,autoFocus:s,autoWidth:o,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:m,error:h=!1,IconComponent:g,inputRef:_,labelId:b,MenuProps:y={},multiple:v,name:E,onBlur:S,onChange:k,onClose:x,onFocus:w,onOpen:N,open:R,readOnly:T,renderValue:B,SelectDisplayProps:A={},tabIndex:L,value:M,variant:O="standard"}=e,$=Be(e,Iee),[z,X]=Q_({controlled:M,default:d,name:"Select"}),[W,te]=Q_({controlled:R,default:u,name:"Select"}),pe=P.useRef(null),ye=P.useRef(null),[ae,oe]=P.useState(null),{current:le}=P.useRef(R!=null),[H,Z]=P.useState(),ee=er(n,_),se=P.useCallback(ke=>{ye.current=ke,ke&&oe(ke)},[]),ie=ae?.parentNode;P.useImperativeHandle(ee,()=>({focus:()=>{ye.current.focus()},node:pe.current,value:z}),[z]),P.useEffect(()=>{u&&W&&ae&&!le&&(Z(o?null:ie.clientWidth),ye.current.focus())},[ae,o]),P.useEffect(()=>{s&&ye.current.focus()},[s]),P.useEffect(()=>{if(!b)return;const ke=hr(ye.current).getElementById(b);if(ke){const lt=()=>{getSelection().isCollapsed&&ye.current.focus()};return ke.addEventListener("click",lt),()=>{ke.removeEventListener("click",lt)}}},[b]);const ve=(ke,lt)=>{ke?N&&N(lt):x&&x(lt),le||(Z(o?null:ie.clientWidth),te(ke))},he=ke=>{ke.button===0&&(ke.preventDefault(),ye.current.focus(),ve(!0,ke))},Ee=ke=>{ve(!1,ke)},De=P.Children.toArray(l),ft=ke=>{const lt=De.find(xe=>xe.props.value===ke.target.value);lt!==void 0&&(X(lt.props.value),k&&k(ke,lt))},yt=ke=>lt=>{let xe;if(lt.currentTarget.hasAttribute("tabindex")){if(v){xe=Array.isArray(z)?z.slice():[];const we=z.indexOf(ke.props.value);we===-1?xe.push(ke.props.value):xe.splice(we,1)}else xe=ke.props.value;if(ke.props.onClick&&ke.props.onClick(lt),z!==xe&&(X(xe),k)){const we=lt.nativeEvent||lt,rt=new we.constructor(we.type,we);Object.defineProperty(rt,"target",{writable:!0,value:{value:xe,name:E}}),k(rt,ke)}v||ve(!1,lt)}},mt=ke=>{T||[" ","ArrowUp","ArrowDown","Enter"].indexOf(ke.key)!==-1&&(ke.preventDefault(),ve(!0,ke))},nn=ae!==null&&W,tt=ke=>{!nn&&S&&(Object.defineProperty(ke,"target",{writable:!0,value:{value:z,name:E}}),S(ke))};delete $["aria-invalid"];let dt,on;const qt=[];let st=!1;(J_({value:z})||m)&&(B?dt=B(z):st=!0);const Wt=De.map(ke=>{if(!P.isValidElement(ke))return null;let lt;if(v){if(!Array.isArray(z))throw new Error(Po(2));lt=z.some(xe=>aN(xe,ke.props.value)),lt&&st&&qt.push(ke.props.children)}else lt=aN(z,ke.props.value),lt&&st&&(on=ke.props.children);return P.cloneElement(ke,{"aria-selected":lt?"true":"false",onClick:yt(ke),onKeyUp:xe=>{xe.key===" "&&xe.preventDefault(),ke.props.onKeyUp&&ke.props.onKeyUp(xe)},role:"option",selected:lt,value:void 0,"data-value":ke.props.value})});st&&(v?qt.length===0?dt=null:dt=qt.reduce((ke,lt,xe)=>(ke.push(lt),xe<qt.length-1&&ke.push(", "),ke),[]):dt=on);let Bt=H;!o&&le&&ae&&(Bt=ie.clientWidth);let Gt;typeof L<"u"?Gt=L:Gt=p?null:0;const ge=A.id||(E?`mui-component-select-${E}`:void 0),ce=I({},e,{variant:O,value:z,open:nn,error:h}),Ie=Fee(ce),ut=I({},y.PaperProps,(r=y.slotProps)==null?void 0:r.paper),ot=Eh();return f.jsxs(P.Fragment,{children:[f.jsx(Oee,I({ref:se,tabIndex:Gt,role:"combobox","aria-controls":ot,"aria-disabled":p?"true":void 0,"aria-expanded":nn?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[b,ge].filter(Boolean).join(" ")||void 0,"aria-describedby":i,onKeyDown:mt,onMouseDown:p||T?null:he,onBlur:tt,onFocus:w},A,{ownerState:ce,className:$e(A.className,Ie.select,c),id:ge,children:Mee(dt)?iN||(iN=f.jsx("span",{className:"notranslate",children:""})):dt})),f.jsx(Lee,I({"aria-invalid":h,value:Array.isArray(z)?z.join(","):z,name:E,ref:pe,"aria-hidden":!0,onChange:ft,tabIndex:-1,disabled:p,className:Ie.nativeInput,autoFocus:s,ownerState:ce},$)),f.jsx(Pee,{as:g,className:Ie.icon,ownerState:ce}),f.jsx(qk,I({id:`menu-${E||""}`,anchorEl:ie,open:nn,onClose:Ee,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},y,{MenuListProps:I({"aria-labelledby":b,role:"listbox","aria-multiselectable":v?"true":void 0,disableListWrap:!0,id:ot},y.MenuListProps),slotProps:I({},y.slotProps,{paper:I({},ut,{style:I({minWidth:Bt},ut!=null?ut.style:null)})}),children:Wt}))]})}),Uee=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],$ee=["root"],zee=t=>{const{classes:e}=t;return e},Hk={name:"MuiSelect",overridesResolver:(t,e)=>e.root,shouldForwardProp:t=>Hi(t)&&t!=="variant",slot:"Root"},qee=Re(zk,Hk)(""),Gee=Re(jk,Hk)(""),jee=Re($k,Hk)(""),Vk=P.forwardRef(function(e,n){const r=Dt({name:"MuiSelect",props:e}),{autoWidth:i=!1,children:a,classes:s={},className:o,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=rX,id:d,input:p,inputProps:m,label:h,labelId:g,MenuProps:_,multiple:b=!1,native:y=!1,onClose:v,onOpen:E,open:S,renderValue:k,SelectDisplayProps:x,variant:w="outlined"}=r,N=Be(r,Uee),R=y?Eee:Bee,T=Rp(),B=Np({props:r,muiFormControl:T,states:["variant","error"]}),A=B.variant||w,L=I({},r,{variant:A,classes:s}),M=zee(L),O=Be(M,$ee),$=p||{standard:f.jsx(qee,{ownerState:L}),outlined:f.jsx(Gee,{label:h,ownerState:L}),filled:f.jsx(jee,{ownerState:L})}[A],z=er(n,hu($));return f.jsx(P.Fragment,{children:P.cloneElement($,I({inputComponent:R,inputProps:I({children:a,error:B.error,IconComponent:u,variant:A,type:void 0,multiple:b},y?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:_,onClose:v,onOpen:E,open:S,renderValue:k,SelectDisplayProps:I({id:d},x)},m,{classes:m?Ci(O,m.classes):O},p?p.props.inputProps:{})},(b&&y||c)&&A==="outlined"?{notched:!0}:{},{ref:z,className:$e($.props.className,o,M.root)},!p&&{variant:A},N))})});Vk.muiName="Select";function Hee(t,e,n=(r,i)=>r===i){return t.length===e.length&&t.every((r,i)=>n(r,e[i]))}const Vee=2;function y6(t,e){return t-e}function sN(t,e){var n;const{index:r}=(n=t.reduce((i,a,s)=>{const o=Math.abs(e-a);return i===null||o<i.distance||o===i.distance?{distance:o,index:s}:i},null))!=null?n:{};return r}function bg(t,e){if(e.current!==void 0&&t.changedTouches){const n=t;for(let r=0;r<n.changedTouches.length;r+=1){const i=n.changedTouches[r];if(i.identifier===e.current)return{x:i.clientX,y:i.clientY}}return!1}return{x:t.clientX,y:t.clientY}}function ib(t,e,n){return(t-e)*100/(n-e)}function Wee(t,e,n){return(n-e)*t+e}function Yee(t){if(Math.abs(t)<1){const n=t.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const e=t.toString().split(".")[1];return e?e.length:0}function Kee(t,e,n){const r=Math.round((t-n)/e)*e+n;return Number(r.toFixed(Yee(e)))}function oN({values:t,newValue:e,index:n}){const r=t.slice();return r[n]=e,r.sort(y6)}function yg({sliderRef:t,activeIndex:e,setActive:n}){var r,i;const a=hr(t.current);if(!((r=t.current)!=null&&r.contains(a.activeElement))||Number(a==null||(i=a.activeElement)==null?void 0:i.getAttribute("data-index"))!==e){var s;(s=t.current)==null||s.querySelector(`[type="range"][data-index="${e}"]`).focus()}n&&n(e)}function vg(t,e){return typeof t=="number"&&typeof e=="number"?t===e:typeof t=="object"&&typeof e=="object"?Hee(t,e):!1}const Qee={horizontal:{offset:t=>({left:`${t}%`}),leap:t=>({width:`${t}%`})},"horizontal-reverse":{offset:t=>({right:`${t}%`}),leap:t=>({width:`${t}%`})},vertical:{offset:t=>({bottom:`${t}%`}),leap:t=>({height:`${t}%`})}},Xee=t=>t;let Eg;function lN(){return Eg===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?Eg=CSS.supports("touch-action","none"):Eg=!0),Eg}function Zee(t){const{"aria-labelledby":e,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:a=!1,marks:s=!1,max:o=100,min:l=0,name:c,onChange:u,onChangeCommitted:d,orientation:p="horizontal",rootRef:m,scale:h=Xee,step:g=1,shiftStep:_=10,tabIndex:b,value:y}=t,v=P.useRef(void 0),[E,S]=P.useState(-1),[k,x]=P.useState(-1),[w,N]=P.useState(!1),R=P.useRef(0),[T,B]=Q_({controlled:y,default:n??l,name:"Slider"}),A=u&&((ge,ce,Ie)=>{const ut=ge.nativeEvent||ge,ot=new ut.constructor(ut.type,ut);Object.defineProperty(ot,"target",{writable:!0,value:{value:ce,name:c}}),u(ot,ce,Ie)}),L=Array.isArray(T);let M=L?T.slice().sort(y6):[T];M=M.map(ge=>ge==null?l:Ac(ge,l,o));const O=s===!0&&g!==null?[...Array(Math.floor((o-l)/g)+1)].map((ge,ce)=>({value:l+g*ce})):s||[],$=O.map(ge=>ge.value),{isFocusVisibleRef:z,onBlur:X,onFocus:W,ref:te}=ly(),[pe,ye]=P.useState(-1),ae=P.useRef(null),oe=er(te,ae),le=er(m,oe),H=ge=>ce=>{var Ie;const ut=Number(ce.currentTarget.getAttribute("data-index"));W(ce),z.current===!0&&ye(ut),x(ut),ge==null||(Ie=ge.onFocus)==null||Ie.call(ge,ce)},Z=ge=>ce=>{var Ie;X(ce),z.current===!1&&ye(-1),x(-1),ge==null||(Ie=ge.onBlur)==null||Ie.call(ge,ce)},ee=(ge,ce)=>{const Ie=Number(ge.currentTarget.getAttribute("data-index")),ut=M[Ie],ot=$.indexOf(ut);let ke=ce;if(O&&g==null){const lt=$[$.length-1];ke>lt?ke=lt:ke<$[0]?ke=$[0]:ke=ke<ut?$[ot-1]:$[ot+1]}if(ke=Ac(ke,l,o),L){i&&(ke=Ac(ke,M[Ie-1]||-1/0,M[Ie+1]||1/0));const lt=ke;ke=oN({values:M,newValue:ke,index:Ie});let xe=Ie;i||(xe=ke.indexOf(lt)),yg({sliderRef:ae,activeIndex:xe})}B(ke),ye(Ie),A&&!vg(ke,T)&&A(ge,ke,Ie),d&&d(ge,ke)},se=ge=>ce=>{var Ie;if(g!==null){const ut=Number(ce.currentTarget.getAttribute("data-index")),ot=M[ut];let ke=null;(ce.key==="ArrowLeft"||ce.key==="ArrowDown")&&ce.shiftKey||ce.key==="PageDown"?ke=Math.max(ot-_,l):((ce.key==="ArrowRight"||ce.key==="ArrowUp")&&ce.shiftKey||ce.key==="PageUp")&&(ke=Math.min(ot+_,o)),ke!==null&&(ee(ce,ke),ce.preventDefault())}ge==null||(Ie=ge.onKeyDown)==null||Ie.call(ge,ce)};zi(()=>{if(r&&ae.current.contains(document.activeElement)){var ge;(ge=document.activeElement)==null||ge.blur()}},[r]),r&&E!==-1&&S(-1),r&&pe!==-1&&ye(-1);const ie=ge=>ce=>{var Ie;(Ie=ge.onChange)==null||Ie.call(ge,ce),ee(ce,ce.target.valueAsNumber)},ve=P.useRef(void 0);let he=p;a&&p==="horizontal"&&(he+="-reverse");const Ee=({finger:ge,move:ce=!1})=>{const{current:Ie}=ae,{width:ut,height:ot,bottom:ke,left:lt}=Ie.getBoundingClientRect();let xe;he.indexOf("vertical")===0?xe=(ke-ge.y)/ot:xe=(ge.x-lt)/ut,he.indexOf("-reverse")!==-1&&(xe=1-xe);let we;if(we=Wee(xe,l,o),g)we=Kee(we,g,l);else{const ct=sN($,we);we=$[ct]}we=Ac(we,l,o);let rt=0;if(L){ce?rt=ve.current:rt=sN(M,we),i&&(we=Ac(we,M[rt-1]||-1/0,M[rt+1]||1/0));const ct=we;we=oN({values:M,newValue:we,index:rt}),i&&ce||(rt=we.indexOf(ct),ve.current=rt)}return{newValue:we,activeIndex:rt}},De=$r(ge=>{const ce=bg(ge,v);if(!ce)return;if(R.current+=1,ge.type==="mousemove"&&ge.buttons===0){ft(ge);return}const{newValue:Ie,activeIndex:ut}=Ee({finger:ce,move:!0});yg({sliderRef:ae,activeIndex:ut,setActive:S}),B(Ie),!w&&R.current>Vee&&N(!0),A&&!vg(Ie,T)&&A(ge,Ie,ut)}),ft=$r(ge=>{const ce=bg(ge,v);if(N(!1),!ce)return;const{newValue:Ie}=Ee({finger:ce,move:!0});S(-1),ge.type==="touchend"&&x(-1),d&&d(ge,Ie),v.current=void 0,mt()}),yt=$r(ge=>{if(r)return;lN()||ge.preventDefault();const ce=ge.changedTouches[0];ce!=null&&(v.current=ce.identifier);const Ie=bg(ge,v);if(Ie!==!1){const{newValue:ot,activeIndex:ke}=Ee({finger:Ie});yg({sliderRef:ae,activeIndex:ke,setActive:S}),B(ot),A&&!vg(ot,T)&&A(ge,ot,ke)}R.current=0;const ut=hr(ae.current);ut.addEventListener("touchmove",De,{passive:!0}),ut.addEventListener("touchend",ft,{passive:!0})}),mt=P.useCallback(()=>{const ge=hr(ae.current);ge.removeEventListener("mousemove",De),ge.removeEventListener("mouseup",ft),ge.removeEventListener("touchmove",De),ge.removeEventListener("touchend",ft)},[ft,De]);P.useEffect(()=>{const{current:ge}=ae;return ge.addEventListener("touchstart",yt,{passive:lN()}),()=>{ge.removeEventListener("touchstart",yt),mt()}},[mt,yt]),P.useEffect(()=>{r&&mt()},[r,mt]);const nn=ge=>ce=>{var Ie;if((Ie=ge.onMouseDown)==null||Ie.call(ge,ce),r||ce.defaultPrevented||ce.button!==0)return;ce.preventDefault();const ut=bg(ce,v);if(ut!==!1){const{newValue:ke,activeIndex:lt}=Ee({finger:ut});yg({sliderRef:ae,activeIndex:lt,setActive:S}),B(ke),A&&!vg(ke,T)&&A(ce,ke,lt)}R.current=0;const ot=hr(ae.current);ot.addEventListener("mousemove",De,{passive:!0}),ot.addEventListener("mouseup",ft)},tt=ib(L?M[0]:l,l,o),dt=ib(M[M.length-1],l,o)-tt,on=(ge={})=>{const ce=zc(ge),Ie={onMouseDown:nn(ce||{})},ut=I({},ce,Ie);return I({},ge,{ref:le},ut)},qt=ge=>ce=>{var Ie;(Ie=ge.onMouseOver)==null||Ie.call(ge,ce);const ut=Number(ce.currentTarget.getAttribute("data-index"));x(ut)},st=ge=>ce=>{var Ie;(Ie=ge.onMouseLeave)==null||Ie.call(ge,ce),x(-1)};return{active:E,axis:he,axisProps:Qee,dragging:w,focusedThumbIndex:pe,getHiddenInputProps:(ge={})=>{var ce;const Ie=zc(ge),ut={onChange:ie(Ie||{}),onFocus:H(Ie||{}),onBlur:Z(Ie||{}),onKeyDown:se(Ie||{})},ot=I({},Ie,ut);return I({tabIndex:b,"aria-labelledby":e,"aria-orientation":p,"aria-valuemax":h(o),"aria-valuemin":h(l),name:c,type:"range",min:t.min,max:t.max,step:t.step===null&&t.marks?"any":(ce=t.step)!=null?ce:void 0,disabled:r},ge,ot,{style:I({},rW,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:on,getThumbProps:(ge={})=>{const ce=zc(ge),Ie={onMouseOver:qt(ce||{}),onMouseLeave:st(ce||{})};return I({},ge,ce,Ie)},marks:O,open:k,range:L,rootRef:le,trackLeap:dt,trackOffset:tt,values:M,getThumbStyle:ge=>({pointerEvents:E!==-1&&E!==ge?"none":void 0})}}const Jee=t=>!t||!Rl(t);function ete(t){return wt("MuiSlider",t)}const Da=Nt("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),tte=t=>{const{open:e}=t;return{offset:$e(e&&Da.valueLabelOpen),circle:Da.valueLabelCircle,label:Da.valueLabelLabel}};function nte(t){const{children:e,className:n,value:r}=t,i=tte(t);return e?P.cloneElement(e,{className:$e(e.props.className)},f.jsxs(P.Fragment,{children:[e.props.children,f.jsx("span",{className:$e(i.offset,n),"aria-hidden":!0,children:f.jsx("span",{className:i.circle,children:f.jsx("span",{className:i.label,children:r})})})]})):null}const rte=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function cN(t){return t}const ite=Re("span",{name:"MuiSlider",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`color${Ne(n.color)}`],n.size!=="medium"&&e[`size${Ne(n.size)}`],n.marked&&e.marked,n.orientation==="vertical"&&e.vertical,n.track==="inverted"&&e.trackInverted,n.track===!1&&e.trackFalse]}})(({theme:t})=>{var e;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Da.disabled}`]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},[`&.${Da.dragging}`]:{[`& .${Da.thumb}, & .${Da.track}`]:{transition:"none"}},variants:[...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{color:(t.vars||t).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),ate=Re("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(t,e)=>e.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),ste=Re("span",{name:"MuiSlider",slot:"Track",overridesResolver:(t,e)=>e.track})(({theme:t})=>{var e;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:I({},t.vars?{backgroundColor:t.vars.palette.Slider[`${n}Track`],borderColor:t.vars.palette.Slider[`${n}Track`]}:I({backgroundColor:zt.lighten(t.palette[n].main,.62),borderColor:zt.lighten(t.palette[n].main,.62)},t.applyStyles("dark",{backgroundColor:zt.darken(t.palette[n].main,.5)}),t.applyStyles("dark",{borderColor:zt.darken(t.palette[n].main,.5)})))}))]}}),ote=Re("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.thumb,e[`thumbColor${Ne(n.color)}`],n.size!=="medium"&&e[`thumbSize${Ne(n.size)}`]]}})(({theme:t})=>{var e;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Da.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((e=t.vars)!=null?e:t).palette).filter(n=>{var r;return((r=t.vars)!=null?r:t).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${Da.focusVisible}`]:I({},t.vars?{boxShadow:`0px 0px 0px 8px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${zt.alpha(t.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${Da.active}`]:I({},t.vars?{boxShadow:`0px 0px 0px 14px rgba(${t.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 14px ${zt.alpha(t.palette[n].main,.16)}`})}}))]}}),lte=Re(nte,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(t,e)=>e.valueLabel})(({theme:t})=>I({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Da.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Da.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),cte=Re("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:t=>cy(t)&&t!=="markActive",overridesResolver:(t,e)=>{const{markActive:n}=t;return[e.mark,n&&e.markActive]}})(({theme:t})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]})),ute=Re("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:t=>cy(t)&&t!=="markLabelActive",overridesResolver:(t,e)=>e.markLabel})(({theme:t})=>I({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})),dte=t=>{const{disabled:e,dragging:n,marked:r,orientation:i,track:a,classes:s,color:o,size:l}=t,c={root:["root",e&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",a==="inverted"&&"trackInverted",a===!1&&"trackFalse",o&&`color${Ne(o)}`,l&&`size${Ne(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",e&&"disabled",l&&`thumbSize${Ne(l)}`,o&&`thumbColor${Ne(o)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Rt(c,ete,s)},pte=({children:t})=>t,fte=P.forwardRef(function(e,n){var r,i,a,s,o,l,c,u,d,p,m,h,g,_,b,y,v,E,S,k,x,w,N,R;const T=Dt({props:e,name:"MuiSlider"}),B=Th(),{"aria-label":A,"aria-valuetext":L,"aria-labelledby":M,component:O="span",components:$={},componentsProps:z={},color:X="primary",classes:W,className:te,disableSwap:pe=!1,disabled:ye=!1,getAriaLabel:ae,getAriaValueText:oe,marks:le=!1,max:H=100,min:Z=0,orientation:ee="horizontal",shiftStep:se=10,size:ie="medium",step:ve=1,scale:he=cN,slotProps:Ee,slots:De,track:ft="normal",valueLabelDisplay:yt="off",valueLabelFormat:mt=cN}=T,nn=Be(T,rte),tt=I({},T,{isRtl:B,max:H,min:Z,classes:W,disabled:ye,disableSwap:pe,orientation:ee,marks:le,color:X,size:ie,step:ve,shiftStep:se,scale:he,track:ft,valueLabelDisplay:yt,valueLabelFormat:mt}),{axisProps:dt,getRootProps:on,getHiddenInputProps:qt,getThumbProps:st,open:Wt,active:Bt,axis:Gt,focusedThumbIndex:ge,range:ce,dragging:Ie,marks:ut,values:ot,trackOffset:ke,trackLeap:lt,getThumbStyle:xe}=Zee(I({},tt,{rootRef:n}));tt.marked=ut.length>0&&ut.some(hn=>hn.label),tt.dragging=Ie,tt.focusedThumbIndex=ge;const we=dte(tt),rt=(r=(i=De?.root)!=null?i:$.Root)!=null?r:ite,ct=(a=(s=De?.rail)!=null?s:$.Rail)!=null?a:ate,It=(o=(l=De?.track)!=null?l:$.Track)!=null?o:ste,Ke=(c=(u=De?.thumb)!=null?u:$.Thumb)!=null?c:ote,un=(d=(p=De?.valueLabel)!=null?p:$.ValueLabel)!=null?d:lte,rn=(m=(h=De?.mark)!=null?h:$.Mark)!=null?m:cte,ln=(g=(_=De?.markLabel)!=null?_:$.MarkLabel)!=null?g:ute,V=(b=(y=De?.input)!=null?y:$.Input)!=null?b:"input",_e=(v=Ee?.root)!=null?v:z.root,Pe=(E=Ee?.rail)!=null?E:z.rail,j=(S=Ee?.track)!=null?S:z.track,fe=(k=Ee?.thumb)!=null?k:z.thumb,U=(x=Ee?.valueLabel)!=null?x:z.valueLabel,Q=(w=Ee?.mark)!=null?w:z.mark,ne=(N=Ee?.markLabel)!=null?N:z.markLabel,ue=(R=Ee?.input)!=null?R:z.input,ze=Nr({elementType:rt,getSlotProps:on,externalSlotProps:_e,externalForwardedProps:nn,additionalProps:I({},Jee(rt)&&{as:O}),ownerState:I({},tt,_e?.ownerState),className:[we.root,te]}),Ye=Nr({elementType:ct,externalSlotProps:Pe,ownerState:tt,className:we.rail}),Ct=Nr({elementType:It,externalSlotProps:j,additionalProps:{style:I({},dt[Gt].offset(ke),dt[Gt].leap(lt))},ownerState:I({},tt,j?.ownerState),className:we.track}),$t=Nr({elementType:Ke,getSlotProps:st,externalSlotProps:fe,ownerState:I({},tt,fe?.ownerState),className:we.thumb}),nr=Nr({elementType:un,externalSlotProps:U,ownerState:I({},tt,U?.ownerState),className:we.valueLabel}),ir=Nr({elementType:rn,externalSlotProps:Q,ownerState:tt,className:we.mark}),Er=Nr({elementType:ln,externalSlotProps:ne,ownerState:tt,className:we.markLabel}),bi=Nr({elementType:V,getSlotProps:qt,externalSlotProps:ue,ownerState:tt});return f.jsxs(rt,I({},ze,{children:[f.jsx(ct,I({},Ye)),f.jsx(It,I({},Ct)),ut.filter(hn=>hn.value>=Z&&hn.value<=H).map((hn,an)=>{const Yi=ib(hn.value,Z,H),ni=dt[Gt].offset(Yi);let Fr;return ft===!1?Fr=ot.indexOf(hn.value)!==-1:Fr=ft==="normal"&&(ce?hn.value>=ot[0]&&hn.value<=ot[ot.length-1]:hn.value<=ot[0])||ft==="inverted"&&(ce?hn.value<=ot[0]||hn.value>=ot[ot.length-1]:hn.value>=ot[0]),f.jsxs(P.Fragment,{children:[f.jsx(rn,I({"data-index":an},ir,!Rl(rn)&&{markActive:Fr},{style:I({},ni,ir.style),className:$e(ir.className,Fr&&we.markActive)})),hn.label!=null?f.jsx(ln,I({"aria-hidden":!0,"data-index":an},Er,!Rl(ln)&&{markLabelActive:Fr},{style:I({},ni,Er.style),className:$e(we.markLabel,Er.className,Fr&&we.markLabelActive),children:hn.label})):null]},an)}),ot.map((hn,an)=>{const Yi=ib(hn,Z,H),ni=dt[Gt].offset(Yi),Fr=yt==="off"?pte:un;return f.jsx(Fr,I({},!Rl(Fr)&&{valueLabelFormat:mt,valueLabelDisplay:yt,value:typeof mt=="function"?mt(he(hn),an):mt,index:an,open:Wt===an||Bt===an||yt==="on",disabled:ye},nr,{children:f.jsx(Ke,I({"data-index":an},$t,{className:$e(we.thumb,$t.className,Bt===an&&we.active,ge===an&&we.focusVisible),style:I({},ni,xe(an),$t.style),children:f.jsx(V,I({"data-index":an,"aria-label":ae?ae(an):A,"aria-valuenow":he(hn),"aria-labelledby":M,"aria-valuetext":oe?oe(he(hn),an):L,value:ot[an]},bi))}))}),an)})]}))});function mte(t={}){const{autoHideDuration:e=null,disableWindowBlurListener:n=!1,onClose:r,open:i,resumeHideDuration:a}=t,s=Dl();P.useEffect(()=>{if(!i)return;function b(y){y.defaultPrevented||(y.key==="Escape"||y.key==="Esc")&&r?.(y,"escapeKeyDown")}return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[i,r]);const o=$r((b,y)=>{r?.(b,y)}),l=$r(b=>{!r||b==null||s.start(b,()=>{o(null,"timeout")})});P.useEffect(()=>(i&&l(e),s.clear),[i,e,l,s]);const c=b=>{r?.(b,"clickaway")},u=s.clear,d=P.useCallback(()=>{e!=null&&l(a??e*.5)},[e,a,l]),p=b=>y=>{const v=b.onBlur;v?.(y),d()},m=b=>y=>{const v=b.onFocus;v?.(y),u()},h=b=>y=>{const v=b.onMouseEnter;v?.(y),u()},g=b=>y=>{const v=b.onMouseLeave;v?.(y),d()};return P.useEffect(()=>{if(!n&&i)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,i,d,u]),{getRootProps:(b={})=>{const y=I({},zc(t),zc(b));return I({role:"presentation"},b,y,{onBlur:p(y),onFocus:m(y),onMouseEnter:h(y),onMouseLeave:g(y)})},onClickAway:c}}function hte(t){return wt("MuiSnackbarContent",t)}Nt("MuiSnackbarContent",["root","message","action"]);const gte=["action","className","message","role"],_te=t=>{const{classes:e}=t;return Rt({root:["root"],action:["action"],message:["message"]},hte,e)},bte=Re(gu,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(t,e)=>e.root})(({theme:t})=>{const e=t.palette.mode==="light"?.8:.98,n=zt.emphasize(t.palette.background.default,e);return I({},t.typography.body2,{color:t.vars?t.vars.palette.SnackbarContent.color:t.palette.getContrastText(n),backgroundColor:t.vars?t.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,flexGrow:1,[t.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),yte=Re("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(t,e)=>e.message})({padding:"8px 0"}),vte=Re("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(t,e)=>e.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),Ete=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiSnackbarContent"}),{action:i,className:a,message:s,role:o="alert"}=r,l=Be(r,gte),c=r,u=_te(c);return f.jsxs(bte,I({role:o,square:!0,elevation:6,className:$e(u.root,a),ownerState:c,ref:n},l,{children:[f.jsx(yte,{className:u.message,ownerState:c,children:s}),i?f.jsx(vte,{className:u.action,ownerState:c,children:i}):null]}))});function Ste(t){return wt("MuiSnackbar",t)}Nt("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const Tte=["onEnter","onExited"],Cte=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],xte=t=>{const{classes:e,anchorOrigin:n}=t,r={root:["root",`anchorOrigin${Ne(n.vertical)}${Ne(n.horizontal)}`]};return Rt(r,Ste,e)},uN=Re("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`anchorOrigin${Ne(n.anchorOrigin.vertical)}${Ne(n.anchorOrigin.horizontal)}`]]}})(({theme:t,ownerState:e})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return I({zIndex:(t.vars||t).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},e.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},e.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},e.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[t.breakpoints.up("sm")]:I({},e.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},e.anchorOrigin.horizontal==="center"&&n,e.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},e.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),kte=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiSnackbar"}),i=kr(),a={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:o,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:p,ContentProps:m,disableWindowBlurListener:h=!1,message:g,open:_,TransitionComponent:b=Im,transitionDuration:y=a,TransitionProps:{onEnter:v,onExited:E}={}}=r,S=Be(r.TransitionProps,Tte),k=Be(r,Cte),x=I({},r,{anchorOrigin:{vertical:o,horizontal:l},autoHideDuration:c,disableWindowBlurListener:h,TransitionComponent:b,transitionDuration:y}),w=xte(x),{getRootProps:N,onClickAway:R}=mte(I({},x)),[T,B]=P.useState(!0),A=Nr({elementType:uN,getSlotProps:N,externalForwardedProps:k,ownerState:x,additionalProps:{ref:n},className:[w.root,d]}),L=O=>{B(!0),E&&E(O)},M=(O,$)=>{B(!1),v&&v(O,$)};return!_&&T?null:f.jsx(zX,I({onClickAway:R},p,{children:f.jsx(uN,I({},A,{children:f.jsx(b,I({appear:!0,in:_,timeout:y,direction:o==="top"?"down":"up",onEnter:M,onExited:L},S,{children:u||f.jsx(Ete,I({message:g,action:s},m))}))}))}))});function wte(t){return wt("MuiTooltip",t)}const Al=Nt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),Dte=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function Ate(t){return Math.round(t*1e5)/1e5}const Nte=t=>{const{classes:e,disableInteractive:n,arrow:r,touch:i,placement:a}=t,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Ne(a.split("-")[0])}`],arrow:["arrow"]};return Rt(s,wte,e)},Rte=Re(l6,{name:"MuiTooltip",slot:"Popper",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.popper,!n.disableInteractive&&e.popperInteractive,n.arrow&&e.popperArrow,!n.open&&e.popperClose]}})(({theme:t,ownerState:e,open:n})=>I({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!e.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},e.arrow&&{[`&[data-popper-placement*="bottom"] .${Al.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Al.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Al.arrow}`]:I({},e.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${Al.arrow}`]:I({},e.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),Ite=Re("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.tooltip,n.touch&&e.touch,n.arrow&&e.tooltipArrow,e[`tooltipPlacement${Ne(n.placement.split("-")[0])}`]]}})(({theme:t,ownerState:e})=>I({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:zt.alpha(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},e.arrow&&{position:"relative",margin:0},e.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:`${Ate(16/14)}em`,fontWeight:t.typography.fontWeightRegular},{[`.${Al.popper}[data-popper-placement*="left"] &`]:I({transformOrigin:"right center"},e.isRtl?I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"}):I({marginRight:"14px"},e.touch&&{marginRight:"24px"})),[`.${Al.popper}[data-popper-placement*="right"] &`]:I({transformOrigin:"left center"},e.isRtl?I({marginRight:"14px"},e.touch&&{marginRight:"24px"}):I({marginLeft:"14px"},e.touch&&{marginLeft:"24px"})),[`.${Al.popper}[data-popper-placement*="top"] &`]:I({transformOrigin:"center bottom",marginBottom:"14px"},e.touch&&{marginBottom:"24px"}),[`.${Al.popper}[data-popper-placement*="bottom"] &`]:I({transformOrigin:"center top",marginTop:"14px"},e.touch&&{marginTop:"24px"})})),Ote=Re("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(t,e)=>e.arrow})(({theme:t})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:zt.alpha(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Sg=!1;const dN=new Sh;let cf={x:0,y:0};function Tg(t,e){return(n,...r)=>{e&&e(n,...r),t(n,...r)}}const Bn=P.forwardRef(function(e,n){var r,i,a,s,o,l,c,u,d,p,m,h,g,_,b,y,v,E,S;const k=Dt({props:e,name:"MuiTooltip"}),{arrow:x=!1,children:w,components:N={},componentsProps:R={},describeChild:T=!1,disableFocusListener:B=!1,disableHoverListener:A=!1,disableInteractive:L=!1,disableTouchListener:M=!1,enterDelay:O=100,enterNextDelay:$=0,enterTouchDelay:z=700,followCursor:X=!1,id:W,leaveDelay:te=0,leaveTouchDelay:pe=1500,onClose:ye,onOpen:ae,open:oe,placement:le="bottom",PopperComponent:H,PopperProps:Z={},slotProps:ee={},slots:se={},title:ie,TransitionComponent:ve=Im,TransitionProps:he}=k,Ee=Be(k,Dte),De=P.isValidElement(w)?w:f.jsx("span",{children:w}),ft=kr(),yt=Th(),[mt,nn]=P.useState(),[tt,dt]=P.useState(null),on=P.useRef(!1),qt=L||X,st=Dl(),Wt=Dl(),Bt=Dl(),Gt=Dl(),[ge,ce]=Q_({controlled:oe,default:!1,name:"Tooltip",state:"open"});let Ie=ge;const ut=Eh(W),ot=P.useRef(),ke=$r(()=>{ot.current!==void 0&&(document.body.style.WebkitUserSelect=ot.current,ot.current=void 0),Gt.clear()});P.useEffect(()=>ke,[ke]);const lt=jt=>{dN.clear(),Sg=!0,ce(!0),ae&&!Ie&&ae(jt)},xe=$r(jt=>{dN.start(800+te,()=>{Sg=!1}),ce(!1),ye&&Ie&&ye(jt),st.start(ft.transitions.duration.shortest,()=>{on.current=!1})}),we=jt=>{on.current&&jt.type!=="touchstart"||(mt&&mt.removeAttribute("title"),Wt.clear(),Bt.clear(),O||Sg&&$?Wt.start(Sg?$:O,()=>{lt(jt)}):lt(jt))},rt=jt=>{Wt.clear(),Bt.start(te,()=>{xe(jt)})},{isFocusVisibleRef:ct,onBlur:It,onFocus:Ke,ref:un}=ly(),[,rn]=P.useState(!1),ln=jt=>{It(jt),ct.current===!1&&(rn(!1),rt(jt))},V=jt=>{mt||nn(jt.currentTarget),Ke(jt),ct.current===!0&&(rn(!0),we(jt))},_e=jt=>{on.current=!0;const Dr=De.props;Dr.onTouchStart&&Dr.onTouchStart(jt)},Pe=jt=>{_e(jt),Bt.clear(),st.clear(),ke(),ot.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Gt.start(z,()=>{document.body.style.WebkitUserSelect=ot.current,we(jt)})},j=jt=>{De.props.onTouchEnd&&De.props.onTouchEnd(jt),ke(),Bt.start(pe,()=>{xe(jt)})};P.useEffect(()=>{if(!Ie)return;function jt(Dr){(Dr.key==="Escape"||Dr.key==="Esc")&&xe(Dr)}return document.addEventListener("keydown",jt),()=>{document.removeEventListener("keydown",jt)}},[xe,Ie]);const fe=er(hu(De),un,nn,n);!ie&&ie!==0&&(Ie=!1);const U=P.useRef(),Q=jt=>{const Dr=De.props;Dr.onMouseMove&&Dr.onMouseMove(jt),cf={x:jt.clientX,y:jt.clientY},U.current&&U.current.update()},ne={},ue=typeof ie=="string";T?(ne.title=!Ie&&ue&&!A?ie:null,ne["aria-describedby"]=Ie?ut:null):(ne["aria-label"]=ue?ie:null,ne["aria-labelledby"]=Ie&&!ue?ut:null);const ze=I({},ne,Ee,De.props,{className:$e(Ee.className,De.props.className),onTouchStart:_e,ref:fe},X?{onMouseMove:Q}:{}),Ye={};M||(ze.onTouchStart=Pe,ze.onTouchEnd=j),A||(ze.onMouseOver=Tg(we,ze.onMouseOver),ze.onMouseLeave=Tg(rt,ze.onMouseLeave),qt||(Ye.onMouseOver=we,Ye.onMouseLeave=rt)),B||(ze.onFocus=Tg(V,ze.onFocus),ze.onBlur=Tg(ln,ze.onBlur),qt||(Ye.onFocus=V,Ye.onBlur=ln));const Ct=P.useMemo(()=>{var jt;let Dr=[{name:"arrow",enabled:!!tt,options:{element:tt,padding:4}}];return(jt=Z.popperOptions)!=null&&jt.modifiers&&(Dr=Dr.concat(Z.popperOptions.modifiers)),I({},Z.popperOptions,{modifiers:Dr})},[tt,Z]),$t=I({},k,{isRtl:yt,arrow:x,disableInteractive:qt,placement:le,PopperComponentProp:H,touch:on.current}),nr=Nte($t),ir=(r=(i=se.popper)!=null?i:N.Popper)!=null?r:Rte,Er=(a=(s=(o=se.transition)!=null?o:N.Transition)!=null?s:ve)!=null?a:Im,bi=(l=(c=se.tooltip)!=null?c:N.Tooltip)!=null?l:Ite,hn=(u=(d=se.arrow)!=null?d:N.Arrow)!=null?u:Ote,an=Sd(ir,I({},Z,(p=ee.popper)!=null?p:R.popper,{className:$e(nr.popper,Z?.className,(m=(h=ee.popper)!=null?h:R.popper)==null?void 0:m.className)}),$t),Yi=Sd(Er,I({},he,(g=ee.transition)!=null?g:R.transition),$t),ni=Sd(bi,I({},(_=ee.tooltip)!=null?_:R.tooltip,{className:$e(nr.tooltip,(b=(y=ee.tooltip)!=null?y:R.tooltip)==null?void 0:b.className)}),$t),Fr=Sd(hn,I({},(v=ee.arrow)!=null?v:R.arrow,{className:$e(nr.arrow,(E=(S=ee.arrow)!=null?S:R.arrow)==null?void 0:E.className)}),$t);return f.jsxs(P.Fragment,{children:[P.cloneElement(De,ze),f.jsx(ir,I({as:H??l6,placement:le,anchorEl:X?{getBoundingClientRect:()=>({top:cf.y,left:cf.x,right:cf.x,bottom:cf.y,width:0,height:0})}:mt,popperRef:U,open:mt?Ie:!1,id:ut,transition:!0},Ye,an,{popperOptions:Ct,children:({TransitionProps:jt})=>f.jsx(Er,I({timeout:ft.transitions.duration.shorter},jt,Yi,{children:f.jsxs(bi,I({},ni,{children:[ie,x?f.jsx(hn,I({},Fr,{ref:dt})):null]}))}))}))]})});function Pte(t){return wt("MuiTab",t)}const pl=Nt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Lte=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],Mte=t=>{const{classes:e,textColor:n,fullWidth:r,wrapped:i,icon:a,label:s,selected:o,disabled:l}=t,c={root:["root",a&&s&&"labelIcon",`textColor${Ne(n)}`,r&&"fullWidth",i&&"wrapped",o&&"selected",l&&"disabled"],iconWrapper:["iconWrapper"]};return Rt(c,Pte,e)},Fte=Re(Oa,{name:"MuiTab",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.label&&n.icon&&e.labelIcon,e[`textColor${Ne(n.textColor)}`],n.fullWidth&&e.fullWidth,n.wrapped&&e.wrapped,{[`& .${pl.iconWrapper}`]:e.iconWrapper}]}})(({theme:t,ownerState:e})=>I({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},e.label&&{flexDirection:e.iconPosition==="top"||e.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},e.icon&&e.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${pl.iconWrapper}`]:I({},e.iconPosition==="top"&&{marginBottom:6},e.iconPosition==="bottom"&&{marginTop:6},e.iconPosition==="start"&&{marginRight:t.spacing(1)},e.iconPosition==="end"&&{marginLeft:t.spacing(1)})},e.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${pl.selected}`]:{opacity:1},[`&.${pl.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${pl.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${pl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${pl.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${pl.disabled}`]:{color:(t.vars||t).palette.text.disabled}},e.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},e.wrapped&&{fontSize:t.typography.pxToRem(12)})),Oc=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTab"}),{className:i,disabled:a=!1,disableFocusRipple:s=!1,fullWidth:o,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:p,onClick:m,onFocus:h,selected:g,selectionFollowsFocus:_,textColor:b="inherit",value:y,wrapped:v=!1}=r,E=Be(r,Lte),S=I({},r,{disabled:a,disableFocusRipple:s,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:o,textColor:b,wrapped:v}),k=Mte(S),x=l&&d&&P.isValidElement(l)?P.cloneElement(l,{className:$e(k.iconWrapper,l.props.className)}):l,w=R=>{!g&&p&&p(R,y),m&&m(R)},N=R=>{_&&!g&&p&&p(R,y),h&&h(R)};return f.jsxs(Fte,I({focusRipple:!s,className:$e(k.root,i),ref:n,role:"tab","aria-selected":g,disabled:a,onClick:w,onFocus:N,ownerState:S,tabIndex:g?0:-1},E,{children:[c==="top"||c==="start"?f.jsxs(P.Fragment,{children:[x,d]}):f.jsxs(P.Fragment,{children:[d,x]}),u]}))}),Bte=nt(f.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Ute=nt(f.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function $te(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function zte(t,e,n,r={},i=()=>{}){const{ease:a=$te,duration:s=300}=r;let o=null;const l=e[t];let c=!1;const u=()=>{c=!0},d=p=>{if(c){i(new Error("Animation cancelled"));return}o===null&&(o=p);const m=Math.min(1,(p-o)/s);if(e[t]=a(m)*(n-l)+l,m>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return l===n?(i(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const qte=["onChange"],Gte={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function jte(t){const{onChange:e}=t,n=Be(t,qte),r=P.useRef(),i=P.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return zi(()=>{const s=sy(()=>{const l=r.current;a(),l!==r.current&&e(r.current)}),o=Lo(i.current);return o.addEventListener("resize",s),()=>{s.clear(),o.removeEventListener("resize",s)}},[e]),P.useEffect(()=>{a(),e(r.current)},[e]),f.jsx("div",I({style:Gte},n,{ref:i}))}function Hte(t){return wt("MuiTabScrollButton",t)}const Vte=Nt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),Wte=["className","slots","slotProps","direction","orientation","disabled"],Yte=t=>{const{classes:e,orientation:n,disabled:r}=t;return Rt({root:["root",n,r&&"disabled"]},Hte,e)},Kte=Re(Oa,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.orientation&&e[n.orientation]]}})(({ownerState:t})=>I({width:40,flexShrink:0,opacity:.8,[`&.${Vte.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),Qte=P.forwardRef(function(e,n){var r,i;const a=Dt({props:e,name:"MuiTabScrollButton"}),{className:s,slots:o={},slotProps:l={},direction:c}=a,u=Be(a,Wte),d=Th(),p=I({isRtl:d},a),m=Yte(p),h=(r=o.StartScrollButtonIcon)!=null?r:Bte,g=(i=o.EndScrollButtonIcon)!=null?i:Ute,_=Nr({elementType:h,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p}),b=Nr({elementType:g,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:p});return f.jsx(Kte,I({component:"div",className:$e(m.root,s),ref:n,role:null,ownerState:p,tabIndex:null},u,{children:c==="left"?f.jsx(h,I({},_)):f.jsx(g,I({},b))}))});function Xte(t){return wt("MuiTabs",t)}const Uv=Nt("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Zte=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],pN=(t,e)=>t===e?t.firstChild:e&&e.nextElementSibling?e.nextElementSibling:t.firstChild,fN=(t,e)=>t===e?t.lastChild:e&&e.previousElementSibling?e.previousElementSibling:t.lastChild,Cg=(t,e,n)=>{let r=!1,i=n(t,e);for(;i;){if(i===t.firstChild){if(r)return;r=!0}const a=i.disabled||i.getAttribute("aria-disabled")==="true";if(!i.hasAttribute("tabindex")||a)i=n(t,i);else{i.focus();return}}},Jte=t=>{const{vertical:e,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:s,scrollButtonsHideMobile:o,classes:l}=t;return Rt({root:["root",e&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",a&&"scrollableY"],flexContainer:["flexContainer",e&&"flexContainerVertical",s&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",o&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},Xte,l)},ene=Re("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${Uv.scrollButtons}`]:e.scrollButtons},{[`& .${Uv.scrollButtons}`]:n.scrollButtonsHideMobile&&e.scrollButtonsHideMobile},e.root,n.vertical&&e.vertical]}})(({ownerState:t,theme:e})=>I({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${Uv.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}})),tne=Re("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.scroller,n.fixed&&e.fixed,n.hideScrollbar&&e.hideScrollbar,n.scrollableX&&e.scrollableX,n.scrollableY&&e.scrollableY]}})(({ownerState:t})=>I({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),nne=Re("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.flexContainer,n.vertical&&e.flexContainerVertical,n.centered&&e.centered]}})(({ownerState:t})=>I({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),rne=Re("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,e)=>e.indicator})(({ownerState:t,theme:e})=>I({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(e.vars||e).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(e.vars||e).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),ine=Re(jte)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),mN={},v6=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTabs"}),i=kr(),a=Th(),{"aria-label":s,"aria-labelledby":o,action:l,centered:c=!1,children:u,className:d,component:p="div",allowScrollButtonsMobile:m=!1,indicatorColor:h="primary",onChange:g,orientation:_="horizontal",ScrollButtonComponent:b=Qte,scrollButtons:y="auto",selectionFollowsFocus:v,slots:E={},slotProps:S={},TabIndicatorProps:k={},TabScrollButtonProps:x={},textColor:w="primary",value:N,variant:R="standard",visibleScrollbar:T=!1}=r,B=Be(r,Zte),A=R==="scrollable",L=_==="vertical",M=L?"scrollTop":"scrollLeft",O=L?"top":"left",$=L?"bottom":"right",z=L?"clientHeight":"clientWidth",X=L?"height":"width",W=I({},r,{component:p,allowScrollButtonsMobile:m,indicatorColor:h,orientation:_,vertical:L,scrollButtons:y,textColor:w,variant:R,visibleScrollbar:T,fixed:!A,hideScrollbar:A&&!T,scrollableX:A&&!L,scrollableY:A&&L,centered:c&&!A,scrollButtonsHideMobile:!m}),te=Jte(W),pe=Nr({elementType:E.StartScrollButtonIcon,externalSlotProps:S.startScrollButtonIcon,ownerState:W}),ye=Nr({elementType:E.EndScrollButtonIcon,externalSlotProps:S.endScrollButtonIcon,ownerState:W}),[ae,oe]=P.useState(!1),[le,H]=P.useState(mN),[Z,ee]=P.useState(!1),[se,ie]=P.useState(!1),[ve,he]=P.useState(!1),[Ee,De]=P.useState({overflow:"hidden",scrollbarWidth:0}),ft=new Map,yt=P.useRef(null),mt=P.useRef(null),nn=()=>{const xe=yt.current;let we;if(xe){const ct=xe.getBoundingClientRect();we={clientWidth:xe.clientWidth,scrollLeft:xe.scrollLeft,scrollTop:xe.scrollTop,scrollLeftNormalized:tW(xe,a?"rtl":"ltr"),scrollWidth:xe.scrollWidth,top:ct.top,bottom:ct.bottom,left:ct.left,right:ct.right}}let rt;if(xe&&N!==!1){const ct=mt.current.children;if(ct.length>0){const It=ct[ft.get(N)];rt=It?It.getBoundingClientRect():null}}return{tabsMeta:we,tabMeta:rt}},tt=$r(()=>{const{tabsMeta:xe,tabMeta:we}=nn();let rt=0,ct;if(L)ct="top",we&&xe&&(rt=we.top-xe.top+xe.scrollTop);else if(ct=a?"right":"left",we&&xe){const Ke=a?xe.scrollLeftNormalized+xe.clientWidth-xe.scrollWidth:xe.scrollLeft;rt=(a?-1:1)*(we[ct]-xe[ct]+Ke)}const It={[ct]:rt,[X]:we?we[X]:0};if(isNaN(le[ct])||isNaN(le[X]))H(It);else{const Ke=Math.abs(le[ct]-It[ct]),un=Math.abs(le[X]-It[X]);(Ke>=1||un>=1)&&H(It)}}),dt=(xe,{animation:we=!0}={})=>{we?zte(M,yt.current,xe,{duration:i.transitions.duration.standard}):yt.current[M]=xe},on=xe=>{let we=yt.current[M];L?we+=xe:(we+=xe*(a?-1:1),we*=a&&B4()==="reverse"?-1:1),dt(we)},qt=()=>{const xe=yt.current[z];let we=0;const rt=Array.from(mt.current.children);for(let ct=0;ct<rt.length;ct+=1){const It=rt[ct];if(we+It[z]>xe){ct===0&&(we=xe);break}we+=It[z]}return we},st=()=>{on(-1*qt())},Wt=()=>{on(qt())},Bt=P.useCallback(xe=>{De({overflow:null,scrollbarWidth:xe})},[]),Gt=()=>{const xe={};xe.scrollbarSizeListener=A?f.jsx(ine,{onChange:Bt,className:$e(te.scrollableX,te.hideScrollbar)}):null;const rt=A&&(y==="auto"&&(Z||se)||y===!0);return xe.scrollButtonStart=rt?f.jsx(b,I({slots:{StartScrollButtonIcon:E.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:pe},orientation:_,direction:a?"right":"left",onClick:st,disabled:!Z},x,{className:$e(te.scrollButtons,x.className)})):null,xe.scrollButtonEnd=rt?f.jsx(b,I({slots:{EndScrollButtonIcon:E.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ye},orientation:_,direction:a?"left":"right",onClick:Wt,disabled:!se},x,{className:$e(te.scrollButtons,x.className)})):null,xe},ge=$r(xe=>{const{tabsMeta:we,tabMeta:rt}=nn();if(!(!rt||!we)){if(rt[O]<we[O]){const ct=we[M]+(rt[O]-we[O]);dt(ct,{animation:xe})}else if(rt[$]>we[$]){const ct=we[M]+(rt[$]-we[$]);dt(ct,{animation:xe})}}}),ce=$r(()=>{A&&y!==!1&&he(!ve)});P.useEffect(()=>{const xe=sy(()=>{yt.current&&tt()});let we;const rt=Ke=>{Ke.forEach(un=>{un.removedNodes.forEach(rn=>{var ln;(ln=we)==null||ln.unobserve(rn)}),un.addedNodes.forEach(rn=>{var ln;(ln=we)==null||ln.observe(rn)})}),xe(),ce()},ct=Lo(yt.current);ct.addEventListener("resize",xe);let It;return typeof ResizeObserver<"u"&&(we=new ResizeObserver(xe),Array.from(mt.current.children).forEach(Ke=>{we.observe(Ke)})),typeof MutationObserver<"u"&&(It=new MutationObserver(rt),It.observe(mt.current,{childList:!0})),()=>{var Ke,un;xe.clear(),ct.removeEventListener("resize",xe),(Ke=It)==null||Ke.disconnect(),(un=we)==null||un.disconnect()}},[tt,ce]),P.useEffect(()=>{const xe=Array.from(mt.current.children),we=xe.length;if(typeof IntersectionObserver<"u"&&we>0&&A&&y!==!1){const rt=xe[0],ct=xe[we-1],It={root:yt.current,threshold:.99},Ke=V=>{ee(!V[0].isIntersecting)},un=new IntersectionObserver(Ke,It);un.observe(rt);const rn=V=>{ie(!V[0].isIntersecting)},ln=new IntersectionObserver(rn,It);return ln.observe(ct),()=>{un.disconnect(),ln.disconnect()}}},[A,y,ve,u?.length]),P.useEffect(()=>{oe(!0)},[]),P.useEffect(()=>{tt()}),P.useEffect(()=>{ge(mN!==le)},[ge,le]),P.useImperativeHandle(l,()=>({updateIndicator:tt,updateScrollButtons:ce}),[tt,ce]);const Ie=f.jsx(rne,I({},k,{className:$e(te.indicator,k.className),ownerState:W,style:I({},le,k.style)}));let ut=0;const ot=P.Children.map(u,xe=>{if(!P.isValidElement(xe))return null;const we=xe.props.value===void 0?ut:xe.props.value;ft.set(we,ut);const rt=we===N;return ut+=1,P.cloneElement(xe,I({fullWidth:R==="fullWidth",indicator:rt&&!ae&&Ie,selected:rt,selectionFollowsFocus:v,onChange:g,textColor:w,value:we},ut===1&&N===!1&&!xe.props.tabIndex?{tabIndex:0}:{}))}),ke=xe=>{const we=mt.current,rt=hr(we).activeElement;if(rt.getAttribute("role")!=="tab")return;let It=_==="horizontal"?"ArrowLeft":"ArrowUp",Ke=_==="horizontal"?"ArrowRight":"ArrowDown";switch(_==="horizontal"&&a&&(It="ArrowRight",Ke="ArrowLeft"),xe.key){case It:xe.preventDefault(),Cg(we,rt,fN);break;case Ke:xe.preventDefault(),Cg(we,rt,pN);break;case"Home":xe.preventDefault(),Cg(we,null,pN);break;case"End":xe.preventDefault(),Cg(we,null,fN);break}},lt=Gt();return f.jsxs(ene,I({className:$e(te.root,d),ownerState:W,ref:n,as:p},B,{children:[lt.scrollButtonStart,lt.scrollbarSizeListener,f.jsxs(tne,{className:te.scroller,ownerState:W,style:{overflow:Ee.overflow,[L?`margin${a?"Left":"Right"}`:"marginBottom"]:T?void 0:-Ee.scrollbarWidth},ref:yt,children:[f.jsx(nne,{"aria-label":s,"aria-labelledby":o,"aria-orientation":_==="vertical"?"vertical":null,className:te.flexContainer,ownerState:W,onKeyDown:ke,ref:mt,role:"tablist",children:ot}),ae&&Ie]}),lt.scrollButtonEnd]}))});function ane(t){return wt("MuiTextField",t)}Nt("MuiTextField",["root"]);const sne=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],one={standard:zk,filled:$k,outlined:jk},lne=t=>{const{classes:e}=t;return Rt({root:["root"]},ane,e)},cne=Re(eJ,{name:"MuiTextField",slot:"Root",overridesResolver:(t,e)=>e.root})({}),wh=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:a=!1,children:s,className:o,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:p,fullWidth:m=!1,helperText:h,id:g,InputLabelProps:_,inputProps:b,InputProps:y,inputRef:v,label:E,maxRows:S,minRows:k,multiline:x=!1,name:w,onBlur:N,onChange:R,onFocus:T,placeholder:B,required:A=!1,rows:L,select:M=!1,SelectProps:O,type:$,value:z,variant:X="outlined"}=r,W=Be(r,sne),te=I({},r,{autoFocus:a,color:l,disabled:u,error:d,fullWidth:m,multiline:x,required:A,select:M,variant:X}),pe=lne(te),ye={};X==="outlined"&&(_&&typeof _.shrink<"u"&&(ye.notched=_.shrink),ye.label=E),M&&((!O||!O.native)&&(ye.id=void 0),ye["aria-describedby"]=void 0);const ae=Eh(g),oe=h&&ae?`${ae}-helper-text`:void 0,le=E&&ae?`${ae}-label`:void 0,H=one[X],Z=f.jsx(H,I({"aria-describedby":oe,autoComplete:i,autoFocus:a,defaultValue:c,fullWidth:m,multiline:x,name:w,rows:L,maxRows:S,minRows:k,type:$,value:z,id:ae,inputRef:v,onBlur:N,onChange:R,onFocus:T,placeholder:B,inputProps:b},ye,y));return f.jsxs(cne,I({className:$e(pe.root,o),disabled:u,error:d,fullWidth:m,ref:n,required:A,color:l,variant:X,ownerState:te},W,{children:[E!=null&&E!==""&&f.jsx(SJ,I({htmlFor:ae,id:le},_,{children:E})),M?f.jsx(Vk,I({"aria-describedby":oe,id:ae,labelId:le,value:z,input:Z},O,{children:s})):Z,h&&f.jsx(aJ,I({id:oe},p,{children:h}))]}))});function une(t){return wt("MuiToggleButton",t)}const Td=Nt("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),E6=P.createContext({}),S6=P.createContext(void 0);function dne(t,e){return e===void 0||t===void 0?!1:Array.isArray(e)?e.indexOf(t)>=0:t===e}const pne=["value"],fne=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],mne=t=>{const{classes:e,fullWidth:n,selected:r,disabled:i,size:a,color:s}=t,o={root:["root",r&&"selected",i&&"disabled",n&&"fullWidth",`size${Ne(a)}`,s]};return Rt(o,une,e)},hne=Re(Oa,{name:"MuiToggleButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,e[`size${Ne(n.size)}`]]}})(({theme:t,ownerState:e})=>{let n=e.color==="standard"?t.palette.text.primary:t.palette[e.color].main,r;return t.vars&&(n=e.color==="standard"?t.vars.palette.text.primary:t.vars.palette[e.color].main,r=e.color==="standard"?t.vars.palette.text.primaryChannel:t.vars.palette[e.color].mainChannel),I({},t.typography.button,{borderRadius:(t.vars||t).shape.borderRadius,padding:11,border:`1px solid ${(t.vars||t).palette.divider}`,color:(t.vars||t).palette.action.active},e.fullWidth&&{width:"100%"},{[`&.${Td.disabled}`]:{color:(t.vars||t).palette.action.disabled,border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:je(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Td.selected}`]:{color:n,backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:je(n,t.palette.action.selectedOpacity),"&:hover":{backgroundColor:t.vars?`rgba(${r} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:je(n,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${r} / ${t.vars.palette.action.selectedOpacity})`:je(n,t.palette.action.selectedOpacity)}}}},e.size==="small"&&{padding:7,fontSize:t.typography.pxToRem(13)},e.size==="large"&&{padding:15,fontSize:t.typography.pxToRem(15)})}),kn=P.forwardRef(function(e,n){const r=P.useContext(E6),{value:i}=r,a=Be(r,pne),s=P.useContext(S6),o=Yd(I({},a,{selected:dne(e.value,i)}),e),l=Dt({props:o,name:"MuiToggleButton"}),{children:c,className:u,color:d="standard",disabled:p=!1,disableFocusRipple:m=!1,fullWidth:h=!1,onChange:g,onClick:_,selected:b,size:y="medium",value:v}=l,E=Be(l,fne),S=I({},l,{color:d,disabled:p,disableFocusRipple:m,fullWidth:h,size:y}),k=mne(S),x=N=>{_&&(_(N,v),N.defaultPrevented)||g&&g(N,v)},w=s||"";return f.jsx(hne,I({className:$e(a.className,k.root,u,w),disabled:p,focusRipple:!m,ref:n,onClick:x,onChange:g,value:v,ownerState:S,"aria-pressed":b},E,{children:c}))});function gne(t){return wt("MuiToggleButtonGroup",t)}const lr=Nt("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),_ne=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],bne=t=>{const{classes:e,orientation:n,fullWidth:r,disabled:i}=t,a={root:["root",n==="vertical"&&"vertical",r&&"fullWidth"],grouped:["grouped",`grouped${Ne(n)}`,i&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Rt(a,gne,e)},yne=Re("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[{[`& .${lr.grouped}`]:e.grouped},{[`& .${lr.grouped}`]:e[`grouped${Ne(n.orientation)}`]},{[`& .${lr.firstButton}`]:e.firstButton},{[`& .${lr.lastButton}`]:e.lastButton},{[`& .${lr.middleButton}`]:e.middleButton},e.root,n.orientation==="vertical"&&e.vertical,n.fullWidth&&e.fullWidth]}})(({ownerState:t,theme:e})=>I({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius},t.orientation==="vertical"&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{[`& .${lr.grouped}`]:I({},t.orientation==="horizontal"?{[`&.${lr.selected} + .${lr.grouped}.${lr.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${lr.selected} + .${lr.grouped}.${lr.selected}`]:{borderTop:0,marginTop:0}})},t.orientation==="horizontal"?{[`& .${lr.firstButton},& .${lr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${lr.lastButton},& .${lr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${lr.firstButton},& .${lr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${lr.lastButton},& .${lr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},t.orientation==="horizontal"?{[`& .${lr.lastButton}.${Td.disabled},& .${lr.middleButton}.${Td.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${lr.lastButton}.${Td.disabled},& .${lr.middleButton}.${Td.disabled}`]:{borderTop:"1px solid transparent"}})),Dh=P.forwardRef(function(e,n){const r=Dt({props:e,name:"MuiToggleButtonGroup"}),{children:i,className:a,color:s="standard",disabled:o=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:p="medium",value:m}=r,h=Be(r,_ne),g=I({},r,{disabled:o,fullWidth:c,orientation:d,size:p}),_=bne(g),b=P.useCallback((x,w)=>{if(!u)return;const N=m&&m.indexOf(w);let R;m&&N>=0?(R=m.slice(),R.splice(N,1)):R=m?m.concat(w):[w],u(x,R)},[u,m]),y=P.useCallback((x,w)=>{u&&u(x,m===w?null:w)},[u,m]),v=P.useMemo(()=>({className:_.grouped,onChange:l?y:b,value:m,size:p,fullWidth:c,color:s,disabled:o}),[_.grouped,l,y,b,m,p,c,s,o]),E=nW(i),S=E.length,k=x=>{const w=x===0,N=x===S-1;return w&&N?"":w?_.firstButton:N?_.lastButton:_.middleButton};return f.jsx(yne,I({role:"group",className:$e(_.root,a),ref:n,ownerState:g},h,{children:f.jsx(E6.Provider,{value:v,children:E.map((x,w)=>f.jsx(S6.Provider,{value:k(w),children:x},w))})}))});var vne=Object.defineProperty,Ene=(t,e,n)=>e in t?vne(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xg=(t,e,n)=>Ene(t,typeof e!="symbol"?e+"":e,n);const Sne={stringify:t=>t?"true":"false",parse:t=>/^[ty1-9]/i.test(t)},Tne={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{if(typeof window<"u"&&t in window)return window[t];if(typeof global<"u"&&t in global)return global[t]})();return typeof r=="function"?r.bind(n):void 0}},Cne={stringify:t=>JSON.stringify(t),parse:t=>JSON.parse(t)};function xne(t){return t.replace(/([a-z0-9])([A-Z])/g,(e,n,r)=>`${n}-${r.toLowerCase()}`)}function T6(t){return t.replace(/[-:]([a-z])/g,(e,n)=>`${n.toUpperCase()}`)}const kne={stringify:t=>t.name,parse:(t,e,n)=>{const r=(()=>{const i=T6(e);if(typeof n<"u"&&i in n.container)return n.container[i]})();return typeof r=="function"?r.bind(n):void 0}},wne={stringify:t=>`${t}`,parse:t=>parseFloat(t)},Dne={stringify:t=>t,parse:t=>t},$v={string:Dne,number:wne,boolean:Sne,function:Tne,method:kne,json:Cne},uf=Symbol.for("r2wc.render"),kg=Symbol.for("r2wc.connected"),bc=Symbol.for("r2wc.context"),Qi=Symbol.for("r2wc.props");function C6(t,e,n){var r,i,a;e.props||(e.props=t.propTypes?Object.keys(t.propTypes):[]),e.events||(e.events=[]);const s=Array.isArray(e.props)?e.props.slice():Object.keys(e.props),o=Array.isArray(e.events)?e.events.slice():Object.keys(e.events),l={},c={},u={},d={};for(const m of s){l[m]=Array.isArray(e.props)?"string":e.props[m];const h=xne(m);u[m]=h,d[h]=m}for(const m of o)c[m]=Array.isArray(e.events)?{}:e.events[m];class p extends HTMLElement{constructor(){super(),xg(this,a,!0),xg(this,i),xg(this,r,{}),xg(this,"container"),e.shadow?this.container=this.attachShadow({mode:e.shadow}):this.container=this,this[Qi].container=this.container;for(const h of s){const g=u[h],_=this.getAttribute(g),b=l[h],y=b?$v[b]:null;if(b==="method"){const v=T6(g);Object.defineProperty(this[Qi].container,v,{enumerable:!0,configurable:!0,get(){return this[Qi][v]},set(E){this[Qi][v]=E,this[uf]()}}),this[Qi][h]=y.parse(_,g,this)}y!=null&&y.parse&&_&&(this[Qi][h]=y.parse(_,g,this))}for(const h of o)this[Qi][h]=g=>{const _=h.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(_,{detail:g,...c[h]}))}}static get observedAttributes(){return Object.keys(d)}connectedCallback(){this[kg]=!0,this[uf]()}disconnectedCallback(){this[kg]=!1,this[bc]&&n.unmount(this[bc]),delete this[bc]}attributeChangedCallback(h,g,_){const b=d[h],y=l[b],v=y?$v[y]:null;b in l&&v!=null&&v.parse&&_&&(this[Qi][b]=v.parse(_,h,this),this[uf]())}[(a=kg,i=bc,r=Qi,uf)](){this[kg]&&(this[bc]?n.update(this[bc],this[Qi]):this[bc]=n.mount(this.container,t,this[Qi]))}}for(const m of s){const h=u[m],g=l[m];Object.defineProperty(p.prototype,m,{enumerable:!0,configurable:!0,get(){return this[Qi][m]},set(_){this[Qi][m]=_;const b=g?$v[g]:null;if(b!=null&&b.stringify){const y=b.stringify(_,h,this);this.getAttribute(h)!==y&&this.setAttribute(h,y)}else this[uf]()}})}return p}function Ane(t,e,n){const r=a4.createRoot(t),i=D.createElement(e,n);return r.render(i),{root:r,ReactComponent:e}}function Nne({root:t,ReactComponent:e},n){const r=D.createElement(e,n);t.render(r)}function Rne({root:t}){t.unmount()}function Ine(t,e={}){return C6(t,e,{mount:Ane,update:Nne,unmount:Rne})}const One={},hN=t=>{let e;const n=new Set,r=(u,d)=>{const p=typeof u=="function"?u(e):u;if(!Object.is(p,e)){const m=e;e=d??(typeof p!="object"||p===null)?p:Object.assign({},e,p),n.forEach(h=>h(e,m))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(One?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=e=t(r,i,l);return l},x6=t=>t?hN(t):hN;var zv={exports:{}},qv={},Gv={exports:{}},jv={};var gN;function Pne(){if(gN)return jv;gN=1;var t=D;function e(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:e,r=t.useState,i=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue;function o(d,p){var m=p(),h=r({inst:{value:m,getSnapshot:p}}),g=h[0].inst,_=h[1];return a(function(){g.value=m,g.getSnapshot=p,l(g)&&_({inst:g})},[d,m,p]),i(function(){return l(g)&&_({inst:g}),d(function(){l(g)&&_({inst:g})})},[d]),s(m),m}function l(d){var p=d.getSnapshot;d=d.value;try{var m=p();return!n(d,m)}catch{return!0}}function c(d,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return jv.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,jv}var _N;function Lne(){return _N||(_N=1,Gv.exports=Pne()),Gv.exports}var bN;function Mne(){if(bN)return qv;bN=1;var t=D,e=Lne();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,a=t.useRef,s=t.useEffect,o=t.useMemo,l=t.useDebugValue;return qv.useSyncExternalStoreWithSelector=function(c,u,d,p,m){var h=a(null);if(h.current===null){var g={hasValue:!1,value:null};h.current=g}else g=h.current;h=o(function(){function b(k){if(!y){if(y=!0,v=k,k=p(k),m!==void 0&&g.hasValue){var x=g.value;if(m(x,k))return E=x}return E=k}if(x=E,r(v,k))return x;var w=p(k);return m!==void 0&&m(x,w)?(v=k,x):(v=k,E=w)}var y=!1,v,E,S=d===void 0?null:d;return[function(){return b(u())},S===null?void 0:function(){return b(S())}]},[u,d,p,m]);var _=i(c,h[0],h[1]);return s(function(){g.hasValue=!0,g.value=_},[_]),l(_),_},qv}var yN;function Fne(){return yN||(yN=1,zv.exports=Mne()),zv.exports}var Bne=Fne();const Une=mu(Bne),k6={},{useDebugValue:$ne}=D,{useSyncExternalStoreWithSelector:zne}=Une;let vN=!1;const qne=t=>t;function Gne(t,e=qne,n){(k6?"production":void 0)!=="production"&&n&&!vN&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),vN=!0);const r=zne(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return $ne(r),r}const EN=t=>{(k6?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?x6(t):t,n=(r,i)=>Gne(e,r,i);return Object.assign(n,e),n},w6=t=>t?EN(t):EN,Cd=600,AC=370,Co="50px",jne=["#DC2626","#EF4444","#F87171","#EC4899","#BE185D","#7C2D12","#EA580C","#F97316","#FBBF24","#D97706","#A16207","#92400E","#059669","#10B981","#22C55E","#65A30D","#166534","#064E3B","#2563EB","#3B82F6","#60A5FA","#0EA5E9","#0891B2","#1E40AF","#7C3AED","#A855F7","#FFFFFF","#000000","#F9FAFB","#111827","","","","",""],Hne={root:{type:"EmailLayout",data:{backdropColor:"#F5F5F5",canvasColor:"#FFFFFF",textColor:"#262626",fontFamily:"MODERN_SANS",linkGlobal:{linkColor:"#2563EB",underline:!0},childrenIds:["block-1770764305315","block-1729890971319"],showVersion:!0}},"block-1729890971319":{type:"CustomEditor",data:{style:{fontSize:16,fontWeight:"normal",padding:{top:16,bottom:16,right:24,left:24},mobilePadding:{top:16,bottom:16,right:24,left:24},borderColor:"#000000",borderTop:0,borderBottom:0,borderLeft:0,borderRight:0},props:{html:"<p>Start bringing your ideas to life <strong>here! 🤩</strong></p>"},editorBackgroundColor:null}},"block-1770764305315":{type:"Wysiwyg",data:{props:{html:"<p>Start bringing your ideas to life 🤟, <strong>double-click</strong> here!</p>"},style:{padding:{top:16,bottom:16,left:24,right:24},mobilePadding:null,fontSize:16,fontWeight:"normal",borderColor:"#000000",borderTop:0,borderBottom:0,borderLeft:0,borderRight:0}}}},ab=["Spacer","Divider","Container",null],Bl=w6(()=>({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null}));function Vne(){return Bl(t=>t.stackUndo.length>0||t.pendingOriginalDocument!==null)}function Wne(){return Bl(t=>t.stackRedo.length>0)}function D6(){return Bl.getState()}function _y(){return Bl.getState().stackUndo}function A6(){return Bl.getState().stackRedo}function Pc(t){Bl.setState(t)}function Yne(){const{pendingUndoTimeout:t}=Bl.getState();t&&clearTimeout(t),Bl.setState({stackUndo:[],stackRedo:[],pendingUndoTimeout:null,pendingOriginalDocument:null,lastChange:null})}function N6(t){const e={...t};for(const[n,r]of Object.entries(e))r.type==="CustomEditor"&&(e[n]={...r,type:"Wysiwyg"});return e}const sb=385,Pm="https://maildrill.s3.eu-south-1.amazonaws.com/assets/emailbuilder-placeholder.jpg";let Hv=null;const Kne=2e3;function Ah(){Hv&&clearTimeout(Hv),Hv=setTimeout(()=>{const t=new CustomEvent("email-builder-auto-save",{detail:!0});window.dispatchEvent(t)},Kne)}const R6=()=>({document:N6(JSON.parse(JSON.stringify(Hne))),selectedBlockId:null,selectedSidebarTab:"styles",selectedMainTab:"editor",selectedScreenSize:"desktop",windowWidth:0,inspectorDrawerOpen:!0,samplesDrawerOpen:!0,inspectorDrawerWidth:sb,devMode:!1,imageUploading:{uploading:!1,id:""},disableEdition:!1,disableUpdate:!1,freeMode:!1,minHeight:"calc(100dvh - 65px)",color:{primary:"",secondary:""},galleryImages:!0,imagePlaceholder:Pm,darkMode:!0,colorPicker:{paletteColors:jne,isLocked:!1},tour:!1,stickyHeader:!0,heightContent:"calc(100dvh - 50px)",containerGrow:!0,wysiwygInlineEditingBlockId:null}),Oe=w6(()=>R6()),Qne=t=>{const e=R6();return x6(()=>({...e,...t,document:e.document}))},Xne=D.createContext(Oe),Zne=({store:t=Oe,children:e})=>f.jsx(Xne.Provider,{value:t,children:e});function I6(){const t=Oe(e=>e.document[Oe(n=>n.selectedBlockId)||""]);return t?t.type:null}function SN(t){return Oe.setState({windowWidth:t})}function Jne(){return Oe(t=>t.devMode)}function ere(t){return Oe.setState({devMode:t})}function O6(){return Oe(t=>t.document)}function P6(t){return Oe(e=>e.document[t])}function L6(t){return Oe(e=>e.document[t]?.type)}function tre(t){return Oe(e=>e.selectedBlockId===t)}function Zl(){return Oe(t=>t.selectedBlockId)}function M6(){return Oe(t=>t.wysiwygInlineEditingBlockId)}function TN(t){return Oe.setState({wysiwygInlineEditingBlockId:t})}function wr(){return Oe(t=>t.selectedScreenSize)}function by(){return Oe(t=>t.selectedMainTab)}function wg(t){return t==="preview"&&Ma(null),Oe.setState({inspectorDrawerOpen:t==="editor"}),Oe.setState({selectedMainTab:t})}function so(){return Oe(t=>t.selectedSidebarTab)}function nre(){return Oe(t=>t.inspectorDrawerOpen)}function yy(){return Oe(t=>t.imageUploading)}function rre(){return Oe(t=>t.disableEdition)}function Ma(t){tp();const e=Oe.getState().document[t||""]?.type,n=ab.includes(e||null)?"styles":"block-configuration",r={};return t!==null&&Oe.getState().selectedMainTab==="editor"&&(r.inspectorDrawerOpen=!0),Oe.setState({selectedBlockId:t,selectedSidebarTab:n,...r})}function ire(t){return Oe.setState({selectedSidebarTab:t})}function Jf(t){const e=Oe.getState().document,n=N6(t);return Nh(e,n),Yne(),Oe.setState({document:n,selectedSidebarTab:"styles",selectedBlockId:null})}const NC=(t,e,n=5,r=0)=>{if(t===e)return!0;if(t===null||e===null||t===void 0||e===void 0)return t===e;if(typeof t!=typeof e)return!1;if(typeof t!="object")return t===e;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let s=0;s<t.length;s++)if(r<n){if(!NC(t[s],e[s],n,r+1))return!1}else if(t[s]!==e[s])return!1;return!0}if(r>=n)try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(const s of i){if(!a.includes(s))return!1;const o=t[s],l=e[s];if(!NC(o,l,n,r+1))return!1}return!0},are=1e3;let Lc=null,Rd=null,Id=null;function F6(t){const e=Oe.getState().document;Nh(e,t)}function Nh(t,e){Id=t,Rd=e,Lc&&clearTimeout(Lc),Lc=setTimeout(()=>{B6(Id,Rd),Lc=null,Rd=null,Id=null},are)}function tp(){Lc&&(clearTimeout(Lc),Lc=null),Rd&&Id&&(B6(Id,Rd),Rd=null,Id=null);const{pendingUndoTimeout:t,pendingOriginalDocument:e}=D6();if(t&&(clearTimeout(t),e)){const n=[..._y()];Pc({stackUndo:[...n,JSON.stringify(e)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})}}function B6(t,e){const{pendingUndoTimeout:i,pendingOriginalDocument:a,lastChange:s}=D6();let o=!0,l=null;const c=(m,h)=>{if(m?.type==="Image"&&h?.type==="Image"){const g=m.data.props?.width,_=h.data.props?.width;return g==null&&typeof _=="number"}return!1};if(t===e)return null;const u=Object.keys(t),d=Object.keys(e);if(u.length!==d.length)l=d.find(m=>!t[m])||u.find(m=>!e[m])||null;else for(const m of d){const h=t[m],g=e[m];if(h!==g){if(h&&g&&c(h,g)){o=!1;break}if(!NC(h,g)){l=m;break}}}if(o&&l!==null){const m=Date.now(),h=[..._y()];if(h.length>=50&&h.shift(),l)if(s&&s.blockId===l&&m-s.timestamp<400){i&&clearTimeout(i);const g=setTimeout(()=>{Pc({stackUndo:[...h,JSON.stringify(a)],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null,stackRedo:[]})},400);Pc({pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:m}})}else{i&&clearTimeout(i);const g=setTimeout(()=>{Pc({stackUndo:[...h,JSON.stringify(t)],stackRedo:[],pendingOriginalDocument:null,pendingUndoTimeout:null,lastChange:null})},400);Pc({pendingOriginalDocument:t,pendingUndoTimeout:g,stackRedo:[],lastChange:{blockId:l,timestamp:m}})}}return null}function Rh(t,e=!0){const n=Oe.getState().document,r={...n,...t},i=()=>{Oe.setState({document:r}),e&&Promise.resolve().then(()=>{Nh(n,r)}),Ah();const a=new CustomEvent("email-builder-auto-save",{detail:e});window.dispatchEvent(a)};return e?(D.startTransition(i),Oe.getState()):i()}function ob(t){return Oe.setState({selectedScreenSize:t})}function Od(t,e){return Oe.setState({imageUploading:{uploading:t,id:e||""}})}function U6(t){return Oe.setState({disableEdition:t})}function sre(){return Oe.getState().document.root.data}function _u(){return Oe(t=>t.document?.root?.data)}function CN(){tp();const t=Oe.getState().document,e=_y(),n=A6();if(e.length===0)return;const r=[...e],i=r.pop();if(!i)return;const a=Oe.getState().selectedBlockId,s=JSON.parse(i);Pc({stackUndo:r,stackRedo:[...n,JSON.stringify(t)]}),s.root.data.childrenIds.includes(a)||Ma(null),Oe.setState({document:s})}function xN(){tp();const t=Oe.getState().document,e=_y(),n=A6();if(n.length===0)return;const r=[...n],i=r.pop();if(!i)return;const a=Oe.getState().selectedBlockId,s=JSON.parse(i);Pc({stackUndo:[...e,JSON.stringify(t)],stackRedo:r}),s?.root?.data?.childrenIds?.includes(a)||Ma(null),Oe.setState({document:s})}function ore(t){return Oe.setState({color:t})}function lre(t){return Oe.setState({galleryImages:t})}function $6(){return Oe.getState().galleryImages}function cre(t){return Oe.setState({imagePlaceholder:t})}function ure(){return Oe.getState().imagePlaceholder}function dre(t){return Oe.setState({freeMode:t})}function vy(){return Oe.getState().freeMode}function pre(t){return Oe.setState({darkMode:t})}function fre(t){return Oe.setState({heightContent:t})}function mre(t){return Oe.setState({containerGrow:t})}function hre(){return Oe.getState().containerGrow}function lb(t,e,n,r=!0){Ih({draggedId:e,targetId:t})&&console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");const i=Oe.getState().document,a=JSON.parse(JSON.stringify({...i})),s=u=>{if(!u||t===e)return u;const d=u.indexOf(e);return d<0?u:u.toSpliced(d,1)},o=u=>{if(!u||t===e)return u;const d=u.indexOf(t);if(d<0)return u;const p=n==="up"?d:d+1;return u.toSpliced(p,0,e)};let l=null,c=null;for(const[u,d]of Object.entries(a)){const p=d;if(c)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(e)&&(c=u,a[u]={...p,data:{...p.data,childrenIds:s(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(e)&&(c=u,a[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:s(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){let m=!1;const h=p.data.props.columns.map((g,_)=>g?.childrenIds?.includes(e)?(c=`${u}-column-${_}`,m=!0,{...g,childrenIds:s(g.childrenIds)}):g);m&&(a[u]={...p,data:{...p.data,props:{...p.data.props,columns:h}}})}break}}if(l=null,r)for(const[u,d]of Object.entries(a)){const p=d;if(l)break;switch(p.type){case"EmailLayout":p.data.childrenIds?.length&&p.data.childrenIds.includes(t)&&(l=u,a[u]={...p,data:{...p.data,childrenIds:o(p.data.childrenIds)}});break;case"Container":p.data.props?.childrenIds?.length&&p.data.props.childrenIds.includes(t)&&(l=u,a[u]={...p,data:{...p.data,props:{...p.data.props,childrenIds:o(p.data.props.childrenIds)}}});break;case"ColumnsContainer":if(p.data.props?.columns){const m=p.data.props.columns.map((h,g)=>h?.childrenIds?.includes(t)?(l=`${u}-column-${g}`,{...h,childrenIds:o(h.childrenIds)}):h);a[u]={...p,data:{...p.data,props:{...p.data.props,columns:m}}}}break}}return Rh(a)}function gre({parentId:t,blockId:e,indexArray:n}){if(Ih({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}lb("",e,"down",!1);const r=Oe.getState().document,i=JSON.parse(JSON.stringify({...r}));if(!i[t])return;const a=i[t],s=[...a.data.props.columns||[]];return s[n||0]={childrenIds:[e]},i[t]={type:"ColumnsContainer",data:{...a.data,props:{...a.data.props,columns:s}}},Rh(i)}function _re({parentId:t,blockId:e}){if(Ih({draggedId:e,targetId:t})){console.warn("No se puede mover un elemento dentro de uno de sus propios hijos");return}lb("",e,"down",!1);const n=Oe.getState().document,r=JSON.parse(JSON.stringify({...n}));if(!r[t])return;const i=r[t];return r[t]={type:"Container",data:{...i.data,props:{...i.data.props,childrenIds:[e]}}},Rh(r)}function Ih({draggedId:t,targetId:e}){if(t===e)return!0;const n=Oe.getState().document;function r(i,a){const s=n[i];if(!s)return!1;let o=[];switch(s.type){case"EmailLayout":o=s.data.childrenIds||[];break;case"Container":o=s.data.props?.childrenIds||[];break;case"ColumnsContainer":s.data.props?.columns&&s.data.props.columns.forEach(l=>{l?.childrenIds&&(o=[...o,...l.childrenIds])});break}if(o.includes(a))return!0;for(const l of o)if(r(l,a))return!0;return!1}return r(t,e)}function bre(){return Oe(t=>t.colorPicker)}function Vv(t){Oe.setState(e=>({colorPicker:{...e.colorPicker,...t}}))}function z6(t,e){const n=Oe.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const a={...n,[t]:i},s=n;D.startTransition(()=>{Oe.setState({document:a}),Promise.resolve().then(()=>{Nh(s,a)})}),Ah()}function yre(t,e){const n=Oe.getState().document,r=n[t];if(!r){console.warn(`Block ${t} not found`);return}const i=e(r);if(r===i)return;const a={...n,[t]:i},s=n;Oe.setState({document:a}),Promise.resolve().then(()=>{Nh(s,a)}),Ah()}function q6(t,e){z6(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function vre(t,e){yre(t,n=>{const r=typeof e=="function"?e(n.data.props):{...n.data.props,...e};return{...n,data:{...n.data,props:r}}})}function RC(t,e,n,r){Oe.setState(a=>{const s=a.document,o=s[t];if(!o)return a;const l=o.type==="EmailLayout"?{...o,data:{...o.data,childrenIds:r}}:{...o,data:{...o.data,props:{...o.data?.props,childrenIds:r}}};return{...a,document:{...s,[e]:n,[t]:l}}});const i=Oe.getState().document;D.startTransition(()=>{Promise.resolve().then(()=>F6(i))}),Ah()}function Ere(t){Oe.setState(n=>({...n,document:{...n.document,...t}}));const e=Oe.getState().document;D.startTransition(()=>{Promise.resolve().then(()=>F6(e))}),Ah()}function Ul(t,e){z6(t,e)}function G6(t,e){Ul(t,n=>{const r=n.data?.props||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,props:i}}})}function Sre(t,e,n){Ul(t,r=>r.data?.props?.[e]===n?r:{...r,data:{...r.data,props:{...r.data.props,[e]:n}}})}function j6(t,e){Ul(t,n=>{const r=n.data?.style||{},i=typeof e=="function"?e(r):{...r,...e};return r===i?n:{...n,data:{...n.data,style:i}}})}function Tre(t,e,n){Ul(t,r=>r.data?.style?.[e]===n?r:{...r,data:{...r.data,style:{...r.data.style,[e]:n}}})}function Cre(t,e){G6(t,n=>({...n,...e}))}function xre(t,e){j6(t,n=>({...n,...e}))}const kre=nt(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),Wk=nt(f.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"AddOutlined"),H6=nt(f.jsx("path",{d:"M4 22H2V2h2zM22 7H6v3h16zm-6 7H6v3h10z"}),"AlignHorizontalLeftOutlined"),V6=nt(f.jsx("path",{d:"M20 2h2v20h-2zM2 10h16V7H2zm6 7h10v-3H8z"}),"AlignHorizontalRightOutlined"),W6=nt(f.jsx("path",{d:"M22 22H2v-2h20zM10 2H7v16h3zm7 6h-3v10h3z"}),"AlignVerticalBottomOutlined"),Y6=nt(f.jsx("path",{d:"M22 2v2H2V2zM7 22h3V6H7zm7-6h3V6h-3z"}),"AlignVerticalTopOutlined"),wre=nt(f.jsx("path",{d:"M19 12h-2v3h-3v2h5zM7 9h3V7H5v5h2zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16.01H3V4.99h18z"}),"AspectRatioOutlined"),Dre=nt(f.jsx("path",{d:"M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5"}),"Attachment"),kN=nt(f.jsx("path",{d:"m19 9 1.25-2.75L23 5l-2.75-1.25L19 1l-1.25 2.75L15 5l2.75 1.25zm-7.5.5L9 4 6.5 9.5 1 12l5.5 2.5L9 20l2.5-5.5L17 12zM19 15l-1.25 2.75L15 19l2.75 1.25L19 23l1.25-2.75L23 19l-2.75-1.25z"}),"AutoAwesome"),Are=nt(f.jsx("path",{d:"M9 11H7v2h2zm4 4h-2v2h2zM9 3H7v2h2zm4 8h-2v2h2zM5 3H3v2h2zm8 4h-2v2h2zm4 4h-2v2h2zm-4-8h-2v2h2zm4 0h-2v2h2zm2 10h2v-2h-2zm0 4h2v-2h-2zM5 7H3v2h2zm14-4v2h2V3zm0 6h2V7h-2zM5 11H3v2h2zM3 21h18v-2H3zm2-6H3v2h2z"}),"BorderBottomOutlined"),Nre=nt(f.jsx("path",{d:"M11 21h2v-2h-2zm0-4h2v-2h-2zm0-12h2V3h-2zm0 4h2V7h-2zm0 4h2v-2h-2zm-4 8h2v-2H7zM7 5h2V3H7zm0 8h2v-2H7zm-4 8h2V3H3zM19 9h2V7h-2zm-4 12h2v-2h-2zm4-4h2v-2h-2zm0-14v2h2V3zm0 10h2v-2h-2zm0 8h2v-2h-2zm-4-8h2v-2h-2zm0-8h2V3h-2z"}),"BorderLeftOutlined"),Rre=nt(f.jsx("path",{d:"M13 7h-2v2h2zm0 4h-2v2h2zm4 0h-2v2h2zM3 3v18h18V3zm16 16H5V5h14zm-6-4h-2v2h2zm-4-4H7v2h2z"}),"BorderOuterOutlined"),Ire=nt(f.jsx("path",{d:"M7 21h2v-2H7zM3 5h2V3H3zm4 0h2V3H7zm0 8h2v-2H7zm-4 8h2v-2H3zm8 0h2v-2h-2zm-8-8h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm8 8h2v-2h-2zm4-4h2v-2h-2zm4-10v18h2V3zm-4 18h2v-2h-2zm0-16h2V3h-2zm-4 8h2v-2h-2zm0-8h2V3h-2zm0 4h2V7h-2z"}),"BorderRightOutlined"),Ore=nt(f.jsx("path",{d:"M7 21h2v-2H7zm0-8h2v-2H7zm4 0h2v-2h-2zm0 8h2v-2h-2zm-8-4h2v-2H3zm0 4h2v-2H3zm0-8h2v-2H3zm0-4h2V7H3zm8 8h2v-2h-2zm8-8h2V7h-2zm0 4h2v-2h-2zM3 3v2h18V3zm16 14h2v-2h-2zm-4 4h2v-2h-2zM11 9h2V7h-2zm8 12h2v-2h-2zm-4-8h2v-2h-2z"}),"BorderTopOutlined"),Yk=nt(f.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),wN=nt(f.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopyOutlined"),Pre=nt(f.jsx("path",{d:"M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 10H5V8h14z"}),"Crop32Outlined"),Lre=nt(f.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Mre=nt(f.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator"),Fre=nt(f.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),K6=nt(f.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenter"),Bre=nt(f.jsx("path",{d:"M7 15v2h10v-2zm-4 6h18v-2H3zm0-8h18v-2H3zm4-6v2h10V7zM3 3v2h18V3z"}),"FormatAlignCenterOutlined"),Q6=nt(f.jsx("path",{d:"M3 21h18v-2H3zm0-4h18v-2H3zm0-4h18v-2H3zm0-4h18V7H3zm0-6v2h18V3z"}),"FormatAlignJustify"),X6=nt(f.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeft"),Ure=nt(f.jsx("path",{d:"M15 15H3v2h12zm0-8H3v2h12zM3 13h18v-2H3zm0 8h18v-2H3zM3 3v2h18V3z"}),"FormatAlignLeftOutlined"),Z6=nt(f.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRight"),$re=nt(f.jsx("path",{d:"M3 21h18v-2H3zm6-4h12v-2H9zm-6-4h18v-2H3zm6-4h12V7H9zM3 3v2h18V3z"}),"FormatAlignRightOutlined"),J6=nt(f.jsx("path",{d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5"}),"FormatBold"),e9=nt(f.jsx("path",{d:"M3.27 5 2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5z"}),"FormatClear"),t9=nt(f.jsx("path",{d:"M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31m-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12.79 6 14c0 3.31 2.69 6 6 6 1.52 0 2.9-.57 3.96-1.5l2.63 2.63 1.27-1.27z"}),"FormatColorReset"),n9=nt(f.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),r9=nt(f.jsx("path",{d:"M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z"}),"FormatListBulleted"),i9=nt(f.jsx("path",{d:"M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z"}),"FormatListNumbered"),a9=nt(f.jsx("path",{d:"M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z"}),"FormatUnderlined"),zre=nt(f.jsx("path",{d:"M10.27 12h3.46c.93 0 1.63-.83 1.48-1.75l-.3-1.79C14.67 7.04 13.44 6 12 6S9.33 7.04 9.09 8.47l-.3 1.79c-.15.91.55 1.74 1.48 1.74m-8.61-.89c-.13.26-.18.57-.1.88.16.69.76 1.03 1.53 1h1.95c.83 0 1.51-.58 1.51-1.29 0-.14-.03-.27-.07-.4-.01-.03-.01-.05.01-.08.09-.16.14-.34.14-.53 0-.31-.14-.6-.36-.82-.03-.03-.03-.06-.02-.1.07-.2.07-.43.01-.65-.16-.43-.55-.72-.99-.74-.03 0-.05-.01-.07-.03-.17-.21-.48-.35-.83-.35-.3 0-.57.1-.75.26-.03.03-.06.03-.09.02-.14-.06-.3-.09-.46-.09-.65 0-1.18.49-1.24 1.12 0 .02-.01.04-.03.06-.29.26-.46.65-.41 1.05.03.22.12.43.25.6.03.02.03.06.02.09m14.58 2.54c-1.17-.52-2.61-.9-4.24-.9-1.63 0-3.07.39-4.24.9C6.68 14.13 6 15.21 6 16.39V18h12v-1.61c0-1.18-.68-2.26-1.76-2.74m-15.02.93C.48 14.9 0 15.62 0 16.43V18h4.5v-1.61c0-.83.23-1.61.63-2.29-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58m21.56 0c-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29V18H24v-1.57c0-.81-.48-1.53-1.22-1.85M22 11v-.5c0-1.1-.9-2-2-2h-2c-.42 0-.65.48-.39.81l.7.63c-.19.31-.31.67-.31 1.06 0 1.1.9 2 2 2s2-.9 2-2"}),"Groups2"),s9=nt(f.jsx("path",{d:"M13 6.99h3L12 3 8 6.99h3v10.02H8L12 21l4-3.99h-3z"}),"HeightOutlined"),qre=nt(f.jsx("path",{fillRule:"evenodd",d:"M4 11h16v2H4z"}),"HorizontalRuleOutlined"),Gre=nt(f.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"ImageOutlined"),o9=nt(f.jsx("path",{d:"M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9"}),"ImageSearchOutlined"),jre=nt(f.jsx("path",{d:"M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zm-7-2h2v-3h3V9h-3V6h-2v3h-3v2h3z"}),"LibraryAddOutlined"),l9=nt(f.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Oh=nt(f.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),Ph=nt(f.jsx("path",{d:"M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m0 12H6V10h12z"}),"LockOpen"),Hre=nt(f.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 13H4V5h16z"}),"MonitorOutlined"),Vre=nt(f.jsx("path",{d:"M21 11.01 3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"}),"NotesOutlined"),Wre=nt(f.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"}),"PhoneIphoneOutlined"),c9=nt(f.jsx("path",{d:"M19 5v14H5V5zm0-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-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"}),"PhotoOutlined"),Yre=nt(f.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),df=nt(f.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCorner"),Kre=nt(f.jsx("path",{d:"M19 19h2v2h-2zm0-2h2v-2h-2zM3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm0-4h2V3H3zm4 0h2V3H7zm8 16h2v-2h-2zm-4 0h2v-2h-2zm4 0h2v-2h-2zm-8 0h2v-2H7zm-4 0h2v-2H3zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2z"}),"RoundedCornerOutlined"),Qre=nt(f.jsx("path",{d:"M22 9v6c0 1.1-.9 2-2 2h-1v-2h1V9H4v6h6v2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h16c1.1 0 2 .9 2 2m-7.5 10 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62zm-2.5 5 1.09-2.41L18 15.5l-2.41-1.09L14.5 12l-1.09 2.41L11 15.5l2.41 1.09zm2.5-5 .62-1.38L19 12l-1.38-.62L17 10l-.62 1.38L15 12l1.38.62z"}),"SmartButtonOutlined"),DN=nt(f.jsx("path",{d:"M18 9v4H6V9H4v6h16V9z"}),"SpaceBar"),Xre=nt(f.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFieldsOutlined"),Zre=nt(f.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottomOutlined"),Jre=nt(f.jsx("path",{d:"M8 19h3v4h2v-4h3l-4-4zm8-14h-3V1h-2v4H8l4 4zM4 11v2h16v-2z"}),"VerticalAlignCenterOutlined"),eie=nt(f.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTopOutlined"),tie=nt(f.jsx("path",{d:"M3 5v14h18V5zm5.33 12H5V7h3.33zm5.34 0h-3.33V7h3.33zM19 17h-3.33V7H19z"}),"ViewColumnOutlined"),nie=nt(f.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M4 18V6h2v12zm4 0V6h8v12zm12 0h-2V6h2z"}),"WidthWideOutlined");var bn;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},t.getValidEnumValues=i=>{const a=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(a){return i[a]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},t.find=(i,a)=>{for(const s of i)if(a(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}t.joinValues=r,t.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(bn||(bn={}));var IC;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(IC||(IC={}));const Je=bn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),wo=t=>{switch(typeof t){case"undefined":return Je.undefined;case"string":return Je.string;case"number":return Number.isNaN(t)?Je.nan:Je.number;case"boolean":return Je.boolean;case"function":return Je.function;case"bigint":return Je.bigint;case"symbol":return Je.symbol;case"object":return Array.isArray(t)?Je.array:t===null?Je.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Je.promise:typeof Map<"u"&&t instanceof Map?Je.map:typeof Set<"u"&&t instanceof Set?Je.set:typeof Date<"u"&&t instanceof Date?Je.date:Je.object;default:return Je.unknown}},Me=bn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),rie=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class sa extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){const n=e||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof sa))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,bn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}sa.create=t=>new sa(t);const np=(t,e)=>{let n;switch(t.code){case Me.invalid_type:t.received===Je.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,bn.jsonStringifyReplacer)}`;break;case Me.unrecognized_keys:n=`Unrecognized key(s) in object: ${bn.joinValues(t.keys,", ")}`;break;case Me.invalid_union:n="Invalid input";break;case Me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${bn.joinValues(t.options)}`;break;case Me.invalid_enum_value:n=`Invalid enum value. Expected ${bn.joinValues(t.options)}, received '${t.received}'`;break;case Me.invalid_arguments:n="Invalid function arguments";break;case Me.invalid_return_type:n="Invalid function return type";break;case Me.invalid_date:n="Invalid date";break;case Me.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:bn.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Me.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Me.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Me.custom:n="Invalid input";break;case Me.invalid_intersection_types:n="Intersection results could not be merged";break;case Me.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Me.not_finite:n="Number must be finite";break;default:n=e.defaultError,bn.assertNever(t)}return{message:n}};let u9=np;function iie(t){u9=t}function cb(){return u9}const ub=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,a=[...n,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:e,defaultError:o}).message;return{...i,path:a,message:o}},aie=[];function We(t,e){const n=cb(),r=ub({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===np?void 0:np].filter(i=>!!i)});t.common.issues.push(r)}class fi{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return Ot;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const a=await i.key,s=await i.value;r.push({key:a,value:s})}return fi.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return Ot;a.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[a.value]=s.value)}return{status:e.value,value:r}}}const Ot=Object.freeze({status:"aborted"}),xd=t=>({status:"dirty",value:t}),wi=t=>({status:"valid",value:t}),OC=t=>t.status==="aborted",PC=t=>t.status==="dirty",Jc=t=>t.status==="valid",Lm=t=>typeof Promise<"u"&&t instanceof Promise;var ht;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(ht||(ht={}));class Js{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const AN=(t,e)=>{if(Jc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new sa(t.common.issues);return this._error=n,this._error}}};function Kt(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(s,o)=>{const{message:l}=t;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??r??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??n??o.defaultError}},description:i}}class tn{get description(){return this._def.description}_getType(e){return wo(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:wo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fi,ctx:{common:e.parent.common,data:e.data,parsedType:wo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Lm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)},i=this._parseSync({data:e,path:r.path,parent:r});return AN(r,i)}"~validate"(e){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:n});return Jc(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(r=>Jc(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:wo(e)},i=this._parse({data:e,path:r.path,parent:r}),a=await(Lm(i)?i:Promise.resolve(i));return AN(r,a)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const s=e(i),o=()=>a.addIssue({code:Me.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new fs({schema:this,typeName:Lt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Vs.create(this,this._def)}nullable(){return Gl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return os.create(this)}promise(){return ip.create(this,this._def)}or(e){return Um.create([this,e],this._def)}and(e){return $m.create(this,e,this._def)}transform(e){return new fs({...Kt(this._def),schema:this,typeName:Lt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Hm({...Kt(this._def),innerType:this,defaultValue:n,typeName:Lt.ZodDefault})}brand(){return new Kk({typeName:Lt.ZodBranded,type:this,...Kt(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Vm({...Kt(this._def),innerType:this,catchValue:n,typeName:Lt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Lh.create(this,e)}readonly(){return Wm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sie=/^c[^\s-]{8,}$/i,oie=/^[0-9a-z]+$/,lie=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cie=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uie=/^[a-z0-9_-]{21}$/i,die=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pie=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fie=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mie="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wv;const hie=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gie=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_ie=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bie=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yie=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vie=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d9="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Eie=new RegExp(`^${d9}$`);function p9(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function Sie(t){return new RegExp(`^${p9(t)}$`)}function f9(t){let e=`${d9}T${p9(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Tie(t,e){return!!((e==="v4"||!e)&&hie.test(t)||(e==="v6"||!e)&&_ie.test(t))}function Cie(t,e){if(!die.test(t))return!1;try{const[n]=t.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function xie(t,e){return!!((e==="v4"||!e)&&gie.test(t)||(e==="v6"||!e)&&bie.test(t))}class rs extends tn{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Je.string){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.string,received:a.parsedType}),Ot}const r=new fi;let i;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const s=e.data.length>a.value,o=e.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(e,i),s?We(i,{code:Me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&We(i,{code:Me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")fie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"email",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Wv||(Wv=new RegExp(mie,"u")),Wv.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"emoji",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")cie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"uuid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")uie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"nanoid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")sie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cuid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")oie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cuid2",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")lie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"ulid",code:Me.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),We(i,{validation:"url",code:Me.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"regex",code:Me.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?f9(a).test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Eie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?Sie(a).test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{code:Me.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?pie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"duration",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?Tie(e.data,a.version)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"ip",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?Cie(e.data,a.alg)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"jwt",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?xie(e.data,a.version)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"cidr",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?yie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"base64",code:Me.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?vie.test(e.data)||(i=this._getOrReturnCtx(e,i),We(i,{validation:"base64url",code:Me.invalid_string,message:a.message}),r.dirty()):bn.assertNever(a);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Me.invalid_string,...ht.errToObj(r)})}_addCheck(e){return new rs({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ht.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ht.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ht.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ht.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ht.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ht.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ht.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ht.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ht.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ht.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ht.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ht.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ht.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ht.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ht.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ht.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ht.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n?.position,...ht.errToObj(n?.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ht.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ht.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ht.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ht.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ht.errToObj(n)})}nonempty(e){return this.min(1,ht.errToObj(e))}trim(){return new rs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}rs.create=t=>new rs({checks:[],typeName:Lt.ZodString,coerce:t?.coerce??!1,...Kt(t)});function kie(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(t.toFixed(i).replace(".","")),s=Number.parseInt(e.toFixed(i).replace(".",""));return a%s/10**i}class $l extends tn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Je.number){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.number,received:a.parsedType}),Ot}let r;const i=new fi;for(const a of this._def.checks)a.kind==="int"?bn.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),We(r,{code:Me.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?kie(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_finite,message:a.message}),i.dirty()):bn.assertNever(a);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ht.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ht.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ht.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ht.toString(n))}setLimit(e,n,r,i){return new $l({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ht.toString(i)}]})}_addCheck(e){return new $l({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ht.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ht.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ht.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ht.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ht.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&bn.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}$l.create=t=>new $l({checks:[],typeName:Lt.ZodNumber,coerce:t?.coerce||!1,...Kt(t)});class zl extends tn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Je.bigint)return this._getInvalidInput(e);let r;const i=new fi;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),We(r,{code:Me.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):bn.assertNever(a);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return We(n,{code:Me.invalid_type,expected:Je.bigint,received:n.parsedType}),Ot}gte(e,n){return this.setLimit("min",e,!0,ht.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ht.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ht.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ht.toString(n))}setLimit(e,n,r,i){return new zl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ht.toString(i)}]})}_addCheck(e){return new zl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ht.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ht.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ht.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}zl.create=t=>new zl({checks:[],typeName:Lt.ZodBigInt,coerce:t?.coerce??!1,...Kt(t)});class Mm extends tn{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Je.boolean){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.boolean,received:r.parsedType}),Ot}return wi(e.data)}}Mm.create=t=>new Mm({typeName:Lt.ZodBoolean,coerce:t?.coerce||!1,...Kt(t)});class eu extends tn{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Je.date){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_type,expected:Je.date,received:a.parsedType}),Ot}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return We(a,{code:Me.invalid_date}),Ot}const r=new fi;let i;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(i=this._getOrReturnCtx(e,i),We(i,{code:Me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):bn.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new eu({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ht.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ht.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}eu.create=t=>new eu({checks:[],coerce:t?.coerce||!1,typeName:Lt.ZodDate,...Kt(t)});class db extends tn{_parse(e){if(this._getType(e)!==Je.symbol){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.symbol,received:r.parsedType}),Ot}return wi(e.data)}}db.create=t=>new db({typeName:Lt.ZodSymbol,...Kt(t)});class Fm extends tn{_parse(e){if(this._getType(e)!==Je.undefined){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.undefined,received:r.parsedType}),Ot}return wi(e.data)}}Fm.create=t=>new Fm({typeName:Lt.ZodUndefined,...Kt(t)});class Bm extends tn{_parse(e){if(this._getType(e)!==Je.null){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.null,received:r.parsedType}),Ot}return wi(e.data)}}Bm.create=t=>new Bm({typeName:Lt.ZodNull,...Kt(t)});class rp extends tn{constructor(){super(...arguments),this._any=!0}_parse(e){return wi(e.data)}}rp.create=t=>new rp({typeName:Lt.ZodAny,...Kt(t)});class Gc extends tn{constructor(){super(...arguments),this._unknown=!0}_parse(e){return wi(e.data)}}Gc.create=t=>new Gc({typeName:Lt.ZodUnknown,...Kt(t)});class Bo extends tn{_parse(e){const n=this._getOrReturnCtx(e);return We(n,{code:Me.invalid_type,expected:Je.never,received:n.parsedType}),Ot}}Bo.create=t=>new Bo({typeName:Lt.ZodNever,...Kt(t)});class pb extends tn{_parse(e){if(this._getType(e)!==Je.undefined){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.void,received:r.parsedType}),Ot}return wi(e.data)}}pb.create=t=>new pb({typeName:Lt.ZodVoid,...Kt(t)});class os extends tn{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Je.array)return We(n,{code:Me.invalid_type,expected:Je.array,received:n.parsedType}),Ot;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(s||o)&&(We(n,{code:s?Me.too_big:Me.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(We(n,{code:Me.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(We(n,{code:Me.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>i.type._parseAsync(new Js(n,s,n.path,o)))).then(s=>fi.mergeArray(r,s));const a=[...n.data].map((s,o)=>i.type._parseSync(new Js(n,s,n.path,o)));return fi.mergeArray(r,a)}get element(){return this._def.type}min(e,n){return new os({...this._def,minLength:{value:e,message:ht.toString(n)}})}max(e,n){return new os({...this._def,maxLength:{value:e,message:ht.toString(n)}})}length(e,n){return new os({...this._def,exactLength:{value:e,message:ht.toString(n)}})}nonempty(e){return this.min(1,e)}}os.create=(t,e)=>new os({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Lt.ZodArray,...Kt(e)});function dd(t){if(t instanceof pr){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Vs.create(dd(r))}return new pr({...t._def,shape:()=>e})}else return t instanceof os?new os({...t._def,type:dd(t.element)}):t instanceof Vs?Vs.create(dd(t.unwrap())):t instanceof Gl?Gl.create(dd(t.unwrap())):t instanceof eo?eo.create(t.items.map(e=>dd(e))):t}class pr extends tn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=bn.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==Je.object){const c=this._getOrReturnCtx(e);return We(c,{code:Me.invalid_type,expected:Je.object,received:c.parsedType}),Ot}const{status:r,ctx:i}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Bo&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const u=a[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Js(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Bo){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(We(i,{code:Me.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Js(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,p=await u.value;c.push({key:d,value:p,alwaysSet:u.alwaysSet})}return c}).then(c=>fi.mergeObjectSync(r,c)):fi.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return ht.errToObj,new pr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{const i=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ht.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new pr({...this._def,unknownKeys:"strip"})}passthrough(){return new pr({...this._def,unknownKeys:"passthrough"})}extend(e){return new pr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new pr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Lt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new pr({...this._def,catchall:e})}pick(e){const n={};for(const r of bn.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new pr({...this._def,shape:()=>n})}omit(e){const n={};for(const r of bn.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new pr({...this._def,shape:()=>n})}deepPartial(){return dd(this)}partial(e){const n={};for(const r of bn.objectKeys(this.shape)){const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}return new pr({...this._def,shape:()=>n})}required(e){const n={};for(const r of bn.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Vs;)a=a._def.innerType;n[r]=a}return new pr({...this._def,shape:()=>n})}keyof(){return m9(bn.objectKeys(this.shape))}}pr.create=(t,e)=>new pr({shape:()=>t,unknownKeys:"strip",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});pr.strictCreate=(t,e)=>new pr({shape:()=>t,unknownKeys:"strict",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});pr.lazycreate=(t,e)=>new pr({shape:t,unknownKeys:"strip",catchall:Bo.create(),typeName:Lt.ZodObject,...Kt(e)});class Um extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new sa(o.ctx.common.issues));return We(n,{code:Me.invalid_union,unionErrors:s}),Ot}if(n.common.async)return Promise.all(r.map(async a=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(l=>new sa(l));return We(n,{code:Me.invalid_union,unionErrors:o}),Ot}}get options(){return this._def.options}}Um.create=(t,e)=>new Um({options:t,typeName:Lt.ZodUnion,...Kt(e)});const xo=t=>t instanceof qm?xo(t.schema):t instanceof fs?xo(t.innerType()):t instanceof Gm?[t.value]:t instanceof ql?t.options:t instanceof jm?bn.objectValues(t.enum):t instanceof Hm?xo(t._def.innerType):t instanceof Fm?[void 0]:t instanceof Bm?[null]:t instanceof Vs?[void 0,...xo(t.unwrap())]:t instanceof Gl?[null,...xo(t.unwrap())]:t instanceof Kk||t instanceof Wm?xo(t.unwrap()):t instanceof Vm?xo(t._def.innerType):[];class Ey extends tn{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.object)return We(n,{code:Me.invalid_type,expected:Je.object,received:n.parsedType}),Ot;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(We(n,{code:Me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ot)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const a of n){const s=xo(a.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of s){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,a)}}return new Ey({typeName:Lt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Kt(r)})}}function LC(t,e){const n=wo(t),r=wo(e);if(t===e)return{valid:!0,data:t};if(n===Je.object&&r===Je.object){const i=bn.objectKeys(e),a=bn.objectKeys(t).filter(o=>i.indexOf(o)!==-1),s={...t,...e};for(const o of a){const l=LC(t[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(n===Je.array&&r===Je.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let a=0;a<t.length;a++){const s=t[a],o=e[a],l=LC(s,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Je.date&&r===Je.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class $m extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(a,s)=>{if(OC(a)||OC(s))return Ot;const o=LC(a.value,s.value);return o.valid?((PC(a)||PC(s))&&n.dirty(),{status:n.value,value:o.data}):(We(r,{code:Me.invalid_intersection_types}),Ot)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,s])=>i(a,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}$m.create=(t,e,n)=>new $m({left:t,right:e,typeName:Lt.ZodIntersection,...Kt(n)});class eo extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.array)return We(r,{code:Me.invalid_type,expected:Je.array,received:r.parsedType}),Ot;if(r.data.length<this._def.items.length)return We(r,{code:Me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ot;!this._def.rest&&r.data.length>this._def.items.length&&(We(r,{code:Me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new Js(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(a).then(s=>fi.mergeArray(n,s)):fi.mergeArray(n,a)}get items(){return this._def.items}rest(e){return new eo({...this._def,rest:e})}}eo.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new eo({items:t,typeName:Lt.ZodTuple,rest:null,...Kt(e)})};class zm extends tn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.object)return We(r,{code:Me.invalid_type,expected:Je.object,received:r.parsedType}),Ot;const i=[],a=this._def.keyType,s=this._def.valueType;for(const o in r.data)i.push({key:a._parse(new Js(r,o,r.path,o)),value:s._parse(new Js(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?fi.mergeObjectAsync(n,i):fi.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof tn?new zm({keyType:e,valueType:n,typeName:Lt.ZodRecord,...Kt(r)}):new zm({keyType:rs.create(),valueType:e,typeName:Lt.ZodRecord,...Kt(n)})}}class fb extends tn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.map)return We(r,{code:Me.invalid_type,expected:Je.map,received:r.parsedType}),Ot;const i=this._def.keyType,a=this._def.valueType,s=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new Js(r,o,r.path,[c,"key"])),value:a._parse(new Js(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ot;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ot;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}fb.create=(t,e,n)=>new fb({valueType:e,keyType:t,typeName:Lt.ZodMap,...Kt(n)});class tu extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Je.set)return We(r,{code:Me.invalid_type,expected:Je.set,received:r.parsedType}),Ot;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(We(r,{code:Me.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(We(r,{code:Me.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ot;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>a._parse(new Js(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,n){return new tu({...this._def,minSize:{value:e,message:ht.toString(n)}})}max(e,n){return new tu({...this._def,maxSize:{value:e,message:ht.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}tu.create=(t,e)=>new tu({valueType:t,minSize:null,maxSize:null,typeName:Lt.ZodSet,...Kt(e)});class Pd extends tn{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.function)return We(n,{code:Me.invalid_type,expected:Je.function,received:n.parsedType}),Ot;function r(o,l){return ub({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cb(),np].filter(c=>!!c),issueData:{code:Me.invalid_arguments,argumentsError:l}})}function i(o,l){return ub({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cb(),np].filter(c=>!!c),issueData:{code:Me.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof ip){const o=this;return wi(async function(...l){const c=new sa([]),u=await o._def.args.parseAsync(l,a).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(s,this,u);return await o._def.returns._def.type.parseAsync(d,a).catch(m=>{throw c.addIssue(i(d,m)),c})})}else{const o=this;return wi(function(...l){const c=o._def.args.safeParse(l,a);if(!c.success)throw new sa([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),d=o._def.returns.safeParse(u,a);if(!d.success)throw new sa([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pd({...this._def,args:eo.create(e).rest(Gc.create())})}returns(e){return new Pd({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new Pd({args:e||eo.create([]).rest(Gc.create()),returns:n||Gc.create(),typeName:Lt.ZodFunction,...Kt(r)})}}class qm extends tn{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}qm.create=(t,e)=>new qm({getter:t,typeName:Lt.ZodLazy,...Kt(e)});class Gm extends tn{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return We(n,{received:n.data,code:Me.invalid_literal,expected:this._def.value}),Ot}return{status:"valid",value:e.data}}get value(){return this._def.value}}Gm.create=(t,e)=>new Gm({value:t,typeName:Lt.ZodLiteral,...Kt(e)});function m9(t,e){return new ql({values:t,typeName:Lt.ZodEnum,...Kt(e)})}class ql extends tn{_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return We(n,{expected:bn.joinValues(r),received:n.parsedType,code:Me.invalid_type}),Ot}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return We(n,{received:n.data,code:Me.invalid_enum_value,options:r}),Ot}return wi(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ql.create(e,{...this._def,...n})}exclude(e,n=this._def){return ql.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}ql.create=m9;class jm extends tn{_parse(e){const n=bn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Je.string&&r.parsedType!==Je.number){const i=bn.objectValues(n);return We(r,{expected:bn.joinValues(i),received:r.parsedType,code:Me.invalid_type}),Ot}if(this._cache||(this._cache=new Set(bn.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=bn.objectValues(n);return We(r,{received:r.data,code:Me.invalid_enum_value,options:i}),Ot}return wi(e.data)}get enum(){return this._def.values}}jm.create=(t,e)=>new jm({values:t,typeName:Lt.ZodNativeEnum,...Kt(e)});class ip extends tn{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Je.promise&&n.common.async===!1)return We(n,{code:Me.invalid_type,expected:Je.promise,received:n.parsedType}),Ot;const r=n.parsedType===Je.promise?n.data:Promise.resolve(n.data);return wi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ip.create=(t,e)=>new ip({type:t,typeName:Lt.ZodPromise,...Kt(e)});class fs extends tn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Lt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:s=>{We(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(r.data,a);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return Ot;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ot:l.status==="dirty"||n.value==="dirty"?xd(l.value):l});{if(n.value==="aborted")return Ot;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?Ot:o.status==="dirty"||n.value==="dirty"?xd(o.value):o}}if(i.type==="refinement"){const s=o=>{const l=i.refinement(o,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ot:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Ot:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Jc(s))return Ot;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Jc(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:n.value,value:o})):Ot);bn.assertNever(i)}}fs.create=(t,e,n)=>new fs({schema:t,typeName:Lt.ZodEffects,effect:e,...Kt(n)});fs.createWithPreprocess=(t,e,n)=>new fs({schema:e,effect:{type:"preprocess",transform:t},typeName:Lt.ZodEffects,...Kt(n)});class Vs extends tn{_parse(e){return this._getType(e)===Je.undefined?wi(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Vs.create=(t,e)=>new Vs({innerType:t,typeName:Lt.ZodOptional,...Kt(e)});class Gl extends tn{_parse(e){return this._getType(e)===Je.null?wi(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gl.create=(t,e)=>new Gl({innerType:t,typeName:Lt.ZodNullable,...Kt(e)});class Hm extends tn{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Je.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Hm.create=(t,e)=>new Hm({innerType:t,typeName:Lt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Kt(e)});class Vm extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Lm(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new sa(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Vm.create=(t,e)=>new Vm({innerType:t,typeName:Lt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Kt(e)});class mb extends tn{_parse(e){if(this._getType(e)!==Je.nan){const r=this._getOrReturnCtx(e);return We(r,{code:Me.invalid_type,expected:Je.nan,received:r.parsedType}),Ot}return{status:"valid",value:e.data}}}mb.create=t=>new mb({typeName:Lt.ZodNaN,...Kt(t)});const wie=Symbol("zod_brand");class Kk extends tn{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Lh extends tn{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ot:a.status==="dirty"?(n.dirty(),xd(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ot:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new Lh({in:e,out:n,typeName:Lt.ZodPipeline})}}class Wm extends tn{_parse(e){const n=this._def.innerType._parse(e),r=i=>(Jc(i)&&(i.value=Object.freeze(i.value)),i);return Lm(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Wm.create=(t,e)=>new Wm({innerType:t,typeName:Lt.ZodReadonly,...Kt(e)});function NN(t,e){const n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function h9(t,e={},n){return t?rp.create().superRefine((r,i)=>{const a=t(r);if(a instanceof Promise)return a.then(s=>{if(!s){const o=NN(e,r),l=o.fatal??n??!0;i.addIssue({code:"custom",...o,fatal:l})}});if(!a){const s=NN(e,r),o=s.fatal??n??!0;i.addIssue({code:"custom",...s,fatal:o})}}):rp.create()}const Die={object:pr.lazycreate};var Lt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Lt||(Lt={}));const Aie=(t,e={message:`Input not instance of ${t.name}`})=>h9(n=>n instanceof t,e),kt=rs.create,Fe=$l.create,Nie=mb.create,Rie=zl.create,Uo=Mm.create,Iie=eu.create,Oie=db.create,Pie=Fm.create,Lie=Bm.create,Mie=rp.create,Fie=Gc.create,Bie=Bo.create,Uie=pb.create,jc=os.create,xt=pr.create,$ie=pr.strictCreate,Hc=Um.create,g9=Ey.create,zie=$m.create,Qk=eo.create,_9=zm.create,qie=fb.create,Gie=tu.create,jie=Pd.create,Hie=qm.create,hb=Gm.create,jn=ql.create,Vie=jm.create,Wie=ip.create,RN=fs.create,Yie=Vs.create,Kie=Gl.create,Qie=fs.createWithPreprocess,Xie=Lh.create,Zie=()=>kt().optional(),Jie=()=>Fe().optional(),eae=()=>Uo().optional(),tae={string:(t=>rs.create({...t,coerce:!0})),number:(t=>$l.create({...t,coerce:!0})),boolean:(t=>Mm.create({...t,coerce:!0})),bigint:(t=>zl.create({...t,coerce:!0})),date:(t=>eu.create({...t,coerce:!0}))},nae=Ot,Ln=Object.freeze(Object.defineProperty({__proto__:null,BRAND:wie,DIRTY:xd,EMPTY_PATH:aie,INVALID:Ot,NEVER:nae,OK:wi,ParseStatus:fi,Schema:tn,ZodAny:rp,ZodArray:os,ZodBigInt:zl,ZodBoolean:Mm,ZodBranded:Kk,ZodCatch:Vm,ZodDate:eu,ZodDefault:Hm,ZodDiscriminatedUnion:Ey,ZodEffects:fs,ZodEnum:ql,ZodError:sa,get ZodFirstPartyTypeKind(){return Lt},ZodFunction:Pd,ZodIntersection:$m,ZodIssueCode:Me,ZodLazy:qm,ZodLiteral:Gm,ZodMap:fb,ZodNaN:mb,ZodNativeEnum:jm,ZodNever:Bo,ZodNull:Bm,ZodNullable:Gl,ZodNumber:$l,ZodObject:pr,ZodOptional:Vs,ZodParsedType:Je,ZodPipeline:Lh,ZodPromise:ip,ZodReadonly:Wm,ZodRecord:zm,ZodSchema:tn,ZodSet:tu,ZodString:rs,ZodSymbol:db,ZodTransformer:fs,ZodTuple:eo,ZodType:tn,ZodUndefined:Fm,ZodUnion:Um,ZodUnknown:Gc,ZodVoid:pb,addIssueToContext:We,any:Mie,array:jc,bigint:Rie,boolean:Uo,coerce:tae,custom:h9,date:Iie,datetimeRegex:f9,defaultErrorMap:np,discriminatedUnion:g9,effect:RN,enum:jn,function:jie,getErrorMap:cb,getParsedType:wo,instanceof:Aie,intersection:zie,isAborted:OC,isAsync:Lm,isDirty:PC,isValid:Jc,late:Die,lazy:Hie,literal:hb,makeIssue:ub,map:qie,nan:Nie,nativeEnum:Vie,never:Bie,null:Lie,nullable:Kie,number:Fe,object:xt,get objectUtil(){return IC},oboolean:eae,onumber:Jie,optional:Yie,ostring:Zie,pipeline:Xie,preprocess:Qie,promise:Wie,quotelessJson:rie,record:_9,set:Gie,setErrorMap:iie,strictObject:$ie,string:kt,symbol:Oie,transformer:RN,tuple:Qk,undefined:Pie,union:Hc,unknown:Fie,get util(){return bn},void:Uie},Symbol.toStringTag,{value:"Module"}));function Dg(t,e){return!t||t&&t[e]===0?"initial":t[e]!==void 0?`${t[e]}px solid ${t?.color??"black"}`:"initial"}function di({className:t,background:e,backgroundColor:n,padding:r={top:0,right:0,bottom:0,left:0},width:i,align:a,children:s,border:o,borderRadius:l,isParent:c=!0,overflow:u="visible"}){const d=t?`a${t}`:"";return f.jsx("table",{className:t,width:i,border:0,cellSpacing:"0",cellPadding:"0",style:{width:i,minWidth:i,backgroundColor:n??void 0,background:e??void 0,borderRadius:l??"initial",borderTop:Dg(o,"top"),borderBottom:Dg(o,"bottom"),borderLeft:Dg(o,"left"),borderRight:Dg(o,"right"),overflow:u,borderCollapse:"initial"},children:f.jsxs("tbody",{children:[f.jsxs("tr",{height:r.top,style:{height:`${r.top}px`},className:c?`t${t}`:`it${t}`,children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),f.jsxs("tr",{children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{className:d,align:a,children:s}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]}),f.jsxs("tr",{height:r.bottom,style:{height:`${r.bottom}px`},className:c?`b${t}`:`ib${t}`,children:[f.jsx("td",{style:{width:`${r.left}px`},className:c?`l${t}`:`il${t}`}),f.jsx("td",{}),f.jsx("td",{style:{width:`${r.right}px`},className:c?`r${t}`:`ir${t}`})]})]})})}const Ko=(t,e)=>{const n=/#([0-9a-fA-F]{3,6})\b/;return n.test(t)?t.replace(n,e):t.trim()===""?e:t.replace(/^(\S+)/,`$1 ${e}`)};function gb(t){const e=t?.shape??"rectangle";if(typeof e=="string")switch(e){case"rectangle":return;case"pill":return 9999;default:return}else if(typeof e=="object"&&e!==null){const{topLeft:n=0,topRight:r=0,bottomLeft:i=0,bottomRight:a=0}=e;return`${r}px ${n}px ${a}px ${i}px`}}function b9(t,e){const n=new RegExp(`${e}\\s*:\\s*([^;"']+)`,"gi"),r=[];let i;for(;(i=n.exec(t))!==null;)r.push(i[1].trim());return r}function is(t){const n=new DOMParser().parseFromString(t,"text/html");return n.body.querySelectorAll("*").forEach(r=>{r.childNodes.forEach(i=>{if(i.nodeType===Node.TEXT_NODE){let a=i.textContent??"";a=a.replace(/ {2,}/g,o=>" ".repeat(o.length-1)+" ");const s=document.createElement("span");s.innerHTML=a,r.replaceChild(s.firstChild,i)}})}),n.body.innerHTML}function rae(t){let e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=(e>>>0)*16777619;return e>>>0}function iae(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";if(t===0)return"a";let n="";for(;t>0;)n=e[t%62]+n,t=Math.floor(t/62);return n}function Mn(t){const e=rae(t);return`b${iae(e)}`}const IN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),y9=xt({style:xt({textAlign:jn(["left","center","right"]).optional().nullable(),padding:IN,mobilePadding:IN,backgroundColor:kt().optional()}).passthrough().optional().nullable(),props:xt({size:Fe().gt(0).optional().nullable(),shape:jn(["circle","square","rounded"]).optional().nullable(),imageUrl:kt().optional().nullable(),alt:kt().optional().nullable()}).optional().nullable()}).passthrough(),Mc={size:64,imageUrl:"",alt:"",shape:"square"};function v9({style:t,props:e,blockId:n}){const r=e?.size??Mc.size,i=e?.imageUrl??Mc.imageUrl,a=e?.alt??Mc.alt;e?.shape??Mc.shape;const s=yy(),o={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},l=f.jsx(di,{isParent:!1,children:f.jsxs(f.Fragment,{children:[f.jsx("img",{alt:a??"",src:i??"",width:r,style:{width:r,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:t?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:s.uploading&&s.id===n?.5:1,transition:"opacity 0.2s ease-in-out"}}),s.uploading&&s.id===n&&f.jsx("div",{style:o,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]})}),c=Mn(n);return f.jsx(di,{className:`${c}`,padding:t.padding,backgroundColor:t.backgroundColor,align:t.textAlign,width:"100%",children:l})}function Ga({title:t,children:e}){return f.jsxs(Rm,{sx:{padding:"0!important",paddingTop:"1rem!important"},children:[f.jsx(mr,{sx:{fontWeight:"bold",mb:2,pb:1,color:"text.primary",fontSize:"1.25rem",borderBottom:n=>`1px solid ${n.palette.divider}`},children:t}),f.jsx(Fn,{spacing:2,gap:1,mb:3,children:e})]})}const Xn=({label:t})=>{const e=kr();return t?f.jsx("p",{style:{fontWeight:"bold",color:e.palette.text.primary},children:t}):null},mi=({children:t})=>f.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.3rem"},children:t.map(e=>e)}),aae=Re(bt)(({theme:t})=>({display:"flex",alignItems:"center",border:`1px solid ${t.palette.divider}`,borderRadius:"8px",padding:"4px",minWidth:58,maxWidth:"fit-content",backgroundColor:t.palette.background.paper,"&:hover":{borderColor:t.palette.primary.main},"&:focus-within":{borderColor:t.palette.primary.main,boxShadow:`0 0 0 1px ${t.palette.primary.main}`}})),sae=Re("input")(({theme:t})=>({border:"none",outline:"none",background:"transparent",textAlign:"center",width:"27px",minWidth:"27px",maxWidth:"27px",padding:"0!important",lineHeight:"normal",fontSize:"0.9rem",color:t.palette.text.primary,"&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}})),ON=Re(vt)(({theme:t})=>({padding:"0",color:t.palette.primary.main,"&:hover":{backgroundColor:je(t.palette.primary.main,.04)},"& .MuiSvgIcon-root":{fontSize:14}}));function yr({iconLabel:t,label:e,value:n,setValue:r,units:i,min:a=0,max:s,step:o=void 0,marks:l=!0,...c}){const u=n??a,[d,p]=D.useState(u.toString()),m=E=>{let S=E;S<a&&(S=a),s!==void 0&&S>s&&(S=s),r(S),p(S.toString())},h=E=>{const S=E.target.value;if(p(S),S!==""){const k=Number(S);isNaN(k)||k>=a&&r(k)}},g=()=>{if(d===""||isNaN(Number(d)))p(u.toString());else{const E=Number(d);m(E)}},_=E=>{E.key==="Enter"&&g()};D.useEffect(()=>{p((n??a).toString())},[n,a]);const b=()=>{const E=u+1;m(E)},y=()=>{const E=u-1;m(E)},v=(E,S)=>{typeof S=="number"&&r(S)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:e}),f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:2,justifyContent:"space-between",width:"100%",children:[f.jsx(bt,{sx:{minWidth:24,lineHeight:1,flexShrink:0},children:t}),f.jsx(fte,{...c,value:u,min:a,max:s||1e3,step:o,color:"primary",marks:l,onChange:v}),f.jsxs(aae,{children:[f.jsx(sae,{type:"number",value:d,onChange:h,onBlur:g,onKeyDown:_,min:a,max:s,step:o}),f.jsxs(bt,{sx:{display:"flex",flexDirection:"column",ml:.5},children:[f.jsx(ON,{onClick:b,disabled:s!==void 0&&u>=s,children:f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})}),f.jsx(ON,{onClick:y,disabled:u<=a,children:f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",style:{transform:"rotate(180deg)"},children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 9l6-6l6 6"})})})]})]}),f.jsx(mr,{variant:"caption",color:"text.secondary",sx:{fontSize:"16px",ml:"4px!important"},children:i})]})]})}function Nc({label:t,defaultValue:e,onChange:n,...r}){const[i,a]=D.useState(e??0);return e!=i&&a(e),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(yr,{value:i??0,setValue:s=>{a(s),n(s)},...r})]})}function Xk(t,e){const n=D.useRef(null),r=D.useRef(t),i=D.useRef([]);r.current=t;const a=D.useCallback((...s)=>{i.current=s,n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{r.current(...s),n.current=null},e)},[e]);return a.flush=D.useCallback(()=>{n.current&&(clearTimeout(n.current),n.current=null,r.current(...i.current))},[]),a}const Ld=36,Zk=8,Sy={width:"100%","& .MuiInputBase-root":{"&:not(.MuiInputBase-multiline)":{height:`${Ld}px`}},"& .MuiOutlinedInput-root":{borderRadius:`${Zk}px`,"&:not(.MuiInputBase-multiline)":{height:`${Ld}px`}},"& .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",height:"unset"}},E9={width:"100%",height:`${Ld}px`,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",display:"flex",alignItems:"center",borderRadius:`${Zk}px`};function nu({helperText:t,label:e,placeholder:n,rows:r,InputProps:i,defaultValue:a,onChange:s}){const[o,l]=D.useState(a);D.useEffect(()=>{o!==a&&l(a)},[a]);const c=Xk(d=>{s(d)},150),u=typeof r=="number"&&r>1;return f.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[f.jsx(Xn,{label:e}),f.jsx(wh,{fullWidth:!0,multiline:u,minRows:r,variant:"outlined",placeholder:n,helperText:t,InputProps:i,value:o,sx:Sy,onChange:d=>{const p=d.target.value;l(p),c(p)},onBlur:()=>{c.flush()}})]})}function oae({onClick:t,disabled:e,primary:n=!1}){const{t:r}=pn.useTranslation("inspector");return f.jsx(vt,{"aria-label":r("inputs.common.close"),onClick:t,disabled:e,sx:{position:"absolute",right:8,top:8,color:i=>n?"brand.blue":i.palette.grey[500],"&:hover":{opacity:.8}},children:f.jsx(Yk,{})})}function lae({imageUrl:t,saving:e=!1}){return f.jsxs(CX,{sx:{position:"relative"},children:[e&&f.jsx(Fn,{justifyContent:"center",alignItems:"center",sx:{position:"absolute",top:7,left:0,width:"100%",height:"314px",zIndex:20,backgroundColor:"#212121AA",mb:1},children:f.jsx(Zs,{size:48,thickness:6,color:"inherit",sx:{color:"white"}})}),f.jsx(RX,{component:"img",sx:{objectFit:"contain",width:"100%",height:"326px"},image:t,alt:"Generated Image"})]})}function cae({value:t,onChange:e,disabled:n}){return f.jsxs(f.Fragment,{children:[f.jsx(mr,{sx:{fontSize:"14px",fontWeight:700},children:"Image description"}),f.jsx(wh,{disabled:n,autoFocus:!0,margin:"dense",id:"prompt",placeholder:"Enter a detailed description here...",type:"text",fullWidth:!0,multiline:!0,rows:4,variant:"outlined",value:t,onChange:r=>e(r.target.value),sx:{mt:.5,"& .MuiOutlinedInput-root":{borderRadius:"8px"}}})]})}const uae=t=>({400:{code:400,title:t.title||"Invalid Request",message:t.message||"The request was invalid. Please check your input and try again.",action:t.action||"Modify your prompt and try again"},401:{code:401,title:t.title||"Authentication Required",message:t.message||"You need to be authenticated to perform this action.",action:t.action||"Please log in and try again"},403:{code:403,title:t.title||"Access Denied",message:t.message||"You don't have permission to perform this action.",action:t.action||"Contact support if you believe this is a mistake"},404:{code:404,title:t.title||"Not Found",message:t.message||"The requested resource was not found.",action:t.action||"Try again or use a different prompt"},422:{code:422,title:t.title||"Invalid Input",message:t.message||"The provided input cannot be processed.",action:t.action||"Modify your prompt and try again"},429:{code:429,title:t.title||"Too Many Requests",message:t.message||"You've made too many requests. Please wait a moment.",action:t.action||"Please wait a few minutes before trying again"},500:{code:500,title:t.title||"Server Error",message:t.message||"An unexpected error occurred on our servers.",action:t.action||"Please try again later"},502:{code:502,title:t.title||"Bad Gateway",message:t.message||"The server received an invalid response.",action:t.action||"Please try again later"},503:{code:503,title:t.title||"Service Unavailable",message:t.message||"The service is temporarily unavailable.",action:t.action||"Please try again later"}})[t.code]||{code:t.code,title:"Unexpected Error",message:"An unexpected error occurred.",action:"Please try again later"};function S9({src:t,style:e}){const[n,r]=D.useState(!1),[i,a]=D.useState(!1),[s,o]=D.useState(""),[l,c]=D.useState(null),[u,d]=D.useState(!1),[p,m]=D.useState(null),[h,g]=D.useState(!1),_=()=>{r(!0),m(null)},b=()=>{i||(r(!1),a(!1),c(null),o(""),d(!1),m(null),g(!1))},y=()=>{const S=l&&!u?"store-ai-image":"request-ai-image",k=l&&!u?l:s;m(null),S==="store-ai-image"?(g(!0),a(!1),setTimeout(()=>{a(!1),b()},2e3)):a(!0),window.dispatchEvent(new CustomEvent(S,{detail:k}))},v=()=>{d(!0),c(null),m(null),g(!1)};D.useEffect(()=>{const S=k=>{const{detail:x}=k;if(a(!1),x.error){m(uae(x.error));return}if(!x.success||!x.url){m({code:0,title:"Generation Failed",message:"Failed to generate the image.",action:"Please try again"});return}c(x.url),d(!1)};return window.addEventListener("generated-image",S),()=>{window.removeEventListener("generated-image",S)}},[]),D.useEffect(()=>{b()},[t]);const E=!l||u;return f.jsxs(f.Fragment,{children:[f.jsx(ia,{style:e,startIcon:f.jsx(kN,{className:"w-4 h-4"}),variant:"contained",onClick:_,children:"Generate"}),f.jsx(yZ,{open:n,onClose:b,maxWidth:"sm",fullWidth:!0,className:"backgroundTranspatent",children:f.jsxs("form",{style:{background:"white"},onSubmit:S=>{S.preventDefault(),y()},children:[f.jsxs($Z,{sx:{fontWeight:700,fontSize:"24px",color:p?"#EF4444":"inherit"},children:[p?"Image generation failed":i?"Generating Your Image":l?"Your Image is ready":"Create your image",f.jsx(oae,{onClick:b,disabled:i,primary:!0})]}),f.jsxs(RZ,{children:[f.jsx(MZ,{sx:{pb:1,color:p?"#7F1D1D":"inherit"},children:p?"Try simplifying your prompt or describing something else. If the issue persists, please try again later.":i?"Hang tight! This may take a few seconds as we bring your image to life.":E?"Describe the image you want us to generate. Be specific to get the best results.":"Here’s your image. Not quite right? You can tweak it and try again."}),l&&!u?f.jsxs(Fn,{sx:{position:"relative"},children:[f.jsx(lae,{imageUrl:l,saving:h}),f.jsxs(Il,{variant:"outlined",severity:"warning",icon:!1,children:[f.jsx("b",{children:"IMPORTANT:"})," Regenerating will discard this image, and it won't be saved in your gallery. To keep it, make sure to ",f.jsx("b",{children:"Insert the image"})," first."]})]}):i&&!l?f.jsx(Fn,{justifyContent:"center",alignItems:"center",sx:{backgroundColor:S=>S.palette.mainColor[50],height:"326px",width:"100%"},children:f.jsx(Zs,{size:48,thickness:6})}):f.jsx(cae,{value:s,onChange:o,disabled:i})]}),!i&&f.jsxs(CZ,{className:"p-6",children:[l&&!u&&f.jsx(ia,{startIcon:f.jsx(Yre,{className:"w-4 h-4"}),onClick:v,variant:"outlined",disabled:i,children:"Regenerate"}),!l&&!u&&f.jsx(ia,{className:"primary",onClick:b,variant:"text",disabled:u,children:"Cancel"}),f.jsxs(ia,{startIcon:l&&!u?f.jsx(Dre,{className:"w-4 h-4"}):f.jsx(kN,{className:"w-4 h-4"}),onClick:y,variant:"contained",disabled:!s||s?.length<20,children:[l&&!u?"Insert Image":"Generate image",i&&f.jsx(Zs,{size:16,className:"ml-2"})]})]})]})})]})}const dae=({className:t,...e})=>f.jsx("svg",{width:"15",height:"10",viewBox:"0 0 24 12",className:t,"aria-hidden":"true",focusable:"false",...e,children:f.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3",d:"m6 3l6 6l6-6"})}),pae=Re(Vk)(({theme:t})=>({fontFamily:t.typography.fontFamily,color:t.palette.text.primary,backgroundColor:t.palette.background.paper,width:"100%",height:`${Ld}px`,"&.MuiInputBase-root, &.MuiOutlinedInput-root":{height:`${Ld}px`,minHeight:`${Ld}px`,boxSizing:"border-box",borderRadius:`${Zk}px`},"&& .MuiSelect-select, && .MuiInputBase-input":{paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"36px",lineHeight:"20px",minHeight:"unset"},"& .MuiSelect-icon":{color:t.palette.secondary.main,right:12,top:"calc(50% - 4px)",transition:"transform 200ms ease",pointerEvents:"none"},"& .MuiSelect-iconOpen":{transform:"rotate(180deg)"},"&:hover":{backgroundColor:t.palette.action.hover},"&.Mui-focused":{borderColor:t.palette.primary.main}})),jl=D.forwardRef((t,e)=>{const n=kr();return f.jsx(pae,{ref:e,...t,IconComponent:dae,MenuProps:{PaperProps:{sx:{backgroundColor:n.palette.background.paper,color:n.palette.text.primary}},...t.MenuProps}})});jl.displayName="CustomSelect";const fae=({defaultValue:t,onChange:e,values:n})=>{const r=Zl(),{t:i}=pn.useTranslation("inspector"),a=()=>f.jsx(Dm,{viewBox:"0 0 18 18",fontSize:"small",children:f.jsx("path",{d:"M9.00015 6.75V8.25M9.00015 11.25H9.00765M3.804 14.25H14.1963C15.351 14.25 16.0727 13 15.4953 12L10.2992 3C9.72184 2 8.27846 2 7.70111 3L2.50496 12C1.92761 13 2.6493 14.25 3.804 14.25Z",stroke:"#F59E0B",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})}),s=H=>{if(!H)return{url:"",repeat:"no-repeat",position:"center center",size:"cover"};const Z=H.match(/url\("([^"]+)"\)/),ee=Z?Z[1]:"";let se="no-repeat";H.includes("repeat-x")?se="repeat-x":H.includes("repeat-y")?se="repeat-y":H.includes("repeat")&&!H.includes("no-repeat")&&(se="repeat");let ie="center center";const ve=["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"];for(const Ee of ve)if(H.includes(Ee)){ie=Ee;break}let he="cover";return H.includes("contain")?he="contain":H.includes("auto")&&(he="auto"),{url:ee,repeat:se,position:ie,size:he}},o=H=>H.url?`url("${H.url}") ${H.repeat} ${H.position} / ${H.size}`:"",[l,c]=D.useState(t||null),[u,d]=D.useState(s(t)),[p,m]=D.useState(!1),[h,g]=D.useState(window.emailAIGeneration||!1),[,_]=D.useState(null),[b,y]=D.useState(s(t).url||""),[v,E]=D.useState(!1),[S,k]=D.useState(""),[x,w]=D.useState(!1),N=D.useRef(null),R=vy(),[T,B]=D.useState(()=>sessionStorage.getItem("hideBackgroundImageWarning")==="true"),A=(H,Z)=>{const ee={...u,...H};if(d(ee),ee.url){const se=o(ee);c(se),e(se,Z)}else console.error("Update params error: ",ee)},L=(H,Z)=>{if(!H)return!1;const ee=H?.toLowerCase(),se=ee.includes(".svg")||ee.includes("svg"),ie=Z&&(Z.includes("image/svg+xml")||Z.includes("svg"));return se||!!ie},M=async H=>{try{E(!0),k(""),w(!1);try{new URL(H)}catch{return k("Invalid URL format"),!1}const Z=new AbortController,ee=setTimeout(()=>Z.abort(),1e4);try{const se=await fetch(H,{method:"HEAD",signal:Z.signal});if(clearTimeout(ee),!se.ok)return k(`HTTP ${se.status}: ${se.statusText}`),!1;const ie=se.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(Ee=>ie&&ie.toLowerCase().includes(Ee.toLowerCase()))?(L(H,ie)&&w(!0),k(""),!0):(k("URL does not point to an image"),!1)}catch(se){return clearTimeout(ee),se.name==="AbortError"?(k("Request timeout - URL took too long to respond"),!1):new Promise(ie=>{const ve=new Image,he=setTimeout(()=>{k("Request timeout - URL took too long to respond"),ie(!1)},1e4);ve.onload=()=>{clearTimeout(he),L(H)&&w(!0),k(""),ie(!0)},ve.onerror=()=>{clearTimeout(he),k("Cannot access image - CORS policy, network error, or invalid URL"),ie(!1)},ve.src=H})}}catch{return k("Unexpected error occurred while validating URL"),!1}finally{E(!1)}},O=async()=>{b.trim()&&await M(b.trim())&&A({url:b.trim()})},$=H=>{H.key==="Enter"&&O()},z=H=>{y(H.target.value),S&&k(""),x&&w(!1)},X=H=>{const Z=["image/png","image/jpeg","image/gif"],se=Array.from(H),ie=se.filter(he=>Z.includes(he.type)&&he.size<=5242880);if(ie.length!==se.length&&alert(i("inputs.common.invalidFiles")),ie.length===0)return;const ve=ie.map(he=>new Promise(Ee=>{const De=new FileReader;De.onload=ft=>Ee(ft.target?.result),De.readAsDataURL(he)}));Promise.all(ve).then(he=>{const Ee={images:he,id:r||"",styles:n};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:Ee})),Od(!0,r||"")})},W=H=>{H.preventDefault(),m(!0)},te=()=>{m(!1)},pe=H=>{H.preventDefault(),m(!1);const Z=H.dataTransfer.files;X(Z)},ye=()=>{const H=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(H)},ae=()=>{d({url:"",repeat:"no-repeat",position:"center center",size:"cover"}),c(null),e(null),y(""),w(!1)},oe=H=>{switch(H){case"top left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M5.26523 9.79159L5.17094 5.17183M5.17094 5.17183L9.79071 5.26611M5.17094 5.17183L10.8278 10.8287",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M4.7998 7.33333L7.9998 4M7.9998 4L11.1998 7.33333M7.9998 4V12",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"top right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M6.20841 5.2662L10.8282 5.17192M10.8282 5.17192L10.7339 9.79169M10.8282 5.17192L5.17132 10.8288",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M7.33333 11.2002L4 8.00019M4 8.00019L7.33333 4.8002M4 8.00019L12 8.0002",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"center right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M8.66667 4.7998L12 7.9998M12 7.9998L8.66667 11.1998M12 7.9998L4 7.9998",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom left":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M9.79062 10.7348L5.17085 10.8291M5.17085 10.8291L5.26513 6.20929M5.17085 10.8291L10.8277 5.1722",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom center":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M11.1998 8.66667L7.9998 12M7.9998 12L4.7998 8.66667M7.9998 12L7.99981 4",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});case"bottom right":return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M10.7338 6.20938L10.8281 10.8291M10.8281 10.8291L6.20831 10.7349M10.8281 10.8291L5.17122 5.17229",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});default:return f.jsx("svg",{style:{color:"currentColor"},width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M2.40039 5.20039V2.40039M2.40039 2.40039H5.20039M2.40039 2.40039L5.90039 5.90039M13.6004 5.20039V2.40039M13.6004 2.40039H10.8004M13.6004 2.40039L10.1004 5.90039M2.40039 10.8004V13.6004M2.40039 13.6004H5.20039M2.40039 13.6004L5.90039 10.1004M13.6004 13.6004L10.1004 10.1004M13.6004 13.6004V10.8004M13.6004 13.6004H10.8004",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})})}},le=H=>({"top left":i("inputs.backgroundImage.positions.topLeft"),"top center":i("inputs.backgroundImage.positions.topCenter"),"top right":i("inputs.backgroundImage.positions.topRight"),"center left":i("inputs.backgroundImage.positions.centerLeft"),"center center":i("inputs.backgroundImage.positions.center"),"center right":i("inputs.backgroundImage.positions.centerRight"),"bottom left":i("inputs.backgroundImage.positions.bottomLeft"),"bottom center":i("inputs.backgroundImage.positions.bottomCenter"),"bottom right":i("inputs.backgroundImage.positions.bottomRight")})[H]??i("inputs.backgroundImage.positions.center");return D.useEffect(()=>{const H=ve=>{const{detail:he}=ve;Od(!1,he.id||""),A({url:he.url},he.styles),U6(!1),y(he.url)},Z=ve=>{Od(ve?.detail?.uploading??!1,ve?.detail?.id??"")},ee=ve=>{const{detail:he}=ve;g(he)},se=()=>{N?.current?.click()},ie=ve=>{const{detail:he}=ve;if(he&&!he.includes("url("))A({url:he},he.styles),y(he);else{const Ee=s(he);d(Ee),c(he),e(he),y(Ee.url)}};return window.addEventListener("email-builder-set-image",ie),window.addEventListener("email-builder-upload-image-receive",H),window.addEventListener("email-builder-ai-generation",ee),window.addEventListener("email-builder-upload-file",se),window.addEventListener("email-builder-toggle-upload-file",Z),()=>{window.removeEventListener("email-builder-ai-generation",ee),window.removeEventListener("email-builder-upload-image-receive",H),window.removeEventListener("email-builder-set-image",ie),window.removeEventListener("email-builder-upload-file",se),window.removeEventListener("email-builder-toggle-upload-file",Z)}},[u]),D.useEffect(()=>{t&&w(L(u.url))},[t,u.url]),D.useEffect(()=>{if(t!==l){const H=s(t);d(H),c(t||null),y(H.url||"")}},[t]),f.jsxs(mi,{children:[f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.label")}),!T&&f.jsx(Bn,{title:"Some email clients don’t support background images. Add a background color as fallback.",placement:"top",children:f.jsx(vt,{size:"small",sx:{p:0},children:f.jsx(a,{})})})]}),f.jsx("div",{style:{display:"flex",gap:8},children:R?f.jsxs(bt,{sx:{width:"100%"},children:[f.jsxs(Fn,{direction:"row",spacing:1,children:[f.jsx(wh,{fullWidth:!0,placeholder:i("inputs.image.urlPlaceholder"),value:b,onChange:z,onKeyPress:$,error:!!S,disabled:v,sx:Sy}),f.jsx(ia,{variant:"contained",onClick:O,disabled:!b.trim()||v,sx:{minWidth:"auto",px:2,position:"relative"},children:v?f.jsx(Zs,{size:20,color:"inherit"}):"Add"})]}),S&&f.jsx(Il,{severity:"error",sx:{mt:1,fontSize:"0.875rem",maxHeight:"70px"},children:S}),x&&f.jsx(Il,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},action:f.jsx(vt,{"aria-label":i("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{w(!1)},children:f.jsx(Yk,{fontSize:"inherit"})}),children:i("inputs.common.svgWarning")}),u.url&&f.jsxs(bt,{sx:{position:"relative",maxWidth:"50%",display:"block",margin:"0.5rem auto 0 auto"},children:[f.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),f.jsx(vt,{onClick:ae,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:f.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]})]}):f.jsxs(f.Fragment,{children:[u.url&&f.jsxs(bt,{sx:{position:"relative",maxWidth:"40%"},children:[f.jsx("div",{style:{borderRadius:"8px",border:"2px solid #E5E5E5",height:"100%",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"},children:f.jsx("img",{src:u.url||"",alt:"",style:{width:"100%",objectFit:"contain",aspectRatio:"1 / 1",height:"100%"}})}),f.jsx(vt,{onClick:ae,sx:{position:"absolute",top:5,right:5,backgroundColor:"white",color:"error.main",padding:1,width:35,height:35,"&:hover":{backgroundColor:"#f2e7e7"}},size:"small",children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",children:f.jsx("path",{d:"M16 9.5V19.5H8V9.5H16ZM14.5 3.5H9.5L8.5 4.5H5V6.5H19V4.5H15.5L14.5 3.5ZM18 7.5H6V19.5C6 20.6 6.9 21.5 8 21.5H16C17.1 21.5 18 20.6 18 19.5V7.5Z",fill:"#EF4444"})})})]}),f.jsxs(bt,{onDragOver:W,onDragLeave:te,onDrop:pe,sx:{width:"100%",minWidth:"40%",border:"2px solid",borderColor:p?"primary.main":"#E5E5E5",borderRadius:"8px",padding:"24px 8px 36px 8px",textAlign:"center",bgcolor:p?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[f.jsx(bt,{sx:{display:"flex",justifyContent:"center"},children:f.jsx(c9,{sx:{fontSize:32,color:"primary"}})}),f.jsxs("label",{style:{cursor:"pointer"},children:[f.jsx("input",{ref:N,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:H=>{const Z=H.target.files;Z&&Z.length>0&&X(Array.from(Z))}}),f.jsx(mr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:i("inputs.common.uploadFile")}),f.jsxs(mr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",i("inputs.common.dragAndDrop")]})]}),f.jsx(mr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:i("inputs.common.fileInfo")})]})]})}),u.url&&f.jsxs(bt,{sx:{mt:2},children:[f.jsxs(bt,{sx:{mb:2},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.fillType")}),f.jsxs(Dh,{value:u.size,exclusive:!0,onChange:(H,Z)=>{Z!==null&&A({size:Z})},size:"small",fullWidth:!0,children:[f.jsx(kn,{value:"cover",children:i("inputs.backgroundImage.fillOptions.cover")}),f.jsx(kn,{value:"contain",children:i("inputs.backgroundImage.fillOptions.contain")}),f.jsx(kn,{value:"auto",children:i("inputs.backgroundImage.fillOptions.auto")})]})]}),f.jsxs(Fn,{direction:"row",spacing:2,sx:{mb:2},children:[f.jsxs("div",{style:{flex:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.repeat")}),f.jsxs(jl,{style:{width:"100%"},value:u.repeat,size:"small",onChange:H=>A({repeat:H.target.value}),children:[f.jsx(ts,{value:"no-repeat",children:i("inputs.backgroundImage.repeatOptions.none")}),f.jsx(ts,{value:"repeat",children:i("inputs.backgroundImage.repeatOptions.repeat")}),f.jsx(ts,{value:"repeat-x",children:i("inputs.backgroundImage.repeatOptions.repeatX")}),f.jsx(ts,{value:"repeat-y",children:i("inputs.backgroundImage.repeatOptions.repeatY")})]})]}),f.jsxs("div",{style:{flex:1},children:[f.jsx(Xn,{label:i("inputs.backgroundImage.position")}),f.jsx(jl,{style:{width:"100%"},value:u.position,size:"small",onChange:H=>A({position:H.target.value}),renderValue:H=>f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1,paddingRight:"1rem"},children:[oe(H),le(H)]}),children:["top left","top center","top right","center left","center center","center right","bottom left","bottom center","bottom right"].map(H=>f.jsx(ts,{sx:{padding:"0.5rem 1rem 0.5rem 0.5rem!important "},value:H,children:f.jsxs(bt,{sx:{display:"flex",alignItems:"center",gap:1},children:[oe(H),le(H)]})},H))})]})]})]}),!R&&x&&f.jsx(Il,{severity:"warning",sx:{mt:1,fontSize:"0.875rem"},children:i("inputs.common.svgWarning")}),$6()&&!R&&f.jsxs(f.Fragment,{children:[f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:1,sx:{mt:2},children:[f.jsx(Fo,{sx:{flexGrow:1}}),f.jsx(mr,{sx:{color:"text.secondary"},children:"or"}),f.jsx(Fo,{sx:{flexGrow:1}})]}),f.jsxs(Fn,{flexDirection:"row",gap:2,sx:{mt:2},children:[f.jsx(ia,{variant:"outlined",onClick:ye,startIcon:f.jsx(o9,{}),sx:{width:"100%"},children:"Browse gallery"}),h&&f.jsx(S9,{src:u.url,style:{width:"100%",margin:0}})]})]})]})};function Ip(){return(Ip=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function Ty(t,e){if(t==null)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)e.indexOf(n=a[r])>=0||(i[n]=t[n]);return i}function Ym(t){var e=D.useRef(t),n=D.useRef(function(r){e.current&&e.current(r)});return e.current=t,n.current}var Km=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t<e?e:t},em=function(t){return"touches"in t},MC=function(t){return t&&t.ownerDocument.defaultView||self},PN=function(t,e,n){var r=t.getBoundingClientRect(),i=em(e)?(function(a,s){for(var o=0;o<a.length;o++)if(a[o].identifier===s)return a[o];return a[0]})(e.touches,n):e;return{left:Km((i.pageX-(r.left+MC(t).pageXOffset))/r.width),top:Km((i.pageY-(r.top+MC(t).pageYOffset))/r.height)}},LN=function(t){!em(t)&&t.preventDefault()},T9=D.memo(function(t){var e=t.onMove,n=t.onKey,r=Ty(t,["onMove","onKey"]),i=D.useRef(null),a=Ym(e),s=Ym(n),o=D.useRef(null),l=D.useRef(!1),c=D.useMemo(function(){var m=function(_){LN(_),(em(_)?_.touches.length>0:_.buttons>0)&&i.current?a(PN(i.current,_,o.current)):g(!1)},h=function(){return g(!1)};function g(_){var b=l.current,y=MC(i.current),v=_?y.addEventListener:y.removeEventListener;v(b?"touchmove":"mousemove",m),v(b?"touchend":"mouseup",h)}return[function(_){var b=_.nativeEvent,y=i.current;if(y&&(LN(b),!(function(E,S){return S&&!em(E)})(b,l.current)&&y)){if(em(b)){l.current=!0;var v=b.changedTouches||[];v.length&&(o.current=v[0].identifier)}y.focus(),a(PN(y,b,o.current)),g(!0)}},function(_){var b=_.which||_.keyCode;b<37||b>40||(_.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},g]},[s,a]),u=c[0],d=c[1],p=c[2];return D.useEffect(function(){return p},[p]),D.createElement("div",Ip({},r,{onTouchStart:u,onMouseDown:u,className:"react-colorful__interactive",ref:i,onKeyDown:d,tabIndex:0,role:"slider"}))}),Jk=function(t){return t.filter(Boolean).join(" ")},C9=function(t){var e=t.color,n=t.left,r=t.top,i=r===void 0?.5:r,a=Jk(["react-colorful__pointer",t.className]);return D.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},D.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:e}}))},Xr=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n},mae=function(t){return yae(FC(t))},FC=function(t){return t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Xr(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?Xr(parseInt(t.substring(6,8),16)/255,2):1}},hae=function(t){return bae(_ae(t))},gae=function(t){var e=t.s,n=t.v,r=t.a,i=(200-e)*n/100;return{h:Xr(t.h),s:Xr(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:Xr(i/2),a:Xr(r,2)}},BC=function(t){var e=gae(t);return"hsl("+e.h+", "+e.s+"%, "+e.l+"%)"},_ae=function(t){var e=t.h,n=t.s,r=t.v,i=t.a;e=e/360*6,n/=100,r/=100;var a=Math.floor(e),s=r*(1-n),o=r*(1-(e-a)*n),l=r*(1-(1-e+a)*n),c=a%6;return{r:Xr(255*[r,o,s,s,l,r][c]),g:Xr(255*[l,r,r,o,s,s][c]),b:Xr(255*[s,s,l,r,r,o][c]),a:Xr(i,2)}},Ag=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},bae=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=i<1?Ag(Xr(255*i)):"";return"#"+Ag(e)+Ag(n)+Ag(r)+a},yae=function(t){var e=t.r,n=t.g,r=t.b,i=t.a,a=Math.max(e,n,r),s=a-Math.min(e,n,r),o=s?a===e?(n-r)/s:a===n?2+(r-e)/s:4+(e-n)/s:0;return{h:Xr(60*(o<0?o+6:o)),s:Xr(a?s/a*100:0),v:Xr(a/255*100),a:i}},vae=D.memo(function(t){var e=t.hue,n=t.onChange,r=Jk(["react-colorful__hue",t.className]);return D.createElement("div",{className:r},D.createElement(T9,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:Km(e+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Xr(e),"aria-valuemax":"360","aria-valuemin":"0"},D.createElement(C9,{className:"react-colorful__hue-pointer",left:e/360,color:BC({h:e,s:100,v:100,a:1})})))}),Eae=D.memo(function(t){var e=t.hsva,n=t.onChange,r={backgroundColor:BC({h:e.h,s:100,v:100,a:1})};return D.createElement("div",{className:"react-colorful__saturation",style:r},D.createElement(T9,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:Km(e.s+100*i.left,0,100),v:Km(e.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Xr(e.s)+"%, Brightness "+Xr(e.v)+"%"},D.createElement(C9,{className:"react-colorful__saturation-pointer",top:1-e.v/100,left:e.s/100,color:BC(e)})))}),x9=function(t,e){if(t===e)return!0;for(var n in t)if(t[n]!==e[n])return!1;return!0},Sae=function(t,e){return t.toLowerCase()===e.toLowerCase()||x9(FC(t),FC(e))};function Tae(t,e,n){var r=Ym(n),i=D.useState(function(){return t.toHsva(e)}),a=i[0],s=i[1],o=D.useRef({color:e,hsva:a});D.useEffect(function(){if(!t.equal(e,o.current.color)){var c=t.toHsva(e);o.current={hsva:c,color:e},s(c)}},[e,t]),D.useEffect(function(){var c;x9(a,o.current.hsva)||t.equal(c=t.fromHsva(a),o.current.color)||(o.current={hsva:a,color:c},r(c))},[a,t,r]);var l=D.useCallback(function(c){s(function(u){return Object.assign({},u,c)})},[]);return[a,l]}var Cae=typeof window<"u"?D.useLayoutEffect:D.useEffect,xae=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},MN=new Map,kae=function(t){Cae(function(){var e=t.current?t.current.ownerDocument:document;if(e!==void 0&&!MN.has(e)){var n=e.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,MN.set(e,n);var r=xae();r&&n.setAttribute("nonce",r),e.head.appendChild(n)}},[])},wae=function(t){var e=t.className,n=t.colorModel,r=t.color,i=r===void 0?n.defaultColor:r,a=t.onChange,s=Ty(t,["className","colorModel","color","onChange"]),o=D.useRef(null);kae(o);var l=Tae(n,i,a),c=l[0],u=l[1],d=Jk(["react-colorful",e]);return D.createElement("div",Ip({},s,{ref:o,className:d}),D.createElement(Eae,{hsva:c,onChange:u}),D.createElement(vae,{hue:c.h,onChange:u,className:"react-colorful__last-control"}))},Dae={defaultColor:"000",toHsva:mae,fromHsva:function(t){return hae({h:t.h,s:t.s,v:t.v,a:1})},equal:Sae},Aae=function(t){return D.createElement(wae,Ip({},t,{colorModel:Dae}))},Nae=/^#?([0-9A-F]{3,8})$/i,Rae=function(t){var e=t.color,n=e===void 0?"":e,r=t.onChange,i=t.onBlur,a=t.escape,s=t.validate,o=t.format,l=t.process,c=Ty(t,["color","onChange","onBlur","escape","validate","format","process"]),u=D.useState(function(){return a(n)}),d=u[0],p=u[1],m=Ym(r),h=Ym(i),g=D.useCallback(function(b){var y=a(b.target.value);p(y),s(y)&&m(l?l(y):y)},[a,l,s,m]),_=D.useCallback(function(b){s(b.target.value)||p(a(n)),h(b)},[n,a,s,h]);return D.useEffect(function(){p(a(n))},[n,a]),D.createElement("input",Ip({},c,{value:o?o(d):d,spellCheck:"false",onChange:g,onBlur:_}))},FN=function(t){return"#"+t},Iae=function(t){var e=t.prefixed,n=t.alpha,r=Ty(t,["prefixed","alpha"]),i=D.useCallback(function(s){return s.replace(/([^0-9A-F]+)/gi,"").substring(0,n?8:6)},[n]),a=D.useCallback(function(s){return(function(o,l){var c=Nae.exec(o),u=c?c[1].length:0;return u===3||u===6||!!l&&u===4||!!l&&u===8})(s,n)},[n]);return D.createElement(Rae,Ip({},r,{escape:i,format:e?FN:void 0,process:FN,validate:a}))};const BN={width:24,height:24};function Oae({paletteColors:t,isLocked:e,onToggleLock:n,onChange:r}){const i=kr(),a=t.slice(30);return f.jsxs(Fn,{spacing:1,children:[f.jsx("div",{style:{height:1,width:"100%",margin:"8px 0",backgroundColor:i.palette.grey[400]}}),f.jsxs(bt,{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",children:[a.map((s,o)=>f.jsx(ia,{sx:{...BN,backgroundColor:s,border:"1px solid",margin:"0!important",borderColor:i.palette.grey[50],minWidth:24,display:"inline-flex","&:hover":{backgroundColor:s,borderColor:"grey.500"}},onClick:()=>r&&r(s)},o+29)),n&&f.jsx(ia,{onClick:n,sx:{backgroundColor:"transparent",border:"1px solid",...BN,minWidth:24,margin:"0!important",borderColor:e?i.palette.error.main:i.palette.divider,display:"inline-flex",color:e?i.palette.error.main:i.palette.text.secondary,"&:hover":{backgroundColor:e?i.palette.error.light+"20":"action.hover",borderColor:e?i.palette.error.main:i.palette.text.secondary}},title:e?"Unlock recent colors":"Lock recent colors",children:e?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})]})]})}const Pae={p:1,".react-colorful__pointer ":{width:16,height:16},".react-colorful__saturation":{mb:1,borderRadius:"8px"},".react-colorful__last-control":{borderRadius:"8px"},".react-colorful__hue-pointer":{width:"4px",borderRadius:"8px",height:24,cursor:"col-resize"},".react-colorful__saturation-pointer":{cursor:"all-scroll"},input:{padding:1,border:"1px solid",borderColor:"grey.300",borderRadius:"8px",width:"100%"}},UN=(t,e)=>{if(!t||t.trim()==="")return e;const r=e.slice(-5),i=e.slice(0,30),a=r.filter(o=>o!==t&&o!==""),s=[t,...a].slice(0,5);for(;s.length<5;)s.push("");return[...i,...s]};function Qm({value:t,nullable:e,onChange:n}){const[r,i]=D.useState(t||"#000000"),[a,s]=D.useState(null),{paletteColors:o,isLocked:l}=bre(),[c,u]=D.useState(!1),d=kr(),p=D.useCallback(b=>{if(l)return;a&&clearTimeout(a);const y=setTimeout(()=>{const v=UN(b,o);Vv({paletteColors:v})},300);s(y)},[a,l,o]),m=()=>{const b=!l;if(Vv({isLocked:b}),!b&&r){const y=UN(r,o);Vv({isLocked:b,paletteColors:y})}},h=b=>{u(!0),i(b)},g=()=>{n(r),p(r)},_=b=>{i(b),n(b),p(b)};return D.useEffect(()=>{t!==r&&i(t||"#000000")},[t]),D.useEffect(()=>()=>{a&&clearTimeout(a)},[a]),f.jsxs(Fn,{spacing:1,sx:Pae,children:[f.jsx(Aae,{color:r,onChange:h,onMouseUp:g,onTouchEnd:g,onMouseLeave:b=>c?g():null}),f.jsx(Oae,{isLocked:l,onToggleLock:m,paletteColors:o,value:t,nullable:e,onChange:b=>{b?(i(b),n(b),p(b)):n(null)}}),f.jsxs(bt,{pt:1,display:"flex",gap:1,alignItems:"center",children:[f.jsx(Iae,{prefixed:!0,color:r,onChange:_,style:{flex:1,backgroundColor:d.palette.background.paper,color:d.palette.text.primary,padding:"1px 4px",fontSize:"12px"}}),e&&f.jsx(ia,{onClick:()=>n&&n(null),sx:{backgroundColor:"transparent",width:24,height:24,minWidth:24,margin:"0!important",borderColor:d.palette.divider,display:"inline-flex","&:hover":{backgroundColor:"action.hover",borderColor:d.palette.text.secondary}},children:f.jsx(t9,{color:"primary",fontSize:"small"})})]})]})}function k9({label:t,defaultValue:e,onChange:n,nullable:r,compact:i=!1,...a}){const[s,o]=D.useState(null),[l,c]=D.useState(e),{t:u}=pn.useTranslation("inspector");D.useEffect(()=>{l!==e&&c(e)},[e]);const d=b=>{o(b.currentTarget)},p=i?{border:"1px solid",borderColor:"cadet.400",width:28,height:28,borderRadius:"8px",bgcolor:"#FFFFFF"}:{border:t?"1px solid":"",borderColor:"cadet.400",width:"100%",height:36,paddingTop:"8px",paddingBottom:"8px",paddingLeft:"12px",paddingRight:"12px",borderRadius:"8px",bgcolor:"#FFFFFF"},m=b=>{c(b),n(b)},h=()=>!r||typeof l!="string"||l.trim().length===0?null:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:u("inputs.background.reset"),placement:"left",children:f.jsx(bt,{sx:{minWidth:24,lineHeight:1,flexShrink:0,pr:"4px",display:"grid",placeItems:"center"},onClick:()=>m(null),children:f.jsx(t9,{sx:{color:"primary.main"}})})}),g=l?f.jsx(Oa,{onClick:d,sx:{...p,bgcolor:l}}):f.jsx(Oa,{onClick:d,sx:{...p},children:f.jsx(Wk,{fontSize:"small"})}),_=f.jsx(qk,{anchorEl:s,open:!!s,onClose:()=>o(null),sx:{"& .MuiPaper-root":{boxShadow:"0 4px 6px rgba(0, 0, 0, 0.4);",borderRadius:1,maxWidth:"200px",transform:"translateX(-100%) !important;"}},MenuListProps:{sx:{height:"auto",padding:0}},children:f.jsx(Qm,{value:l||"",nullable:r,onChange:b=>m(b)})});return i?f.jsxs(f.Fragment,{children:[g,_]}):f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(Fn,{direction:"row",alignContent:"center",spacing:1,children:[g,h()]}),_]})}function Vc(t){return f.jsx(k9,{...t,nullable:!1})}function Yv(t){return f.jsx(k9,{...t,nullable:!0})}const $N=({mobile:t=!1,label:e,borderColor:n,borderTop:r,borderBottom:i,borderLeft:a,borderRight:s,onChange:o})=>{const{t:l}=pn.useTranslation("inspector"),c=()=>t?{top:"borderTopMobile",bottom:"borderBottomMobile",left:"borderLeftMobile",right:"borderRightMobile"}:{top:"borderTop",bottom:"borderBottom",left:"borderLeft",right:"borderRight"},u=x=>{const w=Object.values(x);return w.every(N=>N===w[0])},d=c(),p={[d.top]:r??0,[d.bottom]:i??0,[d.left]:a??0,[d.right]:s??0},[m,h]=D.useState(()=>u(p)?"all":"custom"),[g,_]=D.useState(n??"#000000"),[b,y]=D.useState(p);D.useEffect(()=>{n!==g&&_(n??"#000000");const x={[d.top]:r??0,[d.bottom]:i??0,[d.left]:a??0,[d.right]:s??0};Object.keys(x).some(N=>b[N]!==x[N])&&(y(x),u(x)||h("custom"))},[n,r,i,a,s,t]);const v=()=>{if(m!=="all"){const x=b[d.top]??0;S(x),h("all")}else h("custom")},E=x=>{_(x),o({borderColor:x,...b})},S=x=>{const w={[d.top]:x,[d.bottom]:x,[d.left]:x,[d.right]:x};y(w),o({...w,borderColor:g})},k=(x,w)=>{y(R=>({...R,[w]:x}));const N={...b,borderColor:g,[w]:x};u(N)||h("custom"),o(N)};return f.jsxs("div",{children:[f.jsxs(Fn,{direction:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:e}),f.jsxs(Fn,{direction:"row",spacing:1,alignItems:"center",children:[f.jsx(Vc,{defaultValue:g,onChange:E,compact:!0}),f.jsx(Bn,{title:l(m==="all"?"border.unlockBorders":"border.lockBordersTogether"),children:f.jsx(vt,{size:"small",onClick:v,sx:{color:m==="all"?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:m==="all"?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]})]}),m==="all"&&f.jsx(Nc,{label:"",iconLabel:f.jsx(Rre,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:S}),m==="custom"&&f.jsxs(Fn,{spacing:2,children:[f.jsx(Nc,{label:"",iconLabel:f.jsx(Ore,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.top],onChange:x=>k(x,d.top)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Are,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.bottom],onChange:x=>k(x,d.bottom)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Nre,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.left],onChange:x=>k(x,d.left)}),f.jsx(Nc,{label:"",iconLabel:f.jsx(Ire,{sx:{color:"text.secondary"}}),units:"px",step:1,min:0,max:8,defaultValue:b[d.right],onChange:x=>k(x,d.right)})]})]})},ap=[{key:"INHERIT",label:"Inherit",value:"inherit"},{key:"LATO",label:"Lato",value:'"Lato", sans-serif'},{key:"MERRIWEATHER",label:"Merriweather",value:'"Merriweather", serif'},{key:"MONTSERRAT",label:"Montserrat",value:'"Montserrat", sans-serif'},{key:"OPEN_SANS",label:"Open Sans",value:'"Open Sans", sans-serif'},{key:"OSWALD",label:"Oswald",value:'"Oswald", sans-serif'},{key:"PACIFICO",label:"Pacifico",value:'"Pacifico", cursive'},{key:"PLAYFAIR",label:"Playfair",value:'"Playfair", serif'},{key:"ROBOTO",label:"Roboto",value:'"Roboto", sans-serif'},{key:"MODERN_SANS",label:"Modern sans",value:'"Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif'}],Ol={FAMILY:"MODERN_SANS",SIZE:16},Jl=jn(["MODERN_SANS","LATO","MERRIWEATHER","MONTSERRAT","OPEN_SANS","OSWALD","PACIFICO","PLAYFAIR","ROBOTO","INHERIT"]).nullable().optional(),zN=t=>ap.find(e=>e.key===t)?.value;function ms(t){const e=sre();let n=zN(t);return n||(n=zN(e?.fontFamily),n||"inherit")}const Lae=ap.map(t=>f.jsx(ts,{value:t.key,sx:{fontFamily:t.value},children:t.label},t.key));function w9({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,a]=D.useState(n??r);D.useEffect(()=>{i!==n&&a(n??r)},[n]);const s=o=>{const l=o?.target?.value;a(l),e(l===null?null:l)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(jl,{style:{width:"100%"},value:i,size:"small",onChange:s,children:Lae})]})}function qN({label:t,defaultValue:e=16,onChange:n,maxValue:r,minValue:i,step:a}){const[s,o]=D.useState(e);D.useEffect(()=>{s!==e&&o(e)},[e]);const l=c=>{o(c),n(c)};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(yr,{iconLabel:f.jsx(Xre,{sx:{fontSize:16,color:"text.primary"}}),value:s,setValue:l,units:"px",step:a??2,min:i||8,max:r||48})]})}function ec({label:t,children:e,defaultValue:n,onChange:r}){const[i,a]=D.useState(n);return D.useEffect(()=>{n!==i&&a(n)},[n]),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsx(bt,{sx:{...E9,paddingLeft:"0px",paddingRight:"0px"},children:f.jsx(Dh,{exclusive:!0,fullWidth:!0,value:i,size:"small",sx:{width:"100%"},onChange:(s,o)=>{if(typeof o!="string")throw new Error("RadioGroupInput can only receive string values");a(o),r(o)},children:e})})]})}function Mae({label:t,defaultValue:e,onChange:n}){const[r,i]=D.useState(e);return D.useEffect(()=>{r!==e&&i(e)},[e]),f.jsxs(ec,{label:t,defaultValue:r,onChange:a=>{i(a),n(a)},children:[f.jsx(kn,{value:"normal",children:"Regular"}),f.jsx(kn,{value:"bold",children:"Bold"})]})}const GN=({label:t,defaultValue:e,onChange:n})=>{const{t:r}=pn.useTranslation("inspector"),i=t??r("inputs.common.height");return f.jsx(yr,{label:i,iconLabel:f.jsx(s9,{sx:{color:"text.secondary"}}),units:"px",step:1,min:1,max:100,marks:!1,value:e??1,setValue:n})},Fae=[{key:"1",value:"1",label:"Simple (1.0)"},{key:"1.15",value:"1.15",label:"Compact (1.15)"},{key:"1.5",value:"1.5",label:"Normal (1.5)"},{key:"2",value:"2",label:"Relaxed (2.0)"},{key:"2.5",value:"2.5",label:"Wide (2.5)"},{key:"3",value:"3",label:"Loose (3.0)"},{key:"4",value:"4",label:"Very Loose (4.0)"}],Bae=Fae.map(t=>f.jsx(ts,{value:t.key,children:t.label},t.key));function Uae({label:t,onChange:e,defaultValue:n}){const r="INHERIT",[i,a]=D.useState(n?.toString()??r);D.useEffect(()=>{i!==n?.toString()&&a(n?.toString()??r)},[n]);const s=o=>{const l=o?.target?.value;a(l),e(l===r?null:parseFloat(l))};return f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(jl,{style:{width:"100%"},value:i,size:"small",onChange:s,children:[f.jsx(ts,{value:r,children:"Default value"}),Bae]})]})}function jN({label:t,defaultValue:e,onChange:n}){const{t:i}=pn.useTranslation("inspector"),[a,s]=D.useState(()=>e||{top:0,left:0,bottom:0,right:0});D.useEffect(()=>{e&&(e.top!==a.top||e.left!==a.left||e.bottom!==a.bottom||e.right!==a.right)&&s(e)},[e]);const[o,l]=D.useState(!1);function c(d,p){let m;o?m={top:p,bottom:p,left:p,right:p}:m={...a,[d]:p},s(m),n(m)}const u=()=>{if(!o){const d={top:a.top,bottom:a.top,left:a.top,right:a.top};s(d),n(d)}l(!o)};return f.jsxs(mi,{children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:t}),f.jsx(Bn,{title:i(o?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:u,sx:{marginTop:"0!important",color:o?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:o?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),o?f.jsx(yr,{iconLabel:f.jsx("span",{children:i("inputs.responsiveSize.allSides")}),value:a.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(Y6,{sx:{fontSize:16,color:"text.primary"}}),value:a.top,setValue:d=>c("top",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(W6,{sx:{fontSize:16,color:"text.primary"}}),value:a.bottom,setValue:d=>c("bottom",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(H6,{sx:{fontSize:16,color:"text.primary"}}),value:a.left,setValue:d=>c("left",d),units:"px",step:16,min:0,max:120,marks:!0}),f.jsx(yr,{iconLabel:f.jsx(V6,{sx:{fontSize:16,color:"text.primary"}}),value:a.right,setValue:d=>c("right",d),units:"px",step:16,min:0,max:120,marks:!0})]})]})}const $ae=({label:t,defaultValue:e,onChange:n,maxValue:r=600,shapeSteps:i=8})=>{const{t:a}=pn.useTranslation("inspector"),[s,o]=D.useState(()=>typeof e=="object"&&e!==null?"rectangle":e||"rectangle"),[l,c]=D.useState(()=>typeof e=="object"&&e!==null?e:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0}),[u,d]=D.useState(!1);D.useEffect(()=>{typeof e=="object"&&e!==null?(c(e),o("rounded")):e&&o(e)},[e]);const p=b=>{o(b),n(b==="rounded"?l:b)},m=(b,y)=>{let v;u?v={topLeft:y,topRight:y,bottomLeft:y,bottomRight:y}:v={...l,[b]:y},c(v),n(v)},h=()=>{if(!u){const b={topLeft:l.topLeft,topRight:l.topLeft,bottomLeft:l.topLeft,bottomRight:l.topLeft};c(b),n(b)}d(!u)},g=r,_=t||a("shape.label");return f.jsxs(f.Fragment,{children:[f.jsxs(ec,{label:_,defaultValue:s,onChange:p,children:[f.jsx(kn,{value:"rectangle",children:a("shape.square")}),f.jsx(kn,{value:"pill",children:a("shape.pill")}),f.jsx(kn,{value:"rounded",children:a("shape.custom")})]}),s==="rounded"&&f.jsxs(Fn,{spacing:2,alignItems:"flexStart",pb:1,children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:a("shape.borderRadius")}),f.jsx(Bn,{title:a(u?"shape.unlockTooltip":"shape.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:h,sx:{marginTop:"0!important",color:u?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:u?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),u?f.jsx(f.Fragment,{children:f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16}}),value:l.topRight,setValue:b=>m("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g})}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(0deg)"}}),value:l.topLeft,setValue:b=>m("topLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(270deg)"}}),value:l.topRight,setValue:b=>m("topRight",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(180deg)"}}),value:l.bottomLeft,setValue:b=>m("bottomLeft",b),units:"px",min:0,step:i,marks:i>1,max:g}),f.jsx(yr,{iconLabel:f.jsx(df,{sx:{fontSize:16,transform:"rotate(90deg)"}}),value:l.bottomRight,setValue:b=>m("bottomRight",b),units:"px",min:0,step:i,marks:i>1,max:g})]})]})]})};function HN({label:t,defaultValue:e,onChange:n}){const[r,i]=D.useState(e??"left");return D.useEffect(()=>{e!==r&&i(e??"left")},[e]),f.jsxs(mi,{children:[f.jsx(Xn,{label:t}),f.jsxs(ec,{label:"",defaultValue:r,onChange:a=>{i(a),n(a)},children:[f.jsx(kn,{value:"left",children:f.jsx(Ure,{fontSize:"small"})}),f.jsx(kn,{value:"center",children:f.jsx(Bre,{fontSize:"small"})}),f.jsx(kn,{value:"right",children:f.jsx($re,{fontSize:"small"})})]})]})}const VN=({label:t,defaultValue:e,onChange:n,step:r,...i})=>{const{t:a}=pn.useTranslation("inspector"),s=t??a("inputs.common.width");return f.jsx(yr,{label:s,iconLabel:f.jsx(s9,{sx:{color:"text.primary",transform:"rotate(90deg)"}}),units:"%",step:r,min:1,max:100,marks:!1,value:e??1,setValue:n,...i})};function zae({name:t,value:e,onChange:n,shapeMaxValue:r,shapeSteps:i}){const a=wr(),s=_u(),{t:o}=pn.useTranslation("inspector"),l=(m,h)=>{const g=e[m],_=e[h];return g??_},c=(m,h)=>{n(h?{...e,...h,[t]:m}:{...e,[t]:m})},u=m=>{n({...e,...m})},p=(()=>{switch(t){case"textAlignMobile":return l("textAlignMobile","textAlign");case"mobilePadding":return l("mobilePadding","padding");case"fontSizeMobile":return l("fontSizeMobile","fontSize")??16;case"heightMobile":return l("heightMobile","height");case"widthMobile":return l("widthMobile","width");case"borderMobile":return{borderTop:l("borderTopMobile","borderTop"),borderBottom:l("borderBottomMobile","borderBottom"),borderLeft:l("borderLeftMobile","borderLeft"),borderRight:l("borderRightMobile","borderRight")};default:return e[t]??null}})();switch(t){case"backgroundColor":return f.jsx(Yv,{label:o("properties.backgroundColor"),defaultValue:p??s?.canvasColor,onChange:c});case"background":return f.jsx(fae,{defaultValue:p,onChange:(m,h)=>c(m,h),values:e});case"borderColor":return f.jsx(Yv,{label:o("properties.border"),defaultValue:p,onChange:c});case"borderRadius":return f.jsx(Nc,{iconLabel:f.jsx(Kre,{}),units:"px",step:4,marks:!0,min:0,max:48,label:o("properties.borderRadius"),defaultValue:p,onChange:c});case"color":return f.jsx(Yv,{label:o("properties.color"),defaultValue:p,onChange:c});case"fontFamily":return f.jsx(w9,{label:o("properties.fontFamily"),defaultValue:p,onChange:c});case"fontWeight":return f.jsx(Mae,{label:o("properties.fontWeight"),defaultValue:p,onChange:c});case"textAlign":return a==="desktop"&&f.jsx(HN,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"textAlignMobile":return a!="desktop"&&f.jsx(HN,{label:o("properties.alignment"),defaultValue:p,onChange:c});case"padding":return a==="desktop"&&f.jsx(jN,{label:o("properties.padding"),defaultValue:p,onChange:c});case"mobilePadding":return a!="desktop"&&f.jsx(jN,{label:o("properties.padding"),defaultValue:p,onChange:c});case"fontSize":return a==="desktop"&&f.jsx(qN,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p??16,onChange:c});case"fontSizeMobile":return a!="desktop"&&f.jsx(qN,{maxValue:80,step:8,label:o("properties.fontSize"),defaultValue:p,onChange:c});case"lineHeight":return f.jsx(Uae,{label:o("properties.lineHeight"),defaultValue:p??1.5,onChange:c});case"shape":return f.jsx($ae,{shapeSteps:i,maxValue:r,label:o("properties.shape"),defaultValue:p,onChange:c});case"height":return a==="desktop"&&f.jsx(GN,{label:o("properties.height"),defaultValue:p,onChange:c});case"heightMobile":return a!="desktop"&&f.jsx(GN,{label:o("properties.height"),defaultValue:p,onChange:c});case"width":return a==="desktop"&&f.jsx(VN,{label:o("properties.width"),defaultValue:p,onChange:c});case"widthMobile":return a!="desktop"&&f.jsx(VN,{label:o("properties.width"),defaultValue:p,onChange:c});case"border":return a==="desktop"&&f.jsx($N,{label:o("properties.border"),borderColor:e.borderColor??null,borderTop:e.borderTop??null,borderBottom:e.borderBottom??null,borderLeft:e.borderLeft??null,borderRight:e.borderRight??null,onChange:u});case"borderMobile":return a!="desktop"&&f.jsx($N,{mobile:!0,label:o("properties.border"),borderColor:e.borderColor??null,borderTop:p.borderTop??null,borderBottom:p.borderBottom??null,borderLeft:p.borderLeft??null,borderRight:p.borderRight??null,onChange:u});default:return null}}function Ti({names:t,value:e,onChange:n,disabledCSSValidation:r=!1,shapeMaxValue:i,shapeSteps:a}){const s=so(),o=I6();return(r||s=="css"||ab.includes(o||""))&&f.jsx(f.Fragment,{children:t.map(l=>f.jsx(zae,{shapeMaxValue:i,shapeSteps:a,name:l,value:e||{},onChange:n},l))})}const ew=t=>t?["http","mailto:","tel:","sms:","whatsapp:"].some(n=>t.startsWith(n))?t:`//${t}`:"#",_b=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),Op=t=>t?{top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}:{top:0,right:0,bottom:0,left:0},qae=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),tw=xt({style:xt({padding:_b,mobilePadding:_b,background:kt().nullable().optional(),backgroundColor:kt().regex(/^#[0-9a-fA-F]{6}$/).optional().nullable(),textAlign:jn(["center","left","right"]).optional().nullable(),textAlignMobile:jn(["center","left","right"]).optional().nullable(),shape:Hc([jn(["rectangle","pill"]),qae]).optional().nullable()}),props:xt({touched:Uo().optional().nullable(),scale:Fe().optional().nullable(),size:kt().optional().nullable(),sizeMobile:kt().optional().nullable(),width:Fe().optional().nullable(),widthMobile:Fe().optional().nullable(),scaleMobile:Fe().optional().nullable(),touchedMobile:Uo().optional().nullable(),original_width:Fe().optional().nullable(),height:Fe().optional().nullable(),url:kt().optional().nullable(),alt:kt().optional().nullable(),linkHref:kt().optional().nullable(),contentAlignment:jn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough();function D9({style:t,props:e,blockId:n}){const r=wr(),i=yy(),a={padding:Op(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding),backgroundColor:t?.backgroundColor??void 0,textAlign:r=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign??void 0},s=(_,b)=>_==="fill"?"100%":_==="scale"?`${b}%`:e?.width,o=e?.linkHref??null,l=r=="desktop"?s(e?.size,e?.scale):s(e?.sizeMobile,e?.scaleMobile),c={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},u=t?.background??"",d=t?.backgroundColor,p=d?Ko(u,d):u,m=_=>{const b=_.currentTarget;setTimeout(()=>{if(!e?.width&&b.offsetWidth){const y=b.offsetWidth;q6(n,{...e,width:y})}},100)},h=f.jsxs(f.Fragment,{children:[f.jsx("img",{alt:e?.alt??"",src:e?.url??"",width:l,onLoad:m,style:{width:l,height:"auto",outline:"none",border:"none",textDecoration:"none",verticalAlign:e?.contentAlignment??"middle",display:"inline-block",maxWidth:"100%",opacity:i.uploading&&i.id===n?.5:1,transition:"opacity 0.2s ease-in-out",borderRadius:gb(t)}}),i.uploading&&i.id===n&&f.jsx("div",{style:c,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})]}),g=Mn(n);return o?f.jsx(di,{className:`${g}`,padding:a.padding,background:p,align:a.textAlign,width:"100%",children:f.jsx("a",{href:ew(o),style:{textDecoration:"none",display:"block",width:"100%",height:"100%"},target:"_blank",children:h})}):f.jsx(di,{className:`${g}`,padding:a.padding,background:p,align:a.textAlign,width:"100%",children:h})}const A9=({data:t,setData:e,blockId:n})=>{const{t:r}=pn.useTranslation("inspector"),[i,a]=D.useState(!1),[s,o]=D.useState(window.emailAIGeneration||!1),[,l]=D.useState(null),[c,u]=D.useState(""),[d,p]=D.useState(!1),[m,h]=D.useState(""),[g,_]=D.useState(!1),b=D.useRef(null),y=vy(),[v,E]=D.useState(null);D.useEffect(()=>{const O=window.__emailBuilderCustomImageProvider;O&&(E(O),setTimeout(()=>{n&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:n,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},100))},[]);const S=O=>{const $=tw.safeParse(O);$.success?(e($.data),l(null)):l($.error)},k=(O,$)=>{const z=O.toLowerCase(),X=z.includes(".svg")||z.includes("svg"),W=$&&($.includes("image/svg+xml")||$.includes("svg"));return X||!!W},x=async O=>{try{p(!0),h(""),_(!1);try{new URL(O)}catch{return h(r("inputs.image.invalidUrl")),!1}const $=new AbortController,z=setTimeout(()=>$.abort(),1e4);try{const X=await fetch(O,{method:"HEAD",signal:$.signal});if(clearTimeout(z),!X.ok)return h(`HTTP ${X.status}: ${X.statusText}`),!1;const W=X.headers.get("content-type");return["image/","image/svg+xml","text/xml","application/xml"].some(ye=>W&&W.toLowerCase().includes(ye.toLowerCase()))?(k(O,W)&&_(!0),h(""),!0):(h(r("inputs.image.notImage")),!1)}catch(X){return clearTimeout(z),X.name==="AbortError"?(h(r("inputs.image.timeout")),!1):new Promise(W=>{const te=new Image,pe=setTimeout(()=>{h(r("inputs.image.timeout")),W(!1)},1e4);te.onload=()=>{clearTimeout(pe),k(O)&&_(!0),h(""),W(!0)},te.onerror=()=>{clearTimeout(pe),h("Cannot access image - CORS policy, network error, or invalid URL"),W(!1)},te.src=O})}}catch{return h("Unexpected error occurred while validating URL"),!1}finally{p(!1)}},w=async()=>{c.trim()&&await x(c.trim())&&(S({...t,props:{...t.props,url:c.trim()}}),u(""))},N=O=>{O.key==="Enter"&&w()},R=O=>{u(O.target.value),m&&h(""),g&&_(!1)},T=O=>{const $=["image/png","image/jpeg","image/gif"],X=O.filter(te=>$.includes(te.type)&&te.size<=5242880);if(X.length!==O.length&&alert(r("inputs.common.invalidFiles")),X.length===0)return;const W=X.map(te=>new Promise(pe=>{const ye=new FileReader;ye.onload=ae=>pe(ae.target?.result),ye.readAsDataURL(te)}));Promise.all(W).then(te=>{const pe={images:te,id:n||""};window.dispatchEvent(new CustomEvent("email-builder-upload-image",{detail:pe})),Od(!0,n||"")})},B=O=>{O.preventDefault(),a(!0)},A=O=>{const $=O.currentTarget.getBoundingClientRect(),z=O.clientX,X=O.clientY;(z<$.left||z>=$.right||X<$.top||X>=$.bottom)&&a(!1)},L=O=>{O.preventDefault(),a(!1);const $=Array.from(O.dataTransfer.files);$.length>0&&T($)},M=()=>{const O=new CustomEvent("toggle-media-library",{detail:!0});window.dispatchEvent(O)};return D.useEffect(()=>{const O=te=>{const{detail:pe}=te;Od(!1,pe.id||""),S({...t,props:{...t.props,url:pe.url}}),U6(!1)},$=te=>{Od(te?.detail?.uploading??!1,te?.detail?.id??"")},z=te=>{const{detail:pe}=te;o(pe)},X=()=>{b?.current?.click()},W=te=>{const{detail:pe}=te;S({...t,props:{...t.props,url:pe}})};return window.addEventListener("email-builder-set-image",W),window.addEventListener("email-builder-upload-image-receive",O),window.addEventListener("email-builder-ai-generation",z),window.addEventListener("email-builder-upload-file",X),window.addEventListener("email-builder-toggle-upload-file",$),()=>{window.removeEventListener("email-builder-toggle-upload-file",$),window.removeEventListener("email-builder-ai-generation",z),window.removeEventListener("email-builder-upload-image-receive",O),window.removeEventListener("email-builder-set-image",W),window.removeEventListener("email-builder-upload-file",X)}},[t]),D.useEffect(()=>{t.props?.url&&_(k(t.props.url))},[t.props?.url]),f.jsxs(Fn,{gap:1,children:[v?f.jsx(bt,{sx:{mb:2},children:v}):f.jsx("div",{style:{display:"flex",gap:8},children:y?f.jsxs(mi,{children:[f.jsx(Xn,{label:r("inputs.image.urlLabel")}),f.jsxs(Fn,{direction:"row",spacing:1,children:[f.jsx(wh,{fullWidth:!0,placeholder:r("inputs.image.urlPlaceholder"),value:c,onChange:R,onKeyPress:N,error:!!m,disabled:d,sx:{...Sy,"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:m?"error.main":"#E5E5E5"},"&:hover fieldset":{borderColor:m?"error.main":"primary.main"},"&.Mui-focused fieldset":{borderColor:m?"error.main":"primary.main"}}}}),f.jsx(ia,{variant:"contained",onClick:w,disabled:!c.trim()||d,sx:{minWidth:"auto",px:2,position:"relative"},children:d?f.jsx(Zs,{size:20,color:"inherit"}):r("inputs.common.add")})]}),m&&f.jsx(Il,{severity:"error",sx:{mt:1,fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:m}),g&&f.jsx(Il,{severity:"warning",sx:{mt:1,marginX:"4px",fontSize:"0.875rem",top:0,"& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},action:f.jsx(vt,{"aria-label":r("inputs.common.close"),color:"inherit",size:"small",onClick:()=>{_(!1)},children:f.jsx(Yk,{fontSize:"inherit"})}),children:r("inputs.common.svgWarning")}),f.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"70%",margin:"0.5rem auto 0 auto",objectFit:"contain",display:"block",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#fff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}})]}):f.jsxs(f.Fragment,{children:[f.jsx("img",{src:t.props?.url,alt:t.props?.alt,style:{width:"50%",objectFit:"contain",aspectRatio:"1 / 1",height:"auto",borderRadius:"8px",border:"2px solid #E5E5E5",backgroundColor:"#ffffff",backgroundImage:"linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%), linear-gradient(45deg, #d0d0d0 25%, transparent 25%, transparent 75%, #d0d0d0 75%)",backgroundSize:"20px 20px",backgroundPosition:"0 0, 10px 10px"}}),f.jsxs(bt,{onDragOver:B,onDragLeave:A,onDrop:L,sx:{width:"100%",border:"2px solid",borderColor:i?"primary.main":"#E5E5E5",borderRadius:"8px",padding:4,textAlign:"center",bgcolor:i?"primary.50":"background.paper",transition:"all 0.2s ease"},children:[f.jsx(bt,{sx:{display:"flex",justifyContent:"center",mb:2},children:f.jsx(c9,{sx:{fontSize:32,color:"primary"}})}),f.jsxs("label",{style:{cursor:"pointer"},children:[f.jsx("input",{ref:b,type:"file",style:{display:"none"},accept:"image/png,image/jpeg,image/gif",multiple:!0,onChange:O=>{const $=O.target.files;$&&$.length>0&&T(Array.from($))}}),f.jsx(mr,{component:"span",sx:{fontWeight:"bold",color:"primary.main","&:hover":{fontWeight:"bold",color:"primary.secondary"}},children:r("inputs.common.uploadFile")}),f.jsxs(mr,{component:"span",sx:{fontWeight:"bold",color:"text.secondary"},children:[" ",r("inputs.common.dragAndDrop")]})]}),f.jsx(mr,{variant:"body2",sx:{color:"text.secondary",mt:1},children:r("inputs.common.fileInfo")})]})]})}),!v&&!y&&g&&f.jsx(Il,{severity:"warning",sx:{fontSize:"0.875rem","& .MuiAlert-message":{padding:"4px 0",display:"flex",flexDirection:"column",justifyContent:"space-around"}},children:"SVG images may not display correctly in Outlook email clients. Consider using PNG or JPG format for better compatibility."}),!v&&$6()&&!y&&f.jsxs(f.Fragment,{children:[f.jsxs(Fn,{direction:"row",alignItems:"center",spacing:1,children:[f.jsx(Fo,{sx:{flexGrow:1}}),f.jsx(mr,{sx:{color:"text.secondary"},children:"or"}),f.jsx(Fo,{sx:{flexGrow:1}})]}),f.jsxs(Fn,{flexDirection:"row",gap:2,children:[f.jsx(ia,{variant:"outlined",onClick:M,startIcon:f.jsx(o9,{}),sx:{color:"mainColor.main",borderColor:"mainColor.light","&:hover":{borderColor:"mainColor.main",backgroundColor:"action.hover"}},style:{width:"100%"},children:"Browse gallery"}),s&&f.jsx(S9,{src:t.props?.url,style:{width:"100%",margin:0}})]})]})]})};function Gae({data:t,setData:e}){const[,n]=D.useState(null),r=Zl(),{t:i}=pn.useTranslation("inspector"),a=c=>{const u=y9.safeParse(c);u.success?(e(u.data),n(null)):n(u.error)},s=t.props?.size??Mc.size,o=t.props?.alt??Mc.alt;t.props?.shape??Mc.shape;const l=so();return D.useEffect(()=>{const c=u=>{const{detail:d}=u;a({...t,props:{...t.props,alt:o}}),a({...t,props:{...t.props,imageUrl:d}})};return window.addEventListener("email-builder-set-image",c),()=>{window.removeEventListener("email-builder-set-image",c)}},[t,a]),f.jsxs(Ga,{title:i("inputs.panels.avatar.title"),children:[l=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(A9,{data:t,setData:c=>e({...t,props:{...t.props,imageUrl:c.props.url,alt:o}}),blockId:r}),f.jsx(Nc,{label:i("inputs.panels.avatar.sizeLabel"),iconLabel:f.jsx(wre,{sx:{color:"text.secondary"}}),units:"px",step:3,min:32,max:256,defaultValue:s,onChange:c=>{a({...t,props:{...t.props,size:c}})}}),f.jsx(nu,{label:i("inputs.panels.avatar.altLabel"),defaultValue:o,onChange:c=>{a({...t,props:{...t.props,alt:c}})}})]}),f.jsx(Ti,{names:["textAlign","backgroundColor","padding","mobilePadding"],value:t.style,onChange:c=>a({...t,style:c})})]})}const Kv=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),WN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),jae=t=>({top:t?.top??0,right:t?.right??0,bottom:t?.bottom??0,left:t?.left??0}),Hae=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),YN=xt({top:Fe().min(0).optional(),bottom:Fe().min(0).optional(),left:Fe().min(0).optional(),right:Fe().min(0).optional()}),N9=xt({style:xt({backgroundColor:Kv,fontSize:Fe().min(0).optional().nullable(),fontSizeMobile:Fe().min(0).optional().nullable(),fontFamily:Jl,background:kt().nullable().optional(),fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),textAlignMobile:jn(["left","center","right"]).optional().nullable(),padding:WN,mobilePadding:WN,shape:Hc([jn(["rectangle","pill"]),Hae]).optional().nullable()}).passthrough().optional().nullable(),props:xt({buttonBackgroundColor:Kv,buttonTextColor:Kv,fullWidth:Uo().optional().nullable(),fullWidthMobile:Uo().optional().nullable(),size:Hc([jn(["x-small","small","medium"]),YN]).optional().nullable(),sizeMobile:Hc([jn(["x-small","small","medium"]),YN]).optional().nullable(),text:kt().optional().nullable(),url:kt().optional().nullable()}).optional().nullable()}).passthrough();function KN(t){if(typeof t!="string")return t;switch(t){case"x-small":return{top:4,bottom:4,right:8,left:8};case"small":return{top:8,bottom:8,right:12,left:12};case"medium":default:return{top:12,bottom:12,left:20,right:20}}}const xl={text:"",url:"",fullWidth:!1,size:"medium",buttonBackgroundColor:"#999999"};function R9({style:t,props:e,blockId:n}){const r=_u(),i=wr(),a=e?.text??xl.text,s=e?.url??xl.url,o=i==="desktop"?e?.fullWidth??!1:e?.fullWidthMobile??e?.fullWidth??!1,l=e?.buttonTextColor??r.textColor,c=e?.buttonBackgroundColor??xl.buttonBackgroundColor,u={backgroundColor:t?.backgroundColor??void 0,textAlign:i=="desktop"?t?.textAlign??void 0:t?.textAlignMobile??t?.textAlign,padding:jae(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},d={color:l,fontSize:i=="desktop"?t?.fontSize??16:t?.fontSizeMobile??t?.fontSize??16,fontFamily:ms(t?.fontFamily),fontWeight:t?.fontWeight??"bold",display:"inline-block",textDecoration:"none"},p={color:t?.borderColor??void 0,top:i=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:i=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:i=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:i=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},m=t?.background??"",h=t?.backgroundColor,g=h?Ko(m,h):m,_=Mn(n);return f.jsx(di,{background:g,backgroundColor:h,padding:u.padding,align:u.textAlign,width:"100%",className:`c${_}`,children:f.jsx("a",{href:ew(s),target:"_blank",className:`abtn-${_}`,children:f.jsx(di,{className:_,padding:i=="desktop"?KN(e?.size):KN(e?.sizeMobile??e?.size),borderRadius:gb(t),background:c,backgroundColor:c,isParent:!1,align:"center",width:o?"100%":void 0,border:p,children:f.jsx("span",{className:`btn${_}`,style:d,children:a})})})})}function Vae({size:t,sizeMobile:e,onChange:n,label:r,maxValue:i=100,paddingSteps:a=8}){const{t:s}=pn.useTranslation("inspector"),o=r??s("inputs.common.size"),l=wr(),[c,u]=D.useState(()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?y:{top:8,bottom:8,left:16,right:16}}),[d,p]=D.useState(!1);D.useEffect(()=>{const y=l==="desktop"?t:e!==void 0?e:t;typeof y=="object"&&y!==null&&u(y)},[t,e,l]);const m=()=>{const y=l==="desktop"?t:e!==void 0?e:t;return typeof y=="object"&&y!==null?"custom":y},h=y=>{if(l==="desktop"){const v={size:y==="custom"?c:y};e==null&&(v.sizeMobile=y==="custom"?c:y),n(v)}else n({sizeMobile:y==="custom"?c:y})},g=(y,v)=>{let E;d?E={top:v,bottom:v,left:v,right:v}:E={...c,[y]:v},u(E),n(l==="desktop"?{size:E}:{sizeMobile:E})},_=()=>{if(!d){const v={top:16,bottom:16,left:16,right:16};u(v),n(l==="desktop"?{size:v}:{sizeMobile:v})}p(!d)},b=m();return f.jsxs(Fn,{spacing:2,children:[f.jsxs(ec,{label:o,defaultValue:b,onChange:h,children:[f.jsx(kn,{value:"x-small",children:s("inputs.responsiveSize.options.xSmall")}),f.jsx(kn,{value:"small",children:s("inputs.responsiveSize.options.small")}),f.jsx(kn,{value:"medium",children:s("inputs.responsiveSize.options.medium")}),f.jsx(kn,{value:"custom",children:s("inputs.responsiveSize.options.custom")})]}),b==="custom"&&f.jsxs(Fn,{spacing:2,alignItems:"flexStart",pb:1,children:[f.jsxs(Fn,{flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",children:[f.jsx(Xn,{label:s("inputs.responsiveSize.customPadding")}),f.jsx(Bn,{title:s(d?"inputs.responsiveSize.unlockTooltip":"inputs.responsiveSize.lockTooltip"),children:f.jsx(vt,{size:"small",onClick:_,sx:{marginTop:"0!important",color:d?"primary.main":"text.secondary","&:hover":{backgroundColor:"action.hover"}},children:d?f.jsx(Oh,{fontSize:"small"}):f.jsx(Ph,{fontSize:"small"})})})]}),d?f.jsx(yr,{iconLabel:s("inputs.responsiveSize.allSides"),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:a,marks:a>1,max:i}):f.jsxs(f.Fragment,{children:[f.jsx(yr,{iconLabel:f.jsx(Y6,{sx:{fontSize:16}}),value:c.top,setValue:y=>g("top",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(W6,{sx:{fontSize:16}}),value:c.bottom,setValue:y=>g("bottom",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(H6,{sx:{fontSize:16}}),value:c.left,setValue:y=>g("left",y),units:"px",min:0,step:a,marks:a>1,max:i}),f.jsx(yr,{iconLabel:f.jsx(V6,{sx:{fontSize:16}}),value:c.right,setValue:y=>g("right",y),units:"px",min:0,step:a,marks:a>1,max:i})]})]})]})}function Wae({fullWidth:t,fullWidthMobile:e,onChange:n,label:r="Width"}){const i=wr(),{t:a}=pn.useTranslation("inspector"),s=()=>i==="desktop"?t:e!==void 0?e:t,o=c=>{const u=c==="FULL_WIDTH";if(i==="desktop"){const d={fullWidth:u};e==null&&(d.fullWidthMobile=u),n(d)}else n({fullWidthMobile:u})},l=s();return f.jsxs(ec,{label:r,defaultValue:l?"FULL_WIDTH":"AUTO",onChange:o,children:[f.jsx(kn,{value:"FULL_WIDTH",children:a("inputs.width.full")}),f.jsx(kn,{value:"AUTO",children:a("inputs.width.auto")})]})}function Yae({data:t,setData:e}){const[,n]=D.useState(null),r=_u(),{t:i}=pn.useTranslation("inspector"),a=g=>{const _=N9.safeParse(g);_.success?(e(_.data),n(null)):n(_.error)},s=t.props?.text??xl.text,o=t.props?.url??xl.url,l=t.props?.fullWidth??xl.fullWidth,c=t.props?.size??xl.size,u=t.props?.buttonTextColor??r.textColor,d=t.props?.buttonBackgroundColor??xl.buttonBackgroundColor,p=t.props?.fullWidthMobile,m=t.props?.sizeMobile,h=so();return f.jsxs(Ga,{title:i("inputs.panels.button.title"),children:[h=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(Ti,{disabledCSSValidation:!0,names:["fontFamily","fontSize","fontSizeMobile","fontWeight"],value:t.style,onChange:g=>a({...t,style:g})}),f.jsx(nu,{label:i("inputs.panels.button.textLabel"),defaultValue:s,onChange:g=>a({...t,props:{...t.props,text:g}})}),f.jsx(nu,{label:i("inputs.panels.button.targetLabel"),placeholder:i("inputs.panels.button.targetPlaceholder"),defaultValue:o,onChange:g=>a({...t,props:{...t.props,url:g}})}),f.jsx(Wae,{label:i("properties.width"),fullWidth:l,fullWidthMobile:p,onChange:g=>a({...t,props:{...t.props,...g}})}),f.jsx(Vae,{size:c,sizeMobile:m,onChange:g=>a({...t,props:{...t.props,...g}})}),f.jsx(Vc,{label:i("inputs.panels.button.textColor"),defaultValue:u,onChange:g=>a({...t,props:{...t.props,buttonTextColor:g}})}),f.jsx(Vc,{label:i("inputs.panels.button.buttonColor"),defaultValue:d,onChange:g=>a({...t,props:{...t.props,buttonBackgroundColor:g}})})]}),f.jsx(Ti,{names:["shape","textAlign","textAlignMobile","backgroundColor","border","borderMobile","padding","mobilePadding"],value:t.style,shapeMaxValue:80,onChange:g=>a({...t,style:g})})]})}const Kae=Qk([Fe().nullish(),Fe().nullish(),Fe().nullish()]).optional().nullable(),I9=xt({style:xt({background:kt().nullable().optional(),backgroundColor:kt().nullable().optional(),padding:_b,mobilePadding:_b}).optional().nullable(),props:xt({fixedWidths:Kae,columnsCount:Hc([hb(2),hb(3)]).optional().nullable(),layout:kt().optional().nullable(),contentAlignment:jn(["top","middle","bottom"]).optional().nullable(),contentAlignmentMobile:jn(["top","middle","bottom"]).optional().nullable()}).optional().nullable()}).passthrough(),Qae={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},tm={columnsCount:2,contentAlignment:"middle"};function QN({style:t,columns:e,props:n,blockId:r}){const i=wr(),a=yy(),s={padding:Op(i=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},o={columnsCount:n?.columnsCount??tm.columnsCount,contentAlignment:i=="desktop"?n?.contentAlignment??tm.contentAlignment:n?.contentAlignmentMobile??n?.contentAlignment??tm.contentAlignment,fixedWidths:n?.fixedWidths,blockId:r},l=t?.background??"",c=t?.backgroundColor,u=c?Ko(l,c):l,d=Mn(r);return f.jsxs(di,{background:u,backgroundColor:c,className:`${d}`,padding:s.padding,width:"100%",children:[a.uploading&&a.id===r?f.jsx("div",{style:Qae,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}):f.jsx(f.Fragment,{}),f.jsx("table",{border:0,cellSpacing:"0",cellPadding:"0",style:{width:"100%"},children:f.jsx("tbody",{style:{width:"100%"},children:f.jsxs("tr",{style:{width:"100%"},children:[f.jsx(Qv,{index:0,props:o,columns:e}),f.jsx(Qv,{index:1,props:o,columns:e}),f.jsx(Qv,{index:2,props:o,columns:e})]})})})]})}function Qv({index:t,props:e,columns:n}){const r=e?.contentAlignment??tm.contentAlignment;if((e?.columnsCount??tm.columnsCount)===2&&t===2)return null;const a={boxSizing:"border-box",verticalAlign:r,width:`${e.fixedWidths?.[t]}%`??void 0},s=(n&&n[t])??null,o=e.blockId?Mn(e.blockId):"";return f.jsx("td",{className:`col${o}`,style:a,children:s})}const Xae=I9.shape.props.unwrap().unwrap().shape,nw=xt({style:I9.shape.style,props:xt({...Xae,columns:Qk([xt({childrenIds:jc(kt())}),xt({childrenIds:jc(kt())}),xt({childrenIds:jc(kt())})])}).optional().nullable()}).passthrough(),Zae=(t,e,n)=>{if(!t||!document)return;const r=Mn(t),i=document.querySelector(`.${r}`);if(!i)return;const a=i.parentElement;if(!a)return;const s=Math.ceil(a.getBoundingClientRect().width);n.props?.touched||n.props?.width!==s&&e({...n,props:{...n.props,width:s}})},Jae=t=>{if(!t||!document)return;const e=Mn(t),n=document.querySelector(`.${e}`);if(!n)return;const r=n.parentElement;if(!r)return;const i=Math.ceil(r.getBoundingClientRect().width);return i||null},ese={desktop:"contentAlignment",mobile:"contentAlignmentMobile"};function tse({data:t,updateData:e}){const{t:n}=pn.useTranslation("inspector"),r=wr(),i=ese[r]||"contentAlignment",a=t.props?.[i]??t.props?.contentAlignment,s=o=>{e({...t,props:{...t.props,[i]:o}})};return f.jsxs(ec,{label:n("inputs.alignment.label"),defaultValue:a,onChange:s,children:[f.jsx(kn,{value:"top",children:f.jsx(eie,{fontSize:"small"})}),f.jsx(kn,{value:"middle",children:f.jsx(Jre,{fontSize:"small"})}),f.jsx(kn,{value:"bottom",children:f.jsx(Zre,{fontSize:"small"})})]})}const pf={grid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(100px, 1fr))",gap:"16px",width:"100%"},card:{cursor:"pointer",border:"1px solid #e5e7eb",borderRadius:"8px",backgroundColor:"primary"},cardContent:{padding:"8px"},layoutPreview:{display:"flex",gap:"4px",height:"30px",width:"100%",justifyContent:"space-between"}},nse=({defaultValue:t,onChange:e,columns:n})=>{const{t:r}=pn.useTranslation("inspector"),[i,a]=D.useState(t||"layout-50-50"),s=kr();D.useEffect(()=>{i!==t&&a(t==="layout-33-34-33"?"layout-33-33-33":t)},[t]);const o=[{id:"layout-50-50",distribution:[50,50,null]},{id:"layout-55-45",distribution:[55,45,null]},{id:"layout-45-55",distribution:[45,55,null]},{id:"layout-60-40",distribution:[60,40,null]},{id:"layout-40-60",distribution:[40,60,null]},{id:"layout-70-30",distribution:[70,30,null]},{id:"layout-30-70",distribution:[30,70,null]},{id:"layout-75-25",distribution:[75,25,null]},{id:"layout-25-75",distribution:[25,75,null]},{id:"layout-80-20",distribution:[80,20,null]},{id:"layout-20-80",distribution:[20,80,null]}],l=[{id:"layout-33-33-33",distribution:[33.34,33.33,33.33]},{id:"layout-30-40-30",distribution:[30,40,30]},{id:"layout-25-50-25",distribution:[25,50,25]},{id:"layout-20-60-20",distribution:[20,60,20]},{id:"layout-50-25-25",distribution:[50,25,25]},{id:"layout-25-25-50",distribution:[25,25,50]},{id:"layout-60-20-20",distribution:[60,20,20]},{id:"layout-20-20-60",distribution:[20,20,60]},{id:"layout-40-30-30",distribution:[40,30,30]},{id:"layout-30-30-40",distribution:[30,30,40]},{id:"layout-40-20-40",distribution:[40,20,40]}],[c,u]=D.useState(l),d=(p,m)=>{a(p),e({layout:p,fixedWidths:m})};return D.useEffect(()=>{if(n===2)u(o),o.findIndex(p=>p.id==t)===-1&&d("layout-50-50",[50,50,null]);else{if(u(l),t==="layout-33-34-33"){d("layout-33-33-33",[33.34,33.33,33.33]);return}l.findIndex(p=>p.id==t)===-1&&d("layout-33-33-33",[33.34,33.33,33.33])}},[n]),D.useEffect(()=>{t==="layout-33-34-33"&&d("layout-33-33-33",[33.34,33.33,33.33])},[t]),f.jsxs(mi,{children:[f.jsx(Xn,{label:r("inputs.layout.label")}),f.jsx("div",{style:pf.grid,children:c.map((p,m)=>f.jsx("div",{onClick:()=>d(p.id,p.distribution),style:{...pf.card,gridColumn:m===0?"span 2":void 0,border:i===p.id?`2px solid ${s.palette.secondary.main}`:pf.card.border},children:f.jsx("div",{style:pf.cardContent,children:f.jsx("div",{style:pf.layoutPreview,children:p.distribution.map((h,g)=>f.jsx("div",{style:{width:`${h}%`,backgroundColor:i===p.id?s.palette.secondary.main:"#e5e7eb",borderRadius:"4px",transition:"background-color 0.2s ease",display:"grid",placeItems:"center",fontSize:"12px",color:i===p.id?"white":"black"}},g))})})},p.id))})]})};function rse({data:t,setData:e}){const[,n]=D.useState(null),[r,i]=D.useState(t.props?.columnsCount??2),a=so(),s=wr(),{t:o}=pn.useTranslation("inspector"),l=m=>{const h=Oe.getState().document,g=m.filter(_=>h[_]?.type==="Image");s==="desktop"&&g.map(_=>Zae(_,e,h[_].data))},c=m=>{const h=nw.safeParse(m);h.success?(h.data.props.columns.map(g=>l(g.childrenIds)),e(h.data),r&&h.data.props?.columnsCount!==r&&i(h.data.props?.columnsCount??2),n(null)):(console.error("Error on columns: ",h.error),n(h.error))},u={layout:"layout-50-50",fixedWidths:[50,50,null],columnsCount:2},d={layout:"layout-33-34-33",fixedWidths:[33,34,33],columnsCount:3},p=m=>{const h=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:[...t.props.columns];return m==="2"?{...u,columns:h}:{...d,columns:h}};return f.jsxs(Ga,{title:o("inputs.panels.columns.title"),children:[a=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsxs(ec,{label:o("inputs.panels.columns.countLabel"),defaultValue:t.props?.columnsCount===2?"2":"3",onChange:m=>{const h=p(m);c({...t,props:{...t.props,...h}})},children:[f.jsx(kn,{style:{fontWeight:"bold"},value:"2",children:"2"}),f.jsx(kn,{style:{fontWeight:"bold"},value:"3",children:"3"})]}),f.jsx(nse,{columns:t.props?.columnsCount??3,defaultValue:t.props?.layout,onChange:({layout:m,fixedWidths:h})=>{const g=t.props.columns.length===2?[...t.props.columns,{childrenIds:[]}]:t.props.columns;c({...t,props:{...t.props,layout:m,fixedWidths:h,columns:g}})}})]}),a=="css"&&f.jsxs(f.Fragment,{children:[f.jsx(tse,{data:t,updateData:e}),f.jsx(Ti,{names:["backgroundColor","background","padding","mobilePadding"],value:t.style,onChange:m=>c({...t,style:m})})]})]})}const XN=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),ZN=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),ise=xt({topLeft:Fe().min(0).optional(),topRight:Fe().min(0).optional(),bottomLeft:Fe().min(0).optional(),bottomRight:Fe().min(0).optional()}),JN={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},ase=xt({style:xt({backgroundColor:XN,background:kt().nullable().optional(),borderColor:XN,borderRadius:Fe().optional().nullable(),borderTop:Fe().optional().nullable(),borderBottom:Fe().optional().nullable(),borderLeft:Fe().optional().nullable(),borderRight:Fe().optional().nullable(),borderTopMobile:Fe().optional().nullable(),borderBottomMobile:Fe().optional().nullable(),borderLeftMobile:Fe().optional().nullable(),borderRightMobile:Fe().optional().nullable(),shape:Hc([jn(["rectangle","pill"]),ise]).optional().nullable(),padding:ZN,mobilePadding:ZN}).optional().nullable()}).passthrough();function sse({style:t,children:e,blockId:n}){const r=wr(),i=yy(),a={border:{color:t?.borderColor??void 0,top:r=="desktop"?t?.borderTop??void 0:t?.borderTopMobile??t?.borderTop,bottom:r=="desktop"?t?.borderBottom??void 0:t?.borderBottomMobile??t?.borderBottom,left:r=="desktop"?t?.borderLeft??void 0:t?.borderLeftMobile??t?.borderLeft,right:r=="desktop"?t?.borderRight??void 0:t?.borderRightMobile??t?.borderRight},padding:Op(r=="desktop"?t?.padding:t?.mobilePadding??t?.padding)},s=t?.background??"",o=t?.backgroundColor,l=o?Ko(s,o):s,c=Mn(n);return e?f.jsx(di,{className:`${c}`,background:l,backgroundColor:t?.backgroundColor,borderRadius:gb(t),padding:a.padding,width:"100%",border:a.border,children:f.jsxs(f.Fragment,{children:[i.uploading&&i.id===n&&f.jsx("div",{style:JN,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}),e]})}):f.jsx(di,{className:`${c}`,background:l,backgroundColor:o,borderRadius:gb(t),padding:a.padding,width:"100%",border:a.border,children:f.jsx("div",{children:i.uploading&&i.id===n&&f.jsx("div",{style:JN,children:f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-loader-circle",style:{width:"32px",height:"32px",animation:"1s linear infinite spin",stroke:"currentColor"},children:f.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})})})})}const O9=xt({style:ase.shape.style,props:xt({childrenIds:jc(kt()).optional().nullable()}).optional().nullable()}).passthrough();function P9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=O9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.container.title"),children:f.jsx(Ti,{names:["backgroundColor","background","border","borderMobile","shape","padding","mobilePadding"],value:t.style,shapeSteps:30,onChange:a=>i({...t,style:a})})})}const ose=t=>e=>e.document[t],lse=(t,e)=>n=>n.document[t]?.data?.props?.[e],cse=t=>e=>e.document[t]?.data?.style;function use(t){return Oe(ose(t))}function dse(t,e){return Oe(lse(t,e))}function pse(t){return Oe(cse(t))}function fse(t){const e=D.useCallback(l=>{Ul(t,l)},[t]),n=D.useCallback(l=>{G6(t,l)},[t]),r=D.useCallback((l,c)=>{Sre(t,l,c)},[t]),i=D.useCallback(l=>{j6(t,l)},[t]),a=D.useCallback((l,c)=>{Tre(t,l,c)},[t]),s=D.useCallback(l=>{Cre(t,l)},[t]),o=D.useCallback(l=>{xre(t,l)},[t]);return D.useMemo(()=>({updateBlock:e,updateProps:n,updateProp:r,updateStyles:i,updateStyle:a,batchUpdateProps:s,batchUpdateStyles:o}),[e,n,r,i,a,s,o])}const eR=t=>{const e=Zl();L6(e??""),M6();const n=so();_u();const{t:r}=pn.useTranslation("inspector");dse(e??"","html");const i=pse(e??""),{updateProp:a,updateStyles:s}=fse(e??"");if(!e)return null;const o=l=>{s(()=>l)};return f.jsxs(Ga,{title:r("inputs.panels.text.title"),children:[n==="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{display:"flex",gap:"8px"},children:[f.jsx("div",{style:{flex:1},children:f.jsx(Ti,{disabledCSSValidation:!0,names:["fontFamily"],value:i,onChange:o})}),f.jsx("div",{style:{flex:1},children:f.jsx(Ti,{disabledCSSValidation:!0,names:["lineHeight"],value:i,onChange:o})})]}),f.jsx(Ti,{disabledCSSValidation:!0,names:["fontSize","fontSizeMobile"],value:i,onChange:o}),f.jsx(bt,{sx:{m:1,p:1.5,border:"1px dashed",borderColor:"divider",borderRadius:1},children:f.jsx(mr,{color:"text.secondary",fontSize:14,children:r("inputs.panels.text.doubleClickToEdit","Double-click on the block in the canvas to edit the content")})})]}),n==="css"&&f.jsx(Ti,{names:["backgroundColor","border","borderMobile","padding","mobilePadding"],value:i,onChange:o})]})},mse=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),tR=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),L9=xt({style:xt({background:kt().nullable().optional(),backgroundColor:mse,padding:tR,mobilePadding:tR,height:Fe().optional().nullable(),heightMobile:Fe().optional().nullable(),color:kt().optional().nullable(),width:Fe().optional().nullable(),widthMobile:Fe().optional().nullable(),textAlign:kt().optional().nullable(),textAlignMobile:kt().optional().nullable()}).passthrough().optional().nullable()}).passthrough(),yc={height:1,color:"#333333",width:100,textAlign:"left"};function M9({style:t,blockId:e}){const n=wr(),r=Op(n==="desktop"?t?.padding:t?.mobilePadding??t?.padding),i=n==="desktop"?t?.height??yc.height:t?.heightMobile??t?.height??yc.height,a=t?.color??yc.color,s=n==="desktop"?(t?.width??yc.width)+"%":(t?.widthMobile??t?.width??yc.width)+"%",o=n==="desktop"?t?.textAlign??yc.textAlign:t?.textAlignMobile??t?.textAlign??yc.textAlign,l=t?.background??"",c=t?.backgroundColor??"",u=c?Ko(l,c):l,d=Mn(e);return f.jsx(di,{className:`c${d}`,background:u,backgroundColor:c,width:"100%",padding:r,align:o,children:f.jsx(di,{display:"inline-block",className:`${d}`,background:a,backgroundColor:c,width:s,padding:{top:i,bottom:0,left:0,right:0},isParent:!1,children:f.jsx("div",{})})})}function F9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=L9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.divider.title"),children:f.jsx(Ti,{names:["width","widthMobile","height","heightMobile","color","backgroundColor","textAlign","textAlignMobile","padding","mobilePadding"],value:t.style,onChange:a=>i({...t,style:a})})})}const ff=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),B9=xt({backdropColor:ff,borderColor:ff,borderRadius:Fe().optional().nullable(),canvasColor:ff,textColor:ff,fontFamily:Jl,childrenIds:jc(kt()).optional().nullable(),linkGlobal:xt({linkColor:ff,underline:Uo()}).optional().nullable(),showVersion:Uo().optional().nullable()}),hse=({label:t,linkColor:e,underline:n=!1,onChange:r})=>{const[i,a]=D.useState(e??"#FF0000"),[s,o]=D.useState(n),l=kr(),{t:c}=pn.useTranslation("inspector"),u=t??c("inputs.links.color"),d=s?"enabled":"disabled",p={width:"100%","& .MuiToggleButton-root":{flex:1,color:l.palette.text.primary,borderColor:l.palette.grey[300],minWidth:"40px","&.Mui-selected":{backgroundColor:l.palette.primary.main,color:l.palette.primary.contrastText,borderColor:l.palette.primary.main,"&:hover":{backgroundColor:l.palette.primary.dark}},"&:hover":{backgroundColor:l.palette.grey[100]}}};D.useEffect(()=>{e!==i&&a(e??"#FF0000")},[e]),D.useEffect(()=>{n!==s&&o(n)},[n]);const m=g=>{const _=g??"#FF0000";a(_),r({linkColor:_,underline:s})},h=(g,_)=>{if(!_)return;const b=_==="enabled";o(b),r({linkColor:i,underline:b})};return f.jsx(Fn,{spacing:2,children:f.jsxs("div",{style:{display:"flex",flexDirection:"column",marginBottom:"16px",gap:"16px"},children:[f.jsx(Vc,{label:u,defaultValue:i,onChange:m}),f.jsxs("div",{children:[f.jsx(Xn,{label:c("inputs.links.underline")}),f.jsx(bt,{sx:{...E9,padding:0,mt:1},children:f.jsxs(Dh,{value:d,exclusive:!0,size:"small",onChange:h,sx:p,children:[f.jsx(kn,{value:"enabled",children:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOn"),children:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia subrayado",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("title",{children:"aiia subrayado"}),f.jsx("rect",{width:"20",height:"20",fill:"none"}),f.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"}),f.jsx("line",{x1:"6",y1:"31",x2:"34",y2:"31",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),f.jsx(kn,{value:"disabled",children:f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:c("inputs.links.underlineOff"),children:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 40 40",role:"img","aria-label":"aiia",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("title",{children:"aiia"}),f.jsx("rect",{width:"20",height:"20",fill:"none"}),f.jsx("text",{x:"50%",y:"26",textAnchor:"middle",fontFamily:"system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif",fontSize:"24",fill:"currentColor",children:"aiia"})]})})})]})})]})]})})},gse="email-builder-online",_se="3.3.1",Xv={name:gse,version:_se};function U9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=B9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsxs(Ga,{title:r("inputs.panels.emailLayout.title"),children:[f.jsx(Vc,{label:r("inputs.panels.emailLayout.backgroundColor"),defaultValue:t.backdropColor??"#F5F5F5",onChange:a=>i({...t,backdropColor:a})}),f.jsx(Vc,{label:r("inputs.panels.emailLayout.canvasColor"),defaultValue:t.canvasColor??"#FFFFFF",onChange:a=>i({...t,canvasColor:a})}),f.jsx(w9,{label:r("inputs.panels.emailLayout.fontFamily"),defaultValue:t.fontFamily||Ol.FAMILY,onChange:a=>i({...t,fontFamily:a})}),f.jsx(Vc,{label:r("inputs.panels.emailLayout.textColor"),defaultValue:t.textColor??"#262626",onChange:a=>i({...t,textColor:a})}),f.jsx(hse,{label:r("inputs.panels.emailLayout.linksLabel"),linkColor:t.linkGlobal?.linkColor||"#000000",underline:t.linkGlobal?.underline||!1,onChange:a=>i({...t,linkGlobal:a})}),t.showVersion&&f.jsx(bt,{color:"text.secondary",sx:{display:"flex",justifyContent:"flex-end",mt:2},children:f.jsxs(bt,{sx:{textAlign:"right"},children:[f.jsxs(mr,{variant:"body2",children:[r("inputs.panels.emailLayout.version"),": ",Xv.version]}),f.jsx(NJ,{href:`https://www.npmjs.com/package/${Xv.name}`,target:"_blank",rel:"noopener noreferrer",sx:{fontSize:"0.875rem",mt:.5,display:"inline-block"},children:Xv.name})]})})]})}const nR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),bse=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),yse=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,$9=xt({props:xt({text:kt().optional().nullable(),level:jn(["h1","h2","h3"]).optional().nullable()}).optional().nullable(),style:xt({color:nR,backgroundColor:nR,fontFamily:Jl,fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),padding:bse}).optional().nullable()}),bb={level:"h2",text:""};function z9({props:t,style:e}){const n=t?.level??bb.level,r=t?.text??bb.text,i={color:e?.color??void 0,backgroundColor:e?.backgroundColor??void 0,fontWeight:e?.fontWeight??"bold",textAlign:e?.textAlign??void 0,margin:0,fontFamily:ms(e?.fontFamily),fontSize:vse(n),padding:yse(e?.padding)};switch(n){case"h1":return f.jsx("h1",{style:i,children:r});case"h2":return f.jsx("h2",{style:i,children:r});case"h3":return f.jsx("h3",{style:i,children:r})}}function vse(t){switch(t){case"h1":return 32;case"h2":return 24;case"h3":return 20}}function Ese({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=s=>{const o=$9.safeParse(s);o.success?(e(o.data),n(null)):n(o.error)},a=so();return f.jsxs(Ga,{title:r("inputs.panels.heading.title"),children:[a=="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(nu,{label:r("inputs.panels.heading.contentLabel"),rows:3,defaultValue:t.props?.text??bb.text,onChange:s=>{i({...t,props:{...t.props,text:s}})}}),f.jsxs(ec,{label:r("inputs.panels.heading.levelLabel"),defaultValue:t.props?.level??bb.level,onChange:s=>{i({...t,props:{...t.props,level:s}})},children:[f.jsx(kn,{value:"h1",children:"H1"}),f.jsx(kn,{value:"h2",children:"H2"}),f.jsx(kn,{value:"h3",children:"H3"})]})]}),f.jsx(Ti,{names:["color","backgroundColor","fontFamily","fontWeight","textAlign","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})]})}const rR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),Sse=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),Tse=t=>t?`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`:void 0,q9=xt({style:xt({color:rR,backgroundColor:rR,fontFamily:Jl,fontSize:Fe().min(0).optional().nullable(),textAlign:jn(["left","right","center"]).optional().nullable(),padding:Sse}).optional().nullable(),props:xt({contents:kt().optional().nullable()}).optional().nullable()});function G9({style:t,props:e}){const n=e?.contents,r={color:t?.color??void 0,backgroundColor:t?.backgroundColor??void 0,fontFamily:ms(t?.fontFamily),fontSize:t?.fontSize??void 0,textAlign:t?.textAlign??void 0,padding:Tse(t?.padding)};return n?f.jsx("div",{style:r,dangerouslySetInnerHTML:{__html:n}}):f.jsx("div",{style:r})}function Cse({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=s=>{const o=q9.safeParse(s);o.success?(e(o.data),n(null)):n(o.error)},a=so();return f.jsxs(Ga,{title:r("inputs.panels.html.title"),children:[a=="block-configuration"&&f.jsx(f.Fragment,{children:f.jsx(nu,{label:r("inputs.panels.html.contentLabel"),rows:5,defaultValue:t.props?.contents??"",onChange:s=>i({...t,props:{...t.props,contents:s}})})}),f.jsx(Ti,{names:["color","backgroundColor","fontFamily","fontSize","textAlign","padding","mobilePadding"],value:t.style,onChange:s=>i({...t,style:s})})]})}const xse=(t,e,n)=>{const r=wr();D.useEffect(()=>{const i=()=>{if(!t||!document||r=="mobile")return;const o=Mn(t),l=document.querySelector(`.${o}`);if(!l)return;const c=l.parentElement;if(!c)return;const u=Math.ceil(c.getBoundingClientRect().width);n.props?.size===void 0||n.props?.size==="original"||n.props?.touched&&n.props?.width<=u||n.props?.width!==u&&!n.props?.touched&&e({...n,props:{...n.props,width:u}})};i();const a=new ResizeObserver(i),s=document.querySelector(`.${Mn(t)}`);return s?.parentElement&&a.observe(s.parentElement),()=>{a.disconnect()}},[t,e,n,r])},kse=({defaultValue:t="original",scale:e=100,onChange:n})=>{const[r,i]=D.useState(t),[a,s]=D.useState(e);wr();const o=kr(),{t:l}=pn.useTranslation("inspector"),c={container:{width:"100%"},label:{color:o.palette.text.primary},toggleGroup:{width:"100%",backgroundColor:o.palette.background.paper,padding:"4px",borderRadius:"8px"},toggleButton:{flex:1,padding:"6px 16px",textTransform:"none",fontSize:"14px",color:o.palette.text.primary,"&.Mui-selected":{backgroundColor:o.palette.grey[200],color:o.palette.text.primary,"&:hover":{backgroundColor:o.palette.grey[300]}},"&:hover":{backgroundColor:o.palette.grey[100]}},sliderContainer:{marginTop:"16px",padding:"0 8px"},slider:{"& .MuiSlider-thumb":{backgroundColor:o.palette.primary.main,"&:hover":{boxShadow:`0 0 0 8px ${o.palette.primary.main}20`}},"& .MuiSlider-rail":{backgroundColor:o.palette.grey[300]},"& .MuiSlider-track":{backgroundColor:o.palette.primary.main}},scaleValue:{color:o.palette.text.secondary}};D.useEffect(()=>{(t!==r||e!==a)&&(t!==r&&i(t),t==="scale"&&s(e))},[t,e]);const u=(p,m)=>{m!==null&&(i(m),n&&n({mode:m,scale:m==="scale"?a:void 0}))},d=p=>{s(p),n&&n({mode:r,scale:p})};return f.jsxs(mi,{children:[f.jsx(Xn,{label:l("inputs.sizeSelector.label")}),f.jsxs(bt,{sx:c.container,children:[f.jsxs(Dh,{value:r,exclusive:!0,onChange:u,sx:c.toggleGroup,children:[f.jsx(kn,{value:"original",sx:c.toggleButton,children:l("inputs.sizeSelector.contain")}),f.jsx(kn,{value:"fill",sx:c.toggleButton,children:l("inputs.sizeSelector.cover")}),f.jsx(kn,{value:"scale",sx:c.toggleButton,children:l("inputs.sizeSelector.scale")})]}),f.jsx(X4,{in:r==="scale",children:f.jsx(bt,{sx:c.sliderContainer,children:f.jsx(yr,{iconLabel:f.jsx(nie,{}),value:a,setValue:d,marks:!1,units:"%",min:1,max:100})})})]})]})};function wse({data:t,setData:e}){const[n,r]=D.useState(null),i=Zl(),a=so(),s=wr(),{t:o}=pn.useTranslation("inspector");xse(i||"",e,t),D.useEffect(()=>{i&&window.dispatchEvent(new CustomEvent("email-builder-image-panel-opened",{detail:{blockId:i,currentImageUrl:t.props?.url||null,alt:t.props?.alt||null}}))},[i,t.props?.url,t.props?.alt]);const l=D.useCallback(g=>{const _=tw.safeParse(g);_.success?JSON.stringify(t)!==JSON.stringify(_.data)&&(e(_.data),r(null)):r(_.error)},[t,e]),c=D.useCallback((g,_,b)=>{const y=Jae(i)||Cd,v={...g.props};if(b&&(v.touchedMobile=!0),_.mode==="original"){const E=g.props?.original_width??null;return b?{...v,sizeMobile:_.mode,widthMobile:E}:{...v,size:_.mode,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:E}}if(_.mode==="fill")return b?{...v,sizeMobile:_.mode,widthMobile:null}:{...v,size:_.mode,width:null,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,widthMobile:v.touchedMobile?v.widthMobile:null};if(_.mode==="scale"){const E=Math.ceil(y/100*_.scale);return b?{...v,sizeMobile:_.mode,scaleMobile:_.scale,widthMobile:E}:{...v,size:_.mode,scale:_.scale,width:E,sizeMobile:v.touchedMobile?v.sizeMobile:_.mode,scaleMobile:v.touchedMobile?v.scaleMobile:_.scale,widthMobile:v.touchedMobile?v.widthMobile:E}}return v},[i]),u=D.useCallback((g,_)=>{const b=c(t,g,_);l({...t,props:b})},[t,l,c]),d=D.useMemo(()=>s!=="desktop"?{size:t.props?.touchedMobile?t.props?.sizeMobile:t.props?.size??"original",scale:t.props?.touchedMobile?t.props?.scaleMobile:t.props?.scale}:{size:t.props?.size??"original",scale:t.props?.scale},[s,t.props?.touchedMobile,t.props?.sizeMobile,t.props?.size,t.props?.scaleMobile,t.props?.scale]),p=D.useCallback(g=>{l({...t,props:{...t.props,alt:g}})},[t,l]),m=D.useCallback(g=>{const _=g.trim().length===0?null:g.trim();l({...t,props:{...t.props,linkHref:_}})},[t,l]),h=D.useCallback(g=>{l({...t,style:g})},[t,l]);return f.jsxs(Ga,{title:o("inputs.panels.image.title"),children:[a==="block-configuration"&&f.jsxs(f.Fragment,{children:[f.jsx(A9,{data:t,setData:e,blockId:i}),f.jsx(nu,{label:o("inputs.panels.image.altLabel"),placeholder:o("inputs.panels.image.altPlaceholder"),defaultValue:t.props?.alt??"",onChange:p}),f.jsx(nu,{label:o("inputs.panels.image.urlLabel"),placeholder:o("inputs.panels.image.urlPlaceholder"),defaultValue:t.props?.linkHref??"",onChange:m}),f.jsx(kse,{defaultValue:d.size,scale:d.scale??void 0,onChange:g=>u(g,s!=="desktop")})]}),f.jsx(Ti,{names:["textAlign","textAlignMobile","backgroundColor","shape","padding","mobilePadding"],value:t.style,shapeMaxValue:300,shapeSteps:20,onChange:h})]})}const iR=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),aR=xt({top:Fe(),bottom:Fe(),right:Fe(),left:Fe()}).optional().nullable(),j9=xt({style:xt({color:iR,backgroundColor:iR,background:kt().nullable().optional(),fontSize:Fe().gte(0).optional().nullable(),fontFamily:Jl,fontWeight:jn(["bold","normal"]).optional().nullable(),textAlign:jn(["left","center","right"]).optional().nullable(),padding:aR,mobilePadding:aR,optionSize:jn(["small","medium","large"]).optional().nullable(),theme:jn(["light","dark","colored"]).optional().nullable()}).passthrough().optional().nullable(),gap:Fe().optional(),items:jc(xt({id:kt(),key:kt(),label:kt(),iconName:kt(),theme:kt(),size:kt(),sizePx:kt(),url:kt(),href:kt().optional().nullable()}))}).passthrough();function H9({style:t,items:e,blockId:n,gap:r=1,gapMobile:i}){const a=wr(),s=t?.background??"",o=t?.backgroundColor,l=o?Ko(s,o):s,c={color:t?.color??void 0,background:l,backgroundColor:t?.backgroundColor,fontSize:t?.fontSize??16,fontFamily:ms(t?.fontFamily),fontWeight:t?.fontWeight??void 0,textAlign:a=="desktop"?t?.textAlign:t?.textAlignMobile??t?.textAlign,padding:a=="desktop"?t?.padding:t?.mobilePadding??t?.padding},u=a==="desktop"?r:i??r,d=Mn(n);return f.jsx(Dse,{blockId:`${d}`,items:e,wStyle:c,gap:u})}const Dse=({items:t,blockId:e,wStyle:n,gap:r})=>{const i=a=>{switch(a){case 0:return"first";case t.length-1:return"last";default:return"inside"}};return f.jsx(di,{className:e,background:n.background,backgroundColor:n.backgroundColor,padding:n?.padding,align:n.textAlign,width:"100%",children:f.jsx("table",{style:{display:"inline-block"},border:0,cellSpacing:"0",cellPadding:"0",children:f.jsx("tbody",{children:f.jsx("tr",{children:t.map((a,s)=>{const o=i(s);return f.jsxs(D.Fragment,{children:[o!=="first"&&f.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)}),f.jsx("td",{id:`${a.id}-${a.url}`,width:a.sizePx,style:{textAlign:"center",whiteSpace:"nowrap"},children:f.jsx("a",{target:"_blank",href:ew(a.href),style:{textDecoration:"none"},children:f.jsx("img",{src:a.url,alt:a.key,style:{width:a.sizePx||36,height:a.sizePx||36,display:"block"}})},`item_${s}`)},`${a.id}-${a.url}`),o!=="last"&&f.jsx("td",{className:`gap-${e}`,width:Math.ceil(r/2)})]},a.id)})})})})})},Ase="https://maildrill-dev.s3.us-east-2.amazonaws.com/icons/",Nse={positive:!0,original:!0,negative:!0},Rse={small:!0,medium:!0,large:!0,xlarge:!0},de={theme:"positive",size:"medium"},Cn=(t,e,n="medium")=>{const r=rw.find(a=>a.key===n)?.value,i=V9.find(a=>a.key===e)?.value;return`${Ase}${t}_${i}_${r}.png`},Pn=t=>rw.find(e=>e.key===t)?.value||"36px",rw=[{value:"24px",key:"small",label:"Small"},{value:"36px",key:"medium",label:"Medium"},{value:"48px",key:"large",label:"Large"}],V9=[{value:"Positive",key:"positive",label:"Light"},{value:"Original",key:"original",label:"Color"},{value:"Negative",key:"negative",label:"Dark"}],x_=[{key:"facebook",label:"Facebook",iconName:"Facebook",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Facebook",de.theme,de.size),href:"https://www.facebook.com/your-profile"},{key:"web",label:"Web",iconName:"Web",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Web",de.theme,de.size),href:"https://www.google.com"},{key:"mail",label:"Mail",iconName:"Mail",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Mail",de.theme,de.size),href:"https://mail.google.com/"},{key:"apple",label:"Apple",iconName:"Apple",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Apple",de.theme,de.size),href:"https://www.apple.com/"},{key:"bluesky",label:"Bluesky",iconName:"Bluesky",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Bluesky",de.theme,de.size),href:"https://bsky.app/"},{key:"clubhouse",label:"ClubHouse",iconName:"Clubhouse",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Clubhouse",de.theme,de.size),href:"https://www.clubhouse.com/"},{key:"dribbble",label:"Dribbble",iconName:"Dribbble",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Dribbble",de.theme,de.size),href:"https://dribbble.com/"},{key:"figma",label:"Figma",iconName:"Figma",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Figma",de.theme,de.size),href:"https://www.figma.com/"},{key:"github",label:"Github",iconName:"Github",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Github",de.theme,de.size),href:"https://github.com/"},{key:"google",label:"Google",iconName:"Google",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Google",de.theme,de.size),href:"https://google.com/"},{key:"instagram",label:"Instagram",iconName:"Instagram",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Instagram",de.theme,de.size),href:"https://www.instagram.com/your-profile"},{key:"linkedin",label:"LinkedIn",iconName:"LinkedIn",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("LinkedIn",de.theme,de.size),href:"https://www.linkedin.com/in/your-profile"},{key:"medium-social",label:"Medium",iconName:"Medium",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Medium",de.theme,de.size),href:"https://medium.com/"},{key:"messenger",label:"Messenger",iconName:"Messenger",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Messenger",de.theme,de.size),href:"https://www.messenger.com/"},{key:"pinterest",label:"Pinterest",iconName:"Pinterest",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Pinterest",de.theme,de.size),href:"https://www.pinterest.com/"},{key:"reddit",label:"Reddit",iconName:"Reddit",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Reddit",de.theme,de.size),href:"https://www.reddit.com/"},{key:"signal",label:"Signal",iconName:"Signal",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Signal",de.theme,de.size),href:"https://signal.org/"},{key:"snapchat",label:"Snapchat",iconName:"Snapchat",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Snapchat",de.theme,de.size),href:"https://www.snapchat.com/"},{key:"spotify",label:"Spotify",iconName:"Spotify",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Spotify",de.theme,de.size),href:"https://www.spotify.com/"},{key:"telegram",label:"Telegram",iconName:"Telegram",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Telegram",de.theme,de.size),href:"https://t.me/your-profile"},{key:"threads",label:"Threads",iconName:"Threads",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Threads",de.theme,de.size),href:"https://www.threads.net/"},{key:"tiktok",label:"TikTok",iconName:"TikTok",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("TikTok",de.theme,de.size),href:"https://www.tiktok.com/@your-profile"},{key:"tumblr",label:"Tumblr",iconName:"Tumblr",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Tumblr",de.theme,de.size),href:"https://www.tumblr.com/"},{key:"twitch",label:"Twitch",iconName:"Twitch",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("Twitch",de.theme,de.size),href:"https://www.twitch.tv/"},{key:"vk",label:"VK",iconName:"VK",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("VK",de.theme,de.size),href:"https://vk.com/"},{key:"whatsapp",label:"WhatsApp",iconName:"WhatsApp",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("WhatsApp",de.theme,de.size),href:"https://www.whatsapp.com/"},{key:"x",label:"X",iconName:"X",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("X",de.theme,de.size),href:"https://x.com/your-profile"},{key:"youtube",label:"YouTube",iconName:"YouTube",theme:de.theme,size:de.size,sizePx:Pn(de.size),url:Cn("YouTube",de.theme,de.size),href:"https://www.youtube.com/channel/your-channel-id"}];function Rf(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}const Ise=({element:t,index:e,moveItem:n,onSelectChange:r,onUrlChange:i,onRemove:a,onDuplicate:s,canRemove:o,theme:l})=>{const c=D.useRef(null),[u,d]=D.useState(null),{t:p}=pn.useTranslation("inspector"),m=N=>{const R=N.getClientOffset(),T=c.current?.getBoundingClientRect();if(!R||!T)return null;const B=(T.bottom-T.top)/2;return R.y-T.top<B?"up":"down"},[{handlerId:h,isOver:g},_]=jd.useDrop(()=>({accept:"social-media-item",collect(N){return{handlerId:N.getHandlerId(),isOver:N.isOver({shallow:!0})}},hover(N,R){if(!c.current)return;if(N.index===e){d(null);return}if(!R.isOver({shallow:!0})){d(null);return}const A=m(R);d(A)},drop(N,R){if(d(null),!c.current)return;const T=N.index,B=e;if(T===B)return;const A=m(R);let L=B;A==="down"&&(L=B+1),T<L&&(L=L-1),setTimeout(()=>{n(T,L)},0),N.index=L},end:()=>{d(null)}}),[t.id,e,n]),[{isDragging:b},y]=jd.useDrag(()=>({type:"social-media-item",item:()=>({id:t.id,index:e}),collect:N=>({isDragging:N.isDragging()}),end:()=>{d(null)}}),[t.id,e]);D.useEffect(()=>{g||d(null)},[g]);const v=b?.4:1;D.useEffect(()=>{if(c.current&&y&&_){const N=c.current;y(N),_(N)}},[y,_]);const E=()=>{setTimeout(()=>a(e),0)},S=()=>{setTimeout(()=>s(e),0)},k=N=>{const R=N.target.value;setTimeout(()=>r(e,R,t),0)},x=N=>{const R=N.target.value;setTimeout(()=>i(e,R,t),0)},w=()=>f.jsxs("div",{style:{height:"3px",background:l.palette.secondary.main,position:"relative",color:l.palette.secondary.main,margin:"4px 0"},children:[f.jsx("svg",{style:{position:"absolute",left:"-25px",top:"50%",transform:"translateY(-50%)"},width:"20",height:"20",viewBox:"0 0 32 32",children:f.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})}),f.jsx("svg",{style:{position:"absolute",right:"-25px",top:"50%",transform:"translateY(-50%) scaleX(-1)"},width:"20",height:"20",viewBox:"0 0 32 32",children:f.jsx("path",{fill:"currentColor",d:"M28 12H10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M10 4v6h18V4zm18 26H10a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-18-8v6h18v-6zm-1-6l-5.586-5.586L2 11.828L6.172 16L2 20.172l1.414 1.414z"})})]});return f.jsxs(f.Fragment,{children:[u==="up"&&f.jsx(w,{}),f.jsxs(Fn,{ref:c,"data-handler-id":h,sx:{border:1,borderColor:"divider",padding:1,paddingTop:0,borderRadius:1,backgroundColor:"background.paper",marginBottom:1.5,opacity:v,cursor:b?"grabbing":"grab",boxShadow:b?l.shadows[3]:"none"},gap:1,children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:`1px solid ${l.palette.divider}`},children:[f.jsx("div",{style:{display:"flex",alignItems:"center"},children:f.jsx(Mre,{sx:{color:b?"primary.main":"text.secondary",cursor:"grab",marginLeft:-.9,"&:hover":{color:"primary.main"}}})}),f.jsxs("div",{children:[f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:"Duplicate",placement:"left",children:f.jsx(vt,{color:"primary",size:"small",onClick:S,children:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{d:"M18 2.5H9C7.9 2.5 7 3.4 7 4.5V16.5C7 17.6 7.9 18.5 9 18.5H18C19.1 18.5 20 17.6 20 16.5V4.5C20 3.4 19.1 2.5 18 2.5ZM18 16.5H9V4.5H18V16.5ZM3 15.5V13.5H5V15.5H3ZM3 10H5V12H3V10ZM10 20.5H12V22.5H10V20.5ZM3 19V17H5V19H3ZM5 22.5C3.9 22.5 3 21.6 3 20.5H5V22.5ZM8.5 22.5H6.5V20.5H8.5V22.5ZM13.5 22.5V20.5H15.5C15.5 21.6 14.6 22.5 13.5 22.5ZM5 6.5V8.5H3C3 7.4 3.9 6.5 5 6.5Z",fill:"currentColor"})})})}),o&&f.jsx(Bn,{disableInteractive:!0,arrow:!0,title:"Remove",placement:"left",children:f.jsx(vt,{color:"error",size:"small",onClick:E,children:f.jsx(Lre,{sx:{fontSize:20}})})})]})]}),f.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",gap:"0.5rem"},children:[f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[f.jsx(Xn,{label:p("inputs.social.icon")}),f.jsx(jl,{fullWidth:!0,labelId:"demo-simple-select-label",id:"demo-simple-select",value:t.key,size:"small",onChange:k,children:x_.map(N=>f.jsx(ts,{value:N.key,children:N.label},`${t.id}_${N.key}`))})]}),f.jsxs("div",{style:{display:"grid",gridTemplateColumns:"40px auto",gap:"4px",alignItems:"center"},children:[f.jsx(Xn,{label:p("inputs.social.url")}),f.jsx(wh,{size:"small",fullWidth:!0,value:t.href??"",onChange:x,variant:"outlined",placeholder:"https://your-website.com",sx:Sy})]})]})]}),u==="down"&&f.jsx(w,{})]})};function Ose({items:t=[],onChange:e}){const{t:n}=pn.useTranslation("inspector"),r=kr(),[i,a]=D.useState(()=>t.map(_=>({..._,id:_.id||Rf()}))),[s,o]=D.useState(t[0]?.theme||"default"),[l,c]=D.useState(t[0]?.size||"medium");D.useEffect(()=>{t.length>0&&(o(t[0].theme),c(t[0].size),a(t.map(_=>({..._,id:_.id||Rf()}))))},[t]);const u=(_,b)=>{a(y=>{const v=[...y],[E]=v.splice(_,1);return v.splice(b,0,E),e&&setTimeout(()=>e(v),0),v})},d=()=>{a(_=>{const b={...x_[0],theme:s,size:l,sizePx:Pn(l),url:Cn(x_[0].iconName,s,l),id:Rf()},y=[..._,b];return e&&setTimeout(()=>e(y),0),y})},p=_=>{a(b=>{const y=b.filter((v,E)=>E!==_);return e&&setTimeout(()=>e(y),0),y})},m=(_,b,y)=>{let v=[...i];if(b in Nse?(o(b),v=v.map(E=>{const S=Cn(E.iconName,b,E.size);return{...E,theme:b,url:S}})):b in Rse&&(c(b),v=v.map(E=>{const S=Cn(E.iconName,E.theme,b),k=Pn(b);return{...E,size:b,sizePx:k,url:S}})),_!==null&&y){const E=x_.find(S=>S.key===b);E&&(v=v.map((S,k)=>{const x={key:E.key,label:E.label,iconName:E.iconName,href:E.href},w=Cn(x.iconName,y.theme,y.size);return k===_?{...S,...x,url:w,id:y.id}:S}))}a(v),e&&setTimeout(()=>e(v),0)},h=(_,b,y)=>{const v=i.map((E,S)=>S===_?{...y,href:b}:E);a(v),e&&setTimeout(()=>e(v),0)},g=_=>{a(b=>{const y={...JSON.parse(JSON.stringify(b[_])),id:Rf()},v=[...b.slice(0,_+1),y,...b.slice(_+1)];return e&&setTimeout(()=>e(v),0),v})};return f.jsxs(f.Fragment,{children:[f.jsxs("div",{style:{marginBottom:"1rem",display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:"1rem"},children:[f.jsxs(mi,{children:[f.jsx(Xn,{label:n("inputs.social.theme")}),f.jsx(jl,{fullWidth:!0,labelId:"theme-selector",id:"theme-selector",value:s,size:"small",onChange:_=>m(null,_.target.value,null),children:V9.map(_=>f.jsx(ts,{value:_.key,children:_.label},`${_.key}`))})]}),f.jsxs(mi,{children:[f.jsx(Xn,{label:n("inputs.social.size")}),f.jsx(jl,{fullWidth:!0,labelId:"size-selector",id:"size-selector",value:l,size:"small",onChange:_=>m(null,_.target.value,null),children:rw.map(_=>f.jsx(ts,{value:_.key,children:_.label},`${_.key}`))})]})]}),i?.map((_,b)=>f.jsx(Ise,{element:_,index:b,moveItem:u,onSelectChange:m,onUrlChange:h,onRemove:p,onDuplicate:g,canRemove:i.length>1,theme:r},_.id)),f.jsx(ia,{onClick:d,sx:{borderRadius:1},variant:"contained",endIcon:f.jsx(kre,{}),children:"Add"})]})}const Pse=({data:t,setData:e})=>{const[,n]=D.useState(null),r=wr(),{t:i}=pn.useTranslation("inspector"),a=u=>{const d=j9.safeParse(u);d.success?(e(d.data),n(null)):n(d.error)},s=u=>{a({...t,items:u})},o=u=>{a({...t,style:u})},l=(u,d=!1)=>{if(d){a({...t,gapMobile:u});return}a({...t,gap:u})},c=so();return f.jsxs(Ga,{title:i("inputs.panels.social.title"),children:[c=="block-configuration"&&f.jsx(bt,{sx:{minWidth:120,margin:1},children:f.jsx(Ose,{items:t?.items||[],onChange:s})}),c=="css"&&f.jsxs(f.Fragment,{children:[f.jsxs(mi,{children:[f.jsx(Xn,{label:i("inputs.panels.social.gap")}),r=="desktop"?f.jsx(yr,{iconLabel:f.jsx(DN,{sx:{color:"text.primary"}}),value:t?.gap??4,setValue:l,marks:!0,step:4,units:"px",min:0,max:40}):f.jsx(yr,{iconLabel:f.jsx(DN,{sx:{color:"text.primary"}}),value:t?.gapMobile??t?.gap??4,setValue:u=>l(u,!0),marks:!0,step:4,units:"px",min:0,max:40})]}),f.jsx(Ti,{names:["textAlign","textAlignMobile","backgroundColor","padding","mobilePadding"],value:t.style,onChange:u=>o(u)})]})]})},Lse=kt().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),W9=xt({style:xt({height:Fe().optional().nullable(),heightMobile:Fe().optional().nullable(),background:kt().nullable().optional(),backgroundColor:Lse}).optional().nullable()}),sR={height:16};function Y9({style:t,blockId:e}){const r=wr()==="desktop"?t?.height??sR.height:t?.heightMobile??t?.height??sR.height,i=t?.background??"",a=t?.backgroundColor??"",s=a?Ko(i,a):i,o={width:"100%",minWidth:"100%",backgroundColor:a||void 0,background:s||void 0},l=Mn(e);return f.jsx("table",{className:l,width:"100%",style:o,children:f.jsx("tbody",{children:f.jsx("tr",{className:`it${l}`,height:r,style:{height:r},children:f.jsx("td",{})})})})}function K9({data:t,setData:e}){const[,n]=D.useState(null),{t:r}=pn.useTranslation("inspector"),i=a=>{const s=W9.safeParse(a);s.success?(e(s.data),n(null)):n(s.error)};return f.jsx(Ga,{title:r("inputs.panels.spacer.title"),children:f.jsx(Ti,{names:["height","heightMobile","backgroundColor"],value:t.style,onChange:a=>i({...t,style:a})})})}function oR(t){return f.jsx(bt,{sx:{m:3,p:1,border:"1px dashed",borderColor:"divider"},children:f.jsx(mr,{color:"text.secondary",children:t})})}function Mse(){const t=Zl(),e=P6(t||"");if(!t)return oR("Click on a block to inspect.");if(!e)return oR(`Block with id ${t} was not found. Click on a block to reset.`);const{data:n,type:r}=e,i=D.useCallback(a=>{Ul(t,()=>a)},[t]);switch(r){case"Avatar":return f.jsx(Gae,{data:n,setData:a=>i({type:r,data:a})},t);case"Button":return f.jsx(Yae,{data:n,setData:a=>i({type:r,data:a})},t);case"ColumnsContainer":return f.jsx(rse,{data:n,setData:a=>i({type:r,data:a})},t);case"Container":return f.jsx(P9,{data:n,setData:a=>i({type:r,data:a})},t);case"Divider":return f.jsx(F9,{data:n,setData:a=>i({type:r,data:a})},t);case"Heading":return f.jsx(Ese,{data:n,setData:a=>i({type:r,data:a})},t);case"Html":return f.jsx(Cse,{data:n,setData:a=>i({type:r,data:a})},t);case"Image":return f.jsx(wse,{data:n,setData:a=>i({type:r,data:a})},t);case"EmailLayout":return f.jsx(U9,{data:n,setData:a=>i({type:r,data:a})},t);case"Spacer":return f.jsx(K9,{data:n,setData:a=>i({type:r,data:a})},t);case"CustomEditor":return f.jsx(eR,{data:n,setData:a=>i({type:r,data:a})},t);case"Wysiwyg":return f.jsx(eR,{data:n,setData:a=>i({type:r,data:a})},t);case"SocialMedia":return f.jsx(Pse,{data:n,setData:a=>i({type:r,data:a})},t);default:return f.jsx("pre",{children:JSON.stringify(e,null," ")})}}const Fse=D.memo(Mse);function Bse(){const t=Zl(),e=use(t??"root");if(!e)return null;const{data:n,type:r}=e,i=D.useCallback(s=>{t&&Ul(t,()=>s)},[t]),a=D.useCallback(s=>{Ul("root",()=>s)},[]);switch(r){case"Container":return f.jsx(P9,{data:n,setData:s=>i({type:r,data:s})},t);case"Divider":return f.jsx(F9,{data:n,setData:s=>i({type:r,data:s})},t);case"Spacer":return f.jsx(K9,{data:n,setData:s=>i({type:r,data:s})},t);case"EmailLayout":return f.jsx(U9,{data:n,setData:s=>a({type:r,data:s})},"root");default:return f.jsx("pre",{children:JSON.stringify(e,null," ")})}}function Use({sticky:t,heightContent:e}){const n=so(),r=I6(),i=Zl(),a=wr(),s=kr(),{t:o}=pn.useTranslation("inspector"),l=()=>{const m={position:"absolute",top:"1rem",right:"0rem",height:"24px",lineHeight:"normal",width:"fit",fontSize:"12px"};switch(n){case"block-configuration":case"css":return f.jsxs("div",{style:{position:"relative"},children:[f.jsx(wC,{color:"primary",sx:m,label:`${o(a==="desktop"?"header.desktop":"header.mobile")}`}),f.jsx(Fse,{})]});case"styles":return f.jsxs("div",{style:{position:"relative"},children:[f.jsx(Bse,{}),f.jsx(wC,{color:"primary",sx:m,label:`${o(a==="desktop"?"header.desktop":"header.mobile")}`})]})}},c=()=>f.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",children:f.jsx("path",{d:"M3.83398 5H17.1673M3.83398 10H17.1673M3.83398 15H9.66732",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),u=()=>f.jsx("svg",{style:{marginRight:"4px",color:"inherit"},width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:f.jsx("path",{d:"M5.83333 17.5C3.99238 17.5 2.5 16.0076 2.5 14.1667V4.16667C2.5 3.24619 3.24619 2.5 4.16667 2.5H7.5C8.42047 2.5 9.16667 3.24619 9.16667 4.16667V14.1667C9.16667 16.0076 7.67428 17.5 5.83333 17.5ZM5.83333 17.5H15.8333C16.7538 17.5 17.5 16.7538 17.5 15.8333V12.5C17.5 11.5795 16.7538 10.8333 15.8333 10.8333H13.8807M9.16669 6.11927L10.5474 4.73858C11.1983 4.0877 12.2535 4.0877 12.9044 4.73858L15.2614 7.0956C15.9123 7.74647 15.9123 8.80175 15.2614 9.45262L8.19036 16.5237M5.83333 14.1667H5.84167",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});D.useEffect(()=>{const m=h=>{const g=h.target;SN(g.innerWidth)};return window&&SN(window.innerWidth),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[n]);const d=(m,h)=>{ire(h)},p=t?e?`calc(${e} - ${Co})`:void 0:e??void 0;return f.jsxs(Rm,{sx:m=>({width:sb,padding:"0!important",margin:"0!important",height:p,maxHeight:p,display:"flex",flexDirection:"column",overflow:"hidden",position:t?"sticky":"static",top:t?Co:0,backgroundColor:`${m.palette.background.paper} !important`}),children:[f.jsx(bt,{sx:{position:"sticky",top:0,zIndex:1,backgroundColor:`${s.palette.background.paper} !important`},children:f.jsxs(v6,{sx:{backgroundColor:`${s.palette.background.paper} !important`},value:n,onChange:d,children:[i!=null&&!ab.includes(r||"")&&[f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"block-configuration",label:o("header.content"),icon:f.jsx(c,{}),iconPosition:"start"},"block-configuration"),f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"css",label:o("header.styles"),icon:f.jsx(u,{}),iconPosition:"start"},"css")],ab.includes(r)&&[f.jsx(Oc,{sx:{height:Co,minHeight:Co},value:"styles",label:o("header.styles"),icon:f.jsx(u,{}),iconPosition:"start"},"styles")]]})}),f.jsx(Rm,{sx:m=>({flex:"1 1 auto",minHeight:0,overflowY:"auto",px:2,backgroundColor:`${m.palette.background.paper} !important`}),children:l()})]})}const Q9=({children:t,topOffset:e=0,zIndex:n=10,className:r="",style:i={},disabled:a=!1,threshold:s=null,...o})=>{const[l,c]=D.useState(!1),[u,d]=D.useState({width:0,height:0}),[p,m]=D.useState({left:0}),[h,g]=D.useState(0),[_,b]=D.useState(!1),y=D.useRef(null),v=D.useRef(null),E=D.useRef(null);D.useEffect(()=>{if(a){c(!1),b(!1),g(0);return}const x=v.current,w=y.current;if(!x||!w)return;let N=null;s&&(s.startsWith("#")?N=document.getElementById(s.slice(1)):(s.startsWith("."),N=document.querySelector(s)));const R=()=>{const M=w.getBoundingClientRect();d({width:M.width,height:M.height}),m({left:M.left})},T=()=>{if(!N||!w)return{offset:0,isPushed:!1};const M=N.getBoundingClientRect(),O=w.getBoundingClientRect(),$=e+O.height;if(M.top<$){const z=$-M.top,X=O.height+20;return{offset:-Math.min(z,X),isPushed:!0}}return{offset:0,isPushed:!1}},B=new IntersectionObserver(([M])=>{const O=!M.isIntersecting;if(O&&!l&&R(),c(O),O&&s){const{offset:$,isPushed:z}=T();g($),b(z)}else O||(g(0),b(!1))},{threshold:0,rootMargin:`-${e}px 0px 0px 0px`}),A=new ResizeObserver(()=>{R()}),L=()=>{if(s&&l){const{offset:M,isPushed:O}=T();g(M),b(O)}};return B.observe(x),A.observe(w),s&&window.addEventListener("scroll",L,{passive:!0}),R(),()=>{B.disconnect(),A.disconnect(),s&&window.removeEventListener("scroll",L)}},[e,l,a,s]);const S=!a&&l,k=S?`${e+h}px`:"auto";return f.jsxs("div",{ref:E,className:r,...o,children:[!a&&f.jsx("div",{ref:v,style:{height:"1px",position:"absolute",top:`-${e+1}px`,left:0,right:0,pointerEvents:"none"}}),S&&f.jsx("div",{style:{height:`${u.height}px`,width:`${u.width}px`}}),f.jsx("div",{ref:y,style:{position:S?"fixed":"static",top:k,width:"auto",height:"auto",zIndex:S?n:"auto",transition:_?"none":"box-shadow 0.2s ease-in-out, top 0.3s ease-out",..._&&h<-u.height*.3&&{opacity:Math.max(0,1+(h+u.height*.3)/(u.height*.7))},...i},children:t})]})};var Zv,lR;function iw(){if(lR)return Zv;lR=1;var t={"&":"&","<":"<",">":">",'"':""","'":"'"},e={"&":"&","<":"<",">":">",""":'"',"'":"'"},n=/(&|<|>|"|')/g,r=/[&<>"']/g;function i(l){return t[l]}function a(l){return e[l]}function s(l){return l==null?"":String(l).replace(r,i)}function o(l){return l==null?"":String(l).replace(n,a)}return s.options=o.options={},Zv={encode:s,escape:s,decode:o,unescape:o,version:"1.0.0-browser"},Zv}var Jv,cR;function $se(){if(cR)return Jv;cR=1;function t(e){for(var n=Array.prototype.slice.call(arguments,1),r,i;n.length;){r=n.shift();for(i in r)r.hasOwnProperty(i)&&(Object.prototype.toString.call(e[i])==="[object Object]"?e[i]=t(e[i],r[i]):e[i]=r[i])}return e}return Jv=t,Jv}var eE,uR;function X9(){return uR||(uR=1,eE=function(e){return typeof e=="string"?e.toLowerCase():e}),eE}var tE,dR;function Z9(){if(dR)return tE;dR=1;function t(n){return n.reduce(e,{})}function e(n,r){return n[r]=!0,n}return tE=t,tE}var nE,pR;function J9(){if(pR)return nE;pR=1;var t=Z9(),e=["background","base","cite","href","longdesc","src","usemap"];return nE={uris:t(e)},nE}var rE,fR;function e5(){if(fR)return rE;fR=1;var t=Z9(),e=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];return rE={voids:t(e)},rE}var iE,mR;function zse(){if(mR)return iE;mR=1;var t=iw(),e=X9();J9();var n=e5(),r=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,i=/^<\s*\/\s*([\w:-]+)[^>]*>/,a=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,s=/^</,o=/^<\s*\//;function l(){var u=[];return u.lastItem=function(){return u[u.length-1]},u}function c(u,d){for(var p=l(),m=u,h;u;)g();S();function g(){h=!0,_();var k=u===m;m=u,k&&(u="")}function _(){u.substr(0,4)==="<!--"?y():o.test(u)?b(i,S):s.test(u)&&b(r,E),v()}function b(k,x){var w=u.match(k);w&&(u=u.substring(w[0].length),w[0].replace(k,x),h=!1)}function y(){var k=u.indexOf("-->");k>=0&&(d.comment&&d.comment(u.substring(4,k)),u=u.substring(k+3),h=!1)}function v(){if(h){var k,x=u.indexOf("<");x>=0?(k=u.substring(0,x),u=u.substring(x)):(k=u,u=""),d.chars&&d.chars(k)}}function E(k,x,w,N){var R={},T=e(x),B=n.voids[T]||!!N;w.replace(a,A),B||p.push(T),d.start&&d.start(T,R,B);function A(L,M,O,$,z){O===void 0&&$===void 0&&z===void 0?R[M]=void 0:R[M]=t.decode(O||$||z||"")}}function S(k,x){var w,N=0,R=e(x);if(R)for(N=p.length-1;N>=0&&p[N]!==R;N--);if(N>=0){for(w=p.length-1;w>=N;w--)d.end&&d.end(p[w]);p.length=N}}}return iE=c,iE}var aE,hR;function qse(){if(hR)return aE;hR=1;var t=iw(),e=X9(),n=J9(),r=e5();function i(a,s){var o,l=s||{};return _(),{start:u,end:d,chars:m};function c(b){a.push(b)}function u(b,y,v){var E=e(b);if(o.ignoring){h(E);return}if((l.allowedTags||[]).indexOf(E)===-1){h(E);return}if(l.filter&&!l.filter({tag:E,attrs:y})){h(E);return}c("<"),c(E),Object.keys(y).forEach(S),c(v?"/>":">");function S(k){var x=y[k],w=(l.allowedClasses||{})[E]||[],N=(l.allowedAttributes||{})[E]||[],R,T=e(k);T==="class"&&N.indexOf(T)===-1?(x=x.split(" ").filter(B).join(" ").trim(),R=x.length):R=N.indexOf(T)!==-1&&(n.uris[T]!==!0||p(x)),R&&(c(" "),c(k),typeof x=="string"&&(c('="'),c(t.encode(x)),c('"')));function B(A){return w&&w.indexOf(A)!==-1}}}function d(b){var y=e(b),v=(l.allowedTags||[]).indexOf(y)!==-1;v&&o.ignoring===!1?(c("</"),c(y),c(">")):g(y)}function p(b){var y=b[0];if(y==="#"||y==="/")return!0;var v=b.indexOf(":");if(v===-1)return!0;var E=b.indexOf("?");if(E!==-1&&v>E)return!0;var S=b.indexOf("#");if(S!==-1&&v>S)return!0;return l.allowedSchemes.some(k);function k(x){return b.indexOf(x+":")===0}}function m(b){o.ignoring===!1&&c(l.transformText?l.transformText(b):b)}function h(b){r.voids[b]||(o.ignoring===!1?o={ignoring:b,depth:1}:o.ignoring===b&&o.depth++)}function g(b){o.ignoring===b&&--o.depth<=0&&_()}function _(){o={ignoring:!1,depth:0}}}return aE=i,aE}var sE,gR;function Gse(){if(gR)return sE;gR=1;var t={allowedAttributes:{a:["href","name","target","title","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};return sE=t,sE}var oE,_R;function jse(){if(_R)return oE;_R=1,iw();var t=$se(),e=zse(),n=qse(),r=Gse();function i(a,s,o){var l=[],c=o===!0?s:t({},r,s),u=n(l,c);return e(a,u),l.join("")}return i.defaults=r,oE=i,oE}var Hse=jse();const Vse=mu(Hse);function aw(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let bu=aw();function t5(t){bu=t}const n5=/[&<>"']/,Wse=new RegExp(n5.source,"g"),r5=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Yse=new RegExp(r5.source,"g"),Kse={"&":"&","<":"<",">":">",'"':""","'":"'"},bR=t=>Kse[t];function ea(t,e){if(e){if(n5.test(t))return t.replace(Wse,bR)}else if(r5.test(t))return t.replace(Yse,bR);return t}const Qse=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Xse(t){return t.replace(Qse,(e,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const Zse=/(^|[^\[])\^/g;function Gn(t,e){let n=typeof t=="string"?t:t.source;e=e||"";const r={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Zse,"$1"),n=n.replace(i,s),r},getRegex:()=>new RegExp(n,e)};return r}function yR(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const nm={exec:()=>null};function vR(t,e){const n=t.replace(/\|/g,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),r=n.split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(/\\\|/g,"|");return r}function Ng(t,e,n){const r=t.length;if(r===0)return"";let i=0;for(;i<r&&t.charAt(r-i-1)===e;)i++;return t.slice(0,r-i)}function Jse(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return-1}function ER(t,e,n,r){const i=e.href,a=e.title?ea(e.title):null,s=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){r.state.inLink=!0;const o={type:"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,o}return{type:"image",raw:n,href:i,title:a,text:ea(s)}}function eoe(t,e){const n=t.match(/^(\s+)(?:```)/);if(n===null)return e;const r=n[1];return e.split(`
|
|
103
103
|
`).map(i=>{const a=i.match(/^\s+/);if(a===null)return i;const[s]=a;return s.length>=r.length?i.slice(r.length):i}).join(`
|
|
104
104
|
`)}class yb{constructor(e){J(this,"options");J(this,"rules");J(this,"lexer");this.options=e||bu}space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(e){const n=this.rules.block.code.exec(e);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ng(r,`
|
|
105
105
|
`)}}}fences(e){const n=this.rules.block.fences.exec(e);if(n){const r=n[0],i=eoe(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(e){const n=this.rules.block.heading.exec(e);if(n){let r=n[2].trim();if(/#$/.test(r)){const i=Ng(r,"#");(this.options.pedantic||!i||/ $/.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[0]}}blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){let r=n[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
|