var Zo=I.ea(I,"AdfDhtmlInlineFramePeer");m("AdfDhtmlInlineFramePeer",Zo);Zo.C=function(){var a=[];a.zJa=!1;a.qe=void 0;this.q5=a;I.sb(this,AdfRichInlineFrame.SOURCE);this.J1a="inlineFrameLoad"};m("AdfDhtmlInlineFramePeer.InitSubclass",Zo.C);
Zo.prototype.G=function(a,b){Zo.h.G.call(this,a,b);A.c.jv(a);var d=this.lr(b),e=d.getAttribute("_src");if(null!=e){A.c.Cc(!1,!1,!0,"GET request sent for iFrame. Source is: ",e);var f=q.b,g=f.S()==q.Sc;!g||g&&535.19<=f.Ib()?(d.setAttribute("src",e),d.removeAttribute("_src"),d.addEventListener("load",function(a){Zo.uha(a)},!0)):Zo.Flb(d)}};r.a("AdfDhtmlInlineFramePeer.prototype.InitDomElement",{G:Zo.prototype.G});
Zo.prototype.Bj=function(){var a=this.lr();if(a){v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: Frame dom is present");try{var b=a.contentWindow;if("complete"===b.document.readyState){v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: ","Determine inner document is ADF or not");var d=b.Re;if(d){var e=d.c;if(e&&e.MC&&e.MC())return v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner ADF page ready"),G.st;v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner ADF page not ready");return G.tt}v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: Non ADF page ready");
return G.st}v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: inner document not yet ready");return G.tt}catch(f){return v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: Security exception."," Document from different domain, nothing more to do"),G.st}}v.l.fine("AdfDhtmlInlineFramePeer.GetReadyState: inlineFrame's dom is not ready");return G.tt};r.a("AdfDhtmlInlineFramePeer.prototype.GetReadyState",{Bj:Zo.prototype.Bj});
Zo.Flb=function(a){var b=q.b,d=a.getAttribute("_src"),e=C.kb(a);C.setVisible(a,!1);a.removeAttribute("_src");a.removeAttribute("src");var f=b.cloneNode(a);a.onload="void(0);";b.yc(a);f.addEventListener("load",function(a){Zo.uha(a)},!0);a.parentNode.replaceChild(f,a);f.setAttribute("src",d);b.Ia(f);C.setVisible(f,e)};Zo.prototype.RQ=function(a,b,d){a=b;"IFRAME"!=a.tagName&&(a=C.pa(b));if(!a||"IFRAME"!=a.tagName)return!1;a.src=d;return!0};
r.a("AdfDhtmlInlineFramePeer.prototype.ComponentSourceChanged",{RQ:Zo.prototype.RQ});Zo.prototype.tb=function(a,b){Zo.h.tb.call(this,a,b);var d=b;"IFRAME"!=d.tagName&&(d=C.pa(b));"preferred"===a.getSizing()&&"1"===d.getAttribute("_adfLoaded")&&Zo.BOa(d)};r.a("AdfDhtmlInlineFramePeer.prototype.BindToComponent",{tb:Zo.prototype.tb});
Zo.prototype.ka=function(a){var b=a.getSizing(),d=A.c;d.uq(a);"preferred"===b&&(b=Zo.q5,E.Ig(b,a.g()),0==b.length&&(d.Y().clearInterval(b.qe),b.qe=void 0));q.b.S()==q.ia&&(this.bind(a),d=this.lr(),C.setVisible(d,!1),d.setAttribute("onload","void(0)"),d.setAttribute("src","about:blank"));Zo.h.ka.call(this,a)};r.a("AdfDhtmlInlineFramePeer.prototype.ComponentRemoved",{ka:Zo.prototype.ka});
Zo.prototype.Ck=function(a,b,d){a=this.i();"IFRAME"!=a.tagName&&(a=C.pa(a));a.scrollIntoView();var e=a.contentWindow.document,f=null;null!=d&&(f=e.getElementById(d))&&f.scrollIntoView();b&&(f?J.va(f):J.va(a))};r.a("AdfDhtmlInlineFramePeer.prototype.ScrollIntoView",{Ck:Zo.prototype.Ck});
Zo.Wib=function(a){A.c.Cc(!1,!1,!1,"iFrame load handler called.");var b=q.b,d=A.c;b.S()==q.ia?(a||(a=d.Y().event),a=b.Xe(a)):b.S()==q.Sc&&(a=b.Xe(a));b=b.ca(a);null==b&&(b=a.currentTarget);"1"===b.getAttribute("_adfLoaded")&&A.c.Cc(!1,!1,!0,"GET response received for iFrame. Source is: ",b.getAttribute("src"));var e=b.getAttribute("id"),f=e.indexOf("::f");-1!=f&&f==e.length-3&&(e=b.parentNode.getAttribute("id"));u.J(e);(d=d.m(e))?(Zo.ulb(b,e),(new ia(d,Zo.J1a,a)).F(!0),"preferred"===d.getSizing()?
Zo.Vla(b)?"1"===b.getAttribute("_adfLoaded")?(b.style.minWidth="0px",b.style.minHeight="0px",A.c.Cc(!1,!1,!1,"Immediately resizing iFrame."),Zo.eoa(b),A.c.Cc(!0,!1,!0,"Response processig done for iFrame. Source is: ",b.getAttribute("src"))):(A.c.Cc(!1,!1,!1,"Registering iFrame for resizing."),Zo.BOa(b)):A.c.Cc(!0,!1,!0,"Response processig done for iFrame. Source is: ",b.getAttribute("src")):A.c.Cc(!0,!1,!0,"Response processig done for iFrame. Source is: ",b.getAttribute("src"))):b.setAttribute("_adfLoaded",
"1")};Zo.uha=function(a){a.target.contentWindow.postMessage("_adfShowBody","*");try{Zo.Wib(a)}catch(b){v.l.rg(b,"inlineFrame load handler")}};m("AdfDhtmlInlineFramePeer.__iframeLoadHandler",Zo.uha);Zo.ulb=function(a,b){null==a.getAttribute("_src")&&(C.sa(a,"p_AFFlow")?(C.O(a,"p_AFBusy"),v.l.fine("Removed busy from iframe: ",b)):(C.O(a.parentNode,"p_AFBusy"),v.l.fine("Removed busy from iframe's parentNode: ",b)))};
Zo.BOa=function(a){u.u(a);if(Zo.Vla(a)){var b=Zo.q5,d=a.id;-1<E.indexOf(b,d)&&b.push(d);Zo.eoa(a);A.c.Cc(!0,!1,!0,"Response processig done for iFrame. Source is: ",a.getAttribute("src"));1==b.length&&(b.qe=A.c.Y().setInterval(Zo.cNa,1E3))}};
Zo.Vla=function(a){try{return q.b.pl(a.contentWindow),!0}catch(b){return v.l.Ge(b,"Error sizing iframe. This could occur if the iframe's sizing is set to preferred and the iframe's source is not from the same domain as the page. iframe id: "+a.id+", iframe source: "+a.src+", page location: "+window.location+"."),!1}};
Zo.eoa=function(a){if(!Zo.Vla(a))return!1;var b=!1,d=A.c.H();if(C.sa(a,d.getStyleClass("AFStretchWidth"))||C.sa(a,d.getStyleClass("AFAuxiliaryStretchWidth")))b=!0;var e=q.b,f=a.contentWindow,d=0;b||(d=e.pl(f)-e.Zu(f));f=e.vo(f)-e.Yu(f);b=!1;e=a.style;0<d&&(e.minWidth=a.offsetWidth+d+"px",b=!0);var d=Zo.q5,g=a.id;0<f?(e.minHeight=a.offsetHeight+f+1+"px",b=!0,d[g]=a.clientWidth):(d=d[g],void 0!==d&&a.clientWidth>d&&(e.minHeight="0px",b=!0));return b};
Zo.cNa=function(){var a=Zo.q5;if(0!=a.length){for(var b=!1,d=document,e=a.length,f=Zo.eoa,g=0;g<e;g++)var h=d.getElementById(a[g]),b=b|f(h);b^a.zJa&&(d=A.c.Y(),void 0!==a.qe&&d.clearInterval(a.qe),a.qe=d.setInterval(Zo.cNa,b?100:1E3),a.zJa=b)}};Zo.prototype.lr=function(a){a=a?a:this.i();"IFRAME"!=a.tagName&&(a=C.pa(a));u.u(a,"IFRAME");return a};r.a("AdfDhtmlInlineFramePeer.prototype.__getIframe",{lr:Zo.prototype.lr});