"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[93091],{16263:(n,e,t)=>{t.d(e,{Z:()=>s});var r,o=t(71893),i=t(41810),c=t(30168),a=(t(92222),t(85664)),u=(0,o.ZP)(a.C)(r||(r=(0,c.Z)(["\n position: absolute;\n top: ",";\n left: 0;\n z-index: 1;\n display: flex;\n align-items: center;\n padding: 0;\n border: ",";\n > span {\n margin: ",";\n }\n"])),(function(n){return n.theme.spacing.spacing02}),(function(n){var e=n.theme;return"".concat(e.spacing.spacing0025," solid ").concat(e.colors.danger.main)}),(function(n){var e=n.theme;return"".concat(e.spacing.spacing0025," ").concat(e.spacing.spacing005)})),l=t(85893);const s=function(n){var e=n.discount,t=n.className,r=n.expirationDate,c=(0,o.Fg)();return(0,l.jsx)(l.Fragment,{children:!!e&&e>0&&(0,l.jsxs)(u,{className:"discount-badge ".concat(t||""),bold:!0,bgColor:c.colors.danger.main,textColor:c.colors.white,isolated:!0,children:[(0,l.jsxs)("span",{children:[" -",e,"%"]}),r&&(0,l.jsx)(i.Z,{expirationDate:r})]})})}},38695:(n,e,t)=>{t.r(e),t.d(e,{default:()=>z});t(47941),t(82526),t(38880),t(89554),t(54747),t(49337),t(33321),t(69070);var r,o,i,c,a,u,l=t(64572),s=t(45987),f=t(70885),d=(t(92087),t(57327),t(26699),t(32023),t(47042),t(26833),t(21249),t(67294)),p=t(28225),m=t(63742),g=t(18627),b=t(77862),h=t(30168),v=t(85664),y=t(54882),x=t(30305),w=t(50693),E=t(51062),P=t(71893),O=(0,P.ZP)(v.C)(r||(r=(0,h.Z)(["\n width: max-content;\n margin: 0;\n display: flex;\n gap: 4px;\n padding: 0.25rem 0.5rem;\n flex-direction: ",";\n\n &.flag-trending {\n display: none;\n }\n"])),(function(n){return n.isRight?"row-reverse":"row"})),C=(0,P.ZP)(y.J)(o||(o=(0,h.Z)(["\n z-index: 2;\n display: flex;\n align-items: flex-start;\n width: auto;\n top: calc(100% + 0.5rem);\n "," {\n padding: ",";\n }\n "," {\n padding: 1rem;\n }\n"])),x.B.tabletPortrait,(function(n){return n.theme.spacing.spacing01}),x.B.desktop),j=(0,P.ZP)(w.z)(i||(i=(0,h.Z)(["\n padding: unset;\n align-items: start;\n &:hover {\n background-color: white;\n }\n &:focus {\n border: none;\n }\n"]))),Z=P.ZP.p(c||(c=(0,h.Z)(["\n &&& {\n margin-bottom: unset;\n }\n"]))),k=P.ZP.span(a||(a=(0,h.Z)(["\n ",";\n color: ",";\n background: transparent;\n"])),E.g.captionBold,(function(n){return n.color}));!function(n){n[n.RIGHT=0]="RIGHT",n[n.LEFT=1]="LEFT"}(u||(u={}));t(92222);var S=t(53397),I=t(22981),A=t(85893);function L(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,r)}return t}function D(n){for(var e=1;e{t.r(e),t.d(e,{default:()=>Qn});var r=t(67294),o=t(28225),i=t(30305),c=t(3323),a=t(51062),u=t(71893);function l(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}function s(){var n=l(["\n display: flex;\n flex-wrap: wrap;\n position: relative;\n & > div:first-child {\n background-color: ",";\n }\n & > div:nth-child(2) {\n width: 12.5rem;\n margin: 0;\n }\n & > div:last-child {\n margin: 0;\n }\n "," {\n flex-wrap: nowrap;\n background-color: ",";\n :nth-child(even) {\n background-color: ",";\n }\n & > div:first-child {\n background-color: ",";\n width: 11.5rem;\n }\n & > div:first-child,\n & > div:nth-child(2),\n & > div:last-child {\n width: 11.5rem;\n }\n }\n"]);return s=function(){return n},n}function f(){var n=l(["\n display: flex;\n flex-wrap: wrap;\n position: relative;\n & > div:first-child {\n background-color: ",";\n }\n & > div:nth-child(2) {\n width: 12.5rem;\n margin: 0;\n }\n & > div:last-child {\n margin: 0;\n }\n "," {\n flex-wrap: nowrap;\n background-color: ",";\n :nth-child(even) {\n background-color: ",";\n }\n & > div:first-child {\n background-color: ",";\n width: 11.5rem;\n }\n & > div:first-child,\n & > div:nth-child(2),\n & > div:last-child {\n width: 11.5rem;\n }\n }\n"]);return f=function(){return n},n}function d(){var n=l(["\n background-color: #cfe5cc;\n "]);return d=function(){return n},n}function p(){var n=l(["\n position: sticky;\n z-index: 10;\n left: 0;\n background-color: white;\n "," {\n left: 11.5rem;\n background-color: inherit;\n }\n "]);return p=function(){return n},n}function m(){var n=l(["\n width: 11.65rem;\n margin-right: ",";\n ",";\n\n "," {\n width: 11.5rem;\n margin-right: 0;\n border-right 2px solid ",";\n }\n\n ",";\n"]);return m=function(){return n},n}function g(){var n=l(["\n padding: ",";\n"]);return g=function(){return n},n}function b(){var n=l(["\n td:nth-child(even) {\n background-color: ",";\n }\n margin-top: ",";\n tr:first-child {\n margin-top: ",";\n }\n "," {\n margin-top: 0;\n tr:first-child {\n margin-top: 0;\n }\n }\n"]);return b=function(){return n},n}function h(){var n=l(["\n background-color: ",";\n border-right: 2px solid ",";\n width: 100%;\n "," {\n width: 11.5rem;\n position: sticky;\n left: 0;\n z-index: 10;\n }\n"]);return h=function(){return n},n}function v(){var n=l(["\n padding: ",";\n font-weight: bold;\n position: sticky;\n left: 0;\n z-index: 10;\n display: inline-flex;\n"]);return v=function(){return n},n}function y(){var n=l(["\n display: flex;\n align-items: center;\n "," {\n &&& {\n background-color: ",";\n }\n }\n"]);return y=function(){return n},n}function x(){var n=l(["\n padding: ",";\n"]);return x=function(){return n},n}function w(){var n=l(["\n display: flex;\n align-items: flex-start;\n margin-right: ",";\n color: ",";\n"]);return w=function(){return n},n}function E(){var n=l(["\n ",";\n"]);return E=function(){return n},n}function P(){var n=l(["\n ",";\n margin-top: ",";\n margin-left: ",";\n"]);return P=function(){return n},n}function O(){var n=l(["\n text-decoration: line-through;\n margin-right: ",";\n"]);return O=function(){return n},n}var C=u.ZP.tr(s(),(function(n){return n.theme.colors.environment.percent05}),i.B.tabletLandscape,(function(n){return n.theme.colors.white}),(function(n){return n.theme.colors.environment.percent05}),(function(n){return n.theme.colors.white})),j=u.ZP.tr(f(),(function(n){return n.theme.colors.environment.percent05}),i.B.tabletLandscape,(function(n){return n.theme.colors.white}),(function(n){return n.theme.colors.environment.percent05}),(function(n){return n.theme.colors.white})),Z=u.ZP.div(m(),(function(n){return n.theme.spacing.spacing02}),(function(n){return n.different&&(0,u.iv)(d())}),i.B.tabletLandscape,(function(n){return n.theme.colors.environment.percent10}),(function(n){return n.fixed&&(0,u.iv)(p(),i.B.tabletLandscape)})),k=u.ZP.td(g(),(function(n){return n.theme.spacing.spacing01})),S=u.ZP.tbody(b(),(function(n){return n.theme.colors.environment.percent05}),(function(n){return n.theme.spacing.spacing02}),(function(n){return n.theme.spacing.spacing02}),i.B.tabletLandscape),I=u.ZP.div(h(),(function(n){return n.theme.colors.environment.percent05}),(function(n){return n.theme.colors.environment.percent10}),i.B.tabletLandscape),A=u.ZP.td(v(),(function(n){return n.theme.spacing.spacing01})),L=u.ZP.div(y(),i.B.tabletLandscape,(function(n){return n.theme.colors.white})),D=(0,u.ZP)(c.i)(x(),(function(n){return n.theme.spacing.spacing01})),N=u.ZP.span(w(),(function(n){return n.theme.spacing.spacing01}),(function(n){var e=n.theme;return n.highlighted?e.colors.danger.main:e.colors.black})),F=u.ZP.span(E(),a.g.header.h3),T=u.ZP.span(P(),a.g.header.h5,(function(n){return n.theme.spacing.spacing005}),(function(n){return n.theme.spacing.spacing005})),R=u.ZP.span(O(),(function(n){return n.theme.spacing.spacing01})),B=t(7730);function _(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);tn.length)&&(e=n.length);for(var t=0,r=new Array(e);t=3&&d((function(e){return Jn($n({},e),{products:Hn(n.data)})}))})).catch(zn.ZT),function(){return n.abort()}}}),[u,d,i,e]),(0,r.useEffect)((function(){if(null===y||void 0===y?void 0:y.current){var n=y.current,e=!1,t=0,r=0,o=function(o){e=!0,t=o.pageX-n.offsetLeft,r=n.scrollLeft},i=function(o){if(e){o.preventDefault();var i=o.pageX-n.offsetLeft-t;n.scrollLeft=r-i}},c=function(){return e=!1},a=function(){return e=!1};return n.addEventListener("mouseup",a),n.addEventListener("mousemove",i),n.addEventListener("mousedown",o),n.addEventListener("mouseleave",c),function(){n.removeEventListener("mouseup",a),n.removeEventListener("mousemove",i),n.removeEventListener("mousedown",o),n.removeEventListener("mouseleave",c)}}}),[]),(0,r.useEffect)((function(){!function(){var n=f.products.reduce((function(n,e){var t=Object.keys(e.attributes);return Xn(n).concat(Xn(t))}),[]),e=n.filter((function(e,t){return n.indexOf(e)===t}));d((function(n){return Jn($n({},n),{attributes:e})}))}()}),[f.products]);var w=f.attributes,E=f.products;return r.createElement(r.Fragment,null,r.createElement("div",{id:c,ref:l}),!!E.length&&r.createElement(r.Fragment,null,r.createElement(Rn,null,x("productDetail.ComparatorTable.title")),r.createElement(Fn,null,r.createElement(Bn,{ref:y},r.createElement(_n,null,r.createElement(Cn,{products:E,setShowDifferences:v,campaignPriorityStyle:t}),r.createElement(H,{showDifferences:h,attributes:w,products:E,toggled:m})))),r.createElement(Tn,null,r.createElement(Wn,{onClick:function(){return g(!m)},secondary:!0},x(m?"comparator.showless":"comparator.showmore")))))}}}]); //# sourceMappingURL=ComparatorTable.js.map