PageSourceSearch

https://www.costco.ca/consumer-web/product/prd/details-cabc/_next/static/chunks/6361-2cad7d8d168e45a1.js

js costco.ca collected 2026-10-01 10:22:51 UTC 414,964 bytes, 107 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6361],{289:(e,t,i)=>{i.d(t,{AddToCartBundleContainer:()=>s});var r=i(95155),a=i(99899),n=i(88987),l=i(38909),o=i(60714);let s=()=>{let{productDetailsTranslations:e,productDetailsData:t,locale:i,accessoriesData:s,properties:d}=(0,n.b)(),{productTileConfigData:c}=(0,o.h)();return(0,r.jsx)(a.A,{children:(0,r.jsx)(l.A,{locale:i,productDetailsData:t,translations:e,productConfig:c,properties:d,accessoriesData:s})})}},578:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(6946),a=i(19359);let n=async(e,t)=>{let{childItemNumber:i,destination:n,shippingCodes:l,itemMinQuantity:o,serviceConfig:s}=e,{endpoint:d="",method:c="GET",required_request_headers:u,required_request_parameters:p,retryconfig:m}=s,h=String("https://ecom-api.costco.com"),f=u.client_identifier[String("CABC").toLowerCase()]||"",{env:g="",service:b="",wcsClientSystemId:y=""}=u.costco,{orderItemId:x="",action:v=""}=p.inventory,{destinationState:S="",destinationPostalCode:C="",destinationCountryCode:E=""}=n,I=new URLSearchParams({destinationState:S,destinationPostalCode:C,destinationCountryCode:E,orderItemId:x,shippingCodes:l,action:v,quantity:o}),T=s?.required_request_headers?.costco?.override,A=(0,a.Uo)(g,T),D=`${h}${d}/${i}?${I}`;try{let{data:e,status:a,statusText:n}=await (0,r.X)(D,{method:c,headers:{"client-identifier":f,"costco.service":b,"costco.env":A,"costco-x-wcs-clientSystemId":y},signal:t},m,`[PDP][IV2][Error] - ChildId: ${i}`);return{inventoryV2Info:e,status:a}}catch(e){if(console.info(`[PDP][IV2][ERROR] - ${e}`),e instanceof DOMException&&"AbortError"===e.name)throw e;throw Error(`[PDP][IV2][Error] - ChildId: ${i} - ${e}`)}}},1611:(e,t,i)=>{i.d(t,{A:()=>eo});var r=i(95155),a=i(12115),n=i(27966),l=i(54309),o=i(3187),s=i(99295),d=i(46295),c=i(86670),u=i(24880);let p={display:"flex",position:"relative",flexDirection:"column",zIndex:3},m={display:"flex",gap:u.D3H,position:"relative",flexDirection:"row"},h={"&:focus-visible":{borderRadius:"1px",outline:"2px solid -webkit-focus-ring-color",outlineOffset:"2px"},height:"100%",position:"absolute",width:"100%",zIndex:1},f={display:"flex",flexDirection:"column",gap:u.m72,width:"100%"},g={"> img":{height:"130px",width:"130px",maxWidth:"fit-content"}},b={display:"flex",alignItems:"center",justifyContent:"center",zIndex:1,height:u.pMV,padding:u.m72,backgroundColor:u.KLo,"& .MuiFormControlLabel-root":{backgroundColor:u.KLo}},y={display:"flex",alignItems:"center",height:u.i_v,color:u.BO,position:"relative",zIndex:3},x={display:"flex",flexDirection:"column",gap:u.m72},v={display:"flex",flexDirection:"row",alignItems:"flex-start",gap:u.m72,zIndex:2},S=(0,c.Ay)("div")({borderRadius:u.oOK,border:`${u.RYE} solid ${u.Z8G}`,background:u.GFZ,color:u.sLX,alignItems:"center",display:"flex",fontSize:u.MkR,height:"100%",justifyContent:"center",lineHeight:"initial",minHeight:"40px",padding:`${u.D3H} ${u.iAn}`,position:"relative",width:"100%"}),C={fontSize:u.i_v,marginRight:u.m72,verticalAlign:"6px",fontWeight:700,color:"#333333",lineHeight:"1.5",paddingBottom:u.m72},E={height:u.b3d,width:u.b3d,color:u.BO,marginLeft:u.m72},I={WebkitBoxOrient:"vertical",WebkitLineClamp:3,color:u.JBU,display:"-webkit-box",lineClamp:3,overflow:"hidden"},T={color:u.BO};var A=i(6310),D=i(21517),_=i(13052),O=i(5553),w=i(45182),N=i(95468);let j=({itemNumber:e,minQuantity:t,translations:i,isMemberOnlyItem:a,isEligibleMember:l,onCheckChange:o})=>{let{onItemSelect:s}=(0,D.$)(),{requestDeselect:d,isCheckboxHidden:c}=(0,N.s)(),{isLoading:u,status:p}=(0,_.r5)(e),[m]=(0,w.jQ)(),h=m?.get(e),f=h?.quantity??t,g=h?.isSelected??!1,y=(0,_.UV)(p),x=c(e),v=g?i?.itemaddedlabel||"Added":i?.additemlabel||"Add";return(0,r.jsx)(r.Fragment,{children:!u&&y&&(!a||l)&&!x&&(0,r.jsx)(n.default,{sx:b,children:(0,r.jsx)(A.S,{id:`${O.EA}_${e}_checkbox`,label:v,isChecked:g,ariaDescribeText:`${O.EA}_${e}_title`,onChange:()=>{let t=!g,i=()=>{s&&s(e,t,f),o?.(e,t)};t?i():d(e,i)}})})})};var P=i(68409),R=i.n(P),k=i(12158),L=i(64912),M=i(45969),B=i(42800);let $=(e,t)=>{let{isLoadingPriceAPI:i,bundleItemPrice:r}=(0,M.A)(),[n]=(0,w.AX)();return{bundlePrice:(0,a.useMemo)(()=>
1{if(!e)return;let i=n?.find(t=>t?.id===e),a=i?.parentDetails?.descriptions?.[0]?.object.marketingStatement??"",l={priceListData:void 0,promoItem:{promoText:a}},o=r?.priceData?.find(t=>t.id===e);if(!o)return l;let s=Array.isArray(o?.displayPrice)?o.displayPrice?.[0]?.deliveredPrice:o?.displayPrice?.deliveredPrice;if(null==s)return l;let d="number"==typeof s?(0,B.$g)(t,s.toString()):{wholeValue:"",decimalValue:"",formattedPrice:""},c=o?.linkFees&&o?.linkFees?.length>0;return{priceListData:{wholeValue:"fr-ca"===t?(0,B.H9)(d.wholeValue):(0,B.aE)(d.wholeValue),decimalValue:d.decimalValue,formattedPrice:d.formattedPrice,hasLinkFeeData:c},promoItem:{promoText:a}}},[r,n,e,t,i]),isLoadingPriceAPI:i}};var z=i(74324),U=i(60714),q=i(19216),V=i(96013),F=i(1147);let W=({itemNumber:e,onActive:t,priceCSData:i,locale:a,bundlePrice:l,sanitizedPromoText:o,isLinkFeeEligible:s=!1})=>(0,r.jsxs)(n.default,{sx:x,children:[l?.priceListData&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{"data-testid":`priceTooltipBox_${e}`,sx:y,onFocus:()=>t(!0),children:(0,r.jsx)(q.m,{buttonAriaLabel:i?.onlinePriceTooltipAriaLabel,buttonContent:[(0,r.jsx)(k.Text,{sx:{display:"inline",color:u.BO},uniqueId:`${i?.onlinePriceLabel}-heading_${e}`,variant:"l2",children:i?.onlinePriceLabel},`onlinePriceLabel_${e}`),(0,r.jsx)(V.A,{"data-testid":`tooltipIcon_${e}`,sx:E},`tooltipIcon_${e}`)],content:i?.onlinePriceTooltipText,position:"top",hasArrow:!0,tooltipId:`${i?.onlinePriceLabel}-tooltip-id_${e}`,uniqueId:`${i?.onlinePriceLabel}_${e}`,offset:[0,4],sx:{'&[data-popper-placement*="top"]':{".arrow":{left:"28px !important"}}},disablePortal:!0})}),(0,r.jsx)(n.default,{id:`formattedPrice_${e}`,sx:C,children:(0,r.jsx)(F.g,{locale:a,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:l?.priceListData?.wholeValue||"0",hasDecimal:!0,decimalValue1:l?.priceListData?.decimalValue||"00",hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"md"})})]}),l?.promoItem?.promoText&&(0,r.jsx)(k.Text,{uniqueId:`promoText_${e}`,variant:"t7",sx:I,children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:o}})}),s&&l?.priceListData?.hasLinkFeeData&&(0,r.jsx)(k.Text,{uniqueId:`Text_link-fee-${e}`,variant:"t7",sx:T,children:i?.ecofeesincluded||"Eco Fees Included"})]});var H=i(45955),K=i(29445),G=i(70422);let Y=({stockStatus:e,itemNumber:t,partNumber:i,minItemQuantity:l,maxItemQuantity:o,translations:s,quantity:d,onQuantityChange:c,onValidationError:p,customErrorMsg:m,onClearServerError:h,isLimitOneQty:f,modelNumber:g})=>{let b=(0,a.useRef)(null),[y,x]=(0,a.useState)(0),[v,C]=(0,a.useState)(0),{errorMessage:E,handleQuantityChange:I,hasError:T,clearError:A}=(({minQuantity:e,maxQuantity:t,itemNumber:i,modelNumber:r,onQuantityChange:n,onValidationError:l,translations:o,isLimitOneQty:s})=>{let{trackEvent:d}=(0,G.z1)(),[c,u]=(0,a.useState)("");return{errorMessage:c,handleQuantityChange:(0,a.useCallback)(a=>{if(!Number.isInteger(a)){u(o?.decimalqtyerrormessage||"Quantity must be in increments of one"),l?.(!0);return}if(a<e){u(o?.minqtyerrormessage?.replace("{{minValue}}",String(e))||`Quantity must be ${e} or more to add to cart.`),l?.(!0),0!==a&&n(i,e);return}if(a>t){let e=s&&a>1?o?.limitoneqtyerrormessage?.replace("{itemNumber}",i)||`Item ${i} is limited to quantity one`:r?o?.maxqtyerrormessage?.replace("{{modelNumber}}",String(r)).replace("{{maxValue}}",String(t))||`Model ${r} has a maximum order quantity of ${t}.`:o?.maxqtyerrormessagenomodelnumber?.replace("{{maxValue}}",String(t))||`This item has a maximum order quantity of ${t}`;d({trackType:"multiAttribute",trackedData:[{key:"uimsg",value:"Product Detail - Bundle | Order Quantity Exceeded"}]}),u(e),l?.(!0),n(i,t);return}u(""),l?.(!1),n(i,a)},[e,t,i,r,n,l,o,s]),clearError:(0,a.useCallback)(()=>{u(""),l?.(!1)},[l]),hasError:!!c}})({minQuantity:l??O.hi,maxQuantity:f?1:o??O.ZD,itemNumber:t,modelNumber:g,onQuantityChange:c,onValidationError:p,translations:s,isLimitOneQty:f}),D=(0,a.useCallback)((e,t)=>{let i="blur"===t;if(m&&!i&&"submit"!==t&&h?.(),i){if(!Number.isInteger(e)){let t=Math.round(e);t===d&&C(e=>e+1),I(t),x(e=>e+1)}return}I(e),x(e=>e+1)},[m,h,I,d]),_=`error-text-${t}`,w=`${O.EA}_${t}_title`;return((0,a.useEffect)(()=>{let e=document.getElementById("add-to-cart-bundle"),t=()=>{e&&A()},i=e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t())};return e?.addEventListener("click",t),e?.addEventListener("keydown",i),()=>{e?.removeEventListener("click",t),e?.removeEventListener("keydown",i)}},[]),(0,a.useEffect)(()=>{if(!b.current)return;let e=b.current.querySelector('input[type="tel"]');e&&(T&&E&&!m?(e.setAttribute("aria-describedby",`${_} ${w}`),e.focus()):m||e.setAttribute("aria-describedby",w))},[T,E,m,y,t,_,w]),e)?(0,r.jsxs)(n.default,{sx:{...T&&{'& input[type="tel"]:focus, & input[type="tel"]:focus-visible':{outline:`2px solid ${u.JHH}`,borderColor:u.JHH}}},children:[(0,r.jsx)(H.R,{ref:b,onQuantityChange:D,minValue:l??O.hi,maxValue:f?1:o??O.ZD,inputAriaLabel:s?.quantitylabel??"Quantity",decrementAriaLabel:s?.qtydecrementarialabel??"Decrease Quantity",incrementAriaLabel:s?.qtyincrementarialabel??"Increase Quantity",parentUniqueId:w,uniqueId:t||i,updateQuantity:d,allowAddToCartDisplay:!1,customErrorMsg:m,"aria-invalid":T||!!m,suppressDefaultErrorMessages:!0},`qty-${t}-${v}`),E&&!m&&(0,r.jsx)(n.default,{id:`quantity-error-${t}`,role:"alert","aria-live":"polite",sx:{"& span":{wordBreak:"break-word"}},children:(0,r.jsx)(K.d,{errorIconA11yAttributes:{"aria-hidden":!1,focusable:!0,"aria-label":"Error: "},hasError:E.length>0,errorText:E,errorTextId:_,"data-testid":"quantity-error-message"})})]}):(0,r.jsx)(S,{children:s?.outofstock??"Out of Stock"})},Q=({productData:e,translations:t,onActive:i,locale:l,customErrorMsg:o,onClearServerError:s,isMemberOnlyItem:d,isEligibleMember:c})=>{let{productPricingCardModuleSettings:u}=(0,U.h)(),{itemNumber:p="",productLinkUrl:m,productImageUrl:h,productName:f,partNumber:g,minItemQuantity:b,maxItemQuantity:y,isLimitOneQty:x,productAttributes:S,isSellable:C,isLinkFeeEligible:E}=e||{},T=S?.[0]?.value,{onQuantityChange:A}=(0,D.$)(),{isLoading:j,status:P}=(0,_.r5)(p),[M]=(0,w.jQ)(),B=M?.get(p),q=B?.quantity??b??O.hi,{bundlePrice:V,isLoadingPriceAPI:F}=$(p,l)||{},H=(0,_.UV)(P),K=R().sanitize(V?.promoItem?.promoText||""),G=u?(0,z.IV)(u):{},{isSellableItemsInStock:Q}=(0,_.MN)(),Z=(0,a.useCallback)((e,t)=>{A?.(e,t,b)},[A,b]);if(!(!d||c))return V?.promoItem?.promoText?(0,r.jsx)(k.Text,{uniqueId:`promoText_${p}`,variant:"t7",sx:I,children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:K}})}):null;let{isCheckboxHidden:J}=(0,N.s)(),X=J(p);return(0,r.jsxs)(r.Fragment,{children:[!j&&!F&&V&&(0,r.jsx)(W,{itemNumber:p,onActive:i,priceCSData:G,locale:l,bundlePrice:V,sanitizedPromoText:K,isLinkFeeEligible:E}),!j&&!F&&!X&&(0,r.jsxs)(n.default,{sx:v,children:[C||Q?(0,r.jsx)(n.default,{sx:{display:"flex",flexDirection:"column",width:"141px",flexShrink:0},children:(0,r.jsx)(Y,{stockStatus:H,itemNumber:p,partNumber:g,modelNumber:T,minItemQuantity:b,maxItemQuantity:y,translations:t,quantity:q,onQuantityChange:Z,customErrorMsg:o,onClearServerError:s,isLimitOneQty:x})}):null,C&&(0,r.jsx)(L.Z,{product:{href:m,id:p||"",price:V?.priceListData?.formattedPrice??"",src:h,title:f},ariaDescribedBy:`${O.EA}_${p}_title`,uniqueId:`AddToList_${g}`,variant:"iconV2",buttonSize:"large",sx:H?{transform:"translateY(-5px)"}:void 0})]})]})};var Z=i(31122),J=i(42138);let X=({itemNumber:e,productAttributes:t,translations:i})=>{let{isLoading:a,status:l}=(0,_.r5)(e),o=t?.find(e=>"Model"===e.identifier)?.value||"",s=(0,_.UV)(l),d=i?.modeloutofstockmessage?.replaceAll("{model}",o)||"Out of Stock";return(0,r.jsx)(r.Fragment,{children:!a&&!s&&(0,r.jsx)(n.default,{children:(0,r.jsx)(J.Notification,{uniqueId:`bundle-notification-${e}`,severity:"alert",message:d,icon:(0,r.jsx)(V.A,{})})})})};var ee=i(64908);let et=({itemNumber:e,isCurrentItem:t,productInfoData:i,translations:l})=>{let{productName:o,productAttributes:s,reviewRatingData:d}=i||{},{value:c,reviewCount:p}=function(e){let[t,i]=(0,a.useState)({value:null,reviewCount:null});return(0,a.useEffect)(()=>{if(!e)return;let t=()=>{if(!document.querySelector(".bv_rating_summary_buttons_container"))return!1;let e=document.querySelector(".bv_avgRating_component_container"),t=document.querySelector(".bv_numReviews_text");if(!t)return!1;let r=parseInt(t?.textContent?.replace(/\D/g,"")??"",10);if(!e)return i({value:null,reviewCount:isNaN(r)?0:r}),!0;let a=parseFloat(e.textContent??"0");return!!(isNaN(a)||isNaN(r))||(i({value:a,reviewCount:r}),!0)};if(t())return;let r=new MutationObserver(()=>{t()&&r.disconnect()});return r.observe(document.body,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t}(t),m=null!==p,h=t&&m?c??0:d?.value??0,f=t&&m?p??0:d?.reviewCount??0,g=t&&m?(l?.averageratingarialabel||"").replace("{rating}",String(h)).replace("{total}",String(f)):d?.ariaLabel||"",b=t?d?.value!==null||m:d?.value!==null;return(0,r.jsxs)(n.default,{"data-testid":`${O.EA}_Info_${e}`,children:[o&&(0,r.jsxs)(k.Text,{component:"h4",id:`${O.EA}_${e}_title`,uniqueId:`${O.EA}_${e}_title`,variant:"t6",children:[t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{style:{fontWeight:"bold"},children:l?.currentitemlabel||"Current Item"}),(0,r.jsx)("br",{})]}),o]}),s&&s.length>0&&s.map((t,i)=>(0,r.jsx)(n.default,{sx:{display:"flex",flexWrap:"wrap"},"data-testid":`${O.EA}_${e}_productAttributes`,children:(0,r.jsxs)(k.Text,{uniqueId:`${O.EA}_${e}_attribute_${i}`,variant:"t7",sx:{color:u.BO},children:[t.key," ",t.value]})},i)),b&&(0,r.jsx)(ee.G,{displayVariant:"compact",uniqueId:`ProductCard_${e}_rating`,value:h,ariaLabel:g,reviewCount:f,size:"small",displayAvgRatingAsText:!1,fillColor:u.pbd,overlayColor:u.U_w,strokeColor:u.VfS,strokeWidth:1.5})]})};var ei=i(34971),er=i(95097);let ea=({itemNumber:e,productLinkUrl:t,productName:i,isFirstTile:a=!1})=>{let s={hiddenText:""};return(0,r.jsxs)(n.default,{sx:{...m},"aria-hidden":!a,children:[(0,r.jsx)(o.Link,{href:t||"",sx:h,children:(0,r.jsx)(n.default,{component:"span",sx:l.A,children:i})}),(0,r.jsx)(n.default,{sx:{minWidth:"164px",height:"168px"},children:(0,r.jsx)(ei.Skeleton,{variant:er.z.Rectangular,width:164,height:168,...a?{}:s})}),(0,r.jsxs)(n.default,{sx:f,children:[(0,r.jsx)(ei.Skeleton,{variant:er.z.TextBody,width:"100%",...s}),(0,r.jsx)(ei.Skeleton,{variant:er.z.TextBody,width:"100%",...s}),(0,r.jsx)(ei.Skeleton,{variant:er.z.TextBody,width:"70%",...s}
1),(0,r.jsx)("div",{"aria-hidden":!0,children:(0,r.jsx)(ee.G,{displayVariant:"compact",uniqueId:`ProductCard_${e}_rating`,value:0,ariaLabel:"",size:"small",displayAvgRatingAsText:!1,strokeColor:u.XgP,overlayColor:u.XgP,strokeWidth:1.5})}),(0,r.jsx)(ei.Skeleton,{variant:er.z.TextHeader,width:"100%",...s}),(0,r.jsx)(ei.Skeleton,{variant:er.z.QuantitySelector,width:"100%",...s})]})]})};var en=i(30890),el=i(71706);let eo=({productData:e,translations:t,locale:i,addToListContentStackData:c,customErrorMsg:u,onClearServerError:b,onCheckChange:y,index:x})=>{let[v,S]=(0,a.useState)(!1),[C,E]=(0,a.useState)(!1),{itemNumber:I=""}=e||{},{pageSettingsProperties:T}=(0,Z.h)();(0,a.useEffect)(()=>{E(!0)},[]);let A=Number(e?.minItemQuantity)||1,{productImageUrl:D,productLinkUrl:w,productAttributes:N,isMemberOnlyItem:P,productName:R,productDescription:k,isCurrentItem:L}=e||{},{isLoading:M}=(0,_.r5)(I),{isLoadingPriceAPI:B}=$(I,i)||{},{isEligibleMember:z,isResolved:U}=function(){let[e,t]=(0,a.useState)({isEligibleMember:!1,isResolved:!1}),{wcMember:i}=(0,el.B)();return(0,a.useEffect)(()=>{let{active:e,validated:i,verified:r,signedIn:a}=(0,en.fm)();t({isEligibleMember:!!(e&&(i||r)&&a),isResolved:!0})},[i?.value]),e}(),q=!C||!U||M||B,V=(0,a.useCallback)(e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||S(!1)},[]);return""===I||null==I?(console.info("[PDP][BUNDLE][ERROR] - Unable to build bundle page"),null):(0,r.jsx)(n.default,{"data-testid":`scaffolding-product-card-container-productData-${I}`,children:(0,r.jsx)(s.AddToListProviderClient,{contentStackValues:c,enableModernApis:!0,children:(0,r.jsxs)(n.default,{sx:{...p},"data-testid":`${O.EA}_Container_${I}`,onBlur:V,children:[q?(0,r.jsx)(ea,{itemNumber:I,productLinkUrl:w||"",productName:R,isFirstTile:0===x}):(0,r.jsxs)(n.default,{sx:{...m},id:`bundle-product-card-${x}`,children:[(0,r.jsx)(o.Link,{href:w||"",sx:h,children:(0,r.jsx)(n.default,{component:"span",sx:l.A,children:R})}),(0,r.jsx)(n.default,{sx:{minWidth:"138px",height:"138px"},children:(0,r.jsx)(d.X,{ariaHidden:!0,src:D||"",srcFallback:T?.placeholderImage||"",sx:g,uniqueId:I,title:k||""})}),(0,r.jsxs)(n.default,{sx:f,children:[(0,r.jsx)(X,{itemNumber:I,productAttributes:N,translations:t}),(0,r.jsx)(et,{isCurrentItem:L,itemNumber:I,productInfoData:e,translations:t}),(0,r.jsx)(Q,{productData:e,translations:t,onActive:S,locale:i,customErrorMsg:u,onClearServerError:b,isMemberOnlyItem:P,isEligibleMember:z})]})]}),!q&&(0,r.jsx)(j,{itemNumber:I,minQuantity:A,translations:t,isMemberOnlyItem:P,isEligibleMember:z,onCheckChange:y})]})})})}},5064:(e,t,i)=>{i.d(t,{eE:()=>L,$h:()=>m,z3:()=>U,sB:()=>$,dE:()=>q,XV:()=>z,Z9:()=>w});var r=i(12115),a=i(85425),n=i(64580),l=i(23696),o=i(87358);let s=(0,n.w)({server:{NODE_ENV:l.z.string().nonempty(),CONTENTSTACK_BROWSE_API_KEY:l.z.string().nonempty(),CONTENTSTACK_BROWSE_DELIVERY_TOKEN:l.z.string().nonempty(),CONTENTSTACK_BROWSE_PREVIEW_TOKEN:l.z.string().nonempty(),CONTENTSTACK_BROWSE_ENVIRONMENT:l.z.string().nonempty(),CONTENTSTACK_BROWSE_BRANCH:l.z.string().nonempty(),CONTENTSTACK_BROWSE_API_HOST:l.z.string().nonempty(),CONTENTSTACK_BROWSE_APP_HOST:l.z.string().nonempty(),CONTENTSTACK_BROWSE_PREVIEW_HOST:l.z.string().nonempty(),CONTENTSTACK_BROWSE_REGION:l.z.string().nonempty(),CONTENTSTACK_CONFIG_API_KEY:l.z.string().nonempty(),CONTENTSTACK_CONFIG_DELIVERY_TOKEN:l.z.string().nonempty(),CONTENTSTACK_CONFIG_ENVIRONMENT:l.z.string().nonempty(),CONTENTSTACK_CONFIG_BRANCH:l.z.string().nonempty(),CONTENTSTACK_CONFIG_API_HOST:l.z.string().nonempty(),CONTENTSTACK_CONFIG_APP_HOST:l.z.string().nonempty(),CONTENTSTACK_CONFIG_REGION:l.z.string().nonempty(),SITE:l.z.string().nonempty(),INTERNAL_API_BASE_URL:l.z.string().nonempty(),CONTENT_ENTRY_ID_FOOTER:l.z.string().nonempty(),CONTENT_ENTRY_ID_HEADER:l.z.string().nonempty(),CONTENT_ENTRY_ID_HOMEPAGE:l.z.string().nonempty(),CONTENT_ENTRY_TYPE_HOMEPAGE:l.z.string().nonempty(),CONTENT_ENTRY_ID_SITE_CONFIGURATION:l.z.string().nonempty(),CONTENT_ENTRY_ID_CLIENT_CONFIGURATION:l.z.string().nonempty(),CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION:l.z.string().nonempty(),CONTENT_ENTRY_COSTCO_ENV_HEADER_CONFIGURATION:l.z.string().optional(),DEBUG_CONTENT_STACK_SDK:l.z.string().nonempty(),LOGROCKET_CUSTOMERRECORDING_APPID:l.z.string().nonempty(),LOGROCKET_BUSINESSUSERRECORDING_APPID:l.z.string().nonempty(),REDIS_SHARED_CACHE:l.z.string().optional(),REDIS_HOST:l.z.string().optional(),REDIS_PORT:l.z.string().optional(),REDIS_PASSWORD:l.z.string().optional(),REDIS_USERNAME:l.z.string().optional()},client:{},runtimeEnv:{NODE_ENV:"production",SITE:o.env.SITE,CONTENT_ENTRY_ID_SITE_CONFIGURATION:o.env.CONTENT_ENTRY_ID_SITE_CONFIGURATION,CONTENTSTACK_BROWSE_API_KEY:o.env.CONTENTSTACK_BROWSE_API_KEY,CONTENTSTACK_BROWSE_DELIVERY_TOKEN:o.env.CONTENTSTACK_BROWSE_DELIVERY_TOKEN,CONTENTSTACK_BROWSE_PREVIEW_TOKEN:o.env.CONTENTSTACK_BROWSE_PREVIEW_TOKEN,CONTENTSTACK_BROWSE_ENVIRONMENT:o.env.CONTENTSTACK_BROWSE_ENVIRONMENT,CONTENTSTACK_BROWSE_BRANCH:o.env.CONTENTSTACK_BROWSE_BRANCH,CONTENTSTACK_BROWSE_API_HOST:o.env.CONTENTSTACK_BROWSE_API_HOST,CONTENTSTACK_BROWSE_APP_HOST:o.env.CONTENTSTACK_BROWSE_APP_HOST,CONTENTSTACK_BROWSE_PREVIEW_HOST:o.env.CONTENTSTACK_BROWSE_PREVIEW_HOST,CONTENTSTACK_BROWSE_REGION:o.env.CONTENTSTACK_BROWSE_REGION,CONTENTSTACK_CONFIG_API_KEY:o.env.CONTENTSTACK_CONFIG_API_KEY,CONTENTSTACK_CONFIG_DELIVERY_TOKEN:o.env.CONTENTSTACK_CONFIG_DELIVERY_TOKEN,CONTENTSTACK_CONFIG_ENVIRONMENT:o.env.CONTENTSTACK_CONFIG_ENVIRONMENT,CONTENTSTACK_CONFIG_BRANCH:o.env.CONTENTSTACK_CONFIG_BRANCH,CONTENTSTACK_CONFIG_API_HOST:o.env.CONTENTSTACK_CONFIG_API_HOST,CONTENTSTACK_CONFIG_APP_HOST:o.env.CONTENTSTACK_CONFIG_APP_HOST,CONTENTSTACK_CONFIG_REGION:o.env.CONTENTSTACK_CONFIG_REGION,CONTENT_ENTRY_ID_FOOTER:o.env.CONTENT_ENTRY_ID_FOOTER,CONTENT_ENTRY_ID_HEADER:o.env.CONTENT_ENTRY_ID_HEADER,CONTENT_ENTRY_ID_HOMEPAGE:o.env.CONTENT_ENTRY_ID_HOMEPAGE,CONTENT_ENTRY_TYPE_HOMEPAGE:o.env.CONTENT_ENTRY_TYPE_HOMEPAGE,CONTENT_ENTRY_ID_CLIENT_CONFIGURATION:o.env.CONTENT_ENTRY_ID_CLIENT_CONFIGURATION,CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION:o.env.CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION,CONTENT_ENTRY_COSTCO_ENV_HEADER_CONFIGURATION:o.env.CONTENT_ENTRY_COSTCO_ENV_HEADER_CONFIGURATION,DEBUG_CONTENT_STACK_SDK:o.env.DEBUG_CONTENT_STACK_SDK,INTERNAL_API_BASE_URL:o.env.INTERNAL_API_BASE_URL,LOGROCKET_CUSTOMERRECORDING_APPID:o.env.LOGROCKET_CUSTOMERRECORDING_APPID,LOGROCKET_BUSINESSUSERRECORDING_APPID:o.env.LOGROCKET_BUSINESSUSERRECORDING_APPID,REDIS_SHARED_CACHE:o.env.REDIS_SHARED_CACHE,REDIS_HOST:o.env.REDIS_HOST,REDIS_PORT:o.env.REDIS_PORT,REDIS_PASSWORD:o.env.REDIS_PASSWORD,REDIS_USERNAME:o.env.REDIS_USERNAME}});var d=i(47161),c=i(43605);i(87651);var u=i(44209),p=i(87358);(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_PRODUCT_SERVICE)),void 0,{revalidate:43200,tags:["cs-e
1ntries","service-configurations","product"]});(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_PRODUCT_SERVICE_MESH_API)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","product-service-mesh"]});let m=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_BRANDFOLDER_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","brandfolder"]}),h=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_INVENTORYV2_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","inventory-v2"]}),f=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_PICKUP_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","pickup"]}),g=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_MDO_LOCATION_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","mdo-location"]}),b=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_MERCHANDISE_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","merchandise"]}),y=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_WCS_INVENTORY_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","wcs-inventory"]}),x=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_SC_INVENTORY_UPDATE_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","sc-inventory-update"]}),v=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_BATCH_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","batch-service"]});(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,"criteo_service_config"),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","criteo-script"]});let S=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_PRICE_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","price-details"]}),C=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_PRICE_SERVICE_V3)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","price-details-v3"]}),E=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_FULL_PRICE_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","price-details-full"]}),I=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_FULL_PRICE_SERVICE_V3)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","price-details-full-v3"]}),T=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_BUNDLE_PRICE_LITE_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","bundle-price-lite"]}),A=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_DELIVERY_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","delivery"]}),D=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,"warehouse_locator_api"),void 0,{revalidate:43200,tags:["pdp","service-configurations","warehouse-locator"]}),_=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_SC_INVENTORY_BATCH_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","sc-inventory-batch"]}),O=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_AVAILABILITY_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","availability"]}),w=(0,u.unstable_cache)(async()=>$(L.ServiceConfiguration,String(p.env.CONTENTSTACK_CONFIG_BF_MANUALS_AND_GUIDES_SERVICE)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","bf-manuals-and-guides"]});var N=i(87358);(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,"forge.pills"),void 0,{revalidate:43200,tags:["cs-e
1ntries","service-configurations","pills"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,"search_config"),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","search"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLED_WAREHOUSE_LIST)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","warehouse-list"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLE_WAREHOUSE_LIST_BOPIW)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","warehouse-list-bopiw"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLE_WAREHOUSE_LIST_WIO)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","warehouse-list-wio"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLE_WAREHOUSE_LIST_WAPO)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","warehouse-list-wapo"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_WARRANTY_ACCESSORY_DETAILS)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","warranty-accessory"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLED_FULFILLMENT_FEATURES)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","fulfillment"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,String(N.env.CONTENTSTACK_CONFIG_ENABLED_NUTRITIONAL_DEPT)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","nutritional-depts"]}),(0,u.unstable_cache)(async()=>U(L.ConfigurationSetting,"browse_app_config"),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","one-trust"]}),(0,u.unstable_cache)(async()=>q(L.ConfigurationSetting,String(N.env.CONTENT_ENTRY_ID_SITE_CONFIGURATION)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","criteo-script"]}),(0,u.unstable_cache)(async()=>q(L.ConfigurationSetting,String(N.env.CONTENT_ENTRY_ID_SITE_CONFIGURATION)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","cookie-monitoring"]}),(0,u.unstable_cache)(async()=>q(L.ConfigurationSetting,String(N.env.CONTENT_ENTRY_ID_SITE_CONFIGURATION)),void 0,{revalidate:43200,tags:["cs-entries","service-configurations","adobe-target"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"product_tile",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","product-tile"]}),(0,u.unstable_cache)(async e=>
1z(L.ModuleSettings,"popupVisitExternalLink",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","popup-visit-external-link"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"fsaEligibleInfoModal",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","fsa-eligible-info-modal"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"delivery_location",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","delivery-location"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"add_membership",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","add-membership"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"product_pricing_card",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","product-pricing-card"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"check_nearby_warehouses",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","check-nearby-warehouses"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"product_fulfillment",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","product-fulfillment"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"delivery_location",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","delivery-location"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"delivery_address",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","delivery-address"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"delivery_location_confirmation",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","delivery-location-confirmation"]}),(0,u.unstable_cache)(async e=>z(L.ModuleSettings,"delivery_methods",e),void 0,{revalidate:43200,tags:["cs-entries","module-settings","delivery-methods"]}),(0,u.unstable_cache)(async e=>z(L.PageSettings,"product_details",e),void 0,{revalidate:43200,tags:["cs-entries","page-settings","product-details"]}),(0,u.unstable_cache)(async e=>z(L.PageSettings,"pdp_release_list",e),void 0,{revalidate:43200,tags:["cs-entries","page-settings","pdp_release_list"]});var j=i(37739),P=i(19926),R=i(87358);(0,u.unstable_cache)(async()=>(0,j._)("product_debug_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["feature-toggle","product-debug-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("opinion_lab_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","opinion-lab-toggle"]}),(0,u.unstable_cache)(async()=>$(L.FeatureToggle,"product_validation_feature_toggle"),void 0,{revalidate:43200,tags:["feature-toggle","product-validation-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("add_to_cart_wcs_inventory_details_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","wcs-inventory-toggle","add-to-cart-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("add_to_cart_inventory_v2_details_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","inventory-v2-toggle","add-to-cart-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("fulfillment_inventory_v2_details_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","inventory-v2-toggle","fulfillment-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("fulfillment_ajax_sc_inventory_update_api_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","ajax-sc-inventory-update-toggle","fulfillment-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("fulfillment_wcs_inventory_details_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","wcs-inventory-toggle","fulfillment-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("enable_transcend_cookie_monitoring",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","transcend-toggle"]}),(0,u.unstable_cache)(P.K,void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","category-route-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("addtocart_wcs_inventory_batch_details_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-entries","feature-toggle","wcs-batch-inventory-toggle","add-to-cart-toggle"]}),(0,u.unstable_cache)(async()=>(0,j._)("enable_salsify_pdp_feature_toggle",R.env.APPNAME),void 0,{revalidate:43200,tags:["cs-e
1ntries","feature-toggle","enable_salsify_pdp_feature_toggle"]});var k=i(87358);let L={ConfigurationSetting:"Configuration_Setting",FeatureToggle:"Feature_Toggle",ModuleSettings:"_module_settings",PageSettings:"_page_settings",ServiceConfiguration:"Service_Configuration",ProductDetailsPage:"product_details_page",ProductDetailsMarketing:"pdp_marketing_content_associations",ProductDetailsMarketingComponent:"_pdp_marketing_component",BreadCrumbs:"breadCrumb",ImageGallery:"imageGallery",ProductCard:"productCard",PricePromoCard:"pricePromoCard",PageConfiguration:"page_configuration",VideoRenderer:"video_renderer",TextBuilder:"text_builder",CategoryLandingPage:"category_landing_page"},M=async(e,t,i,r,a=!1)=>{let n=a?d.iA:d.Kd;try{let l=await n.stack.ContentType(e).Query().where(t,i).language(r).toJSON().findOne();return"true"===k.env.LOG_CONTENTSTACK_CALLS&&console.log(`Business stack data fetched using findOneBusinessEntryWhereOrNull:
2          contentType: ${e},
3          key: ${t},
4          value: ${i},
5          locale: ${r},
6          enableLivePreview: ${a},
7          result: ${"object"==typeof l&&JSON.stringify(l)}`),l}catch(n){return console.error(`Error in findOneBusinessEntryWhereOrNull:
8      contentType: ${e},
9      key: ${t},
10      value: ${i},
11      locale: ${r},
12      enableLivePreview: ${a},
13      error: ${"object"==typeof n&&JSON.stringify(n)}`),null}},B=async(e,t,i,r,a=!1)=>{let n=await M(e,t,i,r,a);if(null===n){let n=`Error in findOneBusinessEntryWhere:
14      contentType: ${e},
15      key: ${t},
16      value: ${i},
17      locale: ${r},
18      enableLivePreview: ${a}`;throw console.error(n),Error(n)}return n};(0,r.cache)(B),(0,r.cache)(M);let $=(0,r.cache)(async(e,t)=>{try{return console.info(`Fetching Config Stack Settings - ${t}`),await c.l.stack.ContentType(e).Query().where("development_key",t).language(c.l.env.CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION??"").toJSON().findOne()}catch(e){throw console.error(`Error fetching Config Stack Settings - ${t}, ${JSON.stringify(e,null,2)}`),Error(`Error in getConfigurationSettingByDevelopmentKey - ${t}: ${JSON.stringify(e,null,2)}`)}}),z=(0,r.cache)(async(e,t,i)=>{try{return console.info(`Fetching Content Stack Settings - ${t}`),await d.Kd.stack.ContentType(e).Query().where("development_key",t).language(i).toJSON().findOne()}catch(r){throw console.error(`Error fetching Content Stack Settings - ${t}, ${JSON.stringify(r,null,2)}`),Error(`Error in getContentStackDataByDevelopmentKey:
19        contentType: ${e},
20        developmentKey: ${t},
21        locale: ${i},
22        ${JSON.stringify(r,null,2)}`)}}),U=(0,r.cache)(async(e,t)=>{try{let i=await c.l.stack.ContentType(e).Query().where("configkey",t).language(c.l.env.CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION??"").toJSON().findOne();return console.log(`Config stack fetched via getConfigurationSettingByConfigKey:
23        contentType: ${e},
24        configKey: ${t},
25        result: ${"object"==typeof i&&JSON.stringify(i)}`),i}catch(r){let i=`Error in getConfigurationSettingByConfigKey:
26      contentType: ${e},
27      configKey: ${t},
28      error: ${"object"==typeof r&&JSON.stringify(r)}`;throw console.error(i),Error(i)}}),q=(0,r.cache)(async(e,t)=>{try{return await a.JC.ContentType(e).Entry(t).language(s.CONTENT_ENTRY_ENVIRONMENT_CLIENT_CONFIGURATION).toJSON().fetch()}catch(i){throw Error(`Error fetching config type: ${e} with entry id: ${t}`)}})},5514:(e,t,i)=>{i.d(t,{K:()=>n,T:()=>a});var r=i(9527);let a=(0,r.y)(void 0),n=(0,r.y)()},5553:(e,t,i)=>{i.d(t,{EA:()=>n,ZD:()=>a,hi:()=>r,uY:()=>l});let r=1,a=5,n="BundleItemCard",l="bundle-title"},5862:(e,t,i)=>{i.d(t,{f:()=>r});let r=(e,t,i)=>{let r={LBR:"lbs",ONZ:"oz",GRM:"g",KGM:"kg"},a=i?.toLowerCase()==="fr-ca"?{LBR:"livre",ONZ:"once",GRM:"gramme",KGM:"kilogramme"}:{LBR:"pound",ONZ:"ounce",GRM:"gram",KGM:"kilogram"},n={pound:"lbs",ounce:"oz",gram:"g",kilogram:"kg",livre:"lbs",once:"oz",gramme:"g",kilogramme:"kg"},l=t?.quantityMeasure,o=l&&a[l]?a[l]:e?.uom||"",s=l&&r[l]?r[l]:e?.uom&&n[e.uom.toLowerCase()]?n[e.uom.toLowerCase()]:"",d="string"==typeof t?.factor?parseFloat(t.factor):t?.factor;return{uom:o,factor:d&&!isNaN(d)&&d>0?d:e?.factor&&e.factor>0?e.factor:0,weightedUnit:s||""}}},6946:(e,t,i)=>{i.d(t,{X:()=>a});var r=i(17868);let a=async(e,t,i,a)=>{let n=async()=>{let i=await fetch(e,t),{status:r,statusText:a}=i,n=await i.json();if(!i.ok)throw Error(`StatusCode: ${i.status}, StatusText: ${i.statusText}, Error: ${JSON.stringify(n)}`,{cause:{status:r,data:n}});return{data:n,status:r,statusText:a}};try{return await (0,r.A)(n,{...i,onFailedAttempt:e=>{console.warn(`Attempt ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left.`)}})}catch(e){throw console.error(`${a||"Request failed with error:"} ${e}`),e}}},7040:(e,t,i)=>{i.d(t,{X:()=>o});var r=i(12115),a=i(60714),n=i(19359),l=i(70746);let o=e=>{let{selectedWarehouse:t}=(0,l.e)(),{warehousePriceOnlineFeatureToggle:i,enabledWhListWapoConfigSetting:o}=(0,a.h)(),s=(0,r.useMemo)(()=>
28{if(!i?.isEnabled||!o)return!1;let r=(0,n.gI)(e).toLowerCase(),a=o.custom?.enabledWarehousesList?.[r]||[];return 0===a.length||!t||a.includes(t)},[i,o,t,e]);return(0,r.useMemo)(()=>({...i,isEnabled:s}),[i,s])}},8102:(e,t,i)=>{i.d(t,{G:()=>n});let r="Bundle",a="controlling",n=e=>!!e?.productData?.productAttributes?.[0]?.object?.some(({key:e,type:t})=>e===r&&t===a)||(e?.productData?.childCatalogData?.filter(e=>e.isPublished)||[]).some(e=>e.productAttributes?.[0]?.object?.some(({key:e,type:t})=>e===r&&t===a))},8424:(e,t,i)=>{i.d(t,{E:()=>o});var r=i(12115),a=i(71706),n=i(73689),l=i(82849);let o=()=>{let{bdDeliveryLocation:{bdLocation:e="",zipCode:t=""}={}}=(0,a.B)(),i=l.A.get("WC_BD_ZIP_ORIGINAL");return(0,r.useMemo)(()=>{let r=e?.slice(-2)||"",a=e?.slice(0,2);if(!e||'""'===e.trim()){let e=l.A.get("WC_BD_LOC");if(e){let t=decodeURIComponent(e).split("|");t.length>=3&&(r=t[1]||"",a="CA"===t[2]?n.O4.CA:n.O4.US)}}return{destinationState:r,destinationPostalCode:i||t,destinationCountryCode:a}},[e,t])}},9358:(e,t,i)=>{i.d(t,{WarehouseContextProvider:()=>s,r:()=>o});var r=i(95155),a=i(71706),n=i(66775),l=i(12115);let o=(0,l.createContext)(null),s=({initialValues:e,children:t,locale:i})=>{let{warehouse:s}=(0,a.B)(),d=(0,n.P)(),[c,u]=(0,l.useState)(e?.selectedWarehouse??`${s?.nearestWarehouse?.catalog??""}`),p=(0,l.useRef)(null),m=(0,l.useCallback)(()=>{p.current?.openDrawer()},[]),h=(0,l.useMemo)(()=>String(s.pickUpCenters&&s.pickUpCenters.length>0?s.pickUpCenters[0]:""),[s.pickUpCenters]);(0,l.useEffect)(()=>{let e=d?.stwMyWarehouse,t=s?.nearestWarehouse?.catalog;if(e){let t=`${e}-wh`;u(e=>e!==t?t:e)}else t&&u(e=>e!==t?t:e)},[d?.stwMyWarehouse,s?.nearestWarehouse?.catalog]);let f=(0,l.useMemo)(()=>({selectedWarehouse:c,setSelectedWarehouse:u,pickUpCenter:h,warehouseDrawerRef:p,openWarehouseDrawer:m,warehouseState:s}),[c,h,m,s]);return(0,r.jsx)(o.Provider,{value:f,children:t})}},9527:(e,t,i)=>{i.d(t,{y:()=>n});var r=i(12115);class a{state;eventTarget;constructor(e){this.state=e,this.eventTarget=new EventTarget}getState=()=>this.state;setState=e=>{e!==this.state&&("function"==typeof e?this.state=e(this.state):this.state=e,this.eventTarget.dispatchEvent(new Event("stateChange")))};subscribe=e=>{let t=()=>e();return this.eventTarget.addEventListener("stateChange",t),()=>{this.eventTarget.removeEventListener("stateChange",t)}}}let n=e=>{let t=new a(e);return i=>{let a=(0,r.useSyncExternalStore)(t.subscribe,t.getState,()=>void 0);return(0,r.useEffect)(()=>{if(i&&void 0===e)t.setState(i);else if(i)throw Error("Initial state can only be set once")},[i]),[a,t.setState]}}},11489:(e,t,i)=>{i.d(t,{default:()=>u});var r=i(12115),a=i(12751);let n={getCookie:function(e){if("u"<typeof document)return;let t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop()?.split(";").shift()},isWcsSessionExpired:function(){try{let e=n.getCookie("kmsi");if(void 0!==e&&null!=e&&e.indexOf("true")>=0){if(!n.getCookie("hashedUserId"))return!0;let[t,i]=e.split("_");if(t&&i){let e=parseInt(i);return Date.now()-e>36e5}}return!1}catch(e){return!1}},isKmsiSession:function(){try{let e=n.getCookie("kmsi");if(null==e||"false"===e)return!1}catch(e){console.log(e)}return!0},kmsi:function(){let e=0;try{if(n.isKmsiSession()&&n.isWcsSessionExpired()){let t=new XMLHttpRequest;t.open("GET","/kmsi",!1),t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)try{let i=JSON.parse(t.responseText);"true"===i.kmsi?e=0:e<3&&(e++,n.kmsi())}catch(e){console.error(e)}else console.error("Request failed with status: /kmsi ",t.status),n.isWcsSessionExpired()&&(window.location.href="/LogonForm?prompt=false&fromPage=/")},t.send()}}catch(e){console.log(e)}},isWcsSessionEstablished:function(){try{return!!n.getCookie("hashedUserId")}catch(e){console.log(e)}return!1}};var l=i(19359),o=i(45969),s=i(5514),d=i(38734),c=i(3974);let u=({site:e,pid:t,lang:i,productData:u,selectedChildItemNumber:p,isFsaOrChd:m})=>{let[h]=(0,a.lT)(),[f]=(0,s.T)(),{priceDetails:g}=(0,o.A)(),[b]=(0,d.N)((0,r.useMemo)(()=>({value:p||""}),[])),[y,x]=(0,c.M)("adobeopt_exp",void 0),{priceData:v}=g||{},{displayPrice:S,discounts:C}=v||{},{temporaryPriceReductions:E}=C||{},{onlinePrice:I,deliveredPrice:T,currency:A}=S||{},{descriptions:D,uom:_,id:O}=(u?.childCatalogData||[]).find(e=>e.id===b?.value)||{},{imageName:w,shortDescription:N}=D?.[0]?.object||{};return(0,r.useEffect)(()=>{let r=n.isWcsSessionEstablished()?"Authenticated":"Unauthenticated",{categories:a}=u||{},o=a&&(0,l.s3)(a),s=o?.map(e=>e.name).filter(e=>"Home"!==e),[d,c]=i.split("-"),p=e.slice(-2).toLowerCase(),{invCheckPostalCode:g="na",invCheckCity:b="na"}=h,x=a?.reduce((e,t)=>
28{let{object:i}=t||{};if(!i)return e;for(let t of i){let i=t?.name?.split("|")||[],r=t?.uri?.split("|")||[];if(!i?.length||!r?.length||i?.length!==r?.length)break;for(let t=0;t<i.length;t++){let a=i[t]?.trim(),n=r[t]?.trim();a&&n&&(e[a]=n)}}return e},{}),v=[];x&&Object.keys(x).length>0&&(v=Object.entries(x).map(([e,t])=>({name:e,uri:t})));let S=m?{sku:"",pid:"",currencyCode:A||"",priceTotal:(T||I||1).toString(),channel:f?.label||"",name:"",discountAmount:E?.[0]?.discountAmount||"0.00",product:"",productCategories:[],productImageUrl:"",quantity:"1",unitOfMeasure:_||""}:{sku:O,pid:t,currencyCode:A||"",priceTotal:(T||I||1).toString(),channel:f?.label||"",name:N||"",discountAmount:E?.[0]?.discountAmount||"0.00",product:window?.location?.href||"",productCategories:v?.map(e=>({categoryName:e.name,categoryPath:`https://www.costco.com/${e.uri}.html`}))||[],productImageUrl:w||"",quantity:"1",unitOfMeasure:_||""};window.digitalData={siteLang:d,siteReleaseEnv:"prod",siteStore:p,siteCountry:c,authStatus:r,deliveryZip:g,localWH:b,pageCMS:"ContentStack",pagePlatform:"react",pageName:`Product Detail | ${t}`,pageType:"Product Detail",pageCrumbs:s,products:[S],experimentIds:[y]}},[e,t,i,u,h,y]),null}},12406:(e,t,i)=>{i.d(t,{default:()=>C});var r=i(95155),a=i(62526),n=i(82993),l=i(50197),o=i(89118),s=i(19359),d=i(34291),c=i(12115),u=i(43922),p=i(3187),m=i(84791),h=i(79176),f=i(24880),g=i(70422);let b={marginRight:f.pMV,"&:last-of-type":{marginRight:0},cursor:"pointer",width:"auto",padding:0,fontSize:f.tGh,lineHeight:f.xUz};var y=i(60714),x=i(38734),v=i(83515),S=i(58468);let C=({productDetailsData:e,pageSettings:t,locale:i})=>{let{isMobile:C}=(0,d.A)(),[E,I]=(0,c.useState)(!1),{setSelectedAccordion:T,setIsAccordionClicked:A,accordionsList:D,hasManualsAndGuides:_}=(0,l.Dr)(),{enabledNutritionalDeptsConfig:O}=(0,y.h)(),{translationsMap:w}=t,N=(0,a.U)(w,n.oE),j={[o.do.PRODUCT_DETAILS]:N.productdetails,[o.do.SPECIFICATIONS]:N.specifications,[o.do.DRUG_FACTS]:N.drugfacts,[o.do.SUPPLEMENT_FACTS]:N.supplementfacts,[o.do.NUTRITIONAL_INFORMATION]:N.nutritionalinformation,[o.do.FSA_ELIGIBLE]:N.fsaeligible,[o.do.WARRANTY_SERVICES]:N.warrantyandservices,[o.do.SHIPPING_RETURNS]:N.shippingandreturns,[o.do.REQUEST_CONSULTATION]:N.requestconsultation,[o.do.MEMBER_REVIEWS]:N.memberreviews,[o.do.MANUALS_GUIDES]:N.manualsandguides},{productData:P,merchandiseData:R,selectedChildItemNumber:k}=e,[L]=(0,x.N)(),M=L?.value||k,B=N?.toplabel||"Top",$=N?.topbuttonarialabel||"Back to Top",{descriptions:z,productAttributes:U,childCatalogData:q,isEligibleForReviews:V}=P||{},F=q&&q[0]?.isFsa===!0,W=(0,s.ZT)(R)||"",H=(0,s.R_)(i,"hyphen"),K=q?.find(e=>e.id===M),{nutritionInformation:G,drugFacts:Y,supplementFacts:Q}=K?.nutritionInfo?.[H]||{},Z=(O.custom.NUTRITION_LABEL_ELIGIBLE_DEPT?.[String("CABC").toLowerCase()]||[]).includes(K?.as400DeptNumber||"")&&K?.isShowNutrPanel,{trackEvent:J}=(0,g.z1)(),X=U&&U?.flatMap(e=>e.object)?.filter(e=>"descriptive"===e.type&&e.isDisplayable).length>0||!1,ee=null;z&&z?.length&&(ee=z[0]);let et=(0,v.uM)(ee&&ee.object.longDescription),ei=e?.contentVendors?.length&&(e?.contentVendors?.includes(S.ay.Syndigo)||e?.contentVendors?.includes(S.ay.OneWorldSync)||e?.contentVendors?.includes(S.ay.FlixMedia)||e?.contentVendors?.includes(S.ay.Salsify)),er={[o.do.PRODUCT_DETAILS]:!!(et?.length||ei),[o.do.SPECIFICATIONS]:X,[o.do.MANUALS_GUIDES]:!!_,[o.do.DRUG_FACTS]:!!(Y?.length&&Z),[o.do.SUPPLEMENT_FACTS]:!!(Q?.length&&Z),[o.do.NUTRITIONAL_INFORMATION]:!!(G?.length&&Z),[o.do.FSA_ELIGIBLE]:F||!1,[o.do.WARRANTY_SERVICES]:!!R?.warrantyAndServices?.length,[o.do.SHIPPING_RETURNS]:!!(R?.shippingAndReturns?.length||R?.shopConfidently?.length),[o.do.REQUEST_CONSULTATION]:!!W,[o.do.MEMBER_REVIEWS]:!!V&&!(0,s.G8)()};(0,c.useEffect)(()=>{let e=()=>{let e=document.getElementById("header-content");if(!e)return;let t=e.offsetHeight;window.scrollY>t?I(!0):I(!1)};return window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}},[]);let[ea,en]=(0,c.useState)("100%");(0,c.useEffect)(()=>{let e=()=>{let e=document.querySelector('[role="main"]');if(e){let t=window?.innerWidth;t>=768&&t<1024?en(`calc(${e.clientWidth}px - 32px)`):en(`calc(${e.clientWidth}px - 48px)`)}};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);let el=N?.stickynavarialabel||"Product Information";return(0,r.jsx)(r.Fragment,{children:!C&&E?(0,r.jsx)(m.n,{stickyPosition:"top",extraPaddingBottom:!0,uniqueId:"shop-costco-next-button",zIndex:1e3,hasTopButton:!0,isMobile:!1,role:"navigation",ariaLabel:el,onScrollToTop:s.wM,position:"fixed",width:ea,topButtonAriaLabel:$,topLabel:B,children:(0,r.jsx)(h.B,{variant:"SimpleList",style:{display:"flex",boxShadow:"0",flexWrap:"wrap",rowGap:f.Mzk,padding:0,border:0},children:D.map((e,t)=>er[e]?((e="",t,i)=>(0,r.jsx)(u.c,{style:b,uniqueId:i,children:(0,r.jsx)(p.Link,{underline:"hover",color:f.S6v,onClick:e=>{e.preventDefault(),T(t),A(!0),J({component:{identifier:`Product Detail | ${j[t]}`,type:"ui"},doNotTrack:F,trackType:"pdp-accordion"})},variant:"t6",sx:{lineHeight:f.xUz},children:e},e)},`StickyBarListItemLink-${i}`))(j[e],e,`sticky-wrapper-${t}`):null)})}):null})}},12445:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(95155),a=i(13869),n=i(43379),l=i(97766),o=i(96013),s=i(40045),d=i(42138),c=i(12158),u=i(2377),p=i(24880),m=i(65556);let h=({services:e=[],itemType:t="",showServices:i,translations:h,locale:f,checkDeliveryAvailability:g=!0})=>{if(!e.length)return null;let{fulfillmentMolecules:b}=(0,m.f)(f),y=b.some(e=>"delivery"===e.id&&e.isAvailable);if(g&&!y)return null;let x=e.filter(e=>"Excluded"===e.messageType),v=e.filter(e=>"Included"===e.messageType),S=e.filter(e=>"Informational"===e.messageType),C=e.filter(e=>"Warning"===e.messageType),E=t?`${t} Services`:"Services";return i?(0,r.jsxs)(s.jn,{children:[(0,r.jsx)(s.w9,{component:"h3",variant:"t5",bold:!0,children:E}),(0,r.jsx)(u.Divider,{}),(0,r.jsx)(()=>C.length?(0,r.jsx)(s.Lr,{children:(0,r.jsx)(s.X7,{children:C.map(e=>(0,r.jsx)(d.Notification,{uniqueId:`services-warning-${e.id}`,message:e.message,severity:"alert",icon:(0,r.jsx)(a.A,{})},`Warning-${e.id}`))})}):null,{}),(0,r.jsx)(()=>x.length?(0,r.jsxs)(s.Lr,{children:[(0,r.jsx)(s.w9,{component:"h4",variant:"b2",bold:!0,children:h?.servicesnotincludedtext||""}),(0,r.jsx)(s.X7,{children:x.map((e,t)=>(0,r.jsxs)(s.Cy,{children:[(0,r.jsx)(n.Ay,{style:{color:p.JHH,marginRight:"7px",height:"20px",width:"18px"}}),(0,r.jsx)(c.Text,{variant:"b2",uniqueId:`excluded-service-${e.id}`,children:e.message})]},`ExcludedService-${e.id}-${t}`))})]}):null,{}),(0,r.jsx)(()=>v.length?(0,r.jsxs)(s.Lr,{children:[(0,r.jsx)(s.w9,{component:"h4",variant:"b2",bold:!0,children:h?.servicesincludedtext||""}),(0,r.jsx)(s.X7,{children:v.map((e,t)=>(0,r.jsxs)(s.Cy,{children:[(0,r.jsx)(l.A,{style:{color:p.Kl5,marginRight:"7px",height:"20px",width:"18px"}}),(0,r.jsx)(c.Text,{variant:"b2",uniqueId:`included-service-${e.id}`,children:e.message})]},`IncludedService-${e.id}-${t}`))})]}):null,{}),(0,r.jsx)(()=>S.length?(0,r.jsxs)(s.Lr,{children:[(0,r.jsx)(s.w9,{component:"h4",variant:"b2",bold:!0,children:h?.servicesimportantinfotext||""}),(0,r.jsx)(s.X7,{children:S.map((e,t)=>(0,r.jsxs)(s.Cy,{children:[(0,r.jsx)(o.A,{style:{marginRight:"7px",height:"20px",width:"18px"}}),(0,r.jsx)(c.Text,{variant:"b2",uniqueId:`info-service-${e.id}`,children:e.message})]},`InformationalItem-${e.id}-${t}`))})]}):null,{})]}):null}},13052:(e,t,i)=>{i.d(t,{MN:()=>u,UV:()=>c,Y0:()=>o,jr:()=>s,r5:()=>p});var r=i(9527),a=i(7025),n=i(12115),l=i(45182);let o=(0,r.y)({items:{}}),s=(0,r.y)({isLoading:!0,deliveryStatements:{primaryInfo:[],secondaryInfo:[],tertiaryInfo:""},EDD:"",isAvailable:!0,label:"",timeframe:""}),d=[a.RO.INSTOCK,a.RO.LOWSTOCK,a.RO.PRESELL,a.RO.BACKORDERED],c=e=>d.includes(e);function u(){let[e]=(0,l.AX)(),[t]=o(),i=new Set((e??[]).map(e=>
28e.id)),r=Object.fromEntries(Object.entries(t?.items||{}).filter(([e])=>i.has(e))),s=new Set((e??[]).filter(e=>!!e.isSellable).map(e=>e.id)),d=Object.entries(r).filter(([e])=>s.has(e)).reduce((e,[t,i])=>({...e,[t]:i}),{}),u=s.size>0?d:r,p=Object.values(r??{}).filter(e=>c(e.status)).sort((e,t)=>new Date(e.estimatedDeliveryDate||0).getTime()-new Date(t.estimatedDeliveryDate||0).getTime()).at(-1),m=function(e){let t=Object.values(e??{});if(t.length)return t.some(e=>c(e.status))?a.RO.INSTOCK:a.RO.NOSTOCK}(u);return(0,n.useMemo)(()=>({isLoading:Object.values(r??{}).some(e=>e.isLoading)||0===Object.values(r||[]).length,parentInventoryStatus:m,estimatedDeliveryDate:p?.estimatedDeliveryDate||null,isAvaialbleForSale:Object.values(u??{}).some(({data:e})=>e?.availableForSale),fulfilledBy:p?.data?.fulfilledBy||Object.values(r??{}).find(({data:e})=>e?.fulfilledBy)?.data?.fulfilledBy||"",status:p?.data?.status||Object.values(r??{}).find(({data:e})=>e?.status)?.status||"",entries:r,isSellableItemsInStock:m===a.RO.INSTOCK}),[r,e])}function p(e){let[t]=o();return t?.items[e]||{isLoading:!0,status:void 0,estimatedDeliveryDate:void 0}}},13639:(e,t,i)=>{i.d(t,{MA:()=>r.M,oQ:()=>l,zM:()=>s,ZB:()=>u});var r=i(58474),a=i(6946),n=i(64638);let l=async(e,t)=>{let{childItemNumber:i,whsNumber:r,serviceConfig:l}=e,{endpoint:o="",method:s="GET",required_request_parameters:d,required_request_headers:c,retryconfig:u}=l,p=String("https://gdx-api.costco.com"),m=d.client_identifier[String("CABC").toLowerCase()]||"",h=c.client_identifier[String("CABC").toLowerCase()]||"",f=new URLSearchParams({whsNumber:r,item:i,clientId:m}),g=`${p}${o}?${f}`;try{let{data:e,status:r,statusText:n}=await (0,a.X)(g,{method:s,headers:{"client-identifier":h},signal:t},{...u,shouldRetry:({cause:e})=>!e||404!==e.status},`[PDP][AVL][Error] - ChildId: ${i}`);return{availabilityInfo:e,status:r}}catch(t){let e=t?.cause?.status;if(404===e)return{availabilityInfo:{availabilityData:{isExcluded:!0,availability:n.Up.NO_STOCK,id:i,clientId:m,warehouseNumber:r}},status:e};if(console.info(`[PDP][AVL][Error] - ${t}`),t instanceof DOMException&&"AbortError"===t.name)throw t;throw Error(`[PDP][AVL][Error] - ChildId: ${i} - ${t}`)}};var o=i(44855);let s=(e,t=!0,i={})=>{let{data:a,error:n,isLoading:s,isValidating:d,mutate:c}=(0,o.Ay)(t?["availability",e.childItemNumber,e.whsNumber]:null,()=>l(e),{...r.M,...i});return{availabilityData:n?{availabilityData:{availability:null,isExcluded:!1}}:a?.availabilityInfo,isLoading:s,isValidating:d,isError:n,mutate:c}};var d=i(75551);let c=async e=>{let{productId:t,productTileConfigData:i,locale:r}=e;if(!t||!i)return;let a=p(i);try{let e,i=await (0,d.j)(t,a,r,"");if(i&&"productApiResponseData"in i){let t=i.productApiResponseData.productData?.[0];e=t?.childCatalogData?.[0]?.id||t?.id}return{itemId:e}}catch(e){throw console.error(`[PDP][ReplacementItem][Error] - ProductId: ${t} - ${e}`),e}},u=(e,t=!0,i={})=>{let{data:a,error:n,isLoading:l}=(0,o.Ay)(t&&e.productId&&e.productTileConfigData?["replacement-item",e.productId,e.locale]:null,()=>c(e),{...r.M,...i});return{data:a,isLoading:l,isError:n}},p=e=>({...e,featureToggleConfig:{...e?.featureToggleConfig||{},callProductSummaryAPI:{isEnabled:!0}}})},14865:(e,t,i)=>{i.d(t,{CriteoAdSetThirdPartyBuilder:()=>g});var r=i(95155),a=i(89118),n=i(19359),l=i(12115),o=i(70067),s=i(64739),d=i(82849),c=i(19909),u=i(7025);let p=({locale:e,itemNumber:t,price:i,isPdpSponsoredProducts:a,children:n,productTileConfigData:p,criteoAPIConfigurationSettings:m,placementName:h,isLoadingPriceAPI:f})=>{let{fulfillmentData:g}=(0,c.r)(),b=g?.inventory?.processed,{availability:y}=b?.data||{},x=!!b?.isLoading,[v,S]=(0,l.useState)(void 0);(0,l.useEffect)(()=>{let e=setInterval(()=>{S("1"===d.A.get("rrDisabledPref"))},100);return()=>clearInterval(e)},[]);let C=y===u.RO.NOSTOCK||y===u.RO.UNAVAILABLE||y===u.RO.SHIPRESTRICTED,E="NA";return(!1===x&&a&&(E=C?"outOfStock":"inStock"),a&&v||f)?null:(0,r.jsx)(o.l,{children:(0,r.jsx)(s.C,{productTileConfigData:p,criteoAPIConfigurationSettings:m,locale:e,concurrency:3,itemNumber:t,price:i,pdpStatus:E,children:n})})};var m=i(60714),h=i(45969),f=i(38734);let g=({data:e,locale:t,placementName:i,productDetailsData:l,children:o})=>{let{criteoContentStackConfigurationEntries:s}=(0,m.h)(),{priceDetails:d,isLoadingPriceAPI:c}=(0,h.A)(),[u]=(0,f.N)(),g=u?.value||l?.selectedChildItemNumber,{priceData:b}=d||{};if(!e.ad_set_3rd_party_ref.length)return null;let{productTileConfigData:y,criteoAPIConfigurationSettings:x}=s,v=l?.productData?.id||"",{childCatalogData:S,isFsaEligibleProduct:C,isChdEligibleProduct:E,productAttributes:I}=l?.productData||{},T=g||S?.length&&S[0]?.id||v,A=(0,n.GU)(I,t,T,S);if(E||C||i===a.kn.SPONSORED_PRODUCTS&&A)return null;let D="1",_=!1;if(i===a.kn.SPONSORED_PRODUCTS||i===a.kn.VIDEO_SPOTLIGHT){_=!0;let{onlinePrice:e,deliveredPrice:t}=b?.displayPrice||{};D=(t||e||1).toString()}return(0,r.jsx)(p,{price:D,isLoadingPriceAPI:c,locale:t,isPdpSponsoredProducts:_,itemNumber:v,productTileConfigData:y,criteoAPIConfigurationSettings:x,placementName:i,children:o})}},15154:(e,t,i)=>{i.d(t,{Ay:()=>a});var r=i(12115);let a=({price:e,pageSettings:t,productData:i})=>{let[a,n]=(0,r.useState)(!1),[l,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let r=i?.productAttributes?.[0]?.object?.find(e=>"High Value"===e.key&&"descriptive"===e.type),a=(({price:e,pageSettings:t})=>null!=e&&0!==e&&e>Number(t?.properties?.[0]?.highValuePriceLimit))({price:e,pageSettings:t})||!!r;n(!!r),o(a)},[e]),{isHighValueItem:l,hasHighValueDescriptive:a}}},15786:(e,t,i)=>{i.d(t,{Cp:()=>p,Gx:()=>s,aL:()=>m,b9:()=>d,cC:()=>u,eK:()=>l,fG:()=>f,uI:()=>h,we:()=>c,yd:()=>o});var r=i(24880),a=i(27966),n=i(86670);let l=(0,n.Ay)(a.default)`
29  & > svg {
30    width: 18px;
31    height: 18px;
32    margin-bottom: 2px;
33    color: ${r.S6v};
34  }
35`,o={display:"flex",flexDirection:"column",gap:r.iAn,alignItems:"flex-start"},s={display:"flex",flexWrap:"wrap"},d={...s,gap:r.iAn}
35,c={display:"flex",flexDirection:"column"},u={border:`2px solid ${r.iCb}`,backgroundColor:"transparent",backgroundImage:"none","&:hover":{boxShadow:"none",outline:"none",border:`2px solid ${r.iCb}`}},p={display:"flex",gap:r.m72,alignItems:"center"},m={padding:0,"&:hover,&:focus":{backgroundColor:"transparent"}},h={display:"flex",gap:r.m72},f={width:"42px",height:"42px","> div":{border:"1px solid rgba(0,0,0,0.44)"}}},16123:(e,t,i)=>{i.d(t,{default:()=>o});var r=i(95155),a=i(71706),n=i(19909),l=i(19359);let o=({children:e,allowedRegions:t})=>{let{destination:i}=(0,n.r)(),{bdDeliveryLocation:o}=(0,a.B)();if(console.log("RTRContentWrapper - bdDeliveryLocation: ",o),(0,l.G8)()){let e=(0,l.nv)(o);if(!e||!t.includes(e))return null}else if(!i?.destinationState||!t?.includes(i.destinationState))return null;return(0,r.jsx)(r.Fragment,{children:e})}},16906:(e,t,i)=>{i.d(t,{default:()=>l});var r=i(95155),a=i(34291),n=i(12115);function l({children:e}){let{isMobile:t}=(0,a.A)(),[i,o]=(0,n.useState)(!1);return((0,n.useEffect)(()=>{t?o(!1):o(!0)},[t]),i)?(0,r.jsx)("div",{children:e}):null}},17189:(e,t,i)=>{i.d(t,{AddToCartContainer:()=>eh});var r=i(95155),a=i(12115),n=i(12129),l=i(42138),o=i(45955),s=i(7457),d=i(29445),c=i(24880),u=i(89148),p=i(96013),m=i(27966),h=i(54309);let f=9999;var g=i(19359);let b="increment",y="decrement",x="setQuantity",v="correctQuantity",S="resetError",C=(e,t)=>{let{type:i,payload:r}=t;switch(i){case b:{let{maxErrorMsg:t="",isPriceAppendScenario:i=!1,factor:a=1,minQuantity:n=1,maxQuantity:l=f}=r||{},o=i?n*(a||1):1,s=e.qty;if(i&&e.qty%o!=0){let t=Math.round(e.qty/o)*o;s=t>l?Math.floor(l/o)*o:t}let d=s+o,c=d>l;return{...e,qtyErrorMsg:c?t:"",qtyUpdatedAlertMsg:"",qty:c&&i?s:c?l:d,qtyIsNotWholeNumber:!1}}case y:{let{minErrorMsg:t="",isPriceAppendScenario:i=!1,factor:a=1,minQuantity:n=1,maxQuantity:l=f}=r||{},o=i?n*(a||1):1,s=e.qty;if(i&&e.qty%o!=0){let t=Math.round(e.qty/o)*o;s=t>l?Math.floor(l/o)*o:t}let d=s-o,c=d<n;return{...e,qtyErrorMsg:c?t:"",qtyUpdatedAlertMsg:"",qty:c?n:d,qtyIsNotWholeNumber:!1}}case v:{let{qty:t=1,factor:i=1,minQuantity:a=1,isPriceAppendScenario:n=!1,quantityUpdatedAlertMessage:l="Quantity must be in increments of {{INCREMENT_QTY}} {{METRIC}}. We have updated your quantity from {{PREV_QTY}} to {{NEW_QTY}} {{METRIC}}.",weightedUnit:o="",prevQty:s}=r||{},d=(0,g.kq)(t,a,i||1),c=n?a*(i||1):1;return{...e,qtyErrorMsg:"",qty:t,qtyUpdatedAlertMsg:l.replace("{{INCREMENT_QTY}}",`${c}`).replaceAll("{{METRIC}}",`${o}`).replace("{{PREV_QTY}}",`${s}`).replace("{{NEW_QTY}}",`${d}`),qtyIsNotWholeNumber:!1}}case x:{let{minErrorMsg:t="",maxErrorMsg:i="",qty:a=1,isPriceAppendScenario:n=!1,factor:l=1,minQuantity:o=1,maxQuantity:s=f}=r||{},d=Number.isInteger(a),c=a!==e.qty?"":e.qtyUpdatedAlertMsg;if(!d)return{...e,qtyErrorMsg:"",qtyIsNotWholeNumber:!0,qty:a};if(n){if(a>s)return{...e,qtyErrorMsg:i,qtyUpdatedAlertMsg:c,qty:a,qtyIsNotWholeNumber:!1};if(a<o||a%(o*(l||1))!=0)return{...e,qtyErrorMsg:"",qtyIsNotWholeNumber:!0,qty:a};return{...e,qtyErrorMsg:"",qtyUpdatedAlertMsg:c,qty:a,qtyIsNotWholeNumber:!1}}let u=Math.min(Math.max(a,o),s);return{...e,qtyErrorMsg:a<o?t:a>s?i:"",qtyUpdatedAlertMsg:c,qty:u,qtyIsNotWholeNumber:!1}}case S:return{...e,qtyErrorMsg:"",qtyUpdatedAlertMsg:"",qtyIsNotWholeNumber:!1};default:return e}};var E=i(87243),I=i(87651);let T={[I._z.USBD]:{catalogId:"11701",storeId:"11301"},[I._z.CABD]:{catalogId:"12704",storeId:"11303"}};var A=i(7025);let D=({onClick:e,label:t,ariaLabel:i,buttonStartIcon:r,isLoading:a=!1,showQuantitySelector:n=!0,uniqueId:l,isWarehouseOrSpecialOrderRestricted:o=!1})=>({buttonProps:{...e&&{onClick:e},variant:"primary",startIcon:r,isLoading:a,"aria-label":i,uniqueId:l},label:t,showQuantitySelector:n,isWarehouseOrSpecialOrderRestricted:o}),_=({initialQuantity:e=1,minQuantity:t=1,maxQuantity:i=9999,showQuantityInput:n=!0,quantityError:I,factor:T=1,weightedUnit:_="",uom:O,isPriceAppendScenario:w=!1,onAddToCart:N,addToCartAriaLabel:j,buttonStartIcon:P=(0,r.jsx)(u.Ay,{height:16,width:16}),isLoading:R=!1,hideAddToCart:k=!1,showAddToList:L=!0,addToListItemId:M,addToListElement:B,notification:$,translations:z,sx:U={}
35,resetServerError:q,productFlags:V,signedIn:F,costcoMember:W,onSignIn:H})=>{let K=(0,a.useRef)(null),{message:G,severity:Y,cb:Q,id:Z}=$||{},J=w?z?.variableweightminvalerror?.replace("{{qty}}",String(t))?.replace("{{uomValue}}",_||""):z?.minvalerror?.replace("{{minValue}}",String(t)),X=w?z?.variableweightmaxvalerror?.replace("{{maxValue}}",String(i)):z?.maxvalerror,ee=z?.variableweighterror?.replace("{{qty}}",String(t*(T||1)))?.replace("{{uomValue}}",_||""),et=z?.variableweightnote?.replace("{{uom}}",O||""),{quantity:ei,quantityError:er,quantityUpdatedAlert:ea,handleQuantityChange:en,adjustedMaxQuantity:el,qtyIsNotWholeNumber:eo,resetError:es}=(({initialQuantity:e=1,minQuantityErrorMsg:t="Quantity must be at least 1",maxQuantityErrorMsg:i=`Maximum quantity is ${f}`,quantityUpdatedAlertMessage:r,isPriceAppendScenario:n=!1,factor:l=1,maxQuantity:o=f,minQuantity:s,variableweighterror:d="",weightedUnit:c,resetServerError:u}={})=>{let[p,m]=(0,a.useReducer)(C,{qty:Number(e),prevQty:0,qtyErrorMsg:"",qtyUpdatedAlertMsg:"",qtyIsNotWholeNumber:!1}),h=n?(0,g.kq)(o,s??e,l||1):f,E=(0,a.useRef)(null),I=(0,a.useRef)(e),T=(0,a.useCallback)(e=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{m({type:x,payload:e})},500)},[]),A=(0,a.useCallback)((a,s)=>{let p={minErrorMsg:t,maxErrorMsg:i,variableWeightErrorMsg:d,isPriceAppendScenario:n,factor:l,minQuantity:e,maxQuantity:o,qty:a,quantityUpdatedAlertMessage:r,weightedUnit:c};"increment"===s?(I.current=a,m({type:b,payload:p}),u?.()):"decrement"===s?(I.current=a,m({type:y,payload:p}),u?.()):"qtyCorrection"===s?(m({type:v,payload:{...p,prevQty:I.current}}),I.current=a):(a!==I.current&&(u?.(),I.current=a),T(p))},[t,i,d,n,l,e,o,T]),D=(0,a.useCallback)(()=>{E.current&&(clearTimeout(E.current),E.current=null),m({type:S})},[]);return(0,a.useEffect)(()=>()=>{E.current&&clearTimeout(E.current)},[]),{quantity:p.qty,quantityError:p.qtyErrorMsg,quantityUpdatedAlert:p.qtyUpdatedAlertMsg,adjustedMaxQuantity:h,qtyIsNotWholeNumber:p.qtyIsNotWholeNumber,handleQuantityChange:A,resetError:D}})({initialQuantity:e,minQuantityErrorMsg:J,maxQuantityErrorMsg:X,isPriceAppendScenario:w,factor:T,maxQuantity:i,minQuantity:t,variableweighterror:ee,resetServerError:q,quantityUpdatedAlertMessage:z?.quantitycorrectionmessage||"",weightedUnit:_}),ed=(0,a.useRef)(ei);(0,a.useEffect)(()=>{if(!eo||ed.current===ei)return;let e=setTimeout(()=>{let e=(0,g.kq)(ei,t,T);ed.current=e,en(e,"qtyCorrection")},2e3);return()=>clearTimeout(e)},[ea,ei,eo]);let ec=(er||I)?.replace(/''/g,"'"),[eu,ep]=(0,a.useState)(""),em=(0,a.useRef)(!1);(0,a.useEffect)(()=>{ec?(em.current=!em.current,ep(`${ec}${em.current?"​":""}`)):ep("")},[ec,ei]);let eh=L&&M&&B,{buttonProps:ef,label:eg,showQuantitySelector:eb,isWarehouseOrSpecialOrderRestricted:ey}=function({signedIn:e,productFlags:t,costcoMember:i,handleAddToCart:r,translations:a,buttonStartIcon:n,isLoading:l,addToCartAriaLabel:o}){let s=t?.[A.rm.IS_MEMBER_ONLY_ITEM];t?.[A.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_1],t?.[A.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_2];let d=t?.[A.rm.IS_WAREHOUSE_ONLY],c=t?.[A.rm.IS_SPECIAL_ORDER];return(d||c)&&s&&e?D({label:"",ariaLabel:"",isWarehouseOrSpecialOrderRestricted:!0}):s&&e&&!i?D({onClick:r,label:a?.addtocartdetailsbutton||"Add for Details",ariaLabel:o||"",isLoading:l,uniqueId:"addToCartDetails",showQuantitySelector:!1}):D({onClick:r,label:a?.addtocartbutton||"",ariaLabel:o||"",buttonStartIcon:n,isLoading:l,showQuantitySelector:!0})}({signedIn:!!F,costcoMember:!!W,productFlags:V,handleAddToCart:()=>{ec||(es(),N(ei))},onSignIn:H,translations:z,buttonStartIcon:P,isLoading:R,addToCartAriaLabel:j});return(0,r.jsxs)(m.default,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:c.D3H,...U},children:[G&&(0,r.jsxs)(m.default,{sx:{display:"flex",gap:c.D3H},children:[(0,r.jsx)(E.A,{cb:Q,id:Z,message:G,severity:Y,sx:{flexGrow:1}}),k&&eh]}),!k&&!ey&&(0,r.jsxs)(m.default,{"data-testid":"variable-weight-note",sx:{display:"flex",flexDirection:"column",gap:c.Mzk,fontSize:c.tGh},children:[(0,r.jsx)(m.default,{"aria-live":"polite","aria-atomic":"true",sx:h.A,children:ea}),ea&&(0,r.jsx)(l.Notification,{message:ea,severity:"alert",icon:(0,r.jsx)(p.A,{"aria-label":"Alert"}),isRole:!1}),w&&et&&(0,r.jsx)(m.default,{"data-testid":"variable-weight-note",component:"span",children:et}
35),(0,r.jsxs)(m.default,{"data-testid":"add-to-cart",sx:{display:"flex",gap:c.iAn},children:[(0,r.jsxs)(m.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"column",gap:c.m72},children:[(0,r.jsxs)(m.default,{sx:{display:"flex",gap:c.D3H},children:[n&&eb&&(0,r.jsx)(m.default,{sx:{display:"flex",flexDirection:"column",flex:"1 0 0",'& [id="quantitySelector_error_addToCart"]':{display:"none"}},children:(0,r.jsx)(o.R,{minValue:t,maxValue:el,allowAddToCartDisplay:!1,onQuantityChange:(e,t)=>{en(e,t)},uniqueId:"addToCart",updateQuantity:ei,customErrorMsg:ec,suppressDefaultErrorMessages:!0,incrementAriaLabel:z?.qtyincrementarialabel||"",decrementAriaLabel:z?.qtydecrementarialabel||"",inputAriaLabel:z?.quantitylabel||"",quantityLabel:z?.quantitylabel||"",weightUnit:_&&w?_:"",announcementText:_&&w?`${ei} ${_}`:void 0})}),(0,r.jsx)(s.Button,{ref:K,sx:{flex:"1 0 0"},...ef,children:eg})]}),(0,r.jsx)(m.default,{"aria-live":"polite","aria-atomic":"true",sx:h.A,children:eu}),ec&&(0,r.jsx)(d.d,{errorIconA11yAttributes:{"aria-hidden":!1,focusable:!0,"aria-label":"Error: "},hasError:!0,errorText:ec,errorTextId:"AddToCart-error","data-testid":"quantity-error-message"})]}),eh]})]})]})};var O=i(32722),w=i(65769),N=i(70422),j=i(69934),P=i(60714),R=i(42446),k=i(97766),L=i(59681),M=i(45969),B=i(74711),$=i(92126),z=i(37994),U=i(60073),q=i(20376),V=i(62151),F=i(87358);let W={isLoading:!1,isError:!1,errorMessage:"",qtyErrorMsg:""},H=(e,t)=>{switch(t.type){case"SET_LOADING":return{isLoading:!0,isError:!1,errorMessage:"",qtyErrorMsg:""};case"SET_SUCCESS":return{isLoading:!1,isError:!1,errorMessage:"",qtyErrorMsg:""};case"SET_ERROR":{let{customErrorLabel:e,orderErrMsgObj:i}=t.payload.response||{},r=!!(!e&&0===Object.values(i||{}).length);return{isLoading:!1,isError:r,errorMessage:"",qtyErrorMsg:r?"":e||Object.values(i||{}).join(". ")}}case"RESET_ERROR":return{...e,isError:!1,errorMessage:"",qtyErrorMsg:""};default:return e}};var K=i(4738),G=i(99295),Y=i(92226),Q=i(84791),Z=i(34291);let J=({children:e,topLabel:t="Top"})=>{let{isMobile:i}=(0,Z.A)(),n=(0,a.useRef)(null),[l,o]=(0,a.useState)(!1),[s,d]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=()=>{let e=document.getElementById("add-to-cart-button"),t=document.getElementById("extra-padding-bottom");if(!e)return;let r=e.offsetTop+e.offsetHeight;window.scrollY>r?(t&&(t.style.display=i?"block":"none"),o(!0)):(t&&(t.style.display="none"),o(!1)),i&&window.scrollY>window.innerHeight&&window.scrollY<r?d(!1):d(!0)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[i]);let c=i&&l;return i&&(c||!s)?(0,r.jsxs)(m.default,{id:"add-to-cart-button",ref:n,children:[(0,r.jsx)(Y.l,{cornerStyle:"square",children:e}),(0,r.jsx)(Q.n,{stickyPosition:"bottom",extraPaddingBottom:!0,hasTopButton:!0,isMobile:i,uniqueId:"add-to-cart-button",zIndex:1e3,showStickyWithTopButton:c,onScrollToTop:g.wM,sx:{bottom:0},topLabel:t,children:e})]}):(0,r.jsx)(m.default,{id:"add-to-cart-button",ref:n,children:(0,r.jsx)(Y.l,{cornerStyle:i?"square":"rounded",children:e})})};var X=i(34971),ee=i(95097),et=i(46286),ei=i(13869),er=i(93958),ea=i(27777);let en=({locale:e,buttonText:t="Set Delivery ZIP Code",buttonAriaLabel:i="Set delivery ZIP code to check availability",notificationMessage:a="Set your delivery ZIP code to view item price and availability in your delivery area.",showAddToList:n=!1,addToListItemId:o,addToListImageName:d,addToListShortDescription:u,addToListProductName:p,addToListProductAttributes:h=[],translations:f})=>{let{agent:g,isDrawerOpen:b,openDrawer:y,closeDrawer:x,zipCode:v,moduleSettings:S,warehouseSpecificDeliveryMethodUIOverridesMap:C,handleSubmitZipCode:E}=(0,er.a)(e);if(!g)return null;let I=n&&o&&(0,r.jsx)(ea.A,{itemId:o,imageName:d,shortDescription:u,translations:f,productName:p,productAttributes:h});return(0,r.jsxs)(m.default,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:c.D3H},children:[(0,r.jsx)(l.Notification,{icon:(0,r.jsx)(ei.A,{"aria-label":"Alert"}),message:a,severity:"alert"}),(0,r.jsxs)(m.default,{sx:{display:"flex",gap:c.iAn},children:[(0,r.jsx)(s.Button,{onClick:y,"aria-label":i,uniqueId:"deliveryLocationSelector",variant:"primary",sx:{flex:"1 0 0"},children:t}),I]}),(0,r.jsx)(et.P,{isOpen:b,onClose:x,zipCode:v||void 0,onSubmit:E,agent:g,moduleSettings:S,isBDPage:!0,locale:e,warehouseSpecificDeliveryMethodUIOverridesMap:C})]})};var el=i(5862),eo=i(83272),es=i(30890),ed=i(19547),ec=i(12158);let eu=({customButtonData:e,translations:t,itemId:i})=>{let{trackEvent:a}=(0,N.z1)(),n={component:{type:"ui",identifier:"Product Detail | Truckload Item | Learn More"},doNotTrack:!1,trackType:"product-action-button"};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(m.default,{sx:{display:"flex",flexDirection:"column",gap:"14px",marginBottom:c.D3H},children:[t?.notificationtruckloadtext1&&(0,r.jsx)(ec.Text,{variant:"b2",component:"p",uniqueId:"truckload-text-1",children:t?.notificationtruckloadtext1}),t?.notificationtruckloadtext2&&(0,r.jsx)(ec.Text,{variant:"b2",component:"p",uniqueId:"truckload-text-2",children:t?.notificationtruckloadtext2})]}),e&&(0,r.jsx)(m.default,{sx:{marginTop:c.D3H},children:(0,r.jsx)(s.Button,{variant:"primary",sx:{width:"100%"},uniqueId:"truckload-information-button",href:e.customButtonCodeHref||"#",target:"_blank",onClick:e=>{e.preventDefault();let t=e.currentTarget;t instanceof HTMLAnchorElement&&t?.href&&(window.location.href=t.href),a(n)},"aria-label":"Learn More About Truckload Delivery",children:t?.truckloadbutton||"Learn More"})})]})};var ep=i(48195);let em={[eo.yl.LOCAL_BUSINESS_DELIVERY]:"Local",[eo.yl.NATIONWIDE_DELIVERY]:"Nationwide",[eo.yl.PICK_UP]:"Store-Pick-Up"},eh=()=>{let[e,t]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t(!0)},[]);let{productDetailsData:i,productDetailsTranslations:l,locale:o,selectedChildItem:d}=(0,L.b)(),{fulfillmentData:{fulfillmentNotificationMessage:u,isLoading:p,samedayDeliveryData:h},destination:b,productFlags:y,fulfillmentSettings:x}=(0,B.fs)(),[{isExcluded:v,isLoading:S}={}]=(0,z.PZ)(),[{type:C}={}]=(0,z.Fu)(),D=C===eo.yl.SAME_DAY_DELIVERY,[{isConfirming:Y}={}]=(0,z.Jm)(),{updateDeliveryMethod:Q}=(0,K.E)({locale:o,isBDPage:!0}),Z=async()=>{let e=C?em[C]:void 0;await Q({userSelectionDeliveryMethod:e})},{priceDetails:et}=(0,M.A)(),{productData:ei}=i||{},{factor:er,weightedUnit:ec,uom:eh}=(0,el.f)(et?.priceData,{factor:ei?.factor,quantityMeasure:ei?.quantityMeasure},o),{isLoading:ef,isError:eg,executeAddToCart:eb,errorMessage:ey,qtyErrorMsg:ex,resetError:ev}=(()=>{let{productDetailsData:e,productDetailsTranslations:t,locale:i,pageSettings:n}=(0,L.b)(),l=(0,V.c3)(),{productTileConfigData:{productTileConfigData:o}}=(0,P.h)(),s=o?.translationsConfig?.urls,{selectedChildItem:d,productFlags:c}
35=(0,B.fs)(),u=(0,$.Y)(),[{type:p}={}]=(0,z.Fu)(),m=p?{type:p}:u,{priceDetails:h}=(0,M.A)(),[f,b]=(0,a.useReducer)(H,W),{refreshCart:y,handleHybridAddToCart:x}=(0,O.B)(),{getToken:v}=(0,w.A)(),{trackEvent:S}=(0,N.z1)(),{navigateToNextDrawer:C,onDrawerOpen:E,isOpen:A}=(0,j.T)(),D=(0,a.useCallback)(()=>{b({type:"RESET_ERROR"})},[]),_=(0,a.useCallback)(async(a,u,p)=>{b({type:"SET_LOADING"});try{let f=await v(!0)||"",D=((e,t,i,r,a,n=!1)=>{let l=window.location.origin,o=new URL(`${l}/CheckoutCartView?orderId=`).toString(),{catalogId:s,storeId:d}=function(){let e="CABC";if(e!==I._z.USBD&&e!==I._z.CABD)throw Error(`getBusinessUnitAddToCartConfig can only be called on BD sites. Current site: ${e}`);return T[e]}();return{ajaxFlag:!0,checkOmsInventory:!0,isPdpPage:!0,is_mod_pdp:!0,isRestrictedPostalCode:!1,targetedCartBehaviour:"",contractIdentifier:"",actionType:"add",backURL:o,langId:(0,q.v)(a),catalogId:s,storeId:d,authToken:r,partNumber:e,productPartnumber:e,isFsaChdItem:n,addedItem:t,itemNumber:t,quantity:i,isShipRestrictionStore:!1,quantity_1:i,eddInstallationServicesJSON:JSON.stringify({})}})(a,d?.id,u,f,i,c.isFsaOrChdEligible),_=await x(s?.addToCartURL,D,i,(0,g.Z_)(d?.productAttributes));if(_&&(e=>{let{errorMessage:t,orderErrMsgObj:i,customErrorLabel:r}=e||{};return!!(r||t||Object.values(i||{}).length>0)})(_))return b({type:"SET_ERROR",payload:{response:_}}),console.error("[BD][AddToCart][Error]: Add to cart failed",_),_;let O=(0,U.w)(l,m?.type);S({trackedData:{cartAdd:`Product Detail - ${O}`,product:[{pid:a,sku:a,quantity:u}]},doNotTrack:!1,trackType:"pdp-add-to-cart"}),y();let w=(0,r.jsx)(R.A,{title:t?.addedtocarttext||"",subTitle:t?.itemsincartlabel||""});return A||E(),C({title:w,drawerType:"withCartItemsDrawer",Icon:k.A,propsData:{productConfig:{productTileConfigData:o},productDetailsData:e,locale:i,pageSettings:n,site:String(F.env.SITE),qty:u,weightedUnit:p,cartItemDetails:e.productData,priceListData:h,translations:t,onDrawerClose:()=>{},fulfillmentDetails:{id:m?.type,label:O},pageSettingsProperties:n?.properties}}),b({type:"SET_SUCCESS"}),_}catch(e){console.error("[BD][AddToCart][Error]: Add to cart failed",e),b({type:"SET_ERROR",payload:{response:{}}});return}},[x,v,y,S,C,E,A,s,h,m,e,i,n,t,o,d,c,l]);return(0,a.useMemo)(()=>({isLoading:f.isLoading,isError:f.isError,errorMessage:f.isError&&t?.addtocarterrormsg||"",qtyErrorMsg:f.qtyErrorMsg,executeAddToCart:_,resetError:D}),[f.isLoading,f.isError,f.qtyErrorMsg,t?.addtocarterrormsg,_,D])})();ex=ex.replaceAll(/&lt;/g,"<").replaceAll(/&gt;/g,">");let{trackEvent:eS}=(0,N.z1)(),{signedIn:eC,costcoMember:eE}=(0,ep.i)(),{minItemOrderQty:eI,descriptions:eT}=d??{},[{isReplacementItem:eA}={}]=(0,z.jg)(),eD=y[A.rm.IS_TRUCKLOAD],e_=y[A.rm.IS_SPECIAL_ORDER],eO=y[A.rm.IS_WAREHOUSE_ONLY],ew=y[A.rm.IS_MEMBER_ONLY_ITEM],eN=y[A.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_2],ej=x?.truckloadUrl||"",eP=eT?.[0]?.object.isVariableWeight===!0,{addToListContentStackData:eR}=(0,P.h)(),ek=D?(({samedayDeliveryData:e,itemId:t,zipCode:i,shortDescription:r})=>{let a=String("CABC").toUpperCase(),n=e?.samedayDeliveryBaseUrl?.[a];if(!n)return;let l={utm_source:"pdp"};return i&&(l.delivery_zipcode=i),r&&(l.product_name="USBD"===a?r.replace(/\./g,"%2E"):r.replace(/&amp;amp;/g,"&")),t&&(l.rrc=t),`${n}?${new URLSearchParams(l).toString()}`})({samedayDeliveryData:h,itemId:d?.id||"",zipCode:b?.destinationPostalCode,shortDescription:d?.descriptions?.[0]?.object?.shortDescription||void 0}):void 0,eL=eI?Number.parseInt(String(eI),10):1,eM=l?.toplabel,eB=l?.topbuttonarialabel,e$=e&&!!b?.destinationPostalCode,ez=(({productData:e,translations:t})=>(0,a.useMemo)(()=>{let i=e?.descriptions?.[0]?.object,r=e?.productAttributes?.[0]?.object?.filter(e=>e?.type==="defining").map(e=>({key:e?.key||"",value:e?.value||""}))||[];return{itemId:e?.id||null,imageName:i?.imageName||null,shortDescription:i?.shortDescription||null,productName:i?.shortDescription||null,translations:t,productAttributes:r}},[e,t]))({productData:ei,translations:l}),eU=()=>{let e=(0,ed.J)(d?.descriptions?.[0]?.object?.shortDescription||"",ei.id||"");eS({component:{identifier:"Product Detail | Sign In",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),(0,es.Mi)(e||"")},eq=e$?ey||u.message||"":l?.nozipcodeselected||"Set your delivery ZIP code to view item price and availability in your delivery area.",eV=u.severity||"";e$?ey&&(eV="critical"):eV="alert";let eF=!e$||u.hideAddToCart,eW=d?.isBuyable===!0,eH=ew&&!eC&&!eN&&!v&&!S,eK=!(eD||!e$||v||eA||e_||eO),eG=(0,r.jsx)(ea.A,{itemId:ez.itemId,imageName:ez.imageName,shortDe
35scription:ez.shortDescription,translations:l,productName:ez.productName,productAttributes:ez.productAttributes,currentQuantity:eL}),eY={initialQuantity:eL,minQuantity:eL,maxQuantity:f,showQuantityInput:!0,isPriceAppendScenario:eP,factor:er,weightedUnit:ec,uom:eh,onAddToCart:e=>eb(ei.id,e,ec),addToCartAriaLabel:`${l?.addtocartbutton||""} ${ez.shortDescription||""}`,isLoading:ef,isError:eg,showAddToList:eK,addToListItemId:ez.itemId,addToListElement:eG,translations:l,quantityError:ex,resetServerError:ev,notification:{message:e$?eq:"",severity:eV,cb:u.trackingData?()=>eS(u.trackingData):void 0,id:u.id},hideAddToCart:eF,productFlags:y,signedIn:eC,costcoMember:eE,onSignIn:eU},eQ={onClick:eU,variant:"primary","aria-label":l?.signinfordetailsbutton,uniqueId:"sign-in-button"},eZ=(0,a.useMemo)(()=>(0,r.jsxs)(m.default,{"data-testid":"add-to-cart",sx:{display:"flex",gap:c.iAn},children:[(0,r.jsx)(m.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"column",gap:c.m72},children:(0,r.jsx)(s.Button,{sx:{flex:"1 0 0"},...eQ,children:l?.signinfordetailsbutton})}),ez.itemId&&eG]}),[eQ,l,ez,eG]),eJ=(0,a.useMemo)(()=>(0,r.jsxs)(m.default,{"data-testid":"bd-change-delivery-method-confirmation",sx:{display:"flex",flexDirection:"column",gap:c.Mzk},children:[(0,r.jsx)(E.A,{message:l?.changedeliverymethodmessagetext||"Changing your delivery method will apply to all items in your cart. Some items may become unavailable for purchase.",severity:"alert"}),(0,r.jsxs)(m.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"row",gap:c.iAn},children:[(0,r.jsx)(s.Button,{sx:{display:"flex",flex:"1 0 0"},variant:"secondary",uniqueId:"bd-change-delivery-method-button",onClick:Z,children:l?.changedeliverymethodbuttontext||"Change Delivery Method"}),ez.itemId&&eG]})]}),[l,Z,ez,eG]),eX=(0,a.useMemo)(()=>{let e={component:{type:"nav",identifier:"Product Detail",trackedData:["Shop Same-Day Delivery"]},doNotTrack:!1,trackType:"navigation"};return(0,r.jsxs)(m.default,{"data-testid":"bd-shop-samedaydelivery",sx:{display:"flex",gap:c.iAn},children:[(0,r.jsx)(m.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"column",gap:c.m72},children:(0,r.jsx)(s.Button,{sx:{flex:"1 0 0",width:"100%"},variant:"primary-alternate",uniqueId:"bd-shop-samedaydelivery-button",href:ek,target:"_blank",onClick:()=>{eS(e)},children:l?.samedaybuttontext||"Shop Same-Day Delivery"})}),ez.itemId&&eG]})},[ek,l,ez,eG]);return(0,r.jsx)(n.default,{size:{xs:12},children:(0,r.jsx)(G.AddToListProviderClient,{contentStackValues:eR?.addToListContentStackData,enableModernApis:!1,enableV2ListsApi:!1,children:(0,r.jsx)(J,{topLabel:eM,topButtonAriaLabel:eB,children:eH?eZ:(0,r.jsxs)(r.Fragment,{children:[e&&!eD&&(p||S)?(0,r.jsx)(X.Skeleton,{variant:ee.z.Rectangular,height:"50px",width:"100%"}):(0,r.jsxs)(r.Fragment,{children:[!e$&&!eD&&(0,r.jsx)(en,{locale:o,buttonText:l?.setdeliveryzipbutton,buttonAriaLabel:l?.setdeliveryzipbuttonarialabel,notificationMessage:eq,showAddToList:!(eA||e_||eO),addToListItemId:ez.itemId,addToListImageName:ez.imageName,addToListShortDescription:ez.shortDescription,addToListProductName:ez.productName,addToListProductAttributes:ez.productAttributes,translations:l}),e$&&!eD&&Y&&eJ,e$&&!eD&&ek&&eX,e$&&!eD&&!Y&&!ek&&(0,r.jsx)(_,{...eY})]}),!eW&&eD&&(0,r.jsx)(eu,{customButtonData:{customButtonCodeHref:ej,customButtonCodeTitle:"truckload information"},translations:l,itemId:d?.id||""})]})})})})}},17196:(e,t,i)=>{i.d(t,{S:()=>a});var r=i(48006);let a=(e,t,i,a)=>{let n=t.find(e=>e.id===a),l=n&&{...n,childCatalogData:n.childCatalogData?.filter(e=>e.isPublished)},o=new Map(i.filter(e=>e.isPublished).map(e=>[e.childItemNumber,e])),s=new Set(o.keys()),d=(s.size>0?t.map(e=>({...e,childCatalogData:e.childCatalogData?.filter(e=>s.has(e.id))})).filter(t=>t.id!==e?.productId).filter(e=>e.isPublished):t).flatMap(e=>{let t=e.childCatalogData?.[0];if(!t)return[];let i=o.get(t.id),a=!!t?.productAttributes?.at(0)?.object?.find(({key:e,type:t})=>"controlling"===t&&e===r.u);return[{...t,isSellable:!a,quantity:i?.quantity,sequenceNumber:i?.sequenceNumber,parentDetails:{...e,childCatalogData:void 0}}]}).filter(e=>e.isPublished);return{bundleRawData:e,bundleComponents:{bundleItemsData:d,bundleParentData:l}}}},17477:(e,t,i)=>{i.d(t,{FulfillmentContext:()=>y,FulfillmentContextProvider:()=>x});var r=i(95155),a=i(82849),n=i(12115),l=i(7025),o=i(48976),s=i(82993),d=i(62526),c=i(40544),u=i(60714),p=i(71706),m=i(70746),h=i(19359),f=i(98216),g=i(38734),b=i(30890);let y=(0,n.createContext)(null),x=({children:e,locale:t,productDetailsData:i})=>{var x;let v,S,{productData:{childCatalogData:C,descriptions:E,productAttributes:I,isFsaEligibleProduct:T,isChdEligibleProduct:A,dispPriceInCartOnly:D},selectedChildItemNumber:_}=i,{fulfillmentConfigSetting:O,fulfillmentModuleSettings:w,zipCodeModuleSettings:{properties:N},enabledWhListConfigSetting:j,enabledWhListBopiwConfigSetting:P,enabledWhListWioConfigSetting:R,fulfillmentAjaxSCInventoryUpdateAPIFeatureToggle:k,fulfillmentWcsInventoryDetailsFeatureToggle:L,fulfillmentInventoryV2DetailsFeatureToggle:M}=(0,u.h)(),{properties:B}=w,$=B&&B[0],z=$?.samedayDeliveryData??{},U=$?.restrictedStates??[],q=$?.maxFutureDate??365,V=$?.vendorList??{},F=$?.haulAwayMattressConfig??{},W=$?.floralDeliveryConfig??{},H=(0,n.useMemo)(()=>({restrictedStates:U,maxFutureDate:q,vendorList:V,haulAwayConfig:F,floralDeliveryConfig:W}),[U,q,V,F,W]),K=E?.[0]?.object?.sanitizedDeliveryStatement,{template:G}=K||{},Y=E?.[0]?.object?.imageName??"",Q=E?.[0]?.object?.deliveryStatement??"",Z=(0,n.useMemo)(()=>(0,h.ur)(i.productData),[i.productData]),J=E?.[0]?.object?.startDate??"",X=(0,n.useMemo)(()=>({deliveryStatement:Q,sanitizedDeliveryStatement:K,fulfillmentPrimaryInfo:Z,imageName:Y}),[Q,K,Z,Y]),[ee]=(0,g.N)(),et=ee?.value||_,ei=(0,n.useMemo)(()=>C?.find(e=>e.id===et),[C,et]),er=ei?.minItemOrderQty&&ei?.minItemOrderQty!=="0"?ei.minItemOrderQty:"1",{deliveryLocation:ea}=(0,p.B)(),{defaultLocation:en,defaultState:el}=N[0],{state:eo=el,zipCode:es=en}=ea,ed=(0,h.gI)(t),ec=(0,n.useMemo)(()=>({destinationState:eo,destinationPostalCode:es,destinationCountryCode:ed}),[eo,es,ed]),{selectedWarehouse:eu,pickUpCenter:ep,warehouseState:em}=(0,m.e)(),{isWarehouseUpdated:eh}
35=(x=et||"",v=(0,n.useRef)(""),S=(0,n.useRef)(!1),(0,n.useEffect)(()=>{v.current!==eu&&(v.current=eu,S.current=!0)},[eu]),(0,n.useMemo)(()=>({previousWarehouse:v.current,isWarehouseUpdated:!!(S.current&&eu&&v.current!==eu)}),[eu,x])),{custom:ef}=O||{},eg=e=>e.every(e=>ef[e]??!0),eb=(0,n.useMemo)(()=>({[l.KY.IS_WIO_ENABLED]:eg([l.Om.WAREHOUSE_CHANNEL_FEATURE_ON,l.Om.WIO_FEATURE_ON]),[l.KY.IS_BOPIW_OR_STW_ENABLED]:eg([l.Om.WAREHOUSE_CHANNEL_FEATURE_ON,l.Om.BOPIW_OR_STW_FEATURE_ON]),[l.KY.IS_BOPIM_ENABLED]:eg([l.Om.WAREHOUSE_CHANNEL_FEATURE_ON,l.Om.BOPIM_FEATURE_ON]),[l.KY.IS_SC_INVENTORY_UPDATE_API_ENABLED]:k?.isEnabled??!1,[l.KY.IS_WCS_INVENTORY_DETAILS_ENABLED]:L?.isEnabled??!0,[l.KY.IS_INVENTORY_V2_DETAILS_ENABLED]:M?.isEnabled??!0}),[ef,k?.isEnabled,L?.isEnabled,M?.isEnabled]),ey=!!ei?.productAttributes?.[0]?.shipModes?.some(e=>"LPU"===e.code),ex=(0,n.useMemo)(()=>({[l.rm.IS_EDD]:(0,o.zs)(ei),[l.rm.IS_SITE_CONTROLLED_INVENTORY]:!!ei?.programTypes?.includes(l.ts.SITE_CONTROLLED_INVENTORY),[l.rm.IS_LOCATION_CONTROLLED_INVENTORY]:!!ei?.programTypes?.includes(l.ts.LOCATION_CONTROLLED_INVENTORY),[l.rm.IS_WIO_PRODUCT]:!!ei?.programTypes?.includes(l.ts.IN_WAREHOUSE),[l.rm.IS_BOPIW_PRODUCT]:!!ei?.programTypes?.includes(l.ts.USE_WAREHOUSE_INVENTORY),[l.rm.IS_BOPIM_PRODUCT]:!!ei?.programTypes?.includes(l.ts.LTL_PICKUP)&&ey,[l.rm.IS_TWO_DAY_DELIVERY]:!!ei?.programTypes?.includes(l.ts.TWO_DAY_DELIVERY),[l.rm.IS_SHIP_TO_WAREHOUSE]:ei?.isShipToWarehouse??!1,[l.rm.IS_WAREHOUSE_ONLY]:!!I?.[0]?.object.some(e=>e.key===l.PC),[l.rm.IS_COSTCO_GROCERY_ELIGIBLE]:"true"===a.A.get("C_2LOC"),[l.rm.IS_BUYABLE]:ei?.isBuyable===!0,[l.rm.IS_SAME_DAY_DELIVERY]:!!ei?.programTypes?.includes(l.ts.SAME_DAY_DELIVERY),[l.rm.IS_VARIANT_PRODUCT]:(C?.filter(e=>e.isPublished)||[]).length>1,[l.rm.IS_EDD_CHUB_SMALLPACK_OR_LTL]:!!(0,o.R6)(ei),[l.rm.IS_BIG_AND_BULKY_PRODUCT]:!!ei&&!!(0,o.qk)(ei),[l.rm.IS_SHOP_COSTCO_CARD]:!!ei&&!!(0,o.KF)(ei),[l.rm.IS_DIGITAL_DELIVERY]:!!ei?.productAttributes?.[0]?.shipModes?.some(e=>"EDG"===e.code),[l.rm.IS_FSA_OR_CHD_ELIGIBLE]:!!(T||A),[l.rm.IS_FLORAL]:G===l.L.FLORAL,[l.rm.IS_MEMBERSHIP_PRODUCT]:!!I?.[0]?.object.some(e=>e.key===l.MV&&e.value===l.s),[l.rm.IS_MEMBER_ONLY_ITEM]:(0,b.ce)(i.productData,ei?.id||_),[l.rm.IS_CHUB_LTL_PRODUCT]:!!(0,o.gQ)(ei),[l.rm.IS_LINK_OUT_PRODUCT]:2===D,[l.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_1]:1===D,[l.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_2]:2===D,[l.rm.SHOW_BUY_MEMBERSHIP_FLOW]:!1}),[ei,ey,I,C,T,A,G,i.productData,_,D]),ev=e=>new Set(e?.custom?.enabledWarehousesList?.[ed.toLowerCase()]||[]),{enabledWhListLucid:eS,enabledWhListBopiw:eC,enabledWhListWio:eE}=(0,n.useMemo)(()=>({[l.Ug.LUCID]:ev(j),[l.Ug.BOPIW]:ev(P),[l.Ug.WIO]:ev(R)}),[j,P,R,ed]),eI=(0,n.useMemo)(()=>({[l.rE.IS_WAREHOUSE_BOPIW_ENABLED]:(0,f._h)(eu,eS,eC),[l.rE.IS_WAREHOUSE_WIO_ENABLED]:(0,f._h)(eu,eS,eE)}),[eu,eS,eC,eE]),eT=(0,n.useMemo)(()=>(0,h.u)(ei?.productAttributes?.[0]?.shipModes),[ei?.productAttributes]),eA=(0,c.w)({featureFlags:eb,productFlags:ex,warehouseFlags:eI,childItemNumber:ei?ei.id:_,destination:ec,selectedWarehouse:eu,pickUpCenter:ep,shippingCodes:eT,itemMinQuantity:er,isWarehouseUpdated:eh,startDate:J,locale:t}),eD=(0,n.useMemo)(()=>({...eA,samedayDeliveryData:z}),[eA,z]),e_=(0,n.useMemo)(()=>{let e=(0,d.L)(w);return(0,d.U)(e,s.Rq)},[w]),eO=(0,n.useMemo)(()=>({translations:e_,fulfillmentData:eD,featureFlags:eb,productFlags:ex,warehouseFlags:eI,destination:ec,fulfillmentSettings:H,selectedChildItem:ei,productData:X,selectedWarehouse:eu,warehouseState:em,locale:t}),[e_,eD,eb,ex,eI,ec,H,ei,X,eu,em,t]);return(0,r.jsx)(y.Provider,{value:eO,children:e})}},18717:(e,t,i)=>{i.d(t,{GroceryDetection:()=>l});var r=i(12115),a=i(50148),n=i(38734);let l=({childCatalogData:e,selectedChildItemNumber:t})=>{let{setIsGroceryProduct:i}=(0,a.V)(),[l]=(0,n.N)(),o=l?.value||t,{programTypes:s}=e?.find(e=>e.id===o)||{},d=!!s?.includes("2DayDelivery");return(0,r.useEffect)(()=>{s&&i(d)},[d,s,i]),null}},19547:(e,t,i)=>{function r(e){let t="/LogonForm";e&&(t+=`?URL=${e}`),window.location.href=t}i.d(t,{J:()=>a,a:()=>r});let a=(e,t)=>{let i=window.location.origin,r=new URLSearchParams(window.location.search);if(!e||!t)return`${i}`;let a=e.toLowerCase().replace(/ /g,"-").replace(/[^A-Za-z0-9-]/g,""),n=r.get("preselect")||"",l=n?`?preselect=${n}`:"";return`${i}/${a}.product.${t}.html${l}`}},19909:(e,t,i)=>{i.d(t,{r:()=>l});var r=i(12115),a=i(63720),n=i(77654);let l=()=>{let e=(0,r.useContext)(n.g),t=(0,r.useContext)((0,a.i)()),i=e||t;if(!i)throw Error("useFulfillmentContext must be used within a FulfillmentContextProvider");return(0,r.useMemo)(()=>i,[i])}},20376:(e,t,i)=>{i.d(t,{v:()=>a});var r=i(73577);let a=e=>Object.entries(r.r).find(([,t])=>t===e)?.[0]||""},20463:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(95155),a=i(12158),n=i(7457),l=i(27966),o=i(15786),s=i(13400),d=i(16561),c=i(24880),u=i(12115),p=i(34971),m=i(95097);let h=e=>{let{accordionData:t,selectionMap:i=[],isLoading:s,handleButtonRef:d,selectedIndex:u,onClickHandler:h,translations:f}=e||{};return(0,r.jsx)(r.Fragment,{children:t.map((e,t)=>{let g=i.includes(e.value),b=g?o.cC:{};return s?(0,r.jsx)(p.Skeleton,{width:"60px",variant:m.z.Button},`SubVariantButtonSkeleton-${e.itemNumber}`):(0,r.jsx)(l.default,{sx:{padding:c.m72},children:(0,r.jsx)(n.Button,{ref:e=>d(e,t),onClick:()=>{h(e,u)},"aria-label":e.isOutOfStock?`${e.value}, ${f?.outofstock||"Out of Stock"}`:`${e.value}`,sx:b,disableRipple:!0,"aria-pressed":g,variant:e.isOutOfStock?"text-button-out-of-stock":"text-button-alternate",uniqueId:e.isOutOfStock?`out-of-stock-${e.itemNumber}`:g?`selected-variant-${e.itemNumber}`:`unselected-variant-${e.itemNumber}`,children:e.secondaryValue?(0,r.jsxs)(l.default,{sx:o.we,children:[(0,r.jsx)(a.Text,{variant:"t6",bold:g,uniqueId:`text-variant-grid-item-value-${t}`,children:e.value}),(0,r.jsx)(a.Text,{variant:"t6",uniqueId:`text-variant-grid-secondary-item-value-${t}`,children:e.secondaryValue})]}):(0,r.jsx)(a.Text,{variant:"t6",bold:g,uniqueId:`text-variant-grid-item-value-${t}`,children:e.value})},`SubVariantButton-${e.itemNumber}`)},`SubVariantButtonContainer-${e.itemNumber}`)})})};var f=i(17197),g=i(81839),b=i(73321),y=i(70422);let x=e=>{let{accordionData:t,isLoading:i,handleButtonRef:a,currentAttribute:n,setCurrentAttribute:s,setQuickViewAttribute:d,onClickHandler:h,attributeValue:x,selectedIndex:v,translations:S,isBundleVariant:C}=e||{},E=(0,b.useSearchParams)(),{trackEvent:I}=(0,y.z1)(),T=(0,u.useMemo)(()=>(0,g.cS)(t),[t]),A=(e,t)=>
35{d&&d(t?e.transformedColorSwatch.attributeValue:"")};return(0,u.useEffect)(()=>{s(x||"")},[x,s]),(0,r.jsx)(r.Fragment,{children:T.map((e,t)=>{let{transformedColorSwatch:d}=e||{};return i?(0,r.jsx)(p.Skeleton,{width:"40px",variant:m.z.Button},`TransformedColorSwatchSkeleton-${d.itemNumber}`):(0,r.jsx)(l.default,{sx:{padding:c.m72},children:(0,r.jsx)(f.F,{ref:e=>a(e,t),onClick:()=>{n!==e.transformedColorSwatch.attributeValue&&(I({component:{identifier:`Product Detail | Color | ${e.transformedColorSwatch.attributeValue}`,type:"ui"},doNotTrack:!1,trackType:"product-action-button"}),(e=>{if(C)return;let t=`${e.key}:${e.value}`,i=new URLSearchParams(E);i.set("preselect",t),window.history.pushState(null,"",`?${i.toString()}`)})({key:e.transformedColorSwatch.label.toLowerCase(),value:e.transformedColorSwatch.attributeValue.toLowerCase()}),s(e.transformedColorSwatch.attributeValue),h(e.rawVariantData,v))},selected:n===d.attributeValue,onBlur:()=>A(e,!1),onFocus:()=>A(e,!0),onMouseEnter:()=>A(e,!0),onMouseLeave:()=>A(e,!1),variant:"full",productSwatch:d,"aria-pressed":n===d.attributeValue,swatchButtonSx:{...o.fG,...d.isOutOfStock&&{"&:hover":{border:`1px solid ${c.RPF}`,backgroundImage:"none"}}},outOfStockText:S?.outofstock||"Out of Stock"},`TransformedColorSwatchButton-${d.itemNumber}`)},t)})})},v=e=>{let{data:t,isLoading:i,attributeLabel:p,attributeValue:m,type:f,selectionMap:g,selectedIndex:b,translations:y,selectedItemNumber:v}=e||{},[S,C]=(0,u.useState)(!1),[E,I]=(0,u.useState)(m),[T,A]=(0,u.useState)(""),[D,_]=(0,u.useState)(!1),[O,w]=(0,u.useState)(new Set),N=(0,u.useRef)(null),j=(0,u.useRef)([]),P=S?(0,r.jsx)(d.A,{}):(0,r.jsx)(s.A,{}),R="colorSwatch"===f?100:114;(0,u.useEffect)(()=>{if(S&&O.size>0){let e=Math.min(...Array.from(O));j.current[e]?.focus()}},[S,O]),(0,u.useEffect)(()=>{j.current.forEach((e,t)=>{e&&(O.has(t)&&!S?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex"))})},[O,S]),(0,u.useEffect)(()=>{let e=setTimeout(()=>{k()},50);return()=>clearTimeout(e)},[t,f,S]);let k=()=>{if(!N.current||S)return void w(new Set);let e=N.current.getBoundingClientRect(),t=new Set;j.current.forEach((i,r)=>{i&&i.getBoundingClientRect().bottom-e.top>R&&t.add(r)}),w(t)};(0,u.useEffect)(()=>{let e=N.current,t=()=>{e&&(e.style.maxHeight=S?"none":`${R}px`,e.style.overflowY=S?"none":"hidden",_(e.scrollHeight>R),k())};t();let i=new ResizeObserver(t);return e&&i.observe(e),()=>i.disconnect()},[f,S]);let L={...e,handleButtonRef:(e,t)=>{j.current[t]=e},accordionData:t,currentAttribute:E,setCurrentAttribute:I,setQuickViewAttribute:A,quickViewAttribute:T};return(0,r.jsxs)(l.default,{"data-testid":`variants-accordion-${f}`,sx:o.yd,children:[(0,r.jsxs)(l.default,{sx:{border:"none",margin:0,padding:0,minWidth:"auto"},component:"fieldset",children:[(0,r.jsx)(l.default,{sx:{marginBottom:c.iAn},component:"legend",children:(0,r.jsxs)(a.Text,{sx:o.uI,component:"h2",uniqueId:`variants-accordion-${f}-attribute-label`,children:[p,":",(0,r.jsx)(l.default,{component:"span",sx:{fontWeight:"bold"},id:v,children:T||g?.[b||0]||E})]})}),(0,r.jsx)(l.default,{sx:o.yd,children:(0,r.jsx)(l.default,{sx:{display:"flex"},children:(0,r.jsx)(l.default,{children:(0,r.jsx)(l.default,{ref:N,sx:i?o.b9:o.Gx,children:"textVariant"===f?(0,r.jsx)(h,{...L}):(0,r.jsx)(x,{...L})})})})})]}),D&&(0,r.jsx)(n.Button,{disableRipple:!0,"aria-expanded":S,sx:o.aL,onClick:()=>{C(e=>!e),N.current&&(N.current.style.maxHeight=S?"none":`${R}px`)},variant:"tertiary",uniqueId:`variants-accordion-${f}`,children:(0,r.jsxs)(l.default,{sx:o.Cp,children:[(0,r.jsx)(a.Text,{variant:"t6",uniqueId:`variants-accordion-${f}-show-text`,children:S?y?.variantshowless:y?.variantshowall}),(0,r.jsx)(a.Text,{variant:"t6",uniqueId:`variants-accordion-${f}-attribute-labels-text`,children:`${p}s`}),(0,r.jsx)(o.eK,{children:P})]})})]})}},20681:(e,t,i)=>{i.d(t,{aw:()=>o,sm:()=>s});var r=i(73577),a=i(19359);let n=e=>r.A[e]||"",l=(e,t)=>{let i=e.includes("?")?"&":"?";return""===t||e.includes("langId")?e:`${e}${i}langId=${t}`},o=({href:e,setOpen:t,setHref:i,event:r,internalDomains:o,locale:s})=>{if(r?.type==="keydown"&&"Enter"!==r.code&&"Space"!==r.code)return;let d=r.target;if("_blank"===(d?.getAttribute?.("target")||d?.closest?.("a")?.getAttribute?.("target")))return;let c=n(s||"");if(e){r.preventDefault(),(0,a.i9)(e,o)?(i&&i(e),t(!0)):window.location.href=l(e,c);return}let u=d?.href,p=d?.getAttribute("href"),m=p?.startsWith("/");if(u){if(r.preventDefault(),m){window.location.href=l(u,c);return}(0,a.i9)(u,o)?(i&&i(u),t(!0)):window.location.href=l(u,c)}},s=({event:e,href:t,internalDomains:i,locale:r,setOpen:o,setHref:s})=>{let d=e.currentTarget,c=t||d?.href,u=null;if(!c){let t=e.target;if(u=t?.tagName==="A"?t:t?.closest("a"),!u?.href)return;c=u.href}let p=!c?.startsWith("/")&&(0,a.i9)(c,i),m=l(c,n(r));if(p&&(s&&s(c),o(!0)),2===e.button&&!p)return void(u&&m?u?.setAttribute("href",m):d?.setAttribute("href",m))}},21016:(e,t,i)=>{i.d(t,{BazaarVoiceInit:()=>s,F:()=>o});var r=i(12115),a=i(82849),n=i(19359),l=i(30890);let o="BAZAAR_VOICE:SHOW",s=({locale:e,isBundleParent:t})=>{let i=e&&(0,n.R_)(e),s={en_US:"costco",en_CA:"costco-en_ca",fr_CA:"costco-fr_ca"}[i]||"costco";(0,r.useEffect)(()=>
35{if(void 0!==i&&void 0!==s){let e,r,a=document.createElement("script");return window.bvCallback=e=>{e.swat_reviews.on("show",()=>dispatchEvent(new Event(o)))},e=t?`https://apps.bazaarvoice.com/deployments/${s}/native_review_form_kits_and_bundles/production/${i}/bv.js`:`https://apps.bazaarvoice.com/deployments/${s}/native_review_form/production/${i}/bv.js`,a.setAttribute("src",e),a.setAttribute("defer",""),r=()=>{let e=document.getElementsByTagName("stop"),t=document.getElementsByTagName("polygon");if(e.length&&t.length){let i=Array.prototype.slice.call(e),r=Array.prototype.slice.call(t);i.forEach(e=>{e.style.stopColor=e.style.stopColor.replaceAll("0, 96, 169","255, 204, 0"),e.style.stopColor=e.style.stopColor.replaceAll("192, 192, 192","250, 250, 250")}),r.forEach(e=>{e.style.stroke="rgb(202, 77, 0)"})}},a.onload=()=>{let e=document.getElementById("CostcoBVReviewContainer");new MutationObserver(r).observe(e,{childList:!0,subtree:!0,attributes:!0})},document.body.appendChild(a),()=>{document.body.removeChild(a)}}},[s,i,t]),(0,r.useEffect)(()=>{let e=document.querySelector('meta[name="bv:cookies"]'),t=document.createElement("meta");return e||(t.setAttribute("name","bv:cookies"),t.setAttribute("content","true"),document.head.appendChild(t)),()=>{document.querySelector("[name='bv:cookies']")?.remove()}},[]);let d=(0,l.fm)().signedIn;return(0,r.useEffect)(()=>{let e=a.A.get("hashedUserId"),t=a.A.get("bvUserToken");t&&!d&&(a.A.remove("bvUserToken"),t=void 0),e=e&&'""'!==e?e:void 0,t=t&&'""'!==t?t:"",document.querySelector("[name='bv:userToken']")?.remove();let i=document.createElement("meta");return i.setAttribute("name","bv:userToken"),i.setAttribute("content",`${t}`),document.head.appendChild(i),()=>{document.querySelector("[name='bv:userToken']")?.remove()}},[d]),null}},21517:(e,t,i)=>{i.d(t,{$:()=>n});var r=i(12115),a=i(45182);let n=()=>{let[,e]=(0,a.jQ)();return{onItemSelect:(0,r.useCallback)((t,i,r)=>{e(e=>{let a=new Map(e??[]),n=a.get(t);return i?a.set(t,{isSelected:!0,quantity:n?.quantity??r??1}):a.set(t,{isSelected:!1,quantity:n?.quantity??r??1}),a})},[e]),onQuantityChange:(0,r.useCallback)((t,i,r=1)=>{e(e=>{let a=new Map(e??[]);if(i<r)return a;let n=a.get(t);return a.set(t,{isSelected:n?.isSelected??!0,quantity:i}),a})},[e])}}},22357:(e,t,i)=>{i.d(t,{FulfillmentBdContainer:()=>_});var r=i(95155),a=i(12115),n=i(12129),l=i(92226),o=i(53236),s=i(90657),d=i(7025),c=i(70422),u=i(27966),p=i(46286),m=i(12158),h=i(7457),f=i(24880),g=i(24386),b=i(74711),y=i(92126),x=i(62151),v=i(37994),S=i(83272),C=i(60073),E=i(98216),I=i(33610),T=i(57001),A=i(95768);let D=({itemId:e,locale:t})=>{let{trackEvent:i}=(0,c.z1)(),{translations:n,fulfillmentData:l,destination:o,productFlags:D}=(0,b.fs)(),_=D[d.rm.IS_FSA_OR_CHD_ELIGIBLE],{samedayDeliveryData:O,inventoryState:w}=l??{},N=((e,t)=>{switch(t){case S.tu.ZIP_CODE_AND_PRODUCT_AVAILABLE:return e?.available||"Available";case S.tu.ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK:return e?.outofstock||"Out of Stock";case S.tu.ZIP_CODE_UNAVAILABLE:case S.tu.HAS_REPLACEMENT_ITEM:case S.tu.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER:return e?.unavailable||"Unavailable";default:return""}})(n,w),j=((e,t)=>{let i=(0,E.xo)(e,d.aS.DELIVERY);switch(t){case S.tu.ZIP_CODE_AND_PRODUCT_AVAILABLE:return i[d.RO.INSTOCK].color;case S.tu.ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK:return i[d.RO.NOSTOCK].color;case S.tu.ZIP_CODE_UNAVAILABLE:case S.tu.HAS_REPLACEMENT_ITEM:case S.tu.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER:return i[d.RO.UNAVAILABLE].color;default:return}})(n,w),{agent:P,isDrawerOpen:R,openDrawer:k,closeDrawer:L,zipCode:M,moduleSettings:B,warehouseSpecificDeliveryMethodUIOverridesMap:$,handleSubmitZipCode:z}=(0,b.a1)(t),{isPickupAvailable:U,isDeliveryAvailable:q,isSameDayDeliveryEligible:V,isSameDayDeliveryLoading:F}=(0,x.Pv)(e,t),W=(0,y.Y)(),H=w===S.tu.ZIP_CODE_AND_PRODUCT_AVAILABLE,K=(0,a.useMemo)(()=>{let e=[];return q&&e.push({id:S.yl.LOCAL_BUSINESS_DELIVERY,label:(0,C.w)(n,S.yl.LOCAL_BUSINESS_DELIVERY),isAvailable:H,EDD:"",timeframe:"",secondaryLabel:H?"":N}),U&&e.push({id:S.yl.PICK_UP,label:(0,C.w)(n,S.yl.PICK_UP),isAvailable:H,EDD:"",timeframe:"",secondaryLabel:H?"":N}),V&&H&&e.push({id:S.yl.SAME_DAY_DELIVERY,label:(0,C.w)(n,S.yl.SAME_DAY_DELIVERY),isAvailable:!0,iconInfo:O?.samedayDeliveryIcon||"",iconTitle:O?.samedayDeliveryIconTitle||"",EDD:"",timeframe:""}),e},[n,q,U,V,H,N]),G=K.some(e=>e.id===W?.type)?W?.type:K[0]?.id,[Y,Q]=(0,a.useState)(G),[,Z]=(0,v.Fu)(),[,J]=(0,v.Jm)(),X=(0,a.useCallback)((e,t=!1)=>{Q(e),Z({type:e});let i=e===S.yl.SAME_DAY_DELIVERY;J({isConfirming:!t&&!i&&!!G&&e!==G})},[G,Z,J]);(0,a.useEffect)(()=>{void 0!==G&&X(G,!0)},[G,X]);let ee=K.find(e=>e.id===Y)??K[0],et=n?.zipcodearialabel?.replace("{{zipCode}}
35",o?.destinationPostalCode||"").replace("{{deliveryMethod}}",ee?.label||""),ei=(0,a.useCallback)(e=>{let t=e.id;ee?.id!==t&&(X(t),_||i({trackType:"fulfillment",trackedData:`ui:Product Detail | Fulfillment | ${e.label}`}))},[ee,X,_,i]);return(0,r.jsxs)(u.default,{sx:{display:"flex",flexDirection:"column",gap:f.iAn},children:[(0,r.jsx)(m.Text,{bold:!0,component:"h2",id:"bd-fulfillment-card-title",uniqueId:"bd-fulfillment-card-title",variant:"t3",children:n?.howtogetit??"How To Get It"}),(0,r.jsxs)(u.default,{sx:{display:"flex",flexDirection:"column",gap:f.D3H},children:[(0,r.jsxs)(s.Ml,{"data-testid":"bd-fulfillment-zipCode",children:[(0,r.jsx)(g.A,{titleAccess:n?.deliverylocationtext??""}),(0,r.jsxs)(u.default,{sx:{display:"flex",flexDirection:"column"},children:[(0,r.jsx)(h.Button,{uniqueId:"zipcodeSelector",sx:T.h,variant:"text-button",onClick:()=>{k(),i(A.A)},"aria-label":et,children:o?.destinationPostalCode}),N&&(0,r.jsx)(m.Text,{uniqueId:"bd-fulfillment-availability-status-text",variant:"t6",bold:!0,sx:{color:j},"data-testid":"bd-fulfillment-availability-status",children:N})]})]}),(0,r.jsx)(I.A,{isLoading:l?.isLoading||F,options:K,selected:ee,onSelect:ei})]}),P&&(0,r.jsx)(p.P,{isOpen:R,onClose:L,zipCode:M||void 0,onSubmit:z,agent:P,moduleSettings:B,isBDPage:!0,locale:t,warehouseSpecificDeliveryMethodUIOverridesMap:$})]})},_=({itemId:e,locale:t})=>{let{isMobile:i}=(0,o.G)(),[c,u]=(0,a.useState)(!1);(0,a.useEffect)(()=>{u(!0)},[]);let{productFlags:p,destination:m}=(0,b.fs)(),h=c&&!!m?.destinationPostalCode,f=p[d.rm.IS_WAREHOUSE_ONLY],g=p[d.rm.IS_SPECIAL_ORDER],y=p[d.rm.IS_TRUCKLOAD];return f||g||y||!h?null:(0,r.jsx)(n.default,{size:{xs:12},children:(0,r.jsx)(l.l,{cornerStyle:i?"square":"rounded",sx:s.oM,"data-testid":"bd-fulfillment",children:(0,r.jsx)(D,{itemId:e,locale:t})})})}},23273:(e,t,i)=>{i.d(t,{BuildBundleParentContainer:()=>D});var r=i(95155),a=i(12115),n=i(99899),l=i(55632),o=i(1611),s=i(95468),d=i(12158),c=i(42138),u=i(2377),p=i(71586),m=i(60714),h=i(24880),f=i(96013),g=i(31122),b=i(27944),y=i(44052),x=i(19359),v=i(68470),S=i(88165),C=i(45969),E=i(67666),I=i(5553),T=i(30890),A=i(13052);let D=({bundleItems:e})=>{let{bundleItemsData:t,bundleParentData:i}=e;(0,l.h)(t,i,i?.childCatalogData?.[0]?.id);let{productDetailsData:D,locale:_,translations:O,pageSettingsProperties:w}=(0,g.h)(),N=w?.enableModURLInBundle||!1,j=D.productData,P=j?.childCatalogData?.[0]?.id||"",R=j?.dispPriceInCartOnly===1,k=(0,T.ce)(j,P)||R,{addToListContentStackData:L}=(0,m.h)(),{addToListContentStackData:M}=L||{},{isLoadingPriceAPI:B,isPriceApiError:$}=(0,C.A)(),{isSellableItemsInStock:z}=(0,A.MN)(),U=(0,a.useMemo)(()=>(0,p._L)(t,O,N,k,P),[t,O,N,k,P]),q=(0,a.useMemo)(()=>t.map(e=>({childItemNumber:e.id,shippingCodes:(0,x.u)(e.productAttributes?.[0]?.shipModes??void 0),minQuantity:(0,y.Gs)(e.minItemOrderQty)})),[t]),V=(0,a.useMemo)(()=>t.filter(e=>e.isSellable).map(e=>e.id),[t]),F=(0,a.useMemo)(()=>Object.fromEntries(U.map(e=>[e.itemNumber,e.productName])),[U]),{errorMap:W,clearItemError:H}=(0,v.e)(),{trackBundleLoad:K,trackProductCheckChange:G,trackBundleOutOfStock:Y,isInventoryLoading:Q}=(0,S.WU)(t);return((0,a.useEffect)(()=>{Q||K(),Q||z||Y()},[Q,K,Y,z]),t&&0!==t.length)?(0,r.jsxs)(n.A,{testId:`parent-bundle-container-${P}`,children:[(0,r.jsx)(b.i,{componentItems:q}),(0,r.jsx)(d.Text,{bold:!0,component:"h2",uniqueId:"bundle-card-title",id:I.uY,variant:"t3",sx:{marginBottom:h.Mzk},children:O.buildyourbundle||"Build Your Bundle"}),!B&&$&&(0,r.jsx)(E.default,{sx:{marginBottom:h.Mzk},children:(0,r.jsx)(c.Notification,{uniqueId:`bundle-priceapi-error-${P}`,severity:"alert",message:O?.missingpricefallbacktext||"Price API Error",icon:(0,r.jsx)(f.A,{})})}),(0,r.jsx)(s.C,{sellableItemNumbers:V,itemNames:F,locale:_,translations:O,children:U.map((e,t)=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)(o.A,{productData:e,locale:_,translations:O,addToListContentStackData:M,customErrorMsg:W?.[e.itemNumber],onCheckChange:G,onClearServerError:()=>H(e.itemNumber),index:t}),t<U.length-1&&(0,r.jsx)(u.Divider,{sx:{margin:`${h.Mzk} 0`}})]},e.itemNumber))})]}):(console.info("[PDP][BUNDLE][ERROR] - Unable to build parent bundle page - no published and buyable items"),null)}},23783:(e,t,i)=>{i.d(t,{x:()=>r}),i(73321);let r=e=>{let t={};
35return e.composable_window.forEach(e=>{let i="";e.text_only.development_field_key.includes("bodyContent")&&(i="visitExternalLinkBody"),e.text_only.development_field_key.includes("titleContent")&&(i="visitExternalLinkTitle"),e.text_only.development_field_key.includes("primaryButtonContent")&&(i="visitExternalLinkPrimaryButton"),e.text_only.development_field_key.includes("secondaryButtonContent")&&(i="visitExternalLinkSecondaryButton"),t[i]=e.text_only.body}),t}},24002:(e,t,i)=>{i.d(t,{Q:()=>o});var r=i(12115),a=i(7025),n=i(42031),l=i(19359);let o=({productData:e,translations:t,locale:i,destination:o,fulfillmentSettings:s,productFlags:d,parentInventoryStatus:c,isAvaialbleForSale:u,status:p,estimatedDeliveryDate:m,fulfilledBy:h,webCatalogId:f})=>{let{sanitizedDeliveryStatement:g,deliveryStatement:b}=e?.descriptions?.at(0)?.object||{},y=(0,r.useMemo)(()=>({availability:c,availableForSale:u,shipmodeDates:[{status:p,estimatedDeliveryDate:m}],fulfilledBy:h,webCatalogId:f}),[c,u,p,m,h,f]),{primaryInfo:x,secondaryInfo:v,tertiaryInfo:S,EDD:C,timeframe:E,fulfillmentStatus:I}=(0,r.useMemo)(()=>{if(e&&t&&s)return((e,t,i,r,o,s,d="",c,u,p={})=>{let m={deliveryStatement:t,fulfillmentPrimaryInfo:(0,l.ur)(e),sanitizedDeliveryStatement:i},h={isEDD:!0,isEddChubSmallPackOrLTL:!1,isBigAndBulkyProduct:!0,isEDDChubLTL:!1,isBuyable:!0,isWarehouseOnly:!1,isFloral:!1,isDigitalDelivery:!1,isShopCostcoCard:!1,is2DayDelivery:!1,...p};return(0,n.Dp)({countryCode:c,productFlags:h,productData:m,translations:r,inventoryData:s,fulfillmentSettings:u,destinationState:d,warehousePickupStatus:a.RO.UNAVAILABLE,selectedChildItem:void 0,locale:o})})(e,b,g,t,i,y,o.destinationState,o.destinationCountryCode,s,d)},[e,b,g,t,y,i,o.destinationState,o.destinationCountryCode,s,d])||{};return{primaryInfo:x,secondaryInfo:v,tertiaryInfo:S,EDD:C,timeframe:E,fulfillmentStatus:I}}},24102:(e,t,i)=>{i.d(t,{default:()=>m});var r=i(95155),a=i(7569),n=i(76670),l=i(12129),o=i(27966),s=i(12115),d=i(97737),c=i(56850),u=i(38734),p=i(19359);let m=({brandfolderAsset:e,translations:t,isThirdPartyIncluded:i,brandfolderServiceConfig:m,selectedChildItemNumber:h,imageName:f,locale:g,placeholderImage:b,brandFolderAssetPattern:y,isAEMIntegrationEnabled:x})=>{let[v,S]=(0,s.useState)(e||[]),[C,E]=(0,s.useState)(x),{agent:I}=(0,a.f)(),[T]=(0,u.N)(),A=T?.value||h,D=f&&new URLSearchParams(f).get("format")||"jpg";if((0,s.useEffect)(()=>{(async()=>{if(I){var e;let t=(0,c.dV)(m,I),r=t.fetchMediaAssets(A).then(e=>e?{[A]:t.linkCustomFields(e,g)}:{[A]:[]}),a=await r,n=(a[A]||[])?.filter(e=>!e?.customFields?.isFeedOverride),l=i?n:a[A]||[],o=((e,t)=>{if(!e||0===e.length||!t)return!1;let i=new RegExp(t),r=e.some(e=>i.test(e?.attributes?.cdn_url));return console.info(`[PDP] Is AEM Feature Flag Enabled - ${!r}`),!r})(n||[],y);E(o);let s=(0,p.vr)(l,o);(e=>{for(let t of e){let e=t?.attachments?.data;if(!e)break;for(let t of e){let e=t?.attributes?.mimetype;if("string"==typeof e&&(e.startsWith("image/")||e.startsWith("application/")))return!0}}return!1})(s=(s=!(e=s).some(e=>{let t=e?.customFields?.Language;return"string"==typeof t&&"fr-ca"===t.toLowerCase()})?e:e.filter(e=>{let t=e?.customFields?.Language;return"fr-ca"===g?"string"==typeof t&&"fr-ca"===t.toLowerCase():"string"!=typeof t||"fr-ca"!==t.toLowerCase()})).filter(e=>!e.attachments?.data?.some(e=>e.attributes?.mimetype==="application/pdf")))||(s=[...f&&D?[{id:"alternateImageId",type:"generic_files",attributes:{name:"alternate_primary_image 1",description:"",thumbnail_url:f,approved:!0,cdn_url:f,extension:""},attachments:{data:[{id:"r4qkh4hkqxhbrbhsvx6x6b9z",type:"attachments",attributes:{mimetype:`image/${D}`,extension:D,filename:`alternate_primary_image.${D}`,size:792271,width:2400,height:2400,url:f,position:0,thumbnail_url:f,cdn_url:f}}]},customFields:{"Asset Type":"Photo",Priority:"1"}}]:[],...s]),S(s)}})()},[I,A,m,i]),!e)return;let _=t?.skipimagebuttonlabel||"Skip Images";return(0,r.jsx)(l.default,{size:{xs:12},children:(0,r.jsxs)(o.default,{id:"image-gallery","data-testid":"image-gallery",sx:{position:"relative"},children:[(0,r.jsx)(o.default,{sx:{display:{xs:"none",md:"block"}},children:(0,r.jsx)(d.SkipLink,{skipLinkText:_,targetId:"productDescriptionDesktop"})}),(0,r.jsx)(n.j,{locale:g,mediaSet:v,translations:t,isAemIntegrationEnabled:C,placeholderImage:b})]})})}},24939:(e,t,i)=>{i.d(t,{AddToCartDrawerProvider:()=>l,t:()=>n});var r=i(95155),a=i(12115);let n=(0,a.createContext)(null),l=({children:e})=>{let[t,i]=(0,a.useState)([]),[l,o]=(0,a.useState)(!1),[s,d]=(0,a.useState)(null);return(0,r.jsx)(n.Provider,{value:{drawerContentArr:t,navigateToNextDrawer:e=>{i(t=>[...t,e])},navigateToPreviousDrawer:()=>{i(e=>e.slice(0,-1))},isOpen:l,onDrawerOpen:e=>{d(e||null),o(!0)},onDrawerClose:()=>{o(!1),i([]),s&&d(null)}},children:e})}},25254:(e,t,i)=>{i.d(t,{default:()=>s});var r=i(95155),a=i(34291),n=i(12115),l=i(89009),o=i(27966);function s({children:e}){let{isMobile:t}
35=(0,a.A)(),[i,d]=(0,n.useState)(!0);return((0,n.useEffect)(()=>{t?d(!0):d(!1)},[t]),i)?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.default,{sx:{display:{xs:"none",md:"flex"},height:"80vh",justifyContent:"center",alignItems:"center"},children:(0,r.jsx)(l.A,{})}),(0,r.jsx)(o.default,{sx:{display:{xs:"block",md:"none"}},children:e})]}):null}},26955:(e,t,i)=>{i.d(t,{$o:()=>n,_8:()=>r,eS:()=>o,oZ:()=>a,xs:()=>l,zU:()=>s});let r=(e,t)=>[...e].sort((e,i)=>{let r=e.id===t;return r!==(i.id===t)?r?-1:1:e.isSellable!==i.isSellable?e.isSellable?-1:1:0}),a=e=>{if(e&&0!==e.length)return e.filter(e=>void 0!==e.normalizedData).map(({normalizedData:e,quantity:t})=>({itemNormalizedData:e,qty:t,fulfillmentDetails:{}}))},n=e=>e.filter(e=>e.isSelected&&e.itemInStock).map(e=>({itemNumber:Number(e?.id),quantity:e.quantity,pid:e?.normalizedData?.productInfoData?.partNumber||""})),l=(e,t,i,r,a,n,l)=>n&&!i?e?.signintoseepricebutton:n&&i&&r?e?.renewmembershipbutton:n&&i&&a?e?.addmembershipnumberbutton:t&&l?1===t?e?.addbundletocartbutton.replace("{{amount}}",String(t)):e?.addbundletocartbuttonplural.replace("{{amount}}",String(t)):e?.selectbundleitem,o=e=>{let{bundleItems:t,bundleParentId:i,partNumber:r,authToken:a}=e||{},n=t.reduce((e,t,i)=>(e[`itemNumber_${i+1}`]=t.itemNumber,e[`quantity_${i+1}`]=t.quantity,e),{});return{...{isPdpPage:!0,actionType:"add",ajaxFlag:!0,checkOmsInventory:!0,isQuickAddToCartButton:!0,isRestrictedPostalCode:!1,partNumber:r,authToken:a,is_mod_pdp:!0,isKitsAndBundleComponent:!0,Number_of_items:t?.length||0,bundleParentId:i},...n}},s=(e,t)=>{let i=new Set(t.map(e=>String(e.itemNumber)));return Object.entries(e).reduce((e,[r,a])=>{let n=(a.match(/\b\d{5,10}\b/g)??[]).find(e=>i.has(e));if(n)e[n]=a;else{let i=parseInt(r,10)-1,n=t[i]?.itemNumber;e[n?String(n):r]=a}return e},{})}},27504:(e,t,i)=>{i.d(t,{DB:()=>n,Oe:()=>u,Ye:()=>s,Yj:()=>o,c_:()=>d});var r=i(19359);let a=(e,t,i)=>{let r=e.value;t.forEach(n=>{if(n.parentAttr===r){let r={key:n.key,value:n.value,itemNumber:n.itemNumber,primaryAttrValue:n.primaryAttr,swatchImage:n.swatchImage,displaySequence:n.displaySequence,primaryItemNumber:i,parentId:n.parentId,children:[]},l=e.children.find(e=>e.value===r.value);l||e.children.push(r),a(l||r,t,i)}})},n=(e,t)=>{let i=[];return e&&(i.push(e.value),e.children&&e.children.length>0)?i.concat(n(e.children.find(e=>e.itemNumber===t)||e.children[0],t)):i},l=e=>[...e].sort((e,t)=>(e.displaySequence||0)-(t.displaySequence||0)).map(e=>({...e,children:e.children&&e.children.length>0?l(e.children):e.children})),o=(e,t={},i)=>{let o;if(!e)return;let s=l((o=[],e.map(e=>{let i=new Set,r=e.productAttributes?.[0]?.object.filter(e=>"defining"===e.type).filter(e=>{if(!e?.key)return!0;let t=String(e.key);return!i.has(t)&&(i.add(t),!0)}).map(e=>
35((e.key||"")in t&&void 0!==e.key&&null!==e.key&&(e.attrSequence=t[e.key],e.swatchImage=e.swatchImage||""),e)).sort((e,t)=>(e?.attrSequence??Number.MAX_SAFE_INTEGER)-(t?.attrSequence??Number.MAX_SAFE_INTEGER))||[],{assets:a}=e||{},n=a?.swatchImages?.[0]||{};return r.forEach((t,i)=>{t.swatchImageData=n,t.primaryAttr=r[0]?.value,t.parentAttr=i>0?r[i-1]?.value:null,t.itemNumber=e.id,t.parentId=e.parentId?.[0]||null}),{productAttributes:r}}).forEach(e=>{let t=e.productAttributes??[];t.forEach(e=>{if(!e.parentAttr){let i=o.find(t=>t.value===e.value),r={key:e.key,value:e.value,itemNumber:e.itemNumber,primaryAttrValue:e.value,primaryItemNumber:e.itemNumber,parentId:e.parentId,swatchImage:e.swatchImage,displaySequence:e.displaySequence,swatchImageData:e.swatchImageData,children:[]};i||o.push(r),a(i||r,t,i?.itemNumber||e.itemNumber||"")}})}),o)),c=d(s,i||"")||s[0],u=n(c,i);return{normalizedVariantsData:(0,r.qR)(s,c,u),initialSelectedVariants:u,selectedPrimaryVariantData:c}},s=e=>{if(!e||!e.length)return{isFsaEligibleProduct:!1,isChdEligibleProduct:!1};let t=e&&(0,r.K9)(e),i=t?.filter(e=>e?.isPublished===!0);return{isFsaEligibleProduct:i?.length&&!!i.some(e=>e?.isFsa),isChdEligibleProduct:i?.length&&!!i.some(e=>e?.isChd)}},d=(e,t)=>{if(e&&Array.isArray(e)){for(let i of e)if(i.itemNumber===t||i.children&&i.children.length>0&&c(i.children,t))return i}},c=(e,t)=>{for(let i of e)if(i.itemNumber===t||i.children&&i.children.length>0&&c(i.children,t))return!0;return!1},u=e=>{if(!e||!e?.object||!e?.object.length)return{};let t=e.object.filter(e=>"defining"===e.type),i=t.every(e=>0===e.displaySequence||null===e.displaySequence||void 0===e.displaySequence),r={};return t.forEach((e,t)=>
35{void 0!==e.key&&null!==e.key&&(r[e.key]=i?t:e.displaySequence??t)}),r}},27777:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(95155),a=i(64912);let n=new Map,l=e=>{let{itemId:t,productPartNumber:i,productIDNumber:l,imageName:o,shortDescription:s,productAttributes:d,currentQuantity:c}=e||{},u=[l,i].filter(Boolean).join(" "),p=String(t);u&&n.set(p,u);let m=u||n.get(p)||"";return(0,r.jsx)(a.Z,{product:{id:t,src:o,price:"",title:s,currentQuantity:c},sx:{zIndex:2,padding:0,height:"100%",width:"fit-content",alignItems:"flex-start","&:hover":{backgroundColor:"transparent"}},ariaDescribedBy:m,uniqueId:`AddToList_${t}`,variant:"iconV2",buttonSize:"large",productAttributes:d})}},27944:(e,t,i)=>{i.d(t,{i:()=>m});var r=i(95155),a=i(19909),n=i(12115),l=i(93280),o=i(60714),s=i(7025),d=i(13052),c=i(45182),u=i(24002);let p=({childItemNumber:e,shippingCodes:t,minQuantity:i})=>{let{destination:r}=(0,a.r)();return(({childItemNumber:e,shippingCodes:t,minQuantity:i,destination:r})=>{let{inventoryV2ServiceConfig:p}=(0,o.h)(),[,m]=(0,d.Y0)(),h=!!(e&&r.destinationPostalCode&&r.destinationCountryCode),{inventoryV2Data:f,isLoading:g,isError:b}=(0,l.e9)({childItemNumber:e,destination:r,shippingCodes:t,itemMinQuantity:i,serviceConfig:p},h),{translations:y,locale:x,fulfillmentSettings:v}=(0,a.r)(),[S=[]]=(0,c.AX)(),C=S?.find(({id:t,parentDetails:{id:i}={}})=>t===e||i===e),E=C?.parentDetails?.programTypes?.includes(s.ts.SITE_CONTROLLED_INVENTORY),I=C?.parentDetails?.programTypes?.includes(s.ts.LOCATION_CONTROLLED_INVENTORY),{fulfillmentStatus:T,EDD:A}=(0,u.Q)({productData:{},translations:y,locale:x,destination:r,fulfillmentSettings:v,productFlags:{isSiteControlledInventory:E,isLocationControlledInventory:I},parentInventoryStatus:f?.availability,isAvaialbleForSale:!!f?.availableForSale,status:f?.availability,estimatedDeliveryDate:f?.shipmodeDates?.at(0)?.estimatedDeliveryDate||null,fulfilledBy:f?.fulfilledBy||"",webCatalogId:f?.webCatalogId})||{},D=!r?.destinationPostalCode||!r.destinationCountryCode,_=g||D;(0,n.useEffect)(()=>{let t=f?T||s.RO.UNAVAILABLE:b?s.RO.UNAVAILABLE:void 0,i=f?.shipmodeDates?.[0]?.estimatedDeliveryDate||void 0;m(r=>({items:{...r?.items,[e]:{status:t,estimatedDeliveryDate:i,isLoading:_,error:b,data:f}}}))},[f?.availability,f?.shipmodeDates,_,e,m])})({childItemNumber:e,shippingCodes:t,minQuantity:i,destination:r}),null},m=({componentItems:e})=>(0,r.jsx)(r.Fragment,{children:e.map(({childItemNumber:e,shippingCodes:t,minQuantity:i})=>(0,r.jsx)(p,{childItemNumber:e,shippingCodes:t,minQuantity:i},e))})},29496:(e,t,i)=>{i.d(t,{Ev:()=>g,Gt:()=>p,Ws:()=>h,iT:()=>f,mW:()=>m});var r=i(6776),a=i(3418),n=i(36980),l=i(96736),o=i(90162),s=i(2276),d=i(36370),c=i(7025),u=i(83272);let p={[c.Oi.DELIVERY]:r.default,[c.Oi.DIGITAL_DELIVERY]:a.default,[c.Oi.MDO_PICKUP]:n.default,[c.Oi.PICKUP]:l.default,[c.Oi.SELECTED]:o.default,[c.Oi.SHIP_TO_WAREHOUSE]:l.default,[c.Oi.SHIPPING]:r.default,[c.Oi.TWO_DAY_DELIVERY]:s.default,[c.Oi.BUY_IN_WAREHOUSE]:l.default,[u.yl.LOCAL_BUSINESS_DELIVERY]:r.default,[u.yl.NATIONWIDE_DELIVERY]:d.default,[u.yl.PICK_UP]:l.default,[u.yl.SAME_DAY_DELIVERY]:s.default},m={[c.Oi.DELIVERY]:"Delivery",[c.Oi.DIGITAL_DELIVERY]:"Email Delivery",[c.Oi.MDO_PICKUP]:"Pick-Up",[c.Oi.PICKUP]:"Pick-Up",[c.Oi.SHIP_TO_WAREHOUSE]:"Pick-Up",[c.Oi.SHIPPING]:"Shipping",[c.Oi.SAME_DAY_DELIVERY]:"Same-Day Delivery",[c.Oi.TWO_DAY_DELIVERY]:"2-Day Delivery",[c.Oi.BUY_IN_WAREHOUSE]:"Buy In-Warehouse"},h=["id","label","EDD","isAvailable","timeframe"],f=p[c.Oi.SHIPPING],g=32},30890:(e,t,i)=>{i.d(t,{BH:()=>f,CY:()=>b,Mi:()=>h,Rh:()=>u,SY:()=>p,Um:()=>c,ce:()=>d,fm:()=>s,fp:()=>m,ul:()=>g});var r=i(82849),a=i(19547),n=i(19359),l=i(8102),o=i(48006);let s=()=>{let e,t=!1,i=!1,a=!1,n=!1,l="",o="",s=r.A.get("wcMember"),d=r.A.get("hashedUserId"),c=r.A.get("rrDisabledPref"),u=r.A.get("rrStoreFlag");if(e=(null==d||'""'!==d)&&(null!=d||null!=c||null!=u)&&(null!=d||(null==c||'""'!==c)&&(null==u||'""'!==u))&&(null==d||""!==d)&&(null!=d||null!=c||null!=u)&&(null!=d||(null==c||""!==c)&&(null==u||""!==u))&&(null!=d&&'""'!==d||null==d&&null!=c&&'""'!==c&&null!=u&&'""'!==u||void 0),null!=s&&"undefined"!==s){let e=s.split(",");e.length>1&&("1"===e[1]&&(t=!0),void 0!==e[3]&&(l=e[3]),"1"===e[4]&&(i=!0),"1"===e[5]&&(a=!0),"E0002"===e[6]&&(n=!0),void 0!==e[8]&&(o=e[8]))}else t=void 0;return{signedIn:e,costcoMember:t,validated:i,verified:a,active:n,usage:l,membershipNumber:o}},d=(e,t)=>{if(!e||!t)return!1;let{dispPriceInCartOnly:i,childCatalogData:r}=e;if(!i||!r||0===r.length)return!1;let a=r?.find(e=>e.id===t);return!!a?.isMembershipReqd},c=e=>{window.location.href=e||"/MembershipSecondaryValidationView"},u=e=>{window.open(e||"/join-costco.html","_blank")},p=e=>{if(!e||!Object.keys(e).length)return void console.error("[PDP][RedirectMembership][Error]: No Add to Cart API response data");let t=window.location.origin,i=e?.redirecturl?.replace(/&amp;/g,"&");if(!i)return void console.error("[PDP][RedirectMembership][Error]: Add to Cart API response is missing a valid redirecturl property");delete e.redirecturl,delete e.orderErrMsgLocObj,delete e.orderErrMsgObj;let r=new URLSearchParams({...e,form_id:"#ProductForm"}),a=`${t}${i}&${r}`;window.location.href=a},m=(e,t,i)=>{let r=`${t||"/cart/membership"}?itemNumber=${e}`;window.location.href="fr-ca"===i?`${r}&langId=-25`:r},h=e=>{(0,a.a)(e)},f=(e,t,i,r)=>!1===e&&1===t&&!0===r&&!i,g=(e,t)=>{let i=e?.programTypes||[],r=i.includes("UseWarehouseInventory"),a=i.includes("InWarehouse"),s=i.includes("2DayDelivery"),d=e?.isShipToWarehouse??!1,c=(0,n.G8)(),u=(0,l.G)({productData:t}),p=(0,o.Q)({productData:t});return!!(a||r||s||d||c||u||p)},b=e=>{let{signedIn:t,costcoMember:i,validated:r,verified:a,active:n}=s();return!e||!!t&&!!i&&!!n&&(!!r||!!a)}},31122:(e,t,i)=>{i.d(t,{BuildBundleScaffoldingContextProvider:()=>l,h:()=>o});var r=i(95155),a=i(12115);let n=(0,a.createContext)({}),l=({children:e,value:t})=>(0,r.jsx)(n.Provider,{value:t,children:e}),o=()=>(0,a.useContext)(n)},31375:(e,t,i)=>{i.r(t),i.d(t,{AccordionContext:()=>l,AccordionContextProvider:()=>o});var r=i(95155),a=i(12115),n=i(89118);let l=(0,a.createContext)(null),o=({children:e,accordionsList:t})=>{let[i,o]=(0,a.useState)(n.do.PRODUCT_DETAILS),[s,d]=(0,a.useState)(!1),[c,u]=(0,a.useState)([n.do.PRODUCT_DETAILS
35]),[p,m]=(0,a.useState)(!1);return(0,r.jsx)(l.Provider,{value:{selectedAccordion:i,setSelectedAccordion:o,isAccordionClicked:s,setIsAccordionClicked:d,accordionsList:t,openedAccordions:c,setOpenedAccordions:u,hasManualsAndGuides:p,setHasManualsAndGuides:m},children:e})}},31698:(e,t,i)=>{i.d(t,{Legacy:()=>a});var r=i(12115);let a=e=>{let{pageType:t}=e;return(0,r.useEffect)(()=>(window&&(window.pageType=t,console.log(`pageType: ${window.pageType}`)),()=>{delete window.pageType}),[t]),null}},32921:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(95155),a=i(2377),n=i(12158),l=i(45145),o=i(40045);let s=({merchandiseData:e,translations:t,warrantyServicesSupportUrl:i})=>e&&e?.warrantyAndServices&&e?.warrantyAndServices.length>0?(0,r.jsxs)(o.jn,{children:[(0,r.jsx)(o.w9,{variant:"t5",component:"h3",bold:!0,children:t?.warrantytitle||""}),(0,r.jsx)(a.Divider,{}),e.warrantyAndServices.map(e=>{if(e.longDescription){let a=e.longDescription.replace("/n","").replace("]]&gt;",""),s=(0,l.E)(a,t,i);return(0,r.jsx)(o.ZB,{children:(0,r.jsx)(n.Text,{uniqueId:`warrantyAndServices${e.rank}`,variant:"b2",id:"warrantyContent",children:s},e.id)},`WarrantyContent-${e.id}`)}return null})]}):null},33610:(e,t,i)=>{i.d(t,{A:()=>p});var r=i(95155),a=i(27966),n=i(24880),l=i(34971),o=i(95097),s=i(58291),d=i(29496);let c=(0,i(86670).Ay)("fieldset")({border:"none",margin:"0px",padding:"0px",display:"flex",flexDirection:"column",gap:n.iAn});var u=i(80281);let p=({isLoading:e,options:t,selected:i,onSelect:p})=>{let m=t&&t.some(e=>e&&d.Ws.every(t=>void 0!==e[t]));if(!e&&!m)return null;let h=(e=>{let t=[],i=e.length;if(i<=3)return t.push(e),t;if(i%2==0){for(let r=0;r<i;r+=2)t.push(e.slice(r,r+2));return t}t.push(e.slice(0,3));for(let r=3;r<i;r+=2)t.push(e.slice(r,r+2));return t})(t);return(0,r.jsx)(c,{"aria-labelledby":u.D,"data-testid":"fulfillmentMolecule",children:h.map((d,c
35)=>{let m;return(0,r.jsx)(a.default,{sx:{display:"flex",gap:n.iAn},children:e?(0,r.jsx)(l.Skeleton,{variant:o.z.Rectangular,width:"100%",height:"120px"}):d.map((m=d.length,e=>(0,r.jsx)(s.A,{EDD:e.EDD,iconInfo:e?.iconInfo,iconTitle:e?.iconTitle,id:e.id,isAvailable:e.isAvailable,label:e.label,onClick:()=>p(e),secondaryLabel:e?.secondaryLabel,secondaryLabelColor:e?.secondaryLabelColor,selected:i?.id===e.id,timeframe:e.timeframe,width:1===t.length?u.N:`${100/m}%`,price:e.price},e.id)))},c)})})}},34291:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(28683),a=i(90058);let n="xs",l="md",o="md",s="lg",d=({customOptions:e={}}={})=>{let t=(0,r.A)();return{isDesktop:(0,a.A)(t.breakpoints.up(e?.isDesktop||"lg")),isMobile:(0,a.A)(t.breakpoints.between(e?.isMobile?.start||n,e?.isMobile?.end||l)),isTablet:(0,a.A)(t.breakpoints.between(e?.isTablet?.start||o,e?.isTablet?.end||s))}}},37994:(e,t,i)=>{i.d(t,{Fu:()=>o,Jm:()=>s,PZ:()=>n,jg:()=>l});var r=i(9527),a=i(19359);let n=(0,r.y)({isLoading:!1,isExcluded:!!(0,a.G8)()&&void 0}),l=(0,r.y)({isLoading:!1,isReplacementItem:!!(0,a.G8)()&&void 0}),o=(0,r.y)({type:void 0}),s=(0,r.y)({isConfirming:!1})},38734:(e,t,i)=>{i.d(t,{N:()=>r});let r=(0,i(9527).y)()},38909:(e,t,i)=>{i.d(t,{A:()=>ei});var r=i(95155),a=i(12115),n=i(82849),l=i(70422),o=i(19547),s=i(30890),d=i(48195),c=i(60714),u=i(26955),p=i(27966),m=i(54309),h=i(42138),f=i(7457),g=i(34971),b=i(95097),y=i(84791),x=i(29445),v=i(12158),S=i(24880),C=i(97766),E=i(13869),I=i(89148),T=i(96013),A=i(25283),D=i(19216),_=i(2377),O=i(1147),w=i(42800),N=i(74324);let j={color:S.sLX,maxHeight:"18px",maxWidth:"18px",display:"flex",gap:S.m72},P={display:"inline-flex",paddingTop:"2px",width:"24px",height:"24px",alignItems:"flex-start"},R=({translations:e,lang:t,ctaBundlePrice:i,selectedItemsCount:n,outOfStockItemsCount:l})=>{if(!n)return null;let{bundlePrice:o,outOfStockPrice:s,savings:d,total:u,standardEcoFee:m,includedEcoFee:h,hiddenEcoFee:f}=i,g=n>0&&d.fullPrice>0,b=!!l&&s.fullPrice>0&&n>0,y=1===l?e?.bundleoutofstock:e?.bundleoutofstockplural,x=!!(m&&m.fullPrice>0),C=!!(h&&h.fullPrice>0),E=!!(f&&f.fullPrice>0),I=o.fullPrice>0&&(g||n>1||l>0||x||C||E),[A,R]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=document.createElement("div");return e.id="bundle-price-tooltip-portal",document.body.appendChild(e),R(e),()=>{document.body.contains(e)&&document.body.removeChild(e)}},[]);let{productPricingCardModuleSettings:L}=(0,c.h)(),M=L?(0,N.IV)(L):{},B=e=>{let i=Number(e).toFixed(2),r=(0,w.$g)(t,i);return"fr-ca"===t?`${r.formattedPrice} $`:`$${r.formattedPrice}`},$=e=>{let i,a=M?.ecoFeeLabel,n=M?.closeButtonText;return(0,r.jsx)(D.m,{buttonAriaLabel:`${M?.tooltipInfoLabel}`,buttonContent:(0,r.jsx)(T.A,{sx:j}),buttonStyles:P,content:(i="fr-ca"===t?M?.ecoFeeFrLink:M?.ecoFeeEnLink,(0,r.jsxs)("span",{"data-testid":`${M?.ecoFeeLabel}-tooltip-text`,children:[M?.bundleEcoFeeTooltipText," ",(0,r.jsx)("a",{tabIndex:0,href:i,style:{color:S.tjF},children:`${M?.learnMoreText}`})]})),position:"top",hasArrow:!0,tooltipId:`link-fee-${e}-tooltip-id`,uniqueId:`link-fee-${e}`,modalButtonLabel:n,modalContainer:A,offset:[0,8],renderAsModal:!0,modalTitle:a,sx:{'&[data-popper-placement*="top"]':{".arrow":{left:"-6px !important"}}}})},z=[{isVisible:I,label:e?.bundle,price:B(o.fullPrice),variant:"b1",uniqueIdPrefix:"bundle"},{isVisible:x,label:M?.ecoFeeLabel,price:`+ ${B(m?.fullPrice??0)}`,variant:"b2",uniqueIdPrefix:"bundle-standard-eco-fee",tooltip:$(0)},{isVisible:C,label:M?.includesEcoFeeText,price:`${B(h?.fullPrice??0)}`,variant:"b2",uniqueIdPrefix:"bundle-included-eco-fee",tooltip:$(1)},{isVisible:E,label:M?.includesEcoFeeText,variant:"b2",uniqueIdPrefix:"bundle-hidden-eco-fee",tooltip:$(2)},{isVisible:b,label:y,price:`- ${B(s.fullPrice)}`,variant:"b2",uniqueIdPrefix:"bundle-out-of-stock"},{isVisible:g,label:e?.costcodirectsavings,price:`- ${B(d.fullPrice)}`,variant:"b2",uniqueIdPrefix:"bundle-direct-savings",color:"success"}];return(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",gap:S.D3H},children:[I||b||g?(0,r.jsx)(p.default,{sx:{display:"flex",flexDirection:"column",gap:S.iAn},children:z.map((e,t)=>(0,r.jsxs)(k,{isVisible:e.isVisible,children:[(0,r.jsxs)(v.Text,{variant:e.variant,uniqueId:`${e.uniqueIdPrefix}-label`,color:e.color,children:[e.label," ",e.tooltip]}),e.price&&(0,r.jsx)(v.Text,{variant:e.variant,uniqueId:`${e.uniqueIdPrefix}-price`,sx:{whiteSpace:"nowrap"},color:e.color,children:e.price})]},`${e.uniqueIdPrefix}-${t}`))}):null,u.fullPrice>0&&I&&(0,r.jsx)(_.Divider,{orientation:"horizontal",sx:{borderColor:S.XgP}}),(0,r.jsxs)(k,{isVisible:u.fullPrice>0,children:[(0,r.jsx)(v.Text,{variant:"t4",bold:!0,uniqueId:"bundle-total-label",children:e?.bundletotal}),(0,r.jsx)(p.default,{sx:{whiteSpace:"nowrap"},children:(0,r.jsx)(O.g,{locale:t,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:u.wholeValue,hasDecimal:!0,decimalValue1:u.decimalValue,hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"sm"})})]})]})},k=({isVisible:e=!0,children:t})=>e?(0,r.jsx)(p.default,{sx:{display:"inline-flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",gap:S.D3H},children:t}):null;var L=i(34291),M=i(32722),B=i(7569),$=i(60475),z=i(71706),U=i(66191),q=i(46295),V=i(51296),F=i(69934),W=i(42446),H=i(82589),K=i(68470),G=i(19359),Y=i(71586),Q=i(5553),Z=i(13052),J=i(19909),X=i(66874),ee=i(38734),et=i(87358);let ei=e=>{let[t,i]=(0,a.useState)(!1),D=(0,a.useRef)(null),{productDetailsData:_,translations:O,dispInChildBundleContainer:N=!1,productC
35onfig:j,locale:P,accessoriesData:k,properties:ei}=e,{setError:er,clearError:ea,hasGenericATCError:en,errorMap:el}=(0,K.e)(),{items:eo,fulfillmentDetails:es,isDataLoading:ed,ctaBundlePrice:ec,outOfStockItemCount:eu,totalItemCount:ep,bundleParentData:em,currentItemPrice:eh}=(0,H.T)(P),[ef]=(0,ee.N)(),eg=eo.filter(e=>!!(e.isSelected&&e.itemInStock)),eb=O?.toplabel||"Top",ey=O?.topbuttonarialabel||"Back to Top",{navigateToNextDrawer:ex,onDrawerOpen:ev,isOpen:eS}=(0,F.T)(),{addMembershipModuleSettings:eC}=(0,c.h)(),[eE,eI]=(0,a.useState)(!1),{translations:eT}=(0,J.r)(),{refreshCart:eA}=(0,M.B)(),{agent:eD}=(0,B.f)(),{getTokenValue:e_}=(0,$.y)(),eO=_.productData?.descriptions,[ew,eN]=(0,a.useState)(!1),[ej,eP]=(0,a.useState)(!1),{isMobile:eR}=(0,L.A)(),{isSellableItemsInStock:ek}=(0,Z.MN)(),{onZipCodeDrawerOpen:eL}=(0,X.M)(),{deliveryLocation:eM}=(0,z.B)(),eB=ei?.enableModURLInBundle||!1,e$=em?.id||"",ez=em?.descriptions?.[0]?.object?.shortDescription||"",eU=em?.descriptions?.[0]?.object?.imageName||"",eq=(0,a.useMemo)(()=>e$?(0,Y.nt)(e$,ez,eB||!1):"",[e$,ez,eB]),eV=null;eO&&eO.length>0&&(eV=eO[0]);let{trackEvent:eF}=(0,l.z1)(),eW=_.productData,eH=ei?.memberValidationBypassFeatureEnabld||!1,eK=ei?.membershipUrls?.renewMembershipUrl||"",eG=ei?.membershipUrls?.joinTodayUrl||"",eY=eV?.object.shortDescription,{total:eQ}=ec,{wcMember:eZ}=(0,z.B)(),{signedIn:eJ,validated:eX,verified:e0,active:e1}=(0,d.i)(),e2=!!eJ,e5=!!e1,e9=!!eX,e7=!!e0,{urls:e4}=j?.productTileConfigData?.translationsConfig||{},{id:e3,childCatalogData:e6}=_?.productData||{},{id:e8}=e6?.[0]||{},te=N?ef?.value||e8||"":e8||"";(0,a.useEffect)(()=>{let e=()=>{let e=document.getElementById("add-to-cart-bundle"),t=document.getElementById("extra-padding-bottom");if(!e)return;let i=e.offsetTop+e.offsetHeight;window.scrollY>i&&!N?(t&&(t.style.display=eR?"block":"none"),eN(!0)):(t&&(t.style.display="none"),eN(!1)),eR&&window.scrollY>window.innerHeight&&window.scrollY<i&&!N?eP(!1):eP(!0)};return window.addEventListener("scroll",e),e(),()=>{window.removeEventListener("scroll",e)}},[eR]),(0,a.useEffect)(()=>{t&&D.current?.focus()},[t]),(0,K.J)(t);let tt=eR&&ew&&!N,ti=eR&&!ej&&!N,tr=(e9||e7)&&!e5&&e2,ta=(!e9||!e7)&&eH&&!e5,tn=eW?.dispPriceInCartOnly===1,tl=(0,s.ce)(eW,te??null)||tn,to=(0,s.ce)(eW,te??null)&&(!e2||ta||tr),ts=tl&&(!e2||ta||tr),td=ep>0&&!ts,tc=(0,w.$g)(P,Number(eQ?.fullPrice??0).toFixed(2)),tu="fr-ca"===P?`${tc.formattedPrice}$`:`$${tc.formattedPrice}`,tp=td?`${O?.bundletotal||"Bundle Total"} ${tu}`:"",[tm,th]=(0,a.useState)(""),tf=(0,a.useRef)(null);(0,a.useEffect)(()=>(tf.current&&clearTimeout(tf.current),th(tp),tp&&(tf.current=setTimeout(()=>{th("")},3e3)),()=>{tf.current&&clearTimeout(tf.current)}),[tp]);let tg=(e2&&!ta&&!tr||!tl)&&ep,tb=()=>{eF({component:{identifier:"Product Detail | Join Costco",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),(0,s.Rh)(eG)},ty=()=>{eI(!1),eZ.updateWcMember(n.A.get("wcMember")||"")},tx=(0,u.xs)(O,ep,e2,tr,ta,tl,ek),tv=!!eg.find(e=>e.id===te),tS=(0,u.$o)(eg),tC=async()=>{if(ed)return;i(!1),ea();let t=null,a={bundleParentId:em?.childCatalogData?.[0]?.id||"",partNumber:e3||"",authToken:t,bundleItems:tS},n=(0,u.eS)(a);try{t=await e_(!0);let i=await eD?.postAddToCartDetails(e4?.addToCartURL,{...n,authToken:t});if((0,V.Q)(i)){let e=(0,u.zU)(i?.orderErrMsgObj||{},tS);er(e),console.error("[PDP][AddToCart][Error]: Add to cart failed",i);return}eF({trackedData:{cartAdd:"Product Detail - Bundle",products:tS.map(({pid:e,itemNumber:t,quantity:i})=>({pid:e,sku:t,quantity:i,channel:"Delivery"}))},doNotTrack:!1,trackType:"pdp-add-to-cart"}),eA();let a=(0,u._8)(eg,te),l=(0,u.oZ)(a),o=(0,r.jsx)(W.A,{title:O?.addedtocarttext||"",subTitle:O?.itemsincartlabel||""}),s={productConfig:j,locale:P,translations:O,productDetailsData:e.productDetailsData,site:String(et.env.SITE),accessoriesData:k,fulfillmentDetails:es,bundleCartItemDetails:l,pageSettingsProperties:[ei],priceListData:eh,fulfillmentTranslations:eT,qty:1,showAccessories:!N||tv};eS||ev(),ex({propsData:s,title:o,drawerType:"withCartItemsDrawer",Icon:C.A})}catch(e){console.error("[PDP][AddToCart][Error]: Add to cart failed"),i(!0)}},tE=()=>{let e=O?.signintoseepricebutton,t=O?.renewmembershipbutton,i=O?.addmembershipnumberbutton,r=O?.selectbundleitem,a=O?.addbundletocartbutton?.replace("{{amount}}",String(ep)),n=O?.addbundletocartbuttonplural?.replace("{{amount}}",String(ep));if(tx===e){let e;return void(eF({component:{identifier:"Product Detail | Sign In For Price",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),e=(0,o.J)(eY||"",eW?.id||""),(0,s.Mi)(e||""))}if(tx===t)return void(eF({component:{identifier:"Product Detail | Renew Membership",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),(0,s.Um)(eK));if(tx===i)return void(eF({component:{identifier:"Product Detail | Add Membership Number",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),eI(!0));if(tx===r){let e=document.getElementById("bundle-title");if(e){let t=e.getBoundingClientRect().top+window.scrollY+-80;window.scrollTo({top:t,behavior:"smooth"}),e.hasAttribute("tabindex")||e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0})}return}(tx===a||tx===n)&&tC()},tI=()=>
35{if(!ek&&!N&&(tl&&e2&&!ta&&!tr||!tl)){let e;return e=O?.itemavailabilityatzipcodelabel?.replace("{{label}}",O?.delivery?.toLocaleLowerCase()||"delivery")?.replace("{{EDD}}",O?.outofstock?.toLocaleLowerCase()||"out of stock").replace("{{zipcode}}",eM?.zipCode||"")||"",(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",gap:S.D3H,alignSelf:"stretch",width:"100%"},children:[(0,r.jsx)(h.Notification,{uniqueId:"bundle-actions-button-notification",icon:(0,r.jsx)(E.A,{}),message:e,severity:"alert",isRole:!1}),(0,r.jsx)(p.default,{sx:{display:"flex",alignItems:"flex-start",gap:S.D3H,alignSelf:"stretch",width:"100%"},children:(0,r.jsx)(f.Button,{variant:"secondary",sx:{width:"100%"},uniqueId:"bundle-zipCode-button",onClick:eL,children:O?.changezipcodebutton||"Change Zip Code"})})]})}return(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:S.D3H,alignSelf:"stretch",width:"100%"},children:[(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",gap:S.D3H,width:"100%"},children:[(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",gap:S.m72},children:[(0,r.jsx)(f.Button,{sx:{flex:"1 0 0"},onClick:tE,startIcon:tg?(0,r.jsx)(I.Ay,{height:S.b3d,width:S.b3d}):void 0,"aria-describedby":Q.uY,uniqueId:"AddToCart-pdp",variant:"primary",children:tx}),en&&(0,r.jsx)(x.d,{errorIconA11yAttributes:{"aria-hidden":!1,focusable:!0,"aria-label":el?.genericATCError||""},hasError:en,errorText:el?.genericATCError||"",errorTextId:"AddToCart-pdp-error"})]}),tl&&e2&&ta&&!tr&&(0,r.jsx)(f.Button,{sx:{flex:"1 0 0"},onClick:tb,"aria-label":`${O?.joincostcobutton} ${eY}`,uniqueId:"JoinCostco-pdp",variant:"secondary",children:O?.joincostcobutton})]}),(0,r.jsx)(U.r,{moduleSettings:eC,isOpen:eE,onClose:ty,onSubmit:()=>{},hidePageOne:!1})]})},tT=()=>(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:S.D3H},"data-testid":"add-to-cart-bundle",children:[t&&(0,r.jsx)(h.Notification,{ref:D,uniqueId:"add-to-cart-error",icon:(0,r.jsx)(T.A,{"aria-label":"Alert"}),message:O?.addtocarterrormsg||"",severity:"critical",isRole:!1,sx:{width:"100%"}}),(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"row",gap:S.D3H,width:"100%"},children:[N&&(0,r.jsx)(p.default,{sx:{width:"96px",height:"96px",maxWidth:"fit-content"},children:(0,r.jsx)(q.X,{ariaHidden:!1,href:eq,src:eU||"",srcFallback:O?.noimgurl||void 0,uniqueId:"parent-bundle-image",title:ez||eY||""})}),(0,r.jsxs)(p.default,{"data-testid":"add-to-cart",sx:{display:"flex",flexGrow:1,flexDirection:"column",gap:N?S.D3H:S.Mzk},children:[to&&(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"row",gap:S.iAn,alignItems:"center"},children:[(0,r.jsx)(A.A,{sx:{color:S.wcX,height:16,width:16},"data-testid":"member-only-icon"}),(0,r.jsx)(v.Text,{variant:"t5",uniqueId:"member-only-label",children:O?.memberonlylabel||""})]}),ep>0&&!ts&&ek&&(0,r.jsx)(R,{lang:e.locale,translations:O,ctaBundlePrice:ec,selectedItemsCount:ep,outOfStockItemsCount:eu}),tI()]})]})]});return(0,r.jsxs)(p.default,{sx:{display:"flex",flexDirection:"column",width:"100%",gap:S.D3H},id:"add-to-cart-bundle","data-testid":"add-to-cart-bundle",children:[(0,r.jsx)(p.default,{"aria-live":"polite","aria-atomic":"true",sx:m.A,"data-testid":"bundle-total-live-region",children:tm}),(()=>{if(ed)return(0,r.jsx)(g.Skeleton,{variant:b.z.Rectangular,height:40});let e={stickyPosition:"bottom",extraPaddingBottom:!0,hasTopButton:!0,isMobile:eR,uniqueId:"add-to-cart-bundle",zIndex:1e3,width:eR?"100vw":"100%",sx:{bottom:0,alignSelf:"center"},onScrollToTop:G.wM,topButtonAriaLabel:ey,topLabel:eb};return tt||ti?(0,r.jsxs)(r.Fragment,{children:[!tt&&tT(),(0,r.jsx)(y.n,{...e,showStickyWithTopButton:tt,children:tI()})]}):tT()})()]})}},40045:(e,t,i)=>{i.d(t,{Cy:()=>c,Lr:()=>d,Q0:()=>l,X7:()=>u,ZB:()=>p,jn:()=>o,w9:()=>s});var r=i(24880),a=i(12158),n=i(86670);let l=(0,n.Ay)("div")({display:"flex",flexDirection:"column",gap:r.Mzk}),o=(0,n.Ay)("div")({display:"flex",flexDirection:"column",gap:r.iAn,border:`1px solid ${r.XgP}`,padding:r.D3H,borderRadius:"4px"}),s=(0,n.Ay)(a.Text)({marginBottom:r.iAn}),d=(0,n.Ay)("div")({display:"flex",flexDirection:"column",gap:r.iAn}),c=(0,n.Ay)("li")({display:"flex"}),u=(0,n.Ay)("ul")({padding:0,listStyleType:"none",display:"flex",flexDirection:"column",gap:r.iAn}),p=(0,n.Ay)("div")({"#warrantyContent p":{fontSize:"14px !important",lineHeight:"21px !important",margin:"4px 0!important"},"& a":{textDecoration:"underline !important","&:hover":{color:`${r.tjF} !important`},"&:visited":{color:`${r.dBr} !important`}}})},40538:(e,t,i)=>{i.d(t,{E:()=>r,n:()=>a});let r=["AddOn","AppleCare","SquareTrade","HaulAway","ExcellencePlus"],a=50},40544:(e,t,i)=>{i.d(t,{w:()=>u});var r=i(12115),a=i(7025),n=i(98216),l=i(51551),o=i(42031),s=i(93280),d=i(60714),c=i(5514);let u=({featureFlags:e,productFlags:t,warehouseFlags:i,childItemNumber:u,destination:p,selectedWarehouse:m,pickUpCenter:h,shippingCodes:f,itemMinQuantity:g,isWarehouseUpdated:b,startDate:y,locale:x})=>{let{isEDD:v,isSiteControlledInventory:S,isLocationControlledInventory:C,isBopimProduct:E,isS
35hipToWarehouse:I,is2DayDelivery:T,isBuyable:A,isBigAndBulkyProduct:D,isVariantProduct:_,isMembershipProduct:O,isWarehouseOnly:w}=t,{inventoryV2ServiceConfig:N,pickUpServiceConfig:j,wcsInventoryServiceConfig:P,mdoLocationServiceConfig:R,scInventoryUpdateServiceConfig:k}=(0,d.h)(),[L]=(0,c.K)(),M=L?.rawBatchInfo?.find(e=>e.itemNumber===u),{inWarehouse:B,useWarehouseInventory:$}=M?.programTypes||{},z=(0,l.zc)({productFlags:t,featureFlags:e}),U=(0,n.$E)({productFlags:t,featureFlags:e,warehouseFlags:i}),q=(0,l.zc)({productFlags:t,featureFlags:e,checkVariants:!0,pickUpCenter:h}),V=!!(I&&e.isBopiwOrSTWEnabled),F=!!(E&&e.isBopimEnabled),W=(0,r.useMemo)(()=>!!(z&&m&&(U||F||V)&&(!_||!q||b)),[z,m,U,F,V,_,q,b,h]),H=(0,r.useMemo)(()=>{if(q)return{itemNumber:u,warehouseAvailability:{inWarehouse:B?.[0],useWarehouseInventory:$?.[0]}}},[B,$,q,u]),K=q&&L?.isError,{pickUpData:G,isLoading:Y,isValidating:Q,isError:Z}=(0,s.il)({childItemNumber:u,selectedWarehouse:m,isBopimProduct:E,pickUpCenter:h,shippingCodes:f,itemMinQuantity:g,locale:x,serviceConfig:j},W),J=!!((0,l.zH)({isBopimEnabled:e.isBopimEnabled,isBopimProduct:E,pickUpData:G})&&h),{mdoLocationData:X,isLoading:ee,isValidating:et,isError:ei}=(0,s.P1)({pickUpCenter:h,serviceConfig:R},J),er=A&&!O&&!w&&(S||C)||T,ea=!!(er&&S&&p.destinationCountryCode&&p.destinationPostalCode&&p.destinationState),{wcsInventoryData:en,isLoading:el,isValidating:eo,isError:es}=(0,s.tW)({childItemNumber:u,destination:p,serviceConfig:e.isSCInventoryUpdateAPIEnabled?k:P},ea,e.isWcsInventoryDetailsEnabled,e.isSCInventoryUpdateAPIEnabled),ed=en?.itemInvData?.backorderType==="1",ec=!!O||(0,o.Xx)(en?.itemInvData),eu=!!(er&&((v||C)&&f||!ec&&ed)&&p.destinationCountryCode&&p.destinationPostalCode&&p.destinationState),{inventoryV2Data:ep,isLoading:em,isValidating:eh,isError:ef}=(0,s.e9)({childItemNumber:u,destination:p,shippingCodes:f,itemMinQuantity:g,serviceConfig:N},eu,e.isInventoryV2DetailsEnabled),eg=(0,r.useMemo)(()=>{let i={availability:a.RO.UNAVAILABLE};if(O)return{availability:a.RO.INSTOCK};let r=D&&(0,o.Dj)(ep);if(!er||r)return i;if(v&&S){let i=(0,o.TO)(ep,en,t,e);if(i)return i}return!v&&S?(0,o.eu)(ep,en):ep||i},[er,v,S,en,ep]),eb=(0,r.useMemo)(()=>(0,o.ZF)(y,ep,en,v),[y,ep,en,v]),ey=(0,r.useMemo)(()=>U?Z||K?{status:a.RO.UNAVAILABLE,showTooltip:!1}:{status:(0,l.ds)(G||H,i),showTooltip:!1}:{status:a.RO.UNAVAILABLE,showTooltip:!0},[U,Z,K,G,H,i]),ex=(0,r.useMemo)(()=>({data:G||H,isLoading:Y,isValidating:Q,isError:Z||K}),[G,H,Y,Q,Z,K]),ev=(0,r.useMemo)(()=>({data:X,isLoading:ee,isValidating:et,isError:ei}),[X,ee,et,ei]),eS=(0,r.useMemo)(()=>({rawV2:{data:ep,isLoading:em,isValidating:eh,isError:ef},rawWcs:{data:en,isLoading:el,isValidating:eo,isError:es},processed:{data:eg,isLoading:em||el,isValidating:eh||eo,isError:ef||es}}),[ep,em,eh,ef,en,el,eo,es,eg]),eC=(0,r.useMemo)(()=>Y||ee||em||el,[Y,ee,em,el]);return(0,r.useMemo)(()=>({pickUp:ex,mdoLocation:ev,inventory:eS,isLoading:eC,warehousePickupStatus:ey,hasFutureStartDateWithNoInventory:eb}),[ex,ev,eS,eC,ey,eb])}},42031:(e,t,i)=>{i.d(t,{D$:()=>f,Dj:()=>c,Dp:()=>g,KC:()=>u,TO:()=>s,Xx:()=>l,ZF:()=>o,eu:()=>d});var r=i(73689),a=i(7025),n=i(98216);let l=e=>e?.isAvailable||Number(e?.inventoryflag)>0,o=(e,t,i,r)=>{if(!e||!(new Date(e)>new Date))return!1;let n=i?.itemInvData,o=!l(n),s=n?.backorderType==="1",d=t?.availability===a.RO.NOSTOCK||t?.availability===a.RO.UNAVAILABLE,c=s&&(t?.availability===a.RO.BACKORDERED||t?.availability===a.RO.PRESELL);return r?o&&d&&!c:!!n&&!!o&&!s&&(!t||d&&!c)},s=(e,t,i,r)=>{let n=t?.itemInvData,o=i.isBigAndBulkyProduct;if(e?.fulfilledBy?.toLocaleLowerCase()===a.RO.UNKNOWN.toLocaleLowerCase()&&o)return{...e,availability:a.RO.UNAVAILABLE};if([a.RO.UNAVAILABLE].includes(e?.availability)&&l(n))return{...e,availability:a.RO.INSTOCK};if(![a.RO.INSTOCK,a.RO.LOWSTOCK,a.RO.NOSTOCK,a.RO.BACKORDERED,a.RO.PRESELL,a.RO.UNKNOWN].includes(e?.availability))return null;let s=n?.backorderType==="1",d={...e};return[a.RO.UNKNOWN,a.RO.NOSTOCK].includes(e?.availability)&&o?d.availability=a.RO.NOSTOCK:l(n)?d.availability=a.RO.INSTOCK:e?.availability===a.RO.BACKORDERED&&s?d.availability=a.RO.BACKORDERED:e?.availability===a.RO.PRESELL&&s?d.availability=a.RO.PRESELL:!r?.isInventoryV2DetailsEnabled&&s?d.availability=a.RO.INSTOCK:n&&void 0===n.isAvailable?d.availability=a.RO.UNAVAILABLE:d.availability=a.RO.NOSTOCK,d},d=(e,t)=>{let i=t?.itemInvData,r=i?.backorderType==="1";return l(i)?{availability:a.RO.INSTOCK}:r&&e?e:i&&void 0===i.isAvailable?{availability:a.RO.UNAVAILABLE}:{availability:a.RO.NOSTOCK}},c=e=>!!(e&&null===e.webCatalogId&&e.availability!==a.RO.SHIPRESTRICTED),u=(e,t,i,n)=>t&&e===r.O4.CA&&!i?a.RO.UNAVAILABLE:n.availability,p={USBC:"10101",CABC:"10151"},m=(e,t)=>
35{let[i,r,a]=e.split("-");return"fr_ca"===t?`${a}/${r}/${i}`:`${r}/${a}/${i}`},h=e=>{var t;let i;return Math.max(0,Math.ceil((t=new Date().toISOString().slice(0,10),i=new Date(t),Math.floor((new Date(e).getTime()-i.getTime())/864e5)/7)))},f=({firstShipDate:e,lastShipDate:t,typeDescription:i,isPresell:r,locale:a,fulfillmentTranslations:n})=>{let l=e?new Date(e):null,o=t?new Date(t):null,s=new Date,d=new Date(s.toLocaleString("en-US",{timeZone:"America/Los_Angeles"}));if(!l||!o)return{message:null,isAddToCartDisabled:!1};let c=r?"presell":"backordered",u=`withinshipdaterange${c}`,p=`beforefirstshipdate${c}`,f=`withinshipweekrange${c}`,g=`beforefirstshipweek${c}`,b=i?.includes("Display By Days"),y=i?.includes("Display By Weeks");if((b||y)&&d>o&&d>l)return{message:null,isAddToCartDisabled:!0};if(b){let i=m(e,a),r=m(t,a),d=n[u]?.replace("{{lastShipDate}}",r),c=n[p]?.replace("{{firstShipDate}}",i).replace("{{lastShipDate}}",r);if(s>l&&s<o||e===t)return{message:d,isAddToCartDisabled:!1};if(s<l)return{message:c,isAddToCartDisabled:!1}}if(y){let i=h(t),r=h(e),a=n[f]?.replace("{{weeksUntilLastShip}}",i.toString()),d=n[g]?.replace("{{weeksFromFirstShip}}",r.toString()).replace("{{weeksUntilLastShip}}",i.toString());if(s>l&&s<o||e===t||i===r)return{message:a,isAddToCartDisabled:!1};if(s<l)return{message:d,isAddToCartDisabled:!1}}return{message:null,isAddToCartDisabled:!1}},g=({countryCode:e,productFlags:t,productData:i,translations:l,inventoryData:o,fulfillmentSettings:s,destinationState:d,warehousePickupStatus:c,selectedChildItem:u,locale:m})=>{let h,f,g,y,{isSiteControlledInventory:x,isLocationControlledInventory:v,isEddChubSmallPackOrLTL:S,isBigAndBulkyProduct:C,isDigitalDelivery:E,isShopCostcoCard:I,is2DayDelivery:T,isCostcoGroceryEligible:A,isFloral:D,isWarehouseOnly:_,isBuyable:O}=t,{deliveryStatement:w,fulfillmentPrimaryInfo:N,sanitizedDeliveryStatement:j}=i,{restrictedStates:P,maxFutureDate:R,vendorList:k,haulAwayConfig:L}=s,M=(f=p[String("CABC")])&&k&&k[f]||null,B=e===r.O4.CA;h=x||o.availability===a.RO.SHIPRESTRICTED||o.availability===a.RO.UNAVAILABLE||o.availability===a.RO.INSTOCK&&!o.itemClassification?S:S&&o.itemClassification&&["SMALLPACK","CHUBLTL"].includes(o.itemClassification)||!1;let $=o?.shipmodeDates?.[0]?.estimatedDeliveryDate,z=$&&o?.availability!==a.RO.NOSTOCK?(0,n.qk)($,m):"",U=[a.RO.NOSTOCK,a.RO.SHIPRESTRICTED,a.RO.UNAVAILABLE,a.RO.NOTSOLD,a.RO.UNKNOWN].includes(o?.availability),q=o?.availability===a.RO.NOSTOCK?l?.unavailable:l?.estimated,V=o?.shipmodeDates?.[0]?.status==="200 OK",F=o?.availableForSale===!0,W=!!(V&&$&&(g=new Date($),y=new Date,(g.getTime()-y.getTime())/864e5<=R));if(!O||_||!h&&!M?.length)return;let{estimatedDeliveryText:H,estimatedDeliveryTime:K,primaryInfoText:G}=o?.fulfilledBy===a.RO.UNKNOWN&&F&&null===$?{estimatedDeliveryText:"",estimatedDeliveryTime:"",primaryInfoText:""}:z&&W?{estimatedDeliveryText:S?l?.estimated||"":l?.earliest||"",estimatedDeliveryTime:z,primaryInfoText:""}:S&&!N?.length&&o?.availability===a.RO.INSTOCK?{estimatedDeliveryText:q||"",estimatedDeliveryTime:l?.shippingdefaultdeliverydays||"",primaryInfoText:""}:C&&F&&null===$&&o?.availability===a.RO.INSTOCK?{estimatedDeliveryText:P.includes(d)&&l?.restrictedstateseddtext||"",estimatedDeliveryTime:P.includes(d)&&l?.additionalbusinessdays||"",primaryInfoText:P.includes(d)?l?.deliverytransitmessagetext||"":l.deliveryavailableinhousemessage||""}:{estimatedDeliveryText:"",estimatedDeliveryTime:"",primaryInfoText:""};if(D)return{EDD:U?l?.unavailable||"":H||"",fulfillmentStatus:U?a.RO.UNAVAILABLE:o?.availability,isAvailable:!U,label:l?.delivery||"",timeframe:K||"",id:a.Oi.SHIPPING};if(E||I){let e=o?.availability===a.RO.UNAVAILABLE,t=o?.availability===a.RO.NOSTOCK,i=e||t,r=i?{}:{secondaryInfo:N.map(e=>({text:e,isHtmlString:!0})),tertiaryInfo:j?(0,n.PB)({rawData:j,shippingInfo:l?.shippingandhandlinginfo||"",deliveryStatement:w||""})??"":""};return{EDD:(e?l?.unavailable:t?l?.outofstock:l?.estimated)||"",fulfillmentStatus:e?a.RO.UNAVAILABLE:t?a.RO.NOSTOCK:o?.availability,isAvailable:!i,label:l?.emaildeliverylabel||"",timeframe:"",id:a.Oi.DIGITAL_DELIVERY,...r}}if(T){let e=!(U||B&&!A),t=U&&o?.availability===a.RO.NOSTOCK?l?.outofstock:l?.unavailable,i=(0,n.D4)(u,l),r=e?{primaryInfo:[w?{shipType:l?.two
35daydeliverysurchargelabel,shipCost:w,tooltip:B?"":l?.twodaydeliveryshippingpricetooltip,tooltipAriaLabel:B?"":l?.twodaydeliverytooltiparialabel}:{}],secondaryInfo:[{text:l?.twodaydeliverysecondarytext||""},...i&&[{text:i}]||[]],tertiaryInfo:B&&l?.twodaydeliverytertiarytext||""}:{};return{EDD:e?q||"":t||"",fulfillmentStatus:e?o?.availability:U&&o?.availability===a.RO.NOSTOCK?a.RO.NOSTOCK:a.RO.UNAVAILABLE,isAvailable:e,label:l?.twodaydeliverylabel||"",timeframe:V?z:"",id:a.Oi.TWO_DAY_DELIVERY,...r}}if(h){let e=o?.availability===a.RO.NOSTOCK?l?.outofstock:l?.unavailable,r=U?{}:b(!1,i,t,u,o,l,K,c,G,d,L);return{EDD:U?e||"":H||"",fulfillmentStatus:U?o?.availability===a.RO.NOSTOCK?a.RO.NOSTOCK:a.RO.UNAVAILABLE:o?.availability,isAvailable:!U,label:l?.delivery||"",timeframe:K||"",id:a.Oi.SHIPPING,...r}}if(v||x){let e=o?.availability===a.RO.NOSTOCK?l?.outofstock:l?.unavailable,r=U?{}:b(!0,i,t,u,o,l,K,c,G,d,L);return{EDD:U?e||"":H||"",fulfillmentStatus:U?o?.availability===a.RO.NOSTOCK?a.RO.NOSTOCK:a.RO.UNAVAILABLE:o?.availability,isAvailable:!U,label:l?.delivery||"",timeframe:K||"",id:a.Oi.DELIVERY,...r}}},b=(e,t,i,r,l,o,s,d,c,u,p)=>{let m=[],h="",{fulfillmentPrimaryInfo:f,sanitizedDeliveryStatement:g}=t,{isEDD:b,isEddChubSmallPackOrLTL:x,isSiteControlledInventory:v,isBigAndBulkyProduct:S,isEDDChubLTL:C,isLocationControlledInventory:E}=i,I=(0,n.D4)(r,o),T=l?.availability===a.RO.INSTOCK||l?.availability===a.RO.LOWSTOCK,A=null!==l&&![a.RO.UNAVAILABLE,a.RO.NOSTOCK,a.RO.SHIPRESTRICTED].includes(l?.availability)&&g,D=s&&s!==o?.additionalbusinessdays;if(A){let e=g;g&&g.aux1&&(e={...g,aux1:y(r,p,o,g.aux1,u)}),h=(0,n.PB)({rawData:e,shippingInfo:o?.shippingandhandlinginfo||""})||""}return(b?!s&&T&&x:!!(T&&(v||E)))&&f?.length?f.forEach(e=>{m.push({text:e,isHtmlString:!0})}):T&&D&&C?m.push({tooltip:!!(o?.defaultmessageforchubltl&&o?.defaultmessageforchubltltooltip),textWithTooltip:`${o?.defaultmessageforchubltl}<Tooltip content="${o?.defaultmessageforchubltltooltip}"></Tooltip>`}):T&&D&&S?m.push({tooltip:!!(o?.defaultprimaryinfo&&o?.defaultprimaryinfotooltip),textWithTooltip:`${o?.defaultprimaryinfo}<Tooltip content="${o?.defaultprimaryinfotooltip}"></Tooltip>`}):e&&l?.availability===a.RO.UNAVAILABLE&&d===a.RO.INSTOCK?m.push({text:o?.deliveryunavailableprimaryinfo}):m.push({text:c}),I&&m.push({text:I}),{primaryInfo:[],secondaryInfo:m,tertiaryInfo:h}},y=(e,t,i,r,a)=>{let n=!e||!e?.as400CatCode||!e?.as400DeptNumber,l=!(t?.categoryCodes?.length>0)||!(t?.departmentNumbers?.length>0)||!(t?.stateCode?.length>0);if(n||!r||l)return r;if(t.categoryCodes.map(t=>e?.as400CatCode?.startsWith(t)).includes(!0)&&e.as400DeptNumber&&t.departmentNumbers.includes(e.as400DeptNumber)&&i.californiamattressdisclaimer&&i.californiamattressdisclaimerregex){let e=new RegExp(i.californiamattressdisclaimerregex);r.includes(i.californiamattressdisclaimer)&&!t.stateCode.includes(a)&&(r=r.replace(e,""))}return r}},42347:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(95155),a=i(12158),n=i(19216),l=i(96013),o=i(67666),s=i(24880);let d=e=>{let{text:t,tooltipContent:i,tooltipId:d}=e;return(0,r.jsx)(o.default,{sx:{display:"flex",alignItems:"center"},children:(0,r.jsxs)(a.Text,{variant:"t6",color:"default",uniqueId:`text-with-tooltip-${d}`,children:[t,(0,r.jsx)(n.m,{buttonAriaLabel:"tooltip",buttonContent:(0,r.jsx)(l.A,{"data-testid":"info-icon",width:"18px",height:"18px"}),buttonStyles:{color:s.hGW,width:"18px",height:"18px",position:"absolute",marginLeft:s.m72},sx:{zIndex:1e3},content:i,position:"bottom-end",tooltipId:d,uniqueId:d,hasArrow:!0})]})})}},42446:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(95155),a=i(12158),n=i(24880),l=i(32722),o=i(27966);let s=({title:e,subTitle:t})=>{let{cartItemCount:i}=(0,l.B)(),s=t.replace("{{count}}",`${i}`);return(0,r.jsxs)(o.default,{"data-testid":"add-to-cart-subtitle",children:[(0,r.jsx)(a.Text,{id:"dialog-title",bold:!0,component:"h2",sx:{color:n.JBU},uniqueId:"add-to-cart-drawer-title",variant:"t4",children:e}),(0,r.jsx)(a.Text,{color:"light",component:"span",uniqueId:"add-to-cart-drawer-sub-title",variant:"t6",children:s})]})}},42800:(e,t,i)=>{i.d(t,{$g:()=>r,H9:()=>l,aE:()=>n,n7:()=>a});let r=(e,t)=>{if(!e||!t)return{decimalValue:"",formattedPrice:"",wholeValue:""};let i=new Intl.NumberFormat(e,{maximumFractionDigits:2,minimumFractionDigits:2,style:"decimal"}).format(+t),[r="",a=""]="fr-ca"===e?i.split(","):i.split(".");return{decimalValue:a,formattedPrice:i,wholeValue:r}},a=e=>e.replace(/\.00$/,""),n=e=>e.replace(/,/g,""),l=e=>e.replace(/\s/g,"")},42841:(e,t,i)=>{i.d(t,{default:()=>ti});var r,a,n=i(95155),l=i(62526),o=i(82993),s=i(23783),d=i(24880),c=i(27966),u=i(12158),p=i(79176),m=i(43922),h=i(12129),f=i(92533),g=i(28565),b=i(70722),y=i(36493),x=i(86670),v=i(53296);let S=(0,x.Ay)(v.A)(()=>({height:"48px",padding:`${d.iAn} ${d.D3H} ${d.iAn} 0`,width:"50%"})),C=(0,x.Ay)(v.A,{shouldForwardProp:()=>!0})(({isBDSite:e=!1})=>({borderBottom:`2px solid ${d.XgP}`,height:"48px",padding:`${e?0:d.Mzk} ${d.D3H} ${d.iAn} 0`,verticalAlign:"center",width:"50%",fontSize:d.MkR,lineHeight:d.xUz})),E=(0,x.Ay)(u.Text)(()=>({lineHeight:d.MlV,maxWidth:"211ch",overflowWrap:"break-word"})),I={marginLeft:0,marginRight:0};var T=i(19359);let A=({heading:e,uniqueId:t})=>(0,n.jsx)(u.Text,{sx:{margin:0,padding:`${d.Mzk} 0px 0px 0px`,fontSize:d.tGh,lineHeight:d.xUz},bold:!0,component:"h3",uniqueId:`drugFacts_section_${t}`,variant:"t5",children:e}),D=({section:e,uniqueId:t})=>{let i=typeof e[0];return(0,n.jsx)(p.B,{sx:{margin:0,..."string"===i?{paddingInlineStart:"20px"}:{}},uniqueId:`drugFacts_section_${t}`,variant:"SimpleList",children:e.map((e,i)=>{if("object"==typeof e){let{description:r,list:a}=e;return(0,n.jsxs)(m.c,{sx:{fontSize:d.tGh},uniqueId:`drugFacts_section_${t}_${i}`,children:[r&&(0,n.jsx)(u.Text,{sx:{paddingTop:d.Mzk},uniqueId:`drugFacts_subsection_${t}_${i}`,variant:"t6",children:r}),a&&a?.length>0&&(0,n.jsx)(p.B,{sx:{paddingInlineStart:"20px"},uniqueId:`drugFacts_subsection_${t}_${i}`,variant:"SimpleList",children:a.map((e,r)=>e.split("•").map(e=>e.trim()).map((e,a)=>(0,n.jsx)(m.c,{sx:{listStyleType:"disc"},uniqueId:`drugFacts_subsection_${t}_${i}-${r}-${a}`,children:e},`ProductAccordiongListItemSubSection-${r}-${a}`)))})]},`ProductAccordiongListItem-${i}`)}return"string"==typeof e?(0,n.jsx)(m.c,{sx:{fontSize:d.tGh,listStyleType:"disc"},uniqueId:`drugFacts_section_${t}_${i}`,children:e.trim()},`ProductAccordiongListItem-${i}`):null})})},_=({section:e,uniqueId:t})=>(0,n.jsx)(u.Text,{sx:{fontSize:d.tGh,maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:`drugFacts_content_${t}`,children:e}),O=({heading:e,section:t,uniqueId:i})=>{let r=i?.replace(/\s+/g,"-");return(0,n.jsxs)(c.default,{sx:{lineHeight:d.xUz},children:[e&&(0,n.jsx)(A,{heading:e,uniqueId:r}),Array.isArray(t)&&(0,n.jsx)(D,{section:t,uniqueId:r}),"string"==typeof t&&(0,n.jsx)(_,{section:t,uniqueId:r})]})};var w=i(84102),N=i(83637);(0,x.Ay)(v.A,{shouldForwardProp:()=>!0})(e=>({borderBottom:"head"===e.type?`2px solid ${d.XgP}`:`1px solid ${d.XgP}`,height:"48px",padding:`${d.iAn} 0 ${d.m72} 0`,lineHeight:"1.5"}));let j={margin:"0px",padding:`${d.pMV} 0 ${d.i_v}`},P={borderBottom:`1px solid ${d.XgP}`,paddingBottom:d.D3H},R={paddingTop:`${d.m72}`,fontSize:d.tGh,lineHeight:"1.5"},k={borderCollapse:"separate",borderSpacing:"0px",width:"100%"};d.yF6;var L=i(12115);let M=({label:e,value:t,element:i,uniqueLabel:r,uniqueId:a})=>(0,n.jsx)(c.default,{children:(0,n.jsxs)(u.Text,{bold:!0,component:i,sx:{marginRight:d.m72},uniqueId:`${r}-${a}-label`,children:[e,": ",(0,n.jsx)(u.Text,{component:"span",sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:`${r}-${a}-value`,children:t})]})});var B=i(60931),$=i.n(B),z=i(52378),U=i(89118),q=i(24819);let V=(0,q.A)("div")({fontSize:d.tGh,fontWeight:d.awq,lineHeight:d.MlV,a:{color:"#005DAB"},"img, video, table":{maxWidth:"100%"}});var F=i(7457),W=i(67666);let H=(0,q.A)(W.default)(()=>({display:"flex",justifyContent:"center",paddingTop:d.Mzk,marginTop:`-${d.Mzk}`,position:"relative",zIndex:1,"&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 25%)",zIndex:-1}}));function K(e,t){let i=e.current?.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), details, [tabindex]:not
35([tabindex="-1"])');return i?Array.from(i).filter(i=>{let{top:r=0}=function(e,t){if(!e||!t)return{};let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:i.top-r.top,left:i.left-r.left}}(i,e.current);return r>=t}):[]}var G=i(70422);let Y=(0,L.createContext)(void 0),Q=Y.Provider,Z=({children:e,isActivated:t,title:i,maxHeight:r=1200,shouldScrollOnViewMore:a=!0,scrollOffset:l=200})=>{let[o,s]=(0,L.useState)(!1),[d,c]=(0,L.useState)(!1),u=(0,L.useRef)(null),p=(0,L.useRef)(null),m=(0,L.useRef)(null),{trackEvent:h}=(0,G.z1)(),f=(0,L.useCallback)(()=>{if(!u.current)return;let e=u.current.offsetHeight;c(t&&!o&&e>r)},[t,o,r]);return(0,L.useEffect)(()=>{let[e]=K(p,r);if(!u.current)return;o&&e?.focus({preventScroll:!0});let t=new ResizeObserver(()=>{let e;f(),(e=K(p,r)).length&&e.forEach(e=>{o?(e.removeAttribute("aria-hidden"),e.tabIndex=0):(e.setAttribute("aria-hidden","true"),e.tabIndex=-1)})});return t.observe(u.current),()=>t.disconnect()},[f]),(0,L.useEffect)(()=>{if(!t){s(!1),c(!1);return}f()},[t,o,r,f]),(0,n.jsxs)(Q,{value:{isExpanded:o},children:[(0,n.jsx)("div",{ref:p,style:{maxHeight:o?"none":`${r}px`,overflow:o?"visible":"hidden"},children:(0,n.jsx)("div",{ref:u,children:e})}),d&&(0,n.jsx)(H,{ref:m,children:(0,n.jsx)(F.Button,{onClick:()=>{if(h({component:{identifier:"Product Detail | Product Details | View More",type:"ui"},doNotTrack:!1,trackType:"pdp-accordion"}),s(!0),c(!1),m.current&&a){let e=m.current.getBoundingClientRect().top+window.scrollY;window.scrollTo({behavior:"smooth",top:e-l})}},variant:"secondary",uniqueId:"view-more-title",children:i})})]})};var J=i(50197),X=i(92475),ee=i(20681);let et=(0,L.memo)((0,L.forwardRef)(({html:e},t)=>(0,n.jsx)(V,{dangerouslySetInnerHTML:{__html:e},id:"product-details-summary",ref:t})));et.displayName="DescriptionContainer";var ei=i(31530),er=i(42138),ea=i(71706),en=i(8323),el=i(39007),eo=i(60714);let es=(0,x.Ay)("div")({a:{color:"#005DAB"},lineHeight:"1.7"});var ed=i(2377),ec=i(60248);let eu=(0,x.Ay)(f.A,{shouldForwardProp:()=>!0})(({isBDSite:e})=>({borderBottom:`1px solid ${d.XgP}`,borderTop:e?"":`1px solid ${d.XgP}`}));var ep=i(45145),em=i(68736),eh=i(83515),ef=i(55816),eg=i(25137);let eb=(0,q.A)("div")({display:"flex",flexDirection:"column",gap:d.iAn}),ey=(0,q.A)("div")({display:"flex",alignItems:"center",gap:d.m72}),ex=(0,q.A)("a")({textDecoration:"none","&:hover":{textDecoration:"underline",color:"inherit"},width:"fit-content"}),ev=(0,q.A)("div")({width:"fit-content"}),eS=(0,q.A)("a")({textDecorationColor:d.S6v,width:"fit-content"}),eC=({assetName:e,translations:t,href:i,locale:r})=>{let{internalDomains:a}=(0,X.N)(),[l,o]=(0,L.useState)(!1);return t&&i&&e?(0,n.jsxs)(ev,{children:[(0,n.jsx)(eS,{href:i,onClick:e=>(0,ee.aw)({href:i,setOpen:o,internalDomains:a,event:e,locale:r}),onMouseDown:e=>(0,ee.sm)({event:e,href:i,internalDomains:a,locale:r,setOpen:o}),children:(0,n.jsx)(u.Text,{variant:"l1",sx:{color:`${d.S6v} !important`,width:"fit-content"},uniqueId:`manual-guide-${i}`,children:e})}),(0,n.jsx)(z.A,{href:i,isOpen:l,onCloseHandler:()=>o(!1),setOpen:o,translations:t})]}):null};var eE=i(65596),eI=((r={}).MOSAIC="syndigo-mosaic",r.HOTSPOT="syndigo-hotspots",r.POWERPAGE="syndigo-powerpage",r),eT=((a={}).RIBBON="ribbon",a.MODAL="modal",a),eA=i(58468);let eD={USBC:{"en-us":"08b9b8e2-abe6-42d5-af6d-995ce9ff38e5","en-ca":"","fr-ca":""},USBD:{"en-us":"99aad5e1-c6ff-4dbf-a1b7-a567854f1fc4","en-ca":"","fr-ca":""},CABC:{"en-us":"","en-ca":"2c8a7f73-fb04-4144-8886-5649472b75bd","fr-ca":"08d6877d-2959-40c7-9124-4695664bb192"}},e_={desktop:{displayMode:eT.RIBBON,hotspot:'[data-testid="product-hero"] [data-testid="media-container"]',mosaic:'[data-testid="product-hero"] [data-testid="media-container"]',powerpage:"#SP_ProductImage"},mobile:{displayMode:eT.MODAL,hotspot:'[data-testid="product-hero-carousel"] [data-testid="media-container"]',mosaic:'[data-testid="product-hero-carousel"] [data-testid="image-carousel"]:has([data-testid="media-container"])',powerpage:"#SP_ProductImage"}},eO=`
36  /* Keeps header from being overlayed by Syndigo */
37  #header-content {
38    z-index: 4;
39    position: relative;
40  }
41
42  #product-data-card-left-column {
43    z-index: 2;
44  }
45  
46  ${eI.MOSAIC} {
47    position: absolute;
48    top: 0;
49    left: 0;
50    z-index: 2;
51  }
52
53  ${eI.MOSAIC}[open] {
54    z-index: ${String(3)} !important;
55  }
56
57  /* Hide sticky carousel-level mosaic when a hotspot is in the active slide */
58  [data-testid="product-hero-carousel"] [data-testid="image-carousel"]:has([data-testid="media-container"]:not([aria-hidden="true"]) ~ ${eI.HOTSPOT}:not([style*="display: none"])) ~ ${eI.MOSAIC} {
59    display: none !important;
60  }
61
62  /* Hide mosaics from media tiles that already have a hostspot applied */
63  [data-testid="product-hero"] div:has([data-testid="media-container"] ~ ${eI.HOTSPOT}:not([style*="display: none"])) ${eI.MOSAIC} {
64    display: none !important;
65  }
66`,ew=({locale:e,site:t,productId:i,itemId:r,hideDetails:a=!1})=>{let l=eD[t][e],o=(0,L.useRef)(""),s=(0,L.useRef)(null),d=(0,L.useRef)(null);return(0,L.useEffect)(()=>
66{d.current=new MutationObserver(()=>{let e=window?.SYNDI?.getFramework?.();e?.pageid&&(function(e,t=!1){Object.values(e_).forEach(({hotspot:i,mosaic:r,powerpage:a,displayMode:n})=>{let l;e&&((l=document.querySelector(i))&&eN(l,e,eI.HOTSPOT)?.addEventListener("content",e=>{let t=e.target;t?.hasContent||(t.style.display="none")}),document.querySelectorAll(r).forEach(t=>{if(t){let i=eN(t,e,eI.MOSAIC,n);i?.addEventListener("click",({target:e})=>{document.querySelectorAll(eI.MOSAIC).forEach(t=>{e!==t&&t.removeAttribute("open")})})}}),(()=>{let i=document.querySelector(a);if(i){if(t)return i.parentElement?.querySelector(eI.POWERPAGE)?.remove();eN(i,e,eI.POWERPAGE)}})())}),document.getElementById("syndi_powerpage")?.remove()}(e.pageid,a),s.current&&(clearInterval(s.current),s.current=null),s.current=setInterval(()=>{var t;o.current!==e.pageid&&((t=e.pageid)&&document.querySelectorAll(`${eI.HOTSPOT}, ${eI.MOSAIC}, ${eI.POWERPAGE}`).forEach(e=>{e?.attributes.getNamedItem("pageid")?.value!==t&&e?.setAttribute("pageid",t)}),o.current=e.pageid)},100))});let e="costco-syndigo-styles";return document.getElementById(e)||(0,eA.MZ)(eO,e),d.current?.observe(document.body,{childList:!0,subtree:!0}),()=>{d.current?.disconnect()}},[a]),(0,L.useEffect)(()=>{window.productIdentifiers={productId:i,itemId:r},s.current&&(clearInterval(s.current),s.current=null),o.current=""},[l,r,i]),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(eE.default,{strategy:"lazyOnload",src:`https://content.syndigo.com/site/${l}/tag.js?cv=${Math.floor(Date.now()/864e5)}`})})};function eN(e,t,i,r){if(e.parentNode?.querySelector(i))return;let a=document.createElement(i);return a.setAttribute("pageid",t),r&&a.setAttribute("displaymode",r),e.after(a),a}var ej=i(53236);let eP=['[data-testid="product-hero"] > div','[data-testid="product-hero-carousel"]'],eR="productImageContainer",ek=e=>`
67  #${eR} {
68    padding: ${d.D3H} 0;
69  }
70
71  #${eR} .ccs-cc-ficons-items {
72    margin-bottom: 0 !important;
73  }
74
75  .ccs-hotspots-tooltip .qtip-content h4 {
76    text-align: left !important;
77    font-size: 1.125rem !important;
78    line-height: 130%;
79  }
80
81  ${e?`#product-details-summary #inline_showcase {
82    display: none !important;
83  }`:`#product-details-summary #inline_showcase {
84    overflow-x: clip; /* Prevents horizontal scroll */
85    z-index: 0 !important;
86    position: initial !important;
87  }`}
88`,eL=e=>{let{openedAccordions:t}=(0,ef.useAccordionContext)(),{isMobile:i}=(0,ej.G)(),{itemId:r,hideDetails:a=!1}=e;return(0,L.useEffect)(()=>{let t="costco-1ws-styles";(0,eA.MZ)(ek(a),t);let i=new MutationObserver(eB),r=new MutationObserver(()=>{document.querySelectorAll(eP.join(",")).length>0&&(eM(e,a),r.disconnect())}),n=[i,r];return n.forEach(e=>{e.observe(document.body,{childList:!0,subtree:!0})}),()=>{document.getElementById(t)?.remove(),n.forEach(e=>{e.disconnect})}},[]),(0,L.useEffect)(()=>{(0,eA.MZ)(ek(a),"costco-1ws-styles"),eM(e,a)},[i,t,r,a]),null};function eM(e,t){let i=document.querySelector("#product-details-summary"),r=document.querySelector("#product-details-summary #inline_showcase");if(t)r&&r.remove();else if(i&&!r){let e=document.createElement("div");e.className="inline_showcase",e.id="inline_showcase",i.appendChild(e)}let a=function({cpn:e="",locale:t="",mfName:i="",mfPartNumber:r="",site:a="",upc:n=""}){let l=new URLSearchParams({cpn:e,lang:t,market:"USBC"===a||"USBD"===a?"US":"CA",mf:i,pn:r,upcean:n,host:location.host});return new URL(`https://ws.cs.1worldsync.com/6f450ea2/script/abeeb3dac2?${l}`).toString()}(e),n=document.querySelector(`script[src="${a}"]`),l=document.createElement("script");n&&n.remove(),document.querySelectorAll(".ccs-cc-ficons, #ccs-feature-icons").forEach(e=>e.remove()),function(){let e=Array.from(document.querySelectorAll(eP.join(","))).find(e=>e.checkVisibility()),t=!!e?.parentNode&&Array.from(e.parentNode.children).some(e=>e.id===eR);if(!e||t)return;let i=document.createElement("div");i.setAttribute("id",eR),e.after(i)}(),l.src=a,document.head.append(l)}function eB(e){if(!e.some(({target:e})=>e.matches("#ccs-feature-icons")))return;let t=document.querySelectorAll(".ccs-cc-ficons");t?.forEach((e,t)=>{t>0&&e.remove()})}var e$=i(85180),ez=i(38734);let eU=['[data-testid="product-hero"] > div','[data-testid="product-hero-carousel"]'],eq="image-gallery",eV=e=>`
89  .${eq} #flix_hotspots.flix_hotspotV2, .share-bubble {
90    z-index: 2 !important
91  }
92   
93  #product-details-summary #flix-minisite,
94  #product-details-summary #flix-inpage,
95  #product-details-summary #flix-container {
96    display: ${e?"none":"block"} !important;
97  }
98`,eF=e=>{let t,{openedAccordions:i}=(0,J.Dr)(),{isExpanded:r}=void 0===(t=(0,L.useContext)(Y))?{isExpanded:!1}
98:t,[a,n]=(0,L.useState)(!1),{isMobile:l}=(0,ej.G)(),[o]=(0,ez.N)(),s=o?.value||e.itemId,{hideDetails:d=!1}=e;return(0,L.useEffect)(()=>{let t="costco-flixmedia-styles";(0,eA.MZ)(eV(d),t);let i=new MutationObserver(()=>{document.querySelectorAll(eU.join(",")).length>0&&(eW(e,d),i.disconnect(),n(!0))}),r=[i];return r.forEach(e=>{e.observe(document.body,{childList:!0,subtree:!0})}),()=>{document.getElementById(t)?.remove(),r.forEach(e=>{e.disconnect()})}},[]),(0,L.useEffect)(()=>{a&&((0,eA.MZ)(eV(d),"costco-flixmedia-styles"),eW(e,d))},[i,l,s,d]),(0,L.useEffect)(()=>{!a||document.getElementById("flix-container")||document.querySelector("#product-details-summary #flix-inpage")||document.querySelector("#product-details-summary #flix-minisite")||eW(e,d)},[r]),null};function eW(e,t){let{longDescription:i=""}=e,r=function(e){let t=$()(e).querySelector("script[data-flix-inpage]");if(!t)return null;let i=document.createElement("script");return Object.entries(t.attributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.setAttribute("src",`//${e$.VG}`),i.setAttribute("defer",""),i}(String(i));if(!r){var a;let e=document.getElementById("flix-container");if(!e)return;if(e.hasAttribute("alt"))return void eH();e.querySelectorAll(`script[src*="${e$.oj}"]`).forEach(e=>e.remove());let t=(a=String(i),$()(a).querySelectorAll(`script[src*="${e$.oj}"]`).filter(e=>!!e.getAttribute("src")).map(e=>{let t=document.createElement("script");return Object.entries(e.attributes).forEach(([e,i])=>{t.setAttribute(e,i)}),t}));return void(0===t.length||(eH(),t.forEach(t=>e.appendChild(t))))}let n=document.querySelector("#product-details-summary"),l=document.querySelector("#product-details-summary #flix-minisite"),o=document.querySelector("#product-details-summary #flix-inpage"),s=document.getElementById("flix-container");if(t)l&&l.remove(),o&&o.remove(),s&&s.remove();else if(n){if(!l){let e=document.createElement("div");e.id="flix-minisite",n.appendChild(e)}if(!o){let e=document.createElement("div");e.id="flix-inpage",n.appendChild(e)}}if(eH(),!r)return;let d=[r.getAttribute("data-flix-button"),r.getAttribute("data-flix-inpage")].map(e=>{let t=document.getElementById(e||"");return t?{id:e,parent:t.parentElement,nextSibling:t.nextSibling}:null}).filter(Boolean);window.flixJsCallbacks&&"function"==typeof window.flixJsCallbacks.reset&&window.flixJsCallbacks.reset(),d.forEach(({id:e,parent:t,nextSibling:i})=>{let r=document.createElement("div");r.id=e,i&&i.parentElement===t?t.insertBefore(r,i):t.appendChild(r)}),document.head?.append(r)}function eH(){let e=Array.from(document.querySelectorAll(eU.join(","))).find(e=>e.checkVisibility());e&&e.classList.add(eq)}var eK=i(18961),eG=i.n(eK);let eY=(0,q.A)("p")({fontSize:d.tGh,fontWeight:d.Pqj,lineHeight:d.MlV}),eQ="ItemNumber",eZ=!1,eJ=e=>{let{itemId:t,locale:i,salsifyContentExists:r,setSalsifyContentExists:a,clientId:l,vendorDisclaimer:o}=e,s=i.split("-").map((e,t)=>0===t?e.toLowerCase():e.toUpperCase()).join("-"),[d,c]=(0,L.useState)(eZ),u=(0,L.useRef)(null),p=(0,L.useRef)(""),m=t.toString();return(0,L.useEffect)(()=>{if(!d&&l)try{eG().init({clientId:l,tracking:!1,languageCode:s,enhancedContent:{idType:eQ}}),c(!0),eZ=!0}catch(e){console.error("Error initializing Salsify SDK:",e)}},[l,s,d]),(0,L.useEffect)(()=>{let e=!1;return(async()=>{if(d&&u.current&&m!==p.current){p.current=m;try{eG().events.navigation({productIdType:eQ,productId:m});let t=await eG().enhancedContent.exists(m);if(e)return;t?(u.current&&(u.current.innerHTML=""),eG().enhancedContent.renderIframe(u.current,m),a(!0)):(u.current&&(u.current.innerHTML=""),a(!1))}catch(e){console.error("Error checking or rendering Salsify enhanced content:",e),p.current=""}}})(),()=>{e=!0}},[d,m,a]),(0,n.jsxs)(n.Fragment,{children:[o&&r&&(0,n.jsx)(eY,{children:o}),(0,n.jsx)("div",{id:"salsify-enhanced-content-container",ref:u,style:{display:r?"block":"none"}})]})},eX=({vendors:e=[],locale:t,productId:i,itemId:r,productData:a,site:l,salsifyClientId:o,isSalsifyEnabledForProduct:s=!1,salsifyContentExists:d=!1,setSalsifyContentExists:c=()=>{},vendorDisclaimer:u})=>{if(0===e.length||!i||!r||!a)return null;let{brand:p,model:m,upc:h}=e0(a,r),f=String(a?.descriptions?.[0]?.object.longDescription),g=s&&d;return(0,n.jsxs)(n.Fragment,{children:[s?(0,n.jsx)(eJ,{locale:t,itemId:r,salsifyContentExists:d,setSalsifyContentExists:c,clientId:o,...u&&{vendorDisclaimer:u}}):null,e.includes(eA.ay.Syndigo)?(0,n.jsx)(ew,{locale:t,productId:i,itemId:r,site:l,hideDetails:g}):null,e.includes(eA.ay.OneWorldSync)?(0,n.jsx)(eL,{locale:t,cpn:i,mfName:p,mfPartNumber:m,site:l,upc:h,itemId:r,hideDetails:g}):null,e.includes(eA.ay.FlixMedia)?(0,n.jsx)(eF,{longDescription:f,itemId:r,hideDetails:g}):null]})},e0=(e,t)=>{let i=e?.childCatalogData?.find(({id:e})=>
98t===e),r=i?.descriptions?.[0]?.object.mfName||"";return{brand:r,model:i?.descriptions?.[0]?.object.mfPartNumber||"",upc:i?.upc||e?.upc||""}};var e1=i(21016),e2=i(44855),e5=i(68785),e9=i(85705),e7=i(56850);let e4=async(e,t,i,r)=>{try{let a=await (0,e5.W)(e,t);return{manualsAndGuidesData:new e9.A({...t,site:String("CABC").toUpperCase(),fields:e7.gO,agent:i}).linkCustomFields(a?.manualsAndGuidesInfo,r).filter(e=>!/nutrition/.test(e?.attributes?.name?.toLowerCase())).filter(e=>e?.attachments?.data?.some(e=>e?.attributes?.extension==="pdf")).map(e=>{let t=e?.attributes?.name||"";return e&&"AssetDescription"in e?.customFields&&"string"==typeof e?.customFields?.AssetDescription&&(t=e.customFields.AssetDescription?.split("_")[0]||""),{...e,customFields:{...e.customFields,AssetDescription:t}}})||[]}}catch(e){return console.error("[PDP][Services][Error] - ",e),{manualsAndGuidesData:[]}}},e3=(0,i(9527).y)();var e6=i(7569);let e8={[U.do.DRUG_FACTS]:({nutritionInfoObj:e,translations:t})=>{let i,{servingDescription:r,activeIngredient:a,uses:l,warnings:o,directions:s,userGroup:c,otherInformation:p,inactiveIngredients:m,questions:x}=e?.drugFacts?.[0]||{},v=(0,T.G8)(),{activeingredient:C,purpose:E,uses:D,warnings:_,directions:w,otherinformation:N,inactiveingredients:j,questionsorcomments:P,disclaimer:R,disclaimercontent:k,allergensandwarnings:L,freefrom:M}=t||{},{allergenInfo:B}=e||{},{freeFrom:$}=B||{};return $&&$?.length&&(i=`${M}: ${$.join(", ")}`),(0,n.jsxs)(h.default,{container:v,spacing:{xs:0,sm:0,md:v?d.i_v:0},sx:I,children:[(0,n.jsx)(h.default,{size:{xs:12,md:6},sx:I,children:a&&a.length>0&&(0,n.jsxs)(f.A,{children:[(0,n.jsx)(g.A,{children:(0,n.jsxs)(b.A,{children:[(0,n.jsx)(S,{children:(0,n.jsx)(u.Text,{bold:!0,component:"span",variant:"t6",sx:{fontSize:d.MkR,lineHeight:d.xUz},uniqueId:"active-ingredient",children:`${C}${r?` (${r})`:""}`})}),(0,n.jsx)(S,{children:(0,n.jsx)(u.Text,{bold:!0,component:"span",variant:"t6",sx:{fontSize:d.MkR},uniqueId:"purpose",children:E||"Purpose"})})]})}),(0,n.jsx)(y.A,{children:a?.map((e,t)=>(0,n.jsxs)(b.A,{children:[(0,n.jsx)(S,{children:(0,n.jsx)(u.Text,{bold:!0,component:"span",variant:"t6",sx:{fontSize:d.tGh,padding:d.D3H,lineHeight:d.Wu6},uniqueId:`active-ingredient-${t}`,children:`${e.ingredient||""} ${e.value||""} ${e.uom||""}`})}),(0,n.jsx)(S,{children:(0,n.jsx)(u.Text,{component:"span",variant:"t6",sx:{fontSize:d.tGh,padding:d.D3H,lineHeight:d.xUz},uniqueId:`active-ingredient-purpose-${t}`,children:e.purpose||""})})]},`ActiveIngredient-${t}`))})]})}),(0,n.jsxs)(h.default,{size:{xs:12,md:6},sx:I,children:[l&&l.length>0&&(0,n.jsx)(O,{heading:D||"Uses",section:l,uniqueId:D||"Uses"}),o&&o.length>0&&(0,n.jsx)(O,{heading:_||"Warnings",section:o,uniqueId:_||"Warnings"}),(s&&s.length>0||c&&c.length>0)&&(0,n.jsx)(A,{heading:w||"Directions",uniqueId:w||"Directions"}),s&&s.length>0&&(0,n.jsx)(O,{heading:"",section:s,uniqueId:w||"Directions"}),c&&c.length>0&&(0,n.jsx)(O,{heading:"",section:c,uniqueId:"User Group"}),p&&p.length>0&&(0,n.jsx)(O,{heading:N||"Other Information",section:p,uniqueId:N||"Other Information"}),m&&(0,n.jsx)(O,{heading:j||"Inactive Ingredients",section:m,uniqueId:j||"Inactive Ingredients"}),i&&(0,n.jsx)(O,{heading:L||"Allergens & Warnings",section:i,uniqueId:L||"Allergens & Warnings"}),x&&(0,n.jsx)(O,{heading:P||"Questions or Comments?",section:x,uniqueId:P||"Questions or Comments?"}),R&&k&&(0,n.jsx)(O,{heading:R,section:k,uniqueId:R})]})]})},[U.do.FSA_ELIGIBLE]:({body:e})=>(0,n.jsx)(u.Text,{variant:"t6",uniqueId:"fsa-eligible-details",children:(0,n.jsx)(w.T,{overrides:{p:{component:u.Text,props:{component:"p",sx:{fontSize:d.tGh,maxWidth:"211ch",overflowWrap:"break-word",lineHeight:d.MlV,"&:last-of-type":{paddingTop:d.Mzk}}}},h3:{component:u.Text,props:{component:"p",sx:{fontSize:d.tGh,paddingTop:d.Mzk,lineHeight:d.xUz,"&:first-of-type":{paddingTop:0}}}}},markdown:e})}),[U.do.NUTRITIONAL_INFORMATION]:e=>{let{nutritionInfoObj:t,translations:i}=e;if(!t||!t?.nutritionInformation?.length)return(0,n.jsx)("p",{children:i.nonutritionalinfo});let r=[i.amountperserving,i.dailyvalue],a=t.nutritionInformation.map((e,t)=>e?.nutrientDetails&&e?.nutrientDetails?.length?{title:e.title,servingInfo:(0,n.jsxs)(c.default,{sx:P,children:[e.servingSize&&(0,n.jsx)(M,{element:"h3",label:i.servingsize||"Serving Size",value:e.servingSize,uniqueId:`serving-size-${t}`,uniqueLabel:"nutritional-info"}),e.numberOfServings&&(0,n.jsx)(M,{element:"h3",label:i.servingpercontainer||"Servings per Container",value:e.numberOfServings,uniqueId:`serving-per-container-${t}`,uniqueLabel:"nutritional-info"})]},`ServingInfo-${t}`),nutrientRows:e.nutrientDetails.map((e,i)=>e.nutrient&&(e.quantityContained||e.measurementPrecisionCode)?(0,n.jsxs)(b.A,{children:[(0,n.jsx)(v.A,{sx:{padding:d.D3H},children:(0,n.jsx)(M,{label:e.nutrient,value:`${e?.measurementPrecisionCode?e?.measurementPrecisionCode+" ":""+e?.quantityContained||""}`,element:"p",uniqueId:`nutritional-info-detail-${t}-${i}`,uniqueLabel:"nutritional-facts"})}),(0,n.jsx)(v.A,{sx:{padding:d.D3H},children:e.dailyValueIntakePercent?`${e.dailyValueIntakePercent}%`:"-"})]},`NutrientDetail-${i}`):null),footNote:e.footNotes.length>0?e.footNotes[0]:null}:null);return(0,n.jsx)(c.default,{children:a.map((e,a)=>e?(0,n.jsxs)(c.default,{children:[(0,n.jsxs)(c.default,{children:[e.title&&(0,n.jsx)("h3",{style:j,children:e.title}),e.servingInfo]}),(0,n.jsx)(N.A,{}),(0,n.jsxs)(h.default,{container:!0,spacing:{xs:0,sm:0,md:d.i_v},sx:{...I,"&.MuiGrid2-root":{marginLeft:"0 !important",marginRight:"0 !important"}},children:[(0,n.jsxs)(h.default,{size:{xs:12,sm:12,md:6},sx:I,children:[(0,n.jsxs)(f.A,{sx:k,children:[(0,n.jsx)(g.A,{children:(0,n.jsx)(b.A,{children:r.map((e,t)=>(0,n.jsx)(C,{isBDSite:!0,component:"th",children:(0,n.jsx)(u.Text,{bold:!0,component:"span",sx:{fontSize:d.MkR,lineHeight:d.MlV},uniqueId:`nutritional-info-header-${t}`,children:e})}))})}),(0,n.jsx)(y.A,{children:e?.nutrientRows})]}),e.footNote&&(0,n.jsx)(c.default,{sx:R,children:e?.footNote},`footnote-${a}`)]}),(0,n.jsxs)(h.default,{size:{xs:12,sm:12,md:6},sx:{paddingTop:d.iAn,...I},children:[t?.ingredients&&t?.ingredients?.length>0&&(0,n.jsxs)(c.default,{children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"nutritional-info-ingredients-title",children:i.ingredients}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"nutritional-info-ingredients",children:t?.ingredients?.join(", ")})]}),t?.allergenStatement&&t?.allergenStatement?.length>0&&(0,n.jsxs)(c.default,{sx:{paddingTop:d.Mzk,paddingBottom:d.m72},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"nutritional-info-allergens-title",children:i.allergensandwarnings}),t?.allergenStatement.map((e,t)=>(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:`nutritional-info-allergen-${t}`,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:e}})},`allergen-${t}`))]}),(0,n.jsxs)(c.default,{sx:{paddingTop:d.Mzk,paddingBottom:d.m72},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",variant:"t6",uniqueId:"nutritional-info-disclaimer-title",children:i.disclaimer}),(0,n.jsx)(u.Text,{uniqueId:"nutritional-info-disclaimer",children:(0,n.jsx)(E,{children:i.disclaimercontent})})]})]})]})]},`ProcessedNutrition-${a}`):null)})}
98,[U.do.PRODUCT_DETAILS]:e=>{let t=(0,L.useRef)(null),{description:i,translations:r,espotComponent:a,thirdPartyComponent:l}=e,[o,s]=(0,L.useState)(""),[d,c]=(0,L.useState)(!1),{internalDomains:u}=(0,X.N)();(0,L.useEffect)(()=>{if(t&&t.current){let e=t.current;return e?.addEventListener?.("click",p),e?.addEventListener?.("keypress",m),()=>{e?.removeEventListener?.("click",p),e?.removeEventListener?.("keypress",m)}}},[]);let p=e=>(0,ee.aw)({setOpen:c,setHref:s,event:e,internalDomains:u}),m=e=>(0,ee.aw)({setOpen:c,setHref:s,event:e,internalDomains:u}),h=(0,J.Dr)().openedAccordions.includes(U.do.PRODUCT_DETAILS),f=(0,L.useMemo)(()=>(e=>{if(!e)return"";try{let t=$()(e);return t.querySelectorAll("br").forEach(e=>e.setAttribute("aria-hidden","true")),t.innerHTML}catch(t){return console.error("[PDP][Accordion][Description] - unable to format Description",t),e}})(i),[i]);return(0,n.jsxs)(Z,{title:r.viewmore||"",isActivated:h,children:[a,(0,n.jsx)(et,{html:f,ref:t}),l,o&&(0,n.jsx)(z.A,{href:o,isOpen:d,onCloseHandler:()=>c(!1),setOpen:c,translations:r})]})},[U.do.SHIPPING_RETURNS]:({merchandiseData:e,translations:t,locale:i})=>{let r=(0,L.useRef)(null),[a,l]=(0,L.useState)(""),[o,s]=(0,L.useState)(!1),{internalDomains:d}=(0,X.N)(),p=(0,L.useCallback)(e=>{(0,ee.aw)({setOpen:s,setHref:l,event:e,internalDomains:d,locale:i})},[d,i]),m=(0,L.useCallback)(e=>{(0,ee.aw)({setOpen:s,setHref:l,event:e,internalDomains:d,locale:i})},[d,i]),h=(0,L.useCallback)(e=>{(0,ee.sm)({setOpen:s,setHref:l,event:e,internalDomains:d,locale:i})},[d,i]);(0,L.useEffect)(()=>{if(r&&r.current){let e=r.current;return e?.addEventListener?.("click",p),e?.addEventListener?.("keydown",m),e?.addEventListener?.("mousedown",h),()=>{e?.removeEventListener?.("click",p),e?.removeEventListener?.("keydown",m),e?.removeEventListener?.("mousedown",h)}}},[]);let f=(0,J.Dr)().openedAccordions.includes(U.do.SHIPPING_RETURNS);if(!e)return null;let g=e?.shippingAndReturns&&e?.shippingAndReturns.length>0,b=e?.shopConfidently&&e?.shopConfidently.length>0;if(g||b)return(0,n.jsx)(Z,{title:t.viewmore||"",isActivated:f,children:(0,n.jsxs)(c.default,{ref:r,children:[e?.shippingAndReturns?.map(e=>e.longDescription?(0,n.jsxs)(u.Text,{uniqueId:`shippingAndReturns_${e.rank}`,variant:"t6",children:[(0,n.jsx)(es,{dangerouslySetInnerHTML:{__html:e.longDescription}}),(0,n.jsx)("br",{})]},`ShippingReturns-${e.id}`):null),e?.shopConfidently?.map(e=>e.longDescription?(0,n.jsx)(u.Text,{uniqueId:`shopConfidently_${e.rank}`,variant:"t6",children:(0,n.jsx)(es,{dangerouslySetInnerHTML:{__html:e.longDescription}})},`ShopConfidently-${e.id}`):null),a&&(0,n.jsx)(z.A,{href:a,isOpen:o,onCloseHandler:()=>s(!1),setOpen:s,translations:t})]})})},[U.do.SPECIFICATIONS]:e=>{let{productSpecs:t,translations:i}=e,r=t.map(e=>e.specFeature),a=t.map(e=>[e.specValue]),l=(0,J.Dr)().openedAccordions.includes(U.do.SPECIFICATIONS);return(0,n.jsx)(c.default,{sx:{fontSize:d.tGh,borderTop:`1px solid ${d.XgP}`},children:(0,n.jsx)(Z,{title:i.viewmore||"",isActivated:l,children:(0,n.jsx)(ei.X,{hasAlternatingStripes:!0,headerData:r,rowData:a,uniqueId:"ProductSpecifications",variants:"vertical"})})})},[U.do.WARRANTY_SERVICES]:ep.A,[U.do.SUPPLEMENT_FACTS]:e=>{let{ingredients:t,supplementsDataObj:i,translations:r}=e,a=t&&t.length>0?t.join(", "):i&&i[0]?.intakeIngredients?i[0].intakeIngredients.join(", "):"",l=(0,T.G8)();return(0,n.jsx)(c.default,{children:i.map((e,t)=>(0,n.jsxs)(c.default,{children:[(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk,lineHeight:d.MlV},children:[(0,n.jsx)(M,{label:r.servingsize||"Serving Size",value:e.servingSize,element:"h3",uniqueId:`serving-size-${t}`,uniqueLabel:"supplement-facts"}),(0,n.jsx)(M,{label:r.servingpercontainer||"Servings per Container",value:e.numberOfServings,element:"h3",uniqueId:`serving-per-container-${t}`,uniqueLabel:"supplement-facts"})]}),l&&(0,n.jsx)(ed.Divider,{}),(0,n.jsxs)(ec.Grid,{container:l,spacing:{xs:0,sm:0,md:l?d.i_v:0},sx:{...I,"&.MuiGrid2-root":{marginLeft:"0 !important",marginRight:"0 !important"}},children:[(0,n.jsx)(ec.Grid,{size:{xs:12,sm:12,md:l?6:12},sx:I,children:(e.nutrientDetails&&e.nutrientDetails.length>0||e.vitAndMinerals&&e.vitAndMinerals.length>0)&&(0,n.jsx)(c.default,{sx:{paddingBottom:d.Mzk},children:(0,n.jsxs)(eu,{isBDSite:l,children:[(0,n.jsx)(g.A,{children:(0,n.jsxs)(b.A,{children:[(0,n.jsx)(C,{isBDSite:l,component:"th",children:(0,n.jsx)(u.Text,{bold:!0,component:"span",variant:"t5",uniqueId:"supplement-facts-amount-per-serving-title",children:r.amountperserving})}),(0,n.jsx)(C,{isBDSite:l,component:"th",children:(0,n.jsx)(u.Text,{bold:!0,component:"span",variant:"t5",uniqueId:"supplement-facts-daily-value-title",children:r.dailyvalue})})]})}),(0,n.jsxs)(y.A,{children:[[...e.nutrientDetails||[],...e.vitAndMinerals||[]].map((e,i)=>(0,n.jsxs)(b.A,{children:[(0,n.jsx)(v.A,{sx:{padding:d.D3H},children:(0,n.jsx)(M,{label:e.nutrient,value:`${e.nutrientValue}${e.nutrientValueUOM?" "+e.nutrientValueUOM:""}`,element:"p",uniqueId:`daily-value-${t}_${i}`,uniqueLabel:"supplement-facts"})}),(0,n.jsx)(v.A,{sx:{padding:d.D3H},children:e?.dvvalue||e?.dvvalueUOM||e?.noteMark?(0,n.jsxs)(u.Text,{component:"span",uniqueId:`supplement-facts-daily-value-${t}_${i}`,children:[e?.dvvalue||"",e?.dvvalue&&e?.dvvalueUOM||"",e?.noteMark||""]}):(0,n.jsx)(u.Text,{component:"span",uniqueId:`supplement-facts-daily-value-${t}_${i}`,children:"-"})})]},`SupplementNutrientInfo-${i}`)),e.footNotes?.length?e.footNotes.map((e,i)=>(0,n.jsx)(b.A,{children:(0,n.jsx)(v.A,{sx:{padding:d.m72},colSpan:2,children:e.mark?(0,n.jsxs)(u.Text,{component:"span",uniqueId:`supplement-facts-note-${t}_${i}`,children:[e.mark," ",e.description]}):(0,n.jsx)(u.Text,{component:"span",uniqueId:`supplement-facts-note-description-${t}_${i}`,children:e.description})})},`SupplementFootnote-${i}`)):null]})]})})}),(0,n.jsxs)(ec.Grid,{size:{xs:12,sm:12,md:l?6:12},sx:{paddingTop:l?d.iAn:0,...I}
98,children:[a&&(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",sx:{paddingBottom:d.m72},uniqueId:"supplement-facts-ingredients-title",children:r.ingredients}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"supplement-facts-ingredients",children:a})]}),e.intakeContains&&e.intakeContains?.length>0&&(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"supplement-facts-contains-title",children:r.contains}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"supplement-facts-contains",children:e.intakeContains.join(", ")})]}),e.intakeMayContain&&e.intakeMayContain?.length>0&&(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"supplement-facts-may-contain-title",children:r.maycontain}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"supplement-facts-may-contain",children:e.intakeMayContain.join(", ")})]}),e.intakeDoesNotContain&&e.intakeDoesNotContain?.length>0&&(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"supplement-facts-does-not-contain-title",children:r.doesnotcontain}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"supplement-facts-does-not-contain",children:e.intakeDoesNotContain.join(", ")})]}),e.intakeHealthClaims&&e.intakeHealthClaims?.length>0&&(0,n.jsxs)(c.default,{sx:{marginBottom:d.Mzk},children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"supplement-facts-health-claims-title",children:r.healthclaims}),(0,n.jsx)(u.Text,{sx:{maxWidth:"211ch",overflowWrap:"break-word"},uniqueId:"supplement-facts-health-claims",children:e.intakeHealthClaims.join(", ")})]}),(0,n.jsxs)(c.default,{children:[(0,n.jsx)(u.Text,{bold:!0,component:"h3",uniqueId:"supplement-facts-disclaimer-title",children:r.disclaimer}),(0,n.jsx)(u.Text,{uniqueId:"supplement-facts-disclaimer",children:(0,n.jsx)(E,{children:r.disclaimercontent})})]})]})]})]},`SupplementData-${t}`))})},[U.do.REQUEST_CONSULTATION]:({serviceUrl:e,translations:t})=>{let{thirdPartyInfo:i}=(0,ea.B)(),{transcendFeatureToggle:r}=(0,eo.h)(),{openErrorDrawer:a}=(0,en.l)(),[l]=(0,el.F)("transcendConsentOverride",r.isEnabled),o=r.isEnabled||"true"===l,{consentManagement:s}=i,{isTargetingEnabled:d}=s,u=t?.updatecookiesettings;return d?(0,n.jsx)(c.default,{"data-testid":"requestConsultation-iframe",children:(0,n.jsx)("iframe",{title:"Request Consultation",height:"1462px",src:e,style:{border:"none"},width:"100%"})}):(0,n.jsx)(er.Notification,{uniqueId:"request-consultation-consent-disabled",message:(0,n.jsxs)(c.default,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:1},children:[t?.schedulingdisabledmessage,(0,n.jsx)(F.Button,{id:o?"transcend-btn":"ot-sdk-btn",...!o&&{className:"ot-sdk-show-settings"},...o&&{onClick:()=>{void 0!==window.CostcoConsentManager?window.CostcoConsentManager.openDrawer():(console.error("CostcoConsentManager is not available on the window object"),a())}},"data-testid":"requestConsultationCookieSettings",uniqueId:"cookie-settings",variant:"text-button",sx:{textDecoration:"underline"},children:u})]}),severity:"alert"})},[U.do.MANUALS_GUIDES]:({translations:e,assetLinks:t=[],manualsAndGuides:i,locale:r})=>{let a=(0,L.useRef)(null);return e?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(eb,{ref:a,children:[t?.map(t=>(0,n.jsx)(eC,{assetName:t?.name,translations:e,href:t?.url,locale:r},t?.url)),i?.manualsAndGuidesData?.map(t=>(0,n.jsx)(ex,{href:t?.attributes?.cdn_url,target:"_blank",className:"external",children:(0,n.jsxs)(ey,{children:[(0,n.jsx)(eg.A,{color:d.hGW,height:"18px",width:"18px",titleAccess:e.openinpdf||"Opens in PDF"}),(0,n.jsx)(u.Text,{variant:"l1",uniqueId:`manual-guide-${t.id}`,children:t.customFields&&"string"==typeof t.customFields.AssetDescription&&t.customFields.AssetDescription||""})]})},t.id))]})}):null}},te=e=>{let{accordionsConfig:t,bazaarVoice:i,productDetailsData:r,locale:a,productAssets:l,manualServiceConfig:o,pageSettings:s}=e,u=(0,L.useRef)(null),p=(0,L.useRef)(0),{selectedAccordion:m,isAccordionCl
98icked:h,setIsAccordionClicked:f,openedAccordions:g,setOpenedAccordions:b,setHasManualsAndGuides:y}=(0,ef.useAccordionContext)(),[x]=(0,ez.N)(),v=x?.value||r?.selectedChildItemNumber,S=s.properties?.[0]?.salsifyClientId||"",C=s.translationsMap?.vendorcontentdisclaimertext,{manualsAndGuides:E}=((e,t,i)=>{let{agent:r}=(0,e6.f)(),[a,n]=e3(),{data:l}=(0,e2.Ay)(`manualsAndGuidesFetcher-${e}`,()=>e4(e,t,r,i),{revalidateOnMount:!0,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1});return(0,L.useEffect)(()=>{l&&l&&n(l)},[l,n]),{manualsAndGuides:a}})(r?.productData?.id||"",o,a)||{},[I,T]=(0,L.useState)(!1),{trackEvent:A}=(0,G.z1)(),D=(0,L.useMemo)(()=>t.map(e=>e.identifier),[t]),_=r?.productData?.isFsa,O=r?.productData?.childCatalogData?.[0]?.isFsa,w=r.contentVendors||[],[N,j]=(0,L.useState)(!0),P=((0,eo.h)().enableSalsifyIntegrationFeatureToggle?.isEnabled??!1)&&!!S&&w.includes(eA.ay.Salsify)&&(0,eh.U$)(v||"",r?.productData,a);(()=>{let{openedAccordions:e,setOpenedAccordions:t}=(0,J.Dr)();(0,L.useEffect)(()=>{let i=async()=>{e.includes(U.do.MEMBER_REVIEWS)||(await new Promise(e=>setTimeout(e)),t(e=>e.includes(U.do.MEMBER_REVIEWS)?e:[...e,U.do.MEMBER_REVIEWS]),await new Promise(e=>setTimeout(e,300)),document.getElementById(U.do.MEMBER_REVIEWS)?.scrollIntoView({block:"start"}))};return addEventListener(e1.F,i),()=>removeEventListener(e1.F,i)},[e])})(),(0,L.useEffect)(()=>{if(!m||!h)return;let e=document.getElementById(m);if(e){let t=setInterval(()=>{let i=Math.ceil(e.getBoundingClientRect().top)||0;p.current=Math.ceil(e?.clientHeight)||0;let r=Math.ceil(i+window.scrollY-p.current);window.scrollY===r?(e.focus(),clearInterval(t)):window.scrollTo({top:r,behavior:"smooth"})},600);setTimeout(()=>{clearInterval(t),e.focus()},3e3)}else{let e=u.current?.offsetTop||window.scrollY;window.scrollTo({top:e-50,behavior:"smooth"})}f(!1)},[m,h,f]),(0,L.useEffect)(()=>{m&&D.includes(m)&&(b(e=>[...new Set([...e,m])]),f(!1))},[m,D,f,h,b]),(0,L.useEffect)(()=>{(E&&E?.manualsAndGuidesData?.length||l?.length)&&y(!0)},[E,l]),(0,L.useEffect)(()=>{j(!0)},[v]);let R=(0,n.jsx)(eX,{locale:a,productData:r.productData,productId:r.productData.id||"",itemId:v||"",site:"CABC",vendors:w,salsifyClientId:S,isSalsifyEnabledForProduct:P,salsifyContentExists:N,setSalsifyContentExists:j,...C&&{vendorDisclaimer:C}});return(0,n.jsx)(c.default,{ref:u,sx:{backgroundColor:d.DJJ,borderRadius:d.m72},children:(0,n.jsx)(c.default,{sx:{boxShadow:d.XM9,borderRadius:d.m72},children:D.map((t,r)=>{let a=e8[t],{title:l,componentProps:o,showAccordion:s}=(0,eh.nY)(I,e,v||"",R,E,P,N)[t]||{};return s&&(0,n.jsx)(em.Accordion,{isExpanded:g.includes(t),onChange:(e,i)=>{b(e=>i?[...e,t]:e.filter(e=>e!==t)),A({component:{identifier:`Product Detail Accordion | ${l} | ${i?"Expand":"Shrink"}`,type:"ui"},doNotTrack:O||_,trackType:"pdp-accordion"}),T(i)},title:l,uniqueId:t,variant:"t5",accordionSummarySx:{fontFeatureSettings:"'liga' off, 'clig' off"},headingSlotTag:"h2",children:t===U.do.MEMBER_REVIEWS?(0,n.jsxs)(n.Fragment,{children:[" ",i," "]}):(0,n.jsx)(a,{...o})},`${t}-${r}`)})})})};var tt=i(47774);let ti=({data:e,locale:t,productDetailsData:i,pageSettings:r,espotComponent:a})=>{let u,{translationsMap:p}=r,{accordionExternalLinkCSData:m,enabledNutritionalDeptsConfig:h,deliveryServiceConfig:f,productTileConfigData:g,manualsAndGuidesServiceConfig:b}=(0,eo.h)(),y=(0,l.U)(p,o.oE),x={...(0,s.x)(m),...y},{productData:v}=i,{childCatalogData:S}=v||{};if("object"==typeof v&&!Object.keys(v).length)return console.error("[PDP][Accordion][Error]: productData is null"),null;let C=h.custom.NUTRITION_LABEL_ELIGIBLE_DEPT?.[String("CABC").toLowerCase()]||[];if(S&&S[0]?.isFsa===!0){let e=g?.productTileConfigData?.fsaConfig||void 0,t=e?.composable_window?.[0]?.text_only?.body;u=t?{body:t}:void 0}else u=void 0;let E=(0,T.G8)()?null:(0,n.jsx)(tt.A,{itemNumber:v?.id,locale:t,isMembersAccordion:!0,viewMoreMessage:x.viewmore}),I=i?.productData?.descriptions?.[0]?.object?.assetLinkDetails||null;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(c.default,{sx:{display:"flex",flexDirection:"column",gap:d.Mzk,marginBottom:
98d.Mzk,borderRadius:d.m72},tabIndex:-1,children:(0,n.jsx)(te,{accordionsConfig:e,productDetailsData:i,translations:x,fsaData:u,bazaarVoice:E,productAssets:I,locale:t,nutritionDepartments:C,deliveryServiceConfig:f,manualServiceConfig:b,espotComponent:a,pageSettings:r})})})}},42886:(e,t,i)=>{i.d(t,{ZK:()=>E,M9:()=>C,f_:()=>b,Vg:()=>S});var r=i(84077),a=i(50716),n=i(48563),l=i(48976),o=i(7025),s=i(19359),d=i(70991),c=i(42031),u=i(98216),p=i(578),m=i(93280),h=i(6946);let f=async(e,t)=>{let{itemNumbers:i,serviceConfig:r}=e,{endpoint:a="",method:n="POST",required_request_parameters:l,retryconfig:o,required_request_headers:s}=r,d="localhost"!==window.location.hostname?window.location.origin:String("https://www.costco.ca"),c=l.warehouse_contract_id[String("CABC").toLowerCase()]||"",u=s.client_identifier[String("CABC").toLowerCase()]||"",p={method:n,signal:t,headers:{"Cache-Control":"no-cache, no-store, must-revalidate, max-age=0"},body:JSON.stringify({itemNumbers:i})},m=`${d}${a}?warehouseNo=${c}&clientId=${u}`;try{let{data:e,status:t,statusText:r}=await (0,h.X)(m,p,o,`[PDP][WCSBatch][Error] - ChildItem: ${i} `),a={...e.Availability};return e?.errorParam?.Reason&&e?.errorParam?.Reason!=""&&console.info(`[PDP][WCSBatch][ERROR] - ${e?.errorParam?.Reason}`),{wcsBatchInventoryInfo:a,status:t}}catch(e){if(console.info(`[PDP][WCSBatch][ERROR] - ${e}`),e instanceof DOMException&&"AbortError"===e.name)throw e;throw Error(`[PDP][WCSBatch][Error] - Child Item Number: ${i} - ${e}`)}};var g=i(74324);let b=(e,t,i,r,a,n,l,d)=>{let{descriptions:c,ratingScore:u,ratingCount:p}=r||{},{imageName:m,shortDescription:h,promotionalStatement:f,popupStatement:b}=c?.[0]?.object||{},{descriptions:y,id:x,parentId:v,ratingCount:S,ratingScore:C,childCatalogData:E,productAttributes:I,dispPriceInCartOnly:T}=e||{},{imageName:A,promotionalStatement:D,popupStatement:_}=y?.[0]?.object||{},O=(0,g.wx)("string"==typeof f&&f?f:"string"==typeof D?D:"").trim(),w=(r?.childCatalogData?.filter(e=>e.isPublished)||[]).length>1,N=(h||"").toLowerCase().replace(/ /g,"-").replace(/[^A-Za-z0-9-]/g,""),j=E?.[0]?.id||x,P=!(0,s.G8)()&&E?.some(e=>e.isMembershipReqd&&1===T),{priceData:R,priceDataWh:k}=i||{},L=l&&l?.id===o.Oi.BUY_IN_WAREHOUSE&&k?.displayPrice?.onlinePrice||R?.displayPrice?.deliveredPrice,M=C||u||null,B=(S?Number(S):Number(p))||null;return{productInfoData:{productImageUrl:"{}"!==JSON.stringify(A)&&A?A||"":m||"",productName:h||"",productLinkUrl:`/${N}.product.${j}.html`,partNumber:v?.[0]==="-1"?x:v?.[0]||"",itemNumber:E?.[0]?.id||x,popupStatement:b||_||"",productAttributes:I?.[0]?.object.map(e=>"defining"===e.type?{key:e.key,value:e.value}:void 0).filter(e=>!!e)},isMemberOnlyItem:P,reviewRatingData:{value:M,reviewCount:B,ariaLabel:(d?.averageratingarialabel||"").replace("{rating}",String(M??0)).replace("{total}",String(B??0))},locale:t,priceListData:!a&&P?void 0:{priceText:null,priceValue:L},promoItem:{promoText:O,promoTextColor:""},productActions:{type:n&&a||!P?w?"SelectOptions":"QuantitySelector":"SignInButton"}}},y=(e,t)=>{let i=t[e||""]||null;return i?{itemInvData:{...i}}:{itemInvData:{isAvailable:!1,inventoryflag:"0",backorderType:"0"}}},x=async(e,t,i)=>{let r=[];for(let t=0;t<e.length;t+=i)r.push(e.slice(t,t+i));let a=r.map(async e=>{try{return await f({itemNumbers:e,serviceConfig:t}).then(e=>e.wcsBatchInventoryInfo)}catch{return e?.reduce((e,t)=>(e[t]={isAvailable:!1,inventoryflag:"0",backorderType:"0"},e),{})}});return(await Promise.all(a)).reduce((e,t)=>({...e,...t}),{})},v=async(e,t,i,r,a,n)=>{let{inventoryV2ServiceConfig:d,addToCartWcsInventoryDetailsFeatureToggle:h,addToCartInventoryV2DetailsFeatureToggle:f,scInventoryUpdateServiceConfig:g,scInventoryBatchServiceConfig:b,addToCartWcsBatchInventoryDetailsFeatureToggle:v}=t||{},{estimated:S,earliest:C,shippingtext:E,delivery:I,emaildeliverylabel:T}=a||{},{state:A,zipCode:D}=r,_={destinationState:A||"",destinationPostalCode:D||"",destinationCountryCode:(0,s.gI)(i)},O=f?.isEnabled??!0,w=h?.isEnabled??!0,N=v?.isEnabled??!0,j=()=>({EDD:S,id:o.Oi.DIGITAL_DELIVERY,label:T}),P=(e,t,r)=>({...e,EDD:t?e.id===o.Oi.SHIPPING?S:C:void 0,timeframe:r?(0,u.qk)(r,i):void 0}),R=e.map(e=>
98{let{childCatalogData:t,id:i}=e.productData||{};return t&&0!==t.length?{childItemData:t[0],accessoryItem:e,parentId:i}:null}).filter(e=>!!e),k=R.filter(e=>e?.childItemData?.programTypes?.includes(o.ts.SITE_CONTROLLED_INVENTORY)).map(e=>e.childItemData?.id).filter(e=>void 0!==e),L={},M=N&&k.length>0&&(0,s.bZ)();return M&&w&&(L=await x(k,b,n)),(await Promise.allSettled(R.map(async({childItemData:e,accessoryItem:t,parentId:r})=>{let a,n=(0,l.zs)(e),h=e?.programTypes?.includes("SiteControlledInventory"),f={id:(a=!!(0,l.R6)(e))?o.Oi.SHIPPING:o.Oi.DELIVERY,label:a?E:I},b=e?.productClassType==="AppleCare",x=!!e?.productAttributes?.[0]?.shipModes?.some(e=>"EDG"===e.code),v=e?.minItemOrderQty&&e?.minItemOrderQty!=="0"?e.minItemOrderQty:"1",S=(0,s.u)(e?.productAttributes?.[0]?.shipModes);if(n){let{inventoryV2Info:a}=O?await (0,p.p)({childItemNumber:e?.id||r,destination:_,shippingCodes:S,itemMinQuantity:v,serviceConfig:d}):{inventoryV2Info:{availability:o.RO.INSTOCK,shipmodeDates:[]}},n=a?.shipmodeDates?.[0]?.estimatedDeliveryDate,l=n?(0,u.qk)(n,i):null;if(a?.availability===o.RO.INSTOCK||a?.availability===o.RO.LOWSTOCK||a?.availability===o.RO.NOSTOCK||a?.availability===o.RO.BACKORDERED||a?.availability===o.RO.PRESELL){if(h){let i=null;if(!w)return{fulfillmentDetails:P(f,l,n),accessoryItem:t,childItemData:e};if(M)i=y(e?.id,L);else try{i=await (0,m.wL)({childItemNumber:e?.id,serviceConfig:g}).then(e=>e.wcsInventoryInfo)}catch{return{fulfillmentDetails:P(f,l,n),accessoryItem:t,childItemData:e}}let r=i?.itemInvData?.backorderType==="1"&&(!O||a?.availability===o.RO.BACKORDERED||a?.availability===o.RO.PRESELL);return(0,c.Xx)(i?.itemInvData)||r?{fulfillmentDetails:P(f,l,n),accessoryItem:t,childItemData:e}:null}return a?.availability!==o.RO.NOSTOCK?{fulfillmentDetails:P(f,l,n),accessoryItem:t,childItemData:e}:null}}else{if(h){let i=null;if(!w)return{fulfillmentDetails:b?null:x?j():f,accessoryItem:t,childItemData:e};if(M)i=y(e?.id,L);else try{i=await (0,m.wL)({childItemNumber:e?.id,serviceConfig:g}).then(e=>e.wcsInventoryInfo)}catch{return{fulfillmentDetails:b?null:x?j():f,accessoryItem:t,childItemData:e}}return(0,c.Xx)(i?.itemInvData)||i?.itemInvData?.backorderType==="1"?{fulfillmentDetails:b?null:x?j():f,accessoryItem:t,childItemData:e}:null}let{inventoryV2Info:a}=O?await (0,p.p)({childItemNumber:e?.id||r,destination:_,shippingCodes:S,itemMinQuantity:v,serviceConfig:d}):{inventoryV2Info:{availability:o.RO.INSTOCK,shipmodeDates:[]}},n=a?.shipmodeDates?.[0]?.estimatedDeliveryDate,l=n?(0,u.qk)(n,i):null;return a?.availability===o.RO.INSTOCK||a?.availability===o.RO.LOWSTOCK||a?.availability===o.RO.BACKORDERED||a?.availability===o.RO.PRESELL?{fulfillmentDetails:P(f,l,n),accessoryItem:t,childItemData:e}:null}return null}))).map(e=>{if("fulfilled"===e.status&&e.value)return e.value}).filter(e=>!!e)},S=async(e,t,i,a,l,o,d,c,u,p,m,h,f,g)=>{var y,x;let S=c?.priceData?.displayPrice?.deliveredPrice||0,C=(y=d,x=e,y&&x&&y.productAttributes&&y.productAttributes[0]?.object?.some(e=>"AutoAdd"===e.key&&"controlling"===e.type)?x.filter(e=>"0"!==e.rank):x);S>0&&(C=((e,t,i,r)=>{let a=(0,s.W5)();if((0,s.G8)()||!r&&a)return e;let n=a?i?.custom?.WARRANTY_CONFIG_CA:i?.custom?.WARRANTY_CONFIG;return e.filter(e=>{let i=e?.productData?.childCatalogData?.[0]?.id,r=n?.find(e=>e.item===i);return!r||t>=r.low&&t<=r.high})})(e,S,l,f));let E=await v(C,a,t,o,h,g);return(await (0,r.Ay)(E||[],async({childItemData:e,accessoryItem:r,fulfillmentDetails:a})=>{try{let l=e?.id||"",o=await i(l),s=Array.isArray(o?.priceData)?o.priceData[0]:o?.priceData,d=s?{priceData:{...s,displayPrice:(0,n.L_)(s?.displayPrice),discounts:(0,n.Gk)(s?.discounts,t)}}:void 0;return{normalizedData:b(e,t,d,r?.productData,u,p,a,m),fulfillmentDetails:a,childItemData:e}}catch(t){return console.error(`[PDP][AddToCart][Error]: Error fetching price details for accessory ${e?.id}:`,t),null}},{concurrency:3})).filter(Boolean)},C=e=>{let{partNumber:t,itemNumber:i,isAccessoryItem:r,quantity:a,warehouseNumber:n,authToken:l,isFsaChdItem:o,isPickUp:s,isSTWPickUp:d,estimatedDeliveryDate:c,contractIdentifier:u,eddInstallationServices:p,isMDOPickUp:m,ltlPickUpLocation:h,parentOrderItemId:f,isDependentAccessory:g,dependentConfigured:b}=e||{},y=window.location.origin,x={ajaxFlag:!0,checkOmsInventory:!0,isPdpPage:!0,isRestrictedPostalCode:!1,partNumber:t,actionType:"add",quantity:a,isShipRestrictionStore:!0,quantity_1:a,is_mod_pdp:!0,productPartnumber:t,isFsaChdItem:o,authToken:l,addedItem:i,itemNumber:i,backURL:new URL(`${y}/CheckoutCartView?orderId=`).toString(),contractIdentifier:u,...b?{dependentConfigured:b}:{},...g?{parentOrderItemId:f}:{}},v={...x,skuForRR:i,eddInstallationServicesJSON:JSON.stringify(p)};
98return r?v:d||s?{...x,isPickUp:s,isSTWPickUp:d,warehouseNumber:n,dependentConfigured:!0,estimatedPickupDate:c}:m?{...x,isMDOPickUp:m,ltlPickUpLocation:h,estimatedPickupDate:c}:{...x,eddInstallationServicesJSON:JSON.stringify(p)}},E=e=>{if(!e)return null;let t=e.replace(/<!\[CDATA\[([\s\S]*?)\]\]>/g,"$1"),i={title:"",buttonText:"",href:""};return((0,a.Ay)(t,{replace:e=>{if((0,d.vq)(e)&&e.attribs&&"custom-text-holder22"===e.attribs.id){let t=(0,d.tu)(e,"b");t&&t?.children?.[0]?.type==="text"&&(i.title=t.children[0].data||"");let r=(0,d.tu)(e,"a");if(r){i.href=r.attribs.href||"";let e=(0,d.tu)(r,"button");e&&e?.children?.[0]?.type==="text"&&(i.buttonText=e.children[0].data||"")}}}}),i.title&&i.buttonText&&i.href)?i:null}},44052:(e,t,i)=>{i.d(t,{Gs:()=>r});let r=e=>e&&"0"!=e?e:"1";i(7025),i(98216)},44905:(e,t,i)=>{i.d(t,{default:()=>ed});var r=i(95155),a=i(12129),n=i(92226),l=i(12158),o=i(2377),s=i(24880),d=i(70422),c=i(12115),u=i(7025),p=i(53236),m=i(70746),h=i(33610),f=i(98216),g=i(51551),b=i(19909),y=i(87243),x=i(90657),v=i(27966),S=i(24546),C=i(19216),E=i(34971),I=i(95097),T=i(96013),A=i(60714),D=i(71645),_=i(7040);let O=({translations:e})=>(0,r.jsx)(C.m,{buttonAriaLabel:e?.unavailableinfoarialabel||"",buttonContent:(0,r.jsx)(T.A,{sx:{height:D.mu,width:D.mu}}),content:e?.warehouseunavailable||"",position:D.qo,hasArrow:!0,tooltipId:"warehouseAvailabilityInfoTooltip",uniqueId:"warehouseAvailabilityTooltip",sx:{marginTop:"10px !important",'&[data-popper-placement*="bottom"] .arrow':{top:0,left:0,marginTop:"-1.65em",marginLeft:"-6px","&::before":{borderColor:`${s.Z8G} transparent transparent ${s.Z8G}`,transformOrigin:"0 100%"}}}}),w=(0,c.forwardRef)(({locale:e},t)=>{let{batchServiceConfig:i,fulfillmentConfigSetting:a,enabledWhListConfigSetting:n,enabledWhListBopiwConfigSetting:l,enabledWhListWioConfigSetting:o,enabledWhListWapoConfigSetting:s,checkNearbyWarehousesModuleSettings:d}=(0,A.h)(),p=(0,_.X)(e),{selectedChildItem:m,productFlags:{isVariantProduct:h,isWioProduct:y,isBopiwProduct:x,isShipToWarehouse:C},featureFlags:{isWioEnabled:T,isBopiwOrSTWEnabled:w},fulfillmentData:{pickUp:{data:N,isLoading:j,isError:P},warehousePickupStatus:{status:R,showTooltip:k}},translations:L,warehouseFlags:{isWarehouseWioEnabled:M,isWarehouseBopiwEnabled:B},productData:$,selectedWarehouse:z}=(0,b.r)(),U=(0,c.useMemo)(()=>(0,f.xo)(L,u.aS.WAREHOUSE),[L])[R],q=(0,c.useMemo)(()=>{let e=(0,g.IK)({translations:L,warehouseStatusInfo:U,pickUpData:N,isVariantProduct:h,isWarehouseBopiwEligible:w&&B,isWarehouseWioEligible:T&&M,isPickupError:!!P,warehousePriceOnlineFeatureToggle:p});return k?{...e,Adornment:(0,r.jsx)(O,{translations:L})}:e},[L,U,N,h,w,B,T,M,k]),V=(0,c.useMemo)(()=>{let e=m?.descriptions?.[0]?.object.imageName||"",t=$?.imageName||"";return(0,f.Dw)(m,e||t)},[m]);if(!m?.id)return null;let F=j||!z;return(0,r.jsxs)(r.Fragment,{children:[F&&(0,r.jsx)(E.Skeleton,{variant:I.z.Button,width:D.qu}),(0,r.jsx)(v.default,{sx:{display:F?"none":"flex"},children:(0,r.jsx)(S.WarehouseSelectorData,{ref:t,locale:e,childItemNumber:m.id,batchServiceConfig:i,featureConfigs:a,enabledWarehouseListConfigs:{enabledWhListLucid:n,enabledWhListBopiw:l,enabledWhListWio:o,enabledWhListWapo:s},moduleSettings:d,stockStatusData:q,productImageData:V,productFlags:{isVariantProduct:h,isWioProduct:y,isBopiwProduct:x,isShipToWarehouse:C},displayOpenHours:!1,drawerType:D.ts,pageName:D.QX,analyticsIdentifier:"Product Detail"})})]})});var N=i(71706),j=i(7569),P=i(46286),R=i(7457),k=i(36370),L=i(19359),M=i(42031),B=i(57001),$=i(95768),z=i(66874);let U=({locale:e,initialLoadingState:t})=>{let{trackEvent:i}=(0,d.z1)(),{deliveryLocation:a,warehouse:n}=(0,N.B)(),{agent:o}=(0,j.f)(),{zipCodeModuleSettings:p}=(0,A.h)(),{destination:{destinationCountryCode:m},productFlags:{isCostcoGroceryEligible:h,is2DayDelivery:g},fulfillmentData:{inventory:{processed:{data:y,isLoading:x}}},translations:S}=(0,b.r)(),{isZipCodeDrawerOpen:C,onZipCodeDrawerOpen:T,onZipCodeDrawerClose:D}=(0,z.M)(),{zipcodearialabel:_="",shippingtext:O=""}=S,w=(0,c.useMemo)(()=>(0,L.IP)(p),[p]),U=a?.zipCode||w.locationSelectorDefault,q=_?.replace("{{zipCode}}
98",U||""),V=(0,c.useMemo)(()=>(0,f.xo)(S,u.aS.DELIVERY),[S]),F=(0,c.useMemo)(()=>(0,M.KC)(m,g,h,y),[m,g,h,y]),{color:W,text:H}=(0,c.useMemo)(()=>V[F===u.RO.SHIPRESTRICTED?u.RO.UNAVAILABLE:F],[F,V]),K=async({city:e,state:t,zipCode:i})=>{try{let r=await o?.getDistributionCenters(t,i);n.updateWarehouse({nearestWarehouse:n.nearestWarehouse,...r}),a.updateDeliveryLocation({city:e,state:t,zipCode:i})}catch(e){console.error(`[PDP][ZipCodeSelector][Error]: ${e}`)}};return x||t?(0,r.jsx)(E.Skeleton,{variant:I.z.Button,width:$.q}):o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v.default,{sx:{display:x?"none":"flex",gap:s.m72},"data-testid":"zipCodeSelector",children:[(0,r.jsx)(k.default,{titleAccess:O}),(0,r.jsxs)(v.default,{children:[(0,r.jsx)(R.Button,{onClick:()=>{i($.A),T()},"aria-label":q,sx:B.h,uniqueId:"zipcodeSelector",variant:"text-button",children:U}),(0,r.jsx)(l.Text,{bold:!0,sx:{color:W},variant:"t6",uniqueId:"zipcode-status",children:H})]})]}),(0,r.jsx)(P.P,{isOpen:C,onClose:D,zipCode:U,onSubmit:K,agent:o,moduleSettings:[p],locale:e})]}):null};var q=i(3187),V=i(16561),F=i(13400);let W=(e,t="en-US")=>{if(e){let[i,r]=e.split(":").map(Number),a=new Date;return a.setHours(i,r,0,0),new Intl.DateTimeFormat("en"===t||"fr-CA"===t?"en-US":t,{hour:"numeric",hour12:!0,minute:"2-digit"}).format(a).replace(/(am|pm)/i,i>=12?"PM":"AM")}return e},H=({locale:e,translations:t,mdoLocationData:i})=>{let a,[n,o]=(0,c.useState)(!1),d=()=>{o(!n)},{name:u,address:p,openingHours:m,holidayHours:h,slug:f}={name:(a=()=>{let t=e.split("-").map((e,t)=>1===t?e.toUpperCase():e).join("-"),r=i?.name?.find(e=>e?.localeCode===t),a=r?.value?.trim().split(" ");return a?.slice(0,-2).join(" ")||""})(),address:(()=>{let{line1:e="",city:t="",territory:r="",postalCode:n=""}=i?.address||{},l=a(),o=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase();return[l,e,`${o}, ${r} ${n}`]})(),openingHours:i?.hours?.reduce((e,i)=>{if(i.title){let r=i?.title[0]?.value,a="close"===i.hoursType.code?`${r}. ${t?.closed}`:`${r}. ${W(i.open)} - ${W(i.close)}`;e.push({key:r,label:a})}return e},[])||[],holidayHours:i?.holidays?i.holidays?.reduce((e,i)=>{if(i.name){let r=i?.name[0]?.value;"closed"===i.holidayHoursType.code&&e.push({key:r,label:`${r} ${t?.closed}`}),"open"===i.holidayHoursType.code&&e.push({key:r,label:`${r} ${t?.open}`}),i.hour?.open&&i.hour?.close&&"hours-change"===i.holidayHoursType.code&&e.push({key:r,label:`${r} ${W(i.hour.open)} - ${W(i.hour.close)}`})}return e},[]):[],slug:(()=>{try{let e=encodeURIComponent(["Costco"].concat(i?.address.line1.split(" ")).concat(i?.address.city.split(" ")).concat(i?.address.territory.split(" ")).concat(i?.address.countryName.split(" ")).join(" ")),t="https";return t=window.location.protocol,`${t}//maps.google.com?saddr=Current+Location&daddr=${e}`}catch(e){console.error(`[PDP][GetDirection][Error]: ${e}`);return}})()},{pickuplocation:g="",distributioncenter:b="",distributioncenterdetails:y="",getdirections:x="",pickuphours:S="",distributioncenterinfo:C=""}=t||{};return(0,r.jsxs)(v.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch",gap:s.m72},"data-testid":"fulfillment-distributioncenteraccordion",children:[(0,r.jsx)(v.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:s.m72},children:(0,r.jsxs)(v.default,{sx:{display:"flex",alignItems:"center",alignSelf:"stretch",gap:s.m72},children:[(0,r.jsxs)(l.Text,{uniqueId:"fulfillment-distributioncenteraccordion-pickuplocation",bold:!0,variant:"t6",children:[g,":"]}),(0,r.jsx)(l.Text,{uniqueId:"fulfillment-distributioncenteraccordion-distributioncentername",variant:"t6",children:`${u} ${b}`})]})}),(0,r.jsxs)(R.Button,{uniqueId:"fulfillment-distributioncenteraccordion-distributionCenterDetails-accordionbutton",variant:"text-button",sx:{display:"flex",alignItems:"center",gap:s.m72,color:s.hGW,textDecoration:"none"},onClick:d,onKeyDown:e=>{("Enter"===e.key||"Space"===e.key||"ArrowDown"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),d())},"aria-expanded":n,children:[y,n?(0,r.jsx)(V.A,{width:18,height:18}):(0,r.jsx)(F.A,{width:18,height:18})]}),n&&(0,r.jsxs)(v.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",ga
98p:s.iAn,alignSelf:"stretch"},children:[(0,r.jsxs)(v.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:s.m72,alignSelf:"stretch"},children:[(0,r.jsx)(v.default,{children:p.map((e,t)=>(0,r.jsx)(l.Text,{uniqueId:`fulfillment-distributioncenteraccordion-distributionCenterDetails-address-${t}`,variant:"t6",children:e},`Address-${e}-${t}`))}),(0,r.jsx)(q.Link,{"aria-label":`${x} ${u}`,color:s.S6v,href:f,variant:"t6",underline:"always",uniqueId:"fulfillment-distributionCenterAccordion-distributionCenterDetails-getdirections",target:"_blank",children:x})]}),(0,r.jsxs)(v.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",alignSelf:"stretch"},children:[(0,r.jsx)(l.Text,{uniqueId:"fulfillment-distributionCenterAccordion-distributionCenterDetails-pickuphours",variant:"t7",children:S}),[...m,...h].map(e=>(0,r.jsx)(l.Text,{uniqueId:`fulfillment-distributionCenterAccordion-distributionCenterDetails-hours-${e.key}`,variant:"t7",children:e.label},`Hours-${e.key}`))]}),(0,r.jsx)(l.Text,{uniqueId:"fulfillment-distributionCenterAccordion-distributionCenterDetails-distributioncenterinfo",variant:"t7",color:"medium",children:C})]})]})};
98var K=i(5514),G=i(67666),Y=i(87540),Q=i(80281),Z=i(73321);let J=()=>{let{translations:e,selectedChildItem:t,fulfillmentData:i}=(0,b.r)(),[a,n]=(0,c.useState)(""),l=(0,Z.useRouter)(),{trackEvent:o}=(0,d.z1)(),{inventory:{processed:{data:s}}}=i,p=t?.merchAssoc&&t?.merchAssoc.find(({type:e})=>"REPLACEMENT"===e)?.itemNumberTo,{replacementitemfrom:m="",replacementitemto:h=""}=e,f=t?.id===p,g=s.availability===u.RO.UNAVAILABLE;if((0,c.useEffect)(()=>{n(sessionStorage.getItem("replacedItemNo")||"")},[]),(0,c.useEffect)(()=>{a&&sessionStorage.removeItem("replacedItemNo")},[a]),!p||!f&&!g||f&&!a)return null;let x={component:{type:"nav",identifier:"Product Details",trackedData:["Unavailable Item",f?`Replacement ${p}`:`Unavailable ${a}`]},doNotTrack:!1,trackType:"navigation"},v=f&&a?m.replace("{{itemNumberTo}}",p).replace("{{itemNumberFrom}}",a||""):h.replace("{{itemNumberTo}}",p).replace("{{itemNumberFrom}}",t?.id||"");return(0,r.jsx)(y.A,{severity:f?"general":"alert",message:v,id:"alert-item-replacement",cb:()=>{o(x),f?l.push(a):(l.push(p),sessionStorage.setItem("replacedItemNo",String(t?.id)))}})};var X=i(60248);let ee=()=>{let{miniBannerDetails:e,wcCartOrder:{value:t=0}}=(0,N.B)(),{translations:i}=(0,b.r)(),a=e?.values?.deliverySurcharge??null,n=e?.values?.freeDeliveryOrderAmount??null,{deliverysurchargetooltipcontent:o="",deliverysurchargewaived:d="",deliverysurchargecurrentorder:c="",deliverysurchargeprogressadd:u="",deliverysurchargeprogressaria:p="",deliverysurchargeprogressremove:m=""}=i;if(![o,d,c,u,p,m].every(Boolean))return null;let h=(Number(n)-Number(t)).toFixed(2),f=(Number(t)/Number(n)*100).toFixed(2),g=Number(t)>=Number(n),y=(0,r.jsxs)(l.Text,{uniqueId:"delivery-surcharge-message",children:[u," ",(0,r.jsxs)(l.Text,{component:"span",bold:!0,uniqueId:"delivery-surcharge-remaining-label",children:["$",h]})," ",m.replace("{{surcharge}}",Number(a).toFixed(0))]}),x=(0,r.jsx)(l.Text,{bold:!0,color:"success",uniqueId:"delivery-surcharge-waived",children:d}),S=o.replace("{{target}}",String(n)).replace("{{surcharge}}",String(a));return a&&n?(0,r.jsx)(v.default,{sx:{mt:s.D3H},"data-testid":"delivery-surcharge",children:(0,r.jsxs)(X.Grid,{container:!0,spacing:1,hasMargin:!1,alignItems:"center",children:[(0,r.jsx)(X.Grid,{children:g?x:y}),(0,r.jsx)(X.Grid,{children:(0,r.jsx)(C.m,{buttonAriaLabel:"tooltip",buttonContent:(0,r.jsx)(T.A,{color:s.hGW,width:s.x9N}
98),content:S,position:"bottom-end",tooltipId:"bd-surcharge-tooltip"})}),(0,r.jsx)(v.default,{sx:{width:"100%"},role:"img","aria-label":p.replace("{{target}}",String(n)).replace("{{surcharge}}",String(a)),children:(0,r.jsxs)(X.Grid,{size:12,children:[(0,r.jsxs)(X.Grid,{wrap:"nowrap",container:!0,spacing:s.iAn,hasMargin:!1,alignItems:"center",children:[(0,r.jsx)(X.Grid,{size:12,children:(0,r.jsx)(v.default,{sx:{border:`${s.RYE} solid ${s.vn6}`,height:s.Mzk,overflow:"hidden"},children:(0,r.jsx)(v.default,{sx:{bgcolor:s.vn6,height:"100%",minWidth:5,width:`${Math.min(100,Number(f))}%`}})})}),(0,r.jsx)(X.Grid,{children:(0,r.jsxs)(l.Text,{variant:"t7",uniqueId:"delivery-surcharge-free-delivery-amount",children:["$",n]})})]}),(0,r.jsx)(X.Grid,{size:12,mt:s.iAn,children:(0,r.jsx)(l.Text,{variant:"t7",uniqueId:"delivery-surcharge-current-order-amount",children:c.replace("{{current}}",t.toFixed(2))})})]})})]})}):(0,r.jsx)(E.Skeleton,{height:72,variant:I.z.Rectangular})},et=()=>{let{wcCartOrder:{value:e=0}}=(0,N.B)(),{translations:t}=(0,b.r)(),{businesspickupthreshold:i="",businesspickuptooltipcontent:a="",businesspickupprogressadd:n="",businesspickupprogressremove:o="",businesspickupmet:d="",businesspickupcurrentorder:c="",businesspickupprogressaria:u="",businesspickupinstruction:p=""}=t;if(![i,a,n,o,d,c,u,p].every(Boolean))return null;let m=(Number(i)-Number(e)).toFixed(2),h=(Number(e)/Number(i)*100).toFixed(2),f=Number(e)>=Number(i),g=(0,r.jsxs)(l.Text,{uniqueId:"pickup-minimum-message",children:[n," ",(0,r.jsxs)(l.Text,{component:"span",bold:!0,uniqueId:"pickup-minimum-remaining-label",children:["$",m]}
98)," ",o]}),y=(0,r.jsx)(l.Text,{bold:!0,color:"success",uniqueId:"pickup-minimum-met-message",children:d.replace("{{target}}",String(i))}),x=a.replace("{{target}}",String(i));return(0,r.jsx)(v.default,{sx:{mt:s.D3H},"data-testid":"pickup-minimum-order",children:(0,r.jsxs)(X.Grid,{container:!0,spacing:1,hasMargin:!1,alignItems:"center",children:[(0,r.jsx)(X.Grid,{children:f?y:g}),(0,r.jsx)(X.Grid,{children:(0,r.jsx)(C.m,{buttonAriaLabel:"tooltip",buttonContent:(0,r.jsx)(T.A,{color:s.hGW,width:s.x9N}),content:x,position:"bottom-end",tooltipId:"bd-pickup-minimum-tooltip"})}),(0,r.jsxs)(v.default,{sx:{width:"100%"},role:"img","aria-label":u.replace("{{current}}",e.toFixed(2)).replace("{{target}}",String(i)),children:[(0,r.jsx)(X.Grid,{size:12,children:(0,r.jsxs)(X.Grid,{wrap:"nowrap",container:!0,spacing:s.iAn,hasMargin:!1,alignItems:"center",children:[(0,r.jsx)(X.Grid,{size:12,children:(0,r.jsx)(v.default,{sx:{border:`${s.RYE} solid ${s.vn6}`,height:s.Mzk,overflow:"hidden"},children:(0,r.jsx)(v.default,{"aria-hidden":"true",sx:{bgcolor:s.vn6,height:"100%",minWidth:5,width:`${Math.min(100,Number(h))}%`}})})}),(0,r.jsx)(X.Grid,{children:(0,r.jsxs)(l.Text,{"aria-hidden":"true",variant:"t7",uniqueId:"pickup-minimum-threshold",children:["$",i]})})]})}),(0,r.jsx)(X.Grid,{size:12,mt:s.iAn,children:(0,r.jsx)(l.Text,{"aria-hidden":"true",variant:"t7",uniqueId:"pickup-minimum-current-order-amount",children:c.replace("{{current}}",e.toFixed(2))})})]}),(0,r.jsx)(X.Grid,{size:12,children:(0,r.jsx)(l.Text,{uniqueId:"pickup-minimum-instruction",children:p})})]})})};var ei=i(65556),er=i(44987);let ea=({isDrawerContent:e=!1,locale:t})=>{let i,a,o,{trackEvent:v}=(0,d.z1)(),{isMobile:S}=(0,p.G)(),[C,E]=(0,c.useState)(null),{warehouseDrawerRef:I,openWarehouseDrawer:T}=(0,m.e)(),{onZipCodeDrawerOpen:A}=(0,z.M)(),[D,_]=(0,K.T)(),{initialLoadingState:O=!0}=D||{},N=(0,b.r)(),{translations:j,productFlags:{isWioProduct:P,isBopiwProduct:R,isShipToWarehouse:k,isSameDayDelivery:L,isFsaOrChdEligible:M,isBuyable:B,isWarehouseOnly:$,isLinkOutProduct:q,isFloral:V},featureFlags:{isWioEnabled:F,isBopiwOrSTWEnabled:W},selectedWarehouse:Z,fulfillmentData:{mdoLocation:X,pickUp:ea},selectedChildItem:en,destination:el}=N,{fulfillmentMolecules:eo,isLoaded:es}=(0,ei.f)(t),ed=(0,er.m)(t,{isWarehouseOnly:$}),ec=(0,c.useMemo)(()=>(0,g.Qi)(ea?.data,Z),[ea?.data,Z]);(0,c.useEffect)(()=>{if(!es)return;if(0===eo.length)return void _({initialLoadingState:!1});let e=eo[0];_({...{...eo.find(e=>e.isAvailable)||e,...ec},initialLoadingState:!1})},[eo,es,ec,_]),(0,c.useEffect)(()=>{es&&(ea.isError?E(ea.isError):E(null))},[ea.isError,es]);let eu=(0,c.useCallback)(e=>{let i=D?.id!==e.id;if(_({...{...e,...ec},initialLoadingState:!1}),!M&&i){let i=(0,f.wT)(e.id,t);v({trackType:"fulfillment",trackedData:`ui:Product Detail | Fulfillment | ${i}`})}},[ec,_,v,M,t,D?.id]),ep=q||!B,em=P&&F;if(!en||ep&&!L&&!em)return null;let eh=V&&D?.isAvailable,ef=!el.destinationPostalCode&&!el.destinationState;return(0,r.jsx)(n.l,{cornerStyle:S?"square":"rounded",sx:e?x.e6:x.oM,"data-testid":"fulfillment",children:(0,r.jsxs)(G.default,{sx:{display:"flex",flexDirection:"column",gap:s.iAn},children:[(0,r.jsx)(l.Text,{bold:!0,component:"h2",uniqueId:"fulfillment-card-title",id:Q.D,variant:"t3",children:j?.howtogetit}),(0,r.jsx)(J,{}),(0,r.jsx)(y.A,{...(D?.alert?.message?(i=D.alert.message,a=D.alert.linkId,o=()=>A()):C&&(i=j?.checknearbywarehousesalertmessage,a="alert-checknearbywarehouses",o=()=>T()),{message:i,id:a,cb:o})}),(0,r.jsxs)(G.default,{sx:{display:"flex",flexDirection:"column",gap:s.D3H},children:[(0,r.jsxs)(x.Ml,{"data-testid":"fulfillment-zipCode-and-warehouse-selector",children:[(0,r.jsx)(U,{locale:t,initialLoadingState:ef||O||!1}),em||R&&W||k&&W?(0,r.jsx)(w,{ref:I,locale:t}):null]}),(B||L||!ed)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.A,{isLoading:ef||N.fulfillmentData.isLoading||O||!1,options:eo,selected:D,onSelect:eu}),(0,r.jsx)(Y.A,{primaryInfo:D?.primaryInfo,secondaryInfo:D?.secondaryInfo,tertiaryInfo:D?.tertiaryInfo,showFloralDelivery:eh}),D?.enablePickupMinimium?(0,r.jsx)(et,{}):null,D?.enableDeliverySurcharge?(0,r.jsx)(ee,{}):null,D?.id===u.Oi.MDO_PICKUP&&(X.data?(0,r.jsx)(H,{locale:t,translations:j,mdoLocationData:X.data}):X.isError?(0,r.jsx)(y.A,{message:j?.distributioncenterdetailsalertmessage||""}):null)]})]})]})})};var en=i(45969),el=i(15154),eo=i(34291),es=i(59555);let ed=({locale:e,isDrawerContent:t=!1,productDetailsData:i,pageSettings:d})=>{let{translations:c}=(0,b.r)(),{isMobile:u}=(0,eo.A)(),{priceDetails:p}=(0,en.A)(),m=p?.priceData?.displayPrice?.deliveredPrice||p?.priceData?.sourcePrice?.listPrice||"",{productData:h}=i||{},{isHighValueItem:f}=(0,el.Ay)({price:Number(m),pageSettings:d,productData:h});return(0,es.Q)(i)?null:f?(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(n.l,{cornerStyle:u?"square":"rounded",sx:t?x.e6:x.oM,"data-testid":"fulfillment",children:(0,r.jsx)(l.Text,{variant:"b2",uniqueId:"shipping-and-handling-text",children:c?.shippingandhandling})})}):(0,r.jsxs)(a.default,{size:{xs:12},children:[(0,r.jsx)(ea,{isDrawerContent:t,locale:e}),t&&(0,r.jsx)(o.Divider,{sx:{marginBottom:s.iAn}})]})}},44987:(e,t,i)=>{i.d(t,{m:()=>l});var r=i(12115),a=i(19359),n=i(7040);let l=(e,t)=>
98{let{productData:i,isWarehouseOnly:l}=t||{},o=(0,n.X)(e);return(0,r.useMemo)(()=>!(!(l||i?.productAttributes?.[0]?.object.some(e=>e.key===a.PC))||o?.isEnabled),[i,o])}},45145:(e,t,i)=>{i.d(t,{A:()=>C,E:()=>S});var r=i(95155),a=i(97766),n=i(43922),l=i(3187),o=i(79176),s=i(24880),d=i(50716),c=i(32921),u=i(12445),p=i(71706),m=i(40045),h=i(70422),f=i(70991),g=i(19909),b=i(7025),y=i(54573),x=i(60931);let v=()=>{let{trackEvent:e}=(0,h.z1)();e({component:{identifier:"Product Detail Accordion",trackedData:["Costco Technical & Warranty Services"],type:"ui"},trackType:"navigation"})},S=(e,t,i)=>{let c="/concierge.html",u=(0,x.parse)(e);i&&u.querySelectorAll(".tv-concierge-linkout").forEach(e=>{e.setAttribute("href",i)});let p=u.querySelectorAll("p, div").map(e=>e.toString()),m=p.filter(e=>!e.includes(`href="${c}"`)),h=p.find(e=>e.includes(`href="${c}"`)),g=m.length?m.map((e,t)=>(0,r.jsx)(n.c,{uniqueId:`warranty-${t}`,children:(0,d.Ay)(e,{replace:e=>{if((0,f.vq)(e)&&"i"===e.name&&"fi-check"===e.attribs.class)return(0,r.jsx)(a.A,{titleAccess:"included",style:{color:s.Kl5,marginRight:"7px",height:"20px",width:"18px"}})}})},t)):null,b=h?(0,d.Ay)(h,{replace:e=>{if((0,f.vq)(e)&&"a"===e.name&&e?.attribs?.href===c)return(0,r.jsx)(l.Link,{href:e.attribs.href,target:"_blank",underline:"always",onClick:v,onKeyDown:v,onMouseEnter:v,uniqueId:"warranty-concierge",children:t.warrantyserviceslinktext||""})}}):null;return(0,r.jsxs)(r.Fragment,{children:[g&&(0,r.jsx)(o.B,{uniqueId:"warranty-list",variant:"SimpleList",children:g}),b&&(0,r.jsx)(r.Fragment,{children:b})]})},C=({merchandiseData:e,shipMode:t,selectedChildItem:i,itemType:a,deliveryServiceConfig:n,showServices:l,isEddChubSmallPackOrLTL:o,translations:s,locale:d,warrantyServicesSupportUrl:h})=>{let{deliveryLocation:f}=(0,p.B)(),{fulfillmentData:x}=(0,g.r)(),{inventory:v,isLoading:S}=x||{},C=v?.rawV2?.data||{},E=(C?.availability===b.RO.NOSTOCK&&C?.fulfilledBy,C?.availability,b.RO.SHIPRESTRICTED,f?.zipCode||""),{warrantyServices:I}=(0,y.Y)(!0,{zipCode:E,selectedChildItem:i,shipMode:t,deliveryServiceConfig:n})||{};return(0,r.jsxs)(m.Q0,{children:[(0,r.jsx)(c.A,{merchandiseData:e,translations:s,warrantyServicesSupportUrl:h}),(0,r.jsx)(u.A,{services:I?.services||[],itemType:a,showServices:l,translations:s,locale:d})]})}},45182:(e,t,i)=>{i.d(t,{$S:()=>s,AX:()=>n,Jj:()=>a,Un:()=>o,jQ:()=>d,n9:()=>c,nb:()=>l});var r=i(9527);let a=(0,r.y)(void 0),n=(0,r.y)(),l=(0,r.y)(void 0),o=(0,r.y)(void 0),s=(0,r.y)(null),d=(0,r.y)(new Map),c=(0,r.y)({isOpened:!1,warrantyData:{},productInfo:{id:"",shipMode:""}})},45969:(e,t,i)=>{i.d(t,{A:()=>n});var r=i(12115),a=i(54490);let n=()=>{let e=(0,r.useContext)(a.z);if(!e)throw Error("usePriceApiContext must be used within a PriceApiConfigProvider");return(0,r.useMemo)(()=>e,[e])}},46052:(e,t,i)=>{i.d(t,{default:()=>m});var r=i(95155),a=i(63073),n=i(24880),l=i(34291),o=i(27966),s=i(19359),d=i(62526),c=i(82993);function u({breadcrumbs:e}){let t="https://www.costco.ca",i=[...e.filter(e=>e.link&&e.name).map((e,i)=>({"@type":"ListItem",position:i,name:e.name,item:"home"===e.name.toLowerCase()?t:`${t}${e.link}`}))];return(0,r.jsx)("script",{id:"BreadcrumbListSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:i})}})}var p=i(60714);let m=({productDetailsData:e,pageSettings:t,categoryUrlPath:i})=>{let{modernCategoryRouteFeatureToggle:m}=(0,p.h)(),h=!!m?.isEnabled,{productData:f}=e,{categories:g}=f||{},{translationsMap:b}=t,y=(0,d.U)(b,c.et),{isMobile:x}=(0,l.A)(),v=g?(0,s.s3)(g,i,h,y?.home):[],S=y?.breadcrumbarialabel||"Breadcrumbs";return g?(0,r.jsxs)(o.default,{"data-testid":"breadcrumbs",sx:{pt:n.i_v,pb:{xs:n.iAn,md:n.i_v},pl:{xs:n.Mzk,md:0}},children:[(0,r.jsx)(u,{breadcrumbs:v}),(0,r.jsx)(a.B,{ariaLabel:S,separator:"/",maxItems:x?2:void 0,breadcrumbElements:v,isLastElementClickable:!0,expandText:"Show Breadcrumb Path",trackType:"navigation"})]}):null}},47040:(e,t,i)=>{i.d(t,{default:()=>G});var r,a=i(95155),n=i(23783),l=i(73689),o=i(12129),s=i(27966),d=i(92226),c=i(12158),u=i(34291),p=i(62526),m=i(82993),h=i(19359),f=i(44209),g=i(85425);let b="meta ",y="domain",x="homepage title",v="page title suffix",S="itunes",C=(0,f.unstable_cache)(async({lang:e})=>await g.Ng.ContentType("_site_settings").Query().language(e).where("development_key","site_settings").toJSON().findOne(),["_site_settings"],{revalidate:43200,tags:["pdp","site-settings"]});(0,f.unstable_cache)(async({lang:e})=>{var t;let i,r=await C({lang:e}),a=function(e,t){let i={};for(let r of e)i[r]=t.find(e=>e.key===r)?.value||"";return i}([y,x,v,S],r.key_value);return{metadataBase:new URL(`https://${a[y]}`),title:{template:`%s ${a[v]}`,default:a[x]||""},itunes:{appId:a[S]||""},alternates:{canonical:"/"},...(t=r.key_value,i={},t.filter(({key:e})=>
98e.startsWith(b)).forEach(({key:e,value:t})=>i[e.replace(b,"")]=t||""),i)}});var E=i(87968),I=i(24880),T=i(48475);let A=e=>{let{visitExternalLinkData:t,socialMediaData:i,translations:r}=e,n=r?.sharebuttonarialabel||"Share";return(0,a.jsx)(s.default,{sx:{display:"flex",justifyContent:"end",marginLeft:"auto"},children:(0,a.jsx)(T.l,{ariaLabel:n,buttonAriaLabel:n,pageType:"Product Detail",productShareId:"share-pdp-container",socialMediaData:i,sxButton:{minWidth:0},visitExternalLinkData:t,translations:r})})};var D=i(47774),_=i(12115),O=i(3187),w=i(70422);let N=({shopBrandNameTitle:e,brandName:t})=>{if(!t)return null;let i=encodeURIComponent(t),{trackEvent:r}=(0,w.z1)();return(0,a.jsx)(O.Link,{color:I.S6v,href:`/s?keyword=${i}&refine=||Brand_attr-${i}`,sx:{marginBottom:I.m72},underline:"always",variant:"t5",uniqueId:"shop-brand-name-label",onClick:()=>{r({component:{identifier:`Product Detail | Shop ${t}`,type:"nav"},doNotTrack:!1,trackType:"product-action-button"})},children:`${e} ${t}`})};var j=i(8102),P=i(45969),R=i(28158),k=i(19909),L=i(5514),M=i(7025);let B={[M.RO.INSTOCK]:"https://schema.org/InStock",[M.RO.LOWSTOCK]:"https://schema.org/InStock",[M.RO.NOSTOCK]:"https://schema.org/OutOfStock",[M.RO.UNAVAILABLE]:"https://schema.org/OutOfStock",[M.RO.BACKORDERED]:"https://schema.org/BackOrder",[M.RO.SHIPRESTRICTED]:"https://schema.org/OutOfStock"},$="2-DAY_DELIVERY";var z=((r={}).COLOR="color",r.SIZE="size",r.MATERIAL="material",r.PATTERN="pattern",r);let U={color:"https://schema.org/color",size:"https://schema.org/size",material:"https://schema.org/material",pattern:"https://schema.org/pattern"},q=({itemData:e,shippingType:t,destinationCountry:i="US"})=>{let{price:r,unitPriceData:a,pdpUrl:n,schemaAvailability:l,currency:o,itemCondition:s}=e,d={"@type":"Offer",url:n,availability:l,priceCurrency:o,...r&&{price:r},...s&&{itemCondition:s},...a&&{priceSpecification:{"@type":"UnitPriceSpecification",price:r,priceCurrency:o}}};return t?{...d,...((e,t="USD",i="US")=>{let r={"@type":"OfferShippingDetails",shippingDestination:{"@type":"DefinedRegion",addressCountry:i}};switch(e){case $:return{shippingDetails:{...r,shippingRate:{"@type":"MonetaryAmount",value:3,currency:t},deliveryTime:{"@type":"ShippingDeliveryTime",handlingTime:{"@type":"QuantitativeValue",minValue:2,maxValue:2,unitCode:"DAY"}}}};case"FREE_SHIPPING":return{shippingDetails:{...r,shippingRate:{"@type":"MonetaryAmount",value:0,currency:t},deliveryTime:{"@type":"ShippingDeliveryTime",transitTime:{"@type":"QuantitativeValue",minValue:5,maxValue:7,unitCode:"DAY"}}}}}})(t,o,i)}:d};function V({productInfo:e}){var t;let{priceDetails:i}=(0,P.A)(),{fulfillmentData:r,destination:n,selectedChildItem:l}=(0,k.r)(),[o]=(0,L.K)(),s=r?.inventory?.processed?.data,{primaryVariantsGroupData:d,processedBatchInfoObj:c}=o||{},u=(t=s?.availability)&&B[t]||"https://schema.org/OutOfStock",{partNumber:p,name:m,image:f,description:g,sku:b,brand:y,isTwoDayDeliveryAvailable:x,ratingCount:v,ratingValue:S,childData:C,priceInfo:E}=e||{},{onlinePrice:I,deliveredPrice:T,currency:A}=i?.priceData?.displayPrice||{},D=(0,R.M)(m,p,"https://www.costco.ca"),_=I||T||E,O="number"==typeof _&&Number.isFinite(_)?Number(_.toFixed(2)):_,w=Array.isArray(d)&&d.length>0,N=C?.map(e=>({...e,price:e.price??O})),j=(0,h.W5)()?"CAD":"USD",M=(0,h.W5)()?"CA":"US",F=(({variantsData:e,stockStatus:t,childItemData:i,isVariants:r,currency:a,parentPdpUrl:n})=>{if(!r||!e?.length)return{};let l=e.some(e=>e.swatchImage),o=(e,r=[],s=new Set)=>{if(!e)return[];let{variantType:d,hasMatched:c,hasPartialMatch:u}=(e=>{if(!e)return null;let t=e.toLowerCase();for(let i of Object.values(z)){if(t===i.toLowerCase())return{variantType:{schemaName:U[i],value:i},hasMatched:!0,hasPartialMatch:!1};if(t.includes(i.toLowerCase()))return{variantType:{schemaName:U[i],value:e},hasMatched:!1,hasPartialMatch:!0}}return{variantType:{schemaName:e,value:e},hasMatched:!1,hasPartialMatch:!1}})(e.key)||{variantType:void 0,hasMatched:!1,hasPartialMatch:!1},p=[...r,{key:e.key,value:e.value,variantType:d,hasMatched:c,swatchImage:e.swatchImage,hasPartialMatch:u}];if(!e.children||0===e.children.length){let{imageName:r,description:o,name:d,price:c}=i?.find(t=>
98t.id===e.itemNumber)||{},u={"@type":"Product",sku:e.itemNumber,image:r,name:d,description:o},m=[],h=p.find(e=>e.swatchImage),f=encodeURIComponent(`${h?.key}:${h?.value}`.toLowerCase());for(let e of p)e.hasMatched&&e.variantType?.schemaName?(s.add(e.variantType.schemaName),u[e.variantType.value]=e.value):(e.hasPartialMatch&&e.variantType?.value&&s.add(e.variantType?.value),m.push({"@type":"PropertyValue",name:e.key,value:e.value}));return 1===m.length?u.additionalProperty=m[0]:m.length>1&&(u.additionalProperty=m),u.offers=q({itemData:{price:c??0,pdpUrl:l?`${n}?preselect=${f}`:n,schemaAvailability:t?.[e.itemNumber]?"https://schema.org/OutOfStock":"https://schema.org/InStock",currency:a??"USD",itemCondition:"https://schema.org/NewCondition"}}),[u]}let m=[];for(let t of e.children){let e=o(t,p,s);m.push(...e)}return m},s=[],d=new Set;for(let t of e){let e=o(t,[],d);s.push(...e)}return{variesBy:Array.from(d),hasVariant:s}})({variantsData:d,stockStatus:c,childItemData:N,isVariants:w,currency:A??j,parentPdpUrl:D}),W={"@context":"https://schema.org","@type":"Product",name:m,image:f,description:g,sku:b,url:D,brand:{"@type":"Brand",name:y},aggregateRating:{"@type":"AggregateRating",ratingValue:S,ratingCount:v},...!w&&{offers:q({itemData:{price:O,unitPriceData:void 0,pdpUrl:D,schemaAvailability:u,currency:A??j},shippingType:x?$:"",destinationCountry:n?.destinationCountryCode||M})},...F};return(0,a.jsx)("script",{id:"ProductSchema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(W)}})}var F=i(38734),W=i(87358);let H=({locale:e,productDetailsData:t,pageSettings:i,externalLinkData:r,pillBadgesConfig:n,translations:f})=>{let{isMobile:g}=(0,u.A)(),{productData:b,selectedChildItemNumber:y,priceInfo:x}=t,[v]=(0,F.N)(),S=v?.value||y,{id:C,childCatalogData:T,productType:O,programTypes:w,ratingCount:P,ratingScore:R,isEligibleForReviews:k,descriptions:L}=b||{},M=T?.find(e=>e.id===S),[B,$]=(0,_.useState)(M),{descriptions:z,productAttributes:U,factor:q,uom:H}=B||{},K=(0,_.useMemo)(()=>{let e="";if(b?.productAttributes?.length&&b?.productAttributes[0]?.object?.length){let t=b.productAttributes[0]?.object.find(e=>e?.key==="Brand"||e?.key==="Marque");e=t?.value||""}return e},[b?.productAttributes]),G=null;z&&z.length>0&&(G=z[0]);let{shortDescription:Y,features:Q,imageName:Z}=L?.[0]?.object||{},{properties:J}=i||{shareSocialMediaItems:[]},X=J&&J[0]?.shareSocialMediaItems||[],{childItemNumber:ee,childModelNumber:et}=T&&U?(0,h.FX)(B,b?.productAttributes?.[0]):{childItemNumber:null,childModelNumber:null},{translationsMap:ei}=i,er=(0,p.U)(ei,m.et),ea=er.item?.replace("{{itemNumber}}",ee??""),en=" | "+er.model?.replace("{{modelNumber}}",et??""),el=ee&&et?ea+en:ea,eo=W.env.NEXT_PUBLIC_DOMAIN_URL||"",es=O!==l.ch.COSTCO_NEXT&&k&&!(0,h.G8)(),ed=(0,j.G)(t)?er?.reviewmessage:"",ec=((e,t,i)=>{if(!i||!i.length)return null;let{defaultColor:r,colorMap:a,catalogSearchUrl:n}=e||{};return(i?.flatMap(e=>e.object.filter(e=>!0===e.isPills||"Model"===e.key))?.sort((e,t)=>("number"==typeof e.displaySequence?e.displaySequence:1/0)-("number"==typeof t.displaySequence?t.displaySequence:1/0))||[]).map(e=>{let i=encodeURIComponent(e.value?.toLocaleLowerCase()||""),l=`${t}/${n}${i}`,o=e.value?.replace(/[\s]|[&/\\#,+()$~%.:;*?<>{}]/g,"_")||"",s=a?.[o]||r;return"Model"===e.key?null:{color:s,link:l.toString(),text:e.value}}).filter(e=>!!e)||[]})(n,eo,b?.productAttributes)||[];(0,_.useEffect)(()=>{$(T?.find(e=>e.id===S))},[S,T]);let eu=(0,h.s8)(Q||"")||"",ep=(0,h.s8)(Y||"")||"",em=T?.map(e=>({imageName:e.descriptions?.[0]?.object?.imageName,description:`${Y||""}, ${eu}`.trim(),name:(0,h.s8)(e.descriptions?.[0]?.object?.shortDescription||""),id:e.id})),eh={name:Y||"",image:G?.object?.imageName||Z||"",description:`${Y||""}, ${eu}`.trim(),sku:ee||"",brand:K||"",partNumber:C||"",factor:Number(q||""),uom:H||"",isTwoDayDeliveryAvailable:w?.includes("2DayDelivery")||!1,childData:em,ratingValue:Number((R??0).toFixed(2)),ratingCount:Number(P??0),priceInfo:x?.displayPrice?.onlinePrice};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(V,{productInfo:eh}),(0,a.jsx)(o.default,{size:{xs:12},children:(0,a.jsx)(s.default,{tabIndex:-1,"data-testid":"product-description",id:"productDescriptionDesktop",children:(0,a.jsxs)(d.l,{cornerStyle:g?"square":"rounded",children:[ec.length>0&&(0,a.jsxs)(s.default,{sx:{display:"flex"},children:[(0,a.jsx)(E.W,{pillBadges:ec,uniqueId:"pillBadges"}
98),(0,a.jsx)(A,{socialMediaData:X,visitExternalLinkData:r,translations:f})]}),(0,a.jsxs)(s.default,{sx:{display:"flex"},children:[(0,a.jsxs)(s.default,{children:[(0,a.jsx)(N,{shopBrandNameTitle:er?.shopbrandnametitle||"Shop",brandName:K}),(0,a.jsx)(s.default,{sx:{display:"flex",justifyContent:"space-between",paddingBottom:I.iAn},children:(0,a.jsx)("h1",{style:{margin:"0px"},children:(0,a.jsx)(c.Text,{color:"default",variant:"t1",uniqueId:"brand-name",id:C||void 0,children:(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:ep}})})})}),(0,a.jsx)(c.Text,{color:"light",variant:"t7",uniqueId:"item-number",children:el})]}),0===ec.length&&(0,a.jsx)(A,{socialMediaData:X,visitExternalLinkData:r,translations:f})]}),es&&(0,a.jsx)(s.default,{sx:{paddingTop:I.iAn},children:(0,a.jsx)(D.A,{itemNumber:C,locale:e,isMembersAccordion:!1,reviewMessage:ed})})]})})})]})};var K=i(60714);let G=({locale:e,productDetailsData:t,pageSettings:i})=>{let r=(0,K.h)(),{accordionExternalLinkCSData:l}=r,o=(0,n.x)(l),s=function(e){let{pillBadgeConfig:t,searchConfig:i,productTileModuleSettings:r}=e,{pillBadgeLangKey:a}=r?.properties[0]?.keys||{};return{pillBadgeConfig:{catalogSearchUrl:i?.custom?.searchConfig?.searchURL,colorMap:t?.custom?.colors?.[a],defaultColor:t?.custom?.color_default}}}(r),{translationsMap:d}=i,c=(0,p.U)(d,m.et);return(0,a.jsx)(H,{locale:e,productDetailsData:t,pageSettings:i,translations:c,externalLinkData:o,pillBadgesConfig:s.pillBadgeConfig})}},47774:(e,t,i)=>{i.d(t,{A:()=>s});var r=i(95155);i(12115);var a=i(12158),n=i(24880),l=i(50197),o=i(89118);let s=({itemNumber:e,isMembersAccordion:t,reviewMessage:i,viewMoreMessage:s})=>{let d=(0,l.Dr)().openedAccordions.includes(o.do.MEMBER_REVIEWS);return(0,r.jsx)(r.Fragment,{children:t?(0,r.jsx)("div",{"data-bv-show":"reviews","data-bv-product-id":`${e}`,id:"CostcoBVContainer",style:{display:d?"block":"none"}}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{"data-bv-show":"rating_summary","data-bv-product-id":`${e}`,id:"CostcoBVReviewContainer"}),i&&(0,r.jsx)(a.Text,{color:"light",variant:"t7",uniqueId:"review-message",sx:{paddingTop:n.iAn},children:i})]})})}},48006:(e,t,i)=>{i.d(t,{Q:()=>a,u:()=>r});let r="Not Sold Separately",a=e=>{let t=e?.selectedChildItemNumber,i=e?.productData?.childCatalogData?.find(({id:e})=>e==t)||e?.productData?.childCatalogData?.at(0),a=e?.productData?.childCatalogData?.find(e=>e.bundleContainerIds?.[0]);return!i?.productAttributes?.at(0)?.object?.find(({identifier:e,type:t})=>"controlling"===t&&e===r)&&!!(i?.bundleContainerIds?.length||a?.bundleContainerIds?.length)}},48195:(e,t,i)=>{i.d(t,{i:()=>o});var r=i(12115),a=i(71706),n=i(30890);let l={signedIn:!1,costcoMember:void 0,validated:!1,verified:!1,active:!1,usage:"",membershipNumber:""};function o(){let{wcMember:e}=(0,a.B)(),[t,i]=(0,r.useState)(l);return(0,r.useEffect)(()=>{i((0,n.fm)())},[e?.value]),t}},48563:(e,t,i)=>{i.d(t,{A5:()=>l,Gk:()=>n,L_:()=>r});let r=e=>Array.isArray(e)?e[0]:e,a=(e,t)=>{if(!e)return e;let i={"en-US":"en-US","en-us":"en-US","en-CA":"en-CA","en-ca":"en-CA","fr-CA":"fr-CA","fr-ca":"fr-CA"}[t]||"en-US";if(e[i])return e[i];for(let t of["en-US","en-CA","fr-CA"])if(e[t])return e[t];return e},n=(e,t)=>{if(!e)return e;let i=Array.isArray(e)?e[0]:e;if(!i)return i;let r=e=>{let i=e?.text||(e?.shortText||e?.longText?e:void 0);if(!i)return e;let r={shortText:a(i.shortText,t),longText:a(i.longText,t)};if(!e.text&&(e?.shortText||e?.longText)){let{shortText:t,longText:i,...a}=e;return{...a,promotionStatement:r}}let{text:n,...l}=e;return{...l,promotionStatement:{...r,disclaimerText:a(n.disclaimerText,t)}}};return i.promotions?.length&&(i.promotions=i.promotions.map(r)),i.temporaryPriceReductions?.length&&(i.temporaryPriceReductions=i.temporaryPriceReductions.map(r)),i.marketingTexts?.length&&(i.marketingTexts=i.marketingTexts.map(r)),i},l=e=>{let t=e?.priceData??[];return t.forEach(e=>{e?.linkFees?.length>0&&e.linkFees.forEach(t=>{if("STANDARD"===t.templateId){let i=t.unitAmount?.amount||0;e.displayPrice[0]?.onlinePrice!==null&&(e.displayPrice[0].onlinePrice+=i),e.displayPrice[0]?.deliveredPrice!==null&&(e.dis
98playPrice[0].deliveredPrice+=i)}})}),{priceData:t}}},48976:(e,t,i)=>{i.d(t,{KF:()=>d,R6:()=>n,gQ:()=>l,qk:()=>s,zs:()=>o});var r,a=((r=a||{}).CHUB_SMALL_PACK="EDD:CHUBSmallPack",r.CHUB_LTL="EDD:CHUBLTL",r.CALENDER="EDD:Calendar",r.COSTCO="EDD:Costco",r.ALTERNATE_CAPACITY="EDD:AlternateCapacity",r.TIRES="EDD:Tires",r);let n=e=>e?.productAttributes?.some(e=>e.object?.some(e=>"EDD:CHUBSmallPack"===e.key||"EDD:CHUBLTL"===e.key)),l=e=>e?.productAttributes?.some(e=>e.object?.some(e=>"EDD:CHUBLTL"===e.key)),o=e=>void 0!==e&&!!e?.productAttributes?.some(e=>e.object?.some(e=>e.key?.includes("EDD"))),s=e=>e.productAttributes?.some(e=>e.object?.some(e=>"EDD:Calendar"===e.key||"EDD:Costco"===e.key||"EDD:AlternateCapacity"===e.key||"EDD:Tires"===e.key)),d=e=>e.productAttributes?.some(e=>e.object.some(e=>"Delivery Method"===e.key&&"Email"===e.value))},50197:(e,t,i)=>{i.d(t,{Dr:()=>r.useAccordionContext}),i(31375);var r=i(55816)},51183:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(12115),a=i(93280),n=i(13639),l=i(60714),o=i(71706),s=i(64638);let d=({itemNumber:e,shouldCheckAvailability:t,avoidSCInventory:i})=>{let{availabilityServiceConfig:d,scInventoryUpdateServiceConfig:c}=(0,l.h)(),{bdWarehouseNumber:u,bdDeliveryLocation:p}=(0,o.B)(),m=u?.value||"",h=p?.zipCode||"",f=!!(e&&m&&h)&&!1!==t,{availabilityData:g,isLoading:b,isValidating:y,isError:x}=(0,n.zM)({childItemNumber:e,whsNumber:m,serviceConfig:d},f),v=g?.availabilityData,S=f&&v?.isExcluded===!1&&!i,{scInventoryData:C,isLoading:E,isValidating:I,isError:T}=(0,a.xn)({childItemNumber:e,whsNumber:m,serviceConfig:c},S);return{state:(0,r.useMemo)(()=>{if(b||S&&E)return;if((x||S&&T)&&!i)return s.tu.ZIP_CODE_UNAVAILABLE;if(!g)return;let{isExcluded:e}=v||{};return i&&e?s.tu.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER:e?s.tu.ZIP_CODE_UNAVAILABLE:C?.itemInvData?.isAvailable?s.tu.ZIP_CODE_AND_PRODUCT_AVAILABLE:s.tu.ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK},[b,E,x,T,g,C]),isLoading:b||E,availabilityData:g,scInventoryData:C,isValidating:y||I,isError:!!(x||T)}}},51296:(e,t,i)=>{i.d(t,{J:()=>a,Q:()=>r});let r=e=>{let{errorMessage:t,orderErrMsgObj:i,customErrorLabel:r}=e||{};return!!(r||t||Object.values(i||{}).length>0)},a=(e,t,i,r,a,n)=>({navigation:{component:{type:"nav",identifier:"Product Details",trackedData:[t,"Add"]},doNotTrack:!1,trackType:"navigation"},cartAdd:{trackedData:{cartAdd:"Product Detail",product:[{pid:t,sku:i,quantity:r,channel:a,starRating:n}]},doNotTrack:!1,trackType:"pdp-add-to-cart"}})},51551:(e,t,i)=>{i.d(t,{G9:()=>v,IK:()=>y,Qi:()=>x,TI:()=>h,ds:()=>b,lx:()=>f,zH:()=>m,zc:()=>p});var r=i(27866),a=i.n(r),n=i(53401),l=i.n(n),o=i(47370),s=i.n(o),d=i(24880),c=i(7025),u=i(98216);a().extend(s()),a().extend(l());let p=({productFlags:e,featureFlags:t,checkVariants:i=!1,pickUpCenter:r})=>{let{isWioProduct:a,isBopiwProduct:n,isBopimProduct:l,isShipToWarehouse:o,isVariantProduct:s}=e,{isWioEnabled:d,isBopiwOrSTWEnabled:c,isBopimEnabled:u}=t;return i&&s?!!(a&&d&&!n&&!l&&!o||u&&l&&!r):!!(a&&d||n&&c||l&&u||o&&c)},m=({isBopimEnabled:e,isBopimProduct:t,pickUpData:i})=>!!(e&&t&&i?.warehouseAvailability?.ltlPickUp?.buyable&&i?.warehouseAvailability?.ltlPickUp?.availability!==c.RO.NOSTOCK),h=({pickUpData:e,translations:t,productFlags:i,productData:r,inventoryStatus:n,isWarehouseBopiwEligible:l,featureFlags:o,isPickUpError:s=!1,locale:d,isWapoEnabled:p=!1})=>{let m=e?.warehouseAvailability?.useWarehouseInventory,h=m?.buyable===!0,f=m?.availability===c.RO.INSTOCK,b=e?.shipToWarehouse,y=g({pickUpData:e,productFlags:i,inventoryStatus:n});if(!s&&!m&&!b)return;let x=!!(i.isBopiwProduct&&o.isBopiwOrSTWEnabled&&m&&l&&h&&f),v=!!(i.isShipToWarehouse&&o.isBopiwOrSTWEnabled&&y),S=e?.warehouseAvailability?.inWarehouse?.availability,C=!!(i.isWioProduct&&p&&S&&S!==c.RO.NOSTOCK);if(i.isBopiwProduct&&o.isBopiwOrSTWEnabled&&l&&(m||s)){if(x){let i=((e,t)=>{let i="",{buyable:r,orderCutOff:n,orderPickup:l}=e?.warehouseAvailability?.useWarehouseInventory||{},o=e?.orderPickupLocalTime||l,s=e?.orderCutOffLocalTime||n;if(!r||!s||!o)return i;let d=a()(o),c=a()(s),u=a()(),p=a()(l).startOf("day").diff(u.startOf("day"),"day"),m=t?.tomorrowtext||"",h=t?.fourhourstext||"";return(u.isSame(d)||u.isAfter(d))&&u.isBefore(c)?i=h:p<=1?i=`${m}`:p>1&&(i=`${a()(l).format("ddd, MMM DD")}`),i})(e,t);return{EDD:i===t?.fourhourstext?t?.readywithintext||"":t?.getitassoonas||"",isAvailable:f,label:t?.pickuplabel||"",timeframe:i,id:c.Oi.PICKUP,secondaryLabel:t?.atwarehouse||"",...f&&{primaryInfo:[{shipType:`${t?.pickuplabel}`||"",shipCost:t?.shippingandhandling||""}],secondaryInfo:[{text:t?.memberonlyprimaryinfo||""}]}}}else if(!v&&(s||!h||!f)){if(p&&i.isWioProduct)return;return{EDD:(!h||!f)&&t.unavailable||"",isAvailable:!1,label:t?.pickuplabel||"",timeframe:"",id:c.Oi.PICKUP,secondaryLabel:t?.atwarehouse||""}}}if(!x&&!C&&v){let e=y?b?.estimatedDeliveryDate?(0,u.qk)(b?.estimatedDeliveryDate,d):t?.fallbacktimeframe||"":"",i=r.sanitizedDeliveryStatement&&(0,u.PB)({rawData:r.sanitizedDeliveryStatement,shippingInfo:t?.shippingandhandlinginfo||"",deliveryStatement:r.deliveryStatement||""})||"";return{EDD:t?.estimated||"",isAvailable:y,label:t?.pickuplabel||"",timeframe:e,id:c.Oi.SHIP_TO_WAREHOUSE,tertiaryInfo:i}}},f=({pickUpData:e,translations:t,productFlags:i,hasMdoData:r=!1,featureFlags:a,isPickUpError:n=!1,locale:l})=>{let o=e?.warehouseAvailability?.ltlPickUp,s=o?.buyable===!0,d=o?.availability!==c.RO.NOSTOCK;if((n||o)&&i.isBopimProduct&&a.isBopimEnabled&&o&&s&&d){let e=d&&o?.orderPickup?(0,u.qk)(o.orderPickup,l):"";return{EDD:t?.estimated||"",isAvailable:d,label:t?.pickuplabel||"",timeframe:e,id:c.Oi.MDO_PICKUP,secondaryLabel:t?.atdistributioncenter||"",...d&&r&&{primaryInfo:[{shipType:`${t?.pickuplabel}`||"",shipCost:t?.shippingandhandling||""}]}}}},g=({pickUpData:e,productFlags:t,inventoryStatus:i})=>{if(!e)return!1;let r=e?.shipToWarehouse,a=r?.availability;return!!(t.isSiteControlledInventory&&[c.RO.INSTOCK,c.RO.SHIPRESTRICTED].includes(i))||!!(r?.availableForSale&&a!==c.RO.NOSTOCK&&!t.isSiteControlledInventory)},b=(e,t)=>{if(!e?.warehouseAvailability)return c.RO.NOTSOLD;let{warehouseAvailability:{inWarehouse:i,useWarehouseInventory:r}}=e,{isWarehouseBopiwEnabled:a,isWarehouseWioEnabled:n}=t;return a&&r?.buyable&&r?.availability?r.availability:n&&i?.availability?i.availability:c.RO.NOTSOLD},y=({translations:e,warehouseStatusInfo:t,pickUpData:i,isVariantProduct:r,isWarehouseBopiwEligible:a,isWarehouseWioEligible:n,isPickupError:l,warehousePriceOnlineFeatureToggle:o})=>{let{text:s,color:u}=t,{buyinwarehouse:p="",warehousepricemayvary:m="",optionscolorsandsizesmayvary:h=""}=e||{},{inWarehouse:f,useWarehouseInventory:g}=i?.warehouseAvailability||{},b=f?.availability,y=b===c.RO.INSTOCK||b===c.RO.LOWSTOCK,x=g?.availability,v=g?.buyable&&(x===c.RO.INSTOCK||b===c.RO.LOWSTOCK),S=!l&&y&&n&&(!v||v&&!a)?o?.isEnabled?void 0:p:void 0,C=[];return(y&&n||!b&&v&&(a||n))&&(r&&C.push({text:h,textVariant:"t7",textSx:{color:d.BO},uniqueId:"sub_text_optionscolorsandsizesmayvary"}),l||o?.isEnabled||C.push({text:m,textVariant:"t7",textSx:{color:d.BO},uniqueId:"sub_text_warehousepricemayvary"})),{statusText:s,statusTextSx:{color:u,fontWeight:d.Pqj},suffixText:S,textBlocks:C,uniqueId:"warehouseSelector_stockstatus"}},x=(e,t)=>({isPickUp:!!e?.warehouseAvailability?.useWarehouseInventory?.buyable,selectedWarehouse:t,estimatedDeliveryDate:e?.warehouseAvailability?.useWarehouseInventory?.orderPickup||e?.shipToWarehouse?.estimatedDeliveryDate||"",ltlPickUpLocation:e?.warehouseAvailability?.ltlPickUp?.buyable&&e?.warehouseAvailability?.ltlPickUp?.availability!==c.RO.NOSTOCK&&e?.warehouseAvailability?.ltlPickUp?.fulfillmentCenter||"",estimatedPickupDate:e?.warehouseAvailability?.ltlPickUp?.buyable&&e?.warehouseAvailability?.ltlPickUp?.availability!==c.RO.NOSTOCK&&e?.warehouseAvailability?.ltlPickUp?.orderPickup||""}),v=(e,t)=>
98{if(e&&t)return a().tz(e,t).local().toDate()}},52378:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(95155),a=i(6e4),n=i(12158),l=i(68409),o=i.n(l);let s="You are about to visit an external link. Do you want to continue?",d=({href:e,isOpen:t,setOpen:i,onCloseHandler:l,translations:d})=>{let c=d?.visitexternaltext||"Visit External Link",u=d?.canceltext||"Cancel",p=(()=>{let e=d?.customizeorderexternaltext;if("string"!=typeof e||""===e.trim())return s;try{let t=o().sanitize(e);return t&&""!==t.trim()?t:s}catch(e){return console.error("Failed to sanitize external link modal message. Using default message instead."),s}})();return(0,r.jsx)(a.a,{buttons:[{action:()=>{e&&"string"==typeof e&&(window.open(e,"_blank"),i(!1))},text:c},{action:l,text:u}],closeAriaLabel:d?.close,modalTitle:d?.visitexternaltext||"Visit External Link",hideBackdrop:!1,isOpen:t,onClose:l,children:(0,r.jsx)(n.Text,{uniqueId:"visit-external-link-body",children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:p}})})})}},53898:(e,t,i)=>{i.d(t,{FulfillmentBundleContainer:()=>M});var r=i(95155),a=i(27966),n=i(12129),l=i(12158),o=i(34971),s=i(95097),d=i(92226),c=i(24880),u=i(53236),p=i(7025),m=i(58291),h=i(90657),f=i(27944),g=i(12115),b=i(77654);let y=()=>{let e=(0,g.useContext)(b.g);if(!e)throw Error("useFulfillmentBundleContext must be used within FulfillmentBundleContextProvider");return e};var x=i(13052),v=i(7457),S=i(36370),C=i(71706),E=i(7569),I=i(46286),T=i(60714),A=i(19359),D=i(98216),_=i(57001),O=i(66874);let w=({locale:e})=>{let{deliveryLocation:t,warehouse:i}=(0,C.B)(),{agent:n}=(0,E.f)(),{zipCodeModuleSettings:d}=(0,T.h)(),{translations:u}=y(),{isZipCodeDrawerOpen:m,onZipCodeDrawerOpen:h,onZipCodeDrawerClose:f}=(0,O.M)(),{parentInventoryStatus:b,isLoading:w}=(0,x.MN)(),N=(0,g.useMemo)(()=>(0,A.IP)(d),[d]),j=t?.zipCode||N.locationSelectorDefault,P=(u?.zipcodearialabel??"").replace("{{zipCode}}",j??""),R=(0,g.useMemo)(()=>(0,D.xo)(u,p.aS.DELIVERY),[u]),{color:k,text:L}=b?R[b]:R[p.RO.UNAVAILABLE],M=async({city:e,state:r,zipCode:a})=>{try{let l=await n?.getDistributionCenters(r,a);i.updateWarehouse({nearestWarehouse:i.nearestWarehouse,...l}),t.updateDeliveryLocation({city:e,state:r,zipCode:a})}catch(e){console.error(`[PDP][BundleZipCodeSelector][Error]: ${e}`)}};return w?(0,r.jsx)(o.Skeleton,{variant:s.z.Button,width:124}):n?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(a.default,{sx:{display:"flex",alignItems:"flex-start",gap:c.m72},"data-testid":"bundle-zipCodeSelector",children:[(0,r.jsx)(S.default,{titleAccess:u?.
98shippingtext??""}),(0,r.jsxs)(a.default,{children:[(0,r.jsx)(v.Button,{"aria-label":P,onClick:h,sx:_.h,uniqueId:"bundle-zipcodeSelector",variant:"text-button",children:j}),(0,r.jsx)(l.Text,{bold:!0,sx:{color:k},variant:"t6",uniqueId:"bundle-zipcode-status",children:L})]})]}),(0,r.jsx)(I.P,{isOpen:m,onClose:f,zipCode:j,onSubmit:M,agent:n,moduleSettings:[d],locale:e})]}):null};var N=i(80281),j=i(92069),P=i(87540),R=i(24002);let k=()=>{},L=()=>{let{translations:e,locale:t,destination:i,fulfillmentSettings:n,productFlags:d}=y(),{productDetailsData:{productData:u}}=(0,j.d)(),{isLoading:p,parentInventoryStatus:f,estimatedDeliveryDate:b,isAvaialbleForSale:v,fulfilledBy:S,status:C,isSellableItemsInStock:E}=(0,x.MN)(),{primaryInfo:I,secondaryInfo:T,tertiaryInfo:A,EDD:D,timeframe:_=""}=(0,R.Q)({productData:u,translations:e,locale:t,destination:i,fulfillmentSettings:n,productFlags:d,parentInventoryStatus:f,isAvaialbleForSale:v,status:C,estimatedDeliveryDate:b,fulfilledBy:S}),O=B({parentInventoryStatus:f,EDD:D,deliveryLabel:e?.delivery,timeframe:_});return(({isLoading:e,deliveryStatements:t,fulfillmentSelectorData:i})=>{let[,r]=(0,x.jr)();(0,g.useEffect)(()=>{r({isLoading:e,deliveryStatements:t,EDD:i.EDD,isAvailable:i.isAvailable,label:i.label,timeframe:i.timeframe})},[t.primaryInfo,t.secondaryInfo,t.tertiaryInfo,i.EDD,i.isAvailable,i.label,i.timeframe])})({isLoading:p,deliveryStatements:{primaryInfo:I,secondaryInfo:T,tertiaryInfo:A},fulfillmentSelectorData:{EDD:O.EDD,isAvailable:O.isAvailable,label:O.label,timeframe:O.timeframe}}),(0,r.jsxs)(a.default,{sx:{display:"flex",flexDirection:"column",gap:c.iAn},children:[(0,r.jsx)(l.Text,{bold:!0,component:"h2",id:"bundle-fulfillment-card-title",uniqueId:"bundle-fulfillment-card-title",variant:"t3",children:e?.howtogetit??"How To Get It"}),(0,r.jsxs)(a.default,{sx:{display:"flex",flexDirection:"column",gap:c.D3H},children:[(0,r.jsx)(h.Ml,{children:(0,r.jsx)(w,{locale:t})}),p?(0,r.jsx)(o.Skeleton,{variant:s.z.Rectangular,width:"100%",height:120}):(0,r.jsx)(m.A,{EDD:O.EDD,id:O.id,isAvailable:O.isAvailable,label:O.label,onClick:O.onClick,selected:O.selected,timeframe:O.timeframe,width:O.width}),E&&(0,r.jsx)(P.A,{primaryInfo:I,secondaryInfo:T,tertiaryInfo:A})]})]})},M=({serverData:e})=>{let{isMobile:t}=(0,u.G)();return(0,r.jsx)(n.default,{size:{xs:12},children:(0,r.jsxs)(d.l,{cornerStyle:t?"square":"rounded",sx:h.oM,"data-testid":"bundle-fulfillment",children:[(0,r.jsx)(f.i,{componentItems:e.componentItems??[]}),(0,r.jsx)(L,{})]})})},B=({parentInventoryStatus:e,EDD:t,deliveryLabel:i,timeframe:r})=>{let a=e===p.RO.INSTOCK||e===p.RO.LOWSTOCK;return{EDD:t||"",id:p.Oi.DELIVERY,isAvailable:a,label:i||"",onClick:k,selected:!0,timeframe:r,width:N.N}}},54411:(e,t,i)=>{i.d(t,{default:()=>y});var r=i(95155),a=i(62526),n=i(82993),l=i(68409),o=i.n(l),s=i(7457),d=i(84791),c=i(92226),u=i(12115),p=i(34291),m=i(67666),h=i(19359),f=i(70422);let g=({itemId:e,translations:t,auxDescription1:i,longDescription:a})=>{let[n,l]=(0,u.useState)(!1),g=(0,u.useRef)(null),b=(0,u.useRef)(null),{isMobile:y}=(0,p.A)(),{trackEvent:x}=(0,f.z1)(),v=t?.toplabel||"Top",S=t?.topbuttonarialabel||"Back to Top",C={component:{type:"nav",identifier:"Product Details",trackedData:[e,"Shop Costco Next"]},doNotTrack:!1,trackType:"navigation"},E=o().sanitize(i||""),I=o().sanitize(a||""),T=()=>{let e;x(C),g.current&&E&&(e=(0,h.qK)(E)),!e&&I&&(e=(0,h.qK)(I)),e&&window.open(e,"_blank")};(0,u.useEffect)(()=>{let e=()=>{let e=document.getElementById("shop-costco-next-button"),t=document.getElementById("extra-padding-bottom");if(!e)return;let i=e.offsetTop+e.offsetHeight;window.scrollY>i?(t&&(t.style.display=y?"block":"none"),l(!0)):(t&&(t.style.display="none"),l(!1))};return window.addEventListener("scroll",e),e(),()=>{window.removeEventListener("scroll",e)}},[]);let A=(0,r.jsx)(s.Button,{onClick:e=>{e.preventDefault(),T()},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),T())},variant:"primary",sx:{width:"100%"},href:"#",uniqueId:"shop-costco-next",ref:g,children:t.shopcostconext});return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(m.default,{id:"shop-costco-next-button",ref:b,children:y&&n?(0,r.jsx)(d.n,{stickyPosition:"bottom",extraPaddingBottom:!0,hasTopButton:!0,isMobile:y,uniqueId:"shop-costco-next-button",zIndex:1e3,topButtonAriaLabel:S,topLabel:v,children:A}):(0,r.jsx)(c.l,{cornerStyle:y?"square":"rounded",children:A})})})};var b=i(12129);let y=({productDetailsData:e,pageSettings:t})=>{let{translationsMap:i}=t,l=(0,a.U)(i,n.et),{productData:o}=e,{id:s,descriptions:d}=o||{},c=d?.[0]??null;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(b.default,{size:{xs:12},children:(0,r.jsx)(g,{translations:l,itemId:s,auxDescription1:c?.object.deliveryStatement,longDescription:c?.object.longDescription})})})}},54490:(e,t,i)=>{i.d(t,{m:()=>T,z:()=>I});var r=i(95155),a=i(19359);let n=async(e,t,i,r)=>{let n=r?.replace(/-wh$/,"")??r,{method:l="GET",required_request_parameters:o,required_request_headers:s,endpoint:d}=t,c=o.client_identifier[String("CABC").toLowerCase()]||"",u=o.ware_house[String("CABC").toLowerCase()]||"",p=n&&""!==n?[u,n].filter(
98Boolean).join(","):u,m=String(s?.catalog_api_client_identifier)||"",h=new URLSearchParams({whsNumber:p,clientId:c,item:e,locale:i}),f={method:l,headers:{"Client-Identifier":m,...!1}};try{let t,r,l=await fetch(`${d}?${h}`,f);if(!l.ok&&206!==l.status){let t=(await l.json()).message||"No error message provided";throw Error(`ChildID: ${e}, StatusCode: ${l.status}, StatusText: ${l.statusText}, Error: ${t}`)}let o=await l.json();if(Array.isArray(o?.priceData)&&o.priceData.length>0){let e=o.priceData[0];if(Array.isArray(e?.displayPrice)){let l=e.displayPrice.find(e=>e.warehouseNumber===u),o=e.displayPrice.find(e=>e.warehouseNumber===n),s=Array.isArray(e?.discounts)?e.discounts.find(e=>e.warehouseNumber===u):void 0,d=Array.isArray(e?.discounts)?e.discounts.find(e=>e.warehouseNumber===n):void 0;l&&(t={id:e.id,clientId:e.clientId,warehouseNumber:l.warehouseNumber,locale:i,displayPrice:l,discounts:(0,a.N5)(s,i)}),o&&(r={id:e.id,clientId:e.clientId,warehouseNumber:o.warehouseNumber,locale:i,displayPrice:o,discounts:(0,a.N5)(d,i)})}}return{priceInfo:{priceData:t,priceDataWh:r},status:l.status}}catch(t){let e=t instanceof Error?t.message:String(t);console.error(`[PDP][Price][Error] V3 - ${e}`)}};var l=i(73689),o=i(12115),s=i(38734),d=i(71706),c=i(7040),u=i(87651),p=i(60714),m=i(8424),h=i(37994),f=i(60464),g=i(70746),b=i(8102),y=i(48006);let x=async(e,t,i,r)=>{let{method:a="GET",required_request_parameters:n,required_request_headers:l,endpoint:o}=i,s=n.client_identifier[String("CABC").toLowerCase()]||"",d=n.ware_house[String("CABC").toLowerCase()]||"",c=String(l?.catalog_api_client_identifier)||"",u=new URLSearchParams({whsNumber:d,clientId:s,item:t.join(","),locale:r}),p={method:a,headers:{"Client-Identifier":c,...!1}};try{let t=await fetch(`${o}?${u}`,p);if(!t.ok){let i=(await t.json()).message||"No error message provided";throw Error(`ProductID: ${e}, StatusCode: ${t.status}, StatusText: ${t.statusText}, Error: ${i}`)}return{priceInfo:await t.json(),status:t.status}}catch(t){let e=t instanceof Error?t.message:String(t);console.error(`[PDP][Price][Error] - ${e}`)}};var v=i(45182),S=i(48563),C=i(47823);let E=async(e,t,i,r,a)=>{let{method:n="GET",required_request_parameters:l,required_request_headers:o,endpoint:s}=t,d=l.client_identifier[String("CABC").toLowerCase()]||"",c=String(o?.catalog_api_client_identifier)||"",p=t?.required_request_parameters?.ware_house?.[String("CABC").toLowerCase()]||"";("CABC"===u._z.USBD||"CABC"===u._z.CABD)&&a.warehouseNumber&&(p=a.warehouseNumber);let m=new URLSearchParams({whsNumber:p,clientId:d,item:e.join(","),country:a.country,locale:r,state:a.state});a.zipCode&&m.append("zipCode",a.zipCode);try{let t=await fetch(`${s}?${m}`,{method:n,headers:{"client-identifier":c}});if(!t.ok){let i=(await t.json()).message||"No error message provided";throw Error(`ItemIDs: ${e.join(",")}, StatusCode: ${t.status}, StatusText: ${t.statusText}, Error: ${i}`)}let r=await t.json();return Array.isArray(r?.priceData)&&r.priceData.forEach(e=>{if(e?.linkFees){let t=i?.properties?.[0]?.priceTemplate,r=i?.properties?.[0]?.feeCategories,n=(0,C.v)(t,r,e.linkFees,a.state,!1);e.linkFees=n.map(e=>({unitAmount:e.unitAmount,description:e.description,feeCategory:e.feeCategory,templateId:e.templateId,linkTypeCode:e.linkTypeCode}))}e?.linkFees?.length>0&&e.linkFees.forEach(t=>{if("STANDARD"!==t.templateId){let i=t.unitAmount?.amount||0;e.displayPrice[0]?.onlinePrice!==null&&(e.displayPrice[0].onlinePrice+=i),e.displayPrice[0]?.deliveredPrice!==null&&(e.displayPrice[0].deliveredPrice+=i)}})}),{priceInfo:r,status:t.status}}catch(t){let e=t instanceof Error?t.message:String(t);throw console.error(`[PDP][DisplayPrice][Full][V3][Error] - ${e}`),t}},I=(0,o.createContext)(null),T=({children:e,lang:t,productDetailsData:i})=>{let[C,T]=(0,o.useState)({priceDetails:void 0,isLoadingPriceAPI:!1,isPriceApiError:!1}),[A]=(0,s.N)(),D=A?.value||i?.selectedChildItemNumber||"",[_]=(0,v.AX)(),[O]=(0,v.nb)(),w=(0,o.useMemo)(()=>_?.map(e=>e.id)||[],[_]),N=(0,o.useMemo)(()=>_?.some(e=>e?.isLinkFeeEligible===!0)||!1,[_]),j=(0,b.G)(i)&&w.length>0,P=(0,y.Q)(i)&&w.length>
980,R=(A?.value||void 0)!==O?.resolvedVariantId,{bdWarehouseNumber:k,isInitialized:L,deliveryLocation:M}=(0,d.B)(),{destinationState:B,destinationPostalCode:$,destinationCountryCode:z}=(0,m.E)(),{selectedWarehouse:U}=(0,g.e)(),{priceDetailsV3ServiceConfig:q,productPricingCardModuleSettings:V,bundlePriceLiteServiceConfig:F,fullPriceDetailsV3ServiceConfig:W}=(0,p.h)(),{priceDetails:H,isLoadingPriceAPI:K,isPriceApiError:G,bundleItemPrice:Y}=C,Q=(0,c.X)(t),Z=Q?.isEnabled,J=(0,a.G8)(),X=(0,a.W5)(),ee="CABC"===u._z.CABC,et=(j||P)&&w.length>0&&!J,ei=ee&&et&&N,er=(0,o.useMemo)(()=>i?.productData?.childCatalogData?.find(e=>e.id===D)?.isLinkFeeEligible||!1,[i?.productData?.childCatalogData,D]),ea=J||ei||er&&ee?W:et?F:q,en=(0,o.useCallback)(async e=>{if(!e)return void console.error("[PDP][PriceProvider][Error] - ChildItemNumber is undefined or null");try{let i=J?z||(X?l.O4.CA:l.O4.US):l.O4.CA,r=J?B:M?.state||"",a=J?$:M?.zipCode||"",o=J&&k?.value||"";if(er&&ee&&!ei||J){let n=await E([e],ea,V,t,{country:i,state:r,zipCode:a,warehouseNumber:o});if(n?.status===200||n?.status===206)return n?.priceInfo;return}if(et){let n=[...new Set([...w,e])],l=ei?E(n,ea,V,t,{country:i,state:r,zipCode:a,warehouseNumber:o}):x(e,n,ea,t),s=await l;if(s?.status===200||s?.status===206)return s?.priceInfo;return}let s=await n(e,ea,t,Q?.isEnabled?U:k?.value);if(s?.status===200||Z&&s?.status===206)return s?.priceInfo}catch(t){console.error(`[PDP][PriceProvider][Error]: Product: ${e}, ${t}`)}},[ea,t,U,k?.value,B,$,z,er,ee,M?.state,M?.zipCode,Q?.isEnabled,n,w]),el=(0,o.useCallback)(async e=>{let i=e=>({priceData:{...e,displayPrice:(0,S.L_)(e?.displayPrice),discounts:(0,S.Gk)(e?.discounts,t)}});try{T(e=>({...e,isLoadingPriceAPI:!0,isPriceApiError:!1}));let t=await en(e);if(!t)return void T({priceDetails:void 0,isLoadingPriceAPI:!1,isPriceApiError:!0});if(et){let r=structuredClone(t),a=t?.priceData?.find(t=>t.id===e);if(!a||!t)return void T({priceDetails:void 0,isLoadingPriceAPI:!1,isPriceApiError:!0});let n=ee&&N?(0,S.A5)(r):t;T({priceDetails:i(a),isLoadingPriceAPI:!1,isPriceApiError:!1,bundleItemPrice:n});return}if(er&&ee&&!ei||J)return void T({priceDetails:i(Array.isArray(t?.priceData)?t?.priceData?.[0]:t?.priceData),isLoadingPriceAPI:!1,isPriceApiError:!1});T({priceDetails:t,isLoadingPriceAPI:!1,isPriceApiError:!1})}catch(t){console.error(`[PDP][PriceProvider][setPriceDetailsState][Error]: Product: ${e}, ${t}`),T({priceDetails:void 0,isLoadingPriceAPI:!1,isPriceApiError:!0})}},[en,t,et]),[{isExcluded:eo,isLoading:es}={}]=(0,h.PZ)(),[{flags:ed}={}]=(0,f.B)(),[{isReplacementItem:ec}={}]=(0,h.jg)(),eu=!0===eo||ec,ep=J&&!!(ed?.isWarehouseOnly||ed?.isTruckload),em=!1===eo&&!1===es&&!1===ec,eh=(0,o.useRef)(null),ef=(0,o.useRef)(!1);(0,o.useEffect)(()=>{let e=async()=>{if(!ef.current){if(J&&!$)return void console.log("[PDP][PriceProvider] Skipping price fetch - BD site without zipcode");if(eo)return void console.log("Skipping price fetch - BD site, product excluded for delivery");if((!Q?.isEnabled||U||et)&&D&&L){if(O?.isBundleStable&&R)return;if(et){let e=JSON.stringify({bundleIds:w,state:M?.state,zipCode:M?.zipCode});if(eh.current===e)return;eh.current=e}else eh.current=null;ef.current=!0;try{await el(D)}finally{ef.current=!1}}}};em&&e()},[eo,es,D,ec,L,J,et,R,w,k?.value,B,$,z,U,el,em,Q?.isEnabled,...X?[M?.zipCode]:[]]);let eg=(0,o.useMemo)(()=>({priceDetails:H,isLoadingPriceAPI:K||!!es,fetchPriceDetails:en,setPriceDetailsState:el,isPriceApiError:G,shouldHidePriceCard:!!eu,showPriceWithOnlyStatement:ep,isExcludedForBusinessDelivery:!!eo,canMakePriceCall:em,bundleItemPrice:Y}),[H,K,es,en,el,G,eu,ep,eo,em,Y]);return(0,r.jsx)(I.Provider,{value:eg,children:e})}},54573:(e,t,i)=>{i.d(t,{Y:()=>s});var r=i(44855);let a=async(e,t,i,r)=>{if(!r)throw Error("PDP Service: mising deliveryServiceConfig");let{endpoint:a,required_request_headers:n}=r||{},l=String("https://ecom-api.costco.com"),o=new URLSearchParams({destinationPostalCode:t,shipMode:i}),s=`${l}/${a}/${e}?${o}`,d=String("CABC").toLocaleLowerCase()||"",c=n?.client_identifier?.[d]||"",u=n?.costco?.service||"",p=n?.costco?.env||"";try{console.info("PDP Service: ",s);let t=await fetch(s,{headers:{"Costco.Env":p,"Costco.Service":u,"Client-Identifier":c}});if(t.ok){let i=await t.json();return console.info(`PDP Services Product itemId: ${e} Status: ${t.status} Status Text: ${t.statusText}
98 Response: - ${JSON.stringify(i)}`),{servicesInfo:i,status:t.status}}{console.error(`PDP Service Product itemId: ${e} Status: ${t.status} Status Text: ${t.statusText}`);let i=(await t.json()).message||"No error message provided";throw Error(`Product itemId ${e} failed with statusCode: ${t.status} and errorMessage: ${i}`)}}catch(t){console.error(`PDP Services Error: Product: ${e}, ${t}`)}},n=async(e,t,i,r)=>{try{let n=await a(t,e,i,r);if(n?.status===200)return{services:n?.servicesInfo?.services||[]};return{services:[]}}catch(e){return console.error("[PDP][Services][Error] - ",e),{services:[]}}};var l=i(92060),o=i(12115);let s=(e,t)=>{let{zipCode:i,selectedChildItem:a,shipMode:s,deliveryServiceConfig:d}=t,[c,u]=(0,l.B)(),{data:p,isLoading:m}=(0,r.Ay)(e?null:`warrantyServicesFetcher-${i}-${a}-${s}`,()=>n(i,a,s,d),{revalidateOnMount:!0,revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1});return(0,o.useEffect)(()=>{p&&u(p)},[p,u]),{warrantyServices:c,isLoading:m}}},55632:(e,t,i)=>{i.d(t,{h:()=>n});var r=i(12115),a=i(45182);let n=(e,t,i)=>{let[,n]=(0,a.Jj)(),[,l]=(0,a.AX)(),[,o]=(0,a.jQ)(),[,s]=(0,a.Un)(),[,d]=(0,a.nb)();(0,r.useEffect)(()=>{n(!0),l(e),s(t),d({resolvedVariantId:i,isBundleStable:!0}),o(new Map(e.map(({id:e,quantity:t})=>[e,{isSelected:!0,quantity:Number(t)||1}])))},[e,t,i])}},55816:(e,t,i)=>{i.r(t),i.d(t,{useAccordionContext:()=>n});var r=i(12115),a=i(31375);let n=()=>{let e=(0,r.useContext)(a.AccordionContext);if(!e)throw Error("`AccordionContext` must be used within a `AccordionContextProvider`");return e}},56850:(e,t,i)=>{i.d(t,{Z2:()=>d,dV:()=>s,gO:()=>o});var r=i(44209);i(23783);var a=i(85705),n=i(5064);i(73689),i(19359),i(89118);var l=i(68785);i(73321),i(87651),i(87358);let o=["cdn_url","extension"],s=(e,t)=>new a.A({...e,site:String("CABC").toUpperCase(),fields:o,agent:t}),d=async(e,t,i)=>{var r;let a,l=await (0,n.$h)();return r=t||"en-us",(a=s(l,i)).fetchMediaAssets(e).then(t=>t?{[e]:a.linkCustomFields(t,r)}:{[e]:[]})};(0,r.unstable_cache)(async(e,t)=>{let i=await (0,n.Z9)(),r=await (0,l.W)(e,i),a=s().linkCustomFields(r?.manualsAndGuidesInfo,t);return t.split("-")[0],a.filter(e=>!/nutrition/.test(e?.attributes?.name?.toLowerCase())).filter(e=>e?.attachments?.data?.some(e=>e?.attributes?.extension==="pdf")).map(e=>{let t=e?.attributes?.name||"";return e&&"AssetDescription"in e?.customFields&&"string"==typeof e?.customFields?.AssetDescription&&(t=e.customFields.AssetDescription?.split("_")[0]||""),{...e,customFields:{...e.customFields,AssetDescription:t}}})||[]},void 0,{revalidate:43200})},57001:(e,t,i)=>{i.d(t,{h:()=>a});var r=i(24880);let a={color:r.S6v,display:"flex",flexDirection:"row",justifyContent:"flex-start",minWidth:"auto",minHeight:"auto",textAlign:"left",textDecoration:"underline",lineHeight:r.MlV}},57981:(e,t,i)=>{i.d(t,{Gb:()=>a});var r,a=((r={})[r.Column=0]="Column",r[r.Row=1]="Row",r)},58291:(e,t,i)=>{i.d(t,{A:()=>E});var r=i(95155),a=i(12158),n=i(24880),l=i(27966),o=i(92361),s=i(90520),d=i(7457),c=i(86670);let u=(0,c.Ay)(d.Button,{shouldForwardProp:e=>"isAvailable"!==e&&"selected"!==e})(({isAvailable:e,selected:t})=>({"&:focus":{backgroundColor:"none"},"&:focus-visible":{border:t?`2px solid ${n.H4y}`:"",outline:"2px solid -webkit-focus-ring-color",outlineOffset:"2px"},"&:visited":{border:t?`2px solid ${n.H4y}`:""},...!e&&{"::before":{background:`linear-gradient(to top left,
99                rgba(0,0,0,0) 0%,
100                rgba(0,0,0,0) calc(50% - 1px),
101                rgba(0,0,0,1) 50%,
102                rgba(0,0,0,0) calc(50% + 1px),
103                rgba(0,0,0,0) 100%)`,content:"''",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:1}},backgroundColor:n.DJJ,border:t?`2px solid ${n.H4y}`:e?`1px solid ${n.RPF}`:`1px dashed ${n.RPF}`,borderRadius:n.m72,boxShadow:"none",height:"100%",padding:0,width:"100%"})),p={"&:last-child":{paddingBottom:n.iAn},justifyContent:"flex-start",alignItems:"center",alignSelf:"stretch",boxShadow:"none",display:"flex",flex:"1 0 0",flexDirection:"column",height:"100%",padding:`${n.iAn} ${n.m72}`};var m=i(29496),h=i(7025),f=i(19359),g=i(5772);i(12115);var b=i(42800),y=i(71706);let x=(0,c.Ay)(a.Text)({fontSize:n.tGh,lineHeight:n.xUz}),v=(0,c.Ay)(l.default)({alignItems:"flex-start",display:"flex"}),S=()=>(0,r.jsx)(x,{bold:!0,component:"span",uniqueId:"fulfillment-price-currency",children:"$"}),C=({children:e,id:t})=>{let{locale:i}=(0,y.B)();if(!e||!i||"number"==typeof e&&(isNaN(e)||e<=0))return null;let{formattedPrice:a}=(0,b.$g)(i,String(e??""));return a=(0,b.n7)(a),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v,{children:[("en-us"===i||"en-ca"===i)&&(0,r.jsx)(S,{}),(0,r.jsx)(x,{variant:"t7",uniqueId:`fulfillmentSelector-price-${t}`,bold:!0,component:"span",children:a})]}),"fr-ca"===i&&(0,r.jsx)(S,{})]})},E=({EDD:e,isAvailable:t,onClick:i,selected:d,label:c,timeframe:b,width:y,iconInfo:x,id:v,secondaryLabel:S,secondaryLabelColor:E,iconTitle:I,price:T})=>{let A=(0,f.Wc)({EDD:e,id:v,isAvailable:t,label:c,onClick:i,selected:d,timeframe:b});if(A?.length>0)return console.error(`[PDP][FulfillmentSelector-${v}][Error] - Props missing: {${A}}`),null;let D=d?m.Gt[h.Oi.SELECTED]:x?()=>(0,r.jsx)(g.default,{src:x,alt:I||"",height:m.Ev,width:m.Ev,unoptimized:!0}):m.Gt[v]||m.iT;return(0,r.jsx)(l.default,{"data-testid":`fulfillmentSelctor-${v}`,sx:{width:y},children:(0,r.jsx)(u,{"aria-pressed":d,isAvailable:t,onClick:i,selected:d,children:(0,r.jsx)(o.A,{sx:{height:"100%",width:"100%",boxShadow:"none"},children:(0,r.jsxs)(s.A,{sx:p,children:[(0,r.jsx)(D,{style:{color:d?n.iCb:"inherit"},height:m.Ev,width:m.Ev}),(0,r.jsx)(a.Text,{bold:!0,uniqueId:`fulfillmentSelector-${v}-label`,variant:"t5",sx:{paddingBottom:n.m72},children:c}),S&&(0,r.jsx)(a.Text,{variant:"t7",uniqueId:`fulfillmentSelector-${v}-secondary-label`,color:E||"default",children:S}),T&&(0,r.jsx)(C,{id:v,children:T}),t?b&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Text,{uniqueId:`fulfillmentSelector-${v}-edd`,variant:"t7",color:"light",children:e}),(0,r.jsx)(a.Text,{bold:!0,color:"success",variant:"t6",uniqueId:`fulfillmentSelector-${v}-timeframe`,children:b})]}):(0,r.jsx)(a.Text,{uniqueId:`fulfillmentSelector-${v}-edd`,variant:"t7",color:"light",children:e})]})})})})}},58340:(e,t,i)=>{i.d(t,{default:()=>N});var r=i(95155),a=i(12129),n=i(27966),l=i(24880),o=i(12115),s=i(7569),d=i(81839),c=i(20463),u=i(19359),p=i(34971),m=i(95097),h=i(7457),f=i(12158),g=i(41812),b=i(15786),y=i(17197);let x=({data:e,isLoading:t,onClickHandler:i,attributeLabel:a,attributeValue:s,selectedIndex:c,selectionMap:u=[],type:x,variantCount:v,selectedItemNumber:S})=>{let[C,E]=(0,o.useState)(s),[I,T]=(0,o.useState)(""),A=(e,t)=>
103{T&&T(t?e.transformedColorSwatch.attributeValue:"")},D=(0,o.useMemo)(()=>(0,d.cS)(e),[e]);return(0,r.jsx)(n.default,{"data-testid":`variants-slider-${x}`,children:(0,r.jsx)(n.default,{component:"fieldset",sx:{border:"none",margin:0,padding:0,minWidth:"auto"},children:(0,r.jsxs)(n.default,{sx:b.yd,children:[(0,r.jsx)(n.default,{component:"legend",children:(0,r.jsxs)(f.Text,{sx:b.uI,component:"h3",uniqueId:`variants-slider-${x}-attribute-label`,children:[(0,r.jsxs)(n.default,{id:`attrLabel-${a}`,component:"span",children:[a,":"]}),(0,r.jsx)(n.default,{component:"span",sx:{fontWeight:"bold"},id:S,children:I||u?.[c||0]||C})]})}),(0,r.jsx)(g.Carousel,{items:t?Array.from(Array(e.length).keys()).map((e,t)=>(0,r.jsx)(p.Skeleton,{width:"100%",variant:m.z.Button},`SkeletonButtonVariant-${t}`)):"colorSwatch"===x?D.map((e,t)=>(0,r.jsx)(n.default,{sx:{padding:l.m72},children:(0,r.jsx)(y.F,{onClick:()=>{C!==e.transformedColorSwatch.attributeValue&&(E(e.transformedColorSwatch.attributeValue),i(e.rawVariantData,c))},selected:C===e.transformedColorSwatch.attributeValue,onBlur:()=>A(e,!1),onFocus:()=>A(e,!0),onMouseEnter:()=>A(e,!0),onMouseLeave:()=>A(e,!1),variant:"full",productSwatch:e.transformedColorSwatch,"aria-pressed":C===e.transformedColorSwatch.attributeValue,swatchButtonSx:{...b.fG,...e.transformedColorSwatch.isOutOfStock&&{"&:hover":{border:`1px solid ${l.RPF}`,backgroundImage:"none"}}}},e.transformedColorSwatch.itemNumber)},`ColorSwatchContainer-${t}`)):e.map((t,a)=>{let o=1===e.length?0===a:u.includes(t.value),s=o?b.cC:{};return(0,r.jsx)(n.default,{sx:{padding:l.m72},children:(0,r.jsx)(h.Button,{onClick:()=>{C!==t.value&&(E(t.value),i(t,c))},sx:{...s,width:"100%"},variant:t.isOutOfStock?"text-button-out-of-stock":"text-button-alternate",uniqueId:t.isOutOfStock?"out-of-stock":o?"selected-variant":"unselected-variant",disableRipple:!0,children:t.secondaryValue?(0,r.jsxs)(n.default,{sx:b.we,children:[(0,r.jsx)(f.Text,{variant:"t4",bold:!0,uniqueId:`variant-slider-item-value-${a}`,children:t.value}),(0,r.jsx)(f.Text,{variant:"t4",uniqueId:`variant-slider-item-secondary-value-${a}`,children:t.secondaryValue})]}):t.value},t.itemNumber)},`SubVariantButtonType-${a}`)}),itemsPerSlide:v,uniqueId:"variants-slider",wrapAround:!1,disableBottomControls:!0,peekAdjacent:"0.8rem",dragFree:!0,isScrollbar:!0,isAutoplay:!1,slideGap:t?l.iAn:"",navigationButtonsMobileDisplay:!0,labelledBy:`attrLabel-${a}`,label:"variants-slider",containerSx:{width:"100%"}})]})})})};var v=i(34291),S=i(19909),C=i(5514),E=i(38734),I=i(73321),T=i(27504),A=i(65556),D=i(62526),_=i(82993);let O=e=>{let{variantsData:t,locale:i,batchApiConfig:a,config:n,primaryVariantsGroupData:l,childCatalogData:p,selectedPrimaryVariantData:m,initialSelectedVariants:h=[],defaultChildItemNumber:f,pageSettings:g}=e,{translationsMap:b}=g,y=(0,D.U)(b,_.et),{fulfillmentData:O,selectedWarehouse:w,warehouseState:N,destination:j}=(0,S.r)(),{isFulfillmentOutOfStock:P}=(0,A.f)(i),[R,k]=(0,C.K)(),[L,M]=(0,E.N)(),B=(0,I.useSearchParams)().get("preselect")||"",$=(0,o.useRef)(!1),{isLoading:z}=O||{},[U,q]=(0,o.useState)({latestVariantsData:t}),{latestVariantsData:V}=U||{},{value:F=f,primaryVariant:W=m,selectionMap:H=h}=L||{},{agent:K}=(0,s.f)(),{variantStyleType:G="accordion"}=n?.[0]||{},{isDesktop:Y}=(0,v.A)({customOptions:{isDesktop:1400,isTablet:{end:1200}}}),Q=1===t.length,Z=(0,o.useCallback)(async(e,t,r)=>{if(e.length&&N&&!z)return await (0,d._s)(e,i,a,N,t,K,r,p)},[K,a,i,N,P,z]),J=(0,o.useCallback)((e,i,r,a)=>{if(!t)return;let n=(0,d.it)(i,e||{},t[0],a),l=a?(0,u.qR)(n,i,r):(0,u.qR)(V[0]?.map(e=>e.value===n?.value?n:e)||[],n,r);q(e=>({...e,latestVariantsData:l}))},[V,t]),X=(0,o.useCallback)((e,t)=>{let i=l?.find(t=>t.value===e.primaryAttrValue),r=H?.map((i,r)=>r===t?e.value:i)||[],a=(0,d.a7)(i,r);M({value:(0,d.xY)(i,a)||"",primaryVariant:i,selectionMap:a})},[l,H]);return((0,o.useEffect)(()=>{let e=async()=>{let e=Q?t[0]?.map(e=>e.itemNumber)||[]:(0,d.B8)(W),i=await Z(e,F||"",P);k(e=>({processedBatchInfoObj:{...i?.processedBatchInfoObj,...e?.processedBatchInfoObj,...F?{[F]:i?.processedBatchInfoObj[F]}:{}},rawBatchInfo:i?.rawBatchInfo||[],isError:!!i?.isError,primaryVariantsGroupData:l}))};
103N?.distributionCenters.length&&K&&!z&&F&&e()},[K,N,w,z,W,j?.destinationPostalCode,P,t,F]),(0,o.useEffect)(()=>{R?.processedBatchInfoObj&&J(R?.processedBatchInfoObj,W,H,Q)},[R?.processedBatchInfoObj]),(0,o.useEffect)(()=>{if(B&&!$.current){let e=p?.find(({id:e})=>e===f),t=(0,d.Hq)(p,B,e);$.current=!0;let i=(0,T.c_)(l||[],t?.id||""),r=(0,T.DB)(i,t?.id||"");M({value:t?.id||"",primaryVariant:i,selectionMap:r})}},[p,B]),V&&V.length&&V?.[0]?.length)?(0,r.jsx)(r.Fragment,{children:V.map((e,t)=>{let i=e.some(e=>e.swatchImage),a=(0,d.Tu)(G,i,Y),n=e.find(e=>e.value===H[t])?.itemNumber;return"accordion"===G||e.length<=5?(0,r.jsx)(c.A,{data:e,onClickHandler:X,attributeValue:H[t],attributeLabel:e[0]?.key,selectedIndex:t,selectionMap:H,variantCount:a,type:i?"colorSwatch":"textVariant",translations:y,selectedItemNumber:n},`VariantsAccordion-${t}`):(0,r.jsx)(x,{data:e,onClickHandler:X,attributeValue:H[t],attributeLabel:e[0]?.key,selectedIndex:t,selectionMap:H,variantCount:a,type:i?"colorSwatch":"textVariant",translations:y,selectedItemNumber:n},`VariantsSlider-${t}`)})}):null};var w=i(92226);let N=e=>{let{isMobile:t}=(0,v.A)();return(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(w.l,{cornerStyle:t?"square":"rounded","data-testid":"productVariantCard",children:(0,r.jsx)(n.default,{sx:{display:"flex",flexDirection:"column",gap:l.i_v},children:(0,r.jsx)(O,{...e})})})})}},58468:(e,t,i)=>{i.d(t,{MZ:()=>o,TO:()=>l,ay:()=>n});var r,a=i(85180);i(19359);var n=((r={}).Syndigo="Syndigo",r.OneWorldSync="1WorldSync",r.FlixMedia="FlixMedia",r.Salsify="Salsify",r);let l="3rdParty:Content";function o(e,t){let i=document.createElement("style");i.id=t,i.textContent=e,document.body.append(i)}a.VG,a.oj},58474:(e,t,i)=>{i.d(t,{M:()=>r});let r={revalidateIfStale:!0,revalidateOnMount:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,shouldRetryOnError:!1,dedupingInterval:1e4}},59555:(e,t,i)=>{i.d(t,{Q:()=>a});var r=i(12115);let a=e=>(0,r.useMemo)(()=>{let t=e?.selectedChildItemNumber,i=e?.productData?.childCatalogData?.find(({id:e})=>e==t)||e?.productData?.childCatalogData?.at(0);return!!i?.productAttributes?.at(0)?.object?.find(({identifier:e,type:t})=>"controlling"===t&&"Not Sold Separately"===e)&&!!i?.bundleContainerIds?.length},[e])},59681:(e,t,i)=>{i.d(t,{AddToCartScaffoldingProvider:()=>l,b:()=>o});var r=i(95155),a=i(12115);let n=(0,a.createContext)(void 0),l=({children:e,productDetailsData:t,properties:i,pageSettings:l,locale:o,slug:s,config:d,productDetailsTranslations:c,selectedChildItem:u})=>{let p=(0,a.useMemo)(()=>({productDetailsData:t,properties:i,pageSettings:l,locale:o,slug:s,config:d,productDetailsTranslations:c,selectedChildItem:u}),[t,i,l,o,s,d,c,u]);return(0,r.jsx)(n.Provider,{value:p,children:e})},o=()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useAddToCartScaffoldingContext must be used within AddToCartScaffoldingProvider");return e}},60073:(e,t,i)=>{i.d(t,{w:()=>a});var r=i(83272);let a=(e,t)=>{switch(t){case r.yl.LOCAL_BUSINESS_DELIVERY:return e.localbusinessdeliverylabel||"Local Business Delivery";case r.yl.PICK_UP:return e.pickuplabel||"Pick-Up";case r.yl.SAME_DAY_DELIVERY:return e.samedaydeliverylabel||"Same-Day Delivery";default:return""}}},60464:(e,t,i)=>{i.d(t,{W:()=>p,B:()=>m});var r=i(12115),a=i(7025),n=i(63893),l=i(78015),o=i(27504),s=i(28158);function d(e){if(e?.merchAssoc)return e.merchAssoc.find(e=>"REPLACED-BY"===e.type)}var c=i(30890),u=i(9527);let p=(e,t)=>{let{isFsaEligibleProduct:i,isChdEligibleProduct:u}=(0,o.Ye)([e]),p=(0,c.ce)(t,e?.id),h=(0,r.useMemo)(()=>{let r={[a.rm.IS_BUYABLE]:e?.isBuyable===!0,[a.rm.IS_WAREHOUSE_ONLY]:!!t?.productAttributes?.[0]?.object?.some(e=>e.key===a.PC),[a.rm.IS_SPECIAL_ORDER]:!!t?.productAttributes?.[0]?.object?.some(e=>e.key===a.Og),[a.rm.IS_TRUCKLOAD]:!!t?.productAttributes?.[0]?.object?.some(e=>e.key===a.Fl),[a.rm.IS_TWO_DAY_DELIVERY]:!1,[a.rm.IS_FSA_OR_CHD_ELIGIBLE]:!!(i||u),[a.rm.IS_MEMBER_ONLY_ITEM]:p,[a.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_1]:t?.dispPriceInCartOnly===1,[a.rm.DISPLAY_PRICE_IN_CART_ONLY_TYPE_2]:t?.dispPriceInCartOnly===2},o={[n.O.REPLACEMENT_ITEM_ID]:function(e){let t=d(e);if(t)return t?.itemNumberTo||void 0}(t),[n.O.REPLACEMENT_ITEM_URL]:function(e){let t=d(e);if(!t)return;
103let i=t.descriptions?.at(0)?.object.shortDescription||"-",r=window.location.origin;return(0,s.M)(i,t?.itemNumberTo,r)}(t)};return{flags:(0,l.K)(r,!1),attributes:o}},[e?.isBuyable,e?.id,t]),[,f]=m();return(0,r.useEffect)(()=>{f(h)},[h]),h},m=(0,u.y)()},60714:(e,t,i)=>{i.d(t,{PdpConfigClientProvider:()=>l,h:()=>o});var r=i(95155),a=i(12115);let n=(0,a.createContext)({}),l=({context:e,children:t})=>(0,r.jsx)(n.Provider,{value:e,children:t}),o=()=>{let e=(0,a.useContext)(n);if(!e)throw Error("usePdpConfigContext must be used within a PdpConfigContextProvider");return e}},62151:(e,t,i)=>{i.d(t,{dh:()=>T,Pv:()=>B,T9:()=>C,W$:()=>D.W,Ro:()=>_,c3:()=>w,Ed:()=>N.E});var r=i(12115),a=i(51183),n=i(83272),l=i(64638),o=i(87651);i(20376),i(63720),i(44905),i(19359),i(95155),i(22357),i(73414);var s=i(82993);i(17189);var d=i(23696);let c=d.z.object({id:d.z.string().nullable().optional(),parentId:d.z.array(d.z.string()).optional(),quantityMeasure:d.z.string().nullable().optional(),factor:d.z.string().nullable().optional(),dispPriceInCartOnly:d.z.number().nullable().optional(),descriptions:d.z.array(d.z.object({object:d.z.object({imageName:d.z.string().nullable().optional(),shortDescription:d.z.string().nullable().optional()})})).nullable().optional(),productAttributes:d.z.array(d.z.object({object:d.z.array(d.z.object({key:d.z.string().nullable().optional(),value:d.z.string().nullable().optional(),type:d.z.string().nullable().optional()})).optional()})).nullable().optional(),childCatalogData:d.z.array(d.z.object({id:d.z.string().nullable().optional(),isMembershipReqd:d.z.boolean().nullable().optional()})).nullable().optional()});d.z.object({quantitylabel:d.z.string().optional(),qtyincrementarialabel:d.z.string().optional(),qtydecrementarialabel:d.z.string().optional(),minvalerror:d.z.string().optional(),maxvalerror:d.z.string().optional(),addtocartbutton:d.z.string().optional(),addtocartdetailsbutton:d.z.string().optional(),addtofavorites:d.z.string().optional(),addtocarterrormsg:d.z.string().optional(),toplabel:d.z.string().optional(),topbuttonarialabel:d.z.string().optional(),continueshoppingtext:d.z.string().optional(),viewcarttext:d.z.string().optional(),missingpricefallbacktext:d.z.string().optional(),addedtocarttext:d.z.string().optional(),itemsincartlabel:d.z.string().optional(),variableweightminvalerror:d.z.string().optional(),variableweightmaxvalerror:d.z.string().optional(),variableweighterror:d.z.string().optional(),variableweightnote:d.z.string().optional(),nozipcodeselected:d.z.string().optional(),setdeliveryzipbutton:d.z.string().optional(),setdeliveryzipbuttonarialabel:d.z.string().optional(),samedaybuttontext:d.z.string().optional(),notificationwarehouseonlytext:d.z.string().optional(),notificationspecialordertext:d.z.string().optional(),notificationtruckloadtext1:d.z.string().optional(),notificationtruckloadtext2:d.z.string().optional(),truckloadbutton:d.z.string().optional(),addtocartclosebuttonarialabel:d.z.string().optional(),signintoseepricebutton:d.z.string().optional(),signinfordetailsbutton:d.z.string().optional(),renewmembershipbutton:d.z.string().optional(),addmembershipnumberbutton:d.z.string().optional(),linkmembershipnumberbutton:d.z.string().optional(),buymembershipbutton:d.z.string().optional(),quantitycorrectionmessage:d.z.string().optional(),changedeliverymethodbuttontext:d.z.string().optional(),changedeliverymethodmessagetext:d.z.string().optional()}),d.z.array(d.z.object({membershipUrl:d.z.object({renewMembershipUrl:d.z.string().optional(),joinTodayUrl:d.z.string().optional(),buyMembershipUrl:d.z.string().optional()}).optional(),Member_Validation_Bypass_feature_Enabld:d.z.boolean().optional(),enableRedirectionToUCCMod:d.z.boolean().optional()})).transform(e=>{let t=e?.[0];return{membershipUrls:t?.membershipUrl,memberValidationBypassFeatureEnabld:t?.Member_Validation_Bypass_feature_Enabld,enableRedirectionToUCCMod:t?.enableRedirectionToUCCMod}}),d.z.object({productData:c}),i(59681),i(53898),i(44052);let u=d.z.object({languageKey:d.z.string().nullable().nullish(),object:d.z.object({shortDescription:d.z.string().nullable().nullish(),longDescription:d.z.string().nullable().nullish(),deliveryStatement:d.z.string().nullable().nullish(),sanitizedDeliveryStatement:d.z.object({template:d.z.string().nullish(),sys:d.z.string().nullish(),aux1:d.z.string().nullish()}).nullish()}).nullish()}),p=d.z.object({itemNumberTo:d.z.string().nullish(),type:d.z.union([d.z.literal("ACCESSORY"),d.z.literal("CLAUSE"),d.z.literal("REPLACEMENT"),d.z.literal("TEMP-REPLACEMENT"),d.z.literal("UPSELL"),d.z.literal("REPLACED-BY"),d.z.string()]).nullish(),isPrimary:d.z.boolean().nullish(),descriptions:d.z.array(u).nullish()});d.z.object({productData:d.z.object({descriptions:d.z.array(u).nullish(),merchAssoc:d.z.array(p).nullish(),childCatalogData:d.z.array(d.z.object({descriptions:d.z.array(u).nullish()})).nullish()}).nullish()}),i(92069);var m=i(17196),h=i(9339);let f=(0,h.createServerReference)("7feab5b5ddc95c0510d97ad53d7115b15526eaf36f",h.callServer,void 0,h.findSourceMapURL,"extractBundleDetailsDataLight"),g=(0,h.createServerReference)("7f6b1292392b3626b1c7f48180043cfc
103d0811e613c",h.callServer,void 0,h.findSourceMapURL,"extractSummaryDetailsData");(0,r.cache)(async(e,t,i)=>{let r=await f(e,t),a=r.bundleDetails?.bundleLightInfo,n=a&&{...a,variants:a.variants?.filter(e=>e.isPublished)},l=new Set,o=[],s=i&&i.length>0?n?.variants?.find(e=>e.itemId&&i.includes(e.itemId)):n?.variants?.find(t=>t.itemId===e);if(r.isValid&&n)for(let e of(s?.parentId&&l.add(s.parentId||""),o.push(...(n?.variants??[]).filter(e=>e.itemId===s?.itemId).flatMap(e=>e.bundleComponents??[])),o))e.parentId&&l.add(e.parentId);if(0===o.length)return console.info("[PDP][BundleAPI][Info] - No child item numbers found for the selected bundle variant in Bundle API."),{bundleRawData:n,bundleComponents:{bundleItemsData:[]}};let d=Array.from(l).join(","),c=await g(d,t),u=c.summaryDetails?.productSummary?.productData??[];return(0,m.S)(n,u,o,s?.parentId||"")}),i(289);let b=d.z.object({id:d.z.string().nullable().optional(),parentId:d.z.array(d.z.string()).optional(),quantityMeasure:d.z.string().nullable().optional(),factor:d.z.string().nullable().optional(),dispPriceInCartOnly:d.z.number().nullable().optional(),descriptions:d.z.array(d.z.object({object:d.z.object({imageName:d.z.string().nullable().optional(),shortDescription:d.z.string().nullable().optional()})})).nullable().optional(),productAttributes:d.z.array(d.z.object({object:d.z.array(d.z.object({key:d.z.string().nullable().optional(),value:d.z.string().nullable().optional(),type:d.z.string().nullable().optional()})).optional()})).nullable().optional(),childCatalogData:d.z.array(d.z.object({id:d.z.string().nullable().optional(),isMembershipReqd:d.z.boolean().nullable().optional()})).nullable().optional()});d.z.object({addbundletocartbuttonplural:d.z.string().optional(),addbundletocartbutton:d.z.string().optional(),bundleoutofstock:d.z.string().optional(),bundleoutofstockplural:d.z.string().optional(),bundle:d.z.string().optional(),selectbundleitem:d.z.string().optional(),costcodirectsavings:d.z.string().optional(),bundletotal:d.z.string().optional(),quantitylabel:d.z.string().optional(),qtyincrementarialabel:d.z.string().optional(),qtydecrementarialabel:d.z.string().optional(),minvalerror:d.z.string().optional(),maxvalerror:d.z.string().optional(),addtocartbutton:d.z.string().optional(),addtocartdetailsbutton:d.z.string().optional(),addtofavorites:d.z.string().optional(),addtocarterrormsg:d.z.string().optional(),toplabel:d.z.string().optional(),topbuttonarialabel:d.z.string().optional(),continueshoppingtext:d.z.string().optional(),viewcarttext:d.z.string().optional(),missingpricefallbacktext:d.z.string().optional(),addedtocarttext:d.z.string().optional(),itemsincartlabel:d.z.string().optional(),variableweightminvalerror:d.z.string().optional(),variableweightmaxvalerror:d.z.string().optional(),variableweighterror:d.z.string().optional(),variableweightnote:d.z.string().optional(),nozipcodeselected:d.z.string().optional(),setdeliveryzipbutton:d.z.string().optional(),setdeliveryzipbuttonarialabel:d.z.string().optional(),notificationwarehouseonlytext:d.z.string().optional(),notificationspecialordertext:d.z.string().optional(),notificationtruckloadtext1:d.z.string().optional(),notificationtruckloadtext2:d.z.string().optional(),truckloadbutton:d.z.string().optional(),addtocartclosebuttonarialabel:d.z.string().optional(),signintoseepricebutton:d.z.string().optional(),signinfordetailsbutton:d.z.string().optional(),renewmembershipbutton:d.z.string().optional(),addmembershipnumberbutton:d.z.string().optional(),joincostcobutton:d.z.string().optional(),linkmembershipnumberbutton:d.z.string().optional(),buymembershipbutton:d.z.string().optional(),memberonlylabel:d.z.string().optional(),recommendeditemstext:d.z.string().optional(),externallinktext:d.z.string().optional(),addtocartcarousellabel:d.z.string().optional(),customizeorderexternaltext:d.z.string().optional(),visitexternaltext:d.z.string().optional(),canceltext:d.z.string().optional(),backbuttonarialabel:d.z.string().optional(),close:d.z.string().optional(),add:d.z.string().optional(),knbserviceanddeliveryinfo:d.z.string().optional(),delivery:d.z.string().optional(),itemavailabilityatzipcodelabel:d.z.string().optional(),changezipcodebutton:d.z.string().optional(),outofstock:d.z.string().optional()}),d.z.array(d.z.object({membershipUrl:d.z.object({renewMembershipUrl:d.z.string().optional(),joinTodayUrl:d.z.string().optional(),buyMembershipUrl:d.z.string().optional()}).optional(),Member_Validation_Bypass_feature_Enabld:d.z.boolean().optional(),enableRedirectionToUCCMod:d.z.boolean().optional(),addToCartCarouselActivity:d.z.string().optional(),itemLimitForAjaxSCBatch:d.z.number().optional(),placeholderImage:d.z.string().optional(),enableModURLInBundle:d.z.boolean().optional()})).transform(e=>{let t=e?.[0];return{membershipUrls:t?.membershipUrl,memberValidationBypassFeatureEnabld:t?.Member_Validation_Bypass_feature_Enabld,enableRedirectionToUCCMod:t?.enableRedirectionToUCCMod,addToCartCarouselActivity:t?.addToCartCarouselActivity,enableModURLInBundle:t?.enableModURLInBundle,itemLimitForAjaxSCBatch:t?.itemLimitForAjaxSCBatch,placeholderImage:t?.placeholderImage}}),d.z.object({productData:b}),i(88987),i(92570),i(57981),i(70334),i(5064),i(98216),i(16123),i(92454),i(59555),i(73321),i(31122);let y=d.z.object({id:d.z.string().nullish(),rank:d.z.string().nullish(),longDescription:d.z.string().nullish()});d.z.object({productData:d.z.object({id:d.z.string().nullable().optional(),parentId:d.z.array(d.z.string()).optional(),quantityMeasure:d.z.string().nullable().optional(),factor:d.z.string().nullable().optional(),dispPriceInCartOnly:d.z.number().nullable().optional(),isMembershipReqd:d.z.boolean().nullable().optional(),isLimitOneQty:d.z.boolean().nullable().optional(),descriptions:d.z.array(d.z.object({object:d.z.object({imageName:d.z.string().nullable().optional(),shortDescription:d.z.string().nullable().optional()})})).nullable().optional(),productAttributes:d.z.array(d.z.object({object:d.z.array(d.z.object({key:d.z.string().nullable().optional(),value:d.z.string().nullable().optional(),type:d.z.string().nullable().optional()})).optional()})).nullable().optional(),childCatalogData:d.z.array(d.z.object({id:d.z.string().nullable().optional(),isMembershipReqd:d.z.boolean().nullable().optional(),isLimitOneQty:d.z.boolean().nullable().optional(),bundleContainerIds:d.z.array(d.z.string()).nullable().optional()}).passthrough()).nullable().optional()}),merchandiseData:d.z.object({warrantyAndServices:d.z.array(y).nullish()}).nullish()}),i(81917),i(88504),i(23273),i(70443),i(63018),i(58340),i(27504);var x=i(60714),v=i(13639),S=i(92126);let C=()=>{let{fulfillmentModuleSettings:e}=(0,x.h)(),{properties:t}=e;return(0,r.useMemo)(()=>{let e=t?.[0];return{samedayDeliveryData:e?.samedayDeliveryData??{},restrictedStates:e?.restrictedStates??[],maxFutureDate:e?.maxFutureDate??365,vendorList:e?.vendorList??{},haulAwayConfig:e?.haulAwayMattressConfig??{},floralDeliveryConfig:e?.floralDeliveryConfig??{},truckloadUrl:e?.truckloadUrl??""}},[t])};var E=i(37994),I=i(7025);let T=(e,t,i)=>{let{samedayDeliveryData:s}=C(),d=i[I.rm.IS_SPECIAL_ORDER],c=i[I.rm.IS_WAREHOUSE_ONLY],u=!i[I.rm.IS_TRUCKLOAD],{isLoading:p,state:m}=(0,a.t)({itemNumber:e,shouldCheckAvailability:u,avoidSCInventory:!!d||!!c}
103),[{isExcluded:h}={},f]=(0,E.PZ)();(0,r.useEffect)(()=>{f({isLoading:p,isExcluded:!!u&&m&&m===l.tu.ZIP_CODE_UNAVAILABLE})},[p,m,f,u]);let[,g]=(0,E.jg)();(0,r.useEffect)(()=>{g({isReplacementItem:!!t[l.O8.REPLACEMENT_ITEM_ID]&&h,isLoading:p})},[t[l.O8.REPLACEMENT_ITEM_ID],h]);let{notification:b,isLoading:y}=((e,t,i,a,s)=>{let d=w(),{destinationPostalCode:c}=(0,N.E)(),u=(0,S.Y)(),p=t[l.O8.REPLACEMENT_ITEM_ID],{isLoading:m,itemId:h}=(e=>{let{productTileConfigData:{productTileConfigData:t}}=(0,x.h)(),[i,a]=(0,r.useState)(void 0),{data:n,isLoading:l,isError:o}=(0,v.ZB)({productId:e,productTileConfigData:t,locale:"en-us"},!!(e&&t));return(0,r.useEffect)(()=>{n?.itemId&&!o?a(n?.itemId):(!1===l&&n||o)&&a(e)},[n,o,l]),{itemId:i,isLoading:l}})(!0===s?p:void 0),f=!!(p&&m);return{notification:(0,r.useMemo)(()=>{let r,s,m;if(p&&h){let e,r=t[l.O8.REPLACEMENT_ITEM_URL];return{message:(d.notificationreplacementitem||"").replace("{{item}}",i).replace("{{replacementItem}}",h||"").replace("{{replacementItemUrl}}",r),hideAddToCart:!0,severity:"alert",id:"bd-alert-replacement-item",trackingData:(e=p,{component:{type:"nav",identifier:"Product Detail",trackedData:["Unavailable Item",`Replacement ${e}`]},doNotTrack:!1,trackType:"navigation"})}}if(a?.isWarehouseOnly&&"CABC"===o._z.USBD)return{message:e===n.tu.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER?d.notificationwarehouseonlytext||"Item is unavailable in the Delivery ZIP Code or Delivery Method selected.":d.notificationwarehouseonlytext||"Visit your local Business Centre warehouse for more details and delivery options.",hideAddToCart:!0,severity:"alert",id:"bd-alert-warehouse-only",trackingData:{component:{type:"nav",identifier:"Product Detail",trackedData:["Unavailable Item","Link to Local Costco Business Center"]},doNotTrack:!1,trackType:"navigation"}};if(a?.isSpecialOrder&&"CABC"===o._z.CABD)return{message:e===n.tu.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER?d.notificationzipcodeunavailable||"Item is unavailable in the Delivery ZIP Code or Delivery Method selected.":d.notificationspecialordertext||"Visit your local Business Centre warehouse for more details and delivery options.",hideAddToCart:!0,severity:"alert",id:"bd-alert-special-order"};switch(e){case n.tu.ZIP_CODE_AND_PRODUCT_AVAILABLE:r="",s=!1;break;case n.tu.ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK:r=u?.type&&u.type===n.yl.PICK_UP?d.notificationzipcodeavailableoutofstockpickup||"Item out of stock for pick-up at your local Costco Business Center.":d.notificationzipcodeavailableoutofstockdelivery?.replace("{{zip}}",c)||"Item out of stock for delivery at your local Costco Business Center.",s=!0,m="alert";break;case n.tu.ZIP_CODE_UNAVAILABLE:r=d.notificationzipcodeunavailable||"Item is unavailable in the Delivery ZIP Code or Delivery Method selected.",m="alert",s=!0;break;default:r="",s=!1}return{message:(r||"").replace("{ZIP}",c),hideAddToCart:s,severity:m}},[e,d.notificationzipcodeavailableoutofstockpickup,d.notificationzipcodeavailableoutofstockdelivery,d.notificationzipcodeunavailable,d.notificationreplacementitem,d.notificationwarehouseonlytext,d.notificationspecialordertext,c,p,h,a?.isWarehouseOnly,a?.isSpecialOrder,t,u]),isLoading:f}})(m,t,e,i,h);return(0,r.useMemo)(()=>({...A,isLoading:p||y,samedayDeliveryData:s,fulfillmentNotificationMessage:b,inventoryState:m}),[s,p,y,b,m])},A={delivery:void 0,pickUp:void 0,mdoLocation:void 0,sameDay:void 0,buyInWarehouse:void 0,inventory:void 0,warehousePickupStatus:void 0};var D=i(60464);let _=(e,t)=>(0,r.useMemo)(()=>e?.find(e=>e.id===t),[e,t]);var O=i(62526);let w=()=>{let{fulfillmentModuleSettings:e}=(0,x.h)();return(0,r.useMemo)(()=>{let t=(0,O.L)(e);return(0,O.U)(t,s.Rq)},[e])};var N=i(8424),j=i(44855),P=i(71706),R=i(97923),k=i(58474),L=i(74711);let M=async({itemId:e,locale:t,siteOverride:i,productSummaryServiceConfig:r})=>{if(!e)return;let a=await (0,R.T)(e,t,r,!1,i);return a?.productSummary?.productData?.find(t=>t.id===e)},B=(e,t)=>{let i,{miniBannerDetails:a}=(0,P.B)(),n=a?.values,l="USBD"===(i=String("CABC").toUpperCase())?"USBC":"CABD"===i?"CABC":void 0,{productSummaryServiceConfig:o}=(0,x.h)(),{fulfillmentData:{samedayDeliveryData:s}}=(0,L.fs)(),d=s?.isSameDayDeliveryEnabled??!1,{data:c,isLoading:u}=(0,j.Ay)(e&&d?["bd-fulfillment-summary-details",e,t]:null,()=>M({itemId:e,locale:t,siteOverride:l,productSummaryServiceConfig:o}),k.M);return(0,r.useMemo)(()=>({isPickupAvailable:!!n?.isStorePickupEnabledForWareHouse,isDeliveryAvailable:!!n?.isBDTruckZoneEnabledForWareHouse,isSameDayDeliveryEligible:d&&!!c?.programTypes?.includes("3rdPartyDelivery"),isSameDayDeliveryLoading:u}),[n?.isStorePickupEnabledForWareHouse,n?.isBDTruckZoneEnabledForWareHouse,c,e,u])}},62526:(e,t,i)=>{i.d(t,{L:()=>r,U:()=>a});let r=e=>{let t=e.key_value,i={};
103return t.forEach(e=>{let t=e.key,r=e.value;i[t]=r}),i},a=(e,t)=>{let i={};return t.forEach(t=>{i[t]=e[t]||""}),i}},63018:(e,t,i)=>{i.d(t,{BundleVariantsContainer:()=>m});var r=i(95155),a=i(99899),n=i(20463),l=i(27966),o=i(24880),s=i(73321);let d=({normalizedBundleVariants:e,translations:t})=>{let i=(0,s.usePathname)(),{normalizedVariantsData:a,initialSelectedVariants:d}=e||{},c=e=>{if(!e.parentId)return;let t=i.split("/");t[t.length-1]=e.parentId,window.location.href=t.join("/")};return(0,r.jsx)(l.default,{sx:{display:"flex",flexDirection:"column",gap:o.i_v},children:a?.map((e,i)=>{let a=e.some(e=>e.swatchImage);return(0,r.jsx)(n.A,{data:e,onClickHandler:c,attributeValue:d?.[i],attributeLabel:e[0]?.key,selectedIndex:i,selectionMap:d,type:a?"colorSwatch":"textVariant",translations:t,isBundleVariant:!0},`bundleVariantsAccordion-${i}`)})})};var c=i(27504),u=i(62526),p=i(82993);let m=({bundleVariants:e,translationsMap:t,productAttributes:i,selectedChildItemNumber:n})=>{let l=(0,u.U)(t,p.et),o=(e??[]).map((e,t)=>{let i=[{object:[...(e.variantValues??[]).map(e=>({key:e.variantKey,value:e.value,type:"defining",identifier:e.variantKey,isPills:!1,swatchImage:e.swatchImageKey,displaySequence:t}))]}];return{id:e.itemId??"",parentId:e.parentId?[e.parentId]:[],bundleContainerIds:[],productAttributes:i,assets:{data:null,swatchImages:e.assets?.swatchImages??[]},childCatalogData:null}}),s=(0,c.Oe)(i?.[0]),m=(0,c.Yj)(o,s,n||"");return m&&m.normalizedVariantsData?.length&&m.initialSelectedVariants.length?(0,r.jsx)(a.A,{testId:"bundle-variants-container",children:(0,r.jsx)(d,{normalizedBundleVariants:m,translations:l})}):null}},63569:(e,t,i)=>{i.d(t,{AdSetThirdPartyBuilder:()=>m});var r=i(95155),a=i(12115),n=i(89118),l=i(60714),o=i(70067),s=i(64739),d=i(19909),c=i(42031),u=i(7025);let p=a.memo(({productTileConfigData:e,criteoAPIConfigurationSettings:t,locale:i,children:a})=>(0,r.jsx)(o.l,{children:(0,r.jsx)(s.C,{productTileConfigData:e,criteoAPIConfigurationSettings:t,locale:i,concurrency:3,pdpStatus:"NA",children:a})})),m=({data:e,locale:t,placementName:i,productDetailsData:o,children:s})=>{let{criteoContentStackConfigurationEntries:m}=(0,l.h)(),{fulfillmentData:h}=(0,d.r)(),f=h?.inventory?.processed,{availability:g}=f?.data||{},b=!!f?.isLoading,y=i===n.kn.SIMILAR_PRODUCTS,x=i===n.kn.SIMILAR_INSTOCK_PRODUCTS,{productTileConfigData:v,criteoAPIConfigurationSettings:S}=m,C=(0,a.useMemo)(()=>v,[v]),E=(0,a.useMemo)(()=>S,[S]),{isFsaEligibleProduct:I,isChdEligibleProduct:T}=o?.productData||{},A=(0,c.Dj)(f?.data);return!e.ad_set_3rd_party_ref.length||T||I||A&&y||A&&x||g===u.RO.NOSTOCK&&!b&&y||g!==u.RO.NOSTOCK&&!b&&x?null:(0,r.jsx)(p,{productTileConfigData:C,criteoAPIConfigurationSettings:E,locale:t,children:s})}},63720:(e,t,i)=>{i.d(t,{i:()=>l});var r=i(19359),a=i(72824),n=i(17477);i(95155),i(77654);let l=()=>(0,r.G8)()?a.FulfillmentBdContext:n.FulfillmentContext},63893:(e,t,i)=>{i.d(t,{O:()=>a});var r,a=((r={}).REPLACEMENT_ITEM_ID="replacementItemId",r.REPLACEMENT_ITEM_URL="replacementItemUrl",r)},64638:(e,t,i)=>{i.d(t,{O8:()=>a.O,Up:()=>r.Up,tu:()=>r.tu});var r=i(83272),a=i(63893)},65482:(e,t,i)=>{i.d(t,{default:()=>E});var r=i(95155),a=i(62526),n=i(82993),l=i(27966),o=i(8393),s=i(92226),d=i(12158),c=i(7457),u=i(97766),p=i(24880),m=i(34291),h=i(50197),f=i(89118);let g=(0,i(86670).Ay)("div")({fontSize:"14px",a:{color:"#333333"}});var b=i(12115),y=i(70422),x=i(19359);let v=({isFsa:e=!1,auxDescription2:t,translations:i})=>{let{isMobile:a}=(0,m.A)(),{setSelectedAccordion:n,setIsAccordionClicked:v}=(0,h.Dr)(),S=(0,b.useRef)(null),{trackEvent:C}=(0,y.z1)();if(!t)return null;let E=t.replace(/<\/?span[^>]*>/gi,"").split(";").map(e=>e.trim()).filter(e=>e.length>0),I=(e,t)=>{e.preventDefault(),n(t),v(!0),S.current&&S.current.focus();let i=t===f.do.PRODUCT_DETAILS?"View Product Details":t===f.do.FSA_ELIGIBLE?"FSA Eligible":"";C({component:{identifier:`Product Detail | ${i}`,type:"ui"},doNotTrack:!1,trackType:"product-action-button"})};return(0,r.jsx)(l.default,{"data-testid":"features-list",children:(0,r.jsxs)(s.l,{cornerStyle:a?"square":"rounded",children:[(0,r.jsx)("ul",{style:{marginBlockStart:0,marginBlockEnd:0,paddingInlineStart:p.i_v,listStyleType:"disc"},children:E.map((e,t)=>(0,r.jsx)("li",{children:(0,r.jsx)(o.A,{children:e.match(/<a\s+href\s*=\s*(['"])(.*?)\1[^>]*>/gi)?(0,r.jsx)(g,{dangerouslySetInnerHTML:{__html:e}}):(0,r.jsx)(d.Text,{variant:"t6",uniqueId:`feature-${t}`,children:e})})},`FeatureListItem-${t}`))}),(0,x.G8)()&&e&&(0,r.jsx)(c.Button,{size:"small",onKeyDown:e=>{("Enter"===e.key||"Space"===e.code||e.ctrlKey&&e.altKey&&"Space"===e.code)&&I(e,f.do.FSA_ELIGIBLE)},onClick:e=>I(e,f.do.FSA_ELIGIBLE),href:"#",variant:"text-button",uniqueId:"fsa-eligible-button",startIcon:(0,r.jsx)(u.A,{style:{color:p.hGW,he
103ight:"16px",width:"16px"}}),children:(0,r.jsx)(d.Text,{uniqueId:"fsa-eligible-button",underline:!0,variant:"t6",children:i?.fsaeligibleitem})}),(0,r.jsx)("div",{children:(0,r.jsx)(c.Button,{onKeyDown:e=>{("Enter"===e.key||"Space"===e.code||e.ctrlKey&&e.altKey&&"Space"===e.code)&&I(e,f.do.PRODUCT_DETAILS)},onClick:e=>I(e,f.do.PRODUCT_DETAILS),href:"#",variant:"text-button",uniqueId:"view-product-details",children:(0,r.jsx)(d.Text,{uniqueId:"view-product-details",underline:!0,variant:"t6",children:i.viewproductdetails})})})]})})};var S=i(12129),C=i(38734);let E=({productDetailsData:e,pageSettings:t})=>{let{translationsMap:i}=t,l=(0,a.U)(i,n.et),[o]=(0,C.N)(),s=o?.value,{productData:d}=e,{descriptions:c,childCatalogData:u}=d||{},{isFsaEligible:p}=(0,x.Xz)(u,s),m=null;return c&&c.length>0&&(m=c[0]),(0,r.jsx)(r.Fragment,{children:m?.object.features&&(0,r.jsx)(S.default,{size:{xs:12},children:(0,r.jsx)(v,{isFsa:p,auxDescription2:m?.object.features,translations:l})})})}},65556:(e,t,i)=>{i.d(t,{f:()=>b});var r=i(12115),a=i(7025),n=i(30890);let l={async getData(e,t){let{translations:i,fulfillmentData:r,productFlags:l,featureFlags:o,warehouseFlags:s}=e,{priceDetails:d}=t||{},{inventory:{processed:{data:c,isLoading:u}},pickUp:p}=r;if(u||!c)return;let m=o.isWioEnabled&&s.isWarehouseWioEnabled,h=(({pickUp:e,translations:t,productFlags:i,isWarehouseBiwEligible:r,featureFlags:l,warehouseFlags:o,priceDetails:s})=>{let d=e?.data?.warehouseAvailability?.useWarehouseInventory,c=l.isBopiwOrSTWEnabled&&o.isWarehouseBopiwEnabled,u=d?.buyable===!0,p=d?.availability===a.RO.INSTOCK;if(c&&i?.isBopiwProduct&&u&&p)return;let m="",h={EDD:t?.unavailable||"Unavailable",isAvailable:!1,label:t?.buyinwarehouselabel||"In-Warehouse",timeframe:"",id:a.Oi.BUY_IN_WAREHOUSE};if(e?.isError)return h;let f=e?.data?.warehouseAvailability?.inWarehouse,g=f?.availability===a.RO.LOWSTOCK||f?.availability===a.RO.INSTOCK;if(!(i.isWioProduct&&l.isWioEnabled&&r)||i.isShipToWarehouse&&l.isBopiwOrSTWEnabled&&!g)return;let{priceDataWh:b}=s||{},{displayPrice:y}=b||{},{deliveredPrice:x,onlinePrice:v}=y||{},S=g?x||v:void 0,C=t?.warehouseprice||"Warehouse Price";return f?.availability===a.RO.NOSTOCK?m=t?.outofstock||"Out of Stock":f&&f.availability!==a.RO.UNAVAILABLE?S&&(0,n.CY)(i?.isMemberOnlyItem)||(C=t?.pricingmayvary||"Pricing May Vary",S=void 0):m=t?.unavailable||"Unavailable",m&&(C=""),{...h,EDD:m,isAvailable:g,secondaryLabel:C,secondaryLabelColor:"light",price:S}})({pickUp:p,translations:i,productFlags:l,warehouseFlags:s,isWarehouseBiwEligible:m,featureFlags:o,priceDetails:d});if(h)return h}};var o=i(42031);let s={async getData(e){let t,i,r,{translations:n,destination:l,fulfillmentData:s,productFlags:d,fulfillmentSettings:c,productData:u,selectedChildItem:p,locale:m}=e,{destinationCountryCode:h,destinationPostalCode:f,destinationState:g}=l,{twodayzipcodealertmessage:b,zipcodealertmessage:y,digitaldeliveryalertmessage:x}=n,{inventory:{processed:{data:v,isError:S,isLoading:C}},mdoLocation:{data:E,isError:I},warehousePickupStatus:{status:T}}=s;if(C||!v)return;let A=(0,o.Dp)({countryCode:h,productFlags:d,productData:u,translations:n,inventoryData:v,fulfillmentSettings:c,destinationState:g,warehousePickupStatus:T,selectedChildItem:p,locale:m});if(A)return{...A,alert:(t=d.is2DayDelivery&&"CA"===l.destinationCountryCode&&!d?.isCostcoGroceryEligible,i=!!(d.isBigAndBulkyProduct&&v?.fulfilledBy?.toLowerCase()===a.RO.UNKNOWN.toLowerCase()),r=!!(v.availability===a.RO.UNAVAILABLE&&(S||i)),t?{message:b?.replace("{{postal code}}",String(f)),linkId:"two-day-alert-zip-code"}:r&&!E&&I?{message:n?.bopimzipcodealertmessage||"",linkId:"mdo-alert-zip-code"}:r&&d.isDigitalDelivery?{message:x,linkId:"digital-delivery-alert-zip-code"}:r?{message:y,linkId:"alert-zip-code"}:void 0),enableDeliverySurcharge:!0}}};var d=i(51551);let c={async getData(e,t){let{translations:i,fulfillmentData:r,productFlags:a,productData:n,featureFlags:l,warehouseFlags:o,locale:s}=e,{pickUp:c,inventory:u}=r;if(!c.data&&!c.isError||!u?.processed?.data)return;let p=u.processed.data.availability,m=l.isBopiwOrSTWEnabled&&o.isWarehouseBopiwEnabled,h=t?.isWapoEnabled??!1,f=(0,d.TI)({pickUpData:c.data,translations:i,productFlags:a,productData:n,inventoryStatus:p,isWarehouseBopiwEligible:m,isPickUpError:!!c.isError,featureFlags:l,locale:s,isWapoEnabled:h});if(f)return f}},u={async getData(e){let{translations:t,fulfillmentData:i,productFlags:r,featureFlags:a,locale:n}=e,{mdoLocation:l,pickUp:o,inventory:s}=i;
103if(!o.data&&!o.isError||!s?.processed?.data)return;let c=!!l.data,u=(0,d.lx)({pickUpData:o.data,translations:t,productFlags:r,hasMdoData:c,isPickUpError:!!o.isError,featureFlags:a,locale:n});if(u)return u}};var p=i(98216);let m={async getData(e){let{fulfillmentData:t,productFlags:i,featureFlags:r,warehouseFlags:n,translations:l}=e,{samedayDeliveryData:o,warehousePickupStatus:{status:s}}=t;if(!i?.isSameDayDelivery||!o)return;let d=(({translations:e,samedayDeliveryData:t,warehouseStatus:i,isWarehouseEnabled:r})=>{if(i===a.RO.NOTSOLD||!r)return;let n=i===a.RO.UNAVAILABLE,l=i===a.RO.NOSTOCK,o=!(n||l),s=(n?e?.unavailable:l?e?.outofstock:e?.pricingmayvary)||"";return{EDD:s,isAvailable:o,id:a.Oi.SAME_DAY_DELIVERY,label:e?.samedaydeliverylabel||"",timeframe:"",primaryInfo:[{image:t?.samedayDeliveryInstacart||"",altText:"Powered By Instacart"}],secondaryInfo:[{text:e?.samedaydeliveryinfo||""}],iconInfo:t?.samedayDeliveryIcon||"",iconTitle:t?.samedayDeliveryIconTitle||"",secondaryLabel:o?s:"",secondaryLabelColor:"light"}})({translations:l,samedayDeliveryData:o,isWarehouseEnabled:(0,p.$E)({productFlags:i,featureFlags:r,warehouseFlags:n}),warehouseStatus:s});if(d)return{...d}}};var h=i(19909),f=i(45969),g=i(7040);let b=e=>{let t=(0,h.r)(),{priceDetails:i}=(0,f.A)(),n=(0,g.X)(e),o=n?.isEnabled,{data:d,isLoaded:p}=function(e){let[t,i]=(0,r.useState)([]),[a,n]=(0,r.useState)(null),[l,o]=(0,r.useState)(!0),[s,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{o(!0),d(!1),Promise.allSettled(e).then(e=>{i(e.filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>void 0!==e));let t=e.filter(e=>"rejected"===e.status);if(t.length>0){let e=t.map(e=>e.reason);n(e),console.error(`[PDP][Fulfillment][useFulfillmentData][Error] - Request had ${t.length} failure(s):`,e)}}).finally(()=>{o(!1),d(!0)})},[e]),{data:t,isLoading:l,isLoaded:s,error:a}}((0,r.useMemo)(()=>(o?a.NV:a.NV.filter(e=>"BuyInWarehouse"!==e)).map(e=>(function(e){switch(e){case"Delivery":return s;case"Pickup":return c;case"SameDay":return m;case"BuyInWarehouse":return l;case"PickupMDO":return u;default:throw Error(`Unsupported fulfillment type: ${e}`)}})(e).getData(t,{priceDetails:i,isWapoEnabled:o}).then(e=>e?{...e}:void 0)),[t,o,i]));return{isFulfillmentOutOfStock:(0,r.useMemo)(()=>d?.every(e=>!e.isAvailable),[d]),fulfillmentMolecules:d,isLoaded:p}}},66210:(e,t,i)=>{i.d(t,{default:()=>p});var r=i(95155),a=i(34291),n=i(92226),l=i(12158),o=i(27966),s=i(86670);let d=({childCatalogData:e,selectedChildItemNumber:t})=>{let{isMobile:i}=(0,a.A)(),d=(0,s.Ay)("div")`
104    p {
105      margin: 0;
106    }
107  `,c=t?e?.find(({id:e})=>e===t):e?.[0],u=c?.descriptions?.[0]?.object?.longDescription,p="string"==typeof u&&u.includes("<![CDATA[")?u.replace(/<!\[CDATA\[|\]\]>/g,""):u;return p?(0,r.jsx)(o.default,{tabIndex:-1,"data-testid":"promotional-card",id:"promotionCard",children:(0,r.jsx)(n.l,{cornerStyle:i?"square":"rounded",children:(0,r.jsx)(l.Text,{color:"success",variant:"t6",uniqueId:"longDescription",bold:!0,children:(0,r.jsx)(d,{dangerouslySetInnerHTML:{__html:p}})})})}):null};var c=i(12129),u=i(38734);let p=({productDetailsData:e})=>{let{productData:t,selectedChildItemNumber:i}=e,{childCatalogData:a}=t||{},[n]=(0,u.N)(),l=n?.value||i;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c.default,{size:{xs:12},children:(0,r.jsx)(d,{childCatalogData:a||[],selectedChildItemNumber:l})})})}},66874:(e,t,i)=>{i.d(t,{M:()=>n});var r=i(12115),a=i(68438);let n=()=>{let e=(0,r.useContext)(a.K);if(!e)throw Error("ZipCodeSelectorDrawerContext must be used within a ZipCodeSelectorContextProvider");return e}},68438:(e,t,i)=>{i.d(t,{K:()=>n,ZipCodeSelectorDrawerProvider:()=>l});var r=i(95155),a=i(12115);let n=(0,a.createContext)(null),l=({children:e})=>{let[t,i]=(0,a.useState)(!1);return(0,r.jsx)(n.Provider,{value:{isZipCodeDrawerOpen:t,onZipCodeDrawerOpen:()=>{i(!0)},onZipCodeDrawerClose:()=>{i(!1)}},children:e})}},68470:(e,t,i)=>{i.d(t,{e:()=>n,J:()=>o});var r=i(45182),a=i(12115);let n=()=>{let[e,t]=(0,r.$S)(),i=(0,a.useCallback)(e=>{let[i,r]=Object.entries(e).reduce(([e,t],[i,r])=>(isNaN(Number(i))?t.push(r):e[i]=r,[e,t]),[{},[]]);t({...i,...r.length>0&&{genericATCError:r[0]}})},[t]),n=(0,a.useCallback)(()=>{t(null)},[t]),l=(0,a.useCallback)(e=>{t(t=>{if(!t)return null;let{[e]:i,...r}=t;return Object.keys(r).length>0?r:null})},[t]),o=!!(e&&Object.keys(e).some(e=>"genericATCError"!==e&&!isNaN(Number(e)))),s=!!e?.genericATCError;return{errorMap:e,hasError:o,hasGenericATCError:s,setError:i,clearError:n,clearItemError:l}};var l=i(70422);let o=e=>{let{trackEvent:t}=(0,l.z1)();(0,a.useEffect)(()=>{e&&t({trackType:"multiAttribute",trackedData:[{key:"uimsg",value:"Product Detail - Bundle | Cannot add items to cart"}]})},[e,t])}},68785:(e,t,i)=>{i.d(t,{W:()=>r});let r=async(e,t,i)=>{if(!e)return null;let r=i||String("CABC"),{required_request_headers:a,endpoint:n}=t||{},l=`${n}/${r}-${e}`;try{let t=await fetch(l,{method:"GET",headers:{"client-identifier":a?.client_identifier||"",...a?.environment&&{"Costco-env":a.environment}}});if(!t.ok){let i=(await t.json()).message||"No error message provided";throw Error(`ChildID: ${e}, StatusCode: ${t.status}, StatusText: ${t.statusText}, Error: ${i}`)}return{manualsAndGuidesInfo:await t.json(),status:t.status}}catch(i){let t=i instanceof Error?i.message:String(i);console.error(`[PDP][M&G][Error] - Product: ${e}, ${t}`)}}},69934:(e,t,i)=>{i.d(t,{T:()=>n});var r=i(12115),a=i(24939);let n=()=>{let e=(0,r.useContext)(a.t);if(!e)throw Error("useAddToCartDrawer must be used within a AddToCartDrawerProvider");return(0,r.useMemo)(()=>e,[e])}},70334:(e,t,i)=>{i.d(t,{Ez:()=>n,Lr:()=>a});var r=i(24880);r.D3H;let a={'&:has(div[data-layout="aduilder_one_half"])':{width:"calc(50%)",flex:"none","@media (max-width: 1024px)":{width:"100%"}},'&:has(div[data-layout="aduilder_one_third"])':{width:"calc(33.33%)",flex:"none","@media (max-width: 1024px)":{width:"100%"}},'&:has(div[data-layout="aduilder_one_fourth"])':{width:"calc(25%)",flex:"none","@media (max-width: 1024px)":{width:"100%"}}},n={"& .MuiCardContent-root":{display:"flex",flexDirection:"column",gap:r.Mzk}}},70443:(e,t,i)=>{i.d(t,{BuildBundleChildContainer:()=>k});var r=i(95155),a=i(12115),n=i(99899),l=i(55632),o=i(31122),s=i(38909),d=i(24880);let c={border:`1px solid ${d.Z8G}`,borderRadius:d.m72,display:"flex",flexDirection:"column",padding:d.D3H,marginTop:d.Mzk},u={display:"flex",flexDirection:"column",width:"100%"},p={display:"flex",flexDirection:"column",width:"100%",gap:d.Mzk},m={display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%"},h={color:d.S6v,textDecoration:"underline"};var f=i(27944),g=i(44052),b=i(19359),y=i(60714),x=i(27966),v=i(88165),S=i(1611),C=i(95468),E=i(12158),I=i(7457),T=i(42138),A=i(2377),D=i(71586),_=i(96013),O=i(68470),w=i(45969),N=i(5553),j=i(30890),P=i(13052),R=i(38734);let k=({bundleItems:e,bundleRawData:t})=>{let{productDetailsData:i,locale:k,translations:L,accessoriesData:M,pageSettingsProperties:B}=(0,o.h)(),{isLoadingPriceAPI:$,isPriceApiError:z}=(0,w.A)(),U=B?.enableModURLInBundle||!1,q=i.productData,V=q?.childCatalogData?.[0]?.id||"",F=q?.dispPriceInCartOnly===1,W=(0,j.ce)(q,V)||F,{addToListContentStackData:H,productTileConfigData:K,productSummaryServiceConfig:G,bundleDetailsServiceConfig:Y}=(0,y.h)(),{addToListContentStackData:Q}=H||{},[Z]=(0,R.N)(),{bundleItemsData:J,bundleParentData:X,resolvedVariantId:ee}=(0,v.xm)({bundleItems:e,bundleRawData:t,locale:k,productSummaryServiceConfig:G,bundleDetailsServiceConfig:Y,productData:q,selectedVariant:Z?.value}
107),et=X?.id||"",ei=X?.descriptions?.[0]?.object?.shortDescription||"";(0,l.h)(J,X,ee);let er=(0,a.useMemo)(()=>(0,D.nt)(et,ei,U||!1),[et,ei,U]),ea=(0,a.useMemo)(()=>(0,D._L)(J,L,U,W,Z?.value),[J,L,U,W,Z?.value]),en=(0,a.useMemo)(()=>J.map(e=>({childItemNumber:e.id,shippingCodes:(0,b.u)(e?.productAttributes?.at(0)?.shipModes??void 0),minQuantity:(0,g.Gs)(e.minItemOrderQty)})),[J]),el=(0,a.useMemo)(()=>J.filter(e=>e.isSellable).map(e=>e.id),[J]),eo=(0,a.useMemo)(()=>Object.fromEntries(ea.map(e=>[e.itemNumber,e.productName])),[ea]),{isSellableItemsInStock:es}=(0,P.MN)(),{errorMap:ed,clearItemError:ec}=(0,O.e)(),{trackBundleLoad:eu,trackProductCheckChange:ep,trackViewBundle:em,isInventoryLoading:eh}=(0,v.WU)(J);return((0,a.useEffect)(()=>{eh||eu()},[eh,eu]),J&&0!==J.length)?(0,r.jsxs)(n.A,{testId:`child-bundle-container-${V}`,children:[(0,r.jsx)(f.i,{componentItems:en}),(0,r.jsxs)(x.default,{sx:p,"data-testid":"bundle-child-container",children:[(0,r.jsxs)(x.default,{sx:m,children:[(0,r.jsx)(E.Text,{bold:!0,component:"h2",uniqueId:"bundle-card-title",id:N.uY,variant:"t3",children:L?.completeyourset||"Complete Your Set"}),(0,r.jsx)(I.Button,{variant:"text-button",uniqueId:"view-bundle-button",sx:h,href:er||void 0,target:"_blank",onClick:()=>{em()},children:L?.viewbundletext||""})]}),!$&&z&&(0,r.jsx)(T.Notification,{uniqueId:`bundle-priceapi-error-${V}`,severity:"alert",message:L?.missingpricefallbacktext||"Price API Error",icon:(0,r.jsx)(_.A,{})}),(0,r.jsxs)(x.default,{sx:u,children:[(0,r.jsx)(C.C,{sellableItemNumbers:el,itemNames:eo,locale:k,translations:L,children:ea.map((e,t)=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)(S.A,{productData:e,locale:k,translations:L,addToListContentStackData:Q,customErrorMsg:ed?.[e.itemNumber],onCheckChange:ep,onClearServerError:()=>ec(e.itemNumber),index:t}),t<ea.length-1&&(0,r.jsx)(A.Divider,{sx:{margin:`${d.Mzk} 0`}})]},e.itemNumber))}),es&&(0,r.jsx)(x.default,{sx:c,"data-testid":"add-to-cart-wrapper",children:(0,r.jsx)(s.A,{locale:k,productDetailsData:i,translations:L,dispInChildBundleContainer:!0,productConfig:K,accessoriesData:M,properties:B})})]})]})]}):(console.info("[PDP][BUNDLE][ERROR] - Unable to build child bundle page - no published and buyable items"),null)}},70746:(e,t,i)=>{i.d(t,{e:()=>n});var r=i(12115),a=i(9358);let n=()=>{let e=(0,r.useContext)(a.r);if(!e)throw Error("useWarehouseContext must be used within a WarehouseContextProvider");return e}},70991:(e,t,i)=>{i.d(t,{n0:()=>o,tu:()=>l,vq:()=>n});var r=i(50716),a=i(19359);let n=e=>"tag"===e.type,l=(e,t)=>{if(n(e)&&e.name.toLowerCase()===t.toLowerCase())return e;if(n(e)&&e.children){for(let i of e.children)if("tag"===i.type||"text"===i.type){let e=l(i,t);if(e)return e}}return null},o=(e,t,i)=>(0,r.Ay)(e,{replace:e=>{if(n(e)&&"a"===e.name&&e.attribs?.href){let r=e.attribs.href;if((0,a.i9)(r,t)){let t=e.children?.[0]?.type==="text"?e.children[0].data:r;return i(r,t)}}}})},71586:(e,t,i)=>{i.d(t,{nt:()=>n,_L:()=>a}),i(7025);var r=i(28158);let a=(e,t,i,r,a)=>e.map(e=>{let{id:l,descriptions:o,ratingScore:s,ratingCount:d,isChd:c,isPublished:u,productAttributes:p}=e.parentDetails||{},m=o?.[0]?.object,h=p?.[0]?.object,f=h?.filter(e=>e.isDisplayable&&"Model"===e.identifier&&null!=e.value).map(e=>({key:e.key,value:e.value,identifier:e.identifier})),g=e.productAttributes?.[0],b=g?.object.filter(e=>e.isDisplayable&&("Model"===e.identifier||e.identifier.includes("Color")&&"defining"===e.type)&&null!=e.value).sort((e,t)=>"Model"===e.identifier?-1:+("Model"===t.identifier)).map(e=>({key:e.identifier.includes("Color")?`${e.key}:`:e.key,value:e.value,identifier:e.identifier}));!b?.find(e=>"Model"===e.identifier)&&f?.length&&b?.unshift(f?.[0]);let y=t?.averageratingarialabel||"",x=s??0,v=d??0,S=y?y.replace("{rating}",String(x)).replace("{total}",String(v)):"",C=n(e.id,m?.shortDescription||"",i||!1);return{itemNumber:e.id||"",partNumber:l||"",productImageUrl:e?.descriptions?.[0]?.object?.imageName||null,productName:m?.shortDescription||"",productLinkUrl:C,productDescription:m?.shortDescription||null,productAttributes:b,minItemQuantity:Number(e.minItemOrderQty),maxItemQuantity:Number(e.maxItemOrderQty),isMemberOnlyItem:r,isLimitOneQty:e.isLimitOneQty,isFsaEligible:e.isFsa,isLinkFeeEligible:e?.isLinkFeeEligible||!1,isPublished:e.isPublished||u||!1,isCurrentItem:e.id===a,isSellable:e.isSellable??!0,reviewRatingData:{value:x,reviewCount:v,ariaLabel:S},isChdiEligible:e.isChd||c}}).sort((e,t)=>
107e.isCurrentItem!==t.isCurrentItem?e.isCurrentItem?-1:1:e.isSellable!==t.isSellable?e.isSellable?-1:1:0),n=(e,t,i)=>{let a=""!==t?(0,r.u)(t):"",n="https://www.costco.ca";return e&&n?i?(0,r.M)(a,e,n)||"":`${n}/${a}.product.${e}.html`:(console.info("[PDP][BUNDLE][ERROR] - Missing item number or edge cache domain for generating product link URL"),"")}},71645:(e,t,i)=>{i.d(t,{IX:()=>n,QX:()=>r,mu:()=>s,o9:()=>l,qo:()=>d,qu:()=>o,ts:()=>a});let r="PDP",a="CMW",n="https://cdn.bfldr.com/56O3HXZ9/at/v2cj7rpttsp4wcv33pgf5nx/no-image-placeholder-en.svg",l="No Image Available",o=124,s="16px",d="bottom"},72824:(e,t,i)=>{i.d(t,{FulfillmentBdContext:()=>s,FulfillmentBdContextProvider:()=>u});var r=i(95155),a=i(12115),n=i(70746),l=i(62151),o=i(78015);let s=(0,a.createContext)(null),d=(0,o.K)({},!1),c={fulfillmentData:d,featureFlags:d,warehouseFlags:d,productData:d},u=({children:e,locale:t,productDetailsData:i})=>{let{productData:o,selectedChildItemNumber:d}=i,{childCatalogData:u}=o,p=(0,l.c3)(),m=(0,l.T9)(),h=(0,l.Ro)(u,d),{flags:f,attributes:g}=(0,l.W$)(h,o),b=(0,l.dh)(d,g,f),y=(0,l.Ed)(),{selectedWarehouse:x,warehouseState:v}=(0,n.e)(),S=(0,a.useMemo)(()=>({...c,translations:p,productFlags:f,productAttributes:g,fulfillmentData:b,selectedChildItem:h,locale:t,destination:y,selectedWarehouse:x,warehouseState:v,fulfillmentSettings:m}),[p,f,g,h,t,y,x,v,m,b]);return(0,r.jsx)(s.Provider,{value:S,children:e})}},73414:(e,t,i)=>{i.d(t,{default:()=>ek});var r,a=i(95155),n=i(12115),l=i(12129),o=i(99295),s=i(62526),d=i(82993),c=i(7457),u=i(42138),p=i(92226),m=i(12158),h=i(19216),f=i(34971),g=i(95097),b=i(84791),y=i(34291),x=i(27966),v=i(24880),S=i(13869),C=i(71706),E=i(30890),I=i(48195);let T="setCartState",A="changeQty",D="setErrorState";var _=((r={}).TARGETED_CART_BEHAVIOUR="TargetedCartBehaviour",r.MEMBERSHIP="Membership",r),O=i(45955),w=i(29445),N=i(97766),j=i(89148),P=i(42446),R=i(69934),k=i(45969),L=i(42886),M=i(32722),B=i(65769),$=i(51296),z=i(27777),U=i(70422);let q=(e,t)=>{let{type:i,payload:r}=t;switch(i){case T:return{...e,qtyErrorMsg:r?.qtyErrorMsg||"",qty:r?.qty||e.qty,isAddToCartError:!!r?.isAddToCartError,isLoading:!!r?.isLoading};case A:{let{minErrorMsg:t="",maxErrorMsg:i="",qty:a=1}=r||{};return{...e,qtyErrorMsg:a<1?t:a>999?i:"",qty:Math.min(a||1,999)}}case D:{let{customErrorLabel:t,orderErrMsgObj:i}=r?.res||{},a=!!(!t&&0===Object.values(i||{}).length);return{...e,isAddToCartError:a,isLoading:!1,qtyErrorMsg:a?"":t||Object.values(i||{})?.join(". ")?.replace(/''/g,"'")}}default:return e}};var V=i(92060),F=i(40538),W=i(19359);let H=e=>{let{navigateToNextDrawer:t,onDrawerOpen:i,isOpen:r}=(0,R.T)(),{trackEvent:l}=(0,U.z1)(),{priceDetails:o}=(0,k.A)(),{refreshCart:s,handleHybridAddToCart:d}=(0,M.B)(),{getToken:p}=(0,B.A)(),m=(0,n.useRef)(null),[h,f]=(0,n.useReducer)(q,{qty:Number(e.qty),qtyErrorMsg:"",isAddToCartError:!1,isLoading:!1}),{qty:g,qtyErrorMsg:b,isLoading:y,isAddToCartError:S}=h,{showBuyMembershipButton:C,itemId:I,imageName:_,productName:H,productDetailsData:K,cartItemDetails:G,productConfig:Y,translations:Q,fulfillmentDetails:Z,shortDescription:J,childItemNumber:X,membershipUrls:ee,enableRedirectionToUCCMod:et,locale:ei}=e||{},[er]=(0,V.B)(),ea={imageName:_,productName:H,translations:Q,itemId:X||I,shortDescription:J,productAttributes:G?.productAttributes?.[0]?.object?.filter(e=>e?.type==="defining").map(e=>({key:e?.key||"",value:e?.value||""}))||[]},{urls:en}=Y?.productTileConfigData?.translationsConfig||{},{id:el,isLimitOneQty:eo}=K?.productData||{},es=async n=>{let{id:c,parentId:u,isFsa:m,isChd:h,programTypes:b,isShipToWarehouse:y,productAttributes:x}=G||{},v=(K?.merchandiseData?.accessoriesData?.filter(({productData:e})=>e?.childCatalogData?.some(e=>F.E.includes(e.productClassType||"")))||[]).length>0,S={itemNumber:c||"",partNumber:u?.[0]||el||"",quantity:g,isSTWPickUp:!!(Z?.id==="shipToWarehouse"&&y),isPickUp:Z?.id==="pickUp"&&!!Z?.isPickUp,estimatedDeliveryDate:Z?.id==="mdoPickUp"?Z?.estimatedPickupDate:Z?.estimatedDeliveryDate||"",isFsaChdItem:!!(m||h),warehouseNumber:Z?.selectedWarehouse,contractIdentifier:b?.includes("2DayDelivery")?"Regional":"",eddInstallationServices:er?.services||[],isMDOPickUp:Z?.id==="mdoPickUp",ltlPickUpLocation:Z?.ltlPickUpLocation,...v?{dependentConfigured:v}:{}},I=(0,L.M9)(S);try{f({type:T,payload:{isAddToCartError:!1,qtyErrorMsg:"",isLoading:!0,qty:g}});let u=await p(!0)||"",m=await d(en?.addToCartURL,{...I,...C?{targetedCartBehaviour:"Membership"}:{},authToken:u},ei,(0,W.Z_)(x));if((0,$.Q)(m)){f({type:D,payload:{res:m}}),console.error("[PDP][AddToCart][Error]: Add to cart failed");return}let h=Number(K?.productData?.ratingScore?.toFixed(2)),{cartAdd:b}=(0,$.J)(n,el,c,g,Z?.label,h);if(l(b),C)if(et)return(0,E.fp)(c||X||"",ee?.buyMembershipUrl||"",ei);else return(0,E.SY)(m);s();let y={...e,accessoriesData:K?.merchandiseData?.accessoriesData||[],qty:g,priceListData:e.priceListData?e.priceListData:o,parentOrderItemId:m?.orderItemId,pageSettingsProperties:e.pageSettings?.properties},v=(0,a.jsx)(P.A,{title:Q?.addedtocarttext||"",subTitle:Q?.itemsincartlabel||""});r||i(),f({type:T,payload:{isLoading:!1}}),t({propsData:y,title:v,drawerType:"withCartItemsDrawer",Icon:N.A})}catch(e){console.error("[PDP][AddToCart][Error]: Add to cart failed"),f({type:T,payload:{isAddToCartError:!0,isLoading:!1}})}};return(0,a.jsxs)(x.default,{sx:{display:"flex",flexDirection:"column",width:"100%"},children:[S&&(0,a.jsx)(u.Notification,{uniqueId:"add-to-cart-error",message:Q?.addtocarterrormsg||"",severity:"critical",sx:{marginBottom:v.D3H,flexGrow:1}}
107),(0,a.jsxs)(x.default,{"data-testid":"add-to-cart",sx:{display:"flex",gap:v.iAn},children:[(0,a.jsxs)(x.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"column",gap:v.m72},children:[(0,a.jsxs)(x.default,{sx:{display:"flex",gap:v.D3H},children:[!eo&&!C&&(0,a.jsx)(x.default,{sx:{display:"flex",flexDirection:"column",width:"130px",'& [id="quantitySelector_error_addToCartDrawer_pdp"]':{display:"none"}},children:(0,a.jsx)(O.R,{...C?{maxValue:1}:{},allowAddToCartDisplay:!1,onQuantityChange:e=>{f({type:A,payload:{qty:e,minErrorMsg:Q?.minvalerror||"",maxErrorMsg:Q?.maxvalerror||""}})},uniqueId:"addToCartDrawer_pdp",updateQuantity:g,customErrorMsg:b,incrementAriaLabel:Q?.qtyincrementarialabel,decrementAriaLabel:Q?.qtydecrementarialabel,inputAriaLabel:Q?.quantitylabel,quantityLabel:Q?.quantitylabel})}),(0,a.jsx)(c.Button,{ref:m,sx:{flex:"1 0 0"},onClick:e=>es(e),startIcon:C?void 0:(0,a.jsx)(j.Ay,{height:16,width:16}),isLoading:y,"aria-label":C?void 0:`${Q?.addtocartbutton} ${H}`,uniqueId:"addToCartDrawer_pdp",children:C?Q?.buymembershipbutton:Q?.addtocartbutton})]}),(0,a.jsx)(w.d,{errorIconA11yAttributes:{"aria-hidden":!1,focusable:!0,"aria-label":b},hasError:b.length>0,errorText:b,errorTextId:`AddToCart-pdp-${G?.id}`,"data-testid":"quantity-error-message"})]}),!C&&(0,a.jsx)(z.A,{...ea})]})]})};var K=i(96013),G=i(60475);let Y=(e,t)=>{let{type:i,payload:r}=t;switch(i){case"setCartState":return{...e,qtyErrorMsg:r?.qtyErrorMsg||"",isAddToCartError:!!r?.isAddToCartError,isLoading:!!r?.isLoading};case"setErrorState":{let{customErrorLabel:t,orderErrMsgObj:i}=r?.res||{},a=!!(!t&&0===Object.values(i||{}).length);return{...e,isAddToCartError:a,isLoading:!1,qtyErrorMsg:a?"":t||Object.values(i||{})?.join(". ")}}default:return e}},Q=(0,i(9527).y)(),Z={fullPrice:0,wholeValue1:"0",decimalValue1:"00"},J=e=>{let[t,i]=Q(e),r=(0,n.useMemo)(()=>t?.children.reduce((e,{count:t,isSelected:i,isOutOfStock:r})=>!i||r?e:e+t,0)||0,[t]),a=(0,n.useMemo)(()=>t?.children.reduce((e,{isSelected:t,isOutOfStock:i})=>!t||i?e:e+1,0)||0,[t]),[l,o,s,d]=t?.children.reduce(([e,t,i,r],n)=>{let l=n.isSelected||n.isOutOfStock?n.price*n.count:0,o=n.price*Number(n.isOutOfStock),s=n.isOutOfStock||a<=1||!n.isSelected?0:n.savings*n.count,d=n.isSelected?l-o-s:0;return[e+l,t+o,i+s,r+d]},[0,0,0,0]).map(e=>[e,...Number(e).toFixed(2).split(".")]).map(([e,t,i])=>({fullPrice:Number(e),wholeValue1:String(t),decimalValue1:String(i)}))||[Z,Z,Z,Z],c=(0,n.useMemo)(()=>t?.children.reduce((e,{count:t,isOutOfStock:i})=>i?e+t:e,0)||0,[t]);return{bundleState:t,price:{bundlePrice:l,outOfStock:o,savings:s,total:d},selectedItemsCount:r,selectedAtLeastOneItemCount:a,outOfStockItemsCount:c,setBundleState:i}};var X=i(2377),ee=i(1147);let et=({translations:e,lang:t})=>{let{price:{bundlePrice:i,savings:r,total:n,outOfStock:l},selectedItemsCount:o,selectedAtLeastOneItemCount:s,outOfStockItemsCount:d}=J(),c=o>0&&!!r?.fullPrice,u=1===d?e?.bundleoutofstock:e?.bundleoutofstockplural;return o?(0,a.jsxs)(x.default,{sx:{display:"flex",flexDirection:"column",gap:v.m72},children:[(0,a.jsxs)(ei,{isVisible:c||s>1||d>0,children:[(0,a.jsx)(m.Text,{variant:"l1",bold:!0,uniqueId:"bundle-label",children:e?.bundle}),(0,a.jsx)(ee.g,{locale:t,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:i.wholeValue1,hasDecimal:!0,decimalValue1:i.decimalValue1,hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"xs"})]}),(0,a.jsxs)(ei,{isVisible:!!d,children:[(0,a.jsx)(m.Text,{variant:"l1",bold:!0,uniqueId:"bundle-out-of-stock-label",children:u}),(0,a.jsx)(ee.g,{locale:t,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:l.wholeValue1,hasDecimal:!0,decimalValue1:l.decimalValue1,hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"xs",isDiscountedPrice:!0})]}),(0,a.jsxs)(ei,{isVisible:c,children:[(0,a.jsx)(m.Text,{color:"success",variant:"l1",bold:!0,uniqueId:"bundle-direct-savings-label",children:e?.costcodirectsavings}),(0,a.jsx)(ee.g,{locale:t,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:r.wholeValue1,hasDecimal:!0,decimalValue1:r.decimalValue1,hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"xs",hasPromoColor:!0,isDiscountedPrice:!0})]}),(0,a.jsx)(X.Divider,{orientation:"horizontal",sx:{borderColor:v.XgP}}),(0,a.jsxs)(ei,{children:[(0,a.jsx)(m.Text,{variant:"t3",bold:!0,uniqueId:"bundle-total-label",children:e?.bundletotal}),(0,a.jsx)(ee.g,{locale:t,priceType:"single",hasPrepend:!1,hasCurrency:!0,wholeValue1:n.wholeValue1,hasDecimal:!0,decimalValue1:n.decimalValue1,hasPercent:!1,hasOff:!1,hasAppend:!1,hasPromoPrice:!1,size:"sm"})]})]}):null},ei=({isVisible:e=!0,children:t})=>e?(0,a.jsx)(x.default,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:t}):null,er=e=>{let{navigateToNextDrawer:t,onDrawerOpen:i,isOpen:r}=(0,R.T)(),{trackEvent:l}=(0,U.z1)(),{priceDetails:o}=(0,k.A)(),{refreshCart:s}=(0,M.B)(),{getTokenValue:d}=(0,G.y)(),[p,m]=(0,n.useReducer)(Y,{qtyErrorMsg:"",isAddToCartError:!1,isLoading:!1}),{qtyErrorMsg:h,isLoading:f,isAddToCartError:g}=p,{productName:b,productDetailsData:y,fulfillmentDetails:S,cartItemDetails:C,productC
107onfig:E,translations:I}=e||{},{urls:A}=E?.productTileConfigData?.translationsConfig||{},{selectedItemsCount:_,bundleState:O}=J((0,n.useMemo)(()=>({children:ea}),[])),L=async n=>{let c="";try{let u,p,h,f;m({type:T,payload:{isAddToCartError:!1,qtyErrorMsg:"",isLoading:!0}}),c=await d(!0);let g=(u=A?.addToCartURL,p={authToken:c},{success:!0,data:p,url:u});if((e=>{let{errorMessage:t,orderErrMsgObj:i,customErrorLabel:r}=e||{};return!!(r||t||Object.values(i||{}).length>0)})(g)){m({type:D,payload:{res:g}}),console.error("[PDP][AddToCart][Error]: Add to cart failed");return}let{cartAdd:b}=(h=O?.children.map(({id:e,sku:t})=>({id:e,sku:t})),f=S?.label,{cartAdd:{trackedData:{cartAdd:"Product Detail - Bundle",product:h.map(({id:e,sku:t})=>({pid:e,sku:t})),element:n.target.outerHTML,channel:f},doNotTrack:!1,trackType:"pdp-add-to-cart"}});l(b),s();let x={...e,accessoriesData:y?.merchandiseData?.accessoriesData||[],priceListData:e.priceListData?e.priceListData:o,pageSettingsProperties:e.pageSettings?.properties},v=(0,a.jsx)(P.A,{title:I?.addedtocarttext||"",subTitle:I?.itemsincartlabel||""});r||i(),m({type:T,payload:{isLoading:!1}}),t({propsData:x,title:v,drawerType:"withCartItemsDrawer",Icon:N.A})}catch(e){console.error("[PDP][AddToCart][Error]: Add to cart failed"),m({type:T,payload:{isAddToCartError:!0,isLoading:!1}})}},B=_?1===_?I?.addbundletocartbutton.replace("{{amount}}",String(_)):I?.addbundletocartbuttonplural.replace("{{amount}}",String(_)):I?.selectbundleitem;return(0,a.jsxs)(x.default,{sx:{display:"flex",flexDirection:"column",width:"100%"},children:[g&&(0,a.jsx)(u.Notification,{uniqueId:"add-to-cart-error",icon:(0,a.jsx)(K.A,{"aria-label":"Alert"}),message:I?.addtocarterrormsg||"",severity:"critical",sx:{marginBottom:v.D3H,flexGrow:1}}),(0,a.jsx)(x.default,{"data-testid":"add-to-cart",sx:{display:"flex",gap:v.iAn},children:(0,a.jsxs)(x.default,{sx:{display:"flex",flexGrow:"1",flexDirection:"column",gap:v.m72},children:[(0,a.jsx)(et,{translations:I,lang:e.locale}),(0,a.jsx)(x.default,{sx:{display:"flex",gap:v.D3H},children:(0,a.jsx)(c.Button,{sx:{flex:"1 0 0"},onClick:e=>L(e),startIcon:(0,a.jsx)(j.Ay,{height:v.b3d,width:v.b3d}),isLoading:f,"aria-label":`${B} ${b}`,uniqueId:"AddToCart-pdp",children:B})}),(0,a.jsx)(w.d,{errorIconA11yAttributes:{"aria-hidden":!1,focusable:!0,"aria-label":h},hasError:h.length>0,errorText:h,errorTextId:`AddToCart-pdp-${C?.id}`})]})})]})},ea=[{id:"1",sku:"123",price:19.99,count:1,title:"Bundle Item 1",subtitle:"Subtitle 1",description:"Description for Bundle Item 1",image:"https://via.placeholder.com/150",savings:5,isOutOfStock:!1,isSelected:!0},{id:"2",sku:"1234",price:29.99,count:1,title:"Bundle Item 2",subtitle:"Subtitle 2",description:"Description for Bundle Item 2",image:"https://via.placeholder.com/150",savings:7.5,isOutOfStock:!1,isSelected:!1},{id:"3",sku:"12345",price:39.99,count:2,title:"Bundle Item 3",subtitle:"Subtitle 3",description:"Description for Bundle Item 3",image:"https://via.placeholder.com/150",savings:10,isOutOfStock:!1,isSelected:!0},{id:"4",sku:"123456",price:49.99,count:1,title:"Bundle Item 4",subtitle:"Subtitle 4",description:"Description for Bundle Item 4",image:"https://via.placeholder.com/150",savings:12.5,isOutOfStock:!0,isSelected:!1}];var en=i(66191);let el=e=>{let[t,i]=(0,n.useState)(e.isOpen),{onClose:r}=e,{trackEvent:l}=(0,U.z1)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Button,{onClick:()=>{l({component:{identifier:"Product Detail | Add Membership Number",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),i(!0)},sx:{width:"100%"},children:e.buttonLabel}),(0,a.jsx)(en.r,{moduleSettings:e.moduleSetting,isOpen:t,onClose:()=>{i(!1),r&&r()},onSubmit:()=>{},hidePageOne:!1})]})};var eo=i(25283),es=i(8102),ed=i(60714),ec=i(82849),eu=i(7025),ep=i(70746),em=i(42031),eh=i(19547),ef=i(66874),eg=i(44987);let eb=e=>{let{childItemNumber:t,itemId:i,translations:r,shortDescription:l,inventoryInfo:o,locale:s,fulfillmentTranslations:d,isWarehouseOnly:T,isWioProduct:A,isMemberOnlyItem:D,memberValidationBypassFeatureEnabld:O,membershipUrls:w,samedayDeliveryData:N,fallbackLocation:j,isDrawerContent:P,fulfillmentDetails:R,imageName:k,productName:L,cartItemDetails:M,productDetailsData:B,isFullfillmentDataLoading:$,warehouseStockStatus:q,pageSettings:V,hasFutureStartDateWithNoInventory:F}=e||{},{productData:G}=B||{},{deliveryLocation:Y,wcMember:Q}=(0,C.B)(),{openWarehouseDrawer:Z}=(0,ep.e)(),{onZipCodeDrawerOpen:J}=(0,ef.M)(),{addMembershipModuleSettings:X}=(0,ed.h)(),{properties:ee}=V||{}
107,[et,ei]=(0,n.useState)(!1),ea=(0,n.useRef)(null),{isMobile:en}=(0,y.A)(),{availability:eb,firstShipDate:ey,lastShipDate:ex,typeDescription:ev,fulfilledBy:eS}=o||{},{signedIn:eC,validated:eE,verified:eI,active:eT}=(0,I.i)(),[eA,eD]=(0,n.useState)(!1),{trackEvent:e_}=(0,U.z1)(),eO=(0,eg.m)(s,{isWarehouseOnly:T}),ew=w?.renewMembershipUrl||"";w?.buyMembershipUrl;let eN=w?.joinTodayUrl||"",{dispPriceInCartOnly:ej}=B?.productData||{},eP=G?.id,eR=t||G?.childCatalogData?.[0]?.id||eP||"",ek=(G?.childCatalogData?.length||0)>1,eL=(0,es.G)(B),eM=r?.toplabel||"Top",eB=r?.topbuttonarialabel||"Back to Top",e$=()=>{e_({component:{identifier:"Product Detail | Sign In For Price",type:"nav"},doNotTrack:!1,trackType:"product-action-button"});let e=(0,eh.J)(l||"",G.id||"");(0,E.Mi)(e||"")},ez=()=>{e_({component:{identifier:"Product Detail | Join Costco",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),(0,E.Rh)(eN)},eU={PRESELL:!1,BACKORDERED:!1,SHIPRESTRICTED:!1,INSTOCK:!1,NOSTOCK:!1,UNAVAILABLE:!1,UNKNOWN:!1},eq=(0,W.S7)(G?.productAttributes||[],_.TARGETED_CART_BEHAVIOUR,s)===_.MEMBERSHIP,eV=()=>(!eE||!eI)&&O,eF=()=>{Q.updateWcMember(ec.A.get("wcMember")||"")};(0,n.useEffect)(()=>{let e=()=>{let e=document.getElementById("add-to-cart-button"),t=document.getElementById("extra-padding-bottom");if(!e)return;let i=e.offsetTop+e.offsetHeight;window.scrollY>i?(t&&(t.style.display=en?"block":"none"),ei(!0)):(t&&(t.style.display="none"),ei(!1)),en&&window.scrollY>window.innerHeight&&window.scrollY<i?eD(!1):eD(!0)};return window.addEventListener("scroll",e),e(),()=>{window.removeEventListener("scroll",e)}},[]),eU=R?.id===eu.Oi.SHIPPING||R?.id===eu.Oi.DELIVERY||R?.id===eu.Oi.TWO_DAY_DELIVERY?{PRESELL:"PRESELL"===eb,BACKORDERED:"BACKORDERED"===eb,SHIPRESTRICTED:"SHIPRESTRICTED"===eb||"ShipRestricted"===eS,INSTOCK:"INSTOCK"===eb,NOSTOCK:"NOSTOCK"===eb,UNAVAILABLE:"UNAVAILABLE"===eb,UNKNOWN:"UNKNOWN"===eb}:{PRESELL:!1,BACKORDERED:!1,SHIPRESTRICTED:!1,INSTOCK:!!R?.isAvailable,NOSTOCK:!R?.isAvailable,UNAVAILABLE:R?.EDD==="UNAVAILABLE",UNKNOWN:R?.EDD==="UNKNOWN"};let{message:eW,isAddToCartDisabled:eH}=(0,em.D$)({firstShipDate:ey||"",lastShipDate:ex||"",typeDescription:ev||"",isPresell:eU.PRESELL,locale:s,fulfillmentTranslations:d}),eK=R?.EDD?.toLowerCase()||r?.unavailable?.toLocaleLowerCase()||"",eG="en-us"!==s&&R?.id===eu.Oi.TWO_DAY_DELIVERY?(R?.label||"").replace("Delivery","").trim():(R?.label||"").toLowerCase(),eY=eO||!R?.label?r?.itemunavailabletext||"":R?.id===eu.Oi.SHIP_TO_WAREHOUSE||R?.id===eu.Oi.PICKUP?(0,W.Ln)(r?.itemavailabilityatselectedwarehouse||"","{{EDD}}",eK):r?.itemavailabilityatzipcodelabel?.replace("{{label}}",eG)?.replace("{{EDD}}",eK).replace("{{zipcode}}",Y?.zipCode||"")||"",eQ={imageName:k,productName:L,translations:r,itemId:t||i,productPartNumber:ek?eR:void 0,productIDNumber:eP,shortDescription:l,productAttributes:M?.productAttributes?.[0]?.object?.filter(e=>e?.type==="defining").map(e=>({key:e?.key||"",value:e?.value||""}))||[]},eZ=(e=!1,t,i,r=!0,n={width:"100%"},l)=>(0,a.jsxs)(x.default,{sx:{display:"flex",alignItems:"flex-start",gap:v.D3H,alignSelf:"stretch",width:"100%"},children:[(0,a.jsx)(c.Button,{onClick:t,variant:r?"primary":"secondary",sx:{...n},href:"#",uniqueId:`${i}`,disabled:l,children:i},i),e&&(0,a.jsx)(z.A,{...eQ})]},`ButtonParent-${i}`),eJ=e=>(0,a.jsxs)(x.default,{sx:{display:"flex",gap:v.D3H,width:"100%",alignItems:"flex-start"},children:[(0,a.jsx)(x.default,{style:{display:"flex",flexDirection:"column",width:"100%",gap:v.D3H},children:[e,r?.joincostcobutton].map(t=>t===r?.addmembershipnumberbutton&&eV()?(0,a.jsx)(el,{moduleSetting:X,isOpen:!1,onClose:eF,buttonLabel:t},`MembershipButtons-${t}`):t===r?.joincostcobutton?eZ(!1,ez,t,t===e):eZ(!1,()=>{},t,t===e))}),(0,a.jsx)(z.A,{...eQ})]}),eX=eC&&(eE||eI)&&eT,e0=R?.id===eu.Oi.PICKUP&&R?.isAvailable||R?.id===eu.Oi.MDO_PICKUP||R?.id===eu.Oi.SHIP_TO_WAREHOUSE,e1=R?.id===eu.Oi.SAME_DAY_DELIVERY,e2=R?.id===eu.Oi.BUY_IN_WAREHOUSE,e5=eO&&(!A||A&&!e1&&("INSTOCK"===q||"LOWSTOCK"===q)),e9=eU.UNAVAILABLE||eU.SHIPRESTRICTED||eU.NOSTOCK||eU.UNKNOWN||R?.isAvailable===!1,e7=()=>{let e,i,r,n,o,s=String("CABC"),u=(e=N?.samedayDeliveryBaseUrl?.[s],i=Y.zipCode??j,r=l?"USBC"===s?l.replace(/\./g,"%2E"):l.replace(/&amp;amp;/g,"&"):"",n={},i&&(n.delivery_zipcode=i),r&&(n.product_name=r),t&&(n.rrc=t),n.utm_source="pdp",o=new URLSearchParams(n),`${e}?${o.toString()}`),p={component:{type:"nav",identifier:"Product Detail",trackedData:["Shop Same-Day Delivery"]},doNotTrack:!1,trackType:"navigation"};return(0,a.jsxs)(x.default,{sx:{display:"flex",alignItems:"flex-start",ga
107p:v.D3H,alignSelf:"stretch",width:"100%"},children:[(0,a.jsx)(c.Button,{variant:"primary-alternate",sx:{width:"100%"},uniqueId:"shop-samedaydelivery-button",href:u,target:"_blank",onClick:()=>{e_(p)},children:d?.samedaybuttontext}),(0,a.jsx)(z.A,{...eQ})]})},e4=({isPrimaryButton:e=!1,showAddToList:t=!0,onClickEvent:i,buttonLabel:r,buttonId:n,showMessage:l=!0,notificationStatement:o=""})=>(0,a.jsxs)(x.default,{sx:{display:"flex",flexDirection:"column",gap:v.D3H,alignSelf:"stretch",width:"100%"},children:[l&&e6({uniqueId:n||"check-availability",message:o,showAddToList:!1,icon:(0,a.jsx)(S.A,{})}),(0,a.jsxs)(x.default,{sx:{display:"flex",alignItems:"flex-start",gap:v.D3H,alignSelf:"stretch",width:"100%"},children:[(0,a.jsx)(c.Button,{variant:e?"primary":"secondary",sx:{width:"100%"},uniqueId:n,onClick:()=>i(),children:r}),t&&(0,a.jsx)(z.A,{...eQ})]})]}),e3=({showMessage:e=!1})=>{let t=(0,W.Ln)(r?.itemavailabilityatselectedwarehouse||"","{{EDD}}",R?.EDD?.toLowerCase()||"");return(0,a.jsx)(e4,{buttonLabel:r?.checknearbywarehousesbuttontext,buttonId:"checknearbywarehouses-button",onClickEvent:Z,notificationStatement:t,showMessage:e})},e6=({uniqueId:e,message:t,severity:i="alert",sx:r,icon:n,showAddToList:l=!0})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Notification,{uniqueId:`product-actions-${e}`,icon:n,message:t,severity:i,isRole:!1,sx:{...r||{},"& > div:first-of-type > svg":{margin:0},flexGrow:1}}),l&&(0,a.jsx)(z.A,{...eQ})]}),e8=t=>(0,a.jsxs)(x.default,{sx:{display:"flex",flexDirection:"column",width:"100%"},children:[(eU.PRESELL||eU.BACKORDERED)&&eW&&R?.id!==eu.Oi.PICKUP?(0,a.jsx)(x.default,{sx:{marginBottom:v.D3H},children:e6({uniqueId:"presell-or-backordered",message:eW,showAddToList:!1,icon:(0,a.jsx)(S.A,{})})}):null,(0,a.jsx)(x.default,{sx:{display:"flex",gap:v.D3H,alignItems:"center"},children:e5?e6({uniqueId:"warehouse-only",message:A?r?.wiowarehouseonlynotificationtext||"":r?.warehouseonlynotificationtext||"",severity:"general"}):F&&(R?.id===eu.Oi.DELIVERY||R?.id===eu.Oi.SHIPPING)?e6({uniqueId:"future-start-date",message:r?.futurestartdatenotificationtext||"",showAddToList:!0,severity:"general"}):e9&&(R?.id===eu.Oi.SHIP_TO_WAREHOUSE||R?.id===eu.Oi.PICKUP||eO&&A)?(0,a.jsx)(e4,{buttonLabel:r?.checknearbywarehousesbuttontext,buttonId:"checknearbywarehouses-button",onClickEvent:Z,notificationStatement:eY,showMessage:"LOWSTOCK"!==q&&"INSTOCK"!==q}):e9?(0,a.jsx)(e4,{buttonLabel:r?.changezipcodebutton,buttonId:"changezipcodedrawer-button",onClickEvent:J,notificationStatement:eY}):eU.UNKNOWN?e6({uniqueId:"edd-generic-error",message:r?.eddgenericerrormessage||"",icon:(0,a.jsx)(S.A,{})}):(0,a.jsx)(eL?er:H,{...e,showBuyMembershipButton:t,locale:s})})]}),te=!e1&&!e2&&!eX&&(D&&(!eC||eV()||(eE||eI)&&!eT&&eC)||e0),tt=null;if(e2)if(R?.isAvailable){let e="INSTOCK"===q?d?.instock||"in stock":"LOWSTOCK"===q?d?.lowstock||"low stock":"",t=(0,W.Ln)(r?.itemavailabilityatselectedwarehouse||"","{{EDD}}",e?.toLocaleLowerCase()||"");tt=(0,a.jsx)(x.default,{sx:{display:"flex",alignItems:"center",gap:v.D3H,alignSelf:"stretch",width:"100%"},children:e6({uniqueId:"buy-in-warehouse-stock-status",message:t,severity:"general",showAddToList:!0})},`NotificationParent-biw-${e}`)}else tt=(0,a.jsx)(e3,{showMessage:!0});else{let e,t;tt=e1?(0,a.jsx)(()=>R?.isAvailable?(0,a.jsx)(x.default,{sx:{display:"flex",flexDirection:"column",gap:v.D3H,alignSelf:"stretch",width:"100%"},children:(0,a.jsx)(e7,{})}):(0,a.jsx)(e3,{showMessage:"LOWSTOCK"!==q&&"INSTOCK"!==q}),{}):(e=R?.id===eu.Oi.MDO_PICKUP||R?.id===eu.Oi.PICKUP,t=R?.id===eu.Oi.SHIP_TO_WAREHOUSE,eq?e8(!0):1!==ej||D||eC?(1!==ej||D||!eC)&&(D||e||t)&&(D||!t||!eX)&&(D||!e||R?.isAvailable&&!eX)?eC?eE||eI?eT?e8():eZ(!0,()=>{e_({component:{identifier:"Product Detail | Renew Membership",type:"nav"},doNotTrack:!1,trackType:"product-action-button"}),(0,E.Um)(ew)},r?.renewmembershipbutton):eJ(eV()?r?.addmembershipnumberbutton:r?.linkmembershipnumberbutton):eZ(!0,e$,e||t?r?.signintopickupbutton:r?.signintoseepricebutton):e8():eZ(!0,e$,r?.signintoseepricebutton))}let ti=()=>tt?(0,a.jsx)(p.l,{cornerStyle:en?"square":"rounded",children:(0,a.jsxs)(x.default,{sx:{display:"flex",justifyContent:"center",flexDirection:"column",gap:v.D3H},children:[te&&(0,a.jsxs)(x.default,{sx:{alignItems:"center",display:"flex",flexDirection:"row",gap:v.iAn,width:"fit-content"},children:[(0,a.jsx)(eo.A,{sx:{color:v.wcX,height:16,width:16},"data-testid":"member-only-icon"}),(0,a.jsx)(x.default,{children:(0,a.jsxs)(m.Text,{variant:"t5",uniqueId:"member-only-label",children:[r?.memberonlylabel||"",e0&&(0,a.jsx)(h.m,{buttonAriaLabel:"Members Only Pick-Up info",buttonContent:(0,a.jsx)(K.A,{"data-testid":"info-icon",width:"18px",height:"18px"}),buttonStyles:{color:v.hGW,width:"18px",height:"18px",position:"relative",bottom:"2px",marginLeft:v.m72},content:R?.id===eu.Oi.MDO_PICKUP?r?.bopimmemberonlytooltiptext:r?.memberonlytooltiptext,position:"bottom",tooltipId:"member-only-tooltip",uniqueId:"member-only-tooltip",hasArrow:!0,sx:{marginTop:"10px !important",'&[data-popper-placement*="bottom"] .arrow':{top:0,left:0,marginTop:"-0.9rem",marginLeft:"-9px","&::before":{borderColor:`${v.Z8G} transparent transparent ${v.Z8G}`,transformOrigin:"0 100%"}}}})]})})]}),tt]})}):null,tr=en&&et,ta=$||o?.availability===""&&(!eO||eO&&A);return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(x.default,{id:"add-to-cart-button",ref:ea,children:ta?(0,a.jsx)(p.l,{cornerStyle:en?"square":"rounded",children:(0,a.jsx)(f.Skeleton,{variant:g.z.Rectangular,height:"50px"})}):tr?(0,a.jsx)(b.n,{stickyPosition:"bottom",extraPaddingBottom:!0,hasTopButton:!0,isMobile:en,uniqueId:"add-to-cart-button",zIndex:1e3,showStickyWithTopButton:!0,onScrollToTop:W.wM,sx:{bottom:0},topButtonAriaLabel:eB,topLabel:eM,children:tt}):en&&!eA?(0,a.jsxs)(a.Fragment,{children:[ti(),(0,a.jsx)(b.n,{stickyPosition:"bottom",extraPaddingBottom:!0,hasTopButton:!0,isMobile:en,uniqueId:"add-to-cart-button",zIndex:1e3,showStickyWithTopButton:!1,onScrollToTop:W.wM,sx:{bottom:0},topButtonAriaLabel:eB,topLabel:eM,children:tt})]}):P?(0,a.jsx)(a.Fragment,{children:tt}):ti()})})};var ey=i(53236),ex=i(92475);let ev=(0,i(86670).Ay)("div")({display:"flex",gap:v.D3H});var eS=i(20681),eC=i(52378),eE=i(89118),eI=i(50197);let eT=({customButtonData:e,imageName:t,productName:i,translations:r,itemId:o,shortDescription:s,cartItemDetails:d})=>{let{isMobile:u}
107=(0,ey.G)(),[m,h]=(0,n.useState)(""),[f,g]=(0,n.useState)(!1),{internalDomains:b}=(0,ex.N)(),{trackEvent:y}=(0,U.z1)(),{setSelectedAccordion:x,setIsAccordionClicked:v}=(0,eI.Dr)(),S=(0,n.useRef)(null),{customButtonCodeHref:C,customButtonCodeTitle:E}=e||{},{requestconsultation:I}=r||{},T=E?.toLowerCase()==="request consultation"||E?.toLowerCase()===I?.toLowerCase();if(!E||!T&&!C)return null;let A={imageName:t,productName:i,translations:r,itemId:o,shortDescription:s,productAttributes:d?.productAttributes?.[0]?.object?.filter(e=>e?.type==="defining").map(e=>({key:e?.key||"",value:e?.value||""}))||[]},D=e=>{if(T)e.preventDefault(),x(eE.do.REQUEST_CONSULTATION),v(!0),S.current&&S.current.focus();else y({component:{identifier:"Product Detail | Start Your Order",type:"ui"},doNotTrack:!1,trackType:"product-action-button"}),(0,eS.aw)({setOpen:g,setHref:h,event:e,internalDomains:b})},_=()=>T?I||E||"Request Consultation":E||"Start Your Order";return(0,a.jsx)(l.default,{sx:{xs:12,width:"100%"},children:(0,a.jsx)(p.l,{cornerStyle:u?"square":"rounded",children:(0,a.jsxs)(ev,{children:[(0,a.jsx)(c.Button,{onClick:e=>{e.preventDefault(),D(e)},onKeyDown:e=>{("Enter"===e.key||"Space"===e.code||e.ctrlKey&&e.altKey&&"Space"===e.code)&&(e.preventDefault(),D(e))},sx:{width:"100%"},variant:"primary",href:T?"#":C||void 0,uniqueId:T?"request-consultation-button":"link-out",children:_()},_()),m&&!T&&(0,a.jsx)(eC.A,{href:m,isOpen:f,onCloseHandler:()=>g(!1),setOpen:g,translations:r}),!T&&(0,a.jsx)(z.A,{...A})]})})})};var eA=i(19909),eD=i(5514);let e_=({highValueText:e})=>{let{isMobile:t}=(0,y.A)();return(0,a.jsx)(p.l,{cornerStyle:t?"square":"rounded",children:(0,a.jsx)(x.default,{sx:{display:"flex",flexDirection:"column",width:"100%"},children:(0,a.jsx)(x.default,{sx:{display:"flex",gap:v.D3H,alignItems:"center"},children:(0,a.jsx)(u.Notification,{uniqueId:"high-value",icon:null,message:e,severity:"general",isRole:!1,sx:{"& > div:first-of-type > svg":{margin:0},flexGrow:1}})})})})};var eO=i(15154),ew=i(99899);let eN=({message:e})=>(0,a.jsx)(ew.A,{children:(0,a.jsx)(u.Notification,{uniqueId:"add-to-cart-error",icon:(0,a.jsx)(K.A,{"aria-label":"Alert"}),message:e,severity:"alert",isRole:!1,sx:{width:"100%"}})});var ej=i(59555);let eP=e=>{let{locale:t,productDetailsData:i,pageSettings:r,deliveryServiceConfig:c,productPrice:u}=e,{zipCodeModuleSettings:p,addToListContentStackData:m,productTileConfigData:h,...f}=(0,ed.h)(),g={zipCodeModuleSettings:p,addToListCSData:m,productConfig:h,...f},{addToListContentStackData:b}=m||{},{productData:y}=i,{id:x,descriptions:v}=y||{},[S]=(0,eD.T)(),{initialLoadingState:C=!0}=S||{},{fulfillmentData:I,selectedChildItem:T,translations:A,productFlags:{isSameDayDelivery:D,isWarehouseOnly:_}}=(0,eA.r)(),{isHighValueItem:O}=(0,eO.Ay)({price:Number(u),pageSettings:r,productData:y}),w=I?.inventory?.rawV2?.data||{},N=I?.inventory?.processed?.data,j=I?.isLoading||!1,P=!!(w?.availability===eu.RO.NOSTOCK&&!w?.fulfilledBy),R=w?.availability===eu.RO.SHIPRESTRICTED,k=null;v&&v.length>0&&(k=v[0]);let{translationsMap:L,properties:M}=r,B=(0,s.U)(L,d.et),$=M&&M[0]?.Member_Validation_Bypass_feature_Enabld||!1,z=M&&M[0]?.membershipUrl||null,U=M&&M[0]?.samedayDeliveryData||{},q=M&&M[0]?.enableRedirectionToUCCMod||!1,V=T?.isBuyable===!0,F=(0,E.ce)(y,T?.id),{defaultLocation:H}=p.properties[0],K=(0,n.useMemo)(()=>T?.programTypes?.includes("InWarehouse"),[T]),G=T?.minItemOrderQty&&T?.minItemOrderQty!=="0"?T.minItemOrderQty:"1",Y=I.warehousePickupStatus.status,Q=I.hasFutureStartDateWithNoInventory||!1;return(0,ej.Q)(i)?(0,a.jsx)(eN,{message:B?.bundlenotsoldmessage||""}):(0,a.jsxs)(a.Fragment,{children:[V||!V&&(D||_||O)?(0,a.jsx)(l.default,{size:{xs:12},children:O?(0,a.jsx)(e_,{highValueText:B?.highvaluetext||""}):(0,a.jsx)(o.AddToListProviderClient,{contentStackValues:b,enableModernApis:!(0,W.G8)(),children:(0,a.jsx)(eb,{...g,...e,childItemNumber:T?.id,deliveryServiceConfig:c,translations:B,itemId:x,auxDescription1:k?.object.deliveryStatement,shortDescription:k?.object.shortDescription,longDescription:k?.object.longDescription,productName:k?.object.shortDe
107scription,imageName:k?.object.imageName,inventoryInfo:N,locale:t,fulfillmentTranslations:A,isMemberOnlyItem:F,isWarehouseOnly:_,isWioProduct:K,membershipUrls:z,memberValidationBypassFeatureEnabld:$,samedayDeliveryData:U,fallbackLocation:H,cartItemDetails:T,fulfillmentDetails:S,qty:Number(G),isFullfillmentDataLoading:C||j,outOfNetworkDelivery:P,isShipRestricted:R,warehouseStockStatus:Y,pageSettings:r,enableRedirectionToUCCMod:q,hasFutureStartDateWithNoInventory:Q})})}):null,V||D?null:(0,a.jsx)(o.AddToListProviderClient,{contentStackValues:b,enableModernApis:!0,children:(0,a.jsx)(eT,{customButtonData:y?.customButtonData,imageName:k?.object?.imageName,productName:k?.object.shortDescription,translations:B,itemId:T?.id||x,shortDescription:k?.object.shortDescription,cartItemDetails:T})})]})};var eR=i(87358);let ek=({locale:e,productDetailsData:t,pageSettings:i})=>{let{childCatalogData:r,productClassType:n}=t.productData||{},{deliveryServiceConfig:l}=(0,ed.h)(),{priceDetails:o}=(0,k.A)(),s=o?.priceData?.displayPrice?.deliveredPrice||o?.priceData?.sourcePrice?.listPrice||"";return"AppleCare"===n||r?.some(e=>e?.productClassType==="AppleCare")?null:(0,a.jsx)(eP,{deliveryServiceConfig:l,locale:e,productDetailsData:t,pageSettings:i,site:String(eR.env.SITE),productPrice:s})}},73577:(e,t,i)=>{i.d(t,{A:()=>a,r:()=>r});let r={"-1":"en-us","-25":"fr-ca","-24":"en-ca"},a={"en-us":"-1","fr-ca":"-25","en-ca":"-24"}},74324:(e,t,i)=>{i.d(t,{IV:()=>r,p$:()=>a,rZ:()=>n,wx:()=>l});let r=e=>{let t=e.key_value?.reduce((e,t)=>(e[t.key]=t.value,e),{})||{},i=e.properties,r=i[0]?.links.termsAndConditionsLink||"/promo-terms-conditions.html",a=i[0]?.links?.ecoFeeFr||"/ecofrais.html",n=i[0]?.links?.ecoFeeEn||"/eco-fees.html";return{onlinePriceLabel:t.onlinepricelabel,onlinePriceTooltipText:t.onlinepricetooltiptext,onlinePriceTooltipAriaLabel:t.onlinepricetooltiparialabel,termsAndConditionsText:t.termsandconditionstext,termsAndConditionsLink:r,termsAndConditionsDrawerTitle:t.termsandconditionsdrawertitle,termsAndConditionsDrawerContent:t.termsandconditionsdrawercontent,tieredPricingTitle:t.tieredpricingtitle,tieredPricingText:t.tieredpricingtext,closeButtonText:t.closebuttontext,ecofeeincludedlabel:t.ecofeeincludedlabel,ecoFeeLabel:t.ecofeelabel,includesEcoFeeText:t.includesecofeetext,tooltipInfoLabel:t.ecofeetooltiparialabel,ecoFeeEnLink:n,ecoFeeFrLink:a,bundleEcoFeeTooltipText:t.bundleecofeesmodaltext,learnMoreText:t.learnmoreaboutecofees,ecofeesincluded:t.ecofeesincluded}},a=e=>{let t=e?.discounts;if(!t||!t.promotions?.length&&!t.temporaryPriceReductions?.length)return!0;let i=t?.promotions?.every(e=>!e?.promotionStatement?.shortText?.text&&!e?.promotionStatement?.longText?.text)??!0,r=t?.temporaryPriceReductions?.every(e=>!e?.promotionStatement?.shortText?.text&&!e?.promotionStatement?.longText?.text)??!0;return i&&r},n=(e,t,i,r)=>e!==t&&r?(1===e?i?.outofstockbundlesingleitemstext||"":i?.outofstockbundleimultipletemstext||"").replace("{{count}}",String(e)):i?.outofstockbundletext||"",l=e=>e.replace(/<a\s+href=['"]\/promo-terms-conditions\.html['"]>\s*(Terms\s*&?\s*Conditions|Terms\s*and\s*Conditions|Terms\s*&amp;\s*Conditions)\s*<\/a>/gi,"")},74711:(e,t,i)=>{i.d(t,{a1:()=>l.a,fs:()=>n});var r=i(12115),a=i(72824);let n=()=>{let e=(0,r.useContext)(a.FulfillmentBdContext);if(!e)throw Error("useFulfillmentBdContext must be used within a FulfillmentBdContextProvider");return e};i(51183);var l=i(93958)},77654:(e,t,i)=>{i.d(t,{BundleFulfillmentPageLevelContextProviderClient:()=>m,g:()=>p});var r=i(95155),a=i(12115),n=i(71706),l=i(19359),o=i(62526),s=i(60714),d=i(82993),c=i(13052),u=i(7025);let p=(0,a.createContext)(null),m=({children:e,locale:t,serverData:i})=>{let{deliveryLocation:m}=(0,n.B)(),{fulfillmentModuleSettings:h,zipCodeModuleSettings:f}=(0,s.h)(),g=(0,l.gI)(t),{parentInventoryStatus:b}=(0,c.MN)(),y=i?.productProgramTypes?.includes(u.ts.SITE_CONTROLLED_INVENTORY),x=i?.productProgramTypes?.includes(u.ts.LOCATION_CONTROLLED_INVENTORY),{defaultLocation:v,defaultState:S}=f?.properties?.[0]??{},{state:C=S,zipCode:E=v}=m??{},I=(0,a.useMemo)(()=>({destinationState:C??"",destinationPostalCode:E??"",destinationCountryCode:g}),[C,E,g]),T=(0,a.useMemo)(()=>{let e=(0,o.L)(h);return(0,o.U)(e,d.Rq)},[h]),A=(0,a.useMemo)(()=>({inventory:{processed:{data:{availability:b}}}}),[b]),D=(()=>{let{fulfillmentModuleSettings:e}=(0,s.h)(),{properties:t}=e,i=t&&t[0],r=i?.restrictedStates??[],n=i?.maxFutureDate??365,l=i?.vendorList??{},o=i?.haulAwayMattressConfig??{},d=i?.floralDeliveryConfig??{};return(0,a.useMemo)(()=>({restrictedStates:r,maxFutureDate:n,vendorList:l,haulAwayConfig:o,floralDeliveryConfig:d}),[r,n,l,o,d])})(),_=(0,a.useMemo)(()=>new Proxy({destination:I,sanitizedDeliveryStatement:i.sanitizedDeliveryStatement,deliveryStatement:i.deliveryStatement,translations:T,selectedChildItem:void 0,selectedWarehouse:void 0,fulfillmentData:A,featureFlags:{},productFlags:{isSiteControlledInventory:y,isLocationControlledInventory:x},warehouseFlags:{},locale:t,fulfillmentSettings:D},{get(e,t,i){if(t in e)return Reflect.get(e,t,i);"symbol"!=typeof t&&console.error(`[FulfillmentBundleContext] Attempted to access non-existent property: "${String(t)}"`)}}),[I,i,T,A,D,t]);return(0,r.jsx)(p.Provider,{value:_,children:e})}},78015:(e,t,i)=>{i.d(t,{K:()=>r});let r=(e,t)=>new Proxy(e,{get:(e,i)=>i in e?e[i]:t})},80281:(e,t,i)=>{i.d(t,{D:()=>r,N:()=>a});let r="fulfillment-title",a="160px"},80902:(e,t,i)=>{i.d(t,{StyledFixedContainer:()=>o,StyledParentContainer:()=>l});var r=i(27966),a=i(86670),n=i(24880);let l=(0,a.Ay)(r.default)({position:"relative",maxWidth:n.v6q,display:"flex",justifyContent:"flex-end",margin:"auto"}),o=(0,a.Ay)(r.default)({position:"fixed",bottom:0,zIndex:20})},81839:(e,t,i)=>{i.d(t,{it:()=>d,xY:()=>p,B8:()=>s,Hq:()=>u,_s:()=>o,cS:()=>c,a7:()=>m,Tu:()=>h});var r=i(17868);let a=async(e,t,i,a,n)=>{let l=async()=>await n?.getBatchApiData(e,t);try{return await (0,r.A)(l,{...i,onFailedAttempt:e=>{console.warn(`Attempt ${e.attemptNumber} failed. There are ${e.retriesLeft} retries left.`)}})}catch(e){throw console.error(`${a||"Request failed with error:"} ${e}`),e}},n=async(e,t,i,r="",n,l)=>{let{endpoint:o="",method:s="POST",required_request_headers:d,retryconfig:c,connection_timeout:u,timeout:p}=n,{client_identifier:m,content_type:h}=d||{},f=m[String("en-us"===e?"USBC":"CABC").toLowerCase()]||"",{env:g="",service:b=""}=d.costco,y={body:JSON.stringify({distributionCenters:i,itemNumbers:t.map(String),selectedWarehouse:r}),headers:{"client-identifier":f,"content-type":h,"costco.env":g,"costco.service":b},method:s,signal:u?AbortSignal.timeout(u):null,timeout:p};try{return await a(o,y,c,`[PDP][BI][Info] - ChildIds: ${t}, Error:`,l)}catch(e){throw console.error(e),e}};var l=i(40538);let o=async(e,t,i,r,a,o,s,d)=>{let{distributionCenters:c=[],nearestWarehouse:u,groceryCenters:p=[],pickUpCenters:m=[]}=r||{},h=[];for(let t=0;t<e.length;t+=l.n)h.push(e.slice(t,t+l.n));let f=h.map(e=>n(t,e,[...c,...p,...m],u?.catalog,i,o)),g={};try{let e=(await Promise.all(f)).flat();return e?.forEach(({itemNumber:e,programTypes:t})=>{let i=!!(t?.siteControlledInventory?.every(e=>"NOSTOCK"===e.availability)||t?.locationControlledInventory?.every(e=>"NOSTOCK"===e.availability)||!t?.siteControlledInventory&&!t?.locationControlledInventory);a===e?g[e]=!!s:g[e]=i}),{processedBatchInfoObj:g,rawBatchInfo:e,isError:!1}}catch(e){return console.error("[PDP][Variants][BatchAPI][Error]:",e),a&&(g[a]=!!s),{processedBatchInfoObj:g,rawBatchInfo:[],isError:!0}}},s=e=>{if(!e)return[];let t=e=>{let i=new Set;if(i.add(e.itemNumber),e.children)for(let r of e.children)t(r).forEach(e
107=>i.add(e));return i};return[...t(e)]},d=(e,t,i,r)=>{let a=e=>{if(!e.children||0===e.children.length)return e.isOutOfStock=!0===t[e.itemNumber]||void 0===t[e.itemNumber]||!(e.itemNumber in t),e.isOutOfStock;let i=!0;for(let t of e.children)a(t)||(i=!1);return e.isOutOfStock=i,i};if(e){if(r)for(let e of i||[])a(e);else a(e);return r?i:e}},c=e=>{let t=[];return e?.forEach(e=>{if("swatchImage"in e&&e.swatchImage){let{swatchImage:i,value:r,key:a,swatchImageData:n}=e;t?.find(e=>e.transformedColorSwatch.id===i)||t?.push({transformedColorSwatch:{attributeValue:r||"",itemNumber:e.itemNumber||"",id:i,label:a||"",pdpNavigationUrl:null,productImageUrl:null,swatchImageUrl:n&&n?.cdnUrl||"",isOutOfStock:e.isOutOfStock},rawVariantData:e})}}),t},u=(e,t,i)=>{if(!t)return i;let r=t.split(":")[1];if(!r)return i;let a=r.toLowerCase().replace(/\s+/g,"");return e?.filter(({productAttributes:e})=>(e?.[0]?.object.filter(e=>{let t=e?.value?.toLowerCase().replace(/\s+/g,""),i=e?.swatchImage?.toLowerCase().replace(/\s+/g,"");return t===a||i===a})||[]).length>0)[0]||i},p=(e,t)=>{let i=e=>{if(t.includes(e.value)){if(0===e.children.length&&t.includes(e.value))return e.itemNumber;for(let t of e.children){let e=i(t);if(e)return e}}};if(e)return i(e)},m=(e,t)=>{let i=(e,r)=>{if(e&&0!==e.length)for(let a of(0===e.filter(e=>t.includes(e.value)).length&&e[0]&&(t[r]=e[0].value),e))t[r]===a.value&&i(a.children,r+1)};return e&&i(e.children,1),t},h=(e,t,i)=>"accordion"===e?t?i?20:12:i?12:6:t?i?8:5:i?5:3},81917:(e,t,i)=>{i.d(t,{WarrantyServicesDrawerClient:()=>b});var r=i(95155),a=i(27966),n=i(13677),l=i(24880),o=i(71706),s=i(32921),d=i(12445),c=i(54573),u=i(45182),p=i(46887),m=i(34971),h=i(95097);let f=()=>(0,r.jsxs)(a.default,{"data-testid":"warranty-services-drawer-skeleton",sx:{display:"flex",flexDirection:"column",gap:l.D3H},children:[(0,r.jsxs)(p.default,{sx:{marginTop:l.D3H,gap:l.D3H},children:[(0,r.jsx)(m.Skeleton,{variant:h.z.TextHeader}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody})]}),(0,r.jsxs)(p.default,{sx:{marginTop:l.D3H,gap:l.D3H},children:[(0,r.jsx)(m.Skeleton,{variant:h.z.TextHeader}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody}),(0,r.jsx)(m.Skeleton,{variant:h.z.TextBody})]})]});var g=i(60714);let b=({itemType:e,showServices:t,translations:i,locale:o})=>{let{zipCode:p,deliveryServiceConfig:m}=y(),[{isOpened:h,warrantyData:g,productInfo:{id:b,shipMode:x}={}}={},v]=(0,u.n9)(),S=!(h&&p&&b&&x&&m),{warrantyServices:C,isLoading:E}=(0,c.Y)(S,{zipCode:p,selectedChildItem:b||"",shipMode:x,deliveryServiceConfig:m}),I=!!(!E&&g),T=!!(!S&&!E&&C?.services);return(0,r.jsx)(n.m,{headerProps:{closeButtonAriaLabel:i?.addtocartclosebuttonarialabel||"Close Warranty and Services drawer",iconWrapperSx:{color:l.
107Kl5},onClose:()=>v(()=>({isOpened:!1,warrantyData:void 0,productInfo:void 0})),title:i?.warrantyandservices||"Warranty & Services",uniqueId:"bundle-warranty-services-drawer",level:0},anchor:"right",open:!!h,scrollArea:"body",children:(0,r.jsxs)(a.default,{sx:{display:"flex",flexDirection:"column",gap:l.Mzk},children:[E&&(0,r.jsx)(f,{}),(0,r.jsxs)(r.Fragment,{children:[I&&(0,r.jsx)(s.A,{merchandiseData:g,translations:i}),T&&(0,r.jsx)(d.A,{services:C?.services||[],itemType:e,showServices:t,translations:i,locale:o,checkDeliveryAvailability:!1})]})]})})},y=()=>{let{deliveryLocation:e}=(0,o.B)(),t=(0,g.h)();return{zipCode:e?.zipCode||"",deliveryServiceConfig:"deliveryServiceConfig"in t?t.deliveryServiceConfig:void 0}}},82589:(e,t,i)=>{i.d(t,{T:()=>c});var r=i(12115),a=i(42886),n=i(7025),l=i(13052),o=i(45969),s=i(45182),d=i(19909);let c=e=>{let[t]=(0,s.AX)(),[i]=(0,s.jQ)(),[c]=(0,l.Y0)(),[u]=(0,s.Un)(),[p]=(0,l.jr)(),{bundleItemPrice:m,isLoadingPriceAPI:h,priceDetails:f}=(0,o.A)(),{translations:g}=(0,d.r)(),{isLoading:b}=(0,l.MN)(),y=h||b,x=(0,r.useMemo)(()=>m?.priceData?m.priceData.reduce((e,t)=>(t.id&&(e[t.id]=t),e),{}):{},[m]),v=(0,r.useMemo)(()=>!t||y?[]:t.map(t=>{let r=i?.get(t.id),n=c?.items[t.id],o=n?.isLoading||(0,l.UV)(n?.status),s=r?.isSelected??!0,d=x[t.id],u=d?{...d,displayPrice:d.displayPrice?.[0]??d.displayPrice}:void 0,p=t.parentDetails?.descriptions?.[0]?.object?.marketingStatement??"",m=t.descriptions?.[0],h={...t,descriptions:[{...m,object:{...m?.object,promotionalStatement:m?.object?.promotionalStatement||p,imageName:t.imageName||m?.object?.imageName||""}}]},f=(0,a.f_)(h,e,u?{priceData:u}:void 0,t.parentDetails,!0,void 0,void 0,g);return{id:t.id,quantity:r?.quantity??Number(t.minItemOrderQty)??1,isSelected:s,bundlePrice:u,itemPrice:u?.displayPrice?.deliveredPrice??0,itemInStock:o,isSellable:t.isSellable??!0,normalizedData:f}}),[t,i,c,x,e,y]),S={id:n.Oi.DELIVERY,label:p?.label||g?.delivery||"Delivery",EDD:p?.EDD??"",timeframe:p?.timeframe??""},C=(0,r.useMemo)(()=>{let e=v.filter(e=>e.isSelected&&!e.itemInStock),t=v.filter(e=>e.isSelected),i=v.filter(e=>e.isSelected&&e.itemInStock),r=v.every(e=>!e.itemInStock||e.isSelected),a=t.reduce((e,t)=>e+t.quantity,0),n=e.reduce((e,t)=>e+t.quantity,0),l=(e,t)=>
107t.reduce((t,i)=>t+(i?.bundlePrice?.linkFees?.filter(t=>e.includes(t.templateId)).reduce((e,t)=>e+(t.unitAmount?.amount??0),0)??0)*i.quantity,0),o=l(["STANDARD"],i),s=l(["MATHTABLE","INTERNALIZED"],t),d=l(["HIDDEN"],t),c=e.reduce((e,t)=>e+(t.itemPrice??0)*t.quantity,0),u=t.reduce((e,t)=>e+(t.itemPrice??0)*t.quantity,0)-o,p=u-c+o,m=t[0]?.bundlePrice,h=e=>({fullPrice:e,wholeValue:String(Math.floor(e)),decimalValue:String(Math.round(e%1*100)).padStart(2,"0")});return{totalPrice:m?{priceData:{...m,displayPrice:{...m.displayPrice,deliveredPrice:p}}}:void 0,ctaBundlePrice:{bundlePrice:h(u),outOfStockPrice:h(c),savings:{fullPrice:0,wholeValue:"0",decimalValue:"00"},total:h(p),...o>0?{standardEcoFee:h(o)}:{},...s>0?{includedEcoFee:h(s)}:{},...d>0?{hiddenEcoFee:h(d)}:{}},outOfStockItemCount:e.length,totalItemCount:a-n,totalBundleItems:v.length,allInStockItemsSelected:r}},[v]);return{items:v,fulfillmentDetails:S,totalPrice:C.totalPrice,isDataLoading:y,ctaBundlePrice:C.ctaBundlePrice,outOfStockItemCount:C.outOfStockItemCount,totalItemCount:C.totalItemCount,totalBundleItems:C.totalBundleItems,bundleParentData:u,allInStockItemsSelected:C.allInStockItemsSelected,currentItemPrice:f}}},82993:(e,t,i)=>{i.d(t,{Rq:()=>l,as:()=>r,et:()=>n,oE:()=>a});let r=["button","close","dialog","enlargeproductpreview","nextproductpreview","nextproductpreviewset","playproductvideo","previousproductpreview","previousproductpreviewset","productimagegallery","productpreview","productvideo","region","viewmoreimages","viewproductpreview","zoomin","zoomout","noimageavailable","usearrowkeysordragtopan","language","skipimagebuttonlabel","zoomminlabel","zoommidlabel","zoommaxlabel"],a=["productdetails","specifications","toplabel","fsaeligible","shippingandreturns","warrantyandservices","drugfacts","activeingredient","purpose","uses","warnings","directions","otherinformation","inactiveingredients","questionsorcomments","disclaimer","disclaimercontent","nutritionalinformation","servingsize","servingpercontainer","amountperserving","dailyvalue","ingredients","nonutritionalinfo","contains","doesnotcontain","healthclaims","maycontain","supplementfacts","memberreviews","manualsandguides","viewmore","allergensandwarnings","warrantytitle","warrantyserviceslinktext","servicesnotincludedtext","servicesincludedtext","servicesimportantinfotext","openinpdf","updatecookiesettings","schedulingdisabledmessage","stickynavarialabel","topbuttonarialabel","requestconsultation","externallinktext","visitexternaltext","canceltext","customizeorderexternaltext","freefrom"],n=["home","viewproductdetails","item","shopcostconext","model","add","notifymewhenavailable","outofstocktext","outofstock","email","comparelabel","highvaluetext","warehousetext","warehousetooltip","eddgenericerrormessage","addtofavorites","itemunavailabletext","itemunavailableforlabel","addtocartbutton","selectbundleitem","addbundletocartbutton","addbundletocartbuttonplural","bundle","costcodirectsavings","bundletotal","bundleoutofstock","bundleoutofstockplural","bundlenotsoldmessage","signintoseepricebutton","signintopickupbutton","memberonlylabel","memberonlytooltiptext","bopimmemberonlytooltiptext","signinfordetailsbutton","renewmembershipbutton","joincostcobutton","addmembershipnumberbutton","linkmembershipnumberbutton","signintobuybutton","reviewmessage","addtocarterrormsg","viewfullproductdetailstext","membersalsoboughttext","minvalerror","maxvalerror","recommendeditemstext","continueshoppingtext","viewcarttext","addedtocarttext","itemsincartlabel","shopbrandnametitle","twodaydeliverylabel","missingpricefallbacktext","warehouseonlynotificationtext","externallinktext","visitexternaltext","canceltext","customizeorderexternaltext","checknearbywarehousesbuttontext","itemavailabilityatselectedwarehouse","buymembershipbutton","wiowarehouseonlynotificationtext","changezipcodebutton","itemavailabilityatzipcodelabel","googlemapsdestinationlabel","directionsbuttonlabel","variantshowall","variantshowless","copylinktext","linkcopiedtext","addtocartcarousellabel","toplabel","topbuttonarialabel","breadcrumbarialabel","sharebuttonarialabel","qtyincrementarialabel","qtydecrementarialabel","addtocartclosebuttonarialabel","backbuttonarialabel","close","requestconsultation","quantitylabel","variableweightminvalerror","variableweightmaxvalerror","variableweighterror","variableweightnote","learnmoretext","fsaeligibleitem","nozipcodeselected","setdeliveryzipbutton","setdeliveryzipbuttonarialabel","priceupdate","rtrmanufacturertext","notificationtruckloadtext1","notificationtruckloadtext2","truckloadbutton","addtocartseepricetext","addtocartdetailsbutton","futurestartdatenotificationtext","quantitycorrectionmessage","completeyourset","viewbundletext","buildyourbundle","averageratingarialabel","currentitemlabel","additemlabel","itemaddedlabel","modeloutofstockmessage","modelunavailablemessage","outofstockbundlesingleitemstext","outofstockbundletext","outofstockbundleimultipletemstext","minqtyerrormessage","maxqtyerrormessage","limitoneqtyerrormessage","knbserviceanddeliveryinfo","removelastitemtitle","removelastitembody","removelastitemconfirm","removeitemsbutton","cancelbutton","maxqtyerrormessagenomodelnumber","decimalqtyerrormessage","delivery","changedeliverymethodbuttontext","changedeliverymethodmessagetext"],l=["howtogetit","available","instock","lowstock","outofstock","backordered","presell","notsoldinthiswarehouse","unavailable","zipcodearialabel","shippingtext","buyinwarehouse","optionscolorsandsizesmayvary","warehousepricemayvary","warehouseunavailable","unavailableinfoarialabel","samedaydeliverylabel","samedaydeliveryinfo","samedaybuttontext","delivery","estimated","earliest","fallbacktimeframe","additionalbusinessdays","withinshipdaterangebackordered","beforefirstshipdatebackordered","withinshipweekrangebackordered","beforefirstshipweekbackordered","withinshipdaterangepresell","beforefirstshipdatepresell","withinshipweekrangepresell","beforefirstshipweekpresell","twodaydeliverylabel","twodaydeliverysurchargelabel","twodaydeliverytooltiparialabel","twodaydeliveryshippingpricetooltip","twodaydeliverysecondarytext","twodayzipcodealertmessage","pickuplabel","atwarehouse","defaultprimaryinfo","defaultprimaryinfotooltip","emaildeliverylabel","fourhourstext","readywithintext","tomorrowtext","zipcodealertmessage","deliveryunavailableprimaryinfo","getitassoonas","atdistributioncenter","closed","open","pickuplocation","distributioncenter","distributioncenterdetails","getdirections","pickuphours","distributioncenterinfo","shippingandhandling","bopimzipcodealertmessage","ordermonday","ordertuesday","orderwednesday","orderthursday","orderweekend","orderexclusions","ordernextbusinessday","orderunavailable","orderearliest","plainpackagingdesc1","plainpackagingdesc2","plainpackagingdesc3","memberonlyprimaryinfo","deliverytransitmessagetext","restrictedstateseddtext","shippingdefaultdeliverydays","checknearbywarehouses
107alertmessage","deliveryavailableinhousemessage","distributioncenterdetailsalertmessage","shippingandhandlinginfo","digitaldeliveryalertmessage","californiamattressdisclaimer","californiamattressdisclaimerregex","buyinwarehouselabel","warehouseprice","pricingmayvary","defaultmessageforchubltl","defaultmessageforchubltltooltip","deliverysurchargetooltipcontent","deliverysurchargeprogressadd","deliverysurchargeprogressremove","deliverysurchargewaived","deliverysurchargeprogressaria","deliverysurchargecurrentorder","replacementitemto","replacementitemfrom","businesszipunavailableonline","businesszipunavailable","businesspickupthreshold","businesspickuptooltipcontent","businesspickupprogressadd","businesspickupprogressremove","businesspickupmet","businesspickupcurrentorder","businesspickupprogressaria","businesspickupinstruction","notificationreplacementitem","localbusinessdeliverylabel","notificationzipcodeavailableoutofstockpickup","notificationzipcodeavailableoutofstockdelivery","notificationzipcodeunavailable","notificationwarehouseonlytext","notificationspecialordertext","twodaydeliverytertiarytext","deliverylocationtext"]},83272:(e,t,i)=>{i.d(t,{Up:()=>s,tu:()=>o,yl:()=>l});var r,a,n,l=((r={}).PICK_UP="PickUpBd",r.LOCAL_BUSINESS_DELIVERY="LocalBusinessDeliveryBd",r.NATIONWIDE_DELIVERY="NationwideDeliveryBd",r.SAME_DAY_DELIVERY="SameDayDeliveryBd",r),o=((a={}).ZIP_CODE_AND_PRODUCT_AVAILABLE="ZIP_CODE_AND_PRODUCT_AVAILABLE",a.ZIP_CODE_UNAVAILABLE="ZIP_CODE_UNAVAILABLE",a.ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK="ZIP_CODE_AVAILABLE_AND_OUT_OF_STOCK",a.HAS_REPLACEMENT_ITEM="HAS_REPLACEMENT_ITEM",a.HAS_SPECIAL_OR_WHSEHOUSE_ONLY_ORDER="HAS_SPECIAL_OR_WAREHOUSE_ONLY_ORDER",a),s=((n={}).IN_STOCK="IN_STOCK",n.NO_STOCK="NO_STOCK",n)},83515:(e,t,i)=>{i.d(t,{U$:()=>f,nY:()=>d,uM:()=>p});var r=i(68409),a=i.n(r),n=i(19359),l=i(89118),o=i(48976),s=i(58468);let d=(e,t,i,r,a,d,c)=>{let{translations:h,fsaData:f,productDetailsData:g,locale:b,nutritionDepartments:y,deliveryServiceConfig:x,accordionsConfig:v,espotComponent:S,pageSettings:C}=t,{productData:E,merchandiseData:I}=g,{descriptions:T,productAttributes:A,childCatalogData:D,isEligibleForReviews:_,categoryHierarchy:O}=E||{},w=null;T&&T.length>0&&(w=T[0]);let N=D?.find(e=>e?.id===i),j=y.includes(N?.as400DeptNumber||"")&&N?.isShowNutrPanel,P=(0,o.R6)(N),R=(0,n.ZT)(I)||"",k=N&&N?.isFsa,L=A?u(A):null,M=p(w&&w.object.longDescription),B=m(w&&w?.object?.assetLinkDetails),$=(0,n.R_)(b,"hyphen"),z=N?.nutritionInfo?.[$],U=(0,n.u)(N?.productAttributes?.[0]?.shipModes),q=O?.[0]?.object?.[1]?.name||"",V=v.find(e=>e?.identifier===l.do.WARRANTY_SERVICES)?.configuration[0]?.showServices,F=(g.contentVendors||[]).some(e=>e!==s.ay.Salsify),W=C?.properties?.[0]?.warrantyServicesSupportUrlBase,H=W?`${W}${i}`:"";return{[l.do.DRUG_FACTS]:{componentProps:{nutritionInfoObj:z,translations:h},showAccordion:!!(z?.drugFacts?.length&&j),title:h?.drugfacts||"Drug Facts"},[l.do.FSA_ELIGIBLE]:{componentProps:{body:f?.body},showAccordion:!!k,title:h?.fsaeligible||"FSA Eligible"},[l.do.MEMBER_REVIEWS]:{componentProps:{},showAccordion:!!_&&!(0,n.G8)(),title:h?.memberreviews||"Member Reviews"},[l.do.NUTRITIONAL_INFORMATION]:{componentProps:{nutritionInfoObj:z,translations:h},showAccordion:!!(z?.nutritionInformation?.length&&j),title:h?.nutritionalinformation||"Nutritional Information"},[l.do.SUPPLEMENT_FACTS]:{componentProps:{ingredients:z?.ingredients,supplementsDataObj:z?.supplementFacts,translations:h},showAccordion:!!(z?.supplementFacts?.length&&j),title:h?.supplementfacts||"Supplement Facts"},[l.do.PRODUCT_DETAILS]:{componentProps:{description:M,isExpanded:e,translations:h,espotComponent:S,locale:b,thirdPartyComponent:r},showAccordion:!!(M.length||null!==S||d&&c||F),title:h?.productdetails||"Product Details"},[l.do.MANUALS_GUIDES]:{componentProps:{manualsAndGuides:a,translations:h,assetLinks:B,locale:b},showAccordion:!!(a?.manualsAndGuidesData?.length||B?.length),title:h?.manualsandguides||"Manuals & Guides"},[l.do.SHIPPING_RETURNS]:{componentProps:{merchandiseData:I,translations:h,locale:b},showAccordion:!!(I&&(I?.shippingAndReturns?.length||I?.shopConfidently?.length)),title:h?.shippingandreturns||"Shipping & Returns"},[l.do.SPECIFICATIONS]:{componentProps:{productSpecs:L,translations:h},showAccordion:!!(L&&L.length),title:h?.specifications||"Specifications"},[l.do.WARRANTY_SERVICES]:{componentProps:{merchandiseData:I,selectedChildItem:i,shipMode:U,itemType:q,deliveryServiceConfig:x,showServices:V,isEddChubSmallPackOrLTL:P,translations:h,locale:b,warrantyServicesSupportUrl:H},showAccordion:!!(I&&I.warrantyAndServices?.length),title:h?.warrantyandservices||"Warranty & Services"},[l.do.REQUEST_CONSULTATION]:{componentProps:{serviceUrl:R,translations:h},showAccordion:!!R,title:h?.requestconsultation||"Request Consultation"}}},c=(e,t="alphabetical")=>e.sort("alphabetical"===t?(e,t)=>{let i=e.key.toLowerCase(),r=t.key.toLowerCase();return i>r?1:i<r?-1:0}:(e,t)=>e.displaySequence-t.displaySequence).map(e=>({specFeature:e?.key||"",specValue:e?.value||""})),u=e=>{if(!e?.length)return null;let t=e?.flatMap(e=>e.object).filter(e=>"descriptive"===e.type&&e.isDisplayable),i=t.filter(e=>e.displaySequence);return[...c(t.filter(e=>!e.displaySequence),"alphabetical"),...c(i,"displaySequence")].map(e=>(e.specFeature=h(e.specFeature),e.specValue=h(e.specValue),e))},p=e=>e?(e=(e=e.replace(/<a.*?>.*?Shop Costco Next<\/a>/g,"")).replace(/<!\[CDATA\[(.*?)\]\]>/gs,"$1"),e=a().sanitize(e)):"",m=e=>e&&e.length?e.map(e=>{let{name:t,url:i}=e||{};return t&&i?{name:t,url:i}:null}):[],h=e=>e?/&[a-zA-Z0-9#]+;/.test(e)?"u"<typeof DOMParser?"":new DOMParser().parseFromString(e,"text/html").documentElement.textContent||"":e:e,f=(e,t,i)=>{let r=t?.childCatalogData?.find(({id:t})=>e===t),a=r?.productAttributes;if(a){let e=(0,n.YL)(a,i);if(e?.object){let t=e.object.find(e=>e.key===s.TO);return t?.value!=="None"}}return!0}},85180:(e,t,i)=>{i.d(t,{VG:()=>r,oj:()=>a});let r="media.flixfacts.com/js/loader.js",a="media.flixcar.com"},85425:(e,t,i)=>{i.d(t,{JC:()=>s,Ng:()=>o});var r=i(80388),a=i.n(r),n=i(87358);let l="true"===n.env.DEBUG_CONTENT_STACK_SDK,o=a().Stack({api_key:n.env.CONTENTSTACK_BROWSE_API_KEY,delivery_token:n.env.CONTENTSTACK_BROWSE_DELIVERY_TOKEN,environment:n.env.CONTENTSTACK_BROWSE_ENVIRONMENT,region:n.env.CONTENTSTACK_BROWSE_REGION,branch:n.env.CONTENTSTACK_BROWSE_BRANCH,fetchOptions:{debug:l,logHandler(e,t){("warning"===e||"error"===e)&&(console.log(`level: ${e}`),console.log(`  data: ${JSON.stringify(t,null,2)}`))},retryLimit:0}});a().Stack({api_key:"blt50d2ecfe89d20b3f",delivery_token:"cs23199ee8499c83627e93ea24",environment:"live",region:"azure-na",branch:"main",live_preview:{enable:!0,preview_token:"cs29bbaf9f8a73b9f33c0cd9da",host:"azure-na-rest-preview.contentstack.com"}});let s=a().Stack({api_key:n.env.CONTENTSTACK_CONFIG_API_KEY,delivery_token:n.env.CONTENTSTACK_CONFIG_DELIVERY_TOKEN,environment:n.env.CONTENTSTACK_CONFIG_ENVIRONMENT,region:n.env.CONTENTSTACK_CONFIG_REGION,branch:n.env.CONTENTSTACK_CONFIG_BRANCH,fetchOptions:{debug:l,logHandler(e,t){("warning"===e||"error"===e)&&(console.log(`level: ${e}`),console.log(`  data: ${JSON.stringify(t,null,2)}`))},retryLimit:0}})},85705:(e,t,i)=>{i.d(t,{A:()=>a});
107class r{constructor(e){this.config=e}config;async fetchMediaAssets(e){try{let t,{method:i="GET",site:r,endpoint:a="https://gdx-api.costco.com/catalog/asset/asset/v1/bf/item",agent:n,required_request_headers:l}=this.config,o=`${a}/${r}-${e}`,s=l?.environment?{"Costco-env":l.environment}:void 0;if(n)t=await n.getBrandfolderData(o,l?.client_identifier||"",...s?[s]:[]);else{let e=await fetch(o,{method:i,headers:{"client-identifier":l?.client_identifier||"",...s&&{...s}}});if(!e.ok)throw Error(`StatusCode: ${e.status}, StatusText: ${e.statusText}`);t=await e.json()}return t}catch(t){console.error(`[PDP][BF][Error] - Item: ${e}, Error: ${t}}`)}}linkCustomFields(e,t){if(!e)return[];let{data:i=[]}=e,r=[],a=t?.split("-")[0]||"";for(let{id:e,type:t,attributes:n,relationships:l,attachments:o=[]}of i){let i={};for(let{key:e,value:t}of l.custom_field_values.data)e&&t&&("string"==typeof e&&"string"==typeof t&&"AssetDescription"===e?a===(t?.split("_"))[1]&&(i[e]=t):i[e]=t);(function(e){if(!e||"object"!=typeof e)return!0;let t=e["Asset Type"],i=e.AssetDescription;return!t||"Document"!==t||"string"==typeof i&&""!==i.trim()})(i)&&r.push({id:e,type:t,attributes:n,attachments:o,customFields:i})}return r}}let a=r},87243:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(95155),a=i(42138),n=i(12115),l=i(13869);let o=({message:e,cb:t,id:i,severity:o="alert",icon:s=(0,r.jsx)(l.A,{}),sx:d={}})=>{let c=(0,n.useRef)(null);return((0,n.useEffect)(()=>{if(!t||!i)return;let e=e=>{e.target.closest(`#${i}`)&&t()},r=c.current;if(r)return r.addEventListener("click",e),()=>{r.removeEventListener("click",e)}},[t,i]),e)?(0,r.jsx)(a.Notification,{uniqueId:`fulfillment-${i}`,ref:c,message:e,severity:o,icon:s,sx:{"& > div:first-of-type > svg":{margin:0},...d}}):null}},87540:(e,t,i)=>{i.d(t,{A:()=>P});var r=i(95155),a=i(5772),n=i(12115),l=i(27966),o=i(92475),s=i(40131),d=i(19216),c=i(3187),u=i(12158),p=i(96013),m=i(24880),h=i(98216),f=i(27866),g=i.n(f),b=i(53401),y=i.n(b),x=i(47370),v=i.n(x),S=i(14515),C=i.n(S),E=i(79942),I=i.n(E);i(90),i(88893);var T=i(42347);g().extend(y()),g().extend(v()),g().extend(C()),g().extend(I());let A=({translations:e,floralDeliveryConfig:t,locale:i})=>{let[a,o]=(0,n.useState)(""),s=new Set((t?.excludedDays??[]).map(Number)),d=new Set(t?.excludedDates??[]);(0,n.useEffect)(()=>{g().locale("fr-ca"===i?"fr":"en")},[i]);let c=(0,n.useCallback)(()=>{let e=g()().tz("America/Los_Angeles"),t=e.hour()>=11?2:1,i=e.add(t,"day"),r=e=>{let t=e.format("MMDD");return!!(s.has(e.day())||d.size>0&&d.has(t))};for(;r(i);)i=i.add(1,"day");return i.format("dddd, MMMM D")},[s,d]);return(0,n.useEffect)(()=>{o(c())},[c]),(0,r.jsxs)(l.default,{sx:{display:"flex",flexDirection:"column"},"data-testid":"floral-delivery",children:[(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-shipping-and-handling",children:e.shippingandhandling}),(0,r.jsx)(T.A,{text:e.ordernextbusinessday,tooltipContent:(0,r.jsxs)(l.default,{children:[(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-monday",children:e.ordermonday}),(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-tuesday",children:e.ordertuesday}),(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-wednesday",children:e.orderwednesday}),(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-thursday",children:e.orderthursday}),(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-weekend",children:e.orderweekend}),(0,r.jsx)(u.Text,{variant:"t6",uniqueId:"floral-delivery-exclusions",children:e.orderexclusions})]}),tooltipId:Math.random().toString()}),(0,r.jsxs)(u.Text,{variant:"t6",uniqueId:"floral-delivery-order-earliest",children:[e.orderearliest,":"]}),(0,r.jsx)(u.Text,{bold:!0,color:"success",variant:"t5",uniqueId:"floral-delivery-delivery-date",sx:{textTransform:"capitalize"},children:a})]})};var D=i(19909);let _="18px";var O=i(70991),w=i(50197),N=i(89118);let j=(e,t,i,a)=>e&&"string"==typeof e?(0,r.jsx)(l.default,{sx:{zIndex:1},children:(0,r.jsx)(d.m,{buttonAriaLabel:a||"",buttonContent:(0,r.jsx)(p.A,{"data-testid":"info-icon",width:_,height:_}),buttonStyles:{color:m.hGW,width:_,height:_,marginLeft:m.m72,marginTop:"2px",position:"absolute"},content:e,position:"bottom",tooltipId:`DeliveryStatement${i}ToolTip-${t}`,uniqueId:`DeliveryStatement${i}ToolTip-${t}`,hasArrow:!0,sx:{fontWeight:m.awq,'&[data-popper-placement*="bottom"]':{".arrow":{left:"-13px !important"}}},offset:[0,4]})}
107):null,P=({primaryInfo:e,secondaryInfo:t,tertiaryInfo:i,showFloralDelivery:d=!1})=>{let p=(0,n.useRef)(null),{internalDomains:f,externalLinkTranslations:g}=(0,o.N)(),{setSelectedAccordion:b,setIsAccordionClicked:y}=(0,w.Dr)(),{translations:x,fulfillmentSettings:v,locale:S}=(0,D.r)(),C=v?.floralDeliveryConfig;e=e?.length?(0,h.RA)(e,["image","shipType","shipCost","tooltip"]):[],(0,n.useEffect)(()=>{if(p?.current){let e=p.current;return e?.addEventListener?.("click",I),e?.addEventListener?.("keypress",T),()=>{e?.removeEventListener?.("click",I),e?.removeEventListener?.("keypress",T)}}},[e,t,i]);let E=()=>{b(N.do.SHIPPING_RETURNS),y(!0)},I=e=>{let t=e?.target;t?.hash===`#${N.do.SHIPPING_RETURNS}`&&(e?.preventDefault(),E())},T=e=>{if(e?.type==="keydown"){if("Enter"!==e.code&&"Space"!==e.code)return;let t=e?.target;t?.hash===`#${N.do.SHIPPING_RETURNS}`&&(e?.preventDefault(),E())}},_=(0,n.useCallback)((e,t)=>(0,r.jsx)(c.Link,{href:e,target:"_blank",hasExternalLinkWarning:!0,underline:"always",variant:"b2",uniqueId:"DeliveryStatementExternalLink",sx:{color:m.tjF,zIndex:2e3},warningCloseAriaLabel:g?.closeButtonAriaLabel,warningTitle:g?.titleContent,warningText:g?.bodyContent,warningPrimaryButtonText:g?.primaryButtonContent,warningSecondaryButtonText:g?.secondaryButtonContent,children:t}),[g]),P=(0,n.useMemo)(()=>t?.map(e=>({...e,parsedText:e?.text&&e?.isHtmlString?(0,O.n0)(e.text,f,_):e.text})),[t,f,_]);return e?.length||t?.length||i?.length||d?(0,r.jsxs)(l.default,{ref:p,"data-testid":"fulfillment-deliveryInfo",sx:{display:"flex",flexDirection:"column",gap:m.m72},children:[e?.map((e,t)=>(0,r.jsxs)(l.default,{"data-testid":"fulfillment-deliveryInfo-primary-info",sx:{display:"flex"},children:[e?.image&&(0,r.jsx)(a.default,{width:91,height:36,src:e.image,alt:e.altText||"",unoptimized:!0}),e?.shipType&&(0,r.jsxs)(u.Text,{variant:"t6",bold:!0,uniqueId:`DeliveryStatementPrimaryInfoShipType-${t}`,children:[e?.shipType,":"]}),e?.shipCost&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.Text,{bold:!0,variant:"t6",color:"success",sx:{paddingLeft:m.m72},uniqueId:`DeliveryStatementPrimaryInfoShipCost-${t}`,children:(0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e?.shipCost}})}),(0,r.jsx)(l.default,{sx:{fontWeight:"normal"},children:e?.tooltip&&j(e.tooltip,t,"PrimaryInfo",e?.tooltipAriaLabel)})]})]},`Fulfillment-primaryInfo-${t}`)),i&&(0,r.jsx)(s.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:m.m72},children:i}),P?.map((e,t)=>(0,r.jsx)(l.default,{"data-testid":"fulfillment-deliveryInfo-secondary-info",sx:{display:"flex"},children:e?.text&&e?.isHtmlString?(0,r.jsxs)(r.Fragment,{children:[e.parsedText&&(0,r.jsx)(u.Text,{variant:"t6",uniqueId:`DeliveryStatementSecondaryInfoText-${t}`,children:e.parsedText}),e?.tooltip&&j(e?.tooltip,t,"SecondayInfo")]}):e?.tooltip?(0,r.jsx)(s.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipId:"fulfillment-deliveryInfo-secondary-info",tooltipStyles:{marginLeft:m.m72},children:e?.textWithTooltip}):e?.text&&(0,r.jsx)(u.Text,{variant:"t6",uniqueId:`DeliveryStatementSecondaryInfoText-${t}`,children:e.text})},`Fulfillment-secondaryInfo-${t}`)),d&&(0,r.jsx)(A,{translations:x,floralDeliveryConfig:C,locale:S})]}):null}},87651:(e,t,i)=>{i.d(t,{_z:()=>n,gN:()=>r});let r="nextGpdpAssets";var a,n=((a={}).USBD="USBD",a.USBC="USBC",a.CABC="CABC",a.CABD="CABD",a)},88165:(e,t,i)=>{i.d(t,{WU:()=>o,Td:()=>a.T,xm:()=>f}),i(55632);var r=i(12115);i(45182);var a=i(82589),n=i(70422),l=i(13052);let o=e=>{let{trackEvent:t}=(0,n.z1)(),[i]=(0,l.Y0)(),a=(0,r.useMemo)(()=>{let e=Object.values(i?.items??{});return 0===e.length||e.some(e=>e.isLoading)},[i?.items]),o=(0,r.useCallback)(()=>{t({trackedData:{loadBundle:"1",products:e.map(e=>{let t=e.id,r=e.parentId?.[0]??"",a=i?.items[t];return{pid:r,sku:t,bundleStock:(0,l.UV)(a?.status)?"In stock":"Out of stock"}})},trackType:"object"})},[e,i,t]),s=(0,r.useCallback)((e,i)=>{t({trackedData:{ui:`${i?"Check":"Un-check"} |Product Detail| Child Page| Build Bundle | ${e}`},trackType:"object"})},[t]);return{trackBundleLoad:o,trackProductCheckChange:s,trackViewBundle:(0,r.useCallback)(()=>{t({component:{type:"nav",identifier:"Product Detail",trackedData:["Complete Your Bundle","View Bundle"]},doNotTrack:!1,trackType:"navigation"})},[t]),trackBundleOutOfStock:(0,r.useCallback)(()=>{t({trackedData:{uimsg:"Product Detail - Bundle | Bundle is out of stock"},trackType:"object",doNotTrack:!1})},[t]),isInventoryLoading:a}};var s=i(44855),d=i(17196),c=i(97923),u=i(73321);let p=async(e,t,i,r=!1)=>{let{method:a="GET",required_request_parameters:n,required_request_headers:l,endpoint:o}=i,s=n.client_identifier[String("CABC").toLowerCase()]||"",d=String(l?.catalog_api_client_identifier)||"",c={item:e,locale:t};s&&(c.clientId=s);let p=new URLSearchParams(c),m={};d&&(m["Client-Identifier"]=d);try{let t=await fetch(`${o}?${p}`,{method:a,headers:m});if(!t.ok){let i=(await t.json()).message||"No error message provided";throw Error(`Product: ${e}, StatusCode: ${t.status}, StatusText: ${t.statusText}, Error: ${i}`)}let i=await t.json();return console.info(`[PDP][PI][Info]- Product: ${e},  StatusCode: ${t.status}, Response: ${JSON.stringify(i)}`),{bundleLightInfo:i,status:t.status}}catch(n){let t=n instanceof Error?n.message:String(n),i=n instanceof Error?n.stack:void 0,a=n?.digest;console.error("- Product: %s, triggerNotFoundOnError: %s, Error: %s, Details: %s",e,String(r),t,JSON.stringify({error:t,digest:a,stack:i})),r&&(0,u.notFound)()}};var m=i(58474);let h=[],f=({bundleItems:e,bundleRawData:t,locale:i,productSummaryServiceConfig:a,bundleDetailsServiceConfig:n,productData:l,selectedVariant:o})=>{let u=(0,r.useMemo)(()=>l?.childCatalogData?.find(e=>e.id===o),[l?.childCatalogData,o]),f=(0,r.useMemo)(()=>(u?.bundleContainerIds??[]).filter(e=>!!e),[u?.bundleContainerIds]),g=(0,r.useMemo)(()=>
107{if(f.length)return t?.variants?.find(e=>e.itemId&&f.includes(e.itemId))},[f,t?.variants]),b=g?.itemId??f[0],y=!!(b&&!g&&n),{data:x,isLoading:v}=(0,s.Ay)(y?["bundle-container",b,i]:null,async()=>{let e=await p(b,i,n),t=e?.bundleLightInfo;return t&&{...t,variants:t.variants?.filter(e=>e.isPublished)}},m.M),S=(0,r.useMemo)(()=>g||x?.variants?.find(e=>e.itemId&&f.includes(e.itemId)),[g,x]),C=!!o&&(!b||!v&&!S),E=S?.bundleComponents,I=(0,r.useMemo)(()=>{if(!E?.length)return"";let e=new Set;return S?.parentId&&e.add(S.parentId),E.forEach(t=>{t.parentId&&e.add(t.parentId)}),Array.from(e).join(",")},[S,E]),T=!!(S?.parentId&&S.parentId===e.bundleParentData?.id),A=!!(o&&!v&&!T&&E?.length&&I&&a),{data:D,isLoading:_}=(0,s.Ay)(A?["bundle-matched-variant",I,i]:null,async()=>{let e=await (0,c.T)(I,i,a),t=e?.productSummary?.productData??[];return(0,d.S)({productId:S?.parentId},t,E??[],S?.parentId||"").bundleComponents},m.M),O=(0,r.useRef)(void 0);return(y&&v||A&&_||(O.current=o),C)?{bundleItemsData:h,bundleParentData:void 0,resolvedVariantId:O.current}:{bundleItemsData:D?.bundleItemsData??e.bundleItemsData,bundleParentData:D?.bundleParentData??e.bundleParentData,resolvedVariantId:O.current}}},88504:(e,t,i)=>{i.r(t),i.d(t,{useControlWarrantyServicesDrawer:()=>n});var r=i(12115),a=i(45182);let n=()=>{let[,e]=(0,a.n9)();return{openDrawer:(0,r.useCallback)((t,i)=>{let r=(t||[]).map(e=>({id:e.id??null,rank:e.rank??null,longDescription:e.longDescription??null})),a=r.length?{warrantyAndServices:r}:void 0;e(()=>({isOpened:!0,warrantyData:a,productInfo:i}))},[e]),closeDrawer:(0,r.useCallback)(()=>e(()=>({isOpened:!1,warrantyData:void 0,productInfo:void 0})),[e])}}},88987:(e,t,i)=>{i.d(t,{AddToCartScaffoldingProvider:()=>l,b:()=>o});var r=i(95155),a=i(12115);let n=(0,a.createContext)(void 0),l=({children:e,productDetailsData:t,properties:i,pageSettings:l,locale:o,slug:s,config:d,productDetailsTranslations:c,selectedChildItem:u,accessoriesData:p})=>{let m=(0,a.useMemo)(()=>({productDetailsData:t,properties:i,pageSettings:l,locale:o,slug:s,config:d,productDetailsTranslations:c,selectedChildItem:u,accessoriesData:p}),[t,i,l,o,s,d,c,u,p]);return(0,r.jsx)(n.Provider,{value:m,children:e})},o=()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useAddToCartScaffoldingContext must be used within AddToCartScaffoldingProvider");return e}},89118:(e,t,i)=>{i.d(t,{do:()=>l,kn:()=>n});var r,a,n=((r={}).SPONSORED_PRODUCTS="Sponsored Products Carousel",r.MEMBERS_ALSO_BOUGHT="Members Also Bought Carousel",r.SIMILAR_PRODUCTS="Similar Products Carousel",r.RECENTLY_VIEWED="Recently Viewed Carousel",r.SIMILAR_INSTOCK_PRODUCTS="Similar In-Stock Products Carousel",r.VIDEO_SPOTLIGHT="Video Spotlight",r),l=((a={}).PRODUCT_DETAILS="product_details",a.SPECIFICATIONS="specifications",a.DRUG_FACTS="drug_facts",a.FSA_ELIGIBLE="fsa_eligible",a.NUTRITIONAL_INFORMATION="nutritional_facts",a.SUPPLEMENT_FACTS="supplement_facts",a.SHIPPING_RETURNS="shipping_returns",a.WARRANTY_SERVICES="warranty_services",a.REQUEST_CONSULTATION="request_consultation",a.MEMBER_REVIEWS="member_reviews",a.MANUALS_GUIDES="manuals_guides",a)},90657:(e,t,i)=>{i.d(t,{Ml:()=>n,e6:()=>o,oM:()=>l});var r=i(24880),a=i(27966);let n=(0,i(86670).Ay)(a.default)({display:"flex",alignItems:"flex-start",alignSelf:"stretch",gap:r.m72,flexWrap:"wrap"}),l={overflow:"visible"},o={boxShadow:"none"}},92060:(e,t,i)=>{i.d(t,{B:()=>r});let r=(0,i(9527).y)()},92069:(e,t,i)=>{i.d(t,{BundleFulfillmentScaffoldingContextProvider:()=>l,d:()=>o});var r=i(95155),a=i(12115);let n=(0,a.createContext)(void 0),l=({children:e,productDetailsData:t,locale:i})=>{let l=(0,a.useMemo)(()=>({productDetailsData:t,locale:i}),[t,i]);return(0,r.jsx)(n.Provider,{value:l,children:e})},o=()=>{let e=(0,a.useContext)(n);if(!e)throw Error("useFulfillmentScaffoldingContext must be used within BundleFulfillScaffoldingContext");return e}},92126:(e,t,i)=>{i.d(t,{Y:()=>n});var r=i(71706),a=i(83272);let n=()=>{let{miniBannerDetails:e}=(0,r.B)();if(!e.values)return null;let{addrType:t}=e.values;return{type:"S"===t?.toUpperCase()?a.yl.PICK_UP:a.yl.LOCAL_BUSINESS_DELIVERY}}},92454:(e,t,i)=>{i.d(t,{EspotClient:()=>h});var r=i(95155),a=i(27966),n=i(12129),l=i(92226),o=i(24880),s=i(57981),d=i(34291),c=i(70334);let u=({children:e,isMobile:t})=>(0,r.jsx)(l.l,{cornerStyle:t?"square":"rounded",children:e}),p=({children:e,isCard:t,isMobile:i,customRowStyle:n})=>{let l=t?c.Lr:{};return(0,r.jsx)(a.default,{"data-testid":"box",sx:{marginBottom:o.Mzk,...l,...n},children:t?(0,r.jsx)(u,{isMobile:i,children:e}):e})},m=({children:e,isCard:t,isMobile:i})=>(0,r.jsx)(n.default,{"data-testid":"grid",size:{xs:12},sx:c.Ez,children:t?(0,r.jsx)(u,{isMobile:i,children:e}):e}),h=({identifier:e,type:t,children:i,customRowStyle:a})=>{let n,{isMobile:l}=(0,d.A)();return n=t===s.Gb.Row?p:m,(0,r.jsx)(n,{isCard:e.is_card,isMobile:l,customRowStyle:a,children:i})}},92570:(e,t,i)=>{i.d(t,{default:()=>et});var r=i(95155),a=i(12129),n=i(27966),l=i(24880),o=i(92226),s=i(34971),d=i(95097),c=i(42138),u=i(79176),p=i(43922),m=i(12158),h=i(7457),f=i(85570),g=i(19216),b=i(34291),y=i(82849),x=i(70422),v=i(71706),S=i(40131),C=i(49902),E=i(38494),I=i(66191),T=i(9969),A=i(19359),D=i(5862),_=i(45969),O=i(12115),w=i(3187);let N={Blue:l.tjF,Red:l.JHH},j=({badgeData:e})=>{let{firstBadge:t,secondBadge:i,link:a}=e;return(0,r.jsx)(n.default,{children:(0,r.jsxs)(w.Link,{href:a||"",sx:{fontSize:l.x9N},uniqueId:"twoday-delivery",children:[(0,r.jsx)(n.default,{component:"span",sx:{color:N[t.color],fontWeight:l.Pqj},children:t.text}),i&&(0,r.jsx)(n.default,{component:"span",sx:{color:N[i.color],fontWeight:l.Pqj},children:i.text})]})})};var P=i(42347),R=i(60714),k=i(30890),L=i(48195),M=i(74324),B=i(13869),$=i(96013);let z=(0,i(86670).Ay)("div")({fontSize:l.tGh,lineHeight:l.Wu6,p:{marginTop:0,marginBottom:0},a:{color:"#005DAB"}});var U=i(38734),q=i(19547),V=i(5514),F=i(7040),W=i(44987),H=i(7025),K=i(19909);let G=e=>{if(!e)return!1;let t=parseInt(e.minQuantity),i=e.price;return!isNaN(t)&&t>0&&null!=i&&!isNaN(i)&&i>0},Y=({data:e,translations:t})=>{if(!e||0===e.length)return null;let i=e.filter(G);return 0===i.length?null:(0,r.jsxs)(n.default,{sx:{border:`2px solid ${l.H4y}`,borderRadius:"4px",width:"100%"},children:[(0,r.jsx)(n.default,{sx:{backgroundColor:l.H4y,padding:`${l.iAn} ${l.D3H}`},children:(0,r.jsx)(m.Text,{bold:!0,variant:"t5",sx:{color:l.DJJ},children:t.tieredPricingTitle})}),(0,r.jsx)(n.default,{sx:{backgroundColor:l.z9P,padding:l.D3H},children:i.map((e,i)=>{var a;let n,o,s,d;return(0,r.jsx)(m.Text,{variant:"t6",sx:{color:l.S6v,fontWeight:l.Pqj,lineHeight:l.Wu6},children:(a=t.tieredPricingText,n=parseInt(e.minQuantity),o=parseInt(e.maxQuantity),s=e.price.toFixed(2),d=o&&n===o?`${n}`:`${n}+`,a.replace("{quantityRange}",d).replace("{price}",s))},i)})})]})};var Q=i(37994),Z=i(88165),J=i(13052),X=i(8102);let ee="pricing-card",et=({locale:e,descriptionsData:t,parentNumber:i,isTwoDayDeliveryAvailable:w,twoDayDeliveryBadge:N,translations:G,showCompareCheckbox:et,children:ei,membershipUrls:er,enableMarketingStmtFromCMC:ea=!1,productData:en,displayPriceInCartOnly:el=0,selectedChildItemNumber:eo,productAttributes:es})=>{let[ed,ec]=(0,O.useState)(!1);(0,O.useEffect)(()=>{ec(!0)},[]);let{isMobile:eu}=(0,b.A)(),{priceDetails:ep,isLoadingPriceAPI:em,isPriceApiError:eh,shouldHidePriceCard:ef,showPriceWithOnlyStatement:eg,isExcludedForBusinessDelivery:eb,canMakePriceCall:ey}=(0,_.A)(),[ex,ev]=(0,O.useState)(!1),[eS]=(0,U.N)(),eC=eS?.value||eo,{trackEvent:eE}=(0,x.z1)(),eI=(0,A.G8)(),eT=(0,A.sp)(),eA=(0,A.SG)(),{productPricingCardModuleSettings:eD,addMembershipModuleSettings:e_}=(0,R.h)(),{wcMember:eO,deliveryLocation:ew,bdDeliveryLocation:eN}
107=(0,v.B)(),{signedIn:ej,validated:eP,verified:eR,active:ek,costcoMember:eL}=(0,L.i)(),[eM,eB]=(0,O.useState)(""),[e$,ez]=(0,O.useState)(""),[eU,eq]=(0,O.useState)(!1),[eV,eF]=(0,O.useState)(!1),[eW,eH]=(0,O.useState)(""),eK=(0,O.useRef)(void 0),{childCatalogData:eG,descriptions:eY}=en||{},eQ=eG?.find(e=>e.id===eC),{isChdEligible:eZ,isFsaEligible:eJ}=(0,A.Xz)(eG,eC),eX=(0,k.ce)(en,eQ?.id),e0=(0,k.ul)(eQ,en),e1=2===el,e2=eQ?.descriptions?.[0]?.object?.isVariableWeight===!0,e5=eI&&e2,[e9]=(0,V.T)(),e7=(0,K.r)(),{outOfStockItemCount:e4,totalBundleItems:e3}=(0,Z.Td)(e),{isSellableItemsInStock:e6}=(0,J.MN)(),e8=(0,X.G)({productData:en}),{fulfillmentData:te,productFlags:{isWarehouseOnly:tt,isSpecialOrder:ti}}=e7,tr=(0,F.X)(e),ta=(0,W.m)(e,{isWarehouseOnly:tt}),tn=te?.isLoading||!1,tl=es&&(0,A.S7)(es,"Taxable_Food",e),to="string"==typeof tl&&""!==tl?tl.split(",").map(e=>e.trim().toLocaleUpperCase()):[],ts=(0,O.useMemo)(()=>{if("fr-ca"!==e&&"en-ca"!==e||0===to.length)return!1;if(eI){let e=(0,A.nv)(eN);return to.includes(e)}return to.includes(ew?.state?.toLocaleUpperCase()||"")},[e,to,ew?.state,eI,eN?.bdLocation]),td=em||!ep&&!eh||tn,tc=ed&&eI&&!eN?.zipCode,tu=tr?.isEnabled&&e9?.id===H.Oi.SAME_DAY_DELIVERY&&!eX,tp=eD?(0,M.IV)(eD):{},tm=(0,M.rZ)(e4,e3,G,e6),{finalPriceData:th,currentPrice:tf,shouldShowWarehousePrice:tg,hasWarehousePriceData:tb,priceData:ty}=(0,O.useMemo)(()=>
107{let e=(0,A.qh)(e9?.id),{priceData:t,priceDataWh:i}=ep||{},r=e&&i||t,a=r?.displayPrice?.deliveredPrice??r?.displayPrice?.onlinePrice;return{finalPriceData:r,currentPrice:"string"==typeof a?parseFloat(a):a,shouldShowWarehousePrice:e,hasWarehousePriceData:!!i,priceData:t,priceDataWh:i}},[e9?.id,ep]),tx=(0,O.useRef)(null),tv=(0,O.useRef)(!1);(0,O.useEffect)(()=>{let t=!tu&&!td&&""===eM,i=eK.current,r="number"==typeof tf&&!isNaN(tf),a=r&&"number"==typeof i&&tf!==i,n=t&&tv.current;if(a||n)if(r&&null!=tf){let t="fr-ca"===e?`(${tf.toFixed(2)}$)`:`($${tf.toFixed(2)})`;tx.current=`${G.priceupdate} ${t}`}else tx.current=null;t&&tx.current&&(eH(tx.current),tx.current=null),tv.current=tu,r?eK.current=tf:tu&&(eK.current=null)},[tf,tu,td,eM,G.priceupdate]),(0,O.useLayoutEffect)(()=>{eI&&eL||td&&(!td||em)||(()=>{if(ez(""),eF(!1),!ej&&(eX||!eX&&1===el))return eB(G.signintoseepricebutton);if((0,k.BH)(eX,el,eP,ej)){eF(!0),eB("");return}if(eX&&(eP||eR))return eB(ek?"":G.renewmembershipbutton);if(eX&&(!eP||!eR)){eB(G.addmembershipnumberbutton),ez(G.joincostcobutton);return}eB("")})()},[eX,ej,eP,eR,ek,el,td,eI,eL,em]);let[{isReplacementItem:tS}={}]=(0,Q.jg)(),tC=e=>{switch(e){case G.signintoseepricebutton:let t=(0,q.J)(tI||"",i||"");(0,k.Mi)(t||"");break;case G.renewmembershipbutton:(0,k.Um)(er?.renewMembershipUrl||"");break;case G.addmembershipnumberbutton:eq(!0);break;case G.joincostcobutton:(0,k.Rh)(er?.joinTodayUrl||"")}eE({component:{identifier:`Product Detail | ${e}`,type:"nav"},doNotTrack:!1,trackType:"product-price-button"})},{imageName:tE="",shortDescription:tI="",marketingStatement:tT="",promotionalStatement:tA=""}=t?.object||{},{uom:tD,factor:t_}=eI?(0,D.f)(th,{factor:en?.factor,quantityMeasure:en?.quantityMeasure},e):{uom:eQ?.uom,factor:eQ?.factor},tO=tr?.isEnabled&&(e9?.id===H.Oi.SAME_DAY_DELIVERY||tg&&tb),{discounts:tw,temporaryPriceReductions:tN,marketingTexts:tj,displayPrice:tP={onlinePrice:"",deliveredPrice:"",aggregatedDiscountAmt:""},warehouseNumber:tR}=(0,A.A7)(th),tk=ep?.priceData?.linkFees||void 0,tL=()=>{ev(!0),eE({component:{identifier:"Product Detail | Terms and Conditions Popout",type:"ui"},trackType:"product-price-button"})},tM=ea&&(0,M.p$)(th)&&!tO,tB=tM&&tT?(0,M.wx)(tT.trim()):"",t$=tM&&tA?(0,M.wx)(tA.trim()):"",tz=tT&&tT.trim().length!==tB.trim().length||tA&&tA.trim().length!==t$.trim().length,tU=tB&&tB!==String.fromCharCode(160)||t$&&t$!==String.fromCharCode(160)||tz,tq=ty?.tierPrices&&ty?.tierPrices.length>0,tV=eI?eY?.[0]?.object?.sanitizedDeliveryStatement?.aux1:"",tF=eI?eY?.[0]?.object?.marketingStatement:"",tW=eI&&eX,tH=tW&&ej,tK=tW&&!ej;if(eI&&em)return(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(o.l,{cornerStyle:eu?"square":"rounded",sx:{overflow:"visible"},children:(0,r.jsx)(s.Skeleton,{height:48,variant:d.z.Rectangular,width:200})})});let tG=tW&&!ej&&2!==el&&!eb,tY=e=>{let{notification:t,showDeliveryStatement:s,showMarketingStatement:d,showTieredPricingContent:c,showCompareCheckbox:u}=e,p=t||s||d||c,m=u&&!eu&&!1===tS;return p||m?(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(n.default,{"data-testid":p?ee:void 0,children:(0,r.jsx)(o.l,{cornerStyle:eu?"square":"rounded",sx:{overflow:"visible"},children:(0,r.jsxs)(n.default,{sx:{display:"flex",flexDirection:"column",marginBlockEnd:0,gap:l.m72},children:[t,s&&tV&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"delivery-statement",children:tV}),d&&tF&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"marketing-statement",children:tF}),c&&tq&&(0,r.jsx)(Y,{data:ty?.tierPrices,translations:tp}),m&&(0,r.jsx)(n.default,{sx:{display:"flex",marginTop:p?l.m72:void 0},children:(0,r.jsx)(C.G,{productImageUrl:tE,isChdiEligible:eZ,isFsaEligible:eJ,label:G.comparelabel,partNumber:i,productName:tI,productTitleId:i,showCompareProductButton:u})})]})})})}):null};return ef||eg||ti?tY({notification:!1,showDeliveryStatement:!ti&&!!tV,showMarketingStatement:!!tF,showTieredPricingContent:!!tq,showCompareCheckbox:!eg&&!!et}):tG||tK||tc?tY({showDeliveryStatement:!!tV,showMarketingStatement:!!tF,showTieredPricingContent:!!tq,showCompareCheckbox:!!et}):!tH||eL||eg?e1&&tg&&!tb&&!em?tY({notification:(0,r.jsx)(c.Notification,{uniqueId:"warehouse-price-unavailable",icon:(0,r.jsx)(B.A,{}),message:G?.missingpricefallbacktext,severity:"alert"}),showCompareCheckbox:!!(!tt&&et&&!eu)}):e1&&!tg?!tt&&tM&&tU||!tt&&et&&!eu?(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(n.default,{"data-testid":ee,children:(0,r.jsx)(o.l,{cornerStyle:eu?"square":"rounded",children:(0,r.jsxs)(n.default,{sx:{display:"flex",flexDirection:"column",alignItems:"stretch",gap:l.m72,alignSelf:"stretch"}
107,children:[tM&&tU&&(0,r.jsxs)(u.B,{variant:"SimpleList",style:{display:"flex",flexDirection:"column",gap:l.m72,marginBlockEnd:0},children:[tB&&tB!==String.fromCharCode(160)&&(0,r.jsx)(p.c,{children:(0,r.jsx)(m.Text,{variant:"t6",bold:!0,color:"success",uniqueId:"marketing-statement",children:(0,r.jsx)(z,{children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:tB}})})})}),t$&&t$!==String.fromCharCode(160)&&(0,r.jsx)(p.c,{children:(0,r.jsx)(m.Text,{variant:"t6",uniqueId:"promotional-statement",children:(0,r.jsx)(z,{children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:t$}})})})}),tz&&(0,r.jsx)(p.c,{children:(0,r.jsx)(h.Button,{"data-testid":`${tp.termsAndConditionsText}-button`,onClick:tL,sx:{color:l.S6v,textDecorationLine:"underline",textDecorationStyle:"solid"},variant:"text-button",children:tp.termsAndConditionsText})})]}),tV&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"delivery-statement",children:tV}),tF&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"marketing-statement",children:tF}),tq&&(0,r.jsx)(Y,{data:ty?.tierPrices,translations:tp}),et&&!eu&&(0,r.jsx)(n.default,{sx:{display:"flex",marginTop:l.m72},children:(0,r.jsx)(C.G,{productImageUrl:tE,isChdiEligible:eZ,isFsaEligible:eJ,label:G.comparelabel,partNumber:i,productName:tI,productTitleId:i,showCompareProductButton:et})})]})})})}):null:"number"==typeof tf&&!isNaN(tf)&&tf<=0?null:(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsxs)(n.default,{"data-testid":ee,children:[(0,r.jsx)(f.z,{announcerText:eW,callback:eH,ariaLive:"polite",announcerTime:2e3}),(0,r.jsx)(o.l,{cornerStyle:eu?"square":"rounded",sx:{overflow:"visible"},children:(0,r.jsxs)(n.default,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-start",gap:l.iAn,alignSelf:"stretch"},children:[!td&&e8&&e4>0&&(0,r.jsx)(c.Notification,{uniqueId:"out-of-stock-notification",icon:(0,r.jsx)($.A,{}),message:tm,severity:"alert",sx:{width:"100%"}}),ta&&(0,r.jsx)(P.A,{text:G.warehousetext,tooltipContent:G.warehousetooltip,tooltipId:"warehouse-only"}),!ta&&(0,r.jsxs)(r.Fragment,{children:[w&&N&&(0,r.jsx)(j,{badgeData:N}),td?(0,r.jsx)(s.Skeleton,{height:48,variant:d.z.Rectangular,width:200}):tu?null:(0,r.jsx)(E.q,{moduleSettings:eD,displayPrice:{...tP,warehouseNumber:tR??void 0},discounts:tw,temporaryPriceReduction:tN,marketingTexts:tj,isMemberOnlyItem:eX,showMemberOnlyLabel:!eI&&eX,locale:e,quantityFactor:String(t_??1),displayOnlinePriceTooltip:!1,displayPriceDisclaimerTooltip:tr?.isEnabled,unitOfMeasure:tD?.toLocaleLowerCase(e)??"",membershipButtonLabel:eM,membershipSecondaryButtonLabel:e$,onButtonClick:()=>tC(eM),onSecondaryButtonClick:()=>tC(e$),showPriceInCartNotification:eV,fulfillmentChannel:e9?.id,showTaxableFoodLabel:ts,hidePromoShortTextForSinglePromotion:eI,linkFees:tk,showUOMTextAsAppendText:e5,showInstantSavingsMessage:eT,promoVariant:eI?"SAVE":"OFF",disablePriceTooltipPortal:!1,uomRoundingDecimal:eI?"CEILING":"STANDARD",isDescriptionUppercase:eT,showDecimalPlaces:!0,useOrderLimitText:eI,groupPromotionDates:eA,renderAsModal:!0,linkFeeModalTitle:tp?.ecoFeeLabel,linkFeeModalButtonLabel:tp?.closeButtonText},`pricing-card-${e9?.id||"default"}`),(!td||""!==eM)&&tM&&tU&&(0,r.jsxs)(u.B,{variant:"SimpleList",style:{display:"flex",flexDirection:"column",gap:l.m72,marginBlockEnd:0},children:[tB&&tB!==String.fromCharCode(160)&&(0,r.jsx)(p.c,{children:(0,r.jsx)(m.Text,{variant:"t6",bold:!0,color:"success",uniqueId:"marketing-statement",children:(0,r.jsx)(z,{children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:tB}})})})}),t$&&t$!==String.fromCharCode(160)&&(0,r.jsx)(p.c,{children:(0,r.jsx)(m.Text,{variant:"t6",uniqueId:"promotional-statement",children:(0,r.jsx)(z,{children:(0,r.jsx)("span",{dangerouslySetInnerHTML:{__html:t$}})})})}),tz&&(0,r.jsx)(p.c,{children:(0,r.jsx)(h.Button,{"data-testid":`${tp.termsAndConditionsText}-button`,onClick:tL,sx:{color:l.S6v,textDecorationLine:"underline",textDecorationStyle:"solid"},variant:"text-button",children:tp.termsAndConditionsText})})]}),tV&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"delivery-statement",children:tV}),tF&&(0,r.jsx)(S.a,{isMarkdown:!0,isPlainText:!1,variant:"body_copy_sm_v2",isCustomParsingEnabled:!0,alignment:"left",component:"div",tooltipStyles:{marginLeft:l.m72},uniqueId:"marketing-statement",children:tF}),!eV&&e0&&""===eM&&!tr?.isEnabled&&(0,r.jsxs)(n.default,{children:[(0,r.jsx)(m.Text,{bold:!0,component:"p",sx:{dis
107play:"inline",fontSize:l.tGh},uniqueId:`${tp.onlinePriceLabel}-heading`,variant:"b2",children:tp.onlinePriceLabel}),(0,r.jsx)(g.m,{buttonAriaLabel:tp.onlinePriceTooltipAriaLabel,buttonContent:(0,r.jsx)($.A,{sx:{gap:l.m72,height:18,verticalAlign:"bottom",weight:18}}),content:tp.onlinePriceTooltipText,position:"top",hasArrow:!0,tooltipId:`${tp.onlinePriceLabel}-tooltip-id`,uniqueId:`${tp.onlinePriceLabel}`,offset:[0,8],sx:{'&[data-popper-placement*="top"]':{".arrow":{left:"-6px !important"}}},disablePortal:!1})]}),O.Children.toArray(ei).some(Boolean)&&(0,r.jsx)(n.default,{id:"pricing-card-espot",sx:{width:"100%"},children:ei}),tq&&(0,r.jsx)(Y,{data:ty?.tierPrices,translations:tp}),et&&!eu&&(0,r.jsx)(n.default,{sx:{display:"flex",marginTop:l.m72},children:(0,r.jsx)(C.G,{productImageUrl:tE,isChdiEligible:eZ,isFsaEligible:eJ,label:G.comparelabel,partNumber:i,productName:tI,productTitleId:i,showCompareProductButton:et})})]}),(0,r.jsx)(I.r,{moduleSettings:e_,isOpen:eU,onClose:()=>{eq(!1),eO.updateWcMember(y.A.get("wcMember")||"")},onSubmit:()=>{},hidePageOne:!1}),(0,r.jsx)(T.g,{isOpen:ex,title:tp.termsAndConditionsDrawerTitle,locale:e,content:tp.termsAndConditionsDrawerContent,onDrawerClose:()=>ev(!1)})]})})]})}):tY({notification:(0,r.jsx)(c.Notification,{uniqueId:"bd-member-only-signed-in",icon:(0,r.jsx)(B.A,{}),message:G?.addtocartseepricetext,severity:"general"}),showDeliveryStatement:!!tV,showMarketingStatement:!!tF,showTieredPricingContent:!1,showCompareCheckbox:!!et})}},93280:(e,t,i)=>{i.d(t,{MA:()=>r.M,p0:()=>l.p,Gb:()=>s,Rd:()=>n,wL:()=>d,uw:()=>o,e9:()=>b,P1:()=>v,il:()=>g,xn:()=>x,tW:()=>y});var r=i(58474),a=i(6946);let n=async(e,t)=>{let{childItemNumber:i,selectedWarehouse:r,isBopimProduct:n,pickUpCenter:l,shippingCodes:o,itemMinQuantity:s,serviceConfig:d}=e,{endpoint:c="",method:u="GET",required_request_headers:p,required_request_parameters:m,retryconfig:h}=d,f=String("https://ecom-api.costco.com"),g=p.client_identifier[String("CABC").toLowerCase()]||"",b=p.costco.env||"",{action:y=""}=m.inventory,x=new URLSearchParams({quantity:s,selectedWarehouse:n&&l?`${r},${l}`:r,shippingCodes:o||"No Shipping",action:y}),v=`${f}${c}/${i}?${x}`;try{let{data:e,status:r,statusText:n}=await (0,a.X)(v,{method:u,headers:{"client-identifier":g,"costco.env":b},signal:t},h,`[PDP][PU][Error] - ChildId: ${i} `);return{pickUpInfo:e,status:r}}catch(e){if(console.info(`[PDP][PU][ERROR] - ${e}`),e instanceof DOMException&&"AbortError"===e.name)throw e;throw Error(`[PDP][PU][Error] - ChildId: ${i} - ${e}`)}};var l=i(578);let o=async(e,t)=>{let{childItemNumber:i,serviceConfig:r}=e,{endpoint:n="",method:l="GET",required_request_parameters:o,retryconfig:s,required_request_headers:d}=r,c="localhost"!==window.location.hostname?window.location.origin:String("https://www.costco.ca"),u=o.warehouse_contract_id[String("CABC").toLowerCase()]||"",p=d.client_identifier[String("CABC").toLowerCase()]||"",m=`${c}${n}?itemNumber=${i}&warehouseNo=${u}&clientId=${p}`;try{let{data:e,status:r,statusText:n}=await (0,a.X)(m,{method:l,signal:t,headers:{"Cache-Control":"no-cache, no-store, must-revalidate, max-age=0"}},s,`[PDP][WCSI][Error] - ChildItem: ${i} `),o=JSON.stringify(e);return{wcsInventoryInfo:JSON.parse(o).payload.data,status:r}}catch(e){if(console.info(`[PDP][WCSI][ERROR] - ${e}`),e instanceof DOMException&&"AbortError"===e.name)throw e;throw Error(`[PDP][WCSI][Error] - ChildId: ${i} - ${e}`)}},s=async(e,t)=>{let{pickUpCenter:i,serviceConfig:r}=e,{endpoint:a="",method:n="GET",required_request_headers:l}=r,o=String("https://ecom-api.costco.com"),s=l.client_identifier[String("CABC").toLowerCase()]||"",d=i?.split("-")[0]??"",c=a.replace("{{mdoId}}",d),u=`${o}${c}`;try{let e=await fetch(u,{method:n,headers:{"client-identifier":s},signal:t});if(!e.ok){let t=await e.json(),i=t?JSON.stringify(t):"No error message provided";throw Error(`StatusCode: ${e.status}, StatusText: ${e.statusText}, Error: ${i}`)}let{mdoLocation:i}=await e.json();return{mdoLocationInfo:i,status:e.status}}catch(t){let e=t instanceof Error?t.message:String(t);if(console.info(`[PDP][MDO][ERROR] - ${e}`),t instanceof DOMException&&"AbortError"===t.name)throw t;throw Error(`[PDP][MDO][Error] - PickUpCenter: ${i} - ${t}`)}},d=async(e,t)=>{let{childItemNumber:i,whsNumber:r,serviceConfig:n}=e,{endpoint:l="",method:o="GET",required_request_parameters:s,retryconfig:d,required_request_headers:c}=n,u="localhost"!==window.location.hostname?window.location.origin:String("https://www.costco.ca"),p=r||s.warehouse_contract_id[String("CABC").toLowerCase()]||"",m=c.client_identifier[String("CABC").toLowerCase()]||"",h=`${u}${l}?itemNumber=${i}&warehouseNo=${p}&clientId=${m}`;try{let{data:e,status:r,statusText:n}=await (0,a.X)(h,{method:o,signal:t,headers:{"Cache-Control":"no-cache, no-store, must-revalidate, max-age=0"}},d,`[PDP][WCSI][Error] - ChildItem: ${i}
107 `),l={itemInvData:{...e,partnumber:e?.itemNumber}};return e?.errorParam?.Reason!=""&&console.info(`[PDP][WCSI][ERROR] - ${e?.errorParam?.Reason}`),{wcsInventoryInfo:l,status:r}}catch(e){if(console.info(`[PDP][WCSI][ERROR] - ${e}`),e instanceof DOMException&&"AbortError"===e.name)throw e;throw Error(`[PDP][WCSI][Error] - ChildId: ${i} - ${e}`)}};var c=i(44855),u=i(7025),p=i(12115);let m=async({warehouseId:e,locale:t,warehouseLocatorServiceConfig:i})=>{let r=e.match(/\d+/),a=r?r[0]:"";if(!a)return null;try{if(!i?.endpoint)return console.error("[PDP][WarehouseData][Error] - Warehouse locator service endpoint not found"),null;let e=i.endpoint.replace(/\.json$/,""),r=`${e}/${a}.json?fields=warehouse.timeZone`,n=i.required_request_parameters?.client_id;n&&(r+=`&client_id=${n}`);let l=i.required_request_headers.client_identifier,o={"Accept-Language":t};l&&(o["client-identifier"]=String(l));let s=await fetch(r,{method:"GET",headers:o});if(!s.ok)throw Error(`Failed to fetch warehouse data: ${s.status}`);return(await s.json()).warehouse}catch(e){return console.error("[PDP][WarehouseData][Error] - fetching warehouse data:",e),null}};var h=i(60714),f=i(51551);let g=(e,t=!0,i={})=>{let a=async e=>({data:await n(e),fetchedAt:Date.now()}),l=!1,o="number"==typeof e?.serviceConfig?.retryconfig?.ttl?e.serviceConfig.retryconfig.ttl:18e5,{data:s,error:d,isLoading:g,isValidating:b,mutate:y}=(0,c.Ay)(["pickUp",e.childItemNumber,e.selectedWarehouse,e.isBopimProduct,e.pickUpCenter,e.shippingCodes,e.itemMinQuantity],t?()=>a(e):null,{...r.M,...i});s?.fetchedAt&&(l=Date.now()-s.fetchedAt>=o),(0,p.useEffect)(()=>{l&&y(void 0,{revalidate:!0})},[l,y]);let x=s?.data?.pickUpInfo?.warehouseAvailability?.useWarehouseInventory,v=!!(t&&x?.buyable&&x?.availability===u.RO.INSTOCK),{warehouseLocation:S}=((e,t,i=!1,a={})=>{let{warehouseLocatorServiceConfig:n}=(0,h.h)(),{data:l,error:o,isLoading:s}=(0,c.Ay)(i&&e&&n?["warehouseData",e,t]:null,()=>m({warehouseId:e,locale:t,warehouseLocatorServiceConfig:n}),{...r.M,...a});return{warehouseLocation:(0,p.useMemo)(()=>l?{...l,warehouseId:e}:void 0,[e,l]),error:o,isLoading:s}})(e.selectedWarehouse,e.locale,v);return{pickUpData:(0,p.useMemo)(()=>{if(s?.data?.pickUpInfo&&S){let e=s.data.pickUpInfo.warehouseAvailability?.useWarehouseInventory?.orderCutOff||"",t=s.data.pickUpInfo.warehouseAvailability?.useWarehouseInventory?.orderPickup||"",i=(0,f.G9)(e,S.timeZone),r=(0,f.G9)(t,S.timeZone);return{...s?.data?.pickUpInfo,orderCutOffLocalTime:i,orderPickupLocalTime:r}}return s?.data?.pickUpInfo},[s,S]),isLoading:g,isValidating:b,isError:d,mutate:y}},b=(e,t=!0,i=!0,a={})=>{let n={availability:u.RO.UNAVAILABLE},o={availability:u.RO.INSTOCK};if(!i)return{inventoryV2Data:o,isLoading:!1,isValidating:!1,isError:void 0,mutate:()=>Promise.resolve(void 0)};let{data:s,error:d,isLoading:p,isValidating:m,mutate:h}=(0,c.Ay)(t?["inventoryV2",e.childItemNumber,e.destination.destinationState,e.destination.destinationPostalCode,e.destination.destinationCountryCode,e.shippingCodes,e.itemMinQuantity]:null,()=>(0,l.p)(e),{...r.M,...a,onError:e=>{let t=e instanceof Error?e.message.match(/StatusCode:\s*(\d+)/):null,i=t&&t[1]?parseInt(t[1],10):null;n.availability=i&&i>=500?u.RO.UNKNOWN:u.RO.UNAVAILABLE}});return{inventoryV2Data:d?n:s?.inventoryV2Info,isLoading:p,isValidating:m,isError:d,mutate:h}},y=(e,t=!0,i=!0,a=!1,n={})=>{let l={itemInvData:{isAvailable:void 0,backorderType:"0"}};if(!i)return{wcsInventoryData:{itemInvData:{isAvailable:!0,backorderType:"0"}},isLoading:!1,isValidating:!1,isError:void 0,mutate:()=>Promise.resolve(void 0)};if(i&&a){let{data:i,error:a,isLoading:o,isValidating:s,mutate:u}=(0,c.Ay)(t?["wcsInventory",e.childItemNumber,e.destination.destinationCountryCode,e.destination.destinationPostalCode,e.destination.destinationState]:null,()=>d(e),{...r.M,...n});return{wcsInventoryData:a?l:i?.wcsInventoryInfo,isLoading:o,isValidating:s,isError:a,mutate:u}}{let{data:i,error:a,isLoading:s,isValidating:d,mutate:u}=(0,c.Ay)(t?["wcsInventory",e.childItemNumber,e.destination.destinationCountryCode,e.destination.destinationPostalCode,e.destination.destinationState]:null,()=>o(e),{...r.M,...n});return{wcsInventoryData:a?l:i?.wcsInventoryInfo,isLoading:s,isValidating:d,isError:a,mutate:u}}},x=(e,t=!0,i={})=>{let{data:a,error:n,isLoading:l,isValidating:o,mutate:s}=(0,c.Ay)(t?["scInventoryUpdate",e.childItemNumber,e.whsNumber??""]:null,()=>d(e),{...r.M,...i});return{scInventoryData:n?{itemInvData:{isAvailable:void 0,backorderType:"0"}}:a?.wcsInventoryInfo,isLoading:l,isValidating:o,isError:n,mutate:s}},v=(e,t=!0,i={})=>{let{data:a,error:n,isLoading:l,isValidating:o,mutate:d}=(0,c.Ay)(t?["mdoLocation",e.pickUpCenter]:null,()=>s(e),{...r.M,...i});return{mdoLocationData:a?.mdoLocationInfo,isLoading:l,isValidating:o,isError:n,mutate:d}};i(40544)},93958:(e,t,i)=>{i.d(t,{a:()=>s});var r=i(12115),a=i(71706),n=i(7569),l=i(7317),o=i(60714);let s=e=>{let[t,i]=(0,r.useState)(!1),{bdDeliveryLocation:s}=(0,a.B)(),{agent:d}=(0,n.f)(),c=(0,l.d)({locale:e}),{deliveryLocationModuleSettings:u,deliveryAddressModuleSettings:p,deliveryLocationConfirmationModuleSettings:m,deliveryMethodsModuleSettings:h}=(0,o.h)(),f=[u,p,m,h].filter(e=>
107void 0!==e),g=u?.properties?.[0]?.reloadPageOnDeliveryLocationManualUpdate,b=s?.zipCode||"",y=h?.properties?.[0]?.warehouseSpecificDeliveryMethodUIOverrides,x=(0,r.useCallback)(()=>{i(!0)},[]),v=(0,r.useCallback)(()=>{i(!1)},[]),S=(0,r.useCallback)(async({city:e,state:t,zipCode:i,userSelectionDeliveryMethod:r})=>{if(d)return c({kind:"BD",city:e,state:t,zipCode:i,userSelectionDeliveryMethod:r,skipReloadPage:!g})},[d,c,g]);return{agent:d,isDrawerOpen:t,openDrawer:x,closeDrawer:v,zipCode:b,moduleSettings:f,warehouseSpecificDeliveryMethodUIOverridesMap:y,handleSubmitZipCode:S}}},95468:(e,t,i)=>{i.d(t,{C:()=>g,s:()=>f});var r=i(95155),a=i(12115),n=i(27966),l=i(6e4),o=i(12158),s=i(24880),d=i(82589),c=i(21517),u=i(70422),p=i(26955);let m={requestDeselect:(e,t)=>t(),isCheckboxHidden:()=>!1},h=(0,a.createContext)(null),f=()=>(0,a.useContext)(h)??m,g=({sellableItemNumbers:e,itemNames:t,locale:i,translations:m,children:f})=>{let{items:g}=(0,d.T)(i),{onItemSelect:b}=(0,c.$)(),{trackEvent:y}=(0,u.z1)(),[x,v]=(0,a.useState)(null),S=(0,a.useMemo)(()=>new Set(e),[e]),C=(0,a.useMemo)(()=>g.filter(e=>!!(e.isSelected&&e.itemInStock)).map(e=>e.id),[g]),E=(0,a.useMemo)(()=>C.filter(e=>S.has(e)).length,[C,S]),I=(0,a.useMemo)(()=>C.filter(e=>!S.has(e)),[C,S]),T=(0,a.useCallback)((e,t)=>{S.has(e)&&E<=1&&I.length>0?v(()=>t):t()},[S,E,I]),A=(0,a.useCallback)(e=>!S.has(e)&&0===E,[S,E]),D=(0,a.useMemo)(()=>({requestDeselect:T,isCheckboxHidden:A}),[T,A]),_=(0,a.useCallback)(()=>{v(null)},[]),O=(0,a.useCallback)(()=>{x?.(),I.forEach(e=>b?.(e,!1));let e=g.filter(e=>I.includes(e.id)),t=(0,p.$o)(e);t.length>0&&y({trackedData:{cartRemove:"1",products:t.map(({pid:e,itemNumber:t})=>({pid:e,sku:t}))},doNotTrack:!1,trackType:"object"}),v(null)},[x,I,b,g,y]);return(0,r.jsxs)(h.Provider,{value:D,children:[f,(0,r.jsx)(l.a,{isOpen:null!==x,onClose:_,role:"alertdialog",uniqueId:"bundle-last-item-removal",modalTitle:m?.removelastitemtitle||"Remove Item",closeAriaLabel:m?.close||"Close",hideBackdrop:!1,scroll:"paper",sx:{zIndex:9999,"& .MuiDialogContent-root":{paddingTop:"10px"}},buttons:[{text:m?.removeitemsbutton||"Remove Items",action:O},{text:m?.cancelbutton||"Cancel",action:_}],children:(0,r.jsxs)(n.default,{sx:{display:"flex",flexDirection:"column",gap:s.Mzk},children:[(0,r.jsxs)(o.Text,{uniqueId:"bundle-last-item-removal-body",children:[m?.removelastitembody||"This item is associated with another item. If you remove it, the following items will be removed:",(0,r.jsx)(n.default,{component:"ul",sx:{margin:0},children:I.map(e=>(0,r.jsx)("li",{children:t[e]},e))})]}),(0,r.jsx)(o.Text,{bold:!0,uniqueId:"bundle-last-item-removal-confirm",children:m?.removelastitemconfirm||"Are you sure you want to remove the items?"})]})})]})}},95768:(e,t,i)=>{i.d(t,{A:()=>a,q:()=>r});let r=124,a={component:{type:"ui",identifier:"Delivery Location flyout",trackedData:["update"]},doNotTrack:!1,trackType:"navigation"}},97923:(e,t,i)=>{i.d(t,{T:()=>n});var r=i(73321),a=i(73689);let n=async(e,t,i,n=!1,l,o)=>{let{method:s="GET",required_request_parameters:d,required_request_headers:c,endpoint:u}=i,p=String(l||"CABC").toUpperCase(),m=d.client_identifier[p.toLowerCase()]||"",h=String(c?.catalog_api_client_identifier)||"",f=(p.startsWith("CA")?a.O4.CA:a.O4.US)===a.O4.CA?"894":"847",g={items:e.split(",").map(e=>e.trim()).filter(Boolean).join(","),locales:t,whsNumber:f};m&&(g.clientId=m);let b=new URLSearchParams(g),y={};h&&(y["Client-Identifier"]=h);try{console.info(`[PDP][SI][Info] - ${u}?${b}`);let t=await fetch(`${u}?${b}`,{method:s,headers:y});if(!t.ok){let i=(await t.json()).message||"No error message provided";throw Error(`Product: ${e}, StatusCode: ${t.status}, StatusText: ${t.statusText}, Error: ${i}`)}let i=await t.json();return console.info(`[PDP][SI][Info] - Product: ${e},  StatusCode: ${t.status}, Response: ${JSON.stringify(i)}`),{productSummary:i,status:t.status}}catch(l){let t=l instanceof Error?l.message:String(l),i=l instanceof Error?l.stack:void 0,a=l?.digest;console.error("- Product: %s, triggerNotFoundOnError: %s, Error: %s, Details: %s",e,String(n),t,JSON.stringify({error:t,digest:a,stack:i})),n&&(0,r.notFound)()}}},98216:(e,t,i)=>{i.d(t,{$E:()=>h,D4:()=>u,Dw:()=>c,PB:()=>g,RA:()=>p,_h:()=>m,qk:()=>s,wT:()=>f,xo:()=>d});var r=i(24880);i(73689);var a=i(19359),n=i(29496),l=i(71645),o=i(7025);let s=(e,t="en-us")=>{let i=new Date(e),r=(0,a.R_)(t,"hyphen")||"en-US";return i.toLocaleDateString(r,{weekday:"short",month:"short",day:"numeric"})},d=(e,t=o.aS.DELIVERY)=>({BACKORDERED:{color:r.oBd,text:e?.backordered||""},INSTOCK:{color:r.Kl5,text:(t===o.aS.WAREHOUSE?e?.instock:e?.available)||""},LOWSTOCK:{color:r.oBd,text:e?.lowstock||""},NOSTOCK:{color:r.oBd,text:e?.outofstock||""},PRESELL:{color:r.Kl5,text:e?.presell||""}
107,SHIPRESTRICTED:{color:r.BO,text:e?.unavailable||""},UNAVAILABLE:{color:r.BO,text:e?.unavailable||""},NOTSOLD:{color:r.BO,text:e?.notsoldinthiswarehouse||""},UNKNOWN:{color:r.BO,text:e?.unavailable||""}}),c=(e,t)=>{let{descriptions:i}=e||{},{shortDescription:r}=i?.[0]?.object||{};return{description:r??"",src:t,srcFallback:l.IX,title:r??"",titleFallback:l.o9}},u=(e,t)=>{switch(e?.plainPackaging){case 0:return t?.plainpackagingdesc1??"";case 1:return t?.plainpackagingdesc2??"";case 3:return t?.plainpackagingdesc3??"";default:return""}},p=(e,t)=>e.filter(e=>t.some(t=>void 0!==e[t]&&null!==e[t]&&""!==e[t])),m=(e,t,i)=>!!(e&&t?.has(e)&&i?.has(e)),h=({productFlags:e,featureFlags:t,warehouseFlags:i})=>{let{isWioProduct:r,isBopiwProduct:a}=e,{isWioEnabled:n,isBopiwOrSTWEnabled:l}=t,{isWarehouseBopiwEnabled:o,isWarehouseWioEnabled:s}=i;if(!r&&!a)return!0;let d=!!(l&&o),c=!!(n&&s);return a&&r?d||c:r?c:!!a&&d},f=(e,t)=>{if(!(e in n.mW))return"Unknown";let i=(0,a.gI)(t),r={CA:{[o.Oi.TWO_DAY_DELIVERY]:"Costco Grocery Delivery"}},l=r[i]?.[e];return l||n.mW[e]},g=({rawData:e,shippingInfo:t,deliveryStatement:i})=>{if(e.aux1&&e.aux1.match("Tooltip")){let i=b(e.aux1,t);return(i=(i=(i=i.replaceAll("aria-label","ariaLabel")).replaceAll("tooltip","Tooltip")).replaceAll("*","\\*")).replace("&quot;&gt;","")}return"email"===e.template&&i?i.replaceAll("eDelivery","").replace(/\s+/g," "):e?.aux1??""},b=(e,t)=>{if("u"<typeof document)return"";let i=[...e.matchAll(/<Tooltip\s+content="(.*?)"><\/Tooltip>/gs)].map(e=>e[1]),r=new DOMParser().parseFromString(e,"text/html");return r.querySelectorAll("Tooltip").forEach((e,r)=>{let a=t.replace(/\*/g,"").replace(/\s+/g," ").trim(),n=`${a} info ${r+1}`.replace(/\\/g,"");e.setAttribute("aria-label",n),e.setAttribute("id",`fulfillment-deliveryInfo-secondary-info-${r+1}`);let l=i[r]||"";!(l=l.replaceAll(/<br\s*\/?>/gi,"  \n")).includes("<li>")||l.includes("<ul>")||l.includes("<ol>")||(l=l.replace(/(<li>.*?\<\/li>)+/gs,e=>`<ul>${e}</ul>`)),e.setAttribute("content",l)}),r?.body?r.body.innerHTML:""}},99899:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(95155);i(12115);var a=i(12129),n=i(92226),l=i(34291);let o=({children:e,testId:t})=>{let{isMobile:i}=(0,l.A)();return(0,r.jsx)(a.default,{size:{xs:12},children:(0,r.jsx)(n.l,{cornerStyle:i?"square":"rounded","data-testid":t||"scaffolding-card",children:e})})}}}]);

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.