var to=M.U(M,"AdfDhtmlLinkPeer");v("AdfDhtmlLinkPeer",to);to.m=function(){z.kb(AdfRichLink);M.ha(this,I.jb,I.Xc,I.Xf);w.b.cd()[w.Vc]==w.Wc&&M.ha(this,I.Qd,I.Ve);M.hb(this,AdfRichLink.TEXT,AdfRichLink.DISABLED,AdfRichLink.SELECTED);M.$b(this,AdfRichLink.TEXT);this.Zf="p_AFDepressed";this.ii="p_AFSelected";this.vKa="p_OraHiddenLabel";this.ZKa="_adfClc";this.ve="_busy";this.uw="data-afr-tlen";this.Ooa="_afrlblBy";this.bOa="af_link.ARIA_SELECTED_STATE"};v("AdfDhtmlLinkPeer.InitSubclass",to.m);
to.prototype.C=function(a){if(a.dd()!=Ta.ue){var b=a.Q();if(H.o0(this.h(),b,to.ZKa))return}var b=this.d(),d=b.r(to.ve);a.Jb()&&(!b.getDisabled()&&!d)&&(this.d().getDestination()!=n?this.bX(a):this.aX())};z.a("AdfDhtmlLinkPeer.prototype.HandleComponentClick",{C:to.prototype.C});to.prototype.Ka=function(){this.d().getDisabled()||this.wk(this.d())};z.a("AdfDhtmlLinkPeer.prototype.HandleComponentMouseOver",{Ka:to.prototype.Ka});
to.prototype.vb=function(){var a=this.d();a.getDisabled()||(this.Hb(a,p),this.Gh(this.d()))};z.a("AdfDhtmlLinkPeer.prototype.HandleComponentMouseOut",{vb:to.prototype.vb});to.prototype.cc=function(){var a=this.d();a.getDisabled()||(this.Hb(a,p),this.wk(a))};z.a("AdfDhtmlLinkPeer.prototype.HandleComponentMouseUp",{cc:to.prototype.cc});to.prototype.qa=function(a){var b=this.d();a=a.Jb();!b.getDisabled()&&a&&(this.Hb(b,l),this.vk(b))};z.a("AdfDhtmlLinkPeer.prototype.HandleComponentMouseDown",{qa:to.prototype.qa});
to.prototype.Od=function(a,b,d){d==l?(H.n(b,M.gb),this.Yw(a),this.TB(a),b.setAttribute(O.Jg,"false")):(H.F(b,M.gb),this.Gh(a),this.IB(a),b.setAttribute(O.Jg,"true"))};z.a("AdfDhtmlLinkPeer.prototype.ComponentDisabledChanged",{Od:to.prototype.Od});
to.prototype.Zn=function(a,b,d){if(d){this.Hb(a,l);H.n(b,to.ii);var e=this.h();b=a.e();"A"!=e.tagName&&(e=H.qc(e,"a",1));e.setAttribute("aria-labelledby",b+"::text "+b+to.Ooa);d=sc.prototype.V(to.bOa);var e=e.parentNode,f=a.k().w().createElement("LABEL");f.id=b+to.Ooa;H.n(f,to.vKa);w.b.yb(f," : "+d);e!=n&&e.appendChild(f);this.vk(a)}else this.Hb(a,p),H.F(b,to.ii),b=this.h(),"A"!=b.tagName&&(b=H.qc(b,"a",1)),b.removeAttribute("aria-labelledby"),b=b.parentNode,console.log(b),b.removeChild(H.qc(b,"label",
0)),this.Gh(a)};z.a("AdfDhtmlLinkPeer.prototype.ComponentSelectedChanged",{Zn:to.prototype.Zn});to.prototype.Qf=H.yA;to.prototype.Te=function(){return this.d().getText()};z.a("AdfDhtmlLinkPeer.prototype.GetAccessibleName",{Te:to.prototype.Te});
to.prototype.Xb=function(a,b){"SPAN"==b.tagName&&(b=H.Tj(b,1,1));if(b){B.assert("A"==b.tagName,"Anchor element is expected root of link component");var d=b.getAttribute(to.uw);if(d==n)return n;if(0==d)return"";var e=H.Ua(b,"span");if(e)return w.b.Mb(e).slice(0,d)}B.assert(p,"Unable to find the element containing the text")};z.a("AdfDhtmlLinkPeer.prototype.GetComponentText",{Xb:to.prototype.Xb});to.prototype.Aa=function(){return ng.Hc()};z.a("AdfDhtmlLinkPeer.prototype.GetInlineEditor",{Aa:to.prototype.Aa});
to.prototype.gd=function(a){var b=this.d(),d=this.h(),e=H.Se(d);e&&(e=H.ZC(e),!b.getDisabled()&&(!e&&!F.c.Dg())&&(H.td(a,d,M.gb),b.setProperty(to.ve,a,p,J.Pc)))};z.a("AdfDhtmlLinkPeer.prototype.SetBusy",{gd:to.prototype.gd});to.prototype.od=function(){var a=this.d();return a&&a.r(to.ve)};z.a("AdfDhtmlLinkPeer.prototype.isBusy",{od:to.prototype.od});u=to.prototype;u.aX=function(){var a=this.d(),b=new bb(a),d=a.r("_F_PARAMS");d&&R.tV(b,d);b.v(a.getPartialSubmit())};
u.bX=function(a){var b=this.h();"A"!=b.tagName&&(b=H.qc(b,"a",1));var d=b.getAttribute("href");if(d==n||""==d)a.cancel();else{var e=w.b.w().location.href,f=e.indexOf("#");if(-1==d.indexOf(-1==f?e:e.substring(0,f))||1<d.substring(d.indexOf("#")).length)d=b.getAttribute("target"),F.c.zA(b.attributes.href.value,d),a.cancel()}};u.zk=function(a){a=a.e();a=M.g(a,"icon");return w.b.getElementById(a)};u.Gh=function(a){if("inline"!=a.getIconDelivery()){var b=a.getIcon();b&&(this.zk(a).src=b)}};
u.vk=function(a){this.$c(a,a.getDepressedIcon())};u.wk=function(a){this.$c(a,a.getHoverIcon())};u.Yw=function(a){this.$c(a,a.getDisabledIcon())};u.$c=function(a,b){if("inline"!=a.getIconDelivery()){var d=a.getIcon();d&&(this.zk(a).src=b||d)}};u.Hb=function(a,b){var d=M.Ib(a),e=to.Zf;b?H.n(d,e):H.F(d,e)};u.TB=function(){var a=this.h();"A"!=a.tagName&&(a=H.qc(a,"a",1));a.setAttribute("aria-disabled","true")};u.IB=function(){var a=this.h();"A"!=a.tagName&&(a=H.qc(a,"a",1));a.removeAttribute("aria-disabled")};