(self.webpackChunk=self.webpackChunk||[]).push([[111],{232:(e,t,a)=>{"use strict";a.r(t);var n=a(7760),r=a.n(n),o=a(7152),i=a(1444);window.$=window.jQuery=a(9755),window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var s=document.head.querySelector('meta[name="csrf-token"]');s?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=s.content:console.error("CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token");var l=document.head.querySelector('meta[name="locale"]');localStorage.locale=l?l.content:"en_US",a(6891),a(3734),a(7632),a(5432),window.vuei18n=o.Z,window.uiv=i,r().use(vuei18n),r().use(i),window.Vue=r()},9899:(e,t,a)=>{"use strict";a.d(t,{Z:()=>z});var n=a(7760),r=a.n(n),o=a(629),i=a(4478),s=a(3465),l={addTransaction:function(e){var t=s(e.defaultTransaction);t.errors=s(e.defaultErrors),e.transactions.push(t)},resetErrors:function(e,t){e.transactions[t.index].errors=s(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}};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,i.f$)(),defaultErrors:(0,i.kQ)()}},getters:{transactions:function(e){return e.transactions},defaultErrors:function(e){return e.defaultErrors},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:l};const _={namespaced:!0,state:function(){return{}},getters:{},actions:{},mutations:{}};var d=a(9119),u=a(3894),p=a(584),y=a(7090),m=a(4431),h=a(8358),g=a(4135),b=a(3703),f={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,window.localStorage.setItem("viewRange",t)}};const k={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){e.dispatch("restoreViewRange"),axios.get("./api/v1/preferences/viewRange").then((function(t){var a=t.data.data.attributes.data,n=e.getters.viewRange;e.commit("setViewRange",a),a!==n&&e.dispatch("setDatesFromViewRange"),a===n&&e.dispatch("restoreViewRangeDates")})).catch((function(){e.commit("setViewRange","1M"),e.dispatch("setDatesFromViewRange")}))},restoreViewRangeDates:function(e){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))},restoreViewRange:function(e){var t=localStorage.getItem("viewRange");null!==t&&e.commit("setViewRange",t)},setDatesFromViewRange:function(e){var t,a,n=e.getters.viewRange,r=new Date;switch(n){case"1D":t=(0,d.Z)(r),a=(0,u.Z)(r);break;case"1W":t=(0,d.Z)((0,p.Z)(r,{weekStartsOn:1})),a=(0,u.Z)((0,y.Z)(r,{weekStartsOn:1}));break;case"1M":t=(0,d.Z)((0,b.Z)(r)),a=(0,u.Z)((0,g.Z)(r));break;case"3M":t=(0,d.Z)((0,m.Z)(r)),a=(0,u.Z)((0,h.Z)(r));break;case"6M":r.getMonth()<=5&&((t=new Date(r)).setMonth(0),t.setDate(1),t=(0,d.Z)(t),(a=new Date(r)).setMonth(5),a.setDate(30),a=(0,u.Z)(t)),r.getMonth()>5&&((t=new Date(r)).setMonth(6),t.setDate(1),t=(0,d.Z)(t),(a=new Date(r)).setMonth(11),a.setDate(31),a=(0,u.Z)(t));break;case"1Y":(t=new Date(r)).setMonth(0),t.setDate(1),t=(0,d.Z)(t),(a=new Date(r)).setMonth(11),a.setDate(31),a=(0,u.Z)(a)}e.commit("setStart",t),e.commit("setEnd",a),e.commit("setDefaultStart",t),e.commit("setDefaultEnd",a)}},mutations:f};var v=function(){return{listPageSize:33,timezone:"",cacheKey:{age:0,value:"empty"}}},w={initialiseStore:function(e){if(localStorage.cacheKey){var t=JSON.parse(localStorage.cacheKey);Date.now()-t.age>864e5?e.commit("refreshCacheKey"):e.commit("setCacheKey",t)}else e.commit("refreshCacheKey");localStorage.listPageSize&&(v.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&&(v.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})}))}},D={refreshCacheKey:function(e){var t=Date.now(),a=Array(9).join((Math.random().toString(36)+"00000000000000000").slice(2,18)).slice(0,8),n={age:t,value:a};localStorage.cacheKey=JSON.stringify(n),e.cacheKey={age:t,value:a}},setCacheKey:function(e,t){localStorage.cacheKey=JSON.stringify(t),e.cacheKey=t},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)}};const S={namespaced:!0,state:v,getters:{listPageSize:function(e){return e.listPageSize},timezone:function(e){return e.timezone},cacheKey:function(e){return e.cacheKey.value}},actions:w,mutations:D};const x={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}}};r().use(o.ZP);const z=new o.ZP.Store({namespaced:!0,modules:{root:S,transactions:{namespaced:!0,modules:{create:c,edit:_}},accounts:{namespaced:!0,modules:{index:x}},dashboard:{namespaced:!0,modules:{index:k}}},strict:false,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(4901),cs:a(9789),de:a(9929),en:a(790),"en-us":a(790),"en-gb":a(4632),es:a(8563),el:a(7498),fr:a(844),hu:a(4626),it:a(504),ja:a(8566),nl:a(3055),nb:a(4870),pl:a(5143),fi:a(2276),"pt-br":a(2055),"pt-pt":a(9898),ro:a(4691),ru:a(9672),"zh-tw":a(7742),"zh-cn":a(4813),sk:a(1941),sv:a(3244),vi:a(245)}})},8948:(e,t,a)=>{"use strict";var n=a(7760),r=a.n(n),o=a(9899),i=a(7757),s=a.n(i),l=a(629),c=a(6598),_=a(734),d=a(3703),u=a(4135),p=a(361);function y(e,t,a,n,r,o,i){try{var s=e[o](i),l=s.value}catch(e){return void a(e)}s.done?t(l):Promise.resolve(l).then(n,r)}function m(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;te;){var a=(0,d.Z)(t),n=(0,u.Z)(t);this.ranges.push({start:a,end:n}),t=(0,_.Z)(t,{months:1})}},formatDate:function(e,t){return(0,c.Z)(e,t)},downloadTransactionList:function(e){var t=this;(0,p.y)().then(function(){var a,n=(a=s().mark((function a(n){var r,o,i;return s().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:r=(0,c.Z)(t.start,"y-MM-dd"),o=(0,c.Z)(t.end,"y-MM-dd"),null!==t.urlEnd&&null!==t.urlStart&&(r=(0,c.Z)(t.urlStart,"y-MM-dd"),o=(0,c.Z)(t.urlEnd,"y-MM-dd")),i="./api/v1/transactions?type="+t.type+"&page="+e+"&start="+r+"&end="+o+"&cache="+t.cacheKey,n.get(i).then((function(e){t.total=parseInt(e.data.meta.pagination.total),t.rawTransactions=e.data.data,t.loading=!1}));case 5:case"end":return a.stop()}}),a)})),function(){var e=this,t=arguments;return new Promise((function(n,r){var o=a.apply(e,t);function i(e){y(o,n,r,i,s,"next",e)}function s(e){y(o,n,r,i,s,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}())}})};const f=(0,a(1900).Z)(b,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._m(0),e._v(" "),a("TransactionListLarge",{attrs:{entries:e.rawTransactions,page:e.currentPage,total:e.total,"per-page":e.perPage,"sort-desc":e.sortDesc},on:{"jump-page":function(t){return e.jumpToPage(t)}}}),e._v(" "),a("div",{staticClass:"row"},e._l(e.ranges,(function(t){return a("div",{staticClass:"col-xl-2 col-lg-4 col-sm-6 col-xs-12"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-header"},[a("h3",{staticClass:"card-title"},[e._v(e._s(e.formatDate(t.start,"yyyy-LL")))])]),e._v(" "),a("div",{staticClass:"card-body"},[a("a",{attrs:{href:"./transactions/"+e.type+"/"+e.formatDate(t.start,"yyyy-LL-dd")+"/"+e.formatDate(t.end,"yyyy-LL-dd")}},[e._v("Transactions")])])])])})),0)],1)}),[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[e._v("\n Treemap categories\n ")])])]),e._v(" "),a("div",{staticClass:"col"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[e._v("\n Treemap accounts\n ")])])])])}],!1,null,null,null).exports;var k=a(4054);a(232);var v=a(157),w={};new(r())({i18n:v,store:o.Z,render:function(e){return e(f,{props:w})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference"),this.$store.dispatch("root/initialiseStore"),this.$store.dispatch("dashboard/index/initialiseStore")}}).$mount("#transactions_index"),new(r())({i18n:v,store:o.Z,el:"#calendar",render:function(e){return e(k.Z,{props:w})}})},361:(e,t,a)=>{"use strict";a.d(t,{y:()=>u});var n=a(7757),r=a.n(n),o=a(9483),i=a.n(o),s=a(881),l=a.n(s),c=a(5974);function _(e,t,a,n,r,o,i){try{var s=e[o](i),l=s.value}catch(e){return void a(e)}s.done?t(l):Promise.resolve(l).then(n,r)}function d(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var o=e.apply(t,a);function i(e){_(o,n,r,i,s,"next",e)}function s(e){_(o,n,r,i,s,"throw",e)}i(void 0)}))}}function u(){return p.apply(this,arguments)}function p(){return(p=d(r().mark((function e(){var t,a;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i().defineDriver(l());case 2:return t=i().createInstance({driver:[i().INDEXEDDB,i().LOCALSTORAGE,l()._driver],name:"my-cache"}),a=document.head.querySelector('meta[name="csrf-token"]'),e.abrupt("return",(0,c.setup)({baseURL:"./",headers:{"X-CSRF-TOKEN":a.content,"X-James-Rocks":"oh yes"},cache:{maxAge:864e5,readHeaders:!1,exclude:{query:!1},debug:!0,store:t}}));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},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 r(){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,attachments:!1,selectedAttachments:!1,uploadTrigger:!1,clearTrigger:!1,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:[],zoom_level:null,longitude:null,latitude:null,errors:{}}}a.d(t,{kQ:()=>n,f$:()=>r})},7825:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var n=a(4015),r=a.n(n),o=a(3645),i=a.n(o)()(r());i.push([e.id,".dropdown-item[data-v-1ce542a2],.dropdown-item[data-v-1ce542a2]:hover{color:#212529}","",{version:3,sources:["webpack://./src/components/dashboard/Calendar.vue"],names:[],mappings:"AAslBA,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