function RepaymentScheduleViewModel(){var b=this;b.numberOfRates=9;b.scheduleEntries=ko.observableArray([]);b.maxRate=ko.observable(0);b.graphValues=ko.observableArray([]);b.setValues=function(a){b.scheduleEntries([]);b.scheduleEntries(CalculateRepaymentSchedule(a.numberOfMonths(),a.interestRate(),a.presentValue(),a.monthlyPayment(),a.oneOffPayment(),a.finalValue(),a.getMode()))};b.renderGraph=function(a){b.scheduleEntries([]);b.scheduleEntries(CalculateRepaymentSchedule(a.numberOfMonths(),a.interestRate(),
a.presentValue(),a.monthlyPayment(),a.oneOffPayment(),a.finalValue(),a.getMode()));for(var d=0,c=0;c<b.scheduleEntries().length;c++){var e=b.scheduleEntries()[c][1]+b.scheduleEntries()[c][2];e>d&&(d=e)}b.maxRate(d);Log(a);b.graphValues([]);for(c=0;c<b.scheduleEntries().length;c++){var a=b.scheduleEntries()[c][2],d=b.scheduleEntries()[c][1],e=100*(a/(d+a)),f=100*((d+a)/b.maxRate()),a={month:c+1,monthlyValue:a.formatCurrency(),interestValue:d.formatCurrency(),percentMonthly:e,percentRate:f};b.graphValues.push(a)}Log(b.graphValues())}}
;
