text: (this["webpackJsonpdcfck-app"]=this["webpackJsonpdcfck-app"]||[]).push([[4],{100:function(e,t,n){"use strict";var a=n(0),c=n(157);t.a=function(){var e=Object(a.useContext)(c.a).state;return[e.currentClient,e.clientSynced]}},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return f.a})),n.d(t,"b",(function(){return x}));var a=n(80),c=n(6),r=function(e,t){var n=e.state.clients.concat(t);return Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{clients:n})})},i=function(e,t){return Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{clients:t})})},o=n(72),s=n(108),l=function(e,t){var n=e.state.clients.find(Object(o.a)(t));return Object(s.d)((null===n||void 0===n?void 0:n.id)||s.a),Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{currentClient:n})})},u=function(e,t){return Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{clientSynced:t})})},d=n(175),b=function(e,t){var n,a=e.state.clients.filter(Object(o.a)(t,!0)),r=Object(d.a)(e.state.currentClient,"id")&&(null===(n=e.state.currentClient)||void 0===n?void 0:n.id)!==t?e.state.currentClient:a[0];return Object(s.d)((null===r||void 0===r?void 0:r.id)||s.a),0===a.length&&Object(s.c)(),Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{currentClient:r,clients:a})})},j=function(e,t){return Object(c.a)(Object(c.a)({},e),{},{state:Object(c.a)(Object(c.a)({},e.state),{},{lastViewedHC:t})})},h=function(e,t){switch(t.type){case a.a.AddClient:return r(e,t.payload);case a.a.RemoveClient:return b(e,t.payload);case a.a.BulkAdd:return i(e,t.payload);case a.a.ChangeCurrentClient:return l(e,t.payload);case a.a.UpdateClientSynced:return u(e,t.payload);case a.a.UpdateLastViewedHC:return j(e,t.payload);default:return e}},f=n(157),p=n(14),O=n(0),m=n(1),x=function(e){var t=Object(O.useReducer)(h,f.b),n=Object(p.a)(t,2),a=n[0],r=n[1],i=Object(O.useMemo)((function(){return Object(c.a)(Object(c.a)({},a),{},{dispatch:r})}),[a]);return Object(m.jsx)(f.a.Provider,Object(c.a)({value:i},e))}},106:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(142),c=Object(a.a)((function(){return{root:{flexGrow:1},box:{display:"flex",flexGrow:2,justifyContent:"flex-end"},button:{textTransform:"capitalize"},logoBox:{display:"flex",justifyContent:"center",flexGrow:3},small:{flexGrow:1},publicLogo:{justifyContent:"flex-start","& span":{color:"white"}}}}))},108:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"d",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o}));var a="currentClientId",c="";function r(e){window.localStorage.setItem(a,"".concat(e))}function i(){var e=window.localStorage.getItem(a);if(e)return e}function o(){window.localStorage.removeItem(a)}},111:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return b})),n.d(t,"d",(function(){return j})),n.d(t,"a",(function(){return h}));var a=n(19),c=n.n(a),r=n(6),i=n(31),o=n(762),s=n(225),l=n(188),u=function(e,t,n,a){return n.transaction("r",a,(function(){return a.where({actionContainer:e,clientId:t}).toArray()}))},d=function(e,t){return{clientId:e,actionContainer:t,description:"",completed:!1,reviewBy:new Date}},b=function(e,t){return{clientId:e,actionContainer:t,order:[]}},j=function(e,t){return{clientId:e,actionContainer:t,notes:""}};function h(e,t){return f.apply(this,arguments)}function f(){return(f=Object(i.a)(c.a.mark((function e(t,n){var a,i,u,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.a.findById(n);case 2:if(a=e.sent){e.next=5;break}return e.abrupt("return",[t,!1]);case 5:return e.next=7,s.a.bulkPut(t);case 7:return i=e.sent,u=null===a||void 0===a?void 0:a.order.concat(i),e.next=11,l.a.update(n,Object(r.a)(Object(r.a)({},a),{},{order:Object(o.a)(u)}));case 11:return d=t.map((function(e,t){return Object(r.a)(Object(r.a)({},e),{},{id:i[t]})})),e.abrupt("return",[d,!0]);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},123:function(e,t,n){"use strict";var a=n(6),c=n(55),r=n(58),i=n(384),o=n(175),s=function(){function e(t,n){Object(c.a)(this,e),this.database=t,this.table=n}return Object(r.a)(e,[{key:"defaultCreate",value:function(e){var t=this;return this.database.transaction("rw",this.table.name,(function(){return t.table.add(Object(a.a)({id:Object(i.a)()},e))}))}},{key:"defaultSync",value:function(){var e=this;return this.database.transaction("r",this.table.name,(function(){return e.table.toArray()}))}},{key:"defaultDelete",value:function(e){var t=this;return this.database.transaction("rw",this.table.name,(function(){return t.table.where("id").equals(e).delete()}))}},{key:"defaultUpdate",value:function(e,t){var n=this;return this.database.transaction("rw",this.table.name,(function(){return n.table.update(e,t)}))}},{key:"create",value:function(e){return this.defaultCreate(e)}},{key:"syncWithDatabase",value:function(){return this.defaultSync()}},{key:"delete",value:function(e){return this.defaultDelete(e)}},{key:"update",value:function(e,t){return this.defaultUpdate(e,t)}},{key:"findByClient",value:function(e){var t=this;return this.database.transaction("r",this.table.name,(function(){return t.table.where({clientId:e}).toArray()}))}},{key:"bulkAdd",value:function(e){var t=this,n=e.reduce((function(e,t){return e.concat(Object(a.a)(Object(a.a)({},t),{},{id:Object(i.a)()}))}),[]);return this.database.transaction("rw",this.table.name,(function(){return t.table.bulkAdd(n,{allKeys:!0})}))}},{key:"bulkPut",value:function(e){var t=this,n=e.reduce((function(e,t){return e.concat(Object(o.a)(t,"id")?t:Object(a.a)(Object(a.a)({},t),{},{id:Object(i.a)()}))}),[]);return this.database.transaction("rw",this.table.name,(function(){return t.table.bulkPut(n,{allKeys:!0})}))}},{key:"findById",value:function(e){var t=this;return this.database.transaction("rw",this.table.name,(function(){return t.table.get(e)}))}},{key:"deleteByClient",value:function(e){var t=this;return this.database.transaction("rw",this.table.name,(function(){return t.table.where("clientId").equals(e).delete()}))}},{key:"last",value:function(){return this.table.toCollection().last()}}]),e}();t.a=s},13:function(e,t,n){"use strict";var a,c;n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return r})),function(e){e.CoachingKit="/coaching-kit",e.ClientList="/client/list",e.SessionFiles="/session-files",e.HealthCheckQuiz="/health-check/quiz/:id?",e.HealthCheckList="/health-check/listing",e.HealthCheckSummary="/health-check/summary/:id",e.DiscoverTopics="/discover-topics",e.CFC="/cash-flow-canvas",e.CFCEdit="/cash-flow-canvas/:id",e.CFCListing="/cfc/listing",e.CFCCompare="/cfc/compare",e.ChangeLevers="/change-levers",e.ActionChecklist="/action-checklist",e.DTFundingBusiness="/funding-business",e.DTManagingCashFlow="/managing-cash-flow",e.DTPlanningBusiness="/planning-business",e.DTPlanningFinanicalCommitments="/planning-financial-commitments",e.DTRecordKeeping="/record-keeping",e.DTSellingClosingSuccession="/selling-closing-succession",e.DTTrackingPerformance="/tracking-performance"}(a||(a={})),function(e){e.Home="/"}(c||(c={}));var r=function(e,t){return t.reduce((function(e,t){return e.replace(t[0],t[1])}),e.toString())}},137:function(e,t,n){"use strict";var a;n.d(t,"a",(function(){return a})),function(e){e.ChangeDuplicateError="change_duplicate_error",e.ChangeInvalidDateError="change_invalid_date_error",e.ChangeQuestionValues="change_question_values",e.ChangeCompare="change_compare",e.ChangeCopyCanvasActive="change_copy_canvas_active"}(a||(a={}))},157:function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var a=n(0),c={state:{clients:[],clientSynced:!1,lastViewedHC:null},dispatch:function(){return null}},r=Object(a.createContext)(c);t.a=r},161:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,"ClientDatabase")).clients=void 0,e.applyMigrations(),e.clients=e.table("clients"),e.replaceIdsWithStrings(),e}return Object(c.a)(n,[{key:"applyMigrations",value:function(){this.version(1.1).stores({clients:"++id,name"}),this.version(2).stores({clients:"++id, name, createdAt"})}},{key:"replaceIdsWithStrings",value:function(){this.clients.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id))}))}}]),n}(n(162).a));t.a=o},163:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=n(162),s=n(175),l=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,"CFCDatabase")).canvases=void 0,e.applyMigrations(),e.canvases=e.table("canvases"),e.replaceIdsWithStrings(),e}return Object(c.a)(n,[{key:"applyMigrations",value:function(){this.version(1).stores({canvases:"\n        ++id,\n        clientId,\n        createdAt,\n        canvasTitle,\n        canvasType,\n        canvasTimeFrame,\n        canvasStartDate,\n        canvasEndDate,\n        gstOnSales,\n        gstOnPurchases,\n        openingBalance,\n        paygWithholding,\n        superAmount,\n        incomeTax,\n        cashToOwner,\n        cashToBank,\n        stock,\n        creditors,\n        debtors,\n        assets,\n        loans,\n        *cashInItems,\n        *cashOutItems\n      "}),this.version(1.1).stores({canvases:"\n        ++id,\n        clientId,\n        createdAt,\n        canvasTitle,\n        canvasType,\n        canvasTimeFrame,\n        canvasStartDate,\n        canvasEndDate,\n        gstOnSales,\n        gstOnPurchases,\n        openingBalance,\n        paygWithholding,\n        superAmount,\n        incomeTax,\n        cashToOwner,\n        cashToBank,\n        stock,\n        creditors,\n        debtors,\n        assets,\n        loans,\n        *cashInItems,\n\t\t\t\t*cashOutItems,\n\t\t\t\t[canvasType+canvasTimeFrame+clientId]\n      "})}},{key:"replaceIdsWithStrings",value:function(){this.canvases.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id)),"number"===typeof e.clientId&&(e.clientId="".concat(e.clientId)),Object(s.a)(e,"gstOnPurchases")||(e.gstOnPurchases=void 0),Object(s.a)(e,"gstOnSales")||(e.gstOnSales=void 0)}))}}]),n}(o.a));t.a=l},166:function(e,t,n){"use strict";var a=n(36),c=n(142),r=Object(c.a)((function(e){return{root:function(t){return Object(a.a)({flexDirection:t.stacked?"column":"row",display:"flex",height:t.fullHeight?"100%":"auto"},e.breakpoints.down("sm"),{flexDirection:"column",alignItem:"flex-start"})},type:function(t){return Object(a.a)({flexGrow:2,paddingRight:t.stacked?0:e.spacing(2),marginBottom:t.stacked?e.spacing(2):0,"& p":{fontWeight:e.typography.fontWeightRegular,fontSize:t.mini?e.typography.body1.fontSize:e.typography.h6.fontSize},"& span":{display:"block",color:e.palette.grey[700]}},e.breakpoints.down("md"),{marginBottom:0,paddingRight:0})},moneyInput:function(t){var n;return n={},Object(a.a)(n,e.breakpoints.up("md"),{maxWidth:t.stacked?"100%":"30%"}),Object(a.a)(n,e.breakpoints.down("md"),{marginTop:e.spacing(2)}),n}}}));t.a=r},175:function(e,t,n){"use strict";t.a=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(760),c=n(22);function r(e){return Object(c.b)(11)(e)}function i(e){var t=r(e);return Object(c.e)(Object(c.c)(t),Math.round)(e)}var o=function(e){return"undefined"!==typeof e&&null!==e&&!Object(a.a)(e)}},186:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(0);var a=n(761),c=n(796),r=n(142),i=Object(r.a)((function(e){return{root:{display:"flex",justifyContent:"center",paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}}})),o=n(1),s=function(){var e=i();return Object(o.jsx)(a.a,{className:e.root,children:Object(o.jsx)(c.a,{})})}},187:function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));var a=n(0),c={dispatch:function(){return null},duplicateError:!1,invalidDateError:!1,copyCanvasActive:!1,questionValues:{one:0,two:0,three:0,four:void 0},canvasItemUpdater:[],setCanvasItemUpdater:function(){return null}},r=Object(a.createContext)(c);t.a=r},188:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=n(87),s=n(123),l=n(111),u=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(a.a)(this,n),t.call(this,o.a,o.a.priority)}return Object(c.a)(n,[{key:"findByClientAndContainer",value:function(e,t){return Object(l.b)(e,t,this.database,this.table)}}]),n}(s.a));t.a=u},195:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(0),c=n.n(a),r=n(802),i=n(833),o=n(828),s=n(789),l=n(1),u=c.a.memo((function(e){var t=e.name,n=e.label,a=e.value,c=e.onChange,u=e.options;return Object(l.jsxs)(r.a,{variant:"outlined",fullWidth:!0,children:[Object(l.jsx)(i.a,{id:"".concat(t,"--label"),children:n}),Object(l.jsx)(o.a,{labelId:"".concat(t,"--label"),id:t,name:t,value:a,onChange:c,label:n,children:u.map((function(e){return Object(l.jsx)(s.a,{value:e.value,children:"Quarterly"===e.label?"Quarterly":e.label},"".concat(t,"--").concat(e.label))}))})]})}))},196:function(e,t,n){"use strict";var a=n(55),c=n(60),r=n(59),i=n(123),o=n(161),s=new(function(e){Object(c.a)(n,e);var t=Object(r.a)(n);function n(){return Object(a.a)(this,n),t.call(this,o.a,o.a.clients)}return n}(i.a));t.a=s},215:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(6),c=n(14),r=n(112),i=n(0),o=n(831),s=n(803),l=n(38),u=n(1),d=["onChange","value"],b=Object(i.memo)((function(e){var t=e.onChange,n=e.value,b=Object(r.a)(e,d),j=Object(i.useState)(!0),h=Object(c.a)(j,2),f=h[0],p=h[1],O=Object(i.useState)(""),m=Object(c.a)(O,2),x=m[0],v=m[1],g=Object(i.useRef)();return Object(u.jsx)(o.a,Object(a.a)({fullWidth:!0,InputProps:{startAdornment:Object(u.jsx)(s.a,{position:"start",children:"$"}),endAdornment:Object(u.jsx)(s.a,{position:"end",children:".00"}),inputProps:{min:0,max:999999999,step:1,ref:g}},label:"Amount",InputLabelProps:{htmlFor:b.name},id:b.name,placeholder:"0",onChange:function(e){var n="".concat(e.target.value),a=n.replace(/([^\d-]+)/gi,"").replace(/(?!^)-/g,"");if("-0"===n||"0-"===n)e.target.value="-",v("Not a valid whole number");else if(""===a)e.target.value="0",v("");else{var c=parseFloat(a);n&&!c&&0!==c?v("Not a valid whole number"):(e.target.value=c.toFixed(0),v(""))}"undefined"!==typeof t&&t(e)},onBlur:function(){p(!0)},onFocus:function(){p(!1),0===n&&g.current&&g.current.setSelectionRange(0,9999)},onMouseUp:function(e){e.preventDefault()},value:f?Object(l.b)("".concat(n)):n,error:""!==x,helperText:x},b))}))},216:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(36),c=(n(0),n(142)),r=n(761),i=n(74),o=n(39),s=n(1),l=Object(c.a)((function(e){return{root:{display:"flex",alignItems:"center"},img:Object(a.a)({maxWidth:"45px",display:"block",height:"auto",marginRight:e.spacing(1)},e.breakpoints.down("sm"),{maxWidth:"30px"}),link:{textDecoration:"none"},type:Object(a.a)({color:e.palette.text.primary},e.breakpoints.down("sm"),{fontSize:e.typography.pxToRem(18),position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0})}}));function u(e){var t=e.to,n=e.className,a=void 0===n?"":n,c=l();return Object(s.jsx)(o.b,{to:t,className:c.link,children:Object(s.jsxs)(r.a,{className:"".concat(c.root," ").concat(a),children:[Object(s.jsx)("img",{src:"/images/logo.png",alt:"",className:c.img}),Object(s.jsx)(i.a,{className:c.type,variant:"h6",component:"span",children:"Cash Flow Coaching Kit"})]})})}},22:function(e,t,n){"use strict";function a(e){var t=parseInt(e,10);return"number"!==typeof t||isNaN(t)?0:t}function c(){return function(e,t){return a(e)+a(t)}}function r(e){return function(t){return a(t)+a(e)}}function i(e){return function(t){return a(t)-a(e)}}function o(e){return function(t){return 0===a(e)?0:a(t)/a(e)}}n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return a}));var s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}}},224:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=n(123),s=n(163),l=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(a.a)(this,n),t.call(this,s.a,s.a.canvases)}return Object(c.a)(n,[{key:"countClientRecords",value:function(e){var t=this;return this.database.transaction("r",this.table.name,(function(){return t.table.where({clientId:e}).count()}))}},{key:"findPossibleDuplicates",value:function(e,t,n,a,c){var r=this;return this.database.transaction("r",this.table.name,(function(){return c?r.table.where({clientId:n,canvasTitle:a}).toArray():r.table.where({canvasType:e,canvasTimeFrame:t,clientId:n}).toArray()}))}}]),n}(o.a));t.a=l},225:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=n(87),s=n(123),l=n(111),u=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(a.a)(this,n),t.call(this,o.a,o.a.actionItems)}return Object(c.a)(n,[{key:"bulkUpdate",value:function(e){var t=this;return this.database.transaction("rw",this.table,(function(){return t.table.bulkPut(e)}))}},{key:"findByClientAndContainer",value:function(e,t){return Object(l.b)(e,t,this.database,this.table)}}]),n}(s.a));t.a=u},226:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,"HealthCheckDatabase")).healthChecks=void 0,e.applyMigrations(),e.healthChecks=e.table("healthChecks"),e.replaceIdsWithStrings(),e}return Object(c.a)(n,[{key:"applyMigrations",value:function(){this.version(2).stores({healthChecks:"++id, clientId, *answers, createdAt"}),this.version(2.4).stores({healthChecks:"++id, clientId, *answers, createdAt, [id+clientId]"})}},{key:"replaceIdsWithStrings",value:function(){this.healthChecks.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id)),"number"===typeof e.clientId&&(e.clientId="".concat(e.clientId))}))}}]),n}(n(162).a));t.a=o},240:function(e,t,n){"use strict";t.a=function(e){return function(t){return t.concat(e)}}},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"c",(function(){return q})),n.d(t,"b",(function(){return ee}));var a=n(14),c=n(0),r=n.n(c),i=n(797),o=n(798),s=n(799),l=n(74),u=n(106),d=n(6),b=n(112),j=n(755),h=n(508),f=n(789),p=n(790),O=n(49),m=n(39),x=n(493),v=n.n(x),g=n(255),y=n(1),C=["route","childRoutes"],k=["routes"];function w(e){var t=e.route,n=e.childRoutes,c=Object(b.a)(e,C),i=r.a.useState(null),o=Object(a.a)(i,2),s=o[0],l=o[1],u=function(){l(null)};return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(j.a,Object(d.a)(Object(d.a)({"aria-controls":t.route,"aria-haspopup":"true",component:m.c,to:t.route,onClick:function(e){e.preventDefault(),l(e.currentTarget)},endIcon:Object(y.jsx)(v.a,{})},c),{},{children:t.title})),Object(y.jsxs)(h.a,{id:t.route,anchorEl:s,keepMounted:!0,open:Boolean(s),onClose:u,children:[Object(y.jsx)(f.a,{component:m.c,to:t.route,onClick:u,children:t.subMenuTitle||t.title}),Object(y.jsx)(p.a,{}),n.map((function(e){return Object(y.jsx)(f.a,{component:m.c,to:e.route,onClick:u,children:e.title},"".concat(t.title,"-child--").concat(e.route))}))]})]})}var T=function(e){var t=e.routes,n=Object(b.a)(e,k),r=Object(c.useState)(Object(g.b)()),i=Object(a.a)(r,1)[0],o=Object(O.a)();return Object(y.jsx)(y.Fragment,{children:t.map((function(e,t){return e.children?Object(c.createElement)(w,Object(d.a)(Object(d.a)({route:e,childRoutes:e.children},n),{},{key:Object(g.a)(i,t)})):Object(c.createElement)(j.a,Object(d.a)(Object(d.a)({startIcon:e.Icon?Object(y.jsx)(e.Icon,{}):null,component:m.c,activeStyle:{fontWeight:o.typography.fontWeightBold},to:e.route},n),{},{key:Object(g.a)(i,t)}),e.title)}))})},I=n(298),D=n(299),S=n(216),N=n(13),F=n(100),A=n(326),E=n(387),B=n.n(E),W=n(791),P=n(792),R=n(793),H=n(794),L=n(795);function M(){var e=Object(u.a)(),t=Object(c.useState)(!1),n=Object(a.a)(t,2),r=n[0],i=n[1],o=function(){return i(!1)};return Object(y.jsxs)(y.Fragment,{children:[Object(y.jsx)(j.a,{className:e.button,color:"inherit",startIcon:Object(y.jsx)(B.a,{}),onClick:function(){return i(!0)},children:"Help"}),Object(y.jsxs)(W.a,{open:r,onClose:o,"aria-labelledby":"help-dialog-title","aria-describedby":"help-dialog-description",children:[Object(y.jsx)(P.a,{id:"help-dialog-title",children:"Help"}),Object(y.jsx)(R.a,{children:Object(y.jsxs)(H.a,{id:"help-dialog-description",className:"content-area",children:[Object(y.jsx)(l.a,{style:{fontWeight:"bold"},children:"Report a problem"}),Object(y.jsxs)(l.a,{children:["Please report technical problems at"," ",Object(y.jsx)("a",{href:"mailto:".concat("help@cashflowcoachingkit.com.au"),children:"help@cashflowcoachingkit.com.au"}),"."]}),Object(y.jsx)(l.a,{style:{marginTop:6},children:"Our service standard for resolution is generally one business day."}),Object(y.jsx)(l.a,{style:{fontWeight:"bold",marginTop:12},children:"Help and tips"}),Object(y.jsx)(l.a,{children:"Remember there are tips on each page to help tax professionals and business advisors use the Cash Flow Coaching Kit."}),Object(y.jsx)(l.a,{style:{marginTop:6},children:"If you are a small business please contact your tax professional or business advisor for support."})]})}),Object(y.jsx)(L.a,{children:Object(y.jsx)(j.a,{onClick:o,color:"primary",autoFocus:!0,children:"Close"})})]})]})}var _=function(){var e=Object(u.a)(),t=Object(I.a)(),n=Object(F.a)(),c=Object(a.a)(n,1)[0];return Object(y.jsx)("div",{className:e.root,children:Object(y.jsx)(i.a,{position:"static",color:"default",children:Object(y.jsx)(o.a,{children:Object(y.jsxs)(s.a,{container:!0,spacing:2,children:[c?Object(y.jsxs)(s.a,{item:!0,sm:2,md:2,lg:4,className:t.clientGridItem,children:[Object(y.jsx)(l.a,{className:t.clientCaption,variant:"caption",children:"Client"}),Object(y.jsx)(l.a,{className:"".concat(t.clientName," truncate"),variant:"h6",component:"p",children:Object(y.jsx)("span",{children:c.name})})]}):Object(y.jsx)(s.a,{item:!0,md:2,lg:4}),Object(y.jsx)(s.a,{item:!0,sm:5,md:5,lg:4,className:"".concat(e.logoBox),children:Object(y.jsx)(S.a,{to:N.b.Home})}),Object(y.jsxs)(s.a,{item:!0,sm:5,md:5,lg:4,className:"".concat(e.box," ").concat(e.small),children:[Object(y.jsx)(T,{routes:D.a,color:"inherit",className:e.button}),Object(y.jsx)(M,{}),Object(y.jsx)(A.a,{})]})]})})})})},G=n(761),U=n(301),z=n(327),V=n(103),q=function(){var e=Object(u.a)(),t=Object(c.useContext)(V.a).state.lastViewedHC,n=Object(c.useMemo)((function(){return U.a.map((function(e){return"Health Check"===e.title?{title:e.title,route:null!==t?Object(N.c)(N.a.HealthCheckSummary,[[":id","".concat(t)]]):e.route}:e}))}),[t]);return Object(y.jsx)("div",{className:e.root,children:Object(y.jsx)(i.a,{position:"static",children:Object(y.jsxs)(o.a,{children:[Object(y.jsx)(z.a,{}),Object(y.jsx)(G.a,{className:e.box,children:Object(y.jsx)(T,{routes:n,color:"inherit",className:e.button})})]})})})},K=n(383),Y=n(300),J=n.n(Y),Q=[{route:N.a.ClientList,title:"Client List",Icon:J.a}],$="Cash Flow Coaching Kit.dmg",X="Cash Flow Coaching Kit.exe";K.a.initialize("UA-177371209-1");var Z=navigator.userAgent.toLowerCase().indexOf(" electron/")>-1,ee=function(e){var t=e.hasClients,n=Object(u.a)(),a=navigator.platform.indexOf("Mac")>-1,c=navigator.platform.indexOf("Win")>-1,r=function(e){var t="https://".concat("d8pjpxdtfk90c.cloudfront.net","/mac/").concat($),n="https://".concat("d8pjpxdtfk90c.cloudfront.net","/win/").concat(X);return"mac"===e?t:n},s=function(e){return function(){K.a.event({category:"Download Desktop ( , ".concat(e,"  )"),action:"User downloaded desktop app for - ,".concat(e),label:"Download desktop app"})}};return Object(y.jsx)("div",{className:n.root,children:Object(y.jsx)(i.a,{position:"static",children:Object(y.jsxs)(o.a,{children:[Object(y.jsx)(G.a,{className:"".concat(n.logoBox," ").concat(n.publicLogo),children:Object(y.jsx)(S.a,{to:N.b.Home})}),!Z&&Object(y.jsxs)(y.Fragment,{children:[!c&&Object(y.jsx)(G.a,{children:Object(y.jsx)("form",{method:"get",action:r("mac"),target:"_blank",children:Object(y.jsx)("button",{type:"submit",onClick:s("mac"),className:"download-link",title:"Download free desktop application - available for Windows or Mac",children:"Download free desktop app for Mac"})})}),!a&&Object(y.jsx)(G.a,{children:Object(y.jsx)("form",{method:"get",action:r("win"),target:"_blank",children:Object(y.jsx)("button",{type:"submit",onClick:s("win"),className:"download-link",title:"Download free desktop application - available for Windows or Mac",children:"Download free desktop app for Windows"})})})]}),Object(y.jsxs)(G.a,{children:[!!t&&Object(y.jsx)(T,{routes:Q,color:"inherit",className:n.button}),Object(y.jsx)(M,{})]})]})})})}},254:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var a=n(0),c=n.n(a),r=n(835),i=n(807),o=n(74),s=n(808),l=n(397),u=n.n(l),d=n(142),b=Object(d.a)((function(e){return{details:{paddingLeft:0,paddingRight:0,flexDirection:"column"},summary:{"& .MuiAccordionSummary-content":{flexDirection:"column"}},subHeading:{color:e.palette.grey[700],fontSize:e.typography.caption.fontSize,fontWeight:e.typography.fontWeightRegular,display:"block"}}})),j=n(1),h=function(e){var t=e.subHeading,n=e.children,a=e.title,c=void 0===a?"Control Panel":a,l=e.defaultExpanded,d=void 0===l||l,h=e.reactourLabel,f=void 0===h?"":h,p=b();return Object(j.jsxs)(r.a,{defaultExpanded:d,TransitionProps:{unmountOnExit:!0},"data-reactour":f,children:[Object(j.jsxs)(i.a,{expandIcon:Object(j.jsx)(u.a,{}),className:p.summary,children:[Object(j.jsx)(o.a,{variant:"h6",component:"h3",children:c}),t&&Object(j.jsx)(o.a,{className:p.subHeading,variant:"h6",component:"h3",children:t})]}),Object(j.jsx)(s.a,{className:p.details,children:n})]})},f=c.a.memo(h)},255:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var a=function(e,t){return"".concat(e,".").concat(t)},c=function(){return"".concat((new Date).getTime())}},258:function(e,t,n){"use strict";n.d(t,"c",(function(){return A})),n.d(t,"a",(function(){return te})),n.d(t,"b",(function(){return Pe}));var a=n(6),c=n(14),r=n(112),i=n(0),o=n(755),s=n(791),l=n(792),u=n(19),d=n.n(u),b=n(31),j=n(142),h=n(793),f=n(74),p=n(831),O=n(794),m=n(795),x=n(261),v=n(48),g=n(384),y=n(80),C=n(196),k=function(){var e=Object(b.a)(d.a.mark((function e(t,n){var c,r;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C.a.create({name:n.name});case 2:return c=e.sent,r=Object(a.a)(Object(a.a)({},n),{},{id:c}),t({type:y.a.AddClient,payload:r}),t({type:y.a.ChangeCurrentClient,payload:r.id}),e.abrupt("return",!0);case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),w=n(103),T=n(13),I=n(57),D=n(1),S=Object(j.a)((function(e){return{content:{borderStyle:"solid",borderColor:e.palette.divider,borderWidth:"1px 0 1px 0",marginTop:e.spacing(2),padding:"".concat(e.spacing(2),"px ").concat(e.spacing(3),"px"),"& p":{margin:0}}}})),N=function(e){var t=e.closeDialog,n=e.handleClose,a=Object(i.useContext)(w.a).dispatch,r=Object(v.f)(),s=Object(i.useState)(0),l=Object(c.a)(s,2),u=l[0],j=l[1],y=S(),C=Object(x.a)({initialValues:{businessName:""},validate:function(e){var t={};return""===e.businessName&&(t.businessName="Please enter a business name"),t},onSubmit:function(){var e=Object(b.a)(d.a.mark((function e(n){return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k(a,{id:Object(g.a)(),name:n.businessName});case 2:C.resetForm(),t((function(){r.push(T.a.CoachingKit)}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()});Object(i.useEffect)((function(){j(C.values.businessName.length)}),[C.values.businessName]);var N=function(e,t){return"undefined"!==typeof e[t]&&""!==e[t]};return Object(D.jsxs)("form",{noValidate:!0,autoComplete:"off",onSubmit:C.handleSubmit,id:"add-new-business-form",children:[Object(D.jsxs)(h.a,{children:[Object(D.jsx)(f.a,{children:"If you have multiple businesses, you can add more later."}),Object(D.jsx)(I.a,{}),Object(D.jsx)(p.a,{id:"businessName",name:"businessName",label:"Business name",variant:"outlined",fullWidth:!0,onChange:function(e){e.target.value.length>40?e.preventDefault():C.setFieldValue("businessName",e.target.value)},value:C.values.businessName,error:N(C.errors,"businessName"),helperText:N(C.errors,"businessName")?C.errors.businessName:"".concat(u,"/").concat(40),autoFocus:!0})]}),Object(D.jsx)(h.a,{className:y.content,children:Object(D.jsx)(O.a,{children:"Remember: The kit does not save information between sessions. Use the export function regularly to save your progress."})}),Object(D.jsxs)(m.a,{children:[Object(D.jsx)(o.a,{onClick:n,color:"primary",children:"Cancel"}),Object(D.jsx)(o.a,{type:"submit",variant:"contained",color:"primary",form:"add-new-business-form",children:"Add business"})]})]})},F=["triggerText"],A=function(e){var t=e.triggerText,n=Object(r.a)(e,F),u=Object(i.useState)(!1),d=Object(c.a)(u,2),b=d[0],j=d[1],h=function(){j(!1)};return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(o.a,Object(a.a)(Object(a.a)({color:"primary",variant:"contained",size:"large",onClick:function(){j(!0)}},n),{},{children:t})),Object(D.jsxs)(s.a,{open:b,onClose:h,"aria-labelledby":"new-client-dialog-title",fullWidth:!0,maxWidth:"sm",children:[Object(D.jsx)(l.a,{id:"new-client-dialog-title",children:"First, add a business name."}),Object(D.jsx)(N,{closeDialog:function(e){h(),e()},handleClose:h})]})]})},E=n(761),B=n(826),W=n(824),P=n(221),R=n(399),H=n(100),L=n(224),M=n(485),_=n(186),G=n(342),U=n(280),z=n(406);function V(e){return-1!==["plan","forecast"].indexOf(e)}var q=n(389),K=n(489),Y=n(46),J=n(286),Q=n(195),$=n(180),X=function(e,t){return Math.floor(e/t)},Z=function(e,t){return Object(a.a)(Object(a.a)({},e),{},{gstOnPurchases:Object($.b)(e.gstOnPurchases)?X(e.gstOnPurchases,t):void 0,gstOnSales:Object($.b)(e.gstOnSales)?X(e.gstOnSales,t):void 0,paygWithholding:X(e.paygWithholding,t),superAmount:X(e.superAmount,t),cashToOwner:X(e.cashToOwner,t),debtors:e.debtors,creditors:e.creditors,assets:e.assets,loans:e.loans,stock:e.stock,cashInItems:e.cashInItems.reduce((function(e,n){return e.concat(Object(a.a)(Object(a.a)({},n),{},{amount:X(n.amount,t)}))}),[]),cashOutItems:e.cashOutItems.reduce((function(e,n){return e.concat(Object(a.a)(Object(a.a)({},n),{},{amount:X(n.amount,t)}))}),[])})},ee=Object(j.a)((function(e){return{trackBox:{display:"flex",alignItems:"center"}}}));function te(e){var t=e.open,n=e.onClose,r=ee(),u=Object(B.a)(R.a),j=Object(c.a)(u,2),p=j[0],O=j[1],g=Object(i.useState)(!1),y=Object(c.a)(g,2),C=y[0],k=y[1],w=Object(v.f)(),S=Object(v.h)().id,N=Object(H.a)(),F=Object(c.a)(N,1)[0],A=Object(i.useState)(),$=Object(c.a)(A,2),X=$[0],te=$[1],ne=Object(i.useState)(!1),ae=Object(c.a)(ne,2),ce=ae[0],re=ae[1],ie=Object(i.useState)(!1),oe=Object(c.a)(ie,2),se=oe[0],le=oe[1],ue=Object(i.useState)(1),de=Object(c.a)(ue,2),be=de[0],je=de[1];var he=Object(x.a)({initialValues:{canvasTitle:"",canvasType:"review",canvasTimeFrame:"biannually",canvasStartDate:new Date,canvasEndDate:new Date},onSubmit:function(){var e=Object(b.a)(d.a.mark((function e(t){var c,r,i,o,s;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!X||!(null===F||void 0===F?void 0:F.id)){e.next=10;break}return c=Object(a.a)(Object(a.a)(Object(a.a)({},X),t),{},{openingBalance:(l=X.canvasType,u=t.canvasType,!V(l)&&V(u)?Object(q.e)(X):X.openingBalance),createdAt:Object(U.a)(),canvasTitle:C?t.canvasTitle:""}),r=se?Z(c,be):c,i=Object(W.a)(r,["id"]),e.next=6,L.a.create(i);case 6:o=e.sent,s=Object(K.a)(i,C),w.push("".concat(Object(T.c)(T.a.CFCEdit,[[":id","".concat(o)]]),"?").concat(s)),n();case 10:case"end":return e.stop()}var l,u}),e)})));return function(t){return e.apply(this,arguments)}}()}),fe=he.setValues,pe=he.handleChange,Oe=he.values,me=he.handleSubmit,xe=he.setFieldValue;Object(i.useEffect)((function(){C||xe("canvasTitle","")}),[C,xe]);var ve=Object(i.useCallback)(Object(b.a)(d.a.mark((function e(){var t,n;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===F||void 0===F?void 0:F.id)){e.next=15;break}return e.next=3,L.a.findById(S);case 3:if(t=e.sent){e.next=7;break}return O("REJECT"),e.abrupt("return");case 7:return te(t),fe({canvasTitle:t.canvasTitle,canvasType:t.canvasType,canvasTimeFrame:t.canvasTimeFrame,canvasStartDate:t.canvasStartDate,canvasEndDate:t.canvasEndDate}),e.next=11,Object(Y.m)(t,F.id,C);case 11:n=e.sent,re(!1!==n),""!==t.canvasTitle&&k(!0),O("RESOLVE");case 15:case"end":return e.stop()}}),e)}))),[F,O,S,fe,C]);Object(i.useEffect)((function(){t&&ve()}),[ve,t]);var ge=Object(i.useCallback)(Object(b.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===F||void 0===F?void 0:F.id)){e.next=5;break}return e.next=3,Object(Y.m)(Oe,F.id,C);case 3:t=e.sent,re(!1!==t);case 5:case"end":return e.stop()}}),e)}))),[Oe,F,C]);Object(i.useEffect)((function(){ge()}),[ge]);var ye=function(e,t){var n=Object(z.a)(e,t,Oe),a=n.canvasStartDate,c=n.canvasEndDate;xe("canvasStartDate",a,!1),xe("canvasEndDate",c,!1)};return Object(i.useEffect)((function(){le("track"===Oe.canvasType)}),[Oe.canvasType,le]),Object(D.jsxs)(s.a,{open:t,onClose:n,"aria-labelledby":"copy-canvas-dialog-title",fullWidth:!0,maxWidth:"md",children:[Object(D.jsx)(l.a,{id:"copy-canvas-dialog-title",children:"Copy Canvas"}),Object(D.jsxs)("form",{onSubmit:me,children:[Object(D.jsx)(h.a,{children:function(){switch(p.value){case"failure":return Object(D.jsx)(M.a,{});case"success":return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(f.a,{component:"em",children:"If you copy to a Plan or Forecast canvas, your closing balance will be your opening balance."}),Object(D.jsx)("br",{}),Object(D.jsx)(f.a,{component:"em",children:"All your figures will be copied to a new Canvas."}),Object(D.jsx)(I.a,{}),Object(D.jsx)(G.d,{type:Oe.canvasType,timeframe:Oe.canvasTimeFrame,startDate:Oe.canvasStartDate,endDate:Oe.canvasEndDate,customTitle:Oe.canvasTitle,useCustomTitle:C}),Object(D.jsx)(G.i,{canvasTypeValue:Oe.canvasType,canvasTimeframeValue:Oe.canvasTimeFrame,onChange:pe,startDate:Oe.canvasStartDate,endDate:Oe.canvasEndDate,onDateChange:ye,customTitle:Oe.canvasTitle,changeCheck:function(e){k(e.target.checked)},useCustomTitle:C,wrapped:!1,showDuplicateError:!1}),ce&&Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(I.a,{}),Object(D.jsx)(J.a,{})]}),se&&Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(I.a,{space:3}),Object(D.jsxs)(D.Fragment,{children:[Object(D.jsxs)(E.a,{className:r.trackBox,children:[Object(D.jsx)(f.a,{children:"Divide copied canvas figures by:"}),Object(D.jsx)(Q.a,{name:"divide-by",value:be,label:"Divide by",options:[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4},{label:"12",value:12},{label:"26",value:26},{label:"52",value:52}],onChange:function(e){return je(parseInt(e.target.value,10)||1)}})]}),Object(D.jsx)(I.a,{}),Object(D.jsx)(f.a,{component:"em",children:"* The figure you enter will divide your Cash IN, Cash OUT and regular financial commitments with the divisor"}),Object(D.jsx)("br",{}),Object(D.jsx)(f.a,{component:"em",children:"* When dividing figures for your canvas, consider seasonal factors which may impact your cash flow"})]})]})]});case"loading":default:return Object(D.jsx)(_.a,{})}}()}),Object(D.jsxs)(m.a,{children:[Object(D.jsx)(o.a,{onClick:n,children:"Cancel"}),Object(D.jsx)(o.a,{type:"submit",variant:"contained",color:"primary",disabled:"success"!==p.value||!Object(P.a)(Oe.canvasStartDate)||!Object(P.a)(Oe.canvasEndDate)||ce||C&&""===Oe.canvasTitle,children:"Copy"})]})]})]})}var ne=n(805),ae=n(811),ce=n(764),re=n(827),ie=n(503),oe=n.n(ie),se=n(504),le=n.n(se),ue=n(388),de=n.n(ue),be=n(251),je=n(250),he=n(825),fe=n(836),pe=n(490),Oe=n(491),me=n(161),xe=n(226),ve=n(87),ge=n(163);function ye(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=Object(b.a)(d.a.mark((function e(t){var n,a;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(Oe.a)(t);case 3:if("string"===typeof(n=e.sent)){e.next=6;break}throw new Error("Unable to process file, ensure you have uploaded the correct file.");case 6:return a=JSON.parse(n),e.abrupt("return",a);case 10:throw e.prev=10,e.t0=e.catch(0),new Error(e.t0.message);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function ke(e){var t=Object.keys(e);if(4!==t.length)return!1;if(!Object(he.a)(t,["ClientDatabase","HealthCheckDatabase","ActionChecklistDatabase","CFCDatabase"]))return!1;for(var n=0;n<t.length;n++)if(null!==e[t[n]]&&(!e[t[n]].formatName||"dexie"!==e[t[n]].formatName))return!1;return!0}function we(e,t){return Te.apply(this,arguments)}function Te(){return(Te=Object(b.a)(d.a.mark((function e(t,n){var a;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new Blob([JSON.stringify(n)]),e.prev=1,e.next=4,Object(pe.b)(t,a,{overwriteValues:!0});case 4:return e.abrupt("return",!0);case 7:return e.prev=7,e.t0=e.catch(1),e.abrupt("return",e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])})))).apply(this,arguments)}function Ie(e){return De.apply(this,arguments)}function De(){return(De=Object(b.a)(d.a.mark((function e(t){var n,a;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(g.a)(),Object(fe.a)(t,"ClientDatabase.data.data[0].rows[0].id",n),a={cashInActions:[],cashOutActions:[],planningBusiness:[],planningCommitments:[],funding:[],recordKeeping:[],managing:[],tracking:[],transition:[]},["HealthCheckDatabase","ActionChecklistDatabase","CFCDatabase"].forEach((function(e){if(null!==t[e]){var c,r=null===(c=t[e])||void 0===c?void 0:c.data.data;r&&r.forEach((function(c,r){var i=c.rows;i&&i.forEach((function(i,o){var s=Object(g.a)();if(Object(fe.a)(t,"".concat(e,".data.data[").concat(r,"].rows[").concat(o,"].clientId"),n),Object(fe.a)(t,"".concat(e,".data.data[").concat(r,"].rows[").concat(o,"].id"),s),"actionItems"===c.tableName||"priority"===c.tableName){var l,u=(null===(l=t[e])||void 0===l?void 0:l.data.data[r].rows[o].actionContainer)||void 0;u&&("actionItems"===c.tableName&&a[u].push(s),"priority"===c.tableName&&Object(fe.a)(t,"".concat(e,".data.data[").concat(r,"].rows[").concat(o,"].order"),a[u]))}}))}))}})),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Se(e){return Ne.apply(this,arguments)}function Ne(){return(Ne=Object(b.a)(d.a.mark((function e(t){var n,a,c,r,i=arguments;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=!(i.length>1&&void 0!==i[1])||i[1],e.prev=1,e.next=4,ye(t);case 4:if(!((a=e.sent)instanceof Error)){e.next=7;break}throw new Error(a.message);case 7:if(ke(a)){e.next=9;break}throw new Error("Imported data doesn't follow the correct structure. Ensure you have selected the correct export file");case 9:if(n){e.next=15;break}return e.next=12,Ie(a);case 12:e.t0=e.sent,e.next=16;break;case 15:e.t0=a;case 16:return c=e.t0,r=[c.ClientDatabase?we(me.a,c.ClientDatabase):Promise.resolve(!1),c.HealthCheckDatabase?we(xe.a,c.HealthCheckDatabase):Promise.resolve(!1),c.ActionChecklistDatabase?we(ve.a,c.ActionChecklistDatabase):Promise.resolve(!1),c.CFCDatabase?we(ge.a,c.CFCDatabase):Promise.resolve(!1)],e.next=20,Promise.all(r);case 20:return e.abrupt("return",e.sent);case 23:throw e.prev=23,e.t1=e.catch(1),new Error(e.t1.message);case 26:case"end":return e.stop()}}),e,null,[[1,23]])})))).apply(this,arguments)}var Fe=n(284),Ae=Object(j.a)((function(e){return{filename:{marginLeft:e.spacing(1)},contentText:{margin:e.spacing(2,0)},fileactions:{marginTop:e.spacing(2),"& > button + button":{marginLeft:e.spacing(1)}},result:{display:"flex",alignItems:"center",marginBottom:e.spacing(1),"& > * + *":{marginLeft:e.spacing(1)},"& > strong":{fontWeight:e.typography.fontWeightMedium}}}})),Ee=Object(ce.a)({id:"importClient",initial:"idle",states:{idle:{on:{FETCH:"loading"}},loading:{on:{RESOLVE:"success",REJECT:"failure"}},success:{on:{RETRY:"idle"}},failure:{on:{RETRY:{target:"idle"}}}}}),Be={ClientDatabase:"Client data",HealthCheckDatabase:"Health check data",ActionChecklistDatabase:"Action checklist data",CFCDatabase:"Cash flow canvas data"},We={isfalse:{content:"No data found in the import file.",icon:oe.a},istrue:{content:"Data successfully imported.",icon:le.a},iserror:{content:"",icon:de.a}};function Pe(e){var t=e.open,n=e.onClose,a=Ae(),r=Object(B.a)(Ee),u=Object(c.a)(r,2),j=u[0],p=u[1],O=Object(i.useContext)(w.a).dispatch,x=Object(i.useState)(""),v=Object(c.a)(x,2),g=v[0],y=v[1],k=Object(i.useState)([!1,!0,new Error("Help")]),T=Object(c.a)(k,2),S=T[0],N=T[1],F=Object(i.useState)(),A=Object(c.a)(F,2),W=A[0],P=A[1],R=Object(i.useState)(),H=Object(c.a)(R,2),L=H[0],M=H[1],G=Object(i.useState)(!0),U=Object(c.a)(G,2),z=U[0],V=U[1],q=Object(i.useCallback)(Object(b.a)(d.a.mark((function e(){var t,n,a,c,r,i;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!W){e.next=15;break}return e.next=3,ye(W);case 3:if(!((t=e.sent)instanceof Error)&&ke(t)){e.next=7;break}return M(void 0),e.abrupt("return");case 7:if(null===t.ClientDatabase){e.next=15;break}if(-1===(r=(null===(n=t.ClientDatabase.data.data)||void 0===n||null===(a=n[0].rows)||void 0===a||null===(c=a[0])||void 0===c?void 0:c.id)||-1)){e.next=15;break}return e.next=12,C.a.findById(r);case 12:return i=e.sent,M(i),e.abrupt("return");case 15:M(void 0);case 16:case"end":return e.stop()}}),e)}))),[W]);Object(i.useEffect)((function(){"idle"===j.value&&(P(void 0),M(void 0))}),[j]),Object(i.useEffect)((function(){q()}),[W,q]);var K=function(){var e=Object(b.a)(d.a.mark((function e(){var t;return d.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W){e.next=4;break}return y("A file is required to proceed"),p("REJECT"),e.abrupt("return");case 4:return p("FETCH"),e.prev=5,e.next=8,Se(W,z);case 8:return t=e.sent,e.next=11,Object(Fe.a)(O);case 11:N(t),p("RESOLVE"),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(5),y(e.t0.message),p("REJECT");case 19:case"end":return e.stop()}}),e,null,[[5,15]])})));return function(){return e.apply(this,arguments)}}(),Y=function(e){return Object(D.jsx)(o.a,{onClick:function(){p("RETRY")},variant:"contained",color:"primary",children:e})},J=function(){return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsxs)("label",{htmlFor:"contained-button-file",children:[Object(D.jsx)("input",{accept:"application/json",style:{display:"none"},id:"contained-button-file",type:"file",onChange:function(e){var t;P((null===(t=e.target.files)||void 0===t?void 0:t[0])||void 0)}}),Object(D.jsx)(o.a,{variant:"outlined",component:"span",children:"Select file to import"})]}),Object(D.jsx)(f.a,{variant:"caption",className:a.filename,children:W&&W.name})]})},Q=function(){return Object(D.jsxs)(E.a,{className:a.fileactions,children:[Object(D.jsx)(o.a,{color:"primary",variant:"contained",onClick:K,children:"Import data"}),Object(D.jsx)(o.a,{onClick:function(){return P(void 0)},children:"Remove file"})]})},$=function(){return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(re.a,{severity:"error",children:g||"Something went wrong processing the request. Please check the uploaded file and try again"}),Object(D.jsx)(I.a,{}),Y("Try again")]})},X=function(){var e=Object.keys(Be);return Object(D.jsxs)(D.Fragment,{children:[S.map((function(t,n){if(t instanceof Error)return Object(D.jsxs)(E.a,{className:a.result,children:[Object(D.jsx)(We.iserror.icon,{color:"error"}),Object(D.jsxs)(f.a,{component:"strong",children:[Be[e[n]],":"]}),Object(D.jsx)(f.a,{children:t.message})]},e[n]);var c=We[t?"istrue":"isfalse"];return Object(D.jsxs)(E.a,{className:a.result,children:[Object(D.jsx)(c.icon,{style:t?{color:be.a[500]}:{color:je.a[500]}}),Object(D.jsxs)(f.a,{component:"strong",children:[Be[e[n]],":"]}),Object(D.jsx)(f.a,{children:c.content})]},e[n])})),Object(D.jsx)(I.a,{space:3}),Y("Import another file")]})},Z=Object(i.useCallback)((function(e){V(e.target.checked)}),[V]),ee=function(){switch(j.value){case"failure":return Object(D.jsx)($,{});case"success":return Object(D.jsx)(X,{});case"loading":return Object(D.jsx)(_.a,{});case"idle":default:return Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(J,{}),L?Object(D.jsxs)(D.Fragment,{children:[Object(D.jsx)(I.a,{}),Object(D.jsxs)(re.a,{severity:"warning",children:['The file you have chosen will overwrite data for client "',L.name,'". Would you like to proceed with overwritting the data, or do you want to create a new client? This can not be undone.']}),Object(D.jsx)(ne.a,{control:Object(D.jsx)(ae.a,{checked:z,onChange:Z,name:"overwrite-client-data",color:"primary"}),label:"Overwrite client data?"})]}):Object(D.jsx)(D.Fragment,{}),W&&Object(D.jsx)(Q,{})]})}};return Object(D.jsxs)(s.a,{open:t,onClose:n,maxWidth:"md",fullWidth:!0,children:[Object(D.jsx)(l.a,{children:"Import client data"}),Object(D.jsxs)(h.a,{children:[Object(D.jsx)(f.a,{component:"p",variant:"body1",className:a.contentText,children:"If you have used the Cash Flow Coaching Kit before and have previously exported your work, you\u2019ll be able to import that data from your device and continue where you left off."}),Object(D.jsx)(f.a,{component:"p",variant:"body1",className:a.contentText,children:"The data you enter into the kit will be stored on this device only. Exiting or clearing your browser cache will erase all unsaved client data."})]}),Object(D.jsx)(h.a,{children:Object(D.jsx)(ee,{})}),Object(D.jsx)(m.a,{children:Object(D.jsx)(o.a,{onClick:n,children:"Close"})})]})}},260:function(e,t,n){"use strict";t.a=function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))}},280:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return r}));var a=n(759),c=(n(513),n(172),n(380),function(){return(new Date).getTime()});function r(e,t){return Object(a.a)(e,t)>0}},282:function(e,t,n){"use strict";var a=n(0),c=n.n(a),r=n(195),i=n(46),o=n(1);t.a=c.a.memo((function(e){var t=e.onChange,n=e.value;return Object(o.jsx)(r.a,{name:"canvasType",value:n,label:"Canvas type",onChange:t,options:Object(i.k)()})}))},283:function(e,t,n){"use strict";var a=n(0),c=n.n(a),r=n(195),i=n(46),o=n(1);t.a=c.a.memo((function(e){var t=e.onChange,n=e.value;return Object(o.jsx)(r.a,{name:"canvasTimeFrame",value:n,label:"Canvas time-frame",onChange:t,options:Object(i.j)()})}))},284:function(e,t,n){"use strict";var a=n(19),c=n.n(a),r=n(31),i=n(80),o=n(196),s=n(108),l=n(72),u=function(){var e=Object(r.a)(c.a.mark((function e(t){var n,a,r,u,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.a.syncWithDatabase();case 2:n=e.sent,t({type:i.a.BulkAdd,payload:n}),(a=Object(s.b)())&&a!==s.a?(d=n.filter(Object(l.a)(a)),(null===(u=d[0])||void 0===u?void 0:u.id)&&t({type:i.a.ChangeCurrentClient,payload:d[0].id})):(null===(r=n[0])||void 0===r?void 0:r.id)&&t({type:i.a.ChangeCurrentClient,payload:n[0].id}),t({type:i.a.UpdateClientSynced,payload:!0});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();t.a=u},286:function(e,t,n){"use strict";n.d(t,"a",(function(){return U}));var a=n(19),c=n.n(a),r=n(31),i=n(14),o=n(0),s=n(799),l=n(761),u=n(48),d=n(827),b=n(221),j=n(78),h=n(282),f=n(283),p=n(36),O=n(73),m=n(408),x=n(142),v=n(74),g=n(335),y=n(823),C=n(498),k=n(1),w=Object(x.a)((function(e){return{dateHighlight:{borderWidth:"1px",borderColor:e.palette.primary.main,borderStyle:"dashed"}}}));function T(e){var t,n=e.value,a=e.onChange,c=e.open,r=e.onOpen,i=e.onClose,s=e.label,l=e.compareDay,u=e.id,d=e.minDate,b=Object(C.useStyles)(),j=w();return Object(k.jsx)(y.a,{value:n,disableToolbar:!0,variant:"inline",inputVariant:"outlined",onChange:function(e){a(e,u)},minDate:d,open:c,format:"dd/MM/yyyy",onOpen:r,onClose:i,label:s,renderDay:(t=l,function(e,n,a,c){return e&&Object(g.a)(e,t)?Object(o.cloneElement)(c,{className:"".concat(b.day," ").concat(j.dateHighlight)}):c}),fullWidth:!0,"aria-label":s,KeyboardButtonProps:{"aria-label":"Open calendar"},inputProps:{"aria-label":s}})}var I=Object(o.memo)(T),D=Object(x.a)((function(e){return{root:Object(p.a)({display:"flex",flexDirection:"row",alignItems:"flex-start"},e.breakpoints.down("sm"),{flexDirection:"column",alignItems:"center"}),separator:Object(p.a)({paddingRight:e.spacing(1),paddingLeft:e.spacing(1),color:e.palette.grey[600],textTransform:"uppercase",fontSize:e.typography.fontSize,lineHeight:"56px"},e.breakpoints.down("sm"),{lineHeight:"40px"})}})),S=Object(o.memo)((function(e){var t=e.startDate,n=e.endDate,a=e.onChange,c=Object(o.useState)({start:!1,end:!1}),r=Object(i.a)(c,2),s=r[0],u=r[1],d=D();function b(e){u(Object(p.a)({start:!1,end:!1},e,!0))}var j=Object(o.useCallback)((function(){return b("start")}),[]),h=Object(o.useCallback)((function(){return b("end")}),[]),f=Object(o.useCallback)((function(){u({start:!1,end:!1})}),[]),x=Object(o.useCallback)((function(e,t){e&&("start"===t?a("canvasStartDate",e):(a("canvasEndDate",e),f()))}),[a,f]);return Object(o.useEffect)((function(){s.start&&b("end")}),[t]),Object(k.jsx)(O.a,{utils:m.a,children:Object(k.jsxs)(l.a,{className:d.root,children:[Object(k.jsx)(I,{value:t,onChange:x,open:s.start,onOpen:j,onClose:f,label:"Start Date",compareDay:n,id:"start"}),Object(k.jsx)(v.a,{component:"span",className:d.separator,children:"to"}),Object(k.jsx)(I,{value:n,onChange:x,open:s.end,onOpen:h,onClose:f,label:"End Date",compareDay:t,id:"end",minDate:t})]})})})),N=n(831),F=n(805),A=n(829),E=n(834),B=n(790),W=n(194),P=n.n(W);function R(e){var t=e.useCustom,n=e.onChange,a=e.changeCheck,c=e.title,r=Object(j.a)();return Object(k.jsxs)(l.a,{children:[t&&Object(k.jsx)(N.a,{id:"canvasTitle",name:"canvasTitle",label:"Custom canvas title",variant:"outlined",value:c,onChange:n,fullWidth:!0,className:r.textField,InputLabelProps:{htmlFor:"canvasTitle"}}),Object(k.jsxs)(l.a,{className:r.checkboxRoot,children:[Object(k.jsx)(F.a,{control:Object(k.jsx)(A.a,{name:"use-custom-title",onChange:a,checked:t}),label:"Use a custom title"}),Object(k.jsx)(E.a,{title:"To make identifying canvases easier, you can assign a custom title to the canvas. Simply tick the box and enter a title. If you do not assign a custom title, the canvas title will be made up of the four fields below.",children:Object(k.jsx)(P.a,{color:"primary"})})]}),Object(k.jsx)(B.a,{className:r.divider})]})}var H=n(100),L=n(46),M=n(187),_=n(137),G=n(57),U=function(){return Object(k.jsx)(d.a,{severity:"error",children:"A canvas with this title has already been created. Make sure that your canvas title is unique."})},z=Object(o.memo)((function(e){var t=e.canvasTimeframeValue,n=e.canvasTypeValue,a=e.startDate,l=e.endDate,d=e.onChange,j=e.onDateChange,p=e.customTitle,O=e.useCustomTitle,m=Object(H.a)(),x=Object(i.a)(m,2),v=x[0],g=x[1],y=Object(u.h)().id,C=Object(o.useContext)(M.a).dispatch,w=Object(o.useCallback)(Object(r.a)(c.a.mark((function e(){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===v||void 0===v?void 0:v.id)){e.next=5;break}return e.next=3,Object(L.m)({canvasEndDate:l,canvasStartDate:a,canvasTitle:p,canvasTimeFrame:t,canvasType:n},v.id,O,y||void 0);case 3:r=e.sent,C({type:_.a.ChangeDuplicateError,payload:!1!==r});case 5:case"end":return e.stop()}}),e)}))),[n,t,v,l,a,p,y,C,O]);return Object(o.useEffect)((function(){g&&w()}),[w,g,y]),Object(o.useEffect)((function(){C({type:_.a.ChangeInvalidDateError,payload:!Object(b.a)(a)||!Object(b.a)(l)})}),[a,l,C]),Object(k.jsx)(k.Fragment,{children:Object(k.jsxs)(s.a,{container:!0,spacing:2,children:[Object(k.jsx)(s.a,{item:!0,xs:12,md:3,children:Object(k.jsx)(h.a,{value:n,onChange:d})}),Object(k.jsx)(s.a,{item:!0,xs:12,md:3,children:Object(k.jsx)(f.a,{value:t,onChange:d})}),Object(k.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(k.jsx)(S,{startDate:a,endDate:l,onChange:j})})]})})}));function V(e){var t=e.canvasTimeframeValue,n=e.canvasTypeValue,a=e.startDate,c=e.endDate,r=e.onChange,i=e.onDateChange,s=e.customTitle,u=e.changeCheck,d=e.useCustomTitle,b=e.wrapped,h=void 0===b||b,f=e.showDuplicateError,p=void 0===f||f,O=Object(j.b)(),m=Object(o.useContext)(M.a).duplicateError;return Object(k.jsxs)(l.a,{className:"".concat(h?O.wrapper:""),children:[Object(k.jsx)(R,{title:s,onChange:r,useCustom:d,changeCheck:u}),Object(k.jsx)(z,{canvasTypeValue:n,canvasTimeframeValue:t,startDate:a,endDate:c,onDateChange:i,onChange:r,customTitle:s,useCustomTitle:d}),p&&m&&Object(k.jsxs)(k.Fragment,{children:[Object(k.jsx)(G.a,{}),Object(k.jsx)(U,{})]})]})}t.b=Object(o.memo)(V)},298:function(e,t,n){"use strict";var a=n(36),c=n(142),r=Object(c.a)((function(e){return{clientCaption:{textTransform:"uppercase",lineHeight:1,display:"block"},clientName:Object(a.a)({lineHeight:1},e.breakpoints.down("sm"),{fontSize:e.typography.pxToRem(18)}),clientGridItem:{display:"flex",flexDirection:"column",justifyContent:"center"}}}));t.a=r},299:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(300),c=n.n(a),r=n(494),i=n.n(r),o=n(13),s=[{route:o.a.ClientList,title:"Client List",Icon:c.a},{route:o.a.SessionFiles,title:"Downloads",Icon:i.a}]},301:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(13),c=[{route:a.a.CoachingKit,title:"Get Started"},{route:Object(a.c)(a.a.HealthCheckQuiz,[[":id?",""]]),title:"Health Check"},{route:a.a.DiscoverTopics,title:"Discover Topics"},{route:a.a.CFC,title:"Cash Flow Canvas"},{route:a.a.ChangeLevers,title:"Change Levers"},{route:a.a.ActionChecklist,title:"Action Checklist"}]},320:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var a=n(0),c=n(48),r=n(804),i=n(199),o=n(6),s=n(334),l=n(251),u=n(819),d=n(820),b=n(821),j=Object(o.a)(Object(o.a)({},Object(i.a)()),{},{palette:{primary:{main:s.a[500]},secondary:{main:s.a[300]}}}),h=Object(o.a)(Object(o.a)({},j),{},{palette:{primary:{main:l.a[800]},secondary:{main:l.a[200]}}}),f=Object(o.a)(Object(o.a)({},j),{},{palette:{primary:{main:u.a[500]},secondary:{main:u.a[200]}}}),p=Object(o.a)(Object(o.a)({},j),{},{palette:{primary:{main:d.a[800]},secondary:{main:d.a[200]}}}),O=Object(o.a)(Object(o.a)({},j),{},{palette:{primary:{main:b.a.A700},secondary:{main:b.a[300]}}}),m=n(13),x=[m.a.CFC,m.a.CFCCompare,Object(m.c)(m.a.CFCEdit,[[":id",""]]),m.a.CFCListing,m.a.ChangeLevers],v=[m.a.ClientList,m.a.DiscoverTopics,m.a.DTTrackingPerformance,m.a.DTSellingClosingSuccession,m.a.DTRecordKeeping,m.a.DTPlanningFinanicalCommitments,m.a.DTPlanningBusiness,m.a.DTManagingCashFlow,m.a.DTFundingBusiness,m.a.HealthCheckList,Object(m.c)(m.a.HealthCheckQuiz,[[":id?",""]]),Object(m.c)(m.a.HealthCheckSummary,[[":id",""]])],g=[m.a.ActionChecklist],y=[m.a.SessionFiles];var C=function(e){var t="".concat(e.replace(/[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/gi,""));return-1!==x.indexOf(t)?Object(i.a)(h):-1!==v.indexOf(t)?Object(i.a)(f):-1!==g.indexOf(t)?Object(i.a)(p):-1!==y.indexOf(t)?Object(i.a)(O):Object(i.a)(j)},k=n(1);function w(e){var t=e.children,n=Object(c.g)(),i=Object(a.useMemo)((function(){return C(n.pathname)}),[n]);return Object(k.jsx)(r.a,{theme:i,children:t})}},326:function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var a=n(19),c=n.n(a),r=n(31),i=n(14),o=n(0),s=n(495),l=n.n(s),u=n(142),d=n(492),b=n(755),j=n(791),h=n(792),f=n(793),p=n(794),O=n(795),m=n(758),x=n(796),v=n(106),g=n(161),y=n(226),C=n(87),k=n(163),w=n(108),T=n(1),I=Object(u.a)((function(e){return Object(d.a)({backdrop:{zIndex:e.zIndex.drawer+1,color:"#fff"}})}));function D(e){var t=e.color,n=void 0===t?"inherit":t,a=e.variant,s=void 0===a?"text":a,u=Object(v.a)(),d=I(),D=Object(o.useState)(!1),S=Object(i.a)(D,2),N=S[0],F=S[1],A=Object(o.useState)(!1),E=Object(i.a)(A,2),B=E[0],W=E[1],P=function(){return F(!1)},R=function(){var e=Object(r.a)(c.a.mark((function e(){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.removeItem("blockReload"),W(!0),g.a.close(),y.a.close(),C.a.close(),k.a.close(),e.next=8,g.a.delete();case 8:return e.next=10,y.a.delete();case 10:return e.next=12,C.a.delete();case 12:return e.next=14,k.a.delete();case 14:Object(w.c)(),window.location.replace("/");case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(T.jsxs)(T.Fragment,{children:[Object(T.jsx)(b.a,{className:u.button,color:n,startIcon:Object(T.jsx)(l.a,{}),onClick:function(){return F(!0)},variant:s,children:"Exit"}),Object(T.jsxs)(j.a,{open:N,onClose:P,fullWidth:!0,maxWidth:"sm",children:[Object(T.jsx)(h.a,{children:"Are you sure you want to exit?"}),Object(T.jsx)(f.a,{children:Object(T.jsx)(p.a,{children:"Make sure you have exported all your data before you leave as all existing data will be deleted."})}),Object(T.jsxs)(O.a,{children:[Object(T.jsx)(b.a,{onClick:P,disabled:B,children:"Cancel"}),Object(T.jsx)(b.a,{onClick:R,color:"primary",variant:"contained",autoFocus:!0,disabled:B,children:"Exit"})]}),Object(T.jsx)(m.a,{className:d.backdrop,open:B,children:Object(T.jsx)(x.a,{color:"inherit"})})]})]})}},327:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(14),c=n(0),r=n(755),i=n(48),o=n(830),s=n(106),l=n(1);function u(e){var t=e.triggerCallback,n=Object(s.a)(),u=Object(i.g)(),d=Object(c.useState)(!1),b=Object(a.a)(d,2),j=b[0],h=b[1];Object(c.useEffect)((function(){Object(o.a)((function(){var e=document.getElementById("start-a-tour");return h(Boolean(e))}))}),[u]);var f=Object(c.useCallback)((function(){var e=document.getElementById("start-a-tour");e&&(e.click(),"undefined"!==typeof t&&t())}),[t]);return j?Object(l.jsx)(r.a,{className:n.button,color:"inherit",variant:"outlined",onClick:f,children:"Show me how"}):Object(l.jsx)(l.Fragment,{})}},339:function(e,t,n){"use strict";n.d(t,"b",(function(){return H})),n.d(t,"a",(function(){return z}));var a=n(14),c=n(36),r=n(0),i=n(48),o=n(142),s=n(761),l=n(248),u=n(13),d=function(e){return!!e&&-1!==Object.values(u.b).indexOf(e.pathname)},b=n(757),j=n(822),h=n(809),f=n(788),p=n(797),O=n(798),m=n(316),x=n(790),v=n(74),g=n(839),y=n(507),C=n.n(y),k=n(39),w=n(216),T=n(301),I=n(299),D=n(100),S=n(298),N=n(327),F=n(326),A=n(57),E=n(1),B=Object(o.a)((function(e){return{drawer:{maxWidth:"300px",width:"100%"},toolbar:{maxWidth:"100%",overflow:"hidden"},logo:{"& h6":{color:"white"}},divider:{margin:"0 ".concat(e.spacing(2),"px 0 ").concat(e.spacing(1),"px")},clientBox:{flexGrow:2,minWidth:0},childList:{marginLeft:e.spacing(3),marginBottom:e.spacing(1),paddingTop:0,borderBottom:"1px solid ".concat(e.palette.divider)},item:{color:"inherit","&.active":{fontWeight:e.typography.fontWeightBold,"& *":{fontWeight:"inherit"}}}}}));function W(){var e=Object(D.a)(),t=Object(a.a)(e,1)[0],n=Object(r.useState)(!1),c=Object(a.a)(n,2),o=c[0],l=c[1],d=B(),y=Object(S.a)(),W=Object(i.g)(),P=function(){return l(!1)};Object(r.useEffect)((function(){P()}),[W.pathname]);var R=function e(t){return Object(E.jsxs)(r.Fragment,{children:[Object(E.jsxs)(b.a,{component:k.c,to:t.route,className:d.item,children:[t.Icon&&Object(E.jsx)(j.a,{children:Object(E.jsx)(t.Icon,{})}),Object(E.jsx)(h.a,{primary:t.title})]}),t.children?Object(E.jsx)(E.Fragment,{children:Object(E.jsx)(f.a,{className:d.childList,children:t.children.map(e)})}):Object(E.jsx)(E.Fragment,{})]},t.route)};return Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)(p.a,{position:"static",children:Object(E.jsxs)(O.a,{className:d.toolbar,children:[Object(E.jsx)(m.a,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:function(){return l(!0)},children:Object(E.jsx)(C.a,{})}),Object(E.jsx)(s.a,{className:d.logo,children:Object(E.jsx)(w.a,{to:u.b.Home})}),Object(E.jsx)(x.a,{orientation:"vertical",flexItem:!0,className:d.divider}),Object(E.jsx)(s.a,{className:d.clientBox,children:t&&Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)(v.a,{className:y.clientCaption,variant:"caption",children:"Client"}),Object(E.jsx)(v.a,{className:"".concat(y.clientName," truncate"),variant:"h6",children:Object(E.jsx)("span",{children:(null===t||void 0===t?void 0:t.name)||""})})]})})]})}),Object(E.jsxs)(g.a,{anchor:"left",open:o,onClose:P,classes:{paper:d.drawer},children:[Object(E.jsx)(f.a,{component:"div",className:"MuiListItem-gutters",children:Object(E.jsx)(N.a,{triggerCallback:P})}),Object(E.jsx)(x.a,{}),Object(E.jsx)(f.a,{children:T.a.map(R)}),Object(E.jsx)(x.a,{}),Object(E.jsx)(f.a,{children:I.a.map(R)}),Object(E.jsx)(x.a,{}),Object(E.jsx)(A.a,{}),Object(E.jsx)(s.a,{style:{padding:"0 16px"},children:Object(E.jsx)(F.a,{color:"primary",variant:"contained"})})]})]})}var P=n(320),R=Object(o.a)((function(e){return{desktop:Object(c.a)({display:"none"},e.breakpoints.up("md"),{display:"block"}),mobile:Object(c.a)({display:"block"},e.breakpoints.up("md"),{display:"none"})}})),H=function(e){var t=e.children,n=Object(i.g)(),c=R(),o=Object(i.f)(),b=Object(D.a)(),j=Object(a.a)(b,2),h=j[0],f=j[1];return Object(r.useEffect)((function(){f&&(h&&(null===h||void 0===h?void 0:h.id)||-1===[u.a.ClientList,u.b.Home].indexOf(n.pathname)&&o.push(u.b.Home))}),[f,h,n,o]),Object(E.jsx)(P.a,{children:!d(n)&&Object(E.jsxs)(E.Fragment,{children:[Object(E.jsxs)(s.a,{className:c.desktop,children:[Object(E.jsx)(l.a,{}),Object(E.jsx)(l.c,{})]}),Object(E.jsx)(s.a,{className:c.mobile,children:Object(E.jsx)(W,{})}),Object(E.jsx)("div",{className:"private-page",children:t})]})})},L=n(6),M=n(112),_=n(817),G=Object(o.a)((function(e){return{container:{paddingTop:e.spacing(5),paddingBottom:e.spacing(15)}}})),U=["children","className","id"],z=function(e){var t=e.children,n=e.className,a=(e.id,Object(M.a)(e,U)),c=G();return Object(E.jsxs)(E.Fragment,{children:[Object(E.jsx)("a",{id:"main-page-container",tabIndex:-1,className:"visually-hidden",children:"Main content anchor"}),Object(E.jsx)(_.a,Object(L.a)(Object(L.a)({role:"role",className:"".concat(c.container," ").concat(n||"")},a),{},{children:t}))]})}},342:function(e,t,n){"use strict";n.d(t,"o",(function(){return l})),n.d(t,"f",(function(){return O})),n.d(t,"b",(function(){return m})),n.d(t,"i",(function(){return x.b})),n.d(t,"d",(function(){return k})),n.d(t,"g",(function(){return w})),n.d(t,"h",(function(){return T})),n.d(t,"e",(function(){return N})),n.d(t,"m",(function(){return B})),n.d(t,"l",(function(){return R})),n.d(t,"k",(function(){return H})),n.d(t,"j",(function(){return L})),n.d(t,"a",(function(){return M})),n.d(t,"n",(function(){return _})),n.d(t,"q",(function(){return G})),n.d(t,"p",(function(){return re})),n.d(t,"c",(function(){return fe}));var a=n(0),c=n.n(a),r=n(761),i=n(64),o=n(78),s=n(1);function l(e){var t=e.onChange,n=e.value,a=Object(o.b)();return Object(s.jsx)(r.a,{className:"".concat(a.wrapper),children:Object(s.jsx)(i.a,{title:"Opening Balance",description:"Your cash at bank at the start of the period",variant:"outlined",name:"openingBalance",onChange:t,value:n})})}var u=n(36),d=n(142),b=n(74),j=n(166),h=Object(d.a)((function(e){return{root:Object(u.a)({},e.breakpoints.up("md"),{alignItems:"center"})}})),f=c.a.memo((function(e){var t=e.title,n=e.description,a=e.value,c=e.mini,i=void 0!==c&&c,l=e.wrapped,u=void 0===l||l,d=Object(o.b)(),f=Object(j.a)({stacked:!1,mini:i}),p=h();return Object(s.jsxs)(r.a,{className:"".concat(u?d.wrapper:""," ").concat(f.root," ").concat(p.root),children:[Object(s.jsxs)(r.a,{className:f.type,children:[Object(s.jsx)(b.a,{variant:"h6",component:"p",children:t}),n&&Object(s.jsx)(b.a,{component:"span",children:n})]}),Object(s.jsx)(b.a,{variant:"h6",children:a})]})})),p=n(38);function O(e){var t=e.value;return Object(s.jsx)(f,{title:"Cash Surplus",description:"The difference between Cash IN and Cash OUT (excluding GST amounts).",value:Object(p.a)(Object(p.b)(t))})}var m=c.a.memo((function(e){var t=e.value;return Object(s.jsx)(f,{title:"Available to Spend (exc GST and Tax)",description:"The Opening Balance plus any Cash Surplus minus Income Tax or Company Tax",value:Object(p.a)(Object(p.b)(t))})})),x=(n(282),n(283),n(286)),v=n(14),g=n(48),y=n(46),C=Object(d.a)((function(e){return{caption:{lineHeight:1.2},title:{marginBottom:e.spacing(2)},noTitle:{color:e.palette.grey[600]}}})),k=c.a.memo((function(e){var t=e.type,n=e.timeframe,c=e.startDate,r=e.endDate,i=e.customTitle,o=e.useCustomTitle,l=C(),u=Object(g.h)().id,d=Object(a.useState)("h3"),j=Object(v.a)(d,2),h=j[0],f=j[1];function p(){return Object(s.jsx)(b.a,{variant:"h5",component:"span",className:"".concat(l.title," ").concat(l.noTitle),children:"Add a title below"})}return Object(a.useEffect)((function(){f("undefined"===typeof u?"h3":"h1")}),[u,f]),Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(b.a,{variant:"overline",component:"span",className:l.caption,children:"Canvas title"}),Object(s.jsx)(b.a,{variant:"h5",className:l.title,component:h,children:o?i||Object(s.jsx)(p,{}):Object(y.l)(t,n,c,r)})]})}));function w(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{variant:"outlined",title:"Cash to Owner",description:"The amounts you withdraw from the business.",value:t,onChange:n,name:"cashToOwner",mini:!0})}function T(e){var t=e.value;return Object(s.jsx)(f,{value:t,title:"Your Closing Cash Balance",description:"The amount of cash you have left at the bank",mini:!0,wrapped:!1})}var I=n(799),D=n(790),S=n(95);function N(e){var t=e.cashToOwner,n=e.closingBalance,a=e.onChange,c=Object(o.b)();return Object(s.jsxs)(r.a,{className:c.wrapper,children:[Object(s.jsx)(b.a,{variant:"h6",component:"h2",children:"Your Cash Balance"}),Object(s.jsx)(S.a,{}),Object(s.jsxs)(I.a,{container:!0,spacing:2,children:[Object(s.jsx)(I.a,{item:!0,sm:12,children:Object(s.jsx)(w,{value:t,onChange:a})}),Object(s.jsx)(I.a,{item:!0,sm:12,children:Object(s.jsx)(D.a,{})}),Object(s.jsx)(I.a,{item:!0,sm:12,children:Object(s.jsx)(T,{value:Object(p.a)(Object(p.b)("".concat(n)))})})]})]})}var F=n(831),A=n(803),E=Object(d.a)((function(e){return{box:{display:"flex",flexDirection:"row",alignItems:"center","& > div":{margin:0,marginRight:e.spacing(1)}},textfield:{marginTop:e.spacing(2)}}})),B=c.a.memo((function(e){var t=e.value,n=e.onChange,c=e.calculated,i=Object(o.b)(),l=Object(a.useState)(""),u=Object(v.a)(l,2),d=u[0],h=u[1],f=Object(j.a)({stacked:!0,mini:!0,fullHeight:!1}),O=E();return Object(s.jsxs)(r.a,{className:"".concat(i.wrapper," ").concat(i.highlightLeft," ").concat(f.root," ").concat(O.box),children:[Object(s.jsxs)(r.a,{className:f.type,children:[Object(s.jsx)(b.a,{variant:"h6",component:"p",children:"Income Tax or Company Tax"}),Object(s.jsxs)(b.a,{component:"span",children:["Estimated amount to pay your tax; approximately ",t,"% of your Cash Surplus."]}),Object(s.jsx)(F.a,{value:t,onChange:function(e){var a=""===e.target.value.trim()?"0":e.target.value.trim();if("".concat(a).startsWith("00")||"".concat(t).startsWith("0")&&"".concat(a).length>1)h("Amount can't start with a zero");else if(a.match(/\D/g))h("Amount can only include digits");else{var c=parseInt(a,10);isNaN(c)||c>100||c<0?h("Please enter a valid number between 0 and 100"):(h(""),"undefined"!==typeof n&&n(e))}},name:"incomeTax",variant:"outlined",label:"Income tax percent",InputProps:{endAdornment:Object(s.jsx)(A.a,{position:"end",children:"%"})},className:O.textfield,error:""!==d,helperText:d})]}),Object(s.jsx)(b.a,{variant:"h6",children:Object(p.a)(Object(p.b)("".concat(isNaN(c)?0:c)))})]})})),W=n(254),P=Object(d.a)((function(e){return{box:{paddingRight:e.spacing(2),paddingLeft:e.spacing(2),paddingBottom:e.spacing(2)},total:{display:"flex",alignItems:"flex-end","& > div":{width:"100%"}}}})),R=c.a.memo((function(e){var t=e.stock,n=e.creditors,a=e.debtors,c=e.assets,i=e.loans,o=e.totalNetAssets,l=e.onChange,u=P();return Object(s.jsx)(W.a,{title:"Is your business improving its financial position?",subHeading:"Complete these fields to record your net asset position.",defaultExpanded:!1,children:Object(s.jsx)(r.a,{className:u.box,children:Object(s.jsxs)(I.a,{container:!0,spacing:2,children:[Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,children:Object(s.jsx)(H,{value:a,onChange:l})}),Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,children:Object(s.jsx)(L,{value:n,onChange:l})}),Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,children:Object(s.jsx)(M,{value:c,onChange:l})}),Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,children:Object(s.jsx)(_,{value:i,onChange:l})}),Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,children:Object(s.jsx)(G,{value:t,onChange:l})}),Object(s.jsx)(I.a,{item:!0,xs:12,sm:6,className:u.total,children:Object(s.jsx)(f,{title:"Total net assets",value:Object(p.a)(Object(p.b)("".concat(o))),wrapped:!1})})]})})})}));function H(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{mini:!0,stacked:!0,fullHeight:!0,variant:"outlined",onChange:n,value:t,name:"debtors",title:"Debtors",description:"The amount others owe to your business at the close of the period."})}function L(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{mini:!0,stacked:!0,fullHeight:!0,variant:"outlined",onChange:n,value:t,name:"creditors",title:"Creditors",description:"The amount your business owes to others at the close of the period."})}var M=c.a.memo((function(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{mini:!0,stacked:!0,fullHeight:!0,variant:"outlined",onChange:n,value:t,name:"assets",title:"Assets",description:"The value of your business assets at the close of the period."})}));function _(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{mini:!0,stacked:!0,fullHeight:!0,variant:"outlined",onChange:n,value:t,name:"loans",title:"Loans",description:"The amount outstanding on your loans at the close of the period."})}function G(e){var t=e.value,n=e.onChange;return Object(s.jsx)(i.a,{mini:!0,stacked:!0,fullHeight:!0,variant:"outlined",onChange:n,value:t,name:"stock",title:"Stock",description:"The value of your stock on hand at the close of the period."})}n(403),n(404);var U=n(755),z=n(834),V=n(194),q=n.n(V),K=Object(d.a)((function(e){return{label:{fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.fontSize,paddingBottom:"4px"}}})),Y=Object(a.memo)((function(){var e=K();return Object(s.jsxs)(s.Fragment,{children:[Object(s.jsxs)(I.a,{container:!0,spacing:2,children:[Object(s.jsx)(I.a,{item:!0,xs:y.d,children:Object(s.jsx)(b.a,{className:e.label,children:"Description"})}),Object(s.jsx)(I.a,{item:!0,xs:y.b,children:Object(s.jsx)(b.a,{className:e.label,children:"Amount"})}),Object(s.jsx)(I.a,{item:!0,xs:y.c,children:Object(s.jsx)(b.a,{className:e.label,children:"Apply GST"})}),Object(s.jsx)(I.a,{item:!0,xs:y.a,children:Object(s.jsx)(b.a,{className:e.label,children:"Actions"})})]}),Object(s.jsx)(D.a,{}),Object(s.jsx)(S.a,{})]})})),J=n(386),Q=n.n(J);function $(e){var t=e.addItem,n=e.addDisabled;return Object(s.jsx)(r.a,{style:{display:"flex"},justifyContent:"flex-end",children:Object(s.jsx)(U.a,{variant:"outlined",color:"primary",startIcon:Object(s.jsx)(Q.a,{}),onClick:function(e){e.preventDefault(),t()},disabled:n,children:"Add new"})})}var X=n(829),Z=n(215),ee=n(398),te=n(400),ne=Object(d.a)((function(e){return{actionGridItem:{height:e.typography.pxToRem(72),display:"flex"}}})),ae=c.a.memo((function(e){var t=e.name,n=e.value,c=e.onChange,r=e.index,i=e.removeItem,o=ne(),l=Object(a.useState)(!1),u=Object(v.a)(l,2),d=u[0],b=u[1],j=function(){b(!1)};return Object(s.jsxs)(I.a,{container:!0,spacing:2,alignItems:"stretch",children:[Object(s.jsx)(I.a,{item:!0,xs:y.d,children:Object(s.jsx)(F.a,{variant:"outlined",name:"".concat(t,"[").concat(r,"].description"),id:"".concat(t,"[").concat(r,"].description"),value:n.description,onChange:c,label:"Description",fullWidth:!0})}),Object(s.jsx)(I.a,{item:!0,xs:y.b,children:Object(s.jsx)(Z.a,{value:n.amount,onChange:c,name:"".concat(t,"[").concat(r,"].amount"),variant:"outlined"})}),Object(s.jsx)(I.a,{item:!0,xs:y.c,className:o.actionGridItem,children:Object(s.jsx)(X.a,{checked:n.gstApplicable,onChange:c,name:"".concat(t,"[").concat(r,"].gstApplicable"),inputProps:{"aria-label":"Apply GST"}})}),Object(s.jsxs)(I.a,{item:!0,xs:y.a,className:o.actionGridItem,children:[Object(s.jsx)(ee.a,{onClick:function(e){e.preventDefault(),b(!0)}}),Object(s.jsx)(te.a,{open:d,onClose:j,onCancel:j,onConfirm:function(e){i(e),b(!1)},children:"Are you sure you want to remove this item?"})]})]})})),ce=Object(d.a)((function(e){return{root:{alignItems:"center"},manualBox:{display:"flex",alignItems:"center","& > button":{marginRight:e.spacing(1)}}}})),re=Object(a.memo)((function(e){var t=e.name,n=e.values,c=e.onChange,i=e.total,l=e.gst,u=e.addItem,d=e.removeItem,h=e.beforeTotalChild,O=e.manualGSTCalculation,m=e.setManualGSTCalc,x=e.gstName,v=Object(o.c)(),g=Object(o.b)(),y=Object(j.a)({mini:!0,stacked:!1}),C=ce(),k=Object(a.useCallback)((function(e){return function(t){t.preventDefault(),d(e)}}),[d]),w=Object(a.useCallback)((function(){m(!O)}),[m,O]),T=Object(a.useCallback)((function(){return n.length>=6||-1!==n.findIndex((function(e){return""===e.description}))}),[n]);return Object(s.jsxs)(s.Fragment,{children:[Object(s.jsxs)(r.a,{className:v.body,children:[Object(s.jsxs)(b.a,{className:v.mobileNotice,style:{fontStyle:"italic"},children:["It appears that you are using a mobile device. Remember to scroll to view the full form below",Object(s.jsx)(S.a,{})]}),Object(s.jsx)(r.a,{className:v.form,children:Object(s.jsxs)(r.a,{className:v.formInner,children:[Object(s.jsx)(Y,{}),n.map((function(e,n){return Object(s.jsx)(ae,{name:t,value:e,onChange:c,index:n,removeItem:k(e.id)},e.id)}))]})}),Object(s.jsx)(S.a,{}),Object(s.jsx)($,{addItem:u,addDisabled:T()})]}),"undefined"!==typeof h&&Object(s.jsxs)(s.Fragment,{children:[Object(s.jsx)(S.a,{}),Object(s.jsx)(D.a,{}),Object(s.jsx)(S.a,{}),h()]}),Object(s.jsx)(S.a,{}),Object(s.jsx)(D.a,{}),Object(s.jsx)(S.a,{}),Object(s.jsxs)(r.a,{className:v.body,children:[Object(s.jsx)(f,{title:"Total (exc GST)",wrapped:!1,value:Object(p.a)(Object(p.b)("".concat(i)))}),Object(s.jsxs)(r.a,{className:"".concat(g.highlightLeft," ").concat(v.gst," ").concat(y.root," ").concat(C.root),children:[Object(s.jsxs)(r.a,{className:y.type,children:[Object(s.jsx)(b.a,{variant:"h6",component:"p",children:"GST"}),!O&&Object(s.jsxs)(r.a,{className:C.manualBox,children:[Object(s.jsxs)(U.a,{variant:"outlined",onClick:w,children:["Calculate"," ",O?"Automatically":"Manually"]}),Object(s.jsx)(z.a,{title:"If you choose to manually calculate the GST, you will lose the ability to change it back to automatically calculate the GST.",children:Object(s.jsx)(q.a,{color:"primary"})})]})]}),O?Object(s.jsx)(Z.a,{onChange:c,value:l,name:x,variant:"outlined",fullWidth:!1}):Object(s.jsx)(b.a,{variant:"h6",children:Object(p.a)(Object(p.b)("".concat(l)))})]})]})]})})),ie=n(788),oe=n(757),se=n(809),le=n(246),ue=n.n(le),de=n(402),be=n(390),je=["Total Cash In (exc GST) \u2013 Total Cash Out (exc GST).","GST on Sales - GST on Purchases + PAYG Withholding + Super + Income Tax or Company Tax. These are highlighted in orange on the Cash Flow Canvas.","Opening Balance + Cash Surplus (exc GST) \u2013 Income Tax or Company Tax.","Total net assets (later period, eg. Forecast) \u2013 Total net assets (earlier period, eg. Review)."],he=Object(d.a)((function(e){return{valueText:{fontWeight:e.typography.fontWeightMedium,marginTop:"4px",display:"flex",alignItems:"center","& svg":{marginLeft:e.spacing(1)}},questionTwo:{position:"relative","&:before":{content:"''",width:"5px",background:ue.a[500],height:"100%",position:"absolute",top:"0px",left:"-".concat(e.spacing(2),"px")}}}}));function fe(e){var t=e.values,n=Object(de.a)(),a=he();function c(e){var n=Object.values(t);return"undefined"!==typeof n[e]?Object(p.a)(Object(p.b)("".concat(n[e]))):3===e?"Compare two canvasses for different dates to find out.":Object(p.a)("0")}return Object(s.jsx)(W.a,{title:"Four Key Questions",reactourLabel:"cfc-four-questions",children:Object(s.jsx)(r.a,{className:n.box,children:Object(s.jsx)(ie.a,{className:n.list,children:be.b.map((function(e,t){return Object(s.jsx)(r.a,{component:"li",children:Object(s.jsx)(oe.a,{component:"div",className:"".concat(n.listItem," ").concat(0===t?n.listItemFirst:""," ").concat(1===t?a.questionTwo:""),children:Object(s.jsxs)(se.a,{className:n.listItemText,children:["".concat(t+1,". ").concat(e),Object(s.jsxs)(b.a,{className:a.valueText,children:[c(t),Object(s.jsx)(z.a,{title:je[t],children:Object(s.jsx)(q.a,{color:"primary"})})]})]})})},e)}))})})})}},38:function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var a=n(22);function c(e){return Object(a.e)(Number.parseFloat,(t=2,function(e){return e.toFixed(t)}))(e);var t}function r(e){return(t="$",function(e){return e.startsWith(t)?e:"".concat(t).concat(e)})(e);var t}function i(e){var t=new RegExp(/\.(0+)?$/,"g");return e.replace(t,"")}function o(e){var t=e.replace(/\D/g,"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return"".concat(e).startsWith("-")?"-".concat(t):t}},389:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return s})),n.d(t,"g",(function(){return l})),n.d(t,"d",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"a",(function(){return b})),n.d(t,"e",(function(){return j})),n.d(t,"h",(function(){return h}));var a=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return function(t){var n=t.gstApplicable;return e?!n:n}},c=n(22),r=n(180);function i(e){return function(t,n){return t.concat(n[e])}}function o(e){var t=e.filter(a()).reduce(i("amount"),[]).reduce(Object(c.f)(),0);return Math.round(Object(r.a)(t))}function s(e,t){if(Object(r.b)(t)){var n=e.reduce(i("amount"),[]).reduce(Object(c.f)(),0);return Object(c.d)(Math.floor(n-t))}return Object(c.d)(Object(c.e)(Object(c.a)(function(e){var t=e.filter(a()).reduce(i("amount"),[]).reduce(Object(c.f)(),0);return Object(r.c)(t)}(e)),Object(c.a)(function(e){return e.filter(a(!0)).reduce(i("amount"),[]).reduce(Object(c.f)(),0)}(e)))(0))}function l(e,t){return Object(c.d)(Object(c.e)(Object(c.a)(e.paygWithholding),Object(c.a)(e.superAmount))(s(e.cashOutItems,t)))}function u(e){return s(e.cashInItems,e.gstOnSales)-l(e,e.gstOnPurchases)}function d(e){var t=parseInt("".concat(e.incomeTax),10);if(isNaN(t)||0===t)return 0;var n=u(e);return n<=0?0:Math.round(n*(t/100))}function b(e){return Object(c.d)(Object(c.e)(Object(c.a)(e.openingBalance),Object(c.c)(d(e)))(u(e)))}function j(e){return b(e)-Object(c.d)(e.cashToOwner)}function h(e){return Object(c.d)(Object(c.e)(Object(c.a)(e.stock),Object(c.c)(e.creditors),Object(c.a)(e.assets),Object(c.a)(e.debtors),Object(c.c)(e.loans))(j(e)))}},390:function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return m})),n.d(t,"a",(function(){return x}));var a=n(6),c=n(47),r=n(500),i=n.n(r),o=n(502),s=n.n(o),l=n(501),u=n.n(l),d=n(251),b=n(249),j=n(250),h=n(13),f=n(395),p=["Are you trading profitably?","Have you put enough money aside to meet your regular financial commitments?","Does your business have enough to spend on yourself and pay others?","Is your business improving its financial position?"],O={positive:"Confident",negative:"Not Confident",neutral:"Not sure"},m=[].concat(Object(c.a)(Object(f.b)(p,{positive:"Yes",negative:"No",neutral:"Not sure"})),[{question:"How do you feel about planning your business?",options:Object(a.a)({},O),learnMore:h.a.DTPlanningBusiness},{question:"How do you feel about understanding your cash flow?",options:Object(a.a)({},O),learnMore:h.a.DTManagingCashFlow},{question:"How do you feel about keeping your books and records?",options:Object(a.a)({},O),learnMore:h.a.DTRecordKeeping},{question:"How do you feel about meeting your regular financial commitments?",options:Object(a.a)({},O),learnMore:h.a.DTPlanningFinanicalCommitments},{question:"How do you feel about funding your business?",options:Object(a.a)({},O),learnMore:h.a.DTFundingBusiness},{question:"How do you feel about tracking your business performance?",options:Object(a.a)({},O),learnMore:h.a.DTTrackingPerformance}]),x=[{Icon:i.a,color:d.a[500],answer:"positive"},{Icon:u.a,color:b.a[500],answer:"negative"},{Icon:s.a,color:j.a[500],answer:"neutral"}]},392:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=n(123),s=n(87),l=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){return Object(a.a)(this,n),t.call(this,s.a,s.a.notes)}return Object(c.a)(n,[{key:"put",value:function(e){var t=this;return this.database.transaction("rw",this.table.name,(function(){return t.table.put(e)}))}}]),n}(o.a));t.a=l},393:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return P}));var a=n(0),c={dispatch:function(){return null},hideCompleted:!1,databaseSyced:!1,priority:[],checklistCollection:[],notes:[]},r=Object(a.createContext)(c),i=n(14),o=n(19),s=n.n(o),l=n(6),u=n(47),d=n(31),b=n(88),j=function(e,t){return Object(l.a)(Object(l.a)({},e),{},{hideCompleted:t})},h=function(e,t){var n=t.notes,a=t.priority,c=t.data;return Object(l.a)(Object(l.a)({},e),{},{databaseSyced:!0,notes:n,priority:a,checklistCollection:c})},f=n(762),p=n(72),O=n(111),m=function(e,t){var n=t.checklist,a=t.priority,c=e.priority.reduce((function(e,t){return e.concat(t.id===a?Object(l.a)(Object(l.a)({},t),{},{order:Object(f.a)([].concat(Object(u.a)(t.order),[(null===n||void 0===n?void 0:n.id)||""]))}):t)}),[]);return 0===e.priority.filter(Object(p.a)(a)).length&&c.push(Object(l.a)(Object(l.a)({},Object(O.e)(n.clientId,n.actionContainer)),{},{order:[(null===n||void 0===n?void 0:n.id)||""],id:a})),Object(l.a)(Object(l.a)({},e),{},{checklistCollection:[].concat(Object(u.a)(e.checklistCollection),[n]),priority:c})},x=function(e,t){var n=t.data,a=t.id,c=e.checklistCollection.reduce((function(e,t){return e.concat(t.id===a?Object(l.a)(Object(l.a)(Object(l.a)({},t),n),{},{id:t.id}):t)}),[]);return Object(l.a)(Object(l.a)({},e),{},{checklistCollection:c})},v=function(e,t){var n=e.priority.reduce((function(e,n){return e.concat(n.id===t.id?t:n)}),[]);return Object(l.a)(Object(l.a)({},e),{},{priority:n})},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){var a=n===e;return t?!a:a}},y=function(e,t){var n=t.targetId,a=t.priorityId,c=e.checklistCollection.filter(Object(p.a)(n,!0)),r=e.priority.reduce((function(e,t){if(t.id===a){var c=t.order.filter(g(n,!0));return c.length>0?e.concat(Object(l.a)(Object(l.a)({},t),{},{order:Object(f.a)(c)})):e}return e.concat(t)}),[]);return Object(l.a)(Object(l.a)({},e),{},{checklistCollection:Object(u.a)(c),priority:r})},C=function(e,t){return Object(l.a)(Object(l.a)({},e),{},{notes:[].concat(Object(u.a)(e.notes),[t])})},k=function(e,t){var n=t.data,a=t.id,c=e.notes.reduce((function(e,t){return e.concat(t.id===a?Object(l.a)(Object(l.a)(Object(l.a)({},t),n),{},{id:t.id}):t)}),[]);return Object(l.a)(Object(l.a)({},e),{},{notes:c})},w=function(e,t){var n=e.notes.filter(Object(p.a)(t,!0));return Object(l.a)(Object(l.a)({},e),{},{notes:n})},T=function(e,t){var n=t.items,a=t.priorityId,c=[].concat(Object(u.a)(e.checklistCollection),Object(u.a)(n)),r=n.reduce((function(e,t){return"string"===typeof t.id?[].concat(Object(u.a)(e),[t.id]):e}),[]),i=function(e,t,n,a,c){return"undefined"!==typeof e.find(Object(p.a)(c))?e.reduce((function(e,t){return e.concat(t.id===c?Object(l.a)(Object(l.a)({},t),{},{order:Object(f.a)([].concat(Object(u.a)(t.order),Object(u.a)(a)))}):t)}),[]):e.concat(Object(l.a)(Object(l.a)({},Object(O.e)(t,n)),{},{id:c,order:Object(f.a)(a)}))}(e.priority,n[0].clientId,n[0].actionContainer,r,a);return Object(l.a)(Object(l.a)({},e),{},{checklistCollection:c,priority:i})},I=function(e,t){switch(t.type){case b.a.ChangeHideCompleted:return j(e,t.payload);case b.a.UpdateDatabaseSync:return h(e,t.payload);case b.a.AddNewActionItem:return m(e,t.payload);case b.a.UpdateActionItem:return x(e,t.payload);case b.a.UpdatePriorityOrder:return v(e,t.payload);case b.a.RemoveActionItem:return y(e,t.payload);case b.a.AddNotes:return C(e,t.payload);case b.a.UpdateNotes:return k(e,t.payload);case b.a.RemoveNote:return w(e,t.payload);case b.a.BulkAddActionItems:return T(e,t.payload);default:return e}},D=n(225),S=n(188),N=n(396),F=n(392),A=n(100),E=n(1),B=function(){var e=Object(d.a)(s.a.mark((function e(t,n,a,c,r){var i,o,d,b,j,h,f,p;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.filter(Object(N.a)(c)).length){e.next=15;break}return i=Object(u.a)(t),o=Object(u.a)(n),d=Object(O.c)(r,c),b=Object(O.e)(r,c),e.next=8,D.a.create(d);case 8:return j=e.sent,e.next=11,S.a.create(Object(l.a)(Object(l.a)({},b),{},{order:[j]}));case 11:return h=e.sent,f=o.concat(Object(l.a)(Object(l.a)({},b),{},{id:h,order:[j]})),p=i.concat(Object(l.a)(Object(l.a)({},d),{},{id:j})),e.abrupt("return",[p,f,a]);case 15:return e.abrupt("return",[t,n,a]);case 16:case"end":return e.stop()}}),e)})));return function(t,n,a,c,r){return e.apply(this,arguments)}}(),W=function(e,t){return function(){var n=Object(d.a)(s.a.mark((function n(a){var c,r,o,l,d,j;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c=Object(i.a)(a,3),r=c[0],o=c[1],l=c[2],n.next=3,B(r,o,l,"cashInActions",t);case 3:return d=n.sent,n.next=6,B(d[0],d[1],d[2],"cashOutActions",t);case 6:j=n.sent,e({type:b.a.UpdateDatabaseSync,payload:{data:Object(u.a)(j[0]),priority:Object(u.a)(j[1]),notes:Object(u.a)(j[2])}});case 8:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},P=function(e){var t=Object(A.a)(),n=Object(i.a)(t,2),o=n[0],u=n[1],b=Object(a.useReducer)(I,c),j=Object(i.a)(b,2),h=j[0],f=j[1],p=Object(a.useCallback)(Object(d.a)(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(null===o||void 0===o?void 0:o.id)){e.next=5;break}return e.next=3,Promise.all([D.a.findByClient(o.id),S.a.findByClient(o.id),F.a.findByClient(o.id)]);case 3:t=e.sent,W(f,o.id)(t);case 5:case"end":return e.stop()}}),e)}))),[o]);Object(a.useEffect)((function(){u&&p()}),[u,p]);var O=Object(a.useMemo)((function(){return Object(l.a)(Object(l.a)({},h),{},{dispatch:f})}),[h]);return Object(E.jsx)(r.Provider,Object(l.a)({value:O},e))}},395:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return r}));var a=n(488),c=function(e,t){return t[Object(a.a)(t,"answer",e)]},r=function(e,t){return e.map((function(e){return{question:e,options:t}}))}},396:function(e,t,n){"use strict";t.a=function(e){return function(t){return t.actionContainer===e}}},398:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(0);var a=n(405),c=n.n(a),r=n(834),i=n(316),o=n(1);function s(e){var t=e.onClick;return Object(o.jsx)(r.a,{title:"Delete",children:Object(o.jsxs)(i.a,{onClick:t,children:[Object(o.jsx)(c.a,{}),Object(o.jsx)("span",{className:"MuiTypography-srOnly",children:"Delete data"})]})})}},399:function(e,t,n){"use strict";var a=n(764),c=Object(a.a)({id:"fetch",initial:"loading",states:{loading:{on:{RESOLVE:"success",REJECT:"failure"}},success:{on:{REJECT:"failure"}},failure:{on:{RETRY:{target:"loading"}}}}});t.a=c},400:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var a=n(0),c=n.n(a),r=n(791),i=n(792),o=n(793),s=n(794),l=n(795),u=n(755),d=n(1),b=function(e){var t=e.open,n=e.onClose,a=e.onCancel,b=e.onConfirm,j=e.children,h=e.confirmText,f=void 0===h?"Confirm":h,p=e.cancelText,O=void 0===p?"Cancel":p,m=e.title,x=void 0===m?"Proceed?":m;return Object(d.jsxs)(r.a,{open:t,onClose:n,fullWidth:!0,maxWidth:"sm",children:[Object(d.jsx)(i.a,{children:x}),c.a.Children.count(j)>0?Object(d.jsx)(o.a,{children:Object(d.jsx)(s.a,{children:j})}):Object(d.jsx)(d.Fragment,{}),Object(d.jsxs)(l.a,{children:[Object(d.jsx)(u.a,{onClick:a,children:O}),Object(d.jsx)(u.a,{onClick:b,color:"primary",variant:"contained",autoFocus:!0,children:f})]})]})}},402:function(e,t,n){"use strict";var a=n(142),c=Object(a.a)((function(e){return{list:{width:"100%",padding:0},box:{paddingRight:e.spacing(2),paddingLeft:e.spacing(2)},listItem:{padding:"".concat(e.spacing(1),"px 0"),borderTop:"1px solid ".concat(e.palette.divider)},listItemFirst:{paddingTop:0,border:"none"},listItemText:{margin:0},answerIconRoot:{display:"flex",flexDirection:"row",alignItems:"center","& p":{marginLeft:e.spacing(1)}}}}));t.a=c},403:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(0);var a=n(64),c=n(1);function r(e){var t=e.value,n=e.onChange;return Object(c.jsx)(a.a,{mini:!0,variant:"outlined",onChange:n,value:t,name:"superAmount",title:"Super",description:"Super amounts held for you and your employees for the future."})}},404:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(0);var a=n(64),c=n(1);function r(e){var t=e.value,n=e.onChange;return Object(c.jsx)(a.a,{mini:!0,variant:"outlined",onChange:n,value:t,name:"paygWithholding",title:"PAYG Withholding",description:"PAYG you withhold for your staff."})}},406:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(6),c=n(36),r=n(280);function i(e,t,n){var i=Object(c.a)({canvasEndDate:n.canvasEndDate,canvasStartDate:n.canvasStartDate},e,t);return"canvasStartDate"===e&&Object(r.b)(t,n.canvasEndDate)?Object(a.a)(Object(a.a)({},i),{},{canvasEndDate:t}):i}},407:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var a=n(14),c=n(0),r=n(401),i=n.n(r),o=n(755),s=n(258),l=n(1);function u(){var e=Object(c.useState)(!1),t=Object(a.a)(e,2),n=t[0],r=t[1];return Object(l.jsxs)(l.Fragment,{children:[Object(l.jsx)(o.a,{variant:"outlined",startIcon:Object(l.jsx)(i.a,{}),onClick:function(){return r(!0)},children:"Import data"}),Object(l.jsx)(s.b,{open:n,onClose:function(){return r(!1)}})]})}},46:function(e,t,n){"use strict";n.d(t,"k",(function(){return f})),n.d(t,"j",(function(){return p})),n.d(t,"l",(function(){return O})),n.d(t,"i",(function(){return m})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return g})),n.d(t,"a",(function(){return y})),n.d(t,"m",(function(){return k})),n.d(t,"f",(function(){return T})),n.d(t,"h",(function(){return I})),n.d(t,"g",(function(){return D})),n.d(t,"e",(function(){return S}));var a=n(19),c=n.n(a),r=n(31),i=n(221),o=n(337),s=n(335),l=n(260),u=n(22),d=n(240),b=n(72),j=n(224);function h(e,t){return e.concat({value:t,label:Object(l.a)(t)})}function f(){return["review","forecast","plan","track"].reduce(h,[])}function p(){return["weekly","fortnightly","monthly","quarterly","biannually","yearly","other"].reduce(h,[])}function O(e,t,n,a){if(!Object(i.a)(n)||!Object(i.a)(a))return"Please provide a valid date";var c="quarterly"===t?"quarterly":t;return Object(u.e)(Object(d.a)(Object(l.a)("".concat(c," "))),Object(d.a)(Object(o.a)(n,"dd/MM/yyyy")),Object(d.a)(" to "),Object(d.a)(Object(o.a)(a,"dd/MM/yyyy")))(Object(l.a)("".concat(e," ")))}function m(e){return""===e.canvasTitle?O(e.canvasType,e.canvasTimeFrame,e.canvasStartDate,e.canvasEndDate):e.canvasTitle}var x=5,v=3,g=2,y=2;function C(e,t,n,a){if(0===e.length)return!1;var c=t.canvasTitle,r=t.canvasEndDate,i=t.canvasStartDate,o=e.filter((function(e){return n?""!==e.canvasTitle.trim()&&e.canvasTitle.trim()===c.trim():""===e.canvasTitle&&(Object(s.a)(e.canvasStartDate,i)&&Object(s.a)(e.canvasEndDate,r))}));if(!a)return!(o.length<1)&&o[0];if(o.length<1)return!1;var l=o.filter(Object(b.a)(a,!0));return!(l.length<1)&&l[0]}function k(e,t,n,a){return w.apply(this,arguments)}function w(){return(w=Object(r.a)(c.a.mark((function e(t,n,a,r){var i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j.a.findPossibleDuplicates(t.canvasType,t.canvasTimeFrame,n,t.canvasTitle.trim(),a);case 2:return i=e.sent,e.abrupt("return",C(i,t,a,r));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return e.cashSurplus}function I(e,t,n,a){return Object(u.e)(Object(u.c)(e.gstOnPurchases),Object(u.a)(t),Object(u.a)(n),Object(u.a)(a))(e.gstOnSales)}function D(e,t,n){return Object(u.e)(Object(u.a)(t.cashSurplus),Object(u.c)(n))(e)}function S(e,t){return e.totalNetAssets-t.totalNetAssets}},485:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(0);var a=n(74),c=n(39),r=n(13),i=n(1);function o(){return Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(a.a,{variant:"h5",children:"Canvas not found"}),Object(i.jsxs)(a.a,{children:["The requested canvas could not be found. Visit the"," ",Object(i.jsx)(c.b,{to:r.a.CFCListing,children:"listing"})," page or"," ",Object(i.jsx)(c.b,{to:r.a.ClientList,children:"select a different client"}),"."]})]})}},488:function(e,t,n){"use strict";t.a=function(e,t,n){return e.findIndex((function(e){return e[t]===n}))}},489:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(514);function c(e,t){var n=new URLSearchParams;return n.append("title",e.canvasTitle),n.append("useCustom",t?"1":"0"),n.append("type",e.canvasType),n.append("timeframe",e.canvasTimeFrame),n.append("startDate",Object(a.a)(e.canvasStartDate).toString()),n.append("endDate",Object(a.a)(e.canvasEndDate).toString()),n.toString()}},491:function(e,t,n){"use strict";function a(e){return new Promise((function(t,n){e||n(new Error("Reading a file requires a valid file to be passed"));var a=new FileReader;a.onerror=function(e){n(e)},a.onloadend=function(){t(a.result)},a.readAsText(e)}))}n.d(t,"a",(function(){return a}))},57:function(e,t,n){"use strict";var a=n(95);n.d(t,"a",(function(){return a.a}))},64:function(e,t,n){"use strict";n.d(t,"a",(function(){return j}));var a=n(6),c=n(112),r=n(0),i=n.n(r),o=n(761),s=n(74),l=n(215),u=n(166),d=n(1),b=["title","description","stacked","mini","fullHeight"],j=i.a.memo((function(e){var t=e.title,n=e.description,r=e.stacked,i=void 0!==r&&r,j=e.mini,h=void 0!==j&&j,f=e.fullHeight,p=void 0!==f&&f,O=Object(c.a)(e,b),m=Object(u.a)({stacked:i,mini:h,fullHeight:p});return Object(d.jsxs)(o.a,{className:m.root,children:[Object(d.jsxs)(o.a,{className:m.type,children:[Object(d.jsx)(s.a,{variant:"h6",component:"p",children:t}),Object(d.jsx)(s.a,{component:"span",children:n})]}),Object(d.jsx)(l.a,Object(a.a)(Object(a.a)({},O),{},{className:m.moneyInput}))]})}))},72:function(e,t,n){"use strict";t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){var a=n.id===e;return t?!a:a}}},744:function(e,t,n){},752:function(e,t,n){"use strict";n.r(t);n(414),n(429),n(431),n(356),n(549),n(558);var a=n(0),c=n.n(a),r=n(30),i=n.n(r),o=(n(744),n(19)),s=n.n(o),l=n(31),u=n(48),d=n(39),b=n(13),j=n(761),h=n(817),f=n(74),p=n(799),O=n(838),m=n(755),x=n(812),v=n(818),g=n(814),y=n(816),C=n(142),k=n(248),w=n(258),T=n(103),I=n(57),D=n(407),S=n(14),N=n(793),F=n(795),A=n(837),E=n(791),B=n(797),W=n(798),P=n(316),R=n(813),H=n(815),L=n(340),M=n.n(L),_=n(506),G=n.n(_),U=n(505),z=n.n(U),V=n(1),q=function(e){var t=e.children;return Object(V.jsx)("div",{className:"content-area",children:t})},K=function(e){var t=e.children;return Object(V.jsx)(f.a,{variant:"h5",component:"h6",style:{marginBottom:"16px"},children:t})},Y=[{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Asking the Four Key Questions"}),Object(V.jsx)(f.a,{children:"These are simple questions that determine the cash flow health of a business. They apply no matter how big a business is or what stage it is at. Answering these Four Key Questions is the foundation to set your client up to succeed."})]})},image:"/take-a-tour/Tour 1.png",alt:"Get started page with expanded four questions"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Coaching model"}),Object(V.jsx)(f.a,{children:"The Kit has an in-built coaching model, which allows your client to:"}),Object(V.jsxs)("ul",{className:"ul-list",children:[Object(V.jsx)(f.a,{component:"li",children:"Discover more about their business."}),Object(V.jsx)(f.a,{component:"li",children:"Unpack their financials, and explore potential improvements."}),Object(V.jsx)(f.a,{component:"li",children:"Create a strong action plan for the future."})]})]})},image:"/take-a-tour/Tour 2.png",alt:"Get started page highlighting the proposed Coaching model"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Health Check"}),Object(V.jsx)(f.a,{children:"This can help you get to know your client and their business. It will show you what they need guidance on and support those needs during your conversation."})]})},image:"/take-a-tour/Tour 3.png",alt:"Health check questionnaire page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Health Check results"}),Object(V.jsx)(f.a,{children:"This gives you and your client a snapshot of the health of their business. Each result links to the relevant Discover Topic."})]})},image:"/take-a-tour/Tour 4.png",alt:"Health check results page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Discover Topics"}),Object(V.jsx)(f.a,{children:"Here your client can learn and understand information about cash flows. They can start to create action items using the Task Builder."})]})},image:"/take-a-tour/Tour 5.png",alt:"Discover Topics landing page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"The Cash Flow Canvas"}),Object(V.jsx)(f.a,{children:"The Canvas is a powerful visual and conversational tool. It helps your client better understand their cash flow."}),Object(V.jsx)("br",{}),Object(V.jsx)(f.a,{children:"You can complete it manually or import data from various accounting systems."})]})},image:"/take-a-tour/Tour 6.png",alt:"Cash Flow Canvas form"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Change Levers"}),Object(V.jsx)(f.a,{children:"Change Levers are potential business improvements and considerations."}),Object(V.jsx)("br",{}),Object(V.jsx)(f.a,{children:"Select the relevant ones with your client. You can test those scenarios back in the Canvas."})]})},image:"/take-a-tour/Tour 7.png",alt:"Change Levers page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Action Checklist"}),Object(V.jsx)(f.a,{children:"The Action Checklist allows your client to create and manage action items they want to complete. You can work with your client to agree on the items and set a review date to keep them committed to taking action."})]})},image:"/take-a-tour/Tour 8.png",alt:"Action Checklist page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Client List"}),Object(V.jsx)(f.a,{children:"Here you'll find all your coaching sessions. This lets you switch clients and export your data. It also has coaching tips from professional advisors. These will help you in your coaching conversations."})]})},image:"/take-a-tour/Tour 9.png",alt:"Client List page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Downloads"}),Object(V.jsx)(f.a,{children:"You can also download all the activities from the coaching session. Use these to reinforce ideas and actions with your client."})]})},image:"/take-a-tour/Tour 10.png",alt:"Downloads page"},{content:function(){return Object(V.jsxs)(q,{children:[Object(V.jsx)(K,{children:"Get started"}),Object(V.jsx)(f.a,{children:"Now you're ready to start a coaching session with your client! Click the 'Get Started' button and enter a business name or import your data."})]})},image:"/take-a-tour/Tour 11.png",alt:"Get started page"}],J=Object(C.a)((function(e){return{media:{height:271},appbar:{position:"relative",boxShadow:"none"},title:{flexGrow:1},content:{padding:e.spacing(3)},stepperNav:{width:"100%"},image:{width:"auto",maxWidth:"100%",display:"block",height:"auto"},imageWrapper:{padding:e.spacing(1),border:"1px solid ".concat(e.palette.grey[300]),borderRadius:e.shape.borderRadius}}}));function Q(){var e=Object(a.useState)(!1),t=Object(S.a)(e,2),n=t[0],c=t[1];return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(Z,{onClick:function(){return c(!0)}}),Object(V.jsx)(X,{onClose:function(){return c(!1)},open:n})]})}var $=function(e){var t=e.closeDialog,n=J(),c=Object(a.useState)(0),r=Object(S.a)(c,2),i=r[0],o=r[1],s=function(){return i===Y.length-1};return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(N.a,{className:n.content,children:Object(V.jsxs)(p.a,{spacing:3,container:!0,children:[Object(V.jsx)(p.a,{item:!0,xs:12,md:8,children:Object(V.jsx)(j.a,{className:n.imageWrapper,children:Object(V.jsx)("img",{src:Y[i].image,alt:Y[i].alt,className:n.image})})}),Object(V.jsx)(p.a,{item:!0,xs:12,md:4,children:Y[i].content()})]})}),Object(V.jsx)(F.a,{children:Object(V.jsx)(A.a,{variant:"progress",steps:Y.length,position:"static",activeStep:i,className:n.stepperNav,nextButton:Object(V.jsx)(m.a,{size:"small",onClick:s()?t:function(){o((function(e){return e+1}))},variant:s()?"contained":"text",color:s()?"primary":"default",children:s()?Object(V.jsxs)(V.Fragment,{children:["Close",Object(V.jsx)(M.a,{})]}):Object(V.jsxs)(V.Fragment,{children:["Next",Object(V.jsx)(z.a,{})]})}),backButton:Object(V.jsxs)(m.a,{size:"small",onClick:function(){o((function(e){return e-1}))},disabled:0===i,children:[Object(V.jsx)(G.a,{}),"Back"]})})})]})},X=function(e){var t=e.onClose,n=e.open,a=J();return Object(V.jsxs)(E.a,{open:n,onClose:t,"aria-labelledby":"take-a-tour-dialog-title",fullScreen:!0,children:[Object(V.jsx)(B.a,{className:a.appbar,color:"default",children:Object(V.jsxs)(W.a,{children:[Object(V.jsx)(f.a,{variant:"h6",className:a.title,id:"take-a-tour-dialog-title",children:"Let's take a tour"}),Object(V.jsx)(P.a,{edge:"start",color:"inherit",onClick:t,"aria-label":"close",children:Object(V.jsx)(M.a,{})})]})}),Object(V.jsx)($,{closeDialog:t})]})},Z=function(e){var t=e.onClick,n=J();return Object(V.jsx)(x.a,{children:Object(V.jsxs)(R.a,{onClick:t,children:[Object(V.jsx)(g.a,{className:n.media,image:"/take-a-tour/card-preview.png",title:"Preview of the Cash Flow Coaching Kit"}),Object(V.jsxs)(H.a,{children:[Object(V.jsx)(f.a,{gutterBottom:!0,variant:"h6",component:"h5",children:"Welcome to the Cash Flow Coaching Kit."}),Object(V.jsx)(f.a,{color:"textSecondary",component:"p",children:"Starting a coaching session with your client is simple, let's show you around."})]}),Object(V.jsx)(y.a,{children:Object(V.jsx)(m.a,{color:"primary",children:"Take a tour"})})]})})},ee=Object(C.a)((function(e){return{container:{paddingTop:e.spacing(5),paddingBottom:e.spacing(5)},grid:{marginTop:e.spacing(8)},buttonBox:{marginTop:e.spacing(5),display:"flex",justifyContent:"center","& .MuiButton-root + .MuiButton-root":{marginLeft:e.spacing(1)}},embed:{minHeight:"300px",border:"none"},containerIndigo:{backgroundColor:"#e8eaf6",padding:e.spacing(5),marginTop:e.spacing(8)},containerGrey:{backgroundColor:"#f5f5f5",padding:e.spacing(2),marginTop:e.spacing(3)},contentText:{margin:e.spacing(2,0),width:"100%"},aboutText:{textAlign:"center",marginBottom:24},alignJustifyContent:{display:"flex",flexDirection:"column",flexWrap:"nowrap",justifyContent:"center",alignItems:"center",alignContent:"center",margin:e.spacing(2,0)},purple:{color:e.palette.getContrastText("#9c27b0"),backgroundColor:"#9c27b0",width:e.spacing(7),height:e.spacing(7),marginTop:e.spacing(2),fontSize:"1.8rem"},green:{color:e.palette.getContrastText("#43a047"),backgroundColor:"#43a047",width:e.spacing(7),height:e.spacing(7),marginTop:e.spacing(2),fontSize:"1.8rem"},blue:{color:e.palette.getContrastText("#0091ea"),backgroundColor:"#0091ea",width:e.spacing(7),height:e.spacing(7),marginTop:e.spacing(2),fontSize:"1.8rem"},MainHeading:{paddingTop:e.spacing(2),paddingBottom:e.spacing(1),fontSize:"2.2rem"},SectionTitle:{paddingTop:e.spacing(1),fontSize:"1.8rem"}}})),te=function(){var e=Object(a.useContext)(T.a).state.clients,t=ee(),n=function(){return e.length>0};return Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(k.b,{hasClients:n()}),Object(V.jsxs)(j.a,{role:"main",children:[Object(V.jsxs)(h.a,{className:t.container,children:[Object(V.jsx)(f.a,{align:"center",component:"h1",className:t.MainHeading,children:"Cash Flow Coaching Kit"}),Object(V.jsx)(f.a,{align:"center",component:"p",variant:"h5",children:"Understand and improve small business cash flow"})]}),Object(V.jsx)(h.a,{maxWidth:!1,component:"div",className:t.containerGrey,children:Object(V.jsx)(h.a,{component:"div",maxWidth:"lg",children:Object(V.jsxs)(p.a,{container:!0,spacing:3,children:[Object(V.jsxs)(p.a,{item:!0,xs:12,sm:4,className:t.alignJustifyContent,children:[Object(V.jsx)(O.a,{className:t.purple,children:"1"}),Object(V.jsx)(f.a,{component:"h2",variant:"h5",className:t.SectionTitle,children:"Discover"}),Object(V.jsx)(f.a,{variant:"body1",component:"p",className:t.contentText,align:"center",children:"Learn about cash flow management."})]}),Object(V.jsxs)(p.a,{item:!0,xs:12,sm:4,className:t.alignJustifyContent,children:[Object(V.jsx)(O.a,{className:t.green,children:"2"}),Object(V.jsx)(f.a,{component:"h2",variant:"h5",className:t.SectionTitle,children:"Apply"}),Object(V.jsx)(f.a,{variant:"body1",component:"p",className:t.contentText,align:"center",children:"Understand your current cash flow and plan improvements."})]}),Object(V.jsxs)(p.a,{item:!0,xs:12,sm:4,className:t.alignJustifyContent,children:[Object(V.jsx)(O.a,{className:t.blue,children:"3"}),Object(V.jsx)(f.a,{component:"h2",variant:"h5",className:t.SectionTitle,children:"Plan & Action"}),Object(V.jsx)(f.a,{variant:"body1",component:"p",className:t.contentText,align:"center",children:"Create an Action Checklist and track your progress."})]})]})})}),Object(V.jsx)(I.a,{space:5}),Object(V.jsxs)(h.a,{children:[Object(V.jsx)(p.a,{container:!0,spacing:3,children:Object(V.jsxs)(p.a,{item:!0,xs:12,sm:12,children:[Object(V.jsx)(f.a,{className:t.aboutText,children:"The Cash Flow Coaching Kit is a coaching resource for tax professionals and business advisors to help their small business clients manage their cash flow."}),Object(V.jsx)(f.a,{className:t.aboutText,children:"Small businesses are encouraged to seek the assistance of a trusted advisor about ways to better manage cash flow and use the Cash Flow Coaching Kit."}),Object(V.jsx)(f.a,{className:t.aboutText,children:"GET STARTED to add a new client"}),Object(V.jsx)(f.a,{className:t.aboutText,children:"IMPORT DATA to view data from a previous session"})]})}),Object(V.jsx)(I.a,{space:5}),Object(V.jsxs)(j.a,{className:t.buttonBox,children:[n()?Object(V.jsx)(m.a,{color:"primary",variant:"contained",component:d.b,to:b.a.ClientList,size:"large",children:"Get Started"}):Object(V.jsx)(w.c,{triggerText:"Get Started"}),Object(V.jsx)(D.a,{})]}),Object(V.jsxs)(p.a,{container:!0,spacing:3,className:t.grid,children:[Object(V.jsx)(p.a,{item:!0,xs:12,md:6,children:Object(V.jsx)(Q,{})}),Object(V.jsx)(p.a,{item:!0,xs:12,md:6,children:Object(V.jsxs)(x.a,{variant:"outlined",children:[Object(V.jsx)(v.a,{title:"What advisors think of the kit"}),Object(V.jsx)(g.a,{className:t.embed,component:"iframe",title:"What advisors think of the kit",src:"https://www.youtube.com/embed/z64Bc5K2TKo?rel=0&modestbranding=1"}),Object(V.jsx)(y.a,{children:Object(V.jsx)(m.a,{color:"primary",href:"/transcripts/What advisors think of the kit.pdf","aria-label":"Download transcript: What advisors think of the kit",target:"_blank",rel:"noopener noreferrer",children:"Download Transcript"})})]})})]})]}),Object(V.jsx)(h.a,{component:"div",className:t.containerIndigo,maxWidth:!1,children:Object(V.jsxs)(h.a,{maxWidth:"lg",children:[Object(V.jsx)(f.a,{variant:"body2",component:"p",className:t.contentText,align:"center",children:"This website does not collect or store any personal information, including the name of your business, any financial records you input or upload, or any of the actions you are taking with your business."}),Object(V.jsx)(f.a,{variant:"body2",component:"p",className:t.contentText,align:"center",children:"The data you enter into the Cash Flow Coaching Kit will be stored on this device only. Exiting or clearing your browser cache will erase all unsaved client data."}),Object(V.jsxs)(f.a,{variant:"body2",component:"p",className:t.contentText,align:"center",children:["We recommend regularly using the EXPORT DATA function from the Client List to avoid data loss. Please refer to the"," ",Object(V.jsx)("a",{href:"/docs/Terms and Conditions.pdf",target:"_blank",rel:"noopener noreferrer",children:"Terms & Conditions"})," ","of use and our"," ",Object(V.jsx)("a",{href:"/docs/Data usage and privacy statement.pdf",target:"_blank",rel:"noopener noreferrer",children:"Data usage and privacy statement"}),"."]})]})})]})]})},ne=n(320),ae=function(){return Object(V.jsx)(ne.a,{children:Object(V.jsx)(u.a,{exact:!0,path:b.b.Home,children:Object(V.jsx)(te,{})})})},ce=n(51),re=n(393),ie=n(339),oe=n(6),se=n(137);var le=function(e,t){switch(t.type){case se.a.ChangeDuplicateError:return function(e,t){return Object(oe.a)(Object(oe.a)({},e),{},{duplicateError:t})}(e,t.payload);case se.a.ChangeInvalidDateError:return function(e,t){return Object(oe.a)(Object(oe.a)({},e),{},{invalidDateError:t})}(e,t.payload);case se.a.ChangeQuestionValues:return function(e,t){return Object(oe.a)(Object(oe.a)({},e),{},{questionValues:t})}(e,t.payload);case se.a.ChangeCompare:return function(e,t){return Object(oe.a)(Object(oe.a)({},e),{},{leftCompare:t.left,rightCompare:t.right})}(e,t.payload);case se.a.ChangeCopyCanvasActive:return function(e,t){return Object(oe.a)(Object(oe.a)({},e),{},{copyCanvasActive:t})}(e,t.payload);default:return e}},ue=n(187);var de=function(e){var t=Object(a.useReducer)(le,ue.b),n=Object(S.a)(t,2),c=n[0],r=n[1],i=Object(a.useState)([]),o=Object(S.a)(i,2),s=o[0],l=o[1],u=Object(a.useMemo)((function(){return Object(oe.a)(Object(oe.a)({},c),{},{dispatch:r,canvasItemUpdater:s,setCanvasItemUpdater:l})}),[c,s]);return Object(V.jsx)(ue.a.Provider,Object(oe.a)({value:u},e))},be=n(186),je=function(){return Object(V.jsx)(ie.a,{children:Object(V.jsx)(be.a,{})})},he=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,1372))}),{fallback:Object(V.jsx)(je,{})}),fe=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,1373))}),{fallback:Object(V.jsx)(je,{})}),pe=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(14)]).then(n.bind(null,1374))}),{fallback:Object(V.jsx)(je,{})}),Oe=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(15)]).then(n.bind(null,1375))}),{fallback:Object(V.jsx)(je,{})}),me=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,1376))}),{fallback:Object(V.jsx)(je,{})}),xe=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,1377))}),{fallback:Object(V.jsx)(je,{})}),ve=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,1378))}),{fallback:Object(V.jsx)(je,{})}),ge=Object(ce.a)((function(){return Promise.all([n.e(29),n.e(23)]).then(n.bind(null,1389))}),{fallback:Object(V.jsx)(je,{})}),ye=Object(ce.a)((function(){return Promise.all([n.e(1),n.e(2),n.e(31),n.e(11)]).then(n.bind(null,1396))}),{fallback:Object(V.jsx)(je,{})}),Ce=Object(ce.a)((function(){return Promise.all([n.e(22),n.e(27)]).then(n.bind(null,1394))}),{fallback:Object(V.jsx)(je,{})}),ke=Object(ce.a)((function(){return n.e(26).then(n.bind(null,1381))}),{fallback:Object(V.jsx)(je,{})}),we=Object(ce.a)((function(){return Promise.all([n.e(1),n.e(2),n.e(3),n.e(10),n.e(8)]).then(n.bind(null,1398))}),{fallback:Object(V.jsx)(je,{})}),Te=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(21)]).then(n.bind(null,1390))}),{fallback:Object(V.jsx)(je,{})}),Ie=Object(ce.a)((function(){return Promise.all([n.e(1),n.e(30),n.e(19)]).then(n.bind(null,1391))}),{fallback:Object(V.jsx)(je,{})}),De=Object(ce.a)((function(){return n.e(28).then(n.bind(null,1400))}),{fallback:Object(V.jsx)(je,{})}),Se=Object(ce.a)((function(){return n.e(25).then(n.bind(null,1393))}),{fallback:Object(V.jsx)(je,{})}),Ne=Object(ce.a)((function(){return Promise.all([n.e(1),n.e(20)]).then(n.bind(null,1395))}),{fallback:Object(V.jsx)(je,{})}),Fe=Object(ce.a)((function(){return Promise.all([n.e(0),n.e(1),n.e(2),n.e(3),n.e(7)]).then(n.bind(null,1392))}),{fallback:Object(V.jsx)(je,{})}),Ae=Object(ce.a)((function(){return n.e(24).then(n.bind(null,1401))}),{fallback:Object(V.jsx)(je,{})}),Ee=Object(ce.a)((function(){return Promise.all([n.e(1),n.e(2),n.e(3),n.e(9)]).then(n.bind(null,1388))}),{fallback:Object(V.jsx)(je,{})}),Be=function(){return Object(V.jsxs)(ie.b,{children:[Object(V.jsx)(u.a,{path:b.a.CoachingKit,children:Object(V.jsx)(De,{})}),Object(V.jsx)(u.a,{path:b.a.SessionFiles,children:Object(V.jsx)(ye,{})}),Object(V.jsx)(u.a,{exact:!0,path:b.a.HealthCheckQuiz,children:Object(V.jsx)(Ce,{})}),Object(V.jsx)(u.a,{exact:!0,path:b.a.HealthCheckList,children:Object(V.jsx)(Se,{})}),Object(V.jsx)(u.a,{exact:!0,path:b.a.HealthCheckSummary,children:Object(V.jsx)(Ne,{})}),Object(V.jsx)(u.a,{path:b.a.DiscoverTopics,children:Object(V.jsx)(ke,{})}),Object(V.jsxs)(de,{children:[Object(V.jsx)(u.a,{path:b.a.CFC,exact:!0,children:Object(V.jsx)(we,{})}),Object(V.jsx)(u.a,{path:b.a.CFCEdit,children:Object(V.jsx)(Fe,{})}),Object(V.jsx)(u.a,{path:b.a.CFCListing,children:Object(V.jsx)(Ae,{})}),Object(V.jsx)(u.a,{path:b.a.CFCCompare,children:Object(V.jsx)(Ee,{})})]}),Object(V.jsxs)(re.b,{children:[Object(V.jsx)(u.a,{path:b.a.ClientList,children:Object(V.jsx)(ge,{})}),Object(V.jsx)(u.a,{path:b.a.ChangeLevers,children:Object(V.jsx)(Te,{})}),Object(V.jsx)(u.a,{path:b.a.ActionChecklist,children:Object(V.jsx)(Ie,{})}),Object(V.jsx)(u.a,{path:b.a.DTFundingBusiness,children:Object(V.jsx)(he,{})}),Object(V.jsx)(u.a,{path:b.a.DTManagingCashFlow,children:Object(V.jsx)(fe,{})}),Object(V.jsx)(u.a,{path:b.a.DTPlanningBusiness,children:Object(V.jsx)(pe,{})}),Object(V.jsx)(u.a,{path:b.a.DTPlanningFinanicalCommitments,children:Object(V.jsx)(Oe,{})}),Object(V.jsx)(u.a,{path:b.a.DTRecordKeeping,children:Object(V.jsx)(me,{})}),Object(V.jsx)(u.a,{path:b.a.DTSellingClosingSuccession,children:Object(V.jsx)(xe,{})}),Object(V.jsx)(u.a,{path:b.a.DTTrackingPerformance,children:Object(V.jsx)(ve,{})})]})]})},We=n(284);function Pe(){return Object(V.jsx)("nav",{id:"top","aria-labelledby":"skip-link",children:Object(V.jsx)(m.a,{component:"a",href:"#main-page-container",id:"skip-link",className:"visually-hidden focusable",color:"primary",variant:"contained",size:"large",onClick:function(e){e.preventDefault();var t=document.querySelector("#main-page-container");t&&t.focus()},children:"Skip to main content"})})}function Re(){var e=Object(u.g)().pathname;return Object(a.useEffect)((function(){window.scrollTo(0,0)}),[e]),null}var He=function(){var e=Object(a.useContext)(T.a).dispatch;return Object(a.useEffect)((function(){!function(){var t=Object(l.a)(s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(We.a)(e);case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()()}),[e]),Object(V.jsxs)(d.a,{children:[Object(V.jsx)(Re,{}),Object(V.jsx)(u.c,{children:Object(V.jsxs)(V.Fragment,{children:[Object(V.jsx)(Pe,{}),Object(V.jsx)(ae,{}),Object(V.jsx)(Be,{})]})})]})},Le=function(){return Object(a.useEffect)((function(){window.localStorage.getItem("blockReload")||window.localStorage.setItem("blockReload","true")}),[]),Object(V.jsx)(T.b,{children:Object(V.jsx)(He,{})})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));i.a.render(Object(V.jsx)(c.a.StrictMode,{children:Object(V.jsx)(Le,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)})),window.onbeforeunload=function(e){if(window.localStorage.getItem("blockReload"))return(e=e||window.event)&&(e.returnValue="Sure?"),"Sure?"}},78:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l}));var a=n(36),c=n(142),r=n(246),i=n.n(r),o=Object(c.a)((function(e){return{wrapper:{background:"white",borderRadius:e.shape.borderRadius,padding:e.spacing(2),boxShadow:e.shadows[1]},highlight:{borderTop:"5px solid ".concat(i.a[500])},highlightLeft:{borderLeft:"5px solid ".concat(i.a[500]),paddingLeft:e.spacing(2)},plain:{boxShadow:"none"}}})),s=Object(c.a)((function(e){return{checkboxRoot:{display:"flex",alignItems:"center"},textField:{marginBottom:e.spacing(1)},divider:{margin:"".concat(e.spacing(2),"px 0")}}})),l=Object(c.a)((function(e){return{body:{paddingRight:e.spacing(0),paddingLeft:e.spacing(0)},form:Object(a.a)({overflow:"hidden"},e.breakpoints.down("sm"),{overflowX:"scroll"}),formInner:Object(a.a)({},e.breakpoints.down("sm"),{minWidth:e.breakpoints.values.md,paddingBottom:e.spacing(1)}),mobileNotice:Object(a.a)({display:"block"},e.breakpoints.up("sm"),{display:"none"}),gst:{marginTop:e.spacing(1),borderRadius:e.shape.borderRadius}}}))},80:function(e,t,n){"use strict";var a;n.d(t,"a",(function(){return a})),function(e){e.AddClient="add_client",e.RemoveClient="remove_client",e.BulkAdd="bulk_add",e.ChangeCurrentClient="change_current_client",e.UpdateClientSynced="change_client_syned",e.UpdateLastViewedHC="change_last_viewed_hc"}(a||(a={}))},87:function(e,t,n){"use strict";var a=n(55),c=n(58),r=n(60),i=n(59),o=new(function(e){Object(r.a)(n,e);var t=Object(i.a)(n);function n(){var e;return Object(a.a)(this,n),(e=t.call(this,"ActionChecklistDatabase")).actionItems=void 0,e.priority=void 0,e.notes=void 0,e.applyMigrations(),e.actionItems=e.table("actionItems"),e.priority=e.table("priority"),e.notes=e.table("notes"),e.replaceIdsWithStrings(),e}return Object(c.a)(n,[{key:"applyMigrations",value:function(){this.version(1).stores({actionItems:"++id, clientId, actionContainer, completed, description",priority:"++id, actionContainer, *order"}),this.version(1.1).stores({actionItems:"++id, clientId, actionContainer, completed, description, reviewBy",priority:"++id, actionContainer, *order"}),this.version(1.2).stores({actionItems:"++id, clientId, actionContainer, completed, description, reviewBy",priority:"++id, actionContainer, *order, clientId",notes:"++id, actionContainer, notes, clientId"}),this.version(1.3).stores({actionItems:"++id, [actionContainer+clientId], completed, description, reviewBy",priority:"++id, [actionContainer+clientId], *order",notes:"++id, actionContainer, notes, clientId"}),this.version(2).stores({actionItems:"++id, [actionContainer+clientId], clientId, completed, description, reviewBy",priority:"++id, [actionContainer+clientId], clientId, *order",notes:"++id, actionContainer, notes, clientId"}),this.version(2.1).stores({actionItems:"++id, [actionContainer+clientId], clientId, completed, description, reviewBy",priority:"++id, [actionContainer+clientId], clientId, *order",notes:"++id, [actionContainer+clientId], notes, clientId"})}},{key:"replaceIdsWithStrings",value:function(){this.actionItems.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id)),"number"===typeof e.clientId&&(e.clientId="".concat(e.clientId))})),this.notes.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id)),"number"===typeof e.clientId&&(e.clientId="".concat(e.clientId))})),this.priority.toCollection().modify((function(e){"number"===typeof e.id&&(e.id="".concat(e.id)),"number"===typeof e.clientId&&(e.clientId="".concat(e.clientId)),e.order=e.order.map((function(e){return"number"===typeof e?"".concat(e):e}))}))}}]),n}(n(162).a));t.a=o},88:function(e,t,n){"use strict";var a;n.d(t,"a",(function(){return a})),function(e){e.ChangeHideCompleted="change_hide_completed",e.UpdateDatabaseSync="change_database_sync",e.AddNewActionItem="add_new_action_item",e.UpdateActionItem="update_action_item",e.UpdatePriorityOrder="update_priority_order",e.RemoveActionItem="remove_action_item",e.AddNotes="add_notes",e.UpdateNotes="update_notes",e.RemoveNote="remove_note",e.BulkAddActionItems="bulk_add_action_items"}(a||(a={}))},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(0);var a=n(49),c=n(761),r=n(1);function i(e){var t=e.space,n=void 0===t?2:t,i=Object(a.a)();return Object(r.jsx)(c.a,{style:{marginTop:i.spacing(n)}})}}},[[752,5,6]]]);
  //# sourceMappingURL=main.64e007d8.chunk.js.map