1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9873],{31056:(e,t,l)=>{l.r(t),l.d(t,{default:()=>f});var r=l(95155),n=l(12115),i=l(70898),a=l(15239),o=l(52619),s=l.n(o),c=l(14418),u=l(67947),d=l(18720),m=l(33470),p=l(78139),x=l(21713),h=l(62468);let f=({products:e})=>{var t,l,o,f,v,g,b,y;let[w,j]=(0,n.useState)(0),[N,O]=(0,n.useState)(0),P=(0,c.j)();(0,c.G)(e=>e.cart.items);let[k,C]=(0,n.useState)(!1),[E,S]=(0,n.useState)(null),A=e.slice(w,w+4);return console.log("Related Products: ",e),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:"h1-secondary-medium",children:"Related Products"}),(0,r.jsxs)("div",{className:"my-8 relative w-full max-w-[1719px] mx-auto ",children:[(0,r.jsx)(m.N,{mode:"wait",custom:N,children:(0,r.jsx)(p.P.div,{initial:{x:N>0?300:-300},animate:{x:0},transition:{type:"spring",stiffness:70,damping:20},className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-4 gap-10 relative justify-items-center ",children:null==A?void 0:A.map(e=>{var t,l,n,i,o;return(0,r.jsxs)("div",{className:"group relative flex flex-col justify-evenly items-start w-full xl:w-[101.5%] xl:h-[335.55px] 2xl:w-[100.4%] 2xl:h-[449px] border border-[#D6D6D6] rounded-md bg-white p-4 lg:p-6 overflow-hidden",children:[(0,r.jsx)("div",{className:"w-full flex items-center justify-center xl:h-[225px] 2xl:h-[240px] mb-4",children:(0,r.jsx)(a.default,{src:(null==e||null==(l=e.image)||null==(t=l[1])?void 0:t.path)||(null==e||null==(i=e.image)||null==(n=i[0])?void 0:n.path)||"/default-product-image.svg",alt:null==e?void 0:e.name,width:200,height:100,className:"object-contain h-full w-auto xl:h-[185px] lg:h-[185px] md:h-[185px]",loading:"lazy",sizes:"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, (max-width: 1280px) 33vw, 25vw",quality:80})}),(0,r.jsx)(s(),{href:`/${null==e?void 0:e.sku}`,className:"relative inline-block cursor-pointer group",children:(0,r.jsx)("p",{className:"h6-18-px-medium line-clamp-2 min-h-[3rem]",children:null==e?void 0:e.name})}),(0,r.jsxs)("div",{className:"flex flex-col justify-between min-h-[4.5rem] mt-2",children:[(0,r.jsxs)("h3",{className:"h7-16-px-regular line-clamp-1",children:[null==e||null==(o=e.brand)?void 0:o.name," | ",null==e?void 0:e.availabilityText]}),(0,r.jsx)("p",{className:"h6-18-px-medium group-hover:invisible",children:(0,r.jsx)(h.A,{price:Number(null==e?void 0:e.price)||0,inline:!0,className:"h6-18-px-medium"})})]}),(0,r.jsxs)("div",{className:"absolute bottom-5 xl:bottom-8 left-0 right-0 flex justify-center gap-3 opacity-0 translate-y-10 group-hover:translate-y-4 lg:group-hover:translate-y-6 group-hover:opacity-100 transition-all duration-300 p-2",children:[(0,r.jsx)("button",{name:"cart",onClick:()=>{P((0,u.bE)(e)),d.oR.success(`${null==e?void 0:e.name} added to cart!`)},className:"btn-primary xl:!text-2xl 2xl:!text-[22px] 2xl:!font-medium w-full sm:w-[48%] md:w-[45%] lg:w-[50%] xl:w-[45%] 2xl:w-[173.875px] 2xl:h-[50px] whitespace-nowrap",children:"Add to Cart"}),(0,r.jsx)("button",{name:"getQuote",onClick:()=>{S(e),C(!0)},className:"xl:!text-2xl 2xl:!text-[22px] 2xl:!font-medium w-full sm:w-[48%] md:w-[45%] lg:w-[50%] xl:w-[45%] 2xl:w-[173.875px] 2xl:h-[50px] mr-2 text-[#4A4A4A] bg-white border border-[#4A4A4A] rounded-md px-4 py-2 transition-all my-1 duration-200 cursor-pointer whitespace-nowrap",children:"Get Quote"})]})]},null==e?void 0:e.id)})},w)}),(0,r.jsx)("button",{name:"left",onClick:()=>{O(-1),j(e=>Math.max(e-4,0))},disabled:0===w,className:"absolute left-2 top-1/2 -translate-y-1/2 md:-left-23 border-2 text-[#F15939] rounded-full p-6 2xl:p-8 hover:bg-gray-300 disabled:opacity-50",children:(0,r.jsx)(i._Jj,{className:"w-[10px]"})}),(0,r.jsx)("button",{name:"right",onClick:()=>{O(1),j(t=>Math.min(t+4,e.length-4))},disabled:w>=e.length-4,className:"absolute right-2 top-1/2 -translate-y-1/2 md:-right-23 border-2 text-[#F15939] rounded-full p-6 2xl:p-8 hover:bg-gray-300 disabled:opacity-50",children:(0,r.jsx)(i.X6T,{className:"w-[10px]"})})]}),(0,r.jsx)(x.A,{isOpen:k,onClose:()=>{C(!1),S(null)},product:E?{name:null!=(g=null!=(v=E.name)?v:"string"==typeof E.title?E.title:void 0)?g:"Product",image:(null==(l=E.image)||null==(t=l[0])?void 0:t.path)||(null==(f=E.image)||null==(o=f[1])?void 0:o.path),sku:null!=(y=E.sku)?y:String(null!=(b=E.id)?b:"")}:void 0})]})}},56724:(e,t,l)=>{l.d(t,{k5:()=>u});var r=l(12115),n={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=r.createContext&&r.createContext(n),a=["attr","size","title"];function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var l=arguments[t];for(var r in l)({}).hasOwnProperty.call(l,r)&&(e[r]=l[r])}return e}).apply(null,arguments)}function s(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,r)}return l}function c(e){for(var t=1;t<arguments.length;t++){var l=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(l),!0).forEach(function(t){var r,n,i;r=e,n=t,i=l[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var l=e[Symbol.toPrimitive];if(void 0!==l){var r=l.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):s(Object(l)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(l,t))})}return e}function u(e){return t=>r.createElement(d,o({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,l)=>r.createElement(t.tag,c({key:l},t.attr),e(t.child)))}(e.child))}function d(e){var t=t=>{var l,{attr:n,size:i,title:s}=e,u=function(e,t){if(null==e)return{};var l,r,n=function(e,t){if(null==e)return{};var l={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;l[r]=e[r]}return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)l=i[r],-1===t.indexOf(l)&&({}).propertyIsEnumerable.call(e,l)&&(n[l]=e[l])}return n}(e,a),d=i||t.size||"1em";return t.className&&(l=t.className),e.className&&(l=(l?l+" ":"")+e.className),r.createElement("svg",o({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,u,{className:l,style:c(c({color:e.color||t.color},t.style),e.style),height:d,width:d,xmlns:"http://www.w3.org/2000/svg"}),s&&r.createElement("title",null,s),e.children)};return void 0!==i?r.createElement(i.Consumer,null,e=>t(e)):t(n)}}}]);
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.