1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[798],{31798:(e,t,a)=>{a.r(t),a.d(t,{SimpleCharts:()=>y});var r=a(95155),l=a(12115),n=a(83214),i=a(99445),o=a(94754),s=a(96025),c=a(16238),d=a(27086),h=a(58674),u=a(3401),m=a(64683),p=a(64550),x=a(61884),f=a(17304);function g(e){let t;if(e<=0)return{domainMax:500,ticks:[0,500]};let a=e/6,r=Math.pow(10,Math.floor(Math.log10(a))),l=a/r,n=Math.ceil(e/(t=Math.max(500,500*Math.round((t=l<=1?+r:l<=2?2*r:l<=5?5*r:10*r)/500))))*t,i=[];for(let e=0;e<=n;e+=t)i.push(e);return{domainMax:n,ticks:i}}function y(e){let{output:t,divisor:a,isLotEntitlement:y}=e,k=y?" (lot)":"",v=(0,l.useMemo)(()=>{let e=t.schedule,r=e.length,l=[];l.push({year:0,balance:Math.round(e[0].openingBalance/a)});let n=r/12;for(let t=1;t<=n;t++){let r=Math.max(0,e[12*t-1].closingBalance);l.push({year:t,balance:Math.round(r/a)})}return l},[t,a]),b=t.schedule.length/12,j=(0,l.useMemo)(()=>{let e=t.schedule,r=[];for(let t=1;t<=b;t++){let l=0,n=0;for(let a=(t-1)*12;a<12*t;a++)l+=e[a].interest,n+=e[a].payment-e[a].interest;let i=Math.round(n/a),o=Math.round(l/a);r.push({year:t,periodCenter:t-.5,principal:i,interest:o,total:i+o})}return r},[t,a,b]),M=(0,l.useMemo)(()=>(function(e){let t=e<=10?1:2,a=[];for(let r=0;r<=e;r+=t)a.push(r);return a})(b),[b]),B=(0,l.useMemo)(()=>g(v.reduce((e,t)=>Math.max(e,t.balance),0)),[v]),E=(0,l.useMemo)(()=>g(j.reduce((e,t)=>Math.max(e,t.total),0)),[j]);return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)(f.A,{level:3,children:["Loan Balance Over Time",k]}),(0,r.jsx)(n.u,{width:"100%",height:350,children:(0,r.jsxs)(i.Q,{data:v,margin:{top:20,right:30,left:0,bottom:10},children:[(0,r.jsx)(o.d,{vertical:!1,stroke:"#E5E7EB",strokeDasharray:"3 3"}),(0,r.jsx)(s.W,{dataKey:"year",type:"number",domain:[0,b],ticks:M,height:50,tickMargin:8,label:{value:"Years",position:"insideBottom",offset:-5}}),(0,r.jsx)(c.h,{tickFormatter:e=>(0,x.Yo)(e),tickMargin:8,width:70,domain:[0,B.domainMax],ticks:B.ticks,interval:0}),(0,r.jsx)(d.m,{cursor:{stroke:"rgba(0,0,0,0.15)"},formatter:e=>[(0,x.vv)(Number(e)),"Principal"],labelFormatter:e=>"Year ".concat(e),contentStyle:{background:"#fff",border:"1px solid #ccc",borderRadius:8,padding:"8px 10px",color:"#000",fontSize:14},labelStyle:{color:"#000",marginBottom:4},itemStyle:{color:"#000",padding:0}}),(0,r.jsx)(h.Gk,{type:"monotone",dataKey:"balance",name:"Principal",stroke:"#57B0E3",fill:"#57B0E3",fillOpacity:1})]})})]}),(0,r.jsx)("hr",{}),(0,r.jsxs)("div",{className:"",children:[(0,r.jsxs)(f.A,{level:3,children:["Annual Levies Paid",k]}),(0,r.jsxs)("p",{className:"text-sm text-ln400 pb-4",children:["To see a more detailed levy breakdown visit (Including tax benefits)"," ",(0,r.jsx)("a",{href:"https://levyplanner.com.au",target:"_blank",rel:"noopener noreferrer",className:"text-ln500 underline hover:text-ln700",children:"levyplanner.com.au"})]}),(0,r.jsx)(n.u,{width:"100%",height:350,children:(0,r.jsxs)(u.E,{data:j,margin:{top:20,right:30,left:0,bottom:10},children:[(0,r.jsx)(o.d,{vertical:!1,stroke:"#E5E7EB",strokeDasharray:"3 3"}),(0,r.jsx)(s.W,{dataKey:"periodCenter",type:"number",domain:[0,b],ticks:M,height:50,tickMargin:8,label:{value:"Years",position:"insideBottom",offset:-5}}),(0,r.jsx)(c.h,{tickFormatter:e=>(0,x.Yo)(e),tickMargin:8,width:70,domain:[0,E.domainMax],ticks:E.ticks,interval:0}),(0,r.jsx)(d.m,{cursor:{fill:"rgba(0,0,0,0.05)"},content:e=>{var t,a,l;let{active:n,payload:i,label:o}=e;if(!n||!i||0===i.length)return null;let s=null!=(l=null==(a=i[0])||null==(t=a.payload)?void 0:t.total)?l:0;return(0,r.jsxs)("div",{style:{background:"#fff",border:"1px solid #ccc",borderRadius:8,padding:"8px 10px",color:"#000",fontSize:14},children:[(0,r.jsx)("div",{style:{marginBottom:4},children:"Year ".concat(o)}),(0,r.jsx)("div",{children:"Levy: ".concat((0,x.vv)(s))})]})}}),(0,r.jsx)(m.s,{verticalAlign:"bottom",align:"center",iconType:"square",iconSize:10,wrapperStyle:{paddingTop:16,paddingLeft:100},formatter:e=>(0,r.jsx)("span",{style:{color:"#24364F",marginRight:16},children:e})}),(0,r.jsx)(p.yP,{dataKey:"interest",name:"Interest",stackId:"a",fill:"#57B0E3"}),(0,r.jsx)(p.yP,{dataKey:"principal",name:"Principal",stackId:"a",fill:"#24364F",fillOpacity:.6,radius:[4,4,0,0]})]})})]})]})}}}]);
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.