PageSourceSearch

https://proquim.vercel.app/_next/static/chunks/app/checkout/page-c83b312aa09e5f95.js

js proquim.vercel.app collected 2026-10-03 07:33:15 UTC 8,357 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8279],{9339:(e,s,a)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var t={callServer:function(){return l.callServer},createServerReference:function(){return c.createServerReference},findSourceMapURL:function(){return i.findSourceMapURL}};for(var r in t)Object.defineProperty(s,r,{enumerable:!0,get:t[r]});let l=a(77304),i=a(4060),c=a(77197)},26846:(e,s,a)=>{Promise.resolve().then(a.bind(a,93576)),Promise.resolve().then(a.bind(a,62272)),Promise.resolve().then(a.bind(a,50762)),Promise.resolve().then(a.bind(a,65095))},51914:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(78340).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},82482:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(78340).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},93576:(e,s,a)=>{"use strict";a.d(s,{default:()=>h});var t=a(95155),r=a(12115),l=a(9673),i=a(5772),c=a(69952),n=a(9339);let m=(0,n.createServerReference)("60181d7f71b4ab702dc4f4533ac6c00fd7a2be7033",n.callServer,void 0,n.findSourceMapURL,"submitOrder");var o=a(82482),d=a(51914);let x=(0,a(78340).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);var u=a(73321),p=a(66609);function h({title:e,description:s}){let{cart:a,isLoaded:n,updateQuantity:h,removeFromCart:b,clearCart:g,getTotalItems:y}=(0,c._)(),[f,v]=(0,r.useState)(!1),[j,N]=(0,r.useState)(null),w=(0,u.useRouter)(),k=async e=>{if(0===a.length)return void N({success:!1,message:"El carrito est\xe1 vac\xedo"});v(!0),N(null);try{let s=await m(e,a);s.success?(g(),N({success:!0,message:s.message}),setTimeout(()=>{w.push("/")},2e3)):N({success:!1,message:s.message||"Error al enviar el pedido"})}catch(e){N({success:!1,message:"Error al enviar el pedido. Por favor, int\xe9ntalo de nuevo."})}finally{v(!1)}};return n?0===a.length?(0,t.jsx)("div",{className:"bg-gray-50 py-12 sm:py-16",children:(0,t.jsx)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)(l.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"text-center py-12 sm:py-16",children:[(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-[#00477D] mb-4",children:"Tu carrito est\xe1 vac\xedo"}),(0,t.jsx)("p",{className:"text-gray-600 mb-6 sm:mb-8 text-sm sm:text-base px-4",children:"A\xf1ade productos al carrito para continuar"}),(0,t.jsx)(l.P.a,{href:"/marcas",className:"inline-block border border-[#00477D] text-[#00477D] py-2 px-6 rounded-full font-medium text-sm sm:text-base hover:bg-[#00477D] hover:text-white transition-colors active:scale-95",whileHover:{scale:1.05},whileTap:{scale:.95},children:"Ver productos"})]})})}):(0,t.jsx)("div",{className:"min-h-screen bg-gray-50 py-8 sm:py-12 lg:py-16",children:(0,t.jsxs)("div",{className:"max-w-6xl mx-auto px-4 sm:px-6 lg:px-8",children:[(0,t.jsxs)(l.P.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"mb-6 sm:mb-8",children:[(0,t.jsx)("h1",{className:"text-2xl sm:text-3xl font-bold text-[#00477D] mb-2",children:e||"Checkout"}),s&&(0,t.jsx)("p",{className:"text-gray-600 text-sm sm:text-base",children:s})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 lg:gap-8",children:[(0,t.jsx)("div",{className:"lg:col-span-2 order-1 lg:order-1",children:(0,t.jsxs)(l.P.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},className:"bg-white rounded-lg shadow-sm p-4 sm:p-6 mb-6",children:[(0,t.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold text-[#00477D] mb-4",children:["Productos (",y(),")"]}),(0,t.jsx)("div",{className:"space-y-3 sm:space-y-4",children:a.map((e,s)=>(0,t.jsxs)(l.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1*s},className:"flex flex-col sm:flex-row items-start sm:items-center gap-3 sm:gap-4 p-3 sm:p-4 border-b border-gray-200 last:border-b-0",children:[(0,t.jsx)("div",{className:"relative w-16 h-16 sm:w-20 sm:h-20 shrink-0 mx-auto 
1sm:mx-0",children:(0,t.jsx)(i.default,{src:e.image,alt:e.name,fill:!0,className:"object-contain"})}),(0,t.jsxs)("div",{className:"flex-1 w-full sm:w-auto text-center sm:text-left",children:[(0,t.jsx)("h3",{className:"font-semibold text-[#00477D] text-sm sm:text-base mb-1",children:e.name}),e.description&&(0,t.jsx)("p",{className:"text-xs sm:text-sm text-gray-500 line-clamp-2",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 w-full sm:w-auto",children:[(0,t.jsx)("button",{onClick:()=>{h(e._id||e.id||e.slug,e.quantity-1)},className:"p-2 rounded-full hover:bg-gray-100 transition-colors active:scale-95","aria-label":"Decrease quantity",children:(0,t.jsx)(o.A,{className:"w-4 h-4 sm:w-5 sm:h-5 text-[#00477D]"})}),(0,t.jsx)("span",{className:"w-12 sm:w-14 text-center font-medium text-sm sm:text-base",children:e.quantity}),(0,t.jsx)("button",{onClick:()=>{h(e._id||e.id||e.slug,e.quantity+1)},className:"p-2 rounded-full hover:bg-gray-100 transition-colors active:scale-95","aria-label":"Increase quantity",children:(0,t.jsx)(d.A,{className:"w-4 h-4 sm:w-5 sm:h-5 text-[#00477D]"})}),(0,t.jsx)("button",{onClick:()=>{b(e._id||e.id||e.slug),p.oR.success("Producto eliminado",{description:`${e.name} fue eliminado del carrito`,duration:2e3})},className:"p-2 rounded-full hover:bg-red-100 transition-colors ml-2 active:scale-95","aria-label":"Remove item",children:(0,t.jsx)(x,{className:"w-4 h-4 sm:w-5 sm:h-5 text-red-500"})})]})]},e._id||e.id||e.slug||s))})]})}),(0,t.jsx)("div",{className:"lg:col-span-1 order-2 lg:order-2",children:(0,t.jsxs)(l.P.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},className:"bg-white rounded-lg shadow-sm p-4 sm:p-6 lg:sticky lg:top-4",children:[(0,t.jsx)("h2",{className:"text-lg sm:text-xl font-semibold text-[#00477D] mb-4 sm:mb-6",children:"Informaci\xf3n de contacto"}),j&&(0,t.jsx)(l.P.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:`p-4 rounded-lg mb-4 ${j.success?"bg-green-50 text-green-800":"bg-red-50 text-red-800"}`,children:j.message}),(0,t.jsxs)("form",{action:k,className:"space-y-3 sm:space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:"Nombre completo *"}),(0,t.jsx)("input",{type:"text",id:"name",name:"name",required:!0,className:"w-full px-3 sm:px-4 py-2 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00477D] focus:border-transparent"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:"Email *"}),(0,t.jsx)("input",{type:"email",id:"email",name:"email",required:!0,className:"w-full px-3 sm:px-4 py-2 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00477D] focus:border-transparent"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",className:"block text-sm font-medium text-gray-700 mb-1",children:"Tel\xe9fono *"}),(0,t.jsx)("input",{type:"tel",id:"phone",name:"phone",required:!0,className:"w-full px-3 sm:px-4 py-2 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00477D] focus:border-transparent"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"message",className:"block text-sm font-medium text-gray-700 mb-1",children:"Mensaje (opcional)"}),(0,t.jsx)("textarea",{id:"message",name:"message",rows:"4",className:"w-full px-3 sm:px-4 py-2 text-sm sm:text-base border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#00477D] focus:border-transparent resize-none"})]}),(0,t.jsx)(l.P.button,{type:"submit",disabled:f,className:"w-full bg-[#00477D] text-white py-3 px-6 rounded-full font-medium text-sm sm:text-base hover:bg-[#003A66] transition-colors disabled:opacity-50 disabled:cursor-not-allowed active:scale-95",whileHover:{scale:f?1:1.02},whileTap:{scale:f?1:.98},children:f?"Enviando...":"Enviar pedido"})]})]})})]})]})}):(0,t.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,t.jsx)("div",{className:"text-[#00477D]",children:"Cargando..."})})}}},e=>{e.O(0,[9673,8500,2629,5772,3632,1957,8441,3794,7358],()=>e(e.s=26846)),_N_E=e.O()}]);

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.