var Y=I.ea(bf,"AdfDhtmlCodeEditorPeer",!1);m("AdfDhtmlCodeEditorPeer",Y);Y.C=function(){r.bb(AdfRichCodeEditor);I.ra(this,D.Nd,ab.ed,D.Bc,D.Pc);this.Fl()};m("AdfDhtmlCodeEditorPeer.InitSubclass",Y.C);
Y.Fl=function(){this.lAa="AdfCodeEditorMarkers";this.oAa="/afr/codemirror/";this.WYa=this.oAa+"codemirror.css";this.TI="cmd_undo";this.RI="cmd_redo";this.jD="cmd_search_next";this.SI="cmd_search_previous";this.H_="cmd_replace_all";this.I_="cmd_replace_next";this.QI="cmd_jump";this.f1="cc";this.nYa="ci";this.mAa="hsp";this.nAa="ll";this.KYa="llv";this.RYa="_afrSearchPopup";this.aea="tb";this.qZa="_afrUndo";this.kZa="_afrRedo";this.k1="_afrSearchNext";this.gea="_afrSearchPrevious";this.tAa="_afrJump";
this.pZa="_afrSearchPopupShow";this.nZa="_afrSearchNextPopup";this.oZa="_afrSearchPreviousPopup";this.lZa="_afrReplaceAllPopup";this.mZa="_afrReplaceNextPopup";this.l1="_afrSearchPopupField";this.uAa="_afrReplacePopupField";this.i1="_afrCaseSensitivePopupField";this.n1="_afrWholeWordsPopupField";this.hea="_afrWrapPopupField";this.m1="_afrSearchToolbarField";this.j1="_afrJumpField";this.$da=", ";this.MYa="af|codeEditor::markers-content-container";this.LYa="af|codeEditor::markers-content";this.NYa=
"af|codeEditor::markers-label";this.OYa="af|codeEditor::markers-text";this.CYa="af|codeEditor::editor-lines";this.IYa="af|codeEditor::editor-scroll";this.yYa="af|codeEditor::editor-gutter";this.zYa="af|codeEditor::editor-gutter-linenumbers";this.gn="af|codeEditor::editor-search-highlight";this.GYa="af|codeEditor::editor-jump-highlight";this.DYa="af|codeEditor::editor-marker-error";this.EYa="af|codeEditor::editor-marker-fatal";this.HYa="af|codeEditor::editor-marker-warning";this.FYa="af|codeEditor::editor-marker-info";
this.JYa="af|codeEditor::editor-text";this.rYa="af|codeEditor::editor-disabled-text";this.TYa="af|codeEditor::small-fatal-icon";this.SYa="af|codeEditor::small-error-icon";this.VYa="af|codeEditor::small-warning-icon";this.UYa="af|codeEditor::small-info-icon";this.QYa="af|codeEditor::message-summary-text";this.PYa="af|codeEditor::message-icon-style";this.xYa="af|codeEditor::editor-fold-marker";this.sYa="af|codeEditor::editor-fold-gutter";this.wYa="af|codeEditor::editor-fold-gutter-open";this.uYa="af|codeEditor::editor-fold-gutter-folded";
this.vYa="af|codeEditor::editor-fold-gutter-open-after";this.tYa="af|codeEditor::editor-fold-gutter-folded-after";this.oYa="af|codeEditor::editor-breakpoints";this.pYa="af|codeEditor::editor-codemirror";this.qYa="af|codeEditor::editor-code-completions";this.BYa="af|codeEditor::editor-code-hint";this.AYa="af|codeEditor::editor-code-hint-active";this.zi=[];this.zi[Y.CYa]=".CodeMirror-lines";this.zi[Y.IYa]=".CodeMirror-scroll";this.zi[Y.yYa]=".CodeMirror-gutter";this.zi[Y.zYa]=".CodeMirror-gutter-text";
this.zi[Y.JYa]=".CodeMirror pre";this.zi[Y.xYa]=".CodeMirror-foldmarker";this.zi[Y.sYa]=".CodeMirror-foldgutter";this.zi[Y.wYa]=".CodeMirror-foldgutter-open";this.zi[Y.uYa]=".CodeMirror-foldgutter-folded";this.zi[Y.vYa]=".CodeMirror-foldgutter-open:after";this.zi[Y.tYa]=".CodeMirror-foldgutter-folded:after";this.zi[Y.oYa]=".breakpoints";this.zi[Y.pYa]=".CodeMirror";this.zi[Y.qYa]=".CodeMirror-hints";this.zi[Y.BYa]=".CodeMirror-hint";this.zi[Y.AYa]="li.CodeMirror-hint-active"};
m("AdfDhtmlCodeEditorPeer.InitConstants",Y.Fl);Y.prototype.cf=function(){return this.WA};r.a("AdfDhtmlCodeEditorPeer.prototype.getEditorInstance",{cf:Y.prototype.cf});
Y.prototype.G=function(a,b){Y.h.G.call(this,a,b);if(a){var d=a.getId();this.TM=!1;A.c.uq(a);A.c.lv(a);a:{var e=A.c.ml(Y.WYa),f=q.b,g=f.R();this.Cx||(this.Cx=[]);if(1!=this.Cx[e]){this.Cx[e]=!1;for(var h=C.ib(g.documentElement,"HEAD"),l=h.getElementsByTagName("LINK"),n=null,t=0;t<l.length;t++){var y=l[t];if(y.getAttribute("href")!=e){n=y;break}}for(t=0;t<l.length;t++)if(y=l[t],y.getAttribute("href")==e)break a;f.S()==q.ia&&11>f.Ib()?g.createStyleSheet(e):(y=g.createElement("link"),y.setAttribute("type",
"text/css"),y.setAttribute("rel","stylesheet"),y.setAttribute("href",e),n?h.insertBefore(y,n):h.appendChild(y))}}this.XMa=[];"lazy"==a.getContentDelivery()&&this.ija(a);a.getSimple()||("auto"==b.style.height&&(b.style.height=""),"auto"==b.style.width&&(b.style.width=""));this.uh(d+Y.qZa,Y.TI,null);this.uh(d+Y.kZa,Y.RI,null);this.uh(d+Y.k1,Y.jD,[d+Y.m1,null,null,null]);this.uh(d+Y.gea,Y.SI,[d+Y.m1,null,null,null]);this.uh(d+Y.lZa,Y.H_,[d+Y.l1,d+Y.uAa,d+Y.i1,d+Y.n1]);this.uh(d+Y.mZa,Y.I_,[d+Y.l1,d+
Y.uAa,d+Y.i1,d+Y.n1,d+Y.hea]);this.uh(d+Y.nZa,Y.jD,[d+Y.l1,d+Y.i1,d+Y.n1,d+Y.hea]);this.uh(d+Y.oZa,Y.SI,[d+Y.l1,d+Y.i1,d+Y.n1,d+Y.hea]);this.uh(d+Y.tAa,Y.QI,d+Y.j1);this.bia(a);Y.XQa(a,b)}};r.a("AdfDhtmlCodeEditorPeer.prototype.InitDomElement",{G:Y.prototype.G});Y.prototype.uh=function(a,b,d){u.J(a);u.J(b);"cmd"==b.substring(0,3)?this.aia(a,b,d):v.l.severe("Unable to add binding [",b,"] for ",a," to ",this.f().g())};r.a("AdfDhtmlCodeEditorPeer.prototype.addBinding",{uh:Y.prototype.uh});
Y.prototype.yY=function(a,b){for(var d=this.Th,e=d.length,f=0;f<e;f++){var g=d[f];if(g.xf==a&&(!b||b==g.Id)){if(g.xf==Y.AWa||g.xf==Y.jD||g.xf==Y.SI||g.xf==Y.H_||g.xf==Y.I_||g.xf==Y.QI){d=null;if(g.xf==Y.AWa||g.xf==Y.jD||g.xf==Y.SI){var d=A.c.m(g.Ze[0]),h=O.da(d,d.o().i()),l=f=e=!1;if(null!=g.Ze[1]){var n=A.c.m(g.Ze[1]);n&&(e=n.getValue())}null!=g.Ze[2]&&(n=A.c.m(g.Ze[2]))&&(f=n.getValue());null!=g.Ze[3]&&(n=A.c.m(g.Ze[3]))&&(l=n.getValue());n=h.value;if(null==h.value||0==h.value.length)n=d.getValue();
d=[n,e,f,l]}else g.xf==Y.H_||g.xf==Y.I_?(d=A.c.m(g.Ze[0]),h=A.c.m(g.Ze[1]),l=f=e=!1,null!=g.Ze[2]&&(n=A.c.m(g.Ze[2]))&&(e=n.getValue()),null!=g.Ze[3]&&(n=A.c.m(g.Ze[3]))&&(f=n.getValue()),null!=g.Ze[4]&&(n=A.c.m(g.Ze[4]))&&(l=n.getValue()),d=[d.getValue(),h.getValue(),e,f,l]):g.xf==Y.QI&&(d=A.c.m(g.Ze),d=O.da(d,d.o().i()).value);return this.ne(g.xf,d)}return this.ne(g.xf,g.Ze)}}return null};r.a("AdfDhtmlCodeEditorPeer.prototype.executeBinding",{yY:Y.prototype.yY});
Y.prototype.oo=function(){return this.TM?G.tt:G.ut};r.a("AdfDhtmlCodeEditorPeer.prototype.getReadyState",{oo:Y.prototype.oo});Y.prototype.Lb=function(a){if(a.Wd()==Qa.Ef){var b=this.f();this.Pja&&A.c.Oe(b.g());a={Id:b.g(),yva:a.X()};this.BL=page.ta(this,this.hkb,a,10)}else Y.h.Lb.call(this,a)};r.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentBlur",{Lb:Y.prototype.Lb});
Y.prototype.dg=function(a){if(void 0!=this.Th){a.Xc(!0);var b=a.getSource().g(),d=this.f().getId();b==d+Y.pZa&&(Y.Wn(this.f(),d+Y.RYa),a.cancel());for(var e=this.Th,f=e.length,g=0;g<f;g++){var h=e[g];if(h.Id==b){b=this.yY(h.xf,h.Id);this.CV();h.Id!=d+Y.k1&&h.Id!=d+Y.gea||b||(A.c.m(h.Id).setProperty("disabled",!0,!1,!1),this.s6=null);a.cancel();break}}}};r.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentAction",{dg:Y.prototype.dg});
Y.prototype.Ta=function(a){Y.h.Ta.call(this,a);var b=this.f();!b.getReadOnly()&&Y.jMa(b,a)&&(a=Y.kV(b),bf.wl(a),Y.zoa(b,this.cf()))};r.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentFocus",{Ta:Y.prototype.Ta});
Y.prototype.ma=function(a){var b=this.f(),d=a.na(),e=a.U();if(Y.jMa(b,a))if(b=this.cf(),w.XQ==d&&(this.TLa=!0,a.cancel()),this.TLa)if(w.Ih==d)this.TLa=!1;else{if(w.tf==d)if(e.shiftKey)b.indentLine(b.getCursor(!0).line,"subtract");else CodeMirror.rvb[b.getCursor(!0).line!=b.getCursor().line?"indentMore":"insertTab"](b)}else w.tf==a.na()&&(Pn(this),e.shiftKey?J.ni(A.c.wd):J.ce(A.c.wd));else d=b.getId(),w.jb==a.na()&&(a=A.c.wd,-1!=a.id.indexOf(d+Y.j1)?this.yY(Y.QI,d+Y.tAa):-1!=a.id.indexOf(b.getId()+
Y.m1)&&this.yY(Y.jD,d+Y.k1))};r.a("AdfDhtmlCodeEditorPeer.prototype.HandleComponentKeyDown",{ma:Y.prototype.ma});Y.prototype.nd=function(a,b,d){a.g();this.cf().save();if(C.Nb(this.cf().getWrapperElement(),b)){b=Y.kV(a);var e=Y.qka(a);if(this.Ll(a)){var f=bf.ls(b),g=b.value;d&&g==f||(bf.wl(b,g),this.cc(a,g))}null!=e&&(Y.moa(a,e),this.WA.getScrollerElement().scrollTop=e.scrollTop,Y.zoa(a,this.cf()))}};r.a("AdfDhtmlCodeEditorPeer.prototype.RunValidation",{nd:Y.prototype.nd});
Y.prototype.Ba=function(a,b,d){u.J(d);this.cf().getValue()!=d&&(this.cf().setValue(d),this.cf().save())};r.a("AdfDhtmlCodeEditorPeer.prototype.SetDisplayValue",{Ba:Y.prototype.Ba});Y.prototype.Wa=function(a){null!=this.cf()&&(this.cf().save(),this.Pja=!1);a=Y.kV(a).value;return null!=a&&0==a.length?null:a};r.a("AdfDhtmlCodeEditorPeer.prototype.GetSubmittedValue",{Wa:Y.prototype.Wa});
Y.prototype.Tra=function(a,b){var d=a.getCursor(),d=b.Meb(d.line,d.ch);u.assert(null!=d);u.Mb(d.$vb);u.Da(d.from.Db);u.Da(d.to.Db);u.Da(d.from.epb);u.Da(d.to.epb);return{list:d.hints,from:{Zqb:d.from.row,ch:d.from.column},to:{Zqb:d.to.row,ch:d.to.column}}};r.a("AdfDhtmlCodeEditorPeer.prototype.getHintsWrapper",{Tra:Y.prototype.Tra});Y.prototype.hda=function(a,b){a.o().Meb=b};r.a("AdfDhtmlCodeEditorPeer.prototype.SetHintsFunction",{hda:Y.prototype.hda});
Y.prototype.vi=function(a,b){Y.h.vi.call(this,a,b);var d=q.b,e=A.c.H(),f="",g,h=this.f(),l={Nqa:0,Tva:0,ata:0,Wqa:0};if(null!=b){var n=!0;g=!1;for(var t=A.c.R(),y=null,z=0;z<b.length;z++){var B=b[z].K(Y.lAa);if(null!=B&&0<B.length)for(var y=t.createElement("table"),F=0;F<B.length;F++){var K=B[F],P=K.AC(),Q=K.KH();if(null!=P&&null!=Q){g=K;P=g.AC();Q=g.KH();null==Q&&(Q=1);n&&this.Vf(P,Q);n={};n.xs=g;n.id=this.XMa.push(n)-1;Y.UMa(this.f(),g,n);g=n;P=K;A.c.H();var n=P.AC(),P=Qn(P),P=Rn(P),Q=document.createElement("div"),
da=document.createElement("span");da.appendChild(P);Q.appendChild(da);this.cf().Hwb(n-1,"breakpoints",Q);n=Ba.getType(K.aq());n==Ba.hg?l.Nqa++:n==Ba.Jl?l.Wqa++:n==Ba.Ro?l.Tva++:n==Ba.Ij&&l.ata++;n=!1;P=Qn(K);K=t.createElement("tr");y.appendChild(K);Q=t.createElement("td");C.w(Q,e.getStyleClass(Y.PYa));d.setAttribute(Q,"valign","top");K.appendChild(Q);Q.appendChild(Rn(P));P=t.createElement("td");K.appendChild(P);P.appendChild(Sn(this,g));g=!0}}}g&&(B=I.la(this.f().g(),"markers"),g=Tn(this),z=d.getElementById(B),
F=d.getElementById(g),K=O.da(h),F||(F=t.createElement("div"),F.id=g,C.w(F,e.getStyleClass(Y.NYa)),K.appendChild(F),g=A.c.H().Z("af_codeEditor.LABEL_MARKERS"),markersLabelTextNode=t.createTextNode(g),g=t.createElement("label"),C.w(g,e.getStyleClass(Y.QYa)),P=n="",0<l.Nqa&&(P=L.Xu(Ba.hg,!1),f+=P+": "+l.Nqa),0<l.Tva&&(P=L.Xu(Ba.Ro,!1),0<f.length&&(n=Y.$da),f+=n+P+": "+l.Tva),0<l.Wqa&&(P=L.Xu(Ba.Jl,!1),0<f.length&&(n=Y.$da),f+=n+P+": "+l.Wqa),0<l.ata&&(P=L.Xu(Ba.Ij,!1),0<f.length&&(n=Y.$da),f+=n+P+": "+
l.ata),g.appendChild(t.createTextNode(f)),F.appendChild(markersLabelTextNode),F.appendChild(g),d.Ia(F)),z||(z=t.createElement("div"),z.id=B,C.w(z,e.getStyleClass(Y.MYa)),K.appendChild(z),f=t.createElement("div"),C.w(f,e.getStyleClass(Y.LYa)),z.appendChild(f),f.appendChild(t.createElement("div")),d.Ia(z)),f=z.children[0],f.appendChild(y),Un(this,h))}};r.a("AdfDhtmlCodeEditorPeer.prototype.MessageNotify",{vi:Y.prototype.vi});Y.prototype.ya=function(){return!0};
r.a("AdfDhtmlCodeEditorPeer.prototype.needsResizeNotify",{ya:Y.prototype.ya});Y.prototype.Re=function(a,b,d,e,f){Un(this,a,f)};r.a("AdfDhtmlCodeEditorPeer.prototype.resizeNotify",{Re:Y.prototype.Re});Y.prototype.Ue=function(a){if(this.Pja)return!0;a=a.g();if(L.Xsa(a)){a=A.c.Up(a);for(var b=0;b<a.length;b++){var d=a[b];if(null!=d.K&&"function"==typeof d.K){var e=d.K(Y.lAa);if(null!=e&&0<e.length&&null==d.getSummary()&&null==d.Cra())return!0}}}return Y.h.Ue.call(this)};
r.a("AdfDhtmlCodeEditorPeer.prototype.VetoShowNoteWindow",{Ue:Y.prototype.Ue});k=Y.prototype;k.ija=function(a){var b=q.b,d=A.c,e=a.g(),e=I.j(e,Y.nAa),e=b.getElementById(e),f=this.R().createElement("IFRAME");b.setAttribute(f,"frameBorder","0");b.setAttribute(f,"id",e.id);b.setAttribute(f,"src",d.p9(a.g()));b.setAttribute(f,"style","width: 0px; height: 0px; visibility:hidden;");a=this.D(this.wM);b.ba(f,"load",a);e.parentNode.replaceChild(f,e);b.yc(e);b.Ia(f)};k.wM=function(){var a=this.f();Y.wM(a)};
function Qn(a){var b="";a=Ba.getType(a.aq());a==Ba.hg?b=Y.SYa:a==Ba.Jl?b=Y.TYa:a==Ba.Ro?b=Y.VYa:a==Ba.Ij&&(b=Y.UYa);return b}k.Jcb=function(a){a&&a.save()};k.Kcb=function(a){a&&(this.Pja=!0,Y.zoa(this.f(),a))};k.gh=function(){if(null!=this.cf())this.cf().focus();else{var a=this.f();A.c.ta(a,a.focus,null,300)}};r.a("AdfDhtmlCodeEditorPeer.prototype.Focus",{gh:Y.prototype.gh});k=Y.prototype;
k.hkb=function(a){var b=A.c;delete this.BL;var d=a.Id,e=document.activeElement;!C.Nb(this.i(),e)&&(b=b.m(d))&&(this.bind(b),this.nd(b,a.yva,!0))};
function Un(a,b,d){var e=b.g(),f=q.b,g=f.getElementById(I.j(e,Y.f1)),h=I.la(a.f().g(),"markers"),h=f.getElementById(h),l=f.getElementById(Tn(a));O.da(b,a.i());e=f.getElementById(I.j(e,Y.aea)).offsetHeight;if(h||l){var n=h.children[0],t,y=q.b,z=b.g();t=A.c.H().qa("af|codeEditor-tr-markers-max-height");b=O.da(b,a.i()).clientHeight;z=y.getElementById(I.j(z,Y.aea)).offsetHeight;a=y.getElementById(Tn(a)).offsetHeight;a=b-z-a;b=null;if(-1!==t.indexOf("%",t.length-1))b=a*t.substr(0,t.length-1)/100;else if(-1!==
t.indexOf("px",t.length-1)||NaN!=parseInt(t))b=NaN!=parseInt(t)?parseInt(t):parseInt(t.substr(0,t.length-2)),b=Math.min(a,b);t=b;null!=n.children&&(l=l.offsetHeight,n=h.offsetHeight,n>t&&(n=t),f.setAttribute(g,"style","width:auto;height:"+(d-e-l-n)+"px;"),f.setAttribute(h,"style","width:auto;height:"+n+"px;"))}else f.setAttribute(g,"style","width:auto;height:"+(d-e)+"px")}function Tn(a){return I.la(a.f().g(),"markersLabel")}
function Sn(a,b){var d=q.b,e=A.c,f=e.H(),e=e.R(),g=b.xs,h=e.createElement("a");C.w(h,f.getStyleClass(Y.OYa));var f="("+g.AC()+","+g.KH()+") ",l=Ba.getType(g.aq()),l=L.Xu(l,!1),n=null,g=n=null!=g.getMessage()?l+f+": "+g.getMessage():l+f+": ";h.title=g;h.href="javascript:;";d.setAttribute(h,"_markerInfoId",b.id);d=a.D(a.Jib);q.b.ba(h,"click",d);h.appendChild(e.createTextNode(g));return h}function Rn(a){return A.c.H().getIcon(a)}
k.Jib=function(a){var b=q.b;b.preventDefault(a);if(a=b.ca(a).getAttribute("_markerInfoId")){var d=this.XMa[a];a=d.markText.find();b=d.xs.AC();d=d.xs.KH();null!=a.from&&(b=a.from.line+1,d=a.from.ch+1);this.Vf(b,d)}this.f().focus()};k.aia=function(a,b,d){u.J(a);u.J(b);this.Th||(this.Th=[]);for(var e=this.Th.length,f=null,g=0;g<e;g++){var h=this.Th[g];if(h.Id==a&&h.xf==b){h.Ze=d;f=h;break}}null==f&&(f={Id:a,xf:b,Ze:d},this.Th.push(f));(a=A.c.m(a))&&(a.Dm(this.f())||a.addEventListener(ab.ed,this.NL,this))};
k.JOa=function(a){var b=this.Th;if(void 0!=b)for(var d=b.length,e=this.NL,f=0;f<d;f++){var g=A.c.m(b[f].Id);void 0!=g&&(g.Dm(a)||g.removeEventListener(ab.ed,e,this))}};
k.ne=function(a,b){u.J(a);if(a==Y.TI)return Pn(this);if(a==Y.RI){var d=this.cf();d.redo();d.save();return d.historySize().redo}if(a==Y.jD){if(null!=b[0])return Vn(this,b)}else if(a==Y.SI){if(null!=b[0])return Wn(this,b)}else if(a==Y.H_){if(null!=b[0]&&null!=b[1]){var e=b[0],d=b[1],f=b[2],g=b[3];A.c.H();var h=this.cf();Xn(this);if(e){Yn(this,null,f,g);g=Yn(this,e,f);e=[];for(f=!1;g.findNext();)e.push({from:g.from(),to:g.to()}),f=!0;for(g=0;g<e.length;g++)h.replaceRange(d,e[g].from,e[g].to);h.save();
d=f}else d=!1;return d}}else if(a==Y.I_){if(null!=b[0]&&null!=b[1]){var l=b[0],d=b[1],n=b[2],t=b[3],h=b[4],e=A.c.H(),g=f=!1;if(l){for(var y=this.cf(),l=Yn(this,l,n,t),n=0;n<Zn(this).length;n++)if(Zn(this)[n].WP==Y.gn&&(t=Zn(this)[n].xs.find(),t.from.ch==l.pos.from.ch&&t.from.line==l.pos.from.line&&t.to.ch==l.pos.to.ch&&t.to.line==l.pos.to.line)){g=!0;break}g||l.findNext()&&(g=!0);if(g)y.replaceRange(d,l.from(),l.to()),Xn(this),l.findNext()&&(Zn(this).push({WP:Y.gn,xs:y.markText(l.from(),l.to(),{className:e.qa(Y.gn)})}),
this.Vf(l.from().line,l.from().ch)),f=!0;else if(this.H5)f=!1;else if(h){for(;l.findPrevious(););l.findNext()?(y.replaceRange(d,l.from(),l.to()),Xn(this),l.findNext()&&(Zn(this).push({WP:Y.gn,xs:y.markText(l.from(),l.to(),{className:e.qa(Y.gn)})}),this.Vf(l.from().line,l.from().ch)),f=!0):f=!1}y.save();d=f}else d=!1;return d}}else if(a==Y.QI&&null!=b){this.WMa&&this.WMa.clear();this.WMa=this.cf().markText({line:b-1,ch:0},{line:b-1,ch:9999},{className:A.c.H().qa(Y.GYa)});this.Vf(b,1);return}return null};
k.bia=function(a){var b=q.b,d=a.getId();a=Y.kV(a).parentNode;var e=b.getElementById(d+Y.m1),d=b.getElementById(d+Y.j1);this.Zt=this.D(this.CV);b.ba(a,"mouseup",this.Zt);b.ba(a,"keyup",this.Zt);e&&b.ba(e,"keyup",this.Zt);d&&b.ba(d,"keyup",this.Zt)};
k.CV=function(){var a=this.f();if(a&&a&&!a.getDisabled())if(this.TM){var a=this.Th,b=a.length,d=this.s6,e=this.cf().historySize(),f=this.f().getId();if(void 0==d||null==d)d={};for(var g={},h=0;h<b;h++){var l=a[h],n=l.xf,t=A.c.m(l.Id);if(t){var y=!1;void 0===g[n]&&(n==Y.TI?(g[n]=e.undo&&0<e.undo?!0:!1,y=!0):n==Y.RI?(g[n]=e.redo&&0<e.redo?!0:!1,y=!0):n==Y.jD?l.Id==f+Y.k1&&(l=A.c.m(l.Ze[0]),l=l.getSubmittedValue(),g[n]=null!=l&&0<l.length?!0:!1,y=!0):n==Y.SI?l.Id==f+Y.gea&&(l=A.c.m(l.Ze[0]),l=l.getSubmittedValue(),
g[n]=null!=l&&0<l.length?!0:!1,y=!0):n==Y.QI&&l.Id==f+Y.j1&&(l=A.c.m(l.Ze).getSubmittedValue(),g[n]=null!=l&&0<l.length?!0:!1,y=!0));d[n]!==g[n]&&y&&t.setProperty("disabled",!g[n],!1,!1)}}this.s6=g}else{var z=a.o();setTimeout(function(){z.CV()},500)}};function Pn(a){a=a.cf();a.undo();a.save();return a.historySize().undo}
function Yn(a,b,d,e){var f=a.cf(),g=!1;if(!a.d7)g=!0;else if(a.d7.text!=b||a.d7.bpb!=d||a.d7.Hsb!=e)g=!0;if(g){g=1!=d;a.d7={text:b,bpb:d,Hsb:e};d=!1;var h=null;if(e){e="g";g&&(e+="i");if(b)for(h=0;h<b.length;h++)if(128<b.charCodeAt(h)){d=!0;break}h=d?new RegExp("(^|\\s)[!-//:-@[-`{-~]?"+b+"[!-//:-@[-`{-~]?(?\x3d\\s|$)",e):new RegExp("\\b"+b+"\\b",e);a.sPa=f.getSearchCursor(h,{line:0,ch:0},g)}else a.sPa=f.getSearchCursor(b,{line:0,ch:0},g);a.H5=!0}else a.H5=!1;return a.sPa}
function Vn(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=A.c.H();Xn(a);if(!d)return!1;var l=a.cf(),d=Yn(a,d,e,f);if(d.findNext())return Zn(a).push({WP:Y.gn,xs:l.markText(d.from(),d.to(),{className:h.qa(Y.gn)})}),a.Vf(d.from().line,d.from().ch),!0;if(!a.H5&&g){for(;d.findPrevious(););if(d.findNext())return Zn(a).push({WP:Y.gn,xs:l.markText(d.from(),d.to(),{className:h.qa(Y.gn)})}),a.Vf(d.from().line,d.from().ch),!0}return!1}
function Wn(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=A.c.H();Xn(a);if(!d)return!1;var l=a.cf(),d=Yn(a,d,e,f);if(d.findPrevious())return Zn(a).push({WP:Y.gn,xs:l.markText(d.from(),d.to(),{className:h.qa(Y.gn)})}),a.Vf(d.from().line,d.from().ch),!0;if(!a.H5&&g){for(;d.findNext(););if(d.findPrevious())return Zn(a).push({WP:Y.gn,xs:l.markText(d.from(),d.to(),{className:h.qa(Y.gn)})}),a.Vf(d.from().line,d.from().ch),!0}return!1}k.Vf=function(a,b){Y.Vf(this.f(),a,b)};
function Xn(a){for(var b=0;b<Zn(a).length;b++)Zn(a)[b].xs.clear();Zn(a).length=0}function Zn(a){null==a.VMa&&(a.VMa=[]);return a.VMa}Y.iPa=function(a,b){if(!a||0===a.length)return"";for(var d=null,e=I.lb,f=0,g=a.length;f<g;f++){var h=a[f].indexOf(e);if(b&&-1<h){d=a[f];break}else if(!b&&-1===h){d=a[f];break}}return null===d?"":Y.cKa(d)};
Y.uhb=function(a){var b=q.b,d=a.g(),e=a.o(),f=A.c.H(),g=a.getDisabled(),h;for(h in Y.zi){var l="."+f.qa(h),n=Y.zi[h],l=Y.hka("(^|\\s|,)\\"+l+"([{|,|\\.|\\s]|$)",!0);null!=l&&Y.FGa(a,n,Y.iPa(l,g))}g&&(f="."+f.qa(Y.rYa),f=Y.hka("(^|\\s|,)\\"+f+"([{|,|\\.|\\s]|$)",!0),Y.Elb(a,Y.iPa(f,g)));h=a.getLanguage();g=!1;if(a.getDisabled()||a.getReadOnly())g=!0;(f={java:"text/x-java",text:"text/plain"}[h])||(f=h);h=!0;"no"==a.getLineNumbers()&&(h=!1);var n=Y.kV(a),l=!1,t;"enabled"==a.getCodeFold()&&(t=function(a){a.Ovb(a.getCursor())},
l=!0);e.WA=CodeMirror.fromTextArea(n,{gutter:!0,lineNumbers:h,matchBrackets:!0,mode:f,readOnly:g,theme:"default",inputStyle:"contenteditable",leaveSubmitMethodAlone:!0,foldGutter:l,gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-foldgutter"],extraKeys:{"Ctrl-Q":t,"Ctrl-Space":function(a){CodeMirror.Kwb(a,function(a){return e.Tra(a,e)})}}});e.WA&&(e.WA.Qta("blur",e.D(e.Jcb)),e.WA.Qta("change",e.D(e.Kcb)));t=Y.qka(a);null==t||a.getDisabled()||Y.moa(a,t);b.getElementById(I.j(d,Y.aea)).style.visibility=
"visible";b=b.getElementById(I.j(d,Y.f1));if(d=Y.jeb(b))(t=a.getLabel())?d.setAttribute("aria-label",t):d.setAttribute("aria-label",""),d.setAttribute("aria-multiline","true"),d.setAttribute("role","textbox");b.style.visibility="visible";Y.BPa(a)};
Y.FGa=function(a,b,d){var e=a.o();a=q.b;var f=A.c.R();null==e.D7&&(e.D7=f.createElement("style"),e.D7.type="text/css",f.getElementsByTagName("head")[0].appendChild(e.D7));e=e.D7;e.styleSheet?a.S()==q.ia?""!=d&&e.styleSheet.addRule(b,d):e.styleSheet.addRule(b,d):e.appendChild(f.createTextNode(b+" {"+d+"}"))};
Y.Iab=function(a,b){for(var d=q.b,e=a.o(),f=A.c.R(),g=0;g<f.styleSheets.length;g++){var h=f.styleSheets[g];if(Y.Pla(h,b))try{if(d.S()==q.ia){if(h.rules){e.Cx[b]=!0;break}}else if(h.cssRules){e.Cx[b]=!0;break}}catch(l){}}};Y.kV=function(a){var b=q.b;a=a.g();a=I.j(a,Y.nYa);return b.getElementById(a)};
Y.hka=function(a,b){for(var d=q.b,e=A.c.R(),f=new RegExp(a),g=[],h=0;h<e.styleSheets.length;h++){var l=e.styleSheets[h];if(Y.mib(l,b))if(d.S()==q.ia){if(l=l.rules,null!=l)for(var n=0;n<l.length;n++){var t=l.item(n);f.test(t.selectorText)&&g.push(t.selectorText+" {"+t.style.cssText+"}")}}else if(l=l.cssRules,null!=l)for(n=0;n<l.length;n++){var t=l[n],y=Y.jka(t.cssText);null!=y&&f.test(y)&&g.push(t.cssText)}}return g};
Y.jka=function(a){var b=null;null!=a&&(b=a.substring(0,a.indexOf("{")-1),b=b.replace(/^\s+|\s+$/g,""));return b};Y.cKa=function(a){a=a.substring(a.indexOf("{")+1,a.indexOf("}"));return a=a.replace(/^\s+|\s+$/g,"")};Y.qka=function(a){var b=q.b;a=I.j(a.g(),Y.mAa);a=b.getElementById(a);b=b.getAttribute(a,"value");return null!=b&&(b=b.split(","),null!=b&&5==b.length)?{start:{line:Number(b[0]),ch:Number(b[1])},end:{line:Number(b[2]),ch:Number(b[3])},scrollTop:Number(b[4])}:null};
Y.Pla=function(a,b){return b?a.href&&a.href.match(b+"$")==b:a.href&&-1!=a.href.indexOf(Y.oAa)};Y.Shb=function(a){a=a.ownerNode;return a.hasAttribute("data-afr-stylesheet")&&!a.hasAttribute("afrres")};Y.mib=function(a,b){return b?Y.Shb(a):Y.Pla(a)};Y.moa=function(a,b){var d=a.o();b.start.line==b.end.line&&b.start.ch==b.end.ch?d.WA.setCursor(Number(b.start.line),Number(b.start.ch)):d.WA.setSelection(b.start,b.end)};
Y.wM=function(a){var b=q.b,d=a.g(),e=a.o(),f=I.j(d,Y.nAa),d=I.j(d,Y.KYa),b=b.getElementById(f),b=b.contentWindow||b.contentDocument;b.document&&(b=b.document);d=b.getElementById(d).value;null!=d&&(e=e.cf(),null!=e?(b=Y.qka(a),e.setValue(d),e.save(),null!=b&&Y.moa(a,b)):setTimeout(function(){Y.wM(a)},1E3))};
Y.jMa=function(a,b){var d=q.b,e=a.g(),e=I.j(e,Y.f1),f=b.X(),g=!1;d.getAttribute(f,"id")==e&&(g=!0);if(!g)for(f=f.parentNode;null!=f&&null!=f.parentNode;)if(d.getAttribute(f,"id")==e){g=!0;break}else f=f.parentNode;return g};
Y.UMa=function(a,b,d){var e=A.c.H(),f=a.o().cf();if(null!=f){var g=b.AC(),h=b.KH(),l=b.Jra(),n=b.Ira();null==h&&(h=1);null==n&&(n=f.lineInfo(l-1).text.length+1);var t=Ba.getType(b.aq()),y=null;t==Ba.hg?y=e.qa(Y.DYa):t==Ba.Jl?y=e.qa(Y.EYa):t==Ba.Ro?y=e.qa(Y.HYa):t==Ba.Ij&&(y=e.qa(Y.FYa));d.markText=f.markText({line:g-1,ch:h-1},{line:l-1,ch:n-1},{className:y})}else setTimeout(function(){Y.UMa(a,b,d)},1E3)};
Y.qlb=function(a){for(var b=q.b,d=A.c.R(),e=0;e<d.styleSheets.length;e++){var f=d.styleSheets[e];if(!Y.Pla(f))break;if(b.S()==q.ia)for(var g=f.rules,h=0;h<g.length;h++){if(g[h].selectorText==a){f.removeRule[h];break}}else for(g=f.cssRules,h=0;h<g.length;h++)if(Y.jka(g[h].cssText)==a){f.deleteRule[h];break}}};Y.Elb=function(a,b){for(var d=Y.hka("^\\.cm-s-default span\\.cm",!1),e=0;e<d.length;e++){var f=Y.jka(d[e]);Y.qlb(f);Y.FGa(a,f,b)}};
Y.Vf=function(a,b,d){var e=a.o().cf();if(null!=e){b&&0<b&&--b;d&&0<d&&--d;var f=e.getCursor();f.line==b&&f.ch==d&&(0<b?e.setCursor({line:b-1,ch:d}):e.setCursor({line:b+1,ch:d}));e.setCursor({line:b,ch:d})}else setTimeout(function(){Y.Vf(a,b,d)},1E3)};Y.zoa=function(a,b){var d=q.b;if(a){var e=a.g(),e=I.j(e,Y.mAa),e=d.getElementById(e),f=b.getCursor(!0).line+","+b.getCursor(!0).ch,g=b.getCursor(!1).line+","+b.getCursor(!1).ch,h=b.getScrollerElement().scrollTop;d.setAttribute(e,"value",f+","+g+","+h)}};
Y.BPa=function(a,b){var d=q.b,e=a.g(),f=a.o();0==d.getElementById(I.j(e,Y.f1)).clientWidth?setTimeout(function(){Y.BPa(a,!0)},500):setTimeout(function(){(d.S()==q.ia||b)&&f.WA.refresh();f.CV();f.TM=!0;A.c.uq(f.f())},1E3)};Y.Wn=function(a,b){A.c.Oe(a.g());var d=A.c.m(b),e={};e[AdfRichPopup.cg]=a.g();d.show(e)};Y.XQa=function(a,b){var d=a.o();if(d){var e=!0,f;for(f in d.Cx)Y.Iab(a,f),0==d.Cx[f]&&(e=!1);e?Y.uhb(a):setTimeout(function(){Y.XQa(a,b)},2E3)}};
Y.jeb=function(a){return a&&(a=a.getElementsByClassName("CodeMirror-code"))?a[0]:null};