1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[96704],{13175:(e,a,t)=>{t.d(a,{A:()=>h});var r=t(83805),n=t(54568),l=t(7620),o=t(1965),i=t(86620),d=t(27144),s=t(36033),c=t(84887),u=t(51788),m=t(76806),p=t(75426),v=t(91137),g=(0,p.default)(s.default,(0,v.w)("slideWidth","slideWidthMD"))(e=>{var{slideWidth:a,slideWidthMD:t,theme:r}=e;return{transform:"translate3d(0, 0, 0)",flex:"0 0 ".concat(a),minWidth:0,[r.breakpoints.up("md")]:t?{flex:"0 0 ".concat(t)}:{}}});let h=e=>{var{children:a,emblaSliderData:t,disclaimerComponent:p,slides:v=[],options:h={},alwaysShowArrows:f=!1,dataTestId:x,initialIndex:b,onNext:_,onPrev:C,onDotClick:y,afterChange:j,onUserSwipe:w,sx:A}=e,{slideWidth:S,slideWidthMD:k,slideSx:I,spacing:D=0,leftSpacing:R,centered:P,overflow:M="hidden",arrows:T,dots:E,slidePagesCount:z}=h,B=(0,r._)(h,["slideWidth","slideWidthMD","slideSx","spacing","leftSpacing","centered","overflow","arrows","dots","slidePagesCount"]),L=(0,o.A)(B),[W,O]=t||L,[V,F]=(0,l.useState)(null!=b?b:0),[U,N]=(0,l.useState)(!1),{generalBorderRadius:q,spacing:Z,isDreamCloud:H}=(0,c.d)(),{offset:K,flexCentered:G,useDefaultLeftOffset:$}="object"==typeof P?P:{},{prevArrow:J,nextArrow:Q,topPlacement:Y="46%",sidePlacement:X="6%",iconColor:ee=H?"secondary.main":"general.white",backgroundColor:ea=H?"general.info":"primary.main",outsideParent:et=!1}="object"==typeof T?T:{},er="object"==typeof E?E:{},{px:en="",sx:el,size:eo,spacing:ei,dotStyles:ed={color:"secondary.light",activeColor:"primary.main"}}=er,es=(null==er?void 0:er.variant)==="dotted",{borderRadius:ec=es?"50%":q,border:eu,color:em,activeColor:ep}=ed||{},ev=z||v.length||0,eg=!(null==O?void 0:O.canScrollPrev()),eh=!B.loop&&V===ev-1,ef="string"==typeof D?D:Z(D),ex="calc(".concat(R||ef," * -1)");(0,l.useEffect)(()=>{O&&(F(null!=b?b:0),O.scrollTo(null!=b?b:0,!0))},[O,v.length,b]),(0,l.useEffect)(()=>{if(O){var e=()=>{var e=O.selectedScrollSnap();F(e),null==j||j(e),U&&(null==w||w()),N(!1)};return O.on("pointerDown",()=>N(!0)),O.on("select",e),()=>{O.off("select",e)}}},[O,U]);var eb=()=>{O&&(null==C||C(O.selectedScrollSnap()),null==O||O.scrollPrev())},e_=()=>{O&&(null==_||_(O.selectedScrollSnap()),O.scrollNext())},eC=Array.from({length:ev}),ey=T&&(0,n.jsxs)(n.Fragment,{children:[(!eg||f)&&(J?(0,n.jsx)(s.default,{onMouseDown:eb,children:J}):(0,n.jsx)(m.l,{background:ea,arrowIcon:(0,n.jsx)(i.A,{sx:{color:ee}}),onMouseDown:eb,sx:{left:X,top:Y,zIndex:2}})),(!eh||f)&&(Q?(0,n.jsx)(s.default,{onMouseDown:e_,children:Q}):(0,n.jsx)(m.l,{background:ea,arrowIcon:(0,n.jsx)(d.A,{sx:{color:ee}}),onMouseDown:e_,sx:{right:X,top:Y,zIndex:2}}))]});return(0,n.jsxs)(n.Fragment,{children:[et&&ey,(0,n.jsxs)(s.default,{"data-testid":x,sx:[{position:"relative",margin:"auto"},...Array.isArray(A)?A:[A]],children:[!et&&ey,(0,n.jsx)(s.default,{ref:W,sx:{marginLeft:P&&!$?K||{md:"-400px"}:ex,overflow:M},children:(0,n.jsx)(s.default,{sx:{display:"flex",justifyContent:G?"center":"left"},children:a||v.map((e,a)=>(0,n.jsx)(g,{slideWidth:S,slideWidthMD:k,sx:[{pl:ef},...Array.isArray(I)?I:[I]],children:e},a))})}),p,E&&(0,n.jsx)(u.default,{direction:"row",spacing:"number"==typeof ei?ei:es?4:1,sx:[{justifyContent:"center",mt:6,px:en},...Array.isArray(el)?el:[el]],children:eC.map((e,a)=>(0,n.jsx)(s.default,{"data-testid":"data-dots",onClick:()=>{null==y||y(a),null==O||O.scrollTo(a)},sx:{bgcolor:V===a?ep:em,borderRadius:ec,border:eu,height:eo||(es?8:4),width:eo||(es?8:"".concat(100/v.length,"%"))}},a))})]})]})}},18155:(e,a,t)=>{t.d(a,{gb:()=>h,mZ:()=>g,q2:()=>b,q3:()=>v,rD:()=>f,tT:()=>x});var r=t(28322),n=t(46093),l=t(75426),o=t(74779),i=t(143),d=t(46613),s=t(71688),c=t(96717),u=t(91137),m=t(18197),p=t(60951),v=(0,l.default)(i.A,{shouldForwardProp:e=>!["dotSize","withoutSpacing"].includes(e)})(e=>{var{theme:a,dotSize:t,withoutSpacing:l}=e,o={default:{margin:l?0:"small"===t?a.spacing(0,6):a.spacing(0,8)}},i=(0,c.qr)(o,a.name);return(0,n._)((0,r._)({},i),{marginBottom:a.spacing(2),"& .MuiTypography-root":{marginTop:a.spacing(1)}})}),g=(0,l.default)(o.A,{shouldForwardProp:e=>"dotSize"!==e})(e=>{var{theme:a}=e,t={default:{margin:a.spacing(0)}},l=(0,c.qr)(t,a.name);return(0,n._)((0,r._)({},l),{".Mui-disabled":{"& .MuiTypography-root":{color:a.palette.general.disabled}}})}),h=(0,l.default)(s.A,(0,u.w)("dotSize","withoutSpacing","spacing"))(e=>{var{theme:a,dotSize:t,withoutSpacing:l,spacing:o}=e,i={default:{margin:a.spacing(0),gap:o?a.spacing(o):"small"===t||l?a.spacing(3):a.spacing(6),al
1ignItems:"center"}},d=(0,c.qr)(i,a.name);return(0,n._)((0,r._)({},d),{"& .MuiTypography-root":{marginTop:a.spacing(1)}})}),f=(0,l.default)(d.A,(0,u.w)("dotSize","isOOS"))(e=>{var{theme:a,dotSize:t,checked:l,isOOS:o}=e,i={[p.g.AWARA]:{border:l?"2px ".concat(o?"dashed":"solid"," ").concat(a.palette.primary.main):"1px ".concat(o?"dashed":"solid"," ").concat(a.palette.general.disabled)},default:{border:l?"2px ".concat(o?"dashed":"solid"," ").concat(a.palette.primary.main):"1px ".concat(o?"dashed":"solid"," ").concat(a.palette.secondary.light)}},d=(0,c.qr)(i,a.name),s={small:24,medium:32,large:40}[t||"small"];return(0,n._)((0,r._)({width:s,height:s,padding:l||o?2:0},d),{"&.Mui-disabled":{border:"1px dashed ".concat(a.palette.general.disabled),padding:3},"&.Mui-disabled.Mui-checked":{border:"2px dashed ".concat(a.palette.primary.main),padding:2}})}),x=(0,l.default)("div")(e=>{var{color:a}=e;return{width:"100%",height:"100%",borderRadius:"100%",backgroundColor:a}}),b=(0,l.default)(m.A)(()=>({width:"100%",height:"100%",borderRadius:"100%"}))},18197:(e,a,t)=>{t.d(a,{A:()=>s});var r=t(28322),n=t(83805),l=t(54568),o=t(32536),i=t(36033),d=t(21355);let s=e=>{var{src:a,style:t,dataTestId:s,localImage:c,format:u,responsive:m,aspectRatio:p,noSizingWrapper:v,sizeWrapStyles:g,noOptimize:h,position:f}=e,x=(0,n._)(e,["src","style","dataTestId","localImage","format","responsive","aspectRatio","noSizingWrapper","sizeWrapStyles","noOptimize","position"]);m&&(t=(0,r._)({height:"auto"},t));var b=!x.height&&!x.width,_=(0,l.jsx)(o.default,(0,r._)({src:c?a:d.A.imageUrl(a,x.width,u,h),fill:b,sizes:"(max-width: 768px) 100vw, 50vw",style:t,"data-testid":s},x)),C=(null==p?void 0:p.includes("%"))?p:(e=>{if(!e||!e.includes("/"))return"100%";var[a,t]=e.split("/"),r=Number(t)/Number(a)*100;return"".concat(r,"%")})(p);return b&&!v?(0,l.jsx)(i.default,{sx:[{position:f||"relative",width:"100%",pt:C},...Array.isArray(g)?g:[g]],children:_}):_}},39797:(e,a,t)=>{t.d(a,{P:()=>s,default:()=>c});var r=t(7620),n=t(28322),l=t(46093),o=t(46848),i=()=>({resetStore:()=>{}}),d=e=>
1(0,o.y)("componentsDataStore",a=>(0,l._)((0,n._)({},i(),e||{}),{resetStore:()=>{a(i(),!1,"resetStore")}})),s=d();let c=function(e){var a=(0,r.useRef)(!1);return a.current||(s=d(e),a.current=!0),null}},41374:(e,a,t)=>{t.d(a,{i:()=>r,p:()=>n});var r={black:"#000000",natural:"#EAE5D9",twoTone:"#EAE5D9",walnut:"#756255",blackAndWhite:"#756255",golden:"#F4B14C",grey:"#808080",gray:"#808080",taupe:"#DAD1C8",cream:"#E8DFC8",linen:"#B9AB9A",flax:"#E6E2DA",slate:"#D9DBE5",navy:"#193077",blue:"#133EBF",tan:"#D2B48C",lightoakupholstered:"#C4A882",walnutupholstered:"#7A4F3A",matteblack:"#1A1A1A",white:"#F5F5F5"},n={natural:"nectarsleep/bed-frames/bamboo/bambbo_color_natural.jpg",Natural:"nectarsleep/bed-frames/bamboo/bambbo_color_natural.jpg",twoTone:"nectarsleep/bed-frames/bamboo/bambbo_color_natural.jpg",walnut:"nectarsleep/bed-frames/bamboo/bamboo_color_walnut.jpg",blackAndWhite:"nectarsleep/bed-frames/bamboo/bamboo_color_walnut.jpg",green:"mui/nectar/bed-frames/Cielden/Cielden_Frame_Color_Green_Thumb.jpg",black:"mui/nectar/bed-frames/Cielden/Cielden_Frame_Color_Black_Thumb.jpg",lightOak:"mui/nectar/bed-frames/cadmori/LightOak.jpg","Light Oak Upholstered":"mui/nectar/bed-frames/cadmori/LightOak_Upholstered.jpg","light oak upholstered":"mui/nectar/bed-frames/cadmori/LightOak_Upholstered.jpg",lightoak:"mui/nectar/bed-frames/cadmori/LightOak_Upholstered.jpg",lightoakupholstered:"mui/nectar/bed-frames/cadmori/LightOak_Upholstered.jpg",walnutupholstered:"mui/nectar/bed-frames/cadmori/Walnut_Upholstered.jpg",matteblack:"mui/nectar/bed-frames/cadmori/Hudson_Frame_Color_MatteBlack_Thumb.jpg","Walnut Upholstered":"mui/nectar/bed-frames/cadmori/Walnut_Upholstered.jpg","walnut upholstered":"mui/nectar/bed-frames/cadmori/Walnut_Upholstered.jpg"}},49668:(e,a,t)=>{t.d(a,{A:()=>l});var r=t(7620),n=t(59914);let l=e=>{var{addFiltersToPath:a}=e||{};return{getPathByCartItem:(0,r.useCallback)((e,t)=>(0,n.dg)(e,t,{addFiltersToPath:a}),[a])}}},53922:(e,a,t)=>{t.d(a,{Z:()=>d});var r=t(28322),n=t(46093),l=t(41374),o=t(77218),i=t(56605),d=(e,a,t)=>{if(t&&e)return t.map(t=>{var d=(0,i.u)(e,(0,n._)((0,r._)({},a),{Color:{value:t.value}})),s=(0,o.Wg)(e,d),c=(0,o.jg)(e,d);return{name:"",value:t.value,color:l.i[t.value]||t.value,disabled:!s||!c,title:t.title||""}})}},56528:(e,a,t)=>{t.d(a,{A:()=>m});var r=t(54568),n=t(62756),l=t(96679),o=t(28322),i=t(75426),d=t(96717),s=t(51788),c=t(60951),u=(0,i.default)(s.default)(e=>{var{theme:a}=e,t={[c.g.NECTAR]:{background:a.palette.primary.light,color:a.palette.secondary.heavy,borderRadius:a.generalBorderRadiusMini},[c.g.DREAMCLOUD]:{background:a.palette.secondary.light,color:a.palette.primary.main,borderRadius:a.generalBorderRadiusMini},[c.g.AWARA]:{background:a.palette.secondary.light,color:a.palette.primary.main,borderRadius:a.generalBorderRadius,alignSelf:"start"}},r=(0,d.qr)(t,a.name);return(0,o._)({height:"20px",justifyContent:"center",textTransform:"none",padding:a.spacing(0,2),alignItems:"center",flexDirection:"row"},r)});let m=e=>{var{totalValue:a,showInfoIcon:t,containerSx:o,colorProps:i,withBrackets:d,iconSize:s,onInfoIconClick:c}=e;return(0,r.jsxs)(u,{sx:[{minWidth:"fit-content",alignSelf:"center"},...Array.isArray(o)?o:[o]],children:[(0,r.jsxs)(n.default,{variant:(null==i?void 0:i.total.variant)||"overlineBold",sx:{letterSpacing:0,textTransform:"none"},children:[d&&"(","Total Value"," $",a,d&&")"]}),t&&(0,r.jsx)(l.A,{onInfoIconClick:c,"data-testid":"total-value-info-icon",iconSize:s})]})}},60609:(e,a,t)=>{t.d(a,{r:()=>n});var r=t(98790),n=e=>(0,r.Vk)(a=>{var t,r;return null!=(r=null==(t=a.experiments)?void 0:t[e])&&r})},61258:(e,a,t)=>{t.d(a,{F:()=>m,A:()=>p});var r=t(28322),n=t(54568),l=t(46093),o=t(75426),i=t(71200),d=t(96717),s=t(91137),c=t(60951),u=(0,o.default)(i.A,(0,s.w)("typographyVariant","backgroundColor"))(e=>{var{theme:a,size:t,color:n,variant:o,typographyVariant:i,textColor:s,backgroundColor:u}=e,m={[c.g.AWARA]:{borderRadius:a.generalBorderRadius},default:{}},p=(0,d.qr)(m,a.name),v=(()=>{switch(t){case"extraSmall":return{minHeight:18,padding:a.spacing(0,1.5),fontSize:10};case"small":return{minHeight:24,padding:a.spacing(0,2),fontSize:10};case"medium":return{minHeight:28,padding:a.spacing(0,3),fontSize:12};case"large":return{minHeight:32,padding:a.spacing(1,4),fontSize:14};default:return{}}})(),g=(()=>
1{if(s||u)return{color:s,backgroundColor:u};if(!n||o&&"standard"!==o)return{};var e=a.palette[n];return(null==e?void 0:e.main)&&(null==e?void 0:e.light)?{background:e.light,color:e.main}:{}})();return(0,r._)((0,l._)((0,r._)({borderRadius:a.generalBorderRadiusMini,fontWeight:600,minWidth:"fit-content",alignItems:"center"},v,g),{"& .MuiAlert-message":(0,r._)({padding:0,display:"flex",alignItems:"center",overflow:"visible",height:"min-content"},i&&"inherit"!==i&&a.typography[i])}),p)}),m=e=>(0,n.jsx)(u,(0,r._)({icon:!1,severity:"info"},e));let p=m},67400:(e,a,t)=>{t.d(a,{A:()=>d,E:()=>i});var r=t(28322),n=t(46093),l=t(54568),o=t(66765),i=e=>(0,l.jsx)(o.A,(0,n._)((0,r._)({variant:"rounded"},e),{sx:(0,r._)({bgcolor:"secondary.light",maxWidth:"100%"},null==e?void 0:e.sx)}));let d=i},70904:(e,a,t)=>{t.d(a,{m:()=>d});var r=t(28322),n=t(54568),l=t(84887),o=t(19675),i=t(51788),d=e=>{var{color:a,width:t=14,height:d=14,sx:s,onClick:c}=e,{palette:u}=(0,l.d)(),m=(0,o.A)(u,u.general.disabled,a);return(0,n.jsx)(i.default,{onClick:c,sx:(0,r._)({height:20,width:20,alignItems:"center",justifyContent:"center",cursor:c?"pointer":"default"},s),children:(0,n.jsx)("svg",{width:t,height:d,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"info-icon",children:(0,n.jsx)("path",{d:"M6.37467 10.3335H7.62467V6.16683H6.37467V10.3335ZM6.99601 4.91683C7.17206 4.91683 7.32085 4.85729 7.44238 4.7382C7.56391 4.6191 7.62467 4.47153 7.62467 4.29549C7.62467 4.11944 7.56513 3.97065 7.44605 3.84912C7.32695 3.72759 7.17938 3.66683 7.00334 3.66683C6.82728 3.66683 6.67849 3.72637 6.55697 3.84546C6.43544 3.96456 6.37467 4.11212 6.37467 4.28817C6.37467 4.46422 6.43422 4.61301 6.5533 4.73454C6.6724 4.85607 6.81997 4.91683 6.99601 4.91683ZM7.00447 13.6668C6.08692 13.6668 5.22305 13.4932 4.41287 13.146C3.60268 12.7988 2.89377 12.3213 2.28613 11.7137C1.67849 11.1061 1.20106 10.3974 0.853841 9.5877C0.506619 8.77799 0.333008 7.91282 0.333008 6.99221C0.333008 6.07159 0.506619 5.20907 0.853841 4.40468C1.20106 3.60028 1.67849 2.89426 2.28613 2.28662C2.89377 1.67898 3.60244 1.20155 4.41214 0.854329C5.22185 0.507107 6.08701 0.333496 7.00763 0.333496C7.92825 0.333496 8.79076 0.507107 9.59516 0.854329C10.3996 1.20155 11.1056 1.67898 11.7132 2.28662C12.3209 2.89426 12.7983 3.60157 13.1455 4.40857C13.4927 5.21557 13.6663 6.07784 13.6663 6.99537C13.6663 7.91292 13.4927 8.77678 13.1455 9.58697C12.7983 10.3972 12.3209 11.1061 11.7132 11.7137C11.1056 12.3213 10.3983 12.7988 9.59127 13.146C8.78427 13.4932 7.922 13.6668 7.00447 13.6668Z",fill:m})})})}},76806:(e,a,t)=>{t.d(a,{l:()=>m});var r=t(28322),n=t(46093),l=t(54568);t(7620);var o=t(75426),i=t(93443),d=t(19675),s=t(96717),c=t(91137),u=t(60951),m=e=>(0,l.jsx)(p,(0,n._)((0,r._)({},e),{children:e.arrowIcon})),p=(0,o.default)(i.A,(0,c.w)("currentSlide","slideCount","arrowIcon"))(e=>{var{theme:a,background:t}=e,r={[u.g.NECTAR]:a.palette.primary.main,[u.g.DREAMCLOUD]:a.palette.secondary.light},n=(0,d.A)(a.palette,(0,s.qr)(r,a.name)||"",t);return{position:"absolute",boxShadow:"0px 1px 4px 0px rgba(0, 0, 0, 0.24)",background:n,"&:hover":{background:n}}})},78979:(e,a,t)=>{t.d(a,{A:()=>b});var r=t(54568),n=t(7620),l=t(22738),o=t(73647),i=t(50639),d=t(84887),s=t(39928),c=t(96717),u=t(62756),m=t(67400),p=t(51788);let v=()=>(0,r.jsxs)(p.default,{spacing:3,sx:{mb:4},children:[(0,r.jsx)(m.A,{height:20,width:100}),(0,r.jsx)(m.A,{height:48})]});var g=t(98211),h=t(98790),f=t(18155),x={flexDirection:"row"};let b=e=>{var a,{label:t,value:m,colors:p,dotSize:b="small",withoutSpacing:_=!1,spacing:C,colorSelectIconMap:y,hideLabel:j,isImageColor:w,disableOutOfStock:A,onChange:S,handleNewValue:k,customProductItem:I,minimalLabel:D,showSelectedColorName:R}=e,{themeName:P}=(0,d.d)(),{selectedProperties:M,productItem:T,selectedProductItems:E}=(0,i.l)(),{bedframe:z}=E||{},B=(0,n.useRef)(""),L=(0,n.useCallback)(e=>{var a=e.target.value;k?k(a):(0,h.W9)(()=>{(0,h.jg)({propertyName:"Color",propertyValue:a}),(0,g.addToDataLayer)({event:"userInteraction",element_id:"main_pdp",event_name:"product_variant_change",previous_value:m,new_value:a,varient_type:"C
1olor"})})},[k,m]),W=(0,n.useCallback)(e=>{if(e)return(0,c.qr)({default:(0,r.jsx)(u.default,{variant:"captionRegular",sx:{color:"secondary.main"},children:(0,o.eu)(e)})},P)},[P]);if(!(null==p?void 0:p.length))return(0,r.jsx)(v,{});var O=null==(a=p.find(e=>{var{value:a}=e;return a===m}))?void 0:a.title;return(0,r.jsxs)(l.A,{children:[t&&!D&&(0,r.jsx)(f.q3,{withoutSpacing:_,color:"secondary",children:t}),t&&D&&(0,r.jsxs)(u.default,{variant:"body3bold",color:"secondary",sx:{mb:3},children:[t,(0,r.jsxs)(u.default,{variant:"body3regular",color:"secondary",component:"span",children:["\xa0",R?(0,o.eu)(O):""]})]}),(0,r.jsxs)(f.gb,{value:m,dotSize:b,onChange:S,withoutSpacing:_,spacing:C,sx:x,"data-testid":"color_selector_section",children:[p.map(e=>{var{name:a,value:t,color:n,disabled:l,isImage:o}=e;if(!(0,s._)({selectedProperties:M,productItem:I||z||T,color:t}))return null;var i=t===m,d="small"===b||j?void 0:a||t,c=n||y&&y[t]||t;return i&&(B.current=m),(0,r.jsx)(f.mZ,{"data-testid":"add_to_cart_property_selector_".concat(t,"_selected"),value:t,id:"color-picker",labelPlacement:"bottom",dotSize:b,control:(0,r.jsx)(f.rD,{dotSize:b,checked:i,icon:w&&o?(0,r.jsx)(f.q2,{src:n,alt:"".concat(t," color option")}):(0,r.jsx)(f.tT,{color:c}),checkedIcon:w&&o?(0,r.jsx)(f.q2,{src:n,alt:"".concat(t," color option")}):(0,r.jsx)(f.tT,{checked:!0,color:c}),isOOS:l,disabled:A&&l}),onChange:L,label:W(d)},t)}).filter(Boolean),W("small"!==b||j?void 0:"| ".concat(B.current))]})]})}},79231:(e,a,t)=>{t.d(a,{P:()=>s});var r=t(46939),n=t(7620),l=t(39797),o=()=>l.P.getState(),i=t(84887);function d(e,a){return t(14266)("./".concat(e,".nectar").concat(a))}function s(e){var{isMobileScreen:a,themeName:t}=(0,i.d)(),l=t.toLowerCase(),s=e?((e,a,t)=>{var r=o(),n="".concat(e,".").concat(t.toLowerCase()).concat(a?".mobile":"");if(r[n])return r[n];var l="".concat(e,".").concat(t.toLowerCase());if(r[l])return r[l]}
1)(e,a,l):void 0,[c,u]=(0,n.useState)(s),[m,p]=(0,n.useState)(!s);return((0,n.useEffect)(()=>{(0,r._)(function*(){var t=o();try{var r="".concat(e,".").concat(l.toLowerCase()).concat(a?".mobile":"");if(t[r])u(t[r]);else{var{data:n}=yield d(e,a?".mobile":"");u(n)}}catch(a){try{var i="".concat(e,".").concat(l.toLowerCase());if(t[i])u(t[i]);else{var{data:s}=yield d(e,"");u(s)}}catch(e){u(void 0)}}finally{p(!1)}})()},[e,l,a]),e)?{componentData:c,isLoading:m}:{componentData:void 0,isLoading:!1}}},91152:(e,a,t)=>{t.d(a,{V:()=>l});var r=t(75426),n=t(51788),l=(0,r.default)(n.default)(e=>{var{theme:a}=e;return{borderRadius:a.generalBorderRadius,width:"100%",aspectRatio:"4/3",position:"relative",overflow:"hidden",img:{objectFit:"cover"}}})},92917:(e,a,t)=>{t.d(a,{R:()=>o});var r=t(54568),n=t(84887),l=t(19675),o=e=>{var{color:a,onClick:t}=e,{palette:o}=(0,n.d)(),i=(0,l.A)(o,o.general.disabled,a);return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:t,children:[(0,r.jsx)("rect",{width:"16",height:"16"}),(0,r.jsx)("path",{d:"M7.49996 10.6667H8.49996V7.33341H7.49996V10.6667ZM7.99703 6.33341C8.13787 6.33341 8.2569 6.28578 8.35413 6.19051C8.45135 6.09523 8.49996 5.97718 8.49996 5.83635C8.49996 5.6955 8.45233 5.57647 8.35706 5.47925C8.26178 5.38203 8.14372 5.33341 8.00289 5.33341C7.86205 5.33341 7.74301 5.38105 7.64579 5.47632C7.54857 5.5716 7.49996 5.68965 7.49996 5.83048C7.49996 5.97133 7.54759 6.09036 7.64286 6.18758C7.73814 6.2848 7.8562 6.33341 7.99703 6.33341ZM8.00379 13.3334C7.26976 13.3334 6.57866 13.1945 5.93051 12.9167C5.28237 12.639 4.71524 12.257 4.22913 11.7709C3.74301 11.2848 3.36107 10.7179 3.08329 10.0701C2.80551 9.42234 2.66663 8.73021 2.66663 7.99372C2.66663 7.25722 2.80551 6.56721 3.08329 5.92369C3.36107 5.28017 3.74301 4.71536 4.22913 4.22925C4.71524 3.74314 5.28217 3.36119 5.92993 3.08341C6.5777 2.80564 7.26983 2.66675 8.00632 2.66675C8.74282 2.66675 9.43283 2.80564 10.0763 3.08341C10.7199 3.36119 11.2847 3.74314 11.7708 4.22925C12.2569 4.71536 12.6388 5.28121 12.9166 5.9268C13.1944 6.57241 13.3333 7.26222 13.3333 7.99625C13.3333 8.73029 13.1944 9.42138 12.9166 10.0695C12.6388 10.7177 12.2569 11.2848 11.7708 11.7709C11.2847 12.257 10.7188 12.639 10.0732 12.9167C9.42763 13.1945 8.73782 13.3334 8.00379 13.3334Z",fill:i})]})}},96679:(e,a,t)=>{t.d(a,{A:()=>u});var r=t(54568),n=t(93443),l=t(84887),o=t(19675),i=t(92917),d=t(70904),s=t(98211),c=t(98790);let u=e=>{var{openModal:a=!0,onInfoIconClick:t,iconSize:u=20,color:m}=e,{palette:p}=(0,l.d)(),v=(0,o.A)(p,p.general.disabled,m),g={16:(0,r.jsx)(i.R,{color:v}),20:(0,r.jsx)(d.m,{color:v})}[u];return(0,r.jsx)(n.A,{"data-testid":"total_value_icon_btn",sx:{p:0,color:v},onClick:e=>(e=>{e.preventDefault(),e.stopPropagation(),(0,s.addToDataLayer)({event:"userInteraction",element_id:"total_value",event_name:"information_popup_click",pop_up_name:"total_value_popup"}),t&&t(),a&&(0,c.OB)({isTotalValueDrawerOpen:!0})})(e),children:g})}},96704:(e,a,t)=>{t.r(a),t.d(a,{default:()=>ee});var r=t(28322),n=t(46093),l=t(54568),o=t(7620),i=t(1965),d=t(86620),s=t(27144),c=t(36033),u=t(10193),m=t(59525),p=t(87734),v=t(79231),g=t(60609),h=t(52522),f=t(25096),x=t(51327),b=t(50639),_=t(84887),C=t(86101),y=t(56605),j=t(21355),w=t(60049),A=t(86157),S=t(55438),k=t(60047),I=t(76806),D=t(13175),R=t(1922),P=t(51788),M=t(62756),T=t(71488),E=t(39548),z=t(98211),B=t(6219),L=t(76831),W=t(37728),O=t(98790),V=t(73647),F=t(49668),U=t(53922),N=t(82087),q=t(39928),Z=t(18197),H=t(41374),K=t(61258),G=t(78979),$=t(56528),J=t(43306),Q=t(50545),Y=t(91152);let X=e=>{var a,t,i,d,{product:s,customImages:u,isCategoryPage:m,isRecent:v,eventName:g,bundlePrice
1s:f,contentfulBundleProductDetails:x,label:C}=e,{isAwara:j,palette:A}=(0,_.d)(),{mainProductSize:k}=(0,b.l)(),{title:I,properties:D}=s,T=null!=(i=null==x?void 0:x.title)?i:I,E=(0,o.useMemo)(()=>{var e,a,t=null!=(a=null==D||null==(e=D.find(e=>"Size"===e.name))?void 0:e.options)?a:[],r=m?S.Nl:k,n=t.find(e=>e.value.toLowerCase()===r.toLowerCase()&&!e.outOfStock);if(n)return{value:n.value,title:n.title};var l=t.find(e=>!e.outOfStock);return l?{value:l.value}:{value:r}},[m,k,D]),B=(0,o.useMemo)(()=>null==D?void 0:D.find(e=>"Color"===e.name),[]),L=(0,o.useMemo)(()=>{var e;return null==B||null==(e=B.options)?void 0:e.filter(e=>(0,q._)({productItem:s,selectedProperties:{Size:E},color:e.value}))},[]),W=(0,o.useMemo)(()=>{var e,a;return(null==L||null==(e=L.find(e=>!e.outOfStock))?void 0:e.value)||(null==L||null==(a=L[0])?void 0:a.value)},[]),[O,X]=(0,o.useState)(W),ee=(0,h.A)(w.DARK_COVER_LUXE_ULTRA),ea=(0,o.useMemo)(()=>(0,r._)({Size:E},O&&{Color:{value:O}}),[E,O]),et=(0,y.u)(s,ea,!1),{getPathByCartItem:er}=(0,F.A)(),en=null==et?void 0:et.map(e=>"".concat(e.name.toLowerCase(),"-").concat(e.value)).join("+"),el=x?"".concat(null==x?void 0:x.slug,"/").concat(en):er(s,s.name.includes((0,J.QU)())?[{name:"Size",value:null==E?void 0:E.value}]:et),eo=null==f?void 0:f[O||"default"],{discountedPrice:ei,totalValue:ed}=eo?{discountedPrice:eo.originalPrice-eo.discountedAmount,totalValue:null!=(d=eo.totalValue)?d:null}:(0,Q.Pi)(s,ea),es=(0,o.useMemo)(()=>(0,U.Z)(s,ea,null==B?void 0:B.options),[null==B?void 0:B.options,s,ea]),ec=(0,o.useMemo)(()=>null==es?void 0:es.map(e=>(0,n._)((0,r._)({},e),{color:H.i[e.value]})),[]),eu=e=>{if(x){var a=(0,p.a)({product:s,properties:et});(0,z.addToDataLayer)({event:"userInteraction",event_name:"bundle_recommendations",element_id:"click",ecommerce:{items:[a]}})}else(0,z.addToDataLayer)({event:"userInteraction",event_name:g||"shop_more",element_id:s.name,widget:v?"Recently Viewed":void 0,click_text:e})},em=(0,N.I_)(s,et,{isRebranding:!0,color:O}),ep=(null==u?void 0:u[ee?"darkCover":""])||(null==u?void 0:u[O||"default"])||(null==(a=em[0])?void 0:a.source)||(null==(t=em[0])?void 0:t.url)||"";return(0,l.jsxs)(P.default,{"data-testid":"card_".concat(s.title),spacing:{xs:2,md:3},sx:{maxWidth:464},children:[(0,l.jsx)(R.default,{href:el,onClick:()=>eu("Product Image"),children:(0,l.jsxs)(Y.V,{children:[v&&(0,l.jsx)(c.default,{sx:{position:"absolute",top:12,left:12,zIndex:1},children:(0,l.jsx)(K.A,{size:"medium",sx:{backgroundColor:A.product.tertiary},children:(0,l.jsx)(M.default,{variant:"captionBold",sx:{color:"general.white"},children:"RECENTLY VIEWED"})})}),C&&(0,l.jsx)(c.default,{sx:{position:"absolute",top:12,left:12,zIndex:1},children:(0,l.jsx)(K.A,{size:"medium",sx:{backgroundColor:C.backgroundColor},children:(0,l.jsx)(M.default,{color:C.textColor,variant:"captionBold",children:C.labelText})})}),(0,l.jsx)(Z.A,{src:ep||"",alt:T,noSizingWrapper:!0,loading:"lazy"})]})}),(0,l.jsxs)(P.default,{spacing:1,children:[(0,l.jsx)(R.default,{"data-testid":"product_title",href:el,onClick:()=>eu("Product Title or Price"),textDecoration:"none",children:(0,l.jsx)(M.default,{variant:{xs:"h5",md:"h4"},component:"h3",sx:{color:"secondary.main"},children:T})}),(0,l.jsxs)(P.default,{direction:"row",spacing:2,sx:{alignItems:"center",pb:{md:1}},children:[(0,l.jsxs)(M.default,{"data-testid":"product_discounted_price",variant:{xs:"body3bold",md:"body2bold"},sx:{color:"secondary.main"},children:[j?"Starting at ":m?"From ":"","$",(0,V.ZV)(ei,!0)]}),ed&&(0,l.jsx)($.A,{totalValue:ed,showInfoIcon:!0})]})]}),ec&&ec.length>1&&(0,l.jsx)(G.A,{value:O||"",colors:ec,dotSize:"medium",handleNewValue:e=>{(0,z.addToDataLayer)({event:"userInteraction",event_name:"product_variant_change",element_id:g||"shop_more",new_value:e,previous_value:O,varient_type:"Color"}),X(e)},withoutSpacing:!0,hideLabel:!0,customProductItem:s}),x&&(null==E?void 0:E.title)&&(0,l.jsxs)(M.default,{variant:"body3regular",color:"secondary.heavy",children:["Size: ",E.title]})]})},ee=e=>{var a,{title:t,subtitle:V,productNames:F,contentfulProductItems:U,viewAllLink:N,centeredTitle:q,backgroundColor:Z,recentProductsSkus:H,eventName:K,isBedframesUpdated:G}=e,{componentData:$}=(0,v.P)("ShopProductsCarousel"),{customImages:J}=$||{},{isMediumScreen:Q,isAwara:Y}=(0,_.d)(),{productName:ee,mainProductSize:ea}=(0,b.l)(),{isBundlePdp:et,isCategoryPage:er}=(0,O.Vk)(e=>({isCategoryPage:e.isCategoryPage,isBundlePdp:e.isBundlePdp})),{selectedProperties:en}=(0,O.Vk)(e=>({selectedProperties:e.selectedProperties})),[el,eo]=(0,o.useState)(0),ei=(0,i.A)(),[,ed]=ei,[es,ec]=(0,o.useState)(!1),[eu,em]=(0,o.useState)(!1),ep=(null==en||null==(a=en.Size)?void 0:a.value)||(0,T.Ri)("user-size-selection")||S.ps,ev=(0,o.useRef)(null),eg=(0,x.A)({ref:ev}),eh=(0,o.useRef)({isRecentCarouselImpression:!1,isBundleCarouselImpression:!1}),[ef,ex]=(0,o.useState)([]),eb="recently_viewed_carousel"===K||"bed_frame_recommendations_carousel"===K,{metadata:e_={}}=(0,B.mp)(w.TRUEMED_WIDGET_MAPPING)||{},eC=Object.keys(e_),ey=(0,g.r)(w.REMOVE_MF),ej=(0,h.A)(w.REMOVE_MF),ew=ey||ej,eA=null==F?void 0:F.filter(e=>eC.includes(e)||Y||eb),eS=(0,o.useMemo)(()=>{var e=(null==U?void 0:U.map(e=>(0,m.hB)(e).name))||eA;return ew?null==e?void 0:e.filter(e=>!A.bP4.includes(e)):e},[JSON.stringify(U),JSON.stringify(eA),ew]),ek=null==U?void 0:U.some(e=>"Bundle"===e.productType),eI=null==eS?void 0:eS.find(e=>(0,L.pb)(e)),eD=null==eS?void 0:eS.find(e=>(0,L.Y5)(e)),[eR,eP]=(0,o.useState)([]),[eM,eT]=(0,o.useState)({}),[eE]=(0,f.A)("/"),ez=e=>{if(!e||0===e.length)return[];var a={Size:{value:ea}};return e.map(e=>{var t=(0,y.u)(e,a,!1);return(0,p.a)({product:e,properties:t})})};if((0,o.useEffect)(()=>
1{if(ed){var e=()=>{ec(ed.canScrollPrev()),em(ed.canScrollNext())};return e(),ed.on("select",e),ed.on("reInit",e),()=>{ed.off("select",e),ed.off("reInit",e)}}},[ed,eR.length]),(0,o.useEffect)(()=>{if(eb&&eg&&!eh.current.isRecentCarouselImpression){eh.current.isRecentCarouselImpression=!0;var e=ez(eW.slice(el,el+eL)),a=[];e.forEach(e=>{a.push(e.item_id),(0,z.addToDataLayer)({event:"nonInteraction",element_id:"impression",event_name:K||"recently_viewed_carousel",ecommerce:{items:[e]}})}),ex(e=>[...e,...a])}},[eb,eg]),(0,o.useEffect)(()=>{if(ek&&0!==eR.length&&!eh.current.isBundleCarouselImpression){var e=ez(eW);0!==e.length&&(eh.current.isBundleCarouselImpression=!0,(0,z.addToDataLayer)({event:"nonInteraction",element_id:"impression",event_name:"bundle_recommendations",ecommerce:{items:e}}))}},[ek,eR]),(0,o.useEffect)(()=>{var e,a=(0,E.uF)(),t={productItems:[...eS,...eI?[(0,L.QU)()]:[]],couponCode:a},l=null!=(e=null==U?void 0:U.filter(e=>"Bundle"===e.productType))?e:[];Promise.all([(0,u._c)(t),l.length>0?(0,C.Ev)(l,[ep]):Promise.resolve({})]).then(e=>{var[a,t]=e;if(eI||eD)for(var o of a.productItems)(0,L.pb)(o.name)&&(o.mediaCollection[0].url="".concat(j.A.imageUrl("nectarsleep/serenity-bundle/images/ser-bundle-gal-1.png")));var i=new Map(l.map(e=>[(0,m.hB)(e).name,e]));eP(a.productItems.map(e=>(0,n._)((0,r._)({},e),{contentfulProductDetails:i.get(e.name)})));var d={};for(var[s,c]of Object.entries(t)){var u=s.replace(/_bundle$/,""),p=ep?null==c?void 0:c[ep]:Object.values(c||{})[0];p&&(d[u]=p)}eT(d)})},[null==eS?void 0:eS.join(","),eI,ea,eE,eD,ep]),0===eR.length||(null==eA?void 0:eA.length)<3&&!eb)return null;var eB=eR.filter(e=>e.contentfulProductDetails?!!eM[e.name]:!!(er||(0,L.pb)(e.name))||(0,W.p6)(e,ea)).filter(e=>{var{name:a}=e;return!!er||a!==ee||et}).sort((e,a)=>{var t=null==H?void 0:H.some(a=>a.includes(e.inventoryKey)),r=null==H?void 0:H.some(e=>e.includes(a.inventoryKey));return t&&!r?-1:!t&&r?1:0}),eL=1,eW=eb||er||ek?eB:eR;if(eb&&0===eW.length)return null;var eO=Q?"2%":"3%",eV=Q&&es?(0,l.jsx)(I.l,{background:"general.white",arrowIcon:(0,l.jsx)(d.A,{sx:{color:"primary.main"}}),sx:{left:eO,top:"33%",zIndex:2}}):(0,l.jsx)(c.default,{sx:{display:"none"}}),eF=Q&&eu?(0,l.jsx)(I.l,{background:"general.white",arrowIcon:(0,l.jsx)(s.A,{sx:{color:"primary.main"}}),sx:{right:eO,top:"33%",zIndex:2}}):(0,l.jsx)(c.default,{sx:{display:"none"}});return(0,l.jsx)(k.default,{sx:{py:{xs:Y?10:12,md:20},overflow:"hidden",".MuiContainer-root":{overflow:"visible"}},backgroundColor:Z||"general.white",dataTestId:"".concat(t.toLowerCase().replace(/ /g,"_"),"_section"),children:(0,l.jsxs)(P.default,{spacing:{xs:6,md:12},sx:{width:"100%"},children:[(0,l.jsxs)(P.default,{direction:"row",sx:{justifyContent:q?"center":"space-between",alignItems:"end"},children:[(0,l.jsxs)(P.default,{spacing:4,children:[(0,l.jsx)(M.default,{variant:{xs:"h3",md:"h1"},component:"h2",sx:{color:"secondary.main",textAlign:q?"center":"left"},children:t}),V&&(0,l.jsx)(M.default,{variant:"body2regular",sx:{color:"secondary.heavy"},children:V})]}),N&&(0,l.jsx)(R.default,{href:N,onClick:()=>{(0,z.addToDataLayer)({event:"userInteraction",event_name:"shop_more",element_id:"view all",click_text:"View All"})},sx:{color:"secondary.heavy"},children:(0,l.jsx)(M.default,{textDecoration:"none",variant:{xs:"body3medium",md:"body1medium"},children:"View All"})})]}),(0,l.jsx)(P.default,{spacing:12,ref:ev,children:(0,l.jsx)(D.A,{emblaSliderData:ei,afterChange:e=>{eo(e),null==ed||ed.scrollTo(e),(e=>{var a=ez((ek?eW.filter(e=>e.contentfulProductDetails):eW).slice(e,e+eL)),t=[];a.filter(e=>!ef.includes(e.item_id)).forEach(e=>{t.push(e.item_id),(0,z.addToDataLayer)({event:"userInteraction",event_name:ek?"bundle_recommendations":K||"shop_more",element_id:"swipe",ecommerce:{items:[e]}})}),ex(e=>[...e,...t])})(e)},alwaysShowArrows:!0,options:{slideWidth:Q?"340px":"86%",overflow:"visible",spacing:Q?8:4,dragFree:!0,align:"start",arrows:{prevArrow:eV,nextArrow:eF}},slides:eW.map(e=>{var a,{contentfulProductDetails:t}=e,r=null==t?void 0:t.categoryPageImage,n=null==t||null==(a=t.productLabels)?void 0:a.find(e=>e.displayOnProductsCarousel);return(0,l.jsx)(X,{product:e,customImages:r||(null==J?void 0:J[e.name]),bundlePrice
1s:t?eM[e.name]:void 0,isRecent:null==H?void 0:H.some(a=>a.includes(e.inventoryKey)),eventName:K,isBedframesUpdated:G,contentfulBundleProductDetails:t,label:n},"".concat(e.id,"-").concat(t?"bundle":"regular"))})})})]})})}}}]);
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.