var Y=I.ea($e,"AdfDhtmlCodeEditorPeer",!1);m("AdfDhtmlCodeEditorPeer",Y);Y.C=function(){r.bb(AdfRichCodeEditor);I.ra(this,D.Nd,ab.cd,D.Bc,D.Oc);this.Fl()};m("AdfDhtmlCodeEditorPeer.InitSubclass",Y.C);
Y.Fl=function(){this.hAa="AdfCodeEditorMarkers";this.kAa="/afr/codemirror/";this.SYa=this.kAa+"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.jYa="ci";this.iAa="hsp";this.jAa="ll";this.GYa="llv";this.NYa="_afrSearchPopup";this.Zda="tb";this.mZa="_afrUndo";this.gZa="_afrRedo";this.k1="_afrSearchNext";this.eea="_afrSearchPrevious";this.pAa="_afrJump";
this.lZa="_afrSearchPopupShow";this.jZa="_afrSearchNextPopup";this.kZa="_afrSearchPreviousPopup";this.hZa="_afrReplaceAllPopup";this.iZa="_afrReplaceNextPopup";this.l1="_afrSearchPopupField";this.qAa="_afrReplacePopupField";this.i1="_afrCaseSensitivePopupField";this.n1="_afrWholeWordsPopupField";this.fea="_afrWrapPopupField";this.m1="_afrSearchToolbarField";this.j1="_afrJumpField";this.Yda=", ";this.IYa="af|codeEditor::markers-content-container";this.HYa="af|codeEditor::markers-content";this.JYa=
"af|codeEditor::markers-label";this.KYa="af|codeEditor::markers-text";this.yYa="af|codeEditor::editor-lines";this.EYa="af|codeEditor::editor-scroll";this.uYa="af|codeEditor::editor-gutter";this.vYa="af|codeEditor::editor-gutter-linenumbers";this.gn="af|codeEditor::editor-search-highlight";this.CYa="af|codeEditor::editor-jump-highlight";this.zYa="af|codeEditor::editor-marker-error";this.AYa="af|codeEditor::editor-marker-fatal";this.DYa="af|codeEditor::editor-marker-warning";this.BYa="af|codeEditor::editor-marker-info";
this.FYa="af|codeEditor::editor-text";this.nYa="af|codeEditor::editor-disabled-text";this.PYa="af|codeEditor::small-fatal-icon";this.OYa="af|codeEditor::small-error-icon";this.RYa="af|codeEditor::small-warning-icon";this.QYa="af|codeEditor::small-info-icon";this.MYa="af|codeEditor::message-summary-text";this.LYa="af|codeEditor::message-icon-style";this.tYa="af|codeEditor::editor-fold-marker";this.oYa="af|codeEditor::editor-fold-gutter";this.sYa="af|codeEditor::editor-fold-gutter-open";this.qYa="af|codeEditor::editor-fold-gutter-folded";
this.rYa="af|codeEditor::editor-fold-gutter-open-after";this.pYa="af|codeEditor::editor-fold-gutter-folded-after";this.kYa="af|codeEditor::editor-breakpoints";this.lYa="af|codeEditor::editor-codemirror";this.mYa="af|codeEditor::editor-code-completions";this.xYa="af|codeEditor::editor-code-hint";this.wYa="af|codeEditor::editor-code-hint-active";this.zi=[];this.zi[Y.yYa]=".CodeMirror-lines";this.zi[Y.EYa]=".CodeMirror-scroll";this.zi[Y.uYa]=".CodeMirror-gutter";this.zi[Y.vYa]=".CodeMirror-gutter-text";
this.zi[Y.FYa]=".CodeMirror pre";this.zi[Y.tYa]=".CodeMirror-foldmarker";this.zi[Y.oYa]=".CodeMirror-foldgutter";this.zi[Y.sYa]=".CodeMirror-foldgutter-open";this.zi[Y.qYa]=".CodeMirror-foldgutter-folded";this.zi[Y.rYa]=".CodeMirror-foldgutter-open:after";this.zi[Y.pYa]=".CodeMirror-foldgutter-folded:after";this.zi[Y.kYa]=".breakpoints";this.zi[Y.lYa]=".CodeMirror";this.zi[Y.mYa]=".CodeMirror-hints";this.zi[Y.xYa]=".CodeMirror-hint";this.zi[Y.wYa]="li.CodeMirror-hint-active"};
m("AdfDhtmlCodeEditorPeer.InitConstants",Y.Fl);Y.prototype.bf=function(){return this.WA};r.a("AdfDhtmlCodeEditorPeer.prototype.getEditorInstance",{bf:Y.prototype.bf});
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.jv(a);a:{var e=A.c.ml(Y.SYa),f=q.b,g=f.R();this.Bx||(this.Bx=[]);if(1!=this.Bx[e]){this.Bx[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.SMa=[];"lazy"==a.getContentDelivery()&&this.fja(a);a.getSimple()||("auto"==b.style.height&&(b.style.height=""),"auto"==b.style.width&&(b.style.width=""));this.th(d+Y.mZa,Y.TI,null);this.th(d+Y.gZa,Y.RI,null);this.th(d+Y.k1,Y.jD,[d+Y.m1,null,null,null]);this.th(d+Y.eea,Y.SI,[d+Y.m1,null,null,null]);this.th(d+Y.hZa,Y.H_,[d+Y.l1,d+Y.qAa,d+Y.i1,d+Y.n1]);this.th(d+Y.iZa,Y.I_,[d+Y.l1,d+
Y.qAa,d+Y.i1,d+Y.n1,d+Y.fea]);this.th(d+Y.jZa,Y.jD,[d+Y.l1,d+Y.i1,d+Y.n1,d+Y.fea]);this.th(d+Y.kZa,Y.SI,[d+Y.l1,d+Y.i1,d+Y.n1,d+Y.fea]);this.th(d+Y.pAa,Y.QI,d+Y.j1);this.$ha(a);Y.SQa(a,b)}};r.a("AdfDhtmlCodeEditorPeer.prototype.InitDomElement",{G:Y.prototype.G});Y.prototype.th=function(a,b,d){u.J(a);u.J(b);"cmd"==b.substring(0,3)?this.Zha(a,b,d):v.l.severe("Unable to add binding [",b,"] for ",a," to ",this.f().g())};r.a("AdfDhtmlCodeEditorPeer.prototype.addBinding",{th:Y.prototype.th});
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.wWa||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.wWa||g.xf==Y.jD||g.xf==Y.SI){var d=A.c.m(g.Ye[0]),h=O.da(d,d.o().i()),l=f=e=!1;if(null!=g.Ye[1]){var n=A.c.m(g.Ye[1]);n&&(e=n.getValue())}null!=g.Ye[2]&&(n=A.c.m(g.Ye[2]))&&(f=n.getValue());null!=g.Ye[3]&&(n=A.c.m(g.Ye[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.Ye[0]),h=A.c.m(g.Ye[1]),l=f=e=!1,null!=g.Ye[2]&&(n=A.c.m(g.Ye[2]))&&(e=n.getValue()),null!=g.Ye[3]&&(n=A.c.m(g.Ye[3]))&&(f=n.getValue()),null!=g.Ye[4]&&(n=A.c.m(g.Ye[4]))&&(l=n.getValue()),d=[d.getValue(),h.getValue(),e,f,l]):g.xf==Y.QI&&(d=A.c.m(g.Ye),d=O.da(d,d.o().i()).value);return this.ne(g.xf,d)}return this.ne(g.xf,g.Ye)}}return null};r.a("AdfDhtmlCodeEditorPeer.prototype.executeBinding",{yY:Y.prototype.yY});
Y.prototype.oo=function(){return this.TM?G.st:G.tt};r.a("AdfDhtmlCodeEditorPeer.prototype.getReadyState",{oo:Y.prototype.oo});Y.prototype.Lb=function(a){if(a.ce()==Qa.Ef){var b=this.f();this.Mja&&A.c.Ne(b.g());a={Id:b.g(),uva:a.X()};this.BL=page.ta(this,this.gkb,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.lZa&&(Y.Wn(this.f(),d+Y.NYa),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.eea||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.eMa(b,a)&&(a=Y.kV(b),$e.wl(a),Y.woa(b,this.bf()))};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.eMa(b,a))if(b=this.bf(),w.XQ==d&&(this.OLa=!0,a.cancel()),this.OLa)if(w.Ih==d)this.OLa=!1;else{if(w.tf==d)if(e.shiftKey)b.indentLine(b.getCursor(!0).line,"subtract");else CodeMirror.pvb[b.getCursor(!0).line!=b.getCursor().line?"indentMore":"insertTab"](b)}else w.tf==a.na()&&(Nn(this),e.shiftKey?J.ni(A.c.wd):J.be(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.pAa):-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.bf().save();if(C.Nb(this.bf().getWrapperElement(),b)){b=Y.kV(a);var e=Y.nka(a);if(this.Ll(a)){var f=$e.ks(b),g=b.value;d&&g==f||($e.wl(b,g),this.cc(a,g))}null!=e&&(Y.joa(a,e),this.WA.getScrollerElement().scrollTop=e.scrollTop,Y.woa(a,this.bf()))}};r.a("AdfDhtmlCodeEditorPeer.prototype.RunValidation",{nd:Y.prototype.nd});
Y.prototype.Ba=function(a,b,d){u.J(d);this.bf().getValue()!=d&&(this.bf().setValue(d),this.bf().save())};r.a("AdfDhtmlCodeEditorPeer.prototype.SetDisplayValue",{Ba:Y.prototype.Ba});Y.prototype.Wa=function(a){null!=this.bf()&&(this.bf().save(),this.Mja=!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.Pra=function(a,b){var d=a.getCursor(),d=b.Leb(d.line,d.ch);u.assert(null!=d);u.Mb(d.Yvb);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",{Pra:Y.prototype.Pra});Y.prototype.fda=function(a,b){a.o().Leb=b};r.a("AdfDhtmlCodeEditorPeer.prototype.SetHintsFunction",{fda:Y.prototype.fda});
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={Jqa:0,Pva:0,Ysa:0,Sqa: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.hAa);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.ws=g;n.id=this.SMa.push(n)-1;Y.PMa(this.f(),g,n);g=n;P=K;A.c.H();var n=P.AC(),P=On(P),P=Pn(P),Q=document.createElement("div"),
da=document.createElement("span");da.appendChild(P);Q.appendChild(da);this.bf().Fwb(n-1,"breakpoints",Q);n=Ba.getType(K.$p());n==Ba.hg?l.Jqa++:n==Ba.Jl?l.Sqa++:n==Ba.Qo?l.Pva++:n==Ba.Ij&&l.Ysa++;n=!1;P=On(K);K=t.createElement("tr");y.appendChild(K);Q=t.createElement("td");C.w(Q,e.getStyleClass(Y.LYa));d.setAttribute(Q,"valign","top");K.appendChild(Q);Q.appendChild(Pn(P));P=t.createElement("td");K.appendChild(P);P.appendChild(Qn(this,g));g=!0}}}g&&(B=I.la(this.f().g(),"markers"),g=Rn(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.JYa)),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.MYa)),P=n="",0<l.Jqa&&(P=L.Wu(Ba.hg,!1),f+=P+": "+l.Jqa),0<l.Pva&&(P=L.Wu(Ba.Qo,!1),0<f.length&&(n=Y.Yda),f+=n+P+": "+l.Pva),0<l.Sqa&&(P=L.Wu(Ba.Jl,!1),0<f.length&&(n=Y.Yda),f+=n+P+": "+l.Sqa),0<l.Ysa&&(P=L.Wu(Ba.Ij,!1),0<f.length&&(n=Y.Yda),f+=n+P+": "+
l.Ysa),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.IYa)),K.appendChild(z),f=t.createElement("div"),C.w(f,e.getStyleClass(Y.HYa)),z.appendChild(f),f.appendChild(t.createElement("div")),d.Ia(z)),f=z.children[0],f.appendChild(y),Sn(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.Qe=function(a,b,d,e,f){Sn(this,a,f)};r.a("AdfDhtmlCodeEditorPeer.prototype.resizeNotify",{Qe:Y.prototype.Qe});Y.prototype.Te=function(a){if(this.Mja)return!0;a=a.g();if(L.Usa(a)){a=A.c.Tp(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.hAa);if(null!=e&&0<e.length&&null==d.getSummary()&&null==d.yra())return!0}}}return Y.h.Te.call(this)};
r.a("AdfDhtmlCodeEditorPeer.prototype.VetoShowNoteWindow",{Te:Y.prototype.Te});k=Y.prototype;k.fja=function(a){var b=q.b,d=A.c,e=a.g(),e=I.j(e,Y.jAa),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 On(a){var b="";a=Ba.getType(a.$p());a==Ba.hg?b=Y.OYa:a==Ba.Jl?b=Y.PYa:a==Ba.Qo?b=Y.RYa:a==Ba.Ij&&(b=Y.QYa);return b}k.Icb=function(a){a&&a.save()};k.Jcb=function(a){a&&(this.Mja=!0,Y.woa(this.f(),a))};k.fh=function(){if(null!=this.bf())this.bf().focus();else{var a=this.f();A.c.ta(a,a.focus,null,300)}};r.a("AdfDhtmlCodeEditorPeer.prototype.Focus",{fh:Y.prototype.fh});k=Y.prototype;
k.gkb=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.uva,!0))};
function Sn(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(Rn(a));O.da(b,a.i());e=f.getElementById(I.j(e,Y.Zda)).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.Zda)).offsetHeight;a=y.getElementById(Rn(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 Rn(a){return I.la(a.f().g(),"markersLabel")}
function Qn(a,b){var d=q.b,e=A.c,f=e.H(),e=e.R(),g=b.ws,h=e.createElement("a");C.w(h,f.getStyleClass(Y.KYa));var f="("+g.AC()+","+g.KH()+") ",l=Ba.getType(g.$p()),l=L.Wu(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.Iib);q.b.ba(h,"click",d);h.appendChild(e.createTextNode(g));return h}function Pn(a){return A.c.H().getIcon(a)}
k.Iib=function(a){var b=q.b;b.preventDefault(a);if(a=b.ca(a).getAttribute("_markerInfoId")){var d=this.SMa[a];a=d.markText.find();b=d.ws.AC();d=d.ws.KH();null!=a.from&&(b=a.from.line+1,d=a.from.ch+1);this.Vf(b,d)}this.f().focus()};k.Zha=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.Ye=d;f=h;break}}null==f&&(f={Id:a,xf:b,Ye:d},this.Th.push(f));(a=A.c.m(a))&&(a.Dm(this.f())||a.addEventListener(ab.cd,this.NL,this))};
k.EOa=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.cd,e,this))}};
k.ne=function(a,b){u.J(a);if(a==Y.TI)return Nn(this);if(a==Y.RI){var d=this.bf();d.redo();d.save();return d.historySize().redo}if(a==Y.jD){if(null!=b[0])return Tn(this,b)}else if(a==Y.SI){if(null!=b[0])return Un(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.bf();Vn(this);if(e){Wn(this,null,f,g);g=Wn(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.bf(),l=Wn(this,l,n,t),n=0;n<Xn(this).length;n++)if(Xn(this)[n].WP==Y.gn&&(t=Xn(this)[n].ws.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()),Vn(this),l.findNext()&&(Xn(this).push({WP:Y.gn,ws: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()),Vn(this),l.findNext()&&(Xn(this).push({WP:Y.gn,ws: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.RMa&&this.RMa.clear();this.RMa=this.bf().markText({line:b-1,ch:0},{line:b-1,ch:9999},{className:A.c.H().qa(Y.CYa)});this.Vf(b,1);return}return null};
k.$ha=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.Yt=this.D(this.CV);b.ba(a,"mouseup",this.Yt);b.ba(a,"keyup",this.Yt);e&&b.ba(e,"keyup",this.Yt);d&&b.ba(d,"keyup",this.Yt)};
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.bf().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.Ye[0]),l=l.getSubmittedValue(),g[n]=null!=l&&0<l.length?!0:!1,y=!0):n==Y.SI?l.Id==f+Y.eea&&(l=A.c.m(l.Ye[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.Ye).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 Nn(a){a=a.bf();a.undo();a.save();return a.historySize().undo}
function Wn(a,b,d,e){var f=a.bf(),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.nPa=f.getSearchCursor(h,{line:0,ch:0},g)}else a.nPa=f.getSearchCursor(b,{line:0,ch:0},g);a.H5=!0}else a.H5=!1;return a.nPa}
function Tn(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=A.c.H();Vn(a);if(!d)return!1;var l=a.bf(),d=Wn(a,d,e,f);if(d.findNext())return Xn(a).push({WP:Y.gn,ws: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 Xn(a).push({WP:Y.gn,ws:l.markText(d.from(),d.to(),{className:h.qa(Y.gn)})}),a.Vf(d.from().line,d.from().ch),!0}return!1}
function Un(a,b){var d=b[0],e=b[1],f=b[2],g=b[3],h=A.c.H();Vn(a);if(!d)return!1;var l=a.bf(),d=Wn(a,d,e,f);if(d.findPrevious())return Xn(a).push({WP:Y.gn,ws: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 Xn(a).push({WP:Y.gn,ws: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 Vn(a){for(var b=0;b<Xn(a).length;b++)Xn(a)[b].ws.clear();Xn(a).length=0}function Xn(a){null==a.QMa&&(a.QMa=[]);return a.QMa}Y.dPa=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.YJa(d)};
Y.thb=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.eka("(^|\\s|,)\\"+l+"([{|,|\\.|\\s]|$)",!0);null!=l&&Y.BGa(a,n,Y.dPa(l,g))}g&&(f="."+f.qa(Y.nYa),f=Y.eka("(^|\\s|,)\\"+f+"([{|,|\\.|\\s]|$)",!0),Y.Dlb(a,Y.dPa(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.Mvb(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.Iwb(a,function(a){return e.Pra(a,e)})}}});e.WA&&(e.WA.Mta("blur",e.D(e.Icb)),e.WA.Mta("change",e.D(e.Jcb)));t=Y.nka(a);null==t||a.getDisabled()||Y.joa(a,t);b.getElementById(I.j(d,Y.Zda)).style.visibility=
"visible";b=b.getElementById(I.j(d,Y.f1));if(d=Y.ieb(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.wPa(a)};
Y.BGa=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.Gab=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.Mla(h,b))try{if(d.S()==q.ia){if(h.rules){e.Bx[b]=!0;break}}else if(h.cssRules){e.Bx[b]=!0;break}}catch(l){}}};Y.kV=function(a){var b=q.b;a=a.g();a=I.j(a,Y.jYa);return b.getElementById(a)};
Y.eka=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.lib(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.gka(t.cssText);null!=y&&f.test(y)&&g.push(t.cssText)}}return g};
Y.gka=function(a){var b=null;null!=a&&(b=a.substring(0,a.indexOf("{")-1),b=b.replace(/^\s+|\s+$/g,""));return b};Y.YJa=function(a){a=a.substring(a.indexOf("{")+1,a.indexOf("}"));return a=a.replace(/^\s+|\s+$/g,"")};Y.nka=function(a){var b=q.b;a=I.j(a.g(),Y.iAa);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.Mla=function(a,b){return b?a.href&&a.href.match(b+"$")==b:a.href&&-1!=a.href.indexOf(Y.kAa)};Y.Rhb=function(a){a=a.ownerNode;return a.hasAttribute("data-afr-stylesheet")&&!a.hasAttribute("afrres")};Y.lib=function(a,b){return b?Y.Rhb(a):Y.Mla(a)};Y.joa=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.jAa),d=I.j(d,Y.GYa),b=b.getElementById(f),b=b.contentWindow||b.contentDocument;b.document&&(b=b.document);d=b.getElementById(d).value;null!=d&&(e=e.bf(),null!=e?(b=Y.nka(a),e.setValue(d),e.save(),null!=b&&Y.joa(a,b)):setTimeout(function(){Y.wM(a)},1E3))};
Y.eMa=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.PMa=function(a,b,d){var e=A.c.H(),f=a.o().bf();if(null!=f){var g=b.AC(),h=b.KH(),l=b.Fra(),n=b.Era();null==h&&(h=1);null==n&&(n=f.lineInfo(l-1).text.length+1);var t=Ba.getType(b.$p()),y=null;t==Ba.hg?y=e.qa(Y.zYa):t==Ba.Jl?y=e.qa(Y.AYa):t==Ba.Qo?y=e.qa(Y.DYa):t==Ba.Ij&&(y=e.qa(Y.BYa));d.markText=f.markText({line:g-1,ch:h-1},{line:l-1,ch:n-1},{className:y})}else setTimeout(function(){Y.PMa(a,b,d)},1E3)};
Y.plb=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.Mla(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.gka(g[h].cssText)==a){f.deleteRule[h];break}}};Y.Dlb=function(a,b){for(var d=Y.eka("^\\.cm-s-default span\\.cm",!1),e=0;e<d.length;e++){var f=Y.gka(d[e]);Y.plb(f);Y.BGa(a,f,b)}};
Y.Vf=function(a,b,d){var e=a.o().bf();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.woa=function(a,b){var d=q.b;if(a){var e=a.g(),e=I.j(e,Y.iAa),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.wPa=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.wPa(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.Ne(a.g());var d=A.c.m(b),e={};e[AdfRichPopup.cg]=a.g();d.show(e)};Y.SQa=function(a,b){var d=a.o();if(d){var e=!0,f;for(f in d.Bx)Y.Gab(a,f),0==d.Bx[f]&&(e=!1);e?Y.thb(a):setTimeout(function(){Y.SQa(a,b)},2E3)}};
Y.ieb=function(a){return a&&(a=a.getElementsByClassName("CodeMirror-code"))?a[0]:null};