var AdfDhtmlPivotTablePeer=AdfRichUIPeer.createPeerClass(AdfRichUIPeer,"AdfDhtmlPivotTablePeer",A_c);A_h("AdfDhtmlPivotTablePeer",AdfDhtmlPivotTablePeer);AdfPage.PAGE.getLookAndFeel().registerPeerConstructor("oracle.dss.adf.pivotTable.PivotTable","AdfDhtmlPivotTablePeer");
AdfDhtmlPivotTablePeer.InitSubclass=function(){AdfRichUIPeer.addDomEventHandlers(this,"change");AdfRichUIPeer.addComponentEventHandlers(this,AdfUIInputEvent.CLICK_EVENT_TYPE,AdfUIInputEvent.MOUSE_DOWN_EVENT_TYPE,AdfUIInputEvent.KEY_DOWN_EVENT_TYPE,AdfUIInputEvent.KEY_UP_EVENT_TYPE,AdfComponentEvent.FOCUS_EVENT_TYPE,AdfComponentEvent.BLUR_EVENT_TYPE,AdfUIInputEvent.DOUBLE_CLICK_EVENT_TYPE,AdfUIInputEvent.MOUSE_OUT_EVENT_TYPE,AdfUIInputEvent.MOUSE_IN_EVENT_TYPE,AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE,
AdfActionEvent.ACTION_EVENT_TYPE,AdfDialogEvent.EVENT_TYPE,AdfPopupOpeningEvent.POPUP_OPENING_EVENT_TYPE,AdfPopupClosedEvent.POPUP_CLOSED_EVENT_TYPE);AdfObject.ensureClassInitialization(AdfDhtmlPivotTablePeer);AdfRichUIPeer.addSuppressedPPRAttributes(this,"splitRow");AdfRichUIPeer.addSuppressedPPRAttributes(this,"splitColumn");AdfRichUIPeer.addSuppressedPPRAttributes(this,"startRow");AdfRichUIPeer.addSuppressedPPRAttributes(this,"startColumn");AdfRichUIPeer.addSuppressedPPRAttributes(this,"secondStartRow");
AdfRichUIPeer.addSuppressedPPRAttributes(this,"secondStartColumn");AdfRichUIPeer.addSuppressedPPRAttributes(this,"startRowPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"startColumnPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"secondStartRowPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"secondStartColumnPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"rowHeaderStartLayer");AdfRichUIPeer.addSuppressedPPRAttributes(this,"columnHeaderStartLayer");AdfRichUIPeer.addSuppressedPPRAttributes(this,
"rowHeaderStartPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"columnHeaderStartPixel");AdfRichUIPeer.addSuppressedPPRAttributes(this,"_sizeOverrides");AdfRichUIPeer.addSuppressedPPRAttributes(this,"selection");AdfRichUIPeer.addSuppressedPPRAttributes(this,"activeCellKey");this.SP="0";this.tN="1";this.SA="2";this.va="partial";this.Cl=0;this.Bl=1;this.Sg=2;this.Oi=3;this.Ee=5;this.Rz=3;this.xl=1;AdfPivotTableUtils.F()?this.sl=this.Ho=this.Lg=this.pt=22:this.sl=this.Ho=this.Lg=this.pt=10;this.cu=
/^INPUT|SELECT|OPTION|BUTTON|^A\b|TEXTAREA/;this.zD=/\d+/g;this.ME=/\s+/g;this.Ng="_oc";this.Wn="_bc";this.WD={SM:"#F0F8FF",TM:"#FAEBD7",UM:"#00FFFF",VM:"#7FFFD4",bN:"#F0FFFF",eN:"#F5F5DC",fN:"#FFE4C4",iN:"#000000",jN:"#FFEBCD",kN:"#0000FF",lN:"#8A2BE2",mN:"#A52A2A",nN:"#DEB887",oN:"#5F9EA0",pN:"#7FFF00",qN:"#D2691E",yN:"#FF7F50",zN:"#6495ED",AN:"#FFF8DC",BN:"#DC143C",CN:"#00FFFF",EN:"#00008B",FN:"#008B8B",GN:"#B8860B",HN:"#A9A9A9",IN:"#006400",JN:"#BDB76B",KN:"#8B008B",LN:"#556B2F",MN:"#FF8C00",
NN:"#9932CC",ON:"#8B0000",PN:"#E9967A",QN:"#8FBC8F",RN:"#483D8B",SN:"#2F4F4F",TN:"#00CED1",UN:"#9400D3",VN:"#FF1493",WN:"#00BFFF",XN:"#696969",YN:"#1E90FF",hO:"#B22222",iO:"#FFFAF0",jO:"#228B22",lO:"#FF00FF",nO:"#DCDCDC",oO:"#F8F8FF",pO:"#FFD700",qO:"#DAA520",rO:"#808080",sO:"#008000",tO:"#ADFF2F",uO:"#F0FFF0",vO:"#FF69B4",wO:"#CD5C5C",yO:"#4B0082",CO:"#FFFFF0",EO:"#F0E68C",FO:"#E6E6FA",GO:"#FFF0F5",HO:"#7CFC00",IO:"#FFFACD",JO:"#ADD8E6",KO:"#F08080",LO:"#E0FFFF",MO:"#FAFAD2",OO:"#D3D3D3",NO:"#90EE90",
PO:"#FFB6C1",QO:"#FFA07A",RO:"#20B2AA",SO:"#87CEFA",TO:"#778899",UO:"#B0C4DE",VO:"#FFFFE0",WO:"#00FF00",XO:"#32CD32",YO:"#FAF0E6",aP:"#FF00FF",bP:"#800000",cP:"#66CDAA",dP:"#0000CD",eP:"#BA55D3",fP:"#9370D8",gP:"#3CB371",hP:"#7B68EE",iP:"#00FA9A",jP:"#48D1CC",kP:"#C71585",lP:"#191970",mP:"#F5FFFA",nP:"#FFE4E1",oP:"#FFE4B5",qP:"#FFDEAD",rP:"#000080",tP:"#FDF5E6",uP:"#808000",vP:"#6B8E23",wP:"#FFA500",xP:"#FF4500",yP:"#DA70D6",zP:"#EEE8AA",AP:"#98FB98",BP:"#AFEEEE",CP:"#D87093",FP:"#FFEFD5",JP:"#FFDAB9",
KP:"#CD853F",LP:"#FFC0CB",MP:"#DDA0DD",NP:"#B0E0E6",OP:"#800080",QP:"#FF0000",RP:"#BC8F8F",TP:"#4169E1",VP:"#8B4513",WP:"#FA8072",XP:"#F4A460",YP:"#2E8B57",fQ:"#FFF5EE",jQ:"#A0522D",kQ:"#C0C0C0",lQ:"#87CEEB",mQ:"#6A5ACD",nQ:"#708090",oQ:"#FFFAFA",pQ:"#00FF7F",rQ:"#4682B4",EQ:"#D2B48C",FQ:"#008080",GQ:"#D8BFD8",HQ:"#FF6347",JQ:"#40E0D0",TQ:"#EE82EE",UQ:"#F5DEB3",VQ:"#FFFFFF",WQ:"#F5F5F5",XQ:"#FFFF00",YQ:"#9ACD32"};this.pE=[["colNav0","colNav1"],["rowNav0","rowNav1"]];this.St="c";this.hE="p";this.$D=
"n";this.eD="ClearSelectionLink";this.gD="ToggleCheckboxesLink";this.fD="SelectionCheckbox";this.hB="et";this.Ko=0;this.Lo=1;this.Mo=2;this.No=3;this.tu="SelectionDiv";this.Xd=0;this.qd=1;this.Bi=2;this.Ig=3;this.Tz="MainContextMenuPopup";this.Kz="BodyContextMenuPopup";this.bO="EmptyMenu";this.rB="HeaderSortAscendingMenuItem";this.sB="HeaderSortDescendingMenuItem";this.YA="DataSortAscendingMenuItem";this.ZA="DataSortDescendingMenuItem";this.vC="ResizeHeightMenuItem";this.wC="ResizeWidthMenuItem";
this.OC="SplitPanesMenuItem";this.zt="ResizeDialogPopup";this.yt="ResizeDialog";this.tC="ResizeDialogPlm";this.uC="ResizeDialogSpin";this.Au="si";this.yu="_asc";this.zu="_desc";this.xu="_sorted";this.uE="1";this.vE="2";this.u=":";this.Cq=A_c;this.Ui=[[],[]];this.Ui[0][0]="nb_pv_00";this.Ui[0][1]="nb_pv_01";this.Ui[1][0]="nb_pv_10";this.Ui[1][1]="nb_pv_11";this.Cf=[[],[]];this.Cf[0][0]="nb_fr_00";this.Cf[0][1]="nb_fr_01";this.Cf[1][0]="nb_fr_10";this.Cf[1][1]="nb_fr_11";this.Ef=[[],[]];this.Ef[0][0]=
"nb_nx_00";this.Ef[0][1]="nb_nx_01";this.Ef[1][0]="nb_nx_10";this.Ef[1][1]="nb_nx_11";this.Df=[[],[]];this.Df[0][0]="nb_ls_00";this.Df[0][1]="nb_ls_01";this.Df[1][0]="nb_ls_10";this.Df[1][1]="nb_ls_11"};A_h("AdfDhtmlPivotTablePeer.InitSubclass",AdfDhtmlPivotTablePeer.InitSubclass);function A_We(a){return"true"==a.getDomElement().getAttribute("_old_edit")?A_b:A_c}function A_Xe(a){return"true"==a.getDomElement().getAttribute("_readonly")?A_b:A_c}
function A_Ye(a){return"true"==a.getDomElement().getAttribute("_cteAll")?A_b:A_c}
AdfDhtmlPivotTablePeer.prototype.pf=function(a){if(!this.fa&&!(0==this.b.pe||0==this.b.fc))if(this.fg&&AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM)AdfPage.PAGE.getGlassPane().focus();else{if(this.Xl){var b=A_Ze(this);b!=A_&&this.v==A_&&(b=A__e(b),A_1(this,b),this.nq=A_c)}else this.nq?A_0e(this):A_1e(this);A_We(this)||(a=a.getNativeEvent(),a=AdfAgent.AGENT.getEventTarget(a),b=A_2e(this,a),b!=A_&&b[0]!=A_&&b[1]!=A_&&b[1].id&&a.pb==A_a&&AdfDhtmlPivotTablePeer.VH(a))}};
A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentFocus",AdfDhtmlPivotTablePeer.prototype.pf);AdfDhtmlPivotTablePeer.prototype.Yd=function(){!this.fa&&0==this.bq&&(AdfPivotTableUtils.F()&&A_3e(this),A_1e(this,A_b),A_4e(this,A_b))};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentBlur",AdfDhtmlPivotTablePeer.prototype.Yd);AdfDhtmlPivotTablePeer.prototype._displayContextMenuAfterEdit=function(){A_5e(this,this.sg,this.sg.flag);this.sg=A_};
function A_6e(a,b,c){var d=b.getNativeEvent();a.L!=A_?(A_7e(a,b),AdfAgent.AGENT.preventDefault(d),d.flag=c,a.sg=d):A_5e(a,d,c)}
AdfDhtmlPivotTablePeer.prototype.ab=function(a){if(!this.fe&&A_8e(this)&&!(this.Ib==AdfDhtmlPivotTablePeer.Sg||this.Ib==AdfDhtmlPivotTablePeer.Oi)&&!this.fa){var b=AdfAgent.AGENT,c=a.getNativeEvent(),d=b.getEventTarget(c);if(!A_9e(this,d))if(A_$e(this,d))b.preventDefault(c);else if(this.getDomElement().focus(),d=A_af(this,c),d.ka&&d.ka.cell&&!d.ka.Pd)b=A_bf(d.ka.cell),this.isSelected(b)||A_cf(this,b),A_6e(this,a,A_c);else if(d.rg){var d=d.rg.cell,e=A_df(this,d),f=this.r(AdfPivotTableUtils.Vd);A_We(this)?
(!this.isSelected(e)&&!A_k.ja(d,f)&&A_1(this,e),A_6e(this,a,A_c)):A_ef(this,e,A_,A_b)||A_ff(this)&&this.isSelected(e)?A_6e(this,a,A_c):this.L==d?A_6e(this,a,A_c):(!this.isSelected(e)&&!A_k.ja(d,f)&&A_1(this,e),b.preventDefault(c),A_Xe(this)?A_6e(this,a,A_c):A_Ye(this)?(A_gf(this,d,A_,A_),this.ij=A_c,this.km(A_b),A_5e(this,c,A_c)):(this.sg=b.copyEvent(c),A_hf(this,a)))}else A_6e(this,a,A_b)}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentContextMenu",AdfDhtmlPivotTablePeer.prototype.ab);
function A_5e(a,b,c,d){a.Ib=AdfDhtmlPivotTablePeer.Bl;a.cz=A_c;var e=a.getComponent(),f=A_c,g=A_;if(g=c?e.getBodyContextMenuId?e.getBodyContextMenuId():A_:e.getContextMenuId?e.getContextMenuId():A_){var f=A_b,h=e.findComponent(g);h==A_&&(h=AdfPage.PAGE.findComponent(g),e=A_);h!=A_&&(h.removeEventListener("popupClosed",a.Dy,A_),h.addEventListener("popupClosed",a.Dy,A_));a.showContextMenu(b,g,e,d);g=AdfAgent.AGENT;g.stopPropagation(b);g.preventDefault(b)}f||(c?(c=a.getDomElement().getAttribute("_cbcm"),
c=c==A_?AdfDhtmlPivotTablePeer.Kz:c):(c=a.getDomElement().getAttribute("_ccm"),c=c==A_?AdfDhtmlPivotTablePeer.Tz:c),a.showContextMenu(b,c,a.getComponent(),d),a=AdfAgent.AGENT,a.stopPropagation(b),a.preventDefault(b))}AdfDhtmlPivotTablePeer.prototype.Dy=function(){this.rd(A_)};
AdfDhtmlPivotTablePeer.prototype.HandleComponentAction=function(a){var b=a.getSource();if(!b.getDisabled())if(b=b.getClientId(),-1!=b.indexOf(AdfDhtmlPivotTablePeer.YA))A_if(this,A_b,A_c),a.cancel();else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.ZA))A_if(this,A_c,A_c),a.cancel();else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.rB))A_if(this,A_b,A_b),a.cancel();else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.sB))A_if(this,A_c,A_b),a.cancel();else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.vC))this.Os(A_b),a.cancel();
else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.wC))this.Os(A_c),a.cancel();else if(-1!=b.indexOf(AdfDhtmlPivotTablePeer.OC)){A_jf(this.getDomElement());if(this.fa||A_kf(this)){var b=this.getComponent(),c=new A_lf(b);c.setPartial(A_b);b.queueEvent(c);c.isCanceled()?A_mf(this,A_Ze(this)):(A_nf(this,AdfDhtmlPivotTablePeer.va),this.Id=A_,this.fa||this.wc(this.ad,A_b))}a.cancel()}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentAction",AdfDhtmlPivotTablePeer.prototype.HandleComponentAction);
function A_if(a,b,c){var d=A_of(a),e=A_2(a,d)[0].startIndex;c?e=e.layer:(d=1-d,e=e.slice);a.Bs(d,e,b,c)}
AdfDhtmlPivotTablePeer.prototype.xB=function(a){if(a.getSource().getClientId()==this.getComponent().getClientId()+AdfDhtmlPivotTablePeer.u+AdfDhtmlPivotTablePeer.yt&&a.getOutcome()==AdfDialogEvent.OUTCOME_OK){var b=this.Yq,c=b.EL,d=b.nL,e=b.qL,f=b.zs,g=b.YI,h=b.wL,l=b.cell,b=b.wM.getValue(),d=Math.min(d?16:11,c),b=Math.max(b,d),c=b-c;0!=c&&(this.jx?A_pf(this,e,f,g,l,h,c,A_c):A_qf(this,e,f,g,l,h,c));a.cancel();a=this.getComponent().getClientId();AdfPage.PAGE.findComponent(a+AdfDhtmlPivotTablePeer.u+
AdfDhtmlPivotTablePeer.zt).hide()}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentDialog",AdfDhtmlPivotTablePeer.prototype.xB);
AdfDhtmlPivotTablePeer.prototype.Kg=function(a){if(this.Ma==AdfDhtmlPivotTablePeer.va)a.cancel();else{var b=a.getSource().getClientId(),c=b.indexOf(":",this.getComponent().getClientId().length+1),b=b.substring(this.getComponent().getClientId().length+1,c);if(isNaN(b))switch(this.Ib){case AdfDhtmlPivotTablePeer.Cl:case AdfDhtmlPivotTablePeer.Bl:b=this.cz;b||(b=a.getSource().getDescendantComponents(),b=b==A_||1>=b.length);b?(a.cancel(),this.Ib=AdfDhtmlPivotTablePeer.Cl):this.Ib=AdfDhtmlPivotTablePeer.Bl;
break;case AdfDhtmlPivotTablePeer.Sg:var d=A_of(this);a=A_rf(this).startIndex;var c=a.layer,e=a.slice;a=this.jx;var f=(b=d==AdfPivotTableUtils.l!=a)?c:e,g;b?(e=this.b.i[d],c=0,g=this.b.T[d][e][c],d=f+1):(e=f<this.b.o[d]?0:1,c=A_sf(this,d,f,e),g=this.b.T[d][e][c],d=AdfAgent.AGENT.getIntAttribute(g,"_startSlice"),d=f-d+1);a?(f=g.childNodes[0].rows[d].cells[0],g=f.offsetHeight):(f=g.childNodes[0].rows[0].cells[d],g=f.offsetWidth);var h=this.getComponent().getClientId(),l=AdfPage.PAGE.findComponent(h+
AdfDhtmlPivotTablePeer.u+AdfDhtmlPivotTablePeer.uC);l.setValue(g);var m=a?this.LG:this.KI;AdfPage.PAGE.findComponent(h+AdfDhtmlPivotTablePeer.u+AdfDhtmlPivotTablePeer.yt).setTitle(m);h=h+AdfDhtmlPivotTablePeer.u+AdfDhtmlPivotTablePeer.tC;AdfPage.PAGE.findComponent(h).setLabel(m);m=AdfAgent.getAgent().getElementById(h).childNodes[0];h=m.cloneNode(A_b);h.style.visibility="hidden";this.getDomElement().appendChild(h);m.style.width=h.offsetWidth+"px";this.getDomElement().removeChild(h);this.Yq||(this.Yq=
{});m=this.Yq;m.wM=l;m.EL=g;m.qL=b;m.nL=a;m.zs=e;m.YI=c;m.wL=d;m.cell=f}else this.Ib=AdfDhtmlPivotTablePeer.Oi}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentPopupOpening",AdfDhtmlPivotTablePeer.prototype.Kg);AdfDhtmlPivotTablePeer.prototype.rd=function(){this.Ib=AdfDhtmlPivotTablePeer.Cl};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentPopupClosed",AdfDhtmlPivotTablePeer.prototype.rd);
function A_$e(a,b){var c=AdfAgent.AGENT,d=a.getComponent();if(b==a.L&&(d=AdfPage.PAGE.getClientIdsWithMessages(d.getClientId()),d!=A_&&0<d.length))for(var e=0;e<d.length;e++)if(0==d[e].indexOf(b.id))return c=c.getElementById(d[e]),c=A_tf(a,c),c!=A_&&0<c.length&&c[0].focus(),A_b;return A_c}
AdfDhtmlPivotTablePeer.prototype.ia=function(a){if(!(this.Ma==AdfDhtmlPivotTablePeer.va||this.Ib==AdfDhtmlPivotTablePeer.Sg||this.Ib==AdfDhtmlPivotTablePeer.Oi)){var b=this.getComponent(),c=AdfAgent.AGENT,d=a.getNativeEvent(),c=c.getEventTarget(d);if(!A_$e(this,c)&&(!this.Fa||!A_uf(this,d,c))){if(a.isLeftButtonPressed()&&(this.hs(b,c),this.Hm&&this.Ma!=AdfDhtmlPivotTablePeer.va&&((a=c.parentNode.getAttribute(AdfDhtmlPivotTablePeer.yu))||(a=c.parentNode.parentNode.getAttribute(AdfDhtmlPivotTablePeer.yu)),
(b=c.parentNode.getAttribute(AdfDhtmlPivotTablePeer.zu))||(b=c.parentNode.parentNode.getAttribute(AdfDhtmlPivotTablePeer.zu)),a||b))){var e=A_vf(this,c,"TH"),f=A_wf(e),g=AdfRichUIPeer.CreateSubId(this.getComponent().getClientId(),f.startSlice+"::"+AdfDhtmlPivotTablePeer.Au),h=A_,h=e.getAttribute("_vt")==A_a?AdfPivotTableUtils.F()?AdfDhtmlPivotTablePeer.O(e.childNodes[0],g):AdfDhtmlPivotTablePeer.O(e,g):AdfDhtmlPivotTablePeer.O(e.childNodes[0].rows[0].cells[0],g),e=h.getAttribute(AdfDhtmlPivotTablePeer.xu),
g=A_a;a&&e!=AdfDhtmlPivotTablePeer.uE?g=A_b:b&&e!=AdfDhtmlPivotTablePeer.vE&&(g=A_c);g!=A_a&&(this.Bs(AdfPivotTableUtils.l,f.startSlice,g,A_c),AdfAgent.AGENT.eatEvent(d))}A_Ye(this)?(a=A_b,this.L!=A_&&(b=A_xf(this,this.L).ba,b!=A_&&b instanceof AdfUIEditableValue&&(a=b.getValid())),a?(b=A_2e(this,c),b!=A_&&(a=b[0],b=b[1],a==A_||b==A_||(A_yf(this,c,b)?(this.vx!=A_&&(this.ij=A_c,this.km(A_c)),d=b.parentNode.offsetHeight,this.L!=this.fd&&A_gf(this,b,b,d),this.zd=b.parentNode.offsetHeight,c=b.parentNode.offsetHeight-
d,0!=c&&A_zf(this,b,c),this.Dj=A_Af(this,b).row,this.Kj=d,this.fd=this.L=b,A_Bf(this,a,A_b)):A_We(this)||A_hf(this,d,c)))):(d=A_df(this,this.L),A_1(this,d),this.Rj())):(a=AdfAgent.AGENT.getMousePosition(d),(this.Tj==A_a||this.Tj.x!=a.x||this.Tj.x!=a.x)&&!d.shiftKey&&!A_Cf(d)&&A_Df(this,c),this.Tj=A_a,A_We(this)||A_hf(this,d,c))}}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentClick",AdfDhtmlPivotTablePeer.prototype.ia);
function A_hf(a,b,c){if(!a.fa&&!a.fe&&!A_Xe(a)){if(!b.shiftKey&&!A_Cf(b)){var d=A_2e(a,c);d!=A_&&(c=d[0],d=d[1],c!=A_&&d.id&&(c!=A_Ze(a)?(a.L=d,a.zd=d.parentNode.offsetHeight,a.ij=A_b,A_Bf(a,c)):a.Xl&&(b=AdfAgent.AGENT.getEventTarget(b),"INPUT"==b.tagName&&"text"==b.type&&b.select())))}else A_Ze(a)!=A_&&a.Rj();a.Xl=A_c}}
AdfDhtmlPivotTablePeer.prototype.Jg=function(a){if(A_We(this))A_hf(this,a);else{var b=AdfAgent.AGENT;a=a.getNativeEvent();a=b.getEventTarget(a);"INPUT"==a.tagName&&"text"==a.type&&(b.getPlatform()==AdfAgent.IE_PLATFORM?(b=a.createTextRange(),b.moveStart("character",a.value.length),b.moveEnd("character",a.value.length),b.select()):(a.setSelectionRange(a.value.length,a.value.length),a.blur(),a.focus(),b=document.createEvent("KeyboardEvent"),b.initKeyEvent("keypress",A_b,A_b,A_,A_c,A_c,A_c,A_c,27,0),
a.dispatchEvent(b)))}this.am=this.bm=A_};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentDblClick",AdfDhtmlPivotTablePeer.prototype.Jg);
AdfDhtmlPivotTablePeer.prototype.Sc=function(a){if(!(this.Ib==AdfDhtmlPivotTablePeer.Sg||this.Ib==AdfDhtmlPivotTablePeer.Bl||this.Ib==AdfDhtmlPivotTablePeer.Oi)){var b=a.getNativeEvent(),c=AdfAgent.AGENT,d=c.getEventTarget(b),e=b.keyCode;if(this.Fa)for(var f=d,g=this.getDomElement();f!=g;){if(f==this.b.wa[0][0]||f==this.b.wa[0][1]||f==this.b.wa[1][1]||f==this.b.wa[1][0]){e==AdfKeyStroke.ENTER_KEY&&(this.en=A_b);return}f=f.parentNode}var h=b.altKey,l=b.ctrlKey,g=b.shiftKey,f=this.getComponent();if("A"==
d.tagName&&e==AdfKeyStroke.ENTER_KEY){var m=A_2e(this,d);if(m!=A_){var n=m[1];if(m[0]!=A_&&n.id&&n==this.L)return}}if(!this.fa&&this.Ma!=AdfDhtmlPivotTablePeer.va){m=this.v;n=A_ff(this);if(m!=A_&&A_Ef(m)==AdfPivotTableUtils.D&&this.L!=A_&&(n||A_Ff(this,m)==this.L)){switch(e){case AdfKeyStroke.ESC_KEY:a.cancel();!A_We(this)&&A_a!=d.pb?AdfDhtmlPivotTablePeer.IG(d)?(AdfPage.PAGE.scheduleTimer(A_,AdfDhtmlPivotTablePeer.LH,d,0),A_Ye(this)&&(a=A_Gf(this,d,this.L),a!=A_&&(a.resetValue(),a=AdfRichUIPeer.getDomElementForComponent(a),
a!=A_&&a.removeAttribute("_afrCellDirty")))):(A_Ye(this)||A_Hf(a),A_7e(this,a),this.Cq=A_b):A_We(this)&&(A_Hf(a),A_7e(this,a));break;case AdfKeyStroke.TAB_KEY:case AdfKeyStroke.ENTER_KEY:c=A_b;d.pb!=A_a&&d.pb!=d.value&&(c=A_Hf(a));a.cancel();c&&(e==AdfKeyStroke.TAB_KEY?A_If(this,a,e):A_Jf(this,a,e));break;case AdfKeyStroke.ARROWLEFT_KEY:case AdfKeyStroke.ARROWRIGHT_KEY:case AdfKeyStroke.ARROWUP_KEY:case AdfKeyStroke.ARROWDOWN_KEY:!A_We(this)&&(l&&!g)&&(c=A_b,d.pb!=A_a&&d.pb!=d.value&&(c=A_Hf(a)),
a.cancel(),c&&(e==AdfKeyStroke.ARROWLEFT_KEY||e==AdfKeyStroke.ARROWRIGHT_KEY?A_If(this,a,e):A_Jf(this,a,e)))}return}m=this.v;if(m!=A_&&A_Ef(m)!=AdfPivotTableUtils.D&&e==AdfKeyStroke.ENTER_KEY){range=A__a(m);nodes=A_0a(this,range,m.edge);if(0==nodes.length)return;m=nodes[0];n=A_tf(this,m);d=A_Kf(n,d);if(n!=A_&&-1==d){a=m.firstChild;if(a==A_)return;a=a.firstChild;if(a==A_||"SPAN"!=a.nodeName)return;c.getAttribute(a,"_dr")&&A_Lf(this,f,m);return}}}switch(e){case 16:case 18:if(this.fa)break;if(h&&g&&
(!this.ak&&A_mc(this))&&(a=A_of(this),a==AdfPivotTableUtils.l||a==AdfPivotTableUtils.n))c=A_Mf(this),A_nc(this,a,c)&&(A_3e(this),A_Nf(this,a,c,A_oc(this,a,c)),this.ak=A_b);break;case AdfKeyStroke.ARROWRIGHT_KEY:case AdfKeyStroke.ARROWDOWN_KEY:case AdfKeyStroke.ARROWUP_KEY:case AdfKeyStroke.ARROWLEFT_KEY:if(this.fa)break;h?l||this.fe||A_Of(this,e,g):!l||g?(A_Pf(this,g,e,A_c),A_jf(this.getDomElement())):A_Qf(this,e);a.cancel();break;case AdfKeyStroke.ESC_KEY:if(this.fa)break;h&&g&&A_4e(this,A_b);break;
case AdfKeyStroke.SPACE_KEY:if(this.fa)break;m=this.v;m!=A_&&A_Ef(m)!=AdfPivotTableUtils.D&&A_Rf(this,m,b);a.cancel();break;case AdfKeyStroke.F2_KEY:if(this.fa)break;A_Sf(this);break;case AdfKeyStroke.TAB_KEY:if(this.fa)break;if(this.v!=A_&&A_Ef(this.v)==AdfPivotTableUtils.D)if(this.L!=A_)a.cancel();else if(A_Xe(this)&&!A_We(this))a:{if(this.Ma!=AdfDhtmlPivotTablePeer.va){c=-1;if(g)if(0==this.v.column)if(0<this.v.row)e=A_m(this.v.row-1,this.b.fc-1),A_Tf(this,e);else break a;else c=this.b.R?AdfKeyStroke.ARROWRIGHT_KEY:
AdfKeyStroke.ARROWLEFT_KEY;else if(this.v.column==this.b.fc-1)if(this.v.row<this.b.pe-1)e=A_m(this.v.row+1,0),A_Tf(this,e);else break a;else c=this.b.R?AdfKeyStroke.ARROWLEFT_KEY:AdfKeyStroke.ARROWRIGHT_KEY;-1!=c&&A_Pf(this,A_c,c,A_c);a.cancel()}}else A_Uf(this,a);else A_Uf(this,a);break;case AdfKeyStroke.M_KEY:l&&h&&this.zn(b);break;case AdfKeyStroke.ENTER_KEY:if(this.fa)break;A_We(this)||(A_Xe(this)?A_Vf(this,b):(this.Gr=AdfAgent.AGENT.copyEvent(b),A_Sf(this)))}}};
A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentKeyDown",AdfDhtmlPivotTablePeer.prototype.Sc);AdfDhtmlPivotTablePeer.prototype.HandleComponentKeyUp=function(a){this.fa||(a=a.getNativeEvent(),(!a.altKey||!a.shiftKey&&this.$G)&&A_4e(this,A_c))};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentKeyUp",AdfDhtmlPivotTablePeer.prototype.HandleComponentKeyUp);
AdfDhtmlPivotTablePeer.IG=function(a){if("INPUT"==a.tagName){if("text"==a.type)return a.pb!=a.value;if("checkbox"==a.type||"radio"==a.type)return a.pb!=a.checked}else if("SELECT"==a.tagName)for(var b=0;b<a.options.length;b++){if(a.options[b].selected)return a.pb!=a.options[b].value}else if("TEXTAREA"==a.tagName)return a.pb!=a.value;return A_c};
AdfDhtmlPivotTablePeer.VH=function(a){if("INPUT"==a.tagName)if("text"==a.type)a.pb=a.value;else{if("checkbox"==a.type||"radio"==a.type)a.pb=a.checked}else if("SELECT"==a.tagName)for(var b=0;b<a.options.length;b++)a.options[b].selected&&(a.pb=a.options[b].value);else"TEXTAREA"==a.tagName&&(a.pb=a.value)};
AdfDhtmlPivotTablePeer.LH=function(a){if("INPUT"==a.tagName)if("text"==a.type)a.value=a.pb,a.select();else{if("checkbox"==a.type||"radio"==a.type)a.checked=a.pb}else if("SELECT"==a.tagName)for(var b=0;b<a.options.length;b++)a.options[b].selected=A_c,a.pb==a.options[b].value&&(a.options[b].selected=A_b);else"TEXTAREA"==a.tagName&&(a.value=a.pb,a.select())};
function A_Wf(a,b){for(var c=0;2>c;++c){var d=b[a.b.mz[c]],e=d<a.b.o[c]?0:1,f=A_Xf(a,c,e);if(d<f)return A_c;e=A_Yf(a,c,e);if(d>=e)return A_c}return A_b}
function A_Vf(a,b){if(a.v!=A_){var c;b.shiftKey?a.v.row==a.b.o[1]?c=A_Zf(a,1,0,A_c,a.v.column):0<a.v.row&&(c=A_m(a.v.row-1,a.v.column)):a.v.row+1==a.b.o[1]?c=A_Zf(a,1,1,A_b,a.v.column):a.v.row+1<a.b.pe&&(c=A_m(a.v.row+1,a.v.column));if(c==A_)!A_Xe(a)&&!A_Ye(a)&&(c=a.getComponent().getProperty(AdfRichPivotTable.Xc),A__f(a,c,A_,a.zd,A_)&&(a.Rm=c));else if(A_Wf(a,c))A_1(a,c),A_0f(a,c),A_Xe(a)||A_Sf(a);else{var d=a.v.column!=c.column;A_1(a,c);a.Qe=A_b;d?a.zg(c.row,c.column):(c=a.b.he[c.row<a.b.o[1]?0:
1][1],d=a.L.parentNode.offsetHeight,c.scrollTop=b.shiftKey?c.scrollTop-d:c.scrollTop+d,a.Bb(a.getComponent()))}}}
function A_Jf(a,b,c){var d=b.getNativeEvent();if(c==AdfKeyStroke.ENTER_KEY)A_Vf(a,d);else if(c==AdfKeyStroke.ARROWUP_KEY&&0==a.v.row)a.Jj=AdfKeyStroke.ARROWUP_KEY,A_7e(a,b);else if(c==AdfKeyStroke.ARROWDOWN_KEY||c==AdfKeyStroke.ARROWUP_KEY)a.er=c==AdfKeyStroke.ARROWUP_KEY?A_b:A_c,A_Pf(a,A_c,c,A_b),(b=A_1f(a))?a.Qe=A_b:(d=A_Af(a,a.L),c==AdfKeyStroke.ARROWDOWN_KEY&&a.v!=A_&&!b&&d.col==a.v.column&&d.row==a.v.row||A_Sf(a))}
function A_Tf(a,b){A_1(a,b);A_Wf(a,b)?(A_0f(a,b),A_Xe(a)||A_Sf(a)):(a.Qe=A_b,a.zg(b.row,b.column))}
function A_2f(a,b,c){var d=A_Af(a,a.L);0!=d.col&&!a.b.R||d.col<a.b.fc-1&&a.b.R?(a.er=A_b,A_Pf(a,A_c,AdfKeyStroke.ARROWLEFT_KEY,A_b),A_1f(a)&&(a.Qe=A_b,A_Ye(a)&&A_gf(a,a.L,a.L,a.Kj)),A_Sf(a)):c?!a.b.R&&0==d.col?A_We(a)||0==a.v.row?A_7e(a,b):(b=A_m(a.v.row-1,a.b.fc-1),A_Tf(a,b)):a.b.R&&d.col==a.b.fc-1&&(A_We(a)||d.row==a.b.pe-1?A_7e(a,b):(b=A_m(a.v.row+1,0),A_Tf(a,b))):!a.b.R&&0==d.col&&(a.Jj=AdfKeyStroke.ARROWLEFT_KEY,A_7e(a,b))}
function A_3f(a,b,c){var d=A_Af(a,a.L);d.col<a.b.fc-1&&!a.b.R||0!=d.col&&a.b.R?(A_Pf(a,A_c,AdfKeyStroke.ARROWRIGHT_KEY,A_b),A_1f(a)&&(a.Qe=A_b,A_Ye(a)&&A_gf(a,a.L,a.L,a.Kj)),A_Sf(a)):!a.b.R&&d.col==a.b.fc-1?c&&(A_We(a)||d.row==a.b.pe-1?A_7e(a,b):(b=A_m(a.v.row+1,0),A_Tf(a,b))):a.b.R&&0==d.col&&(c?0==a.v.row?A_7e(a,b):(b=A_m(a.v.row-1,a.b.fc-1),A_Tf(a,b)):(a.Jj=AdfKeyStroke.ARROWRIGHT_KEY,A_7e(a,b)))}
function A_If(a,b,c){var d=b.getNativeEvent(),e=AdfAgent.AGENT.getEventTarget(d),f=A_4f(a,e),g=a.b.R;f?c==AdfKeyStroke.TAB_KEY?(c=A_tf(a,f),f=A_Kf(c,e),d.shiftKey&&!g||!d.shiftKey&&g?a.yj(c[0],e)?A_2f(a,b,A_b):A_jf(-1==f?c[0]:c[f-1]):a.yj(c[c.length-1],e)?A_3f(a,b,A_b):A_jf(-1==f?c[0]:c[f+1])):c==AdfKeyStroke.ARROWLEFT_KEY?A_2f(a,b,A_c):A_3f(a,b,A_c):c==AdfKeyStroke.TAB_KEY?d.shiftKey&&!g||!d.shiftKey&&g?A_2f(a,b,A_b):A_3f(a,b,A_b):c==AdfKeyStroke.ARROWLEFT_KEY?A_2f(a,b,A_c):A_3f(a,b,A_c)}
function A_Uf(a,b){var c=b.getNativeEvent();if(!a.fa)if(A_Ze(a)==A_){var d;a:{d=b.getNativeEvent();var e=AdfAgent.AGENT.getEventTarget(d),f=a.v;if(f!=A_&&A_5f(f)){var g=A__a(f),f=A_0a(a,g,f.edge);if(0<f.length&&(f=A_tf(a,f[0]),e=A_Kf(f,e),0<f.length)){if(!d.shiftKey&&e!=f.length-1){b.cancel();A_jf(-1==e?f[0]:f[e+1]);d=A_b;break a}if(d.shiftKey&&0!=e){b.cancel();A_jf(-1==e?f[f.length-1]:f[e-1]);d=A_b;break a}}}d=A_c}d||(c.shiftKey?A_jf(a.getDomElement()):(c=a.getDomElement(),c=AdfDhtmlPivotTablePeer.O(c.childNodes[0],
c.id+"::ScrollbarTesterParent"),c!=A_&&A_jf(c)))}else A_Hf(b),b.cancel(),A_7e(a,b)}AdfDhtmlPivotTablePeer.prototype.zn=function(a){if(!this.fe&&A_8e(this))if(this.getDomElement().focus(),this.fa){var b=A_of(this)==A_;A_5e(this,a,b)}else if(b=this.v,b==A_)A_5e(this,a,A_b);else if(A_5f(b)){var c=A__a(b),c=A_0a(this,c,b.edge);0<c.length&&(this.isSelected(b)||A_cf(this,b),A_5e(this,a,A_c,c[0]))}else c=A_n(b),c=A_Za(this,c),0<c.length&&A_5e(this,a,A_c,c[0])};
AdfDhtmlPivotTablePeer.prototype.HandleComponentMouseOver=function(a){!this.fa&&(!AdfPivotTableUtils.F()&&!this.fe)&&(!this.Sj&&(!this.ym&&!this.hm)&&this.Hm)&&(a=a.getNativeEventTarget(),(a=A_vf(this,a,"TH"))&&A_6f(this,a,A_b))};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentMouseOver",AdfDhtmlPivotTablePeer.prototype.HandleComponentMouseOver);
AdfDhtmlPivotTablePeer.prototype.Ab=function(a){!this.fa&&!AdfPivotTableUtils.F()&&(A_3e(this),this.Hm&&(a=a.getNativeEventTarget(),(a=A_vf(this,a,"TH"))&&A_6f(this,a,A_c)))};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentMouseOut",AdfDhtmlPivotTablePeer.prototype.Ab);
AdfDhtmlPivotTablePeer.prototype.Di=function(a,b){if(!this.fa&&!AdfPivotTableUtils.F()&&this.Ma!=AdfDhtmlPivotTablePeer.va&&!this.Sj&&!this.ym&&!this.hm){var c=AdfAgent.AGENT,d=AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM&&8<=c.getVersion();this.Pq=c.getMousePosition(b);var e=A_af(this,b),f=A_7f(this,c,e),g;f&&(g=f.cell);var h=A_c;f&&(g&&"resize"==f.type&&!this.Gd)&&(h=A_b,"startRow"==f.data||"endRow"==f.data?AdfDhtmlPivotTablePeer.Ca(g,c.getCursor("row-resize")):AdfDhtmlPivotTablePeer.Ca(g,
c.getCursor("col-resize")));if(e.ka&&e.ka.cell||e.ei){var l,m=A_c;e.ka?(f=e.ka.edge,l=e.ka.layer,e=e.ka.Pd,!e&&!h&&(AdfDhtmlPivotTablePeer.Ca(g,this.nw[f]),h=A_b)):(m=A_b,f=e.ei.edge,l=e.ei.layer,e=e.ei.Pd);if(!this.fe)if(e)A_3e(this);else if(e=A_oc(this,f,l),m&&(A_mc(this)&&A_nc(this,f,l,e))&&(h=A_b,AdfDhtmlPivotTablePeer.Ca(e,c.getCursor("move"))),this.gc==A_||e!=A_&&e.id!=this.gc.id)A_3e(this),e!=A_&&A_Nf(this,f,l,e)}else A_3e(this);f=c.getEventTarget(b);c.getAttribute(f.parentNode.parentNode,
"_cellImgName")?this.Cm?f!=this.aH&&(this.Cm=A_c,this.hidePopup(a),A_8f(this,a,f)):A_8f(this,a,f):this.Cm&&(this.Cm=A_c,this.hidePopup(a));!h&&!d&&AdfDhtmlPivotTablePeer.Ca(g,"")}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleDomMouseMove",AdfDhtmlPivotTablePeer.prototype.Di);A_h("AdfDhtmlPivotTablePeer.prototype.HandleDomMouseMove",AdfDhtmlPivotTablePeer.prototype.Di);
AdfDhtmlPivotTablePeer.prototype.bb=function(a){if(!this.fa&&!(this.Ib==AdfDhtmlPivotTablePeer.Sg||this.Ib==AdfDhtmlPivotTablePeer.Oi)){var b=a.getNativeEvent(),c=AdfAgent.AGENT;if(c.isLeftButton(b)){var d=c.getEventTarget(b);if(A_9e(this,d)&&!A_Ye(this))this.enableUserSelect();else{this.disableUserSelect();var e=A_af(this,b),c=A_7f(this,c,e);if("resize"==c.type&&!AdfPivotTableUtils.F()){A_3e(this);if(d="startRow"==c.data||"endRow"==c.data){var f=c.cell,e=A_9f(this,f.parentNode),g=AdfAgent.AGENT.getIntAttribute(e,
"_startSlice"),h=c.yg?1:0,g=g<this.b.o[h]?0:1,l=this.b.T[h][g],m=A_$f(l,e),n=AdfAgent.AGENT,p=f.parentNode.rowIndex;"startRow"==c.data?(p--,0==p&&(AdfAssert.assert(AdfPivotTableUtils.Ha||c.yg&&0<m),m--,e=l[m],p=e.childNodes[0].rows.length-1)):p+=f.rowSpan-1;this.Gd=f=e.childNodes[0].rows[p].cells[0];this.Uj=p;this.$q=m;this.bg=!c.yg;this.Vj=g;m=this.b.yh;m.className=n.getAttribute(m,"_rowClass");p=m.style;p.display="block";p.zIndex=20;p.left="0px";p.height="0px";p.width=this.b.Kb[1]._width+this.b.kb[1][1]._width+
(0<this.b.o[0]?this.b.kb[1][0]._width:0)+"px";f=f.offsetTop+f.offsetHeight;this.Zq=f=c.yg?f+(this.b.xc[h][g]._top+e._top):f-this.b.fb[1].scrollTop;p.top=f+"px";AdfDhtmlPivotTablePeer.Ca(m,n.getCursor("row-resize"))}else{f=c.cell;n=A_9f(this,f.parentNode);h=AdfAgent.AGENT.getIntAttribute(n,"_startSlice");e=c.yg?1:0;p=h<this.b.o[e]?0:1;m=this.b.T[e][p];l=A_$f(m,n);h=AdfAgent.AGENT;g=A_ag(h,f);"startCol"==c.data?(g--,0==g&&(AdfAssert.assert(AdfPivotTableUtils.Ha||!c.yg&&0<l),l--,n=m[l],g=n.childNodes[0].rows[0].cells.length-
1)):g+=f.colSpan-1;this.Gd=m=n.childNodes[0].rows[0].cells[g];this.Uj=g;this.$q=l;this.bg=c.yg;this.Vj=p;c=this.b.yh;c.className=h.getAttribute(c,"_colClass");f=c.style;f.display="block";f.zIndex=20;f.top="0px";f.width="0px";f.height=this.b.fb[1]._height+this.b.kb[1][1]._height+(0<this.b.o[1]?this.b.kb[0][1]._height:0)+"px";var q,l=this.b.xc[e][p],p=l._left,n=e?-l.scrollLeft:n._left,l=m.offsetLeft,m=this.b.R?0:m.offsetWidth;q=e||this.b.R?-1:0;e&&g==this.b.Db&&(q=this.b.R?-2:0);this.Zq=e=p+n+l+m+q;
f.left=e+"px";AdfDhtmlPivotTablePeer.Ca(c,h.getCursor("col-resize"))}this.oe=this.ag=0;this.Sj=A_b;d?AdfPage.PAGE.startDrag(b,this.SH,this.TH):AdfPage.PAGE.startDrag(b,this.vF,this.wF)}else e.ka&&e.ka.cell&&!e.ka.Pd?(this.getDomElement().focus(),A_8e(this)&&(d=A_bf(e.ka.cell),A_Rf(this,d,b)&&(this.ym=A_b,AdfPage.PAGE.startDrag(b,this.px,this.qx)))):e.rg?AdfPivotTableUtils.F()?(A_bg(this,e,b),this.getDomElement().focus(),A_3e(this)):(this.getDomElement().focus(),c=A_c,d!=A_&&(this.L!=A_&&A_4f(this,
d)==this.L)&&(c=A_b),c||A_bg(this,e,b)):AdfPivotTableUtils.F()&&A_3e(this);b=A_2e(this,a.getNativeEventTarget());b!=A_&&b[0]!=A_&&(b=b[0],d=(new Date).getTime(),c=d-this.bm,this.bm==A_||3E3<c||this.am!=b?(this.bm=d,this.am=b):this.bm!=A_&&(0<c&&3E3>c&&this.am==b)&&(b=A__e(b),this.am!=A_&&(this.v!=A_&&b!=A_&&b.row==this.v.row&&b.column==this.v.column)&&this.Jg(a)))}}}};A_h("AdfDhtmlPivotTablePeer.prototype.HandleComponentMouseDown",AdfDhtmlPivotTablePeer.prototype.bb);
function A_af(a,b){var c={},d=AdfAgent.AGENT,e=d.getMousePosition(b);if(a.b.R){var f=d.getWindowWidth();normalizedMouseX=f-e.x}else normalizedMouseX=e.x;c.ba=A_rc(a,d,e);c.target=d.getEventTarget(b);if(c.ba==AdfPivotTableUtils.n||c.ba==AdfPivotTableUtils.l){var g={};c.ka=g;c.ka.Pd=c.ba==AdfPivotTableUtils.n&&0==a.b.Hb||c.ba==AdfPivotTableUtils.l&&0==a.b.Db;var h=A_vf(a,c.target,"TH");if(h){g.cell=h;var l=d.getElementPosition(h);g.cellWidth=h.offsetWidth;g.cellHeight=h.offsetHeight;a.b.R&&(l.x=f-l.x-
g.cellWidth);g.cellMouseX=normalizedMouseX-l.x;g.cellMouseY=e.y-l.y;g.edge=c.ba;g.layer=c.ba==AdfPivotTableUtils.l?A_ag(d,h)-1:A_vf(a,h,"TR").rowIndex-1}c.ei=c.ba==AdfPivotTableUtils.l?A_sc(a,d,e.x,f):A_tc(a,d,e.y)}else if(c.ba==AdfPivotTableUtils.Uc)c.ei=A_sc(a,d,e.x,f);else if(c.ba==AdfPivotTableUtils.pd)c.ei=A_tc(a,d,e.y);else if(h=A_4f(a,c.target))c.rg={},c.rg.cell=h;return c}
function A_rc(a,b,c){var d=a.b.R;if(a.b.o!=A_a){var e=a.b.fb[0<a.b.o[0]?0:1],f=b.getElementPosition(e),g=d?c.x-f.x<=e._width:0<c.x-f.x;if(g&&c.y-f.y<=e._height)return a.Se=AdfPivotTableUtils.n;var h=a.b.Kb[0<a.b.o[1]?0:1];b=b.getElementPosition(h);if((g=d?0<c.x-b.x:c.x-b.x<=h._width)&&0<c.y-b.y)return a.Se=AdfPivotTableUtils.l;var l;switch(a.Se){case AdfPivotTableUtils.l:case AdfPivotTableUtils.Uc:l=AdfPivotTableUtils.Uc;break;case AdfPivotTableUtils.n:case AdfPivotTableUtils.pd:l=AdfPivotTableUtils.pd;
break;default:l=A_}var m=a.Uq?a.Uq:0,g=l==AdfPivotTableUtils.pd&&40<m?m:40;l=l==AdfPivotTableUtils.Uc&&40<m?m:40;var n=m=A_c;(g=d?c.x-f.x<=e._width+g:c.x-f.x>-g)&&c.y-f.y<=e._height&&(n=A_b);(g=d?0<c.x-b.x:c.x-b.x<=h._width)&&c.y-b.y>-l&&(m=A_b);return n&&m?a.Se==AdfPivotTableUtils.l||a.Se==AdfPivotTableUtils.Uc?a.Se=AdfPivotTableUtils.Uc:a.Se=AdfPivotTableUtils.pd:n?a.Se=AdfPivotTableUtils.pd:m?a.Se=AdfPivotTableUtils.Uc:A_}}
function A_8f(a,b,c){a.Cm=A_b;a.aH=c;var d=c.parentNode.parentNode.firstChild.firstChild.cloneNode(A_b),e={};e[A_k.TYPE]=A_k.aD;e[A_k.vz]=c;e[AdfRichPopup.HINT_ALIGN]=AdfRichPopup.ALIGN_BEFORE_START;e[A_k.gl]=A_k.Bz;a.showPopup(b,d,e)}
AdfDhtmlPivotTablePeer.prototype.hs=function(a,b){var c=AdfAgent.AGENT,d=A_c;if(b){var e;e="A"==b.tagName?b:b.parentNode;var f=c.getAttribute(e.parentNode,"_cellImgName");if(f){if(this.Ma==AdfDhtmlPivotTablePeer.va)return;this.fa?(d=c.getIntAttribute(e.parentNode,"_row"),e=c.getIntAttribute(e.parentNode,"_col")):(e=A_Af(this,e.parentNode.parentNode),d=e.row,e=e.col);e=new A_cg(a,d,e,f);e.setPartial(A_b);a.queueEvent(e);d=A_b}else if(c.getAttribute(e.parentNode,"_dr"))e=A_vf(this,e.parentNode,"TH"),
A_Lf(this,a,e),d=A_b;else if(c.getAttribute(e.parentNode,"_adaPivot")){var f=c.getIntAttribute(e.parentNode,"_fromEdge"),d=c.getIntAttribute(e.parentNode,"_fromLayer"),g=c.getIntAttribute(e.parentNode,"_toEdge"),h=c.getIntAttribute(e.parentNode,"_toLayer");e=c.getAttribute(e.parentNode,"_flags");A_yc(this,f,d,g,h,e);d=A_b}else c.getAttribute(e.parentNode,"_adaExtPivot")&&(c=this.Nd(),c!=A_&&(f={},f.fromLayerName=AdfAgent.AGENT.getAttribute(e.parentNode,"_fromLayerName"),c.getPeer().Qo(a,f),d=A_b))}return d};
function A_Lf(a,b,c){a.Ma!=AdfDhtmlPivotTablePeer.va&&(c=A_wf(c),c=new A_dg(b,c.edge,c.startLayer,c.startSlice,"0"),c.setPartial(A_b),A_jf(a.getDomElement()),b.queueEvent(c),c.isCanceled()?A_mf(a,A_Ze(a)):(A_nf(a,AdfDhtmlPivotTablePeer.va),a.Id=A_,a.fa||a.wc(a.ad,A_b)))}
AdfDhtmlPivotTablePeer.prototype.Bs=function(a,b,c,d){b=""+b;var e=this.getComponent();a=new A_eg(e,a,b,c,d);a.setPartial(A_b);A_jf(this.getDomElement());e.queueEvent(a);a.isCanceled()?A_mf(this,A_Ze(this)):(A_nf(this,AdfDhtmlPivotTablePeer.va),this.Id=A_,this.fa||this.wc(this.ad,A_b))};A_h("AdfDhtmlPivotTablePeer.prototype.queueSortRequest",AdfDhtmlPivotTablePeer.prototype.Bs);
function A_6f(a,b,c){var d=A_wf(b);d&&(a=AdfRichUIPeer.CreateSubId(a.getComponent().getClientId(),d.startSlice+"::"+AdfDhtmlPivotTablePeer.Au),d=A_,d=b.getAttribute("_vt")==A_a?AdfPivotTableUtils.F()?AdfDhtmlPivotTablePeer.O(b.childNodes[0],a):AdfDhtmlPivotTablePeer.O(b,a):AdfDhtmlPivotTablePeer.O(b.childNodes[0].rows[0].cells[0],a),d!=A_&&d.getAttribute(AdfDhtmlPivotTablePeer.xu)==A_&&(d.childNodes[0].style.display=c?"":"none"))}
AdfDhtmlPivotTablePeer.prototype.getComponent=function(){return this.hr?this.hr:AdfDhtmlPivotTablePeer.superclass.getComponent.call(this)};
AdfDhtmlPivotTablePeer.prototype.InitDomElement=function(a,b){try{this.hr=a;this.bq=0;AdfDhtmlPivotTablePeer.superclass.InitDomElement.call(this,a,b);if(this.Ja=A_c)this.VE=[],this.Np=0,this.WE=200,this.Zg=(new Date).getTime();var c=AdfAgent.AGENT,d=c.getAttribute(b,"_ada"),e=c.getAttribute(b,"_immediate");this.Vp=c.getAttribute(b,"_adsEnabled")!=A_a;this.ad=c.getAttribute(b,"_fetchText");this.Cv=c.getAttribute(b,"_cellSelected");this.mx=c.getAttribute(b,"_rowSelected");this.Iv=c.getAttribute(b,"_colSelected");
this.Lq=c.getAttribute(b,"_multiple");this.ar=c.getAttribute(b,"_rowInfo");this.cq=c.getAttribute(b,"_colInfo");this.LG=c.getAttribute(b,"_heightText");this.KI=c.getAttribute(b,"_widthText");this.nH=c.getAttribute(b,"_moveBefore");this.pI=c.getAttribute(b,"_swapWith");this.mH=c.getAttribute(b,"_moveAfter");this.pH=c.getAttribute(b,"_moveToRows");this.oH=c.getAttribute(b,"_moveToCols");this.Ib=AdfDhtmlPivotTablePeer.Cl;this.fa=d!=A_a;this.Hm=A_c;this.WG=e!=A_a;this.jg=A_c;AdfPage.PAGE.isStreamingDisabled&&
(this.jg=AdfPage.PAGE.isStreamingDisabled());this.Ma="initBlock";this.Sj=this.$R=A_c;this.$j=this.Zj=this.gc=A_;a.setProperty(AdfRichPivotTable.If,A_a);this.fg=this.aq=this.jn=A_c;this.$l=this.yv=-1;var f=a.getProperty("modelName");f!=A_&&AdfPage.PAGE.setPageProperty("ROW_AND_COLUMN_EDGE:"+f,a.getClientId());this.fe="true"==b.getAttribute("_attachment");this.Fa=AdfDhtmlPivotTablePeer.rL(b);if(this.fa){for(var g=b.childNodes[0].childNodes,h=0;h<g.length;++h){var l=g[h];if(l.id&&(-1!=l.id.indexOf("Inner")||
l.id.lastIndexOf("::et")==l.id.length-4)){var m=g[h];break}}this.b={};var n=c.getIntAttribute(m,"_colExtent"),p=c.getIntAttribute(m,"_rowExtent");this.mv=[n,p];var q=c.getIntAttribute(m,"_colBlockSize"),v=c.getIntAttribute(m,"_rowBlockSize");this.Sp=[q,v];var u=c.getIntAttribute(m,"_startRow"),w=c.getIntAttribute(m,"_startCol");a.setProperty(AdfRichPivotTable.Sl,u);a.setProperty(AdfRichPivotTable.Rl,w);this.ih=[];this.Le=[];this.Pf=[];this.Of=[];var r=c.getIntAttribute(m,"_splitCol"),x=c.getIntAttribute(m,
"_splitRow");this.b.o=[r,x];a.setProperty(AdfRichPivotTable.$u,r);a.setProperty(AdfRichPivotTable.av,x);if(-1!=r){var s=c.getIntAttribute(m,"_secondStartCol");a.setProperty(AdfRichPivotTable.Ip,s);this.Le[0]=0;this.ih[0]=[w,s];this.Pf[0]=[0,s];this.Of[0]=[s,n]}else this.Le[0]=1,this.ih[0]=[A_a,w],this.Pf[0]=[A_a,0],this.Of[0]=[A_a,n];if(-1!=x){var z=c.getIntAttribute(m,"_secondStartRow");a.setProperty(AdfRichPivotTable.Jp,z);this.Le[1]=0;this.ih[1]=[u,z];this.Pf[1]=[0,z];this.Of[1]=[z,p]}else this.Le[1]=
1,this.ih[1]=[A_a,u],this.Pf[1]=[A_a,0],this.Of[1]=[A_a,p];var A=a.getProperty(AdfRichPivotTable.Ff);A==A_a||"foo"==A?a.setProperty(AdfRichPivotTable.Ff,"bar",A_c,AdfUIComponent.PROPAGATE_ALWAYS):a.setProperty(AdfRichPivotTable.Ff,"foo",A_c,AdfUIComponent.PROPAGATE_ALWAYS);for(h=0;2>h;++h)for(var G=this.Le[h];2>G;++G){var B=A_fg(a,h,G,AdfDhtmlPivotTablePeer.St);B&&AdfRichUIPeer.addEventHandlerToDomInstance(AdfDhtmlPivotTablePeer,B,"change");for(d=0;2>d;++d){var D=A_fg(a,h,G,d?AdfDhtmlPivotTablePeer.$D:
AdfDhtmlPivotTablePeer.hE);if(D){var y=A_gg(this,this.BG,[h,G,d]);c.addBubbleEventListener(D,"click",y)}}}AdfPivotTableUtils.D=-1;AdfPivotTableUtils.n=0;AdfPivotTableUtils.l=1;this.tG=c.getBooleanAttribute(m,"_graphSR");A_hg(this,m,g)}else{this.b=new AdfPivotTableUtils(a,this,b);for(var h=0;2>h;++h)for(g=0;2>g;++g)0<h+g&&AdfRichUIPeer.addEventHandlerToDomInstance(AdfDhtmlPivotTablePeer,this.b.he[h][g],"scroll"),this.b.xc[h][g].onscroll=A_gg(this,this.XK,[h,g]),this.b.kb[h][g].onscroll=A_gg(this,this.TK,
[h,g]);AdfRichUIPeer.addEventHandlerToDomInstance(AdfDhtmlPivotTablePeer,b,"mousemove");AdfPivotTableUtils.F()||this.Ls();this.vF=this.createCallback(this.wG);this.wF=this.createCallback(this.xG);this.SH=this.createCallback(this.CG);this.TH=this.createCallback(this.DG);this.px=this.createCallback(this.YK);this.qx=this.createCallback(this.ZK);"true"==c.getAttribute(b,"_cteAll")&&AdfPage.PAGE.addBusyStateListener(this,this.vG);this.fe||(a.setDragSource(new A_jc),a.getDropTarget()==A_&&a.setDropTarget(new A_K));
this.nw=[A_ig(b,0),A_ig(b,1)]}}finally{this.hr=A_}};A_h("AdfDhtmlPivotTablePeer.prototype.InitDomElement",AdfDhtmlPivotTablePeer.prototype.InitDomElement);AdfDhtmlPivotTablePeer.prototype.needsResizeNotify=function(){return this.fa?A_c:A_b};A_h("AdfDhtmlPivotTablePeer.prototype.needsResizeNotify",AdfDhtmlPivotTablePeer.prototype.needsResizeNotify);
AdfDhtmlPivotTablePeer.prototype.ResizeNotify=function(a,b,c,d){if(this.YF)this.b.Kk()||(this.je=d,this.le=c),this.Bb(this.getComponent()),this.b.Cg(c,d),A_jg(this.b),A_kg(this.b,A_b),this.Fa&&A_lg(this);else if(this.b.Aa.style.width=this.getDomElement().offsetWidth-1+"px",this.b.Aa.style.height=this.getDomElement().offsetHeight-1+"px",this.je=d,this.le=c,this.YF=A_b,this.WG)c=AdfDhtmlPivotTablePeer.oh(this.getDomElement()),this.DomReplaceNotify(c);else{if(this.jg||!AdfPage.PAGE.isStreamingRequestPending(this.getComponent().getClientId()))a=
[],b={},b.Rn=c,b.yn=d,a[0]=b,A_mg(this,"initBlock",AdfPivotTableUtils.bB,[],a,A_a,A_a,A_a);this.wc(this.ad,A_b)}};A_h("AdfDhtmlPivotTablePeer.prototype.ResizeNotify",AdfDhtmlPivotTablePeer.prototype.ResizeNotify);
AdfDhtmlPivotTablePeer.prototype.DomReplaceNotify=function(a){try{this.b.Us(1,2);this.b.Da(1,"wrote to logger");this.bq++;if(this.fa)return;this.aq=A_c;var b=this.getComponent(),c=b.getProperty(AdfRichPivotTable.Ff);c==A_a||"foo"==c?b.setProperty(AdfRichPivotTable.Ff,"bar",A_c,AdfUIComponent.PROPAGATE_ALWAYS):b.setProperty(AdfRichPivotTable.Ff,"foo",A_c,AdfUIComponent.PROPAGATE_ALWAYS);var d=AdfAgent.AGENT.getAttribute(a,"_cte");this.b.Da(1,"before CTE block");if(d){var e,f=A_a,g=AdfAgent.AGENT.getIntAttribute(a,
"_orh");if("true"==d){e=a.parentNode.offsetHeight;f=e-g;if(this.Rm!=A_){var h=A__e(this.Rm),l=A_Af(this,a);h.column==l.col&&h.row==l.row&&(f=0)}this.Sm=g;this.Dj=A_Af(this,a).row;this.L=a;this.Jq=e}else"false"==d&&(e=a.parentNode.offsetHeight,g&&(f=g-e),A_Af(this,a).row==this.Dj&&(f=0,this.Sm=g));f?A_zf(this,a,f):AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM&&A_ng(a.parentNode,e);return}this.b.Da(1,"CTE block");if(a.id==this.getDomElement().id+"::RequestDone"){A_1e(this);var m=AdfAgent.AGENT.getBooleanAttribute(a,
"_vError",A_c);if(m){var n;n=AdfAgent.AGENT.getBooleanAttribute(a,"_CTEAction",A_c)?this.Rm:A_Ze(this);this.getComponent().setProperty(AdfRichPivotTable.Xc,n,A_c,AdfUIComponent.PROPAGATE_ALWAYS);A_og(this,n);A_nf(this,A_);this.Id=A_;this.lr=this.Qe=A_c;this.sg=A_}A_pg(this);this.Ma==AdfDhtmlPivotTablePeer.va&&A_nf(this,A_);this.jn=A_c;this._hideStatus();this.ex||(this.ex=this.createCallback(this.Rj));AdfAgent.AGENT.getDomWindow().setTimeout(this.ex,10);this.Ew&&this.ig&&A_kg(this.b,A_b);this.ig=this.Ew=
A_;this.Jj!=A_&&(m||(this.getDomElement().focus(),A_Qf(this,this.Jj)),this.Jj=A_);this.sg!=A_&&(this.OF=this.createCallback(this._displayContextMenuAfterEdit),AdfAgent.AGENT.getDomWindow().setTimeout(this.OF,300));this.Gr!=A_&&(this.L!=A_&&0==A_tf(this,this.L).length&&A_Vf(this,this.Gr),this.Gr=A_)}this.b.Da(1,"RequestDone block");var p=AdfDhtmlPivotTablePeer.oh(this.getDomElement());if(a==p){var q=AdfAgent.AGENT.getAttribute(p,"_renType"),v=A_qg(p,this.b.ic,AdfPivotTableUtils.D);if(this.Ja){var u=
{};A_rg(this,u);u.type="DRN";u.time=(new Date).getTime()-this.Zg;u.scrollLeft=this.b.ya(1,1).scrollLeft;u.scrollTop=this.b.ya(1,1).scrollTop;u.lU=q;u.BS=v;u.pU=A_qg(p,this.b.ic,AdfPivotTableUtils.l);u.yS=A_qg(p,this.b.ic,AdfPivotTableUtils.n)}A_sg(this.Id,v,q)&&(this.Id=A_);if(this.Ma==AdfDhtmlPivotTablePeer.va&&q!=AdfDhtmlPivotTablePeer.va){this.Ja&&(u.mS=A_b);"initialFillViewport"==q&&this.ig&&(this.Ew=A_b);return}if("longScroll"==q||"shortScroll"==q||"initialFillViewport"==q)this.Ja&&(u.wS=A_b),
this.Bb(0,0,A_b);if(this.Ma!=AdfDhtmlPivotTablePeer.va&&!A_sg(this.Ma,v,q)){this.Ja&&(u.lS=(new Date).getTime()-this.Zg);return}if(this.Vp){var w=AdfAgent.AGENT.getIntAttribute(v[0],"_adsCounter"),r="shortScroll"==q||"initialFillViewport"==q;if(w<this.yv||w>this.$l&&r){AdfPage.PAGE.addPartialTargets(this.getComponent());return}}this._hideStatus();AdfPivotTableUtils.F()&&!this.Fa&&(this.b.Wm=A_c);b.setProperty(AdfRichPivotTable.If,A_a);var x;a:{for(var s=p.childNodes,z=0;z<s.length;z++){var A=s[z];
if(A.id&&-1!=A.id.indexOf(AdfDhtmlPivotTablePeer.tu)){x=A.getAttribute("_selection");break a}}AdfLogger.LOGGER.severe("Selection String not found.  This is unexpected.");x=A_}this.b.Da(1,"in block-fetch block, just before switch");switch(q){case "initBlock":var G=AdfAgent.AGENT.getAttribute(p,"_summary"),B=this.b.oI,D=AdfAgent.AGENT.getAttribute(B,"id");AdfAgent.AGENT.setTextContent(B,G);AdfAgent.AGENT.setAttribute(this.b.ac,"aria-describedby",D);case AdfDhtmlPivotTablePeer.va:var y=this.b,C=AdfAgent.AGENT.getIntAttribute(p,
"_startRow"),H=AdfAgent.AGENT.getIntAttribute(p,"_startCol"),F=AdfAgent.AGENT.getIntAttribute(p,"_startRowPixel"),t=AdfAgent.AGENT.getIntAttribute(p,"_startColPixel"),E=AdfAgent.AGENT.getIntAttribute(p,"_rowHeaderStartLayer"),K=AdfAgent.AGENT.getIntAttribute(p,"_colHeaderStartLayer"),I=AdfAgent.AGENT.getIntAttribute(p,"_rowHeaderStartPixel"),J=AdfAgent.AGENT.getIntAttribute(p,"_colHeaderStartPixel");b.setProperty(AdfRichPivotTable.Sl,C);b.setProperty(AdfRichPivotTable.Rl,H);b.setProperty(AdfRichPivotTable.dv,
F);b.setProperty(AdfRichPivotTable.cv,t);b.setProperty(AdfRichPivotTable.Zi,E);b.setProperty(AdfRichPivotTable.Xi,K);b.setProperty(AdfRichPivotTable.$i,I);b.setProperty(AdfRichPivotTable.Yi,J);var L=AdfAgent.AGENT.getIntAttribute(p,"_splitCol"),R=AdfAgent.AGENT.getIntAttribute(p,"_splitRow");y.o=[L,R];var N=y.o;b.setProperty(AdfRichPivotTable.$u,L);b.setProperty(AdfRichPivotTable.av,R);-1==L&&-1==R&&(y.bk[0]=0.5,y.bk[1]=0.5);if(-1!=L){var O=AdfAgent.AGENT.getIntAttribute(p,"_secondStartCol"),Ga=AdfAgent.AGENT.getIntAttribute(p,
"_secondStartColPixel");b.setProperty(AdfRichPivotTable.Ip,O);b.setProperty(AdfRichPivotTable.Yu,Ga)}if(-1!=R){var ia=AdfAgent.AGENT.getIntAttribute(p,"_secondStartRow"),qa=AdfAgent.AGENT.getIntAttribute(p,"_secondStartRowPixel");b.setProperty(AdfRichPivotTable.Jp,ia);b.setProperty(AdfRichPivotTable.Zu,qa)}var ib=AdfAgent.AGENT.getIntAttribute(p,"_cExtent"),jb=AdfAgent.AGENT.getIntAttribute(p,"_rExtent");y.pm=[ib,jb];var kb=y.pm,Ua=AdfAgent.AGENT.getIntAttribute(p,"_cLayerCount"),Ya=AdfAgent.AGENT.getIntAttribute(p,
"_rLayerCount");y.dH=[Ua,Ya];var Za=AdfAgent.AGENT.getIntAttribute(p,"_cBlockSize"),lb=AdfAgent.AGENT.getIntAttribute(p,"_rBlockSize");y.gF=[Za,lb];y.i=[];y.Rf=[[],[]];y.xd=[[],[]];y.Uw=[[],[]];for(var Ha=y.i,Na=y.Rf,$a=y.xd,mb=y.Uw,X=0;2>X;++X){-1==N[X]?Ha[X]=1:(Ha[X]=0,Na[X][1]=N[X],$a[X][0]=N[X]);Na[X][Ha[X]]=0;$a[X][1]=kb[X];for(var Ia=Ha[X];2>Ia;++Ia)mb[X][Ia]=$a[X][Ia]-Na[X][Ia]}y.KG=[Number(AdfAgent.AGENT.getAttribute(p,"_sizeAlloc0")),Number(AdfAgent.AGENT.getAttribute(p,"_sizeAlloc1"))];
y.JG=[AdfAgent.AGENT.getAttribute(p,"_sizeUnit0"),AdfAgent.AGENT.getAttribute(p,"_sizeUnit1")];y.fc=ib;y.pe=jb;y.Hb=Ua;y.Db=Ya;y.Hv=Za;y.kx=lb;this.b.Da(1,"Init case: just called initInfo");this.Hm=AdfAgent.AGENT.getBooleanAttribute(p,"_sortEnabled");this.gc=A_;var ab=A_tg(p,this.b.ic+"::"+AdfDhtmlPivotTablePeer.hB)[0];this.b.Xv=ab;this.cq=TrFastMessageFormatUtils.format(this.cq,"{0}",this.b.fc);this.ar=TrFastMessageFormatUtils.format(this.ar,"{0}",this.b.pe);this.b.Da(1,"Init case: just did some misc init");
for(var Ja=this.b,za=Ja.o,ba=Ja.xc,Va=Ja.kb,bb=Ja.he,ra=0;2>ra;++ra){var ja=-1==za[ra]?"none":"block";ba[ra][0].style.display=ja;(ra?Va[0][1]:Va[1][0]).style.display=ja;AdfPivotTableUtils.F()||((ra?bb[0][1]:bb[1][0]).style.display=ja)}Va[0][0].style.display=-1!=za[0]&&-1!=za[1]?"block":"none";this.b.Da(1,"Init case: setVisibilityOfPanes");A_ug(this.b);this.b.Da(1,"Init case: removeAllBlocks");for(var ka=this.b,fa=A_tg(ka.Tb,ka.ic+"::ph"),cb=fa.length,Aa=0;Aa<cb;Aa++)ka.Tb.removeChild(fa[Aa]);ka.qa&&
ka.Tb.removeChild(ka.qa);for(var sa=this.b,nb=A_tg(p,sa.ic+"::ph"),tb=nb.length,Wa=0;Wa<tb;Wa++)sa.Tb.appendChild(nb[Wa]);sa.qa=AdfDhtmlPivotTablePeer.O(p,sa.ic+"::LayerLabelBlock");sa.qa&&A_vg(sa,sa.Tb,sa.qa);this.b.Da(1,"Init case: pivothandles");ab&&this.b.kb[1][1].appendChild(ab);A_wg(this.b);this.b.Da(1,"Init case: addBlocksToBuffer");var Xa=A_xg(this.b,A_b);this.b.Da(1,"Init case: sizeInitialHTMLBlocks");A_yg(this)&&this.b.Fq&&A_zg(this.b);this.b.Cg(this.le,this.je);this.b.Da(1,"Init case: sizePivotTable");
A_Ag(this.b,Xa);this.b.Da(1,"Init case: positionInitialBlocks");A_nf(this,A_,w);A_Bg(this.b);A_kg(this.b,A_b);this.b.Da(1,"Init case: fetchNearbyBlocks");A_Cg(this,x);this.b.Da(1,"Init case: initializeSelection");var Oa=AdfAgent.AGENT.getAttribute(p,"_ack");"null"!=Oa?(b.setProperty(AdfRichPivotTable.Xc,Oa,A_c,AdfUIComponent.PROPAGATE_ALWAYS),b.setProperty("activeCellKey",Oa,A_c,AdfUIComponent.PROPAGATE_ALWAYS)):(b.setProperty(AdfRichPivotTable.Xc,A_,A_c,AdfUIComponent.PROPAGATE_ALWAYS),b.setProperty("activeCellKey",
A_,A_c,AdfUIComponent.PROPAGATE_ALWAYS));this.b.Da(1,"Init case: ACK");var Ka=this.getComponent(),W=p.getAttribute("_initACK");W?(Ka.setProperty(AdfRichPivotTable.Xc,W,A_c,AdfUIComponent.PROPAGATE_NEVER),Ka.setProperty("activeCellKey",W,A_c,AdfUIComponent.PROPAGATE_NEVER),this.Xl=A_b):p.getAttribute("_afrACKChange")&&(this.Xl=A_b);break;case "longScroll":if("true"==this.getDomElement().getAttribute("_rngChgLstnr"))var Ba=this.b.cloneArray(this.b.N);A_ug(this.b);A_wg(this.b);if(Ba!=A_){var ha=A_Dg(this,
Ba,this.b.N);ha.$p=A_c}Xa=A_xg(this.b,A_c);A_yg(this)&&this.b.Fq&&A_zg(this.b);this.b.Cg(this.le,this.je);A_Ag(this.b,Xa);A_Eg(this,x);A_nf(this,A_,w);A_Bg(this.b);ha!=A_&&b.queueEvent(ha);A_Fg(this);break;case "shortScroll":case "initialFillViewport":for(var Pa=[[],[]],la=1;0<=la;--la)for(var ma=this.b.i[la];2>ma;++ma)Pa[la][ma]=this.b.aa(la,ma)-A_Gg(this.b,la,ma);"true"==this.getDomElement().getAttribute("_rngChgLstnr")&&(Ba=this.b.cloneArray(this.b.N));var S=this.b,ob=[[],[]],Qa=A_c,Ra=A_c,M=0;
a:for(;2>M;++M)for(var P=S.i[M];2>P;++P){var ta=S.T[M][P].length;if(0==ta){Qa=A_b;break a}var ca=A_Hg(S,M,P,Pa?Pa[M][P]:0);if(!A_Ig(S,M,P,ca)){Ra=A_b;break a}ca.start=Math.max(ca.start,0);ca.end=Math.min(ca.end,ta-1);ob[M][P]=ca}if(Qa)AdfLogger.LOGGER.severe("trimBuffer found that the buffer was already empty.  This is unexpected."),A_ug(S);else if(Ra)AdfLogger.LOGGER.severe("trimBuffer is removing all blocks due to no overlap.  This is unexpected."),A_ug(S);else{for(M=1;0<=M;--M)for(P=S.i[M];2>P;++P){var ca=
ob[M][P],na=ca.end+1,ta=S.T[M][P].length,Ca=ta-na;A_Jg(S,M,P,na,Ca);na=0;Ca=ca.start;A_Jg(S,M,P,na,Ca)}for(M=1;0<=M;--M)for(P=S.i[M];2>P;++P){var Sa=S.T[M][P],ua=Sa.length-1;Sa[ua]._placeholder&&(na=ua,Ca=1,A_Jg(S,M,P,na,Ca))}for(M=1;0<=M;--M)for(P=S.i[M];2>P;++P){var Sa=S.T[M][P],Q=Sa[0];Q&&Q._placeholder&&(na=0,Ca=1,A_Jg(S,M,P,na,Ca))}for(M=0;2>M;++M)for(P=S.i[M];2>P;++P)0==S.T[M][P].length&&(AdfLogger.LOGGER.severe("trimBuffer found overlap betweeen the buffer and the viewport, but that overlap was exclusively placeholder rows/columns, so it removed all blocks.  This is unexpected."),
A_ug(S))}Ba!=A_&&(ha=A_Dg(this,Ba,this.b.N));A_wg(this.b);if(this.Vp){var T=w,pa=this.YE;if(pa){for(var La=0;La<pa.length&&pa[La]<=T;){La++;var db=pa[La++];A_Kg(this,db,A_c)}pa.splice(0,La)}}for(var U=this.b,va=AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM,Da=[],da=U.i[0];2>da;++da)for(var Ta=U.na[da],Ea=Ta.length,Z=0;Z<Ea;Z++){var oa=Ta[Z];if(!oa._placeholder){for(var wa=[],Y=U.i[1];2>Y;++Y)for(var Ma=U.N[Y][da],ub=Ma.length,ea=0;ea<ub;ea++){var xa=Ma[ea][Z];xa&&xa._new&&wa.push(xa)}if(oa._new)A_Lg(U,
oa,wa);else for(var pb=wa,qb=oa.kd,Mb=pb.length,vb=0;vb<Mb;++vb)pb[vb].kd=qb;Da.push(oa)}}for(Y=U.i[1];2>Y;++Y)for(var Bb=U.Ga[Y],Ea=Bb.length,ea=0;ea<Ea;ea++){for(var Cb=Bb[ea],wa=[],Db=[],da=U.i[0];2>da;++da)for(var Ma=U.N[Y][da],Nb=Ma[ea].length,Z=0;Z<Nb;Z++)(xa=Ma[ea][Z])&&xa._new?(va&&U.R&&(xa.childNodes[0].style.position="absolute"),wa.push(xa)):Db.push(xa);(Cb._new||0<wa.length)&&A_Mg(U,Cb,wa,Db,ea)}A_Ng(U,Da,A_c);A_Og(U,A_b);var wb,eb,Eb;if(AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM&&
!(8<=AdfAgent.AGENT.getVersion()))A_Pg(U,A_b);else for(var xb=U.i[1];2>xb;++xb){wb=U.Ga[xb];Eb=wb.length;for(i=0;i<Eb;i++)eb=wb[i],!eb._placeholder&&eb._new&&A_3(U,eb,eb.childNodes[0].offsetWidth,AdfPivotTableUtils.n)}A_yg(this)&&A_zg(this.b);this.b.Cg(this.le,this.je);var aa=this.b,V,ga,Fa,fb,yb=[[],[]];for(V=1;0<=V;--V){var Ob=aa.T[V],Fb=aa.lh[V],Pb=aa.Bh[V],Qb=aa.$f[V];for(ga=aa.i[V];2>ga;++ga){var zb=Ob[ga],Ab=zb.length,gb=A_,ya=zb[0];ya._new||(gb=ya);var Rb=aa.getIntAttribute(ya,"_startSlice")-
aa.Rf[V][ga];A_Qg(V,aa.jm[V]*Rb,ya);for(Fa=1;Fa<Ab;Fa++){var Gb=ya,ya=zb[Fa];gb==A_&&!ya._new&&(gb=ya);A_Qg(V,Gb[Fb]+Gb[Pb],ya);ya.style[V?"left":"top"]="0px"}yb[V][ga]=gb[Fb]-(gb[Qb]-Pa[V][ga])}}for(var Sb=aa.Ga,Tb=aa.na,Ub=aa.N,rb=aa.i[1];2>rb;++rb)for(var Vb=Sb[rb],Wb=Ub[rb],sb=aa.i[0];2>sb;++sb){var Xb=Tb[sb],Hb=Wb[sb],Ab=Hb.length;for(Fa=0;Fa<Ab;Fa++){var Yb=Vb[Fa],Ib=Hb[Fa],Zb=Ib.length;for(fb=0;fb<Zb;fb++){var $b=Xb[fb],Jb=Ib[fb];A_Qg(1,Yb._canvasTop,Jb);A_Qg(0,$b._canvasHorizPos,Jb)}}}for(V=
1;0<=V;--V)for(ga=aa.i[V];2>ga;++ga)aa.Ba.Ja&&A_rg(aa.Ba,"positionNewHTMLBlocks calling setScrollPos("+V+", "+ga+", "+yb[V][ga]+")"),aa.setScrollPos(V,ga,yb[V][ga]);A_jg(this.b,A_b);A_Rg(this.b);A_Sg(this,x);A_Tg(this,A_c,A_b);A_nf(this,A_,w);A_Bg(this.b);ha!=A_&&b.queueEvent(ha);A_Fg(this);break;default:AdfAssert.assert(AdfPivotTableUtils.Ha,"unexpected renderType in DomReplaceNotify")}this.b.Da(1,"after switch");if(this.lr){this.lr=A_c;var hb=this.AI,Kb=A_Ug(this,hb.edge,hb.AL,hb.BL);Kb!=A_&&A_Vg(this,
Kb,hb.zs,hb.extend)}A_pg(this);A_1e(this);this.Fa&&A_lg(this)}else if("TD"==a.nodeName&&AdfAgent.AGENT.getPlatform()==AdfAgent.IE_PLATFORM){var Lb=a.parentNode;Lb!=A_&&A_ng(Lb)}this.L!=A_&&(a!=A_&&a.id==this.L.id)&&(this.L=a)}catch(ac){AdfLogger.LOGGER.severe(ac.message)}finally{this.bq--}this.b.Vs(1,"end","DomReplaceNotify");return a};A_h("AdfDhtmlPivotTablePeer.prototype.DomReplaceNotify",AdfDhtmlPivotTablePeer.prototype.DomReplaceNotify);
function A_Fg(a){if(!A_kg(a.b,A_b))if(a.Qe)a.v!=A_&&(A_0f(a,a.v),A_Xe(a)?A_1(a,a.v):A_Sf(a)),a.Qe=A_c;else if(a.b.uq||a.b.pr){var b=a.eg;if(b!=A_)if(A_Wf(a,b))A_0f(a,b);else if(a.b.uq){var c=b.row<a.b.o[1]?0:1,c=A_Xf(a,AdfPivotTableUtils.l,c);a.zg(c,b.column)}else a.b.pr&&(c=b.column<a.b.o[0]?0:1,c=A_Xf(a,AdfPivotTableUtils.n,c),a.zg(b.row,c));a.b.uq=A_c;a.b.pr=A_c}}function A_pg(a){var b=A_Ze(a);a.L=b==A_?A_:A_Wg(a,b)}function A_mf(a,b){A_og(a,b);A_Xg(a);a._hideStatus()}
function A_og(a,b){if(b!=A_){var c=A__e(b);if(c!=A_){A_1(a,c);for(var d=0;2>d;d++)for(var e=a.b.i[d];2>e;++e){var f=A_Gg(a.b,d,e);a.Ja&&A_rg(a,"_readjustScrollPos calling setScrollPos("+d+", "+e+", "+f+")");a.b.setScrollPos(d,e,f)}A_0f(a,c);a.sg=A_}}}function A__e(a){a=a.split(":");return 2==a.length?A_m(1*a[0],1*a[1]):A_}function A_Wg(a,b){var c=A__e(b);return c!=A_&&(c=A_n(c),c=A_Za(a,c),0<c.length&&c[0]!=A_)?c[0]:A_}
function A_Ff(a,b,c){return b!=A_&&(b=A_n(b),a=A_Za(a,b,A_a,c),0<a.length)?a[0]:A_}AdfDhtmlPivotTablePeer.rL=function(a){return"true"==AdfAgent.AGENT.getAttribute(a,"_paging")};
function A_uf(a,b,c){for(var d=0;2>d;d++)for(var e=a.b.i[d];2>e;e++){if(a.Re(c,AdfDhtmlPivotTablePeer.Ui[d][e])){A_k.sa(c,"p_AFActivated");a.Te=AdfPivotTableUtils.uf[d][e];a.uc=0;c=a.b.Ne[d][e];var f=A_Yg(a.b,d,e,0),g=A_Zg(a.b,d,e),h=1;0<f.lc&&f.slice!=g.slice?h=f.Ag:a.uc=1;f=a.b.aa(d,e);c=(d==AdfPivotTableUtils.l?c.clientHeight:c.clientWidth)-h;c>f&&(a.uc=a.uc+c-f);a.b.setScrollPos(d,e,f-c,A_b);a.Bb(a.getComponent());AdfAgent.AGENT.eatEvent(b);return A_b}if(a.Re(c,AdfDhtmlPivotTablePeer.Ef[d][e]))return A_k.sa(c,
"p_AFActivated"),a.Te=AdfPivotTableUtils.Fi[d][e],c=a.b.Ne[d][e],f=A_Zg(a.b,d,e),h=f.Ag,0>=f.fi?h=f.fi:f.slice==A_Yg(a.b,d,e,0).slice&&(h=0),f=a.b.aa(d,e),a.b.setScrollPos(d,e,f+(d==AdfPivotTableUtils.l?c.clientHeight:c.clientWidth)-h,A_b),a.Bb(a.getComponent()),AdfAgent.AGENT.eatEvent(b),A_b;if(a.Re(c,AdfDhtmlPivotTablePeer.Cf[d][e]))return A_k.sa(c,"p_AFActivated"),a.Te=AdfPivotTableUtils.Og[d][e],a.b.setScrollPos(d,e,0,A_b),a.Bb(a.getComponent()),AdfAgent.AGENT.eatEvent(b),A_b;if(a.Re(c,AdfDhtmlPivotTablePeer.Df[d][e]))return A_k.sa(c,
"p_AFActivated"),a.Te=AdfPivotTableUtils.Pg[d][e],a.b.setScrollPos(d,e,a.b.ke[d][e],A_b),a.Bb(a.getComponent()),AdfAgent.AGENT.eatEvent(b),A_b}return A_c}AdfDhtmlPivotTablePeer.prototype.vm=function(a,b){for(var c=a,d=A_,e=this.getDomElement();!d&&c&&c!=e.parent&&1==c.nodeType;)if(c.id&&0<=c.id.indexOf(b)){d=c;break}else c=c.parentNode;return d};
AdfDhtmlPivotTablePeer.prototype.Re=function(a,b){var c=AdfRichUIPeer.CreateSubId(this.getComponent().getClientId(),b);return this.vm(a,c)!=A_?!A_k.ja(a,"p_AFDisabled"):A_c};function A__g(a,b){var c=A_Yg(a.b,b,1,0);return 0<c.lc?c.slice+1:c.slice}
function A_lg(a){for(var b=0;2>b;b++)for(var c=a.b.i[b];2>c;c++){var d;if(d=a.Te==AdfPivotTableUtils.uf[b][c])a:{d=a;var e=b,f=c;if(d.uc!=A_&&1<d.uc){var g=d.b.aa(e,f);if(1<g){d.b.setScrollPos(e,f,g-d.uc,A_b);d.uc=0;d.Bb(d.getComponent());d=A_b;break a}d.uc=0}d=A_c}if(d)return}d=[[],[]];var e=[[],[]],f=[[],[]],g=[[],[]],h=[[],[]];h[0][0]=a.b.o[0];h[1][0]=a.b.o[1];h[0][1]=a.b.pm[0];h[1][1]=a.b.pm[1];for(b=0;2>b;b++)for(c=a.b.i[b];2>c;c++)if(d[b][c]=A_Yg(a.b,b,c,0),e[b][c]=d[b][c].slice,f[b][c]=A_Zg(a.b,
b,c),g[b][c]=f[b][c].slice,-1!=e[b][c]&&-1!=g[b][c]){var l;l=a;var m=d[b][c],n=f[b][c],p=g[b][c],q=b,v=c,u=h[b][c],w=a.b.Ne[b][c];if(l.Te==AdfPivotTableUtils.Og[q][v]&&0<m.lc)l.b.setScrollPos(q,v,0,A_b),l.Bb(l.getComponent()),l=A_b;else if(l.Te==AdfPivotTableUtils.Pg[q][v]&&0<n.fi)l.b.setScrollPos(q,v,l.b.ke[q][v],A_b),l.Bb(l.getComponent()),l=A_b;else if(0<m.lc&&!(0==n.fi&&p+1==u&&m.slice!=n.slice)){var r=m.Ag,x=l.b.aa(q,v);if(m.lc==l.uc)l.b.setScrollPos(q,v,x-l.uc,A_b);else{if((l.Te==AdfPivotTableUtils.uf[q][v]||
m.slice==n.slice&&p+1==u)&&m.Ag>=(q==AdfPivotTableUtils.l?w.clientHeight:w.clientWidth)-l.uc)r=-1*m.lc;l.b.setScrollPos(q,v,x+r,A_b)}l.uc=0;l.Bb(l.getComponent());l=A_b}else l=A_c;if(l)return}else return;a.en=A_c;a.uh=[[A_c,A_c],[A_c,A_c]];l=A_b;for(b=0;2>b;b++){m=a.b.o[b];for(c=a.b.i[b];2>c;c++){var u=a,w=b,r=c,q=-1!=m&&1==c?m+1:1,p=h[b][c],x=e[b][c],v=g[b][c],n=u.b.wa[w][r],s=u.b.Mj[w][r];if(-1!=x&&-1!=v){x!=v&&(0<d[b][c].lc&&x++,0<f[b][c].fi&&v--);x++;v++;var z=n.childNodes[0].offsetWidth,A=n.childNodes[0].childNodes[0].childNodes[0];
if(n.offsetWidth<z)n.Vm==A_&&(A.childNodes[3].style.display="none",A.childNodes[4].style.display="none",A.childNodes[5].style.display="none",n.Vm=z);else if(n.Vm==A_||parseInt(n.Vm)<=n.offsetWidth)z=A.childNodes[5],u.Sw==A_&&(u.Sw=z.innerHTML),z.innerHTML=u.Sw.replace("-",p).replace("_","- ".concat(v)),A.childNodes[3].style.display="",A.childNodes[4].style.display="",A.childNodes[5].style.display="",n.Vm=A_;s=AdfPage.PAGE.findComponent(u.getComponent().getClientId().concat(s));x!=s.getValue()&&(u.uh[w][r]=
A_b,s.setValue("".concat(x)));firstArrow=A.childNodes[1].childNodes[0];prevArrow=A.childNodes[2].childNodes[0];lastArrow=A.childNodes[7].childNodes[0];nextArrow=A.childNodes[6].childNodes[0];u=x;w=firstArrow;r=prevArrow;x=lastArrow;A=nextArrow;A_k.ja(w,"p_AFActivated")?A_k.S(w,"p_AFActivated"):A_k.ja(r,"p_AFActivated")?A_k.S(r,"p_AFActivated"):A_k.ja(x,"p_AFActivated")?A_k.S(x,"p_AFActivated"):A_k.ja(A,"p_AFActivated")&&A_k.S(A,"p_AFActivated");s=AdfAgent.AGENT;u==q?A_k.ja(w,"p_AFDisabled")||(A_k.sa(w,
"p_AFDisabled"),w.removeAttribute("href"),A_k.sa(r,"p_AFDisabled"),r.removeAttribute("href")):A_k.ja(w,"p_AFDisabled")&&(A_k.S(w,"p_AFDisabled"),s.setAttribute(w,"href","#"),A_k.S(r,"p_AFDisabled"),s.setAttribute(r,"href","#"));v==p?A_k.ja(x,"p_AFDisabled")||(A_k.sa(x,"p_AFDisabled"),x.removeAttribute("href"),A_k.sa(A,"p_AFDisabled"),A.removeAttribute("href")):A_k.ja(x,"p_AFDisabled")&&(A_k.S(x,"p_AFDisabled"),s.setAttribute(x,"href","#"),A_k.S(A,"p_AFDisabled"),s.setAttribute(A,"href","#"));n.parentNode.style.visibility=
"visible";n=A_b}else n=A_a;n||(l=A_c)}}l&&(a.Te=A_)}function A_Hf(a){a=a.getSource();return a instanceof AdfUIEditableValue?(AdfPage.PAGE.clearMessages(a.getClientId()),a.validate(),a.getValid()):A_b}function A_nf(a,b,c){a.Ma=b;if(a.Vp&&b==A_){if(b=a.YE){for(var d=0;d<b.length;)id=b[d++],payload=b[d++],id>c&&A_Kg(a,payload);b.length=0}a.$l=Math.max(a.$l,c);a.yv=a.$l}}AdfDhtmlPivotTablePeer.prototype.enableUserSelect=function(){AdfAgent.AGENT.enableUserSelect(this.getDomElement());this.kq=A_b};
AdfDhtmlPivotTablePeer.prototype.disableUserSelect=function(){(this.kq==A_a||this.kq)&&AdfAgent.AGENT.disableUserSelect(this.getDomElement());this.kq=A_c};function A_rg(a,b){a.VE[a.Np]=b;++a.Np==a.WE&&(a.Np=0)}
function A_0g(a){for(var b={},c=0;c<a.length;c++)for(var d=0;d<a[c].length;d++){var e=a[c][d];if(e.getAttribute){var f=parseInt(e.getAttribute("_startrow"),10),g=parseInt(e.getAttribute("_startcol"),10);if(b.lf==A_||b.lf>f)b.lf=f;if(b.Fb==A_||b.Fb>g)b.Fb=g;if(e.firstChild&&"TABLE"==e.firstChild.tagName){f=f+(e.firstChild.rows.length-1)-1;e=g+(e.firstChild.rows[0].cells.length-1)-1;if(b.Ze==A_||b.Ze<f)b.Ze=f;if(b.Mh==A_||b.Mh<e)b.Mh=e}}}return b}
function A_Dg(a,b,c){b=b[1][1];c=c[1][1];var d=A_0g(b),e=A_0g(c);if(d.lf==e.lf&&d.Ze==e.Ze&&d.Fb==e.Fb&&d.Mh==e.Mh)return A_;a=a.getComponent();a=new A_1g(a,d.lf,d.Fb,d.Ze,d.Mh,e.lf,e.Fb,e.Ze,e.Mh);b.length!=c.length&&(a.$p=A_b);return a};