var rf=I.ea(bw,"AdfDhtmlRichTextEditorPeer",!1);m("AdfDhtmlRichTextEditorPeer",rf);rf.C=function(){bw.C.call(this);I.ra(this,ab.ed,D.wb,D.Bd,D.Rg,D.Ad);this.Fl()};m("AdfDhtmlRichTextEditorPeer.InitSubclass",rf.C);rf.Fl=function(){bw.Fl.call(this);this.b7a="_tbPopCont";this.nFa="_tbPopInpCont";this.c7a="_tbPopLnkInput";this.d7a="_tbPopLnkSelectedInput";this.kea="_cic"};m("AdfDhtmlRichTextEditorPeer.InitConstants",rf.Fl);rf.mya=function(a){if(a=A.c.m(a))a=a.o(),a.Jj(),vw(a)};
m("AdfDhtmlRichTextEditorPeer.HandleTimerUpdate",rf.mya);rf.prototype.Init=function(a){rf.h.Init.call(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.Init",{Init:rf.prototype.Init});
rf.prototype.G=function(a,b){var d=a.getReadOnly(),e=a.g(),f=q.b;if(!d){var g=I.j(e,rf.jea);f.tg(b,rf.p0a,g);g=I.j(e,rf.y2);f.tg(b,rf.MEa,g);A.c.lv(a)}rf.h.G.call(this,a,b);this.$d=f.Dd();d?(d=dw(a),d.innerHTML=d.textContent):(this.Ejb=e+"_afrModeRichText",this.Djb=e+"_afrModeCode","popup"===a.getToolbarDisplay()&&(this.mQa=!1),this.ija(a))};r.a("AdfDhtmlRichTextEditorPeer.prototype.InitDomElement",{G:rf.prototype.G});
rf.prototype.Bj=function(){var a=this.f();if((a=this.Vc(a))&&"1"===a.getAttribute("data-afr-rte-loaded")){v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE loaded");try{if("complete"===a.contentWindow.document.readyState)return v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE ready"),G.tt;v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE inner document not yet ready");return G.ut}catch(b){return v.l.fine("AdfDhtmlRichTextEditor.GetReadyState: exception.","Nothing more to do"),G.tt}}v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: richTextEditor's onload has not fired");
return G.ut};r.a("AdfDhtmlRichTextEditorPeer.prototype.GetReadyState",{Bj:rf.prototype.Bj});rf.prototype.Sa=function(a,b,d,e){if(this.Qla()&&(b=q.b,d=this.f().g(),a=b.getElementById(I.j(d,rf.kea)),b=b.getElementById(I.j(d,"content")).childNodes,a)){for(var f=d=0,g=b.length;f<g;f++)b[f]!==a&&(d+=b[f].offsetHeight);a.style.height=e-d+"px"}};r.a("AdfDhtmlRichTextEditorPeer.prototype.ResizeNotify",{Sa:rf.prototype.Sa});
rf.prototype.zc=function(a){a||(a=this.Wa(this.f(),this.i()));a=xa.trim(a);return 0==a.length||a.toUpperCase()==kd.$().xh().toUpperCase()};r.a("AdfDhtmlRichTextEditorPeer.prototype.isEmpty",{zc:rf.prototype.zc});
rf.prototype.gh=function(){var a=this.f();if(this.bq())rw(a).focus();else{a=this.Vc(a);if("IFRAME"==a.nodeName&&a!=document.activeElement)try{var b=a.parentElement,d=b.hasAttribute("tabindex");d||b.setAttribute("tabindex","0");J.va(b);d||b.removeAttribute("tabindex")}catch(h){}var e=q.b,b=e.S()==q.ia&&11==e.Ib(),d=e.S()==q.VQ,e=e.S()==q.Tc,f=kd.$(),g=a;if(e||d)g=f.hl(a);b||d?this.xV&&!ww(this)&&J.va(g):J.va(g);this.lE()}};r.a("AdfDhtmlRichTextEditorPeer.prototype.Focus",{gh:rf.prototype.gh});
rf.prototype.je=function(a){var b=kd.$();a=this.Vc(a);return b.je(a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.getSelectionRange",{je:rf.prototype.je});rf.prototype.lw=function(a){var b=xw(this,a);this.dh(b,rf.nQa,this,!0);var d=kd.$(),b=this.Vc(a),e=rw(a);this.bq()?(a=this.ko(a),e.value=""+a,b.blur(),delete this.iu,b.style.display="none",e.style.display="block",e.focus()):(e.blur(),e.style.display="none",b.style.display="block",b.focus(),d.a_(b,e.value),this.focus(a),kd.$().Ms(b),this.SLa=!0)};
r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleCodeEditingModeChange",{lw:rf.prototype.lw});rf.prototype.M=function(a){rf.h.M.call(this,a);(a=a.X())&&"LABEL"==a.nodeName&&this.focus(this.f())};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentClick",{M:rf.prototype.M});rf.prototype.Fa=function(a){yw(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseDown",{Fa:rf.prototype.Fa});rf.prototype.Ac=function(a){yw(this,a)};
r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseUp",{Ac:rf.prototype.Ac});rf.prototype.ma=function(a){yw(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyDown",{ma:rf.prototype.ma});rf.prototype.za=function(a){yw(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyUp",{za:rf.prototype.za});rf.prototype.dg=function(a){this.TX(a);this.NL(a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentAction",{dg:rf.prototype.dg});
rf.prototype.mw=function(){if(this.SLa)delete this.SLa;else if(1!=this.bq()){zw(this);vw(this);var a=q.b;if(void 0!=this.QB){var b=this.QB.length,d=this.hna;void 0==d&&(d={});for(var e={},f=0;f<b;f++){var g=this.QB[f],h=g.uQ,l=A.c.m(g.Id);u.assert(l);var n=null;void 0==e[h]?(n=Aw(this,h),null!=n&&(e[h]=n)):n=e[h];if(d[h]!==n&&null!=n){var t=!1;if(h==rf.QR||h==rf.J0)n=kd.$().JO(n);else if(h==rf.iE)n=Bw(n),0<n&&8>n?n+="":(n="2",t=!0);else if(h==rf.cda&&l instanceof AdfRichSelectOneChoice){var y=l.zy(),
z=y.length,B=!1;null!=n&&a.S()==q.Tc&&(n=(""+n).replace(/['"]+/g,""),n=(""+n).replace(/, /gi,","));for(var F=0;F<z;F++)if(y[F].getLabel()==n){n=y[F].getValue();B=!0;break}if(!B){for(var F=Number.MAX_VALUE,K,P,Q=0;Q<z;Q++)-1<(K=y[Q].getValue().search(n))&&(K<F&&(F=K,P=y[Q].getValue()),B=!0);if(!B)for(Q=1;Q<z;Q++)-1<(K=n.search(y[Q].getLabel()))&&(K<F&&(F=K,P=y[Q].getValue()),B=!0);n=B?P:y[0].getValue()}}t||(t=h,u.J(t),t=rf.Zd[t],u.J(t),kd.$().ul(this.Vc(this.f()),t));t=l.K(g.propertyName);ma.lm(t,
n)||("value"==g.propertyName&&(t=h,u.J(t),void 0==this.HM[t]&&(this.HM[t]=0),this.HM[t]++),l.setProperty(g.propertyName,n,!1,!1),h==rf.iE&&A.c.Oe(l.g()))}}this.hna=e}}};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleContextChanged",{mw:rf.prototype.mw});rf.prototype.lE=function(){var a=!0,b,d=q.b.R().activeElement;d&&(b=d.tagName);"IFRAME"==b&&(a=!1);a&&A.c.el().qqa()};r.a("AdfDhtmlRichTextEditorPeer.prototype.StopDialogsFromBeingInactivatedDueToIframes",{lE:rf.prototype.lE});
rf.prototype.Wa=function(a,b){if(this.$d&&this.Ll(a)){var d=this.Vc(a),e=this.ko(a),d=bf.ls(d);d!=e&&void 0!==d&&this.Jj()}if(a.getReadOnly())return e=O.da(a,b),e.innerHTML;e=rw(a);return e.value};r.a("AdfDhtmlRichTextEditorPeer.prototype.GetSubmittedValue",{Wa:rf.prototype.Wa});
rf.prototype.Jj=function(){var a=this.f(),b=this.Vc(a);this.mW&&(clearTimeout(this.mW),delete this.mW);if("none"!=b.style.display){var d=rw(a),e=kd.$(),f=this.ko(a),g=f.indexOf(rf.nKa(e,b).outerHTML);d.value=-1==g?f:f.slice(0,g);e.Bv(a,b,f)}};r.a("AdfDhtmlRichTextEditorPeer.prototype.UpdateValue",{Jj:rf.prototype.Jj});
rf.prototype.II=function(a,b,d,e){u.J(a);u.J(b);u.J(d);u.ae(e);void 0==e&&(e=ab.ed);var f=A.c.m(a);a={Id:a,propertyName:b,uQ:d,Ku:e};this.QB||(this.QB=[]);this.QB.push(a);e==ab.ed&&f.Dm(this.f())||f.addEventListener(e,this.TX,this)};r.a("AdfDhtmlRichTextEditorPeer.prototype.AddStyleBinding",{II:rf.prototype.II});rf.prototype.eK=function(a){var b=this.QB;if(void 0!=b)for(var d=b.length,e=this.TX,f=0;f<d;f++){var g=b[f],h=A.c.m(g.Id);void 0!=h&&(g.Ku==ab.ed&&h.Dm(a)||h.removeEventListener(g.Ku,e,this))}};
r.a("AdfDhtmlRichTextEditorPeer.prototype.RemoveStyleBindings",{eK:rf.prototype.eK});
rf.nQa=function(a){var b=0,d=this.bq();if(a instanceof AdfRichCommandToolbarButton){var e=a.g();e!=this.Ejb&&e!=this.Djb&&(a.setProperty("selected",!1,!1,G.y0),a.setProperty("disabled",d,!1,G.y0),b=1)}else a instanceof AdfRichSelectOneChoice||a instanceof AdfRichInputNumberSpinbox||a instanceof AdfRichInputColor?(a.setProperty("disabled",d,!1,G.y0),b=1):a instanceof AdfRichPanelGroupLayout&&(a=I.Fb(a),d?C.w(a,I.lb):C.O(a,I.lb),b=1);return b};k=rf.prototype;
k.ogb=function(a){this.mw();var b=navigator.userAgent.toLowerCase();a=a.target;-1!=b.indexOf("chrome")&&"html"==a.nodeName.toLowerCase()?a.getElementsByTagName("body")[0].focus():-1!=b.indexOf("edge")&&"body"==a.nodeName.toLowerCase()&&a.focus()};
k.Nka=function(a){var b=q.b.S()==q.ia,d=q.b.S()==q.Yc,e=187,f=e,g=189;if(b){var h=this.mW;h&&clearTimeout(h);h="AdfDhtmlRichTextEditorPeer.HandleTimerUpdate('"+this.f().g()+"')";this.mW=setTimeout(h,3E3)}d&&(e=61,f=107,g=109);d=a.keyCode;if(9==d)a.shiftKey&&(this.i6=!0),e=this.f(),f=e.getEditMode(),g=sw(e),d="popup"===e.getToolbarDisplay()&&C.kb(g),"wysiwyg"==f?d?(q.b.preventDefault(a),a.shiftKey?J.va(J.YO(g)):J.ce(this.Vc(e))):(kd.$().ql(this.Vc(e),a),b&&(a.shiftKey?this.fQa=!0:this.gQa=!0)):d&&
(q.b.preventDefault(a),a.shiftKey?J.va(J.GH(g)):J.ce(rw(e)));else if(a.ctrlKey){b=!0;if(a.altKey)switch(d){case e:case f:this.ne(rf.UR);break;case g:this.ne(rf.TR);break;case 121:(e=A.c.m(this.f().g()+"_afrToolbox"))&&e.focus();break;default:b=!1}else if(a.shiftKey)switch(d){case 72:this.ne(rf.sba);break;case 77:this.ne(rf.P0);break;case 83:this.ne(rf.qba);break;case 87:this.ne(rf.J0);break;default:b=!1}else switch(d){case 53:this.ne(rf.SR);break;case 66:this.ne(rf.PR);break;case 69:this.ne(rf.L0);
break;case 72:window.setTimeout(this.D(this.Yab),0);break;case 73:this.ne(rf.RR);break;case 74:this.ne(rf.M0);break;case 76:this.ne(rf.N0);break;case 77:this.ne(rf.K0);break;case 82:this.ne(rf.O0);break;case 85:this.ne(rf.VR);break;case 87:this.ne(rf.QR);break;case 219:e=Bw(Cw(this));1<e&&this.ne(rf.iE,+e-1);break;case 221:e=Bw(Cw(this));7>e&&this.ne(rf.iE,+e+1);break;default:b=!1}b&&q.b.Ea(a)}};k.Yab=function(){return this.ne(rf.KQ)};
function zw(a){var b=kd.$(),d=b.je(a.Vc(a.f()));a.$d?null!=d&&(a.iu=d):a.iu=d;a=a.f();if("popup"===a.getToolbarDisplay()){var e=sd(a);C.kb(e)&&td(a).setValue(b.nl(d))}}function yw(a,b){var d=b.U();if(null!=a.IL&&null!=a.IL[d]){var e=a.IL[d];b.cancel=function(){na.h.cancel.call(b);q.b.preventDefault(d);q.b.preventDefault(e);delete a.IL[d]}}}
function vw(a){if(void 0!=a.Th){var b=a.f(),d=a.Vc(b),e=kd.$(),f=a.Th,g=f.length,h=a.s6;void 0==h&&(h={});for(var l={},n=0;n<g;n++){var t=f[n],y=t.xf,t=A.c.m(t.Id);u.assert(t);if(void 0===l[y]){var z=rf.Zd[y];l[y]=null==z?null:e.queryCommandEnabled(b,d,z)}if(y===rf.KQ&&"popup"===b.getToolbarDisplay()){var z=a,B=z.f(),F=sd(B);C.kb(F)&&(F=ud(B),z=qd(kd.$(),B,z.Vc(B)),F.setValue(z))}if(h[y]!==l[y])switch(y){case rf.iD:case rf.G_:case rf.rba:break;default:t.setProperty("disabled",!l[y],!1,!1)}}a.s6=l}}
function Bw(a){var b=""+a,d=b.indexOf("px");-1!=d?(a=parseInt(b.substring(0,d)),a=10>=a?1:13>=a?2:16>=a?3:18>=a?4:24>=a?5:32>=a?6:7):a=parseInt(a)||2;return a}
k.ija=function(a){var b=q.b,d=this.Vc(a),e=A.c,f=this.R().createElement("IFRAME");f.frameBorder="0";var g=d.style.cssText;0<g.length&&(f.style.cssText=g);f.className=d.className;f.id=d.id;f.title=e.H().Z("af_richTextEditor.IFRAME_TITLE");"lazy"==a.getContentDelivery()?f.src=e.p9(a.g()):(a=d.getAttribute("src"))&&""!=a&&(f.src=a);this.ju=this.D(this.wM);b.ba(f,"load",this.ju);d.parentNode.replaceChild(f,d);b.yc(d);b.Ia(f)};function Dw(a,b){var d=a.Vc(b);u.u(d);kd.$().Ms(d);a.bia(d)}
function uw(a,b,d){u.u(b,"IFRAME");u.J(d);var e=kd.$();b=e.Mc(b);e.Wua(b);Ew(a,b);a=b.body;""==d&&(d=e.xh());a.innerHTML=d}function Ew(a,b){var d=b.body.style,e=a.XLa;if(null==e){var f=q.b.S()==q.ia,g=A.c,e=A.c.H().qa("af|richTextEditor-tr-field-inline-style");f&&void 0==e?g.ta(a,a.JQa,e,0,{isSynchronized:!0}):a.JQa(e);d.cssText=a.XLa}else d.cssText=e}
k.JQa=function(a){void 0==a&&(a=A.c.H().qa("af|richTextEditor-tr-field-inline-style"));this.XLa=a=a.replace(/ /g,";").replace(/\+/g," ").replace(/_/g,":")};function xw(a,b){var d=a.Mnb;null==d&&(d=b.g()+"_afrToolbox",a.Mnb=d);return A.c.m(d)}
k.ne=function(a,b){var d=q.b;if(1!=this.bq()||a==rf.G_||a==rf.iD){u.J(a);var e=rf.Zd[a];u.J(e);var f=this.f(),g;a==rf.iD&&1==this.bq()?g=rw(f):(g=this.Vc(f),u.u(g,"IFRAME"),this.$d&&d.S()==q.Tc&&g.focus(),null!=this.iu&&kd.$().setSelectionRange(this.Vc(this.f()),this.iu));d=kd.$();if(d.sta(g)){var h;a:{h=g;var l=[],n,t=[rf.PR,rf.RR,rf.VR,rf.SR,rf.UR,rf.TR],y=this.hna;if(void 0==y)h=!0;else{switch(e){case "bold":case "italic":case "underline":case "strikethrough":case "superscript":case "subscript":break;
default:h=!0;break a}var z=!0,B;for(B=0;B<t.length;++B)if(n=rf.Zd[t[B]],void 0!=n)if(n==e)y[t[B]]&&!Aw(this,t[B])&&(z=!1);else{var F=y[t[B]],K=Aw(this,t[B]);void 0!==F&&F!=K&&(l[l.length]=n)}n=kd.$();for(B=0;B<l.length;++B)n.execCommand(f,h,l[B],b);h=z}}h&&d.execCommand(f,g,e,b)}else d.execCommand(f,g,e,b)}};function Cw(a){var b=rf.iE;u.J(b);b=rf.Zd[b];u.J(b);var d=a.f();a=a.Vc(d);u.u(a,"IFRAME");return kd.$().queryCommandValue(a,b)}
k.TX=function(a){if(void 0!=this.QB&&!this.QA){this.QA=!0;for(var b=a.getSource().g(),d=this.QB,e=d.length,f=0;f<e;f++){var g=d[f];if(g.Id==b){a.Xc(!0);var h;h=g.uQ;u.J(h);void 0==this.HM[h]||0==this.HM[h]?h=!1:(this.HM[h]--,h=!0);h||(g.Ku==ab.ed?(g=g.uQ,u.J(g),this.ne(g,null)):g.Ku==lc.Bt?((h=a.no())&&h.QHa&&"TrColor"==h.QHa&&(h=(new TrColorConverter(["#RRGGBB"],!1)).getAsString(h),g.uQ==rf.QR&&(this.hna[g.uQ]=h)),this.ne(g.uQ,h)):v.l.severe("This eventType (",eventType,") is not supported by richTextEditor."),
this.mw());g=q.b.S()==q.ia&&11==q.b.Ib();!this.xV||g&&ww(this)||this.focus(this.f());a.cancel()}}this.Jj();delete this.QA}};function ww(a){var b=a.f();a=a.bq()?rw(b):a.Vc(b);return(b=q.b.R().activeElement)&&b.id==a.id}
k.bia=function(a){var b=this.f(),d=q.b,e=kd.$(),f=e.hl(a);this.gV=this.D(this.pLa);this.tn=this.D(this.AV);if(this.$d&&d.S()==q.Tc){d.ba(a,"blur",this.tn);q.Ch()!=q.yl&&d.ba(a,"mouseleave",this.tn);var g=this;this.Ria=this.D(this.Ofb);d.ba(f,"click",this.Ria)}d.ba(f,"blur",this.tn);d.ba(f,"focus",this.gV);b=rw(b);this.Woa=this.D(this.AV);this.Xoa=this.D(this.pLa);d.ba(b,"blur",this.Woa);d.ba(b,"focus",this.Xoa);a=e.Mc(a);this.mG=this.D(this.Nka);d.ba(a,"keydown",this.mG);d.ba(b,"keydown",this.mG);
this.Zt=this.D(this.mw);this.Zma=this.D(this.ogb);d.ba(a,"mouseup",this.Zma);d.ba(a,"keyup",this.Zt);this.qcb=this.D(this.$fb);d.ba(a,"dragend",this.qcb);this.Hjb=this.D(this.yM);d.ba(this.i(),"mousedown",this.Hjb);q.b.S()!=q.ia&&d.ba(a,"blur",this.Zt);this.$d&&q.Ch()!=q.gS&&(g=this,this.mPa=setInterval(function(){zw(g)},500),d.S()==q.Tc&&536>d.Ib()&&(this.Yfb=this.D(this.Xfb),this.R().addEventListener("copy",this.Yfb,!0),this.rgb=this.D(this.qgb),this.R().addEventListener("paste",this.rgb,!0)));
this.Vna=this.D(this.EOa);d.hi(a,this.Vna)};
k.dK=function(a){var b=q.b,d=this.Vc(a),e=kd.$(),f=e.hl(d);this.$d&&b.S()==q.Tc?(b.xa(d,"blur",this.tn),b.xa(f,"click",this.Ria),delete this.Ria):b.xa(f,"blur",this.tn);delete this.tn;b.xa(f,"focus",this.gV);delete this.gV;a=rw(a);b.xa(a,"blur",this.Woa);delete this.Woa;b.xa(a,"focus",this.Xoa);delete this.Xoa;d=e.Mc(d);b.xa(d,"mouseup",this.Zma);delete this.Zma;b.xa(d,"keyup",this.Zt);q.b.S()!=q.ia&&b.xa(d,"blur",this.Zt);delete this.Zt;b.xa(d,"keydown",this.mG);delete this.mG;b.nq(d,this.Vna);delete this.Vna;
this.$d&&this.mPa&&clearInterval(this.mPa)};r.a("AdfDhtmlRichTextEditorPeer.prototype.RemoveContextChangeListeners",{dK:rf.prototype.dK});k=rf.prototype;k.EOa=function(a){var b=this.f();a||(a=this.Vc(b).contentWindow.event);var d=q.b;if(d.KC(a)||d.Ky(a))b=q.b.Ye(a,rw(b)),this.IL||(this.IL=[]),this.IL[b]=a,A.c.COa(b)};
k.pLa=function(a){var b=q.b;if(!this.QA){var d=this.f(),e=this.xV;this.xV||(this.xV=!0);var f=q.b.pj(d,a),g=this.Vc(d);A.c.GT(g,d.g());this.bq()?g=rw(d):(g=kd.$().a9(g),g=g.document);(f.Wd()==Qa.CAPTURING_PHASE||b.S()==q.Yc&&g==a.originalTarget&&f.Wd()==Qa.CAPTURING_PHASE)&&f.GZ();this.Ta(f);e||this.bq()||"inline"!==d.getToolbarDisplay()||(a=xw(this,d),this.dh(a,rf.nQa,this,!0))}if(this.$d&&b.S()==q.Tc&&q.Ch()!=q.yl&&b.YKa&&(b=b.$x))for(a=0;a<b.length;a++)this.R().removeEventListener(b[a].Ku,b[a].listener,
b[a].capture)};k.wM=function(){var a=kd.$(),b=this.f();u.Uc(b,"Unexpected unbound peer for load event on iframe.");var d=this.Vc(b);u.u(d);var e=!b.getDisabled()&&!a.Pi(d);if(a.Ey()&&e)Dw(this,b);else{var f=rw(b);u.u(f);if("lazy"!=b.getContentDelivery())uw(this,d,f.value);else{var g=this.ko(b,!0);f.value=g;a=a.Mc(d);Ew(this,a)}e&&Dw(this,b);b.getReadOnly()||sf.$().hI(b);d.setAttribute("data-afr-rte-loaded","1")}};
k.AV=function(){var a=q.b;if(!this.QA){var b=this.f(),d=this.Vc(b),e=bf.ls(d);this.gQa?(delete this.gQa,J.ce(A.c.wd)):this.fQa&&(delete this.fQa,J.ni(A.c.wd));this.Jj();this.i6&&delete this.i6;var f=!1,g=rw(b).value;e!=g&&void 0!==e&&(f=!0);!f||this.i6&&b.getValid(b.g())||(this.cc(b,this.Wa(b,this.i())),bf.wl(d,g))}b=q.Ch();if(this.$d&&a.S()==q.Tc&&b!=q.yl&&b!=q.gS&&(d=kd.$(),e=this.Vc(this.f()),b=d.hl(e),d=rf.nKa(d,e),b.appendChild(d),d.focus(),d.blur(),b.removeChild(d),a.YKa&&(a=a.$x)))for(b=0;b<
a.length;b++)this.R().addEventListener(a[b].Ku,a[b].listener,a[b].capture)};k.Ofb=function(){this.gh()};k.yM=function(){this.i6=!0};k.$fb=function(){if(q.b.S()==q.ia){var a=this.mW;a&&clearTimeout(a);A.c.ta(this,rf.mya,this.f().g(),0)}else this.CV()};
k.Xfb=function(a){if(a.clipboardData&&null!=this.iu&&(this.bW()||!A.c.Am().Hy())){var b=this.R(),d=b.createElement("div");d.style.position="absolute";d.style.left="-1000px";d.style.top="-1000px";d.contentEditable="true";d.textContent=this.iu.toString();b.body.appendChild(d);a=b.createRange();a.selectNodeContents(d);var e=window.getSelection();e.removeAllRanges();e.addRange(a);b.execCommand("copy",!1,null);setTimeout(function(){b.body.removeChild(d)},500)}};
k.qgb=function(a){var b=q.b;if(a.clipboardData&&(this.bW()||!A.c.Am().Hy())){if(this.bW()&&b.S()==q.Tc&&536>b.Ib()){if(this.zLa)return;this.zLa=!0;var d=this;setTimeout(function(){delete d.zLa},500)}a=a.clipboardData.getData("Text");this.ne("cmd_insert",a)}};function Aw(a,b){u.J(b);var d=rf.Zd[b];u.J(d);return kd.$().queryCommandState(a.Vc(a.f()),d)}
rf.nKa=function(a,b){var d=a.Mc(b).createElement("input");d.type="text";d.style.position="absolute";d.style.left="0px";d.style.top="0px";d.style.height="0px";d.style.width="0px";d.style.opacity="0";return d};function rd(a){return!a||0==kd.$().nl(a).length}rf.prototype.Lnb=function(a){a.Wd()!=Qa.Ef||rd(this.iu)||(a=a.he().getValue(),"about:blank"!==a&&(/^http:\/\//.test(a)||(a="http://"+a),this.ne(rf.KQ,a),zw(this)))};
rf.prototype.Knb=function(a){if(a.Wd()==Qa.Ef){var b=this.iu,d=kd.$();rd(b)||(a=a.he().getValue(),b=d.nl(b),a!==b&&this.ne(rf.iD,a))}};function sw(a){return q.b.getElementById(I.j(a.g(),rf.b7a))}function sd(a){return q.b.getElementById(a.getId()+rf.nFa)}function ud(a){return A.c.m(a.getId()+rf.c7a)}function td(a){return A.c.m(a.getId()+rf.d7a)}
function tw(a){var b=q.b,d=a.f(),e=d.g(),f=b.getElementById(I.j(e,rf.kea)),b=sw(d),g={autodismiss:"autodismissAlways"};g.alignElement=f;g[AdfRichPopup.Ed]=AdfRichPopup.dD;g.focus=!1;C.setVisible(b,!0);if(!a.mQa){var f=td(d),h=ud(d),l=function(a){a=a.he();O.da(a,a.o().i()).select()};h.addEventListener(D.Nd,a.Lnb,a);h.addEventListener(D.Pc,l,a);f.addEventListener(D.Nd,a.Knb,a);f.addEventListener(D.Pc,l,a);a.mQa=!0}a.He(d,b,g,e)}
rf.prototype.ob=function(a,b){rf.h.ob.call(this,a,b);var d=sw(a);if(d==b&&C.kb(d)){var e=q.b,f=a.getId(),g=this.f().g(),d=e.getElementById(I.j(g,"content")),g=e.getElementById(I.j(g,rf.kea)),e=e.getElementById(f+rf.nFa);d.insertBefore(b,g);C.setVisible(e,!1);C.setVisible(b,!1)}};r.a("AdfDhtmlRichTextEditorPeer.prototype.PopupClosed",{ob:rf.prototype.ob});