PageSourceSearch

https://frontelectrofrenorr.herokuapp.com/static/js/main.8c026b6a.chunk.js

js frontelectrofrenorr.herokuapp.com collected 2026-10-03 14:48:29 UTC 27,611 bytes, 2 lines download raw bytes

1(this.webpackJsonpfrontelectrofrenorr=this.webpackJsonpfrontelectrofrenorr||[]).push([[0],{178:function(e,t,o){},179:function(e,t,o){},192:function(e,t,o){"use strict";o.r(t);var n=o(0),r=o.n(n),a=o(57),c=o.n(a),i=(o(178),o(3)),l=o(7),d=o(95),s=(o(31),o.p+"static/media/LOGO_RPP2.37d33709.png"),u=o.p+"static/media/whatsapp.0f74af52.png",f=(o(179),o(278)),b=o(70),h=o(283),p=o(279),j=o(127),x=o(285),O=o(122),m=o(290),g=o(276),C=o(291),S=o(293),y=o(292),v=o(277),w=o(205),N=o(289),D=o(281),F=o(286),W=o(206),I=o(87),k=o(273),M=o(142),P=o.n(M),T=o(143),A=o.n(T),E=o(128),R=o(144),H=o(284),_=o(275),z=o(287),L=o(150),U=o(141),V=o.n(U),B=o(38),J=o(269),G=o(1),Y=Object(f.a)((function(e){return{root:{"& > *":{margin:e.spacing(1),width:"50%"},fab:{position:"fixed",bottom:e.spacing(2),right:e.spacing(2)}}}}));function q(){var e=window;return{width:e.innerWidth,height:e.innerHeight}}var $=r.a.forwardRef((function(e,t){return Object(G.jsx)(p.a,Object(d.a)({elevation:6,ref:t,variant:"filled"},e))}));var Q=function(){var e,t,o,a=Object(n.useState)(!1),c=Object(l.a)(a,2),d=c[0],f=c[1],p=Object(n.useState)(!1),M=Object(l.a)(p,2),T=M[0],U=M[1],Q=Object(n.useState)(!1),Z=Object(l.a)(Q,2),K=Z[0],X=Z[1],ee=Object(n.useState)(!1),te=Object(l.a)(ee,2),oe=te[0],ne=te[1],re=Object(n.useState)(!1),ae=Object(l.a)(re,2),ce=ae[0],ie=ae[1],le=Object(n.useState)(!1),de=Object(l.a)(le,2),se=de[0],ue=de[1],fe=Object(n.useState)(""),be=Object(l.a)(fe,2),he=be[0],pe=be[1],je=Object(n.useState)([]),xe=Object(l.a)(je,2),Oe=xe[0],me=xe[1],ge=Object(n.useState)([]),Ce=Object(l.a)(ge,2),Se=Ce[0],ye=Ce[1],ve=Object(n.useState)([]),we=Object(l.a)(ve,2),Ne=we[0],De=we[1],Fe=Object(n.useState)([]),We=Object(l.a)(Fe,2),Ie=We[0],ke=We[1],Me=Object(n.useState)(0),Pe=Object(l.a)(Me,2),Te=Pe[0],Ae=Pe[1],Ee=Object(n.useState)(0),Re=Object(l.a)(Ee,2),He=Re[0],_e=Re[1],ze=Object(n.useState)(0),Le=Object(l.a)(ze,2),Ue=Le[0],Ve=Le[1],Be=Object(n.useState)(0),Je=Object(l.a)(Be,2),Ge=Je[0],Ye=Je[1],qe=Object(n.useState)(0),$e=Object(l.a)(qe,2),Qe=$e[0],Ze=$e[1],Ke=Object(n.useState)(0),Xe=Object(l.a)(Ke,2),et=Xe[0],tt=Xe[1],ot=Object(n.useState)([]),nt=Object(l.a)(ot,2),rt=nt[0],at=nt[1],ct=Object(n.useState)(""),it=Object(l.a)(ct,2),lt=it[0],dt=it[1],st=Object(n.useState)(""),ut=Object(l.a)(st,2),ft=ut[0],bt=ut[1],ht=Object(n.useState)(""),pt=Object(l.a)(ht,2),jt=pt[0],xt=pt[1],Ot=Object(n.useState)("factura"),mt=Object(l.a)(Ot,2),gt=mt[0],Ct=mt[1],St=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),yt=Object(n.useState)(""),vt=Object(l.a)(yt,2),wt=vt[0],Nt=vt[1],Dt=Object(n.useState)(""),Ft=Object(l.a)(Dt,2),Wt=Ft[0],It=Ft[1],kt=Object(n.useState)(""),Mt=Object(l.a)(kt,2),Pt=Mt[0],Tt=Mt[1],At=Object(n.useState)(""),Et=Object(l.a)(At,2),Rt=Et[0],Ht=Et[1],_t=Object(n.useState)(""),zt=Object(l.a)(_t,2),Lt=zt[0],Ut=zt[1],Vt=r.a.useState(0),Bt=Object(l.a)(Vt,2),Jt=(Bt[0],Bt[1],Y(),function(){var e=Object(n.useState)(q()),t=Object(l.a)(e,2),o=t[0],r=t[1];return Object(n.useEffect)((function(){function e(){r(q())}return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),o}().width,Object(n.useState)([])),Gt=Object(l.a)(Jt,2),Yt=Gt[0],qt=Gt[1],$t=Object(n.useState)([]),Qt=Object(l.a)($t,2),Zt=Qt[0],Kt=Qt[1],Xt=Object(B.a)(),eo=Object(J.a)(Xt.breakpoints.down("md")),to=Te>0,oo=Te>0&&Te!==He,no=[{field:"cardCode",headerName:"Cod. Usuario",flex:.7,minWidth:90,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Cod. Usuario",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"cardName",headerName:"Nombre",flex:1,minWidth:120,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Nombre",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"docDate",headerName:"Fecha Documento",flex:.8,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Fecha Documento",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"docDueDate",headerName:"Fecha Vencimiento Doc",flex:.9,minWidth:130,sortable:!0,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Fecha Vencimiento Doc",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"state",headerName:"Estado",flex:.7,minWidth:100,sortable:!0,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Estado",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"dias_mora",headerName:"D\xedas en mora",flex:.6,minWidth:100,sortable:!0,align:"center",headerAlign:"center",renderHeader:function(e){return Object(G.jsx)(E.a,{title:"D\xedas en mora",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"billNum",headerName:"Num. Factura",flex:.8,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Num. Factura",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"saldoAux",headerName:"Saldo",flex:1,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Saldo",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}}],ro=[{field:"cardCode",headerName:"Cod. Usuario",flex:.7,minWidth:90,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Cod. Usuario",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"cardName",headerName:"Nombre",flex:1,minWidth:120,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Nombre",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"docDate",headerName:"Fecha Documento",flex:.8,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Fecha Documento",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"docDueDate",headerName:"Fecha Vencimiento Doc",flex:.9,minWidth:130,sortable:!0,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Fecha Vencimiento Doc",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"billNum",headerName:"Num. Factura",flex:.8,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Num. Factura",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}},{field:"saldoAux",headerName:"Saldo",flex:1,minWidth:110,editable:!1,renderHeader:function(e){return Object(G.jsx)(E.a,{title:"Saldo",arrow:!0,placement:"top",children:Object(G.jsx)("span",{style:{color:"#000",fontWeight:"bold"},children:e.colDef.headerName})})}}],ao=Object(R.a)({components:{MuiDataGrid:{styleOverrides:{root:{border:"none"},columnHeaders:{backgroundColor:"#F25C05",color:"#000",fontWeight:"bold",borderRadius:"10px"},columnHeaderTitle:{whiteSpace:"normal",textAlign:"center",lineHeight:1.2,fontWeight:"bold"}}}}});Object(n.useEffect)((function(){var e=document.createElement("script");
1e.src="https://checkout.wompi.co/widget.js",e.async=!0,document.body.appendChild(e);var t=localStorage.getItem("username"),o=localStorage.getItem("password");if(void 0!==t&&""!==t){var n={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({card_code:t,pass:o})};fetch("https://electrofrenorr.herokuapp.com/client/login",n).then((function(e){return e.json()})).then((function(e){200!==e.Status?console.log(e.Message):(ne(!0),co(t,e.Payload.Token),setTimeout((function(){io(t,e.Payload.Token)}),300))})).catch((function(e){console.log(e)}))}}),[]);var co=function(e,t){var o="https://electrofrenorr.herokuapp.com/facturas/cliente/"+e.toString();fetch(o,{method:"GET"}).then((function(e){return e.json()})).then((function(e){var t=0,o=0;Ve(0),Ye(0),Ze(0),tt(0);var n=0,r=e.map((function(e){var r=new Date,a=e.DocDueDate.split("/"),c=new Date(a[2],a[1]-1,a[0]),i=r.getTime()-c.getTime(),l=Math.ceil(i/864e5)-1,d=l>0?"Vencida":l>=-5?"Por Vencer":"Sin Vencer";return Ze(e["Cupo Asignado"]),n=e["Cupo Asignado"],o+=e.Saldo,"Vencida"===d&&(t+=e.Saldo),{cardCode:e.CardCode,cardName:e.CardName,docDate:e.DocDate,docDueDate:e.DocDueDate,billNum:e.DocNum,saldo:e.Saldo,saldoAux:"$"+new Intl.NumberFormat("COP").format(e.Saldo),doc_entry:e.DocEntry,state:d,dias_mora:l}}));Ye(t),Ve(o),tt(n-o),me(r)})).catch((function(e){console.log(e)}))},io=function(e,t){var o="https://electrofrenorr.herokuapp.com/cliente/ofertas/"+e.toString();fetch(o,{method:"GET"}).then((function(e){return e.json()})).then((function(e){var t=e.map((function(e){return{cardCode:e.CardCode,cardName:e.CardName,docDate:e.DocDate,docDueDate:e.DocDueDate,billNum:e.DocNum,saldo:e.Saldo,saldoAux:"$"+new Intl.NumberFormat("COP").format(e.Saldo),doc_entry:e.DocEntry}}));De(t)})).catch((function(e){console.log(e)}))},lo=function(e,t){var o=Se,n=Ie;switch(t){case"bills":o=Oe.filter((function(t){return e.includes(t.billNum)}));break;case"offers":n=Ne.filter((function(t){return e.includes(t.billNum)}))}Ae(0),_e(0);var r=[],a=0,c="",i=o.concat(n),l=new Date,d=l.getFullYear(),s=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),b=String(l.getMinutes()).padStart(2,"0"),h=String(l.getSeconds()).padStart(2,"0"),p="".concat(d).concat(s).concat(u).concat(f).concat(b).concat(h);i.forEach((function(e){a+=e.saldo,c=e.cardCode,r.push({reference:c+"-"+p,id:e.billNum,amount:e.saldo,doc_entry:e.doc_entry})})),Ae(100*a),_e(100*a),dt(c+"-"+p),at(r),ue(!0),ye(o),ke(n)},so=function(){X(!1)};return Object(G.jsxs)("div",{children:[oe?Object(G.jsx)(H.a,{theme:ao,children:Object(G.jsxs)(N.a,{sx:{backgroundColor:"#050A0E",color:"#fff",p:2},children:[Object(G.jsxs)(w.a,{variant:"h4",sx:{textAlign:"center",mt:2,color:"#fff",fontWeight:"bold",fontStyle:"italic"},children:["\xa1Hola, ",(null===(e=Oe[0])||void 0===e?void 0:e.cardName)||"Cliente","!"]}),Object(G.jsxs)(x.a,{container:!0,spacing:2,sx:{height:{md:"calc(100vh - 120px)",xs:"auto"}},children:[Object(G.jsxs)(x.a,{item:!0,xs:12,md:8,sx:{display:"flex",flexDirection:"column",gap:2},children:[Object(G.jsxs)(N.a,{sx:(t={flex:1,display:"flex"},Object(i.a)(t,"flex",{md:1,xs:"unset"}),Object(i.a)(t,"flexDirection","column"),t),children:[Object(G.jsx)(w.a,{variant:"h6",sx:{mb:1,fontWeight:"bold",fontStyle:"italic"},children:"\xa1TUS FACTURAS PENDIENTES!"}),Object(G.jsx)(N.a,{sx:{bgcolor:"#fff",borderRadius:4,flex:1},children:Oe.length>0?Object(G.jsx)(O.a,{autoHeight:eo,getRowId:function(e){return e.billNum},rows:Oe,columns:no,hideFooter:!0,checkboxSelection:!0,sx:{color:"#000",border:"none",backgroundColor:"#fff",borderRadius:2},selectionModel:Yt,onSelectionModelChange:function(e){qt(e),e.length?lo(e,"bills"):(lo([],"bills"),ue(!1))}}):Object(G.jsx)(w.a,{sx:{textAlign:"center",py:2},children:"Estimado Cliente, No tiene facturas pendientes por pagar."})})]}),Object(G.jsxs)(N.a,{sx:(o={flex:1,display:"flex"},Object(i.a)(o,"flex",{md:1,xs:"unset"}),Object(i.a)(o,"flexDirection","column"),o),children:[Object(G.jsx)(w.a,{variant:"h6",sx:{mb:1,fontWeight:"bold",fontStyle:"italic"},children:"\xa1TUS COTIZACIONES!"}),Object(G.jsx)(N.a,{sx:{bgcolor:"#fff",borderRadius:4,flex:1},children:Ne.length>0?Object(G.jsx)(O.a,{autoHeight:eo,getRowId:function(e){return e.billNum},rows:Ne,columns:ro,hideFooter:!0,checkboxSelection:!0,sx:{color:"#000",border:"none",backgroundColor:"#fff",borderRadius:2},selectionModel:Zt,onSelectionModelChange:function(e){Kt(e),e.length?lo(e,"offers"):(lo([],"offers"),ue(!1))}}):Object(G.jsx)(w.a,{sx:{textAlign:"center",py:2},children:"Estimado Cliente, No tiene ofertas disponibles en el momento."})})]})]}),Object(G.jsx)(x.a,{item:!0,xs:12,md:4,children:Object(G.jsxs)(N.a,{sx:{display:"flex",flexDirection:"column",gap:2,mt:5},children:[[["Total Cartera",Ue],["Total Vencido",Ge],["Cupo Asignado",Qe],["Cupo Disponible",et]].map((function(e){var t=Object(l.a)(e,2),o=t[0],n=t[1];return Object(G.jsxs)(N.a,{sx:{display:"flex",width:"100%",columnGap:"5px",mb:1.2,borderRadius:"18px",overflow:"hidden"},children:[Object(G.jsx)(N.a,{sx:{flex:"0 0 45%",bgcolor:"#F25C05",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",px:1.5,py:1,fontWeight:"bold",textAlign:"center",fontSize:"0.95rem",lineHeight:1.2},children:o}),Object(G.jsxs)(N.a,{sx:{flex:1,bgcolor:"#fff",color:"#000",display:"flex",alignItems:"center",justifyContent:"center",px:1.5,py:1,fontWeight:"bold",textAlign:"center",fontSize:"0.95rem"},children:[St.format(n),"\xa0COP"]})]},o)})),Object(G.jsxs)(_.a,{spacing:2,children:[Object(G.jsx)(z.a,{fullWidth:!0,value:"Valor facturas seleccionad
1as: ".concat(St.format(Te/100)," COP"),readOnly:!0,startAdornment:Object(G.jsx)(m.a,{position:"start",children:Object(G.jsx)(L.a,{checked:to,disableRipple:!0,sx:{p:0,mx:.5}})}),sx:{fontWeight:"bold",bgcolor:"#fff",borderRadius:10,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},input:{textAlign:"start"}}}),Object(G.jsx)(z.a,{fullWidth:!0,placeholder:"Pagar un valor diferente:",disabled:rt.length>1,startAdornment:Object(G.jsx)(m.a,{position:"start",children:Object(G.jsx)(L.a,{checked:oo,disableRipple:!0,sx:{p:0,mx:.5}})}),onChange:function(e){return function(e){var t=e.toString().replace(/[^\d]/g,""),o=100*Number(t);return t&&0!==o?o>He?(pe("El valor a pagar no puede ser mayor al valor de la factura seleccionada"),f(!0),void ue(!1)):(Ae(o),void ue(!0)):(Ae(0),ue(!1),qt([]),Kt([]),at([]),ye([]),void ke([]))}(e.target.value)},sx:{bgcolor:"#fff",borderRadius:10,"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},input:{textAlign:"start"}}}),Object(G.jsx)(w.a,{variant:"caption",sx:{color:"#ccc",mt:.5,fontWeight:"bold",fontStyle:"italic",textAlign:"center"},children:"\xa1Para pagos parciales de una factura, puedes editar el valor a pagar!"})]}),Object(G.jsxs)("form",{onSubmit:function(e){e.preventDefault();var t=e.target,o=[];1===rt.length?o.push({reference:rt[0].reference,id:rt[0].id,amount:Math.round(Te),doc_entry:rt[0].doc_entry}):o=rt.map((function(e){return{reference:e.reference,id:e.id,amount:Math.round(100*e.amount),doc_entry:e.doc_entry}}));var n={facturas:o,total:Math.round(Te).toString()},r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)};fetch("https://electrofrenorr.herokuapp.com/event/create",r).then((function(e){return e.json()})).then((function(e){if(200===e.Status){var o=e.Message,n=document.createElement("input");n.type="hidden",n.name="signature:integrity",n.value=o,t.appendChild(n),t.submit()}else pe(e.Message||e.message||"Error desconocido"),f(!0)})).catch((function(e){pe("No se pudo enviar el registro"),f(!0)}))},action:"https://checkout.wompi.co/p/",method:"GET",style:{width:"100%"},children:[Object(G.jsx)("input",{type:"hidden",name:"public-key",value:"pub_prod_tTJFivVHWPPq61LzO7AQjJO0J3SB2oSd"}),Object(G.jsx)("input",{type:"hidden",name:"currency",value:"COP"}),Object(G.jsx)("input",{type:"hidden",name:"amount-in-cents",value:Math.round(Te)}),Object(G.jsx)("input",{type:"hidden",name:"reference",value:lt}),Object(G.jsx)(N.a,{mt:2,display:"flex",justifyContent:"center",width:"100%",children:Object(G.jsxs)(N.a,{sx:{display:"inline-flex",gap:1,borderRadius:28,overflow:"hidden"},children:[Object(G.jsx)(b.a,{type:"submit",variant:"contained",disabled:!se,startIcon:Object(G.jsx)(V.a,{sx:{fontSize:20}}),sx:{textTransform:"none",fontStyle:"italic",fontWeight:"bold",px:4,backgroundColor:"#F25C05",color:"#fff",borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:"#F25C05"},"&.Mui-disabled":{backgroundColor:"#FFB07B",color:"#fff",opacity:1}},children:"Pagar"}),Object(G.jsx)(b.a,{variant:"contained",onClick:function(){ne(!1),localStorage.clear()},startIcon:Object(G.jsx)(P.a,{sx:{fontSize:20}}),sx:{textTransform:"none",fontStyle:"italic",fontWeight:"bold",px:4,backgroundColor:"#fff",color:"#000",borderRadius:0,boxShadow:"none","&:hover":{backgroundColor:"#f5f5f5"}},children:"Cerrar Sesi\xf3n"})]})})]}),Object(G.jsxs)(N.a,{mt:3,display:"flex",justifyContent:"space-between",alignItems:"center",gap:2,children:[Object(G.jsx)(w.a,{sx:{fontWeight:"bold",fontStyle:"italic"},children:"\xbfTienes dudas o solicitudes sobre el \xe1rea de cartera? Un asesor te atender\xe1 por WhatsApp."}),Object(G.jsx)("a",{href:"https://api.whatsapp.com/send/?phone=573008250414",target:"_blank",rel:"noreferrer",style:{textDecoration:"none"},children:Object(G.jsxs)(N.a,{sx:{position:"relative",display:"inline-block"},children:[Object(G.jsx)(b.a,{variant:"contained",sx:{backgroundColor:"#25D366",color:"#fff",fontWeight:"bold",textTransform:"none",px:4,borderRadius:"24px",boxShadow:"none",fontStyle:"italic","&:hover":{backgroundColor:"#1EBE5D",boxShadow:"none"}},children:"Informaci\xf3n"}),Object(G.jsx)("img",{src:u,alt:"WhatsApp",style:{position:"absolute",right:-9,top:"7%",transform:"translateY(-50%)",width:32,pointerEvents:"none"}})]})})]})]})})]})]})}):Object(G.jsxs)("div",{style:{textAlign:"center",marginTop:"10%",color:"#fff",position:"relative"},children:[Object(G.jsx)("img",{src:s,alt:"Logo",style:{width:300,marginBottom:"20px"}}),Object(G.jsx)("br",{}),Object(G.jsxs)("div",{style:{width:"300px",margin:"0 auto",position:"relative"},children:[Object(G.jsxs)("div",{style:{position:"relative",marginBottom:"15px"},children:[Object(G.jsx)(g.a,{style:{color:"#F25C05",fontSize:"26px",position:"absolute",left:"-40px",top:"50%",transform:"translateY(-50%)"}}),Object(G.jsx)("input",{type:"text",placeholder:"Usuario",onChange:function(e){return bt(e.target.value)},style:{width:"calc(100% - 25px)",padding:"10px",fontSize:"16px",border:"2px s
1olid #F25C05",borderRadius:"6px",outline:"none",textAlign:"center",fontStyle:"italic"}})]}),Object(G.jsxs)("div",{style:{position:"relative",marginBottom:"25px"},children:[Object(G.jsx)(A.a,{style:{color:"#F25C05",fontSize:"26px",position:"absolute",left:"-40px",top:"50%",transform:"translateY(-50%)"}}),Object(G.jsx)("input",{type:"password",placeholder:"Contrase\xf1a",onChange:function(e){return xt(e.target.value)},style:{width:"calc(100% - 25px)",padding:"10px",fontSize:"16px",border:"2px solid #F25C05",borderRadius:"6px",outline:"none",textAlign:"center",fontStyle:"italic"}})]}),Object(G.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:"10px",marginBottom:"20px"},children:[Object(G.jsx)(b.a,{variant:"contained",style:{background:"#F25C05",color:"white",width:"50%",boxShadow:"0px 2px 5px rgba(0,0,0,0.2)"},onClick:function(){return X(!0)},children:"REG\xcdSTRATE"}),Object(G.jsx)(b.a,{variant:"contained",style:{background:"#F25C05",color:"white",width:"51%",boxShadow:"0px 2px 5px rgba(0,0,0,0.2)"},onClick:function(){return function(){var e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({card_code:ft,pass:jt})};fetch("https://electrofrenorr.herokuapp.com/client/login",e).then((function(e){return e.json()})).then((function(e){200!==e.Status?(pe(e.Message),f(!0)):(ne(!0),localStorage.setItem("username",ft),localStorage.setItem("password",jt),co(ft,e.Payload.Token),io(ft,e.Payload.Token))})).catch((function(e){pe("No se pudo iniciar sesi\xf3n"),f(!0)}))}()},children:"INICIAR SESI\xd3N"})]}),Object(G.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",gap:"10px",fontSize:14},children:[Object(G.jsx)(b.a,{variant:"text",style:{color:"#F25C05",textTransform:"none",padding:0,minWidth:"50%",textAlign:"left",fontStyle:"italic"},onClick:function(){return ie(!0)},children:"Olvid\xe9 mi contrase\xf1a"}),Object(G.jsx)(b.a,{variant:"text",style:{color:"#F25C05",textTransform:"none",padding:0,minWidth:"50%",textAlign:"right",fontStyle:"italic"},onClick:function(){return window.location.href="https://electrofrenorr.co/"},children:"Volver a la tienda"})]})]})]}),Object(G.jsx)(h.a,{open:d,autoHideDuration:6e3,onClose:function(){return f(!1)},children:Object(G.jsx)($,{onClose:function(){return f(!1)},severity:"error",sx:{width:"100%"},children:he})}),Object(G.jsx)(h.a,{open:T,autoHideDuration:6e3,onClose:function(){return U(!1)},children:Object(G.jsx)($,{onClose:function(){return U(!1)},severity:"success",sx:{width:"100%"},children:he})}),Object(G.jsxs)(C.a,{open:K,onClose:so,fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{bgcolor:"#050A0E",color:"#fff",borderRadius:3,p:{xs:2,md:4}}},children:[Object(G.jsx)(v.a,{sx:{fontWeight:"bold",fontStyle:"italic",color:"#F25C05",textAlign:"center",pb:0},children:"\xa1Crea tu cuenta!"}),Object(G.jsxs)(y.a,{children:[Object(G.jsxs)(w.a,{sx:{mb:3,textAlign:"center"},children:["Para registrarte ten a mano tu ",Object(G.jsx)("b",{children:"c\xf3digo de usuario"})," y cualquier ",Object(G.jsx)("b",{children:"documento vigente"})," (factura o cotizaci\xf3n)."]}),Object(G.jsxs)(_.a,{spacing:2,children:[Object(G.jsx)(j.a,{autoFocus:!0,label:"C\xf3digo de Usuario",variant:"outlined",fullWidth:!0,onChange:function(e){return Nt(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}}),Object(G.jsx)(j.a,{label:"Contrase\xf1a",type:"password",variant:"outlined",fullWidth:!0,onChange:function(e){return It(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}}),Object(G.jsx)(j.a,{label:"Correo electr\xf3nico",type:"email",variant:"outlined",fullWidth:!0,onChange:function(e){return Ht(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}}),Object(G.jsxs)(I.a,{children:[Object(G.jsx)(k.a,{sx:{color:"#fff",fontWeight:"bold",mb:1},children:"Tipo de Documento"}),Object(G.jsxs)(F.a,{row:!0,defaultValue:"factura",onChange:function(e){return Ct(e.target.value)},children:[Object(G.jsx)(W.a,{value:"factura",control:Object(G.jsx)(D.a,{sx:{color:"#F25C05","&.Mu
1i-checked":{color:"#F25C05"}}}),label:"Factura"}),Object(G.jsx)(W.a,{value:"cotizacion",control:Object(G.jsx)(D.a,{sx:{color:"#F25C05","&.Mui-checked":{color:"#F25C05"}}}),label:"Cotizaci\xf3n"})]})]}),Object(G.jsx)(j.a,{label:"N\xfamero de documento vigente",variant:"outlined",fullWidth:!0,onChange:function(e){return Ut(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}})]})]}),Object(G.jsxs)(S.a,{sx:{px:{xs:2,md:4},pb:3,justifyContent:"center"},children:[Object(G.jsx)(b.a,{onClick:so,sx:{textTransform:"none",fontStyle:"italic",borderRadius:3,px:4,color:"#fff",backgroundColor:"#6c6c6c","&:hover":{backgroundColor:"#7d7d7d"}},children:"Cancelar"}),Object(G.jsx)(b.a,{onClick:function(){var e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({card_code:wt,pass:Wt,mail:Rt,num_doc:parseInt(Lt),is_offer:"factura"!==gt})};fetch("https://electrofrenorr.herokuapp.com/client/create",e).then((function(e){return e.json()})).then((function(e){201!==e.Status?(pe(e.Message),X(!1),f(!0)):(pe(e.Message),X(!1),U(!0))})).catch((function(e){pe("No se pudo iniciar sesi\xf3n"),X(!1),f(!0)}))},sx:{ml:2,textTransform:"none",fontStyle:"italic",fontWeight:"bold",borderRadius:3,px:4,color:"#fff",backgroundColor:"#F25C05","&:hover":{backgroundColor:"#ff7d2b"}},children:"Suscribirse"})]})]}),Object(G.jsxs)(C.a,{open:ce,onClose:function(){return ie(!1)},fullWidth:!0,maxWidth:"sm",PaperProps:{sx:{bgcolor:"#050A0E",color:"#fff",borderRadius:3,p:{xs:2,md:4}}},children:[Object(G.jsx)(v.a,{sx:{fontWeight:"bold",fontStyle:"italic",color:"#F25C05",textAlign:"center",pb:0},children:"Recuperar Contrase\xf1a"}),Object(G.jsxs)(y.a,{children:[Object(G.jsxs)(w.a,{sx:{mb:3,textAlign:"center"},children:["Para cambiar tu clave necesitas la ",Object(G.jsx)("b",{children:"contrase\xf1a maestra"})," de\xa0 Electrofrenor. ",Object(G.jsx)("br",{}),"Solic\xedtala si la has olvidado."]}),Object(G.jsxs)(_.a,{spacing:2,children:[Object(G.jsx)(j.a,{autoFocus:!0,label:"C\xf3digo de Usuario",fullWidth:!0,variant:"outlined",onChange:function(e){return Nt(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}}),Object(G.jsx)(j.a,{label:"Nueva Contrase\xf1a",type:"password",fullWidth:!0,variant:"outlined",onChange:function(e){return It(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}}),Object(G.jsx)(j.a,{label:"Contrase\xf1a Maestra Electrofrenor",type:"password",fullWidth:!0,variant:"outlined",onChange:function(e){return Tt(e.target.value)},InputProps:{sx:{color:"#fff"}},InputLabelProps:{sx:{color:"#ccc"}},sx:{"& .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#ff7d2b"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#F25C05"}}})]})]}),Object(G.jsxs)(S.a,{sx:{pb:3,justifyContent:"center"},children:[Object(G.jsx)(b.a,{onClick:function(){return ie(!1)},sx:{textTransform:"none",fontStyle:"italic",borderRadius:3,px:4,color:"#fff",backgroundColor:"#6c6c6c","&:hover":{backgroundColor:"#7d7d7d"}},children:"Cancelar"}),Object(G.jsx)(b.a,{onClick:function(){var e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({card_code:wt,new_pass:Wt,master_pass:Pt})};fetch("https://electrofrenorr.herokuapp.com/client/change/pass",e).then((function(e){return e.json()})).then((function(e){200!==e.Status?(pe(e.Message),X(!1),f(!0)):(pe(e.Message),X(!1),U(!0))})).catch((function(e){pe("No se pudo iniciar sesi\xf3n"),X(!1),f(!0)}))},sx:{ml:2,textTransform:"none",fontStyle:"italic",fontWeight:"bold",borderRadius:3,px:4,color:"#fff",backgroundColor:"#F25C05","&:hover":{backgroundColor:"#ff7d2b"}},children:"Cambiar Contrase\xf1a"})]})]})]})},Z=function(e){e&&e instanceof Function&&o.e(3).then(o.bind(null,296)).then((function(t){var o=t.getCLS,n=t.getFID,r=t.getFCP,a=t.getLCP,c=t.getTTFB;o(e),n(e),r(e),a(e),c(e)}))};
1c.a.render(Object(G.jsx)(r.a.StrictMode,{children:Object(G.jsx)(Q,{})}),document.getElementById("root")),Z()}},[[192,1,2]]]);
2//# sourceMappingURL=main.8c026b6a.chunk.js.map

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.