{"version":3,"file":"TradesProductListing-0069091c1e040276e7c1.js","sources":["webpack:///TradesProductListing-0069091c1e040276e7c1.js"],"sourcesContent":["(this.nextGenJsonpFunction=this.nextGenJsonpFunction||[]).push([[334],{1022:function(e,t,a){\"use strict\";a.r(t);var n=a(1),o=a(50),r=a(76),i=a(25),l=a(384),c=a(143),s=a(218),d=a(208),m=a(89),u=a(47),p=a(11),g=a(589),b=a(946),h=a(0),f=a.n(h),w=a(78),x=a(67),y=a(42),C=a(235),E=a(83);t.default=Object(r.a)(e=>{var t,a,r;const k=Object(h.useRef)(null),[I,v]=f.a.useState(),[O,_]=Object(h.useState)(e.banner),{text:F,hasTruncated:T}=Object(l.a)(null===(t=e.category)||void 0===t?void 0:t.description),j=Object(i.a)([Object(n.e)(n.a.DesktopSmall),Object(n.e)(n.a.TabletLarge),Object(n.e)(n.a.Tablet)],[10,6,5],3),L=f.a.createElement(y.c,{ReactRouterRoute:w.b},f.a.createElement(f.a.Fragment,null,e.showBanner&&O&&f.a.createElement(g.default,Object.assign({},O)),e.category?f.a.createElement(C.a,{inView:!0,title:e.category.title,titleLogo:e.category.logo,description:F,backText:e.category.backText,backUrl:e.category.backUrl,background:\"white\",showReadMore:T,readMoreText:e.translations[\"custom.read-more\"],readMoreOnClick:()=>{k.current&&k.current.scrollIntoView({behavior:\"smooth\"})}}):null,I&&f.a.createElement(E.a.CategoryFiltersWrapper,null,f.a.createElement(p.a.Full,null,f.a.createElement(b.a,{transition:{duration:.45,ease:\"easeOut\"}},f.a.createElement(c.a,{count:I.filterOptions.length,paddingOffset:0,pageChildren:1},f.a.createElement(s.a,null,e=>{var t;return f.a.createElement(f.a.Fragment,null,f.a.createElement(E.a.CategoryFilters,null,f.a.createElement(E.a.Track,{\"data-center\":I.filterOptions.length>j,trackMutations:!0,enableCarousel:!0},I.filterOptions.map(e=>f.a.createElement(E.a.CategoryFilterItemWrapper,{key:e.name,onClick:()=>{window.location.href=e.value}},f.a.createElement(E.a.CategoryFilterItem,{href:e.value},f.a.createElement(E.a.CategoryFilterItemImageContainer,null,f.a.createElement(E.a.CategoryFilterItemImage,{src:e.listingImage,alt:e.name})),f.a.createElement(E.a.CategoryFilterItemTitle,null,e.name)))))),I.filterOptions.length>j&&f.a.createElement(E.a.ControlsContainer,null,f.a.createElement(E.a.LineContainer,{progress:(e.activeIndex+j)/I.filterOptions.length*100}),f.a.createElement(E.a.Controls,null,f.a.createElement(u.a,{direction:\"left\",disabled:0===e.activeIndex,theme:\"red\",hideLine:!0,onClick:t=>{t.preventDefault(),null==e||e.goToPrev()}}),f.a.createElement(u.a,{direction:\"right\",theme:\"red\",hideLine:!0,disabled:e.activeIndex+j>=(null===(t=I.filterOptions)||void 0===t?void 0:t.length),onClick:t=>{t.preventDefault(),null==e||e.goToNext()}}))))}))))),f.a.createElement(E.a.Wrapper,null,f.a.createElement(m.a.FiltersElement,{\"data-filters-bar\":\"true\"}),f.a.createElement(d.default,Object.assign({},e,{showCards:!1,productListGuids:null,productListGuid:null,groupByCategory:!1,includeAllCategories:!0,tradeAgilityId:e.tradeAgilityId,promoCards:[],setTradeBanner:_,setChildCategories:v})),T&&(null===(a=e.category)||void 0===a?void 0:a.description)&&f.a.createElement(E.a.FooterDescriptionContainer,null,f.a.createElement(E.a.FooterDescriptionInner,null,f.a.createElement(E.a.FooterDescription,{ref:k,dangerouslySetInnerHTML:{__html:null===(r=e.category)||void 0===r?void 0:r.description}}))))));return o.a?f.a.createElement(w.d,null,L):f.a.createElement(x.a,null,L)})},384:function(e,t,a){\"use strict\";var n=a(0);t.a=function(e,t){const[a,o]=n.useState(e),[r,i]=n.useState(!1);return n.useEffect(()=>{if(e){const a=((e,t)=>{let a=e.split(\".\").map(e=>[e,e.split(\" \").length]);a=a.splice(0,a.length-1);let n=0,o=0,r=!1;const i=null!=t?t:80;return a.forEach((e,t)=>{r||(o>i?(r=!0,n=t===a.length-1?a.length:t):(n++,o+=e[1]))}),n===a.length?null:a.map(e=>e[0]).slice(0,n).join(\". \")+\".\"})(e,t);o(a||e),i(!!a)}else o(e),i(!1)},[e,t]),{text:a,hasTruncated:r}}},589:function(e,t,a){\"use strict\";a.r(t);var n=a(20),o=a(28),r=a(0),i=a.n(r),l=a(3),c=a(6),s=a(1),d=a(2);const m={Wrapper:d.d.section.withConfig({displayName:\"WhatsNewBannerstyles__Wrapper\",componentId:\"zkw6um-0\"})([\"position:relative;\"]),Container:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__Container\",componentId:\"zkw6um-1\"})([\"min-height:525px;position:relative;background-repeat:no-repeat;background-size:cover;background-position:center;background-image:url(\",\");position:relative;@media \",\"{padding-bottom:50px;}@media \",\"{background-image:url(\",\");}\"],({desktopImage:e})=>e,Object(s.f)(s.a.Tablet),Object(s.f)(s.a.TabletLarge),({mobileImage:e,desktopImage:t})=>\"\"!==e?e:t),ContentContainer:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__ContentContainer\",componentId:\"zkw6um-2\"})([\"padding:40px 100px;max-width:900px;@media \",\"{padding:40px 50px;}@media \",\"{padding:30px 20px;}\"],Object(s.f)(s.a.TabletLarge),Object(s.f)(s.a.Tablet)),Title:d.d.h1.withConfig({displayName:\"WhatsNewBannerstyles__Title\",componentId:\"zkw6um-3\"})([\"\",\";color:\",\";text-transform:uppercase;font-style:italic !important;font-size:56px;margin-bottom:70px;span{color:\",\";display:block;}@media \",\"{max-width:100%;font-size:42px;margin-bottom:50px;}@media \",\"{font-size:32px;}@media \",\"{font-size:28px;}\"],c.a.helvetica[\"93-black-extended\"],l.a.white,l.a.red.base,Object(s.f)(s.a.TabletLarge),Object(s.f)(s.a.Tablet),Object(s.f)(s.a.MobileLarge)),Subtitle:d.d.h2.withConfig({displayName:\"WhatsNewBannerstyles__Subtitle\",componentId:\"zkw6um-4\"})([\"\",\";color:\",\";text-transform:uppercase;font-style:italic;font-size:56px;margin-bottom:0px;span{color:\",\";}@media \",\"{font-size:42px;}@media \",\"{font-size:32px;}@media \",\"{font-size:28px;}\"],c.a.helvetica[\"93-black-extended\"],l.a.white,l.a.red.base,Object(s.f)(s.a.TabletLarge),Object(s.f)(s.a.Tablet),Object(s.f)(s.a.MobileLarge)),SupportingText:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__SupportingText\",componentId:\"zkw6um-5\"})([\"\"]),FooterLogoContainer:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__FooterLogoContainer\",componentId:\"zkw6um-6\"})([\"position:absolute;bottom:0;right:0;\"]),FooterLogo:d.d.img.withConfig({displayName:\"WhatsNewBannerstyles__FooterLogo\",componentId:\"zkw6um-7\"})([\"margin:15px;\"]),Footer:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__Footer\",componentId:\"zkw6um-8\"})([\"min-height:165px;background-color:\",\";padding:40px 100px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;@media \",\"{flex-direction:column;padding:40px 50px;}@media \",\"{padding:30px 20px;}\"],l.a.black,Object(s.f)(s.a.TabletLarge),Object(s.f)(s.a.Tablet)),FooterBlock:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__FooterBlock\",componentId:\"zkw6um-9\"})([\"width:28%;@media \",\"{width:100%;margin-bottom:15px;text-align:center;}\"],Object(s.f)(s.a.TabletLarge)),FooterImage:d.d.img.withConfig({displayName:\"WhatsNewBannerstyles__FooterImage\",componentId:\"zkw6um-10\"})([\"max-height:140px;\"]),FooterContent:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__FooterContent\",componentId:\"zkw6um-11\"})([\"color:\",\";\"],l.a.white),FooterButtonBlock:d.d.div.withConfig({displayName:\"WhatsNewBannerstyles__FooterButtonBlock\",componentId:\"zkw6um-12\"})([\"width:28%;text-align:center;@media \",\"{width:100%;margin-bottom:15px;text-align:center;}\"],Object(s.f)(s.a.TabletLarge))};t.default=({mainHeading:e,subHeading:t,supportingText:a,footerLeftImage:r,footerLogoImage:l,footerTextContent:c,buttonText:s,buttonUrl:d,desktopImage:u,mobileImage:p})=>i.a.createElement(m.Wrapper,null,i.a.createElement(m.Container,{desktopImage:u||\"\",mobileImage:p||\"\"},i.a.createElement(m.ContentContainer,null,e&&i.a.createElement(m.Title,{dangerouslySetInnerHTML:{__html:e}}),t&&i.a.createElement(m.Subtitle,{dangerouslySetInnerHTML:{__html:t}}),a&&i.a.createElement(m.SupportingText,{dangerouslySetInnerHTML:{__html:a}})),l&&i.a.createElement(m.FooterLogoContainer,null,i.a.createElement(m.FooterLogo,{src:new o.b(l).width(150).url}))),i.a.createElement(m.Footer,null,i.a.createElement(m.FooterBlock,null,r&&i.a.createElement(m.FooterImage,{src:new o.b(r).width(250).url})),i.a.createElement(m.FooterBlock,null,c&&i.a.createElement(m.FooterContent,null,c)),i.a.createElement(m.FooterButtonBlock,null,s&&d&&i.a.createElement(n.a,{text:s,href:d,theme:\"white-outline\",icon:\"arrow\",size:\"small\"}))))},946:function(e,t,a){\"use strict\";a.d(t,\"a\",(function(){return c}));var n=a(26),o=a(0),r=a(185),i=a(525),l=a(119);function c(e){var t=e.children,a=e.isValidProp,c=Object(n.__rest)(e,[\"children\",\"isValidProp\"]);a&&Object(i.b)(a),(c=Object(n.__assign)(Object(n.__assign)({},Object(o.useContext)(r.a)),c)).isStatic=Object(l.a)((function(){return c.isStatic}));var s=Object(o.useMemo)((function(){return c}),[JSON.stringify(c.transition),c.transformPagePoint,c.reducedMotion]);return o.createElement(r.a.Provider,{value:s},t)}}}]);"],"mappings":"AAAA","sourceRoot":""}