function $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$$($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$, $target$$146$$) {
  if (!$JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_isAda$ && !$JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_attachmentMode$ && $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_currentRequest$ != AdfDhtmlPivotTablePeer.$PARTIAL$) {
    var $activeCellKey$$7_cell$$17$$ = $JSCompiler_StaticMethods__getActiveCellKey$$($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$);
    if (void 0 != $activeCellKey$$7_cell$$17$$ && null != $activeCellKey$$7_cell$$17$$ && "" != $activeCellKey$$7_cell$$17$$ && !$JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$alreadyRequestedDismissEdit$) {
      var $activeCellKey$$7_cell$$17$$ = $JSCompiler_StaticMethods__getDataCellKeyAndCell$$($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$, $target$$146$$)[1], $JSCompiler_temp$$89_target$$inline_3185$$;
      if (!($JSCompiler_temp$$89_target$$inline_3185$$ = null != $activeCellKey$$7_cell$$17$$ || null == $target$$146$$)) {
        a: {
          $JSCompiler_temp$$89_target$$inline_3185$$ = $target$$146$$;
          for (var $pivotTableFrame$$inline_3186$$ = $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.getDomElement();$JSCompiler_temp$$89_target$$inline_3185$$ && 1 == $JSCompiler_temp$$89_target$$inline_3185$$.nodeType;) {
            if ($JSCompiler_temp$$89_target$$inline_3185$$ == $pivotTableFrame$$inline_3186$$) {
              $JSCompiler_temp$$89_target$$inline_3185$$ = !0;
              break a;
            }
            $JSCompiler_temp$$89_target$$inline_3185$$ = $JSCompiler_temp$$89_target$$inline_3185$$.parentNode;
          }
          $JSCompiler_temp$$89_target$$inline_3185$$ = !1;
        }
      }
      $JSCompiler_temp$$89_target$$inline_3185$$ && $activeCellKey$$7_cell$$17$$ != $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_activeCell$ && ($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$alreadyRequestedDismissEdit$ = !0, $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_cancelDismiss$ = !1, $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_dismissClickToEditCB$ || ($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_dismissClickToEditCB$ = 
      $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.createCallback($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_dismissClickToEdit$)), AdfAgent.AGENT.getDomWindow().setTimeout($JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_dismissClickToEditCB$, 300), $JSCompiler_StaticMethods__dismissClickToEditIfNeeded$self$$.$_startDelayedDismissCTE$ = !0);
    }
  }
}
AdfDhtmlPivotTablePeer.prototype.$_dismissClickToEdit$ = function $AdfDhtmlPivotTablePeer$$$_dismissClickToEdit$$($skipQueueEvent$$) {
  this.$_currentRequest$ == AdfDhtmlPivotTablePeer.$PARTIAL$ ? this.$_startDelayedDismissCTE$ && (this.$_startDelayedDismissCTE$ = null) : (0 == this.$_cancelDismiss$ ? (void 0 == $skipQueueEvent$$ && ($skipQueueEvent$$ = $JSCompiler_StaticMethods__isClickToEditAll$$(this)), $skipQueueEvent$$ && (this.$_prevActiveCell$ = this.$_activeCell$, $JSCompiler_StaticMethods__dismissPreviousActiveCell$$(this, null, this.$_activeCell$, this.$_oldRowHeight$), this.$_activeCell$ = null), $JSCompiler_StaticMethods__setActiveCellKey$$(this, 
  null, $skipQueueEvent$$), this.$_cellRowHeight$ = this.$_lastUpdatedRow$ = null) : this.$_startDelayedDismissCTE$ = null, this.$_isEditingCellWithFocus$ = this.$alreadyRequestedDismissEdit$ = !1);
};
function $JSCompiler_StaticMethods__clickToEditResize$$($JSCompiler_StaticMethods__clickToEditResize$self$$, $dataCell$$3_rowIndexWithinBlock$$, $delta$$7$$) {
  var $blockIndex_databodyBlock$$ = $JSCompiler_StaticMethods_getParentBlock$$($JSCompiler_StaticMethods__clickToEditResize$self$$, $dataCell$$3_rowIndexWithinBlock$$), $rowPane$$4$$ = AdfAgent.AGENT.getIntAttribute($blockIndex_databodyBlock$$, "_startRow") < $JSCompiler_StaticMethods__clickToEditResize$self$$.$_ptUtils$.$_splitSlice$[1] ? 0 : 1, $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$ = AdfAgent.AGENT.getIntAttribute($blockIndex_databodyBlock$$, "_startCol") < $JSCompiler_StaticMethods__clickToEditResize$self$$.$_ptUtils$.$_splitSlice$[0] ? 
  0 : 1;
  $dataCell$$3_rowIndexWithinBlock$$ = $dataCell$$3_rowIndexWithinBlock$$.parentNode.rowIndex;
  a: {
    for (var $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$ = $JSCompiler_StaticMethods__clickToEditResize$self$$.$_ptUtils$.$_databodyBuffers$[$rowPane$$4$$][$colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$], $rows$$inline_3194$$ = $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$.length, $r$$inline_3195$$ = 0;$r$$inline_3195$$ < $rows$$inline_3194$$;$r$$inline_3195$$++) {
      for (var $row$$inline_3196$$ = $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$[$r$$inline_3195$$], $cols$$inline_3197$$ = $row$$inline_3196$$.length, $c$$inline_3198$$ = 0;$c$$inline_3198$$ < $cols$$inline_3197$$;$c$$inline_3198$$++) {
        if ($row$$inline_3196$$[$c$$inline_3198$$] == $blockIndex_databodyBlock$$) {
          $blockIndex_databodyBlock$$ = $r$$inline_3195$$;
          break a;
        }
      }
    }
    $blockIndex_databodyBlock$$ = -1;
  }
  $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$ = $JSCompiler_StaticMethods__clickToEditResize$self$$.$_ptUtils$.$_rowHeaderBuffers$[$rowPane$$4$$][$blockIndex_databodyBlock$$].childNodes[0].rows[$dataCell$$3_rowIndexWithinBlock$$].cells[0];
  $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$.parentNode.$_minRH$ = $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$.offsetHeight + $delta$$7$$;
  $JSCompiler_StaticMethods__resizeRow$$($JSCompiler_StaticMethods__clickToEditResize$self$$, !1, $rowPane$$4$$, $blockIndex_databodyBlock$$, $colPane$$2_databodyBuffer$$inline_3192_headerCell$$3$$, $dataCell$$3_rowIndexWithinBlock$$, $delta$$7$$, !0);
}
function $JSCompiler_StaticMethods__getActiveCellKey$$($JSCompiler_StaticMethods__getActiveCellKey$self$$) {
  return $JSCompiler_StaticMethods__getActiveCellKey$self$$.getComponent().getProperty(AdfRichPivotTable.$__ACTIVE_CELL_KEY$);
}
function $JSCompiler_StaticMethods__setActiveCellKey$$($JSCompiler_StaticMethods__setActiveCellKey$self$$, $cellKey$$7$$, $skipQueueEvent$$1$$) {
  var $component$$490$$ = $JSCompiler_StaticMethods__setActiveCellKey$self$$.getComponent(), $oldActiveCellKey$$ = $component$$490$$.getProperty(AdfRichPivotTable.$__ACTIVE_CELL_KEY$);
  $component$$490$$.setProperty(AdfRichPivotTable.$__ACTIVE_CELL_KEY$, $cellKey$$7$$, !1, AdfUIComponent.PROPAGATE_ALWAYS);
  $component$$490$$.setProperty("activeCellKey", $cellKey$$7$$, !1, AdfUIComponent.PROPAGATE_ALWAYS);
  void 0 != $skipQueueEvent$$1$$ && $skipQueueEvent$$1$$ ? $JSCompiler_StaticMethods__setActiveCellKey$self$$.$_processClickToEditRequest$() : $JSCompiler_StaticMethods__queueClickToEditEvent$$($JSCompiler_StaticMethods__setActiveCellKey$self$$, $cellKey$$7$$, $oldActiveCellKey$$, $JSCompiler_StaticMethods__setActiveCellKey$self$$.$_cellRowHeight$, $JSCompiler_StaticMethods__setActiveCellKey$self$$.$_oldCellRowHeight$) ? $JSCompiler_StaticMethods__setActiveCellKey$self$$.$_oldActiveCellKey$ = $oldActiveCellKey$$ : 
  ($component$$490$$.setProperty(AdfRichPivotTable.$__ACTIVE_CELL_KEY$, $oldActiveCellKey$$, !1, AdfUIComponent.PROPAGATE_ALWAYS), $component$$490$$.setProperty("activeCellKey", $oldActiveCellKey$$, !1, AdfUIComponent.PROPAGATE_ALWAYS), $JSCompiler_StaticMethods__recover$$($JSCompiler_StaticMethods__setActiveCellKey$self$$, $oldActiveCellKey$$), $JSCompiler_StaticMethods__syncAckWithAC$$($JSCompiler_StaticMethods__setActiveCellKey$self$$), $JSCompiler_StaticMethods__realignValidationErrorRowHeight$$($JSCompiler_StaticMethods__setActiveCellKey$self$$), 
  $JSCompiler_StaticMethods__setActiveCellKey$self$$.$_startDelayedDismissCTE$ = null);
}
function $JSCompiler_StaticMethods__getDirtyCells$$($JSCompiler_StaticMethods__getDirtyCells$self$$, $cellKey$$8$$) {
  if ($JSCompiler_StaticMethods__isClickToEditAll$$($JSCompiler_StaticMethods__getDirtyCells$self$$)) {
    null == $JSCompiler_StaticMethods__getDirtyCells$self$$.$_dirtyCells$ && ($JSCompiler_StaticMethods__getDirtyCells$self$$.$_dirtyCells$ = []);
    if (null != $JSCompiler_StaticMethods__getDirtyCells$self$$.$_prevActiveCell$ && null != $cellKey$$8$$ && -1 == $JSCompiler_StaticMethods__getDirtyCells$self$$.$_dirtyCells$.indexOf($cellKey$$8$$)) {
      var $inputElems$$2_newValue$$130$$ = $JSCompiler_StaticMethods__getInputElementsInNode$$($JSCompiler_StaticMethods__getDirtyCells$self$$, $JSCompiler_StaticMethods__getDirtyCells$self$$.$_prevActiveCell$);
      if (0 < $inputElems$$2_newValue$$130$$.length) {
        var $oldValue$$124$$ = $inputElems$$2_newValue$$130$$[0].$_afrOldValue$, $inputElems$$2_newValue$$130$$ = $inputElems$$2_newValue$$130$$[0].value;
        null != $oldValue$$124$$ && $oldValue$$124$$ != $inputElems$$2_newValue$$130$$ && $JSCompiler_StaticMethods__getDirtyCells$self$$.$_dirtyCells$.push($cellKey$$8$$);
      }
    }
    return $JSCompiler_StaticMethods__getDirtyCells$self$$.$_dirtyCells$;
  }
  return [];
}
function $JSCompiler_StaticMethods__queueClickToEditEvent$$($JSCompiler_StaticMethods__queueClickToEditEvent$self$$, $cellKey$$9$$, $oldCellKey_pendingEdits$$inline_3201$$, $cellRowHeight_event$$172$$, $oldCellRowHeight$$) {
  var $canceled$$2_component$$491$$ = $JSCompiler_StaticMethods__queueClickToEditEvent$self$$.getComponent();
  $cellRowHeight_event$$172$$ = new $AdfPivotTableClickToEditEvent$$($canceled$$2_component$$491$$, $cellKey$$9$$, $oldCellKey_pendingEdits$$inline_3201$$, $cellRowHeight_event$$172$$, $oldCellRowHeight$$);
  $oldCellKey_pendingEdits$$inline_3201$$ = $JSCompiler_StaticMethods__getDirtyCells$$($JSCompiler_StaticMethods__queueClickToEditEvent$self$$, $oldCellKey_pendingEdits$$inline_3201$$);
  $cellRowHeight_event$$172$$.$_pendingEdits$ = $oldCellKey_pendingEdits$$inline_3201$$;
  $cellRowHeight_event$$172$$.setPartial(!0);
  $canceled$$2_component$$491$$.queueEvent($cellRowHeight_event$$172$$);
  $canceled$$2_component$$491$$ = $cellRowHeight_event$$172$$.isCanceled();
  $canceled$$2_component$$491$$ || ($JSCompiler_StaticMethods_setCurrentRequest$$($JSCompiler_StaticMethods__queueClickToEditEvent$self$$, AdfDhtmlPivotTablePeer.$PARTIAL$), $JSCompiler_StaticMethods__queueClickToEditEvent$self$$.$_serverRequest$ = null, null != $cellKey$$9$$ ? ($JSCompiler_StaticMethods__queueClickToEditEvent$self$$.$_isNavigationMode$ = !1, $JSCompiler_StaticMethods__queueClickToEditEvent$self$$.$_submittedCellKey$ = $cellKey$$9$$) : $JSCompiler_StaticMethods__queueClickToEditEvent$self$$.$_submittedCellKey$ = 
  null);
  return $canceled$$2_component$$491$$ ? null : $cellRowHeight_event$$172$$;
}
AdfDhtmlPivotTablePeer.prototype.$_processClickToEditRequest$ = function $AdfDhtmlPivotTablePeer$$$_processClickToEditRequest$$($restoreFromBusy$$) {
  var $activeCell_isIE$$2$$ = this.$_activeCell$;
  if ($activeCell_isIE$$2$$) {
    $JSCompiler_StaticMethods__isCellHeightFixed$$(this) || $JSCompiler_StaticMethods__realignValidationErrorRowHeight$$(this);
    var $elems$$4$$ = $JSCompiler_StaticMethods__getInputElementsInNode$$(this, $activeCell_isIE$$2$$);
    if ("TD" == $activeCell_isIE$$2$$.tagName) {
      var $cellIndex$$5$$ = $JSCompiler_StaticMethods_newDataCellIndexFromCell$$(this, $activeCell_isIE$$2$$);
      $JSCompiler_StaticMethods__setLabelledBy$$(this, $cellIndex$$5$$, $activeCell_isIE$$2$$, $elems$$4$$);
    }
    if (0 < $elems$$4$$.length) {
      var $elem$$71$$;
      this.$_setFocusOnLastElement$ ? ($elem$$71$$ = $elems$$4$$[$elems$$4$$.length - 1], this.$_setFocusOnLastElement$ = !1) : $elem$$71$$ = $elems$$4$$[0];
      $JSCompiler_StaticMethods__focusElement$$($elem$$71$$);
      $activeCell_isIE$$2$$ = AdfAgent.AGENT.getPlatform() == AdfAgent.IE_PLATFORM;
      if ("INPUT" == $elem$$71$$.tagName && "text" == $elem$$71$$.type || "TEXTAREA" == $elem$$71$$.tagName) {
        $activeCell_isIE$$2$$ && $elem$$71$$.focus(), this.enableUserSelect(), $activeCell_isIE$$2$$ && $restoreFromBusy$$ ? setTimeout(function() {
          $elem$$71$$.select();
        }, 0) : $elem$$71$$.select();
      }
    } else {
      $JSCompiler_StaticMethods__focusElement$$(this.getDomElement());
    }
  } else {
    $JSCompiler_StaticMethods__focusElement$$(this.getDomElement());
  }
};
function $JSCompiler_StaticMethods__processDismissCTE$$($JSCompiler_StaticMethods__processDismissCTE$self$$, $componentEvent$$105$$) {
  null != $componentEvent$$105$$ && $componentEvent$$105$$.cancel();
  $JSCompiler_StaticMethods__processDismissCTE$self$$.$_cancelDismiss$ = !1;
  $JSCompiler_StaticMethods__processDismissCTE$self$$.$_dismissClickToEdit$();
}
function $JSCompiler_StaticMethods_editCellWithFocus$$($JSCompiler_StaticMethods_editCellWithFocus$self$$) {
  if ($JSCompiler_StaticMethods_editCellWithFocus$self$$.$_currentRequest$ != AdfDhtmlPivotTablePeer.$PARTIAL$ && !$JSCompiler_StaticMethods_editCellWithFocus$self$$.$_isAda$ && !$JSCompiler_StaticMethods_editCellWithFocus$self$$.$_attachmentMode$) {
    var $focusCellIndex$$3$$ = $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_focusCellIndex$;
    if (null != $focusCellIndex$$3$$ && $JSCompiler_StaticMethods_getEdge$$($focusCellIndex$$3$$) == AdfPivotTableUtils.$DATABODY$) {
      var $cell$$18_nodes$$14_range$$12$$ = $JSCompiler_StaticMethods_newDataCellRange$$($focusCellIndex$$3$$), $cell$$18_nodes$$14_range$$12$$ = $JSCompiler_StaticMethods_getNodesInDataCellRange$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $cell$$18_nodes$$14_range$$12$$);
      if (0 < $cell$$18_nodes$$14_range$$12$$.length && ($cell$$18_nodes$$14_range$$12$$ = $cell$$18_nodes$$14_range$$12$$[0], null != $cell$$18_nodes$$14_range$$12$$ && ($cell$$18_nodes$$14_range$$12$$.id || $JSCompiler_StaticMethods__isClickToEditAll$$($JSCompiler_StaticMethods_editCellWithFocus$self$$)) && $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_activeCell$ != $cell$$18_nodes$$14_range$$12$$)) {
        $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_activeCell$ = $cell$$18_nodes$$14_range$$12$$;
        $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_cellRowHeight$ = $cell$$18_nodes$$14_range$$12$$.parentNode.offsetHeight;
        var $skipQueueEvent$$2$$ = void 0;
        if ($JSCompiler_StaticMethods__isClickToEditAll$$($JSCompiler_StaticMethods_editCellWithFocus$self$$) && ($skipQueueEvent$$2$$ = $JSCompiler_StaticMethods__updateInputReadOnlyState$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $cell$$18_nodes$$14_range$$12$$, $cell$$18_nodes$$14_range$$12$$))) {
          if (!$JSCompiler_StaticMethods__isCellHeightFixed$$($JSCompiler_StaticMethods_editCellWithFocus$self$$)) {
            var $block$$20_oldRowHeight$$2$$ = $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_cellRowHeight$;
            $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_cellRowHeight$ = $cell$$18_nodes$$14_range$$12$$.parentNode.offsetHeight;
            var $dataCellKey$$1_delta$$8$$ = $JSCompiler_StaticMethods_editCellWithFocus$self$$.$_cellRowHeight$ - $block$$20_oldRowHeight$$2$$;
            0 != $dataCellKey$$1_delta$$8$$ && $JSCompiler_StaticMethods__clickToEditResize$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $cell$$18_nodes$$14_range$$12$$, $dataCellKey$$1_delta$$8$$);
          }
          $JSCompiler_StaticMethods__dismissPreviousActiveCell$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $cell$$18_nodes$$14_range$$12$$, $cell$$18_nodes$$14_range$$12$$, $block$$20_oldRowHeight$$2$$);
        }
        $block$$20_oldRowHeight$$2$$ = $JSCompiler_StaticMethods_getParentBlock$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $cell$$18_nodes$$14_range$$12$$);
        $dataCellKey$$1_delta$$8$$ = null;
        $block$$20_oldRowHeight$$2$$ && ($dataCellKey$$1_delta$$8$$ = $JSCompiler_StaticMethods__getDataCellKey$$($cell$$18_nodes$$14_range$$12$$, $block$$20_oldRowHeight$$2$$), $JSCompiler_StaticMethods_scrollToDataCell$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $focusCellIndex$$3$$), $JSCompiler_StaticMethods__setActiveCellKey$$($JSCompiler_StaticMethods_editCellWithFocus$self$$, $dataCellKey$$1_delta$$8$$, $skipQueueEvent$$2$$));
      }
    }
  }
}
function $JSCompiler_StaticMethods__dismissPreviousActiveCell$$($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$, $cell$$19_delta$$9$$, $newPrevActiveCell$$, $oldRowHeight$$3$$) {
  if (null != $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$ && null != $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$.parentNode) {
    var $result$$16_updatedRow$$ = $JSCompiler_StaticMethods__findInputComponentInCell$$($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$, $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$), $comp$$7$$ = $result$$16_updatedRow$$.$component$;
    null != $comp$$7$$ && $comp$$7$$ instanceof AdfRichInputText && (null != $result$$16_updatedRow$$.element.getAttribute("_afrCellDirty") ? $JSCompiler_StaticMethods__setReadOnly$$($comp$$7$$, !0) : $comp$$7$$.setProperty("readOnly", !0, !1, AdfUIComponent.$PROPAGATE_LOCALLY$), $result$$16_updatedRow$$ = -1, null != $cell$$19_delta$$9$$ && ($result$$16_updatedRow$$ = $JSCompiler_StaticMethods_getCoordinates$$($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$, $cell$$19_delta$$9$$).row), 
    $result$$16_updatedRow$$ != $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_lastUpdatedRow$ && ($JSCompiler_StaticMethods__isCellHeightFixed$$($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$) || ($cell$$19_delta$$9$$ = $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_oldRowHeight$ - $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$.parentNode.offsetHeight, 0 != $cell$$19_delta$$9$$ && $JSCompiler_StaticMethods__clickToEditResize$$($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$, 
    $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$, $cell$$19_delta$$9$$)), $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_oldRowHeight$ = $oldRowHeight$$3$$, -1 != $result$$16_updatedRow$$ && ($JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_lastUpdatedRow$ = $result$$16_updatedRow$$)), $JSCompiler_StaticMethods__dismissPreviousActiveCell$self$$.$_prevActiveCell$ = $newPrevActiveCell$$);
  }
}
function $JSCompiler_StaticMethods__realignValidationErrorRowHeight$$($JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$) {
  if ($JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$.$_lastEditCellRowHeight$) {
    var $delta$$10$$ = $JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$.$_activeCell$.parentNode.offsetHeight - $JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$.$_lastEditCellRowHeight$;
    $delta$$10$$ && ($JSCompiler_StaticMethods__clickToEditResize$$($JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$, $JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$.$_activeCell$, $delta$$10$$), $JSCompiler_StaticMethods__realignValidationErrorRowHeight$self$$.$_lastEditCellRowHeight$ = null);
  }
}
function $JSCompiler_StaticMethods__findInputComponent$$($JSCompiler_StaticMethods__findInputComponent$self$$, $target$$147$$, $cell$$20$$) {
  if ($cell$$20$$ == $target$$147$$) {
    return null;
  }
  var $comp$$8_id$$198$$ = $target$$147$$.getAttribute("id");
  return null != $comp$$8_id$$198$$ && ($comp$$8_id$$198$$ = AdfPage.PAGE.findComponent($comp$$8_id$$198$$), null != $comp$$8_id$$198$$ && $comp$$8_id$$198$$ instanceof AdfRichInputText) ? $comp$$8_id$$198$$ : $JSCompiler_StaticMethods__findInputComponent$$($JSCompiler_StaticMethods__findInputComponent$self$$, $target$$147$$.parentNode, $cell$$20$$);
}
function $JSCompiler_StaticMethods__findInputComponentInCell$$($JSCompiler_StaticMethods__findInputComponentInCell$self$$, $cell$$21$$) {
  var $domDoc$$1_nodes$$15$$ = AdfAgent.AGENT.getDomDocument();
  if ($domDoc$$1_nodes$$15$$.evaluate) {
    for (var $domDoc$$1_nodes$$15$$ = $domDoc$$1_nodes$$15$$.evaluate(".//span[@id]", $cell$$21$$, null, XPathResult.ANY_TYPE, null), $elem$$73$$ = $domDoc$$1_nodes$$15$$.iterateNext();$elem$$73$$;) {
      if (!$elem$$73$$.disabled && $JSCompiler_StaticMethods_isElementVisible$$($JSCompiler_StaticMethods__findInputComponentInCell$self$$, $elem$$73$$, $cell$$21$$)) {
        var $comp$$9$$ = AdfPage.PAGE.findComponent($elem$$73$$.id);
        if (null != $comp$$9$$ && $comp$$9$$ instanceof AdfRichInputText) {
          return {$component$:$comp$$9$$, element:$elem$$73$$};
        }
      }
      $elem$$73$$ = $domDoc$$1_nodes$$15$$.iterateNext();
    }
  } else {
    for (var $domDoc$$1_nodes$$15$$ = $cell$$21$$.getElementsByTagName("*"), $nodeCount$$1$$ = $domDoc$$1_nodes$$15$$.length, $i$$168$$ = 0;$i$$168$$ < $nodeCount$$1$$;$i$$168$$++) {
      if ($elem$$73$$ = $domDoc$$1_nodes$$15$$[$i$$168$$], "SPAN" == $elem$$73$$.tagName && $elem$$73$$.id && !$elem$$73$$.disabled && $JSCompiler_StaticMethods_isElementVisible$$($JSCompiler_StaticMethods__findInputComponentInCell$self$$, $elem$$73$$, $cell$$21$$) && ($comp$$9$$ = AdfPage.PAGE.findComponent($elem$$73$$.id), null != $comp$$9$$ && $comp$$9$$ instanceof AdfRichInputText)) {
        return {$component$:$comp$$9$$, element:$elem$$73$$};
      }
    }
  }
  return {$component$:null, element:null};
}
function $JSCompiler_StaticMethods__updateInputReadOnlyState$$($JSCompiler_StaticMethods__updateInputReadOnlyState$self$$, $comp$$10_target$$148$$, $cell$$22_ids$$2$$) {
  $comp$$10_target$$148$$ = $JSCompiler_StaticMethods__findInputComponent$$($JSCompiler_StaticMethods__updateInputReadOnlyState$self$$, $comp$$10_target$$148$$, $cell$$22_ids$$2$$);
  null == $comp$$10_target$$148$$ && ($comp$$10_target$$148$$ = $JSCompiler_StaticMethods__findInputComponentInCell$$($JSCompiler_StaticMethods__updateInputReadOnlyState$self$$, $cell$$22_ids$$2$$).$component$);
  if (null != $comp$$10_target$$148$$) {
    $cell$$22_ids$$2$$ = $cell$$22_ids$$2$$.getAttribute("_ros");
    if (null == $cell$$22_ids$$2$$ || -1 == $cell$$22_ids$$2$$.indexOf($comp$$10_target$$148$$.getClientId())) {
      $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_updateReadOnly$ = !0;
      try {
        $JSCompiler_StaticMethods__setReadOnly$$($comp$$10_target$$148$$, !1), $comp$$10_target$$148$$.setProperty("readOnly", !1, !1, AdfUIComponent.$PROPAGATE_LOCALLY$);
      } finally {
        $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_updateReadOnly$ = !1;
      }
      void 0 == $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_valueChangeHandler$ && ($JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_valueChangeHandler$ = $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_handleValueChanged$.bind($JSCompiler_StaticMethods__updateInputReadOnlyState$self$$));
      $comp$$10_target$$148$$.removeEventListener(AdfValueChangeEvent.VALUE_CHANGE_TYPE, $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_valueChangeHandler$);
      $comp$$10_target$$148$$.addEventListener(AdfValueChangeEvent.VALUE_CHANGE_TYPE, $JSCompiler_StaticMethods__updateInputReadOnlyState$self$$.$_valueChangeHandler$);
    }
    return !0;
  }
  return !1;
}
AdfDhtmlPivotTablePeer.prototype.$_handleValueChanged$ = function $AdfDhtmlPivotTablePeer$$$_handleValueChanged$$($attrs$$21_event$$173$$) {
  var $source$$180$$ = $attrs$$21_event$$173$$.getSource(), $domElement$$177$$ = AdfRichUIPeer.getDomElementForComponent($source$$180$$);
  if (null != $attrs$$21_event$$173$$.getOldValue() || $domElement$$177$$.getAttribute("_afrOldValue") != $attrs$$21_event$$173$$.getNewValue()) {
    void 0 === this.$_dirtyCells$ && (this.$_dirtyCells$ = []), $attrs$$21_event$$173$$ = $JSCompiler_StaticMethods__getDataCellKeyAndCell$$(this, $domElement$$177$$), null != $attrs$$21_event$$173$$ && -1 == this.$_dirtyCells$.indexOf($attrs$$21_event$$173$$[0]) && this.$_dirtyCells$.push($attrs$$21_event$$173$$[0]), $source$$180$$.setProperty("readOnly", !1, !1, AdfUIComponent.$PROPAGATE_LOCALLY$), $domElement$$177$$.setAttribute("_afrCellDirty", !0), $JSCompiler_StaticMethods__setReadOnly$$($source$$180$$, 
    !0);
  }
};
AdfDhtmlPivotTablePeer.$handlePropertyChange$ = function $AdfDhtmlPivotTablePeer$$handlePropertyChange$$($event$$174$$, $clientId$$104$$) {
  if ("readOnly" == $event$$174$$.getPropertyName()) {
    var $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$ = AdfPage.PAGE.findComponent($clientId$$104$$).getPeer();
    if (!$JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.$_updateReadOnly$) {
      var $id$$inline_3213_source$$inline_3208$$ = $event$$174$$.getSource(), $domElement$$inline_3209_ids$$inline_3212$$ = AdfRichUIPeer.getDomElementForComponent($id$$inline_3213_source$$inline_3208$$), $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$ = $JSCompiler_StaticMethods__getDataCellKeyAndCell$$($JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$, $domElement$$inline_3209_ids$$inline_3212$$);
      if (null != $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$) {
        if ($JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$ = $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$[1], $domElement$$inline_3209_ids$$inline_3212$$ = $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.getAttribute("_ros"), $id$$inline_3213_source$$inline_3208$$ = $id$$inline_3213_source$$inline_3208$$.getClientId(), "true" == 
        $event$$174$$.getNewValue()) {
          null == $domElement$$inline_3209_ids$$inline_3212$$ ? $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.setAttribute("_ros", $id$$inline_3213_source$$inline_3208$$) : $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.setAttribute("_ros", $domElement$$inline_3209_ids$$inline_3212$$ + " " + $id$$inline_3213_source$$inline_3208$$);
        } else {
          if ("false" == $event$$174$$.getNewValue() && null != $domElement$$inline_3209_ids$$inline_3212$$) {
            var $index$$inline_3214$$ = $domElement$$inline_3209_ids$$inline_3212$$.indexOf($id$$inline_3213_source$$inline_3208$$);
            if (0 == $index$$inline_3214$$ && -1 == $domElement$$inline_3209_ids$$inline_3212$$.trim().indexOf(" ")) {
              $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.removeAttribute("_ros");
            } else {
              var $ros$$inline_3215$$ = "";
              0 < $index$$inline_3214$$ && ($ros$$inline_3215$$ += $domElement$$inline_3209_ids$$inline_3212$$.substring(0, $index$$inline_3214$$));
              $index$$inline_3214$$ + $id$$inline_3213_source$$inline_3208$$.length + 1 < $ros$$inline_3215$$.length && ($ros$$inline_3215$$ += substring($index$$inline_3214$$ + $id$$inline_3213_source$$inline_3208$$.length + 1));
              $JSCompiler_StaticMethods__handlePropertyChanged$self$$inline_3206_attrs$$inline_3210_cell$$inline_3211$$.setAttribute("_ros", $ros$$inline_3215$$);
            }
          }
        }
      }
    }
  }
};
$goog$exportSymbol$$("AdfDhtmlPivotTablePeer.handlePropertyChange", AdfDhtmlPivotTablePeer.$handlePropertyChange$);
function $JSCompiler_StaticMethods__setReadOnly$$($comp$$11$$, $readOnly$$1$$) {
  var $domElement$$179$$ = AdfRichUIPeer.getDomElementForComponent($comp$$11$$);
  if ($readOnly$$1$$) {
    AdfDomUtils.$containsCSSClassName$($domElement$$179$$, "p_AFClickToEdit") && AdfDomUtils.$removeCSSClassName$($domElement$$179$$, "p_AFClickToEdit"), AdfDomUtils.$addCSSClassName$($domElement$$179$$, "p_AFReadOnly"), $domElement$$179$$.firstChild && "INPUT" == $domElement$$179$$.firstChild.tagName && ($domElement$$179$$.firstChild.setAttribute("readOnly", "true"), $domElement$$179$$.firstChild.style.minHeight = "inherit");
  } else {
    AdfDomUtils.$containsCSSClassName$($domElement$$179$$, "p_AFReadOnly") && AdfDomUtils.$removeCSSClassName$($domElement$$179$$, "p_AFReadOnly");
    AdfDomUtils.$addCSSClassName$($domElement$$179$$, "p_AFClickToEdit");
    $domElement$$179$$.firstChild && "INPUT" == $domElement$$179$$.firstChild.tagName && $domElement$$179$$.firstChild.removeAttribute("readOnly");
    var $oldValue$$126$$ = $domElement$$179$$.textContent;
    $domElement$$179$$.getAttribute("_afrOldValue") != $oldValue$$126$$ && $domElement$$179$$.setAttribute("_afrOldValue", $oldValue$$126$$);
  }
}
AdfDhtmlPivotTablePeer.$HandleInvalidCells$ = function $AdfDhtmlPivotTablePeer$$HandleInvalidCells$$($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$, $cellIndex$$inline_3218_rowIndex$$12$$, $columnIndex$$) {
  $JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$ = AdfPage.PAGE.findComponent($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$).getPeer();
  $cellIndex$$inline_3218_rowIndex$$12$$ = $JSCompiler_StaticMethods_newDataCellIndex$$($cellIndex$$inline_3218_rowIndex$$12$$, $columnIndex$$);
  $JSCompiler_StaticMethods_coordinateRowBlockSizes$$($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$.$_ptUtils$);
  $JSCompiler_StaticMethods_selectAndFocusDataCell$$($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$, $cellIndex$$inline_3218_rowIndex$$12$$);
  $JSCompiler_StaticMethods_scrollToDataCell$$($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$, $cellIndex$$inline_3218_rowIndex$$12$$);
  $JSCompiler_StaticMethods_editCellWithFocus$$($JSCompiler_StaticMethods__handleInvalidCells$self$$inline_3217_clientId$$105$$);
};
$goog$exportSymbol$$("AdfDhtmlPivotTablePeer.HandleInvalidCells", AdfDhtmlPivotTablePeer.$HandleInvalidCells$);
AdfDhtmlPivotTablePeer.prototype.$_handleBusyState$ = function $AdfDhtmlPivotTablePeer$$$_handleBusyState$$($comp$$12_event$$176$$) {
  null == this.$_serverRequest$ && null != this.$_activeCell$ && ($comp$$12_event$$176$$.isBusy() ? (this.$_serverBusy$ = !0, $comp$$12_event$$176$$ = $JSCompiler_StaticMethods__findInputComponentInCell$$(this, this.$_activeCell$).$component$, $JSCompiler_StaticMethods__setReadOnly$$($comp$$12_event$$176$$, !0), $JSCompiler_StaticMethods_highlightFocusCell$$(this, !0, {dataCells:[]})) : (this.$_serverBusy$ = !1, $JSCompiler_StaticMethods__getDataCellFromCellIndex$$(this, this.$_focusCellIndex$) != 
  this.$_activeCell$ ? $JSCompiler_StaticMethods_editCellWithFocus$$(this) : ($JSCompiler_StaticMethods__updateInputReadOnlyState$$(this, this.$_activeCell$, this.$_activeCell$), this.$_processClickToEditRequest$(!0))));
};
