PageSourceSearch

https://www.newlifemortgages.ca/_next/static/chunks/08m_mklb8c7s9.js

js newlifemortgages.ca collected 2026-10-04 05:22:19 UTC 36,511 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,46372,e=>{"use strict";function a(e,a,t){e=Math.max(0,e);let r=Math.pow(1+(a=Math.max(0,a))/100/2,2/12)-1,n=12*(t=Math.max(0,t));return n<=0?0:r>0?e*r*Math.pow(1+r,n)/(Math.pow(1+r,n)-1):e/n}function t(e){return(e=Math.max(0,e))<=55e3?.005*e:e<=25e4?275+(e-55e3)*.01:e<=4e5?2225+(e-25e4)*.015:e<=2e6?4475+(e-4e5)*.02:36475+(e-2e6)*.025}e.s(["calculateBlogQualifier",0,function(e,a,t,r,n){e=Math.max(0,e),a=Math.max(0,a),t=Math.max(0,t),r=Math.max(0,r),n=Math.max(0,n);let l=e,s=Math.max(r+2,5.25),d=Math.pow(1+r/100/2,2/12)-1,i=Math.pow(1+s/100/2,2/12)-1,o=d>0?d*Math.pow(1+d,300)/(Math.pow(1+d,300)-1):.0033333333333333335,c=i>0?i*Math.pow(1+i,300)/(Math.pow(1+i,300)-1):.0033333333333333335,x=e*(n>=680?.39:.35)/12,u=e*(n>=680?.44:.42)/12-a,h=Math.max(0,Math.min(x,u)),p=h-.001*t-120,m=0;p>0&&(m=p/(c+.001));let b=(m=100*Math.round(m/100))+t,g=Math.min(b,n>=620?t<25e3?t/.05:t<125e3?10*t+25e4:t<3e5?1499999:t/.2:t/.2),y=Math.max(0,g-t),k=0,f=Math.max(0,(k=n>=620?g<=5e5?.05*g:g<15e5?25e3+(g-5e5)*.1:.2*g:.2*g)-t),j=Math.round(y*o),w=Math.round(y*c),M=w+.001*g+120,N=l>0?parseFloat((M/(l/12)*100).toFixed(1)):0,v=l>0?parseFloat(((M+a)/(l/12)*100).toFixed(1)):0,S=l>0&&N<=(n>=680?39:35)&&v<=(n>=680?44:42)&&t>=k;return{maxHousingGDS:Math.round(x),maxHousingTDS:Math.round(u),maxHousingPayment:Math.round(h),borrowingCapacity:y,maxPurchasePrice:Math.round(g),minDownPaymentRequired:Math.round(k),downPaymentShortfall:Math.round(f),actualMonthlyPayment:j,stressedMonthlyPayment:w,gdsRatio:N,tdsRatio:v,isQualified:S}},"calculateDebtConsolidation",0,function(e,t,r=25,n=3500){let l=e.reduce((e,a)=>e+Math.max(0,a.balance),0),s=e.reduce((e,a)=>e+Math.max(0,a.monthlyPayment),0),d=0;l>0&&(d=e.reduce((e,a)=>e+Math.max(0,a.balance)*Math.max(0,a.interestRate),0)/l);let i=l>0?a(l,t,r):0,o=Math.max(0,s-i),c=Math.round(d/100*l*5),x=Math.pow(1+t/100/2,2/12)-1,u=l,h=0;for(let e=0;e<60&&u>0;e++){let e=u*x,a=Math.min(u,i-e);h+=e,u-=a}let p=Math.max(0,Math.round(c-h)),m=o>0?Math.max(1,Math.round(n/o)):0;return{totalNonMortgageBalance:Math.round(l),currentTotalMonthlyPayment:Math.round(s),blendedNonMortgageRate:parseFloat(d.toFixed(2)),newConsolidatedMortgagePayment:Math.round(i),monthlyCashSavings:Math.round(o),fiveYearInterestNonMortgage:c,fiveYearInterestConsolidated:Math.round(h),fiveYearNetInterestSavings:p,estimatedPenalty:n,breakevenMonths:m}},"calculateEquityAudit",0,function(e,a,t,r,n,l,s){e=Math.max(0,e),a=Math.max(0,a),t=Math.max(0,t),r=Math.max(0,r),n=Math.max(0,n),l=Math.max(0,l);let d=e>0?a/e*100:0,i=.8*e,o=Math.max(0,i-a),c=a+Math.min(s=Math.max(0,s),o),x=Math.max(l+2,5.25),u=Math.pow(1+l/100/2,2/12)-1,h=Math.pow(1+x/100/2,2/12)-1,p=Math.round(c*(u>0?u*Math.pow(1+u,300)/(Math.pow(1+u,300)-1):.0033333333333333335)),m=Math.round(c*(h>0?h*Math.pow(1+h,300)/(Math.pow(1+h,300)-1):.0033333333333333335)),b=m+.001*e+120,g=r>=680?39:35,y=r>=680?44:42,k=t>0?parseFloat((b/(t/12)*100).toFixed(1)):0,f=t>0?parseFloat(((b+n)/(t/12)*100).toFixed(1)):0,j=t>0&&k<=g&&f<=y&&c<=i;return{currentLTV:parseFloat(d.toFixed(1)),maxRefinanceAmount:Math.round(i),availableEquity:Math.round(o),newMonthlyPayment:p,stressedMonthlyPayment:m,gdsRatio:k,tdsRatio:f,isQualified:j}},"calculateIncentiveStack",0,function(e,a,r,n,l,s){var d,i,o,c,x,u;e=Math.max(0,e),r=Math.max(0,r),n=Math.max(0,n),l=Math.max(0,l),s=Math.max(0,s);let h=(d=r,i=n,o=l,c=s,(d=Math.max(0,d))+(i=Math.max(0,i))+(o=Math.max(0,o))+(c=Math.max(0,c))),p=(x=e,u=a,(x=Math.max(0,x),"newBuild"!==u)?0:x<=1e6?.13*x:x<=15e5?13e4:x<=185e4?13e4-(x-15e5)*106e3/35e4:24e3),m=t(e),b=Math.min(m,4e3),g=Math.max(0,m-b),y=e>0?h/e*100:0;return{stackedCapital:Math.round(h),hstRebate:Math.round(p),rawLTT:Math.round(m),lttRefund:Math.round(b),netLTT:Math.round(g),totalTaxSavings:Math.round(p+b),coveragePercent:parseFloat(y.toFixed(1))}},"calculateLandTransfer",0,function(e,a,r){let n=t(e=Math.max(0,e)),l=a?Math.min(n,4e3):0,s=0,d=0;r&&(s=t(e),d=a?Math.min(s,4475):0);let i=Math.round(n),o=Math.round(l),c=Math.round(s),x=Math.round(d),u=Math.max(0,i-o)+Math.max(0,c-x);return{provincialTax:i,provincialRebate:o,municipalTax:c,municipalRebate:x,netTax:u}},"calculateMonthlyPayment",0,a,"calculateMortgageDetails",0,function(e,t,r,n){e=Math.max(0,e),t=Math.max(0,t),r=Math.max(0,r),n=Math.max(0,n);let l=function(e,a){if(e=Math.max(0,e),a=Math.max(0,a),e<=0||e>=15e5||a>=.2*e)return 0;let t=(e-a)/e*100,r=0;return t>95||t>90?r=.04:t>85?r=.031:t>80&&(r=.028),(e-a)*r}(e,t),s=e-t+l,d=a(s,r,n);return{cmhcPremium:l,totalLoanAmount:s,monthlyPayment:d}},"generateAmortizationSchedule",0,function(e,t,r,n=!1){if(e=Math.max(0,e),t=Math.max(0,t),r=Math.max(0,r),0===e||0===r)return{schedule:[],totalInterestPaid:0,totalPrincipalPaid:0,payoffYears:0,interestSavedComparedToMonthly:0,yearsSavedComparedToMonthly:0};let l=a(e,t,r),s=0;{let a=Math.pow(1+t/100/2,2/12)-1,n=e,d=12*r;for(let e=0;e<d&&n>.01;e++){let e=n*a,t=Math.min(n,l-e);s+=e,n-=t}}let d=[],i=e,o=0,c=0;if(n){let e=Math.round(l/2*100)/100,a=Math.pow(1+t/100/2,2/26)-1,n=0;for(let t=1;t<=r+2&&i>.01;t++){let r=i,l=0,s=0,x=0;for(let t=0;t<26&&i>.01;t++){n++;let t=i*a,r=Math.min(i,e-t);l+=t,s+=r,x+=t+r,i-=r}if(o+=l,c+=s,d.push({year:t,startingBalance:Math.round(r),annualPayment:Math.round(x),principalPaid:Math.round(s),interestPaid:Math.round(l),endingBalance:Math.max(0,Math.round(i))}),i<=.01)break}
1let x=parseFloat((n/26).toFixed(1)),u=Math.max(0,Math.round(s-o)),h=parseFloat(Math.max(0,r-x).toFixed(1));return{schedule:d,totalInterestPaid:Math.round(o),totalPrincipalPaid:Math.round(c),payoffYears:x,interestSavedComparedToMonthly:u,yearsSavedComparedToMonthly:h}}{let e=Math.pow(1+t/100/2,2/12)-1;for(let a=1;a<=r&&i>.01;a++){let t=i,r=0,n=0,s=0;for(let a=0;a<12&&i>.01;a++){let a=i*e,t=Math.min(i,l-a);r+=a,n+=t,s+=a+t,i-=t}if(o+=r,c+=n,d.push({year:a,startingBalance:Math.round(t),annualPayment:Math.round(s),principalPaid:Math.round(n),interestPaid:Math.round(r),endingBalance:Math.max(0,Math.round(i))}),i<=.01)break}return{schedule:d,totalInterestPaid:Math.round(o),totalPrincipalPaid:Math.round(c),payoffYears:r,interestSavedComparedToMonthly:0,yearsSavedComparedToMonthly:0}}},"getMinDownPayment",0,function(e){return Math.round(100*((e=Math.max(0,e))>=15e5?.2*e:e>5e5?25e3+(e-5e5)*.1:.05*e))/100},"getPaymentByFrequency",0,function(e,a){switch(a){case"monthly":return Math.round(100*e)/100;case"accelerated-bi-weekly":return Math.round(e/2*100)/100;case"bi-weekly":return Math.round(12*e/26*100)/100;case"accelerated-weekly":return Math.round(e/4*100)/100;case"weekly":return Math.round(12*e/52*100)/100}}])},66594,e=>{"use strict";var a=e.i(43476),t=e.i(71645),r=e.i(46372);e.s(["default",0,function({defaultCity:e="London"}){let[n,l]=(0,t.useState)(12e4),[s,d]=(0,t.useState)(400),[i,o]=(0,t.useState)(5e4),[c,x]=(0,t.useState)(4.49),[u,h]=(0,t.useState)(720),p=u>=680?39:35,m=u>=680?44:42,[b,g]=(0,t.useState)(""),[y,k]=(0,t.useState)(""),[f,j]=(0,t.useState)(""),[w,M]=(0,t.useState)(!1),[N,v]=(0,t.useState)(!1),[S,P]=(0,t.useState)(""),[C,$]=(0,t.useState)(()=>(0,r.calculateBlogQualifier)(12e4,400,5e4,4.49,720));(0,t.useEffect)(()=>{$((0,r.calculateBlogQualifier)(n,s,i,c,u))},[n,s,i,c,u]);let L=async a=>{if(a.preventDefault(),!b||!y||!f)return void P("Please fill out all fields.");M(!0),P("");try{let a=await fetch("/api/leads",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b,email:y,phone:f,cityName:e,purchasePrice:C.maxPurchasePrice,downPayment:i,goal:"PRE_QUALIFY",customNotes:`Pre-qualification check for ${e}. Annual Income: $${n.toLocaleString()}, Monthly Debt: $${s.toLocaleString()}, Calculated Borrowing Capacity: $${C.borrowingCapacity.toLocaleString()}, Max Purchase Price: $${C.maxPurchasePrice.toLocaleString()}.`})});if(a.ok)v(!0),g(""),k(""),j("");else{let e=await a.json();P(e.message||"Failed to submit qualification request.")}}catch(e){console.error("Qualifier lead submission error:",e),P("An unexpected connection error occurred. Please try again.")}finally{M(!1)}};return(0,a.jsxs)("div",{className:"bento-card p-6 border border-black/[0.08] dark:border-white/[0.08] rounded-xl shadow-sm space-y-6 my-8 bg-neutral-50/50 dark:bg-[#0c0c0e]/30 backdrop-blur-md",children:[(0,a.jsxs)("div",{className:"space-y-1.5 border-b border-black/[0.06] dark:border-white/[0.06] pb-4",children:[(0,a.jsx)("span",{className:"inline-block px-2 py-0.5 rounded text-[9px] font-black uppercase tracking-wider text-blue-primary dark:text-cyan-accent bg-blue-primary/5 dark:bg-cyan-accent/10 border border-blue-primary/10",children:"Interactive Lead Tool"}),(0,a.jsxs)("h3",{className:"font-extrabold text-base tracking-tight text-neutral-900 dark:text-white",children:["2026 Home Purchase Qualifier (",e," Ontario)"]}),(0,a.jsxs)("p",{className:"text-[11px] text-neutral-500",children:["Calculate your maximum buying power using official GDS/TDS debt service thresholds (",p,"% / ",m,"%) and the 2026 mortgage stress test."]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[(0,a.jsxs)("div",{className:"lg:col-span-6 space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[10px] font-bold text-neutral-500 uppercase tracking-wider",children:"Annual Household Income"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5 rounded",children:["$",n.toLocaleStr
1ing()]})]}),(0,a.jsx)("input",{type:"range",min:4e4,max:35e4,step:5e3,value:n,onChange:e=>l(Number(e.target.value)),className:"w-full h-1 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[9px] text-neutral-400 font-bold",children:[(0,a.jsx)("span",{children:"$40k"}),(0,a.jsx)("span",{children:"$350k"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[10px] font-bold text-neutral-500 uppercase tracking-wider",children:"Monthly Debt Payments (Car, Cards, Loans)"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5 rounded",children:["$",s.toLocaleString()]})]}),(0,a.jsx)("input",{type:"range",min:0,max:3e3,step:100,value:s,onChange:e=>d(Number(e.target.value)),className:"w-full h-1 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[9px] text-neutral-400 font-bold",children:[(0,a.jsx)("span",{children:"$0"}),(0,a.jsx)("span",{children:"$3,000/mo"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[10px] font-bold text-neutral-500 uppercase tracking-wider",children:"Down Payment Savings"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5 rounded",children:["$",i.toLocaleString()]})]}),(0,a.jsx)("input",{type:"range",min:1e4,max:4e5,step:5e3,value:i,onChange:e=>o(Number(e.target.value)),className:"w-full h-1 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[9px] text-neutral-400 font-bold",children:[(0,a.jsx)("span",{children:"$10k"}),(0,a.jsx)("span",{children:"$400k"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[10px] font-bold text-neutral-500 uppercase tracking-wider block",children:"Estimated Credit Score"}),(0,a.jsx)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5 rounded",children:u})]}),(0,a.jsx)("input",{type:"range",min:550,max:850,step:10,value:u,onChange:e=>h(Number(e.target.value)),className:"w-full h-1 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[9px] text-neutral-400 font-bold",children:[(0,a.jsx)("span",{children:"550 (Poor)"}),(0,a.jsx)("span",{children:"680+ (Prime)"}),(0,a.jsx)("span",{children:"850 (Excellent)"})]}),u<620?(0,a.jsx)("p",{className:"text-[9px] text-amber-500 font-bold",children:"⚠️ Score under 620 requires conventional 20% down payment (high-ratio insured not allowed)."}):u<680?(0,a.jsx)("p",{className:"text-[9px] text-blue-primary dark:text-cyan-accent font-bold",children:"ℹ️ Score under 680 scales GDS/TDS caps back to 35% / 42%."}):null]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-[10px] font-bold text-neutral-500 uppercase tracking-wider block",children:"Contract Interest Rate (5-Year Fixed Wholesale)"}),(0,a.jsxs)("select",{value:c,onChange:e=>x(Number(e.target.value)),className:"w-full px-3 py-2 text-xs rounded-lg border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-[#09090b] text-neutral-900 dark:text-white font-extrabold focus:outline-none focus:border-blue-primary dark:focus:border-cyan-accent",children:[(0,a.jsx)("option",{value:4.39,children:"4.39% (3-Year Fixed Insured)"}),(0,a.jsx)("option",{value:4.45,children:"4.45% (3-Year Fixed Conventional)"}),(0,a.jsx)("option",{value:4.49,children:"4.49% (5-Year Fixed Insured)"}),(0,a.jsx)("option",{value:4.64,children:"4.64% (5-Year Fixed Conventional)"}),(0,a.jsx)("option",{value:3.5,children:"3.50% (5-Year Variable)"})]})]})]}),(0,a.jsxs)("div",{className:"lg:col-span-6 space-y-6 bg-white dark:bg-neutral-900/40 p-5 rounded-xl border border-black/[0.04] dark:border-white/[0.04]",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("h4",{className:"text-xs font-bold text-neutral-400 uppercase tracking-wider",children:"Qualifying Estimate"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"bg-black/[0.02] dark:bg-white/[0.01] p-3 rounded-lg border border-black/[0.04] dark:border-white/[0.04]",children:[(0,a.jsx)("span",{className:"text-[9px] font-bold text-neutral-500 uppercase block",children:"Max Purchase Price"}),(0,a.jsxs)("span",{className:"text-lg font-black text-blue-primary dark:text-cyan-accent",children:["$",C.maxPurchasePrice.toLocaleStr
1ing()]})]}),(0,a.jsxs)("div",{className:"bg-black/[0.02] dark:bg-white/[0.01] p-3 rounded-lg border border-black/[0.04] dark:border-white/[0.04]",children:[(0,a.jsx)("span",{className:"text-[9px] font-bold text-neutral-500 uppercase block",children:"Max Borrowing (Mortgage)"}),(0,a.jsxs)("span",{className:"text-lg font-black text-neutral-800 dark:text-neutral-200",children:["$",C.borrowingCapacity.toLocaleString()]})]})]}),(0,a.jsxs)("div",{className:"space-y-2 pt-2 text-xs",children:[(0,a.jsxs)("div",{className:"flex justify-between border-b border-black/[0.04] dark:border-white/[0.04] pb-1.5",children:[(0,a.jsxs)("span",{className:"text-neutral-500",children:["Calculated GDS Ratio (Max ",p,"%):"]}),(0,a.jsxs)("span",{className:`font-black ${C.gdsRatio>p?"text-red-500":"text-emerald-600 dark:text-emerald-400"}`,children:[C.gdsRatio,"%"]})]}),(0,a.jsxs)("div",{className:"flex justify-between border-b border-black/[0.04] dark:border-white/[0.04] pb-1.5",children:[(0,a.jsxs)("span",{className:"text-neutral-500",children:["Calculated TDS Ratio (Max ",m,"%):"]}),(0,a.jsxs)("span",{className:`font-black ${C.tdsRatio>m?"text-red-500":"text-emerald-600 dark:text-emerald-400"}`,children:[C.tdsRatio,"%"]})]}),(0,a.jsxs)("div",{className:"flex justify-between border-b border-black/[0.04] dark:border-white/[0.04] pb-1.5",children:[(0,a.jsx)("span",{className:"text-neutral-500",children:"Min Down Payment Required:"}),(0,a.jsxs)("span",{className:"font-black text-neutral-800 dark:text-neutral-200",children:["$",C.minDownPaymentRequired.toLocaleString()]})]}),(0,a.jsxs)("div",{className:"flex justify-between pt-1",children:[(0,a.jsxs)("span",{className:"text-neutral-500",children:["Actual Monthly Payment (",c,"%):"]}),(0,a.jsxs)("span",{className:"font-extrabold text-neutral-800 dark:text-neutral-200",children:["$",C.actualMonthlyPayment.toLocaleString(),"/mo"]})]}),(0,a.jsxs)("div",{className:"flex justify-between text-[11px] text-neutral-400",children:[(0,a.jsxs)("span",{children:["Stressed Qualifying Payment (",c+2,"%):"]}),(0,a.jsxs)("span",{children:["$",C.stressedMonthlyPayment.toLocaleString(),"/mo"]})]})]})]}),C.isQualified?(0,a.jsxs)("div",{className:"p-3 bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 rounded-lg text-[11px] font-bold flex items-center justify-between",children:[(0,a.jsx)("span",{children:"✅ Fully Qualified to Purchase!"}),(0,a.jsx)("span",{className:"text-[9px] bg-emerald-500/20 px-2 py-0.5 rounded uppercase font-black",children:"Pre-Approved"})]}):n<=0||C.maxPurchasePrice<=i?(0,a.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-lg text-[11px] font-bold",children:"⚠️ Income parameters are too low to qualify for a mortgage. Try increasing household income or reducing debts."}):C.downPaymentShortfall>0?(0,a.jsxs)("div",{className:"p-3 bg-amber-500/10 border border-amber-500/20 text-amber-600 dark:text-amber-400 rounded-lg text-[11px] font-bold",children:["⚠️ Down Payment Shortfall: You need at least $",C.minDownPaymentRequired.toLocaleString()," to purchase a home at this price. Shortfall is $",C.downPaymentShortfall.toLocaleString(),"."]}):(0,a.jsx)("div",{className:"p-3 bg-red-500/10 border border-red-500/20 text-red-600 dark:text-red-400 rounded-lg text-[11px] font-bold",children:"⚠️ Debt Ratio Limit Exceeded: GDS or TDS ratio exceeds the allowable threshold for your credit score. Try reducing monthly debts."}),N?(0,a.jsx)("div",{className:"bg-emerald-500/10 border border-emerald-500/20 text-emerald-600 dark:text-emerald-400 p-4 rounded-lg text-xs font-bold text-center",children:"🎉 Rate lock request submitted successfully! Dallas Martin will contact you shortly to complete your pre-qualification audit."}):(0,a.jsxs)("form",{onSubmit:L,className:"space-y-3 pt-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-bold text-neutral-400 uppercase tracking-wider block",children:"Lock in this Qualifying Rate"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:"Your Name",value:b,onChange:e=>g(e.target.value),className:"px-3 py-2 text-xs rounded-lg border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-[#09090b] text-neutral-900 dark:text-white",required:!0}),(0,a.jsx)("input",{type:"email",placeholder:"Your Email",value:y,onChange:e=>k(e.target.value),className:"px-3 py-2 text-xs rounded-lg border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-[#09090b] text-neutral-900 dark:text-white",required:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"tel",placeholder:"Phone Number",value:f,onChange:e=>j(e.target.value),className:"flex-1 px-3 py-2 text-xs rounded-lg border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-[#09090b] text-neutral-900 dark:text-white",required:!0}),(0,a.jsx)("button",{type:"submit",disabled:w,className:"px-4 py-2 text-xs font-bold uppercase tracking-wider bg-blue-primary text-white dark:bg-cyan-accent dark:text-black rounded-lg hover:opacity-90 transition-smooth disabled:opacity-50",children:w?"Sending...":"Lock Rate"})]}),S&&(0,a.jsx)("p",{className:"text-[10px] text-red-500 font-bold",children:S})]})]})]})]})}])},12458,e=>{"use strict";var a=e.i(43476),t=e.i(71645);e.s(["default",0,function({defaultCity:e="London"}){var r;let[n,l]=(0,t.useState)(75e4),[s,d]=(0,t.useState)(4200),[i,o]=(0,t.useState)(3e3),[c,x]=(0,t.useState)(600),[u,h]=(0,t.useState)(25050),[p,m]=(0,t.useState)(5.75),[b,g]=(0,t.useState)(25),[y,k]=(0,t.useState)(25),[f,j]=(0,t.useState)(""),[w,M]=(0,t.useState)(""),[N,v]=(0,t.useState)(""),[S,P]=(0,t.useState)(""),[C,$]=(0,t.useState)(""),[L,D]=(0,t.useState)(!1),[R,T]=(0,t.useState)(!1),[F,A]=(0,t.useState)(""),I=(0,t.useMemo)(()=>{let e=12*(s+i+c),a=Math.max(0,e-u),t=b/100*n,r=Math.max(0,n-t),l=Math.pow(1+p/100/2,2/12)-1,d=12*y,o=0;r>0&&l>0&&(o=r*l/(1-Math.pow(1+l,-d)));let x=12*o,h=a/1.25/12,m=0;l>0&&h>0&&(m=h*(1-Math.pow(1+l,-d))/l);let g=1-b/100,k=g>0?m/g:m;return{grossAnnualRevenue:e,netOperatingIncome:a,downPaymentAmount:t,loanAmount:r,monthlyPayment:o,annualDebtService:x,dscr:x>0?a/x:0,maxLoanSupported:m,maxPurchasePriceSupported:k,annualNetSurplus:a-x}},[n,s,i,c,u,p,b,y]),q=async a=>{if(a.preventDefault(),!f||!w||!N)return void A("Please fill out your name, email, and ph
1one number.");D(!0),A("");try{(await fetch("/api/leads",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:f,email:w,phone:N,cityName:e,purchasePrice:n,downPayment:I.downPaymentAmount,website:C,goal:"COMMERCIAL_DSCR_ASSESSMENT",customNotes:`Commercial DSCR Tool Inquiry. Property: ${S||e}. Purchase Price: $${n.toLocaleString()}, Calculated DSCR: ${I.dscr.toFixed(2)}x, NOI: $${I.netOperatingIncome.toLocaleString()}, Monthly ADS: $${I.monthlyPayment.toFixed(2)}, Max Loan Supported: $${Math.round(I.maxLoanSupported).toLocaleString()}.`})})).ok?T(!0):A("Submission failed. Please call 519-495-7250 direct.")}catch{A("Network error. Please call Dallas Martin at 519-495-7250.")}finally{D(!1)}},B=(r=I.dscr)>=1.25?{label:"Institutional Prime Approved (Clears Tier-1 Bank & Credit Union Covenants)",bgColor:"bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 border-emerald-500/20",icon:"✓"}:r>=1.15?{label:"Alt-A / Hybrid Qualified (Monoline B-Lender or Credit Union Flexibility)",bgColor:"bg-amber-500/10 text-amber-700 dark:text-amber-400 border-amber-500/20",icon:"ℹ"}:{label:"Debt Service Shortfall (Requires Additional Down Payment or Private Bridge)",bgColor:"bg-rose-500/10 text-rose-700 dark:text-rose-400 border-rose-500/20",icon:"⚠️"};return(0,a.jsxs)("div",{className:"my-10 bento-card p-6 sm:p-8 bg-white dark:bg-neutral-900 border border-black/[0.08] dark:border-white/[0.08] rounded-2xl shadow-xl space-y-6 min-h-[620px]",children:[(0,a.jsxs)("div",{className:"border-b border-black/[0.06] dark:border-white/[0.06] pb-5 space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"inline-block px-2.5 py-0.5 rounded text-[10px] font-black uppercase tracking-wider text-blue-primary dark:text-cyan-accent bg-blue-primary/10 dark:bg-cyan-accent/10 border border-blue-primary/20",children:"Interactive Institutional Underwriting Tool"}),(0,a.jsx)("span",{className:"text-xs text-neutral-500 font-medium",children:"Dallas Martin • FSRA Licence #M17001133"})]}),(0,a.jsxs)("h3",{className:"font-extrabold text-lg sm:text-xl tracking-tight text-neutral-900 dark:text-white",children:["Commercial Mixed-Use Debt Sizing & DSCR Calculator (",e,", Ontario)"]}
1),(0,a.jsx)("p",{className:"text-xs text-neutral-600 dark:text-neutral-400",children:"Model real-time Debt Service Coverage Ratios (DSCR), Net Operating Income (NOI), and maximum borrowing capacity for storefronts with residential apartments across Southwestern Ontario."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8 items-start",children:[(0,a.jsxs)("div",{className:"lg:col-span-6 space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[11px] font-bold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider",children:"Purchase Price / Valuation"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.04] dark:bg-white/[0.06] px-2 py-0.5 rounded",children:["$",n.toLocaleString()]})]}),(0,a.jsx)("input",{type:"range",min:35e4,max:25e5,step:25e3,value:n,onChange:e=>l(Number(e.target.value)),className:"w-full h-1.5 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-neutral-400 font-semibold",children:[(0,a.jsx)("span",{children:"$350,000"}),(0,a.jsx)("span",{children:"$2,500,000"})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[11px] font-bold text-neutral-600 dar
1k:text-neutral-400 uppercase tracking-wider",children:"Monthly Residential Rent (Upper Units)"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.04] dark:bg-white/[0.06] px-2 py-0.5 rounded",children:["$",s.toLocaleString(),"/mo"]})]}),(0,a.jsx)("input",{type:"range",min:0,max:15e3,step:100,value:s,onChange:e=>d(Number(e.target.value)),className:"w-full h-1.5 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-neutral-400 font-semibold",children:[(0,a.jsx)("span",{children:"$0"}),(0,a.jsx)("span",{children:"$15,000/mo"})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[11px] font-bold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider",children:"Monthly Commercial Base Rent"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.04] dark:bg-white/[0.06] px-2 py-0.5 rounded",children:["$",i.toLocaleString(),"/mo"]})]}),(0,a.jsx)("input",{type:"range",min:0,max:2e4,step:100,value:i,onChange:e=>o(Number(e.target.value)),className:"w-full h-1.5 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-neutral-400 font-semibold",children:[(0,a.jsx)("span",{children:"$0"}),(0,a.jsx)("span",{children:"$20,000/mo"})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[11px] font-bold text-neutral-600 dar
1k:text-neutral-400 uppercase tracking-wider",children:"Monthly TMI Recoveries (Taxes, Maint, Ins)"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.04] dark:bg-white/[0.06] px-2 py-0.5 rounded",children:["$",c.toLocaleString(),"/mo"]})]}),(0,a.jsx)("input",{type:"range",min:0,max:5e3,step:50,value:c,onChange:e=>x(Number(e.target.value)),className:"w-full h-1.5 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-neutral-400 font-semibold",children:[(0,a.jsx)("span",{children:"$0"}),(0,a.jsx)("span",{children:"$5,000/mo"})]})]}),(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("label",{className:"text-[11px] font-bold text-neutral-600 dark:text-neutral-400 uppercase tracking-wider",children:"Annual Property Expenses (Taxes, Ins, Util)"}),(0,a.jsxs)("span",{className:"text-xs font-black text-neutral-900 dark:text-white bg-black/[0.04] dark:bg-white/[0.06] px-2 py-0.5 rounded",children:["$",u.toLocaleString(),"/yr"]})]}),(0,a.jsx)("input",{type:"range",min:5e3,max:8e4,step:500,value:u,onChange:e=>h(Number(e.target.value)),className:"w-full h-1.5 bg-neutral-200 dark:bg-neutral-800 rounded-lg appearance-none cursor-pointer accent-blue-primary dark:accent-cyan-accent"}),(0,a.jsxs)("div",{className:"flex justify-between text-[10px] text-neutral-400 font-semibold",children:[(0,a.jsx)("span",{children:"$5,000"}),(0,a.jsx)("span",{children:"$80,000/yr"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-3 pt-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[10px] font-bold text-neutral-500 uppercase mb-1",children:"Down Payment"}),(0,a.jsxs)("select",{value:b,onChange:e=>g(Number(e.target.value)),className:"w-full px-2 py-1.5 text-xs font-bold rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-white dark:bg-neutral-800 text-neutral-900 dark:text-white",children:[(0,a.jsx)("option",{value:20,children:"20% (Alt-A)"}),(0,a.jsx)("option",{value:25,children:"25% (Standard)"}),(0,a.jsx)("option",{value:30,children:"30% (Risk Adj)"}),(0,a.jsx)("option",{value:35,children:"35% (Commercial)"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[10px] font-bold text-neutral-500 uppercase mb-1",children:"Interest Rate"}),(0,a.jsxs)("select",{value:p,onChange:e=>m(Number(e.target.value)),className:"w-full px-2 py-1.5 text-xs font-bold rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-white dark:bg-neutral-800 text-neutral-900 dark:text-white",children:[(0,a.jsx)("option",{value:5.25,children:"5.25% (Prime)"}),(0,a.jsx)("option",{value:5.75,children:"5.75% (Wholesale)"}),(0,a.jsx)("option",{value:6.25,children:"6.25% (Alt-A)"}),(0,a.jsx)("option",{value:6.95,children:"6.95% (Commercial)"}),(0,a.jsx)("option",{value:8.95,children:"8.95% (Private)"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-[10px] font-bold text-neutral-500 uppercase mb-1",children:"Amortization"}),(0,a.jsxs)("select",{value:y,onChange:e=>k(Number(e.target.value)),className:"w-full px-2 py-1.5 text-xs font-bold rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-white dark:bg-neutral-800 text-neutral-900 dark:text-white",children:[(0,a.jsx)("option",{value:20,children:"20 Years"}),(0,a.jsx)("option",{value:25,children:"25 Years"}),(0,a.jsx)("option",{value:30,children:"30 Years"}),(0,a.jsx)("option",{value:40,children:"40 Years (CMHC)"})]})]})]})]}),(0,a.jsxs)("div",{className:"lg:col-span-6 space-y-5",children:[(0,a.jsxs)("div",{className:"p-5 rounded-xl border border-black/[0.08] dark:border-white/[0.08] bg-neutral-50 dark:bg-neutral-800/60 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[11px] font-bold text-neutral-500 uppercase tracking-wider",children:"Underwritten DSCR Metric"}),(0,a.jsxs)("span",{className:"text-2xl font-black text-blue-primary dark:text-cyan-accent",children:[I.dscr.toFixed(2),"x"]})]}),(0,a.jsxs)("div",{className:`p-3 rounded-lg border text-xs font-bold flex items-center space-x-2 ${B.bgColor}`,children:[(0,a.jsx)("span",{children:B.icon}),(0,a.jsx)("span",{children:B.label})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-2 border-t border-black/[0.06] dark:border-white/[0.06] text-xs",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] text-neutral-500 uppercase font-semibold",children:"Net Operating Income (NOI)"}),(0,a.jsxs)("p",{className:"text-sm font-black text-neutral-900 dark:text-white",children:["$",Math.round(I.netOperatingIncome).toLocaleStr
1ing(),"/yr"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] text-neutral-500 uppercase font-semibold",children:"Monthly Debt Payment (ADS)"}),(0,a.jsxs)("p",{className:"text-sm font-black text-neutral-900 dark:text-white",children:["$",Math.round(I.monthlyPayment).toLocaleString(),"/mo"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-[10px] text-neutral-500 uppercase font-semibold",children:["Required Down Payment (",b,"%)"]}),(0,a.jsxs)("p",{className:"text-sm font-black text-neutral-900 dark:text-white",children:["$",Math.round(I.downPaymentAmount).toLocaleString()]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] text-neutral-500 uppercase font-semibold",children:"Net Annual Surplus Cash Flow"}),(0,a.jsxs)("p",{className:`text-sm font-black ${I.annualNetSurplus>=0?"text-emerald-600 dark:text-emerald-400":"text-rose-600 dark:text-rose-400"}`,children:["$",Math.round(I.annualNetSurplus).toLocaleString(),"/yr"]})]})]}),(0,a.jsxs)("div",{className:"p-3 bg-blue-primary/5 dark:bg-cyan-accent/5 border border-blue-primary/15 dark:border-cyan-accent/15 rounded-lg space-y-1",children:[(0,a.jsx)("p",{className:"text-[10px] font-bold text-blue-primary dark:text-cyan-accent uppercase tracking-wider",children:"Max Supported Loan (at 1.25x Institutional Benchmark)"}),(0,a.jsxs)("p",{className:"text-base font-black text-neutral-900 dark:text-white",children:["$",Math.round(I.maxLoanSupported).toLocaleString()," ",(0,a.jsxs)("span",{className:"text-xs font-normal text-neutral-500",children:["(Supports up to $",Math.round(I.maxPurchasePriceSupported).toLocaleString()," property value)"]})]})]})]}),(0,a.jsxs)("div",{className:"p-5 rounded-xl border border-black/[0.08] dark:border-white/[0.08] bg-white dark:bg-neutral-900 space-y-3",children:[(0,a.jsx)("h4",{className:"font-extrabold text-sm text-neutral-900 dark:text-white",children:"Request Formal Institutional Debt Sizing"}),(0,a.jsx)("p",{className:"text-[11px] text-neutral-500",children:"Submit your property details to receive an institutional DSCR assessment, lease appraisal review, and 120-day wholesale rate lock from Dallas Martin."}),R?(0,a.jsx)("div",{className:"p-3 bg-emerald-500/10 border border-emerald-500/20 text-emerald-700 dark:text-emerald-400 rounded-lg text-xs font-bold text-center",children:"✓ Assessment Request Submitted! Dallas Martin will contact you within 24 hours."}):(0,a.jsxs)("form",{onSubmit:q,className:"space-y-2.5",children:[F&&(0,a.jsx)("p",{className:"text-[11px] font-bold text-rose-500",children:F}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)("input",{type:"text",placeholder:"Your Full Name",value:f,onChange:e=>j(e.target.value),className:"w-full px-2.5 py-1.5 text-xs rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-neutral-50 dark:bg-neutral-800 text-neutral-900 dark:text-white"}),(0,a.jsx)("input",{type:"tel",placeholder:"Phone (e.g. 519-555-0199)",value:N,onChange:e=>v(e.target.value),className:"w-full px-2.5 py-1.5 text-xs rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-neutral-50 dark:bg-neutral-800 text-neutral-900 dark:text-white"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)("input",{type:"email",placeholder:"Email Address",value:w,onChange:e=>M(e.target.value),className:"w-full px-2.5 py-1.5 text-xs rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-neutral-50 dark:bg-neutral-800 text-neutral-900 dark:text-white"}),(0,a.jsx)("input",{type:"text",placeholder:"Property City / Address",value:S,onChange:e=>P(e.target.value),className:"w-full px-2.5 py-1.5 text-xs rounded-lg border border-black/[0.1] dark:border-white/[0.1] bg-neutral-50 dark:bg-neutral-800 text-neutral-900 dark:text-white"})]}),(0,a.jsx)("input",{type:"text",name:"website",value:C,onChange:e=>$(e.target.value),style:{display:"none"},tabIndex:-1,autoComplete:"off","aria-hidden":"true"}),(0,a.jsx)("button",{type:"submit",disabled:L,className:"w-full py-2 px-3 text-xs font-bold uppercase tracking-wider text-white bg-blue-primary hover:bg-blue-dark dark:bg-cyan-accent dark:text-black dark:hover:bg-cyan-accent/80 rounded-lg transition-colors shadow-sm disabled:opacity-50",children:L?"Submitting...":"Get Formal Underwriting Assessment →"})]})]})]})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-black/[0.06] dark:border-white/[0.06]",children:(0,a.jsx)("p",{className:"text-[11px] leading-relaxed text-neutral-500 dark:text-neutral-400 italic",children:"Calculations and scenarios provided are for illustrative and financial modeling purposes only. Final loan terms, interest rates, loan-to-value limits, and debt service coverage requirements are subject to institutional underwriting, accredited narrative appraisal, and formal lender approval. NewLife Mortgages operates under FSRA Brokerage License #13466."})})]})}])}]);

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.