text: (function(t){function e(e){for(var s,r,o=e[0],l=e[1],u=e[2],c=0,d=[];c<o.length;c++)r=o[c],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&d.push(i[r][0]),i[r]=0;for(s in l)Object.prototype.hasOwnProperty.call(l,s)&&(t[s]=l[s]);h&&h(e);while(d.length)d.shift()();return n.push.apply(n,u||[]),a()}function a(){for(var t,e=0;e<n.length;e++){for(var a=n[e],s=!0,o=1;o<a.length;o++){var l=a[o];0!==i[l]&&(s=!1)}s&&(n.splice(e--,1),t=r(r.s=a[0]))}return t}var s={},i={app:0},n=[];function r(e){if(s[e])return s[e].exports;var a=s[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,r),a.l=!0,a.exports}r.m=t,r.c=s,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)r.d(a,s,function(e){return t[e]}.bind(null,s));return a},r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/traumas-timeline/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var h=l;n.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"034f":function(t,e,a){"use strict";var s=a("64a9"),i=a.n(s);i.a},"0ffa":function(t,e,a){},2693:function(t,e,a){"use strict";var s=a("47d0"),i=a.n(s);i.a},4678:function(t,e,a){var s={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-in":"ec2e","./en-in.js":"ec2e","./en-nz":"6f50","./en-nz.js":"6f50","./en-sg":"b7e9","./en-sg.js":"b7e9","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fil":"d69a","./fil.js":"d69a","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-deva":"aaf2","./gom-deva.js":"aaf2","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./oc-lnc":"167b","./oc-lnc.js":"167b","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-mo":"3a6c","./zh-mo.js":"3a6c","./zh-tw":"90ea","./zh-tw.js":"90ea"};function i(t){var e=n(t);return a(e)}function n(t){if(!a.o(s,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return s[t]}i.keys=function(){return Object.keys(s)},i.resolve=n,t.exports=i,i.id="4678"},"47d0":function(t,e,a){},"47d1":function(t,e,a){"use strict";var s=a("ef92"),i=a.n(s);i.a},"56d7":function(t,e,a){"use strict";a.r(e);a("cadf"),a("551c"),a("f751"),a("097d");var s=a("2b0e"),i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("TraumasTimelines")],1)},n=[],r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",[a("el-col",{attrs:{span:4}},[a("div",[a("el-select",{attrs:{placeholder:t.$t("language")},on:{change:t.updateLanguage},model:{value:t.locale,callback:function(e){t.locale=e},expression:"locale"}},t._l(t.languageOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:t.$t(e.label),value:e.value}})})),1)],1)]),a("el-col",{attrs:{span:1}},[t._v(" ")]),a("el-col",{attrs:{span:4}},[a("div",[a("el-select",{attrs:{placeholder:t.$t("input format")},model:{value:t.inputFormat,callback:function(e){t.inputFormat=e},expression:"inputFormat"}},t._l(t.inputFormatOptions,(function(e){return a("el-option",{key:e.value,attrs:{label:t.$t(e.label),value:e.value}})})),1)],1)]),a("el-col",{attrs:{span:1}},[t._v(" ")]),a("el-col",{attrs:{span:14}},[a("el-collapse",[a("el-collapse-item",{attrs:{title:t.$t("calculator"),name:"1"}},[a("el-row",{staticClass:"trauma-timeline-ages-col",attrs:{span:14}},[a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",placeholder:t.$t("years"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeYears("FIRST_VALUE_YEARS")}},model:{value:t.firstValueYears,callback:function(e){t.firstValueYears=e},expression:"firstValueYears"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",max:"11",placeholder:t.$t("monthsInput"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeMonths("FIRST_VALUE_MONTHS")}},model:{value:t.firstValueMonths,callback:function(e){t.firstValueMonths=e},expression:"firstValueMonths"}})],1),a("el-row",[t._v(" ")]),a("el-row",{staticClass:"trauma-timeline-ages-col",attrs:{span:14}},[a("el-col",{attrs:{span:4}},[t._v(" ")]),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:t.divideSelected},on:{click:function(e){return t.selectOperator("DIVIDE")}}},[a("i",{staticClass:"fas fa-divide"})])],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:t.multiplySelected},on:{click:function(e){return t.selectOperator("MULTIPLY")}}},[a("i",{staticClass:"fas fa-times"})])],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:t.plusSelected},on:{click:function(e){return t.selectOperator("PLUS")}}},[a("i",{staticClass:"fas fa-plus"})])],1),a("el-col",{attrs:{span:4}},[a("el-button",{attrs:{type:t.minusSelected},on:{click:function(e){return t.selectOperator("MINUS")}}},[a("i",{staticClass:"fas fa-minus"})])],1),a("el-col",{attrs:{span:4}},[t._v(" ")])],1),a("el-row",[t._v(" ")]),t.ageValue?a("el-row",{staticClass:"trauma-timeline-ages-col",attrs:{span:14}},[a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",placeholder:t.$t("years"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeYears("SECOND_VALUE_YEARS")}},model:{value:t.secondValueYears,callback:function(e){t.secondValueYears=e},expression:"secondValueYears"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",max:"11",placeholder:t.$t("monthsInput"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeMonths("SECOND_VALUE_MONTHS")}},model:{value:t.secondValueMonths,callback:function(e){t.secondValueMonths=e},expression:"secondValueMonths"}})],1):t._e(),t.numberValue?a("el-row",{staticClass:"trauma-timeline-ages-col",attrs:{span:14}},[a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"2",placeholder:t.$t("value"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkOrderValue()}},model:{value:t.orderValue,callback:function(e){t.orderValue=e},expression:"orderValue"}})],1):t._e(),a("el-row",[t._v(" ")]),a("el-row",[a("el-button",{on:{click:t.calculate}},[a("i",{staticClass:"fas fa-equals"})])],1),a("el-row",[t._v(" ")]),a("el-row",{staticClass:"trauma-timeline-ages-col",attrs:{span:14}},[a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{disabled:"",type:"number",placeholder:t.$t("years")},model:{value:t.yearResult,callback:function(e){t.yearResult=e},expression:"yearResult"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{disabled:"",type:"number",placeholder:t.$t("monthsInput")},model:{value:t.monthResult,callback:function(e){t.monthResult=e},expression:"monthResult"}})],1)],1)],1)],1)],1),a("el-row",[a("el-col",{attrs:{span:24}},[a("h1",[t._v(t._s(t.$t("trauma timelines")))])])],1),t.inputFormatDates?a("el-row",[a("el-col",{attrs:{span:8}},[a("span",[t._v(t._s(t.$t("birth date")+" "))]),a("el-date-picker",{on:{change:t.fillAgeInputs},model:{value:t.birthdayInput,callback:function(e){t.birthdayInput=e},expression:"birthdayInput"}})],1),a("el-col",{attrs:{span:8}},[a("span",[t._v(" "+t._s(t.$t("separation date")+" "))]),a("el-date-picker",{on:{change:t.fillSeparationInputs},model:{value:t.separationDateInput,callback:function(e){t.separationDateInput=e},expression:"separationDateInput"}})],1),a("el-col",{attrs:{span:8}},[a("span",[t._v(" "+t._s(t.$t("diagnosis date")+" "))]),a("el-date-picker",{on:{change:t.fillDiagnosisInputs},model:{value:t.diagnosisDateInput,callback:function(e){t.diagnosisDateInput=e},expression:"diagnosisDateInput"}})],1)],1):a("el-row",[a("el-col",{attrs:{span:2}},[t._v(" ")]),a("el-col",{staticClass:"trauma-timeline-ages-col",attrs:{span:6}},[a("span",{staticClass:"trauma-timeline-ages-span"},[t._v(t._s(t.$t("age")+" "))]),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",placeholder:t.$t("years"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeYears("BIRTHDAY")}},model:{value:t.actualAgeYears,callback:function(e){t.actualAgeYears=e},expression:"actualAgeYears"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",max:"11",placeholder:t.$t("monthsInput"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeMonths("BIRTHDAY")}},model:{value:t.actualAgeMonths,callback:function(e){t.actualAgeMonths=e},expression:"actualAgeMonths"}})],1),a("el-col",{attrs:{span:1}},[t._v(" ")]),a("el-col",{staticClass:"trauma-timeline-ages-col",attrs:{span:6}},[a("span",{staticClass:"trauma-timeline-ages-span"},[t._v(t._s(t.$t("separation")+" "))]),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",placeholder:t.$t("years"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeYears("SEPARATION")}},model:{value:t.separationAgeYears,callback:function(e){t.separationAgeYears=e},expression:"separationAgeYears"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",max:"11",placeholder:t.$t("monthsInput"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeMonths("SEPARATION")}},model:{value:t.separationAgeMonths,callback:function(e){t.separationAgeMonths=e},expression:"separationAgeMonths"}})],1),a("el-col",{attrs:{span:1}},[t._v(" ")]),a("el-col",{staticClass:"trauma-timeline-ages-col",attrs:{span:6}},[a("span",{staticClass:"trauma-timeline-ages-span"},[t._v(t._s(t.$t("diagnosis")+" "))]),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",placeholder:t.$t("years"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeYears("DIAGNOSIS")}},model:{value:t.diagnosisAgeYears,callback:function(e){t.diagnosisAgeYears=e},expression:"diagnosisAgeYears"}}),a("el-input",{staticClass:"trauma-timeline-ages-input",attrs:{type:"number",clearable:"",min:"0",max:"11",placeholder:t.$t("monthsInput"),onkeydown:"javascript: return event.keyCode == 69 ? false : true"},on:{input:function(e){return t.checkAgeMonths("DIAGNOSIS")}},model:{value:t.diagnosisAgeMonths,callback:function(e){t.diagnosisAgeMonths=e},expression:"diagnosisAgeMonths"}})],1),a("el-col",{attrs:{span:2}},[t._v(" ")])],1),a("el-row",[t._v(" ")]),a("el-row",[t._v(" ")]),a("el-row",t._l(t.timelines,(function(e,s){return a("el-col",{key:s,attrs:{span:t.timelineSpan}},[a("Timeline",{attrs:{"timeline-items":e,"message-when-no-items":t.messageWhenNoItems,"unique-year":!0,"show-day-and-month":!0,dateLocale:t.locale,order:"asc"}})],1)})),1)],1)},o=[],l=(a("6b54"),a("28a5"),a("c5f6"),a("ee1d"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"timeline"},[t.hasItems?a("div",{staticClass:"wrapper-timeline"},t._l(t.dataTimeline,(function(e,s){return a("div",{key:s,staticClass:"wrapper-item"},[a("div",{staticClass:"section-year"},[t.hasYear(e)?a("p",{staticClass:"year"},[t._v(t._s(t.getYear(e)))]):t._e()]),a("TimelineItem",{attrs:{"item-timeline":e,"date-locale":t.dateLocale,"color-dots":t.colorDots}})],1)})),0):a("p",[t._v(t._s(t.messageWhenNoItems))])])}),u=[],h=(a("55dd"),a("456d"),a("ac6a"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"timeline-item"},[a("div",{staticClass:"item",class:t.itemClass(t.itemTimeline)},[""!==t.itemTimeline.title?a("span",{staticClass:"dot",style:t.getBackgroundColour(t.itemTimeline.color)}):t._e(),a("h3",{staticClass:"date-item"},[t._v(t._s(t.getFormattedDate(t.itemTimeline)))]),a("h4",{staticClass:"title-item",domProps:{innerHTML:t._s(t.itemTimeline.title)}}),a("p",{staticClass:"description-item",domProps:{innerHTML:t._s(t.itemTimeline.description)}})])])}),c=[],d={name:"TimelineItem",props:{itemTimeline:{type:Object,default:function(){return{}}},colorDots:{type:String,default:"#2da1bf"},dateLocale:{type:String,default:""}},methods:{itemClass:function(t){if(""===t.title)return"emptyItem"},getBackgroundColour:function(t){return"background:".concat(t||this.colorDots)},getFormattedDate:function(t){if(""===t.title)return"";var e=this.dateLocale||navigator.language,a=t.from.toLocaleDateString(e,{month:"long"});if(t.showDayAndMonth){var s=t.from.getDate();return"".concat(s,". ").concat(a)}return a}}},g=d,p=(a("2693"),a("2877")),m=Object(p["a"])(g,h,c,!1,null,"8c7d206c",null),f=m.exports,b={name:"Timeline",components:{TimelineItem:f},props:{timelineItems:{type:Array,default:function(){return[]}},messageWhenNoItems:{type:String,default:""},colorDots:{type:String,default:"#2da1bf"},uniqueTimeline:{type:Boolean,default:!1},uniqueYear:{type:Boolean,default:!1},order:{type:String,default:""},dateLocale:{type:String,default:""}},computed:{hasItems:function(){return!!this.timelineItems.length},dataTimeline:function(){return"desc"===this.order?this.orderItems(this.timelineItems,"desc"):"asc"===this.order?this.orderItems(this.timelineItems,"asc"):this.timelineItems}},methods:{wrapperItemClass:function(t){var e=this.checkYearTimelineItem(t),a=this.uniqueYear&&e&&void 0!==this.order;return{"wrapper-item":!0,"unique-timeline":this.uniqueTimeline||a}},checkYearTimelineItem:function(t){var e=this.dataTimeline[t-1],a=this.dataTimeline[t+1],s=this.dataTimeline[t];if(!e||!a)return!1;var i=this.getYear(e),n=this.getYear(a),r=this.getYear(s);return i===r&&r===n||r===n},getYear:function(t){return""===t.title?"":t.from.getFullYear()},hasYear:function(t){return t.hasOwnProperty("from")&&void 0!==t.from},getTimelineItemsAssembled:function(t){var e=[];return t.forEach((function(t){var a=t.from.getTime();if(e[a])return e[a].push(t);e[a]=[t]})),e},orderItems:function(t,e){var a=this.getTimelineItemsAssembled(t),s=Object.keys(a),i=s.sort((function(t,a){return"desc"===e?a-t:t-a}));return i.map((function(t){return a[t]})).flat()}}},y=b,A=(a("65b2"),Object(p["a"])(y,l,u,!1,null,"21aaec15",null)),D=A.exports,v=a("c1df"),j=a.n(v),M=a("2ef0"),S=a.n(M),N={age:function(t,e,a){return{years:Number(t),months:Number(e),days:Number(a)}},compareAges:function(t,e){return t.years>e.years?1:t.years<e.years?-1:t.months>e.months?1:t.months<e.months?-1:0},birthDateFromAge:function(t){var e=j()();return e.subtract(t.years,"y"),e.subtract(t.months,"M"),e.subtract(t.days,"d"),e.toDate()},dateAtAge:function(t,e){var a=j()(t).clone();return a.add(e.years,"y"),a.add(e.months,"M"),a.add(e.days,"d"),a.toDate()},ageToDate:function(t,e){var a=j()(t).clone(),s=j()(e).clone(),i=s.year()-a.year(),n=0;s.month()>=a.month()?n=s.month()-a.month():(n=s.month()+1+(12-(a.month()+1)),i--);var r=0;return r=s.day()>=a.day()?s.day()-a.day():s.day()+(31-a.days()),this.age(i,n,r)},divideAge:function(t,e){var a=Math.floor(t.years/e),s=Math.floor(t.months/e);s+=Math.floor(12*(t.years/e-a)),s>=12&&(a++,s-=12),i>=30?(s++,i-=30):i>15&&s++;var i=Math.floor(t.days);return this.age(a,s,i)},multiplyAge:function(t,e){var a=t.years*e,s=t.months*e,i=t.days*e;return i>=30&&(s+=Math.floor(i/30),i%=30),s>=12&&(a+=Math.floor(s/12),s%=12),this.age(a,s,i)},subtractAge:function(t,e){var a=0,s=0,i=0;return t.months>=e.months?(a=t.years-e.years,s=t.months-e.months):(a=t.years-e.years-1,s=12-e.months+t.months),i=t.days>=e.days?t.days-e.days:t.days+(30-e.days),s>=12&&(a++,s-=12),this.age(a,s,i)},divideDate:function(t,e,a){var s=this.divideAge(this.ageToDate(t,e),a),i=j()(t).clone();return i.add(s.years,"y").add(s.months,"M").toDate()},ageAddition:function(t,e){var a=t.years+e.years,s=t.months+e.months,i=t.days+e.days;return i>30?(s++,i=-30):i>15&&s++,s>=12&&(a++,s-=12),this.age(a,s,i)}},k={set:function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:90,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",i=new Date(Date.now()+864e5*a).toGMTString();document.cookie=t+"=".concat(encodeURIComponent(e),"; expires=").concat(i,"; path=")+s},get:function(t){return document.cookie.split("; ").reduce((function(e,a){var s=a.split("=");return s[0]===t?decodeURIComponent(s[1]):e}),void 0)},delete:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this.set(t,"",-1,e)}},T=(a("4917"),a("8e6e"),a("bd86")),w=a("b2d6"),I=a.n(w);function O(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function Y(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?O(Object(a),!0).forEach((function(e){Object(T["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):O(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var V=Y(Y({},I.a),{},{language:"Language",english:"English",russian:"Русский","trauma timelines":"Trauma Timelines",age:"Age",years:"years",oneYear:"years",yearsTwoToFour:"years",months:"months",monthsTwoToFour:"months",oneMonth:"month",monthsInput:"months",diagnosis:"Diagnosis",separation:"Separation",birthday:"Birthday","birth date":"Birth Date","separation date":"Separation date","diagnosis date":"Diagnosis date",renaud:"Renaud","input format":"Input format",dates:"Dates",ages:"Ages",today:"Today",pregnancy:"Pregnancy",before:"Before","before pregnancy":"Before pregnancy",calculator:"Age calculator",value:"Value"}),_=a("dccd"),E=a.n(_);function F(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function C(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?F(Object(a),!0).forEach((function(e){Object(T["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):F(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var P=C(C({},E.a),{},{language:"Язык",english:"English",russian:"Русский","trauma timelines":"Хронология травм",age:"Возраст",oneYear:"год",years:"лет",yearsTwoToFour:"года",months:"месяцев",monthsInput:"мес",monthsTwoToFour:"месяца",oneMonth:"месяц",diagnosis:"Диагноз",separation:"Сепарация",birthday:"Рождение","birth date":"Дата рождения","separation date":"дата сепарации","diagnosis date":"дата постановки диагноза",renaud:"Рено",January:"Январь",February:"Февраль",March:"Март",April:"Апреля",May:"Май",June:"Июнь",July:"Июль",August:"Август",September:"Сентябрь",October:"Октябрь",November:"Ноябрь",December:"Декабрь","input format":"Формат данные",dates:"По дате",ages:"По возрасту",today:"Cегодня",pregnancy:"беременности",before:"До","before pregnancy":"До беременносты",calculator:"Калькулятор",value:"Ценность"});function x(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function L(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?x(Object(a),!0).forEach((function(e){Object(T["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var R=L(L({},{en:V}),{ru:P}),$=(a("9f26"),a("a925"));if(s["default"].use($["a"]),S.a.isUndefined(k.get("lang"))){var B=navigator.languages&&navigator.languages[0].match(/^\w{2}/g)[0]||navigator.language.match(/^\w{2}/g)[0];"ru"!==B&&(B="en"),k.set("lang",B)}s["default"].config.lang=k.get("lang"),j.a.locale(s["default"].config.lang);var z=new $["a"]({locale:s["default"].config.lang,messages:R}),U={name:"TraumasTimelines",components:{Timeline:D},data:function(){return{locale:k.get("lang"),ageValue:!1,numberValue:!0,operator:"DIVIDE",divideSelected:"primary",multiplySelected:"",plusSelected:"",minusSelected:"",yearResult:NaN,monthResult:NaN,firstValueYears:NaN,firstValueMonths:NaN,secondValueYears:NaN,secondValueMonths:NaN,orderValue:NaN,birthdayInput:null,separationDateInput:null,diagnosisDateInput:null,messageWhenNoItems:"",inputFormat:"ages",inputFormatOptions:[{value:"dates",label:"dates"},{value:"ages",label:"ages"}],languageOptions:[{value:"en",label:"english"},{value:"ru",label:"russian"}],actualAgeYears:NaN,actualAgeMonths:NaN,separationAgeYears:NaN,separationAgeMonths:NaN,diagnosisAgeYears:NaN,diagnosisAgeMonths:NaN}},computed:{birthday:function(){return this.inputFormatDates?this.birthdayInput:N.birthDateFromAge(N.age(this.actualAgeYears,this.actualAgeMonths,0))},separationDate:function(){return this.inputFormatDates?this.separationDateInput:N.dateAtAge(this.birthday,N.age(this.separationAgeYears,this.separationAgeMonths,0))},diagnosisDate:function(){return this.inputFormatDates?this.diagnosisDateInput:N.dateAtAge(this.birthday,N.age(this.diagnosisAgeYears,this.diagnosisAgeMonths,0))},inputFormatDates:function(){return"dates"===this.inputFormat},displayFirstTimeline:function(){return this.birthdayFilled&&this.diagnosisDateFilled},displaySecondTimeline:function(){return this.birthdayFilled&&this.diagnosisDateFilled&&this.separationDateFilled},birthdayFilled:function(){return this.inputFormatDates?!S.a.isNil(this.birthday):!Number.isNaN(this.actualAgeYears)&&""!==this.actualAgeYears&&!Number.isNaN(this.actualAgeMonths)&&""!==this.actualAgeMonths},separationDateFilled:function(){return this.inputFormatDates?!S.a.isNil(this.separationDate):!Number.isNaN(this.separationAgeYears)&&""!==this.separationAgeYears&&!Number.isNaN(this.separationAgeMonths)&&""!==this.separationAgeMonths},diagnosisDateFilled:function(){return this.inputFormatDates?!S.a.isNil(this.diagnosisDate):!Number.isNaN(this.diagnosisAgeYears)&&""!==this.diagnosisAgeYears&&!Number.isNaN(this.diagnosisAgeMonths)&&""!==this.diagnosisAgeMonths},timelineSpan:function(){return 24/this.timelines.length},ageToday:function(){return this.inputFormatDates?N.ageToDate(this.birthday,j()().toDate()):N.age(this.actualAgeYears,this.actualAgeMonths,0)},ageAtSeparation:function(){return this.inputFormatDates?N.ageToDate(this.birthday,this.separationDate):N.age(this.separationAgeYears,this.separationAgeMonths,0)},ageAtDiagnosis:function(){return this.inputFormatDates?N.ageToDate(this.birthday,this.diagnosisDate):N.age(this.diagnosisAgeYears,this.diagnosisAgeMonths,0)},separtionDateDouble:function(){var t=j()(this.separationDate).clone();return t.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M")},ageAtSeparationDateDouble:function(){return N.multiplyAge(this.ageAtSeparation,2)},ageAtHalfDiagnosisDate:function(){return this.inputFormatDates?N.ageToDate(this.birthday,this.dateAtHalfDiagnosis):N.divideAge(this.ageAtDiagnosis,2)},dateAtHalfDiagnosis:function(){return N.divideDate(this.birthday,this.diagnosisDate,2)},dateAtQuarterDiagnosis:function(){return N.divideDate(this.birthday,this.diagnosisDate,4)},ageAtQuarterDiagnosisDate:function(){return N.divideAge(this.ageAtDiagnosis,4)},dateAtFifthDiagnosis:function(){return N.divideDate(this.birthday,this.diagnosisDate,5)},ageAtFifthDiagnosisDate:function(){return N.divideAge(this.ageAtDiagnosis,5)},dateAtEighthDiagnosis:function(){return N.divideDate(this.birthday,this.diagnosisDate,8)},ageAtEighthDiagnosisDate:function(){return N.divideAge(this.ageAtDiagnosis,8)},ageAtDiagMinusSep:function(){return N.subtractAge(this.ageAtDiagnosis,this.ageAtSeparation)},dateAtDiagMinusSep:function(){return j()(this.birthday).clone().add(this.ageAtDiagMinusSep.years,"y").add(this.ageAtDiagMinusSep.months,"M").toDate()},ageAtDiagPlusSep:function(){return N.ageAddition(this.ageAtDiagnosis,this.ageAtSeparation)},dateAtDiagPlusSep:function(){return j()(this.birthday).clone().add(this.ageAtDiagPlusSep.years,"y").add(this.ageAtDiagPlusSep.months,"M").toDate()},ageAtEightDiagInMonths:function(){var t=this.ageAtEighthDiagnosisDate.years;return N.age(0,t,0)},dateAtEightDiagInMonths:function(){return j()(this.birthday).clone().add(this.ageAtEightDiagInMonths,"M").toDate()},beforePregnancyMonths:function(){var t=9-this.ageAtEightDiagInMonths.months;return N.age(0,t,0)},dateBeforePregnancyMonths:function(){return j()(this.birthday).clone().subtract(9,"M").subtract(this.beforePregnancyMonths,"M").toDate()},pregnancyMonths:function(){return N.age(0,this.ageAtEightDiagInMonths.months,0)},dateDuringPregnancyMonths:function(){return j()(this.birthday).clone().subtract(this.pregnancyMonths,"M").toDate()},timelines:function(){var t=[];if(this.birthdayFilled&&this.diagnosisDateFilled){var e={elements:[],lastElementDate:null};e.elements.push({from:this.dateBeforePregnancyMonths,title:z.t("before pregnancy"),showDayAndMonth:!1,description:this.formatMonthsAproximationBeforePregnancy(this.beforePregnancyMonths)}),e.elements.push({from:this.dateDuringPregnancyMonths,title:z.t("pregnancy"),showDayAndMonth:!1,description:this.formatMonthsAproximation(this.pregnancyMonths)}),e.elements.push({from:this.birthday,title:z.t("birthday"),showDayAndMonth:!1,description:"&nbsp"}),e.elements.push({from:this.dateAtEightDiagInMonths,title:z.t("diagnosis")+"/8 months",showDayAndMonth:!1,description:this.formatMonthsAproximation(this.ageAtEightDiagInMonths)}),this.separationDateFilled?(e.elements.push({from:this.separationDate,title:z.t("separation"),showDayAndMonth:!1,description:this.formatAge(this.ageAtSeparation)}),e.lastElementDate=j()(this.separationDate)):e.lastElementDate=j()(new Date(864e13)),t.push(e)}if(this.separationDateFilled&&this.birthdayFilled&&this.diagnosisDateFilled){var a=j()(this.separationDate),s=this.ageAtSeparation,i=1;while(a.isBefore(j()())){var n={elements:[],lastElementDate:null};n.elements.push(this.generateBlancElement(a.clone().add(1,"d").toDate())),n.elements.push(this.generateBlancElement(a.clone().subtract(2,"d").toDate())),n.elements.push(this.generateBlancElement(a.clone().subtract(1,"d").toDate()));var r=z.t("separation");i>1&&(r+=" * "+i),n.elements.push({from:a.toDate(),title:r,showDayAndMonth:!1,description:this.formatAge(s)}),a.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),s=N.ageAddition(s,this.ageAtSeparation),n.lastElementDate=j()(a).clone(),i++,n.elements.push({from:a.toDate(),title:z.t("separation")+" * "+i,showDayAndMonth:!1,description:this.formatAge(s)}),t.push(n)}}if(this.birthdayFilled&&this.diagnosisDateFilled){var o=j()(this.dateAtEighthDiagnosis),l=this.ageAtEighthDiagnosisDate,u={from:o.toDate(),title:z.t("diagnosis")+"/8",showDayAndMonth:!1,description:this.formatAge(l)};t[0].elements.push(u);var h=j()(this.dateAtFifthDiagnosis),c=this.ageAtFifthDiagnosisDate;u={from:h.toDate(),title:z.t("diagnosis")+"/5 . "+z.t("renaud"),showDayAndMonth:!1,description:this.formatAge(c)},this.insertElemntToTimeLines(u,t);var d=j()(this.dateAtQuarterDiagnosis),g=this.ageAtQuarterDiagnosisDate;u={from:d.toDate(),title:z.t("diagnosis")+"/4",showDayAndMonth:!1,description:this.formatAge(g)},this.insertElemntToTimeLines(u,t);var p=j()(this.dateAtHalfDiagnosis),m=this.ageAtHalfDiagnosisDate;u={from:p.toDate(),title:z.t("diagnosis")+"/2",showDayAndMonth:!1,description:this.formatAge(m)},this.insertElemntToTimeLines(u,t);var f=j()(this.diagnosisDate).clone().add(this.ageAtDiagnosis.years,"y").add(this.ageAtDiagnosis.months,"M").add(this.ageAtDiagnosis,"d"),b=N.ageAddition(this.ageAtDiagnosis,this.ageAtDiagnosis),y=2;while(f.isBefore(j()()))u={from:f.toDate(),title:z.t("diagnosis")+"*"+y,showDayAndMonth:!1,description:this.formatAge(b)},this.insertElemntToTimeLines(u,t),y=Math.pow(y,2),f.add(y*this.ageAtDiagnosis.years,"y").add(y*this.ageAtDiagnosis.months,"M").add(y*this.ageAtDiagnosis,"d"),b=N.multiplyAge(this.ageAtDiagnosis,y);if(this.separationDateFilled){o.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),l=N.ageAddition(l,this.ageAtSeparation),h.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),c=N.ageAddition(c,this.ageAtSeparation),d.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),g=N.ageAddition(g,this.ageAtSeparation),p.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),m=N.ageAddition(m,this.ageAtSeparation);var A=1;while(o.isBefore(j()())){var D=z.t("diagnosis")+"/8 + "+z.t("separation");A>1&&(D+="*"+A);var v={from:o.toDate(),title:D,showDayAndMonth:!1,description:this.formatAge(l)};this.insertElemntToTimeLines(v,t),D=z.t("diagnosis")+"/5 + "+z.t("separation"),A>1&&(D+="*"+A),v={from:h.toDate(),title:D,showDayAndMonth:!1,description:this.formatAge(c)},this.insertElemntToTimeLines(v,t),D=z.t("diagnosis")+"/4 + "+z.t("separation"),A>1&&(D+="*"+A),v={from:d.toDate(),title:D,showDayAndMonth:!1,description:this.formatAge(g)},this.insertElemntToTimeLines(v,t),D=z.t("diagnosis")+"/2 + "+z.t("separation"),A>1&&(D+="*"+A),v={from:p.toDate(),title:D,showDayAndMonth:!1,description:this.formatAge(m)},this.insertElemntToTimeLines(v,t),o.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),l=N.ageAddition(l,this.ageAtSeparation),h.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),c=N.ageAddition(c,this.ageAtSeparation),d.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),g=N.ageAddition(g,this.ageAtSeparation),p.add(this.ageAtSeparation.years,"y").add(this.ageAtSeparation.months,"M").add(this.ageAtSeparation.days,"d"),m=N.ageAddition(m,this.ageAtSeparation),A++}}}if(this.birthdayFilled){var M={from:j()().toDate(),title:z.t("today"),showDayAndMonth:!1,description:this.formatAge(this.ageToday)};this.insertElemntToTimeLines(M,t)}if(this.diagnosisDateFilled){var k={from:this.diagnosisDate,title:z.t("diagnosis"),showDayAndMonth:!1,description:this.formatAge(this.ageAtDiagnosis)};this.insertElemntToTimeLines(k,t)}if(this.separationDateFilled&&this.diagnosisDateFilled){var T={};T=j()(this.diagnosisDate).isAfter(j()(this.separationDate))?{from:this.dateAtDiagMinusSep,title:z.t("diagnosis")+" - "+z.t("separation"),showDayAndMonth:!1,description:this.formatAge(this.ageAtDiagMinusSep)}:{from:this.dateAtDiagPlusSep,title:z.t("diagnosis")+" + "+z.t("separation"),showDayAndMonth:!1,description:this.formatAge(this.ageAtDiagPlusSep)},this.insertElemntToTimeLines(T,t)}return S.a.map(t,(function(t){return t.elements}))}},mounted:function(){if(this.$gtag.event("access",{method:"Google"}),"ru"===k.get("lang"))for(var t=document.getElementsByTagName("h3"),e=0;e<t.length;e++)t[e].textContent=z.t(t[e].textContent)},methods:{checkOrderValue:function(){Number(this.orderValue)<2&&(this.orderValue=2)},calculate:function(){if(!Number.isNaN(this.firstValueYears)&&!Number.isNaN(this.firstValueMonths))if("DIVIDE"===this.operator){if(!Number.isNaN(this.orderValue)){var t=N.divideAge(N.age(this.firstValueYears,this.firstValueMonths,0),this.orderValue);this.yearResult=t.years,this.monthResult=t.months}}else if("MULTIPLY"===this.operator){if(!Number.isNaN(this.orderValue)){var e=N.multiplyAge(N.age(this.firstValueYears,this.firstValueMonths,0),this.orderValue);this.yearResult=e.years,this.monthResult=e.months}}else if("PLUS"===this.operator){if(!Number.isNaN(this.secondValueYears)&&!Number.isNaN(this.secondValueMonths)){var a=N.ageAddition(N.age(this.firstValueYears,this.firstValueMonths,0),N.age(this.secondValueYears,this.secondValueMonths,0));this.yearResult=a.years,this.monthResult=a.months}}else if("MINUS"===this.operator&&!Number.isNaN(this.secondValueYears)&&!Number.isNaN(this.secondValueMonths)){var s=N.subtractAge(N.age(this.firstValueYears,this.firstValueMonths,0),N.age(this.secondValueYears,this.secondValueMonths,0));this.yearResult=s.years,this.monthResult=s.months}},selectOperator:function(t){switch(this.operator!==t&&(this.yearResult=NaN,this.monthResult=NaN),this.operator=t,t){case"DIVIDE":this.numberValue=!0,this.ageValue=!1,this.divideSelected="primary",this.multiplySelected="",this.plusSelected="",this.minusSelected="";break;case"MULTIPLY":this.numberValue=!0,this.ageValue=!1,this.divideSelected="",this.multiplySelected="primary",this.plusSelected="",this.minusSelected="";break;case"PLUS":this.numberValue=!1,this.ageValue=!0,this.divideSelected="",this.multiplySelected="",this.plusSelected="primary",this.minusSelected="";break;case"MINUS":this.numberValue=!1,this.ageValue=!0,this.divideSelected="",this.multiplySelected="",this.plusSelected="",this.minusSelected="primary";break;default:break}},updateLanguage:function(){this.$i18n.locale!==this.locale&&(this.$i18n.locale=this.locale,k.set("lang",this.locale))},yearTranlation:function(t){return t>=5&&t<=20?z.t("years"):"1"==t.toString().split("").pop()?z.t("oneYear"):"2"==t.toString().split("").pop()||"3"==t.toString().split("").pop()||"4"==t.toString().split("").pop()?z.t("yearsTwoToFour"):z.t("years")},monthsTranslation:function(t){return 1==t?z.t("oneMonth"):2==t||3==t||4==t?z.t("monthsTwoToFour"):z.t("months")},formatAge:function(t){var e="";return(t.years>0||t.months>0)&&(e=z.t("age")+": "),t.years>0&&(e+=t.years+" "+this.yearTranlation(t.years)),t.months>0&&(t.years>0&&(e+=", "),e+=t.months+" "+this.monthsTranslation(t.months)),e},formatMonthsAproximation:function(t){var e="";return t.months>0&&(e+=z.t("age")+": "+t.months+" - "+(t.months+1)+this.monthsTranslation(t.months)),e},formatMonthsAproximationBeforePregnancy:function(t){var e="";return t.months>0&&(e+=t.months+" - "+(t.months-1)+this.monthsTranslation(t.months)),e},fillAgeInputs:function(){S.a.isNil(this.birthdayInput)||(this.actualAgeYears=this.ageToday.years,this.actualAgeMonths=this.ageToday.months)},fillSeparationInputs:function(){S.a.isNil(this.birthdayInput)||S.a.isNil(this.separationDateInput)||(this.separationAgeYears=this.ageAtSeparation.years,this.separationAgeMonths=this.ageAtSeparation.months)},fillDiagnosisInputs:function(){S.a.isNil(this.birthdayInput)||S.a.isNil(this.diagnosisDateInput)||(this.diagnosisAgeYears=this.ageAtDiagnosis.years,this.diagnosisAgeMonths=this.ageAtDiagnosis.months)},checkAgeYears:function(t){switch(t){case"BIRTHDAY":Number(this.actualAgeYears)<0&&(this.actualAgeYears=0),this.birthdayFilled&&(this.birthdayInput=this.birthday);break;case"SEPARATION":Number(this.separationAgeYears)<0&&(this.separationAgeYears=0),this.separationDateFilled&&(this.separationDateInput=this.separationDate);break;case"DIAGNOSIS":Number(this.diagnosisAgeYears)<0&&(this.diagnosisAgeYears=0),this.diagnosisDateFilled&&(this.diagnosisDateInput=this.diagnosisDate);break;case"FIRST_VALUE_YEARS":Number(this.firstValueYears)<0&&(this.firstValueYears=0);break;case"SECOND_VALUE_YEARS":Number(this.secondValueYears)<0&&(this.secondValueYears=0);break;default:break}},checkAgeMonths:function(t){switch(t){case"BIRTHDAY":Number(this.actualAgeMonths)<0?this.actualAgeMonths=0:Number(this.actualAgeMonths)>11&&(this.actualAgeMonths=11),this.birthdayFilled&&(this.birthdayInput=this.birthday);break;case"SEPARATION":Number(this.separationAgeMonths)<0?this.separationAgeMonths=0:Number(this.separationAgeMonths)>11&&(this.separationAgeMonths=11),this.separationDateFilled&&(this.separationDateInput=this.separationDate);break;case"DIAGNOSIS":Number(this.diagnosisAgeMonths)<0?this.diagnosisAgeMonths=0:Number(this.diagnosisAgeMonths)>11&&(this.diagnosisAgeMonths=11),this.diagnosisDateFilled&&(this.diagnosisDateInput=this.diagnosisDate);break;case"FIRST_VALUE_MONTHS":Number(this.firstValueMonths)<0?this.firstValueMonths=0:Number(this.firstValueMonths)>11&&(this.firstValueMonths=11);break;case"SECONDT_VALUE_MONTHS":Number(this.secondValueMonths)<0?this.secondValueMonths=0:Number(this.secondValueMonths)>11&&(this.secondValueMonths=11);break;default:break}},insertElemntToTimeLines:function(t,e){if(j()(t.from).isBefore(j()())||j()(t.from).isSame(j()()))for(var a=0;a<e.length;a++){var s=e[a].lastElementDate;if(j()(t.from).isBefore(s))return e[a].elements.push(t),a}},generateBlancElement:function(t){return{from:t,title:"",showDayAndMonth:!1}}}},H=U,q=(a("47d1"),Object(p["a"])(H,r,o,!1,null,"f7c45958",null)),G=q.exports,J={name:"app",components:{TraumasTimelines:G}},Q=J,W=(a("034f"),Object(p["a"])(Q,i,n,!1,null,null,null)),K=W.exports,X=a("5c96"),Z=a.n(X),tt=(a("0fae"),a("a584"));a("721e"),a("15f5"),a("7051");s["default"].use(tt["a"],{config:{id:"UA-144287490-1"}}),s["default"].use(Z.a,{i18n:function(t,e){return z.t(t,e)}}),s["default"].config.productionTip=!1,new s["default"]({i18n:z,render:function(t){return t(K)}}).$mount("#app")},"64a9":function(t,e,a){},"65b2":function(t,e,a){"use strict";var s=a("0ffa"),i=a.n(s);i.a},"721e":function(t,e,a){},ef92:function(t,e,a){}});
  //# sourceMappingURL=app.8279c14f.js.map