1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[207],{42945:function(e,t,r){var n=r(57437);r(2265);var o=r(96507),i=r(85269),l=r(52805);let s=l.l.AlumLight.palette.primary.contrastText,a=l.l.AlumLight.palette.primary.main;t.Z=e=>{let{texto:t,iconoUrl:r}=e;return(0,n.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center",height:"70px",px:4,backgroundColor:"#ffffff",borderRadius:"12px",boxShadow:"none",position:"relative",overflow:"hidden"},children:[(0,n.jsx)(o.Z,{sx:{position:"absolute",left:0,top:0,bottom:0,width:"10px",background:"linear-gradient(to bottom, ".concat(s,", ").concat(a,")"),borderTopLeftRadius:"12px",borderBottomLeftRadius:"12px"}}),(0,n.jsx)(o.Z,{sx:{display:"flex",alignItems:"center",ml:2,zIndex:5},children:(0,n.jsx)(i.Z,{variant:"h6",fontWeight:800,sx:{color:s,textTransform:"uppercase",letterSpacing:"0.1em",fontSize:{xs:".8rem",sm:"1.25rem"},mr:r?1.5:0},children:t})})]})}},46969:function(e,t,r){var n=r(57437),o=r(2265),i=r(41101),l=r(22135),s=r(22079),a=r(13457),c=r(91797),d=r(46776),u=r(52151),m=r(96507),x=r(85269),h=r(54986),p=r(80565),f=r(37682),g=r(72502),b=r(47042),v=r(49600),j=r(33533),Z=r(83329),y=r(52481),w=r(53758),k=r(16691),C=r.n(k),L=r(44551),E=r(52805),S=r(40749);let R=E.l.AlumLight.palette.primary.contrastText;t.Z=e=>{var t,r;let{open:k,onClose:E,modo:z,modoContexto:T="cxco",pagoSeleccionado:A,onMetodoPago:I,pdfUrl:M}=e,D=(0,i.Z)(),P=(0,l.Z)(D.breakpoints.down("sm")),[W,F]=(0,o.useState)(!1),N="otros"===T?(null==A?void 0:A.concepto)||"Sin descripci\xf3n":null==A?void 0:A.descripIngreso,H=null!==(r=null!==(t=null==A?void 0:A.pendiente)&&void 0!==t?t:null==A?void 0:A.monto)&&void 0!==r?r:0,_=(null==A?void 0:A.referencia)||0,O=async()=>{F(!0);try{let e=document.createElement("a"),t=new Date,r=t.toLocaleDateString("sv-SE").replaceAll("-",""),n=t.toTimeString().split(" ")[0].replaceAll(":",""),o="orden_pago_".concat(r,"_").concat(n,".pdf");e.href=M,e.download=o,document.body.appendChild(e),e.click(),document.body.removeChild(e)}finally{setTimeout(()=>F(!1),800)}};return(0,n.jsxs)(s.Z,{open:k,onClose:E,fullWidth:!0,fullScreen:P&&"pdf"===z,maxWidth:"pdf"===z?"md":"xs",scroll:"paper",keepMounted:!0,PaperProps:{sx:{borderRadius:{xs:0,sm:3},boxShadow:6,backgroundColor:"#fafafa",height:{xs:["100dvh","100vh"],sm:"auto"},display:"flex",flexDirection:"column"}},children:[(0,n.jsxs)(a.Z,{direction:"row",justifyContent:"space-between",alignItems:"center",px:3,pt:3,pb:2,sx:{position:"sticky",top:0,zIndex:2,bgcolor:"#fafafa",borderBottom:e=>"1px solid ".concat(e.palette.divider)},children:[(0,n.jsx)(c.Z,{sx:{p:0,fontWeight:700,fontSize:"1.25rem",color:R},children:"seleccion"===z?"Concepto a pagar":"Orden de Pago"}),(0,n.jsx)(d.Z,{onClick:E,"aria-label":"Cerrar",children:(0,n.jsx)(j.Z,{})})]}),(0,n.jsx)(u.Z,{dividers:!0,sx:{backgroundColor:"#ffffff",display:"flex",flexDirection:"column",flex:1,minHeight:0,p:{xs:0,sm:0},..."pdf"===z&&{height:{xs:"auto",sm:"70vh"}}},children:"seleccion"===z?(0,n.jsxs)(m.Z,{sx:{px:3,py:2},children:[(0,n.jsxs)(x.Z,{variant:"body1",sx:{mb:1.5,color:R,fontSize:{xs:"0.75rem",sm:".9rem"}},children:[(0,n.jsx)("strong",{children:N}),(0,n.jsx)("br",{}),"Monto:"," ",(0,n.jsx)(x.Z,{component:"span",sx:{fontWeight:"bold",fontSize:{xs:"0.83rem",sm:".9rem"}},children:new Intl.NumberFormat("es-MX",{style:"currency",currency:"MXN"}).format(H)})]}),(0,n.jsx)(h.Z,{sx:{my:2}}),(0,n.jsx)(x.Z,{variant:"subtitle2",sx:{mb:1.5,color:R},children:"Selecciona un m\xe9todo de pago:"}),(0,n.jsx)(p.Z,{disablePadding:!0,children:[{tipo:"N",label:"Pago en Bancos",icon:(0,n.jsx)(Z.Z,{})},{tipo:"L",label:"Pago en L\xednea BBVA",icon:(0,n.jsx)(C(),{src:"/assets/bbva.png",alt:"bbva",width:32,height:32,style:{objectFit:"contain"}})}].map(e=>{let{tipo:t,label:r,icon:o}=e;return(0,n.jsx)(f.ZP,{disableGutters:!0,children:(0,n.jsx)(g.Z,{onClick:()=>I(_,t),sx:{borderRadius:2,px:2,py:1,"&:hover":{backgroundColor:"#f0f0f0"}},children:(0,n.jsxs)(a.Z,{direction:"row",spacing:2,alignItems:"center",children:[o,(0,n.jsx)(x.Z,{variant:"body2",sx:{fontWeight:500},children:r})]})})},t)})})]}):M?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(m.Z,{sx:{flex:1,minHeight:0,overflow:"hidden"},children:(0,n.jsx)(m.Z,{sx:{height:{xs:"100%",sm:"70vh"},overflow:"auto"},children:(0,n.jsx)(S.Z,{urlDocument:M,maxHeight:"100%",initialZoom:1},M)})}),(0,n.jsx)(m.Z,{sx:{position:"sticky",bottom:0,zIndex:2,backgroundColor:"#fff",borderTop:e=>"1px solid ".concat(e.palette.divider),px:{xs:2,sm:3},py:{xs:2,sm:2},paddingBottom:"max(env(safe-area-inset-bottom), 16px)"},children:(0,n.jsxs)(a.Z,{direction:P?"column":"row",spacing:2,justifyContent:"center",alignItems:"center",children:[(0,n.jsx)(L.Z,{onClick:O,variant:"contained",color:"primary",fullWidth:P,sx:{borderRadius:2},loading:W,loadingIndicator:(0,n.jsxs)(a.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,n.jsx)(b.Z,{color:"inherit",size:18}),(0,n.jsx)(x.Z,{variant:"body2",fontWeight:500,color:"white",children:"Descargando..."})]}),children:!W&&(0,n.jsxs)(a.Z,{direction:"row",spacing:1,alignItems:"center",justifyContent:"center",children:[(0,n.jsx)(y.Z,{fontSize:"small"}),(0,n.jsx)(x.Z,{variant:"body2",fontWeight:500,children:"Descargar"})]})}),(0,n.jsx)(v.Z,{onClick:()=>{let e=window.open(M,"_blank");e||alert("No se pudo abrir el PDF.")},sx:{borderRadius:2},variant:"outlined",color:"primary",startIcon:(0,n.jsx)(w.Z,{}),fullWidth:P,children:"Ver PDF"})]})})]}):(0,n.jsx)(a.Z,{alignItems:"center",justifyContent:"center",sx:{py:4},children:(0,n.jsx)(b.Z,{})})})]})}},40749:function(e,t,r){var n=r(57437),o=r(2265),i=r(53188),l=r(38832),s=r(7931);r(45884),r(9958);var a=r(41101),c=r(22135),d=r(96507),u=r(13457),m=r(53741),x=r(46776),h=r(67248),p=r(85269),f=r(54986),g=r(73295),b=r(92339),v=r(75874),j=r(6517),Z=r(16258),y=r(7289),w=r(11068),k=r(2899),C=r(52481),L=r(54742);i.default.GlobalWorkerOptions.workerSrc=new r.U(r(44898)).toString(),t.Z=e=>{let{urlDocument:t,maxHeight:r="65vh",initialZoom:i=1,initialRotate:E=0,onError:S,toolbar:R=!0,enableDownload:z=!0,enablePrint:T=!0,downloadFileName:A}=e,I=(0,a.Z)(),M=(0,c.Z)(I.breakpoints.down("sm")),[D,P]=(0,o.useState)(0),[W,F]=(0,o.useState)(1),[N,H]=(0,o.useState)(i),[_,O]=(0,o.useState)(E),[B,U]=(0,o.useState)("page"),[X,Y]=(0,o.useState)(!1),[G,V]=(0,o.useState)(!1),q=(0,o.useRef)(null),J=(0,o.useRef)(null),K=(0,o.useRef)(!1),Q=(0,o.useRef)({x:0,y:0,left:0,top:0}),$=(0,o.useRef)(null),ee=(0,o.useRef)(0),et=(0,o.useCallback)(()=>{let e=J.current;e&&(e.scrollLeft=Math.max((e.scrollWidth-e.clientWidth)/2,0),e.scrollTop=Math.max((e.scrollHeight-e.clientHeight)/2,0))},[]);(0,o.useEffect)(()=>{F(1),H(1),O(E),U("width")},[t,E]);let er=(0,o.useCallback)(e=>{if(!J.current||!q.current)return;let t=J.current,r=q.current,n=t.clientWidth-16,o=t.clientHeight-8;if("width"===e){U("width"),H(1),setTimeout(et,0);return}U("page"),H(1),setTimeout(()=>{let e=r.querySelector("canvas");if(!e)return;
1let t=e.width,i=e.height;t&&i&&(H(Math.max(Math.min(n/t,o/i),.2)),setTimeout(et,0))},60)},[et]),en=e=>{let{numPages:t}=e;P(t),F(1),setTimeout(()=>er("width"),0)};(0,o.useEffect)(()=>{let e=()=>{B&&er(B)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[er,B]),(0,o.useEffect)(()=>{let e=J.current;if(!e)return;let t=t=>{0===t.button&&(K.current=!0,e.style.cursor="grabbing",Q.current={x:t.clientX,y:t.clientY,left:e.scrollLeft,top:e.scrollTop})},r=t=>{K.current&&(t.preventDefault(),e.scrollLeft=Q.current.left-(t.clientX-Q.current.x),e.scrollTop=Q.current.top-(t.clientY-Q.current.y))},n=()=>{K.current=!1,e.style.cursor="grab"};return e.addEventListener("mousedown",t),e.addEventListener("mousemove",r),e.addEventListener("mouseup",n),e.addEventListener("mouseleave",n),e.addEventListener("dragstart",e=>e.preventDefault()),e.style.cursor="grab",()=>{e.removeEventListener("mousedown",t),e.removeEventListener("mousemove",r),e.removeEventListener("mouseup",n),e.removeEventListener("mouseleave",n),e.removeEventListener("dragstart",e=>e.preventDefault())}},[]),(0,o.useEffect)(()=>{let e=J.current;if(!e)return;let t=t=>{if(1!==t.touches.length)return;let r=Date.now();r-ee.current<280&&(U(null),H(e=>(setTimeout(et,0),e>1.3?1:1.8))),ee.current=r;let n=t.touches[0];$.current={x:n.clientX,y:n.clientY,left:e.scrollLeft,top:e.scrollTop}},r=t=>{if(1!==t.touches.length||!$.current)return;let r=t.touches[0];e.scrollLeft=$.current.left-(r.clientX-$.current.x),e.scrollTop=$.current.top-(r.clientY-$.current.y)},n=()=>{$.current=null};return e.addEventListener("touchstart",t,{passive:!0}),e.addEventListener("touchmove",r,{passive:!0}),e.addEventListener("touchend",n),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",n)}},[et]);let eo=(0,o.useMemo)(()=>{if(!J.current)return;let e=J.current.clientWidth-16;return"width"===B?e:Math.max(e*N,100)},[N,B]),ei=e=>{null==S||S(e),console.error("PDF error:",e)},el=(0,o.useCallback)(e=>{if(!e)return"documento.pdf";try{let t=new URL(e,window.location.href),r=(t.pathname.split("/").filter(Boolean).pop()||"documento").trim();return r.toLowerCase().endsWith(".pdf")?r:"".concat(r,".pdf")}catch(e){return"documento.pdf"}},[]),es=(0,o.useCallback)(async()=>{if(!t)return;Y(!0);let e=(A||el(t)).trim()||"documento.pdf";try{let r=await fetch(t);if(!r.ok)throw Error("HTTP ".concat(r.status));let n=await r.blob(),o=URL.createObjectURL(n),i=document.createElement("a");i.href=o,i.download=e,i.rel="noopener",document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(o),1500)}catch(n){let r=document.createElement("a");r.href=t,r.download=e,r.target="_blank",r.rel="noopener noreferrer",document.body.appendChild(r),r.click(),r.remove(),ei(n)}finally{Y(!1)}},[A,el,ei,t]),ea=(0,o.useCallback)(async()=>{t&&window.open(t,"_blank","noopener,noreferrer")},[ei,t]),ec=M?"calc(100vh - 60px)":r;return(0,n.jsx)(n.Fragment,{children:R?(0,n.jsxs)(d.Z,{sx:{border:"1px solid ".concat(I.palette.divider),borderRadius:2,overflow:"hidden",bgcolor:"background.paper",display:"flex",flexDirection:"column"},children:[(0,n.jsxs)(u.Z,{direction:"row",alignItems:"center",spacing:M?.5:1,sx:{position:"sticky",top:0,zIndex:1,px:1.5,py:M?1:1.5,bgcolor:"light"===I.palette.mode?"grey.50":"background.default",borderBottom:"1px solid ".concat(I.palette.divider),flexWrap:"wrap"},children:[(0,n.jsx)(m.Z,{title:"Anterior",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>F(e=>Math.max(1,e-1)),disabled:W<=1,children:(0,n.jsx)(w.Z,{fontSize:M?"medium":"small"})})})}),(0,n.jsxs)(u.Z,{direction:"row",alignItems:"center",spacing:.5,sx:{mx:1},children:[(0,n.jsx)(h.Z,{size:"small",value:W||"",onChange:e=>{let t=parseInt(e.target.value,10);isNaN(t)||F(Math.min(Math.max(1,t),D||1))},inputProps:{inputMode:"numeric",pattern:"[0-9]*",style:{width:M?44:56,textAlign:"center",padding:"6px 0"},"aria-label":"Ir a p\xe1gina"}}),(0,n.jsxs)(p.Z,{variant:"body2",color:"text.secondary",children:["/ ",D||0]})]}),(0,n.jsx)(m.Z,{title:"Siguiente",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>F(e=>
1Math.min(D,e+1)),disabled:W>=D,children:(0,n.jsx)(k.Z,{fontSize:M?"medium":"small"})})})}),(0,n.jsx)(f.Z,{orientation:"vertical",flexItem:!0,sx:{mx:1,display:{xs:"none",sm:"block"}}}),(0,n.jsx)(m.Z,{title:"Zoom -",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>{U(null),H(e=>{if(e<=1)return e;let t=Math.max(.2,+(e-.1).toFixed(2));return setTimeout(et,0),t})},children:(0,n.jsx)(v.Z,{fontSize:M?"medium":"small"})})})}),(0,n.jsx)(d.Z,{sx:{width:160,px:1,display:{xs:"none",sm:"block"}},children:(0,n.jsx)(g.ZP,{size:"small",value:Math.round(100*N),min:100,max:500,valueLabelDisplay:"auto",valueLabelFormat:e=>"".concat(e,"%"),onChange:(e,t)=>{U(null);let r=Array.isArray(t)?t[0]:t,n=+(r/100).toFixed(2);H(n),setTimeout(et,0)},"aria-label":"Zoom",sx:{"& .MuiSlider-valueLabel":{top:"unset",bottom:"-78px",transformOrigin:"center top","& *":{color:"white"},"&::before":{display:"none"}}}})}),(0,n.jsx)(m.Z,{title:"Zoom +",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>{U(null),H(e=>{let t=Math.min(5,+(e+.1).toFixed(2));return setTimeout(et,0),t})},children:(0,n.jsx)(b.Z,{fontSize:M?"medium":"small"})})})}),(0,n.jsx)(m.Z,{title:"Ajustar al ancho",children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>er("width"),children:(0,n.jsx)(j.Z,{fontSize:M?"medium":"small"})})}),(0,n.jsx)(m.Z,{title:"Ajustar a la p\xe1gina",children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>er("page"),children:(0,n.jsx)(Z.Z,{fontSize:M?"medium":"small"})})}),(0,n.jsx)(f.Z,{orientation:"vertical",flexItem:!0,sx:{mx:1,display:{xs:"none",sm:"block"}}}),(0,n.jsx)(m.Z,{title:"Rotar 90\xb0",children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:()=>O(e=>(e+90)%360),children:(0,n.jsx)(y.Z,{fontSize:M?"medium":"small"})})}),(z||T)&&(0,n.jsx)(f.Z,{orientation:"vertical",flexItem:!0,sx:{mx:1,display:{xs:"none",sm:"block"}}}),z&&(0,n.jsx)(m.Z,{title:"Descargar",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:es,disabled:!t||X,children:(0,n.jsx)(C.Z,{fontSize:M?"medium":"small"})})})}),T&&(0,n.jsx)(m.Z,{title:"Imprimir",children:(0,n.jsx)("span",{children:(0,n.jsx)(x.Z,{size:M?"medium":"small",onClick:ea,disabled:!t||G,children:(0,n.jsx)(L.Z,{fontSize:M?"medium":"small"})})})}),(0,n.jsxs)(p.Z,{variant:"body2",color:"text.secondary",sx:{ml:"auto",display:{xs:"none",sm:"block"}},children:["P\xe1gina ",W," de ",D||0]})]}),(0,n.jsx)(d.Z,{ref:J,sx:{position:"relative",width:"100%",height:ec,maxHeight:ec,overflow:"auto",backgroundColor:I.palette.background.default,cursor:"grab",touchAction:"pan-x pan-y",flex:1,minHeight:0},children:(0,n.jsx)(d.Z,{sx:{width:"100%",height:"100%",p:1},children:(0,n.jsx)(d.Z,{ref:q,sx:{userSelect:"none",mx:"width"===B&&.001>Math.abs(N-1)?"auto":0,width:"fit-content"},children:(0,n.jsx)(l.Z,{file:t,onLoadSuccess:en,onLoadError:ei,loading:(0,n.jsx)(p.Z,{sx:{p:2},children:"Cargando PDFâ¦"}),error:(0,n.jsx)(p.Z,{sx:{p:2},children:"No se pudo cargar el documento."}),children:(0,n.jsx)(s.Z,{pageNumber:W,width:eo,rotate:_,renderAnnotationLayer:!M,renderTextLayer:!M})})})})})]}):(0,n.jsx)(d.Z,{sx:{border:"1px solid ".concat(I.palette.divider),borderRadius:2,overflow:"hidden",bgcolor:"background.paper",display:"flex",flexDirection:"column"},children:(0,n.jsx)(d.Z,{ref:J,sx:{position:"relative",width:"100%",height:ec,maxHeight:ec,overflow:"auto",backgroundColor:I.palette.background.default,cursor:"grab",touchAction:"pan-x pan-y",flex:1,minHeight:0},children:(0,n.jsx)(d.Z,{sx:{width:"100%",height:"100%",p:1},children:(0,n.jsx)(d.Z,{ref:q,sx:{userSelect:"none",mx:"width"===B&&.001>Math.abs(N-1)?"auto":0,width:"fit-content"},children:(0,n.jsx)(l.Z,{file:t,onLoadSuccess:en,onLoadError:ei,loading:(0,n.jsx)(p.Z,{sx:{p:2},children:"Cargando PDFâ¦"}),error:(0,n.jsx)(p.Z,{sx:{p:2},children:"No se pudo cargar el documento."}),children:(0,n.jsx)(s.Z,{pageNumber:W,width:eo,rotate:_,renderAnnotationLayer:!M,renderTextLayer:!M})})})})})})})}},46084:function(e,t,r){r.d(t,{i:function(){return l}});var n=r(2265),o=r(11296),i=r(98855);
1function l(e){let[t,r]=(0,n.useState)({item:void 0,items:[],loading:!0,error:null}),l=(0,n.useRef)(null),s=(0,n.useMemo)(()=>new o.b(new i.N),[]),a=(0,n.useCallback)(async e=>{var t,n;let{refcxcobr:o,enLinea:i}=e;null===(t=l.current)||void 0===t||t.abort(),l.current=new AbortController;try{let e=await s.regenCxcobr(o,i);if(e){let{object:t}=e,n=t.find(e=>e.referencia=o);if(!n)throw Error("CxCobr no fue posible recuperar");return r(e=>({...e,item:n})),n}}catch(t){let e={error:"ERROR",message:null!==(n=t.message)&&void 0!==n?n:"Error inesperado"};if("AbortError"===t.name)return;r(t=>({...t,loading:!1,error:e}))}},[]),c=(0,n.useCallback)(async e=>{var t,n;let{matri:o,evento:i}=e;null===(t=l.current)||void 0===t||t.abort(),l.current=new AbortController;try{let e=await s.selCxcobrEvento(o,i);if(e){let{object:t}=e;return r(e=>({...e,items:t})),t[0]}}catch(t){let e={error:"ERROR",message:null!==(n=t.message)&&void 0!==n?n:"Error inesperado"};if("AbortError"===t.name)return;r(t=>({...t,loading:!1,error:e}))}},[]),d=(0,n.useCallback)(async e=>{var t,n;let{matri:o,evento:i}=e;null===(t=l.current)||void 0===t||t.abort(),l.current=new AbortController;try{let e=await s.selCxcobrCoperacioEvento(o,i);if(e){let{object:t}=e;return r(e=>({...e,item:t[0]})),t[0]}}catch(t){let e={error:"ERROR",message:null!==(n=t.message)&&void 0!==n?n:"Error inesperado"};if("AbortError"===t.name)return;r(t=>({...t,loading:!1,error:e}))}},[]),u=(0,n.useCallback)(async e=>{var t,n;let{matri:o,evento:i,enLinea:a}=e;null===(t=l.current)||void 0===t||t.abort(),l.current=new AbortController;try{let e=await s.generarCoperacionEvento(o,i,a);if(e){let{object:t}=e;return r(e=>({...e,item:t[0]})),t[0]}}catch(t){let e={error:"ERROR",message:null!==(n=t.message)&&void 0!==n?n:"Error inesperado"};if("AbortError"===t.name)return;r(t=>({...t,loading:!1,error:e}))}},[]);return{...t,regenCxCobr:a,getCxcobrEvento:c,getCxcobrCoperacioEvento:d,generarCoperacionEvento:u}}}}]);
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.