1(function(){this.SfcCalculator=function(){function t(){}return t.prototype.calculator_response=function(){return{date:new Date,calculator:this.name,version:this.version,input:this.input,output:this.output}},t}()}).call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcExponentialProjector=function(e){function n(t){var e,n,a,i;for(null==t&&(t={}),this.name="Exponential Projector",this.version="1.0",this.mandatory_inputs=["value1","value2","number_of_projections"],this.input=t,i=this.mandatory_inputs,e=0,a=i.length;a>e;e++)if(n=i[e],void 0===this.input[n])throw"Missing input '"+n+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r;for(a=[this.input.value1,this.input.value2],e=this.input.value2/this.input.value1,t=this.input.value1,r=n=0,i=this.input.number_of_projections;i>=0?i>=n:n>=i;r=i>=0?++n:--n)a.push(t*Math.pow(e,r+2));return this.output={projections:a},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcCompoundInterest=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Interest Compound (Yearly)",this.version="1.0",this.mandatory_inputs=["initial_payment","recurrent_payment","yearly_rate_of_return"],n={years:1,number_of_payments_per_year:12},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_;return this.input.initial_payment=parseFloat(this.input.initial_payment),this.input.recurrent_payment=parseFloat(this.input.recurrent_payment),this.input.yearly_rate_of_return=parseFloat(this.input.yearly_rate_of_return),e=this.input.number_of_payments_per_year*this.input.years,n=this.input.yearly_rate_of_return/this.input.number_of_payments_per_year,t=Math.pow(1+n,e),r=this.input.initial_payment*t,o=0===this.input.yearly_rate_of_return?this.input.recurrent_payment*e:this.input.recurrent_payment*((t-1)/n)*(1+n),_=this.input.initial_payment+this.input.number_of_payments_per_year*this.input.recurrent_payment*this.input.years,a=r+o,i=a-_,this.output={total_contributions:_,gain:i,balance:a},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcTaxCalculator=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Tax Calculator",this.version="1.1",this.mandatory_inputs=["contribution","federal_tax_rate","state_tax_rate","maximum_deduction","maximum_deductible","percentage_for_deduction","tax_credits_available"],n={tax_credits_available:!0,carry_forward_years:0,reminding_array:[]},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.getDeductionMinnesota=function(){var t,e;return e=0,t=0,this.input.maximum_deduction<this.input.contribution?"Couple"===this.input.simple_filing_status?this.input.income<=75e3?e=this.input.contribution*this.input.state_tax_rate<=this.input.maximum_deduction?this.input.contribution*this.input.state_tax_rate:this.input.maximum_deduction:this.input.income>75e3&&this.input.income<=1e5?(t=.01*(this.input.income-75e3),e=this.input.maximum_deduction-t):this.input.income>1e5&&this.input.income<=135e3?e=this.input.maximum_deduction:this.input.income>135e3&&(t=.01*(this.input.income-135e3),this.input.maximum_deduction-t<0?e=0:this.input.maximum_deduction-t>=0&&this.input.maximum_deduction-t<=this.input.maximum_deduction&&(e=this.input.maximum_deduction-t)):this.input.income<=75e3?e=this.input.contribution*this.input.state_tax_rate<=this.input.maximum_deduction?this.input.contribution*this.input.state_tax_rate:this.input.maximum_deduction:(t=.02*(this.input.income-75e3),this.input.maximum_deduction-t<0?e=0:this.input.maximum_deduction-t>=0&&this.input.maximum_deduction-t<this.input.maximum_deduction&&(e=this.input.maximum_deduction-t)):e=this.input.contribution*this.input.state_tax_rate,e},n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c,l,f,h,y,m,d,x,v;for(y=[],t=0,h=this.input.remainding_array,_=0,p=h.length;p>_;_++)m=h[_],y.push({years:m.years,amount:m.amount});if(a=this.input.contribution,this.input.maximum_deductible&&a>this.input.maximum_deductible&&(a=this.input.maximum_deductible),i=a*this.input.percentage_for_deduction,this.input.maximum_deduction&&i>this.input.maximum_deduction&&(i=this.input.maximum_deduction),this.input.state_id&&"MN2"===this.input.state_id&&this.input.contribution&&(i=this.getDeductionMinnesota()),this.input.carry_forward_years>0){for(e={years:this.input.carry_forward_years+1,amount:this.input.contribution},y.push(e),f=!1,n=0,u=0,c=y.length;c>u;u++)m=y[u],m.years>0&&m.amount>0&&(n+=m.amount);for(n>this.input.maximum_deduction&&(n=this.input.maximum_deduction),i=n,s=0,l=y.length;l>s;s++)m=y[s],f||m.years>0&&m.amount>0&&(d=n-m.amount,d>0?(m.years!==this.input.carry_forward_years+1&&(t+=m.amount),m.amount=0,n=d):(m.years!==this.input.carry_forward_years+1&&(t+=n),m.amount=Math.abs(d),f=!0)),m.years-=1}return x=void 0,x=t>=this.input.maximum_deduction?0:this.input.tax_credits_available?i-t:(i-t)*this.input.state_tax_rate,v=this.input.tax_credits_available?t:t*this.input.state_tax_rate,r=x*this.input.federal_tax_rate,o=v*this.input.federal_tax_rate,this.output={deduction:i-t,state_tax:x,state_tax_for_carry_forward_amount:v,federal_tax_on_state_tax:r,federal_tax_on_state_tax_for_carry_forward_amount:o,remainding_array:y,carry_forward_amount:t},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcCostOfCollegeProjector=function(e){function n(t){var e,n,a,i;for(null==t&&(t={}),this.name="Cost of College Projector",this.version="1.0",this.mandatory_inputs=["year","school","prices","state_id"],this.input=t,i=this.mandatory_inputs,e=0,a=i.length;a>e;e++)if(n=i[e],void 0===this.input[n])throw"Missing input '"+n+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c,l,f,h,y,m,d,x,v;for(h=this.input.school,u=this.input.prices,i=parseInt(u[0].year),v=parseInt(this.input.year)-i,0>v&&(v=1),_=0,m=0,t=0,f=0,o=0,h.state_id===this.input.state_id?(_=h.percentcovered_instate,d=u[0].tuition_instate||u[0].tuition,x=u[1].tuition_instate||u[1].tuition,d=parseFloat(d),x=parseFloat(x),m=new SfcExponentialProjector({value1:d,value2:x,number_of_projections:v}).calculate()):(_=h.percentcovered_outofstate,d=u[0].tuition_outofstate||u[0].tuition,x=u[1].tuition_outofstate||u[1].tuition,d=parseFloat(d),x=parseFloat(x),m=new SfcExponentialProjector({value1:d,value2:x,number_of_projections:v}).calculate()),d=u[0].fees_booksandsupplies,x=u[1].fees_booksandsupplies,d=parseFloat(d),x=parseFloat(x),t=new SfcExponentialProjector({value1:d,value2:x,number_of_projections:v}).calculate(),d=u[0].fees_roomandboard_offcampus||u[0].fees_roomandboard_oncampus,x=u[1].fees_roomandboard_offcampus||u[1].fees_roomandboard_oncampus,d=parseFloat(d),x=parseFloat(x),f=new SfcExponentialProjector({value1:d,value2:x,number_of_projections:v}).calculate(),d=u[0].fees_other_offcampus||u[0].fees_other_oncampus,x=u[1].fees_other_offcampus||u[1].fees_other_oncampus,d=parseFloat(d),x=parseFloat(x),o=new SfcExponentialProjector({value1:d,value2:x,number_of_projections:v}).calculate(),p=[],_=_||1,_=parseFloat(_),a=0,e=n=c=i,l=this.input.year;l>=c?l>=n:n>=l;e=l>=c?++n:--n)y=m.output.projections[a]+t.output.projections[a]+f.output.projections[a]+o.output.projections[a],s={year:e,sticker_price:y,sticker_breakdown:{tuition:m.output.projections[a],books_and_supplies:t.output.projections[a],room_and_board:f.output.projections[a],others:o.output.projections[a]},grants_amount:y*(1-_),net_price:y*_,net_breakdown:{tuition:m.output.projections[a]*_,books_and_supplies:t.output.projections[a]*_,room_and_board:f.output.projections[a]*_,others:o.output.projections[a]*_}},p.push(s),a+=1;
1return r=p[p.length-1],this.output={school:{id:h.id,name:h.name,state_id:h.state_id},projections_by_year:p,final_projections:r},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcPortfolioProjector=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Portfolio Projector",this.version="1.1",this.mandatory_inputs=["initial_payment","recurrent_payment","yearly_rate_of_return_array","years"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0,reinvest_tax_benefit:!1},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,i=0,r=o.length;r>i;i++)if(a=o[i],void 0===this.input[a])throw"Missing input '"+a+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c,l,f,h,y,m,d,x,v,b,g,w,j,C,S,P,F,I,M,O,R,k,D,T,A,E;for(this.input.initial_payment=parseFloat(this.input.initial_payment),this.input.recurrent_payment=parseFloat(this.input.recurrent_payment),g=[],k=[],p=this.input.initial_payment,T={total_contributions:0,gain:0,final_amount_before_fees:0,fees:0,final_amount:0,state_tax_benefit:0,federal_tax_benefit:0,federal_tax_on_state_tax_benefit:0,deduction:0,deduction_after_end_of_investment:0,state_tax_benefit_after_end_of_investment:0,federal_tax_on_state_tax_benefit_after_end_of_investment:0,deduction_before_end_of_investment:0,state_tax_benefit_before_end_of_investment:0,federal_tax_on_state_tax_benefit_before_end_of_investment:0,carry_forward_amount:0,state_tax_benefit_on_carry_forward_amount:0,federal_tax_on_state_tax_benefit_for_carry_forward_amount:0},b={initial_amount:p,total_contributions:p,yearly_rate_of_return:0,gain:0,final_amount_before_fees:p,fees:0,fees_rate:0,final_amount:p},g.push(b),e=0,0===this.input.years&&(this.input.years=1),P=[],A=l=0,w=this.input.years-1;w>=0?w>=l:l>=w;A=w>=0?++l:--l)c=0,0===A&&(c=this.input.initial_payment),i=void 0,j=this.input.fees_array,y=j[j.length-1],i=this.input.fees_array[A]?this.input.fees_array[A]:y,i=parseFloat(i),E=void 0,C=this.input.yearly_rate_of_return_array,d=C[C.length-1],E=this.input.yearly_rate_of_return_array[A]?this.input.yearly_rate_of_return_array[A]:d,E=parseFloat(E),t=new SfcCompoundInterest({initial_payment:p,recurrent_payment:this.input.recurrent_payment,yearly_rate_of_return:E,number_of_payments_per_year:this.input.number_of_payments_per_year}),F=t.calculate().output,D=this.input.recurrent_payment*this.input.number_of_payments_per_year+c,r=i*F.balance,I=0,a=0,M=0,n=0,this.input.tax_data&&(R=new SfcTaxCalculator({contribution:D,federal_tax_rate:this.input.tax_data.federalInfo.taxRate,state_tax_rate:this.input.tax_data.stateInfo.taxRate,maximum_deduction:this.input.tax_data.stateInfo.maximumDeduction,maximum_deductible:this.input.tax_data.stateInfo.maximumDeductible,percentage_for_deduction:this.input.tax_data.stateInfo.percentageForDeduction,tax_credits_available:this.input.tax_data.stateInfo.taxCreditsAvailable,carry_forward_years:this.input.tax_data.stateInfo.carryForwardYears,remainding_array:P}).calculate(),T.deduction_before_end_of_investment+=R.output.deduction,T.state_tax_benefit_before_end_of_investment+=R.output.state_tax,T.state_tax_benefit_on_carry_forward_amount+=R.output.state_tax_for_carry_forward_amount,T.federal_tax_on_state_tax_benefit_before_end_of_investment+=R.output.federal_tax_on_state_tax,T.federal_tax_on_state_tax_benefit_for_carry_forward_amount+=R.output.federal_tax_on_state_tax_for_carry_forward_amount,k.push(R.output),P=R.output.remainding_array,T.carry_forward_amount+=R.output.carry_forward_amount),_=F.balance,o=0,o=this.input.reinvest_tax_benefit?_-r+(I-a):_-r,u=void 0,u=0===A?o-D:o-p-D,b={initial_amount:p,total_contributions:D,yearly_rate_of_return:E,state_tax_benefit:I,gain:u,final_amount_before_fees:_,fees:r,fees_rate:i,federal_tax:a,final_amount:o},T.total_contributions+=b.total_contributions,T.gain+=b.gain,T.fees+=b.fees,p=o,g.push(b);if(m=g[g.length-1],this.input.tax_data&&this.input.tax_data.state&&this.input.tax_data.stateInfo.carryForwardYears){for(s=f=1,S=this.input.tax_data.stateInfo.carryForwardYears;S>=1?S>=f:f>=S;s=S>=1?++f:--f)R=new SfcTaxCalculator({contribution:0,federal_tax_rate:this.input.tax_data.federalInfo.taxRate,state_tax_rate:this.input.tax_data.stateInfo.taxRate,maximum_deduction:this.input.tax_data.stateInfo.maximumDeduction,maximum_deductible:this.input.tax_data.stateInfo.maximumDeductible,percentage_for_deduction:this.input.tax_data.stateInfo.percentageForDeduction,tax_credits_available:this.input.tax_data.stateInfo.taxCreditsAvailable,carry_forward_years:this.input.tax_data.stateInfo.carryForwardYears,remainding_array:P}).calculate(),T.deduction_after_end_of_investment+=R.output.deduction,T.state_tax_benefit_after_end_of_investment+=R.output.state_tax,T.federal_tax_on_state_tax_benefit_after_end_of_investment+=R.output.federal_tax_on_state_tax,T.state_tax_benefit_on_carry_forward_amount+=R.output.state_tax_for_carry_forward_amount,T.federal_tax_on_state_tax_benefit_for_carry_forward_amount+=R.output.federal_tax_on_state_tax_for_carry_forward_amount,T.carry_forward_amount+=R.output.carry_forward_amount,P=R.output.remainding_array,k.push(R.output);for(h=0,x=k.length;x>h;h++)O=k[h],T.state_tax_benefit+=O.state_tax,T.federal_tax_on_state_tax_benefit+=O.federal_tax_on_state_tax,T.deduction+=O.deduction}
1return T.state_tax_benefit=T.state_tax_benefit_after_end_of_investment+T.state_tax_benefit_before_end_of_investment,T.final_amount_before_fees=m.final_amount_before_fees,T.final_amount=m.final_amount,T.gain=T.final_amount-T.total_contributions,v=T.gain,this.input.tax_data&&this.input.tax_data.federalInfo&&this.input.tax_data.federalInfo.capitalGainsFederal&&(e=v*this.input.tax_data.federalInfo.capitalGainsFederal),T.federal_tax_benefit=e,this.output={taxes_by_year:k,projection_by_year:g,total_projection:T},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcPortfolioRecurrentContributionPredictor=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Recurrent Contribution Predictor",this.version="1.0",this.mandatory_inputs=["goal_amount","initial_payment","yearly_rate_of_return_array","years"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_;for(this.input.initial_payment=parseFloat(this.input.initial_payment),n=1e3,r=100,t=101,e=1e3,a="up",o=void 0,_=i=0;100>=i&&(o=new SfcPortfolioProjector({initial_payment:this.input.initial_payment,recurrent_payment:n,yearly_rate_of_return_array:this.input.yearly_rate_of_return_array,fees_array:this.input.fees_array,years:this.input.years,number_of_payments_per_year:this.input.number_of_payments_per_year,tax_data:this.input.tax_data}).calculate(),t=o.output.total_projection.final_amount,parseInt(t)!==parseInt(this.input.goal_amount));_=++i)"up"===a?t>this.input.goal_amount&&(a="down",e/=2):t<this.input.goal_amount&&(a="up",e/=2),"up"===a?n+=e:n-=e;return this.output={projection:o.output,predicted_recurrent_payment:n},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcPortfolioInitialContributionPredictor=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Initial Contribution Predictor",this.version="1.0",this.mandatory_inputs=["goal_amount","recurrent_payment","yearly_rate_of_return_array","years"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i;for(this.input.recurrent_payment=parseFloat(this.input.recurrent_payment),n=0,t=0,e=1e3,a="up",i=void 0;parseFloat(t)!==parseFloat(this.input.goal_amount)&&(i=new SfcPortfolioProjector({initial_payment:n,recurrent_payment:this.input.recurrent_payment,yearly_rate_of_return_array:this.input.yearly_rate_of_return_array,fees_array:this.input.fees_array,years:this.input.years,number_of_payments_per_year:this.input.number_of_payments_per_year,tax_data:this.input.tax_data}).calculate(),t=i.output.total_projection.final_amount,parseInt(t)!==parseInt(this.input.goal_amount));)"up"===a?t>this.input.goal_amount&&(a="down",e/=2):t<this.input.goal_amount&&(a="up",e/=2),"up"===a?n+=e:n-=e;return this.output={projection:i.output,predicted_initial_payment:n},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcPortfolioRateOfReturnPredictor=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Recurrent Rate of Return Predictor",this.version="1.0",this.mandatory_inputs=["goal_amount","initial_payment","recurrent_payment","years"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0,reinvest_tax_benefit:!1,sales_charge_fee_array:[0],sales_charge_fee_initial:0},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_;for(this.input.initial_payment=parseFloat(this.input.initial_payment),n=.5,r=100,t=101,e=.5,a="up",o=void 0,_=i=0;100>=i&&(o=new SfcPortfolioProjector({initial_payment:this.input.initial_payment,recurrent_payment:this.input.recurrent_payment,yearly_rate_of_return_array:[n],fees_array:this.input.fees_array,years:this.input.years,number_of_payments_per_year:this.input.number_of_payments_per_year,tax_data:this.input.tax_data,reinvest_tax_benefit:this.input.reinvest_tax_benefit,sales_charge_fee_array:this.input.sales_charge_fee_array,sales_charge_fee_initial:this.input.sales_charge_fee_initial}).calculate(),t=o.output.total_projection.final_amount,parseInt(t)!==parseInt(this.input.goal_amount));_=++i)"up"===a?t>this.input.goal_amount&&(a="down",e/=2):t<this.input.goal_amount&&(a="up",e/=2),"up"===a?n+=e:n-=e;return this.output={projection:o.output,predicted_rate_of_return:n},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcStudentLoanCalculator=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Student Loan Calculator",this.version="1.0",this.mandatory_inputs=["amount_of_loan"],n={number_of_months:120,rate_of_interest:6.08,rate_used_for_minimum_salary:.08},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a;return n=this.input.rate_of_interest/100,e=this.input.amount_of_loan*(n/12)/(1-Math.pow(1+n/12,-this.input.number_of_months)),a=e*this.input.number_of_months-this.input.amount_of_loan,t=e/(this.input.rate_used_for_minimum_salary/12),this.output={monthly_payment:e,total_interest:a,minimum_salary:t},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcGaussianCalculator=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Interest Compound (Yearly)",this.version="1.0",this.mandatory_inputs=["rateOfReturnArray","riskArray"],n={rateOfReturnArray:[],riskArray:[]},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c;for(a=[],r=this.input.riskArray,e=t=0,n=r.length;n>t;e=++t)_=r[e],i=parseFloat(this.input.rateOfReturnArray[e]),s=parseFloat(_)/100,p=2*Math.PI*Math.random(),o=Math.sqrt(-2*Math.log(1-Math.random())),u=s*o,c=i+u*Math.cos(p),a[e]=c;return this.output={randomized_array:a},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcRegresionSmoother=function(e){function n(t){var e,n,a,i;for(null==t&&(t={}),this.name="Regresion Smoother",this.version="1.0",this.mandatory_inputs=["points_array"],this.input=t,i=this.mandatory_inputs,e=0,a=i.length;a>e;e++)if(n=i[e],void 0===this.input[n])throw"Missing input '"+n+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u;for(i=[],o=regression("polynomial",this.input.points_array,6),t=o.equation,a=this.input.points_array.length,n=e=0,r=a-1;r>=0?r>=e:e>=r;n=r>=0?++e:--e)0===n?i.push(this.input.points_array[0]):n===a-1?i.push(this.input.points_array[a-1]):(_=this.input.points_array[n][0],u=t[0]+_*t[1]+_*_*t[2]+_*_*_*t[3]+_*_*_*_*t[4]+_*_*_*_*_*t[5]+_*_*_*_*_*_*t[6],i.push([_,u]));return this.output={projections:i},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcKThroughTwelve=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="K-12 Projector",this.version="1.1",this.mandatory_inputs=["initial_payment","recurrent_payment","yearly_rate_of_return_array","age","enrollment_age","cost_of_school","cost_of_school_inflation_rate"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0,reinvest_tax_benefit:!1,withdrawal_limit:1e4},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c,l,f,h,y,m,d,x,v,b,g,w,j,C,S,P,F,I,M,O,R,k,D,T,A,E,K,Y;for(this.input.initial_payment=parseFloat(this.input.initial_payment),this.input.recurrent_payment=parseFloat(this.input.recurrent_payment),Y=18-this.input.age,0>=Y&&(Y=1),M=[null,null,null,null,"Pre-K","K","1st","2nd","3rd","4th","5th","6th","7th","8th","9th","10th","11th","12th"],t=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],j=[],R=[],m=this.input.initial_payment,_=this.input.cost_of_school,A=0,D={total_contributions:0,gain:0,final_amount_before_fees:0,fees:0,final_amount:0,federal_tax_benefit:0,deduction:0},w={initial_amount:m,total_contributions:m,yearly_rate_of_return:0,gain:0,final_amount_before_fees:m,fees:0,fees_rate:0,final_amount:m},u=0,r=0,i=0,o=0,T=0,E=h=0,C=Y-1;C>=0?C>=h:h>=C;E=C>=0?++h:--h)d=0,n=null,a=0,0===E&&(d=this.input.initial_payment),s=void 0,S=this.input.fees_array,x=S[S.length-1],s=this.input.fees_array[E]?this.input.fees_array[E]:x,s=parseFloat(s),K=void 0,P=this.input.yearly_rate_of_return_array,b=P[P.length-1],K=this.input.yearly_rate_of_return_array[E]?this.input.yearly_rate_of_return_array[E]:b,K=parseFloat(K),y=m,t[this.input.age+E]>=this.input.enrollment_age&&(A=_>this.input.withdrawal_limit?this.input.withdrawal_limit:_,n=_-A,r+=n,i+=_,a=_,m-=A,T+=A),e=E===Y-1?new SfcCompoundInterest({initial_payment:m,recurrent_payment:0,yearly_rate_of_return:K,number_of_payments_per_year:this.input.number_of_payments_per_year}):new SfcCompoundInterest({initial_payment:m,recurrent_payment:this.input.recurrent_payment,yearly_rate_of_return:K,number_of_payments_per_year:this.input.number_of_payments_per_year}),F=e.calculate().output,k=this.input.recurrent_payment*this.input.number_of_payments_per_year+d,p=s*F.balance,l=F.balance,c=l-p,f=void 0,f=0===E?A>0?c-k+A:c-k:E===Y-1?0:c-y-k+A,o+=f,w={age:t[this.input.age+E],school_grade:M[this.input.age+E],starting_balance:y,withdrawals:A,earnings:f,final_amount:c,total_contributions:k,yearly_rate_of_return:K,final_amount_before_fees:l,fees:p,fees_rate:s,cost_of_school:a,cost_of_school_gap:n},I=new SfcCompoundInterest({initial_payment:_,recurrent_payment:0,yearly_rate_of_return:this.input.cost_of_school_inflation_rate,number_of_payments_per_year:1}),O=I.calculate().output,_=O.balance,D.total_contributions+=w.total_contributions,D.gain+=w.gain,D.fees+=w.fees,m=c,j.push(w);return v=j[j.length-1],D.final_amount_before_fees=v.final_amount_before_fees,D.final_amount=v.final_amount,D.gain=D.final_amount-D.total_contributions,D.cumulative_cost_of_school_gap=r,D.cumulative_cost_of_school=i,D.total_withdrawals=T,g=D.gain,this.input.tax_data&&(u=o*this.input.tax_data.federalInfo.capitalGainsFederal),D.federal_tax_benefit=u,D.cumulative_gains=o,this.output={taxes_by_year:R,projection_by_year:j,total_projection:D},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcKThroughTwelveContributionPredictor=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="K-12 Contribution Amount Predictor",this.version="1.0",this.mandatory_inputs=["yearly_rate_of_return_array","age","enrollment_age","cost_of_school","cost_of_school_inflation_rate","solve_for"],n={number_of_payments_per_year:12,fees_array:[0],tax_data:void 0,reinvest_tax_benefit:!1,withdrawal_limit:1e4,initial_payment:0,recurrent_payment:0},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s;for(_=!1,this.input.initial_payment=parseFloat(this.input.initial_payment),this.input.recurrent_payment=parseFloat(this.input.recurrent_payment),"monthly"===this.input.solve_for?e=100:"initial"===this.input.solve_for&&(e=1e3),u={federalInfo:{taxRate:.25,capitalGainsFederal:.15}},i="up",o=void 0,n=this.input.initial_payment,a=this.input.recurrent_payment,s=r=0;100>=r&&(o=new SfcKThroughTwelve({initial_payment:n,recurrent_payment:a,yearly_rate_of_return_array:this.input.yearly_rate_of_return_array,age:this.input.age,enrollment_age:this.input.enrollment_age,cost_of_school:this.input.cost_of_school,cost_of_school_inflation_rate:this.input.cost_of_school_inflation_rate,tax_data:u}).calculate(),t=o.output.total_projection.final_amount,0!==parseInt(t));s=++r)"up"===i?t>0&&(i="down",e/=2):0>t&&(i="up",e/=2),"up"===i?"monthly"===this.input.solve_for?a+=e:"initial"===this.input.solve_for&&(n+=e):"monthly"===this.input.solve_for?a-=e:"initial"===this.input.solve_for&&(n-=e);return this.output={projection:o.output,predicted_recurrent_payment:a,predicted_initial_payment:n},this.calculator_response()},n}(SfcCalculator)}.call(this),function(){var t=function(t,n){function a(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return a.prototype=n.prototype,t.prototype=new a,t.__super__=n.prototype,t},e={}.hasOwnProperty;this.SfcCostOfCustomCollegeProjector=function(e){function n(t){var e,n,a,i,r,o;null==t&&(t={}),this.name="Cost of Custom College Projector",this.version="1.0",this.mandatory_inputs=["net_school_cost","grant_and_scholarship_cost","year","years_of_education","interest_rate"],n={gap_years:0,number_of_payments_per_year:12},this.input={};for(e in n)this.input[e]=n[e];for(e in t)this.input[e]=t[e];for(o=this.mandatory_inputs,a=0,r=o.length;r>a;a++)if(i=o[a],void 0===this.input[i])throw"Missing input '"+i+"'"}return t(n,e),n.prototype.calculate=function(){var t,e,n,a,i,r,o,_,u,s,p,c,l,f,h,y,m;for(m=this.input.years_of_education,i=this.input.interest_rate,f=this.input.grant_and_scholarship_cost+this.input.net_school_cost,u=this.input.net_school_cost,h=new Date,a=this.input.year-h.getFullYear(),0>a&&(a=0),s=[],y={net_price:0,sticker_price:0,grants:0},r=n=0,p=m-1;p>=0?p>=n:n>=p;r=p>=0?++n:--n)l=new SfcCompoundInterest({initial_payment:f,recurrent_payment:0,yearly_rate_of_return:i,number_of_payments_per_year:1,years:this.input.gap_years+r+a}),c=l.calculate().output.balance,_=new SfcCompoundInterest({initial_payment:u,recurrent_payment:0,yearly_rate_of_return:i,number_of_payments_per_year:1,years:this.input.gap_years+r+a}),o=_.calculate().output.balance,e=c-o,y.net_price+=o,y.sticker_price+=c,y.grants+=e,s.push({net_price:o,sticker_price:c,grants:e});return y.interest_rate=i,t={net_price:y.net_price/m*1,sticker_price:y.sticker_price/m*1,grants:y.grants/m*1}
1,this.output={school:{name:"Custom"},projections_by_year:s,avg_costs_by_year:t,total_cost:y},this.calculator_response()},n}(SfcCalculator)}.call(this);
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.