function Th(){Th.h.constructor.call(this,"_afr_navBody");this.Tgb=(new Sh).vy()}m("AdfDhtmlChooseDateMonthNavigationBodyPanel",Th);r.v(Th,Jh);Jh.Im(Th,Rh);Jh.Im(Th,Qh);Th.prototype.isEnabled=function(a,b){u.s(a,AdfRichChooseDate);u.u(b);return-1!=U.Z8(a,b).indexOf(this.Tgb)};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.isEnabled",{isEnabled:Th.prototype.isEnabled});
Th.prototype.kb=function(a,b){u.s(a,AdfRichChooseDate);u.u(b);var d=!1;this.isEnabled(a,b)&&U.$r(a,b,T.Kf)&&(d=null!=U.b9(a,b));return d};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.isVisible",{kb:Th.prototype.kb});Th.prototype.re=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,ha);return b instanceof Fh||b instanceof Gh||b instanceof wh||b instanceof xh?!0:!1};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.canProcessComponentEvent",{re:Th.prototype.re});
Th.prototype.We=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,na);var d=b.X();if(d){var e=q.b,f=e.Na(d);if(f==Th.o2||f==Th.iT){var g=this.gk(a);if(C.Nc(g,d))return g=d,f==Th.iT&&(g=d.parentNode),null!=(g?e.getAttribute(g,Th.Ow):null)}}return!1};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.canProcessDomUIInputEvent",{We:Th.prototype.We});
Th.prototype.Ni=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,ha);var d=b.X(),e=q.b;if(d){var f=d;e.Na(d)==Th.iT&&(f=d.parentNode);if(f&&e.getAttribute(f,Th.Ow))switch(d=q.b.na(b.U()),e=this.gk(a),d){case w.ab:case w.Ra:case w.vb:case w.ub:return Th.zV(b,f,e);case w.gd:case w.jb:return Th.oPa(f,a,e)}}return!1};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.handleComponentKeyDown",{Ni:Th.prototype.Ni});
Th.prototype.ns=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,na);var d=b.X(),e=this.gk(a);return Th.oPa(d,a,e)};r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.handleComponentClick",{ns:Th.prototype.ns});Th.prototype.qc=function(a,b){u.s(a,AdfRichChooseDate);u.u(b);var d=A.c.H(),e=1==b.children.length?b.children[0]:Lh.uc("td",{"class":d.getStyleClass("af|chooseDate::calendar-grid-wrapper"),align:"center"},b),f=U.cb(a);U.b9(a,f)&&Th.Aia(a,d,b,e,!1);q.b.Ia(e);return[]};
r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.render",{qc:Th.prototype.qc});
Th.prototype.sd=function(a,b){u.s(a,AdfRichChooseDate);u.J(b);var d=U.cb(a);if(b.substring(0,5)==T.g8a+"["&&"]"==b.substring(b.length-1)){if(!U.Hi(a,d,T.jn))return null;d=b.substring(5,b.length-1);if(4==d.length){a:{d=parseInt(d);u.s(a,AdfRichChooseDate);U.cb(a);var e=this.gk(a);if(e&&(e=e.getElementsByTagName("div")))for(var f=0;f<e.length;f++){var g=e[f];if(parseInt(g.innerText.trim())==d){d=g;break a}}d=null}return d}}else if(b.substring(0,6)==T.E2a+"["&&"]"==b.substring(b.length-1)){if(!U.Hi(a,
d,T.yE))return null;d=b.substring(6,b.length-1);if(6==d.length){e=d.substring(0,6);a:{d=parseInt(e.substring(0,4));e=parseInt(e.substring(4,6))-1;u.s(a,AdfRichChooseDate);if(f=this.gk(a))if(g=U.cb(a),U.mf(a,g),f=f.getElementsByTagName("table"))for(g=0;g<f.length;g++){var h=f[g];if(h){var l=q.b.getAttribute(h,T.on);if(parseInt(l.substring(0,4))==d){d=C.Nu(h,"data-afr-cellindex",""+e);break a}}}d=null}return d}}return null};
r.a("AdfDhtmlChooseDateMonthNavigationBodyPanel.prototype.getSubIdDomElement",{sd:Th.prototype.sd});Th.zV=function(a,b,d){var e=a.U(),e=q.b.na(e);a=a.getSource();var f=A.c.Ka().La(),g=null;switch(e){case w.ab:case w.Ra:g=Th.Xka(e,b);break;case w.vb:g=f?Th.hB(b,a):Th.iB(b,a);break;case w.ub:g=f?Th.iB(b,a):Th.hB(b,a)}return Th.aka(b,g,d)};Th.Xka=function(a,b){u.u(b);var d=a==w.ab?C.lc(b.parentNode):C.zb(b.parentNode);if(d){var e=C.jc(b);return C.Li(d,b.nodeType,e)}return null};
Th.iB=function(a,b){var d=C.zb(a);if(!d&&null!=a.parentNode){var e=C.zb(a.parentNode);e&&(d=C.pa(e))}e=q.b;if(!d||!e.getAttribute(d,Th.Ow)){var f=U.cb(b),f=Lh.Uu(f,a);u.assert(null!=e.getAttribute(f,T.on));(e=C.zb(f))&&(d=C.Nu(e,Th.Ow,"0",Th.o2))}return d};
Th.hB=function(a,b){var d=C.lc(a);if(!d&&null!=a.parentNode){var e=C.lc(a.parentNode);e&&(d=C.zm(e))}var f=q.b;if(!d||!f.getAttribute(d,Th.Ow)){var e=U.cb(b),g=Lh.Uu(e,a);u.assert(null!=f.getAttribute(g,T.on));if(f=C.lc(g))d=U.Hi(b,e,T.jn),d=C.Sra(f,Th.Ow,d?"9":"11",Th.o2)}return d};Th.aka=function(a,b,d){if(b&&C.Nc(d,b)){if(!q.b.getAttribute(b,Th.Ow))return!0;a&&a.setAttribute("tabIndex","-1");b.setAttribute("tabIndex","0");J.va(b);return!0}return!1};
Th.oPa=function(a,b,d){u.u(a);u.s(b,AdfRichChooseDate);u.u(d);var e=q.b,f=a;e.Na(a)==Th.iT&&(f=a.parentNode);if(C.sa(f,T.Lj))return!1;a=f?e.getAttribute(f,Th.Ow):null;if(!a)return!1;a=parseInt(a);if(!isNaN(a)){var f=Lh.Uu(d,f),g=e.getAttribute(f,T.on).split("-");u.assert(2==g.length);f=parseInt(g[0]);g=parseInt(g[1]);if(!isNaN(f)&&!isNaN(g)){var h=U.cb(b),l=U.Hi(b,h,T.jn),n=U.mf(b,h),t=q.b.getAttribute(h,T.Ai);u.assert(t==T.Kf);l?(n.setFullYear(10*parseInt(f/10)+a),n.setMonth(g),e.setAttribute(h,
T.lA,T.yE),Gh.F(b,n),Th.Emb(d)):(n.setFullYear(f),n.setMonth(a),h.removeAttribute(T.lA),xh.F(b,n));return!0}}};Th.Emb=function(a){u.u(a);q.b.setAttribute(a,Th.zfa,"true")};Th.Rub=function(a){u.u(a);var b=q.b.Cg(a,Th.zfa,!1);a.removeAttribute(Th.zfa);return b};Th.cvb=function(a,b){u.s(a,AdfRichChooseDate);u.s(b,Th);var d=U.cb(a),d=b.kb(a,d)?"":"display: none;";q.b.setAttribute(b.gk(a),"Style",d)};
Th.Aia=function(a,b,d,e,f){f||Lh.dua(e);d=U.asa(a,d);b=d.months;d=d.start;for(f=0;f<b;f++){var g=T.VXa+(0==f?"":f),g=I.j(a.g(),g);e.appendChild(Th.cab(a,d,b,g));d=U.fsa(a,d)}};Th.cab=function(a,b,d,e){u.s(a,AdfRichChooseDate);u.jf(b);u.J(e);e=Lh.ck("table",{id:e,"data-afr-yyyymm":b.getFullYear()+"-"+b.getMonth(),role:"grid",cellpadding:"0",cellspacing:"0",border:"0",width:"100%"});Th.fob(a,e,b,d);d=Lh.uc("tbody",{},e);Th.eab(a,d,b);return e};
Th.fob=function(a,b,d,e){var f=A.c.H().getStyleClass("af|chooseDate::calendar-grid"),g="",g=U.cb(a),h=U.mf(a,g);if(U.Hi(a,g,T.jn)){var l=10*parseInt(d.getFullYear()/10);d=l+9;1<e&&l<=h.getFullYear()&&d>=h.getFullYear()&&(f+=" "+T.s2);e=l;U.gq(a,g)&&(e+=T.nn,d+=T.nn);g=e+" - "+d}else 1<e&&d.getFullYear()==h.getFullYear()&&d.getMonth()==h.getMonth()&&(f+=" "+T.s2),e=U.Ru(a,g).rqb().slice(0,12),h=d.getFullYear(),U.gq(a,g)&&(h+=T.nn),g=e[d.getMonth()]+" "+h;a=q.b;a.setAttribute(b,"class",f);a.setAttribute(b,
"summary",g)};Th.eab=function(a,b,d){u.s(a,AdfRichChooseDate);u.u(b);u.jf(d);for(var e=U.cb(a),f=U.Hi(a,e,T.jn),e=Th.Heb(a,e,d,f),g=0,h=0;4>h;h++)b.appendChild(Th.dab(a,d,f,e,g)),g+=3};Th.dab=function(a,b,d,e,f){for(var g=Lh.ck("tr",{role:"row","class":A.c.H().getStyleClass("af|chooseDate::navigator-row")}),h=0;3>h;h++){var l=Th.bab(a,b,d,e,f++);g.appendChild(l)}return g};
Th.bab=function(a,b,d,e,f){var g=q.b,h=Th.Xhb(a,b,f,d),l=Th.Yhb(a,b,f,d);a=Th.uib(a,b,f,d);h=Lh.ck(Th.o2,{role:"gridcell","aria-disabled":h?!0:void 0,tabindex:a?0:-1,"class":Th.Geb(e,f,h,l)});(e=e[f])&&g.setAttribute(h,Th.Ow,f);Lh.uc(Th.iT,{role:"button"},h).textContent=e;return h};
Th.uib=function(a,b,d,e){var f=(e?Th.vMa:Th.iMa)(a,b,d);if(f)return!0;var g=U.cb(a);a=U.mf(a,g);e?(b=10*parseInt(b.getFullYear()/10),b<=a.getFullYear()&&b+9>=a.getFullYear()&&(f=0==d)):b.getFullYear()!=a.getFullYear()&&(f=0==d);return f};Th.Xhb=function(a,b,d,e){u.s(a,AdfRichChooseDate);u.jf(b);u.Da(d);u.dc(e);return e?Th.zib(a,b,d):Th.hib(a,b,d)};
Th.zib=function(a,b,d){var e=new Date(b);e.setDate(1);e.setMonth(0);e.setFullYear(10*parseInt(b.getFullYear()/10)+d);e=U.Ds(e,!1);if(U.FP(a,e))return!0;e.setFullYear(e.getFullYear()+1);e.setDate(0);e=U.Ds(e,!0);return U.GP(a,e)?!0:!1};Th.hib=function(a,b,d){b=new Date(b);b.setDate(1);b.setMonth(d);b=U.Ds(b,!1);if(U.mta(a,b)||U.FP(a,b))return!0;b.setMonth(d+1);b.setDate(0);b=U.Ds(b,!0);return U.GP(a,b)?!0:!1};
Th.Yhb=function(a,b,d,e){u.s(a,AdfRichChooseDate);u.jf(b);u.Da(d);u.dc(e);return e?Th.vMa(a,b,d):Th.iMa(a,b,d)};Th.vMa=function(a,b,d){var e=new Date(b);e.setDate(1);e.setMonth(0);e.setFullYear(10*parseInt(b.getFullYear()/10)+d);b=U.cb(a);a=U.mf(a,b);return e.getFullYear()==a.getFullYear()};Th.iMa=function(a,b,d){b=new Date(b);b.setDate(1);b.setMonth(d);d=U.cb(a);a=U.mf(a,d);return b.getFullYear()==a.getFullYear()&&b.getMonth()==a.getMonth()};
Th.Heb=function(a,b,d,e){u.s(a,AdfRichChooseDate);u.u(b);u.jf(d);u.dc(e);var f=Array(12);if(e)for(e=new Date(d),e.setDate(1),e.setMonth(0),e.setFullYear(10*parseInt(d.getFullYear()/10)),d=0;10>d;d++){var g=e.getFullYear();U.gq(a,b)&&(g+=T.nn);f[d]=g;e.setFullYear(e.getFullYear()+1)}else for(a=U.Ru(a,b).rqb().slice(0,12),d=0;12>d;d++)f[d]=a[d];return f};
Th.Geb=function(a,b,d,e){u.Mb(a);u.Da(b);u.dc(d);var f=A.c.H(),g=f.getStyleClass("af|chooseDate::navigator-cell");a[b]||(g+=" "+f.getStyleClass("af|chooseDate::empty-day-stub"));d&&(g+=" "+T.Lj);e&&(g+=" "+T.OE);return g};Th.o2="TD";Th.iT="DIV";Th.Ow="data-afr-cellIndex";Th.zfa="data-afr-resFocus";