(self.webpackChunk=self.webpackChunk||[]).push([[663],{232:(e,t,a)=>{"use strict";a.r(t);var n=a(7760),s=a.n(n),o=a(7152),r=a(4605);window.$=window.jQuery=a(9755),window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var i=document.head.querySelector('meta[name="csrf-token"]');i?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=i.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token");var c=document.head.querySelector('meta[name="locale"]');localStorage.locale=c?c.content:"en_US",a(6891),a(3734),a(7632),a(5432),window.vuei18n=o.Z,window.uiv=r,s().use(vuei18n),s().use(r),window.Vue=s()},9899:(e,t,a)=>{"use strict";a.d(t,{Z:()=>p});var n=a(7760),s=a.n(n),o=a(629),r=a(4478),i=a(3465);const c={namespaced:!0,state:function(){return{transactionType:"any",groupTitle:"",transactions:[],customDateFields:{interest_date:!1,book_date:!1,process_date:!1,due_date:!1,payment_date:!1,invoice_date:!1},defaultTransaction:(0,r.f$)(),defaultErrors:(0,r.kQ)()}},getters:{transactions:function(e){return e.transactions},groupTitle:function(e){return e.groupTitle},transactionType:function(e){return e.transactionType},accountToTransaction:function(e){return e.accountToTransaction},defaultTransaction:function(e){return e.defaultTransaction},sourceAllowedTypes:function(e){return e.sourceAllowedTypes},destinationAllowedTypes:function(e){return e.destinationAllowedTypes},allowedOpposingTypes:function(e){return e.allowedOpposingTypes},customDateFields:function(e){return e.customDateFields}},actions:{},mutations:{addTransaction:function(e){var t=i(e.defaultTransaction);t.errors=i(e.defaultErrors),e.transactions.push(t)},resetErrors:function(e,t){e.transactions[t.index].errors=i(e.defaultErrors)},resetTransactions:function(e){e.transactions=[]},setGroupTitle:function(e,t){e.groupTitle=t.groupTitle},setCustomDateFields:function(e,t){e.customDateFields=t},deleteTransaction:function(e,t){e.transactions.splice(t.index,1),e.transactions.length},setTransactionType:function(e,t){e.transactionType=t},setAllowedOpposingTypes:function(e,t){e.allowedOpposingTypes=t},setAccountToTransaction:function(e,t){e.accountToTransaction=t},updateField:function(e,t){e.transactions[t.index][t.field]=t.value},setTransactionError:function(e,t){e.transactions[t.index].errors[t.field]=t.errors},setDestinationAllowedTypes:function(e,t){e.destinationAllowedTypes=t},setSourceAllowedTypes:function(e,t){e.sourceAllowedTypes=t}}},l={namespaced:!0,state:function(){return{viewRange:"default",start:null,end:null,defaultStart:null,defaultEnd:null}},getters:{start:function(e){return e.start},end:function(e){return e.end},defaultStart:function(e){return e.defaultStart},defaultEnd:function(e){return e.defaultEnd},viewRange:function(e){return e.viewRange}},actions:{initialiseStore:function(e){"default"===e.state.viewRange&&axios.get("./api/v1/preferences/viewRange").then((function(t){var a=t.data.data.attributes.data;e.commit("setViewRange",a),e.dispatch("setDatesFromViewRange")})).catch((function(t){e.commit("setViewRange","1M"),e.dispatch("setDatesFromViewRange")}))},setDatesFromViewRange:function(e){if(localStorage.viewRangeStart&&e.commit("setStart",new Date(localStorage.viewRangeStart)),localStorage.viewRangeEnd&&e.commit("setEnd",new Date(localStorage.viewRangeEnd)),localStorage.viewRangeDefaultStart&&e.commit("setDefaultStart",new Date(localStorage.viewRangeDefaultStart)),localStorage.viewRangeDefaultEnd&&e.commit("setDefaultEnd",new Date(localStorage.viewRangeDefaultEnd)),null===e.getters.end||null===e.getters.start){var t,a;switch(e.getters.viewRange){case"1D":t=new Date,a=new Date(t.getTime()),t.setHours(0,0,0,0),a.setHours(23,59,59,999);break;case"1W":t=new Date,a=new Date(t.getTime());var n=t.getDate()-t.getDay()+(0===t.getDay()?-6:1);t.setDate(n),t.setHours(0,0,0,0);var s=a.getDate()-(a.getDay()-1)+6;a.setDate(s),a.setHours(23,59,59,999);break;case"1M":t=new Date,(t=new Date(t.getFullYear(),t.getMonth(),1)).setHours(0,0,0,0),(a=new Date(t.getFullYear(),t.getMonth()+1,0)).setHours(23,59,59,999);break;case"3M":t=new Date,a=new Date;var o=Math.floor((t.getMonth()+3)/3)-1;(t=new Date(t.getFullYear(),[0,3,6,9][o],1)).setHours(0,0,0,0),a=new Date(a.getFullYear(),[2,5,8,11][o],1),(a=new Date(a.getFullYear(),a.getMonth()+1,0)).setHours(23,59,59,999);break;case"6M":t=new Date,a=new Date;var r=t.getMonth()<=5?0:1;(t=new Date(t.getFullYear(),[0,6][r],1)).setHours(0,0,0,0),a=new Date(a.getFullYear(),[5,11][r],1),(a=new Date(a.getFullYear(),a.getMonth()+1,0)).setHours(23,59,59,999);break;case"1Y":t=new Date,a=new Date,t=new Date(t.getFullYear(),0,1),a=new Date(a.getFullYear(),11,31),t.setHours(0,0,0,0),a.setHours(23,59,59,999)}e.commit("setStart",t),e.commit("setEnd",a),e.commit("setDefaultStart",t),e.commit("setDefaultEnd",a)}}},mutations:{setStart:function(e,t){e.start=t,window.localStorage.setItem("viewRangeStart",t)},setEnd:function(e,t){e.end=t,window.localStorage.setItem("viewRangeEnd",t)},setDefaultStart:function(e,t){e.defaultStart=t,window.localStorage.setItem("viewRangeDefaultStart",t)},setDefaultEnd:function(e,t){e.defaultEnd=t,window.localStorage.setItem("viewRangeDefaultEnd",t)},setViewRange:function(e,t){e.viewRange=t}}};var u=function(){return{listPageSize:33,timezone:""}},_={initialiseStore:function(e){localStorage.listPageSize&&(u.listPageSize=localStorage.listPageSize,e.commit("setListPageSize",{length:localStorage.listPageSize})),localStorage.listPageSize||axios.get("./api/v1/preferences/listPageSize").then((function(t){e.commit("setListPageSize",{length:parseInt(t.data.data.attributes.data)})})),localStorage.timezone&&(u.timezone=localStorage.timezone,e.commit("setTimezone",{timezone:localStorage.timezone})),localStorage.timezone||axios.get("./api/v1/configuration/app.timezone").then((function(t){e.commit("setTimezone",{timezone:t.data.data.value})}))}};const d={namespaced:!0,state:u,getters:{listPageSize:function(e){return e.listPageSize},timezone:function(e){return e.timezone}},actions:_,mutations:{setListPageSize:function(e,t){var a=parseInt(t.length);0!==a&&(e.listPageSize=a,localStorage.listPageSize=a)},setTimezone:function(e,t){""!==t.timezone&&(e.timezone=t.timezone,localStorage.timezone=t.timezone)}}};s().use(o.ZP);const p=new o.ZP.Store({namespaced:!0,modules:{root:d,transactions:{namespaced:!0,modules:{create:c,edit:{namespaced:!0,state:function(){return{}},getters:{},actions:{},mutations:{}}}},accounts:{namespaced:!0,modules:{index:{namespaced:!0,state:function(){return{orderMode:!1,activeFilter:1}},getters:{orderMode:function(e){return e.orderMode},activeFilter:function(e){return e.activeFilter}},actions:{},mutations:{setOrderMode:function(e,t){e.orderMode=t},setActiveFilter:function(e,t){e.activeFilter=t}}}}},dashboard:{namespaced:!0,modules:{index:l}}},strict:!1,plugins:[],state:{currencyPreference:{},locale:"en-US",listPageSize:50},mutations:{setCurrencyPreference:function(e,t){e.currencyPreference=t.payload},initialiseStore:function(e){if(localStorage.locale)e.locale=localStorage.locale;else{var t=document.head.querySelector('meta[name="locale"]');t&&(e.locale=t.content,localStorage.locale=t.content)}}},getters:{currencyCode:function(e){return e.currencyPreference.code},currencyPreference:function(e){return e.currencyPreference},currencyId:function(e){return e.currencyPreference.id},locale:function(e){return e.locale}},actions:{updateCurrencyPreference:function(e){localStorage.currencyPreference?e.commit("setCurrencyPreference",{payload:JSON.parse(localStorage.currencyPreference)}):axios.get("./api/v1/currencies/default").then((function(t){var a={id:parseInt(t.data.data.id),name:t.data.data.attributes.name,symbol:t.data.data.attributes.symbol,code:t.data.data.attributes.code,decimal_places:parseInt(t.data.data.attributes.decimal_places)};localStorage.currencyPreference=JSON.stringify(a),e.commit("setCurrencyPreference",{payload:a})})).catch((function(t){console.error(t),e.commit("setCurrencyPreference",{payload:{id:1,name:"Euro",symbol:"€",code:"EUR",decimal_places:2}})}))}}})},157:(e,t,a)=>{e.exports=new vuei18n({locale:document.documentElement.lang,fallbackLocale:"en",messages:{bg:a(7154),cs:a(6407),de:a(4726),en:a(3340),"en-us":a(3340),"en-gb":a(6318),es:a(5394),el:a(3636),fr:a(2551),hu:a(995),it:a(9112),nl:a(4671),nb:a(9085),pl:a(6238),fi:a(7868),"pt-br":a(6586),"pt-pt":a(8664),ro:a(1102),ru:a(753),"zh-tw":a(1715),"zh-cn":a(4556),sk:a(7049),sv:a(7921),vi:a(1497)}})},7291:(e,t,a)=>{"use strict";var n=a(1900);const s=(0,n.Z)({name:"Dashboard"},(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("top-boxes"),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-account")],1)]),e._v(" "),a("main-account-list"),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-budget-list")],1)]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("main-category-list")],1)]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-debit-list")],1),e._v(" "),a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-credit-list")],1)]),e._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-piggy-list")],1),e._v(" "),a("div",{staticClass:"col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("main-bills-list")],1)])],1)}),[],!1,null,null,null).exports;var o=a(629);function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t0){var r=s+" "+e;if(!(r.length>t))return o===n.length-1?void a.push(r):void(s=r);a.push(s),s=""}o!==n.length-1&&e.length2}},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[a("a",{attrs:{href:t.url}},[e._v(e._s(t.title))])]),e._v(" "),a("div",{staticClass:"card-tools"},[a("span",{class:parseFloat(t.current_balance)<0?"text-danger":"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(parseFloat(t.current_balance)))+"\n ")])])]),e._v(" "),a("div",{staticClass:"card-body table-responsive p-0"},[a("div",[1===e.accounts.length?a("transaction-list-large",{attrs:{account_id:t.id,transactions:t.transactions}}):e._e(),e._v(" "),2===e.accounts.length?a("transaction-list-medium",{attrs:{account_id:t.id,transactions:t.transactions}}):e._e(),e._v(" "),e.accounts.length>2?a("transaction-list-small",{attrs:{account_id:t.id,transactions:t.transactions}}):e._e()],1)])])])})),0)])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"col"},[t("div",{staticClass:"card"},[t("div",{staticClass:"card-body"},[t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"col"},[t("div",{staticClass:"card"},[t("div",{staticClass:"card-body"},[t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])])])])}],!1,null,"3b8050c6",null).exports;function A(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function P(e){for(var t=1;t'+a+""},loadBills:function(e){for(var t in e)if(e.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294){var a=e[t],n=a.attributes.active;a.attributes.pay_dates.length>0&&n&&this.bills.push(a)}this.error=!1,this.loading=!1}}},L=(0,n.Z)(N,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.$t("firefly.bills")))])]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"card-body"},[e._m(0)]):e._e(),e._v(" "),e.error?a("div",{staticClass:"card-body"},[e._m(1)]):e._e(),e._v(" "),e.loading||e.error?e._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-striped"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.bills")))]),e._v(" "),a("thead",[a("tr",[a("th",{staticStyle:{width:"35%"},attrs:{scope:"col"}},[e._v(e._s(e.$t("list.name")))]),e._v(" "),a("th",{staticStyle:{width:"25%"},attrs:{scope:"col"}},[e._v(e._s(e.$t("list.next_expected_match")))])])]),e._v(" "),a("tbody",e._l(this.bills,(function(t){return a("tr",[a("td",[a("a",{attrs:{href:"./bills/show/"+t.id,title:t.attributes.name}},[e._v(e._s(t.attributes.name))]),e._v("\n (~ "),a("span",{staticClass:"text-danger"},[e._v(e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.attributes.currency_code}).format((parseFloat(t.attributes.amount_min)+parseFloat(t.attributes.amount_max))/-2)))]),e._v(")\n "),t.attributes.object_group_title?a("small",{staticClass:"text-muted"},[a("br"),e._v("\n "+e._s(t.attributes.object_group_title)+"\n ")]):e._e()]),e._v(" "),a("td",[e._l(t.attributes.paid_dates,(function(t){return a("span",[a("span",{domProps:{innerHTML:e._s(e.renderPaidDate(t))}}),a("br")])})),e._v(" "),e._l(t.attributes.pay_dates,(function(n){return 0===t.attributes.paid_dates.length?a("span",[e._v("\n "+e._s(new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(n)))+"\n "),a("br")]):e._e()}))],2)])})),0)])]),e._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./bills"}},[a("i",{staticClass:"far fa-money-bill-alt"}),e._v(" "+e._s(e.$t("firefly.go_to_bills")))])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports,F={name:"BudgetLimitRow",created:function(){var e;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US"},data:function(){return{locale:"en-US"}},props:{budgetLimit:{type:Object,default:function(){return{}}},budget:{type:Object,default:function(){return{}}}}},R=(0,n.Z)(F,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("tr",[a("td",{staticStyle:{width:"25%"}},[a("a",{attrs:{href:"./budgets/show/"+e.budgetLimit.budget_id}},[e._v(e._s(e.budgetLimit.budget_name))])]),e._v(" "),a("td",{staticStyle:{"vertical-align":"middle"}},[a("div",{staticClass:"progress progress active"},[a("div",{staticClass:"progress-bar bg-success progress-bar-striped",style:"width: "+e.budgetLimit.pctGreen+"%;",attrs:{"aria-valuenow":e.budgetLimit.pctGreen,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.budgetLimit.pctGreen>35?a("span",[e._v("\n "+e._s(e.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.spent),total:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.amount)}))+"\n ")]):e._e()]),e._v(" "),a("div",{staticClass:"progress-bar bg-warning progress-bar-striped",style:"width: "+e.budgetLimit.pctOrange+"%;",attrs:{"aria-valuenow":e.budgetLimit.pctOrange,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.budgetLimit.pctRed<=50&&e.budgetLimit.pctOrange>35?a("span",[e._v("\n "+e._s(e.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.spent),total:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.amount)}))+"\n ")]):e._e()]),e._v(" "),a("div",{staticClass:"progress-bar bg-danger progress-bar-striped",style:"width: "+e.budgetLimit.pctRed+"%;",attrs:{"aria-valuenow":e.budgetLimit.pctRed,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[e.budgetLimit.pctOrange<=50&&e.budgetLimit.pctRed>35?a("span",{staticClass:"text-muted"},[e._v("\n "+e._s(e.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.spent),total:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.amount)}))+"\n ")]):e._e()]),e._v(" "),e.budgetLimit.pctGreen<=35&&0===e.budgetLimit.pctOrange&&0===e.budgetLimit.pctRed&&0!==e.budgetLimit.pctGreen?a("span",{staticStyle:{"line-height":"16px"}},[e._v("\n   "+e._s(e.$t("firefly.spent_x_of_y",{amount:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.spent),total:Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(e.budgetLimit.amount)}))+"\n ")]):e._e()]),e._v(" "),a("small",{staticClass:"d-none d-lg-block"},[e._v("\n "+e._s(new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"long",day:"numeric"}).format(e.budgetLimit.start))+"\n →\n "+e._s(new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"long",day:"numeric"}).format(e.budgetLimit.end))+"\n ")])]),e._v(" "),a("td",{staticClass:"align-middle d-none d-lg-table-cell",staticStyle:{width:"10%"}},[parseFloat(e.budgetLimit.amount)+parseFloat(e.budgetLimit.spent)>0?a("span",{staticClass:"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(parseFloat(e.budgetLimit.amount)+parseFloat(e.budgetLimit.spent)))+"\n ")]):e._e(),e._v(" "),0===parseFloat(e.budgetLimit.amount)+parseFloat(e.budgetLimit.spent)?a("span",{staticClass:"text-muted"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(0))+"\n ")]):e._e(),e._v(" "),parseFloat(e.budgetLimit.amount)+parseFloat(e.budgetLimit.spent)<0?a("span",{staticClass:"text-danger"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:e.budgetLimit.currency_code}).format(parseFloat(e.budgetLimit.amount)+parseFloat(e.budgetLimit.spent)))+"\n ")]):e._e()])])}),[],!1,null,"7988ecb6",null).exports,E={name:"BudgetRow",created:function(){var e;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US"},data:function(){return{locale:"en-US"}},props:{budget:{type:Object,default:{}}}},M={name:"BudgetListGroup",components:{BudgetLimitRow:R,BudgetRow:(0,n.Z)(E,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("tr",[a("td",{staticStyle:{width:"25%"}},[a("a",{attrs:{href:"./budgets/show/"+e.budget.id}},[e._v(e._s(e.budget.name))])]),e._v(" "),a("td",{staticClass:"align-middle text-right"},[a("span",{staticClass:"text-danger"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:e.budget.currency_code}).format(parseFloat(e.budget.spent)))+"\n ")])])])}),[],!1,null,"2fc8f640",null).exports},props:{title:String,budgetLimits:Array,budgets:Array}},$=(0,n.Z)(M,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.title))])]),e._v(" "),a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.title))]),e._v(" "),a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.budget")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.spent")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.left")))])])]),e._v(" "),a("tbody",[e._l(e.budgetLimits,(function(e,t){return a("BudgetLimitRow",{key:t,attrs:{budgetLimit:e}})})),e._v(" "),e._l(e.budgets,(function(e,t){return a("BudgetRow",{key:t,attrs:{budget:e}})}))],2)])]),e._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./budgets"}},[a("i",{staticClass:"far fa-money-bill-alt"}),e._v(" "+e._s(e.$t("firefly.go_to_budgets")))])])])}),[],!1,null,"2b21deef",null).exports;function U(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function V(e){for(var t=1;td&&(h=100-(m=_/d*100));var y={id:i,amount:r.attributes.amount,budget_id:c,budget_name:this.budgets[r.attributes.budget_id].name,currency_id:l,currency_code:r.attributes.currency_code,period:r.attributes.period,start:new Date(r.attributes.start),end:new Date(r.attributes.end),spent:r.attributes.spent,pctGreen:g,pctOrange:m,pctRed:h};this.budgetLimits[p].push(y)}},filterBudgets:function(e,t){for(var a in this.rawBudgets)this.rawBudgets.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&this.rawBudgets[a].currency_id===t&&this.rawBudgets[a].id===e&&this.rawBudgets.splice(parseInt(a),1)}}},Z=(0,n.Z)(K,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.loading?e._e():a("div",{staticClass:"row"},[e.budgetLimits.daily.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.daily,title:e.$t("firefly.daily_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.weekly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.weekly,title:e.$t("firefly.weekly_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.monthly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.monthly,title:e.$t("firefly.monthly_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.quarterly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.quarterly,title:e.$t("firefly.quarterly_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.half_year.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.half_year,title:e.$t("firefly.half_year_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.yearly.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.yearly,title:e.$t("firefly.yearly_budgets")}})],1):e._e(),e._v(" "),e.budgetLimits.other.length>0||e.rawBudgets.length>0?a("div",{staticClass:"col-xl-6 col-lg-12 col-md-12 col-sm-12 col-xs-12"},[a("BudgetListGroup",{attrs:{budgetLimits:e.budgetLimits.other,budgets:e.rawBudgets,title:e.$t("firefly.other_budgets")}})],1):e._e()]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"row"},[e._m(0)]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"col"},[t("div",{staticClass:"card"},[t("div",{staticClass:"card-body"},[t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])])])])}],!1,null,"20b8cacf",null).exports;function Y(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function H(e){for(var t=1;tthis.max?a.difference_float:this.max,this.income.push(a)}for(var n in 0===this.max&&(this.max=1),this.income)if(this.income.hasOwnProperty(n)){var s=this.income[n];s.pct=s.difference_float/this.max*100,this.income[n]=s}this.income.sort((function(e,t){return e.pct>t.pct?-1:t.pct>e.pct?1:0}))}}},te=(0,n.Z)(ee,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.$t("firefly.revenue_accounts")))])]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"card-body"},[e._m(0)]):e._e(),e._v(" "),e.error?a("div",{staticClass:"card-body"},[e._m(1)]):e._e(),e._v(" "),e.loading||e.error?e._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.revenue_accounts")))]),e._v(" "),a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.category")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.spent")))])])]),e._v(" "),a("tbody",e._l(e.income,(function(t){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./accounts/show/"+t.id}},[e._v(e._s(t.name))])]),e._v(" "),a("td",{staticClass:"align-middle"},[t.pct>0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:t.pct+"%"},attrs:{"aria-valuenow":t.pct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.pct>20?a("span",[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.difference_float))+"\n ")]):e._e()]),e._v(" "),t.pct<=20?a("span",{staticStyle:{"line-height":"16px"}},[e._v(" \n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.difference_float))+"\n ")]):e._e()]):e._e()])])})),0)])]),e._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/deposit"}},[a("i",{staticClass:"far fa-money-bill-alt"}),e._v(" "+e._s(e.$t("firefly.go_to_deposits")))])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports;function ae(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function ne(e){for(var t=1;tt.pct?-1:t.pct>e.pct?1:0}))}}},ce=(0,n.Z)(ie,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.$t("firefly.expense_accounts")))])]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"card-body"},[e._m(0)]):e._e(),e._v(" "),e.error?a("div",{staticClass:"card-body"},[e._m(1)]):e._e(),e._v(" "),e.loading||e.error?e._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.expense_accounts")))]),e._v(" "),a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.category")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.spent")))])])]),e._v(" "),a("tbody",e._l(e.expenses,(function(t){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./accounts/show/"+t.id}},[e._v(e._s(t.name))])]),e._v(" "),a("td",{staticClass:"align-middle"},[t.pct>0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-danger",style:{width:t.pct+"%"},attrs:{"aria-valuenow":t.pct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.pct>20?a("span",[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.difference_float))+"\n ")]):e._e()]),e._v(" "),t.pct<=20?a("span",{staticStyle:{"line-height":"16px"}},[e._v(" \n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.difference_float))+"\n ")]):e._e()]):e._e()])])})),0)])]),e._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/withdrawal"}},[a("i",{staticClass:"far fa-money-bill-alt"}),e._v(" "+e._s(e.$t("firefly.go_to_withdrawals")))])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,null,null).exports,le={name:"MainPiggyList",data:function(){return{piggy_banks:[],loading:!0,error:!1,locale:"en-US"}},created:function(){var e,t=this;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US",axios.get("./api/v1/piggy_banks").then((function(e){t.loadPiggyBanks(e.data.data),t.loading=!1})).catch((function(e){t.error=!0}))},methods:{loadPiggyBanks:function(e){for(var t in e)if(e.hasOwnProperty(t)&&/^0$|^[1-9]\d*$/.test(t)&&t<=4294967294){var a=e[t];0!==parseFloat(a.attributes.left_to_save)&&(a.attributes.pct=parseFloat(a.attributes.current_amount)/parseFloat(a.attributes.target_amount)*100,this.piggy_banks.push(a))}this.piggy_banks.sort((function(e,t){return t.attributes.pct-e.attributes.pct}))}}},ue=(0,n.Z)(le,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.$t("firefly.piggy_banks")))])]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"card-body"},[e._m(0)]):e._e(),e._v(" "),e.error?a("div",{staticClass:"card-body"},[e._m(1)]):e._e(),e._v(" "),e.loading||e.error?e._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-striped"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.piggy_banks")))]),e._v(" "),a("thead",[a("tr",[a("th",{staticStyle:{width:"35%"},attrs:{scope:"col"}},[e._v(e._s(e.$t("list.piggy_bank")))]),e._v(" "),a("th",{staticStyle:{width:"40%"},attrs:{scope:"col"}},[e._v(e._s(e.$t("list.percentage"))+" "),a("small",[e._v("/ "+e._s(e.$t("list.amount")))])])])]),e._v(" "),a("tbody",e._l(this.piggy_banks,(function(t){return a("tr",[a("td",[a("a",{attrs:{href:"./piggy-banks/show/"+t.id,title:t.attributes.name}},[e._v(e._s(t.attributes.name))]),e._v(" "),t.attributes.object_group_title?a("small",{staticClass:"text-muted"},[a("br"),e._v("\n "+e._s(t.attributes.object_group_title)+"\n ")]):e._e()]),e._v(" "),a("td",[a("div",{staticClass:"progress-group"},[a("div",{staticClass:"progress progress-sm"},[t.attributes.pct<100?a("div",{staticClass:"progress-bar progress-bar-striped primary",style:{width:t.attributes.pct+"%"}}):e._e(),e._v(" "),100===t.attributes.pct?a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:t.attributes.pct+"%"}}):e._e()])]),e._v(" "),a("span",{staticClass:"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.attributes.currency_code}).format(t.attributes.current_amount))+"\n ")]),e._v("\n of\n "),a("span",{staticClass:"text-success"},[e._v(e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.attributes.currency_code}).format(t.attributes.target_amount)))])])])})),0)])]),e._v(" "),a("div",{staticClass:"card-footer"},[a("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./piggy-banks"}},[a("i",{staticClass:"far fa-money-bill-alt"}),e._v(" "+e._s(e.$t("firefly.go_to_piggies")))])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,"c17c9a5a",null).exports,_e={name:"TransactionListLarge",data:function(){return{locale:"en-US"}},created:function(){var e;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US"},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},de=(0,n.Z)(_e,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.transaction_table_description")))]),e._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.description")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.opposing_account")))]),e._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.amount")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.category")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.budget")))])])]),e._v(" "),a("tbody",e._l(this.transactions,(function(t){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+t.id,title:t.date}},[t.attributes.transactions.length>1?a("span",[e._v(e._s(t.attributes.group_title))]):e._e(),e._v(" "),1===t.attributes.transactions.length?a("span",[e._v(e._s(t.attributes.transactions[0].description))]):e._e()])]),e._v(" "),a("td",e._l(t.attributes.transactions,(function(t){return a("span",["withdrawal"===t.type?a("a",{attrs:{href:"accounts/show/"+t.destination_id}},[e._v(e._s(t.destination_name))]):e._e(),e._v(" "),"deposit"===t.type?a("a",{attrs:{href:"accounts/show/"+t.source_id}},[e._v(e._s(t.source_name))]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.source_id)===e.account_id?a("a",{attrs:{href:"accounts/show/"+t.destination_id}},[e._v(e._s(t.destination_name))]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.destination_id)===e.account_id?a("a",{attrs:{href:"accounts/show/"+t.source_id}},[e._v(e._s(t.source_name))]):e._e(),e._v(" "),a("br")])})),0),e._v(" "),a("td",{staticStyle:{"text-align":"right"}},e._l(t.attributes.transactions,(function(t){return a("span",["withdrawal"===t.type?a("span",{staticClass:"text-danger"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"deposit"===t.type?a("span",{staticClass:"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.source_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.destination_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e()])})),0),e._v(" "),a("td",e._l(t.attributes.transactions,(function(t){return a("span",[0!==t.category_id?a("a",{attrs:{href:"categories/show/"+t.category_id}},[e._v(e._s(t.category_name))]):e._e(),a("br")])})),0),e._v(" "),a("td",e._l(t.attributes.transactions,(function(t){return a("span",[0!==t.budget_id?a("a",{attrs:{href:"budgets/show/"+t.budget_id}},[e._v(e._s(t.budget_name))]):e._e(),a("br")])})),0)])})),0)])}),[],!1,null,"6e420753",null).exports,pe={name:"TransactionListMedium",data:function(){return{locale:"en-US"}},created:function(){var e;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US"},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},ge=(0,n.Z)(pe,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.transaction_table_description")))]),e._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.description")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.opposing_account")))]),e._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.amount")))])])]),e._v(" "),a("tbody",e._l(this.transactions,(function(t){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+t.id,title:t.date}},[t.attributes.transactions.length>1?a("span",[e._v(e._s(t.attributes.group_title))]):e._e(),e._v(" "),1===t.attributes.transactions.length?a("span",[e._v(e._s(t.attributes.transactions[0].description))]):e._e()])]),e._v(" "),a("td",e._l(t.attributes.transactions,(function(t){return a("span",["withdrawal"===t.type?a("a",{attrs:{href:"accounts/show/"+t.destination_id}},[e._v(e._s(t.destination_name))]):e._e(),e._v(" "),"deposit"===t.type?a("a",{attrs:{href:"accounts/show/"+t.source_id}},[e._v(e._s(t.source_name))]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.source_id)===e.account_id?a("a",{attrs:{href:"accounts/show/"+t.destination_id}},[e._v(e._s(t.destination_name))]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.destination_id)===e.account_id?a("a",{attrs:{href:"accounts/show/"+t.source_id}},[e._v(e._s(t.source_name))]):e._e(),e._v(" "),a("br")])})),0),e._v(" "),a("td",{staticStyle:{"text-align":"right"}},e._l(t.attributes.transactions,(function(t){return a("span",["withdrawal"===t.type?a("span",{staticClass:"text-danger"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"deposit"===t.type?a("span",{staticClass:"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.source_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.destination_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e()])})),0)])})),0)])}),[],!1,null,"0d4f7042",null).exports,me={name:"TransactionListSmall",data:function(){return{locale:"en-US"}},created:function(){var e;this.locale=null!==(e=localStorage.locale)&&void 0!==e?e:"en-US"},methods:{},props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},he=(0,n.Z)(me,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("table",{staticClass:"table table-striped table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.transaction_table_description")))]),e._v(" "),a("thead",[a("tr",[a("th",{staticClass:"text-left",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.description")))]),e._v(" "),a("th",{staticClass:"text-right",attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.amount")))])])]),e._v(" "),a("tbody",e._l(this.transactions,(function(t){return a("tr",[a("td",[a("a",{attrs:{href:"transactions/show/"+t.id,title:new Intl.DateTimeFormat(e.locale,{year:"numeric",month:"long",day:"numeric"}).format(new Date(t.attributes.transactions[0].date))}},[t.attributes.transactions.length>1?a("span",[e._v(e._s(t.attributes.group_title))]):e._e(),e._v(" "),1===t.attributes.transactions.length?a("span",[e._v(e._s(t.attributes.transactions[0].description))]):e._e()])]),e._v(" "),a("td",{staticStyle:{"text-align":"right"}},e._l(t.attributes.transactions,(function(t){return a("span",["withdrawal"===t.type?a("span",{staticClass:"text-danger"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"deposit"===t.type?a("span",{staticClass:"text-success"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.source_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(-1*t.amount))),a("br")]):e._e(),e._v(" "),"transfer"===t.type&&parseInt(t.destination_id)===e.account_id?a("span",{staticClass:"text-info"},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.amount))),a("br")]):e._e()])})),0)])})),0)])}),[],!1,null,"4cd7a656",null).exports;var ye=a(9879);function be(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function fe(e){for(var t=1;tthis.earned?parseFloat(u.sum):this.earned}}},sortCategories:function(){var e=[];for(var t in this.categories)this.categories.hasOwnProperty(t)&&e.push(this.categories[t]);for(var a in e.sort((function(e,t){return e.spent+e.earned-(t.spent+t.earned)})),e)if(e.hasOwnProperty(a)){var n=e[a];n.spentPct=n.spent/this.spent*100,n.earnedPct=n.earned/this.earned*100,this.sortedList.push(n)}}}},Se=(0,n.Z)(De,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.$t("firefly.categories")))])]),e._v(" "),e.loading&&!e.error?a("div",{staticClass:"card-body"},[e._m(0)]):e._e(),e._v(" "),e.error?a("div",{staticClass:"card-body"},[e._m(1)]):e._e(),e._v(" "),e.loading||e.error?e._e():a("div",{staticClass:"card-body table-responsive p-0"},[a("table",{staticClass:"table table-sm"},[a("caption",{staticStyle:{display:"none"}},[e._v(e._s(e.$t("firefly.categories")))]),e._v(" "),a("thead",[a("tr",[a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.category")))]),e._v(" "),a("th",{attrs:{scope:"col"}},[e._v(e._s(e.$t("firefly.spent")))])])]),e._v(" "),a("tbody",e._l(e.sortedList,(function(t){return a("tr",[a("td",{staticStyle:{width:"20%"}},[a("a",{attrs:{href:"./categories/show/"+t.id}},[e._v(e._s(t.name))])]),e._v(" "),a("td",{staticClass:"align-middle"},[t.spentPct>0?a("div",{staticClass:"progress"},[a("div",{staticClass:"progress-bar progress-bar-striped bg-danger",style:{width:t.spentPct+"%"},attrs:{"aria-valuenow":t.spentPct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar"}},[t.spentPct>20?a("span",[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.spent))+"\n ")]):e._e()]),e._v(" "),t.spentPct<=20?a("span",{staticClass:"progress-label",staticStyle:{"line-height":"16px"}},[e._v(" \n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.spent))+"\n ")]):e._e()]):e._e(),e._v(" "),t.earnedPct>0?a("div",{staticClass:"progress justify-content-end",attrs:{title:"hello2"}},[t.earnedPct<=20?a("span",{staticStyle:{"line-height":"16px"}},[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.earned))+"\n  ")]):e._e(),e._v(" "),a("div",{staticClass:"progress-bar progress-bar-striped bg-success",style:{width:t.earnedPct+"%"},attrs:{"aria-valuenow":t.earnedPct,"aria-valuemax":"100","aria-valuemin":"0",role:"progressbar",title:"hello"}},[t.earnedPct>20?a("span",[e._v("\n "+e._s(Intl.NumberFormat(e.locale,{style:"currency",currency:t.currency_code}).format(t.earned))+"\n ")]):e._e()])]):e._e()])])})),0)])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-spinner fa-spin"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"text-center"},[t("i",{staticClass:"fas fa-exclamation-triangle text-danger"})])}],!1,null,"2290c5b8",null).exports;var Ie=a(7760),Ce=a.n(Ie),xe=a(9899);a(232),a(2181),Ce().component("transaction-list-large",de),Ce().component("transaction-list-medium",ge),Ce().component("transaction-list-small",he),Ce().component("dashboard",s),Ce().component("top-boxes",d),Ce().component("main-account",k),Ce().component("main-account-list",j),Ce().component("main-bills-list",L),Ce().component("main-budget-list",Z),Ce().component("main-category-list",Se),Ce().component("main-debit-list",ce),Ce().component("main-credit-list",te),Ce().component("main-piggy-list",ue),Ce().use(o.ZP);var ze=a(157),je={};new(Ce())({i18n:ze,store:xe.Z,el:"#dashboard",render:function(e){return e(s,{props:je})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference"),this.$store.dispatch("root/initialiseStore"),this.$store.dispatch("dashboard/index/initialiseStore")}}),new(Ce())({i18n:ze,store:xe.Z,el:"#calendar",render:function(e){return e(ye.Z,{props:je})}})},4478:(e,t,a)=>{"use strict";function n(){return{description:[],amount:[],source:[],destination:[],currency:[],foreign_currency:[],foreign_amount:[],date:[],custom_dates:[],budget:[],category:[],bill:[],tags:[],piggy_bank:[],internal_reference:[],external_url:[],notes:[],location:[]}}function s(){return{description:"",transaction_journal_id:0,source_account_id:null,source_account_name:null,source_account_type:null,source_account_currency_id:null,source_account_currency_code:null,source_account_currency_symbol:null,destination_account_id:null,destination_account_name:null,destination_account_type:null,destination_account_currency_id:null,destination_account_currency_code:null,destination_account_currency_symbol:null,source_account:{id:0,name:"",name_with_balance:"",type:"",currency_id:0,currency_name:"",currency_code:"",currency_decimal_places:2},destination_account:{id:0,name:"",type:"",currency_id:0,currency_name:"",currency_code:"",currency_decimal_places:2},amount:"",currency_id:0,foreign_amount:"",foreign_currency_id:0,category:null,budget_id:0,bill_id:0,piggy_bank_id:0,tags:[],interest_date:null,book_date:null,process_date:null,due_date:null,payment_date:null,invoice_date:null,internal_reference:null,external_url:null,external_id:null,notes:null,links:[],attachments:[],zoom_level:null,longitude:null,latitude:null,errors:{}}}a.d(t,{kQ:()=>n,f$:()=>s})},4547:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>i});var n=a(4015),s=a.n(n),o=a(3645),r=a.n(o)()(s());r.push([e.id,".dropdown-item[data-v-12891edc],.dropdown-item[data-v-12891edc]:hover{color:#212529}","",{version:3,sources:["webpack://./src/components/dashboard/Calendar.vue"],names:[],mappings:"AA0OA,sEACA,aACA",sourcesContent:['\x3c!--\n - Calendar.vue\n - Copyright (c) 2020 james@firefly-iii.org\n -\n - This file is part of Firefly III (https://github.com/firefly-iii).\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see .\n --\x3e\n\n\n\n