var of=I.ea($v,"AdfDhtmlRichTextEditorPeer",!1);m("AdfDhtmlRichTextEditorPeer",of);of.C=function(){$v.C.call(this);I.ra(this,ab.cd,D.wb,D.Bd,D.Rg,D.Ad);this.Fl()};m("AdfDhtmlRichTextEditorPeer.InitSubclass",of.C);of.Fl=function(){$v.Fl.call(this);this.Z6a="_tbPopCont";this.jFa="_tbPopInpCont";this.$6a="_tbPopLnkInput";this.a7a="_tbPopLnkSelectedInput";this.iea="_cic"};m("AdfDhtmlRichTextEditorPeer.InitConstants",of.Fl);of.iya=function(a){if(a=A.c.m(a))a=a.o(),a.Jj(),tw(a)};
m("AdfDhtmlRichTextEditorPeer.HandleTimerUpdate",of.iya);of.prototype.Init=function(a){of.h.Init.call(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.Init",{Init:of.prototype.Init});
of.prototype.G=function(a,b){var d=a.getReadOnly(),e=a.g(),f=q.b;if(!d){var g=I.j(e,of.hea);f.tg(b,of.k0a,g);g=I.j(e,of.y2);f.tg(b,of.IEa,g);A.c.jv(a)}of.h.G.call(this,a,b);this.Zd=f.Dd();d?(d=bw(a),d.innerHTML=d.textContent):(this.Djb=e+"_afrModeRichText",this.Cjb=e+"_afrModeCode","popup"===a.getToolbarDisplay()&&(this.hQa=!1),this.fja(a))};r.a("AdfDhtmlRichTextEditorPeer.prototype.InitDomElement",{G:of.prototype.G});
of.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.st;v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE inner document not yet ready");return G.tt}catch(b){return v.l.fine("AdfDhtmlRichTextEditor.GetReadyState: exception.","Nothing more to do"),G.st}}v.l.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: richTextEditor's onload has not fired");
return G.tt};r.a("AdfDhtmlRichTextEditorPeer.prototype.GetReadyState",{Bj:of.prototype.Bj});of.prototype.Sa=function(a,b,d,e){if(this.Nla()&&(b=q.b,d=this.f().g(),a=b.getElementById(I.j(d,of.iea)),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:of.prototype.Sa});
of.prototype.zc=function(a){a||(a=this.Wa(this.f(),this.i()));a=xa.trim(a);return 0==a.length||a.toUpperCase()==gd.$().wh().toUpperCase()};r.a("AdfDhtmlRichTextEditorPeer.prototype.isEmpty",{zc:of.prototype.zc});
of.prototype.fh=function(){var a=this.f();if(this.aq())pw(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.Sc,f=gd.$(),g=a;if(e||d)g=f.hl(a);b||d?this.xV&&!uw(this)&&J.va(g):J.va(g);this.lE()}};r.a("AdfDhtmlRichTextEditorPeer.prototype.Focus",{fh:of.prototype.fh});
of.prototype.je=function(a){var b=gd.$();a=this.Vc(a);return b.je(a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.getSelectionRange",{je:of.prototype.je});of.prototype.kw=function(a){var b=vw(this,a);this.bh(b,of.iQa,this,!0);var d=gd.$(),b=this.Vc(a),e=pw(a);this.aq()?(a=this.ko(a),e.value=""+a,b.blur(),delete this.hu,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),gd.$().Ls(b),this.NLa=!0)};
r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleCodeEditingModeChange",{kw:of.prototype.kw});of.prototype.M=function(a){of.h.M.call(this,a);(a=a.X())&&"LABEL"==a.nodeName&&this.focus(this.f())};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentClick",{M:of.prototype.M});of.prototype.Fa=function(a){ww(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseDown",{Fa:of.prototype.Fa});of.prototype.Ac=function(a){ww(this,a)};
r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseUp",{Ac:of.prototype.Ac});of.prototype.ma=function(a){ww(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyDown",{ma:of.prototype.ma});of.prototype.za=function(a){ww(this,a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyUp",{za:of.prototype.za});of.prototype.dg=function(a){this.TX(a);this.NL(a)};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentAction",{dg:of.prototype.dg});
of.prototype.lw=function(){if(this.NLa)delete this.NLa;else if(1!=this.aq()){xw(this);tw(this);var a=q.b;if(void 0!=this.QB){var b=this.QB.length,d=this.ena;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=yw(this,h),null!=n&&(e[h]=n)):n=e[h];if(d[h]!==n&&null!=n){var t=!1;if(h==of.QR||h==of.J0)n=gd.$().JO(n);else if(h==of.iE)n=zw(n),0<n&&8>n?n+="":(n="2",t=!0);else if(h==of.ada&&l instanceof AdfRichSelectOneChoice){var y=l.yy(),
z=y.length,B=!1;null!=n&&a.S()==q.Sc&&(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=of.Yd[t],u.J(t),gd.$().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==of.iE&&A.c.Ne(l.g()))}}this.ena=e}}};r.a("AdfDhtmlRichTextEditorPeer.prototype.HandleContextChanged",{lw:of.prototype.lw});of.prototype.lE=function(){var a=!0,b,d=q.b.R().activeElement;d&&(b=d.tagName);"IFRAME"==b&&(a=!1);a&&A.c.el().mqa()};r.a("AdfDhtmlRichTextEditorPeer.prototype.StopDialogsFromBeingInactivatedDueToIframes",{lE:of.prototype.lE});
of.prototype.Wa=function(a,b){if(this.Zd&&this.Ll(a)){var d=this.Vc(a),e=this.ko(a),d=$e.ks(d);d!=e&&void 0!==d&&this.Jj()}if(a.getReadOnly())return e=O.da(a,b),e.innerHTML;e=pw(a);return e.value};r.a("AdfDhtmlRichTextEditorPeer.prototype.GetSubmittedValue",{Wa:of.prototype.Wa});
of.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=pw(a),e=gd.$(),f=this.ko(a),g=f.indexOf(of.iKa(e,b).outerHTML);d.value=-1==g?f:f.slice(0,g);e.zv(a,b,f)}};r.a("AdfDhtmlRichTextEditorPeer.prototype.UpdateValue",{Jj:of.prototype.Jj});
of.prototype.II=function(a,b,d,e){u.J(a);u.J(b);u.J(d);u.$d(e);void 0==e&&(e=ab.cd);var f=A.c.m(a);a={Id:a,propertyName:b,uQ:d,Ju:e};this.QB||(this.QB=[]);this.QB.push(a);e==ab.cd&&f.Dm(this.f())||f.addEventListener(e,this.TX,this)};r.a("AdfDhtmlRichTextEditorPeer.prototype.AddStyleBinding",{II:of.prototype.II});of.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.Ju==ab.cd&&h.Dm(a)||h.removeEventListener(g.Ju,e,this))}};
r.a("AdfDhtmlRichTextEditorPeer.prototype.RemoveStyleBindings",{eK:of.prototype.eK});
of.iQa=function(a){var b=0,d=this.aq();if(a instanceof AdfRichCommandToolbarButton){var e=a.g();e!=this.Djb&&e!=this.Cjb&&(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=of.prototype;
k.ngb=function(a){this.lw();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.Kka=function(a){var b=q.b.S()==q.ia,d=q.b.S()==q.ed,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=qw(e),d="popup"===e.getToolbarDisplay()&&C.kb(g),"wysiwyg"==f?d?(q.b.preventDefault(a),a.shiftKey?J.va(J.YO(g)):J.be(this.Vc(e))):(gd.$().ql(this.Vc(e),a),b&&(a.shiftKey?this.aQa=!0:this.bQa=!0)):d&&
(q.b.preventDefault(a),a.shiftKey?J.va(J.GH(g)):J.be(pw(e)));else if(a.ctrlKey){b=!0;if(a.altKey)switch(d){case e:case f:this.ne(of.UR);break;case g:this.ne(of.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(of.qba);break;case 77:this.ne(of.P0);break;case 83:this.ne(of.oba);break;case 87:this.ne(of.J0);break;default:b=!1}else switch(d){case 53:this.ne(of.SR);break;case 66:this.ne(of.PR);break;case 69:this.ne(of.L0);
break;case 72:window.setTimeout(this.D(this.Wab),0);break;case 73:this.ne(of.RR);break;case 74:this.ne(of.M0);break;case 76:this.ne(of.N0);break;case 77:this.ne(of.K0);break;case 82:this.ne(of.O0);break;case 85:this.ne(of.VR);break;case 87:this.ne(of.QR);break;case 219:e=zw(Aw(this));1<e&&this.ne(of.iE,+e-1);break;case 221:e=zw(Aw(this));7>e&&this.ne(of.iE,+e+1);break;default:b=!1}b&&q.b.Ea(a)}};k.Wab=function(){return this.ne(of.KQ)};
function xw(a){var b=gd.$(),d=b.je(a.Vc(a.f()));a.Zd?null!=d&&(a.hu=d):a.hu=d;a=a.f();if("popup"===a.getToolbarDisplay()){var e=qd(a);C.kb(e)&&rd(a).setValue(b.nl(d))}}function ww(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 tw(a){if(void 0!=a.Th){var b=a.f(),d=a.Vc(b),e=gd.$(),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=of.Yd[y];l[y]=null==z?null:e.queryCommandEnabled(b,d,z)}if(y===of.KQ&&"popup"===b.getToolbarDisplay()){var z=a,B=z.f(),F=qd(B);C.kb(F)&&(F=sd(B),z=od(gd.$(),B,z.Vc(B)),F.setValue(z))}if(h[y]!==l[y])switch(y){case of.iD:case of.G_:case of.pba:break;default:t.setProperty("disabled",!l[y],!1,!1)}}a.s6=l}}
function zw(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.fja=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.iu=this.D(this.wM);b.ba(f,"load",this.iu);d.parentNode.replaceChild(f,d);b.yc(d);b.Ia(f)};function Bw(a,b){var d=a.Vc(b);u.u(d);gd.$().Ls(d);a.$ha(d)}
function sw(a,b,d){u.u(b,"IFRAME");u.J(d);var e=gd.$();b=e.Mc(b);e.Sua(b);Cw(a,b);a=b.body;""==d&&(d=e.wh());a.innerHTML=d}function Cw(a,b){var d=b.body.style,e=a.SLa;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.EQa,e,0,{isSynchronized:!0}):a.EQa(e);d.cssText=a.SLa}else d.cssText=e}
k.EQa=function(a){void 0==a&&(a=A.c.H().qa("af|richTextEditor-tr-field-inline-style"));this.SLa=a=a.replace(/ /g,";").replace(/\+/g," ").replace(/_/g,":")};function vw(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.aq()||a==of.G_||a==of.iD){u.J(a);var e=of.Yd[a];u.J(e);var f=this.f(),g;a==of.iD&&1==this.aq()?g=pw(f):(g=this.Vc(f),u.u(g,"IFRAME"),this.Zd&&d.S()==q.Sc&&g.focus(),null!=this.hu&&gd.$().setSelectionRange(this.Vc(this.f()),this.hu));d=gd.$();if(d.pta(g)){var h;a:{h=g;var l=[],n,t=[of.PR,of.RR,of.VR,of.SR,of.UR,of.TR],y=this.ena;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=of.Yd[t[B]],void 0!=n)if(n==e)y[t[B]]&&!yw(this,t[B])&&(z=!1);else{var F=y[t[B]],K=yw(this,t[B]);void 0!==F&&F!=K&&(l[l.length]=n)}n=gd.$();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 Aw(a){var b=of.iE;u.J(b);b=of.Yd[b];u.J(b);var d=a.f();a=a.Vc(d);u.u(a,"IFRAME");return gd.$().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.Ju==ab.cd?(g=g.uQ,u.J(g),this.ne(g,null)):g.Ju==lc.At?((h=a.no())&&h.MHa&&"TrColor"==h.MHa&&(h=(new TrColorConverter(["#RRGGBB"],!1)).getAsString(h),g.uQ==of.QR&&(this.ena[g.uQ]=h)),this.ne(g.uQ,h)):v.l.severe("This eventType (",eventType,") is not supported by richTextEditor."),
this.lw());g=q.b.S()==q.ia&&11==q.b.Ib();!this.xV||g&&uw(this)||this.focus(this.f());a.cancel()}}this.Jj();delete this.QA}};function uw(a){var b=a.f();a=a.aq()?pw(b):a.Vc(b);return(b=q.b.R().activeElement)&&b.id==a.id}
k.$ha=function(a){var b=this.f(),d=q.b,e=gd.$(),f=e.hl(a);this.gV=this.D(this.kLa);this.tn=this.D(this.AV);if(this.Zd&&d.S()==q.Sc){d.ba(a,"blur",this.tn);q.Bh()!=q.yl&&d.ba(a,"mouseleave",this.tn);var g=this;this.Oia=this.D(this.Nfb);d.ba(f,"click",this.Oia)}d.ba(f,"blur",this.tn);d.ba(f,"focus",this.gV);b=pw(b);this.Soa=this.D(this.AV);this.Toa=this.D(this.kLa);d.ba(b,"blur",this.Soa);d.ba(b,"focus",this.Toa);a=e.Mc(a);this.mG=this.D(this.Kka);d.ba(a,"keydown",this.mG);d.ba(b,"keydown",this.mG);
this.Yt=this.D(this.lw);this.Wma=this.D(this.ngb);d.ba(a,"mouseup",this.Wma);d.ba(a,"keyup",this.Yt);this.pcb=this.D(this.Zfb);d.ba(a,"dragend",this.pcb);this.Gjb=this.D(this.yM);d.ba(this.i(),"mousedown",this.Gjb);q.b.S()!=q.ia&&d.ba(a,"blur",this.Yt);this.Zd&&q.Bh()!=q.gS&&(g=this,this.hPa=setInterval(function(){xw(g)},500),d.S()==q.Sc&&536>d.Ib()&&(this.Xfb=this.D(this.Wfb),this.R().addEventListener("copy",this.Xfb,!0),this.qgb=this.D(this.pgb),this.R().addEventListener("paste",this.qgb,!0)));
this.Sna=this.D(this.zOa);d.hi(a,this.Sna)};
k.dK=function(a){var b=q.b,d=this.Vc(a),e=gd.$(),f=e.hl(d);this.Zd&&b.S()==q.Sc?(b.xa(d,"blur",this.tn),b.xa(f,"click",this.Oia),delete this.Oia):b.xa(f,"blur",this.tn);delete this.tn;b.xa(f,"focus",this.gV);delete this.gV;a=pw(a);b.xa(a,"blur",this.Soa);delete this.Soa;b.xa(a,"focus",this.Toa);delete this.Toa;d=e.Mc(d);b.xa(d,"mouseup",this.Wma);delete this.Wma;b.xa(d,"keyup",this.Yt);q.b.S()!=q.ia&&b.xa(d,"blur",this.Yt);delete this.Yt;b.xa(d,"keydown",this.mG);delete this.mG;b.nq(d,this.Sna);delete this.Sna;
this.Zd&&this.hPa&&clearInterval(this.hPa)};r.a("AdfDhtmlRichTextEditorPeer.prototype.RemoveContextChangeListeners",{dK:of.prototype.dK});k=of.prototype;k.zOa=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.Xe(a,pw(b)),this.IL||(this.IL=[]),this.IL[b]=a,A.c.xOa(b)};
k.kLa=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.oj(d,a),g=this.Vc(d);A.c.GT(g,d.g());this.aq()?g=pw(d):(g=gd.$().a9(g),g=g.document);g==a.originalTarget&&f.ce()==Qa.CAPTURING_PHASE&&f.GZ();this.Ta(f);e||this.aq()||"inline"!==d.getToolbarDisplay()||(a=vw(this,d),this.bh(a,of.iQa,this,!0))}if(this.Zd&&b.S()==q.Sc&&q.Bh()!=q.yl&&b.TKa&&(b=b.Zx))for(a=0;a<b.length;a++)this.R().removeEventListener(b[a].Ju,b[a].listener,b[a].capture)};
k.wM=function(){var a=gd.$(),b=this.f();u.Tc(b,"Unexpected unbound peer for load event on iframe.");var d=this.Vc(b);u.u(d);var e=!b.getDisabled()&&!a.Oi(d);if(a.Ey()&&e)Bw(this,b);else{var f=pw(b);u.u(f);if("lazy"!=b.getContentDelivery())sw(this,d,f.value);else{var g=this.ko(b,!0);f.value=g;a=a.Mc(d);Cw(this,a)}e&&Bw(this,b);b.getReadOnly()||qf.$().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=$e.ks(d);this.bQa?(delete this.bQa,J.be(A.c.wd)):this.aQa&&(delete this.aQa,J.ni(A.c.wd));this.Jj();this.i6&&delete this.i6;var f=!1,g=pw(b).value;e!=g&&void 0!==e&&(f=!0);!f||this.i6&&b.getValid(b.g())||(this.cc(b,this.Wa(b,this.i())),$e.wl(d,g))}b=q.Bh();if(this.Zd&&a.S()==q.Sc&&b!=q.yl&&b!=q.gS&&(d=gd.$(),e=this.Vc(this.f()),b=d.hl(e),d=of.iKa(d,e),b.appendChild(d),d.focus(),d.blur(),b.removeChild(d),a.TKa&&(a=a.Zx)))for(b=0;b<
a.length;b++)this.R().addEventListener(a[b].Ju,a[b].listener,a[b].capture)};k.Nfb=function(){this.fh()};k.yM=function(){this.i6=!0};k.Zfb=function(){if(q.b.S()==q.ia){var a=this.mW;a&&clearTimeout(a);A.c.ta(this,of.iya,this.f().g(),0)}else this.CV()};
k.Wfb=function(a){if(a.clipboardData&&null!=this.hu&&(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.hu.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.pgb=function(a){var b=q.b;if(a.clipboardData&&(this.bW()||!A.c.Am().Hy())){if(this.bW()&&b.S()==q.Sc&&536>b.Ib()){if(this.uLa)return;this.uLa=!0;var d=this;setTimeout(function(){delete d.uLa},500)}a=a.clipboardData.getData("Text");this.ne("cmd_insert",a)}};function yw(a,b){u.J(b);var d=of.Yd[b];u.J(d);return gd.$().queryCommandState(a.Vc(a.f()),d)}
of.iKa=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 pd(a){return!a||0==gd.$().nl(a).length}of.prototype.Lnb=function(a){a.ce()!=Qa.Ef||pd(this.hu)||(a=a.he().getValue(),"about:blank"!==a&&(/^http:\/\//.test(a)||(a="http://"+a),this.ne(of.KQ,a),xw(this)))};
of.prototype.Knb=function(a){if(a.ce()==Qa.Ef){var b=this.hu,d=gd.$();pd(b)||(a=a.he().getValue(),b=d.nl(b),a!==b&&this.ne(of.iD,a))}};function qw(a){return q.b.getElementById(I.j(a.g(),of.Z6a))}function qd(a){return q.b.getElementById(a.getId()+of.jFa)}function sd(a){return A.c.m(a.getId()+of.$6a)}function rd(a){return A.c.m(a.getId()+of.a7a)}
function rw(a){var b=q.b,d=a.f(),e=d.g(),f=b.getElementById(I.j(e,of.iea)),b=qw(d),g={autodismiss:"autodismissAlways"};g.alignElement=f;g[AdfRichPopup.Ed]=AdfRichPopup.dD;g.focus=!1;C.setVisible(b,!0);if(!a.hQa){var f=rd(d),h=sd(d),l=function(a){a=a.he();O.da(a,a.o().i()).select()};h.addEventListener(D.Nd,a.Lnb,a);h.addEventListener(D.Oc,l,a);f.addEventListener(D.Nd,a.Knb,a);f.addEventListener(D.Oc,l,a);a.hQa=!0}a.He(d,b,g,e)}
of.prototype.ob=function(a,b){of.h.ob.call(this,a,b);var d=qw(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,of.iea)),e=e.getElementById(f+of.jFa);d.insertBefore(b,g);C.setVisible(e,!1);C.setVisible(b,!1)}};r.a("AdfDhtmlRichTextEditorPeer.prototype.PopupClosed",{ob:of.prototype.ob});