(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{581:function(t,e,a){},702:function(t,e,a){"use strict";var i=a(581);a.n(i).a},726:function(t,e,a){"use strict";a.r(e);var i=a(0),s=a(3),r=a(536),n=a.n(r),o=a(72);function h(t,e){const a=n.a.Event("keydown");a.which=t.keyCode;const i=t.target,s=n()(i),r=n()(e).find(":input");0==r.length&&o.a.warn("No inputs found for input.");const h=r.index(i),d=s.attr("placeholder"),l=d?d.length:0;let u=s.val();if(!u)return;u="number"==typeof u?u.toString():u;const y=u&&"number"!=typeof u?u.length:0;if("keydown"==t.type){const e=1==t.key.length;y>=l&&e?s.val(u.slice(0,-1)):0!=i.selectionStart||"Backspace"!=t.key&&"ArrowLeft"!=t.key||0==h?i.selectionStart==y&&"ArrowRight"==t.key&&h!=r.length&&r.eq(h+1).focus().trigger(a):r.eq(h+-1).focus().trigger(a)}else"input"==t.type&&y>=l&&r.eq(h+1).focus()}var d=s.a.extend({props:{customValidity:{type:String,default:""},value:{type:[String,Date,Number],default:""}},data:()=>({day:"",monthUser:"",year:""}),computed:{listeners(){return{...this.$listeners,input:t=>{h(t,this.$refs.wrap)},keydown:t=>{h(t,this.$refs.wrap)}}},required(){return void 0!==this.$attrs.required||""!=this.theText},theText(){return this.monthUser+this.day+this.year},month(){return parseInt(this.monthUser)>=1&&parseInt(this.monthUser)},validity(){let t=!0;const e=parseInt(this.day),a=parseInt(this.monthUser),i=parseInt(this.year);return isNaN(e)||isNaN(a)||isNaN(i)?t=!1:e>31||e<1?t=!1:a>12||a<1?t=!1:(i>3e3||i<1e3)&&(t=!1),t},birthday(){let t="";return this.validity&&(t=Object(i.D)([this.year,this.month,this.day]).toDate()),this.setValidity(),t}},mounted(){this.$watch("value",(function(t){if(t&&t!=this.birthday){const e=Object(i.D)(t);this.day=e.date(),this.monthUser=e.month()+1,this.year=e.year()}}),{immediate:!0}),this.$watch("birthday",(function(){this.$emit("dob",{month:this.monthUser,day:this.day,year:this.year}),this.$emit("day",this.day),this.$emit("month",this.monthUser),this.$emit("year",this.year),this.$emit("input",this.birthday)}))},methods:{fluidInput:h,setValidity(){let t="";!this.validity&&this.required&&(t="Please format the date correctly"),this.$emit("update:customValidity",t)}}}),l=(a(702),a(531)),u=Object(l.a)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"birthday"},[a("div",{ref:"wrap",staticClass:"date-inputs"},[a("input",t._g({directives:[{name:"model",rawName:"v-model",value:t.monthUser,expression:"monthUser"}],attrs:{"data-test":"dob-month",type:"text",placeholder:"MM",maxlength:"2",title:"Enter a number between 1 and 12",autocomplete:"birthday-day"},domProps:{value:t.monthUser},on:{input:function(e){e.target.composing||(t.monthUser=e.target.value)}}},t.listeners)),t._v(" "),a("div",{staticClass:"sep"},[t._v("-")]),t._v(" "),a("input",t._g({directives:[{name:"model",rawName:"v-model",value:t.day,expression:"day"}],attrs:{"data-test":"dob-day",type:"text",placeholder:"DD",maxlength:"2",title:"Enter a number between 1 and 31",autocomplete:"birthday-month"},domProps:{value:t.day},on:{input:function(e){e.target.composing||(t.day=e.target.value)}}},t.listeners)),t._v(" "),a("div",{staticClass:"sep"},[t._v("-")]),t._v(" "),a("input",t._g({directives:[{name:"model",rawName:"v-model",value:t.year,expression:"year"}],attrs:{"data-test":"dob-year",type:"text",placeholder:"YYYY",title:"Enter a 4-digit year",maxlength:"4",autocomplete:"birthday-year"},domProps:{value:t.year},on:{input:function(e){e.target.composing||(t.year=e.target.value)}}},t.listeners))])])}),[],!1,null,null,null);e.default=u.exports}}]);