"use strict";
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
    [8096], {
        24237: function(i, e, n) {
            n.d(e, {
                lo: function() {
                    return y
                },
                Qi: function() {
                    return _
                }
            });
            var r = n(85893),
                s = n(67294),
                l = n(44012),
                t = n(95727),
                c = n(41664),
                a = n.n(c);
            n(42873);
            var d = n(95321),
                o = function(i) {
                    var e = (0, s.useState)(!1),
                        n = e[0],
                        r = e[1];
                    return (0, s.useEffect)(function() {
                        var e = window.matchMedia(i),
                            n = function(i) {
                                r(i.matches)
                            };
                        return r(e.matches), e.addEventListener("change", n),
                            function() {
                                e.removeEventListener("change", n)
                            }
                    }, [i]), n
                },
                u = n(84950),
                h = n(79164),
                m = n(61594),
                p = n(45509),
                x = n(18105),
                g = function(i) {
                    var e = i.displayType,
                        n = i.priceAdditions,
                        s = i.basePrice,
                        l = i.retailPrice,
                        t = i.maxPrice,
                        c = i.volumePrices,
                        a = i.minPrice,
                        d = (0, x._)(n, s, c),
                        o = d < l && (!c || !c.length);
                    if ("rangePrice" === e && t && t > d) {
                        var u = "".concat((0, p.fl)(a), " - ").concat((0, p.fl)(t));
                        return (0, r.jsxs)(m.XW, {
                            children: [(0, r.jsx)(m.tA, {
                                children: u
                            }), o && (0, r.jsx)(m.bE, {
                                children: (0, p.fl)(l)
                            })]
                        })
                    }
                    return "startingPrice" === e || (null == c ? void 0 : c.length) ? (0, r.jsxs)(m.XW, {
                        children: [(0, r.jsxs)(m.j6, {
                            children: ["Starting at ", (0, r.jsx)("strong", {
                                children: (0, p.fl)(a)
                            })]
                        }), o && (0, r.jsx)(m.lc, {
                            children: (0, p.fl)(l)
                        })]
                    }) : (0, r.jsxs)(m.XW, {
                        children: [(0, r.jsx)(m.tA, {
                            children: (0, p.fl)(d)
                        }), o && (0, r.jsx)(m.lc, {
                            "data-testid": "retail-price",
                            children: (0, p.fl)(l)
                        })]
                    })
                },
                j = u.OMGTheme.breakpoints,
                f = function(i) {
                    var e = i.product,
                        n = e.minimum_quantity,
                        s = e.logo_count,
                        c = e.color_count,
                        a = e.product_volume_prices,
                        d = o("(max-width: ".concat(j.md, ")")),
                        u = [];
                    return (null == a ? void 0 : a.length) && !d ? u.push((0, r.jsx)(m.ah, {
                        span: 5,
                        children: (0, r.jsx)(l.Z, {
                            id: "volumeDiscount",
                            defaultMessage: "Volume Discount"
                        })
                    }, "volume-discount")) : n && n > 1 && u.push((0, r.jsx)(m.ah, {
                        span: d ? 3 : 5,
                        children: d ? (0, r.jsx)(l.Z, {
                            id: "minimumQuantity",
                            defaultMessage: "Min. {min}",
                            values: {
                                min: n
                            }
                        }) : (0, r.jsxs)(r.Fragment, {
                            children: [(0, r.jsx)(m.aO, {
                                children: (0, r.jsx)(t.JO, {
                                    icon: "remove",
                                    iconSize: 12
                                })
                            }), (0, r.jsx)(l.Z, {
                                id: "minimumQuantity",
                                defaultMessage: "Minimum {min}",
                                values: {
                                    min: n
                                }
                            })]
                        })
                    }, "min-quantity")), s > 1 && u.push((0, r.jsxs)(m.ah, {
                        span: d ? 5 : 4,
                        children: [(0, r.jsx)(m.aO, {
                            children: (0, r.jsx)(t.JO, {
                                icon: "media",
                                iconSize: d ? 8 : 12
                            })
                        }), (0, r.jsx)(l.Z, {
                            id: "logoCount",
                            defaultMessage: "{logos} Logos",
                            values: {
                                logos: s
                            }
                        })]
                    }, "logos")), c > 1 && u.push((0, r.jsxs)(m.ah, {
                        span: d ? 5 : 4,
                        children: [(0, r.jsx)(m.aO, {
                            children: (0, r.jsx)(t.JO, {
                                icon: "tint",
                                iconSize: d ? 8 : 12
                            })
                        }), (0, r.jsx)(l.Z, {
                            id: "colorCount",
                            defaultMessage: "{colors} Colors",
                            values: {
                                colors: c
                            }
                        })]
                    }, "colors")), (0, r.jsx)(m.O, {
                        $childCount: u.length,
                        children: u
                    })
                },
                v = function(i, e) {
                    var n = e ? 33 : 77;
                    return i.length > n ? "".concat(i.substring(0, n - 3), "...") : i
                },
                y = function(i) {
                    var e, n, c, d = i.product,
                        u = i.saleHidePrices,
                        p = i.priceDisplayType,
                        x = i.priceDisplayKlarna,
                        y = i.disableClick,
                        _ = void 0 !== y && y,
                        w = i.ribbonText,
                        b = d.id,
                        k = d.name,
                        C = d.is_mandatory,
                        D = d.is_fulfillengine,
                        P = d.minimum_quantity,
                        M = d.retail_price,
                        Z = d.color_count,
                        T = d.logo_count,
                        O = d.price,
                        S = d.image,
                        A = d.hide_price,
                        E = d.max_price,
                        q = d.min_price,
                        G = (0, s.useContext)(h.Ni).state,
                        H = null === (c = null == G ? void 0 : null === (e = G.theme) || void 0 === e ? void 0 : e.fulfillEngineToggle) || void 0 === c || c,
                        I = o("(max-width: ".concat(j.md, ")")),
                        N = P && P > 1 || Z > 1 || T > 1 || !!(null === (n = d.product_volume_prices) || void 0 === n ? void 0 : n.length),
                        Q = (0, s.useMemo)(function() {
                            return q && ("rangePrice" === p || "startingPrice" === p) ? q > 0 : O > 0
                        }, [q, O, p]),
                        z = (0, r.jsx)("a", {
                            "data-testid": "product-card-link",
                            children: (0, r.jsxs)(m.Zb, {
                                isClickable: !_,
                                children: [w && (0, r.jsx)(m.Nu, {
                                    children: w
                                }), (0, r.jsxs)(m.VY, {
                                    children: [C && !w && (0, r.jsx)(m.mz, {
                                        children: (0, r.jsx)(l.Z, {
                                            id: "requiredTag",
                                            defaultMessage: "Required"
                                        })
                                    }), D && H && (0, r.jsx)(m.Yi, {
                                        bg: "#6868DD",
                                        children: (0, r.jsx)(l.Z, {
                                            id: "quickToShip",
                                            defaultMessage: "Quick to Ship"
                                        })
                                    }), (0, r.jsx)(m.Ee, {
                                        children: S && S.length > 0 ? (0, r.jsx)(m.Du, {
                                            src: S,
                                            alt: "".concat(k, "-title")
                                        }) : (0, r.jsxs)(m.Dy, {
                                            children: [(0, r.jsx)(t.JO, {
                                                icon: "media",
                                                color: "#c1c1c1",
                                                iconSize: 32
                                            }), (0, r.jsx)(l.Z, {
                                                id: "noImage",
                                                defaultMessage: "No Featured Image"
                                            })]
                                        })
                                    }), (0, r.jsx)(m.Dx, {
                                        title: k,
                                        children: v(k, I)
                                    }), !u && !A && (0, r.jsxs)(m.vD, {
                                        children: [(0, r.jsx)(g, {
                                            displayType: p,
                                            priceAdditions: [],
                                            basePrice: O,
                                            retailPrice: M,
                                            maxPrice: null != E ? E : 0,
                                            volumePrices: d.product_volume_prices,
                                            minPrice: q
                                        }), x && Q && (0, r.jsx)(m.N2, {
                                            children: (0, r.jsx)("img", {
                                                src: "/shop/klarna-pink.png",
                                                alt: "klarnaLogo"
                                            })
                                        })]
                                    })]
                                }), N && (0, r.jsx)(m.$_, {
                                    children: (0, r.jsx)(f, {
                                        product: d
                                    })
                                })]
                            })
                        });
                    return _ ? z : (0, r.jsx)(a(), {
                        href: "/product/".concat(b),
                        passHref: !0,
                        children: z
                    })
                },
                _ = function(i) {
                    for (var e = i.categoryId, n = i.images, s = i.numAdditional, t = (0, d.Fg)().theme, c = s < 4 ? s : 4; n.length < c;) n.push("/shop/defaultImg.png");
                    return (0, r.jsx)(a(), {
                        href: "/category/".concat(e),
                        passHref: !0,
                        children: (0, r.jsx)("a", {
                            "data-testid": "view-all-link",
                            children: (0, r.jsxs)(m.Zb, {
                                isClickable: !0,
                                children: [(0, r.jsx)(m.VY, {
                                    children: (0, r.jsxs)(m.mo, {
                                        children: [(0, r.jsx)(m.gW, {
                                            children: n.map(function(i) {
                                                return (0, r.jsx)(m.xM, {
                                                    children: (0, r.jsx)("img", {
                                                        src: i || "/shop/defaultImg.png",
                                                        alt: ""
                                                    })
                                                }, i)
                                            })
                                        }), (0, r.jsx)(m.vZ, {
                                            children: (0, r.jsx)("span", {
                                                children: "+".concat(s)
                                            })
                                        })]
                                    })
                                }), (0, r.jsx)(m.qO, {
                                    children: (0, r.jsx)(m.gp, {
                                        color: t.primary,
                                        children: (0, r.jsx)(l.Z, {
                                            id: "viewAllButton",
                                            defaultMessage: "View All"
                                        })
                                    })
                                })]
                            })
                        })
                    })
                }
        },
        68096: function(i, e, n) {
            n.d(e, {
                eQ: function() {
                    return g
                },
                qG: function() {
                    return x
                }
            });
            var r = n(7297),
                s = n(85893),
                l = n(67294),
                t = n(60249),
                c = n(84950),
                a = n(31666),
                d = n(71969),
                o = n(24237);

            function u() {
                var i = (0, r.Z)(["\n  margin: 0 auto;\n  justify-items: center;\n  min-width: unset;\n  @media (min-width: ", ") {\n    max-width: ", ";\n  }\n  @media (min-width: ", ") {\n    max-width: 668px;\n  }\n  @media (min-width: ", ") {\n    max-width: ", ";\n  }\n  @media (min-width: ", ") {\n    max-width: ", ";\n  }\n  @media (min-width: ", ") {\n    max-width: ", ";\n  }\n"]);
                return u = function() {
                    return i
                }, i
            }

            function h() {
                var i = (0, r.Z)([""]);
                return h = function() {
                    return i
                }, i
            }
            var m = c.OMGTheme.breakpoints,
                p = (0, a.default)(t.GridWrap)(u(), m.xs, m.xs, m.sm, m.md, m.md, m.lg, m.lg, m.xl, m.lg);
            a.default.div(h());
            var x = function(i) {
                    for (var e = i.products, n = i.saleHidePrices, r = i.priceDisplayType, c = i.priceDisplayKlarna, a = i.disableCardClick, u = void 0 !== a && a, h = i.limitCards, m = i.cardLimit, x = void 0 === m ? 12 : m, g = i.setGCID, j = l.useContext(d.G9).state, f = void 0 !== h && h && e.length > x, v = f ? e.slice(0, x - 1) : e, y = [], _ = x - 1; _ < e.length && (!e[_].image || (y.push(e[_].image), 4 !== y.length)); _ += 1);
                    return l.useEffect(function() {
                        var i;
                        g && (null == j ? void 0 : null === (i = j.coupons) || void 0 === i ? void 0 : i.length) > 0 && g(null == j ? void 0 : j.coupons[0].id)
                    }, [null == j ? void 0 : j.coupons, g]), (0, s.jsxs)(p, {
                        children: [v.map(function(i) {
                            return (0, s.jsx)(t.GridSpan, {
                                xs: "1",
                                sm: "3",
                                md: "4",
                                lg: "3",
                                xl: "3",
                                children: (0, s.jsx)(o.lo, {
                                    product: i,
                                    saleHidePrices: n,
                                    priceDisplayType: r,
                                    priceDisplayKlarna: c,
                                    disableClick: !!u
                                })
                            }, "".concat(i.id, " "))
                        }), f && (0, s.jsx)(t.GridSpan, {
                            xs: "1",
                            sm: "3",
                            md: "4",
                            lg: "3",
                            xl: "3",
                            children: (0, s.jsx)(o.Qi, {
                                categoryId: e[0].category_id,
                                images: y,
                                numAdditional: e.length - (x - 1)
                            })
                        }, "ViewAll_".concat(e[0].category_id))]
                    })
                },
                g = function(i) {
                    var e = i.products,
                        n = i.saleHidePrices,
                        r = i.priceDisplayType,
                        l = i.priceDisplayKlarna,
                        t = i.disableCardClick;
                    return (0, s.jsx)(x, {
                        products: e,
                        saleHidePrices: n,
                        priceDisplayType: r,
                        priceDisplayKlarna: l,
                        disableCardClick: void 0 !== t && t
                    })
                }
        }
    }
]);