1"use strict";(globalThis.webpackChunkgrowingfamilies=globalThis.webpackChunkgrowingfamilies||[]).push([[150],{4910(e,t,i){i.d(t,{A:()=>g});var a=i(88094),r=i(33578),o=(i(99425),i(36357),i(80760),i(58883),i(83723)),n=i(11683),d=i(56410),l=i(48),s=i(83707),c=i(25999),u=i(67375),p=i(54804),v=i(15678),h=function(e){return e.EDITING="EDITING",e.CAROUSEL="CAROUSEL",e}(h||{});const g=e=>{var t,i;let{fields:g,rendering:{dataSource:b},cardData:m,showDeprecateMessage:C=!1}=e;const{pageEditing:f,userProfile:w,settings:{sendToDbIta:A}}=(0,l.i)(),{getBvProductIdCookie:k,setBvProductIdCookie:S,setBvProductItemIdCookie:I,isCampaignComplete:$}=(0,c.y)(),E=(0,s.Bd)("Feature/ProductShelf"),[x,P]=(0,a.useState)(!1),[T,j]=(0,a.useState)(!1),[y,_]=(0,a.useState)(!1),[B,U]=(0,a.useState)(""),D=!(null===g||void 0===g||null===(t=g.displayAsCarousel)||void 0===t||!t.value),R=null===g||void 0===g||null===(i=g.CampaignId)||void 0===i?void 0:i.value,G=(0,a.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";j(e),U(t)},[]),{dbItaParticipate:F}=(0,p.$2)({campaignId:R,dataSource:b,pageStateUpdate:G}),N=(0,a.useCallback)(()=>{G(!0),P(!0)},[P,G]),z=(0,a.useCallback)(()=>{const e=`${window.location.protocol}//${window.location.host}${window.location.pathname}?campaign=${R}`;window.history.pushState({path:e},"",e)},[R]),L=(e,t,i,a)=>{e.preventDefault(),S(t),I(i),$(R)?a():w?!A||y?z():N():window.location.assign(`/utilities/redirect/login?campaign=${R}`)};if((0,a.useEffect)(()=>{F()},[b,G,E,k,A]),f){const e=(0,p.zw)(m,h.EDITING);return(0,v.jsx)(o.w,{children:(0,v.jsxs)(v.Fragment,{children:[C&&(0,v.jsx)("div",{children:'Warning: the control "Product Shelf - Review To Win - Deprecated" has been deprecated. Please replace it with "Product Shelf - Review To Win".'}),e]})})}const M=(0,v.jsx)(u.K,{form:null===g||void 0===g?void 0:g.DbItaForm,onSuccess:()=>{P(!1),_(!0),G(!1),z()},onCloseClick:()=>{P(!1),_(!1),G(!1)},visible:x});if(D){const e=(0,p.zw)(m,h.CAROUSEL,{onRtwCtaClick:L}).map(e=>(0,v.jsx)(r.qr,{children:e},e.key));return(0,v.jsxs)(v.Fragment,{children:[M,(0,v.jsx)("div",{"data-component":"product-shelf-container","data-testid":"product-shelf-container",children:(0,v.jsx)(d.r,{children:(0,v.jsx)(o.w,{hasSpinner:T,errorMessage:B,isCarouselContainer:!0,children:(0,v.jsx)(r.RC,{...n.d,children:e})})})})]})}const V=(0,p.zw)(m,null,{onRtwCtaClick:L});return(0,v.jsxs)(v.Fragment,{children:[M,(0,v.jsx)(o.w,{hasSpinner:T,errorMessage:B,children:V})]})}},11683(e,t,i){i.d(t,{d:()=>r});var a=i(79871);const r={modules:[a.Vx,a.s3,a.Jq],slidesPerView:1.3,centeredSlides:!0,navigation:!0,keyboard:{enabled:!0},grabCursor:!0,breakpoints:{768:{slidesPerView:3,centeredSlides:!1},1024:{slidesPerView:4,centeredSlides:!1}},simulateTouch:!1}},32465(e,t,i){i.d(t,{A:()=>h});var a=i(25173),r=i(21625);const o=a.Ay.div` 2 position: fixed; 3 top: 0; 4 bottom: 0; 5 left: 0; 6 background: rgba(0, 0, 0, 0.5); 7 display: block; 8 min-height: 100%; 9 overflow: hidden; 10 width: 100%; 11 z-index: 99999998; 12 padding: ${(0,r.A)(12,0)}; 13 overflow-y: auto; 14 text-align: center; 15`,n=a.Ay.div` 16 background-color: white; 17 position: relative; 18 background: ${e=>{let{theme:t}=e;return t.colors.general.white}}; 19 border: 1px solid #dedede; 20 display: inline-block; 21 border-radius: ${(0,r.A)(10)}; 22 padding: 0 0 0; 23 24 @media ${e=>{let{theme:t}=e;return t.device.tablet}} { 25 padding: 0 ${(0,r.A)(20)} 0; 26 } 27 28 @media ${e=>{let{theme:t}=e;return t.device.desktop}} { 29 border-radius: ${(0,r.A)(30)}; 30 padding: 0 ${(0,r.A)(50)} 0; 31 } 32`,d=a.Ay.div` 33 height: ${(0,r.A)(35)}; 34 35 @media ${e=>{let{theme:t}=e;return t.device.desktop}} { 36 height: ${(0,r.A)(40)}; 37 } 38`,l=a.Ay.button` 39 position: absolute; 40 z-index: 99999999; 41 cursor: pointer; 42 border: none; 43 background: inherit; 44 right: ${(0,r.A)(15)}; 45 top: ${(0,r.A)(15)}; 46 47 @media ${e=>{let{theme:t}=e;return t.device.desktop}} { 48 right: ${(0,r.A)(20)}; 49 top: ${(0,r.A)(20)}; 50 } 51`;var s=i(821),c=i(9832),u=i(83707),p=i(15678);const v=e=>{let{closeButtonCallback:t,useTopPadding:i}=e;const a=(0,u.Bd)("Feature/ModalDialog")("CloseButtonLabel");return(0,p.jsxs)(p.Fragment,{children:[i&&(0,p.jsx)(d,{}),(0,p.jsx)(l,{"aria-label":a,onClick:t,children:(0,p.jsx)(s.A,{size:(0,r.A)(20),fill:c.zQ.colors.blues.medium})})]})},h=e=>{let{showCloseButton:t,closeDialogCallback:i,useTopPadding:a,children:r,disableBackdropClick:d=!1,"data-testid":l}=e;return(0,p.jsx)(o,{"data-testid":l,onClick:e=>{e.stopPropagation(),d||i()},children:(0,p.jsxs)(n,{onClick:e=>{e.stopPropagation()},children:[t&&(0,p.jsx)(v,{closeButtonCallback:e=>{e.stopPropagation(),i()},useTopPadding:!!a}),r]})})}},38458(e,t,i){i.r(t),i.d(t,{default:()=>n});var a=i(4156),r=i(4910),o=i(15678);const n=(0,a.S)({placeholder:"ProductCards",prop:"cardsPlaceholder"})(e=>{let{fields:t,cardsPlaceholder:i,rendering:a}=e;const n=null===i||void 0===i?void 0:i.map(e=>{var t;let{props:i}=e;return{fields:null===i||void 0===i?void 0:i.fields,id:null===i||void 0===i||null===(t=i.rendering)||void 0===t?void 0:t.dataSource}});return(0,o.jsx)(r.A,{fields:t,rendering:a,cardData:n,showDeprecateMessage:!0})})},54804(e,t,i){i.d(t,{kl:()=>b,zw:()=>v,jD:()=>g,Ff:()=>m,$2:()=>s});
51var a=i(88094),r=i(48),o=i(25999),n=i(83707),d=i(20044),l=i(29292);const s=function(e){let{campaignId:t,dataSource:i,pageStateUpdate:s}=e;const{settings:{bazaarvoiceRtwContainerPage:c,sendToDbIta:u},bazaarVoiceUserAuthenticationString:p,site:v,userProfile:h,csrfToken:g}=(0,r.i)(),{setCampaignComplete:b,getBvProductIdCookie:m,getBvProductItemIdCookie:C}=(0,o.y)(),f=(0,n.Bd)("Feature/ProductShelf"),w=(0,a.useCallback)(()=>{b(t);const e=c+"?bvaction=rr_submit_review"+`&bvproductId=${m()}`+`&bvuserToken=${p}`+`&bvcampaignId=REVIEW_TO_WIN_${t}`+`&itemId=${C()}`;window.location.href=e},[t,b,c,m,p,C]);return{dbItaParticipate:(0,a.useCallback)(()=>{if(new URLSearchParams(window.location.search).get("bv"))if(s(!0),u&&v.name.includes("pgperte")&&h)(0,d.Y)(`${(0,l.Mz)()}/api/dbita/participate`,{dataSource:i},g).catch(e=>{s(!1,f("DbItaGenericErrorMessage"))}).then(e=>w()).catch(e=>{s(!1,f("BazaarVoiceGenericErrorMessage"))});else try{w()}catch{s(!1,f("BazaarVoiceGenericErrorMessage"))}},[w])}};var c=i(61578),u=i(15678),p=function(e){return e.EDITING="EDITING",e.CAROUSEL="CAROUSEL",e}(p||{});const v=function(e,t,i){return null!==e&&void 0!==e&&e.length?e.map(e=>{let{fields:a,id:r}=e;switch(t){case p.EDITING:return(0,u.jsx)(c.default,{fields:a,isCarouselItem:!1,...i},(null===a||void 0===a?void 0:a.Url)||(null===a||void 0===a?void 0:a.__Updated));case p.CAROUSEL:return(0,u.jsx)("div",{children:(0,u.jsx)(c.default,{fields:a,isCarouselItem:!0,isRTW:!0,itemId:r,...i})},(null===a||void 0===a?void 0:a.Url)||(null===a||void 0===a?void 0:a.__Updated));default:return(0,u.jsx)(c.default,{fields:a,isRTW:!0,itemId:r,priceSpiderGtins:null===a||void 0===a?void 0:a.priceSpiderGtins,...i},(null===a||void 0===a?void 0:a.Url)||(null===a||void 0===a?void 0:a.__Updated))}}):t===p.EDITING?[(0,u.jsx)("div",{children:"Please click here to edit the Product Shelf"},"ProductShelf-empty-message")]:null};var h=i(54343);const g=function(e){(0,h.oe)({GAeventCategory:"event_informational_action",GAeventAction:"event_filter_brands",GAeventLabel:e,GAeventValue:0,GAeventNonInteraction:!1})};let b=function(e){return e.PAGE_NUMBER_UPDATE="PAGE_NUMBER_UPDATE",e.FETCH_SUCCESS="FETCH_SUCCESS",e.FETCH_FAIL="FETCH_FAIL",e}({});function m(e,t){var i;switch(t.type){case b.PAGE_NUMBER_UPDATE:return{...e,pageNumber:t.pageNumber};case b.FETCH_SUCCESS:return{...e,fetchedResults:t.data.results,totalResults:t.data.totalResultsCount,brandNames:null===(i=t.data.availableBrands)||void 0===i?void 0:i.map(e=>({BrandFamilyNames:e.displayName})),availableBrands:t.data.availableBrands};case b.FETCH_FAIL:return{...e,error:!0};default:return e}}},56410(e,t,i){i.d(t,{r:()=>n});var a=i(25173),r=i(21625),o=i(78334);const n=a.Ay.div` 52 position: relative; 53 54 .swiper { 55 padding: ${(0,r.A)(0)}; 56 min-width: ${(0,r.A)(280)}; 57 @media ${e=>{let{theme:t}=e;return t.device.tablet}} { 58 padding: ${(0,r.A)(0,5)}; 59 } 60 } 61 .swiper-button-next, 62 .swiper-button-prev { 63 display: none; 64 position: absolute; 65 z-index: 10; 66 margin: 0; 67 padding: 0; 68 border: 0; 69 cursor: pointer; 70 background: ${e=>{let{theme:t}=e;return t.colors.blues.light}}; 71 color: ${e=>{let{theme:t}=e;return t.colors.blues.medium}}; 72 top: calc(50% - ${(0,r.A)(35)}); 73 height: ${(0,r.A)(92)}; 74 width: ${(0,r.A)(30)}; 75 align-items: center; 76 justify-content: center; 77 78 &:after { 79 content: none; 80 } 81 82 svg { 83 display: block; 84 width: ${(0,r.A)(10)}; 85 height: ${(0,r.A)(16)}; 86 flex-shrink: 0; 87 opacity: 0.5; 88 } 89 90 @media ${e=>{let{theme:t}=e;return t.device.tablet}} { 91 display: flex; 92 } 93 } 94 95 .swiper-button-prev { 96 ${o.kb}: 0; 97 } 98 99 .swiper-button-next { 100 ${o.pG}: 0; 101 } 102 103 .swiper-button-disabled { 104 display: none; 105 } 106 107 .swiper-image { 108 display: block; 109 } 110`},58883(){},67375(e,t,i){i.d(t,{K:()=>u});var a=i(88094),r=i(39522),o=i(48),n=i(32465),d=i(53915),l=i(54017),s=i(15678);const c={history:void 0,location:void 0,match:void 0,Header:null,Footer:null,onRedirect:e=>e,ignorePageTemplateAnalytics:!0},u=e=>{let{form:t,onSuccess:i,onCloseClick:u,visible:p,disableBackdropClick:v}=e;const{pageEditing:h}=(0,o.i)();return(0,a.useEffect)(()=>{(0,d.j)(p)}
110,[p]),t?p&&(0,s.jsx)(l.qr,{children:(0,s.jsx)(n.A,{showCloseButton:!0,closeDialogCallback:u,disableBackdropClick:v,children:(0,s.jsx)(r.pc,{...c,...t,fields:t,preventInteraction:h,onSubmitSuccess:()=>i()})})}):null}},80760(){}}]);
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.