1var Pe=Object.defineProperty;var Ve=(e,r,o)=>r in e?Pe(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o;var re=(e,r,o)=>Ve(e,typeof r!="symbol"?r+"":r,o);import{r as h,j as t,h as z,g as w,R as I}from"./client-CHNkNmmv.js";import{c as ve,d as je,r as ke,e as ye,s as Ae,f as Re,h as X,i as Ce,j as Te,k as E,a as ee,A as _e,S as x,l as D,T as C,B as S,g as Le,P as ze,L as ae,b as se}from"./index-C1a5_rd_.js";import{_ as Z,a as $,r as q,i as te,l as Y,A as oe}from"./app-DvjZdISW.js";import{a as we}from"./formHelpers-ByMlm3Fd.js";import{S as Ee}from"./SEO-DK-o5SFm.js";import{W as qe}from"./index-Bkh7phno.js";import{I as B}from"./index-B-YOCPOT.js";import{S as Q}from"./index-CdaepXmL.js";import{I as Be}from"./index-P7iipizp.js";import{C as le}from"./index-C_AkzrJ_.js";import{a as K}from"./colorManipulator-Csr38hmF.js";import{D as We,a as Ie}from"./DialogActions-BkwQUatW.js";import{D as De}from"./DialogTitle-DzZtcRLo.js";import{D as Oe}from"./DialogContent-DaDhFEjJ.js";import"./index-BF-fL1YB.js";import"./Checkbox-9ZKMfnVT.js";import"./FormGroup-QPlMjAv3.js";function Fe(e){return h.Children.toArray(e).filter(r=>h.isValidElement(r))}function Ge(e){return je("MuiToggleButton",e)}const L=ve("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),Se=h.createContext({}),Me=h.createContext(void 0);function He(e,r){return r===void 0||e===void 0?!1:Array.isArray(r)?r.indexOf(e)>=0:e===r}const Ue=["value"],Ne=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],Je=e=>{const{classes:r,fullWidth:o,selected:a,disabled:l,size:s,color:n}=e,c={root:["root",a&&"selected",l&&"disabled",o&&"fullWidth",`size${X(s)}`,n]};return Ce(c,Ge,r)},Ke=Ae(Te,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[r.root,r[`size${X(o.size)}`]]}})(({theme:e,ownerState:r})=>{let o=r.color==="standard"?e.palette.text.primary:e.palette[r.color].main,a;return e.vars&&(o=r.color==="standard"?e.vars.palette.text.primary:e.vars.palette[r.color].main,a=r.color==="standard"?e.vars.palette.text.primaryChannel:e.vars.palette[r.color].mainChannel),$({},e.typography.button,{borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active},r.fullWidth&&{width:"100%"},{[`&.${L.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:K(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${L.selected}`]:{color:o,backgroundColor:e.vars?`rgba(${a} / ${e.vars.palette.action.selectedOpacity})`:K(o,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${a} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:K(o,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${a} / ${e.vars.palette.action.selectedOpacity})`:K(o,e.palette.action.selectedOpacity)}}}},r.size==="small"&&{padding:7,fontSize:e.typography.pxToRem(13)},r.size==="large"&&{padding:15,fontSize:e.typography.pxToRem(15)})}),O=h.forwardRef(function(r,o){const a=h.useContext(Se),{value:l}=a,s=Z(a,Ue),n=h.useContext(Me),c=ke($({},s,{selected:He(r.value,l)}),r),d=ye({props:c,name:"MuiToggleButton"}),{children:m,className:p,color:y="standard",disabled:v=!1,disableFocusRipple:u=!1,fullWidth:W=!1,onChange:M,onClick:A,selected:f,size:k="medium",value:b}=d,T=Z(d,Ne),P=$({},d,{color:y,disabled:v,disableFocusRipple:u,fullWidth:W,size:k}),_=Je(P),j=R=>{A&&(A(R,b),R.defaultPrevented)||M&&M(R,b)},g=n||"";return t.jsx(Ke,$({className:Re(s.className,_.root,p,g),disabled:v,focusRipple:!u,ref:o,onClick:j,onChange:M,value:b,ownerState:P,"aria-pressed":f},T,{children:m}))});function Qe(e){return je("MuiToggleButtonGroup",e)}const i=ve("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),Xe=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],Ye=e=>{const{classes:r,orientation:o,fullWidth:a,disabled:l}=e,s={root:["root",o==="vertical"&&"vertical",a&&"fullWidth"],grouped:["grouped",`grouped${X(o)}`,l&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return Ce(s,Qe,r)},Ze=Ae("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:o}=e;return[{[`& .${i.grouped}`]:r.grouped},{[`& .${i.grouped}`]:r[`grouped${X(o.orientation)}`]},{[`& .${i.firstButton}`]:r.firstButton},{[`& .${i.lastButton}`]:r.lastButton},{[`& .${i.middleButton}`]:r.middleButton},r.root,o.orientation==="vertical"&&r.vertical,o.fullWidth&&r.fullWidth]}})(({ownerState:e,theme:r})=>$({display:"inline-flex",borderRadius:(r.vars||r).shape.borderRadius},e.orientation==="vertical"&&{flexDirection:"column"},e.fullWidth&&{width:"100%"},{[`& .${i.grouped}`]:$({},e.orientation==="horizontal"?{[`&.${i.selected} + .${i.grouped}.${i.selected}`]:{borderLeft:0,marginLeft:0}}:{[`&.${i.selected} + .${i.grouped}.${i.selected}`]:{borderTop:0,marginTop:0}})},e.orientation==="horizontal"?{[`& .${i.firstButton},& .${i.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${i.lastButton},& .${i.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{[`& .${i.firstButton},& .${i.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${i.lastButton},& .${i.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},e.orientation==="horizontal"?{[`& .${i.lastButton}.${L.disabled},& .${i.middleButton}.${L.disabled}`]:{borderLeft:"1px solid transparent"}}:{[`& .${i.lastButton}.${L.disabled},& .${i.middleButton}.${L.disabled}`]:{borderTop:"1px solid transparent"}})),ne=h.forwardRef(function(r,o){const a=ye({props:r,name:"MuiToggleButtonGroup"}),{children:l,className:s,color:n="standard",disabled:c=!1,exclusive:d=!1,fullWidth:m=!1,onChange:p,orientation:y="horizontal",size:v="medium",value:u}=a,W=Z(a,Xe),M=$({},a,{disabled:c,fullWidth:m,orientation:y,size:v}),A=Ye(M),f=h.useCallback((j,g)=>{if(!p)return;const R=u&&u.indexOf(g);let V;u&&R>
1=0?(V=u.slice(),V.splice(R,1)):V=u?u.concat(g):[g],p(j,V)},[p,u]),k=h.useCallback((j,g)=>{p&&p(j,u===g?null:g)},[p,u]),b=h.useMemo(()=>({className:A.grouped,onChange:d?k:f,value:u,size:v,fullWidth:m,color:n,disabled:c}),[A.grouped,d,k,f,u,v,m,n,c]),T=Fe(l),P=T.length,_=j=>{const g=j===0,R=j===P-1;return g&&R?"":g?A.firstButton:R?A.lastButton:A.middleButton};return t.jsx(Ze,$({role:"group",className:Re(A.root,s),ref:o,ownerState:M},W,{children:t.jsx(Se.Provider,{value:b,children:T.map((j,g)=>t.jsx(Me.Provider,{value:_(g),children:j},g))})}))});var F={},ie;function et(){if(ie)return F;ie=1;var e=q();Object.defineProperty(F,"__esModule",{value:!0}),F.default=void 0;var r=e(E()),o=z();return F.default=(0,r.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock"),F}var tt=et();const ue=w(tt);var G={},ce;function rt(){if(ce)return G;ce=1;var e=q();Object.defineProperty(G,"__esModule",{value:!0}),G.default=void 0;var r=e(E()),o=z();return G.default=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public"),G}var at=rt();const de=w(at);var H={},pe;function st(){if(pe)return H;pe=1;var e=q();Object.defineProperty(H,"__esModule",{value:!0}),H.default=void 0;var r=e(E()),o=z();return H.default=(0,r.default)((0,o.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4-8 5-8-5V6l8 5 8-5z"}),"Email"),H}var ot=st();const ge=w(ot);var U={},xe;function lt(){if(xe)return U;xe=1;var e=q();Object.defineProperty(U,"__esModule",{value:!0}),U.default=void 0;var r=e(E()),o=z();return U.default=(0,r.default)((0,o.jsx)("path",{d:"M13 8c0-2.21-1.79-4-4-4S5 5.79 5 8s1.79 4 4 4 4-1.79 4-4m2 2v2h3v3h2v-3h3v-2h-3V7h-2v3zM1 18v2h16v-2c0-2.66-5.33-4-8-4s-8 1.34-8 4"}),"PersonAddAlt1"),U}var nt=lt();const he=w(nt);var N={},me;function it(){if(me)return N;me=1;var e=q();Object.defineProperty(N,"__esModule",{value:!0}),N.default=void 0;var r=e(E()),o=z();return N.default=(0,r.default)((0,o.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l4 4 4-4H6c0-3.86 3.14-7 7-7s7 3.14 7 7-3.14 7-7 7c-1.9 0-3.62-.76-4.88-1.99L6.7 18.42C8.32 20.01 10.55 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m2 8v-1c0-1.1-.9-2-2-2s-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1m-1 0h-2v-1c0-.55.45-1 1-1s1 .45 1 1z"}),"LockReset"),N}var ut=it();const ct=w(ut);var J={},fe;function dt(){if(fe)return J;fe=1;var e=q();Object.defineProperty(J,"__esModule",{value:!0}),J.default=void 0;var r=e(E()),o=z();return J.default=(0,r.default)((0,o.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutline"),J}var pt=dt();const gt=w(pt);class xt{constructor(){re(this,"providers",new Map)}register(r){this.providers.set(r.id,r)}getProvider(r){return Array.from(this.providers.values()).find(a=>a.is(r))??null}hasProvider(r){return this.getProvider(r)!==null}}const $e=new xt,be={id:"grupo-petropolis",is:e=>e==="grupo-petropolis"},ht=({isRegister:e,setIsRegister:r,registerMode:o,setRegisterMode:a})=>{const l=ee(),{namespaces:{inertia:s}}=te,[n,c]=I.useState(!1),d=I.useMemo(()=>({border:"1px solid",borderColor:"divider",borderRadius:2,textTransform:"none",fontWeight:600,gap:1,px:2,py:1.25,bgcolor:"background.paper",color:"text.primary",boxShadow:"none",minHeight:40,"&:hover":{bgcolor:"grey.100",borderColor:"grey.400",boxShadow:"none"},"&:active":{bgcolor:"grey.200"},"& .MuiButton-startIcon":{ml:0,mr:.5}}),[]),m=I.useMemo(()=>({"& .MuiToggleButton-root":{flex:1,py:1.1,px:2,borderRadius:2,textTransform:"none",gap:1,borderColor:"divider",fontWeight:500,bgcolor:"background.paper",color:"text.primary",transition:"background-color .18s ease, border-color .18s ease, box-shadow .18s ease","&:hover":{bgcolor:"grey.100"}},"& .MuiToggleButton-root.Mui-selected":{bgcolor:"grey.200 !important",color:"text.primary",fontWeight:600,borderColor:"grey.400",boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.08)"},"& .MuiToggleButton-root.Mui-selected:hover":{bgcolor:"grey.300 !important",borderColor:"grey.500"},columnGap:1,"& .MuiToggleButtonGroup-grouped":{borderRadius:2},"& .MuiToggleButtonGroup-grouped:not(:first-of-type)":{marginLeft:0}}),[]),p=I.useMemo(()=>({p:2,border:"1px solid",borderColor:"divider",borderRadius:2,position:"relative",bgcolor:"background.paper",transition:"background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease","&:hover":{borderColor:"grey.400",boxShadow:"0 2px 6px rgba(0,0,0,0.08)"}
1,"&:focus-within":{outline:"2px solid",outlineColor:"primary.main",outlineOffset:2}}),[]),y=I.useMemo(()=>({p:1.5,border:"1px solid",borderColor:"divider",borderRadius:2,bgcolor:"background.paper",flex:1,minWidth:0,display:"flex",gap:1,transition:"background-color .18s ease, border-color .18s ease, box-shadow .18s ease","&:hover":{borderColor:"grey.400",boxShadow:"0 2px 4px rgba(0,0,0,0.06)"}}),[]);return t.jsxs(x,{gap:1.5,mb:2,children:[t.jsx(x,{direction:"row",alignItems:"center",justifyContent:"flex-end",children:t.jsx(D,{"aria-label":l("externalAuth.gp.helpAria",s,{defaultValue:"Ajuda e rotinas"}),size:"small",variant:"outlined",startIcon:t.jsx(gt,{}),onClick:()=>c(!0),sx:d,children:l("externalAuth.gp.help",s,{defaultValue:"Ajuda"})})}),t.jsxs(ne,{value:e?"no-access":"internal",exclusive:!0,onChange:(v,u)=>{u&&(r(u==="no-access"),u==="no-access"&&a("emailLogin"))},size:"small",fullWidth:!0,"aria-label":l("externalAuth.gp.accessTypeAria",s,{defaultValue:"Seleção de tipo de acesso"}),sx:m,children:[t.jsxs(O,{value:"internal","aria-label":l("externalAuth.gp.haveInternalAccessAria",s,{defaultValue:"Colaborador com Senha de Rede ou GP Vendas"}),children:[t.jsx(ue,{fontSize:"small"}),l("externalAuth.gp.haveInternalAccess",s,{defaultValue:"Colaborador com Senha de Rede ou GP Vendas"})]}),t.jsxs(O,{value:"no-access","aria-label":l("externalAuth.gp.noAccessAria",s,{defaultValue:"Colaborador sem Senha de Rede"}),children:[t.jsx(de,{fontSize:"small"}),l("externalAuth.gp.noAccess",s,{defaultValue:"Colaborador sem Senha de Rede"})]})]}),e&&t.jsxs(x,{gap:.5,children:[t.jsx(C,{sx:{fontSize:"1.2rem",color:"text.secondary"},children:l("externalAuth.gp.chooseAnOption",s,{defaultValue:"Escolha uma das opções abaixo:"})}),t.jsxs(ne,{value:o,exclusive:!0,onChange:(v,u)=>u&&a(u),size:"small",fullWidth:!0,"aria-label":l("externalAuth.gp.suboptionsAria",s,{defaultValue:"Subopções de acesso"}),sx:m,children:[t.jsxs(O,{value:"emailLogin","aria-label":l("externalAuth.gp.emailLoginAria",s,{defaultValue:"Login"}),children:[t.jsx(ge,{fontSize:"small"}),l("externalAuth.gp.emailLogin",s,{defaultValue:"Login"})]}),t.jsxs(O,{value:"first","aria-label":l("externalAuth.gp.firstAccessAria",s,{defaultValue:"Primeiro acesso"}),children:[t.jsx(he,{fontSize:"small"}),l("externalAuth.gp.firstAccess",s,{defaultValue:"Primeiro acesso"})]}),t.jsxs(O,{value:"recovery","aria-label":l("externalAuth.gp.recoveryAria",s,{defaultValue:"Recuperar senha"}),children:[t.jsx(ct,{fontSize:"small"}),l("externalAuth.gp.recovery",s,{defaultValue:"Recuperar senha"})]})]})]}),t.jsxs(We,{open:n,onClose:()=>c(!1),fullWidth:!0,maxWidth:"sm",children:[t.jsx(De,{sx:{fontSize:"1.6rem",fontWeight:600,pb:1.5},children:l("externalAuth.gp.help.title",s,{defaultValue:"Ajuda"})}),t.jsx(Oe,{dividers:!0,sx:{bgcolor:"background.paper",p:3},children:t.jsxs(x,{spacing:3,children:[t.jsx(C,{variant:"body1",sx:{lineHeight:1.55},children:l("externalAuth.gp.help.introSimple",s,{defaultValue:"Escolha abaixo a opção que mais parece com o seu caso."})}),t.jsxs(S,{sx:{...p,bgcolor:"primary.50",display:"flex",gap:1.25},children:[t.jsx(S,{sx:{p:1,borderRadius:1.5,bgcolor:"primary.main",color:"primary.contrastText",display:"flex",alignSelf:"flex-start"},children:t.jsx(ue,{fontSize:"small"})}),t.jsxs(x,{spacing:1,flex:1,minWidth:0,children:[t.jsxs(x,{spacing:.75,children:[t.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.25},children:l("externalAuth.gp.help.internal.title",s,{defaultValue:"Sou colaborador com Senha de Rede ou GP Vendas"})}),t.jsx(C,{variant:"body2",color:"text.secondary",component:"div",sx:{lineHeight:1.4},children:t.jsxs(S,{component:"ul",sx:{pl:2,m:0},children:[t.jsx("li",{children:"Use sua matrÃcula com 00 (apenas números)"}),t.jsx("li",{children:"Use a senha de rede e para vendedores, utilize a senha do GP Vendas."}),t.jsx("li",{children:t.jsx("strong",{children:"Esqueceu sua senha?"})}),t.jsx("li",{children:"Sua senha é a mesma do seu e-mail do GP."})]})})]}),t.jsx(x,{direction:"row",spacing:1,mt:.5,children:t.jsx(D,{size:"small",variant:"outlined",onClick:()=>{r(!1),c(!1)},sx:d,children:l("externalAuth.gp.help.actions.useInternal",s,{defaultValue:"Usar rede interna"})})})]})]}),t.jsxs(S,{sx:{...p,bgcolor:"secondary.50",display:"flex",flexDirection:"column",gap:1.5},children:[t.jsxs(x,{direction:"row",spacing:1.25,alignItems:"flex-start",children:[t.jsx(S,{sx:{p:1,borderRadius:1.5,bgcolor:"secondary.main",color:"secondary.c
1ontrastText",display:"flex",alignSelf:"flex-start"},children:t.jsx(de,{fontSize:"small"})}),t.jsx(x,{spacing:.75,flex:1,minWidth:0,children:t.jsx(C,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.25},children:l("externalAuth.gp.help.noAccess.titleSimple",s,{defaultValue:"Não tenho Senha de Rede"})})})]}),t.jsxs(x,{direction:{xs:"column",sm:"row"},spacing:1.25,sx:{width:"100%"},children:[t.jsxs(S,{sx:y,children:[t.jsx(S,{sx:{mt:.25,p:.75,borderRadius:1.5,bgcolor:"warning.softBg",color:"warning.main",display:"flex",alignSelf:"flex-start"},children:t.jsx(he,{fontSize:"small"})}),t.jsxs(x,{spacing:.75,flex:1,minWidth:0,children:[t.jsx(C,{variant:"body2",sx:{fontWeight:600,lineHeight:1.3},children:l("externalAuth.gp.help.firstAccess.title",s,{defaultValue:"à meu primeiro acesso"})}),t.jsx(C,{variant:"caption",color:"text.secondary",component:"div",sx:{lineHeight:1.3},children:"Insira sua matrÃcula com 00 (apenas números), Data de Nascimento, e-mail particular e crie uma senha."}),t.jsx(D,{size:"small",variant:"outlined",onClick:()=>{r(!0),a("first"),c(!1)},sx:{...d,alignSelf:"flex-start"},children:l("externalAuth.gp.help.actions.chooseFirst",s,{defaultValue:"Ir para Primeiro acesso"})})]})]}),t.jsxs(S,{sx:y,children:[t.jsx(S,{sx:{mt:.25,p:.75,borderRadius:1.5,bgcolor:"secondary.main",color:"info.main",display:"flex",alignSelf:"flex-start"},children:t.jsx(ge,{fontSize:"small"})}),t.jsxs(x,{spacing:.75,flex:1,minWidth:0,children:[t.jsx(C,{variant:"body2",sx:{fontWeight:600,lineHeight:1.3},children:l("externalAuth.gp.help.emailLogin.title",s,{defaultValue:"Já tenho cadastro com matrÃcula e senha"})}),t.jsx(C,{variant:"caption",color:"text.secondary",component:"div",sx:{lineHeight:1.3},children:"Use sua matrÃcula com 00 (apenas números) e senha."}),t.jsx(D,{size:"small",variant:"outlined",onClick:()=>{r(!0),a("emailLogin"),c(!1)},sx:{...d,alignSelf:"flex-start"},children:l("externalAuth.gp.help.actions.chooseLogin",s,{defaultValue:"Ir para Login"})})]})]})]})]})]})}),t.jsx(Ie,{sx:{px:3,py:2},children:t.jsx(D,{onClick:()=>c(!1),variant:"outlined",sx:d,children:l("externalAuth.gp.help.close",s,{defaultValue:"Fechar"})})})]})]})},mt=({form:e,isRegister:r,registerMode:o})=>{const a=ee(),{namespaces:{inertia:l}}=te;return t.jsx(t.Fragment,{children:r&&o==="recovery"?t.jsxs(t.Fragment,{children:[t.jsx(_e,{severity:"info",sx:{mb:2,fontSize:"1.3rem"},children:a("externalAuth.gp.recovery.info",l,{defaultValue:"Enviaremos instruções para o seu e-mail cadastrado."})}),t.jsx(B,{className:"input-text-registration",label:a("externalAuth.gp.registration",l,{defaultValue:"MatrÃcula (com 00)"}),type:"text",name:"registration",id:"registration",required:!0,inputMode:"numeric",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},placeholder:a("externalAuth.gp.registrationExample",l,{defaultValue:"Ex.: 0012356"}),onChange:s=>{const n=s.currentTarget.value.replace(/\D+/g,"");s.currentTarget.value!==n&&(s.currentTarget.value=n)}})]}):r&&o==="emailLogin"?t.jsxs(t.Fragment,{children:[Object.keys(e).filter(s=>{var n;return((n=e[s])==null?void 0:n.type)==="select"}).map(s=>t.jsx(Q,{name:s,options:e[s].options,label:e[s].label,value:"",required:!0},`email-login-select-${s}`)),t.jsx(B,{className:"input-text-registration",label:a("externalAuth.gp.registration",l,{defaultValue:"MatrÃcula (com 00)"}),type:"text",name:"registration",id:"registration",required:!0,inputMode:"numeric",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},placeholder:a("externalAuth.gp.registrationExample",l,{defaultValue:"Ex.: 0012356"}),onChange:s=>{const n=s.currentTarget.value.replace(/\D+/g,"");s.currentTarget.value!==n&&(s.currentTarget.value=n)}}),t.jsx(B,{className:"input-password-login",label:a("externalAuth.gp.password",l,{defaultValue:"Senha"}),type:"password",name:"password",id:"password",required:!0}),t.jsx(x,{direction:"row",justifyContent:"flex-start",alignItems:"center",sx:{mb:1,ml:-1},children:t.jsx(le,{label:a("externalAuth.gp.rememberMe",l,{defaultValue:"Manter conectado"}),name:"remember"})})]}):r&&o==="first"?t.jsxs(t.Fragment,{children:[Object.keys(e).filter(s=>{var n;return((n=e[s])==null?void 0:n.type)==="select"}).map(s=>t.jsx(Q,{name:s,options:e[s].options,label:e[s].label,value:"",required:!0},`register-select-${s}`)),(e==null?void 0:e.registration)&&t.jsx(B,{className:"input-text-registration",label:a("externalAuth.gp.registration",l,{defaultValue:"MatrÃcula (com 00)"}),type:"text",name:"registration",id:"registration",required:!0,inputMode:"numeric",inputProps:{inputMode:"numeric",pattern:"[0-9]*"},placeholder:a("externalAuth.gp.registrationExample",l,{defaultValue:"Ex.: 0012356"}),onChange:s=>{const n=s.currentTarget.value.replace(/\D+/g,"");s.currentTarget.value!==n&&(s.currentTarget.value=n)}},"registration"),t.jsx(B,{className:"input-email-register",label:a("externalAuth.gp.emailPersonal",l,{defaultValue:"E-mail particular"}),type:"email",name:"email",id:"email",required:!0},"email-register"),t.jsx(B,{className:"input-password-register",label:a("externalAuth.gp.password",l,{defaultValue:"Senha"}),type:"password",name:"password",id:"password",required:!0},"password-register"),t.jsx(B,{className:"input-password-confirmation-register",label:a("externalAuth.gp.confirmPassword",l,{defaultValue:"Confirmar senha"}),type:"password",name:"password_confirmation",id:"password_confirmation",required:!0},"password-confirmation-register"),t.jsx(B,{className:"input-birthdate-register",label:a("externalAuth.gp.birthdate",l,{defaultValue:"Data de nascimento"}),type:"date",name:"birthdate",id:"birthdate",placeholder:a("externalAuth.gp.birthdatePlaceholder",l,{defaultValue:"DD/MM/AAAA"}),required:!0},"birthdate-register")]}):r?null:t.jsxs(t.Fragment,{children:[Object.keys(e).map(s=>{const n=e[s];return(n==null?void 0:n.type)==="select"?t.jsx(Q,{name:s,options:n.options,label:n.label,value:"",required:!0},`internal-select-${s}`):(n==null?void 0:n.type)==="mask"?t.jsx(Be,{className:`input-mask-${s}`,label:n.label,mask:n.mask,placeholder:n.placeholder||"",name:s,id:s,required:!0},`internal-mask-${s}`):t.jsx(B,{className:`input-text-${s}`,label:n.label,type:n.type||"text",name:s,id:s,placeholder:n.placeholder||"",required:!0},`internal-input-${s}`)}),t.jsx(x,{direction:"row",justifyContent:"flex-start",alignItems:"center",sx:{mt:1,mb:1},children:t.jsx(le,{label:a("externalAuth.gp.rememberMe",l,{defaultValue:"Manter conectado"}),name:"remember"})})]})})},ft={id:be.id,is:be.is,getInitialRegisterMode:()=>"emailLogin",handleSubmit:async(e,r)=>{const o=e.formRef.current,a=o?new FormData(o):new FormData;return r.isRegister&&r.registerMode==="recovery"?(e.router.post(`/integrations/${e.serviceName}/recuperar-senha`,a,{onFinish:()=>e.setLoading(!1)}),!0):r.isRegister?(a.append("_flow",r.registerMode==="emailLogin"?"email_login":"register"),e.router.post(`/integrations/${e.serviceName}/credentials`,a,{onFinish:()=>e.setLoading(!1)}),!0):!1},renderModeSelector:e=>t.jsx(ht,{isRegister:e.isRegister,setIsRegister:e.setIsRegister,registerMode:e.registerMode,setRegisterMode:e.setRegisterMode}),renderFormFields:({form:e,serviceName:r,formRef:o,state:a})=>t.jsx(mt,{form:e,serviceName:r,formRef:o,isRegister:a.isRegister,registerMode:a.registerMode,isPasswordRecovery:a.isPasswordRecovery||!1,setIsPasswordRecovery:a.setIsPasswordRecovery||
1(()=>{})}),getSubmitButtonText:(e,r,o)=>e.isRegister&&e.registerMode==="recovery"?r("externalAuth.gp.cta.recoverPassword",o,{defaultValue:"Enviar Solicitação"}):e.isRegister?e.registerMode==="emailLogin"?r("externalAuth.gp.cta.login",o,{defaultValue:"Entrar"}):r("externalAuth.gp.cta.register",o,{defaultValue:"Cadastrar"}):r("externalAuth.gp.cta.submit",o,{defaultValue:"Enviar"})};$e.register(ft);const bt=({form:e})=>t.jsx(t.Fragment,{children:Object.keys(e).map(r=>{const o=e[r].label,a=e[r].type;if(a==="select"){const{options:l}=e[r];return t.jsx(Q,{name:r,options:l||[],label:o,value:"",required:!0},r)}return a==="cpf"?t.jsx(Be,{className:`input-text-${r}`,label:o,type:"text",name:r,id:r,mask:"999.999.999-99",required:!0,fullWidth:!0},r):t.jsx(B,{className:`input-${a}-${r}`,label:o,type:a,name:r,id:r,required:!0},r)})}),vt=({form:e,serviceName:r,...o})=>{var P,_,j,g;const a=$e.getProvider(r),[l,s]=h.useState(!1),[n,c]=h.useState(!1),[d,m]=h.useState(((P=a==null?void 0:a.getInitialRegisterMode)==null?void 0:P.call(a))||"first"),[p,y]=h.useState(!1),v=h.useRef(null),u=Y.get(o,"additional_data.has_use_terms_page",!1),W=Y.get(o,"url",""),M=Y.get(o,"isExternalAuthEnabled",!1),A=Le(o),f=ee(),{namespaces:{laravel:k,inertia:b}}=te,T=async R=>{if(R.preventDefault(),l||(s(!0),a!=null&&a.handleSubmit&&await a.handleSubmit({formRef:v,serviceName:r,setLoading:s,router:oe},{isRegister:n,setIsRegister:c,registerMode:d,setRegisterMode:m,isPasswordRecovery:p,setIsPasswordRecovery:y})))return;const V=new FormData;we(v,V,e),oe.post(`/integrations/${r}/credentials`,V,{onFinish:()=>s(!1)})};return t.jsx(ze,{pageScripts:A,pageURL:W,children:t.jsxs(qe,{pageId:"external-auth-page",headComponent:M?null:t.jsx(se,{className:"btn-login-header",href:"/acesse-sua-conta",variant:"outlined",size:"large",sx:{fontWeight:700,height:{xs:"36px",sm:"48px"}},children:t.jsx("b",{children:f("header.clean.login",k)})}),children:[t.jsx(Ee,{title:f("labels.integrations.title",b)}),t.jsx("div",{className:"login-left-container"}),t.jsxs(x,{className:"login-center-container",alignItems:"center",children:[t.jsx(C,{mb:"30px",sx:{fontSize:"24px",fontWeight:600},children:f("labels.integrations.title",b)}),t.jsx(x,{maxWidth:"450px",width:"100%",children:t.jsxs("form",{ref:v,onSubmit:T,children:[(_=a==null?void 0:a.renderModeSelector)==null?void 0:_.call(a,{isRegister:n,setIsRegister:c,registerMode:d,setRegisterMode:m,isPasswordRecovery:p,setIsPasswordRecovery:y}),a!=null&&a.renderFormFields?a.renderFormFields({form:e,serviceName:r,formRef:v,state:{isRegister:n,setIsRegister:c,registerMode:d,setRegisterMode:m,isPasswordRecovery:p,setIsPasswordRecovery:y}}):t.jsx(bt,{form:e}),t.jsxs(C,{sx:{fontSize:"1.4rem",textAlign:"center"},children:[f("labels.checkout.terms.line_1_alt",b),t.jsx(ae,{href:"/politica-de-privacidade",target:"_blank",className:"link-privacy-policy",external:!0,children:f("labels.checkout.terms.line_2",b)}),u&&t.jsxs(t.Fragment,{children:[f("labels.checkout.terms.line_3",b),t.jsx(ae,{href:"/termos-de-uso",target:"_blank",external:!0,className:"link-terms-page",children:f("labels.checkout.terms.line_4",b)})]}),"."]}),t.jsx(se,{className:"btn-login",fullWidth:!0,type:"submit",sx:{marginTop:"20px"},children:((j=a==null?void 0:a.getSubmitButtonText)==null?void 0:j.call(a,{isRegister:n,setIsRegister:c,registerMode:d,setRegisterMode:m,isPasswordRecovery:p,setIsPasswordRecovery:y},f,b))||f("externalAuth.cta.submit",b,{defaultValue:"Enviar"})}),(g=a==null?void 0:a.renderAfterSubmit)==null?void 0:g.call(a,{isRegister:n,setIsRegister:c,registerMode:d,setRegisterMode:m,isPasswordRecovery:p,setIsPasswordRecovery:y})]})})]}),t.jsx("div",{className:"login-right-container"})]})})},Wt=e=>t.jsx(vt,{...e});export{Wt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.