PageSourceSearch

https://www.sleepnumber.com/build/assets/PaymentsPerMonth-DZmRevKC.js

js sleepnumber.com collected 2026-10-01 10:29:59 UTC 8,514 bytes, 5 lines download raw bytes

1import{$ as e,it as t,t as n}from"./jsx-runtime-CfwYrey9.js";import{t as r}from"./TextType-D3CUH6cX.js";import{y as i}from"./string-C5fLiEhb.js";import{t as a}from"./format-CRg5KHEI.js";import{g as o,t as s}from"./Html-BylF1A06.js";import{t as c}from"./hub-CQbyO_3k.js";import{t as l}from"./utils-B6KiDbIe.js";import{i as u}from"./css-Ns_8sVBJ.js";import{t as d}from"./useOnMount-DgseijPr.js";import{t as f}from"./icon-CgmP46Jq.js";import{t as p}from"./Button-GM_nJZy7.js";import{r as m,t as h}from"./SynchronyCta-BorcR1wz.js";import{t as g}from"./useCss-BJwUXd1H.js";import{n as _,r as v}from"./buttons-QPefCh-v.js";import{t as y}from"./PaymentsPerMonthTitle-mt09-83U.js";var b=t(e(),1),x=n(),S=a.currency;function C({financing:e,value:t,trigger:n,name:r,title:i,hideCta:a,siteCode:o,financing_options:s=[e]}){c.pub(c.topics.MODAL,{target:`#sn-modal`,theme:`dark-header`,trigger:n,component:n=>(0,x.jsx)(w,{financing:e,value:t,onHide:n,hideCta:a,siteCode:o,financing_options:s}),title:i,name:r})}function w({financing:e,onHide:t,hideCta:n=!1,siteCode:a,financing_options:o=[e]}){let[c,y]=(0,b.useState)(e),[C,w]=(0,b.useState)({}),T=C[c?.term_id];d(()=>{Promise.all(o.map(e=>m(e.term_id))).then(e=>{w(e.reduce((e,t)=>(e[t.id]=t,e),{}))})});let E=e=>y(e),D=c?.total_payments,O=(0,b.useRef)({apply:i(),prequal:i()}).current,k=!c.non_stackable||T?.show_non_stackable_total,A=g(u`
2    ${_(`&`)};
3    ${v(`&`)};
4  `);return(0,x.jsxs)(`div`,{children:[T?.financing_modal_body?(0,x.jsx)(s,{className:`px-2 mb-8`,children:T?.financing_modal_body}):null,(0,x.jsx)(r.md,{bold:!0,as:`p`,className:`mb-3 px-2`,children:`Promotional period (months):`}),(0,x.jsx)(`div`,{className:`flex gap-2 px-2 mb-4`,children:[...o].sort((e,t)=>e.months-t.months).map(e=>(0,x.jsxs)(p,{className:l(`rounded-lg flex-1 min-h-11 py-2.5 mb:py-0.5`,A,e?.months===c.months&&`selected`),onClick:()=>E(e),children:[(0,x.jsx)(`span`,{className:`check`,children:(0,x.jsx)(f,{name:`checkmark`,className:`size-2`})}),(0,x.jsxs)(`div`,{children:[e?.months,(0,x.jsx)(`span`,{className:`sr-only`,children:` months financing`})]})]},e?.months))}),T?.disclaimer_message?(0,x.jsx)(s,{className:`px-2`,children:T?.disclaimer_message}):null,(0,x.jsx)(`div`,{className:`container mb:hidden md:table px-2`,children:(0,x.jsx)(`div`,{className:`row justify-center`,children:(0,x.jsx)(`div`,{className:`col-12`,children:k?(0,x.jsxs)(`table`,{className:l(`rounded-lg overflow-hidden w-full table-fixed my-6`,`border border-stone-300 border-separate border-spacing-0`),children:[(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`bg-crema-100`,children:[(0,x.jsxs)(`th`,{className:l(`px-6 py-2 border-r col-4 text-left`,`border-b border-stone-300`),children:[(0,x.jsxs)(r.md,{bold:!0,children:[c.deferred?`Amount financed`:null,!c.deferred&&c.interest_rate===0?(0,x.jsx)(`div`,{children:`Total payments`}):null,!c.deferred&&c.interest_rate>0?`Total payments`:null]}),!c.deferred&&c.interest_rate>0?(0,x.jsx)(`div`,{className:`type-body-legal`,children:`(including interest)`}):null]}),(0,x.jsxs)(`th`,{className:l(`px-6 py-2 col-7 text-left`,`border-b border-stone-300`),children:[(0,x.jsxs)(r.md,{bold:!0,children:[c.deferred?`Suggested monthly payments`:null,!c.deferred&&c.interest_rate>0?`Fixed monthly payments required`:null,!c.deferred&&c.interest_rate===0?`Equal monthly payments required`:null]}),!c.deferred&&c.interest_rate>0?(0,x.jsx)(`div`,{className:`type-body-legal`,children:`(including interest)`}):null]})]})}),(0,x.jsx)(`tbody`,{children:(0,x.jsxs)(`tr`,{children:[(0,x.jsx)(`td`,{className:l(`px-6 py-4`,`text-left align-top`,`border-r border-stone-300`),children:(0,x.jsx)(r.sm,{children:S(D,!0)})}),(0,x.jsxs)(`td`,{className:`px-6 py-4 text-left`,children:[(0,x.jsxs)(r.sm,{children:[c.value>=30&&c.deferred?`${S(c.value,!0)}/month`:null,c.deferred?null:`${S(c.value,!0)}/month`]}),(0,x.jsx)(s,{children:c.description})]})]})})]}):null})})}),(0,x.jsx)(`div`,{className:`container md:hidden mb:block px-4`,children:(0,x.jsx)(`div`,{className:`row justify-center no-gutter`,children:(0,x.jsx)(`div`,{className:`col-12 no-gutter`,children:k?(0,x.jsx)(`table`,{className:l(`rounded-lg`,`border border-stone-300 border-separate border-spacing-0`,`overflow-hidden w-full table-fixed my-4`,`block md:hidden`),children:(0,x.jsxs)(`tbody`,{children:[(0,x.jsxs)(`tr`,{children:[(0,x.jsxs)(`th`,{className:l(`px-3 py-2 bg-crema-100 col-6`,`border-b border-stone-300`),children:[(0,x.jsxs)(r.sm,{bold:!0,children:[c.deferred?`Amount financed`:null,!c.deferred&&c.interest_rate>0?`Total payments`:null,!c.deferred&&c.interest_rate===0?(0,x.jsx)(`div`,{children:`Total payments`}):null]}),!c.deferred&&c.interest_rate>0?(0,x.jsx)(`div`,{className:`type-body-legal`,children:`(including interest)`}):null]}),(0,x.jsx)(`td`,{className:l(`px-3 py-2 col-5`,`border-b border-stone-300`),children:S(D,!0)})]}),(0,x.jsxs)(`tr`,{children:[(0,x.jsxs)(`th`,{className:l(`px-3 py-2 bg-crema-100`,`border-b border-stone-300`),children:[(0,x.jsxs)(r.sm,{bold:!0,children:[c.deferred?`Suggested monthly payments`:null,!c.deferred&&c.interest_rate>0?`Fixed monthly payments`:null,!c.deferred&&c.interest_rate===0?`Equal monthly payments`:null]}),!c.deferred&&c.interest_rate>0?(0,x.jsx)(`div`,{className:`type-body-legal`,children:`(including interest)`}):null]}),(0,x.jsxs)(`td`,{className:l(`px-3 py-2 col-8`,`border-b border-stone-300`),children:[c.value>=30&&c.deferred?`${S(c.value,!0)}/month`:null,c.value<30&&c.deferred?(0,x.jsx)(`span`,{children:`Unavailable`}):null,c.deferred?null:`${S(c.value,!0)}/month`]})]}),(0,x.jsx)(`tr`,{children:(0,x.jsx)(`td`,{colSpan:2,className:`px-2 py-4 pl-6 m-0`,children:(0,x.jsx)(s,{children:c.description})})})]})}):null})})}),n?null:(0,x.jsx)(`div`,{className:`px-2`,children:`See if you prequalify without affecting your credit score or apply now.`}),n?null:(0,x.jsxs)(`div`,{className:`mt-6 px-2`,children:[(0,x.jsx)(h,{id:O.prequal,variant:`primary`,onClick:t,launchChildWindow:`pre-qual`,siteCode:a?.prequal||void 0,children:`Prequalify now`}),(0,x.jsx)(h,{id:O.apply,variant:`ghost`,onClick:t,launchChildWindow:`apply-in-site`,siteCode:a?.apply||void 0,className:`ml-4`,children:`Apply now`})]}),T?.legal_disclaimer_message?(0,x.jsx)(`div`,{className:`relative px-2 type-body-legal`,children:(0,x.jsx)(s,{className:`mt-8`,children:T.legal_disclaimer_message})}):null]})}function T({financing:e,footNoteIcon:t,stacked:n}){let{value:i,months:a=12}=e,o=S(i,!0);return(0,x.jsxs)(`span`,{children:[(0,x.jsxs)(r.sm,{bold:!0,children:[o,`/mo`]}),` with`,n?``:` `,(0,x.jsx)(`br`,{className:l({hidden:!n})}),a,` mo`,` `,(0,x.jsxs)(`span`,{className:`whitespace-nowrap`,children:[`financing`,(0,x.jsx)(`span`,{className:`inline-block`,children:`*`}),t?(0,x.jsx)(`span`,{className:`ml-0.5`,children:t}):null,(0,x.jsx)(f,{name:`help`,size:`sm`,className:`ml-1`})]})]})}function E({footNoteIcon:e,stacked:t}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(r.sm,{bold:!0,children:`$1/mo`}),` for the first`,` `,(0,x.jsx)(`br`,{className:l({hidden:!t})}),`3 mo with 0%`,(0,x.jsxs)(`span`,{className:`whitespace-nowrap`,children:[` `,`interest`,e?(0,x.jsx)(`span`,{className:`ml-0.5`,children:e}):null,(0,x.jsx)(f,{name:`help`,size:`sm`,className:`ml-1`})]})]})}function D({financing:e}){let{value:t,months:n=12}=e,i=S(t,!0);return(0,x.jsxs)(r.sm,{children:[(0,x.jsxs)(`b`,{children:[i,`/sugg.`]}),` mo payment w/ `,n,`-mo special financing`,` `,(0,x.jsx)(`span`,{className:`underline`,children:`See how`})]})}function O({financing:e,className:t=``,btnClasses:n=``,variant:r=`secondary_black`,footNoteIcon:i=null,allowDefault:a=!1,allowNonStackable:s=!1,label:c,hideCta:u=!1,name:d=``,siteCode:f,stacked:m=!1,financing_options:h,children:g,..._}){let v=o(e,a,s);if(!e||!v)return null;let{value:b,months:w=12}=e,O=`${S(b,!0)}/mo with ${w} mo financing. Click for more info.`;function k(t){C({financing:e,value:b,trigger:t.currentTarget,name:d,hideCta:u,siteCode:f,financing_options:h,title:y})}let A=e.deferred?D:null,j=!e.deferred&&(e.dollar_per_month_offer?E:T);return(0,x.jsx)(`div`,{className:t,children:(0,x.jsx)(p.Link,{className:l(`text-left`,n),variant:r,onClick:k,"data-element-tag":`default.financing.modal`,..._,"aria-label":c||O,children:g||(0,x.jsxs)(x.Fragment,{children:[A?(0,x.jsx)(A,{financing:e}):null,!A&&j?(0,x.jsx)(j,{financing:e,footNoteIcon:i,stacked:m}):null]})})})}O.Modal=w,O.Title=y,O.One$pmCopy=E,O.DefaultCopy=T,O.DeferredCopy=D;export{C as n,O as t};
5//# sourceMappingURL=PaymentsPerMonth-DZmRevKC.js.map

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.