1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[320],{60320:(n,t,e)=>{e.d(t,{p:()=>nT});var i=e(37876),r=e(14232),o=e(28888),l=e(80427);function a(){let n=(0,o._)(["\n padding: 20px 10px;\n display: flex;\n justify-content: center;\n background-color: ",";\n \n @media (max-width: 768px) {\n padding: 10px 10px 0px 10px;\n }\n"]);return a=function(){return n},n}function s(){let n=(0,o._)(["\n width: 100%;\n max-width: 1340px;\n text-align: center;\n"]);return s=function(){return n},n}function c(){let n=(0,o._)(['\n font-family: "Montserrat";\n font-weight: 500;\n font-size: 36px;\n line-height: 50px;\n letter-spacing: -1px;\n text-align: center;\n color: #313131;\n margin-top: ',";\n margin-bottom: ",";\n padding: ",";\n\n @media screen and (max-width: 768px) {\n font-size: ",";\n margin-top: ",";\n margin-bottom: ",";\n\n ","\n }\n"]);return c=function(){return n},n}function d(){let n=(0,o._)(["\n position: relative;\n width: 100%;\n"]);return d=function(){return n},n}function p(){let n=(0,o._)(["\n gap: 20px;\n display: flex;\n overflow-x: auto;\n scroll-behavior: smooth;\n padding: 0;\n scrollbar-width: none;\n -ms-overflow-style: none;\n\n @media screen and (max-width: 768px) {\n gap: 15px;\n }\n\n &::-webkit-scrollbar {\n display: none;\n }\n\n cursor: grab;\n &:active {\n cursor: grabbing;\n }\n"]);return p=function(){return n},n}function x(){let n=(0,o._)(["\n position: absolute;\n top: 50%;\n ",";\n transform: translateY(-50%);\n width: 44px;\n height: 44px;\n border-radius: 50%;\n background-color: white;\n border: 1px solid #0064c0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 10;\n transition: all 0.2s ease;\n opacity: ",";\n pointer-events: ",";\n\n &:hover {\n background-color: #f5f5f5;\n }\n\n &:focus {\n outline: none;\n }\n"]);return x=function(){return n},n}function u(){let n=(0,o._)(["\n width: 100%;\n height: 4px;\n background-color: #ffffff; // Color de fondo del contenedor\n border-radius: 2px;\n margin-top: ",";\n margin-bottom: ",";\n overflow: hidden;\n\n @media screen and (max-width: 768px) {\n margin-top: ",";\n margin-bottom: ",";\n }\n"]);return u=function(){return n},n}function f(){let n=(0,o._)(["\n height: 100%;\n background-color: #808080;\n border-radius: 2px;\n width: ","%;\n transition: width 0.3s ease;\n"]);return f=function(){return n},n}let h=l.Ay.section(a(),n=>n.$background||"#fff"),g=l.Ay.div(s()),m=l.Ay.h2.withConfig({shouldForwardProp:n=>"isSubtitle"!==n&&"type"!==n})(c(),n=>"category"===n.type?"5px":"unset",n=>"category"===n.type?"18px":"unset",n=>"category"===n.type?"unset":" 0px 0px 10px 0px",n=>"category"===n.type?"26px":"32px",n=>"category"===n.type?"0px":"unset",n=>"category"===n.type?"14px":"unset",n=>n.isSubtitle&&"\n font-size: 26px;\n line-height: 36px;\n "),y=l.Ay.div(d()),w=l.Ay.div(p()),b=l.Ay.button(x(),n=>"left"===n.direction?"left: -20px":"right: -20px",n=>n.disabled?"0":"1",n=>n.disabled?"none":"auto"),v=l.Ay.div(u(),n=>"category"===n.type?"25px":"10px",n=>(n.type,"20px"),n=>(n.type,"10px"),n=>"category"===n.type?"15px":"20px"),j=l.Ay.div(f(),n=>n.width);function C(){let n=(0,o._)(["\n width: 185px;\n position: relative;\n background: white;\n border-radius: 8px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-end;\n display: inline-flex;\n\n @media screen and (max-width: 768px) {\n width: 160px;\n }\n"]);return C=function(){return n},n}function k(){let n=(0,o._)(["\n align-self: stretch;\n height: 185px;\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n display: inline-flex;\n\n @media screen and (max-width: 768px) {\n height: 160px;\n }\n\n img {\n flex: 1 1 0;\n height: 185px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n object-fit: cover;\n\n @media screen and (max-width: 768px) {\n height: 160px;\n }\n }\n"]);return k=function(){return n},n}function z(){let n=(0,o._)(["\n align-self: stretch;\n padding: 10px;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 5px;\n display: flex;\n"]);return z=function(){return n},n}function L(){let n=(0,o._)(["\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 5px;\n display: flex;\n"]);return L=function(){return n},n}function A(){let n=(0,o._)(["\n align-self: stretch;\n justify-content: flex-start;\n align-items: center;\n gap: 3px;\n display: inline-flex;\n"]);return A=function(){return n},n}function $(){let n=(0,o._)(['\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #0064c0;\n font-size: 14px;\n font-family: "Montserrat";\n font-weight: 700;\n line-height: 18px;\n word-wrap: break-word;\n']);return $=function(){return n},n}function _(){let n=(0,o._)(['\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #0064c0;\n font-size: 12px;\n font-family: "Montserrat";\n font-weight: 400;\n line-height: 18px;\n word-wrap: break-word;\n']);return _=function(){return n},n}function H(){let n=(0,o._)(['\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #0064c0;\n font-size: 12px;\n font-family: "Montserrat";\n font-weight: 400;\n line-height: 18px;\n word-wrap: break-word;\n']);return H=function(){return n},n}function M(){let n=(0,o._)(["\n align-self: stretch;\n justify-content: flex-start;\n align-items: center;\n gap: 10px;\n display: inline-flex;\n"]);return M=function(){return n},n}function S(){let n=(0,o._)(['\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #585858;\n font-size: 14px;\n font-family: "Montserrat";\n font-weight: 600;\n line-height: 18px;\n word-wrap: break-word;\n']);return S=function(){return n},n}function F(){let n=(0,o._)(['\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #585858;\n font-size: 12px;\n font-family: "Montserrat";\n font-weight: 400;\n text-decoration: line-through;\n line-height: 16px;\n word-wrap: break-word;\n']);return F=function(){return n},n}function I(){let n=(0,o._)(["\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 5px;\n display: flex;\n"]);return I=function(){return n},n}function D(){let n=(0,o._)(["\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n"]);return D=function(){return n},n}function N(){let n=(0,o._)(['\n padding-left: 5px;\n padding-right: 5px;\n background: #d0e3f1;\n border-radius: 4px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n display: flex;\n\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #004785;\n font-size: 11px;\n font-family: "Montserrat";\n font-weight: 400;\n line-height: 20px;\n word-wrap: break-word;\n']);return N=function(){return n},n}function P(){let n=(0,o._)(["\n text-align: left;\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 5px;\n display: flex;\n a {\n text-decoration: none;\n }\n"]);return P=function(){return n},n}function E(){let n=(0,o._)(['\n align-self: stretch;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 10px;\n display: inline-flex;\n\n flex: 1 1 0;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #585858;\n font-size: 12px;\n font-family: "Montserrat";\n font-weight: 400;\n line-height: 15px;\n word-wrap: break-word;\n cursor: pointer;\n\n /* Limit to 2 lines */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n\n &:hover {\n color: #0064c0;\n }\n']);return E=function(){return n},n}function U(){let n=(0,o._)(["\n bottom: 10px;\n left: 10px;\n right: 10px;\n position: absolute;\n align-self: stretch;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n gap: 5px;\n display: flex;\n\n button {\n @media screen and (max-width: 768px) {\n height: 32px !important;\n padding: 6px 12px !important;\n font-size: 12px !important;\n line-height: 17px !important;\n }\n }\n"]);return U=function(){return n},n}function B(){let n=(0,o._)(['\n align-self: stretch;\n padding-left: 12px;\n padding-right: 12px;\n padding-top: 6px;\n padding-bottom: 6px;\n background: #0064c0;\n border-radius: 6px;\n justify-content: center;\n align-items: center;\n gap: 10px;\n display: inline-flex;\n border: none;\n cursor: pointer;\n\n color: white;\n font-size: 14px;\n font-family: "Montserrat";\n font-weight: 500;\n line-height: 24px;\n word-wrap: break-word;\n\n &:hover:not(:disabled) {\n background: #0056a3;\n }\n\n &:disabled {\n background: #ccc;
1\n cursor: not-allowed;\n }\n']);return B=function(){return n},n}function T(){let n=(0,o._)(["\n width: 35px;\n height: 35px;\n left: 10px;\n top: 10px;\n position: absolute;\n border-radius: 100px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 22px;\n display: flex;\n\n svg {\n position: absolute;\n width: 35px;\n height: 35px;\n }\n"]);return T=function(){return n},n}function q(){let n=(0,o._)(['\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n color: #e92215;\n font-size: 12px;\n font-family: "Montserrat";\n font-weight: 700;\n line-height: 20px;\n word-wrap: break-word;\n z-index: 1;\n']);return q=function(){return n},n}let G=l.Ay.div(C()),R=l.Ay.div(k()),W=l.Ay.div(z()),K=l.Ay.div(L()),O=l.Ay.div(A()),X=l.Ay.div($()),Z=l.Ay.div(_()),V=l.Ay.div(H()),Y=l.Ay.div(M()),J=l.Ay.div(S()),Q=l.Ay.div(F());l.Ay.div(I()),l.Ay.div(D()),l.Ay.div(N());let nn=l.Ay.div(P()),nt=l.Ay.div(E()),ne=l.Ay.div(U());l.Ay.button(B());let ni=l.Ay.div(T()),nr=l.Ay.div(q());var no=e(21035),nl=e(91585),na=e(82845),ns=e(42945),nc=e(33100),nd=e(15244),np=e(50),nx=e(48230),nu=e.n(nx),nf=e(89099),nh=e(35024),ng=e(2492),nm=e(60652),ny=e(4572),nw=e(47269);let nb=n=>{var t;let{product:e,onAddToCart:o,listId:l="carousel",listName:a="Carrusel de productos"}=n,s=(0,nf.useRouter)(),{productCardFormat:c}=(0,np.k)(),{trackSelectItem:d,trackAddToCart:p}=(0,na.s)(),[x,u]=(0,r.useState)(!1),[f,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{h(!1)},[e.id]);let g=n=>{d(l,a,{id:e.id,name:e.name||"Producto",category:"General",price:(0,nl.p_)(e),currency:"USD"}),n.ctrlKey||n.metaKey||1===n.button||2===n.button||h(!0)};(0,nl.D8)(e);let m=(0,nl.Ln)(e),y=(0,nl.ac)(e),w=(0,nl.ou)(e),b=(0,nl.KK)(e,y,w,!1),v=(0,nl.hk)(c,e,!1),j=(0,nl.gS)(v),C=(0,ns.VG)(e.resources),k=e.name||"",z=nd.A.calculatePreviusAf(b,m),L=e&&e.cmItmPvpNafIva?Number(e.cmItmPvpNafIva).toFixed(2):"0.00",A=b&&b.length>0,$=A&&(null==(t=b[0])?void 0:t.present)?b[0].present:0,_=e.active&&e.publish,{createShoppingCartWithProducts:H,loading:M}=(0,nh.Z)(),{selectedProduct:S}=(0,ng.W)(e),F=async()=>{if((null==e?void 0:e.type)==="collection"){h(!0),s.push("/productos/".concat(nd.A.UiConvertstring(e.name),"/").concat(e.id));return}let n=null==S?void 0:S.id;if((null==e?void 0:e.type)==="configurable"||(null==e?void 0:e.ego)){h(!0);try{await (null==o?void 0:o(e.id,n))}finally{h(!1)}}else{let n=[{add:!0,clickGo:!1,cmDeliveryType:2,ego:!1,enabled:!0,hasEgo:e.hasEgo||!1,idPromotion:null,itmChargeIva:!0,itmInternalCode:e.itmInternalCode||e.cmInternalCode||"",itmPercentageDiscount:null,pickup:!0,present:null,productId:e.id,productIdOld:"",quantity:1,type:e.type,stockBloqueado:e.stockBloqueado||0,stockCd:e.stockCd||0,stockLocales:e.stockLocales||0,stockWeb:e.stockWeb||0,resultStock:e.resultStock}];await H([e],n),p({id:e.id,name:e.name||"Producto",category:"General",price:(0,nl.p_)(e),currency:"USD",quantity:1})}};return e.active?(0,i.jsxs)(i.Fragment,{children:[(M||f)&&(0,i.jsx)(nm.A,{loading:!0}),(0,i.jsxs)(G,{children:[(0,i.jsx)(R,{children:(0,i.jsx)(nu(),{href:"/productos/".concat(nd.A.UiConvertstring(e.name),"/").concat(e.id),onClick:g,children:(0,i.jsx)(no.A,{src:x?nc.gX:nd.A.getOptimizedResUrl(C,600),alt:k,onError:()=>{u(!0)}})})}),(0,i.jsxs)(W,{children:[(0,i.jsxs)(K,{children:[j&&(0,i.jsxs)(O,{children:[(0,i.jsxs)(X,{children:["$",v.price.toFixed(2)]}),(0,i.jsx)(Z,{children:"|"}),(0,i.jsxs)(V,{children:[v.coutas," cuotas"]})]}),(0,i.jsxs)(Y,{children:[(0,i.jsxs)(J,{children:["$",z]}),A&&(0,i.jsxs)(Q,{children:["$",L]})]})]}),(0,i.jsx)(ny.YD,{tags:e.tags}),(0,i.jsx)(nn,{children:(0,i.jsx)(nu(),{href:"/productos/".concat(nd.A.UiConvertstring(e.name),"/").concat(e.id),onClick:g,children:(0,i.jsx)(nt,{children:k})})}),(0,i.jsx)("div",{style:{height:"40px"}})]}),(0,i.jsx)(ne,{children:(0,i.jsx)(nw.$$,{onClick:F,disabled:!_,height:"38px",width:"100%",children:(null==e?void 0:e.type)==="collection"?"Ver colecci\xf3n":"Agregar al carrito"})}),A&&$>0&&(0,i.jsxs)(ni,{children:[(0,i.jsx)("svg",{width:"35",height:"35",viewBox:"0 0 35 35",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M16.253 1.2841C16.9826 0.702318 18.0174 0.702318 18.747 1.2841L19.6966 2.04138C20.2033 2.44548 20.8744 2.57897 21.4972 2.39955L22.6644 2.06331C23.561 1.805 24.5171 2.20103 24.9685 3.0177L25.556 4.08075C25.8695 4.648 26.4385 5.02816 27.0825 5.10073L28.2895 5.23672C29.2167 5.3412 29.9485 6.07298 30.0529 7.00021L30.1889 8.20717C30.2615 8.85122 30.6417 9.42017 31.2089 9.73368L32.272 10.3212C33.0886 10.7726 33.4847 11.7287 33.2264 12.6253L32.8901 13.7924C32.7107 14.4152 32.8442 15.0864 33.2483 15.5931L34.0056 16.5427C34.5874 17.2722 34.5874 18.3071 34.0056 19.0366L33.2483 19.9863C32.8442 20.493 32.7107 21.1641 32.8901 21.7869L33.2264 22.954C33.4847 23.8507 33.0886 24.8068 32.272 25.2581L31.2089 25.8457C30.6417 26.1592 30.2615 26.7281 30.1889 27.3722L30.0529 28.5791C29.9485 29.5064 29.2167 30.2381 28.2895 30.3426L27.0825 30.4786C26.4385 30.5512 25.8695 30.9313 25.556 31.4986L24.9685 32.5616C24.5171 33.3783 23.561 33.7743 22.6644 33.516L21.4972 33.1798C20.8744 33.0004 20.2033 33.1339 19.6966 33.538L18.747 34.2952C18.0174 34.877 16.9826 34.877 16.253 34.2952L15.3034 33.538C14.7967 33.1339 14.1256 33.0004 13.5028 33.1798L12.3356 33.516C11.439 33.7743 10.4829 33.3783 10.0315 32.5616L9.44401 31.4986C9.1305 30.9313 8.56155 30.5512 7.9175 30.4786L6.71054 30.3426C5.7833 30.2381 5.05153 29.5064 4.94705 28.5791L4.81105 27.3722C4.73849 26.7281 4.35832 26.1592 3.79107 25.8457L2.72803 25.2581C1.91136 24.8068 1.51
1532 23.8507 1.77364 22.954L2.10988 21.7869C2.2893 21.1641 2.1558 20.493 1.75171 19.9863L0.994423 19.0366C0.412645 18.3071 0.412645 17.2722 0.994423 16.5427L1.75171 15.5931C2.1558 15.0864 2.2893 14.4152 2.10988 13.7924L1.77364 12.6253C1.51533 11.7287 1.91136 10.7726 2.72803 10.3212L3.79107 9.73368C4.35832 9.42017 4.73849 8.85122 4.81105 8.20717L4.94705 7.00021C5.05153 6.07298 5.7833 5.3412 6.71054 5.23672L7.9175 5.10073C8.56155 5.02816 9.1305 4.648 9.44401 4.08075L10.0315 3.0177C10.4829 2.20103 11.439 1.805 12.3356 2.06331L13.5028 2.39955C14.1256 2.57897 14.7967 2.44548 15.3034 2.04138L16.253 1.2841Z",fill:"#FFDCDA"})}),(0,i.jsxs)(nr,{children:["-",$,"%"]})]})]})]}):(0,i.jsx)(i.Fragment,{})};function nv(){let n=(0,o._)(["\n width: ",";\n height: ",";\n\n border-radius: 12px;\n background: #ffffff;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n padding-bottom: ",";\n\n @media (max-width: 768px) {\n width: 160px;\n height: auto;\n padding-bottom: 15px;\n }\n"]);return nv=function(){return n},n}function nj(){let n=(0,o._)(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: ",';\n padding: 8px 12px;\n border-top-left-radius: 12px;\n border-top-right-radius: 12px;\n background-color: #f9b31e;\n flex-shrink: 0;\n\n @media (max-width: 768px) {\n padding: 6px 10px;\n }\n\n h4 {\n margin: 0;\n padding: 0;\n font-family: "Montserrat";\n font-weight: 600;\n font-size: ',";\n line-height: 20px;\n letter-spacing: -0.3px;\n text-align: center;\n color: #ffffff;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n\n @media (max-width: 768px) {\n font-size: 16px;\n }\n }\n"]);return nj=function(){return n},n}function nC(){let n=(0,o._)(["\n display: flex;\n flex-direction: ",";\n flex: 1;\n align-items: start;\n justify-content: ",";\n gap: ",";\n padding: ",";\n height: ",";\n\n @media (max-width: 768px) {\n flex-direction: column;\n padding: 0;\n gap: 0;\n align-items: flex-start;\n height: auto;\n }\n"]);return nC=function(){return n},n}function nk(){let n=(0,o._)(["\n margin: ",";\n text-align: start;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n\n @media (max-width: 768px) {\n margin: 12px 12px 0px 12px;\n text-align: start;\n align-items: flex-start;\n }\n\n div {\n margin: ",';\n\n @media (max-width: 768px) {\n margin: -5px 0;\n }\n }\n\n .text-promo {\n font-family: "Montserrat";\n font-weight: 500;\n font-size: ',';\n letter-spacing: -0.3px;\n vertical-align: middle;\n color: #585858;\n\n @media (max-width: 768px) {\n font-size: 16px;\n }\n }\n\n .text-percentage {\n line-height: 1;\n text-align: start;\n font-family: "Montserrat";\n font-weight: 700;\n font-size: ',";\n letter-spacing: -1.75px;\n vertical-align: middle;\n color: #f9b31e;\n\n @media (max-width: 768px) {\n font-size: 48px;\n text-align: start;\n }\n }\n"]);return nk=function(){return n},n}function nz(){let n=(0,o._)(["\n width: ",";\n height: ",";\n position: relative;\n flex-shrink: 0;\n overflow: visible;\n display: flex;\n align-items: center;\n justify-content: center;\n\n @media (max-width: 768px) {\n width: 100%;\n height: 180px;\n overflow: hidden;\n }\n\n img {\n position: relative;\n z-index: 1;\n max-width: ",";\n max-height: ",";\n width: auto;\n height: auto;\n object-fit: contain;\n\n @media (max-width: 768px) {\n max-width: 140px;\n max-height: 130px;\n }\n }\n"]);return nz=function(){return n},n}function nL(){let n=(0,o._)(["\n position: absolute;\n top: 70%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: ",";\n height: ",';\n background-image: url("/images/icons/ellipse.png");\n background-position: center center;\n background-repeat: no-repeat;\n background-size: contain;\n z-index: 0;\n\n @media (max-width: 768px) {\n width: 110px;\n height: 110px;\n }\n']);return nL=function(){return n},n}let nA=l.Ay.div(nv(),n=>2===n.$totalCards||3===n.$totalCards?"433px":4===n.$totalCards?"320px":"184px",n=>(3===n.$totalCards||n.$totalCards,"auto"),n=>3===n.$totalCards||4===n.$totalCards?"0":"35px"),n$=l.Ay.div(nj(),n=>n.$height,n=>3===n.$totalCards||4===n.$totalCards?"18px":"16px"),n_=l.Ay.div.withConfig({shouldForwardProp:n=>!["$isHorizontal","totalCards"].includes(n)})(nC(),n=>n.$isHorizontal?"row":"column",n=>n.$isHorizontal?"space-around":"center",n=>(n.$isHorizontal,"0"),n=>n.$isHorizontal&&n.totalCards<=3?"0 40px":4===n.totalCards?"0 10px":"0",n=>n.$isHorizontal?"180px":"auto"),nH=l.Ay.div(nk(),n=>n.$isHorizontal?"40px 20px 0px 0px":"10px 20px 10px 20px",n=>(n.$isHorizontal,"0"),n=>n.$isHorizontal?"14px":"16px",n=>(n.$isHorizontal,"48px")),nM=l.Ay.div.withConfig({shouldForwardProp:n=>!["$isHorizontal","totalCards"].includes(n)})(nz(),n=>
1n.$isHorizontal?"170px":"100%",n=>(n.$isHorizontal,"180px"),n=>n.$isHorizontal&&2===n.totalCards||n.$isHorizontal&&3===n.totalCards?"100px":n.$isHorizontal&&4===n.totalCards?"130px":"180px",n=>n.$isHorizontal&&3===n.totalCards?"100px":n.$isHorizontal&&4===n.totalCards?"130px":"180px"),nS=l.Ay.div.withConfig({shouldForwardProp:n=>!["$isHorizontal","totalCards"].includes(n)})(nL(),n=>n.$isHorizontal&&2===n.totalCards?"100px":n.$isHorizontal&&3===n.totalCards?"130px":(n.$isHorizontal&&n.totalCards,"150px"),n=>n.$isHorizontal&&3===n.totalCards?"130px":(n.$isHorizontal&&n.totalCards,"150px")),nF=n=>{var t;let e=n.headerHeight||"37px",r=n.totalCards||4,o=r<=4;return(0,i.jsxs)(nA,{$totalCards:r,children:[(0,i.jsx)(n$,{$height:e,$totalCards:r,children:(0,i.jsx)("h4",{children:n.title})}),(0,i.jsxs)(n_,{$isHorizontal:o,totalCards:r,children:[(0,i.jsxs)(nH,{$isHorizontal:o,children:[(0,i.jsx)("span",{className:"text-promo",children:"Hasta"}),(0,i.jsx)("div",{children:(0,i.jsxs)("span",{className:"text-percentage",children:[n.discount,"%"]})}),(0,i.jsx)("span",{className:"text-promo",children:"de descuento"})]}),(0,i.jsxs)(nM,{$isHorizontal:o,totalCards:r,children:[(0,i.jsx)(nS,{$isHorizontal:o,totalCards:r}),(0,i.jsx)(no.A,{src:null!=(t=n.image)?t:"/images/examples/categoria1.png",alt:"Categoria",fluid:!0})]})]})]})};var nI=e(30762),nD=e(84155),nN=e(33955),nP=e(51070),nE=e(28611),nU=e(46233);let nB=n=>{let t=n.split(" "),e=0,i=1;for(let n of t)e+n.length+1>12?(i++,e=n.length):e+=n.length+1;return Math.min(i,2)},nT=n=>{let{type:t,title:e,background:o,categories:l,loading:a,products:s,isSubtitle:c=!1}=n,{isMovil:d}=(0,nN.b)(),{openModal:p}=(0,nP.cB)(),{openRightModal:x,isRightModalOpen:u}=(0,nE.hS)(),{refetchId:f}=(0,nU.q)(""),[C,k]=(0,r.useState)(!1),{trackViewItemList:z}=(0,na.s)(),L=(0,r.useRef)(""),A=(0,r.useMemo)(()=>({listId:e?(0,nD.d)(e):"carousel",listName:e||"Carrusel de productos"}),[e]);(0,r.useEffect)(()=>{if("products"!==t||a||!s||0===s.length)return;let n="".concat(A.listId,"|").concat(s.map(n=>n.id).join(","));n!==L.current&&(L.current=n,z(A.listId,A.listName,s.map(n=>({id:n.id,name:n.name||"Producto",category:"General",price:(0,nl.p_)(n),currency:"USD"}))))},[t,a,s,A,z]);let $=(0,r.useCallback)(async(n,t)=>{if(!u&&!C){k(!0);try{let e=await f(n);e&&e.id===n&&(p(e,t),x((0,i.jsx)(nP.Lt,{})))}finally{k(!1)}}},[f,p,x,u,C]),_=(0,r.useMemo)(()=>"category"===t&&l&&0!==l.length&&2===Math.max(...l.map(n=>nB(n.name)))?"56px":"37px",[t,l]),H=(0,r.useRef)(null),[M,S]=(0,r.useState)(0),[F,I]=(0,r.useState)(0),[D,N]=(0,r.useState)(!1),[P,E]=(0,r.useState)(!0),[U,B]=(0,r.useState)(!1),[T,q]=(0,r.useState)(0),[G,R]=(0,r.useState)(0);(0,r.useEffect)(()=>{if(H.current){let{scrollWidth:n,clientWidth:t}=H.current;I(n-t),E(n>t)}},[s,l,a]),(0,r.useEffect)(()=>{let n=setTimeout(()=>{if(H.current){let{scrollWidth:n,clientWidth:t}=H.current,e=n-t;I(e),E(e>0),N(!1),S(0)}},100);return()=>clearTimeout(n)},[s,l,a]),(0,r.useEffect)(()=>{if(!H.current)return;let n=new ResizeObserver(()=>{if(H.current){let{scrollWidth:n,clientWidth:t}=H.current,e=n-t;I(e),E(e>0)}});return n.observe(H.current),()=>{n.disconnect()}},[]);let W=n=>{H.current&&H.current.scrollBy({left:"left"===n?-500:500,behavior:"smooth"})},K=F>0?Math.max(10,M/F*100):10;return a||"category"!==t||l&&0!==l.length?(0,i.jsx)("div",{style:{marginTop:""===e?"30px":"0"},children:(0,i.jsx)(h,{$background:o,children:(0,i.jsxs)(g,{children:[a?(0,i.jsx)(nI.EA,{width:300,height:30}):(0,i.jsx)(m,{isSubtitle:c,type:t,children:e}),(0,i.jsxs)(y,{children:[(0,i.jsx)(w,{ref:H,onScroll:()=>{if(H.current){let{scrollLeft:n,scrollWidth:t,clientWidth:e}=H.current,i=t-e;S(n),N(n>0),E(n<i-10),i!==F&&I(i)}},onMouseDown:n=>{B(!0),H.current&&(q(n.pageX-H.current.offsetLeft),R(H.current.scrollLeft))},onMouseUp:()=>{B(!1)},onMouseMove:n=>{if(U&&(n.preventDefault(),H.current)){let t=n.pageX-H.current.offsetLeft;H.current.scrollLeft=G-(t-T)*2}},onMouseLeave:()=>{B(!1)},children:a?(0,i.jsx)(nI.Zy,{count:7,skeletonProps:{width:"184px",height:"340px"}}):(0,i.jsxs)(i.Fragment,{children:["products"===t&&(0,i.jsx)(i.Fragment,{children:s&&s.map((n,t)=>(0,i.jsx)(nb,{product:n,onAddToCart:$,listId:A.listId,listName:A.listName},"product-".concat(t)))}),"category"===t&&(0,i.jsx)(i.Fragment,{children:l&&l.map((n,t)=>{let e=(0,nD.d)(n.name),r=(0,nD.d)(n.idCategoryFormat),o=l.length;return(0,i.jsx)(nu(),{href:"/descuentos/category/".concat(e,"/").concat(r,"?sortBy=-promotionTH"),style:{textDecoration:"none",color:"inherit"},children:(0,i.jsx)(nF,{title:n.name,discount:n.present.toString(),image:n.image.resourceUrl,headerHeight:_,totalCards:o})},"category-".concat(t))})})]})}
1),!d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b,{direction:"left",onClick:()=>W("left"),disabled:!D,children:(0,i.jsx)("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M18.25 9H1.75M1.75 9L8.5 2.25M1.75 9L8.5 15.75",stroke:"#0064C0",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})}),(0,i.jsx)(b,{direction:"right",onClick:()=>W("right"),disabled:!P,children:(0,i.jsx)("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M1.75 9H18.25M18.25 9L11.5 2.25M18.25 9L11.5 15.75",stroke:"#0064C0",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),s&&s.length>6||l&&l.length>4?(0,i.jsx)(v,{type:t,children:(0,i.jsx)(j,{width:K})}):null]})})}):(0,i.jsx)(i.Fragment,{})}},60652:(n,t,e)=>{e.d(t,{A:()=>i.A});var i=e(18159)},84155:(n,t,e)=>{e.d(t,{d:()=>i});let i=n=>n?n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,""):""}}]);
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.