var $=M.U(Ds,"AdfDhtmlQueryPeer",p);v("AdfDhtmlQueryPeer",$);$.mA=M.xC(Qr,"InnerQueryShowDetailPeer","_afrDscl");InnerQueryShowDetailPeer.m=function(){Xo.kq(this,{sS:"af|query::disclosed-icon-style",yS:"af|query::undisclosed-icon-style"})};InnerQueryShowDetailPeer.prototype.Qg=function(a){return InnerQueryShowDetailPeer.f.Qg.call(this,a)?this.ai.ql(a):p};InnerQueryShowDetailPeer.prototype.Uv=function(){return this.d().r("headerText")};
$.prototype.Init=function(a){$.f.Init.call(this,a);Nt(a)||(this.Ff=new $.mA(a,this))};z.a("AdfDhtmlQueryPeer.prototype.Init",{Init:$.prototype.Init});$.prototype.za=function(a){$.f.za.call(this,a);this.Ff&&this.Ff.za(a)};z.a("AdfDhtmlQueryPeer.prototype.initialize",{za:$.prototype.za});
$.m=function(){M.ha(this,ab.ga,I.jb,bb.Lc,ic.Iq,I.qd,I.ec,I.Wf,Db.ga,Ub.HE);M.hb(this,"disclosed");this.gz="content";this.nna="conj";this.s6a="_afrDscl";this.KMa="oper";this.OLa="mode";this.KNa="reset";this.VNa="save";this.ZNa="search";this.jV="saveSrch";this.IL="val";this.c6a="adFlds";this.DGa="fldsM";this.CGa="adFldGrpMenu";this.g7="PSSPop";this.wt="PSSD";this.uF="PSS_Srchs";this.d7="PSS_name";this.Upa="PSS_autoEx";this.f7="PSS_SiL";this.e7="PSS_def";this.Oma="apply";this.Bna="delete";this.RIa=
"crtn";this.JJa="duplicate";this.c7="dlgPSS";this.Uqa="dlgSS";this.eqa="reorder";this.V6a="REPop";this.fqa="REDlg";this.W6a="REShDetail";this.U6a="REPanGrp";this.GNa="RETree";this.cqa="move-top";this.dqa="move-up";this.bqa="move-down";this.aqa="move-bottom";this.CNa="TOP";this.DNa="UP";this.BNa="DOWN";this.ANa="BOTTOM";this.Dna="DWPop";this.Cna="DWD";this.kJa="DWDMsg";this.ZLa="af_query.MSG_SAVED_SEARCH_DELETE_WARNING";this.Dpa="OWPop";this.Cpa="OWD";this.PMa="OWDMsg";this.aMa="af_query.MSG_SAVED_SEARCH_OVERRIDE_WARNING";
this.Bpa="OEPop";this.Apa="OED";this.OMa="OEDMsg";this.$La="af_query.MSG_SAVED_SEARCH_OVERRIDE_ERROR";this.wna="SSPop";this.dA="SSD";this.kU="SS_name";this.WIa="SS_SL";this.una="SS_autoEx";this.vna="SS_def";this.XMa="pzSSearch_key";this.Iqa="SEPARATOR";this.je=":";this.GKa="_afrIndexed";this.OPa="autoExecute";this.PPa="default";this.QPa="name";this.p7a="saveResultsLayout";this.RPa="showInList";this.Vpa="_afrPSSVisibleStatus";this.ve="_busy";var a=F.c.u();this.Tza=parseInt(a.ka("af|query-tr-visible-items"));
"undefined"!=typeof a.ka("af|query-tr-button-type")&&(this.pn="old"!=a.ka("af|query-tr-button-type"));this.KAa="old"!=a.ka("af|dialog-tr-button-type")};v("AdfDhtmlQueryPeer.InitSubclass",$.m);$.prototype.mm=function(a,b,d,e){return this.cx()?this.Ff.mm(a,b,d,e):p};z.a("AdfDhtmlQueryPeer.prototype.ComponentDisclosedChanged",{mm:$.prototype.mm});$.prototype.cx=function(){return this.h().childNodes[1]};$.prototype.q=function(a,b){$.f.q.call(this,a,b);return F.c.oa(this,this.E0a,a,0,{isSynchronized:l})};
z.a("AdfDhtmlQueryPeer.prototype.InitDomElement",{q:$.prototype.q});$.prototype.gd=function(a){var b=this.d();b&&b.setProperty($.ve,a,p,J.Pc)};z.a("AdfDhtmlQueryPeer.prototype.SetBusy",{gd:$.prototype.gd});$.prototype.Ia=function(a,b,d,e){Nt(this.d())||$.f.Ia.call(this,a,b,d,e)};z.a("AdfDhtmlQueryPeer.prototype.ResizeNotify",{Ia:$.prototype.Ia});$.prototype.ql=function(a){var b=this.cx();return b?(b.style.display=a?"":"none",l):p};z.a("AdfDhtmlQueryPeer.prototype.__handleClientSideDisclosure",{ql:$.prototype.ql});
$.prototype.oj=function(a){this.Ff.oj(a)};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentDisclosure",{oj:$.prototype.oj});$.prototype.C=function(a){var b=this.d().r($.ve);!a.na()&&(a.Jb()&&!b)&&Ot(this,a);this.Ff&&this.Ff.C(a)};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentClick",{C:$.prototype.C});
$.prototype.pa=function(a){if(a.ia()==E.zd){var b=Ot(this,a);if(!b){var d=Pt(this,a);d&&(this.d().e(),Yf.v(this.d(),Yf.b4,d,l),b=l)}if(b){a.cancel();return}}if(b=this.oB(a))b=w.fa(),d=a.L(),b=b.T(d),b=!(Qt(this,b,$.jV)||Qt(this,b,$.uF)||Rt(this,b,$.KMa));b&&(this.AS()&&(b=this.d(),(new Vb(b)).v(),St(b)),a.cancel());this.Ff&&this.Ff.pa(a)};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyUp",{pa:$.prototype.pa});$.prototype.ba=function(a){this.oB(a)&&(a.dc(),w.b.stopPropagation(a.L()))};
z.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyDown",{ba:$.prototype.ba});$.prototype.zb=function(a){this.oB(a)&&a.cancel()};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentKeyPress",{zb:$.prototype.zb});$.prototype.qm=function(a){a=a.getSource();var b=this.d().e();a.e()==M.g(b,$.g7)&&(a=Tt(b,l),this.d().setProperty($.Vpa,a.e(),l,J.rd))};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentPopupOpening",{qm:$.prototype.qm});
function Ut(a,b){var d=M.g(b,$.f7),d=F.c.j(d).getValue(),e=M.g(b,$.e7);return F.c.j(e).getValue()&&!d?(Vt(a,"af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST","af_query.LABEL_PERSONALIZE_SAVED_SEARCHES_SHOWINLIST_DETAIL"),l):p}
$.prototype.gi=function(a){var b=this.d(),d=b.e(),e=M.g(d,$.Oma),f=M.g(d,$.Bna),g=M.g(d,$.eqa),h=d+$.je+$.dqa,m=d+$.je+$.cqa,q=d+$.je+$.bqa,s=d+$.je+$.aqa,y=a.getSource().e();y==e?Wt(b,l)?(e=F.c.j(d+$.je+$.c7),Ut(e,d)?a.cancel():Xt(b,l)&&(value=Yt(b,$.wt),Yf.v(b,Yf.eL,value,l))):a.cancel():y==g||y==h||y==m||y==q||y==s?a.cancel():y==f&&a.cancel()};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentAction",{gi:$.prototype.gi});
$.prototype.qf=function(a){var b=this.d(),d=b.e(),e,f,g=M.g(d,$.Cna),h=M.g(d,$.Cpa),m=M.g(d,$.Apa),q=a.getSource().e();$.KAa?(f=d+$.je+$.c7,e=d+$.je+$.Uqa):(e=M.g(d,$.dA),f=M.g(d,$.wt));f=q==f;e=q==e;g=q==g;h=q==h;m=q==m;if(e||f){g=l;if(a.Xj()==ab.fl)if(g=Wt(b,f))if(m=Yt(b,f?$.wt:$.dA),e)Wb.v(b,Wb.Cla,m,l);else{if(Ut(b,d)){a.cancel();return}(selectedSearch=Xt(b,l))?Wb.v(b,Wb.eL,m,l):Yf.v(b,Yf.po,l,l)}else{if(e){b=Zt(b);d=p;f=$.Ega();b=xa.trim(b.toLowerCase());for(g=0;g<f.length;g++)if(xa.trim(f[g].toLowerCase())==
b){d=l;break}d?$t(this,p,p):$t(this,p,l);a.cancel();return}}else Yf.v(b,Yf.po,f,l);a.cancel();g&&this.hT(d,f)}else if(g||h||m){q=p;if((q=a.Xj()==ab.qT)&&!m)e=g?Wb.zq:Wb.Gla,(m=Yt(b,g?$.wt:$.dA))?Wb.v(b,e,m,l):(b=M.g(d,$.uF),b=F.c.j(b),Vt(b,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DELETE_CONSTRAINT_DETAIL"));a.cancel();(a=au(this,g,h))&&a.rb();h&&q&&this.hT(d,f)}else if(q==d+$.je+$.je+$.fqa||q==d+$.je+$.fqa)a.Xj()==ab.fl?(Yf.v(b,Yf.Jla,n,l),a.cancel(),(popupComp=a.getSource().getParent())&&
popupComp.rb()):a.Xj()==ab.vm&&Yf.v(b,Yf.Hla,n,l)};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentDialog",{qf:$.prototype.qf});$.prototype.jk=function(a){var b=a.getSource().e();if(b){var d=F.c.j(b),e=this.d(),f=e.e(),g=M.g(f,$.jV),f=M.g(f,$.uF);b==g?(b=d.getValue(),!b||""==b?a.cancel():b==$.XMa?Yf.v(e,Yf.c4,l,l):b!=$.Iqa&&Wb.v(e,Wb.dL,b,l)):b==f&&((b=d.getValue())&&b!=$.Iqa?Yf.v(e,Yf.dL,b,l):a.cancel())}};z.a("AdfDhtmlQueryPeer.prototype.HandleComponentValueChange",{jk:$.prototype.jk});
$.prototype.hT=function(a,b){var d=Tt(a,b);d&&(b&&this.d().setProperty($.Vpa,n,l,J.rd),d.rb())};z.a("AdfDhtmlQueryPeer.prototype.HidePopupDialog",{hT:$.prototype.hT});
$.prototype.Va=function(a,b){$.f.Va.call(this,a,b);var d=a.e(),e=M.g(d,$.wna),f=M.g(d,$.g7),g=M.g(d,$.Dna),h=M.g(d,$.Dpa),m=M.g(d,$.Bpa),e=w.b.getElementById(e),f=w.b.getElementById(f),g=w.b.getElementById(g),h=w.b.getElementById(h),m=w.b.getElementById(m),q,s,y=M.g(d,$.Cna),A=M.g(d,$.Cpa),C=M.g(d,$.Apa);$.KAa?(s=d+$.je+$.c7,q=d+$.je+$.Uqa):(q=M.g(d,$.dA),s=M.g(d,$.wt));b.id==q?e.appendChild(b):b.id==s?f.appendChild(b):b.id==y?g.appendChild(b):b.id==A?h.appendChild(b):b.id==C&&m.appendChild(b)};
z.a("AdfDhtmlQueryPeer.prototype.PopupClosed",{Va:$.prototype.Va});$.I3a=function(){return $.HCa().concat($.Ega())};v("AdfDhtmlQueryPeer.getSavedSearchNames",$.I3a);$.o5a=da("yUa");v("AdfDhtmlQueryPeer.setUserSavedSearchNames",$.o5a);$.HCa=function(){var a=this.yUa;return a?a:[]};v("AdfDhtmlQueryPeer.getUserSavedSearchNames",$.HCa);$.n5a=da("xUa");v("AdfDhtmlQueryPeer.setSystemSavedSearchNames",$.n5a);$.Ega=function(){var a=this.xUa;return a?a:[]};v("AdfDhtmlQueryPeer.getSystemSavedSearchNames",$.Ega);
function Nt(a){B.assert(a!=n,"AdfDhtmlQueryPeer.prototype._isHeaderless, component cannot be null!");a=a.getDisplayMode();return"simple"==a||"design"==a}
function Yt(a,b){var d=n,e=n,f=n,g=n,h=n,m=a.e();b==$.dA?(d=M.g(M.g(m,$.kU),$.gz),e=M.g(M.g(m,$.una),$.gz),f=M.g(M.g(m,$.vna),$.gz),h=Xt(a,p)):b==$.wt&&(d=M.g(M.g(m,$.d7),$.gz),e=M.g(M.g(m,$.Upa),$.gz),g=M.g(M.g(m,$.f7),$.gz),f=M.g(M.g(m,$.e7),$.gz),h=Xt(a,l));m={};h&&(m.selectedSearch=h);if(d=w.b.getElementById(d))m[$.QPa]=d.value;e=w.b.getElementById(e);m[$.OPa]=e?e.checked:l;f=w.b.getElementById(f);m[$.PPa]=f?f.checked:p;g&&(g=w.b.getElementById(g),m[$.RPa]=g?g.checked:p);return m}
function Tt(a,b){var d=n,d=n,d=b?$.g7:$.wna,d=M.g(a,d);return d=F.c.j(d)}function au(a,b,d){a=a.d().e();b=M.g(a,b?$.Dna:d?$.Dpa:$.Bpa);return F.c.j(b)}function bu(a,b){var d=a.d().e();return $.pn?d+":_"+b:M.g(d,b)}
function Ot(a,b){var d=a.d(),e=d.e(),f=bu(a,$.OLa),g=bu(a,$.ZNa),h=bu(a,$.KNa),m=bu(a,$.VNa),q=e+$.je+$.eqa,e=w.fa(),s=b.L(),s=e.T(s),e=p,y=n;if($.pn){var A=M.Lf(s);A instanceof AdfRichButton&&(y=A.e(),A.getDisabled()==l&&(e=l))}else y=s.id,s.disabled==l&&(e=l);if(!e)if(y==g&&a.AS())(new Vb(d)).v(),St(d),e=l;else if(y==f)(new Wb(d,Wb.Fla,n)).v(l);else if(y==h){if(f=d.ce()){g=F.c.Jk();for(h=0;h<f.length;h++)m=f[h],(q=m.e())&&(0<=q.indexOf($.IL)&&g[q])&&m.setValue()}Wb.v(d,Wb.Kla,p,l)}else if(y==m)Yf.v(d,
Yf.c4,p,l);else if(Rt(a,s,$.nna))g=d.e()+$.je+$.nna,(f=F.c.j(g))?(g=w.b.getElementById(g),h=f.k(),f.setProperty("value",g.value),h.C(b),(m=f.getValue())&&h.xa(f,g,m),Yf.v(d,Yf.Mla,m,l)):b.cancel();else if(y==q)Yf.v(d,Yf.Ila,n,l);else if(d=a.d(),f=d.e(),g=M.g(f,$.Bna),h=M.g(f,$.JJa),m=M.g(f,$.Oma),q=b.getSource().e(),q==g)$t(a,l,p);else if(q==h)(g=Yt(d,$.wt))?Wb.v(d,Wb.Dla,g,l):(d=M.g(f,$.uF),d=F.c.j(d),Vt(d,"af_query.MSG_SAVED_SEARCH_DELDUP_CONSTRAINT","af_query.MSG_SAVED_SEARCH_DUPLICATE_CONSTRAINT_DETAIL"),
b.cancel());else if(q==m)b.cancel();else if(cu(a,b,$.wt,q))du(b,q);else if(cu(a,b,$.dA,q))du(b,q);else if(d=Pt(a,b))a.d().e(),Yf.v(a.d(),Yf.b4,d,l);e&&(b.cancel(),b.dc());return e}function St(a){if(-1==a.e().indexOf("_afrLovInternalQueryId")){var b=a.getResultComponentId();b&&(a=a.j(b))&&Yf.v(a,Yf.Lla,n,l)}}
function $t(a,b,d){var e=a.d(),f=e.e(),g=M.g(f,b?$.kJa:d?$.PMa:$.OMa);if(g=F.c.j(g))e=b?Xt(e,l):Zt(e),e=F.c.u().V(b?$.ZLa:d?$.aMa:$.$La,e),g.setValue(e);a=au(a,b,d);b=M.g(f,b?$.d7:$.kU);a.show({align:AdfRichPopup.of,alignId:b})}function Zt(a){a=a.e();B.pc(p);var b=n,b=M.g(a,$.kU);return(a=F.c.j(b))?a.getValue():n}function Xt(a,b){var d=a.e(),e=n,e=b?M.g(d,$.uF):M.g(d,$.jV);return(d=F.c.j(e))?d.getValue():n}
function du(a,b){var d=F.c.j(b),e=w.b.getElementById(b);if(d){var f=d.k();f.C(a);var g=d.getValue();g&&f.xa(d,e,g)}}function Pt(a,b){var d=w.fa(),e=b.L(),d=d.T(e);return Rt(a,d,$.cqa)?$.CNa:Rt(a,d,$.dqa)?$.DNa:Rt(a,d,$.bqa)?$.BNa:Rt(a,d,$.aqa)?$.ANa:p}function cu(a,b,d,e){b=b.getSource().r("readOnly");if("true"==b||b==l)return p;a=a.d().e();return d==$.wt?(d=M.g(a,$.Upa),b=M.g(a,$.e7),a=M.g(a,$.f7),e==d||e==b||e==a):d==$.dA?(d=M.g(a,$.una),b=M.g(a,$.vna),a=M.g(a,$.WIa),e==d||e==b||e==a):p}
function Qt(a,b,d){a=a.d().e();d=M.g(a,d);b=b.id;return b==d||0<=b.indexOf(d)?l:p}function Rt(a,b,d){a=a.d().e()+$.je+d;return b&&0<=b.id.indexOf(a)?l:b.parentNode&&b.parentNode.id&&0<=b.parentNode.id.indexOf(a)?l:p}
function Wt(a,b){var d=l,e=a.e(),f=M.g(e,b?$.d7:$.kU);if(f=F.c.j(f)){if(f.getDisabled())return l;var g=f.getValue();if(f.Fb(g))return Vt(f,"af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT","af_query.MSG_SAVED_SEARCH_NAME_NOTNULL_CONSTRAINT_DETAIL"),p;if(b){var h=Xt(a,b);if(g==h)return l}e=M.g(e,b?$.uF:$.jV);e=F.c.j(e).vy();g=xa.trim(g.toLowerCase());for(h=0;h<e.length;h++)if(xa.trim(e[h].getValue().toLowerCase())==g&&!e[h].hha()){d=p;b&&Vt(f,"af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT","af_query.MSG_SAVED_SEARCH_NAME_UNIQUE_CONSTRAINT_DETAIL");
break}}return d}function Vt(a,b,d,e){B.s(b);B.Cd(d);e?(b=TrMessageFactory.getString(b),d=TrMessageFactory.getString(d)):(e=F.c.u(),b=e.V(b),d=e.V(d));d=new Ea(Ea.Ef,b,d);b=F.c;a?(e=a.e(),b.ff(e),b.rn(e,d),a.focus()):b.rn(n,d)}$.prototype.oB=function(a){return!a.na()&&a.ia()==E.$a&&Qm.CM(a,p)!=n?l:p};
$.prototype.AS=function(){var a=this.d(),b=a.ce();if(b){for(var d=l,e=[],f=0,g=l,h=l,m=l,q=0;q<b.length;q++){var s=b[q],y=s.getId(),A=M.Ib(s);if(y&&0<=y.indexOf($.IL)&&A&&H.Yu(A)){s.getValid()==p&&(g=p);if(s.getShowRequired&&s.getShowRequired()&&g&&(A=s.getValue(),(!A||""==A)&&0!==A))Vt(s,"org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED","org.apache.myfaces.trinidad.UIXEditableValue.REQUIRED_detail",l),h=p;if(y=y.substring($.IL.length,y.length-1))if(y=a.e()+$.je+$.RIa+y,(y=w.fa().getElementById(y))&&
y.getAttribute($.GKa))A=s.getValue(),e[f++]=s,d=(!A||""==A)&&0!==A?d&&l:p}}if(d&&0<f){for(a=0;a<f;a++)Vt(e[a],"af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT","af_query.MSG_SELECTIVELY_REQUIRED_CONSTRAINT_DETAIL",p);m=p}else for(a=0;a<f;a++)b=e[a],d=b.e(),F.c.ff(d),b.Ei(),b.getValid()==p&&(g=p);g||F.c.Tn();return m&&h&&g}return l};z.a("AdfDhtmlQueryPeer.prototype.validateCriterionFields",{AS:$.prototype.AS});$.prototype.mX=function(a){var b=this.d().e(),d;(b=F.c.Ge(b))&&(d=b[a]);return d};
$.prototype.UB=function(a,b){var d=this.d().e(),e=F.c,f=e.Ge(d);f||(f={},e.Pf(d,f));f[a]=b};$.prototype.E0a=function(a){a=a.e()+$.je+$.DGa;a=F.c.j(a);if(a!=n&&(a.k().T1($.Tza),a=a.ce()))for(var b=0;b<a.length;b++){var d=a[b],e=d.e();e&&0<=e.indexOf($.CGa)&&d.k().T1($.Tza)}};