@data-c/ui 0.1.61 → 0.1.62

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.js CHANGED
@@ -7,7 +7,7 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:It(18,`(${t})`));return
7
7
  `)),()=>{})}function cr(e){return ut(e,"spacing",8,"spacing")}function $e(e,t){return typeof t=="string"||t==null?t:e(t)}function uh(e,t){return r=>e.reduce((o,n)=>(o[n]=$e(t,r),o),{})}function ph(e,t,r,o){if(!t.includes(r))return null;let n=ch(r),i=uh(n,o),a=e[r];return ie(e,a,i)}function xi(e,t){let r=cr(e.theme);return Object.keys(e).map(o=>ph(e,t,o,r)).reduce(We,{})}function J(e){return xi(e,Po)}J.propTypes=process.env.NODE_ENV!=="production"?Po.reduce((e,t)=>(e[t]=ve,e),{}):{};J.filterProps=Po;function ee(e){return xi(e,To)}ee.propTypes=process.env.NODE_ENV!=="production"?To.reduce((e,t)=>(e[t]=ve,e),{}):{};ee.filterProps=To;function Hc(e){return xi(e,yi)}Hc.propTypes=process.env.NODE_ENV!=="production"?yi.reduce((e,t)=>(e[t]=ve,e),{}):{};Hc.filterProps=yi;function vi(e=8,t=cr({spacing:e})){if(e.mui)return e;let r=(...o)=>(process.env.NODE_ENV!=="production"&&(o.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${o.length}`)),(o.length===0?[1]:o).map(i=>{let a=t(i);return typeof a=="number"?`${a}px`:a}).join(" "));return r.mui=!0,r}function fh(...e){let t=e.reduce((o,n)=>(n.filterProps.forEach(i=>{o[i]=n}),o),{}),r=o=>Object.keys(o).reduce((n,i)=>t[i]?We(n,t[i](o)):n,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((o,n)=>Object.assign(o,n.propTypes),{}):{},r.filterProps=e.reduce((o,n)=>o.concat(n.filterProps),[]),r}var He=fh;function be(e){return typeof e!="number"?e:`${e}px solid`}function Te(e,t){return Z({prop:e,themeKey:"borders",transform:t})}var dh=Te("border",be),mh=Te("borderTop",be),hh=Te("borderRight",be),gh=Te("borderBottom",be),yh=Te("borderLeft",be),xh=Te("borderColor"),vh=Te("borderTopColor"),bh=Te("borderRightColor"),Ch=Te("borderBottomColor"),wh=Te("borderLeftColor"),Sh=Te("outline",be),Ph=Te("outlineColor"),ur=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=ut(e.theme,"shape.borderRadius",4,"borderRadius"),r=o=>({borderRadius:$e(t,o)});return ie(e,e.borderRadius,r)}return null};ur.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:ve}:{};ur.filterProps=["borderRadius"];var Dk=He(dh,mh,hh,gh,yh,xh,vh,bh,Ch,wh,ur,Sh,Ph);var pr=e=>{if(e.gap!==void 0&&e.gap!==null){let t=ut(e.theme,"spacing",8,"gap"),r=o=>({gap:$e(t,o)});return ie(e,e.gap,r)}return null};pr.propTypes=process.env.NODE_ENV!=="production"?{gap:ve}:{};pr.filterProps=["gap"];var fr=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=ut(e.theme,"spacing",8,"columnGap"),r=o=>({columnGap:$e(t,o)});return ie(e,e.columnGap,r)}return null};fr.propTypes=process.env.NODE_ENV!=="production"?{columnGap:ve}:{};fr.filterProps=["columnGap"];var dr=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=ut(e.theme,"spacing",8,"rowGap"),r=o=>({rowGap:$e(t,o)});return ie(e,e.rowGap,r)}return null};dr.propTypes=process.env.NODE_ENV!=="production"?{rowGap:ve}:{};dr.filterProps=["rowGap"];var Th=Z({prop:"gridColumn"}),kh=Z({prop:"gridRow"}),Ih=Z({prop:"gridAutoFlow"}),Eh=Z({prop:"gridAutoColumns"}),Ah=Z({prop:"gridAutoRows"}),Fh=Z({prop:"gridTemplateColumns"}),Mh=Z({prop:"gridTemplateRows"}),Rh=Z({prop:"gridTemplateAreas"}),Dh=Z({prop:"gridArea"}),Vk=He(pr,fr,dr,Th,kh,Ih,Eh,Ah,Fh,Mh,Rh,Dh);function pt(e,t){return t==="grey"?t:e}var Oh=Z({prop:"color",themeKey:"palette",transform:pt}),Bh=Z({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:pt}),Lh=Z({prop:"backgroundColor",themeKey:"palette",transform:pt}),Hk=He(Oh,Bh,Lh);function me(e){return e<=1&&e!==0?`${e*100}%`:e}var _h=Z({prop:"width",transform:me}),ko=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){let t=r=>{var n,i,a,l,s;let o=((a=(i=(n=e.theme)==null?void 0:n.breakpoints)==null?void 0:i.values)==null?void 0:a[r])||sr[r];return o?((s=(l=e.theme)==null?void 0:l.breakpoints)==null?void 0:s.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:me(r)}};return ie(e,e.maxWidth,t)}return null};ko.filterProps=["maxWidth"];var $h=Z({prop:"minWidth",transform:me}),Nh=Z({prop:"height",transform:me}),Vh=Z({prop:"maxHeight",transform:me}),zh=Z({prop:"minHeight",transform:me}),Kk=Z({prop:"size",cssProperty:"width",transform:me}),Zk=Z({prop:"size",cssProperty:"height",transform:me}),Gh=Z({prop:"boxSizing"}),Qk=He(_h,ko,$h,Nh,Vh,zh,Gh);var Wh={border:{themeKey:"borders",transform:be},borderTop:{themeKey:"borders",transform:be},borderRight:{themeKey:"borders",transform:be},borderBottom:{themeKey:"borders",transform:be},borderLeft:{themeKey:"borders",transform:be},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:be},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ur},color:{themeKey:"palette",transform:pt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:pt},backgroundColor:{themeKey:"palette",transform:pt},p:{style:ee},pt:{style:ee},pr:{style:ee},pb:{style:ee},pl:{style:ee},px:{style:ee},py:{style:ee},padding:{style:ee},paddingTop:{style:ee},paddingRight:{style:ee},paddingBottom:{style:ee},paddingLeft:{style:ee},paddingX:{style:ee},paddingY:{style:ee},paddingInline:{style:ee},paddingInlineStart:{style:ee},paddingInlineEnd:{style:ee},paddingBlock:{style:ee},paddingBlockStart:{style:ee},paddingBlockEnd:{style:ee},m:{style:J},mt:{style:J},mr:{style:J},mb:{style:J},ml:{style:J},mx:{style:J},my:{style:J},margin:{style:J},marginTop:{style:J},marginRight:{style:J},marginBottom:{style:J},marginLeft:{style:J},marginX:{style:J},marginY:{style:J},marginInline:{style:J},marginInlineStart:{style:J},marginInlineEnd:{style:J},marginBlock:{style:J},marginBlockStart:{style:J},marginBlockEnd:{style:J},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pr},rowGap:{style:dr},columnGap:{style:fr},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:me},maxWidth:{style:ko},minWidth:{transform:me},height:{transform:me},maxHeight:{transform:me},minHeight:{transform:me},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Rt=Wh;function Hh(...e){let t=e.reduce((o,n)=>o.concat(Object.keys(n)),[]),r=new Set(t);return e.every(o=>r.size===Object.keys(o).length)}function Uh(e,t){return typeof e=="function"?e(t):e}function jh(){function e(r,o,n,i){let a={[r]:o,theme:n},l=i[r];if(!l)return{[r]:o};let{cssProperty:s=r,themeKey:u,transform:p,style:f}=l;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[r]:o};let h=Mt(n,u)||{};return f?f(a):ie(a,o,y=>{let g=lr(h,p,y);return y===g&&typeof y=="string"&&(g=lr(h,p,`${r}${y==="default"?"":tt(y)}`,y)),s===!1?g:{[s]:g}})}function t(r){var l;let{sx:o,theme:n={}}=r||{};if(!o)return null;let i=(l=n.unstable_sxConfig)!=null?l:Rt;function a(s){let u=s;if(typeof s=="function")u=s(n);else if(typeof s!="object")return s;if(!u)return null;let p=hi(n.breakpoints),f=Object.keys(p),h=p;return Object.keys(u).forEach(m=>{let y=Uh(u[m],n);if(y!=null)if(typeof y=="object")if(i[m])h=We(h,e(m,y,n,i));else{let g=ie({theme:n},y,S=>({[m]:S}));Hh(g,y)?h[m]=t({sx:y,theme:n}):h=We(h,g)}else h=We(h,e(m,y,n,i))}),fi(n,gi(f,h))}return Array.isArray(o)?o.map(a):a(o)}return t}var Uc=jh();Uc.filterProps=["sx"];var Dt=Uc;function bi(e,t){var o;let r=this;if(r.vars){if(!((o=r.colorSchemes)!=null&&o[e])||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function qh(e={},...t){let p=e,{breakpoints:r={},palette:o={},spacing:n,shape:i={}}=p,a=C(p,["breakpoints","palette","spacing","shape"]),l=pi(r),s=vi(n),u=Pe({breakpoints:l,direction:"ltr",components:{},palette:c({mode:"light"},o),spacing:s,shape:c(c({},Vc),i)},a);return u=Co(u),u.applyStyles=bi,u=t.reduce((f,h)=>Pe(f,h),u),u.unstable_sxConfig=c(c({},Rt),a==null?void 0:a.unstable_sxConfig),u.unstable_sx=function(h){return Dt({sx:h,theme:this})},u}var ft=qh;function Yh(e){return Object.keys(e).length===0}function Kh(e=null){let t=jc.useContext(_react2.ThemeContext);return!t||Yh(t)?e:t}var Ci=Kh;var Zh=ft();function Qh(e=Zh){return Ci(e)}var wi=Qh;var Xh=e=>{var o,n;let t={systemProps:{},otherProps:{}},r=(n=(o=e==null?void 0:e.theme)==null?void 0:o.unstable_sxConfig)!=null?n:Rt;return Object.keys(e).forEach(i=>{r[i]?t.systemProps[i]=e[i]:t.otherProps[i]=e[i]}),t};function Io(e){let a=e,{sx:t}=a,r=C(a,["sx"]),{systemProps:o,otherProps:n}=Xh(r),i;return Array.isArray(t)?i=[o,...t]:typeof t=="function"?i=(...l)=>{let s=t(...l);return _e(s)?c(c({},o),s):o}:i=c(c({},o),t),d(c({},n),{sx:i})}var qc=e=>e,Jh=()=>{let e=qc;return{configure(t){e=t},generate(t){return e(t)},reset(){e=qc}}},eg=Jh(),Si=eg;function Yc(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=Yc(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function tg(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=Yc(e))&&(o&&(o+=" "),o+=t);return o}var Kc=tg;var rg={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Eo(e,t,r="Mui"){let o=rg[t];return o?`${r}-${o}`:`${Si.generate(e)}-${t}`}var Ao=Qe(li());function Qc(e,t=""){return e.displayName||e.name||t}function Zc(e,t,r){let o=Qc(t);return e.displayName||(o!==""?`${r}(${o})`:r)}function Fo(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Qc(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Ao.ForwardRef:return Zc(e,e.render,"ForwardRef");case Ao.Memo:return Zc(e,e.type,"memo");default:return}}}function Pi(e){let n=e,{variants:t}=n,r=C(n,["variants"]),o={variants:t,style:ni(r),isProcessed:!0};return o.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=ni(i.style))}),o}var og=ft();function Ti(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function ng(e){return e?(t,r)=>r[e]:null}function ig(e,t,r){e.theme=lg(e.theme)?r:e.theme[t]||e.theme}function Mo(e,t){let r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(n=>Mo(e,n));if(Array.isArray(r==null?void 0:r.variants)){let n;if(r.isProcessed)n=r.style;else{let o=r,{variants:i}=o;n=C(o,["variants"])}return Xc(e,r.variants,[n])}return r!=null&&r.isProcessed?r.style:r}function Xc(e,t,r=[]){var n;let o;e:for(let i=0;i<t.length;i+=1){let a=t[i];if(typeof a.props=="function"){if(o!=null||(o=d(c(c({},e),e.ownerState),{ownerState:e.ownerState})),!a.props(o))continue}else for(let l in a.props)if(e[l]!==a.props[l]&&((n=e.ownerState)==null?void 0:n[l])!==a.props[l])continue e;typeof a.style=="function"?(o!=null||(o=d(c(c({},e),e.ownerState),{ownerState:e.ownerState})),r.push(a.style(o))):r.push(a.style)}return r}function Ro(e={}){let{themeId:t,defaultTheme:r=og,rootShouldForwardProp:o=Ti,slotShouldForwardProp:n=Ti}=e;function i(l){ig(l,t,r)}return(l,s={})=>{Bc(l,M=>M.filter(k=>k!==Dt));let D=s,{name:u,slot:p,skipVariantsResolver:f,skipSx:h,overridesResolver:m=ng(Jc(p))}=D,y=C(D,["name","slot","skipVariantsResolver","skipSx","overridesResolver"]),g=f!==void 0?f:p&&p!=="Root"&&p!=="root"||!1,S=h||!1,v=Ti;p==="Root"||p==="root"?v=o:p?v=n:cg(l)&&(v=void 0);let T=oi(l,c({shouldForwardProp:v,label:sg(u,p)},y)),w=M=>{if(M.__emotion_real===M)return M;if(typeof M=="function")return function(te){return Mo(te,M)};if(_e(M)){let k=Pi(M);return k.variants?function(W){return Mo(W,k)}:k.style}return M},P=(...M)=>{let k=[],te=M.map(w),W=[];if(k.push(i),u&&m&&W.push(function(x){var F,L;let I=(L=(F=x.theme.components)==null?void 0:F[u])==null?void 0:L.styleOverrides;if(!I)return null;let E={};for(let O in I)E[O]=Mo(x,I[O]);return m(x,E)}),u&&!g&&W.push(function(x){var E,F;let b=x.theme,I=(F=(E=b==null?void 0:b.components)==null?void 0:E[u])==null?void 0:F.variants;return I?Xc(x,I):null}),S||W.push(Dt),Array.isArray(te[0])){let B=te.shift(),x=new Array(k.length).fill(""),b=new Array(W.length).fill(""),I;I=[...x,...B,...b],I.raw=[...x,...B.raw,...b],k.unshift(I)}let re=[...k,...te,...W],R=T(...re);return l.muiName&&(R.muiName=l.muiName),process.env.NODE_ENV!=="production"&&(R.displayName=ag(u,p,l)),R};return T.withConfig&&(P.withConfig=T.withConfig),P}}function ag(e,t,r){return e?`${e}${tt(t||"")}`:`Styled(${Fo(r)})`}function sg(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Jc(t||"Root")}`),r}function lg(e){for(let t in e)return!1;return!0}function cg(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Jc(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}var ug=Ro(),ki=ug;function mr(e,t){let r=c({},t);for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){let n=o;if(n==="components"||n==="slots")r[n]=c(c({},e[n]),r[n]);else if(n==="componentsProps"||n==="slotProps"){let i=e[n],a=t[n];if(!a)r[n]=i||{};else if(!i)r[n]=a;else{r[n]=c({},a);for(let l in i)if(Object.prototype.hasOwnProperty.call(i,l)){let s=l;r[n][s]=mr(i[s],a[s])}}}else r[n]===void 0&&(r[n]=e[n])}return r}function Ii(e){let{theme:t,name:r,props:o}=e;return!t||!t.components||!t.components[r]||!t.components[r].defaultProps?o:mr(t.components[r].defaultProps,o)}function Do({props:e,name:t,defaultTheme:r,themeId:o}){let n=wi(r);return o&&(n=n[o]||n),Ii({theme:n,name:t,props:e})}function Oo(e,t,r=void 0){let o={};for(let n in e){let i=e[n],a="",l=!0;for(let s=0;s<i.length;s+=1){let u=i[s];u&&(a+=(l===!0?"":" ")+t(u),l=!1,r&&r[u]&&(a+=" "+r[u]))}o[n]=a}return o}var Q=Qe(co());var X=Qe(co());var fg=ft(),dg=ki("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function mg(e){return Do({props:e,name:"MuiStack",defaultTheme:fg})}function hg(e,t){let r=Ot.Children.toArray(e).filter(Boolean);return r.reduce((o,n,i)=>(o.push(n),i<r.length-1&&o.push(Ot.cloneElement(t,{key:`separator-${i}`})),o),[])}var gg=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],yg=({ownerState:e,theme:t})=>{let r=c({display:"flex",flexDirection:"column"},ie({theme:t},wo({values:e.direction,breakpoints:t.breakpoints.values}),o=>({flexDirection:o})));if(e.spacing){let o=cr(t),n=Object.keys(t.breakpoints.values).reduce((s,u)=>((typeof e.spacing=="object"&&e.spacing[u]!=null||typeof e.direction=="object"&&e.direction[u]!=null)&&(s[u]=!0),s),{}),i=wo({values:e.direction,base:n}),a=wo({values:e.spacing,base:n});typeof i=="object"&&Object.keys(i).forEach((s,u,p)=>{if(!i[s]){let h=u>0?i[p[u-1]]:"column";i[s]=h}}),r=Pe(r,ie({theme:t},a,(s,u)=>e.useFlexGap?{gap:$e(o,s)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${gg(u?i[u]:e.direction)}`]:$e(o,s)}}))}return r=Gc(t.breakpoints,r),r};function Ei(e={}){let{createStyledComponent:t=dg,useThemeProps:r=mg,componentName:o="MuiStack"}=e,n=()=>Oo({root:["root"]},s=>Eo(o,s),{}),i=t(yg),a=Ot.forwardRef(function(s,u){let p=r(s),M=Io(p),{component:h="div",direction:m="column",spacing:y=0,divider:g,children:S,className:v,useFlexGap:T=!1}=M,w=C(M,["component","direction","spacing","divider","children","className","useFlexGap"]),P={direction:m,spacing:y,useFlexGap:T},D=n();return _jsxruntime.jsx.call(void 0, i,d(c({as:h,ownerState:P,ref:u,className:Kc(D.root,v)},w),{children:g?hg(S,g):S}))});return process.env.NODE_ENV!=="production"&&(a.propTypes={children:X.default.node,direction:X.default.oneOfType([X.default.oneOf(["column-reverse","column","row-reverse","row"]),X.default.arrayOf(X.default.oneOf(["column-reverse","column","row-reverse","row"])),X.default.object]),divider:X.default.node,spacing:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.number,X.default.string])),X.default.number,X.default.object,X.default.string]),sx:X.default.oneOfType([X.default.arrayOf(X.default.oneOfType([X.default.func,X.default.object,X.default.bool])),X.default.func,X.default.object])}),a}var eu=Ei();process.env.NODE_ENV!=="production"&&(eu.propTypes={children:Q.default.node,component:Q.default.elementType,direction:Q.default.oneOfType([Q.default.oneOf(["column-reverse","column","row-reverse","row"]),Q.default.arrayOf(Q.default.oneOf(["column-reverse","column","row-reverse","row"])),Q.default.object]),divider:Q.default.node,spacing:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.number,Q.default.string])),Q.default.number,Q.default.object,Q.default.string]),sx:Q.default.oneOfType([Q.default.arrayOf(Q.default.oneOfType([Q.default.func,Q.default.object,Q.default.bool])),Q.default.func,Q.default.object]),useFlexGap:Q.default.bool});var Bo=eu;var Cg=_styled2.default.call(void 0, (0, _material.Typography))(({theme:e})=>({fontWeight:"bold"}));function ou(e){let{label:t,children:r,labelProps:o,contentProps:n,isNumber:i,showDivider:a}=e;return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",gap:4},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsx.call(void 0, Bo,{children:_jsxruntime.jsx.call(void 0, Cg,d(c({},o),{children:t}))}),_jsxruntime.jsx.call(void 0, Bo,{direction:i?"row":"column",justifyContent:i?"flex-end":"center",children:r})]}),a&&_jsxruntime.jsx.call(void 0, _material.Divider,{orientation:"vertical",flexItem:!0})]})}function _o(e){let{typographyProps:t,onChange:r,onEscape:o,value:n,displayEditButton:i,displaySaveButton:a,textFieldProps:l,isEditing:s,isLoading:u,error:p}=e,M=l||{},{InputProps:f,value:h,onKeyDown:m,onChange:y}=M,g=C(M,["InputProps","value","onKeyDown","onChange"]),[S,v]=_react.useState.call(void 0, !1),[T,w]=_react.useState.call(void 0, !1),[P,D]=_react.useState.call(void 0, );return _react.useEffect.call(void 0, ()=>{D(n)},[n]),_react.useEffect.call(void 0, ()=>{v(!!s)},[s]),_react.useEffect.call(void 0, ()=>{p&&w(!0)},[p]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[!S&&!u&&!T&&_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{cursor:"pointer"},direction:"row",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, _material.Typography,d(c({onClick:()=>{v(!0)}},t),{children:P})),i&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{v(!0)},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{})})]}),(S||u||T)&&_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>v(!1),children:_jsxruntime.jsx.call(void 0, _material.TextField,c({disabled:u,autoFocus:!0,value:P,error:T,onKeyDown:k=>{k.key==="Enter"&&(r(P),v(!1)),k.key==="Escape"&&(D(n),v(!1),w(!1),o&&o(n,P))},onChange:k=>{let te=k.target.value;D(te)},InputProps:{endAdornment:_jsxruntime.jsxs.call(void 0, _material.InputAdornment,{position:"end",children:[u&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{size:18}),a&&_jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>{n!=P&&r(P),v(!1)},edge:"end",children:n!=P?_jsxruntime.jsx.call(void 0, _iconsmaterial.Save,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Cancel,{})})]})}},g))})]})}var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);function rt(e){let i=e,{onSearch:t}=i,r=C(i,["onSearch"]),o=_lodash2.default.debounce(a=>t(a),500);function n(a){let l=a.target.value;o(l)}return _jsxruntime.jsx.call(void 0, _material.TextField,c({onChange:n,autoFocus:!0,InputProps:{startAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"start",children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Search,{})})}},r))}function cu(e){let{title:t,children:r,onBack:o,onClose:n,onUpdate:i,onSearch:a,storagePath:l,toolbarProps:s}=e,[u,p]=_react.useState.call(void 0, !1),[f,h]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{h(t)},[t]);let m=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{if(a&&l){let v=localStorage.getItem(l);m.current&&(m.current.value=v),a(v||"")}},[l]);let y=_material.useMediaQuery.call(void 0, v=>v.breakpoints.down("sm"));function g(v){l&&localStorage.setItem(l,v),a&&a(v)}let S={component:"h1",variant:"h4",sx:{fontWeight:"500"}};return _jsxruntime.jsx.call(void 0, _material.Toolbar,d(c({},s),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:y||n?"column":"row",justifyContent:"space-between",alignContent:"center",alignItems:"center",flexGrow:1},children:[_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",alignItems:"center",flexDirection:"row"},children:[o&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{mr:1},onClick:o,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowBack,{})}),i&&_jsxruntime.jsx.call(void 0, _o,{typographyProps:S,value:f,onChange:v=>{i&&i(v)}}),!i&&_jsxruntime.jsx.call(void 0, _material.Typography,d(c({},S),{children:t}))]}),n&&_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{marginLeft:"auto"},onClick:n,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{fontSize:"medium"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,direction:"row",children:[a&&_jsxruntime.jsx.call(void 0, rt,{inputRef:m,autoFocus:!0,onSearch:g}),r]})]})}))}function Li(e){let R=e,{value:t,label:r,options:o,isLoading:n,form:i,table:a,tableProps:l,onChange:s,onSearch:u,renderValue:p,dialogProps:f,disabled:h,filterOptions:m,optionKeyName:y}=R,g=C(R,["value","label","options","isLoading","form","table","tableProps","onChange","onSearch","renderValue","dialogProps","disabled","filterOptions","optionKeyName"]),{isOpen:S,openDialog:v,closeDialog:T}=_hooks.useDialog.call(void 0, ),[w,P]=_react.useState.call(void 0, null),D=i||ci.default.Fragment,M=_lodash2.default.debounce(B=>u(B),500),k=_react.useCallback.call(void 0, (B,x)=>N(this,null,function*(){M(x)}),[M]),te=_react.useCallback.call(void 0, (B,x,b)=>{if(y&&(x!=null&&x[y].includes("Adicionar op\xE7\xE3o:"))){let I=x[y].replace("Adicionar op\xE7\xE3o:","").trim().replace(/["']/g,""),E=d(c({},x),{[y]:I});s&&s(E);return}s&&s(x)},[s]);function W(B,x=!1,b=!1){var I;if(B){let E=ci.default.Children.toArray((I=B.props)==null?void 0:I.children),F=E.length===1?0:1;return E.splice(F,0,_jsxruntime.jsx.call(void 0, _material.IconButton,{sx:{padding:"2px"},size:"small",color:"default",onClick:()=>v(),disabled:b,children:_jsxruntime.jsx.call(void 0, _iconsmaterial.SearchOutlined,{fontSize:"small"})})),x&&E.unshift(_jsxruntime.jsx.call(void 0, _material.IconButton,{disabled:!0,children:_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"primary",size:18})})),ci.default.cloneElement(B,{},E)}return B}function re(B,x){if(!y)return B;let I=_material.createFilterOptions.call(void 0, )(B,x),{inputValue:E}=x,F=B.some(L=>E===L[y]);return E!==""&&!F&&I.push({[y]:`Adicionar op\xE7\xE3o: "${E}"`}),I}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Autocomplete,{disabled:h,loadingText:"Carregando...",loading:n,onChange:te,value:t,onInputChange:k,options:o,getOptionLabel:p,filterOptions:re,renderInput:B=>_jsxruntime.jsx.call(void 0, _material.TextField,c(d(c({label:r,onDoubleClick:()=>{h||v()}},B),{InputProps:d(c({},B.InputProps),{endAdornment:W(B.InputProps.endAdornment,n,h)}),disabled:h}),g)),clearIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.BackspaceOutlined,{}),componentsProps:{clearIndicator:{sx:{visibility:"visible"}}},noOptionsText:"Nenhum registro"}),_jsxruntime.jsx.call(void 0, _providers.FormProvider,{children:_jsxruntime.jsx.call(void 0, Ge,d(c({open:S,onClose:()=>T(),actions:"none"},f),{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, rt,{placeholder:"Pesquisar",onSearch:B=>P(B)}),i&&_jsxruntime.jsx.call(void 0, D,{})]}),_jsxruntime.jsx.call(void 0, a,c({query:w,enableTransporter:!0,onTransport:B=>{T(),s&&s(B)}},l))]})}))})]})}var Jg={dialogProps:{maxWidth:"md",fullWidth:!0}};Li.defaultProps=Jg;function _i(e){let{children:t}=e,r=_material.useTheme.call(void 0, ),o=_material.useMediaQuery.call(void 0, r.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:o?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{},children:t})}function $i(e){let{label:t,subTitle:r="Acesse sua conta"}=e;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"header",textAlign:"center",marginBottom:"3rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",fontSize:"2rem",fontWeight:"bold",variant:"body1",fontFamily:"Montserrat",sx:{color:o=>o.palette.primary.dark},children:t}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h3",fontSize:"1.25rem",fontFamily:"Montserrat",color:"primary",variant:"body1",children:r})]})}var _axios = require('axios');var Ie=Qe(bu()),hr=Qe(Su()),Fu=Qe(Tu()),Py=Object.prototype.toString,Ty=Error.prototype.toString,ky=RegExp.prototype.toString,Iy=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",Ey=/^Symbol\((.*)\)(.*)$/;function Ay(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function ku(e,t=!1){if(e==null||e===!0||e===!1)return""+e;let r=typeof e;if(r==="number")return Ay(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Iy.call(e).replace(Ey,"Symbol($1)");let o=Py.call(e).slice(8,-1);return o==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):o==="Error"||e instanceof Error?"["+Ty.call(e)+"]":o==="RegExp"?ky.call(e):null}function qe(e,t){let r=ku(e,t);return r!==null?r:JSON.stringify(e,function(o,n){let i=ku(this[o],t);return i!==null?i:n},2)}function Mu(e){return e==null?[]:[].concat(e)}var Ru,Du,Ou,Fy=/\$\{\s*(\w+)\s*\}/g;Ru=Symbol.toStringTag;var Ho=class{constructor(t,r,o,n){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Ru]="Error",this.name="ValidationError",this.value=r,this.path=o,this.type=n,this.errors=[],this.inner=[],Mu(t).forEach(i=>{if(ue.isError(i)){this.errors.push(...i.errors);let a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}};Du=Symbol.hasInstance;Ou=Symbol.toStringTag;var ue=class extends Error{static formatError(t,r){let o=r.label||r.path||"this";return r=Object.assign({},r,{path:o,originalPath:r.path}),typeof t=="string"?t.replace(Fy,(n,i)=>qe(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,o,n,i){let a=new Ho(t,r,o,n);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Ou]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ue)}static[Du](t){return Ho[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}},Ne={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:o})=>{let n=o!=null&&o!==r?` (cast from the value \`${qe(o,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${qe(r,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${qe(r,!0)}\``+n}},he={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},nt={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Ui={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ji={isValue:"${path} field must be ${value}"},zo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},Go={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Bu={notType:e=>{let{path:t,value:r,spec:o}=e,n=o.types.length;if(Array.isArray(r)){if(r.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${qe(r,!0)}\``;if(r.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${qe(r,!0)}\``}return ue.formatError(Ne.notType,e)}},CF=Object.assign(Object.create(null),{mixed:Ne,string:he,number:nt,date:Ui,object:zo,array:Go,boolean:ji,tuple:Bu}),Xo=e=>e&&e.__isYupSchema__,_t=class{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:o,then:n,otherwise:i}=r,a=typeof o=="function"?o:(...l)=>l.every(s=>s===o);return new _t(t,(l,s)=>{var u;let p=a(...l)?n:i;return(u=p==null?void 0:p(s))!=null?u:s})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let o=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),n=this.fn(o,t,r);if(n===void 0||n===t)return t;if(!Xo(n))throw new TypeError("conditions must return a schema object");return n.resolve(r)}},Vo={context:"$",value:"."};var Ye=class{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Vo.context,this.isValue=this.key[0]===Vo.value,this.isSibling=!this.isContext&&!this.isValue;let o=this.isContext?Vo.context:this.isValue?Vo.value:"";this.path=this.key.slice(o.length),this.getter=this.path&&(0,Ie.getter)(this.path,!0),this.map=r.map}getValue(t,r,o){let n=this.isContext?o:this.isValue?t:r;return this.getter&&(n=this.getter(n||{})),this.map&&(n=this.map(n)),n}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}};Ye.prototype.__isYupRef=!0;var Fe=e=>e==null;function Bt(e){function t({value:r,path:o="",options:n,originalValue:i,schema:a},l,s){let{name:u,test:p,params:f,message:h,skipAbsent:m}=e,{parent:y,context:g,abortEarly:S=a.spec.abortEarly,disableStackTrace:v=a.spec.disableStackTrace}=n;function T(R){return Ye.isRef(R)?R.getValue(r,y,g):R}function w(R={}){let B=Object.assign({value:r,originalValue:i,label:a.spec.label,path:R.path||o,spec:a.spec,disableStackTrace:R.disableStackTrace||v},f,R.params);for(let b of Object.keys(B))B[b]=T(B[b]);let x=new ue(ue.formatError(R.message||h,B),r,B.path,R.type||u,B.disableStackTrace);return x.params=B,x}let P=S?l:s,D={path:o,parent:y,type:u,from:n.from,createError:w,resolve:T,options:n,originalValue:i,schema:a},M=R=>{ue.isError(R)?P(R):R?s(null):P(w())},k=R=>{ue.isError(R)?P(R):l(R)};if(m&&Fe(r))return M(!0);let W;try{var re;if(W=p.call(D,r,D),typeof((re=W)==null?void 0:re.then)=="function"){if(n.sync)throw new Error(`Validation test of type: "${D.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(W).then(M,k)}}catch(R){k(R);return}M(W)}return t.OPTIONS=e,t}function My(e,t,r,o=r){let n,i,a;return t?((0,Ie.forEach)(t,(l,s,u)=>{let p=s?l.slice(1,l.length-1):l;e=e.resolve({context:o,parent:n,value:r});let f=e.type==="tuple",h=u?parseInt(p,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&h>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);n=r,r=r&&r[h],e=f?e.spec.types[h]:e.innerType}if(!u){if(!e.fields||!e.fields[p])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);n=r,r=r&&r[p],e=e.fields[p]}i=p,a=s?"["+l+"]":"."+l}),{schema:e,parent:n,parentPath:i}):{parent:n,parentPath:t,schema:e}}var $t=class extends Set{describe(){let t=[];for(let r of this.values())t.push(Ye.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(let o of this.values())r.push(t(o));return r}clone(){return new $t(this.values())}merge(t,r){let o=this.clone();return t.forEach(n=>o.add(n)),r.forEach(n=>o.delete(n)),o}};function Lt(e,t=new Map){if(Xo(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let o=0;o<e.length;o++)r[o]=Lt(e[o],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(let[o,n]of e.entries())r.set(o,Lt(n,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(let o of e)r.add(Lt(o,t))}else if(e instanceof Object){r={},t.set(e,r);for(let[o,n]of Object.entries(e))r[o]=Lt(n,t)}else throw Error(`Unable to clone ${e}`);return r}var ae=class{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new $t,this._blacklist=new $t,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Ne.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;let r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Lt(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let o=t(this);return this._mutate=r,o}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,o=t.clone(),n=Object.assign({},r.spec,o.spec);return o.spec=n,o.internalTests=Object.assign({},r.internalTests,o.internalTests),o._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),o._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),o.tests=r.tests,o.exclusiveTests=r.exclusiveTests,o.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),o.transforms=[...r.transforms,...o.transforms],o}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let o=r.conditions;r=r.clone(),r.conditions=[],r=o.reduce((n,i)=>i.resolve(n,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,o,n,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(o=t.abortEarly)!=null?o:this.spec.abortEarly,recursive:(n=t.recursive)!=null?n:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let o=this.resolve(Object.assign({value:t},r)),n=r.assert==="ignore-optionality",i=o._cast(t,r);if(r.assert!==!1&&!o.isType(i)){if(n&&Fe(i))return i;let a=qe(t),l=qe(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${o.type}".
8
8
 
9
9
  attempted value: ${a}
10
- `+(l!==a?`result of cast: ${l}`:""))}return i}_cast(t,r){let o=t===void 0?t:this.transforms.reduce((n,i)=>i.call(this,n,t,this),t);return o===void 0&&(o=this.getDefault(r)),o}_validate(t,r={},o,n){let{path:i,originalValue:a=t,strict:l=this.spec.strict}=r,s=t;l||(s=this._cast(s,Object.assign({assert:!1},r)));let u=[];for(let p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,p=>{if(p.length)return n(p,s);this.runTests({path:i,value:s,originalValue:a,options:r,tests:this.tests},o,n)})}runTests(t,r,o){let n=!1,{tests:i,value:a,originalValue:l,path:s,options:u}=t,p=g=>{n||(n=!0,r(g,a))},f=g=>{n||(n=!0,o(g,a))},h=i.length,m=[];if(!h)return f([]);let y={value:a,originalValue:l,path:s,options:u,schema:this};for(let g=0;g<i.length;g++){let S=i[g];S(y,p,function(T){T&&(Array.isArray(T)?m.push(...T):m.push(T)),--h<=0&&f(m)})}}asNestedTest({key:t,index:r,parent:o,parentPath:n,originalParent:i,options:a}){let l=t!=null?t:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let s=typeof l=="number",u=o[l],p=Object.assign({},a,{strict:!0,parent:o,value:u,originalValue:i[l],key:void 0,[s?"index":"key"]:l,path:s||l.includes(".")?`${n||""}[${s?l:`"${l}"`}]`:(n?`${n}.`:"")+t});return(f,h,m)=>this.resolve(p)._validate(u,p,h,m)}validate(t,r){var o;let n=this.resolve(Object.assign({},r,{value:t})),i=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return new Promise((a,l)=>n._validate(t,r,(s,u)=>{ue.isError(s)&&(s.value=u),l(s)},(s,u)=>{s.length?l(new ue(s,u,void 0,void 0,i)):a(u)}))}validateSync(t,r){var o;let n=this.resolve(Object.assign({},r,{value:t})),i,a=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return n._validate(t,Object.assign({},r,{sync:!0}),(l,s)=>{throw ue.isError(l)&&(l.value=s),l},(l,s)=>{if(l.length)throw new ue(l,t,void 0,void 0,a);i=s}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,o=>{if(ue.isError(o))return!1;throw o})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(o){if(ue.isError(o))return!1;throw o}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Lt(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){let o=this.clone({nullable:t});return o.internalTests.nullable=Bt({message:r,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),o}optionality(t,r){let o=this.clone({optional:t});return o.internalTests.optionality=Bt({message:r,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=Ne.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ne.notNull){return this.nullability(!1,t)}required(t=Ne.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ne.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),n=Bt(r),i=r.exclusive||r.name&&o.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(o.exclusiveTests[r.name]=!!r.exclusive),o.tests=o.tests.filter(a=>!(a.OPTIONS.name===r.name&&(i||a.OPTIONS.test===n.OPTIONS.test))),o.tests.push(n),o}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let o=this.clone(),n=Mu(t).map(i=>new Ye(i));return n.forEach(i=>{i.isSibling&&o.deps.push(i.key)}),o.conditions.push(typeof r=="function"?new _t(n,r):_t.fromOptions(n,r)),o}typeError(t){let r=this.clone();return r.internalTests.typeError=Bt({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ne.oneOf){let o=this.clone();return t.forEach(n=>{o._whitelist.add(n),o._blacklist.delete(n)}),o.internalTests.whiteList=Bt({message:r,name:"oneOf",skipAbsent:!0,test(n){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(n)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),o}notOneOf(t,r=Ne.notOneOf){let o=this.clone();return t.forEach(n=>{o._blacklist.add(n),o._whitelist.delete(n)}),o.internalTests.blacklist=Bt({message:r,name:"notOneOf",test(n){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(n)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),o}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){let r=(t?this.resolve(t):this).clone(),{label:o,meta:n,optional:i,nullable:a}=r.spec;return{meta:n,label:o,optional:i,nullable:a,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,u,p)=>p.findIndex(f=>f.name===s.name)===u)}}};ae.prototype.__isYupSchema__=!0;for(let e of["validate","validateSync"])ae.prototype[`${e}At`]=function(t,r,o={}){let{parent:n,parentPath:i,schema:a}=My(this,t,r,o.context);return a[e](n&&n[i],Object.assign({},o,{parent:n,path:t}))};for(let e of["equals","is"])ae.prototype[e]=ae.prototype.oneOf;for(let e of["not","nope"])ae.prototype[e]=ae.prototype.notOneOf;var Ry=()=>!0;function Dy(e){return new Uo(e)}var Uo=class extends ae{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ry},t))}};Dy.prototype=Uo.prototype;function Oy(){return new jo}var jo=class extends ae{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Fe(r)||r===!0}})}isFalse(t=ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Fe(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}};Oy.prototype=jo.prototype;var By=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ly(e){let t=qi(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function qi(e){var t,r;let o=By.exec(e);return o?{year:je(o[1]),month:je(o[2],1)-1,day:je(o[3],1),hour:je(o[4]),minute:je(o[5]),second:je(o[6]),millisecond:o[7]?je(o[7].substring(0,3)):0,precision:(t=(r=o[7])==null?void 0:r.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:je(o[10]),minuteOffset:je(o[11])}:null}function je(e,t=0){return Number(e)||t}var _y=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,$y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ny=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Vy="^\\d{4}-\\d{2}-\\d{2}",zy="\\d{2}:\\d{2}:\\d{2}",Gy="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wy=new RegExp(`${Vy}T${zy}(\\.\\d+)?${Gy}$`),Hy=e=>Fe(e)||e===e.trim(),Uy={}.toString();function pe(){return new qo}var qo=class extends ae{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;let n=t!=null&&t.toString?t.toString():t;return n===Uy?t:n})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ne.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=he.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,r=he.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,r=he.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,r){let o=!1,n,i;return r&&(typeof r=="object"?{excludeEmptyString:o=!1,message:n,name:i}=r:n=r),this.test({name:i||"matches",message:n||he.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&o||a.search(t)!==-1})}email(t=he.email){return this.matches(_y,{name:"email",message:t,excludeEmptyString:!0})}url(t=he.url){return this.matches($y,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=he.uuid){return this.matches(Ny,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",o,n;return t&&(typeof t=="object"?{message:r="",allowOffset:o=!1,precision:n=void 0}=t:r=t),this.matches(Wy,{name:"datetime",message:r||he.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||he.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:i=>{if(!i||o)return!0;let a=qi(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||he.datetime_precision,params:{precision:n},skipAbsent:!0,test:i=>{if(!i||n==null)return!0;let a=qi(i);return a?a.precision===n:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=he.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hy})}lowercase(t=he.lowercase){return this.transform(r=>Fe(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toLowerCase()})}uppercase(t=he.uppercase){return this.transform(r=>Fe(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toUpperCase()})}};pe.prototype=qo.prototype;var jy=e=>e!=+e;function qy(){return new Yo}var Yo=class extends ae{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!jy(t)}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(!o.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return o.isType(n)||n===null?n:parseFloat(n)})})}min(t,r=nt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,r=nt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,r=nt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,r=nt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=nt.positive){return this.moreThan(0,t)}negative(t=nt.negative){return this.lessThan(0,t)}integer(t=nt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Fe(t)?t:t|0)}round(t){var r;let o=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(n=>Fe(n)?n:Math[t](n))}};qy.prototype=Yo.prototype;var Lu=new Date(""),Yy=e=>Object.prototype.toString.call(e)==="[object Date]";function _u(){return new mt}var mt=class extends ae{constructor(){super({type:"date",check(t){return Yy(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Ly(t),isNaN(t)?mt.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let o;if(Ye.isRef(t))o=t;else{let n=this.cast(t);if(!this._typeCheck(n))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);o=n}return o}min(t,r=Ui.min){let o=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(o)}})}max(t,r=Ui.max){let o=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(o)}})}};mt.INVALID_DATE=Lu;_u.prototype=mt.prototype;_u.INVALID_DATE=Lu;function Ky(e,t=[]){let r=[],o=new Set,n=new Set(t.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,Ie.split)(a)[0];o.add(s),n.has(`${l}-${s}`)||r.push([l,s])}for(let a of Object.keys(e)){let l=e[a];o.add(a),Ye.isRef(l)&&l.isSibling?i(l.path,a):Xo(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return Fu.default.array(Array.from(o),r).reverse()}function Iu(e,t){let r=1/0;return e.some((o,n)=>{var i;if((i=t.path)!=null&&i.includes(o))return r=n,!0}),r}function $u(e){return(t,r)=>Iu(e,t)-Iu(e,r)}var Nu=(e,t,r)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch(n){}return r.isType(o)?o:e};function Wo(e){if("fields"in e){let t={};for(let[r,o]of Object.entries(e.fields))t[r]=Wo(o);return e.setFields(t)}if(e.type==="array"){let t=e.optional();return t.innerType&&(t.innerType=Wo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Wo)}):"optional"in e?e.optional():e}var Zy=(e,t)=>{let r=[...(0,Ie.normalizePath)(t)];if(r.length===1)return r[0]in e;let o=r.pop(),n=(0,Ie.getter)((0,Ie.join)(r),!0)(e);return!!(n&&o in n)},Eu=e=>Object.prototype.toString.call(e)==="[object Object]";function Au(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(o=>r.indexOf(o)===-1)}var Qy=$u([]);function Ce(e){return new Ko(e)}var Ko=class extends ae{constructor(t){super({type:"object",check(r){return Eu(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Qy,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var o;let n=super._cast(t,r);if(n===void 0)return this.getDefault(r);if(!this._typeCheck(n))return n;let i=this.fields,a=(o=r.stripUnknown)!=null?o:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(f=>!this._nodes.includes(f))),s={},u=Object.assign({},r,{parent:s,__validating:r.__validating||!1}),p=!1;for(let f of l){let h=i[f],m=f in n;if(h){let y,g=n[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:s});let S=h instanceof ae?h.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){p=p||f in n;continue}y=!r.__validating||!v?h.cast(n[f],u):n[f],y!==void 0&&(s[f]=y)}else m&&!a&&(s[f]=n[f]);(m!==f in s||s[f]!==n[f])&&(p=!0)}return p?s:n}_validate(t,r={},o,n){let{from:i=[],originalValue:a=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:a},...i],r.__validating=!0,r.originalValue=a,super._validate(t,r,o,(s,u)=>{if(!l||!Eu(u)){n(s,u);return}a=a||u;let p=[];for(let f of this._nodes){let h=this.fields[f];!h||Ye.isRef(h)||p.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:p,value:u,originalValue:a,options:r},o,f=>{n(f.sort(this._sortErrors).concat(s),u)})})}clone(t){let r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),o=r.fields;for(let[n,i]of Object.entries(this.fields)){let a=o[n];o[n]=a===void 0?i:a}return r.withMutation(n=>n.setFields(o,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(o=>{var n;let i=this.fields[o],a=t;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),r[o]=i&&"getDefault"in i?i.getDefault(a):void 0}),r}setFields(t,r){let o=this.clone();return o.fields=t,o._nodes=Ky(t,r),o._sortErrors=$u(Object.keys(t)),r&&(o._excludedEdges=r),o}shape(t,r=[]){return this.clone().withMutation(o=>{let n=o._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),n=[...o._excludedEdges,...r]),o.setFields(Object.assign(o.fields,t),n)})}partial(){let t={};for(let[r,o]of Object.entries(this.fields))t[r]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Wo(this)}pick(t){let r={};for(let o of t)this.fields[o]&&(r[o]=this.fields[o]);return this.setFields(r,this._excludedEdges.filter(([o,n])=>t.includes(o)&&t.includes(n)))}omit(t){let r=[];for(let o of Object.keys(this.fields))t.includes(o)||r.push(o);return this.pick(r)}from(t,r,o){let n=(0,Ie.getter)(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return Zy(i,t)&&(a=Object.assign({},i),o||delete a[t],a[r]=n(i)),a})}json(){return this.transform(Nu)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||zo.exact,test(r){if(r==null)return!0;let o=Au(this.schema,r);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=zo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:r,test(n){if(n==null)return!0;let i=Au(this.schema,n);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,r=zo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;let o={};for(let n of Object.keys(r))o[t(n)]=r[n];return o})}camelCase(){return this.transformKeys(hr.camelCase)}snakeCase(){return this.transformKeys(hr.snakeCase)}constantCase(){return this.transformKeys(t=>(0,hr.snakeCase)(t).toUpperCase())}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(let[i,a]of Object.entries(r.fields)){var n;let l=t;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.fields[i]=a.describe(l)}return o}};Ce.prototype=Ko.prototype;function Xy(e){return new Zo(e)}var Zo=class extends ae{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){let o=super._cast(t,r);if(!this._typeCheck(o)||!this.innerType)return o;let n=!1,i=o.map((a,l)=>{let s=this.innerType.cast(a,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return s!==a&&(n=!0),s});return n?i:o}_validate(t,r={},o,n){var i;let a=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,o,(s,u)=>{var p;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let m=0;m<u.length;m++){var h;f[m]=a.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(p=r.originalValue)!=null?p:t,options:r},o,m=>n(m.concat(s),u))})}clone(t){let r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Nu)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Xo(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+qe(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=Go.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,r){return r=r||Go.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,r){return r=r||Go.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(o,n,i)=>!t(o,n,i):o=>!!o;return this.transform(o=>o!=null?o.filter(r):o)}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);if(r.innerType){var n;let i=t;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),o.innerType=r.innerType.describe(i)}return o}};Xy.prototype=Zo.prototype;function Jy(e){return new Qo(e)}var Qo=class extends ae{constructor(t){super({type:"tuple",spec:{types:t},check(r){let o=this.spec.types;return Array.isArray(r)&&r.length===o.length}}),this.withMutation(()=>{this.typeError(Bu.notType)})}_cast(t,r){let{types:o}=this.spec,n=super._cast(t,r);if(!this._typeCheck(n))return n;let i=!1,a=o.map((l,s)=>{let u=l.cast(n[s],Object.assign({},r,{path:`${r.path||""}[${s}]`}));return u!==n[s]&&(i=!0),u});return i?a:n}_validate(t,r={},o,n){let i=this.spec.types;super._validate(t,r,o,(a,l)=>{var s;if(!this._typeCheck(l)){n(a,l);return}let u=[];for(let[f,h]of i.entries()){var p;u[f]=h.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:l,tests:u,originalValue:(s=r.originalValue)!=null?s:t,options:r},o,f=>n(f.concat(a),l))})}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=r.spec.types.map((n,i)=>{var a;let l=t;return(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.describe(l)}),o}};Jy.prototype=Qo.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function ht(e){let{name:t,label:r,value:o,onChange:n,onKeyDown:i}=e,[a,l]=_react.useState.call(void 0, !1);function s(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.TextField,{name:t,label:r,value:o||"",onChange:n,onKeyDown:i,type:a?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{tabIndex:-1,onClick:s,edge:"end",children:a?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})}})}var ux=_react.forwardRef.call(void 0, function(t,r){return _jsxruntime.jsx.call(void 0, _material.Slide,c({direction:"up",ref:r},t))});function yr(n){var i=n,{children:e,height:t,fullWidth:r=!0}=i,o=C(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,d(c({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:ux,sx:c({"& .MuiBackdrop-root":{backgroundColor:"#6464648F"}},o==null?void 0:o.sx),PaperProps:{style:{height:t,overflow:"hidden",position:"absolute",top:"51px",margin:0}}},o),{children:_jsxruntime.jsx.call(void 0, _material.Stack,{height:"100%",position:"relative",overflow:"auto",children:e})}))}var _core = require('@toolpad/core');function Ki({children:e}){return _jsxruntime.jsx.call(void 0, _core.DialogsProvider,{children:e})}function Zi(e){let a=e,{dialogComponent:t,payload:r,label:o}=a,n=C(a,["dialogComponent","payload","label"]),i=_core.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,d(c({variant:"contained",onClick:()=>{i.open(t,r)}},n),{children:o||" Adicionar"}))}function xr(e){let t=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({component:"header",height:"44px",position:"absolute",direction:"row",top:0,left:0,right:0,display:"flex",alignItems:"center",padding:"16px",borderBottom:`solid 1px ${t.palette.grey[300]}`},e))}function vr(e){return _jsxruntime.jsx.call(void 0, _material.Typography,c({component:"h6",variant:"h6",sx:{whiteSpace:"nowrap"}},e))}function br({onClose:e}){return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>e(),sx:{position:"absolute",right:"11px"},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{})})}function Cr(r){var o=r,{children:e}=o,t=C(o,["children"]);return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"main",margin:"44px 0 55.75px",overflow:"auto",children:_jsxruntime.jsx.call(void 0, _material.Stack,d(c({padding:"16px"},t),{children:e}))})}function wr(e){let t=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({component:"footer",position:"absolute",direction:"row",alignItems:"center",bottom:0,left:0,right:0,padding:"8px 16px",borderTop:`solid 1px ${t.palette.grey[300]}`,height:"48px",sx:{backgroundColor:t.palette.background.paper}},e))}function Sr(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},e))}function Qi(r){var o=r,{children:e}=o,t=C(o,["children"]);return _jsxruntime.jsx.call(void 0, $,d(c({variant:"outlined",color:"error"},t),{children:"Cancelar"}))}function Xi(o){var n=o,{children:e,label:t}=n,r=C(n,["children","label"]);return _jsxruntime.jsx.call(void 0, $,d(c({variant:"contained"},r),{children:t||"Salvar"}))}function ea({open:e,onClose:t,payload:r}){let{useRemover:o,identificador:n}=r,{mutateAsync:i,isLoading:a}=o();function l(){return N(this,null,function*(){try{yield i(n),t()}catch(s){}})}return _jsxruntime.jsxs.call(void 0, yr,{open:e,onClose:t,children:[_jsxruntime.jsxs.call(void 0, xr,{children:[_jsxruntime.jsx.call(void 0, vr,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, br,{onClose:t})]}),_jsxruntime.jsx.call(void 0, Cr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, wr,{children:_jsxruntime.jsxs.call(void 0, Sr,{children:[_jsxruntime.jsx.call(void 0, $,{onClick:()=>t(),sx:{minWidth:"100px"},children:"Manter registro"}),_jsxruntime.jsx.call(void 0, $,{color:"error",variant:"contained",isLoading:a,onClick:l,sx:{minWidth:"100px"},children:"Remover"})]})})]})}var Mx={Root:yr,Provider:Ki,AdicionarButton:Zi,Header:xr,Title:vr,ActionClose:br,Content:Cr,Footer:wr,Actions:Sr,ActionCancelar:Qi,ActionSalvar:Xi,ConfirmDelete:ea},G= exports.DialogV2 =Mx;function yt(e){let{isValid:t,message:r}=e,o=_material.useTheme.call(void 0, );return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:t?"success":"inherit",sx:{fontSize:"8pt"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:t?o.palette.success.main:"inherit",textDecoration:t?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var qu={senhaAtual:"",senhaNova:""},Gx=Ce().shape({senhaAtual:pe().required("Informe a Senha Atual."),senhaNova:pe().required("Informe a Nova Senha.")});function Gt(e){let{isOpen:t,credentialsConfig:r,onClose:o,onSuccess:n,onFailed:i,primeiroAcesso:a,senhaAtual:l,email:s}=e,{alterarSenha:u,isSubmitting:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:h}=_hooks.useValidations.call(void 0, ),{data:m,handleChange:y,setData:g,changeValue:S}=_hooks.useForm.call(void 0, qu),[v,T]=_react.useState.call(void 0, !1),[w,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&S("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{m.senhaNova&&T(_isStrongPassword2.default.call(void 0, m.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[m.senhaNova]);function D(){return N(this,null,function*(){f(null),P(null),Gx.validate(m,{abortEarly:!1}).then(()=>N(this,null,function*(){var x;let{senhaAtual:R,senhaNova:B}=m;try{(yield u(R,B,s))&&(n&&n(),g(qu))}catch(b){if(i&&i(b),_axios.isAxiosError.call(void 0, b)){P((x=b.response)==null?void 0:x.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(R=>{f(R)})})}function M(){return(m==null?void 0:m.senhaNova.length)>=8}function k(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/[a-z]/g);return Array.isArray(R)&&R.length>0}return!1}function te(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/[A-Z]/g);return Array.isArray(R)&&R.length>0}return!1}function W(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/\d/g);return Array.isArray(R)&&R.length>0}return!1}function re(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/\W/g);return Array.isArray(R)&&R.length>0}return!1}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:R=>o(),maxWidth:"md",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:o})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:2,children:[a&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"info",children:["Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",_jsxruntime.jsx.call(void 0, "br",{}),"Cadastre uma senha segura para deixar sua conta mais protegida."]})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ht,c({name:"senhaAtual",label:"Senha Atual",value:(m==null?void 0:m.senhaAtual)||"",onChange:y},h("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ht,c({name:"senhaNova",label:"Nova Senha",value:(m==null?void 0:m.senhaNova)||"",onChange:y},h("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{size:12,children:[_jsxruntime.jsx.call(void 0, yt,{isValid:M(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, yt,{isValid:k(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, yt,{isValid:te(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, yt,{isValid:W(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, yt,{isValid:re(),message:"A nova senha deve ter ao menos um caracter especial"})]}),w&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:w})})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>o()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Alterar Senha",onClick:D,isLoading:p,disabled:!v})]})})]})}var Zx=Ce().shape({email:pe().required("Informe o e-mail"),password:pe().required("Informe a senha")});function ta(e){let{onLoginSuccess:t,onLoginFailed:r,onOptionsClick:o,credentialsConfig:n}=e,[i,a]=_react.useState.call(void 0, ""),[l,s]=_react.useState.call(void 0, ""),[u,p]=_react.useState.call(void 0, !1),[f,h]=_react.useState.call(void 0, !1),[m,y]=_react.useState.call(void 0, !1),[g,S]=_react.useState.call(void 0, null),{login:v}=_hooks.useCredentials.call(void 0, n),{validationProps:T,setValidationErrors:w}=_hooks.useValidations.call(void 0, );function P(){return N(this,null,function*(){w(null),S(null),Zx.validate({email:i,password:l},{abortEarly:!1}).then(()=>N(this,null,function*(){var D,M;p(!0);try{let k=yield v(i,l);k&&t(k)}catch(k){if(_axios.isAxiosError.call(void 0, k)){if(((D=k.response)==null?void 0:D.data.code)==="E_FIRST_ACCESS"){h(!0);return}S((M=k.response)==null?void 0:M.data.message)}r(k)}})).catch(D=>{w(D)}).finally(()=>{p(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"form",onSubmit:P,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:D=>a(D.target.value)},T("email"))),_jsxruntime.jsx.call(void 0, ht,c({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:D=>s(D.target.value),onKeyDown:D=>D.key==="Enter"&&P()},T("password"))),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:P,isLoading:u,sx:{mt:1},children:"Entrar"})]}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("esqueci-senha"),variant:"text",disableRipple:!0,disableTouchRipple:!0,sx:{justifyContent:"flex-start",alignContent:"center",alignItems:"center",textAlign:"left",width:"120px",marginTop:.5,fontWeight:"400",":hover":{}},children:"Esqueci a senha"}),g&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:g}),m&&_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"success",children:["Senha cadastrada com sucesso",_jsxruntime.jsx.call(void 0, "br",{}),"Tudo pronto para voc\xEA fazer o login"]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"center",alignItems:"center",mt:2,mb:2,children:[_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,mr:1}}),_jsxruntime.jsx.call(void 0, _material.Typography,{children:"Ou fa\xE7a login com"}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,ml:1}})]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("otp-email"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Mail,{}),children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("otp-whatsapp"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.WhatsApp,{}),children:"Entrar com senha tempor\xE1ria"})]}),_jsxruntime.jsx.call(void 0, Gt,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:f,onClose:()=>N(this,null,function*(){return h(!1)}),onSuccess:()=>{h(!1),y(!0),s("")},credentialsConfig:n})]})}var t0=Ce().shape({email:pe().required("Informe o e-mail")});function ra(e){let{onLoginClick:t,credentialsConfig:r}=e,[o,n]=_react.useState.call(void 0, ""),[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),[u,p]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:h,setValidationErrors:m}=_hooks.useValidations.call(void 0, );function y(){return N(this,null,function*(){m(null),t0.validate({email:o},{abortEarly:!1}).then(()=>N(this,null,function*(){var g;try{a(!0),yield f(o),s(!0)}catch(S){p((g=S.response)==null?void 0:g.data.message)}finally{a(!1)}})).catch(g=>{m(g)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:o||"",onChange:g=>n(g.target.value)},h("email"))),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:y,isLoading:i,children:"Recuperar minha senha"}),_jsxruntime.jsx.call(void 0, we,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:_jsxruntime.jsx.call(void 0, $,{onClick:t,variant:"text",sx:{fontWeight:"400",":hover":{color:g=>g.palette.primary.dark}},children:"Voltar para o Login"})}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, $,{onClick:t,variant:"text",sx:{fontWeight:"400",":hover":{color:g=>g.palette.primary.dark}},children:"Ir para o Login"}),children:"Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function na(e){var p;let{loginData:t,credentialsConfig:r,onLoginFailed:o,onLoginSuccess:n}=e,[i,a]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:s}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(t==null?void 0:t.empresas)){let f=t==null?void 0:t.empresas[0];a(f==null?void 0:f.uuid)}},[t]);function u(){return N(this,null,function*(){try{let f=yield l(t==null?void 0:t.token,i);f?n(f):o("Nenhuma token definida")}catch(f){o(f)}})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",sx:{minWidth:"290px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{label:"Licen\xE7as",margin:"normal",select:!0,autoFocus:!0,value:i,onChange:f=>{a(f.target.value)},children:(p=t==null?void 0:t.empresas)==null?void 0:p.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f.uuid,children:f.nome},f.uuid))}),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:u,isLoading:s,sx:{mt:1},children:"Confirmar"})]})}var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);var Qu=e=>{let t=e.replace(/\D/g,"");return t.length<=2?`(${t}`:t.length<=7?`(${t.slice(0,2)}) ${t.slice(2)}`:t.length<=11?`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7)}`:`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7,11)}`};function Tr(e){let u=e,{value:t,onChange:r}=u,o=C(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=t!==void 0,l=_react.useMemo.call(void 0, ()=>a?Qu(t||""):n,[t,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,c({value:l,onChange:p=>{let f=Qu(p.target.value);if(a||i(f),r){let h=d(c({},p),{target:d(c({},p.target),{value:f})});r(h)}},inputProps:{maxLength:15}},o))}function kr({length:e=6,value:t,onChange:r}){let o=_react.useRef.call(void 0, []),n=(a,l)=>{var h;let s="ABCDEF0123456789",u=l.toUpperCase().split("").find(m=>s.includes(m))||"",p=t.split("");p[a]=u;let f=p.join("");r(f),u&&a<e-1&&((h=o.current[a+1])==null||h.focus())},i=(a,l)=>{var s;l.key==="Backspace"&&!t[a]&&a>0&&((s=o.current[a-1])==null||s.focus())};return _jsxruntime.jsx.call(void 0, _material.Box,{display:"flex",gap:1,children:Array.from({length:e}).map((a,l)=>_jsxruntime.jsx.call(void 0, _material.TextField,{autoFocus:l===0,inputRef:s=>o.current[l]=s,slotProps:{htmlInput:{maxLength:1,style:{textAlign:"center",fontSize:"24px",width:"24px",height:"36px"}}},value:t[l]||"",onChange:s=>n(l,s.target.value),onKeyDown:s=>i(l,s)},l))})}function aa(e){let{open:t,onClose:r,payload:o,onLoginSuccess:n,credentialsConfig:i}=e,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),{validarOtpVerificationCode:h}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function m(){return N(this,null,function*(){try{f(!0);let y=yield h({channel:o.channel,target:o.target,code:a});y&&n(y),r()}catch(y){u(y.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:y=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos uma senha tempor\xE1ria para ",_jsxruntime.jsx.call(void 0, "b",{children:o.target}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para acessar sua conta."]}),_jsxruntime.jsx.call(void 0, kr,{value:a,onChange:y=>{l(y)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Entrar",onClick:m,isLoading:p,disabled:a.length!=6})]})})]})}var E0=Ce().shape({contato:pe().when("$tipo",([e],t)=>e==="otp-email"?t.email("E-mail inv\xE1lido").required("Informe o e-mail"):t.matches(/^\+?[1-9]\d{7,14}$/,"N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp"))});function rn(e){let{tipo:t,credentialsConfig:r,onLoginSuccess:o,onLoginClick:n}=e,[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),{gerarOtpVerificationCode:u}=_hooks.useCredentials.call(void 0, r),{handleChange:p,changeValue:f,data:h,validate:m,validationErrors:y}=_hooks.useForm.call(void 0, {contato:""},E0),[g,S]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:T=>N(this,null,function*(){T.preventDefault(),m(w=>N(this,null,function*(){try{s(!1),a(!0);let P=yield u({channel:t==="otp-email"?"email":"whatsapp",target:w.contato});S(!0)}catch(P){s(P.response.data.message)}finally{a(!1)}}),{context:{tipo:t}})}),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",children:t==="otp-email"?" Informe seu e-mail para receber um c\xF3digo de acesso":"Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso"}),t==="otp-email"&&_jsxruntime.jsx.call(void 0, _material.TextField,c({autoFocus:!0,name:"contato",label:"E-mail",value:h.contato||"",onChange:p,fullWidth:!0},y("contato"))),t==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, Tr,c({autoFocus:!0,name:"contato",label:"Whatsapp",value:h.contato||"",onChange:T=>{f("contato",T.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},y("contato"))),_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, $,{isLoading:i,type:"submit",variant:"contained",color:"primary",children:"Enviar c\xF3digo"}),_jsxruntime.jsxs.call(void 0, we,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, $,{onClick:n,variant:"text",sx:{fontWeight:"400",":hover":{color:T=>T.palette.primary.dark}},children:"Voltar para o Login"}),_jsxruntime.jsx.call(void 0, "a",{href:"https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",target:"_blank",rel:"noopener noreferrer",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{children:_jsxruntime.jsx.call(void 0, _iconsmaterial.HelpOutline,{color:"primary"})})})]})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:l})]})}),_jsxruntime.jsx.call(void 0, aa,{onLoginSuccess:o,open:g,onClose:T=>N(this,null,function*(){S(!1)}),payload:{target:h.contato,channel:t==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var L0={login:"Acesse sua conta",licensa:"Selecione a licen\xE7a","esqueci-senha":"Recupere a sua senha","otp-email":"Entrar com senha tempor\xE1ria (E-mail)","otp-whatsapp":"Entrar com senha tempor\xE1ria (WhatsApp)"};function la(e){let{credentialsConfig:t,onLoginSuccess:r,onLoginFailed:o,onAlreadyLogged:n,appName:i}=e,[a,l]=_react.useState.call(void 0, ),{selecionarLicenca:s,isAuthenticated:u}=_hooks.useCredentials.call(void 0, t),[p,f]=_react.useState.call(void 0, "login"),h=_material.useTheme.call(void 0, ),m=_material.useMediaQuery.call(void 0, h.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function y(w){return N(this,null,function*(){try{if(Array.isArray(w==null?void 0:w.empresas)){if((w==null?void 0:w.empresas.length)===1){let P=yield s(w==null?void 0:w.token,w.empresas[0].uuid);P&&r(P);return}f("licensa"),l(w);return}r(w)}catch(P){o(P)}})}function g(w){return N(this,null,function*(){o(w)})}function S(w){f(w)}function v(){f("login")}let T=L0[p];return _jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, $i,{label:i,subTitle:T}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[p==="login"&&_jsxruntime.jsx.call(void 0, ta,{credentialsConfig:t,onLoginSuccess:y,onLoginFailed:g,onOptionsClick:S}),p==="licensa"&&_jsxruntime.jsx.call(void 0, na,{loginData:a,credentialsConfig:t,onLoginSuccess:r,onLoginFailed:o}),p==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, ra,{onLoginClick:v,credentialsConfig:t}),p==="otp-email"&&_jsxruntime.jsx.call(void 0, rn,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-email",credentialsConfig:t}),p==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, rn,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-whatsapp",credentialsConfig:t})]})]})}function ua(){let e=_material.useTheme.call(void 0, ),t=_material.useMediaQuery.call(void 0, e.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:t?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{backgroundImage:"url(https://datac-site-assets.s3.sa-east-1.amazonaws.com/background_login.png)",backgroundSize:"cover",backgroundPosition:"right",backgroundRepeat:"no-repeat"},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",fontSize:"3.5rem",lineHeight:"4rem",fontWeight:"bold",color:"white",fontFamily:"Montserrat",letterSpacing:0,children:"Inova\xE7\xE3o e tecnologia"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",color:"white",fontSize:"2.5rem",lineHeight:"3rem",letterSpacing:0,fontWeight:"bold",fontFamily:"Montserrat",children:"para empresas de resultado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"span",fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"300",letterSpacing:0,marginTop:"1.5rem",marginBottom:"3rem",fontFamily:"Montserrat",sx:{color:"rgb(68, 167, 255)"},children:"Mais de 25 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."}),_jsxruntime.jsx.call(void 0, _material.Link,{href:"https://site.datac.com.br/services/",target:"_blank",children:_jsxruntime.jsxs.call(void 0, $,{component:"a",variant:"text",sx:{width:"fit-content",color:"rgb(255, 255, 255)",fontWeight:"400",fontSize:"0.875rem",lineHeight:"1.125rem",fontFamily:"Montserrat",backgroundColor:"rgb(22, 23, 101)",borderRadius:"30px",padding:"17px 48px",":hover":{backgroundColor:"rgb(255, 255, 255)",color:"rgb(22, 23, 101)"},alignItems:"center"},children:["Conhe\xE7a nossos produtos",_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowRight,{fontSize:"medium",sx:{color:r=>r.palette.success.light}})]})})]})})}function H0({children:e}){let t=_material.useTheme.call(void 0, ),r=_material.useMediaQuery.call(void 0, t.breakpoints.up("md"));return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:r?"46%":"100%",minWidth:"420px",maxWidth:r?"614px":"initial",justifyContent:"center",alignItems:"center",padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",maxWidth:"28rem",margin:"auto 0",children:e}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",marginBottom:-3,children:[_jsxruntime.jsx.call(void 0, "img",{width:"60",src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",component:"span",fontSize:"0.7rem",sx:{color:o=>o.palette.grey[500]},children:"Data C Sistemas"})]})]})}function ip(e){let{banner:t,loginSection:r}=e;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"main",direction:"row",height:"100vh",children:[t?_jsxruntime.jsx.call(void 0, _i,{children:t}):_jsxruntime.jsx.call(void 0, ua,{}),_jsxruntime.jsx.call(void 0, H0,{children:r||_jsxruntime.jsx.call(void 0, la,c({},e))})]})}function fa(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",alignContent:"center",spacing:1,flex:1,flexGrow:1},e))}function da({children:e}){return _jsxruntime.jsx.call(void 0, ci.default.Fragment,{children:_jsxruntime.jsx.call(void 0, _material.AppBar,{position:"fixed",elevation:0,sx:{width:"100%",zIndex:t=>t.zIndex.drawer+1,borderBottom:t=>`1px solid ${t.palette.grey[300]}`},children:_jsxruntime.jsx.call(void 0, _material.Toolbar,{children:_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",children:e})})})})}function ma(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M21 5v14"})]})}))}function ga(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"m4.9 4.9 14.2 14.2"})]})}))}function ya(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 12h4"})]})}))}function Er(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function ba(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9"})})}))}function Ca(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Sa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17-5-5 5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m18 17-5-5 5-5"})]})}))}function Ta(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"3"})]})}))}function ka(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}))}function Ia(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 9H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 13H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 17H8"})]})}))}function Mr(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function Aa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21H7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m5 11 9 9"})]})}))}var vv=e=>({transition:e.transitions.create(["transform"],{duration:500})}),bv=_styles.styled.call(void 0, Mr,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>c(c(c({},vv(e)),t&&{transform:"rotate(-180deg)"}),!t&&{transform:"rotate(0)"}));function Fa(e){let{open:t}=e;return _jsxruntime.jsx.call(void 0, bv,{fontSize:"small",open:t})}function Ma(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 6h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 12h10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 18h4"})]})}))}function Ra(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 20a6 6 0 0 0-12 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"4"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"})]})}))}function Da(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function Oa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 17h.01"})]})}))}function Ba(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3v5h5"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v5l4 2"})]})}))}function La(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 7v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 7v9"})]})}))}function _a(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),_jsxruntime.jsx.call(void 0, "polyline",{points:"16 17 21 12 16 7"}),_jsxruntime.jsx.call(void 0, "line",{x1:"21",x2:"9",y1:"12",y2:"12"})]})}))}function Na(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"3"})]})}))}function Va(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 5.764v15"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9 3.236v15"})]})}))}function za(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"12",y2:"12"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"6",y2:"6"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"18",y2:"18"})]})}))}function Ga(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function Ha(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m6 17 5-5-5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m13 17 5-5-5-5"})]})}))}function ja(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]})}))}function Ya(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"8"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]})}))}function Ka(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M2 7h20"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7"})]})}))}function Za(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 22h1a4 4 0 0 0 4-4v-1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 2h1a4 4 0 0 1 4 4v1"})]})}))}function Qa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Ja(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17"}),_jsxruntime.jsx.call(void 0, "path",{d:"m10 15 5-3-5-3z"})]})}))}function es(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12 17V3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m6 11 6 6 6-6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M19 21H5"})]})}))}function ts(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"22",y2:"22"}),_jsxruntime.jsx.call(void 0, "line",{x1:"6",x2:"6",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"10",x2:"10",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"14",x2:"14",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"18",x2:"18",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "polygon",{points:"12 2 20 7 4 7"})]})}))}function rs(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"})]})}))}function os(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"16",cy:"16",r:"6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 14v2l1 1"})]})}))}function ns(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M13.22 2.416a2 2 0 0 0-2.511.057l-7 5.999A2 2 0 0 0 3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7.354"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 6h6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M18 3v6"})]})}))}function is(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"9",y2:"9"}),_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"15",y2:"15"}),_jsxruntime.jsx.call(void 0, "line",{x1:"9",x2:"9",y1:"9",y2:"21"}),_jsxruntime.jsx.call(void 0, "line",{x1:"15",x2:"15",y1:"9",y2:"21"})]})}))}function ss(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m15 18-6-6 6-6"})})}))}function cs(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m9 18 6-6-6-6"})})}))}function us(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M8 2v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 2v4"}),_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 10h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 18h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 18h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 18h.01"})]})}))}function ps(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 3v4a1 1 0 0 0 1 1h7"})]})}))}var wb={Circle:ba,Dashboard:ka,Expandable:Fa,Down:Mr,Negociacao:Ga,Cadastro:ya,Clientes:Ca,Filter:Ma,Search:Ya,ChevronDown:Er,Kanban:La,Erease:Aa,BarCode:ma,TextCursor:Za,OpenPanel:Ha,ClosePanel:Sa,Menu:za,Configs:Ta,Users:Qa,Password:ja,Logout:_a,History:Ba,Help:Oa,Video:Ja,Docs:Ia,Block:ga,Maps:Va,MapPin:Na,HandShake:Da,Store:Ka,Download:es,ContaBancaria:ts,GrupoLancamento:rs,HistoricoPadrao:os,Imovel:ns,Lancamento:is,ChevronLeft:ss,ChevronRight:cs,Calendar:us,Save:ps,Profile:Ra},ye= exports.Icon =wb;function fs(e){let t=C(e,[]);return _jsxruntime.jsx.call(void 0, _material.IconButton,d(c({},t),{children:_jsxruntime.jsx.call(void 0, ye.Menu,{})}))}var Pb={Root:da,Content:fa,ToggleMenu:fs},Tb= exports.Header =Pb;var Bb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:e})=>({height:"32px",cursor:"pointer",gap:e.spacing(2),transition:"0.2s ease-in-out",padding:`${e.spacing(.25)} ${e.spacing(2)} ${e.spacing(.25)} ${e.spacing(2)}`,"&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{fontSize:"0.805rem",color:e.palette.text.primary},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function ds({label:e,icon:t,visible:r=!0,children:o,selected:n=!1,onClick:i,link:a}){if(!r)return null;let[l,s]=_react.useState.call(void 0, !1),u=!!o;function p(){if(u){s(h=>!h);return}i&&a&&i(a)}function f(h){return typeof t=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:t}):h||_jsxruntime.jsx.call(void 0, ye.Circle,{})}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, Bb,{selected:n,disableGutters:!0,onClick:h=>{h.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:f(t)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:e}),u&&_jsxruntime.jsx.call(void 0, ye.Expandable,{open:l})]})}),u&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, _material.List,{sx:{"& .MuiListItemButton-root":{paddingLeft:4},"& .MuiList-root > .MuiListItem-root > .MuiListItemButton-root":{paddingLeft:6},"& .MuiList-root > .MuiList-root > .MuiListItemButton-root":{paddingLeft:12}},disablePadding:!0,children:o})})]})}var jb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:e})=>({cursor:"pointer",padding:`${e.spacing(1)} ${e.spacing(0)} ${e.spacing(.25)} ${e.spacing(0)}`,minHeight:"32px",flexDirection:"column",justifyContent:"center",alignItem:"center",alignContent:"center","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiTypography-root":{fontSize:"0.805rem",color:e.palette.text.primary},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function lp(e,t){return ci.default.Children.map(e,r=>{var n;if(!ci.default.isValidElement(r))return r;let o=(n=r.props)!=null&&n.children?lp(r.props.children,t):null;return ci.default.cloneElement(r,{open:t,children:o})})}function hs(e){let{icon:t,label:r,link:o,id:n,selected:i=!1,children:a,onClick:l}=e,[s,u]=_react.useState.call(void 0, null);function p(){l&&o&&l(o)}function f(g,S){u({element:g.currentTarget,id:S})}function h(){u(null)}let m=lp(a,!0);function y(g){return typeof t=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:t}):g||_jsxruntime.jsx.call(void 0, ye.Circle,{})}return _jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, jb,{selected:i,onMouseEnter:g=>{o||f(g,n)},onMouseLeave:()=>{o||h()},disableGutters:!0,onClick:g=>{g.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:y(t)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:_lodash2.default.truncate(r,{length:12})}),(s==null?void 0:s.id)===n&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:s==null?void 0:s.element,open:!!(s!=null&&s.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, Pt,{elevation:1,sx:{position:"relative","&::before":{content:'""',position:"absolute",left:-8,width:"1.2rem",height:"1.2rem",backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM4MDgwODAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1waW4tc2FmZXR5LW9wZW4iPjxwYXRoIGQ9Ik0yMC44IDMuMmMtMS42LTEuNi00LjEtMS42LTUuNyAwTDEyLjMgNlMxNSA5IDE4IDZjLTMgMyAwIDUuNyAwIDUuN2wyLjgtMi44YzEuNi0xLjYgMS42LTQuMiAwLTUuNyIvPjxwYXRoIGQ9Im03LjEgMjEuMSAxMC4zLTEwLjIiLz48Y2lyY2xlIGN4PSI1IiBjeT0iMTkiIHI9IjMiLz48cGF0aCBkPSJNOSAycy00LjEgOS41LTYuNzU1IDE1LjgiLz48L3N2Zz4=")',backgroundSize:"contain",backgroundRepeat:"no-repeat",transition:"transform 0.2s ease-in-out"},p:1,width:g=>{var S;return(S=g.mixins.menu)==null?void 0:S.width}},children:m})})]})})}function gs(e){let n=e,{open:t,isFirstLevel:r=!1}=n,o=C(n,["open","isFirstLevel"]);return t?_jsxruntime.jsx.call(void 0, ds,c({},o)):_jsxruntime.jsx.call(void 0, hs,c({},o))}var up=e=>{var t,r;return{width:((r=(t=e==null?void 0:e.mixins)==null?void 0:t.menu)==null?void 0:r.width)||64,background:"#FFFFFF",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},pp=e=>({background:"#FFFFFF",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:0,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(12)} + 1px)`}}),Zb=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{var r,o;return c(c({width:((o=(r=e==null?void 0:e.mixins)==null?void 0:r.menu)==null?void 0:o.width)||64,borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},t&&d(c({},up(e)),{"& .MuiDrawer-paper":up(e)})),!t&&d(c({},pp(e)),{"& .MuiDrawer-paper":pp(e)}))}),Qb=_styles.styled.call(void 0, "div")(({theme:e})=>e.mixins.toolbar);function mp(e,t,r,o){return ci.default.Children.map(e,n=>{var f,h;if(!ci.default.isValidElement(n))return n;let i=((f=n.props.link)==null?void 0:f.split("/").filter(Boolean))||[],a=n.props.link||"",u="/"+((t==null?void 0:t.split("/").filter(Boolean))||[]).slice(0,i.length).join("/"),p=(h=n.props)!=null&&h.children?mp(n.props.children,t,r,o):null;return ci.default.cloneElement(n,{open:r,selected:u===a,onClick:m=>{o&&o(m)},children:p})})}function xs(e){let{open:t,toggleMenu:r,children:o,onClickItem:n}=e,a=new URL(window.location.href).pathname,l=mp(o,a,t,n);return _jsxruntime.jsxs.call(void 0, Zb,{variant:"permanent",open:t,onClose:r,children:[_jsxruntime.jsx.call(void 0, Qb,{}),_jsxruntime.jsx.call(void 0, _material.List,{children:l})]})}function Jb(e){return e.map(t=>t.visible?_jsxruntime.jsx.call(void 0, hp.Item,{link:t.link,id:t.id,label:t.label,icon:t.icon,children:t.items&&Jb(t.items)},t.id):null)}var hp={Root:xs,Item:gs},eC= exports.Menu =hp;function gp(e){let{links:t}=e;function r(o,n){location.pathname}return _jsxruntime.jsx.call(void 0, _material.Breadcrumbs,{sx:{height:"30px",display:"flex",textWrap:"nowrap"},children:t.map((o,n)=>t.length===1||t.length===n+1?_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{fontSize:"10pt",fontWeight:"bolder"},variant:"subtitle1",color:"black",children:o.label},o.link):_jsxruntime.jsx.call(void 0, _material.Button,{variant:"text",children:o.label},o.link))})}function bs(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, _material.Stack,{pl:1,pr:1,pt:.5,pb:.5,direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",spacing:1,children:t})}var sC={Root:bs},lC= exports.ContentTitle =sC;var cC=process.env.NODE_ENV==="production",Cs="Invariant failed";function ws(e,t){if(!e){if(cC)throw new Error(Cs);var r=typeof t=="function"?t():t,o=r?"".concat(Cs,": ").concat(r):Cs;throw new Error(o)}}var _uuid = require('uuid');function dC(e,t){var r,o;switch(t.type){case"loadFiltersFromStorage":return d(c({},e),{filterValues:(r=t==null?void 0:t.storageValues)==null?void 0:r.filterValues,appliedValues:(o=t==null?void 0:t.storageValues)==null?void 0:o.appliedValues});case"updateFilterValues":return d(c({},e),{filterValues:t.filterValues});case"updateFilterValue":return d(c({},e),{filterValues:d(c({},e.filterValues),{[t.payload.name]:t.payload.value})});case"updateAppliedValues":let n=e.filterValues,i=[];if(n&&Object.entries(n).length>0){let[a]=Object.keys(n);i=[{[a]:n[a]}]}return t!=null&&t.storagePath&&localStorage.setItem(t.storagePath,JSON.stringify({appliedValues:n,filterValuesAsArray:i,filterValues:e.filterValues})),d(c({},e),{appliedValues:n,filterValuesAsArray:i,isOpen:!1,searchId:_uuid.v4.call(void 0, )});case"updateIsOpen":return d(c({},e),{isOpen:t.isOpen,target:t.target});case"updateContainer":return d(c({},e),{container:t.container});case"toggleIsOpen":return d(c({},e),{isOpen:!e.isOpen});case"deleteAppliedValue":return delete e.appliedValues[t.filterName],c({},e);case"deleteAllAppliedValues":return e.appliedValues={},e.filterValues=t.filterValues,t.storagePath&&localStorage.removeItem(t.storagePath),c({},e)}}var Cp=ci.default.createContext({}),wp= exports.FilterApiContext =ci.default.createContext({});function Sp(e){let{children:t,filterValues:r={},storagePath:o}=e,[n,i]=_react.useReducer.call(void 0, dC,{filterValues:{}});_react.useEffect.call(void 0, ()=>{i({type:"updateFilterValues",filterValues:r}),i({type:"updateAppliedValues",storagePath:o})},[r]),_react.useEffect.call(void 0, ()=>{if(o){let l=localStorage.getItem(o);if(l&&l!=="undefined"){let s=JSON.parse(l);i({type:"loadFiltersFromStorage",storageValues:s})}}},[]);let a=_react.useMemo.call(void 0, ()=>{function l(v){i({type:"updateIsOpen",isOpen:!0,target:(v==null?void 0:v.target)||void 0})}function s(){i({type:"updateIsOpen",isOpen:!1,target:void 0})}function u(){i({type:"toggleIsOpen"})}function p(v){let T=v.target.type,w=v.target.name,P;switch(T){case"text":P=v.target.value;break;case"checkbox":P=v.target.checked;break;default:P=v.target.value}i({type:"updateFilterValue",payload:{name:w,value:P}})}function f(v,T){i({type:"updateFilterValue",payload:{name:v,value:T}})}function h(v){i({type:"updateFilterValues",filterValues:v})}function m(){i({type:"updateAppliedValues",storagePath:o})}function y(v){i({type:"deleteAppliedValue",filterName:v})}function g(){i({type:"deleteAllAppliedValues",filterValues:r,storagePath:o}),i({type:"updateAppliedValues",storagePath:o})}function S(v){i({type:"updateContainer",container:v})}return{setContainer:S,openFilter:l,closeFilter:s,onChangeFilterValue:p,changeFilterValue:f,changeFilterValues:h,applyFilterValues:m,deleteFilterValue:y,deleteAllFilterValues:g,toggleFilter:u}},[r]);return _jsxruntime.jsx.call(void 0, wp.Provider,{value:a,children:_jsxruntime.jsx.call(void 0, Cp.Provider,{value:n,children:t})})}function vn(){let e=_react.useContext.call(void 0, Cp);return ws(e,"cannot find FilterDataContext provider"),e}function Ee(){let e=_react.useContext.call(void 0, wp);return ws(e,"cannot find FilterApiContextContext provider"),e}function Ss(){let{openFilter:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:t=>e(t),children:_jsxruntime.jsx.call(void 0, ye.Filter,{})})}function Ts(e){let{children:t}=e,{isOpen:r,container:o}=vn(),{closeFilter:n}=Ee(),i=(o==null?void 0:o.getBoundingClientRect().width)||300;return _jsxruntime.jsx.call(void 0, _material.Popover,{elevation:0,open:r,onClose:n,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{"& .MuiPopover-paper":{width:`${i}px`,border:a=>`1px solid ${a.palette.border}`,borderRadius:"4px",pt:2,pl:1,pr:1,pb:1}},children:_jsxruntime.jsx.call(void 0, _material.Box,{mt:1,mb:1,children:_jsxruntime.jsx.call(void 0, _material.Stack,{spacing:1,children:t})})})}function ks({children:e}){let t=_react.useRef.call(void 0, null),{setContainer:r}=Ee();return _react.useEffect.call(void 0, ()=>{let o=()=>{t.current&&r(t.current)};return o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),_jsxruntime.jsxs.call(void 0, _material.Stack,{ref:t,direction:"row",alignContent:"center",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, ye.Search,{sx:{fontSize:"0.95rem"}}),_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",alignContent:"center",children:e})]})}function Is(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, _material.Box,{sx:{border:r=>`1px solid ${r.palette.border}`,borderRadius:"90px",flexGrow:1,pl:1,pr:1},children:t})}function Es(e){let i=e,{onChange:t}=i,r=C(i,["onChange"]),o=_lodash2.default.debounce(a=>t(a),500);function n(a){let l=a.target.value;o(l)}return _jsxruntime.jsx.call(void 0, _material.InputBase,c({onChange:n},r))}function Fs(){let{applyFilterValues:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:()=>{e()},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[_jsxruntime.jsx.call(void 0, ye.Search,{sx:{fontSize:"0.855rem"}})," ",_jsxruntime.jsx.call(void 0, "span",{children:"Pesquisar"})]})})}function Ms(){let{deleteAllFilterValues:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.Button,{color:"error",onClick:()=>{e&&e()},children:"Resetar"})}function Rs({children:e}){return _jsxruntime.jsx.call(void 0, _material.Stack,{pt:2,direction:"row",spacing:1,justifyContent:"flex-end",children:e})}function Bs({children:e}){let{appliedValues:t}=vn(),{applyFilterValues:r,deleteFilterValue:o}=Ee(),{isOpen:n,open:i,close:a,anchorEl:l,data:s}=_hooks.usePopover.call(void 0, ),u=ci.default.Children.map(e,p=>!ci.default.isValidElement(p)||!(t&&p.props.name in t)?null:ci.default.cloneElement(p,{onDelete:p.props.disabledDelete?void 0:h=>{o&&o(p.props.name||""),a()},onClick:h=>{i(h,{target:h.currentTarget,element:p.props.children,name:p.props.name,disabledDelete:p.props.disabledDelete||!1})}}));return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,children:[u,_jsxruntime.jsxs.call(void 0, _material.Popover,{open:!!n||!1,onClose:()=>a(),anchorEl:l,elevation:0,sx:{"& .MuiPopover-paper":{minWidth:"300px",border:p=>`1px solid ${p.palette.border}`,borderRadius:"4px",pt:2,pl:1,pr:1,pb:2}},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[s==null?void 0:s.element,_jsxruntime.jsxs.call(void 0, _material.Stack,{pt:2,direction:"row",spacing:.5,justifyContent:"flex-end",children:[!(s!=null&&s.disabledDelete)&&_jsxruntime.jsx.call(void 0, _material.Button,{color:"error",onClick:()=>{o&&o((s==null?void 0:s.name)||""),a()},children:"Apagar"}),_jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:()=>{a(),r()},children:"Aplicar"})]})]})]})}function Ls(e){let n=e,{children:t,disabledDelete:r=!1}=n,o=C(n,["children","disabledDelete"]);return _jsxruntime.jsx.call(void 0, _material.Chip,c({},o))}var _C={Root:Is,SearchTextField:Es,Container:ks,AdvancedContainer:Ts,AdvancedActionsContainer:Rs,AdvancedButton:Ss,Provider:Sp,ApplyButton:Fs,ResetButton:Ms,Chips:Bs,Chip:Ls},$C= exports.Filter =_C;var _xdatagrid = require('@mui/x-data-grid');function _s(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{}),label:"Transport",color:"primary",onClick:()=>e&&e("transport")},t))}var Mp=_react.createContext.call(void 0, {});function Ns({children:e}){let[t,r]=_react.useState.call(void 0, []),[o,n]=_react.useState.call(void 0, !1),[i,a]=_react.useState.call(void 0, !1),l=_xdatagrid.useGridApiRef.call(void 0, );function s(){r([]),n(!0)}return _jsxruntime.jsx.call(void 0, Mp.Provider,{value:{apiRef:l,rowsSelectedId:t,clearCallback:o,breakpoint:i,setClearCallback:n,setBreakpoint:a,setRowsSelectedId:r,clearRowsSelectedId:s},children:e})}function Ve(){return _react.useContext.call(void 0, Mp)}function Vs(e){let{countTitle:t,gender:r}=e,{rowsSelectedId:o}=Ve(),n=o==null?void 0:o.length,i=_react.useMemo.call(void 0, ()=>{if(!t)return"";let a=r==="feminino"?"selecionada":"selecionado",l=r==="feminino"?"selecionadas":"selecionados",s=r==="feminino"?"Nenhuma":"Nenhum";return n===1?`${t} ${a}`:n&&n>1?`${t.split(" ").map(u=>`${u}s`).join(" ")} ${l}`:`${s} ${t} ${a}`},[n]);return _jsxruntime.jsx.call(void 0, _material.Stack,{children:_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body2",fontSize:"13px",fontWeight:"500",whiteSpace:"nowrap",children:[n&&n>0?n:""," ",i]})})}function zs(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{}),label:"Delete",color:"primary",onClick:()=>{e&&e("delete")}},t))}function _r(e){let l=e,{isLoading:t,startIcon:r,children:o,title:n}=l,i=C(l,["isLoading","startIcon","children","title"]),{breakpoint:a}=Ve();return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:a?_jsxruntime.jsx.call(void 0, _material.Tooltip,{title:o,children:_jsxruntime.jsxs.call(void 0, _material.IconButton,d(c({},i),{color:"primary",disabled:t?!0:i.disabled,children:[r,t&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:14,sx:{position:"absolute",top:"25%",bottom:"25%",left:"25%",right:"25%",transform:"translate(-50%, -50%)"}})]}))}):_jsxruntime.jsx.call(void 0, _material.Button,d(c({startIcon:r,disabled:t?!0:i.disabled,sx:{position:"relative",height:"26px",minWidth:"70px",padding:"7px 8px 8px",border:"1px solid rgba(223, 226, 231, 0.8)",borderRadius:"6px",display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:1,transition:"width 0.2s ease"}},i),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{component:"span",sx:{transition:"opacity 0.2s ease, width 0.2s ease",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[t&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:14,sx:{position:"absolute",top:"22%",left:"44%",transform:"translate(-50%, -50%)"}}),o]})}))})}var i1=({apiRef:e})=>_xdatagrid.gridFilteredSortedRowIdsSelector.call(void 0, e);function Gs(){let{apiRef:e}=Ve(),t=r=>{e!=null&&e.current&&e.current.exportDataAsCsv(r)};return _jsxruntime.jsx.call(void 0, _r,{startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.FileDownload,{}),onClick:()=>t({getRowsToExport:i1}),children:"Exportar CSV"})}function Ws(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{}),label:"Edit",color:"primary",onClick:()=>e&&e("edit")},t))}function Hs(e){let{children:t,onClick:r}=e;return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_react.Children.map(t,o=>{if(_react.isValidElement.call(void 0, o))return _react.cloneElement.call(void 0, o,{onClick:r})})})}function Us(e){let n=e,{event:t,onClick:r}=n,o=C(n,["event","onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({color:"primary",onClick:()=>{r&&r(t)}},o))}function js(e){let{onChangePageSize:t,onChangePage:r,pagination:o,rowsPerPageOptions:n=[15,50,100,200]}=e,{page:i,pageSize:a=15,totalRecords:l}=o||{},s=_react.useMemo.call(void 0, ()=>o!=null&&o.lastPage?o.lastPage:(l||0)<a?1:Math.max(Math.ceil((l||0)/a)),[l,a]),u=_react.useMemo.call(void 0, ()=>{if((l||0)<a)return`Exibindo ${_hooks.pluralizar.call(void 0, l||0,"registro","registros",!0)}`;let f=a;if(i===s){let h=(l||0)%a;f=h===0?a:h}return`Exibindo ${_hooks.pluralizar.call(void 0, f||0,"registro","registros",!0)} de ${l}`},[o,s]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{width:"100%",direction:"row",alignItems:"center",gap:2,marginLeft:"auto",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",fontSize:"13px",fontWeight:"500",whiteSpace:"nowrap",children:u}),!0&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",gap:2,marginLeft:"auto",children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"78px",fontSize:"8pt"},size:"small",value:a||0,select:!0,onChange:f=>{t&&t(parseInt(f.target.value))},children:n.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f,children:f},f))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:s||0,showFirstButton:!0,showLastButton:!0,onChange:(f,h)=>{r&&r(h)},page:i||0,color:"primary"})]})]})}function qs({children:e,breakpoints:t}){let{setBreakpoint:r}=Ve(),o=_material.useTheme.call(void 0, ),n=_material.useMediaQuery.call(void 0, o.breakpoints.down(t||"md"));return _react.useEffect.call(void 0, ()=>{r(n)},[n]),_jsxruntime.jsx.call(void 0, _material.Stack,{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:1,marginLeft:"auto",flexGrow:1,children:e})}function Ys({children:e}){return _jsxruntime.jsx.call(void 0, _material.Stack,{component:_material.Paper,elevation:0,gap:1.5,flexDirection:"row",justifyContent:"space-between",alignItems:"center",p:1,borderRadius:"8px 8px 0 0",sx:{width:"100%"},children:e})}function Ks(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1.5},e))}function Zs(e){return _jsxruntime.jsx.call(void 0, _material.TableFooter,d(c({},e),{sx:{height:"54px",paddingX:"12px",gap:"12px",display:"flex",alignItems:"center",backgroundColor:"white",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",borderTop:"1px solid #edf2f9"}}))}var _locales = require('@mui/x-data-grid/locales');function Xs(){return _jsxruntime.jsxs.call(void 0, _material.Stack,{alignItems:"center",justifyContent:"center",gap:2,padding:2,maxWidth:"400px",minWidth:"200px",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"250px",height:"250px",alignItems:"center",justifyContent:"center",borderRadius:"50%",sx:{background:"linear-gradient(to top, #ffffff, #fdfcfd, #fafafa, #f8f7f8, #f5f5f6);"},children:_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/empty-data.svg",alt:"Imagem de notifica\xE7\xE3o",width:"148px",height:"148px"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,textAlign:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h4",component:"h2",fontWeight:"600",children:"Nenhum registro encontrado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",whiteSpace:"normal",children:"Tente outra pesquisa ou adicione um novo registro."})]})]})}function el({errorMessage:e}){return _jsxruntime.jsxs.call(void 0, _material.Stack,{alignItems:"center",justifyContent:"center",gap:2,padding:2,maxWidth:"400px",minWidth:"200px",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"250px",height:"250px",alignItems:"center",justifyContent:"center",borderRadius:"50%",sx:{background:"linear-gradient(to top, #ffffff, #fdfcfd, #fafafa, #f8f7f8, #f5f5f6);"},children:_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/error.svg",alt:"Imagem de erro",width:"148px",height:"148px"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{gap:1,textAlign:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h4",component:"h2",fontWeight:"600",children:"Ops! Algo deu errado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:e})]})]})}var _1=({apiRef:e})=>_xdatagrid.gridFilteredSortedRowIdsSelector.call(void 0, e);function tl(e){let D=e,{error:t,isLoading:r,isFetching:o,data:n,columns:i,controlledRowsSelectedId:a,onClearRowsSelectedId:l,onRowSelectionChange:s,onCellKeyDown:u,onRowDoubleClick:p,stackProps:f}=D,h=C(D,["error","isLoading","isFetching","data","columns","controlledRowsSelectedId","onClearRowsSelectedId","onRowSelectionChange","onCellKeyDown","onRowDoubleClick","stackProps"]),{rowsSelectedId:m,setRowsSelectedId:y,clearCallback:g,setClearCallback:S,apiRef:v}=Ve(),T=_react.useMemo.call(void 0, ()=>M=>M.map(k=>k.headerName==="A\xE7\xF5es"?d(c({},k),{minWidth:k.minWidth||80,maxWidth:k.maxWidth||k.width||80,headerClassName:"sticky-header",cellClassName:"sticky-cell"}):d(c({},k),{flex:k.flex||1,minWidth:k.minWidth||100,headerClassName:k!=null&&k.enableStickyColumns?"sticky-header":"",cellClassName:k!=null&&k.enableStickyColumns?"sticky-cell":""})),[i]);_react.useEffect.call(void 0, ()=>{a&&y(a)},[a]),_react.useEffect.call(void 0, ()=>{g&&(l&&l([]),S(!1))},[g]);function w(M,k,te){switch(k.ctrlKey&&k.code==="KeyE"?"ctrl+e":k.code){case"Enter":k.preventDefault(),u&&u("edit",M.id);break;case"F3":k.preventDefault(),u&&u("edit",M.id);break;case"Delete":k.preventDefault(),u&&u("delete",M.id);break;case"ctrl+e":k.preventDefault(),(R=>{v!=null&&v.current&&v.current.exportDataAsCsv(R)})({getRowsToExport:_1});break;default:break}}function P(M,k,te){p&&p("edit",M.id)}return _jsxruntime.jsxs.call(void 0, _material.Stack,d(c({height:"100%",minHeight:"500px",position:"relative"},f),{children:[!r&&o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{sx:{position:"absolute",top:0,right:0,left:0,zIndex:999,height:"3px"}}),_jsxruntime.jsx.call(void 0, _xdatagrid.DataGrid,c({apiRef:v,rows:n,columns:T(i),density:"compact",hideFooterPagination:!0,hideFooter:!0,loading:r,rowHeight:43,columnHeaderHeight:43,disableVirtualization:!0,onRowDoubleClick:P,onCellKeyDown:w,disableRowSelectionOnClick:!0,rowSelectionModel:m,onRowSelectionModelChange:(M,k)=>{s&&s(M,k),!a&&y(M)},slots:{booleanCellFalseIcon:()=>_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:"error",sx:{fontSize:"10pt"}}),booleanCellTrueIcon:()=>_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:"success",sx:{fontSize:"10pt"}}),noRowsOverlay:()=>!r&&t?_jsxruntime.jsx.call(void 0, el,{errorMessage:t}):_jsxruntime.jsx.call(void 0, Xs,{})},slotProps:{loadingOverlay:{variant:"skeleton",noRowsVariant:"skeleton"}},disableColumnFilter:!0,localeText:_locales.ptBR.components.MuiDataGrid.defaultProps.localeText,sx:{border:"none",borderRadius:0,"--DataGrid-rowBorderColor":"#edf2f9","--DataGrid-containerBackground":"#f4f6fa",".MuiDataGrid-overlayWrapperInner":{display:"flex",alignItems:"center",justifyContent:"center"},".MuiDataGrid-row":{backgroundColor:"white","&:nth-of-type(even)":{backgroundColor:"#f9fafd"},":hover":{backgroundColor:"#e9e9e9"},"&.Mui-selected":{backgroundColor:"rgb(238, 249, 252)","&:hover":{backgroundColor:"rgb(222, 243, 249)"}}},".MuiDataGrid-cell":{fontSize:"12px",color:"#0b0e14"},".MuiDataGrid-columnHeaders":{border:"solid 1px #edf2f9"},".MuiDataGrid-columnHeaderTitle":{fontSize:"12px",color:"#0b0e14",fontWeight:"600"},"& .sticky-cell":{position:"sticky",right:0,background:"inherit",zIndex:1},"& .sticky-header":{position:"sticky",right:0,background:"inherit",zIndex:2}}},h))]}))}function rl({children:e,titleDivider:t=!1}){let r=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",fontSize:"14px",whiteSpace:"nowrap",sx:{borderRight:t?`solid 1px ${r.palette.grey[300]}`:"none",paddingRight:1.5},children:e})}function ol(o){var n=o,{children:e,height:t}=n,r=C(n,["children","height"]);let i=_react.useRef.call(void 0, null),[a,l]=_react.useState.call(void 0, 500);return _react.useEffect.call(void 0, ()=>{let s=()=>{let u=i.current;if(!u)return;let p=u.getBoundingClientRect().top;l(window.innerHeight-p)};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[]),_jsxruntime.jsx.call(void 0, _material.Stack,d(c({ref:i,sx:c({backgroundColor:"#f4f6fa",border:"1px solid #edf2f9",borderRadius:2,height:t||`calc(${a}px - 16px)`},r.sx)},r),{children:_jsxruntime.jsx.call(void 0, Ns,{children:e})}))}var j1={CellActionTransport:_s,SelectionCounter:Vs,CellActionDelete:zs,ExportCsvButton:Gs,CellActionEdit:Ws,CellActions:Hs,CellAction:Us,Pagination:js,Actions:qs,Toolbar:Ys,Content:Ks,Button:_r,Footer:Zs,Table:tl,Title:rl,Root:ol},q1= exports.DataTableV2 =j1;function nl(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({gap:.5,overflow:"hidden"},e))}function il(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({sx:[{overflowY:"auto",overflowX:"hidden"},...Array.isArray(e.sx)?e.sx:e.sx?[e.sx]:[]]},e))}function al(e){return _jsxruntime.jsx.call(void 0, _material.MenuItem,c({},e))}var ew={Root:nl,Content:il,Item:al},$r= exports.List =ew;var Zp=_react.createContext.call(void 0, void 0),Qp=({children:e})=>{let[t,r]=_react.useState.call(void 0, !1),[o,n]=_react.useState.call(void 0, null),i=_react.useCallback.call(void 0, l=>{n(l),r(!0)},[]),a=_react.useCallback.call(void 0, ()=>{r(!1),n(null)},[]);return _jsxruntime.jsx.call(void 0, Zp.Provider,{value:{isOpen:t,open:i,close:a,anchorEl:o,setAnchorEl:n},children:e})},Jt=()=>{let e=_react.useContext.call(void 0, Zp);if(!e)throw new Error("usePopover must be used within a PopoverProvider");return e};function sl(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, Qp,{children:t})}var _reactslot = require('@radix-ui/react-slot');function ll(e){let i=e,{asChild:t=!1}=i,r=C(i,["asChild"]),o=t?_reactslot.Slot:_material.Button,{open:n}=Jt();return _jsxruntime.jsx.call(void 0, o,c({onClick:a=>{n(a.currentTarget)}},r))}function cl(e){let i=e,{asChild:t=!1}=i,r=C(i,["asChild"]),o=t?_reactslot.Slot:_material.Button,{close:n}=Jt();return _jsxruntime.jsx.call(void 0, o,c({onClick:a=>{n()}},r))}function ul(e){let{isOpen:t,close:r,anchorEl:o}=Jt();return _jsxruntime.jsx.call(void 0, _material.Popover,d(c({open:t,anchorEl:o,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"center"},slotProps:{paper:{sx:{borderRadius:"12px"}}},transformOrigin:{vertical:"top",horizontal:"center"}},e),{children:e.children}))}var dw={Root:sl,Trigger:ll,Content:ul,Close:cl},er= exports.Popover =dw;var tf="mio-componente:button-group:value";function pl(e){let{children:t,value:r,onChange:o,isLoading:n,disableMemory:i}=e,[a,l]=_react.useState.call(void 0, !1),[s,u]=_react.useState.call(void 0, ()=>{if(!i)return window.localStorage.getItem(tf)||r||0;if(r)return r}),p=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{u(r===void 0?0:r)},[r]),_react.useEffect.call(void 0, ()=>{window.localStorage.setItem(tf,s||0),u(s)},[s]);let f=[],h=_react.Children.map(t,(m,y)=>{var S,v;f.push({label:m.props.children,value:((S=m.props)==null?void 0:S.value)||y});let g=ci.default.cloneElement(m,{isLoading:n,sx:{maxWidth:"300px",width:"120px"},value:((v=m.props)==null?void 0:v.value)||y});return!s&&y===0||s&&Number(g.props.value)===Number(s)?g:null});return _jsxruntime.jsxs.call(void 0, ci.default.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _material.ButtonGroup,{variant:"contained",size:"small",ref:p,children:[h,_jsxruntime.jsx.call(void 0, _material.Button,{disabled:n,"data-allow-click":"true",onClick:()=>{l(m=>!m)},sx:{width:"30px"},children:_jsxruntime.jsx.call(void 0, Er,{sx:{fontSize:"13pt"}})})]}),_jsxruntime.jsx.call(void 0, _material.Popper,{open:a,transition:!0,anchorEl:p.current,sx:{zIndex:999999},placement:"bottom-end",children:({TransitionProps:m})=>_jsxruntime.jsx.call(void 0, _material.Grow,d(c({},m),{children:_jsxruntime.jsx.call(void 0, _material.Paper,{sx:{minWidth:"120px"},children:_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>l(!1),children:_jsxruntime.jsx.call(void 0, _material.MenuList,{autoFocusItem:!0,disablePadding:!0,children:f.map(y=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{onClick:()=>{o?o(y.value):u(y.value),l(!1)},children:y.label},y.value))})})})}))})]})}function fl(e){return _jsxruntime.jsx.call(void 0, $,c({},e))}var Tw={Root:pl,Button:fl},kw= exports.ButtonGroup =Tw;function sf(e){let{licencas:t,licencaSelecionada:r,onAlterarLicenca:o}=e,[n,i]=_react.useState.call(void 0, "");if(t.length===0)return _jsxruntime.jsxs.call(void 0, _material.Stack,{overflow:"hidden",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{overflow:"hidden",textOverflow:"ellipsis",variant:"body1",children:r.nome}),_jsxruntime.jsx.call(void 0, _material.Typography,{overflow:"hidden",textOverflow:"ellipsis",variant:"body2",children:_hooks.formatDocumento.call(void 0, r.documento)})]});function a(s){i(s)}let l=n.length>0?t.filter(s=>["nome"].some(u=>_hooks.normalizeText.call(void 0, String(s[u])).includes(_hooks.normalizeText.call(void 0, n)))):t;return _jsxruntime.jsxs.call(void 0, er.Root,{children:[_jsxruntime.jsx.call(void 0, er.Trigger,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _material.Button,{sx:{color:s=>s.palette.grey[900]},variant:"text",children:[r.nome,_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowDropDown,{})]})}),_jsxruntime.jsx.call(void 0, er.Content,{sx:{"& .MuiPopover-paper":{minWidth:"300px",borderRadius:"12px",p:.5}},children:_jsxruntime.jsxs.call(void 0, $r.Root,{sx:{m:.5,minWidth:"300px",maxHeight:"300px",overflow:"auto"},children:[_jsxruntime.jsx.call(void 0, rt,{autoFocus:!0,onSearch:a}),_jsxruntime.jsx.call(void 0, $r.Content,{children:l.map(s=>_jsxruntime.jsx.call(void 0, er.Close,{asChild:!0,children:_jsxruntime.jsx.call(void 0, $r.Item,{selected:r.uuid===s.uuid,onClick:()=>o(s),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",textOverflow:"ellipsis",children:s.nome}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",textOverflow:"ellipsis",children:_hooks.formatDocumento.call(void 0, s.documento)})]})})},s.uuid))})]})})]})}var Rw=_styles.styled.call(void 0, _material.MenuItem,{})(({theme:e})=>({borderRadius:"6px",width:"90%",gap:"16px",margin:"0 auto",padding:"8px 16px",transition:"0.1s ease-in-out","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main},"& .MuiSvgIcon-root":{color:e.palette.primary.main},"& .MuiIcon-root":{color:e.palette.primary.main}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{letterSpacing:"0.5px",color:e.palette.text.secondary,fontSize:e.typography.body1},"& .MuiSvgIcon-root":{fontSize:"24px"}})),Dw=e=>_jsxruntime.jsx.call(void 0, Rw,c({},e)),Pn=Dw;function dl(e){let{menuItem:t,activeMenu:r,onMenuClick:o}=e,[n,i]=_react.useState.call(void 0, !1);if(!t.visible)return null;let a=!!(t!=null&&t.items&&(t==null?void 0:t.items.length)>0);function l(){i(!n)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Pn,{onClick:()=>{if(t!=null&&t.link){o(t.link);return}l()},selected:r===t.link,children:[!!t.icon&&_jsxruntime.jsx.call(void 0, _material.Icon,{children:t.icon}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:t.label}),a&&!n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),a&&n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(t==null?void 0:t.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:n,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, wt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(t==null?void 0:t.items)||[],onMenuClick:o})})]})}function wt(e){let i=e,{menus:t,activeMenu:r,onMenuClick:o}=i,n=C(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,d(c({component:"nav",disablePadding:!0},n),{children:t.map(a=>_jsxruntime.jsx.call(void 0, dl,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function ml(e){let{menus:t,activeMenu:r,onMenuClick:o}=e,[n,i]=_react.useState.call(void 0, null),a=(s,u,p)=>{i({element:s.currentTarget,id:u,items:p})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:t.map(s=>s.visible?_jsxruntime.jsxs.call(void 0, Pn,{onMouseEnter:u=>{s!=null&&s.link||a(u,s.id,s.items)},onMouseLeave:()=>{s!=null&&s.link||l()},onClick:()=>{s!=null&&s.link&&o(s.link)},selected:r===s.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:s.icon})}),(n==null?void 0:n.id)===s.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:n==null?void 0:n.element,open:!!(n!=null&&n.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, wt,{activeMenu:r,onMenuClick:o,menus:(s==null?void 0:s.items)||[],sx:{minWidth:"240px",backgroundColor:U.palette.background.paper,borderRadius:"12px",padding:"16px 4px",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);"}})})]},`minMenu-${s.id}`):null)})}var uf=(e,t)=>({width:e,transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}),pf=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(8)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(8)} + 1px)`}}),Xw=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:e=>e!=="open"&&e!=="width"})(({theme:e,open:t,width:r})=>c(c({width:r,bgcolor:e.palette.background.paper,boxShadow:"2px 3px 20px -16px rgb(32 32 36 / 30%)",borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},t&&d(c({},uf(r,e)),{"& .MuiDrawer-paper":uf(r,e)})),!t&&d(c({},pf(e)),{"& .MuiDrawer-paper":pf(e)})));function ff(e){let s=e,{open:t,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=C(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, Xw,d(c({width:o,open:t,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),t&&_jsxruntime.jsx.call(void 0, wt,{onMenuClick:i,activeMenu:n,menus:r}),!t&&_jsxruntime.jsx.call(void 0, ml,{onMenuClick:i,activeMenu:n,menus:r})]}))}function df(e){return _jsxruntime.jsx.call(void 0, _material.Box,c({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},e))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function mf(e){let{user:t}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,c({src:t==null?void 0:t.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},e))}function Tn(e){let i=e,{children:t,value:r,index:o}=i,n=C(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,d(c({role:"tabpanel",hidden:r!==o,id:`scrollable-auto-tabpanel-${o}`,"aria-labelledby":`scrollable-auto-tab-${o}`,sx:{display:"flex",flexDirection:"column",flexGrow:1}},n),{children:r===o&&t}))}var _reacteasycrop = require('react-easy-crop'); var _reacteasycrop2 = _interopRequireDefault(_reacteasycrop);var _Slider = require('@mui/material/Slider'); var _Slider2 = _interopRequireDefault(_Slider);var _Button = require('@mui/material/Button'); var _Button2 = _interopRequireDefault(_Button);var _Dialog = require('@mui/material/Dialog'); var _Dialog2 = _interopRequireDefault(_Dialog);function gl(e,t){return new Promise(r=>{let o=new Image;o.src=e,o.onload=()=>{let n=document.createElement("canvas");n.width=t.width,n.height=t.height;let i=n.getContext("2d");i&&(i.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),r(n.toDataURL("image/jpeg")))}})}var fS=({onSave:e,src:t})=>{let[r,o]=_react.useState.call(void 0, null),[n,i]=_react.useState.call(void 0, null),[a,l]=_react.useState.call(void 0, {x:0,y:0}),[s,u]=_react.useState.call(void 0, 1),[p,f]=_react.useState.call(void 0, null),[h,m]=_react.useState.call(void 0, !1),y=_react.useCallback.call(void 0, (v,T)=>{f(T)},[]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,alignItems:"center",children:[n?_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:n,alt:"Preview",sx:{width:64,height:64,margin:"auto",mb:2}}):_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:t,sx:{width:64,height:64,margin:"auto",mb:2}}),_jsxruntime.jsxs.call(void 0, "label",{children:[_jsxruntime.jsx.call(void 0, "input",{type:"file",accept:"image/*",onChange:v=>{var P;let T=(P=v.target.files)==null?void 0:P[0];if(!T)return;let w=new FileReader;w.onload=()=>{o(w.result),m(!0)},w.readAsDataURL(T)},style:{display:"none"}}),_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",component:"span",children:"Alterar foto"})]}),_jsxruntime.jsxs.call(void 0, _Dialog2.default,{open:h,onClose:()=>m(!1),maxWidth:"sm",fullWidth:!0,children:[_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",height:400,background:"#333"},children:r&&_jsxruntime.jsx.call(void 0, _reacteasycrop2.default,{image:r,crop:a,zoom:s,aspect:1,cropShape:"round",showGrid:!1,onCropChange:l,onZoomChange:u,onCropComplete:y})}),_jsxruntime.jsxs.call(void 0, "div",{style:{padding:20},children:[_jsxruntime.jsx.call(void 0, _Slider2.default,{value:s,min:1,max:3,step:.1,onChange:(v,T)=>u(T)}),_jsxruntime.jsx.call(void 0, we,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>N(void 0,null,function*(){if(!r||!p)return;let v=yield gl(r,p);i(v),m(!1),e&&e(v)}),children:"Salvar"})})]})]})]})},yf=fS;var yS=Ce().shape({name:pe().required("Informe o nome")});function bl(e){let{usuario:t,credentialsConfig:r,onUploadComplete:o}=e,{data:n,setData:i,handleChange:a,validate:l,validationErrors:s}=_hooks.useForm.call(void 0, t,yS),[u,p]=_react.useState.call(void 0, !1),[f,h]=_react.useState.call(void 0, !1),[m,y]=_react.useState.call(void 0, !1),{uploadAvatar:g,atualizarUsuario:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(t)},[t]),_react.useEffect.call(void 0, ()=>{m&&setTimeout(()=>{y(!1)},3e3)},[m]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{p(!1)},3e3)},[u]);function v(){l(T=>N(this,null,function*(){try{h(!0),yield S(T),y(!0)}catch(w){p("Ocorreu um erro ao alterar os dados da conta")}finally{h(!1)}}))}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Avatar"}),_jsxruntime.jsx.call(void 0, yf,{src:n==null?void 0:n.avatarUrl,onSave:T=>{try{g(T),o&&(y(!0),o(!0))}catch(w){p("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,w)}}}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Informa\xE7\xF5es da Conta"}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:1.5,children:[_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{disabled:!0,fullWidth:!0,label:"E-mail",value:(n==null?void 0:n.email)||""})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"name",fullWidth:!0,label:"Nome",value:(n==null?void 0:n.name)||"",onChange:a},s("name")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{name:"surname",fullWidth:!0,label:"Sobrenome",value:(n==null?void 0:n.surname)||"",onChange:a})})]}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, we,{children:_jsxruntime.jsx.call(void 0, $,{isLoading:f,onClick:()=>v(),variant:"contained",children:"Salvar"})})}),m&&_jsxruntime.jsx.call(void 0, _material.Alert,{children:"Dados da conta alterados com sucesso!"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function wl(e){var y,g,S;let{open:t,onClose:r,payload:o,onCodigoVerificado:n,credentialsConfig:i}=e,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),{validarCodigoWhatsapp:h}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function m(){return N(this,null,function*(){try{f(!0);let v=yield h(a);n(v.data)}catch(v){u(v.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:v=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Verifique seu n\xFAmero"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos um c\xF3digo via WhatsApp para +55"," ",_jsxruntime.jsx.call(void 0, "b",{children:`(${(y=o==null?void 0:o.whatsappNumber)==null?void 0:y.slice(0,2)}) ${(g=o==null?void 0:o.whatsappNumber)==null?void 0:g.slice(2,7)}-${(S=o==null?void 0:o.whatsappNumber)==null?void 0:S.slice(7)}`}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."]}),_jsxruntime.jsx.call(void 0, kr,{value:a,onChange:v=>{l(v)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Verificar",onClick:m,isLoading:p,disabled:a.length!=6})]})})]})}var u7=Ce().shape({whatsappNumber:pe().required("Informe o n\xFAmero do whastapp").length(15)});function kl(e){let{usuario:t,credentialsConfig:r,onWhastappSaved:o}=e,[n,i]=_react.useState.call(void 0, !1),[a,l]=_react.useState.call(void 0, !1),{data:s,setData:u,changeValue:p,validate:f,validationErrors:h}=_hooks.useForm.call(void 0, t),[m,y]=_react.useState.call(void 0, !1),[g,S]=_react.useState.call(void 0, !1),{atualizarUsuario:v,gerarWhatsappVerificationCode:T}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(t)},[t]);function w(){f(D=>N(this,null,function*(){try{l(!0);let M=yield v(D);o&&o(M.data)}catch(M){}finally{l(!1)}}))}function P(){return N(this,null,function*(){try{y(!0);let D=yield T();S(!0)}catch(D){}finally{y(!1)}})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Senha"}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>{i(!0)},sx:{width:"200px"},fullWidth:!1,variant:"contained",children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, Gt,{isOpen:n,onClose:()=>N(this,null,function*(){return i(!1)}),credentialsConfig:r}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Login com Whastapp"}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,children:[_jsxruntime.jsx.call(void 0, Tr,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:D=>{p("whatsappNumber",D.target.value)}}),s.whatsappVerifiedAt&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Verified,{color:"success"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:"N\xFAmero Verificado"})]}),s.whatsappNumber&&s.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, $,{isLoading:a,onClick:w,children:"Salvar Whatsapp"})]}),t.whatsappNumber&&t.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"warning",action:_jsxruntime.jsx.call(void 0, $,{isLoading:m,onClick:P,children:"Enviar n\xFAmero de verifica\xE7\xE3o"}),children:"O seu n\xFAmero de whatsapp ainda n\xE3o est\xE1 validado"}),_jsxruntime.jsx.call(void 0, wl,{open:g,onClose:D=>N(this,null,function*(){S(!1)}),payload:t,credentialsConfig:r,onCodigoVerificado:D=>{u(D),S(!1)}})]})}function Sf(e){let[t,r]=_react.useState.call(void 0, 0),{user:o,setUser:n,credentialsConfig:i}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,direction:"row",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"200px"},children:_jsxruntime.jsxs.call(void 0, _material.Tabs,{orientation:"vertical",value:t,onChange:(a,l)=>{r(l)},sx:{"& .MuiButtonBase-root":{alignItems:"flex-start"}},children:[_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Minha Conta",value:0}),_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Login e Seguran\xE7a",value:1})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexGrow:1},children:[_jsxruntime.jsx.call(void 0, Tn,{value:t,index:0,children:_jsxruntime.jsx.call(void 0, bl,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Tn,{value:t,index:1,children:_jsxruntime.jsx.call(void 0, kl,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}exports.AlterarLicenca = sf; exports.AlterarSenha = Gt; exports.Avatar = mf; exports.Breadcrumbs = gp; exports.Button = $; exports.ButtonContainer = we; exports.ButtonGroup = kw; exports.Checkbox = Dl; exports.ColorsGrid = Bl; exports.Content = df; exports.ContentTitle = lC; exports.CurrencyCellStyle = lP; exports.CurrencyTextField = id; exports.DataTable = Ud; exports.DataTableOptions = _n; exports.DataTableV2 = q1; exports.DeleteContainer = Bn; exports.Dialog = Ge; exports.DialogV2 = G; exports.DrawerMenu = ff; exports.Editable = _o; exports.Filter = $C; exports.FilterApiContext = wp; exports.FilterContainer = Wn; exports.FilterControl = Yr; exports.FilterDataContext = Cp; exports.FilterProvider = Sp; exports.Flag = rc; exports.FormContainer = jn; exports.Header = Tb; exports.Icon = ye; exports.LabelValue = ou; exports.List = $r; exports.Menu = eC; exports.MioAuth = ip; exports.OptionStyles = sP; exports.PageTitle = cu; exports.PasswordTextField = ht; exports.Popover = er; exports.Profile = Sf; exports.SearchTextField = rt; exports.Surface = Pt; exports.Tooltip = Tt; exports.Transporter = Li; exports.renderMenuItems = Jb; exports.theme = U; exports.useDialogs = _core.useDialogs; exports.useFilter = vn; exports.useFilterApi = Ee;
10
+ `+(l!==a?`result of cast: ${l}`:""))}return i}_cast(t,r){let o=t===void 0?t:this.transforms.reduce((n,i)=>i.call(this,n,t,this),t);return o===void 0&&(o=this.getDefault(r)),o}_validate(t,r={},o,n){let{path:i,originalValue:a=t,strict:l=this.spec.strict}=r,s=t;l||(s=this._cast(s,Object.assign({assert:!1},r)));let u=[];for(let p of Object.values(this.internalTests))p&&u.push(p);this.runTests({path:i,value:s,originalValue:a,options:r,tests:u},o,p=>{if(p.length)return n(p,s);this.runTests({path:i,value:s,originalValue:a,options:r,tests:this.tests},o,n)})}runTests(t,r,o){let n=!1,{tests:i,value:a,originalValue:l,path:s,options:u}=t,p=g=>{n||(n=!0,r(g,a))},f=g=>{n||(n=!0,o(g,a))},h=i.length,m=[];if(!h)return f([]);let y={value:a,originalValue:l,path:s,options:u,schema:this};for(let g=0;g<i.length;g++){let S=i[g];S(y,p,function(T){T&&(Array.isArray(T)?m.push(...T):m.push(T)),--h<=0&&f(m)})}}asNestedTest({key:t,index:r,parent:o,parentPath:n,originalParent:i,options:a}){let l=t!=null?t:r;if(l==null)throw TypeError("Must include `key` or `index` for nested validations");let s=typeof l=="number",u=o[l],p=Object.assign({},a,{strict:!0,parent:o,value:u,originalValue:i[l],key:void 0,[s?"index":"key"]:l,path:s||l.includes(".")?`${n||""}[${s?l:`"${l}"`}]`:(n?`${n}.`:"")+t});return(f,h,m)=>this.resolve(p)._validate(u,p,h,m)}validate(t,r){var o;let n=this.resolve(Object.assign({},r,{value:t})),i=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return new Promise((a,l)=>n._validate(t,r,(s,u)=>{ue.isError(s)&&(s.value=u),l(s)},(s,u)=>{s.length?l(new ue(s,u,void 0,void 0,i)):a(u)}))}validateSync(t,r){var o;let n=this.resolve(Object.assign({},r,{value:t})),i,a=(o=r==null?void 0:r.disableStackTrace)!=null?o:n.spec.disableStackTrace;return n._validate(t,Object.assign({},r,{sync:!0}),(l,s)=>{throw ue.isError(l)&&(l.value=s),l},(l,s)=>{if(l.length)throw new ue(l,t,void 0,void 0,a);i=s}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,o=>{if(ue.isError(o))return!1;throw o})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(o){if(ue.isError(o))return!1;throw o}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Lt(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){let o=this.clone({nullable:t});return o.internalTests.nullable=Bt({message:r,name:"nullable",test(n){return n===null?this.schema.spec.nullable:!0}}),o}optionality(t,r){let o=this.clone({optional:t});return o.internalTests.optionality=Bt({message:r,name:"optionality",test(n){return n===void 0?this.schema.spec.optional:!0}}),o}optional(){return this.optionality(!0)}defined(t=Ne.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Ne.notNull){return this.nullability(!1,t)}required(t=Ne.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Ne.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let o=this.clone(),n=Bt(r),i=r.exclusive||r.name&&o.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(o.exclusiveTests[r.name]=!!r.exclusive),o.tests=o.tests.filter(a=>!(a.OPTIONS.name===r.name&&(i||a.OPTIONS.test===n.OPTIONS.test))),o.tests.push(n),o}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let o=this.clone(),n=Mu(t).map(i=>new Ye(i));return n.forEach(i=>{i.isSibling&&o.deps.push(i.key)}),o.conditions.push(typeof r=="function"?new _t(n,r):_t.fromOptions(n,r)),o}typeError(t){let r=this.clone();return r.internalTests.typeError=Bt({message:t,name:"typeError",skipAbsent:!0,test(o){return this.schema._typeCheck(o)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Ne.oneOf){let o=this.clone();return t.forEach(n=>{o._whitelist.add(n),o._blacklist.delete(n)}),o.internalTests.whiteList=Bt({message:r,name:"oneOf",skipAbsent:!0,test(n){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(n)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),o}notOneOf(t,r=Ne.notOneOf){let o=this.clone();return t.forEach(n=>{o._blacklist.add(n),o._whitelist.delete(n)}),o.internalTests.blacklist=Bt({message:r,name:"notOneOf",test(n){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(n)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),o}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){let r=(t?this.resolve(t):this).clone(),{label:o,meta:n,optional:i,nullable:a}=r.spec;return{meta:n,label:o,optional:i,nullable:a,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(s=>({name:s.OPTIONS.name,params:s.OPTIONS.params})).filter((s,u,p)=>p.findIndex(f=>f.name===s.name)===u)}}};ae.prototype.__isYupSchema__=!0;for(let e of["validate","validateSync"])ae.prototype[`${e}At`]=function(t,r,o={}){let{parent:n,parentPath:i,schema:a}=My(this,t,r,o.context);return a[e](n&&n[i],Object.assign({},o,{parent:n,path:t}))};for(let e of["equals","is"])ae.prototype[e]=ae.prototype.oneOf;for(let e of["not","nope"])ae.prototype[e]=ae.prototype.notOneOf;var Ry=()=>!0;function Dy(e){return new Uo(e)}var Uo=class extends ae{constructor(t){super(typeof t=="function"?{type:"mixed",check:t}:Object.assign({type:"mixed",check:Ry},t))}};Dy.prototype=Uo.prototype;function Oy(){return new jo}var jo=class extends ae{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(o.spec.coerce&&!o.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return Fe(r)||r===!0}})}isFalse(t=ji.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return Fe(r)||r===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}};Oy.prototype=jo.prototype;var By=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Ly(e){let t=qi(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function qi(e){var t,r;let o=By.exec(e);return o?{year:je(o[1]),month:je(o[2],1)-1,day:je(o[3],1),hour:je(o[4]),minute:je(o[5]),second:je(o[6]),millisecond:o[7]?je(o[7].substring(0,3)):0,precision:(t=(r=o[7])==null?void 0:r.length)!=null?t:void 0,z:o[8]||void 0,plusMinus:o[9]||void 0,hourOffset:je(o[10]),minuteOffset:je(o[11])}:null}function je(e,t=0){return Number(e)||t}var _y=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,$y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ny=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Vy="^\\d{4}-\\d{2}-\\d{2}",zy="\\d{2}:\\d{2}:\\d{2}",Gy="(([+-]\\d{2}(:?\\d{2})?)|Z)",Wy=new RegExp(`${Vy}T${zy}(\\.\\d+)?${Gy}$`),Hy=e=>Fe(e)||e===e.trim(),Uy={}.toString();function pe(){return new qo}var qo=class extends ae{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(!o.spec.coerce||o.isType(t)||Array.isArray(t))return t;let n=t!=null&&t.toString?t.toString():t;return n===Uy?t:n})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Ne.required,name:"required",skipAbsent:!0,test:o=>!!o.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=he.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,r=he.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,r=he.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}matches(t,r){let o=!1,n,i;return r&&(typeof r=="object"?{excludeEmptyString:o=!1,message:n,name:i}=r:n=r),this.test({name:i||"matches",message:n||he.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&o||a.search(t)!==-1})}email(t=he.email){return this.matches(_y,{name:"email",message:t,excludeEmptyString:!0})}url(t=he.url){return this.matches($y,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=he.uuid){return this.matches(Ny,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",o,n;return t&&(typeof t=="object"?{message:r="",allowOffset:o=!1,precision:n=void 0}=t:r=t),this.matches(Wy,{name:"datetime",message:r||he.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||he.datetime_offset,params:{allowOffset:o},skipAbsent:!0,test:i=>{if(!i||o)return!0;let a=qi(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:r||he.datetime_precision,params:{precision:n},skipAbsent:!0,test:i=>{if(!i||n==null)return!0;let a=qi(i);return a?a.precision===n:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=he.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:Hy})}lowercase(t=he.lowercase){return this.transform(r=>Fe(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toLowerCase()})}uppercase(t=he.uppercase){return this.transform(r=>Fe(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>Fe(r)||r===r.toUpperCase()})}};pe.prototype=qo.prototype;var jy=e=>e!=+e;function qy(){return new Yo}var Yo=class extends ae{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!jy(t)}}),this.withMutation(()=>{this.transform((t,r,o)=>{if(!o.spec.coerce)return t;let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return o.isType(n)||n===null?n:parseFloat(n)})})}min(t,r=nt.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(t)}})}max(t,r=nt.max){return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(t)}})}lessThan(t,r=nt.lessThan){return this.test({message:r,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(o){return o<this.resolve(t)}})}moreThan(t,r=nt.moreThan){return this.test({message:r,name:"min",exclusive:!0,params:{more:t},skipAbsent:!0,test(o){return o>this.resolve(t)}})}positive(t=nt.positive){return this.moreThan(0,t)}negative(t=nt.negative){return this.lessThan(0,t)}integer(t=nt.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:r=>Number.isInteger(r)})}truncate(){return this.transform(t=>Fe(t)?t:t|0)}round(t){var r;let o=["ceil","floor","round","trunc"];if(t=((r=t)==null?void 0:r.toLowerCase())||"round",t==="trunc")return this.truncate();if(o.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+o.join(", "));return this.transform(n=>Fe(n)?n:Math[t](n))}};qy.prototype=Yo.prototype;var Lu=new Date(""),Yy=e=>Object.prototype.toString.call(e)==="[object Date]";function _u(){return new mt}var mt=class extends ae{constructor(){super({type:"date",check(t){return Yy(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,o)=>!o.spec.coerce||o.isType(t)||t===null?t:(t=Ly(t),isNaN(t)?mt.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let o;if(Ye.isRef(t))o=t;else{let n=this.cast(t);if(!this._typeCheck(n))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);o=n}return o}min(t,r=Ui.min){let o=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n>=this.resolve(o)}})}max(t,r=Ui.max){let o=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(n){return n<=this.resolve(o)}})}};mt.INVALID_DATE=Lu;_u.prototype=mt.prototype;_u.INVALID_DATE=Lu;function Ky(e,t=[]){let r=[],o=new Set,n=new Set(t.map(([a,l])=>`${a}-${l}`));function i(a,l){let s=(0,Ie.split)(a)[0];o.add(s),n.has(`${l}-${s}`)||r.push([l,s])}for(let a of Object.keys(e)){let l=e[a];o.add(a),Ye.isRef(l)&&l.isSibling?i(l.path,a):Xo(l)&&"deps"in l&&l.deps.forEach(s=>i(s,a))}return Fu.default.array(Array.from(o),r).reverse()}function Iu(e,t){let r=1/0;return e.some((o,n)=>{var i;if((i=t.path)!=null&&i.includes(o))return r=n,!0}),r}function $u(e){return(t,r)=>Iu(e,t)-Iu(e,r)}var Nu=(e,t,r)=>{if(typeof e!="string")return e;let o=e;try{o=JSON.parse(e)}catch(n){}return r.isType(o)?o:e};function Wo(e){if("fields"in e){let t={};for(let[r,o]of Object.entries(e.fields))t[r]=Wo(o);return e.setFields(t)}if(e.type==="array"){let t=e.optional();return t.innerType&&(t.innerType=Wo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Wo)}):"optional"in e?e.optional():e}var Zy=(e,t)=>{let r=[...(0,Ie.normalizePath)(t)];if(r.length===1)return r[0]in e;let o=r.pop(),n=(0,Ie.getter)((0,Ie.join)(r),!0)(e);return!!(n&&o in n)},Eu=e=>Object.prototype.toString.call(e)==="[object Object]";function Au(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(o=>r.indexOf(o)===-1)}var Qy=$u([]);function Ce(e){return new Ko(e)}var Ko=class extends ae{constructor(t){super({type:"object",check(r){return Eu(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Qy,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var o;let n=super._cast(t,r);if(n===void 0)return this.getDefault(r);if(!this._typeCheck(n))return n;let i=this.fields,a=(o=r.stripUnknown)!=null?o:this.spec.noUnknown,l=[].concat(this._nodes,Object.keys(n).filter(f=>!this._nodes.includes(f))),s={},u=Object.assign({},r,{parent:s,__validating:r.__validating||!1}),p=!1;for(let f of l){let h=i[f],m=f in n;if(h){let y,g=n[f];u.path=(r.path?`${r.path}.`:"")+f,h=h.resolve({value:g,context:r.context,parent:s});let S=h instanceof ae?h.spec:void 0,v=S==null?void 0:S.strict;if(S!=null&&S.strip){p=p||f in n;continue}y=!r.__validating||!v?h.cast(n[f],u):n[f],y!==void 0&&(s[f]=y)}else m&&!a&&(s[f]=n[f]);(m!==f in s||s[f]!==n[f])&&(p=!0)}return p?s:n}_validate(t,r={},o,n){let{from:i=[],originalValue:a=t,recursive:l=this.spec.recursive}=r;r.from=[{schema:this,value:a},...i],r.__validating=!0,r.originalValue=a,super._validate(t,r,o,(s,u)=>{if(!l||!Eu(u)){n(s,u);return}a=a||u;let p=[];for(let f of this._nodes){let h=this.fields[f];!h||Ye.isRef(h)||p.push(h.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:a}))}this.runTests({tests:p,value:u,originalValue:a,options:r},o,f=>{n(f.sort(this._sortErrors).concat(s),u)})})}clone(t){let r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),o=r.fields;for(let[n,i]of Object.entries(this.fields)){let a=o[n];o[n]=a===void 0?i:a}return r.withMutation(n=>n.setFields(o,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(o=>{var n;let i=this.fields[o],a=t;(n=a)!=null&&n.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),r[o]=i&&"getDefault"in i?i.getDefault(a):void 0}),r}setFields(t,r){let o=this.clone();return o.fields=t,o._nodes=Ky(t,r),o._sortErrors=$u(Object.keys(t)),r&&(o._excludedEdges=r),o}shape(t,r=[]){return this.clone().withMutation(o=>{let n=o._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),n=[...o._excludedEdges,...r]),o.setFields(Object.assign(o.fields,t),n)})}partial(){let t={};for(let[r,o]of Object.entries(this.fields))t[r]="optional"in o&&o.optional instanceof Function?o.optional():o;return this.setFields(t)}deepPartial(){return Wo(this)}pick(t){let r={};for(let o of t)this.fields[o]&&(r[o]=this.fields[o]);return this.setFields(r,this._excludedEdges.filter(([o,n])=>t.includes(o)&&t.includes(n)))}omit(t){let r=[];for(let o of Object.keys(this.fields))t.includes(o)||r.push(o);return this.pick(r)}from(t,r,o){let n=(0,Ie.getter)(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return Zy(i,t)&&(a=Object.assign({},i),o||delete a[t],a[r]=n(i)),a})}json(){return this.transform(Nu)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||zo.exact,test(r){if(r==null)return!0;let o=Au(this.schema,r);return o.length===0||this.createError({params:{properties:o.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=zo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let o=this.test({name:"noUnknown",exclusive:!0,message:r,test(n){if(n==null)return!0;let i=Au(this.schema,n);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return o.spec.noUnknown=t,o}unknown(t=!0,r=zo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;let o={};for(let n of Object.keys(r))o[t(n)]=r[n];return o})}camelCase(){return this.transformKeys(hr.camelCase)}snakeCase(){return this.transformKeys(hr.snakeCase)}constantCase(){return this.transformKeys(t=>(0,hr.snakeCase)(t).toUpperCase())}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);o.fields={};for(let[i,a]of Object.entries(r.fields)){var n;let l=t;(n=l)!=null&&n.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),o.fields[i]=a.describe(l)}return o}};Ce.prototype=Ko.prototype;function Xy(e){return new Zo(e)}var Zo=class extends ae{constructor(t){super({type:"array",spec:{types:t},check(r){return Array.isArray(r)}}),this.innerType=void 0,this.innerType=t}_cast(t,r){let o=super._cast(t,r);if(!this._typeCheck(o)||!this.innerType)return o;let n=!1,i=o.map((a,l)=>{let s=this.innerType.cast(a,Object.assign({},r,{path:`${r.path||""}[${l}]`}));return s!==a&&(n=!0),s});return n?i:o}_validate(t,r={},o,n){var i;let a=this.innerType,l=(i=r.recursive)!=null?i:this.spec.recursive;r.originalValue!=null&&r.originalValue,super._validate(t,r,o,(s,u)=>{var p;if(!l||!a||!this._typeCheck(u)){n(s,u);return}let f=new Array(u.length);for(let m=0;m<u.length;m++){var h;f[m]=a.asNestedTest({options:r,index:m,parent:u,parentPath:r.path,originalParent:(h=r.originalValue)!=null?h:t})}this.runTests({value:u,tests:f,originalValue:(p=r.originalValue)!=null?p:t,options:r},o,m=>n(m.concat(s),u))})}clone(t){let r=super.clone(t);return r.innerType=this.innerType,r}json(){return this.transform(Nu)}concat(t){let r=super.concat(t);return r.innerType=this.innerType,t.innerType&&(r.innerType=r.innerType?r.innerType.concat(t.innerType):t.innerType),r}of(t){let r=this.clone();if(!Xo(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+qe(t));return r.innerType=t,r.spec=Object.assign({},r.spec,{types:t}),r}length(t,r=Go.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(o){return o.length===this.resolve(t)}})}min(t,r){return r=r||Go.min,this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o.length>=this.resolve(t)}})}max(t,r){return r=r||Go.max,this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,r)=>this._typeCheck(t)?t:r==null?[]:[].concat(r))}compact(t){let r=t?(o,n,i)=>!t(o,n,i):o=>!!o;return this.transform(o=>o!=null?o.filter(r):o)}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);if(r.innerType){var n;let i=t;(n=i)!=null&&n.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),o.innerType=r.innerType.describe(i)}return o}};Xy.prototype=Zo.prototype;function Jy(e){return new Qo(e)}var Qo=class extends ae{constructor(t){super({type:"tuple",spec:{types:t},check(r){let o=this.spec.types;return Array.isArray(r)&&r.length===o.length}}),this.withMutation(()=>{this.typeError(Bu.notType)})}_cast(t,r){let{types:o}=this.spec,n=super._cast(t,r);if(!this._typeCheck(n))return n;let i=!1,a=o.map((l,s)=>{let u=l.cast(n[s],Object.assign({},r,{path:`${r.path||""}[${s}]`}));return u!==n[s]&&(i=!0),u});return i?a:n}_validate(t,r={},o,n){let i=this.spec.types;super._validate(t,r,o,(a,l)=>{var s;if(!this._typeCheck(l)){n(a,l);return}let u=[];for(let[f,h]of i.entries()){var p;u[f]=h.asNestedTest({options:r,index:f,parent:l,parentPath:r.path,originalParent:(p=r.originalValue)!=null?p:t})}this.runTests({value:l,tests:u,originalValue:(s=r.originalValue)!=null?s:t,options:r},o,f=>n(f.concat(a),l))})}describe(t){let r=(t?this.resolve(t):this).clone(),o=super.describe(t);return o.innerType=r.spec.types.map((n,i)=>{var a;let l=t;return(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[i]})),n.describe(l)}),o}};Jy.prototype=Qo.prototype;var _isStrongPassword = require('validator/lib/isStrongPassword'); var _isStrongPassword2 = _interopRequireDefault(_isStrongPassword);function ht(e){let{name:t,label:r,value:o,onChange:n,onKeyDown:i}=e,[a,l]=_react.useState.call(void 0, !1);function s(){l(!a)}return _jsxruntime.jsx.call(void 0, _material.TextField,{name:t,label:r,value:o||"",onChange:n,onKeyDown:i,type:a?"text":"password",InputProps:{endAdornment:_jsxruntime.jsx.call(void 0, _material.InputAdornment,{position:"end",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{tabIndex:-1,onClick:s,edge:"end",children:a?_jsxruntime.jsx.call(void 0, _iconsmaterial.VisibilityOff,{}):_jsxruntime.jsx.call(void 0, _iconsmaterial.Visibility,{})})})}})}var ux=_react.forwardRef.call(void 0, function(t,r){return _jsxruntime.jsx.call(void 0, _material.Slide,c({direction:"up",ref:r},t))});function yr(n){var i=n,{children:e,height:t,fullWidth:r=!0}=i,o=C(i,["children","height","fullWidth"]);return _jsxruntime.jsx.call(void 0, _material.Dialog,d(c({disableRestoreFocus:!0,fullWidth:r,TransitionComponent:ux,sx:c({"& .MuiBackdrop-root":{backgroundColor:"#6464648F"}},o==null?void 0:o.sx),PaperProps:{style:{height:t,overflow:"hidden",position:"absolute",top:"51px",margin:0}}},o),{children:_jsxruntime.jsx.call(void 0, _material.Stack,{height:"100%",position:"relative",overflow:"auto",children:e})}))}var _core = require('@toolpad/core');function Ki({children:e}){return _jsxruntime.jsx.call(void 0, _core.DialogsProvider,{children:e})}function Zi(e){let a=e,{dialogComponent:t,payload:r,label:o}=a,n=C(a,["dialogComponent","payload","label"]),i=_core.useDialogs.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Button,d(c({variant:"contained",onClick:()=>{i.open(t,r)}},n),{children:o||" Adicionar"}))}function xr(e){let t=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({component:"header",height:"44px",position:"absolute",direction:"row",top:0,left:0,right:0,display:"flex",alignItems:"center",padding:"16px",borderBottom:`solid 1px ${t.palette.grey[300]}`},e))}function vr(e){return _jsxruntime.jsx.call(void 0, _material.Typography,c({component:"h6",variant:"h6",sx:{whiteSpace:"nowrap"}},e))}function br({onClose:e}){return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:()=>e(),sx:{position:"absolute",right:"11px"},children:_jsxruntime.jsx.call(void 0, _iconsmaterial.Close,{})})}function Cr(r){var o=r,{children:e}=o,t=C(o,["children"]);return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"main",margin:"44px 0 55.75px",overflow:"auto",children:_jsxruntime.jsx.call(void 0, _material.Stack,d(c({padding:"16px"},t),{children:e}))})}function wr(e){let t=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Stack,c({component:"footer",position:"absolute",direction:"row",alignItems:"center",bottom:0,left:0,right:0,padding:"8px 16px",borderTop:`solid 1px ${t.palette.grey[300]}`,height:"48px",sx:{backgroundColor:t.palette.background.paper}},e))}function Sr(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1,marginLeft:"auto"},e))}function Qi(r){var o=r,{children:e}=o,t=C(o,["children"]);return _jsxruntime.jsx.call(void 0, $,d(c({variant:"outlined",color:"error"},t),{children:"Cancelar"}))}function Xi(o){var n=o,{children:e,label:t}=n,r=C(n,["children","label"]);return _jsxruntime.jsx.call(void 0, $,d(c({variant:"contained"},r),{children:t||"Salvar"}))}function ea({open:e,onClose:t,payload:r}){let{useRemover:o,identificador:n,qs:i}=r,{mutateAsync:a,isLoading:l}=o();function s(){return N(this,null,function*(){try{yield a({data:n,qs:i}),t()}catch(u){}})}return _jsxruntime.jsxs.call(void 0, yr,{open:e,onClose:t,children:[_jsxruntime.jsxs.call(void 0, xr,{children:[_jsxruntime.jsx.call(void 0, vr,{children:"Tem certeza de que deseja excluir este registro?"}),_jsxruntime.jsx.call(void 0, br,{onClose:t})]}),_jsxruntime.jsx.call(void 0, Cr,{children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:"O registro ser\xE1 removido permanentemente. Deseja continuar?"})}),_jsxruntime.jsx.call(void 0, wr,{children:_jsxruntime.jsxs.call(void 0, Sr,{children:[_jsxruntime.jsx.call(void 0, $,{onClick:()=>t(),sx:{minWidth:"100px"},children:"Manter registro"}),_jsxruntime.jsx.call(void 0, $,{color:"error",variant:"contained",isLoading:l,onClick:s,sx:{minWidth:"100px"},children:"Remover"})]})})]})}var Mx={Root:yr,Provider:Ki,AdicionarButton:Zi,Header:xr,Title:vr,ActionClose:br,Content:Cr,Footer:wr,Actions:Sr,ActionCancelar:Qi,ActionSalvar:Xi,ConfirmDelete:ea},G= exports.DialogV2 =Mx;function yt(e){let{isValid:t,message:r}=e,o=_material.useTheme.call(void 0, );return _jsxruntime.jsxs.call(void 0, _material.Box,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:t?"success":"inherit",sx:{fontSize:"8pt"}}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",sx:{color:t?o.palette.success.main:"inherit",textDecoration:t?"line-through":"none",ml:1,fontSize:"10pt"},children:r})]})}var qu={senhaAtual:"",senhaNova:""},Gx=Ce().shape({senhaAtual:pe().required("Informe a Senha Atual."),senhaNova:pe().required("Informe a Nova Senha.")});function Gt(e){let{isOpen:t,credentialsConfig:r,onClose:o,onSuccess:n,onFailed:i,primeiroAcesso:a,senhaAtual:l,email:s}=e,{alterarSenha:u,isSubmitting:p}=_hooks.useCredentials.call(void 0, r),{setValidationErrors:f,validationProps:h}=_hooks.useValidations.call(void 0, ),{data:m,handleChange:y,setData:g,changeValue:S}=_hooks.useForm.call(void 0, qu),[v,T]=_react.useState.call(void 0, !1),[w,P]=_react.useState.call(void 0, null);_react.useEffect.call(void 0, ()=>{l&&S("senhaAtual",l)},[l]),_react.useEffect.call(void 0, ()=>{m.senhaNova&&T(_isStrongPassword2.default.call(void 0, m.senhaNova,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1}))},[m.senhaNova]);function D(){return N(this,null,function*(){f(null),P(null),Gx.validate(m,{abortEarly:!1}).then(()=>N(this,null,function*(){var x;let{senhaAtual:R,senhaNova:B}=m;try{(yield u(R,B,s))&&(n&&n(),g(qu))}catch(b){if(i&&i(b),_axios.isAxiosError.call(void 0, b)){P((x=b.response)==null?void 0:x.data.message);return}P("Ocorreu um erro ao tentar alterar a senha")}})).catch(R=>{f(R)})})}function M(){return(m==null?void 0:m.senhaNova.length)>=8}function k(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/[a-z]/g);return Array.isArray(R)&&R.length>0}return!1}function te(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/[A-Z]/g);return Array.isArray(R)&&R.length>0}return!1}function W(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/\d/g);return Array.isArray(R)&&R.length>0}return!1}function re(){if(m!=null&&m.senhaNova){let R=m==null?void 0:m.senhaNova.match(/\W/g);return Array.isArray(R)&&R.length>0}return!1}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:R=>o(),maxWidth:"md",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:o})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:2,children:[a&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"info",children:["Voc\xEA est\xE1 acessando o sistema com uma senha tempor\xE1ria.",_jsxruntime.jsx.call(void 0, "br",{}),"Cadastre uma senha segura para deixar sua conta mais protegida."]})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ht,c({name:"senhaAtual",label:"Senha Atual",value:(m==null?void 0:m.senhaAtual)||"",onChange:y},h("senhaAtual")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, ht,c({name:"senhaNova",label:"Nova Senha",value:(m==null?void 0:m.senhaNova)||"",onChange:y},h("senhaNova")))}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{size:12,children:[_jsxruntime.jsx.call(void 0, yt,{isValid:M(),message:"O tamanho m\xEDnimo da nova senha \xE9 de 8 caracteres"}),_jsxruntime.jsx.call(void 0, yt,{isValid:k(),message:"A nova senha deve ter ao menos uma letra min\xFAscula"}),_jsxruntime.jsx.call(void 0, yt,{isValid:te(),message:"A nova senha deve ter ao menos uma letra mai\xFAscula"}),_jsxruntime.jsx.call(void 0, yt,{isValid:W(),message:"A nova senha deve ter ao menos um n\xFAmero"}),_jsxruntime.jsx.call(void 0, yt,{isValid:re(),message:"A nova senha deve ter ao menos um caracter especial"})]}),w&&_jsxruntime.jsx.call(void 0, _material.Grid2,{size:12,children:_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:w})})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>o()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Alterar Senha",onClick:D,isLoading:p,disabled:!v})]})})]})}var Zx=Ce().shape({email:pe().required("Informe o e-mail"),password:pe().required("Informe a senha")});function ta(e){let{onLoginSuccess:t,onLoginFailed:r,onOptionsClick:o,credentialsConfig:n}=e,[i,a]=_react.useState.call(void 0, ""),[l,s]=_react.useState.call(void 0, ""),[u,p]=_react.useState.call(void 0, !1),[f,h]=_react.useState.call(void 0, !1),[m,y]=_react.useState.call(void 0, !1),[g,S]=_react.useState.call(void 0, null),{login:v}=_hooks.useCredentials.call(void 0, n),{validationProps:T,setValidationErrors:w}=_hooks.useValidations.call(void 0, );function P(){return N(this,null,function*(){w(null),S(null),Zx.validate({email:i,password:l},{abortEarly:!1}).then(()=>N(this,null,function*(){var D,M;p(!0);try{let k=yield v(i,l);k&&t(k)}catch(k){if(_axios.isAxiosError.call(void 0, k)){if(((D=k.response)==null?void 0:D.data.code)==="E_FIRST_ACCESS"){h(!0);return}S((M=k.response)==null?void 0:M.data.message)}r(k)}})).catch(D=>{w(D)}).finally(()=>{p(!1)})})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"form",onSubmit:P,children:[_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"email",label:"E-mail",margin:"normal",autoFocus:!0,value:i||"",onChange:D=>a(D.target.value)},T("email"))),_jsxruntime.jsx.call(void 0, ht,c({name:"password",label:"Senha",size:"medium",placeholder:"Sua senha",value:l||"",onChange:D=>s(D.target.value),onKeyDown:D=>D.key==="Enter"&&P()},T("password"))),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:P,isLoading:u,sx:{mt:1},children:"Entrar"})]}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("esqueci-senha"),variant:"text",disableRipple:!0,disableTouchRipple:!0,sx:{justifyContent:"flex-start",alignContent:"center",alignItems:"center",textAlign:"left",width:"120px",marginTop:.5,fontWeight:"400",":hover":{}},children:"Esqueci a senha"}),g&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:g}),m&&_jsxruntime.jsxs.call(void 0, _material.Alert,{severity:"success",children:["Senha cadastrada com sucesso",_jsxruntime.jsx.call(void 0, "br",{}),"Tudo pronto para voc\xEA fazer o login"]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",justifyContent:"center",alignItems:"center",mt:2,mb:2,children:[_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,mr:1}}),_jsxruntime.jsx.call(void 0, _material.Typography,{children:"Ou fa\xE7a login com"}),_jsxruntime.jsx.call(void 0, _material.Divider,{sx:{flexGrow:1,ml:1}})]}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,children:[_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("otp-email"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Mail,{}),children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>o("otp-whatsapp"),startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.WhatsApp,{}),children:"Entrar com senha tempor\xE1ria"})]}),_jsxruntime.jsx.call(void 0, Gt,{senhaAtual:l,email:i,primeiroAcesso:!0,isOpen:f,onClose:()=>N(this,null,function*(){return h(!1)}),onSuccess:()=>{h(!1),y(!0),s("")},credentialsConfig:n})]})}var t0=Ce().shape({email:pe().required("Informe o e-mail")});function ra(e){let{onLoginClick:t,credentialsConfig:r}=e,[o,n]=_react.useState.call(void 0, ""),[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),[u,p]=_react.useState.call(void 0, null),{recuperarSenha:f}=_hooks.useCredentials.call(void 0, r),{validationProps:h,setValidationErrors:m}=_hooks.useValidations.call(void 0, );function y(){return N(this,null,function*(){m(null),t0.validate({email:o},{abortEarly:!1}).then(()=>N(this,null,function*(){var g;try{a(!0),yield f(o),s(!0)}catch(S){p((g=S.response)==null?void 0:g.data.message)}finally{a(!1)}})).catch(g=>{m(g)})})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",children:[_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"email",label:"E-mail",margin:"normal",placeholder:"Informe o e-mail utilizado para acessar o sistema",autoFocus:!0,value:o||"",onChange:g=>n(g.target.value)},h("email"))),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:y,isLoading:i,children:"Recuperar minha senha"}),_jsxruntime.jsx.call(void 0, we,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:_jsxruntime.jsx.call(void 0, $,{onClick:t,variant:"text",sx:{fontWeight:"400",":hover":{color:g=>g.palette.primary.dark}},children:"Voltar para o Login"})}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"success",action:_jsxruntime.jsx.call(void 0, $,{onClick:t,variant:"text",sx:{fontWeight:"400",":hover":{color:g=>g.palette.primary.dark}},children:"Ir para o Login"}),children:"Enviamos para o seu e-mail as instru\xE7\xF5es para recuperar a sua senha"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function na(e){var p;let{loginData:t,credentialsConfig:r,onLoginFailed:o,onLoginSuccess:n}=e,[i,a]=_react.useState.call(void 0, ""),{selecionarLicenca:l,isSubmitting:s}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{if(Array.isArray(t==null?void 0:t.empresas)){let f=t==null?void 0:t.empresas[0];a(f==null?void 0:f.uuid)}},[t]);function u(){return N(this,null,function*(){try{let f=yield l(t==null?void 0:t.token,i);f?n(f):o("Nenhuma token definida")}catch(f){o(f)}})}return _jsxruntime.jsxs.call(void 0, _material.Box,{component:"form",sx:{minWidth:"290px"},children:[_jsxruntime.jsx.call(void 0, _material.TextField,{label:"Licen\xE7as",margin:"normal",select:!0,autoFocus:!0,value:i,onChange:f=>{a(f.target.value)},children:(p=t==null?void 0:t.empresas)==null?void 0:p.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f.uuid,children:f.nome},f.uuid))}),_jsxruntime.jsx.call(void 0, $,{fullWidth:!0,variant:"contained",onClick:u,isLoading:s,sx:{mt:1},children:"Confirmar"})]})}var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);var Qu=e=>{let t=e.replace(/\D/g,"");return t.length<=2?`(${t}`:t.length<=7?`(${t.slice(0,2)}) ${t.slice(2)}`:t.length<=11?`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7)}`:`(${t.slice(0,2)}) ${t.slice(2,7)}-${t.slice(7,11)}`};function Tr(e){let u=e,{value:t,onChange:r}=u,o=C(u,["value","onChange"]),[n,i]=_react.useState.call(void 0, ""),a=t!==void 0,l=_react.useMemo.call(void 0, ()=>a?Qu(t||""):n,[t,n,a]);return _jsxruntime.jsx.call(void 0, _TextField2.default,c({value:l,onChange:p=>{let f=Qu(p.target.value);if(a||i(f),r){let h=d(c({},p),{target:d(c({},p.target),{value:f})});r(h)}},inputProps:{maxLength:15}},o))}function kr({length:e=6,value:t,onChange:r}){let o=_react.useRef.call(void 0, []),n=(a,l)=>{var h;let s="ABCDEF0123456789",u=l.toUpperCase().split("").find(m=>s.includes(m))||"",p=t.split("");p[a]=u;let f=p.join("");r(f),u&&a<e-1&&((h=o.current[a+1])==null||h.focus())},i=(a,l)=>{var s;l.key==="Backspace"&&!t[a]&&a>0&&((s=o.current[a-1])==null||s.focus())};return _jsxruntime.jsx.call(void 0, _material.Box,{display:"flex",gap:1,children:Array.from({length:e}).map((a,l)=>_jsxruntime.jsx.call(void 0, _material.TextField,{autoFocus:l===0,inputRef:s=>o.current[l]=s,slotProps:{htmlInput:{maxLength:1,style:{textAlign:"center",fontSize:"24px",width:"24px",height:"36px"}}},value:t[l]||"",onChange:s=>n(l,s.target.value),onKeyDown:s=>i(l,s)},l))})}function aa(e){let{open:t,onClose:r,payload:o,onLoginSuccess:n,credentialsConfig:i}=e,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),{validarOtpVerificationCode:h}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function m(){return N(this,null,function*(){try{f(!0);let y=yield h({channel:o.channel,target:o.target,code:a});y&&n(y),r()}catch(y){u(y.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:y=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Entrar com senha tempor\xE1ria"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Digite a senha tempor\xE1ria para acessar sua conta"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos uma senha tempor\xE1ria para ",_jsxruntime.jsx.call(void 0, "b",{children:o.target}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para acessar sua conta."]}),_jsxruntime.jsx.call(void 0, kr,{value:a,onChange:y=>{l(y)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Entrar",onClick:m,isLoading:p,disabled:a.length!=6})]})})]})}var E0=Ce().shape({contato:pe().when("$tipo",([e],t)=>e==="otp-email"?t.email("E-mail inv\xE1lido").required("Informe o e-mail"):t.matches(/^\+?[1-9]\d{7,14}$/,"N\xFAmero de WhatsApp inv\xE1lido").required("Informe o WhatsApp"))});function rn(e){let{tipo:t,credentialsConfig:r,onLoginSuccess:o,onLoginClick:n}=e,[i,a]=_react.useState.call(void 0, !1),[l,s]=_react.useState.call(void 0, !1),{gerarOtpVerificationCode:u}=_hooks.useCredentials.call(void 0, r),{handleChange:p,changeValue:f,data:h,validate:m,validationErrors:y}=_hooks.useForm.call(void 0, {contato:""},E0),[g,S]=_react.useState.call(void 0, !1);return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "form",{onSubmit:T=>N(this,null,function*(){T.preventDefault(),m(w=>N(this,null,function*(){try{s(!1),a(!0);let P=yield u({channel:t==="otp-email"?"email":"whatsapp",target:w.contato});S(!0)}catch(P){s(P.response.data.message)}finally{a(!1)}}),{context:{tipo:t}})}),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",children:t==="otp-email"?" Informe seu e-mail para receber um c\xF3digo de acesso":"Informe seu n\xFAmero de WhatsApp para receber um c\xF3digo de acesso"}),t==="otp-email"&&_jsxruntime.jsx.call(void 0, _material.TextField,c({autoFocus:!0,name:"contato",label:"E-mail",value:h.contato||"",onChange:p,fullWidth:!0},y("contato"))),t==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, Tr,c({autoFocus:!0,name:"contato",label:"Whatsapp",value:h.contato||"",onChange:T=>{f("contato",T.target.value.replace(/[^\d+]/g,""))},fullWidth:!0},y("contato"))),_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, $,{isLoading:i,type:"submit",variant:"contained",color:"primary",children:"Enviar c\xF3digo"}),_jsxruntime.jsxs.call(void 0, we,{sx:{display:"inline-flex",justifyContent:"space-between",width:"100%",marginTop:1},children:[_jsxruntime.jsx.call(void 0, $,{onClick:n,variant:"text",sx:{fontWeight:"400",":hover":{color:T=>T.palette.primary.dark}},children:"Voltar para o Login"}),_jsxruntime.jsx.call(void 0, "a",{href:"https://datacsistemashelp.zendesk.com/hc/pt-br/articles/36489079108756-Login-OTP-via-WhatsApp",target:"_blank",rel:"noopener noreferrer",children:_jsxruntime.jsx.call(void 0, _material.IconButton,{children:_jsxruntime.jsx.call(void 0, _iconsmaterial.HelpOutline,{color:"primary"})})})]})]}),l&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:l})]})}),_jsxruntime.jsx.call(void 0, aa,{onLoginSuccess:o,open:g,onClose:T=>N(this,null,function*(){S(!1)}),payload:{target:h.contato,channel:t==="otp-email"?"email":"whatsapp"},credentialsConfig:r})]})}var L0={login:"Acesse sua conta",licensa:"Selecione a licen\xE7a","esqueci-senha":"Recupere a sua senha","otp-email":"Entrar com senha tempor\xE1ria (E-mail)","otp-whatsapp":"Entrar com senha tempor\xE1ria (WhatsApp)"};function la(e){let{credentialsConfig:t,onLoginSuccess:r,onLoginFailed:o,onAlreadyLogged:n,appName:i}=e,[a,l]=_react.useState.call(void 0, ),{selecionarLicenca:s,isAuthenticated:u}=_hooks.useCredentials.call(void 0, t),[p,f]=_react.useState.call(void 0, "login"),h=_material.useTheme.call(void 0, ),m=_material.useMediaQuery.call(void 0, h.breakpoints.up("md"));_react.useEffect.call(void 0, ()=>{u&&n&&n()},[u]);function y(w){return N(this,null,function*(){try{if(Array.isArray(w==null?void 0:w.empresas)){if((w==null?void 0:w.empresas.length)===1){let P=yield s(w==null?void 0:w.token,w.empresas[0].uuid);P&&r(P);return}f("licensa"),l(w);return}r(w)}catch(P){o(P)}})}function g(w){return N(this,null,function*(){o(w)})}function S(w){f(w)}function v(){f("login")}let T=L0[p];return _jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, $i,{label:i,subTitle:T}),_jsxruntime.jsxs.call(void 0, _material.Box,{sx:{marginTop:2},children:[p==="login"&&_jsxruntime.jsx.call(void 0, ta,{credentialsConfig:t,onLoginSuccess:y,onLoginFailed:g,onOptionsClick:S}),p==="licensa"&&_jsxruntime.jsx.call(void 0, na,{loginData:a,credentialsConfig:t,onLoginSuccess:r,onLoginFailed:o}),p==="esqueci-senha"&&_jsxruntime.jsx.call(void 0, ra,{onLoginClick:v,credentialsConfig:t}),p==="otp-email"&&_jsxruntime.jsx.call(void 0, rn,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-email",credentialsConfig:t}),p==="otp-whatsapp"&&_jsxruntime.jsx.call(void 0, rn,{onLoginClick:v,onLoginSuccess:y,tipo:"otp-whatsapp",credentialsConfig:t})]})]})}function ua(){let e=_material.useTheme.call(void 0, ),t=_material.useMediaQuery.call(void 0, e.breakpoints.up("md"));return _jsxruntime.jsx.call(void 0, _material.Stack,{component:"section",display:t?"flex":"none",width:"100%",direction:"row",justifyContent:"center",alignItems:"center",sx:{backgroundImage:"url(https://datac-site-assets.s3.sa-east-1.amazonaws.com/background_login.png)",backgroundSize:"cover",backgroundPosition:"right",backgroundRepeat:"no-repeat"},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h1",fontSize:"3.5rem",lineHeight:"4rem",fontWeight:"bold",color:"white",fontFamily:"Montserrat",letterSpacing:0,children:"Inova\xE7\xE3o e tecnologia"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"h2",color:"white",fontSize:"2.5rem",lineHeight:"3rem",letterSpacing:0,fontWeight:"bold",fontFamily:"Montserrat",children:"para empresas de resultado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{component:"span",fontSize:"1.25rem",lineHeight:"1.25rem",fontWeight:"300",letterSpacing:0,marginTop:"1.5rem",marginBottom:"3rem",fontFamily:"Montserrat",sx:{color:"rgb(68, 167, 255)"},children:"Mais de 25 anos de exist\xEAncia e muitas hist\xF3rias de sucesso."}),_jsxruntime.jsx.call(void 0, _material.Link,{href:"https://site.datac.com.br/services/",target:"_blank",children:_jsxruntime.jsxs.call(void 0, $,{component:"a",variant:"text",sx:{width:"fit-content",color:"rgb(255, 255, 255)",fontWeight:"400",fontSize:"0.875rem",lineHeight:"1.125rem",fontFamily:"Montserrat",backgroundColor:"rgb(22, 23, 101)",borderRadius:"30px",padding:"17px 48px",":hover":{backgroundColor:"rgb(255, 255, 255)",color:"rgb(22, 23, 101)"},alignItems:"center"},children:["Conhe\xE7a nossos produtos",_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowRight,{fontSize:"medium",sx:{color:r=>r.palette.success.light}})]})})]})})}function H0({children:e}){let t=_material.useTheme.call(void 0, ),r=_material.useMediaQuery.call(void 0, t.breakpoints.up("md"));return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"section",width:r?"46%":"100%",minWidth:"420px",maxWidth:r?"614px":"initial",justifyContent:"center",alignItems:"center",padding:"2rem",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",maxWidth:"28rem",margin:"auto 0",children:e}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",marginBottom:-3,children:[_jsxruntime.jsx.call(void 0, "img",{width:"60",src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/logomarca.png"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",component:"span",fontSize:"0.7rem",sx:{color:o=>o.palette.grey[500]},children:"Data C Sistemas"})]})]})}function ip(e){let{banner:t,loginSection:r}=e;return _jsxruntime.jsxs.call(void 0, _material.Stack,{component:"main",direction:"row",height:"100vh",children:[t?_jsxruntime.jsx.call(void 0, _i,{children:t}):_jsxruntime.jsx.call(void 0, ua,{}),_jsxruntime.jsx.call(void 0, H0,{children:r||_jsxruntime.jsx.call(void 0, la,c({},e))})]})}function fa(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",alignContent:"center",spacing:1,flex:1,flexGrow:1},e))}function da({children:e}){return _jsxruntime.jsx.call(void 0, ci.default.Fragment,{children:_jsxruntime.jsx.call(void 0, _material.AppBar,{position:"fixed",elevation:0,sx:{width:"100%",zIndex:t=>t.zIndex.drawer+1,borderBottom:t=>`1px solid ${t.palette.grey[300]}`},children:_jsxruntime.jsx.call(void 0, _material.Toolbar,{children:_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"100%"},direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",children:e})})})})}function ma(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 5v14"}),_jsxruntime.jsx.call(void 0, "path",{d:"M21 5v14"})]})}))}function ga(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"}),_jsxruntime.jsx.call(void 0, "path",{d:"m4.9 4.9 14.2 14.2"})]})}))}function ya(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"20",height:"5",x:"2",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 12h4"})]})}))}function Er(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function ba(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9-9-1.8-9-9 1.8-9 9-9"})})}))}function Ca(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Sa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17-5-5 5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m18 17-5-5 5-5"})]})}))}function Ta(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"3"})]})}))}function ka(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"3",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"14",y:"3",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"9",x:"14",y:"12",rx:"1"}),_jsxruntime.jsx.call(void 0, "rect",{width:"7",height:"5",x:"3",y:"16",rx:"1"})]})}))}function Ia(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 9H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 13H8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 17H8"})]})}))}function Mr(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m6 9 6 6 6-6"})})}))}function Aa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21H7"}),_jsxruntime.jsx.call(void 0, "path",{d:"m5 11 9 9"})]})}))}var vv=e=>({transition:e.transitions.create(["transform"],{duration:500})}),bv=_styles.styled.call(void 0, Mr,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>c(c(c({},vv(e)),t&&{transform:"rotate(-180deg)"}),!t&&{transform:"rotate(0)"}));function Fa(e){let{open:t}=e;return _jsxruntime.jsx.call(void 0, bv,{fontSize:"small",open:t})}function Ma(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 6h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 12h10"}),_jsxruntime.jsx.call(void 0, "path",{d:"M10 18h4"})]})}))}function Ra(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 20a6 6 0 0 0-12 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"4"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"12",r:"10"})]})}))}function Da(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function Oa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 17h.01"})]})}))}function Ba(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3v5h5"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v5l4 2"})]})}))}function La(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 7v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 7v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 7v9"})]})}))}function _a(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),_jsxruntime.jsx.call(void 0, "polyline",{points:"16 17 21 12 16 7"}),_jsxruntime.jsx.call(void 0, "line",{x1:"21",x2:"9",y1:"12",y2:"12"})]})}))}function Na(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"white",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"12",cy:"10",r:"3"})]})}))}function Va(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 5.764v15"}),_jsxruntime.jsx.call(void 0, "path",{d:"M9 3.236v15"})]})}))}function za(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"12",y2:"12"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"6",y2:"6"}),_jsxruntime.jsx.call(void 0, "line",{x1:"4",x2:"20",y1:"18",y2:"18"})]})}))}function Ga(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m11 17 2 2a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 3 1 11h-2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 4h8"})]})}))}function Ha(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m6 17 5-5-5-5"}),_jsxruntime.jsx.call(void 0, "path",{d:"m13 17 5-5-5-5"})]})}))}function ja(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor"})]})}))}function Ya(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"11",cy:"11",r:"8"}),_jsxruntime.jsx.call(void 0, "path",{d:"m21 21-4.3-4.3"})]})}))}function Ka(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M2 7h20"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 7v3a2 2 0 0 1-2 2a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12a2 2 0 0 1-2-2V7"})]})}))}function Za(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M17 22h-1a4 4 0 0 1-4-4V6a4 4 0 0 1 4-4h1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 22h1a4 4 0 0 0 4-4v-1"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 2h1a4 4 0 0 1 4 4v1"})]})}))}function Qa(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),_jsxruntime.jsx.call(void 0, "circle",{cx:"9",cy:"7",r:"4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]})}))}function Ja(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17"}),_jsxruntime.jsx.call(void 0, "path",{d:"m10 15 5-3-5-3z"})]})}))}function es(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M12 17V3"}),_jsxruntime.jsx.call(void 0, "path",{d:"m6 11 6 6 6-6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M19 21H5"})]})}))}function ts(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"22",y2:"22"}),_jsxruntime.jsx.call(void 0, "line",{x1:"6",x2:"6",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"10",x2:"10",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"14",x2:"14",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "line",{x1:"18",x2:"18",y1:"18",y2:"11"}),_jsxruntime.jsx.call(void 0, "polygon",{points:"12 2 20 7 4 7"})]})}))}function rs(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"})]})}))}function os(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"16",cy:"16",r:"6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 14v2l1 1"})]})}))}function ns(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M13.22 2.416a2 2 0 0 0-2.511.057l-7 5.999A2 2 0 0 0 3 10v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7.354"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}),_jsxruntime.jsx.call(void 0, "path",{d:"M15 6h6"}),_jsxruntime.jsx.call(void 0, "path",{d:"M18 3v6"})]})}))}function is(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}),_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"9",y2:"9"}),_jsxruntime.jsx.call(void 0, "line",{x1:"3",x2:"21",y1:"15",y2:"15"}),_jsxruntime.jsx.call(void 0, "line",{x1:"9",x2:"9",y1:"9",y2:"21"}),_jsxruntime.jsx.call(void 0, "line",{x1:"15",x2:"15",y1:"9",y2:"21"})]})}))}function ss(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m15 18-6-6 6-6"})})}))}function cs(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:_jsxruntime.jsx.call(void 0, "path",{d:"m9 18 6-6-6-6"})})}))}function us(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M8 2v4"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 2v4"}),_jsxruntime.jsx.call(void 0, "rect",{width:"18",height:"18",x:"3",y:"4",rx:"2"}),_jsxruntime.jsx.call(void 0, "path",{d:"M3 10h18"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 14h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M8 18h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M12 18h.01"}),_jsxruntime.jsx.call(void 0, "path",{d:"M16 18h.01"})]})}))}function ps(e){return _jsxruntime.jsx.call(void 0, _material.SvgIcon,d(c({},e),{children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}),_jsxruntime.jsx.call(void 0, "path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}),_jsxruntime.jsx.call(void 0, "path",{d:"M7 3v4a1 1 0 0 0 1 1h7"})]})}))}var wb={Circle:ba,Dashboard:ka,Expandable:Fa,Down:Mr,Negociacao:Ga,Cadastro:ya,Clientes:Ca,Filter:Ma,Search:Ya,ChevronDown:Er,Kanban:La,Erease:Aa,BarCode:ma,TextCursor:Za,OpenPanel:Ha,ClosePanel:Sa,Menu:za,Configs:Ta,Users:Qa,Password:ja,Logout:_a,History:Ba,Help:Oa,Video:Ja,Docs:Ia,Block:ga,Maps:Va,MapPin:Na,HandShake:Da,Store:Ka,Download:es,ContaBancaria:ts,GrupoLancamento:rs,HistoricoPadrao:os,Imovel:ns,Lancamento:is,ChevronLeft:ss,ChevronRight:cs,Calendar:us,Save:ps,Profile:Ra},ye= exports.Icon =wb;function fs(e){let t=C(e,[]);return _jsxruntime.jsx.call(void 0, _material.IconButton,d(c({},t),{children:_jsxruntime.jsx.call(void 0, ye.Menu,{})}))}var Pb={Root:da,Content:fa,ToggleMenu:fs},Tb= exports.Header =Pb;var Bb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:e})=>({height:"32px",cursor:"pointer",gap:e.spacing(2),transition:"0.2s ease-in-out",padding:`${e.spacing(.25)} ${e.spacing(2)} ${e.spacing(.25)} ${e.spacing(2)}`,"&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{fontSize:"0.805rem",color:e.palette.text.primary},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function ds({label:e,icon:t,visible:r=!0,children:o,selected:n=!1,onClick:i,link:a}){if(!r)return null;let[l,s]=_react.useState.call(void 0, !1),u=!!o;function p(){if(u){s(h=>!h);return}i&&a&&i(a)}function f(h){return typeof t=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:t}):h||_jsxruntime.jsx.call(void 0, ye.Circle,{})}return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, Bb,{selected:n,disableGutters:!0,onClick:h=>{h.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:f(t)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:e}),u&&_jsxruntime.jsx.call(void 0, ye.Expandable,{open:l})]})}),u&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, _material.List,{sx:{"& .MuiListItemButton-root":{paddingLeft:4},"& .MuiList-root > .MuiListItem-root > .MuiListItemButton-root":{paddingLeft:6},"& .MuiList-root > .MuiList-root > .MuiListItemButton-root":{paddingLeft:12}},disablePadding:!0,children:o})})]})}var jb=_material.styled.call(void 0, _material.ListItemButton,{})(({theme:e})=>({cursor:"pointer",padding:`${e.spacing(1)} ${e.spacing(0)} ${e.spacing(.25)} ${e.spacing(0)}`,minHeight:"32px",flexDirection:"column",justifyContent:"center",alignItem:"center",alignContent:"center","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiSvgIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"},"& .MuiIcon-root":{color:e.palette.primary.main,transition:"0.2s ease-in-out"}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiSvgIcon-root":{fontSize:"0.955rem"},"& .MuiTypography-root":{fontSize:"0.805rem",color:e.palette.text.primary},"& .MuiListItemIcon-root":{minWidth:"0px"}}));function lp(e,t){return ci.default.Children.map(e,r=>{var n;if(!ci.default.isValidElement(r))return r;let o=(n=r.props)!=null&&n.children?lp(r.props.children,t):null;return ci.default.cloneElement(r,{open:t,children:o})})}function hs(e){let{icon:t,label:r,link:o,id:n,selected:i=!1,children:a,onClick:l}=e,[s,u]=_react.useState.call(void 0, null);function p(){l&&o&&l(o)}function f(g,S){u({element:g.currentTarget,id:S})}function h(){u(null)}let m=lp(a,!0);function y(g){return typeof t=="string"?_jsxruntime.jsx.call(void 0, _material.Icon,{children:t}):g||_jsxruntime.jsx.call(void 0, ye.Circle,{})}return _jsxruntime.jsx.call(void 0, _material.ListItem,{disableGutters:!0,disablePadding:!0,children:_jsxruntime.jsxs.call(void 0, jb,{selected:i,onMouseEnter:g=>{o||f(g,n)},onMouseLeave:()=>{o||h()},disableGutters:!0,onClick:g=>{g.stopPropagation(),p()},children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:y(t)}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:_lodash2.default.truncate(r,{length:12})}),(s==null?void 0:s.id)===n&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:s==null?void 0:s.element,open:!!(s!=null&&s.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, Pt,{elevation:1,sx:{position:"relative","&::before":{content:'""',position:"absolute",left:-8,width:"1.2rem",height:"1.2rem",backgroundImage:'url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiM4MDgwODAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1waW4tc2FmZXR5LW9wZW4iPjxwYXRoIGQ9Ik0yMC44IDMuMmMtMS42LTEuNi00LjEtMS42LTUuNyAwTDEyLjMgNlMxNSA5IDE4IDZjLTMgMyAwIDUuNyAwIDUuN2wyLjgtMi44YzEuNi0xLjYgMS42LTQuMiAwLTUuNyIvPjxwYXRoIGQ9Im03LjEgMjEuMSAxMC4zLTEwLjIiLz48Y2lyY2xlIGN4PSI1IiBjeT0iMTkiIHI9IjMiLz48cGF0aCBkPSJNOSAycy00LjEgOS41LTYuNzU1IDE1LjgiLz48L3N2Zz4=")',backgroundSize:"contain",backgroundRepeat:"no-repeat",transition:"transform 0.2s ease-in-out"},p:1,width:g=>{var S;return(S=g.mixins.menu)==null?void 0:S.width}},children:m})})]})})}function gs(e){let n=e,{open:t,isFirstLevel:r=!1}=n,o=C(n,["open","isFirstLevel"]);return t?_jsxruntime.jsx.call(void 0, ds,c({},o)):_jsxruntime.jsx.call(void 0, hs,c({},o))}var up=e=>{var t,r;return{width:((r=(t=e==null?void 0:e.mixins)==null?void 0:t.menu)==null?void 0:r.width)||64,background:"#FFFFFF",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},pp=e=>({background:"#FFFFFF",transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:0,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(12)} + 1px)`}}),Zb=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:e=>e!=="open"})(({theme:e,open:t})=>{var r,o;return c(c({width:((o=(r=e==null?void 0:e.mixins)==null?void 0:r.menu)==null?void 0:o.width)||64,borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},t&&d(c({},up(e)),{"& .MuiDrawer-paper":up(e)})),!t&&d(c({},pp(e)),{"& .MuiDrawer-paper":pp(e)}))}),Qb=_styles.styled.call(void 0, "div")(({theme:e})=>e.mixins.toolbar);function mp(e,t,r,o){return ci.default.Children.map(e,n=>{var f,h;if(!ci.default.isValidElement(n))return n;let i=((f=n.props.link)==null?void 0:f.split("/").filter(Boolean))||[],a=n.props.link||"",u="/"+((t==null?void 0:t.split("/").filter(Boolean))||[]).slice(0,i.length).join("/"),p=(h=n.props)!=null&&h.children?mp(n.props.children,t,r,o):null;return ci.default.cloneElement(n,{open:r,selected:u===a,onClick:m=>{o&&o(m)},children:p})})}function xs(e){let{open:t,toggleMenu:r,children:o,onClickItem:n}=e,a=new URL(window.location.href).pathname,l=mp(o,a,t,n);return _jsxruntime.jsxs.call(void 0, Zb,{variant:"permanent",open:t,onClose:r,children:[_jsxruntime.jsx.call(void 0, Qb,{}),_jsxruntime.jsx.call(void 0, _material.List,{children:l})]})}function Jb(e){return e.map(t=>t.visible?_jsxruntime.jsx.call(void 0, hp.Item,{link:t.link,id:t.id,label:t.label,icon:t.icon,children:t.items&&Jb(t.items)},t.id):null)}var hp={Root:xs,Item:gs},eC= exports.Menu =hp;function gp(e){let{links:t}=e;function r(o,n){location.pathname}return _jsxruntime.jsx.call(void 0, _material.Breadcrumbs,{sx:{height:"30px",display:"flex",textWrap:"nowrap"},children:t.map((o,n)=>t.length===1||t.length===n+1?_jsxruntime.jsx.call(void 0, _material.Typography,{sx:{fontSize:"10pt",fontWeight:"bolder"},variant:"subtitle1",color:"black",children:o.label},o.link):_jsxruntime.jsx.call(void 0, _material.Button,{variant:"text",children:o.label},o.link))})}function bs(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, _material.Stack,{pl:1,pr:1,pt:.5,pb:.5,direction:"row",alignContent:"center",alignItems:"center",justifyContent:"space-between",spacing:1,children:t})}var sC={Root:bs},lC= exports.ContentTitle =sC;var cC=process.env.NODE_ENV==="production",Cs="Invariant failed";function ws(e,t){if(!e){if(cC)throw new Error(Cs);var r=typeof t=="function"?t():t,o=r?"".concat(Cs,": ").concat(r):Cs;throw new Error(o)}}var _uuid = require('uuid');function dC(e,t){var r,o;switch(t.type){case"loadFiltersFromStorage":return d(c({},e),{filterValues:(r=t==null?void 0:t.storageValues)==null?void 0:r.filterValues,appliedValues:(o=t==null?void 0:t.storageValues)==null?void 0:o.appliedValues});case"updateFilterValues":return d(c({},e),{filterValues:t.filterValues});case"updateFilterValue":return d(c({},e),{filterValues:d(c({},e.filterValues),{[t.payload.name]:t.payload.value})});case"updateAppliedValues":let n=e.filterValues,i=[];if(n&&Object.entries(n).length>0){let[a]=Object.keys(n);i=[{[a]:n[a]}]}return t!=null&&t.storagePath&&localStorage.setItem(t.storagePath,JSON.stringify({appliedValues:n,filterValuesAsArray:i,filterValues:e.filterValues})),d(c({},e),{appliedValues:n,filterValuesAsArray:i,isOpen:!1,searchId:_uuid.v4.call(void 0, )});case"updateIsOpen":return d(c({},e),{isOpen:t.isOpen,target:t.target});case"updateContainer":return d(c({},e),{container:t.container});case"toggleIsOpen":return d(c({},e),{isOpen:!e.isOpen});case"deleteAppliedValue":return delete e.appliedValues[t.filterName],c({},e);case"deleteAllAppliedValues":return e.appliedValues={},e.filterValues=t.filterValues,t.storagePath&&localStorage.removeItem(t.storagePath),c({},e)}}var Cp=ci.default.createContext({}),wp= exports.FilterApiContext =ci.default.createContext({});function Sp(e){let{children:t,filterValues:r={},storagePath:o}=e,[n,i]=_react.useReducer.call(void 0, dC,{filterValues:{}});_react.useEffect.call(void 0, ()=>{i({type:"updateFilterValues",filterValues:r}),i({type:"updateAppliedValues",storagePath:o})},[r]),_react.useEffect.call(void 0, ()=>{if(o){let l=localStorage.getItem(o);if(l&&l!=="undefined"){let s=JSON.parse(l);i({type:"loadFiltersFromStorage",storageValues:s})}}},[]);let a=_react.useMemo.call(void 0, ()=>{function l(v){i({type:"updateIsOpen",isOpen:!0,target:(v==null?void 0:v.target)||void 0})}function s(){i({type:"updateIsOpen",isOpen:!1,target:void 0})}function u(){i({type:"toggleIsOpen"})}function p(v){let T=v.target.type,w=v.target.name,P;switch(T){case"text":P=v.target.value;break;case"checkbox":P=v.target.checked;break;default:P=v.target.value}i({type:"updateFilterValue",payload:{name:w,value:P}})}function f(v,T){i({type:"updateFilterValue",payload:{name:v,value:T}})}function h(v){i({type:"updateFilterValues",filterValues:v})}function m(){i({type:"updateAppliedValues",storagePath:o})}function y(v){i({type:"deleteAppliedValue",filterName:v})}function g(){i({type:"deleteAllAppliedValues",filterValues:r,storagePath:o}),i({type:"updateAppliedValues",storagePath:o})}function S(v){i({type:"updateContainer",container:v})}return{setContainer:S,openFilter:l,closeFilter:s,onChangeFilterValue:p,changeFilterValue:f,changeFilterValues:h,applyFilterValues:m,deleteFilterValue:y,deleteAllFilterValues:g,toggleFilter:u}},[r]);return _jsxruntime.jsx.call(void 0, wp.Provider,{value:a,children:_jsxruntime.jsx.call(void 0, Cp.Provider,{value:n,children:t})})}function vn(){let e=_react.useContext.call(void 0, Cp);return ws(e,"cannot find FilterDataContext provider"),e}function Ee(){let e=_react.useContext.call(void 0, wp);return ws(e,"cannot find FilterApiContextContext provider"),e}function Ss(){let{openFilter:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.IconButton,{onClick:t=>e(t),children:_jsxruntime.jsx.call(void 0, ye.Filter,{})})}function Ts(e){let{children:t}=e,{isOpen:r,container:o}=vn(),{closeFilter:n}=Ee(),i=(o==null?void 0:o.getBoundingClientRect().width)||300;return _jsxruntime.jsx.call(void 0, _material.Popover,{elevation:0,open:r,onClose:n,anchorEl:o,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{"& .MuiPopover-paper":{width:`${i}px`,border:a=>`1px solid ${a.palette.border}`,borderRadius:"4px",pt:2,pl:1,pr:1,pb:1}},children:_jsxruntime.jsx.call(void 0, _material.Box,{mt:1,mb:1,children:_jsxruntime.jsx.call(void 0, _material.Stack,{spacing:1,children:t})})})}function ks({children:e}){let t=_react.useRef.call(void 0, null),{setContainer:r}=Ee();return _react.useEffect.call(void 0, ()=>{let o=()=>{t.current&&r(t.current)};return o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]),_jsxruntime.jsxs.call(void 0, _material.Stack,{ref:t,direction:"row",alignContent:"center",alignItems:"center",spacing:1,children:[_jsxruntime.jsx.call(void 0, ye.Search,{sx:{fontSize:"0.95rem"}}),_jsxruntime.jsx.call(void 0, _material.Stack,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",alignContent:"center",children:e})]})}function Is(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, _material.Box,{sx:{border:r=>`1px solid ${r.palette.border}`,borderRadius:"90px",flexGrow:1,pl:1,pr:1},children:t})}function Es(e){let i=e,{onChange:t}=i,r=C(i,["onChange"]),o=_lodash2.default.debounce(a=>t(a),500);function n(a){let l=a.target.value;o(l)}return _jsxruntime.jsx.call(void 0, _material.InputBase,c({onChange:n},r))}function Fs(){let{applyFilterValues:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:()=>{e()},children:_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:.5,alignItems:"center",children:[_jsxruntime.jsx.call(void 0, ye.Search,{sx:{fontSize:"0.855rem"}})," ",_jsxruntime.jsx.call(void 0, "span",{children:"Pesquisar"})]})})}function Ms(){let{deleteAllFilterValues:e}=Ee();return _jsxruntime.jsx.call(void 0, _material.Button,{color:"error",onClick:()=>{e&&e()},children:"Resetar"})}function Rs({children:e}){return _jsxruntime.jsx.call(void 0, _material.Stack,{pt:2,direction:"row",spacing:1,justifyContent:"flex-end",children:e})}function Bs({children:e}){let{appliedValues:t}=vn(),{applyFilterValues:r,deleteFilterValue:o}=Ee(),{isOpen:n,open:i,close:a,anchorEl:l,data:s}=_hooks.usePopover.call(void 0, ),u=ci.default.Children.map(e,p=>!ci.default.isValidElement(p)||!(t&&p.props.name in t)?null:ci.default.cloneElement(p,{onDelete:p.props.disabledDelete?void 0:h=>{o&&o(p.props.name||""),a()},onClick:h=>{i(h,{target:h.currentTarget,element:p.props.children,name:p.props.name,disabledDelete:p.props.disabledDelete||!1})}}));return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,children:[u,_jsxruntime.jsxs.call(void 0, _material.Popover,{open:!!n||!1,onClose:()=>a(),anchorEl:l,elevation:0,sx:{"& .MuiPopover-paper":{minWidth:"300px",border:p=>`1px solid ${p.palette.border}`,borderRadius:"4px",pt:2,pl:1,pr:1,pb:2}},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[s==null?void 0:s.element,_jsxruntime.jsxs.call(void 0, _material.Stack,{pt:2,direction:"row",spacing:.5,justifyContent:"flex-end",children:[!(s!=null&&s.disabledDelete)&&_jsxruntime.jsx.call(void 0, _material.Button,{color:"error",onClick:()=>{o&&o((s==null?void 0:s.name)||""),a()},children:"Apagar"}),_jsxruntime.jsx.call(void 0, _material.Button,{variant:"contained",onClick:()=>{a(),r()},children:"Aplicar"})]})]})]})}function Ls(e){let n=e,{children:t,disabledDelete:r=!1}=n,o=C(n,["children","disabledDelete"]);return _jsxruntime.jsx.call(void 0, _material.Chip,c({},o))}var _C={Root:Is,SearchTextField:Es,Container:ks,AdvancedContainer:Ts,AdvancedActionsContainer:Rs,AdvancedButton:Ss,Provider:Sp,ApplyButton:Fs,ResetButton:Ms,Chips:Bs,Chip:Ls},$C= exports.Filter =_C;var _xdatagrid = require('@mui/x-data-grid');function _s(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.GetApp,{}),label:"Transport",color:"primary",onClick:()=>e&&e("transport")},t))}var Mp=_react.createContext.call(void 0, {});function Ns({children:e}){let[t,r]=_react.useState.call(void 0, []),[o,n]=_react.useState.call(void 0, !1),[i,a]=_react.useState.call(void 0, !1),l=_xdatagrid.useGridApiRef.call(void 0, );function s(){r([]),n(!0)}return _jsxruntime.jsx.call(void 0, Mp.Provider,{value:{apiRef:l,rowsSelectedId:t,clearCallback:o,breakpoint:i,setClearCallback:n,setBreakpoint:a,setRowsSelectedId:r,clearRowsSelectedId:s},children:e})}function Ve(){return _react.useContext.call(void 0, Mp)}function Vs(e){let{countTitle:t,gender:r}=e,{rowsSelectedId:o}=Ve(),n=o==null?void 0:o.length,i=_react.useMemo.call(void 0, ()=>{if(!t)return"";let a=r==="feminino"?"selecionada":"selecionado",l=r==="feminino"?"selecionadas":"selecionados",s=r==="feminino"?"Nenhuma":"Nenhum";return n===1?`${t} ${a}`:n&&n>1?`${t.split(" ").map(u=>`${u}s`).join(" ")} ${l}`:`${s} ${t} ${a}`},[n]);return _jsxruntime.jsx.call(void 0, _material.Stack,{children:_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body2",fontSize:"13px",fontWeight:"500",whiteSpace:"nowrap",children:[n&&n>0?n:""," ",i]})})}function zs(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Delete,{}),label:"Delete",color:"primary",onClick:()=>{e&&e("delete")}},t))}function _r(e){let l=e,{isLoading:t,startIcon:r,children:o,title:n}=l,i=C(l,["isLoading","startIcon","children","title"]),{breakpoint:a}=Ve();return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:a?_jsxruntime.jsx.call(void 0, _material.Tooltip,{title:o,children:_jsxruntime.jsxs.call(void 0, _material.IconButton,d(c({},i),{color:"primary",disabled:t?!0:i.disabled,children:[r,t&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:14,sx:{position:"absolute",top:"25%",bottom:"25%",left:"25%",right:"25%",transform:"translate(-50%, -50%)"}})]}))}):_jsxruntime.jsx.call(void 0, _material.Button,d(c({startIcon:r,disabled:t?!0:i.disabled,sx:{position:"relative",height:"26px",minWidth:"70px",padding:"7px 8px 8px",border:"1px solid rgba(223, 226, 231, 0.8)",borderRadius:"6px",display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:1,transition:"width 0.2s ease"}},i),{children:_jsxruntime.jsxs.call(void 0, _material.Box,{component:"span",sx:{transition:"opacity 0.2s ease, width 0.2s ease",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[t&&_jsxruntime.jsx.call(void 0, _material.CircularProgress,{color:"secondary",size:14,sx:{position:"absolute",top:"22%",left:"44%",transform:"translate(-50%, -50%)"}}),o]})}))})}var i1=({apiRef:e})=>_xdatagrid.gridFilteredSortedRowIdsSelector.call(void 0, e);function Gs(){let{apiRef:e}=Ve(),t=r=>{e!=null&&e.current&&e.current.exportDataAsCsv(r)};return _jsxruntime.jsx.call(void 0, _r,{startIcon:_jsxruntime.jsx.call(void 0, _iconsmaterial.FileDownload,{}),onClick:()=>t({getRowsToExport:i1}),children:"Exportar CSV"})}function Ws(r){var o=r,{onClick:e}=o,t=C(o,["onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({icon:_jsxruntime.jsx.call(void 0, _iconsmaterial.Edit,{}),label:"Edit",color:"primary",onClick:()=>e&&e("edit")},t))}function Hs(e){let{children:t,onClick:r}=e;return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_react.Children.map(t,o=>{if(_react.isValidElement.call(void 0, o))return _react.cloneElement.call(void 0, o,{onClick:r})})})}function Us(e){let n=e,{event:t,onClick:r}=n,o=C(n,["event","onClick"]);return _jsxruntime.jsx.call(void 0, _xdatagrid.GridActionsCellItem,c({color:"primary",onClick:()=>{r&&r(t)}},o))}function js(e){let{onChangePageSize:t,onChangePage:r,pagination:o,rowsPerPageOptions:n=[15,50,100,200]}=e,{page:i,pageSize:a=15,totalRecords:l}=o||{},s=_react.useMemo.call(void 0, ()=>o!=null&&o.lastPage?o.lastPage:(l||0)<a?1:Math.max(Math.ceil((l||0)/a)),[l,a]),u=_react.useMemo.call(void 0, ()=>{if((l||0)<a)return`Exibindo ${_hooks.pluralizar.call(void 0, l||0,"registro","registros",!0)}`;let f=a;if(i===s){let h=(l||0)%a;f=h===0?a:h}return`Exibindo ${_hooks.pluralizar.call(void 0, f||0,"registro","registros",!0)} de ${l}`},[o,s]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{width:"100%",direction:"row",alignItems:"center",gap:2,marginLeft:"auto",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",fontSize:"13px",fontWeight:"500",whiteSpace:"nowrap",children:u}),!0&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",alignItems:"center",gap:2,marginLeft:"auto",children:[_jsxruntime.jsx.call(void 0, _material.TextField,{sx:{width:"78px",fontSize:"8pt"},size:"small",value:a||0,select:!0,onChange:f=>{t&&t(parseInt(f.target.value))},children:n.map(f=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{value:f,children:f},f))}),_jsxruntime.jsx.call(void 0, _material.Pagination,{variant:"outlined",shape:"rounded",count:s||0,showFirstButton:!0,showLastButton:!0,onChange:(f,h)=>{r&&r(h)},page:i||0,color:"primary"})]})]})}function qs({children:e,breakpoints:t}){let{setBreakpoint:r}=Ve(),o=_material.useTheme.call(void 0, ),n=_material.useMediaQuery.call(void 0, o.breakpoints.down(t||"md"));return _react.useEffect.call(void 0, ()=>{r(n)},[n]),_jsxruntime.jsx.call(void 0, _material.Stack,{flexDirection:"row",alignItems:"center",justifyContent:"flex-end",gap:1,marginLeft:"auto",flexGrow:1,children:e})}function Ys({children:e}){return _jsxruntime.jsx.call(void 0, _material.Stack,{component:_material.Paper,elevation:0,gap:1.5,flexDirection:"row",justifyContent:"space-between",alignItems:"center",p:1,borderRadius:"8px 8px 0 0",sx:{width:"100%"},children:e})}function Ks(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({direction:"row",alignItems:"center",gap:1.5},e))}function Zs(e){return _jsxruntime.jsx.call(void 0, _material.TableFooter,d(c({},e),{sx:{height:"54px",paddingX:"12px",gap:"12px",display:"flex",alignItems:"center",backgroundColor:"white",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",borderTop:"1px solid #edf2f9"}}))}var _locales = require('@mui/x-data-grid/locales');function Xs(){return _jsxruntime.jsxs.call(void 0, _material.Stack,{alignItems:"center",justifyContent:"center",gap:2,padding:2,maxWidth:"400px",minWidth:"200px",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"250px",height:"250px",alignItems:"center",justifyContent:"center",borderRadius:"50%",sx:{background:"linear-gradient(to top, #ffffff, #fdfcfd, #fafafa, #f8f7f8, #f5f5f6);"},children:_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/empty-data.svg",alt:"Imagem de notifica\xE7\xE3o",width:"148px",height:"148px"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:1,textAlign:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h4",component:"h2",fontWeight:"600",children:"Nenhum registro encontrado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",whiteSpace:"normal",children:"Tente outra pesquisa ou adicione um novo registro."})]})]})}function el({errorMessage:e}){return _jsxruntime.jsxs.call(void 0, _material.Stack,{alignItems:"center",justifyContent:"center",gap:2,padding:2,maxWidth:"400px",minWidth:"200px",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{width:"250px",height:"250px",alignItems:"center",justifyContent:"center",borderRadius:"50%",sx:{background:"linear-gradient(to top, #ffffff, #fdfcfd, #fafafa, #f8f7f8, #f5f5f6);"},children:_jsxruntime.jsx.call(void 0, "img",{src:"https://datac-site-assets.s3.sa-east-1.amazonaws.com/error.svg",alt:"Imagem de erro",width:"148px",height:"148px"})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{gap:1,textAlign:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h4",component:"h2",fontWeight:"600",children:"Ops! Algo deu errado"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:e})]})]})}var _1=({apiRef:e})=>_xdatagrid.gridFilteredSortedRowIdsSelector.call(void 0, e);function tl(e){let D=e,{error:t,isLoading:r,isFetching:o,data:n,columns:i,controlledRowsSelectedId:a,onClearRowsSelectedId:l,onRowSelectionChange:s,onCellKeyDown:u,onRowDoubleClick:p,stackProps:f}=D,h=C(D,["error","isLoading","isFetching","data","columns","controlledRowsSelectedId","onClearRowsSelectedId","onRowSelectionChange","onCellKeyDown","onRowDoubleClick","stackProps"]),{rowsSelectedId:m,setRowsSelectedId:y,clearCallback:g,setClearCallback:S,apiRef:v}=Ve(),T=_react.useMemo.call(void 0, ()=>M=>M.map(k=>k.headerName==="A\xE7\xF5es"?d(c({},k),{minWidth:k.minWidth||80,maxWidth:k.maxWidth||k.width||80,headerClassName:"sticky-header",cellClassName:"sticky-cell"}):d(c({},k),{flex:k.flex||1,minWidth:k.minWidth||100,headerClassName:k!=null&&k.enableStickyColumns?"sticky-header":"",cellClassName:k!=null&&k.enableStickyColumns?"sticky-cell":""})),[i]);_react.useEffect.call(void 0, ()=>{a&&y(a)},[a]),_react.useEffect.call(void 0, ()=>{g&&(l&&l([]),S(!1))},[g]);function w(M,k,te){switch(k.ctrlKey&&k.code==="KeyE"?"ctrl+e":k.code){case"Enter":k.preventDefault(),u&&u("edit",M.id);break;case"F3":k.preventDefault(),u&&u("edit",M.id);break;case"Delete":k.preventDefault(),u&&u("delete",M.id);break;case"ctrl+e":k.preventDefault(),(R=>{v!=null&&v.current&&v.current.exportDataAsCsv(R)})({getRowsToExport:_1});break;default:break}}function P(M,k,te){p&&p("edit",M.id)}return _jsxruntime.jsxs.call(void 0, _material.Stack,d(c({height:"100%",minHeight:"500px",position:"relative"},f),{children:[!r&&o&&_jsxruntime.jsx.call(void 0, _material.LinearProgress,{sx:{position:"absolute",top:0,right:0,left:0,zIndex:999,height:"3px"}}),_jsxruntime.jsx.call(void 0, _xdatagrid.DataGrid,c({apiRef:v,rows:n,columns:T(i),density:"compact",hideFooterPagination:!0,hideFooter:!0,loading:r,rowHeight:43,columnHeaderHeight:43,disableVirtualization:!0,onRowDoubleClick:P,onCellKeyDown:w,disableRowSelectionOnClick:!0,rowSelectionModel:m,onRowSelectionModelChange:(M,k)=>{s&&s(M,k),!a&&y(M)},slots:{booleanCellFalseIcon:()=>_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:"error",sx:{fontSize:"10pt"}}),booleanCellTrueIcon:()=>_jsxruntime.jsx.call(void 0, _iconsmaterial.Circle,{color:"success",sx:{fontSize:"10pt"}}),noRowsOverlay:()=>!r&&t?_jsxruntime.jsx.call(void 0, el,{errorMessage:t}):_jsxruntime.jsx.call(void 0, Xs,{})},slotProps:{loadingOverlay:{variant:"skeleton",noRowsVariant:"skeleton"}},disableColumnFilter:!0,localeText:_locales.ptBR.components.MuiDataGrid.defaultProps.localeText,sx:{border:"none",borderRadius:0,"--DataGrid-rowBorderColor":"#edf2f9","--DataGrid-containerBackground":"#f4f6fa",".MuiDataGrid-overlayWrapperInner":{display:"flex",alignItems:"center",justifyContent:"center"},".MuiDataGrid-row":{backgroundColor:"white","&:nth-of-type(even)":{backgroundColor:"#f9fafd"},":hover":{backgroundColor:"#e9e9e9"},"&.Mui-selected":{backgroundColor:"rgb(238, 249, 252)","&:hover":{backgroundColor:"rgb(222, 243, 249)"}}},".MuiDataGrid-cell":{fontSize:"12px",color:"#0b0e14"},".MuiDataGrid-columnHeaders":{border:"solid 1px #edf2f9"},".MuiDataGrid-columnHeaderTitle":{fontSize:"12px",color:"#0b0e14",fontWeight:"600"},"& .sticky-cell":{position:"sticky",right:0,background:"inherit",zIndex:1},"& .sticky-header":{position:"sticky",right:0,background:"inherit",zIndex:2}}},h))]}))}function rl({children:e,titleDivider:t=!1}){let r=_material.useTheme.call(void 0, );return _jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",fontSize:"14px",whiteSpace:"nowrap",sx:{borderRight:t?`solid 1px ${r.palette.grey[300]}`:"none",paddingRight:1.5},children:e})}function ol(o){var n=o,{children:e,height:t}=n,r=C(n,["children","height"]);let i=_react.useRef.call(void 0, null),[a,l]=_react.useState.call(void 0, 500);return _react.useEffect.call(void 0, ()=>{let s=()=>{let u=i.current;if(!u)return;let p=u.getBoundingClientRect().top;l(window.innerHeight-p)};return s(),window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[]),_jsxruntime.jsx.call(void 0, _material.Stack,d(c({ref:i,sx:c({backgroundColor:"#f4f6fa",border:"1px solid #edf2f9",borderRadius:2,height:t||`calc(${a}px - 16px)`},r.sx)},r),{children:_jsxruntime.jsx.call(void 0, Ns,{children:e})}))}var j1={CellActionTransport:_s,SelectionCounter:Vs,CellActionDelete:zs,ExportCsvButton:Gs,CellActionEdit:Ws,CellActions:Hs,CellAction:Us,Pagination:js,Actions:qs,Toolbar:Ys,Content:Ks,Button:_r,Footer:Zs,Table:tl,Title:rl,Root:ol},q1= exports.DataTableV2 =j1;function nl(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({gap:.5,overflow:"hidden"},e))}function il(e){return _jsxruntime.jsx.call(void 0, _material.Stack,c({sx:[{overflowY:"auto",overflowX:"hidden"},...Array.isArray(e.sx)?e.sx:e.sx?[e.sx]:[]]},e))}function al(e){return _jsxruntime.jsx.call(void 0, _material.MenuItem,c({},e))}var ew={Root:nl,Content:il,Item:al},$r= exports.List =ew;var Zp=_react.createContext.call(void 0, void 0),Qp=({children:e})=>{let[t,r]=_react.useState.call(void 0, !1),[o,n]=_react.useState.call(void 0, null),i=_react.useCallback.call(void 0, l=>{n(l),r(!0)},[]),a=_react.useCallback.call(void 0, ()=>{r(!1),n(null)},[]);return _jsxruntime.jsx.call(void 0, Zp.Provider,{value:{isOpen:t,open:i,close:a,anchorEl:o,setAnchorEl:n},children:e})},Jt=()=>{let e=_react.useContext.call(void 0, Zp);if(!e)throw new Error("usePopover must be used within a PopoverProvider");return e};function sl(e){let{children:t}=e;return _jsxruntime.jsx.call(void 0, Qp,{children:t})}var _reactslot = require('@radix-ui/react-slot');function ll(e){let i=e,{asChild:t=!1}=i,r=C(i,["asChild"]),o=t?_reactslot.Slot:_material.Button,{open:n}=Jt();return _jsxruntime.jsx.call(void 0, o,c({onClick:a=>{n(a.currentTarget)}},r))}function cl(e){let i=e,{asChild:t=!1}=i,r=C(i,["asChild"]),o=t?_reactslot.Slot:_material.Button,{close:n}=Jt();return _jsxruntime.jsx.call(void 0, o,c({onClick:a=>{n()}},r))}function ul(e){let{isOpen:t,close:r,anchorEl:o}=Jt();return _jsxruntime.jsx.call(void 0, _material.Popover,d(c({open:t,anchorEl:o,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"center"},slotProps:{paper:{sx:{borderRadius:"12px"}}},transformOrigin:{vertical:"top",horizontal:"center"}},e),{children:e.children}))}var dw={Root:sl,Trigger:ll,Content:ul,Close:cl},er= exports.Popover =dw;var tf="mio-componente:button-group:value";function pl(e){let{children:t,value:r,onChange:o,isLoading:n,disableMemory:i}=e,[a,l]=_react.useState.call(void 0, !1),[s,u]=_react.useState.call(void 0, ()=>{if(!i)return window.localStorage.getItem(tf)||r||0;if(r)return r}),p=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{u(r===void 0?0:r)},[r]),_react.useEffect.call(void 0, ()=>{window.localStorage.setItem(tf,s||0),u(s)},[s]);let f=[],h=_react.Children.map(t,(m,y)=>{var S,v;f.push({label:m.props.children,value:((S=m.props)==null?void 0:S.value)||y});let g=ci.default.cloneElement(m,{isLoading:n,sx:{maxWidth:"300px",width:"120px"},value:((v=m.props)==null?void 0:v.value)||y});return!s&&y===0||s&&Number(g.props.value)===Number(s)?g:null});return _jsxruntime.jsxs.call(void 0, ci.default.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _material.ButtonGroup,{variant:"contained",size:"small",ref:p,children:[h,_jsxruntime.jsx.call(void 0, _material.Button,{disabled:n,"data-allow-click":"true",onClick:()=>{l(m=>!m)},sx:{width:"30px"},children:_jsxruntime.jsx.call(void 0, Er,{sx:{fontSize:"13pt"}})})]}),_jsxruntime.jsx.call(void 0, _material.Popper,{open:a,transition:!0,anchorEl:p.current,sx:{zIndex:999999},placement:"bottom-end",children:({TransitionProps:m})=>_jsxruntime.jsx.call(void 0, _material.Grow,d(c({},m),{children:_jsxruntime.jsx.call(void 0, _material.Paper,{sx:{minWidth:"120px"},children:_jsxruntime.jsx.call(void 0, _material.ClickAwayListener,{onClickAway:()=>l(!1),children:_jsxruntime.jsx.call(void 0, _material.MenuList,{autoFocusItem:!0,disablePadding:!0,children:f.map(y=>_jsxruntime.jsx.call(void 0, _material.MenuItem,{onClick:()=>{o?o(y.value):u(y.value),l(!1)},children:y.label},y.value))})})})}))})]})}function fl(e){return _jsxruntime.jsx.call(void 0, $,c({},e))}var Tw={Root:pl,Button:fl},kw= exports.ButtonGroup =Tw;function sf(e){let{licencas:t,licencaSelecionada:r,onAlterarLicenca:o}=e,[n,i]=_react.useState.call(void 0, "");if(t.length===0)return _jsxruntime.jsxs.call(void 0, _material.Stack,{overflow:"hidden",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{overflow:"hidden",textOverflow:"ellipsis",variant:"body1",children:r.nome}),_jsxruntime.jsx.call(void 0, _material.Typography,{overflow:"hidden",textOverflow:"ellipsis",variant:"body2",children:_hooks.formatDocumento.call(void 0, r.documento)})]});function a(s){i(s)}let l=n.length>0?t.filter(s=>["nome"].some(u=>_hooks.normalizeText.call(void 0, String(s[u])).includes(_hooks.normalizeText.call(void 0, n)))):t;return _jsxruntime.jsxs.call(void 0, er.Root,{children:[_jsxruntime.jsx.call(void 0, er.Trigger,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _material.Button,{sx:{color:s=>s.palette.grey[900]},variant:"text",children:[r.nome,_jsxruntime.jsx.call(void 0, _iconsmaterial.ArrowDropDown,{})]})}),_jsxruntime.jsx.call(void 0, er.Content,{sx:{"& .MuiPopover-paper":{minWidth:"300px",borderRadius:"12px",p:.5}},children:_jsxruntime.jsxs.call(void 0, $r.Root,{sx:{m:.5,minWidth:"300px",maxHeight:"300px",overflow:"auto"},children:[_jsxruntime.jsx.call(void 0, rt,{autoFocus:!0,onSearch:a}),_jsxruntime.jsx.call(void 0, $r.Content,{children:l.map(s=>_jsxruntime.jsx.call(void 0, er.Close,{asChild:!0,children:_jsxruntime.jsx.call(void 0, $r.Item,{selected:r.uuid===s.uuid,onClick:()=>o(s),children:_jsxruntime.jsxs.call(void 0, _material.Stack,{children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body1",textOverflow:"ellipsis",children:s.nome}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",textOverflow:"ellipsis",children:_hooks.formatDocumento.call(void 0, s.documento)})]})})},s.uuid))})]})})]})}var Rw=_styles.styled.call(void 0, _material.MenuItem,{})(({theme:e})=>({borderRadius:"6px",width:"90%",gap:"16px",margin:"0 auto",padding:"8px 16px",transition:"0.1s ease-in-out","&:hover":{backgroundColor:"rgba(89, 195, 224, 15%);","& .MuiTypography-root":{color:e.palette.primary.main},"& .MuiSvgIcon-root":{color:e.palette.primary.main},"& .MuiIcon-root":{color:e.palette.primary.main}},"& .MuiIcon-root":{color:e.palette.grey[500],fontSize:"20px"},"& .MuiTypography-root":{letterSpacing:"0.5px",color:e.palette.text.secondary,fontSize:e.typography.body1},"& .MuiSvgIcon-root":{fontSize:"24px"}})),Dw=e=>_jsxruntime.jsx.call(void 0, Rw,c({},e)),Pn=Dw;function dl(e){let{menuItem:t,activeMenu:r,onMenuClick:o}=e,[n,i]=_react.useState.call(void 0, !1);if(!t.visible)return null;let a=!!(t!=null&&t.items&&(t==null?void 0:t.items.length)>0);function l(){i(!n)}return _jsxruntime.jsxs.call(void 0, _material.Box,{children:[_jsxruntime.jsxs.call(void 0, Pn,{onClick:()=>{if(t!=null&&t.link){o(t.link);return}l()},selected:r===t.link,children:[!!t.icon&&_jsxruntime.jsx.call(void 0, _material.Icon,{children:t.icon}),_jsxruntime.jsx.call(void 0, _material.ListItemText,{primary:t.label}),a&&!n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandMore,{}),a&&n&&_jsxruntime.jsx.call(void 0, _iconsmaterial.ExpandLess,{})]}),(t==null?void 0:t.items)&&_jsxruntime.jsx.call(void 0, _material.Collapse,{in:n,timeout:"auto",unmountOnExit:!0,children:_jsxruntime.jsx.call(void 0, wt,{activeMenu:r,sx:{pl:s=>s.spacing(1.5)},menus:(t==null?void 0:t.items)||[],onMenuClick:o})})]})}function wt(e){let i=e,{menus:t,activeMenu:r,onMenuClick:o}=i,n=C(i,["menus","activeMenu","onMenuClick"]);return _jsxruntime.jsx.call(void 0, _material.List,d(c({component:"nav",disablePadding:!0},n),{children:t.map(a=>_jsxruntime.jsx.call(void 0, dl,{onMenuClick:o,activeMenu:r,menuItem:a},a.id))}))}function ml(e){let{menus:t,activeMenu:r,onMenuClick:o}=e,[n,i]=_react.useState.call(void 0, null),a=(s,u,p)=>{i({element:s.currentTarget,id:u,items:p})},l=()=>{i(null)};return _jsxruntime.jsx.call(void 0, _material.List,{component:"nav",disablePadding:!0,children:t.map(s=>s.visible?_jsxruntime.jsxs.call(void 0, Pn,{onMouseEnter:u=>{s!=null&&s.link||a(u,s.id,s.items)},onMouseLeave:()=>{s!=null&&s.link||l()},onClick:()=>{s!=null&&s.link&&o(s.link)},selected:r===s.link,children:[_jsxruntime.jsx.call(void 0, _material.ListItemIcon,{children:_jsxruntime.jsx.call(void 0, _material.Icon,{children:s.icon})}),(n==null?void 0:n.id)===s.id&&_jsxruntime.jsx.call(void 0, _material.Popper,{sx:{zIndex:999999},anchorEl:n==null?void 0:n.element,open:!!(n!=null&&n.element),placement:"right-start",children:_jsxruntime.jsx.call(void 0, wt,{activeMenu:r,onMenuClick:o,menus:(s==null?void 0:s.items)||[],sx:{minWidth:"240px",backgroundColor:U.palette.background.paper,borderRadius:"12px",padding:"16px 4px",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%);"}})})]},`minMenu-${s.id}`):null)})}var uf=(e,t)=>({width:e,transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}),pf=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(8)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(8)} + 1px)`}}),Xw=_styles.styled.call(void 0, _material.Drawer,{shouldForwardProp:e=>e!=="open"&&e!=="width"})(({theme:e,open:t,width:r})=>c(c({width:r,bgcolor:e.palette.background.paper,boxShadow:"2px 3px 20px -16px rgb(32 32 36 / 30%)",borderRightStyle:"none",whiteSpace:"nowrap",boxSizing:"border-box"},t&&d(c({},uf(r,e)),{"& .MuiDrawer-paper":uf(r,e)})),!t&&d(c({},pf(e)),{"& .MuiDrawer-paper":pf(e)})));function ff(e){let s=e,{open:t,items:r,width:o,activeMenu:n,onMenuClick:i,toggleMenu:a}=s,l=C(s,["open","items","width","activeMenu","onMenuClick","toggleMenu"]);return _jsxruntime.jsxs.call(void 0, Xw,d(c({width:o,open:t,onClose:()=>a(!1)},l),{children:[_jsxruntime.jsx.call(void 0, _material.Toolbar,{}),t&&_jsxruntime.jsx.call(void 0, wt,{onMenuClick:i,activeMenu:n,menus:r}),!t&&_jsxruntime.jsx.call(void 0, ml,{onMenuClick:i,activeMenu:n,menus:r})]}))}function df(e){return _jsxruntime.jsx.call(void 0, _material.Box,c({m:2,sx:{display:"flex",flexDirection:"column",flexGrow:1}},e))}var _Avatar = require('@mui/material/Avatar'); var _Avatar2 = _interopRequireDefault(_Avatar);function mf(e){let{user:t}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _Avatar2.default,c({src:t==null?void 0:t.avatarUrl,sx:{width:64,height:64,margin:"auto",mb:2}},e))}function Tn(e){let i=e,{children:t,value:r,index:o}=i,n=C(i,["children","value","index"]);return r!==o?null:_jsxruntime.jsx.call(void 0, _material.Box,d(c({role:"tabpanel",hidden:r!==o,id:`scrollable-auto-tabpanel-${o}`,"aria-labelledby":`scrollable-auto-tab-${o}`,sx:{display:"flex",flexDirection:"column",flexGrow:1}},n),{children:r===o&&t}))}var _reacteasycrop = require('react-easy-crop'); var _reacteasycrop2 = _interopRequireDefault(_reacteasycrop);var _Slider = require('@mui/material/Slider'); var _Slider2 = _interopRequireDefault(_Slider);var _Button = require('@mui/material/Button'); var _Button2 = _interopRequireDefault(_Button);var _Dialog = require('@mui/material/Dialog'); var _Dialog2 = _interopRequireDefault(_Dialog);function gl(e,t){return new Promise(r=>{let o=new Image;o.src=e,o.onload=()=>{let n=document.createElement("canvas");n.width=t.width,n.height=t.height;let i=n.getContext("2d");i&&(i.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),r(n.toDataURL("image/jpeg")))}})}var fS=({onSave:e,src:t})=>{let[r,o]=_react.useState.call(void 0, null),[n,i]=_react.useState.call(void 0, null),[a,l]=_react.useState.call(void 0, {x:0,y:0}),[s,u]=_react.useState.call(void 0, 1),[p,f]=_react.useState.call(void 0, null),[h,m]=_react.useState.call(void 0, !1),y=_react.useCallback.call(void 0, (v,T)=>{f(T)},[]);return _jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,alignItems:"center",children:[n?_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:n,alt:"Preview",sx:{width:64,height:64,margin:"auto",mb:2}}):_jsxruntime.jsx.call(void 0, _Avatar2.default,{src:t,sx:{width:64,height:64,margin:"auto",mb:2}}),_jsxruntime.jsxs.call(void 0, "label",{children:[_jsxruntime.jsx.call(void 0, "input",{type:"file",accept:"image/*",onChange:v=>{var P;let T=(P=v.target.files)==null?void 0:P[0];if(!T)return;let w=new FileReader;w.onload=()=>{o(w.result),m(!0)},w.readAsDataURL(T)},style:{display:"none"}}),_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",component:"span",children:"Alterar foto"})]}),_jsxruntime.jsxs.call(void 0, _Dialog2.default,{open:h,onClose:()=>m(!1),maxWidth:"sm",fullWidth:!0,children:[_jsxruntime.jsx.call(void 0, "div",{style:{position:"relative",height:400,background:"#333"},children:r&&_jsxruntime.jsx.call(void 0, _reacteasycrop2.default,{image:r,crop:a,zoom:s,aspect:1,cropShape:"round",showGrid:!1,onCropChange:l,onZoomChange:u,onCropComplete:y})}),_jsxruntime.jsxs.call(void 0, "div",{style:{padding:20},children:[_jsxruntime.jsx.call(void 0, _Slider2.default,{value:s,min:1,max:3,step:.1,onChange:(v,T)=>u(T)}),_jsxruntime.jsx.call(void 0, we,{children:_jsxruntime.jsx.call(void 0, _Button2.default,{variant:"contained",onClick:()=>N(void 0,null,function*(){if(!r||!p)return;let v=yield gl(r,p);i(v),m(!1),e&&e(v)}),children:"Salvar"})})]})]})]})},yf=fS;var yS=Ce().shape({name:pe().required("Informe o nome")});function bl(e){let{usuario:t,credentialsConfig:r,onUploadComplete:o}=e,{data:n,setData:i,handleChange:a,validate:l,validationErrors:s}=_hooks.useForm.call(void 0, t,yS),[u,p]=_react.useState.call(void 0, !1),[f,h]=_react.useState.call(void 0, !1),[m,y]=_react.useState.call(void 0, !1),{uploadAvatar:g,atualizarUsuario:S}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{i(t)},[t]),_react.useEffect.call(void 0, ()=>{m&&setTimeout(()=>{y(!1)},3e3)},[m]),_react.useEffect.call(void 0, ()=>{u&&setTimeout(()=>{p(!1)},3e3)},[u]);function v(){l(T=>N(this,null,function*(){try{h(!0),yield S(T),y(!0)}catch(w){p("Ocorreu um erro ao alterar os dados da conta")}finally{h(!1)}}))}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Avatar"}),_jsxruntime.jsx.call(void 0, yf,{src:n==null?void 0:n.avatarUrl,onSave:T=>{try{g(T),o&&(y(!0),o(!0))}catch(w){p("Ocorreu um erro ao atualizar a foto de perfil"),o&&o(!1,w)}}}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Informa\xE7\xF5es da Conta"}),_jsxruntime.jsxs.call(void 0, _material.Grid2,{container:!0,spacing:1.5,children:[_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{disabled:!0,fullWidth:!0,label:"E-mail",value:(n==null?void 0:n.email)||""})}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,c({name:"name",fullWidth:!0,label:"Nome",value:(n==null?void 0:n.name)||"",onChange:a},s("name")))}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, _material.TextField,{name:"surname",fullWidth:!0,label:"Sobrenome",value:(n==null?void 0:n.surname)||"",onChange:a})})]}),_jsxruntime.jsx.call(void 0, _material.Grid2,{size:{xl:4,lg:4,md:4,sm:12,xs:12},children:_jsxruntime.jsx.call(void 0, we,{children:_jsxruntime.jsx.call(void 0, $,{isLoading:f,onClick:()=>v(),variant:"contained",children:"Salvar"})})}),m&&_jsxruntime.jsx.call(void 0, _material.Alert,{children:"Dados da conta alterados com sucesso!"}),u&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"error",children:u})]})}function wl(e){var y,g,S;let{open:t,onClose:r,payload:o,onCodigoVerificado:n,credentialsConfig:i}=e,[a,l]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[p,f]=_react.useState.call(void 0, !1),{validarCodigoWhatsapp:h}=_hooks.useCredentials.call(void 0, i);_react.useEffect.call(void 0, ()=>{s&&setTimeout(()=>{u(!1)},3e3)},[s]);function m(){return N(this,null,function*(){try{f(!0);let v=yield h(a);n(v.data)}catch(v){u(v.response.data.message)}finally{f(!1)}})}return _jsxruntime.jsxs.call(void 0, G.Root,{open:t,onClose:v=>r(),maxWidth:"xs",children:[_jsxruntime.jsxs.call(void 0, G.Header,{children:[_jsxruntime.jsx.call(void 0, G.Title,{children:"Verifica\xE7\xE3o do seu n\xFAmero de WhatsApp"}),_jsxruntime.jsx.call(void 0, G.ActionClose,{onClose:r})]}),_jsxruntime.jsx.call(void 0, G.Content,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,justifyContent:"center",alignContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle1",sx:{fontWeight:"bolder",fontSize:"11pt"},children:"\u{1F510} Verifique seu n\xFAmero"}),_jsxruntime.jsxs.call(void 0, _material.Typography,{variant:"body1",sx:{fontSize:"10pt"},children:["Enviamos um c\xF3digo via WhatsApp para +55"," ",_jsxruntime.jsx.call(void 0, "b",{children:`(${(y=o==null?void 0:o.whatsappNumber)==null?void 0:y.slice(0,2)}) ${(g=o==null?void 0:o.whatsappNumber)==null?void 0:g.slice(2,7)}-${(S=o==null?void 0:o.whatsappNumber)==null?void 0:S.slice(7)}`}),". ",_jsxruntime.jsx.call(void 0, "br",{}),"Digite o c\xF3digo abaixo para confirmar que este n\xFAmero \xE9 seu."]}),_jsxruntime.jsx.call(void 0, kr,{value:a,onChange:v=>{l(v)}}),s&&_jsxruntime.jsx.call(void 0, _material.Alert,{sx:{flexGrow:1},severity:"error",children:s})]})}),_jsxruntime.jsx.call(void 0, G.Footer,{children:_jsxruntime.jsxs.call(void 0, G.Actions,{children:[_jsxruntime.jsx.call(void 0, G.ActionCancelar,{onClick:()=>r()}),_jsxruntime.jsx.call(void 0, G.ActionSalvar,{label:"Verificar",onClick:m,isLoading:p,disabled:a.length!=6})]})})]})}var u7=Ce().shape({whatsappNumber:pe().required("Informe o n\xFAmero do whastapp").length(15)});function kl(e){let{usuario:t,credentialsConfig:r,onWhastappSaved:o}=e,[n,i]=_react.useState.call(void 0, !1),[a,l]=_react.useState.call(void 0, !1),{data:s,setData:u,changeValue:p,validate:f,validationErrors:h}=_hooks.useForm.call(void 0, t),[m,y]=_react.useState.call(void 0, !1),[g,S]=_react.useState.call(void 0, !1),{atualizarUsuario:v,gerarWhatsappVerificationCode:T}=_hooks.useCredentials.call(void 0, r);_react.useEffect.call(void 0, ()=>{u(t)},[t]);function w(){f(D=>N(this,null,function*(){try{l(!0);let M=yield v(D);o&&o(M.data)}catch(M){}finally{l(!1)}}))}function P(){return N(this,null,function*(){try{y(!0);let D=yield T();S(!0)}catch(D){}finally{y(!1)}})}return _jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,children:[_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Senha"}),_jsxruntime.jsx.call(void 0, $,{onClick:()=>{i(!0)},sx:{width:"200px"},fullWidth:!1,variant:"contained",children:"Alterar Senha"}),_jsxruntime.jsx.call(void 0, Gt,{isOpen:n,onClose:()=>N(this,null,function*(){return i(!1)}),credentialsConfig:r}),_jsxruntime.jsx.call(void 0, _material.Divider,{}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"h6",children:"Login com Whastapp"}),_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:2,children:[_jsxruntime.jsx.call(void 0, Tr,{disabled:!!(s!=null&&s.whatsappVerifiedAt),fullWidth:!1,name:"whatsappNumber",label:"Whastapp",value:s.whatsappNumber||"",onChange:D=>{p("whatsappNumber",D.target.value)}}),s.whatsappVerifiedAt&&_jsxruntime.jsxs.call(void 0, _material.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:[_jsxruntime.jsx.call(void 0, _iconsmaterial.Verified,{color:"success"}),_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"body2",children:"N\xFAmero Verificado"})]}),s.whatsappNumber&&s.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, $,{isLoading:a,onClick:w,children:"Salvar Whatsapp"})]}),t.whatsappNumber&&t.whatsappNumber.replace(/\D/g,"").length===11&&!s.whatsappVerifiedAt&&_jsxruntime.jsx.call(void 0, _material.Alert,{severity:"warning",action:_jsxruntime.jsx.call(void 0, $,{isLoading:m,onClick:P,children:"Enviar n\xFAmero de verifica\xE7\xE3o"}),children:"O seu n\xFAmero de whatsapp ainda n\xE3o est\xE1 validado"}),_jsxruntime.jsx.call(void 0, wl,{open:g,onClose:D=>N(this,null,function*(){S(!1)}),payload:t,credentialsConfig:r,onCodigoVerificado:D=>{u(D),S(!1)}})]})}function Sf(e){let[t,r]=_react.useState.call(void 0, 0),{user:o,setUser:n,credentialsConfig:i}=_providers.useUserContext.call(void 0, );return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsxs.call(void 0, _material.Stack,{spacing:2,direction:"row",children:[_jsxruntime.jsx.call(void 0, _material.Stack,{sx:{width:"200px"},children:_jsxruntime.jsxs.call(void 0, _material.Tabs,{orientation:"vertical",value:t,onChange:(a,l)=>{r(l)},sx:{"& .MuiButtonBase-root":{alignItems:"flex-start"}},children:[_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Minha Conta",value:0}),_jsxruntime.jsx.call(void 0, _material.Tab,{label:"Login e Seguran\xE7a",value:1})]})}),_jsxruntime.jsxs.call(void 0, _material.Stack,{sx:{flexGrow:1},children:[_jsxruntime.jsx.call(void 0, Tn,{value:t,index:0,children:_jsxruntime.jsx.call(void 0, bl,{credentialsConfig:i,usuario:o||{}})}),_jsxruntime.jsx.call(void 0, Tn,{value:t,index:1,children:_jsxruntime.jsx.call(void 0, kl,{onWhastappSaved:a=>{n(a)},credentialsConfig:i,usuario:o||{}})})]})]})})}exports.AlterarLicenca = sf; exports.AlterarSenha = Gt; exports.Avatar = mf; exports.Breadcrumbs = gp; exports.Button = $; exports.ButtonContainer = we; exports.ButtonGroup = kw; exports.Checkbox = Dl; exports.ColorsGrid = Bl; exports.Content = df; exports.ContentTitle = lC; exports.CurrencyCellStyle = lP; exports.CurrencyTextField = id; exports.DataTable = Ud; exports.DataTableOptions = _n; exports.DataTableV2 = q1; exports.DeleteContainer = Bn; exports.Dialog = Ge; exports.DialogV2 = G; exports.DrawerMenu = ff; exports.Editable = _o; exports.Filter = $C; exports.FilterApiContext = wp; exports.FilterContainer = Wn; exports.FilterControl = Yr; exports.FilterDataContext = Cp; exports.FilterProvider = Sp; exports.Flag = rc; exports.FormContainer = jn; exports.Header = Tb; exports.Icon = ye; exports.LabelValue = ou; exports.List = $r; exports.Menu = eC; exports.MioAuth = ip; exports.OptionStyles = sP; exports.PageTitle = cu; exports.PasswordTextField = ht; exports.Popover = er; exports.Profile = Sf; exports.SearchTextField = rt; exports.Surface = Pt; exports.Tooltip = Tt; exports.Transporter = Li; exports.renderMenuItems = Jb; exports.theme = U; exports.useDialogs = _core.useDialogs; exports.useFilter = vn; exports.useFilterApi = Ee;
11
11
  /*! Bundled license information:
12
12
 
13
13
  react-is/cjs/react-is.production.min.js: