1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9922],{69922:function(e,a,n){n.d(a,{AZ:function(){return s},Bh:function(){return p},Bw:function(){return i},Jd:function(){return y},Wy:function(){return g},dF:function(){return m},eL:function(){return b},g:function(){return d},g4:function(){return o},o$:function(){return x},qj:function(){return t},xG:function(){return c}});var r=n(92686);let t=e=>"STR"===e?"Airbnb":"MTR"===e?"Mid-Term":"Long-Term",l=(e,a)=>e&&a&&0!=a?Number((e/a).toFixed(4)):0,u=(e,a)=>Math.round(100*l(e,a)),o=e=>"number"==typeof e?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",maximumFractionDigits:0}).format(e):"",s=e=>"number"==typeof e?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",notation:"compact",maximumFractionDigits:e>=1e6||e<1e4?1:0}).format(e):"",c=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",signDisplay:"auto",currencyDisplay:"narrowSymbol",minimumFractionDigits:0,maximumFractionDigits:0}).format(e):a},i=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!e&&!r)return"";let t=(null!=a?a:"$")==="$";var l="";n&&(l="".concat(u(e,n),"% "));var s=t?"":a;if(t&&e>1e5)e/=1e3,s="k";else if(t)return"".concat(l).concat(o(e));return"".concat(l).concat(t?"$":"").concat(null==e?void 0:e.toFixed("%"===a?1:0)).concat(s)};function m(e){let a="existingLoan"===(null!==(s=null===(t=e.details)||void 0===t?void 0:null===(r=t.request)||void 0===r?void 0:r.financingMode)&&void 0!==s?s:"newLoan"),n=[{key:"cashToInvestTotalValue",label:"Total",measurement:"$",text:"â®",readonly:!0,renderZero:!0},...a?[]:[{key:"downpaymentValue",label:"Downpayment",measurement:"$",text:"â®",readonly:!0,renderZero:!0},{key:"closingCostsValue",label:"Closing costs",measurement:"$",text:"â®",min:0,max:1e5,step:100,value:1e4,renderZero:!0}],{key:"rehabValue",label:"Rehab",measurement:"$",text:"â®",min:0,max:25e4,step:1e3,value:0,renderZero:!0},{key:"furnishingValue",label:"Furnishing",measurement:"$",text:"â®",min:0,max:1e5,step:1e3,value:0,renderZero:!0}];var r,t,l,u,o,s,c,m,v=[{group:"Financing",items:a?[{key:"mortgageMonthlyPaymentValue",label:"Monthly Mortgage Payment",measurement:"$",text:"â®",min:0,max:1e4,step:100,value:0,renderZero:!0}]:[{key:"purchasePriceValue",label:"Purchase Price",measurement:"$",text:"â®",min:0,max:1e5,step:1e3,value:5e4,renderZero:!0},{key:"mortgageDpValue",label:"Downpayment",measurement:"%",text:"â®",min:0,max:100,step:1,value:20,renderZero:!0},{key:"mortgageRateValue",label:"Interest Rate",measurement:"%",text:"â®",min:0,max:20,step:.05,value:8,renderZero:!0},{key:"mortgageTermValue",label:"Mortgage Duration",measurement:"yr.",text:"â®",min:0,max:40,step:1,value:30,renderZero:!0}]},{group:"Cash To Invest",items:n},{group:"Cashflow",items:[{key:"rentalIncomeValue",label:"Total Income",text:"â®",min:0,max:5e3,step:50,value:1e3,renderZero:!0},{key:"expensesTotalValue",label:"Total Expenses",text:"â®",readonly:!0,renderZero:!0},{key:"mortgagePrincipalInterestValue",label:"Mortgage P&I",text:"â®",readonly:!0},{key:"propertyTaxesValue",label:"Property Taxes",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"homeOwnerInsuranceValue",label:"Home Insurance",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"hoaDuesValue",label:"HOA",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"propertyManagementValue",label:"Property Management",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"capExValue",label:"CapEx",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"vacancyValue",label:"Vacancy",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"maintenanceValue",label:"Maintenance",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0},{key:"otherValue",label:"Other",text:"â®",min:0,max:2e3,step:1,value:0,renderZero:!0}]}];let g=null!==(m=null!==(c=e.rentalIncome)&&void 0!==c?c:e.rentEstimate)&&void 0!==m?m:0;0==g&&(g=.01);let d=null===(l=e.details)||void 0===l?void 0:l.mortgage,p=null===(u=e.details)||void 0===u?void 0:u.cashToInvest,x=null===(o=e.details)||void 0===o?void 0:o.monthlyExpenses,y=(null==d?void 0:d.purchasePrice)>0?null==d?void 0:d.purchasePrice:.01;return v.forEach(a=>
1{a.items.forEach(a=>{var n,r,t,l,u,o,s;switch(a.key){case"purchasePriceValue":a.max=(null==d?void 0:d.purchasePrice)>0?(null==d?void 0:d.purchasePrice)*1.2:1e5,a.value=y;break;case"mortgageDpValue":a.value=Math.round((null==d?void 0:d.downpayment)*1e4)/100;break;case"mortgageRateValue":a.value=Math.round((null==d?void 0:d.rate)*1e4)/100;break;case"mortgageTermValue":a.value=null==d?void 0:d.term;break;case"mortgageMonthlyPaymentValue":a.value=null!==(t=null===(r=e.details)||void 0===r?void 0:null===(n=r.request)||void 0===n?void 0:n.mortgageMonthlyPayment)&&void 0!==t?t:0;break;case"cashToInvestTotalValue":a.value=null==p?void 0:p.total;break;case"downpaymentValue":a.asPercentageOf=y,a.value=null==p?void 0:p.mortgageDownpayment;break;case"closingCostsValue":a.asPercentageOf=y;let c=(null==d?void 0:d.purchasePrice)>0?(null==d?void 0:d.purchasePrice)*.05:1e5;a.max=Math.max(null!==(l=null==p?void 0:p.closingCosts)&&void 0!==l?l:0,c),a.value=null==p?void 0:p.closingCosts;break;case"rehabValue":a.asPercentageOf=y;let m=(null==d?void 0:d.purchasePrice)>0?(null==d?void 0:d.purchasePrice)*.5:25e4;a.max=Math.max(null!==(u=null==p?void 0:p.rehab)&&void 0!==u?u:0,m),a.value=null==p?void 0:p.rehab;break;case"furnishingValue":a.asPercentageOf=y,a.value=null==p?void 0:p.furnishing;break;case"rentalIncomeValue":a.max=e.rentEstimate?10*e.rentEstimate:1e4,a.value=g;break;case"expensesTotalValue":a.value=null==x?void 0:x.total;break;case"mortgagePrincipalInterestValue":a.asPercentageOf=g,a.value=null==x?void 0:x.mortgagePrincipalInterest;break;case"propertyTaxesValue":a.asPercentageOf=g;let v=(null==d?void 0:d.purchasePrice)>0?(null==d?void 0:d.purchasePrice)*(.05/12):1e3;a.max=Math.max(null!==(o=null==x?void 0:x.propertyTaxes)&&void 0!==o?o:0,v),a.value=null==x?void 0:x.propertyTaxes;break;case"homeOwnerInsuranceValue":a.asPercentageOf=g;let h=(null==d?void 0:d.purchasePrice)>0?(null==d?void 0:d.purchasePrice)*5e-4:1e3;a.max=Math.max(null!==(s=null==x?void 0:x.homeOwnerInsurance)&&void 0!==s?s:0,h),a.value=null==x?void 0:x.homeOwnerInsurance;break;case"hoaDuesValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.hoaDues)?5*x.hoaDues:2e3,a.value=null==x?void 0:x.hoaDues;break;case"propertyManagementValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.propertyManagement)>0?2*x.propertyManagement:2e3,a.value=null==x?void 0:x.propertyManagement;break;case"capExValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.capEx)>0?3*x.capEx:2e3,a.value=null==x?void 0:x.capEx;break;case"vacancyValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.vacancy)>0?3*x.vacancy:2e3,a.value=null==x?void 0:x.vacancy;break;case"maintenanceValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.maintenance)>0?3*x.maintenance:2e3,a.value=null==x?void 0:x.maintenance;break;case"otherValue":a.asPercentageOf=g,a.max=(null==x?void 0:x.other)>0?3*x.other:2e3,a.value=null==x?void 0:x.other}a.text=i(a.value,a.measurement,a.asPercentageOf,a.renderZero)})}),v}let v=(e,a)=>{let n=["closingCostsValue","rehabValue","furnishingValue","propertyManagementValue","capExValue","vacancyValue","maintenanceValue","otherValue"].includes(e.key)?Math.round(e.asPercentageOf*a):a;switch(e.key){case"mortgageDpValue":case"mortgageRateValue":case"mortgageTermValue":e.value=a;break;case"closingCostsValue":let r=e.asPercentageOf>0?.05*e.asPercentageOf:1e5;e.max=Math.max(null!=a?a:0,r),e.value=n;break;case"rehabValue":let t=e.asPercentageOf>0?.5*e.asPercentageOf:25e4;e.max=Math.max(null!=a?a:0,t),e.value=n;break;case"furnishingValue":e.value=n;break;case"propertyTaxesValue":case"homeOwnerInsuranceValue":case"hoaDuesValue":e.max=Math.max(n,e.max),e.value=n;break;case"propertyManagementValue":case"capExValue":case"vacancyValue":case"maintenanceValue":case"otherValue":e.max=3*n,e.value=n}e.text=i(e.value,e.measurement,e.asPercentageOf,e.renderZero)},g=(e,a)=>{var n=null,r=0;a.forEach(a=>{a.items.forEach(a=>{switch(a.key){case"expensesTotalValue":n=a;break;case"mortgagePrincipalInterestValue":case"propertyTaxesValue":case"homeOwnerInsuranceValue":case"hoaDuesValue":r+=a.value;break;case"propertyManagementValue":case"capExValue":case"vacancyValue":case"maintenanceValue":case"otherValue":a.asPercentageOf>0&&a.value>0&&(a.value=Math.round(a.value/a.asPercentageOf*e),a.max=3*a.value,a.asPercentageOf=e,r+=a.value)}a.text=i(a.value,a.measurement,a.asPercentageOf,a.renderZero)})}
1),n&&(n.value=r,n.text=i(n.value,n.measurement,n.asPercentageOf,n.renderZero))},d=e=>{var a;let n=(null===(a=e.details)||void 0===a?void 0:a.projections)||{};return Object.keys(n).map(e=>({key:e,...n[e]}))},p=e=>{let a=[];for(let n of e)n.items.forEach(e=>{let n="breakdown_".concat(e.key),r=localStorage.getItem(n);r&&(v(e,Number.parseFloat(r)),a.push(e.key))});return a},x=e=>{let a=!1;for(let n of e)n.items.forEach(e=>{let n="breakdown_".concat(e.key);null!==localStorage.getItem(n)&&(a=!0)});return a},y=async function(e,a){var n,t,l,u;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(a)return await (0,r.Jd)({query:null==e?void 0:null===(t=e.details)||void 0===t?void 0:null===(n=t.request)||void 0===n?void 0:n.address,strategy:o||(null==e?void 0:null===(u=e.details)||void 0===u?void 0:null===(l=u.request)||void 0===l?void 0:l.strategy),extra:a})},h=new Map([["closingCostsValue","closingCosts"],["capExValue","expCapEx"],["hoaDuesValue","expHoaDues"],["homeOwnerInsuranceValue","expHomeOwnerInsurance"],["maintenanceValue","expMaintenance"],["otherValue","expOther"],["propertyManagementValue","expPropertyManagement"],["propertyTaxesValue","expPropertyTaxes"],["vacancyValue","expVacancy"],["furnishingValue","furnishing"],["mortgageDpValue","mortgageDownpayment"],["mortgageRateValue","mortgageRate"],["mortgageTermValue","mortgageTerm"],["mortgageMonthlyPaymentValue","mortgageMonthlyPayment"],["purchasePriceValue","purchasePrice"],["rehabValue","rehab"],["rentalIncomeValue","rentalIncome"],["squareFootageValue","squareFootage"],["unitsValue","units"]]),V=new Set(["financingMode","mortgageMonthlyPaymentIncludesTaxesInsurance"]),f=new Set(["mortgageDpValue","mortgageRateValue"]),b=e=>{let a={};return e&&Array.from(e.keys()).forEach(n=>{var r;if(V.has(n)){a[n]=e.get(n);return}let t=Math.round(100*Number.parseFloat(e.get(n)))/100;f.has(n)&&(t/=100),a[null!==(r=h.get(n))&&void 0!==r?r:""]=t}),a}}}]);
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.