var Je=M.U(U,"AdfDhtmlRichTextEditorPeer",p);v("AdfDhtmlRichTextEditorPeer",Je);Je.m=function(){M.ui(this,AdfRichTextEditor.EDIT_MODE);M.ha(this,bb.Lc,I.jb,I.tc,I.Xc,I.Xf,I.ec,I.qd);M.$b(this,AdfRichTextEditor.LABEL);M.hb(this,AdfRichTextEditor.LABEL);z.kb(xe);this.xE()};v("AdfDhtmlRichTextEditorPeer.InitSubclass",Je.m);
Je.xE=function(){this.pna==n&&(this.fPa="_tbPopCont",this.ora="_tbPopInpCont",this.gPa="_tbPopLnkInput",this.hPa="_tbPopLnkSelectedInput",this.w5="_cic",this.pna="cont",this.Tqa="src",this.ioa="__afrRichTextEditorFieldId",this.Sqa="__afrRichTextEditorSourceFieldId",this.BT="style_bold",this.DT="style_italic",this.HT="style_underline",this.ET="style_strikethrough",this.oma="style_list_unordered",this.nma="style_list_ordered",this.v4="style_indent",this.A4="style_outdent",this.y4="style_justify_left",
this.w4="style_justify_center",this.z4="style_justify_right",this.x4="style_justify_full",this.GT="style_superscript",this.FT="style_subscript",this.CT="style_color_foreground",this.nL="style_color_background",this.RE="style_font_size",this.u4="style_font_name",this.tK="cmd_undo",this.sK="cmd_redo",this.GS="cmd_link",this.Kja="cmd_unlink",this.Ija="cmd_clear_styling",this.LD="cmd_insert",this.P2="cmd_mode_rich_text",this.Jja="cmd_mode_code",this.sd={},this.sd[this.BT]="bold",this.sd[this.DT]="italic",
this.sd[this.HT]="underline",this.sd[this.ET]="strikethrough",this.sd[this.oma]="insertunorderedlist",this.sd[this.nma]="insertorderedlist",this.sd[this.v4]="indent",this.sd[this.A4]="outdent",this.sd[this.y4]="justifyleft",this.sd[this.w4]="justifycenter",this.sd[this.z4]="justifyright",this.sd[this.x4]="justifyfull",this.sd[this.GT]="superscript",this.sd[this.FT]="subscript",this.sd[this.CT]="forecolor",this.sd[this.nL]="backcolor",this.sd[this.RE]="fontsize",this.sd[this.u4]="fontname",this.sd[this.tK]=
"undo",this.sd[this.sK]="redo",this.sd[this.GS]="createlink",this.sd[this.Kja]="unlink",this.sd[this.Ija]="removeformat",this.sd[this.LD]="insert",this.sd[this.P2]="moderichtext",this.sd[this.Jja]="modecode",this.l6a=/rgba?\((\d+),\s*(\d+),\s*(\d+)(,\s*((\d+)))?\)/)};v("AdfDhtmlRichTextEditorPeer.InitConstants",Je.xE);Je.rla=function(a){if(a=F.c.j(a))a=a.k(),iu(a),ju(a)};v("AdfDhtmlRichTextEditorPeer.HandleTimerUpdate",Je.rla);Je.prototype.Init=function(a){Je.f.Init.call(this,a);this.QG={}};
z.a("AdfDhtmlRichTextEditorPeer.prototype.Init",{Init:Je.prototype.Init});Je.prototype.q=function(a,b){var d=a.getReadOnly();if(!d){var e=a.e(),f=M.g(e,Je.pna);w.b.Gg(b,Je.ioa,f);e=M.g(e,Je.Tqa);w.b.Gg(b,Je.Sqa,e);F.c.jD(a)}Je.f.q.call(this,a,b);this.Bd=w.b.cd()[w.Vc]!=w.Wc;d||("source"==a.getEditMode()&&(this.Ht=l),"popup"===a.getToolbarDisplay()&&(this.nAa=p),this.H9(a))};z.a("AdfDhtmlRichTextEditorPeer.prototype.InitDomElement",{q:Je.prototype.q});
Je.prototype.at=function(){var a=this.d();if((a=ku(a))&&"1"===a.getAttribute("data-afr-rte-loaded")){D.i.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE loaded");try{if("complete"===a.contentWindow.document.readyState)return D.i.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE ready"),J.mt;D.i.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: RTE inner document not yet ready");return J.Wz}catch(b){return D.i.fine("AdfDhtmlRichTextEditor.GetReadyState: exception.","Nothing more to do"),J.mt}}D.i.fine("AdfDhtmlRichTextEditorPeer.GetReadyState: richTextEditor's onload has not fired");
return J.Wz};z.a("AdfDhtmlRichTextEditorPeer.prototype.GetReadyState",{at:Je.prototype.at});Je.prototype.Raa=function(){return H.ta(M.fy(this.d()),"p_AFStretched")};Je.prototype.ja=t(l);z.a("AdfDhtmlRichTextEditorPeer.prototype.needsResizeNotify",{ja:Je.prototype.ja});
Je.prototype.Ia=function(a,b,d,e){if(this.Raa()&&(b=w.b,d=this.d().e(),a=b.getElementById(M.g(d,Je.w5)),b=b.getElementById(M.g(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"}};z.a("AdfDhtmlRichTextEditorPeer.prototype.ResizeNotify",{Ia:Je.prototype.Ia});Je.prototype.Aa=function(){return mg.Hc()};z.a("AdfDhtmlRichTextEditorPeer.prototype.GetInlineEditor",{Aa:Je.prototype.Aa});
Je.prototype.Bc=function(a){a||(a=this.cb(this.d(),this.h()));a=a.replace(/(<([^>]+)>)/ig,"");a=xa.trim(a);return 0==a.length};z.a("AdfDhtmlRichTextEditorPeer.prototype.isEmpty",{Bc:Je.prototype.Bc});Je.prototype.JC=function(a,b){return Qc.O().An(ku(a),b)};z.a("AdfDhtmlRichTextEditorPeer.prototype.getCurrentContent",{JC:Je.prototype.JC});
Je.prototype.yg=function(a,b,d,e,f,g){B.s(a);B.s(d);"style"==d.substring(0,5)?(B.s(f),B.Cd(g),g==k&&(g=bb.Lc),b=g,B.s(a),B.s(f),B.s(d),B.Cd(b),b==k&&(b=bb.Lc),e=F.c.j(a),a={be:a,propertyName:f,cK:d,Tr:b},this.Mx||(this.Mx=[]),this.Mx.push(a),(b!=bb.Lc||!e.gm(this.d()))&&e.addEventListener(b,this.Nda,this)):"cmd"==d.substring(0,3)?this.G8(a,b,d,e):D.i.severe("Unable to add binding [",d,"] for ",a," to ",this.d().e())};z.a("AdfDhtmlRichTextEditorPeer.prototype.addBinding",{yg:Je.prototype.yg});
Je.prototype.y1=function(a){var b=this.Ht;b==n&&(b=p);if(b!=a){this.Ht=a;b=this.d();a?b.setProperty("editMode","source",l):b.setProperty("editMode","wysiwyg",l);var d=this.D1a;if(d==n){var e=b.e();this.D1a=d=e+"_afrToolbox";this.lZa=e+"_afrModeRichText";this.kZa=e+"_afrModeCode"}d=F.c.j(d);this.lg(d,Je.E1a,this,l);var f=Qc.O(),d=ku(b),e=lu(b);a?(a=this.JC(b),e.value=""+a,d.blur(),delete this.ur,d.style.display="none",e.style.display="block",e.focus()):(e.blur(),e.style.display="none",d.style.display=
"block",d.focus(),f.jS(d,e.value),this.focus(b),Qc.O().Xy(d),this.zwa=l)}};z.a("AdfDhtmlRichTextEditorPeer.prototype.setCodeEditingMode",{y1:Je.prototype.y1});
Je.prototype.pg=function(){var a=this.d();if(this.Ht)lu(a).focus();else{a=ku(a);if("IFRAME"==a.nodeName&&a!=document.activeElement)try{var b=a.parentElement,d=b.hasAttribute("tabindex");d||b.setAttribute("tabindex","0");O.ra(b);d||b.removeAttribute("tabindex")}catch(e){}if(w.b.G()==w.aa&&11==w.b.nb()){if(b=this.rX)b=w.b.w().activeElement,d=this.d(),d=this.Ht?lu(d):ku(d),b=!(b&&b.id==d.id);b&&O.ra(a)}else O.ra(a);mu()}};z.a("AdfDhtmlRichTextEditorPeer.prototype.Focus",{pg:Je.prototype.pg});
Je.prototype.vBa=function(a,b){this.Sd(a,b)};z.a("AdfDhtmlRichTextEditorPeer.prototype.executeCommand",{vBa:Je.prototype.vBa});Je.prototype.jf=function(a){var b=Qc.O();a=ku(a);return b.jf(a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.getSelectionRange",{jf:Je.prototype.jf});Je.prototype.hk=function(a,b){var d=b.getElementsByTagName("LABEL"),d=d.length?d[0]:n;if(d!=n){var e=a.e(),f=M.g(e,"content");if(d.htmlFor==f)return w.b.Mb(d);e=M.g(e,Je.Tqa);if(d.htmlFor==e)return w.b.Mb(d)}return n};
z.a("AdfDhtmlRichTextEditorPeer.prototype.GetComponentLabel",{hk:Je.prototype.hk});Je.prototype.Ha=function(a){Je.f.Ha.call(this,a);a=this.d();if(!a.getReadOnly()&&(mu(),!this.Tw)){var b=F.c.Qc,d=ku(a);b==d&&(this.focus(a),b=lu(a).value,xe.aq(d,b));"popup"===a.getToolbarDisplay()&&!H.hc(nu(a))&&ou(this)}};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentFocus",{Ha:Je.prototype.Ha});Je.prototype.C=function(a){Je.f.C.call(this,a);(a=a.Q())&&"LABEL"==a.nodeName&&this.focus(this.d())};
z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentClick",{C:Je.prototype.C});Je.prototype.qa=function(a){pu(this,a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseDown",{qa:Je.prototype.qa});Je.prototype.cc=function(a){pu(this,a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentMouseUp",{cc:Je.prototype.cc});Je.prototype.ba=function(a){pu(this,a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyDown",{ba:Je.prototype.ba});
Je.prototype.pa=function(a){pu(this,a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentKeyUp",{pa:Je.prototype.pa});Je.prototype.cb=function(a,b){if(this.Bd&&this.uo(a)){var d=ku(a),e=this.JC(a),d=xe.ly(d);d!=e&&d!==k&&iu(this)}if(a.getReadOnly())return e=U.W(a,b),e.innerHTML;e=lu(a);return e.value};z.a("AdfDhtmlRichTextEditorPeer.prototype.GetSubmittedValue",{cb:Je.prototype.cb});Je.prototype.xa=function(a,b,d){B.s(d);a.getReadOnly()?b.innerHTML=d:(b=lu(a).value,a=ku(a),qu(this,a,b))};
z.a("AdfDhtmlRichTextEditorPeer.prototype.SetDisplayValue",{xa:Je.prototype.xa});Je.prototype.gi=function(a){this.Nda(a);this.sN(a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.HandleComponentAction",{gi:Je.prototype.gi});Je.prototype.rma=t(l);z.a("AdfDhtmlRichTextEditorPeer.prototype.ShowFormatHint",{rma:Je.prototype.rma});
Je.prototype.Z=function(a){var b=a.getReadOnly();b||page.Zy(a);if(!b&&!a.getDisabled()){b=this.Mx;if(b!=k)for(var d=b.length,e=this.Nda,f=0;f<d;f++){var g=b[f],h=F.c.j(g.be);h!=k&&(g.Tr!=bb.Lc||!h.gm(a))&&h.removeEventListener(g.Tr,e,this)}this.Wya(a);b=w.b;d=ku(a);e=Qc.O();f=e.Ap(d);this.Bd&&b.G()==w.Fc?(b.sa(d,"blur",this.cr),w.Yh()!=w.ek&&b.sa(f,"blur",this.z8a),b.sa(f,"click",this.q9),delete this.q9):b.sa(f,"blur",this.cr);delete this.cr;b.sa(f,"focus",this.E$);delete this.E$;f=lu(a);b.sa(f,"blur",
this.Fda);delete this.Fda;b.sa(f,"focus",this.Gda);delete this.Gda;d=e.Jc(d);b.sa(d,"mouseup",this.Tba);delete this.Tba;b.sa(d,"keyup",this.gr);w.b.G()!=w.aa&&b.sa(d,"blur",this.gr);delete this.gr;b.sa(d,"keydown",this.vB);delete this.vB;b.On(d,this.Mca);delete this.Mca;this.Bd&&this.wza&&clearInterval(this.wza);this.vr&&(w.b.sa(ku(a),"load",this.vr),delete this.vr);Ke.O().ija(a);delete this.rX;delete this.ur}Je.f.Z.call(this,a)};z.a("AdfDhtmlRichTextEditorPeer.prototype.ComponentRemoved",{Z:Je.prototype.Z});
Je.prototype.ym=function(a,b,d){this.h().scrollIntoView();var e=this.w(),f=a.getReadOnly(),g;f||(g=ku(a),e=Qc.O().Jc(g));a=n;d!=n&&((a=e.getElementById(d))?a.scrollIntoView():D.i.warning("Invalid subTargetId specified:"+d));b&&(a?O.ra(a):f||O.ra(g))};z.a("AdfDhtmlRichTextEditorPeer.prototype.ScrollIntoView",{ym:Je.prototype.ym});function mu(){var a=l,b,d=w.b.w().activeElement;d&&(b=d.tagName);"IFRAME"==b&&(a=p);a&&F.c.Kk().Kea()}
Je.E1a=function(a){var b=0,d=this.Ht;if(a instanceof AdfRichCommandToolbarButton){var e=a.e();e!=this.lZa&&e!=this.kZa&&(a.setProperty("selected",p,p,J.sT),a.setProperty("disabled",d,p,J.sT),b=1)}else a instanceof AdfRichSelectOneChoice||a instanceof AdfRichInputNumberSpinbox||a instanceof AdfRichInputColor?(a.setProperty("disabled",d,p,J.sT),b=1):a instanceof AdfRichPanelGroupLayout&&(a=M.Ib(a),d?H.n(a,M.gb):H.F(a,M.gb),b=1);return b};u=Je.prototype;
u.LWa=function(a){this.or();a=a.target;-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&"html"==a.nodeName.toLowerCase()&&a.getElementsByTagName("body")[0].focus()};
u.or=function(){if(this.zwa)delete this.zwa;else if(this.Ht!=l){ru(this);ju(this);var a=w.b;if(this.Mx!=k){var b=this.Mx.length,d=this.bca;d==k&&(d={});for(var e={},f=0;f<b;f++){var g=this.Mx[f],h=g.cK,m=F.c.j(g.be);B.assert(m);var q=n;e[h]==k?(q=su(this,h),q!=n&&(e[h]=q)):q=e[h];if(d[h]!==q&&q!=n){var s=p;if(h==Je.nL||h==Je.CT)q=Qc.O().GI(q);else if(h==Je.RE)q=tu(q),0<q&&8>q?q+="":(q="2",s=l);else if(h==Je.u4&&m instanceof AdfRichSelectOneChoice){var y=m.vy(),A=y.length,C=p;if(q!=n&&(q=(""+q).replace(/'/g,
""),-1!=navigator.userAgent.toLowerCase().indexOf("chrome")||this.Bd&&a.G()==w.Fc))q=(""+q).replace(/, /gi,",");for(var G=0;G<A;G++)if(y[G].getLabel()==q){q=y[G].getValue();C=l;break}if(!C){for(var G=Number.MAX_VALUE,K,N,Q=0;Q<A;Q++)if(-1<(K=y[Q].getValue().search(q)))K<G&&(G=K,N=y[Q].getValue()),C=l;if(!C)for(Q=1;Q<A;Q++)if(-1<(K=q.search(y[Q].getLabel())))K<G&&(G=K,N=y[Q].getValue()),C=l;q=C?N:y[0].getValue()}}s||(s=h,B.s(s),s=Je.sd[s],B.s(s),Qc.O().Tp(ku(this.d()),s));s=m.r(g.propertyName);na.uC(s,
q)||("value"==g.propertyName&&(B.s(h),this.QG[h]==k&&(this.QG[h]=0),this.QG[h]++),m.setProperty(g.propertyName,q,p,p))}}this.bca=e}}};
u.AO=function(a){var b=w.b.G()==w.aa,d=w.b.G()==w.ed,e=187,f=e,g=189;if(b){var h=this.XO;h&&clearTimeout(h);h="AdfDhtmlRichTextEditorPeer.HandleTimerUpdate('"+this.d().e()+"')";this.XO=setTimeout(h,3E3)}d&&(e=61,f=107,g=109);d=a.keyCode;if(9==d)a.shiftKey&&(this.rY=l),e=this.d(),f=e.getEditMode(),g=nu(e),d="popup"===e.getToolbarDisplay()&&H.hc(g),"wysiwyg"==f?d?(w.b.preventDefault(a),a.shiftKey?O.ra(O.WI(g)):O.Ud(ku(e))):(Qc.O().Hn(ku(e),a),b&&(a.shiftKey?this.iAa=l:this.jAa=l)):d&&(w.b.preventDefault(a),
a.shiftKey?O.ra(O.KC(g)):O.Ud(lu(e)));else if(a.ctrlKey){b=l;if(a.altKey)switch(d){case e:case f:this.Sd(Je.GT);break;case g:this.Sd(Je.FT);break;case 121:(e=F.c.j(this.d().e()+"_afrToolbox"))&&e.focus();break;default:b=p}else if(a.shiftKey)switch(d){case 72:this.Sd(Je.Kja);break;case 77:this.Sd(Je.A4);break;case 83:this.Sd(Je.Ija);break;case 87:this.Sd(Je.CT);break;default:b=p}else switch(d){case 53:this.Sd(Je.ET);break;case 66:this.Sd(Je.BT);break;case 69:this.Sd(Je.w4);break;case 72:window.setTimeout(this.o(this.SSa),
0);break;case 73:this.Sd(Je.DT);break;case 74:this.Sd(Je.x4);break;case 76:this.Sd(Je.y4);break;case 77:this.Sd(Je.v4);break;case 82:this.Sd(Je.z4);break;case 85:this.Sd(Je.HT);break;case 87:this.Sd(Je.nL);break;case 219:e=tu(uu(this));1<e&&this.Sd(Je.RE,+e-1);break;case 221:e=tu(uu(this));7>e&&this.Sd(Je.RE,+e+1);break;default:b=p}b&&w.b.va(a)}};u.SSa=function(){return this.Sd(Je.GS)};
function ru(a){var b=Qc.O(),d=b.jf(ku(a.d()));a.Bd?d!=n&&(a.ur=d):a.ur=d;a=a.d();if("popup"===a.getToolbarDisplay()){var e=Yc(a);H.hc(e)&&Zc(a).setValue(b.Fn(d))}}function pu(a,b){var d=b.L();if(a.dG!=n&&a.dG[d]!=n){var e=a.dG[d];b.cancel=function(){oa.f.cancel.call(b);w.b.preventDefault(d);w.b.preventDefault(e);delete a.dG[d]}}}
function ju(a){if(a.Tg!=k){var b=a.d(),d=ku(b),e=Qc.O(),f=a.Tg,g=f.length,h=a.AY;h==k&&(h={});for(var m={},q=0;q<g;q++){var s=f[q],y=s.Pe,s=F.c.j(s.be);B.assert(s);if(m[y]===k){var A=Je.sd[y];m[y]=A==n?n:e.queryCommandEnabled(b,d,A)}if(y===Je.GS&&"popup"===b.getToolbarDisplay()){var A=a.d(),C=Yc(A);H.hc(C)&&(C=$c(A),A=Wc(Qc.O(),A,ku(A)),C.setValue(A))}if(h[y]!==m[y])switch(y){case Je.LD:case Je.P2:case Je.Jja:break;default:s.setProperty("disabled",!m[y],p,p)}}a.AY=m}}
function tu(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}
u.H9=function(a){var b=w.b,d=ku(a),e=F.c,f=this.w().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.u().V("af_richTextEditor.IFRAME_TITLE");if("lazy"==a.getContentDelivery())f.src=e.dga(a.e());else if((a=d.getAttribute("src"))&&""!=a)f.src=a;this.vr=this.o(this.IG);b.S(f,"load",this.vr);d.parentNode.replaceChild(f,d);b.gc(d);b.wa(f)};function vu(a,b){var d=ku(b);B.p(d);Qc.O().Xy(d);a.H8(d)}
function qu(a,b,d){B.p(b,"IFRAME");B.s(d);var e=Qc.O();b=e.Jc(b);e.Cia(b);wu(a,b);a=b.body;""==d&&(d=e.xn());a.innerHTML=d}function wu(a,b){var d=b.body.style,e=a.Fwa;if(e==n){var f=w.b.G()==w.aa,g=F.c,e=g.u().ka("af|richTextEditor-tr-field-inline-style");f&&e==k?g.oa(a,a.DAa,e,0,{isSynchronized:l}):a.DAa(e);d.cssText=a.Fwa}else d.cssText=e}u.DAa=function(a){a==k&&(a=F.c.u().ka("af|richTextEditor-tr-field-inline-style"));this.Fwa=a=a.replace(/ /g,";").replace(/\+/g," ").replace(/_/g,":")};
function ku(a){a=w.b.Vh(M.Ib(a),Je.ioa);a=w.b.getElementById(a);B.p(a);return a}function lu(a){a=w.b.Vh(M.Ib(a),Je.Sqa);a=w.b.getElementById(a);B.p(a);return a}
u.Sd=function(a,b){var d=w.b;if(this.Ht!=l||a==Je.P2||a==Je.LD){B.s(a);var e=Je.sd[a];B.s(e);var f=this.d(),g;a==Je.LD&&this.Ht==l?g=lu(f):(g=ku(f),B.p(g,"IFRAME"),this.Bd&&d.G()==w.Fc&&g.focus(),this.ur!=n&&Qc.O().setSelectionRange(ku(this.d()),this.ur));d=Qc.O();if(d.kha(g)){var h;a:{h=g;var m=[],q,s=[Je.BT,Je.DT,Je.HT,Je.ET,Je.GT,Je.FT],y=this.bca;if(y==k)h=l;else{switch(e){case "bold":case "italic":case "underline":case "strikethrough":case "superscript":case "subscript":break;default:h=l;break a}var A=
l,C;for(C=0;C<s.length;++C)if(q=Je.sd[s[C]],q!=k)if(q==e)y[s[C]]&&!su(this,s[C])&&(A=p);else{var G=y[s[C]],K=su(this,s[C]);G!==k&&G!=K&&(m[m.length]=q)}q=Qc.O();for(C=0;C<m.length;++C)q.execCommand(f,h,m[C],b);h=A}}h&&d.execCommand(f,g,e,b)}else d.execCommand(f,g,e,b)}};function uu(a){var b=Je.RE;B.s(b);b=Je.sd[b];B.s(b);a=a.d();a=ku(a);B.p(a,"IFRAME");return Qc.O().queryCommandValue(a,b)}
u.Nda=function(a){if(!(this.Mx==k||this.Tw)){this.Tw=l;for(var b=a.getSource().e(),d=this.Mx,e=d.length,f=0;f<e;f++){var g=d[f];if(g.be==b){a.Cc(l);var h;h=g.cK;B.s(h);this.QG[h]==k||0==this.QG[h]?h=p:(this.QG[h]--,h=l);if(!h){if(g.Tr==bb.Lc)g=g.cK,B.s(g),this.Sd(g,n);else if(g.Tr==ic.Iq){if((h=a.Ou())&&h.vta&&"TrColor"==h.vta)h=(new TrColorConverter(["#RRGGBB"],p)).getAsString(h),g.cK==Je.nL&&(this.bca[g.cK]=h);this.Sd(g.cK,h)}else D.i.severe("This eventType (",eventType,") is not supported by richTextEditor.");
this.or()}this.rX&&this.focus(this.d());a.cancel()}}iu(this);delete this.Tw}};u.sN=function(a){if(!(this.Tg==k||this.Tw)){this.Tw=l;for(var b=a.getSource().e(),d=this.Tg,e=d.length,f=p,g=0;g<e;g++){var h=d[g];if(h.be==b){a.Cc(l);var m=h.Pe;this.Sd(m,h.oe);this.or();a.cancel();m==Je.LD&&(f=l)}}iu(this);f&&(a=this.d(),this.Yb(a,this.cb(a,this.h())));delete this.Tw}};
u.H8=function(a){var b=this.d(),d=w.b,e=Qc.O(),f=e.Ap(a);this.E$=this.o(this.Yva);this.cr=this.o(this.wO);if(this.Bd&&d.G()==w.Fc){d.S(a,"blur",this.cr);var g=this;this.q9=this.o(this.kWa);d.S(f,"click",this.q9)}d.S(f,"blur",this.cr);d.S(f,"focus",this.E$);b=lu(b);this.Fda=this.o(this.wO);this.Gda=this.o(this.Yva);d.S(b,"blur",this.Fda);d.S(b,"focus",this.Gda);a=e.Jc(a);this.vB=this.o(this.AO);d.S(a,"keydown",this.vB);d.S(b,"keydown",this.vB);this.gr=this.o(this.or);this.Tba=this.o(this.LWa);d.S(a,
"mouseup",this.Tba);d.S(a,"keyup",this.gr);this.OTa=this.o(this.wWa);d.S(a,"dragend",this.OTa);this.pZa=this.o(this.caa);d.S(this.h(),"mousedown",this.pZa);w.b.G()!=w.aa&&d.S(a,"blur",this.gr);this.Bd&&w.Yh()!=w.ST&&(g=this,this.wza=setInterval(function(){ru(g)},500),d.G()==w.Fc&&536>d.nb()&&(this.uWa=this.o(this.tWa),this.w().addEventListener("copy",this.uWa,l),this.NWa=this.o(this.MWa),this.w().addEventListener("paste",this.NWa,l)));this.Mca=this.o(this.J_a);d.hh(a,this.Mca)};
u.J_a=function(a){var b=this.d();a||(a=ku(b).contentWindow.event);var d=w.b;if(d.Ey(a)||d.$u(a))b=w.b.ne(a,lu(b)),this.dG||(this.dG=[]),this.dG[b]=a,F.c.Qya(b)};
u.Yva=function(a){var b=w.b;if(!this.Tw){var d=this.d();this.rX||(this.rX=l);var e=w.b.vi(d,a),f=ku(d);F.c.LM(f,d.e());this.Ht?d=lu(d):(d=Qc.O().X_(f),d=d.document);d==a.originalTarget&&e.dd()==Ta.CAPTURING_PHASE&&e.OR();this.Ha(e)}if(this.Bd&&(b.G()==w.Fc&&w.Yh()!=w.ek)&&b.Jva&&(a=b.su))for(b=0;b<a.length;b++)this.w().removeEventListener(a[b].Tr,a[b].ak,a[b].capture)};
u.IG=function(){var a=Qc.O(),b=this.d();B.zc(b,"Unexpected unbound peer for load event on iframe.");var d=ku(b);B.p(d);var e=!b.getDisabled()&&!a.hm(d);if(a.xJ()&&e)vu(this,b);else{var f=lu(b);B.p(f);if("lazy"!=b.getContentDelivery())qu(this,d,f.value);else{var g=this.JC(b,l);f.value=g;a=a.Jc(d);wu(this,a)}e&&vu(this,b);b.getReadOnly()||Ke.O().SJ(b);d.setAttribute("data-afr-rte-loaded","1")}};
u.wO=function(){var a=w.b;if(!this.Tw){var b=this.d(),d=ku(b),e=xe.ly(d);this.jAa?(delete this.jAa,O.Ud(F.c.Qc)):this.iAa&&(delete this.iAa,O.Qh(F.c.Qc));iu(this);this.rY&&delete this.rY;var f=p,g=lu(b).value;e!=g&&e!==k&&(f=l);if(f&&(!this.rY||!b.getValid(b.e())))this.Yb(b,this.cb(b,this.h())),xe.aq(d,g)}if(this.Bd&&(a.G()==w.Fc&&w.Yh()!=w.ek)&&(d=Qc.O(),e=ku(this.d()),b=d.Jc(e),d=d.Ap(e),b=b.createElement("input"),b.type="text",b.style.position="absolute",b.style.left="0px",b.style.top="0px",b.style.height=
"0px",b.style.width="0px",b.style.opacity="0",d.appendChild(b),b.focus(),b.blur(),d.removeChild(b),a.Jva&&(a=a.su)))for(b=0;b<a.length;b++)this.w().addEventListener(a[b].Tr,a[b].ak,a[b].capture)};u.kWa=function(){this.pg()};u.caa=function(){this.rY=l};u.wWa=function(){if(w.b.G()==w.aa){var a=this.XO;a&&clearTimeout(a);F.c.oa(this,Je.rla,this.d().e(),0)}else this.or()};
u.tWa=function(a){if(a.clipboardData&&this.ur!=n&&(this.RO()||!F.c.am().Xu())){var b=this.w(),d=b.createElement("div");d.style.position="absolute";d.style.left="-1000px";d.style.top="-1000px";d.contentEditable="true";d.textContent=this.ur.toString();b.body.appendChild(d);a=b.createRange();a.selectNodeContents(d);var e=window.getSelection();e.removeAllRanges();e.addRange(a);b.execCommand("copy",p,n);setTimeout(function(){b.body.removeChild(d)},500)}};
u.MWa=function(a){var b=w.b;if(a.clipboardData&&(this.RO()||!F.c.am().Xu())){if(this.RO()&&b.G()==w.Fc&&536>b.nb()){if(this.hwa)return;this.hwa=l;var d=this;setTimeout(function(){delete d.hwa},500)}a=a.clipboardData.getData("Text");this.Sd("cmd_insert",a)}};
function iu(a){var b=a.d(),d=ku(b);a.XO&&(clearTimeout(a.XO),delete a.XO);if("none"!=d.style.display){var e=lu(b),f=Qc.O();a=a.JC(b);-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&a.U9a("span")&&(a=a.replace(/; /gi,";").replace(/: /gi,":"));e.value=a;f.Cs(b,d,a)}}function su(a,b){B.s(b);var d=Je.sd[b];B.s(d);return Qc.O().queryCommandState(ku(a.d()),d)}
u.G8=function(a,b,d,e){B.s(a);B.s(d);this.Tg||(this.Tg=[]);for(var f=this.Tg.length,g=n,h=0;h<f;h++){var m=this.Tg[h];if(m.be==a&&m.Pe==d){m.oe=e;g=m;break}}g==n&&(g={be:a,Pe:d,oe:e},this.Tg.push(g));b.gm(this.d())||b.addEventListener(bb.Lc,this.sN,this)};u.Wya=function(a){var b=this.Tg;if(b!=k)for(var d=b.length,e=this.sN,f=0;f<d;f++){var g=F.c.j(b[f].be);g!=k&&(g.gm(a)||g.removeEventListener(bb.Lc,e,this))}};
u.RO=function(){var a=n;try{a=this.d().getParent()}catch(b){}if(a==n)return p;for(;a!=n;){if(a instanceof AdfRichPopup)return l;try{a=a.getParent()}catch(d){return p}if(a==n)return p}};function Xc(a){return!a||0==Qc.O().Fn(a).length}u.C1a=function(a){a.dd()==Ta.ue&&!Xc(this.ur)&&(a=a.oh().getValue(),"about:blank"!==a&&(/^http:\/\//.test(a)||(a="http://"+a),this.Sd(Je.GS,a),ru(this)))};
u.B1a=function(a){if(a.dd()==Ta.ue){var b=this.ur,d=Qc.O();Xc(b)||(a=a.oh().getValue(),b=d.Fn(b),a!==b&&this.Sd(Je.LD,a))}};function nu(a){return w.b.getElementById(M.g(a.e(),Je.fPa))}function Yc(a){return w.b.getElementById(a.getId()+Je.ora)}function $c(a){return F.c.j(a.getId()+Je.gPa)}function Zc(a){return F.c.j(a.getId()+Je.hPa)}
function ou(a){var b=w.b,d=a.d(),e=d.e(),f=b.getElementById(M.g(e,Je.w5)),b=nu(d),g={autodismiss:"autodismissAlways"};g.alignElement=f;g[AdfRichPopup.fd]=AdfRichPopup.DD;g.focus=p;H.setVisible(b,l);if(!a.nAa){var f=Zc(d),h=$c(d),m=function(a){a=a.oh();U.W(a,a.k().h()).select()};h.addEventListener(I.Dd,a.C1a,a);h.addEventListener(I.tc,m,a);f.addEventListener(I.Dd,a.B1a,a);f.addEventListener(I.tc,m,a);a.nAa=l}a.fe(d,b,g,e)}
u.Va=function(a,b){Je.f.Va.call(this,a,b);var d=nu(a);if(d==b&&H.hc(d)){var e=w.b,f=a.getId(),g=this.d().e(),d=e.getElementById(M.g(g,"content")),g=e.getElementById(M.g(g,Je.w5)),e=e.getElementById(f+Je.ora);d.insertBefore(b,g);H.setVisible(e,p);H.setVisible(b,p)}};z.a("AdfDhtmlRichTextEditorPeer.prototype.PopupClosed",{Va:Je.prototype.Va});