1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10211],{10211:(e,t,a)=>{a.d(t,{NightSection:()=>em});var l=a(95155),n=a(12115),i=a(68),s=a(80455),r=a(32380),o=a(10495),c=a(90530),d=a(51334),p=a(35733),x=a(38413),u=a(75825),h=a(7957),m=a(36);let g={headline1:m.mk,headline2:m.t4};var C=a(59803),L=a(41407),v=a(71543),f=a(26497),b=a(26843);let y=(0,b.e)(function(e){return(0,l.jsx)("svg",{viewBox:"0 0 26 16",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5454 0.178285C3.2381 -0.0765883 2.78178 -0.0342592 2.52684 0.273011L1.54442 1.45856C0.775473 2.38537 0.7626 3.72465 1.51415 4.66559L1.68407 4.87848C1.93222 5.18907 1.90967 5.63661 1.63134 5.92047C0.806781 6.7617 0.777649 8.09894 1.56493 8.97516L1.62255 9.03864C1.9133 9.36223 1.92278 9.8503 1.64501 10.1851L1.54442 10.3072C0.774584 11.2351 0.774565 12.5795 1.54442 13.5074L2.52684 14.692C2.78174 14.9992 3.2381 15.0424 3.5454 14.7877C3.8527 14.5327 3.89509 14.0764 3.64013 13.7691L2.65673 12.5836C2.33128 12.191 2.33116 11.6225 2.65673 11.23L2.75731 11.108C3.49314 10.2211 3.4681 8.92892 2.69774 8.07184L2.6411 8.00836C2.36367 7.69967 2.37396 7.22854 2.66454 6.93219C3.45429 6.12635 3.51827 4.8577 2.81395 3.97614L2.64403 3.76325C2.32026 3.35795 2.3255 2.78064 2.65673 2.38141L3.64013 1.19684C3.89509 0.889538 3.8527 0.433244 3.5454 0.178285ZM22.9206 0.273011C22.6657 -0.0342592 22.2093 -0.0765883 21.902 0.178285C21.5947 0.433244 21.5524 0.889538 21.8073 1.19684L22.7907 2.38141C23.1219 2.78064 23.1272 3.35795 22.8034 3.76325L22.6335 3.97614C21.9292 4.8577 21.9932 6.12635 22.7829 6.93219C23.0735 7.22854 23.0838 7.69967 22.8063 8.00836L22.7497 8.07184C21.9793 8.92892 21.9543 10.2211 22.6901 11.108L22.7907 11.23C23.1163 11.6225 23.1162 12.191 22.7907 12.5836L21.8073 13.7691C21.5524 14.0764 21.5947 14.5327 21.902 14.7877C22.2093 15.0424 22.6657 14.9992 22.9206 14.692L23.903 13.5074C24.6729 12.5795 24.6729 11.2351 23.903 10.3072L23.8024 10.1851C23.5247 9.8503 23.5341 9.36223 23.8249 9.03864L23.8825 8.97516C24.6698 8.09894 24.6407 6.7617 23.8161 5.92047C23.5378 5.63661 23.5152 5.18907 23.7634 4.87848L23.9333 4.66559C24.6848 3.72465 24.672 2.38537 23.903 1.45856L22.9206 0.273011ZM7.83734 3.45361L5.10493 7.74741C5.08788 7.77419 5.07162 7.80139 5.05614 7.82897C4.91158 8.08539 4.83524 8.37522 4.83524 8.6706V8.97692H4.837V10.5861C4.837 11.5325 5.60428 12.2998 6.55076 12.2998H18.8976C19.8441 12.2998 20.6114 11.5325 20.6114 10.5861V8.61339C20.6114 8.32159 20.5369 8.03462 20.3949 7.77968L18.0341 3.53996C17.7317 2.99671 17.1586 2.65993 16.5369 2.65993H9.28317C8.69724 2.65993 8.15192 2.95928 7.83734 3.45361ZM4.837 8.97692H20.6096V8.61652C20.6096 8.32472 20.5351 8.03775 20.3931 7.7828L19.9846 7.04918H5.54948L5.10317 7.75053C5.08677 7.7763 5.07109 7.80246 5.05614 7.82897C4.91272 8.08462 4.837 8.3733 4.837 8.66748V8.97692Z",fill:"currentColor"})})}),j=(0,b.e)(function(e){return(0,l.jsxs)("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M7.54678 1.05144C3.58595 1.05144 0.240467 4.39692 0.240467 8.35775C0.240467 12.3186 3.58595 15.6641 7.54678 15.6641C11.5076 15.6641 14.8531 12.3186 14.8531 8.35775C14.8531 4.39692 11.5076 1.05144 7.54678 1.05144ZM7.54678 14.0404C4.46676 14.0404 1.86409 11.4378 1.86409 8.35775C1.86409 5.27773 4.46676 2.67506 7.54678 2.67506C10.6268 2.67506 13.2295 5.27773 13.2295 8.35775C13.2295 11.4378 10.6268 14.0404 7.54678 14.0404Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M8.35857 7.54595V5.11051C8.35857 4.66216 7.99511 4.2987 7.54676 4.2987C7.09841 4.2987 6.73495 4.66216 6.73495 5.11051V8.14413C6.73495 8.71047 7.19406 9.16957 7.7604 9.16957H10.794C11.2424 9.16957 11.6058 8.80611 11.6058 8.35776C11.6058 7.90941 11.2424 7.54595 10.794 7.54595H8.35857ZM12.4111 1.38682C12.0937 1.07023 12.093 0.556245 12.4096 0.238779C12.7261 -0.0786514 13.24 -0.0794429 13.5575 0.237011L14.8509 1.52605C15.1686 1.84273 15.1694 2.35706 14.8526 2.67472C14.5359 2.99234 14.0216 2.99305 13.704 2.67629L12.4111 1.38682ZM2.66685 0.23994C2.98477 0.556733 2.98561 1.07129 2.66873 1.38912L1.3884 2.6733C1.07178 2.99087 0.557714 2.99181 0.239945 2.67538C-0.0780641 2.35872 -0.0790392 1.84418 0.237768 1.52631L1.51788 0.241914C1.83463 -0.0758883 2.34902 -0.076772 2.66685 0.23994Z",fill:"currentColor"})]})}),k=(0,b.e)(function(e){return(0,l.jsxs)("svg",{viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,l.jsx)("path",{d:"M8.02734 1.1543H11.7197",stroke:"currentColor",strokeWidth:"1.23077",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M8.02734 9.46094H11.7197",stroke:"currentColor",strokeWidth:"1.23077",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M8.02734 3.92383H11.7197",stroke:"currentColor",strokeWidth:"1.23077",strokeLinecap:"round"}),(0,l.jsx)("path",{d:"M8.02734 6.69141H11.7197",stroke:"currentColor",strokeWidth:"1.23077",strokeLinecap:"round"}),(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.42305 9.04203C5.44449 9.08094 5.47541 9.1138 5.51294 9.13756C5.96139 9.42967 6.32981 9.82914 6.58475 10.2997C6.8397 10.7703 6.97312 11.2971 6.97289 11.8323C6.97245 12.6591 6.64851 13.4529 6.07035 14.0439C5.49218 14.635 4.7057 14.9763 3.8791 14.995C3.0525 15.0136 2.25142 14.7081 1.64718 14.1437C1.04294 13.5794 0.683529 12.801 0.645802 11.975C0.62
10755 11.4161 0.741984 10.8604 0.997509 10.3627C1.25303 9.86499 1.63401 9.44259 2.10278 9.13723C2.1402 9.11346 2.17103 9.08063 2.19241 9.04179C2.21379 9.00295 2.22503 8.95935 2.2251 8.91501V1.80916C2.2251 1.38943 2.39184 0.986888 2.68863 0.690094C2.98543 0.3933 3.38797 0.226562 3.8077 0.226562C4.22743 0.226562 4.62997 0.3933 4.92676 0.690094C5.22355 0.986888 5.39029 1.38943 5.39029 1.80916V8.91501C5.39034 8.95943 5.40161 9.00313 5.42305 9.04203ZM4.42255 2.86103C4.42247 2.52123 4.14713 2.24579 3.80732 2.24579C3.46767 2.246 3.19216 2.52135 3.19208 2.86103V10.3688C2.62348 10.6088 2.22431 11.1728 2.22431 11.8288C2.22453 12.7026 2.93343 13.4108 3.80732 13.4108C4.68122 13.4108 5.3901 12.7027 5.39032 11.8288C5.39032 11.1728 4.99119 10.6088 4.42255 10.3688V2.86103Z",fill:"currentColor"}),(0,l.jsx)("path",{d:"M5.51294 9.13756L5.62491 8.96567L5.62268 8.96426L5.51294 9.13756ZM5.42305 9.04203L5.6027 8.94302L5.6027 8.94302L5.42305 9.04203ZM6.97289 11.8323L7.17802 11.8324V11.8323L6.97289 11.8323ZM6.07035 14.0439L5.92371 13.9005V13.9005L6.07035 14.0439ZM3.8791 14.995L3.88372 15.2001L3.8791 14.995ZM1.64718 14.1437L1.50716 14.2936V14.2936L1.64718 14.1437ZM0.645802 11.975L0.44088 11.9842L0.440888 11.9844L0.645802 11.975ZM0.997509 10.3627L0.815026 10.269H0.815026L0.997509 10.3627ZM2.10278 9.13723L1.99277 8.96408L1.99082 8.96536L2.10278 9.13723ZM2.19241 9.04179L2.37211 9.14071H2.37211L2.19241 9.04179ZM2.2251 8.91501L2.43023 8.91533V8.91501H2.2251ZM2.68863 0.690094L2.54358 0.545046V0.545046L2.68863 0.690094ZM4.92676 0.690094L5.07181 0.545047V0.545046L4.92676 0.690094ZM5.39029 8.91501H5.18516V8.91524L5.39029 8.91501ZM3.80732 2.24579V2.04067L3.80719 2.04067L3.80732 2.24579ZM4.42255 2.86103H4.62768V2.86098L4.42255 2.86103ZM3.19208 2.86103L2.98695 2.86098V2.86103H3.19208ZM3.19208 10.3688L3.27185 10.5578L3.39721 10.5049V10.3688H3.19208ZM2.22431 11.8288H2.01918V11.8289L2.22431 11.8288ZM3.80732 13.4108L3.80731 13.616H3.80732V13.4108ZM5.39032 11.8288L5.59545 11.8289V11.8288H5.39032ZM4.42255 10.3688H4.21742V10.5049L4.3428 10.5578L4.42255 10.3688ZM5.51294 9.13756L5.62268 8.96426C5.61434 8.95898 5.60747 8.95167 5.6027 8.94302L5.42305 9.04203L5.2434 9.14104C5.28151 9.2102 5.33648 9.26862 5.4032 9.31087L5.51294 9.13756ZM6.58475 10.2997L6.76511 10.202C6.4939 9.70139 6.10197 9.27643 5.6249 8.96568L5.51294 9.13756L5.40098 9.30944C5.82082 9.58291 6.16572 9.95688 6.4044 10.3974L6.58475 10.2997ZM6.97289 11.8323L7.17802 11.8323C7.17826 11.263 7.03633 10.7026 6.76511 10.202L6.58475 10.2997L6.4044 10.3974C6.64307 10.838 6.76797 11.3311 6.76776 11.8322L6.97289 11.8323ZM6.07035 14.0439L6.21698 14.1874C6.83262 13.558 7.17755 12.7128 7.17802 11.8324L6.97289 11.8323L6.76776 11.8322C6.76735 12.6054 6.46441 13.3478 5.92371 13.9005L6.07035 14.0439ZM3.8791 14.995L3.88372 15.2001C4.76389 15.1802 5.60135 14.8167 6.21698 14.1874L6.07035 14.0439L5.92371 13.9005C5.38301 14.4532 4.6475 14.7725 3.87447 14.7899L3.8791 14.995ZM1.64718 14.1437L1.50716 14.2936C2.15056 14.8946 3.00356 15.2199 3.88372 15.2001L3.8791 14.995L3.87447 14.7899C3.10144 14.8074 2.35227 14.5216 1.7872 13.9938L1.64718 14.1437ZM0.645802 11.975L0.440888 11.9844C0.481059 12.8639 0.863768 13.6927 1.50716 14.2936L1.64718 14.1437L1.7872 13.9938C1.22212 13.466 0.885998 12.7381 0.850717 11.9657L0.645802 11.975ZM0.997509 10.3627L0.815026 10.269C0.543198 10.7984 0.414234 11.3897 0.44088 11.9842L0.645802 11.975L0.850725 11.9658C0.827275 11.4426 0.94077 10.9223 1.17999 10.4564L0.997509 10.3627ZM2.10278 9.13723L1.99082 8.96536C1.49214 9.2902 1.08685 9.73955 0.815026 10.269L0.997509 10.3627L1.17999 10.4564C1.41921 9.99044 1.77588 9.59499 2.21474 9.30911L2.10278 9.13723ZM2.19241 9.04179L2.0127 8.94288C2.00795 8.95151 2.0011 8.95881 1.99278 8.96409L2.10278 9.13723L2.21278 9.31038C2.2793 9.26811 2.3341 9.20976 2.37211 9.14071L2.19241 9.04179ZM2.2251 8.91501L2.01997 8.91469C2.01996 8.92455 2.01746 8.93424 2.0127 8.94288L2.19241 9.04179L2.37211 9.14071C2.41012 9.07166 2.43011 8.99415 2.43023 8.91533L2.2251 8.91501ZM2.2251 1.80916H2.01997V8.91501H2.2251H2.43023V1.80916H2.2251ZM2.68863 0.690094L2.54358 0.545046C2.20832 0.88031 2.01997 1.33502 2.01997 1.80916H2.2251H2.43023C2.43023 1.44383 2.57535 1.09347 2.83368 0.835142L2.68863 0.690094ZM3.8077 0.226562V0.0214343C3.33356 0.0214343 2.87885 0.209783 2.54358 0.545046L2.68863 0.690094L2.83368 0.835142C3.092 0.576816 3.44237 0.431691 3.8077 0.431691V0.226562ZM4.92676 0.690094L5.07181 0.545046C4.73654 0.209783 4.28183 0.0214343 3.8077 0.0214343V0.226562V0.431691C4.17302 0.431691 4.52339 0.576816 4.78171 0.835142L4.92676 0.690094ZM5.39029 1.80916H5.59542C5.59542 1.33502 5.40707 0.88031 5.07181 0.545047L4.92676 0.690094L4.78171 0.835141C5.04004 1.09347 5.18516 1.44383 5.18516 1.80916H5.39029ZM5.39029 8.91501H5.59542V1.80916H5.39029H5.18516V8.91501H5.39029ZM5.42305 9.04203L5.6027 8.94302C5.59794 8.93437 5.59543 8.92466 5.59542 8.91478L5.39029 8.91501L5.18516 8.91524C5.18525 8.99421 5.20528 9.07188 5.2434 9.14104L5.42305 9.04203ZM3.80732 2.24579V2.45092C4.0338 2.45092 4.21737 2.63448 4.21742 2.86108L4.4225
15 2.86103L4.62768 2.86098C4.62757 2.40798 4.26047 2.04067 3.80732 2.04067V2.24579ZM3.19208 2.86103L3.39721 2.86108C3.39726 2.63473 3.58091 2.45106 3.80744 2.45092L3.80732 2.24579L3.80719 2.04067C3.35443 2.04094 2.98706 2.40798 2.98695 2.86098L3.19208 2.86103ZM3.19208 10.3688H3.39721V2.86103H3.19208H2.98695V10.3688H3.19208ZM2.22431 11.8288H2.42944C2.42944 11.258 2.77669 10.7668 3.27185 10.5578L3.19208 10.3688L3.11232 10.1799C2.47026 10.4508 2.01918 11.0877 2.01918 11.8288H2.22431ZM3.80732 13.4108L3.80732 13.2057C3.0466 13.2057 2.42963 12.5892 2.42944 11.8287L2.22431 11.8288L2.01918 11.8289C2.01943 12.8161 2.82026 13.6159 3.80731 13.616L3.80732 13.4108ZM5.39032 11.8288L5.1852 11.8287C5.185 12.5892 4.56805 13.2057 3.80732 13.2057V13.4108V13.616C4.7944 13.616 5.5952 12.8161 5.59545 11.8289L5.39032 11.8288ZM4.42255 10.3688L4.3428 10.5578C4.83797 10.7668 5.1852 11.258 5.1852 11.8288H5.39032H5.59545C5.59545 11.0877 5.14441 10.4508 4.50231 10.1799L4.42255 10.3688ZM4.42255 2.86103H4.21742V10.3688H4.42255H4.62768V2.86103H4.42255Z",fill:"currentColor"})]})});var w=a(64109),N=a(56377),M=a(4157),Z=a.n(M),_=a(58208);let H="https://res.cloudinary.com/eightsleep/image/upload",V={appleHealth:{src:"".concat(H,"/v1787871238/homepage-night-chip-apple-health.png"),delivery:{width:80,height:80},inset:"w-full"},healthConnect:{src:"".concat(H,"/v1790013154/homepage-night-chip-health-connect.png"),delivery:{width:80,height:80},inset:"w-full"},autopilot:{src:"".concat(H,"/v1787871420/homepage-night-chip-autopilot.png"),delivery:{width:54,height:54},inset:"w-full"}},z={contained:.42,layered:.36},D={contained:.09,layered:.12},F=["center 0.95","center 0.6"],A={appleHealth:"text-[14.5px]",healthConnect:"text-[14.5px]",autopilot:"text-[14.1px]",eight:"text-[11.6px]"},R={metric:"flex flex-col gap-2 rounded-[12px] px-3 py-2",metricIcon:"flex items-center gap-2 rounded-[12px] px-3 py-2",metricRow:"flex items-center justify-between gap-3 rounded-[10.4px] border-[0.736px] border-white/20 px-4 py-3",notification:"flex gap-2.5 rounded-[16.8px] px-2.5 py-3"},S={row:"metricRow",icon:"metricIcon",stack:"metric"},E={base:y,alarm:j,temperature:k},P="text-[21px] ".concat("[text-box-edge:cap_alphabetic] [text-box-trim:trim-both]"),G=e=>{let{color:t}=e;return(0,l.jsx)("span",{"aria-hidden":"true",className:"size-[4.8px] shrink-0 rounded-full",style:{backgroundColor:t}})},I={base:"h-6"},W=e=>{let{chip:t}=e;if("eight"===t.app)return(0,l.jsx)("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-[6.7px] bg-black",children:(0,l.jsx)(w.A,{size:18,color:"white","aria-hidden":"true"})});if("autopilot"===t.app)return(0,l.jsx)(N.E,{src:V.autopilot.src,alt:"",className:"mt-0.5 w-[18px] shrink-0 [&>img]:w-full",config:{desktop:V.autopilot.delivery,mobile:V.autopilot.delivery}});let a=V[t.app];return(0,l.jsx)("span",{className:"flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-[8.4px] bg-white",children:(0,l.jsx)(N.E,{src:a.src,alt:"",className:(0,C.cn)("[&>img]:w-full",a.inset),config:{desktop:a.delivery,mobile:a.delivery}})})},B=e=>{var t,a,n,i;let{chip:s,nowLabel:r}=e,o=(0,_.kJ)();if("metric"===s.kind){if("icon"===s.layout){let e=s.icon?E[s.icon]:null;return(0,l.jsxs)(l.Fragment,{children:[e?(0,l.jsx)(e,{className:(0,C.cn)("shrink-0 opacity-70","h-5 w-auto",s.icon&&I[s.icon]),"aria-hidden":"true"}):null,(0,l.jsxs)("span",{className:(0,C.cn)("whitespace-nowrap leading-none","oswald"===s.valueFont?"".concat(Z().className," ").concat(P):"upper"===s.valueCase?"text-[12px] font-medium uppercase tracking-[2px]":"text-[15px] font-medium"),style:s.valueColor?{color:s.valueColor}:void 0,children:[s.value,s.unit?(0,l.jsx)("sup",{className:(0,C.cn)("ml-0.5 uppercase","oswald"===s.valueFont?"".concat(Z().className," text-[12px]"):"text-[9px] font-medium"),children:s.unit}):null]})]})}return"row"===s.layout?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"whitespace-pre-line text-[13px] leading-[1.35]",children:s.label}),(0,l.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[s.valuePrefix?(0,l.jsx)("span",{className:"text-[15px] leading-none",children:s.valuePrefix}
1):null,(null==(a=s.dot)?void 0:a.side)==="left"?(0,l.jsx)(G,{color:s.dot.color}):null,(0,l.jsx)("span",{className:"oswald"===s.valueFont?"".concat(Z().className," ").concat(P):"text-[19px] font-medium leading-none tracking-[0.04em]",style:s.valueColor?{color:s.valueColor}:void 0,children:s.value}),s.dot&&"left"!==s.dot.side?(0,l.jsx)(G,{color:s.dot.color}):null]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-[12px] font-medium uppercase leading-none tracking-[2px]",children:s.label}),(0,l.jsxs)("span",{className:"flex items-center gap-0.5",children:[(null==(t=s.dot)?void 0:t.side)==="left"?(0,l.jsx)(G,{color:s.dot.color}):null,(0,l.jsx)("span",{className:"oswald"===s.valueFont?"".concat(Z().className," ").concat(P):"text-[17px] font-medium leading-none",style:s.valueColor?{color:s.valueColor}:void 0,children:s.value}),s.unit?(0,l.jsx)("span",{className:"text-[9px] font-medium uppercase leading-none",children:s.unit}):null,s.dot&&"left"!==s.dot.side?(0,l.jsx)(G,{color:s.dot.color}):null]})]})}let c="eight"===s.app,d=o&&null!=(n=s.titleMetric)?n:s.title,p=o&&null!=(i=s.bodyMetric)?i:s.body;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(W,{chip:s}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,l.jsxs)("div",{className:(0,C.cn)("flex gap-2",c?"items-start":"items-center"),children:[(0,l.jsx)("span",{className:(0,C.cn)("flex-1 leading-[1.3]",A[s.app],c?"font-semibold":"font-medium"),children:d}),c?(0,l.jsx)("span",{className:"text-[9px] leading-[1.4] opacity-40",children:r}):null]}),"eight"===s.app?(0,l.jsx)("span",{className:"text-[10.9px] leading-[1.25] opacity-90",children:p}):null]})]})},T=e=>{let{chips:t,nowLabel:a,variant:r="contained"}=e,o=(0,L.I)(),c=(0,n.useRef)(null),{scrollYProgress:d}=(0,v.L)({target:c,offset:F}),p=(0,i.G)(d,[0,.98,1],[0,1,1]);return(0,l.jsx)(s.P.div,{ref:c,"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-20 hidden lg:block",style:o?void 0:{"--chips-in":p},children:(0,l.jsx)(f.N,{children:t.map((e,t)=>(0,l.jsx)(s.P.div,{className:(0,C.cn)("absolute",(e=>{var t;return"notification"===e.kind?R.notification:R[S[null!=(t=e.layout)?t:"stack"]]})(e),"bg-[rgba(245,245,245,0.34)] backdrop-blur-[42px] backdrop-saturate-[1.4] shadow-[0_24px_44px_0_rgba(0,0,0,0.1)] text-[#151514]","notification"===e.kind&&("eight"===e.app||"autopilot"===e.app?"items-start":"items-center")),style:{...((e,t)=>{let a="layered"===t&&e.layered?e.layered:e;return{left:a.x,top:a.y}})(e,r),width:"notification"===e.kind&&"min"===e.fit?"min-content":"max-content",maxWidth:e.maxWidth,zIndex:"notification"===e.kind?e.z:void 0,opacity:"calc(var(--chips-in, 1) * var(--chip-in, 1))"},initial:!o&&{"--chip-in":0,scale:.88},animate:{"--chip-in":1,scale:1},exit:o?{"--chip-in":0}:{"--chip-in":0,scale:.88,transition:{duration:.22,ease:"easeIn",delay:0}},transition:o?{duration:0}:{duration:z[r],ease:"easeOut",delay:t*D[r]},children:(0,l.jsx)(B,{chip:e,nowLabel:a})},"".concat(e.key,":").concat(JSON.stringify(e))))})})},q={dusk:{src:"https://res.cloudinary.com/eightsleep/image/upload/v1789152069/sky-background-dusk.jpg",master:8192},night:{src:"https://res.cloudinary.com/eightsleep/image/upload/v1789152065/sky-background-night.jpg",master:8192},day:{src:"https://res.cloudinary.com/eightsleep/image/upload/v1789152061/sky-background-day.jpg",master:8192}},K={dusk:{plate:"dusk",darken:0,drift:0,tint:"#E2B68F"},nightfall:{plate:"night",darken:0,drift:.12,tint:"#031938"},night:{plate:"night",darken:.6,drift:.5,tint:"#05152C"},sunrise:{plate:"dusk",darken:0,drift:.88,tint:"#EDAC70"},daybreak:{plate:"day",darken:0,drift:0,tint:"#66B1E7"}},O={setTheScene:"https://res.cloudinary.com/eightsleep/image/upload/v1787786245/homepage-night-widget-set-the-scene.png",deepSleep:"https://res.cloudinary.com/eightsleep/image/upload/v1790036308/homepage-night-widget-deep-sleep-v2.png",snoring:"https://res.cloudinary.com/eightsleep/image/upload/v1787786251/homepage-night-widget-snoring.png",wakeUp:"https://res.cloudinary.com/eightsleep/image/upload/v1787786254/homepage-night-widget-wake-up.png",knowHow:"https://res.cloudinary.com/eightsleep/image/upload/v1787786257/homepage-night-widget-know-how.png"},U=[{key:"setTheScene",sky:"dusk",tone:"onLight"},{key:"deepSleep",sky:"nightfall",tone:"onDark"},{key:"snoring",sky:"night",tone:"onDark"}
1,{key:"wakeUp",sky:"sunrise",tone:"onLight"},{key:"knowHow",sky:"daybreak",tone:"onLight"}];var J=a(18646);let Q=e=>{let{moment:t,alt:a,className:n}=e;return"setTheScene"===t?(0,l.jsx)("div",{className:(0,C.cn)("@container w-full",n),children:(0,l.jsx)(J.o,{temperature:68,surface:"slate",heightUnits:116.98,className:"[--card-u:calc(100cqw/202.53)] rounded-[9.92px] shadow-[0_55.2px_110.4px_-20.7px_rgba(0,0,0,0.4)]!"})}):(0,l.jsx)("div",{className:(0,C.cn)("aspect-[322/186] w-full overflow-hidden rounded-[9.92px] shadow-[0_55.2px_110.4px_-20.7px_rgba(0,0,0,0.4)]",n),children:(0,l.jsx)(N.E,{src:O[t],alt:a,objectFit:"cover",config:{desktop:{width:322,height:186},mobile:{width:322,height:186}},className:"[&>img]:h-full [&>img]:w-full"})})},X=Math.round(495),Y="".concat(X,"ms"),$=Math.round(X/2-50),ee="".concat(100,"ms"),et="".concat($,"ms"),ea=[750,1080,1440,1920,2560],el=1440/1094,en=(e,t)=>{let a=q[e.plate],l=Math.round(.78*a.master),n=Math.round(l/el),i=Math.round((a.master-l)/2),s=Math.round(e.drift*(a.master-n)),r=e.darken>0?"/co_rgb:".concat("#020A18".replace("#",""),",e_colorize:").concat(Math.round(100*e.darken)):"",o=a.src.replace("/upload/","/upload/c_crop,w_".concat(l,",h_").concat(n,",x_").concat(i,",y_").concat(s).concat(r,"/"));return(0,h.Ih)(o,!1,{width:t,height:Math.round(t/el)},"center")},ei=e=>({src:en(e,1440),srcSet:ea.map(t=>"".concat(en(e,t)," ").concat(t,"w")).join(", ")}),es={dusk:ei(K.dusk),nightfall:ei(K.nightfall),night:ei(K.night),sunrise:ei(K.sunrise),daybreak:ei(K.daybreak)},er={onLight:"text-[#151514]",onDark:"text-[#F0F0F0]"},eo=e=>{let{label:t,onClick:a,children:n}=e;return(0,l.jsx)("button",{type:"button","aria-label":t,onClick:a,className:"flex size-10 cursor-pointer items-center justify-center rounded-full border border-current opacity-70 transition-opacity hover:opacity-100 lg:size-14",children:n})},ec=e=>{let{moment:t,proximity:a}=e,n=(0,i.G)(a,[0,1],[.28,1]),r=(0,i.G)(a,[0,.35,1],[0,0,1]);return(0,l.jsxs)(s.P.div,{className:"flex h-[310px] flex-col items-center gap-4 text-center tablet:h-[293px] lg:h-[306px] lg:gap-8",style:{opacity:n},children:[(0,l.jsx)(Q,{moment:t.key,className:"tablet:w-[322px]",alt:t.widgetAlt}),(0,l.jsxs)(s.P.div,{className:"flex w-full flex-col items-center gap-3 lg:w-[469px]",style:{opacity:r},children:[(0,l.jsx)(m.mq,{as:"h3",className:"text-pretty font-medium!",style:{margin:0},children:t.title}),(0,l.jsx)(m.qb,{className:"lg:max-w-[345px]",style:{margin:0},children:t.description})]})]})},ed=e=>{var t,a;let{moments:n,active:i,controls:s,setActive:r,prevLabel:o,nextLabel:d,dotLabel:p,itemKey:x,chipNowLabel:u}=e;return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"relative w-full lg:w-[565px]",children:[(0,l.jsx)(T,{chips:null!=(a=null==(t=n[i])?void 0:t.chips)?a:n[0].chips,nowLabel:u}),(0,l.jsxs)("div",{className:"relative flex w-full flex-col lg:h-[440px] lg:rounded-[20px] lg:bg-white/20 lg:pt-[48px] lg:backdrop-blur-[14.4px]",children:[(0,l.jsx)("div",{"aria-hidden":"true",className:(0,C.cn)("pointer-events-none absolute inset-0 hidden rounded-[inherit] p-[1.2px] lg:block","[background-image:radial-gradient(circle_at_top_left,rgba(255,255,255,0.9)_0%,rgba(255,255,255,0.6)_10%,rgba(255,255,255,0.15)_25%,rgba(255,255,255,0)_40%)]","!mask-exclude [mask:linear-gradient(#000_0_0)_content-box,linear-gradient(#000_0_0)]")}),(0,l.jsx)(c.L,{items:n,itemKey:x,prevLabel:o,nextLabel:d,hideNav:!0,controlsRef:s,onActiveChange:r,showDots:!0,dotLabel:p,dotsAnchorClass:"bottom-2 lg:bottom-12",itemWidthClass:"w-[min(322px,100vw-80px)] tablet:w-[360px] lg:w-[322px]",edgePaddingClass:"px-[calc(50%-min(161px,50vw-40px))] tablet:px-[calc(50%-180px)] lg:px-[calc(50%-161px)]",gapClass:"gap-5 lg:gap-10",insetTopClass:"",captionReserveClass:"pb-[30px] lg:pb-[86px]",renderItem:(e,t)=>{let{proximity:a}=t;return(0,l.jsx)(ec,{moment:e,proximity:a})}})]})]})})},ep=()=>(0,l.jsx)("div",{"aria-hidden":"true",className:(0,C.cn)("pointer-events-none absolute inset-0 rounded-[inherit] p-[1.2px]","[background-image:radial-gradient(circle_at_top_left,rgba(255,255,255,0.9)_0%,rgba(255,255,255,0.6)_10%,rgba(255,255,255,0.15)_25%,rgba(255,255,255,0)_40%)]","!mask-exclude [mask:linear-gradient(#000_0_0)_content-box,linear-gradient(#000_0_0)]")}),ex=e=>{let{moment:t,proximity:a}
1=e,n=(0,i.G)(a,[0,1],[.7,1]),r=(0,i.G)(a,[0,.35,1],[0,0,1]),o=(0,i.G)(a,[0,.35,1],[338,338,378]),c=(0,i.G)(a,[0,.35,1],[420,420,520]),d=(0,i.G)(a,[0,1],[.85,1]);return(0,l.jsx)("div",{className:"relative w-full",style:{height:440},children:(0,l.jsxs)(s.P.div,{className:"absolute inset-x-0 top-0 mx-auto flex flex-col rounded-[20px] bg-white/20 pt-[48px]",style:{opacity:n,width:c,height:o,scale:d,transformOrigin:"top center"},children:[(0,l.jsx)(ep,{}),(0,l.jsx)("div",{className:"mx-auto w-[322px] shrink-0",children:(0,l.jsx)(Q,{moment:t.key,alt:t.widgetAlt})}),(0,l.jsxs)("div",{className:"mt-8 flex h-[88px] flex-col items-center gap-3 px-6 text-center",children:[(0,l.jsx)(m.mq,{as:"h3",className:"text-pretty font-medium!",style:{margin:0},children:t.title}),(0,l.jsx)(s.P.div,{className:"flex flex-col items-center gap-2",style:{opacity:r},children:(0,l.jsx)(m.qb,{className:"max-w-[345px]",style:{margin:0},children:t.description})})]})]})})},eu=e=>{let{count:t,active:a,dotLabel:n,onSelect:i}=e;return(0,l.jsx)("div",{className:"flex items-center gap-1.5",children:Array.from({length:t},(e,t)=>(0,l.jsx)("button",{type:"button","aria-label":n(t),"aria-current":t===a,onClick:()=>i(t),className:(0,C.cn)("size-1.5 cursor-pointer rounded-full bg-current transition-opacity duration-300",t===a?"opacity-100":"opacity-40")},t))})},eh=e=>{var t;let{moments:a,active:n,controls:i,setActive:s,prevLabel:r,nextLabel:o,dotLabel:d,itemKey:p,chipNowLabel:x}=e,u=null!=(t=a[n])?t:a[0];return(0,l.jsxs)("div",{className:"relative w-[520px]",children:[(0,l.jsx)("div",{"aria-hidden":"true",className:"w-full",style:{height:440}}),(0,l.jsx)("div",{className:"absolute inset-y-0 -inset-x-[542px] z-10 flex flex-col [mask-image:linear-gradient(to_right,transparent_0,#000_80px,#000_calc(100%-80px),transparent_100%)]",children:(0,l.jsx)(c.L,{items:a,itemKey:p,prevLabel:r,nextLabel:o,hideNav:!0,controlsRef:i,onActiveChange:s,itemWidthClass:"w-[520px]",edgePaddingClass:"px-[calc(50%-260px)]",gapClass:"gap-[56px]",insetTopClass:"pt-0",captionReserveClass:"pb-0",scrollDurationMs:660,renderItem:(e,t)=>{let{proximity:a}=t;return(0,l.jsx)(ex,{moment:e,proximity:a})}})}),(0,l.jsx)(T,{chips:u.chips,nowLabel:x,variant:"layered"}),(0,l.jsx)("div",{className:"absolute top-[406px] left-1/2 z-30 -translate-x-1/2",children:(0,l.jsx)(eu,{count:a.length,active:n,dotLabel:d,onSelect:e=>{var t;return null==(t=i.current)?void 0:t.goTo(e)}})})]})},em=e=>{var t,a,i,s,c;let{title:h,subtitle:L,prevLabel:v,nextLabel:f,dotLabels:b,moments:y,chipNowLabel:j,titleScale:k="headline1",legacyFootnotes:w=!1}=e,N=g[k],M=null==(t=y.find(e=>
1void 0!==e.note))?void 0:t.note,[Z,_]=(0,n.useState)(0),H=(0,n.useRef)(null),V=(0,n.useCallback)(e=>_(e),[]),z=(0,n.useCallback)(e=>{var t,a;1===e?null==(t=H.current)||t.next():null==(a=H.current)||a.prev()},[]),D=er[null!=(s=null==(a=y[Z])?void 0:a.tone)?s:"onDark"],F=null!=(c=null==(i=y[Z])?void 0:i.sky)?c:U[0].sky,A=K[F],R=(0,n.useCallback)(e=>{var t;return null!=(t=b[e])?t:""},[b]),S=(0,n.useCallback)(e=>e.key,[]),[E,P]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=()=>P(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]),(0,l.jsxs)("section",{id:"night-on-the-pod",className:"relative lg:overflow-x-clip",children:[(0,l.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 isolate overflow-hidden transition-colors",style:{backgroundColor:A.tint,transitionDuration:Y},children:(0,l.jsx)(u.z,{src:es[F].src,srcSet:es[F].srcSet,sizes:"100vw",mediaKind:"image",transitionDuration:X,className:"h-full w-full",mediaClassName:"h-full w-full object-cover"})}),(0,l.jsx)("div",{className:(0,C.cn)("relative py-16 transition-colors lg:py-28",D),style:{transitionDuration:ee,transitionDelay:et},children:(0,l.jsxs)("div",{className:"max-w-360 mx-auto w-full",children:[(0,l.jsxs)("header",{className:"mx-auto flex max-w-[658px] flex-col items-center gap-7 px-5 text-center",children:[(0,l.jsx)(N,{as:"h2",className:"text-balance",style:{margin:0},children:(0,l.jsx)(x.D0,{text:h})}),(0,l.jsx)(m.cR,{className:"max-w-[450px]",style:{margin:0},children:(0,l.jsx)(x.D0,{text:L,trailing:w?(0,l.jsx)(p.hB,{footnote:"autopilotMembership"}):(0,l.jsx)(d.fp,{name:"autopilot"})})})]}),(0,l.jsxs)("div",{className:"mt-10 flex flex-col items-center lg:mt-14",children:["contained"==(E?"layered":"contained")?(0,l.jsx)(ed,{moments:y,active:Z,controls:H,setActive:V,prevLabel:v,nextLabel:f,dotLabel:R,itemKey:S,chipNowLabel:j}):(0,l.jsx)(eh,{moments:y,active:Z,controls:H,setActive:V,prevLabel:v,nextLabel:f,dotLabel:R,itemKey:S,chipNowLabel:j}),(0,l.jsxs)("div",{className:"mt-6 flex gap-6 lg:mt-4",children:[(0,l.jsx)(eo,{label:v,onClick:()=>z(-1),children:(0,l.jsx)(r.A,{className:"rtl:-scale-x-100"})}),(0,l.jsx)(eo,{label:f,onClick:()=>z(1),children:(0,l.jsx)(o.A,{className:"rtl:-scale-x-100"})})]}),void 0!==M?(0,l.jsx)(m.D2,{as:"p",className:"text-secondary-text max-w-[345px] text-center text-balance text-[10px]! leading-[12px] tablet:text-[12px]! tablet:leading-[14px]",style:{margin:"24px 0 0"},children:M}):null]})]})})]})}}}]);
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.