try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},l=(new e.Error).stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="3fb3c1dc-1b8b-47d7-b2f2-4130d5fa7b5c",e._sentryDebugIdIdentifier="sentry-dbid-3fb3c1dc-1b8b-47d7-b2f2-4130d5fa7b5c")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5568],{18362:function(){},47362:function(){},30911:function(e,l,n){var a=n(92592),t=n(86644);e.exports=function(e){return"number"==typeof e||t(e)&&"[object Number]"==a(e)}},63010:function(e,l,n){"use strict";var a,t;n.r(l);let i={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"AccordionBlockContainer_block",selections:[t={alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"heading",plural:!1,selections:a=[{alias:null,args:null,kind:"ScalarField",name:"html",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"MethodologyAccordionSection",kind:"LinkedField",name:"sections",plural:!0,selections:[{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"content",plural:!1,selections:a,storageKey:null},t],storageKey:null}],type:"MethodologyAccordionBlockType",abstractKey:null};i.hash="1b9347a7f0ff54673015ea570a37cd38",l.default=i},28314:function(e,l,n){"use strict";n.r(l);let a={argumentDefinitions:[],kind:"Fragment",metadata:null,name:"NewsletterBlockContainer_block",selections:[{alias:null,args:null,concreteType:"NewsletterType",kind:"LinkedField",name:"newsletter",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"promoText",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"html",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"slug",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"listId",storageKey:null}],storageKey:null}],type:"NewsletterBlockType",abstractKey:null};a.hash="790690c0e3d1de89efe5fe6958a14f94",l.default=a},46171:function(e,l,n){"use strict";var a,t,i,r,s;n.r(l);let o=(r=[{alias:null,args:null,kind:"ScalarField",name:"html",storageKey:null}],{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ProductBlockContainer_block",selections:[{alias:null,args:null,concreteType:"ProductBlockProductType",kind:"LinkedField",name:"product",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"productId",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"showDescription",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"showImage",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"showScores",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentFilter",storageKey:null},{alias:null,args:null,concreteType:"ProductRetailLinkType",kind:"LinkedField",name:"bestRetailLink",plural:!1,selections:i=[{alias:null,args:null,kind:"ScalarField",name:"price",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"retailer",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"salePrice",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductBrandResourceType",kind:"LinkedField",name:"brand",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a],storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"description",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"cons",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"pros",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"ImageResourceType",kind:"LinkedField",name:"image",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"alt",storageKey:null},{alias:null,args:null,concreteType:"ThumbnailMapType",kind:"LinkedField",name:"thumbnails",plural:!1,selections:[{alias:null,args:null,concreteType:"ThumbnailType",kind:"LinkedField",name:"horizontal",plural:!1,selections:s=[t],storageKey:null},{alias:null,args:null,concreteType:"ThumbnailType",kind:"LinkedField",name:"square",plural:!1,selections:s,storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductRetailLinkType",kind:"LinkedField",name:"retailLinks",plural:!0,selections:i,storageKey:null}],storageKey:null}],type:"ProductBlockType",abstractKey:null});o.hash="d375c13b5f8b874ef0afa3e23ad1c1fd",l.default=o},77066:function(e,l,n){"use strict";var a,t,i,r,s;n.r(l);let o=(r=[{alias:null,args:null,kind:"ScalarField",name:"html",storageKey:null}],{argumentDefinitions:[],kind:"Fragment",metadata:null,name:"ProductsTableBlockContainer_block",selections:[{alias:null,args:null,concreteType:"ProductBlockProductType",kind:"LinkedField",name:"products",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"productId",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"title",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"score",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"showDescription",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"showScores",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"parentFilter",storageKey:null},{alias:null,args:null,concreteType:"ProductRetailLinkType",kind:"LinkedField",name:"bestRetailLink",plural:!1,selections:i=[{alias:null,args:null,kind:"ScalarField",name:"price",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"retailer",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"salePrice",storageKey:null},t={alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductBrandResourceType",kind:"LinkedField",name:"brand",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a],storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"description",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"cons",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"RichTextType",kind:"LinkedField",name:"pros",plural:!1,selections:r,storageKey:null},{alias:null,args:null,concreteType:"ImageResourceType",kind:"LinkedField",name:"image",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"alt",storageKey:null},{alias:null,args:null,concreteType:"ThumbnailMapType",kind:"LinkedField",name:"thumbnails",plural:!1,selections:[{alias:null,args:null,concreteType:"ThumbnailType",kind:"LinkedField",name:"horizontal",plural:!1,selections:s=[t],storageKey:null},{alias:null,args:null,concreteType:"ThumbnailType",kind:"LinkedField",name:"square",plural:!1,selections:s,storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductRetailLinkType",kind:"LinkedField",name:"retailLinks",plural:!0,selections:i,storageKey:null}],storageKey:null},{alias:null,args:null,concreteType:"ProductsTableRangeType",kind:"LinkedField",name:"ranges",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"label",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"max",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"min",storageKey:null}],storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"filters",storageKey:null}],type:"ProductsTableBlockType",abstractKey:null});o.hash="8aac5b40a0fe58f9972fa8fdb2d14251",l.default=o},3421:function(e,l,n){"use strict";n.d(l,{Z:function(){return k}});var a,t=n(68705),i=n(35683),r=n(4093),s=n(66123),o=n(2653),u=n(95395),c=n(64639),d=n(47904),g=n(7209);n(18362);var m=({header:e,content:l,id:n})=>{let a=(0,g.z$)(),[t,m]=(0,s.useState)(!0),[p,y]=(0,s.useState)("auto"),k=(0,s.useRef)(null);return(0,s.useEffect)(()=>{setTimeout(()=>{if(!k.current)return;let{height:e}=k.current.getBoundingClientRect();y(`${e}px`),m(!1)},0)},[m,y]),(0,i.jsxs)("section",{className:"ni13og2",children:[(0,i.jsxs)("button",{id:`accordion-button-${n}`,className:"ni13og4",onClick:()=>{a?.emit({event:"accordion",accordion:{click_text:function(e){if("undefined"==typeof DOMParser)throw Error("Missing DOMParser. browserStripHtml does not run during SSR");return new DOMParser().parseFromString(e,"text/html").body.textContent||""}(e),action:t?"close":"open"}}),m(!t)},"aria-expanded":t?"true":"false","aria-controls":`accordion-content-${n}`,children:[(0,i.jsx)(o.Z,{component:"h3",className:"ni13og3",html:e}),(0,i.jsx)("div",{className:"ni13og6",children:t?(0,i.jsx)(u.Z,{}):(0,i.jsx)(c.Z,{})})]}),(0,i.jsx)("div",{id:`accordion-content-${n}`,className:(0,r.Z)("ni13og7",t&&"ni13og8"),style:{height:t?`${p}`:"0"},ref:k,"data-testid":"accordion-content","aria-labelledby":`accordion-button-${n}`,inert:t?void 0:"",children:(0,i.jsx)(o.Z,{className:(0,r.Z)("ni13og5",d.F.text.linkStyles),html:l})})]})},p=n(88764),y=({title:e,sections:l})=>(0,i.jsxs)("div",{className:(0,r.Z)(p.I.Accordion,"ni13og0"),children:[e&&(0,i.jsx)(o.Z,{component:"h2",className:"ni13og1",html:e}),l&&l.map((e,l)=>(0,i.jsx)(m,{header:e.header,content:e.content,id:l.toString()},l))]}),k=e=>{let{block:l}=e,{heading:r,sections:s}=(0,t.useFragment)((void 0!==a||(a=n(63010)).hash&&"1b9347a7f0ff54673015ea570a37cd38"!==a.hash&&console.error("The definition of 'AccordionBlockContainer_block' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."),a),l),o=s.filter(e=>e.heading&&e.content).map(e=>({header:e.heading.html,content:e.content.html}));return(0,i.jsx)(y,{title:r.html,sections:o})}},69747:function(e,l,n){"use strict";n.d(l,{Z:function(){return s}});var a,t=n(68705),i=n(56436),r=n(35683),s=e=>{let{block:l}=e,{newsletter:s}=(0,t.useFragment)((void 0!==a||(a=n(28314)).hash&&"790690c0e3d1de89efe5fe6958a14f94"!==a.hash&&console.error("The definition of 'NewsletterBlockContainer_block' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."),a),l);return(0,r.jsx)(i.Z,{name:s.title,text:s.promoText.html,lists:[s.listId],source:"articleBody"})}},72209:function(e,l,n){"use strict";n.d(l,{Z:function(){return s}});var a,t=n(68705),i=n(62095),r=n(35683),s=e=>{let{product:l}=(0,t.useFragment)((void 0!==a||(a=n(46171)).hash&&"d375c13b5f8b874ef0afa3e23ad1c1fd"!==a.hash&&console.error("The definition of 'ProductBlockContainer_block' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."),a),e.block),s=l.showImage&&l.image?.thumbnails.horizontal.url||"",o=l.image?.thumbnails.square.url||"";return(0,r.jsx)(i.Z,{...l,id:l.productId,imageUrl:s,mobileImageUrl:o,alt:l.image?.alt,description:l.description.html,pros:l.pros.html,cons:l.cons.html,layout:"full",retailLinks:l.retailLinks,brand:l.brand?.title,bestRetailLink:l.bestRetailLink})}},56783:function(e,l,n){"use strict";n.d(l,{Z:function(){return s}});var a,t=n(68705),i=n(49002),r=n(35683),s=e=>{let{products:l,filters:s,ranges:o}=(0,t.useFragment)((void 0!==a||(a=n(77066)).hash&&"8aac5b40a0fe58f9972fa8fdb2d14251"!==a.hash&&console.error("The definition of 'ProductsTableBlockContainer_block' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."),a),e.block),u=l.map(e=>{let l=e.image?.thumbnails.horizontal.url||"",n=e.image?.thumbnails.square.url||"";return{...e,imageUrl:l,mobileImageUrl:n,id:e.productId,alt:e.image?.alt,description:e.description.html,pros:e.pros.html,cons:e.cons.html,layout:"full",brand:e.brand?.title}});return(0,r.jsx)(i.Z,{products:u,filters:s,ranges:o,isSingleColumn:e.isSingleColumn})}},49002:function(e,l,n){"use strict";n.d(l,{Z:function(){return h}});var a=n(35683),t=n(4093),i=n(30911),r=n.n(i),s=n(66342),o=n(66123),u=n(35567),c=n(78842),d=n(88764),g=n(150),m=n(47904);n(84899),n(47362);var p="_1w0bf4q9",y="_1w0bf4q8",k="_1w0bf4q2",h=(0,g.n)(({ranges:e,filters:l,products:n,filterTitle:i="What are you looking for?",rangeTitle:g="How much do you want to spend?",isSingleColumn:h})=>{let[f,b]=(0,o.useState)([]),[T,F]=(0,o.useState)([]),[K,S]=(0,o.useState)(n),x=(0,s.usePathname)(),L=(0,o.useCallback)((e,l)=>{let a=e.length>0?n.filter(l=>{let n=l.bestRetailLink?.salePrice||l.bestRetailLink?.price,a=r()(n)&&e.filter(e=>{let l=e.max||1e10;return n>=(e.min||0)&&n<=l});return a&&a.length>0}):n;a=l.length>0?a.filter(e=>e.parentFilter&&l.includes(e.parentFilter)):a;let t=new URLSearchParams(window.location.search);if(e.length>0){let l=e.map(e=>!!e.label&&e.label).join(",");t.set("ranges",encodeURIComponent(l))}else t.delete("ranges");if(l.length>0){let e=l.map(e=>e).join(",");t.set("filters",encodeURIComponent(e))}else t.delete("filters");window.history.replaceState(null,"update params",t.size?`${x}?${t.toString()}`:x),S(a)},[n,x]);(0,o.useEffect)(()=>{let n=new URLSearchParams(window.location.search),a=[],t=[];n.forEach((n,i)=>{if("ranges"===i&&e){let l=decodeURIComponent(n).split(",");a=e.filter(e=>{if(e.label&&l.includes(e.label))return e});return}if("filters"===i&&l){(t=decodeURIComponent(n).split(",")).filter(e=>l.includes(e));return}}),b(a),F(t),L(a,t)},[l,e,F,b,L]);let w=e=>{let l=[];b(l=f.includes(e)?f.filter(l=>l!==e):[...f,e]),L(l,T)},v=e=>{let l=[];F(l=T.includes(e)?T.filter(l=>l!==e):[...T,e]),L(f,l)};return(0,a.jsxs)("div",{className:(0,t.Z)(d.I.ProductGrid,m.F.layout.blockSpacing.large,"_1w0bf4q0",h&&"_1w0bf4q1"),children:[(0,a.jsxs)("div",{className:"_1w0bf4q3",children:[(0,a.jsx)("div",{className:"_1w0bf4q5",children:l&&l.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:k,children:i}),l.map((e,l)=>(0,a.jsx)(c.Z,{displayType:"secondary",className:(0,t.Z)(y,T.includes(e)&&p),text:e,onClick:()=>v(e)},l))]}):null}),(0,a.jsx)("div",{className:"_1w0bf4q4",children:e&&e.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:k,children:g}),e.map((e,l)=>(0,a.jsx)(c.Z,{displayType:"secondary",className:(0,t.Z)(y,f.includes(e)&&p),text:e.label||"",onClick:()=>w(e)},l))]}):null})]}),0===K.length?(0,a.jsx)("div",{className:"_1w0bf4qa",children:"No results found."}):(0,a.jsx)("div",{className:"_1w0bf4q7",children:K.map(e=>(0,a.jsx)(u.Z,{...e,containerClassName:"_1w0bf4q6",truncateMobileDescription:!0,isGridItem:!0,gaComponentName:"product table"},e.id))})]})},{context:"ProductsTableErrorBoundary"})}}]);