(self.webpackChunk=self.webpackChunk||[]).push([[847],{232:(t,e,a)=>{"use strict";a.r(e);var n=a(7760),i=a.n(n),o=a(7152),s=a(4605);window.$=window.jQuery=a(9755),window.axios=a(9669),window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var r=document.head.querySelector('meta[name="csrf-token"]');r?window.axios.defaults.headers.common["X-CSRF-TOKEN"]=r.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=s,i().use(vuei18n),i().use(s),window.Vue=i()},9899:(t,e,a)=>{"use strict";a.d(e,{Z:()=>x});var n=a(7760),i=a.n(n),o=a(629),s=a(4478),r=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,s.f$)(),defaultErrors:(0,s.kQ)()}},getters:{transactions:function(t){return t.transactions},defaultErrors:function(t){return t.defaultErrors},groupTitle:function(t){return t.groupTitle},transactionType:function(t){return t.transactionType},accountToTransaction:function(t){return t.accountToTransaction},defaultTransaction:function(t){return t.defaultTransaction},sourceAllowedTypes:function(t){return t.sourceAllowedTypes},destinationAllowedTypes:function(t){return t.destinationAllowedTypes},allowedOpposingTypes:function(t){return t.allowedOpposingTypes},customDateFields:function(t){return t.customDateFields}},actions:{},mutations:{addTransaction:function(t){var e=r(t.defaultTransaction);e.errors=r(t.defaultErrors),t.transactions.push(e)},resetErrors:function(t,e){t.transactions[e.index].errors=r(t.defaultErrors)},resetTransactions:function(t){t.transactions=[]},setGroupTitle:function(t,e){t.groupTitle=e.groupTitle},setCustomDateFields:function(t,e){t.customDateFields=e},deleteTransaction:function(t,e){t.transactions.splice(e.index,1),t.transactions.length},setTransactionType:function(t,e){t.transactionType=e},setAllowedOpposingTypes:function(t,e){t.allowedOpposingTypes=e},setAccountToTransaction:function(t,e){t.accountToTransaction=e},updateField:function(t,e){t.transactions[e.index][e.field]=e.value},setTransactionError:function(t,e){t.transactions[e.index].errors[e.field]=e.errors},setDestinationAllowedTypes:function(t,e){t.destinationAllowedTypes=e},setSourceAllowedTypes:function(t,e){t.sourceAllowedTypes=e}}};const l={namespaced:!0,state:function(){return{}},getters:{},actions:{},mutations:{}};var u=a(9119),_=a(3894),d=a(584),p=a(7090),g=a(4431),m=a(8358),y=a(4135),h=a(3703);const b={namespaced:!0,state:function(){return{viewRange:"default",start:null,end:null,defaultStart:null,defaultEnd:null}},getters:{start:function(t){return t.start},end:function(t){return t.end},defaultStart:function(t){return t.defaultStart},defaultEnd:function(t){return t.defaultEnd},viewRange:function(t){return t.viewRange}},actions:{initialiseStore:function(t){t.dispatch("restoreViewRange"),axios.get("./api/v1/preferences/viewRange").then((function(e){var a=e.data.data.attributes.data,n=t.getters.viewRange;t.commit("setViewRange",a),a!==n&&t.dispatch("setDatesFromViewRange"),a===n&&t.dispatch("restoreViewRangeDates")})).catch((function(){t.commit("setViewRange","1M"),t.dispatch("setDatesFromViewRange")}))},restoreViewRangeDates:function(t){localStorage.viewRangeStart&&t.commit("setStart",new Date(localStorage.viewRangeStart)),localStorage.viewRangeEnd&&t.commit("setEnd",new Date(localStorage.viewRangeEnd)),localStorage.viewRangeDefaultStart&&t.commit("setDefaultStart",new Date(localStorage.viewRangeDefaultStart)),localStorage.viewRangeDefaultEnd&&t.commit("setDefaultEnd",new Date(localStorage.viewRangeDefaultEnd))},restoreViewRange:function(t){var e=localStorage.getItem("viewRange");null!==e&&t.commit("setViewRange",e)},setDatesFromViewRange:function(t){var e,a,n=t.getters.viewRange,i=new Date;switch(n){case"1D":e=(0,u.Z)(i),a=(0,_.Z)(i);break;case"1W":e=(0,u.Z)((0,d.Z)(i,{weekStartsOn:1})),a=(0,_.Z)((0,p.Z)(i,{weekStartsOn:1}));break;case"1M":e=(0,u.Z)((0,h.Z)(i)),a=(0,_.Z)((0,y.Z)(i));break;case"3M":e=(0,u.Z)((0,g.Z)(i)),a=(0,_.Z)((0,m.Z)(i));break;case"6M":i.getMonth()<=5&&((e=new Date(i)).setMonth(0),e.setDate(1),e=(0,u.Z)(e),(a=new Date(i)).setMonth(5),a.setDate(30),a=(0,_.Z)(e)),i.getMonth()>5&&((e=new Date(i)).setMonth(6),e.setDate(1),e=(0,u.Z)(e),(a=new Date(i)).setMonth(11),a.setDate(31),a=(0,_.Z)(e));break;case"1Y":(e=new Date(i)).setMonth(0),e.setDate(1),e=(0,u.Z)(e),(a=new Date(i)).setMonth(11),a.setDate(31),a=(0,_.Z)(a)}t.commit("setStart",e),t.commit("setEnd",a),t.commit("setDefaultStart",e),t.commit("setDefaultEnd",a)}},mutations:{setStart:function(t,e){t.start=e,window.localStorage.setItem("viewRangeStart",e)},setEnd:function(t,e){t.end=e,window.localStorage.setItem("viewRangeEnd",e)},setDefaultStart:function(t,e){t.defaultStart=e,window.localStorage.setItem("viewRangeDefaultStart",e)},setDefaultEnd:function(t,e){t.defaultEnd=e,window.localStorage.setItem("viewRangeDefaultEnd",e)},setViewRange:function(t,e){t.viewRange=e,window.localStorage.setItem("viewRange",e)}}};var f=function(){return{listPageSize:33,timezone:"",cacheKey:{age:0,value:"empty"}}},v={initialiseStore:function(t){if(localStorage.cacheKey){var e=JSON.parse(localStorage.cacheKey);Date.now()-e.age>864e5?t.commit("refreshCacheKey"):t.commit("setCacheKey",e)}else t.commit("refreshCacheKey");localStorage.listPageSize&&(f.listPageSize=localStorage.listPageSize,t.commit("setListPageSize",{length:localStorage.listPageSize})),localStorage.listPageSize||axios.get("./api/v1/preferences/listPageSize").then((function(e){t.commit("setListPageSize",{length:parseInt(e.data.data.attributes.data)})})),localStorage.timezone&&(f.timezone=localStorage.timezone,t.commit("setTimezone",{timezone:localStorage.timezone})),localStorage.timezone||axios.get("./api/v1/configuration/app.timezone").then((function(e){t.commit("setTimezone",{timezone:e.data.data.value})}))}};const k={namespaced:!0,state:f,getters:{listPageSize:function(t){return t.listPageSize},timezone:function(t){return t.timezone},cacheKey:function(t){return t.cacheKey.value}},actions:v,mutations:{refreshCacheKey:function(t){var e=Date.now(),a=Array(9).join((Math.random().toString(36)+"00000000000000000").slice(2,18)).slice(0,8),n={age:e,value:a};localStorage.cacheKey=JSON.stringify(n),t.cacheKey={age:e,value:a}},setCacheKey:function(t,e){localStorage.cacheKey=JSON.stringify(e),t.cacheKey=e},setListPageSize:function(t,e){var a=parseInt(e.length);0!==a&&(t.listPageSize=a,localStorage.listPageSize=a)},setTimezone:function(t,e){""!==e.timezone&&(t.timezone=e.timezone,localStorage.timezone=e.timezone)}}};const w={namespaced:!0,state:function(){return{orderMode:!1,activeFilter:1}},getters:{orderMode:function(t){return t.orderMode},activeFilter:function(t){return t.activeFilter}},actions:{},mutations:{setOrderMode:function(t,e){t.orderMode=e},setActiveFilter:function(t,e){t.activeFilter=e}}};i().use(o.ZP);const x=new o.ZP.Store({namespaced:!0,modules:{root:k,transactions:{namespaced:!0,modules:{create:c,edit:l}},accounts:{namespaced:!0,modules:{index:w}},dashboard:{namespaced:!0,modules:{index:b}}},strict:false,plugins:[],state:{currencyPreference:{},locale:"en-US",listPageSize:50},mutations:{setCurrencyPreference:function(t,e){t.currencyPreference=e.payload},initialiseStore:function(t){if(localStorage.locale)t.locale=localStorage.locale;else{var e=document.head.querySelector('meta[name="locale"]');e&&(t.locale=e.content,localStorage.locale=e.content)}}},getters:{currencyCode:function(t){return t.currencyPreference.code},currencyPreference:function(t){return t.currencyPreference},currencyId:function(t){return t.currencyPreference.id},locale:function(t){return t.locale}},actions:{updateCurrencyPreference:function(t){localStorage.currencyPreference?t.commit("setCurrencyPreference",{payload:JSON.parse(localStorage.currencyPreference)}):axios.get("./api/v1/currencies/default").then((function(e){var a={id:parseInt(e.data.data.id),name:e.data.data.attributes.name,symbol:e.data.data.attributes.symbol,code:e.data.data.attributes.code,decimal_places:parseInt(e.data.data.attributes.decimal_places)};localStorage.currencyPreference=JSON.stringify(a),t.commit("setCurrencyPreference",{payload:a})})).catch((function(e){console.error(e),t.commit("setCurrencyPreference",{payload:{id:1,name:"Euro",symbol:"€",code:"EUR",decimal_places:2}})}))}}})},157:(t,e,a)=>{t.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)}})},742:(t,e,a)=>{"use strict";var n=a(9899),i=a(629),o=a(8035),s=a(7070),r=a(7168),c=a(5935),l=a(4478);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function d(t){for(var e=1;e1&&void 0===e.group_title&&(null===this.originalGroupTitle||""===this.originalGroupTitle)&&(e.group_title=this.transactions[0].description,a=!0),this.transactions)if(this.transactions.hasOwnProperty(s)&&/^0$|^[1-9]\d*$/.test(s)&&s<=4294967294){var r=this.transactions[s],c=this.originalTransactions.hasOwnProperty(s)?this.originalTransactions[s]:{},l={},_=["description","source_account_id","source_account_name","destination_account_id","destination_account_name","amount","foreign_amount","foreign_currency_id","category_name","budget_id","bill_id","interest_date","book_date","due_date","payment_date","invoice_date","external_url","internal_reference","external_id","notes","zoom_level","longitude","latitude"];for(var d in s>0&&(l.type=this.transactionType.toLowerCase(),"deposit"!==this.transactionType.toLowerCase()&&"transfer"!==this.transactionType.toLowerCase()||(r.destination_account_name=this.transactions[0].destination_account_name,r.destination_account_id=this.transactions[0].destination_account_id),"withdrawal"!==this.transactionType.toLowerCase()&&"transfer"!==this.transactionType.toLowerCase()||(r.source_account_name=this.transactions[0].source_account_name,r.source_account_id=this.transactions[0].source_account_id)),_)if(_.hasOwnProperty(d)&&/^0$|^[1-9]\d*$/.test(d)&&d<=4294967294){var p=_[d],m=p;if(null===r[p]&&void 0===c[p])continue;if(r[p]!==c[p]||!0===this.forceTransactionSubmission){if("foreign_amount"===m&&""===r[p])continue;if("foreign_currency_id"===m&&0===r[p])continue;if("foreign_currency_id"===m&&"0"===r[p])continue;"source_account_id"===m&&(m="source_id"),"source_account_name"===m&&(m="source_name"),"destination_account_id"===m&&(m="destination_id"),"destination_account_name"===m&&(m="destination_name"),l[m]=r[p],a=!0}}if(JSON.stringify(r.tags)!==JSON.stringify(c.tags)){if(l.tags=[],0!==r.tags.length)for(var y in r.tags)if(r.tags.hasOwnProperty(y)&&/^0$|^[1-9]\d*$/.test(y)&&y<=4294967294){var h=r.tags[y];"object"===u(h)&&null!==h&&l.tags.push(h.text),"string"==typeof h&&l.tags.push(h)}a=!0}if(this.compareLinks(r.links)!==this.compareLinks(c.links)&&(n=!0),void 0!==r.selectedAttachments&&!0===r.selectedAttachments&&(i=!0),!0===a&&(l.date=this.date),this.date!==this.originalDate&&(a=!0,l.date=this.date),0===Object.keys(l).length&&o>1)l.transaction_journal_id=c.transaction_journal_id,e.transactions.push(g(l)),a=!0;else if(0!==Object.keys(l).length){var b;l.transaction_journal_id=null!==(b=c.transaction_journal_id)&&void 0!==b?b:0,e.transactions.push(g(l)),a=!0}}this.submitUpdate(e,a,n,i)},submitData:function(t,e){if(!t)return Promise.resolve({});var a="./api/v1/transactions/"+this.groupId;return axios.put(a,e)},handleSubmissionResponse:function(t){this.submittedTransaction=!0;var e=[];if(void 0!==t.data){var a;this.returnedGroupId=null!==(a=parseInt(t.data.data.id))&&void 0!==a?a:null,this.returnedGroupTitle=null===t.data.data.attributes.group_title?t.data.data.attributes.transactions[0].description:t.data.data.attributes.group_title;var n=t.data.data.attributes.transactions;for(var i in n)n.hasOwnProperty(i)&&/^0$|^[1-9]\d*$/.test(i)&&i<=4294967294&&e.push(parseInt(n[i].transaction_journal_id))}else for(var o in this.transactions)this.transactions.hasOwnProperty(o)&&/^0$|^[1-9]\d*$/.test(o)&&o<=4294967294&&e.push(this.transactions[o].transaction_journal_id);return e=e.reverse(),Promise.resolve({journals:e})},submitLinks:function(t){var e=this;return t?this.deleteAllOriginalLinks().then((function(){return e.submitNewLinks()})):Promise.resolve({})},submitAttachments:function(t,e){if(!t)return this.submittedAttachments=1,Promise.resolve({});var a=!1;for(var n in this.transactions)if(this.transactions.hasOwnProperty(n)&&/^0$|^[1-9]\d*$/.test(n)&&n<=4294967294){var i=this.transactions[n],o=i.transaction_journal_id;void 0!==e&&(o=e.journals[n]);var s=i.selectedAttachments;this.transactions[n].transaction_journal_id=o,this.transactions[n].uploadTrigger=!0,s&&(a=!0)}!0===a&&(this.submittedAttachments=0)},finaliseSubmission:function(){if(0!==this.submittedAttachments){var t;if(!0===this.stayHere&&!1===this.inError&&(this.errorMessage="",this.warningMessage="",this.successMessage=this.$t("firefly.transaction_updated_link",{ID:this.groupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError)window.location.href=(null!==(t=window.previousURL)&&void 0!==t?t:"/")+"?transaction_group_id="+this.groupId+"&message=updated";for(var e in this.enableSubmit=!0,this.submittedAttachments=-1,this.inError=!1,this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&this.transactions.hasOwnProperty(e)&&(this.transactions[e].clearTrigger=!0)}},submitUpdate:function(t,e,a,n){var i=this;this.inError=!1,this.submitData(e,t).then(this.handleSubmissionResponse).then((function(t){return Promise.all([i.submitLinks(a,t),i.submitAttachments(n,t)])})).then(this.finaliseSubmission).catch(this.handleSubmissionError)},compareLinks:function(t){var e=[];for(var a in t)t.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&e.push({amount:t[a].amount,currency_code:t[a].currency_code,description:t[a].description,link_type_id:t[a].link_type_id,transaction_group_id:t[a].transaction_group_id,type:t[a].type});return JSON.stringify(e)},parseErrors:function(t){for(var e in this.transactions)this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294&&this.resetErrors({index:e});var a,n,i;for(var o in this.successMessage="",this.errorMessage=this.$t("firefly.errors_submission"),void 0===t.errors&&(this.successMessage="",this.errorMessage=t.message),t.errors)if(t.errors.hasOwnProperty(o)){if("group_title"===o){this.groupTitleErrors=t.errors[o];continue}if("group_title"!==o)switch(n=parseInt(o.split(".")[1]),i=o.split(".")[2]){case"amount":case"description":case"date":case"tags":a={index:n,field:i,errors:t.errors[o]},this.setTransactionError(a);break;case"budget_id":a={index:n,field:"budget",errors:t.errors[o]},this.setTransactionError(a);break;case"bill_id":a={index:n,field:"bill",errors:t.errors[o]},this.setTransactionError(a);break;case"piggy_bank_id":a={index:n,field:"piggy_bank",errors:t.errors[o]},this.setTransactionError(a);break;case"category_name":a={index:n,field:"category",errors:t.errors[o]},this.setTransactionError(a);break;case"source_name":case"source_id":a={index:n,field:"source",errors:t.errors[o]},this.setTransactionError(a);break;case"destination_name":case"destination_id":a={index:n,field:"destination",errors:t.errors[o]},this.setTransactionError(a);break;case"foreign_amount":case"foreign_currency":a={index:n,field:"foreign_amount",errors:t.errors[o]},this.setTransactionError(a)}this.transactions[n]}},setTransactionError:function(t){this.transactions[t.index].errors[t.field]=t.errors},resetErrors:function(t){this.transactions[t.index].errors=g((0,l.kQ)())},deleteOriginalLinks:function(t){var e=[];for(var a in t.links)if(t.links.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var n="/api/v1/transaction_links/"+t.links[a].id;e.push(axios.delete(n))}return Promise.all(e)},deleteAllOriginalLinks:function(){var t=[];for(var e in this.transactions)if(this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var a=this.transactions[e],n=this.originalTransactions.hasOwnProperty(e)?this.originalTransactions[e]:{},i=this.compareLinks(a.links),o=this.compareLinks(n.links);i!==o?"[]"!==o&&t.push(this.deleteOriginalLinks(n)):t.push(Promise.resolve({}))}return Promise.all(t)},submitNewLinks:function(){var t=[];for(var e in this.transactions)if(this.transactions.hasOwnProperty(e)&&/^0$|^[1-9]\d*$/.test(e)&&e<=4294967294){var a=this.transactions[e];for(var n in a.links)if(a.links.hasOwnProperty(n)&&/^0$|^[1-9]\d*$/.test(n)&&n<=4294967294){var i=a.links[n],o={inward_id:a.transaction_journal_id,outward_id:a.transaction_journal_id,link_type_id:"something"},s=i.link_type_id.split("-");o.link_type_id=s[0],"inward"===s[1]&&(o.inward_id=i.transaction_journal_id),"outward"===s[1]&&(o.outward_id=i.transaction_journal_id),t.push(axios.post("./api/v1/transaction_links",o))}}return Promise.all(t)},submitTransactionLinksX:function(){},finalizeSubmitX:function(){if(this.submittedTransaction&&this.submittedAttachments&&this.submittedLinks){var t,e;if(!0===this.stayHere&&!1===this.inError&&0===this.returnedGroupId&&(this.errorMessage="",this.successMessage="",this.warningMessage=this.$t("firefly.transaction_updated_no_changes",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0===this.returnedGroupId)window.location.href=(null!==(t=window.previousURL)&&void 0!==t?t:"/")+"?transaction_group_id="+this.groupId+"&message=no_change";if(!0===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId&&(this.errorMessage="",this.warningMessage="",this.successMessage=this.$t("firefly.transaction_updated_link",{ID:this.returnedGroupId,title:this.returnedGroupTitle})),!1===this.stayHere&&!1===this.inError&&0!==this.returnedGroupId)window.location.href=(null!==(e=window.previousURL)&&void 0!==e?e:"/")+"?transaction_group_id="+this.groupId+"&message=updated";for(var a in this.enableSubmit=!0,this.submittedTransaction=!1,this.submittedLinks=!1,this.submittedAttachments=!1,this.inError=!1,this.transactions)this.transactions.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294&&this.transactions.hasOwnProperty(a)}}})};const y=(0,a(1900).Z)(m,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Alert",{attrs:{message:t.errorMessage,type:"danger"}}),t._v(" "),a("Alert",{attrs:{message:t.successMessage,type:"success"}}),t._v(" "),a("Alert",{attrs:{message:t.warningMessage,type:"warning"}}),t._v(" "),a("form",{attrs:{autocomplete:"off"},on:{submit:t.submitTransaction}},[a("SplitPills",{attrs:{transactions:t.transactions,count:t.transactions.length}}),t._v(" "),a("div",{staticClass:"tab-content"},t._l(this.transactions,(function(e,n){return a("SplitForm",{key:e.transaction_journal_id,attrs:{index:n,key:e.transaction_journal_id,transaction:e,date:t.date,count:t.transactions.length,"transaction-type":t.transactionType,"source-allowed-types":t.sourceAllowedTypes,"allowed-opposing-types":t.allowedOpposingTypes,"custom-fields":t.customFields,"destination-allowed-types":t.destinationAllowedTypes,"allow-switch":!1},on:{"uploaded-attachments":function(e){return t.uploadedAttachment(e)},"set-marker-location":function(e){return t.storeLocation(e)},"set-account":function(e){return t.storeAccountValue(e)},"set-date":function(e){return t.storeDate(e)},"set-field":function(e){return t.storeField(e)},"remove-transaction":function(e){return t.removeTransaction(e)},"selected-attachments":function(e){return t.selectedAttachments(e)}}})})),1),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[t.transactions.length>1?a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("TransactionGroupTitle",{attrs:{errors:this.groupTitleErrors},on:{"set-group-title":function(e){return t.storeGroupTitle(e)}},model:{value:this.groupTitle,callback:function(e){t.$set(this,"groupTitle",e)},expression:"this.groupTitle"}})],1)])])]):t._e()]),t._v(" "),a("div",{staticClass:"col-xl-6 col-lg-6 col-md-12 col-sm-12 col-xs-12"},[a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[a("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n  \n ")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary btn-block",attrs:{type:"button"},on:{click:t.addTransaction}},[a("span",{staticClass:"far fa-clone"}),t._v("\n "+t._s(t.$t("firefly.add_another_split"))+"\n ")])]),t._v(" "),a("div",{staticClass:"col"},[a("div",{staticClass:"text-xs d-none d-lg-block d-xl-block"},[t._v("\n  \n ")]),t._v(" "),a("button",{staticClass:"btn btn-info btn-block",attrs:{disabled:!t.enableSubmit},on:{click:t.submitTransaction}},[t.enableSubmit?a("span",[a("span",{staticClass:"far fa-save"}),t._v(" "+t._s(t.$t("firefly.update_transaction")))]):t._e(),t._v(" "),t.enableSubmit?t._e():a("span",[a("span",{staticClass:"fas fa-spinner fa-spin"})])])])]),t._v(" "),a("div",{staticClass:"row"},[a("div",{staticClass:"col"},[t._v("\n  \n ")]),t._v(" "),a("div",{staticClass:"col"},[a("div",{staticClass:"form-check"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.stayHere,expression:"stayHere"}],staticClass:"form-check-input",attrs:{id:"stayHere",type:"checkbox"},domProps:{checked:Array.isArray(t.stayHere)?t._i(t.stayHere,null)>-1:t.stayHere},on:{change:function(e){var a=t.stayHere,n=e.target,i=!!n.checked;if(Array.isArray(a)){var o=t._i(a,null);n.checked?o<0&&(t.stayHere=a.concat([null])):o>-1&&(t.stayHere=a.slice(0,o).concat(a.slice(o+1)))}else t.stayHere=i}}}),t._v(" "),a("label",{staticClass:"form-check-label",attrs:{for:"stayHere"}},[a("span",{staticClass:"small"},[t._v(t._s(t.$t("firefly.after_update_create_another")))])])])])])])])])])],1)],1)}),[],!1,null,null,null).exports;var h=a(7760),b=a.n(h);a(232),b().config.productionTip=!1;var f=a(157),v={};new(b())({i18n:f,store:n.Z,render:function(t){return t(y,{props:v})},beforeCreate:function(){this.$store.commit("initialiseStore"),this.$store.dispatch("updateCurrencyPreference")}}).$mount("#transactions_edit")},4478:(t,e,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 i(){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(e,{kQ:()=>n,f$:()=>i})},6665:(t,e,a)=>{"use strict";a.d(e,{Z:()=>r});var n=a(4015),i=a.n(n),o=a(3645),s=a.n(o)()(i());s.push([t.id,".vue-tags-input{display:block;max-width:100%!important}.ti-input,.vue-tags-input{border-radius:.25rem;width:100%}.ti-input{max-width:100%}.ti-new-tag-input{font-size:1rem}","",{version:3,sources:["webpack://./src/components/transactions/TransactionTags.vue"],names:[],mappings:"AAsHA,gBAGA,aAAA,CADA,wBAGA,CAEA,0BAHA,oBAAA,CAHA,UAUA,CAJA,UAEA,cAEA,CAEA,kBACA,cACA",sourcesContent:['\x3c!--\n - TransactionTags.vue\n - Copyright (c) 2021 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