PageSourceSearch

https://www.upstart.com/static-tofu/_next/static/chunks/pages/[code]/interest-calculator-0c6763131dfaee49.js

js upstart.com collected 2026-09-24 08:48:03 UTC 5,604 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3107,4477,7783],{12013:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>E,default:()=>O});var r=a(37876),l=a(14232),n=a(44835),s=a(80716),i=a(89461),o=a(17269),c=a(75062),d=a(39963),u=a(67291),h=a.n(u),x=a(23687),j=a(17021),p=a(91162),A=a(68717),g=a(38280),m=a(85559),f=a(28110),b=a(29223),k=a(61641);let w=({children:e})=>(0,r.jsx)(x.A,{className:h().inputWrapper,atoms:{width:"max",marginX:"m",marginY:"xs"},children:e}),C=({description:e,headline:t})=>{let{t:a}=(0,b.B)("page-interest-calculator"),n=(0,f.jt)(),[s,i]=(0,l.useState)("5.0"),[o,c]=(0,l.useState)("10000"),[d,u]=(0,l.useState)("200"),[h,x]=(0,k.tx)(o,s,d),C="N/A"===x,y=(0,l.useCallback)((e,t,r)=>{let l=parseFloat(e),n=parseFloat(r)/100,s=parseFloat(t),i=Math.round(n/12*l);return s>=l?a("hero.errors.monthlyPayment.lowerThanLoan"):s<=i?a("hero.errors.monthlyPayment.moreThanValue",{value:(0,k.cs)(i,"0")}):void 0},[a]),_=(0,l.useMemo)(()=>y(o,d,s),[o,d,s,y]);function v(e,t,a,r){let l=(e.match(/\d+(\.\d*)?/g)||[""]).join("");l=l.replace(/^0*/,""),r?-1!==l.indexOf(".")&&(l=l.slice(0,l.indexOf(".")+r+1)):l=l.replace(".","");let n=!1;"."===l.charAt(l.length-1)&&(l=l.slice(0,-1),n=!0),Number(l)>t||0>Number(l)||(n&&Number(l)!==t&&(l+="."),a(l))}function N(e){let{id:t}=e.target;n("interestCalculator_textField_click",{value:t,actionType:"click"})}return(0,r.jsxs)(m.A,{headline:t,description:e,children:[(0,r.jsxs)(A.A,{headline:a("hero.widget.loanDetails"),children:[(0,r.jsx)(w,{children:(0,r.jsx)(j.A,{id:"loanAmount",inputProps:{onClick:N,type:"tel","data-testid":"loanAmount"},onChange:({target:e})=>v(e?.value,999999,c),label:a("hero.widget.loanAmount"),value:(0,k.cs)(o,"0,0"),prefixText:"$"})}),(0,r.jsx)(w,{children:(0,r.jsx)(j.A,{id:"apr",inputProps:{onClick:N,type:"tel","data-testid":"apr"},onChange:({target:e})=>v(e?.value,999,i,1),label:`${a("hero.widget.apr")} %`,value:s||"0"})}),(0,r.jsx)(w,{children:(0,r.jsx)(j.A,{id:"monthlyPayment",inputProps:{onClick:N,type:"tel","data-testid":"monthlyPayment"},onChange:({target:e})=>v(e?.value,99999,u),label:a("hero.widget.monthlyPayment"),value:(0,k.cs)(d,"0,0"),prefixText:"$",error:_})})]}),(0,r.jsxs)(g.A,{headline:a("hero.widget.results"),children:[(0,r.jsx)(p.A,{"data-testid":"total-interest-paid-result",id:"total-interest-paid-result",label:a("hero.widget.totalInterest"),value:C||_?"N/A":(0,k.cs)(x,"0,0.00"),prefix:C||Number.isFinite(x)||_?void 0:"$"}),(0,r.jsx)(p.A,{"data-testid":"months-to-pay-off-result",id:"months-to-pay-off-result",label:a("hero.widget.monthsToPayOff"),value:"N/A"===h||_?"N/A":(0,k.cs)(h,"0,0")})]})]})};var y=a(1135),_=a(25328),v=a(73111),N=a(54390),P=a(13267);let q=()=>{let{t:e}=(0,b.B)("faqs");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N.A,{question:e("interestCalculator.0.question"),children:(0,r.jsx)(P.A,{i18nAnswerKey:"interestCalculator.0.answer"})}),(0,r.jsx)(N.A,{question:e("interestCalculator.1.question"),children:(0,r.jsx)(o.x6,{i18nKey:"interestCalculator.1.answer",ns:"faqs",children:(0,r.jsxs)("a",{href:"/blog/11-financial-terms-you-should-know-before-you-owe",target:"_blank",children:[" ","helpful article"]})})}),(0,r.jsx)(N.A,{question:e("interestCalculator.2.question"),children:(0,r.jsx)(P.A,{i18nAnswerKey:"interestCalculator.2.answer"})}),(0,r.jsx)(N.A,{question:e("interestCalculator.3.question"),children:(0,r.jsx)(P.A,{i18nAnswerKey:"interestCalculator.3.answer"})})]})};var T=a(70177),S=a(42231);let F=()=>{let{t:e}=(0,b.B)("page-interest-calculator");return(0,r.jsxs)(T.l9,{value:"interestCalculator",children:[(0,r.jsxs)(c.A,{background:"light",children:[(0,r.jsx)(C,{headline:e("hero.header"),description:e("hero.description")}),(0,r.jsx)(y.A,{headline:e("getStarted.header"),description:e("getStarted.description"),footerDescription:(0,r.jsx)(o.x6,{i18nKey:"getStarted.footer",ns:"page-interest-calculator"}),CheckRateCta:(0,r.jsx)(d.A,{eventName:"interestCalculator_checkRateCta_click"})})]}),(0,r.jsx)(c.A,{background:"brand",children:(0,r.jsx)(y.A,{headline:e("howTo.header"),description:(0,r.jsx)(o.x6,{i18nKey:"howTo.description",ns:"page-interest-calculator",children:(0,r.jsxs)("a",{className:h().calculatorCtaLink,href:"/blog/how-to-calculate-debt-to-income-ratio",target:"_blank",children:[" ","debt-to-income ratio"]})}),CheckRateCta:(0,r.jsx)(d.A,{eventName:"interestCalculator_checkRateCta_click"})})}),(0,r.jsxs)(c.A,{background:"light",children:[(0,r.jsx)(v.A,{headline:e("faq.header"),children:(0,r.jsx)(q,{})}),(0,r.jsx)(d.A,{eventName:"interestCalculator_checkRateCta_click"})]}),(0,r.jsx)(c.A,{background:"brand",border:!0,children:(0,r.jsx)(S.A,{headline:e("links.headline"),links:[{href:"/blog/variable-vs-fi
1xed-rate-loans",text:e("links.one.text")},{href:"/blog/interest-rates-are-going-up",text:e("links.two.text")},{href:"/blog/11-financial-terms-you-should-know-before-you-owe",text:e("links.three.text")},{href:"/blog/borrower-story-holly",text:e("links.four.text")}]})}),(0,r.jsx)(_.A,{})]})},K=["page-interest-calculator"];var E=!0;let O=()=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.b,{namespaces:K}),(0,r.jsx)(s.A,{}),(0,r.jsx)(F,{}),(0,r.jsx)(n.A,{})]})},25328:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(37876);a(14232);var l=a(64057),n=a.n(l),s=a(54719);let i=()=>{let{container:e}=n();return(0,r.jsx)("section",{className:e,children:(0,r.jsx)(s.A,{order:1})})}},41922:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[code]/interest-calculator",function(){return a(12013)}])}},e=>{e.O(0,[3406,4443,8966,915,5642,7941,232,8050,8019,2062,2224,4236,636,6593,8792],()=>e(e.s=41922)),_N_E=e.O()}]);

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.