function af(a){this.Init(a)}v("AdfXmlHttpDataTransferService",af);v("AdfXmlHttpDataTransferService",af);z.l(af,oe);af.da=function(){this.yw="_afrDTSFrame";this.Ima="_adfStreamingIframe";this.Kra=0;this.H6=1;this.Yqa=2;this.Kpa=3};v("AdfXmlHttpDataTransferService.InitClass",af.da);af.prototype.Init=function(a){af.f.Init.call(this);this.eh=oe.hl;this.MB=[];this.RH=n;this.Ce=a;this.TH=this.Cx=this.mQ=0;this.rH=p};z.a("AdfXmlHttpDataTransferService.prototype.Init",{Init:af.prototype.Init});
af.prototype.Bb=function(){this.os();this.Ce=this.RH=this.MB=n};z.a("AdfXmlHttpDataTransferService.prototype.dispose",{Bb:af.prototype.Bb});af.prototype.os=function(){this.rH=l};z.a("AdfXmlHttpDataTransferService.prototype.pageUnloading",{os:af.prototype.os});af.vV=function(a,b){D.i.fine("Broadcasting:",b);for(var d=a?a.length:0,e=0;e<d;e++){var f=a[e];if(f.Qn)try{f.Qn(b)}catch(g){D.i.KJ(g,D.WARNING,"Error delivering Datatransfer request status changed to:",f)}}};
function bf(a,b,d,e,f,g,h,m,q){b=new $e(b,d,e,f,g,h,m);a.MB.push(b);b.R1(Se.AT);try{var s=new Se(Se.AT,d,n);af.vV(h,s)}catch(y){D.i.severe("Error on listener callback invocation - STATUS_QUEUED\n")}a.eh<=q&&1==a.MB.length&&a.Z9();return b}af.prototype.Xp=function(a,b,d,e,f){return bf(this,af.Kra,a,b,d,e,f,n,oe.hl)};z.a("AdfXmlHttpDataTransferService.prototype.sendRequest",{Xp:af.prototype.Xp});af.prototype.sv=function(a,b){return bf(this,af.Kpa,n,a,n,n,b,n,oe.hl)};
z.a("AdfXmlHttpDataTransferService.prototype.sendPollingRequest",{sv:af.prototype.sv});af.prototype.Wp=function(a,b,d,e,f,g,h){var m=n;a==n?a={_htmlForm:e}:a.OG=e;if(e.nodeType!=n&&"FORM"==e.nodeName){if(f||d){var m=n,m=e.ownerDocument?e.ownerDocument:this.Ce.document,q;for(q in f)cf(this,m,e,q,f[q]);for(q in d)cf(this,m,e,q,d[q])}m=bf(this,af.H6,a,b,d,n,g,h,oe.hl)}else{if(f)for(q in f)e.append(q,f[q]);a.dVa=l;m=bf(this,af.H6,a,b,d,e,g,h,oe.hl)}return m};
z.a("AdfXmlHttpDataTransferService.prototype.sendMultiPartRequest",{Wp:af.prototype.Wp});af.prototype.Yp=function(a,b){a=-1==a.indexOf("?")?a+"?":a+"\x26";a=a+"Adf-Rich-Message\x3dtrue\x26unique\x3d"+(new Date).getTime();for(var d in b)a+="\x26"+d+"\x3d"+b[d];d=w.b;d.G()==w.aa&&9>d.nb()&&(a+="\x26oracle.adf.view.rich.forceHTML\x3dtrue");return bf(this,af.Yqa,n,a,n,n,n,n,oe.vL)};z.a("AdfXmlHttpDataTransferService.prototype.sendStreamingRequest",{Yp:af.prototype.Yp});
af.prototype.yv=function(){return 0<this.mQ};z.a("AdfXmlHttpDataTransferService.prototype.streamingResponsesOutstanding",{yv:af.prototype.yv});af.prototype.Rp=function(a){B.assert(this.Kx,"Unexpected streaming response");0<this.TH||1<this.Cx?(this.Lx||(this.Lx=[]),this.Lx.push(a)):(df(this),w.b.execScript(this.Kx.contentWindow,a))};af.prototype.processStreamingResponse=af.prototype.Rp;z.a("AdfXmlHttpDataTransferService.prototype.processStreamingResponse",{Rp:af.prototype.Rp});
function df(a){if(a.Lx){for(var b=w.b;a.Lx&&0<a.Lx.length;)b.execScript(a.Kx.contentWindow,a.Lx.shift());a.Lx=n}}af.prototype.gv=function(){var a=this.Kx.contentWindow.document;a.removeChild(a.documentElement);this.Kx=n;this.mQ--;B.assert(0<=this.mQ,"Streaming request underflow");ef(this)};z.a("AdfXmlHttpDataTransferService.prototype.notifyStreamingRequestComplete",{gv:af.prototype.gv});af.prototype.zv=function(){this.TH++};z.a("AdfXmlHttpDataTransferService.prototype.suspend",{zv:af.prototype.zv});
af.prototype.qv=function(){this.TH--;B.assert(0<=this.TH,"Suspend count underflow");0<this.TH||this.Z9()};z.a("AdfXmlHttpDataTransferService.prototype.resume",{qv:af.prototype.qv});
function ff(a,b,d){var e=new Ye,f=e.pQa=b.getContext();e.qQa=b.g0();b.iia(e);e.tD(f&&f.BQa?l:p);d!==k?e.$R(d):e.$R(af.CH);d=p;f!=n&&f.dVa&&(d=l);d||e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset\x3dUTF-8");d=b.aga();if(d!=n)for(var g in d){var h=d[g];ya.isArray(h)&&(h=h.join(","));e.setRequestHeader(g,h)}g=a.Ce;(a=b.VQ())||(a=""+g.document.location.href);d=F.c.Xo;a=af.IF(a,g.name);f&&f.Q4a&&(a=af.X7(a,d));f=b.Wfa();if(f!=n)for(g=0;g<f.length;g+=2)e.addEventListener(f[g],
f[g+1]);F.c.hd(p,p,l,"Request sent to server: ",a);f=D.i;f.fine("Request sent to server:",b);f.Wj().flush();e.send(a,b.Uh())}function cf(a,b,d,e,f){B.assert(d!=n);var g=a.oca;g||(g=[],a.oca=g);a=b.createElement("input");a.type="hidden";a.name=e;a.value=f;g.push(a);d.insertBefore(a,d.firstChild)}
af.prototype.qua=function(a){this.Lx=n;var b=this.Ce.document,d=b.getElementById(af.Ima);d||(d=b.createElement("DIV"),d.id=af.Ima,d.style.display="none",b.body.appendChild(d));b=this.Ce.name;b=af.IF(a.VQ(),b);d.innerHTML='\x3cIFRAME src\x3d"'+b+'" onload\x3d"AdfPage.PAGE.getDataTransferService().processStreamingResponse(\'parent.AdfPage.PAGE.streamingResponseComplete();\');"\x3e\x3c/IFRAME\x3e';this.Kx=d.firstChild;B.p(this.Kx);B.assert("IFRAME"==this.Kx.tagName);a.Hia(this.Kx)};
af.prototype.baa=function(){var a=this.Ce.document,b=w.b.G()==w.aa,d=af.yw;b?(a=a.frames[d],d=a.document):(a=a.getElementById(d),d=a.contentDocument);try{if(!d.documentElement||!d.documentElement.firstChild||b&&"complete"!=d.readyState)this.xaa=F.c.oa(this,this.baa,n,50);else{var e=F.c,f=this.xaa;f&&(delete this.xaa,e.ac(f));e.oa(this,af.Q_a,a,1);var b=d,g=this.dUa;try{var h=new Te(b,this.cUa);af.vV(g,h)}finally{for(;b.firstChild;)b.firstChild&&b.removeChild(b.firstChild);this.OG.action=this.xza;
this.OG.target=this.yza;var m=this.oca;if(m){for(var q=m[0].parentNode,s=m.length,g=0;g<s;g++)q&&q.removeChild(m[g]);delete this.oca}ef(this)}}}catch(y){this.rH||(af.Rsa("unknown"),D.i.fv(y,"Error ("+y.message+") while performing Data Transfer request")),this.OG.action=this.xza,this.OG.target=this.yza}};
function gf(a,b){if(b.$Q()==Ye.JS){var d=0;try{d=b.Ld()}catch(e){}try{if(200!=d&&302!=d&&0!=d)a.rH||(af.Rsa(d),D.i.severe("Error StatusCode(",d,") while performing Data Transfer request\n"));else if(!a.rH){hf(a,oe.vL);var f=new Se(Se.xm,b.pQa,b);af.vV(b.qQa,f)}}finally{try{if(!a.rH&&F.c.qy()!=n&&b.getResponseHeader){var g=b.getResponseHeader("Adf-Context-Id");g||(g=b.getResponseHeader("X-ORACLE-DMS-ECID"));g&&F.c.isa(g)}}catch(h){d="Not able to retrieve response id from header.Error ("+h.message,
d+="). The response id in page object will not be up-to-date.",D.i.warning(d)}b.tn();delete b;a.rH||ef(a)}}}function ef(a){a.MB&&(a.Cx--,B.assert(0<=a.Cx,"Request count underflow"),1==a.Cx&&1==a.mQ&&df(a),0==a.MB.length&&(a.eh!=oe.vL&&hf(a,oe.vL),hf(a,oe.hl)),F.c.oa(a,a.Z9,n,1))}
af.prototype.Z9=function(){if(!(0<this.TH)&&!(0<this.Cx)&&0<this.MB.length){this.eh!=oe.yT&&hf(this,oe.yT);var a=this.MB.shift();if(a.Ld()==Se.zT)D.i.fine("Transfer request aborted beforing sending to server:",a);else switch(a.R1(Se.mma),D.i.fine("Transfer start:",a),this.Cx++,B.assert(2>=this.Cx,"Request count overflow"),a.getType()){case af.Kra:ff(this,a);break;case af.Kpa:ff(this,a,jf.CH);break;case af.H6:if(a.Uh()!=n)ff(this,a,kf.CH);else{var b=a.getContext(),d=b.OG,e=this.Ce.name,f=F.c.Xo,e=
af.IF(a.VQ(),e),e=af.X7(e,f);B.assert(d.action,"form action cannot be null for multiform post");var f=af.yw,g=w.b,h=this.Ce.document,m=h.getElementById(f),q,g=g.G()==w.aa;this.uwa==n&&(this.uwa=this.o(this.baa));m||(m=h.createElement("iframe"),m.name=f,m.id=f,m.dataset.Jha=0,q=m.style,q.top=q.left="0px",q.width=q.height="1px",q.position="absolute",q.visibility="hidden",h.body.appendChild(m),g||(m.onload=this.uwa));g?(m=h.frames[f],m.name=f,q=m.document):q=m.contentDocument;q.firstChild&&q.removeChild(q.firstChild);
this.cUa=b;this.dUa=a.g0();this.OG=d;this.xza=d.action;this.yza=d.target;d.method="POST";d.action=e;d.target=f;cf(this,h,d,"Adf-Rich-Message","true");cf(this,h,d,"partial","true");cf(this,h,d,af.Hra,this.Ce.name);w.b.op(d);try{(!m.parentNode?m.frameElement:m).dataset.Jha++,d.submit(),g&&(this.xaa=F.c.oa(this,this.baa,n,50))}catch(s){db.k_(),ef(this)}}break;case af.Yqa:b=w.b;d=b.R();this.mQ++;b.G()==w.ed&&d!=d.top?page.oa(this,this.qua,a,0):this.qua(a);break;default:B.assert(p,"Unknown transfer type"),
this.Cx--}}};af.CH=function(a){D.i.finer("Request complete:",a);var b=F.c.yf(l);b&&gf(b,a)};af.prototype.mp=function(a,b){B.Da(a);B.ih(b);var d=this.RH;d||(this.RH=d=[]);d.push(a);d.push(b)};z.a("AdfXmlHttpDataTransferService.prototype.addStateChangeListener",{mp:af.prototype.mp});af.prototype.nv=function(a,b){B.Da(a);B.ih(b);var d=this.RH;B.assert(d,"stateChangeListeners must exist");for(var e=d.length,f=0;f<e;f++){var g=d[f];f++;g==a&&d[f]===b&&d.splice(f-1,2)}0==d.length&&(this.RH=n)};
z.a("AdfXmlHttpDataTransferService.prototype.removeStateChangeListener",{nv:af.prototype.nv});af.prototype.Ok=r("eh");z.a("AdfXmlHttpDataTransferService.prototype.getDTSState",{Ok:af.prototype.Ok});function hf(a,b){a.eh=b;var d=a.RH;if(d)for(var e=d.length,f=0;f<e;f++)try{var g=d[f];f++;var h=d[f];if(p==(h!=n?g.call(h,b):g(b)))break}catch(m){D.i.ee(m,"Error on DTS State Change Listener")}}
af.Rsa=function(a){var b=F.c.getFailedConnectionText();if(b!=n){b+=" (status\x3d";b+=a;if(a=F.c.qy())b+=",ecid\x3d",b+=a;b+=")";alert(b)}};af.Hra="Adf-Window-Id";af.IF=function(a,b){var d=a,e=af.Hra+"\x3d",f=e+b;-1==d.indexOf(e)?(d+=-1==d.indexOf("?")?"?":"\x26",d+=f):d=d.replace(/adf-window-id=[^&#]*/,f);return d};af.X7=function(a,b){if(b==n||b==k)return a;var d=a,e=R.Nq+"\x3d",f=e+b;-1==d.indexOf(e)?(d+=-1==d.indexOf("?")?"?":"\x26",d+=f):d=d.replace(/Adf-Page-Id=[^&#]*/,f);return d};
af.Q_a=function(a){if(a=!a.parentNode?a.frameElement:a)if(a.dataset.Jha--,0>=a.dataset.Jha){a.onload="void(0);";var b=a.parentNode;b&&b.removeChild(a)}};