var $AdfDhtmlDeckPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlDeckPeer", !1);
$goog$exportSymbol$$("AdfDhtmlDeckPeer", $AdfDhtmlDeckPeer$$);
$AdfDhtmlDeckPeer$$.$InitSubclass$ = function $$AdfDhtmlDeckPeer$$$$InitSubclass$$() {
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichDeck.DISPLAYED_CHILD);
  $AdfObject$$.$ensureClassInitialization$($AdfDeckSwipeManager$$);
};
$goog$exportSymbol$$("AdfDhtmlDeckPeer.InitSubclass", $AdfDhtmlDeckPeer$$.$InitSubclass$);
$AdfDhtmlDeckPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlDeckPeer$$$$$InitDomElement$$($component$$1040$$, $domElement$$174$$) {
  $AdfDhtmlDeckPeer$$.$superclass$.$InitDomElement$.call(this, $component$$1040$$, $domElement$$174$$);
  this.$_swipeMgr$ = new $AdfDeckSwipeManager$$($component$$1040$$, $domElement$$174$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlDeckPeer$$.prototype.$InitDomElement$});
$AdfDhtmlDeckPeer$$.$__getBackNavigate$ = function $$AdfDhtmlDeckPeer$$$$__getBackNavigate$$($component$$1041$$, $domElement$$175$$) {
  return $AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$("data-afr-bck-navigate", $component$$1041$$, $domElement$$175$$);
};
$AdfDhtmlDeckPeer$$.$__getForwardNavigate$ = function $$AdfDhtmlDeckPeer$$$$__getForwardNavigate$$($component$$1042$$, $domElement$$176$$) {
  return $AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$("data-afr-fwd-navigate", $component$$1042$$, $domElement$$176$$);
};
$AdfDhtmlDeckPeer$$.$_getReplaceNavigate$ = function $$AdfDhtmlDeckPeer$$$$_getReplaceNavigate$$($component$$1043$$, $domElement$$177$$) {
  return $AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$("data-afr-replace-navigate", $component$$1043$$, $domElement$$177$$);
};
$AdfDhtmlDeckPeer$$.$__getChildCount$ = function $$AdfDhtmlDeckPeer$$$$__getChildCount$$($component$$1044$$, $domElement$$178$$) {
  return parseInt($AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$("data-afr-child-cnt", $component$$1044$$, $domElement$$178$$));
};
$AdfDhtmlDeckPeer$$.$__getChildIndex$ = function $$AdfDhtmlDeckPeer$$$$__getChildIndex$$($domElement$$179_index$$136$$) {
  $domElement$$179_index$$136$$ = parseInt($domElement$$179_index$$136$$.firstElementChild.firstElementChild.getAttribute("data-afr-index"));
  return isNaN($domElement$$179_index$$136$$) ? -1 : $domElement$$179_index$$136$$;
};
$AdfDhtmlDeckPeer$$.prototype.$GetComponentDisplayedChild$ = function $$AdfDhtmlDeckPeer$$$$$GetComponentDisplayedChild$$($component$$1045$$, $domElement$$180$$) {
  return $AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$("data-afr-dsp-child", $component$$1045$$, $domElement$$180$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.GetComponentDisplayedChild", {$GetComponentDisplayedChild$:$AdfDhtmlDeckPeer$$.prototype.$GetComponentDisplayedChild$});
$AdfDhtmlDeckPeer$$.$_getOptimizedDomAttribute$ = function $$AdfDhtmlDeckPeer$$$$_getOptimizedDomAttribute$$($attributeName$$1$$, $agent$$275_clientId$$196_component$$1046_optRndSubId$$, $domElement$$181$$) {
  $agent$$275_clientId$$196_component$$1046_optRndSubId$$ = $agent$$275_clientId$$196_component$$1046_optRndSubId$$.$getClientId$();
  $agent$$275_clientId$$196_component$$1046_optRndSubId$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$275_clientId$$196_component$$1046_optRndSubId$$, "optRnd");
  var $attributeValue$$2_optRndElement$$ = document.getElementById($agent$$275_clientId$$196_component$$1046_optRndSubId$$);
  $agent$$275_clientId$$196_component$$1046_optRndSubId$$ = $AdfAgent$$.$AGENT$;
  $attributeValue$$2_optRndElement$$ = $agent$$275_clientId$$196_component$$1046_optRndSubId$$.getAttribute($attributeValue$$2_optRndElement$$, $attributeName$$1$$);
  null == $attributeValue$$2_optRndElement$$ && ($attributeValue$$2_optRndElement$$ = $agent$$275_clientId$$196_component$$1046_optRndSubId$$.getAttribute($domElement$$181$$, $attributeName$$1$$));
  return $attributeValue$$2_optRndElement$$;
};
$AdfDhtmlDeckPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlDeckPeer$$$$$ComponentRemoved$$() {
  try {
    null != this.$_transitionCancelFunction$ && ($AdfPage$$.$PAGE$.$decrementPendingAnimation$(), this.$_transitionCancelFunction$());
  } finally {
    this.$_swipeMgr$.release();
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlDeckPeer$$.prototype.$ComponentRemoved$});
$AdfDhtmlDeckPeer$$.prototype.$DescendantMessageChanged$ = function $$AdfDhtmlDeckPeer$$$$$DescendantMessageChanged$$() {
  this.$_swipeMgr$.$isClearingMessages$() || this.$restoreSwipePanel$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.DescendantMessageChanged", {$DescendantMessageChanged$:$AdfDhtmlDeckPeer$$.prototype.$DescendantMessageChanged$});
$AdfDhtmlDeckPeer$$.prototype.$needsResizeNotify$ = function $$AdfDhtmlDeckPeer$$$$$needsResizeNotify$$() {
  return !0;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.needsResizeNotify", {$needsResizeNotify$:$AdfDhtmlDeckPeer$$.prototype.$needsResizeNotify$});
$AdfDhtmlDeckPeer$$.prototype.$restoreSwipePanel$ = function $$AdfDhtmlDeckPeer$$$$$restoreSwipePanel$$() {
  this.$_swipeMgr$.$isWaitingForContent$() && this.$_swipeMgr$.$restoreSwipePanel$();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.restoreSwipePanel", {$restoreSwipePanel$:$AdfDhtmlDeckPeer$$.prototype.$restoreSwipePanel$});
$AdfDhtmlDeckPeer$$.$_deleteElement$ = function $$AdfDhtmlDeckPeer$$$$_deleteElement$$($logger$$13_root$$4$$, $elementToDelete$$, $deleteDom$$, $deleteObjects$$) {
  if (null != $elementToDelete$$) {
    try {
      $deleteObjects$$ && ($AdfPage$$.$PAGE$.$removeComponentsInSubtree$($elementToDelete$$), $AdfAgent$$.$AGENT$.$elementsRemoved$($elementToDelete$$), $deleteDom$$ || $AdfDhtmlDeckPeer$$.$_removeIds$($elementToDelete$$)), $deleteDom$$ && $logger$$13_root$$4$$.firstChild.removeChild($elementToDelete$$);
    } catch ($problem$$4$$) {
      $logger$$13_root$$4$$ = $AdfLogger$$.$LOGGER$, $logger$$13_root$$4$$.finest("Unable to delete the old deck element (" + $deleteDom$$ + ", " + $deleteObjects$$ + ", " + $elementToDelete$$ + "):"), $logger$$13_root$$4$$.finest($problem$$4$$);
    }
  }
};
$AdfDhtmlDeckPeer$$.$_getTransitionType$ = function $$AdfDhtmlDeckPeer$$$$_getTransitionType$$($component$$1050$$, $domElement$$182$$, $oldIndex$$1$$, $newIndex$$2$$) {
  return $newIndex$$2$$ == $oldIndex$$1$$ ? $AdfDhtmlDeckPeer$$.$_getReplaceNavigate$($component$$1050$$, $domElement$$182$$) : $newIndex$$2$$ < $oldIndex$$1$$ ? $AdfDhtmlDeckPeer$$.$__getBackNavigate$($component$$1050$$, $domElement$$182$$) : $AdfDhtmlDeckPeer$$.$__getForwardNavigate$($component$$1050$$, $domElement$$182$$);
};
$AdfDhtmlDeckPeer$$.$_removeIds$ = function $$AdfDhtmlDeckPeer$$$$_removeIds$$($allNodes$$1_element$$225$$) {
  $allNodes$$1_element$$225$$.id = null;
  $allNodes$$1_element$$225$$ = $allNodes$$1_element$$225$$.getElementsByTagName("*");
  for (var $nodeCount$$4$$ = $allNodes$$1_element$$225$$.length, $i$$308$$ = 0;$i$$308$$ < $nodeCount$$4$$;$i$$308$$++) {
    $allNodes$$1_element$$225$$[$i$$308$$].id = null;
  }
};
$AdfDhtmlDeckPeer$$.$_replaceChild$ = function $$AdfDhtmlDeckPeer$$$$_replaceChild$$($oldChild$$3$$, $newChild$$3$$) {
  $AdfPage$$.$PAGE$.$removeComponentsInSubtree$($oldChild$$3$$);
  var $agent$$276$$ = $AdfAgent$$.$AGENT$;
  $agent$$276$$.$elementsRemoved$($oldChild$$3$$);
  $agent$$276$$.$replaceNode$($newChild$$3$$, $oldChild$$3$$);
  $agent$$276$$.$elementsAdded$($newChild$$3$$);
};
$AdfDhtmlDeckPeer$$.$_statelessOptimizeReplaceFinished$ = function $$AdfDhtmlDeckPeer$$$$_statelessOptimizeReplaceFinished$$($callbackParams$$5_oldChild$$inline_1852$$) {
  var $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1851$$ = $callbackParams$$5_oldChild$$inline_1852$$[0];
  $callbackParams$$5_oldChild$$inline_1852$$ = $callbackParams$$5_oldChild$$inline_1852$$[1];
  if (null != $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1851$$.$_transitionCancelFunction$) {
    $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1851$$.$_transitionCancelFunction$ = null;
    var $root$$inline_1853$$ = $JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1851$$.$getDomElement$();
    $root$$inline_1853$$ && ($AdfDhtmlDeckPeer$$.$_deleteElement$($root$$inline_1853$$, $callbackParams$$5_oldChild$$inline_1852$$, !0, !1), $AdfPage$$.$PAGE$.$doResizeNotify$($JSCompiler_StaticMethods__statefulOptimizeReplaceFinished$self$$inline_1851$$.$getComponent$()));
  }
  $AdfPage$$.$PAGE$.$decrementPendingAnimation$();
};
$AdfDhtmlDeckPeer$$.prototype.$ReplaceDomElement$ = function $$AdfDhtmlDeckPeer$$$$$ReplaceDomElement$$($newElement$$13$$, $oldElement$$4$$) {
  if (0 < $newElement$$13$$.id.indexOf("optRnd")) {
    var $agent$$277$$ = $AdfAgent$$.$AGENT$, $root$$6$$ = this.$getDomElement$(), $oldChild$$5$$ = $root$$6$$.firstChild, $oldIndex$$2$$ = -1;
    null != $oldChild$$5$$.id && -1 == $oldChild$$5$$.id.indexOf("optRnd") ? ($oldChild$$5$$ = $oldChild$$5$$.firstChild, $oldIndex$$2$$ = $agent$$277$$.getAttribute($oldChild$$5$$, "data-afr-index")) : $oldChild$$5$$ = null;
    var $newChild$$4$$ = $newElement$$13$$.firstChild, $newIndex$$3$$ = -1;
    null != $newChild$$4$$ && ($newIndex$$3$$ = $agent$$277$$.getAttribute($newChild$$4$$, "data-afr-index"));
    $agent$$277$$.setAttribute($newElement$$13$$, "data-afr-index", $newIndex$$3$$);
    if ($newIndex$$3$$ == $oldIndex$$2$$ && -1 != $newIndex$$3$$) {
      if (null != $AdfDhtmlDeckPeer$$.$_getReplaceNavigate$(this.$getComponent$(), $root$$6$$)) {
        $AdfDhtmlDeckPeer$$.$_deleteElement$($root$$6$$, $oldChild$$5$$, !1, !0);
      } else {
        $AdfDhtmlDeckPeer$$.$_replaceChild$($oldChild$$5$$, $newChild$$4$$);
        this.$_swipeMgr$.$isWaitingForContent$() && this.$_swipeMgr$.$discloseContentPanel$($root$$6$$.firstChild);
        return;
      }
    }
  }
  $AdfDhtmlDeckPeer$$.$superclass$.$ReplaceDomElement$.call(this, $newElement$$13$$, $oldElement$$4$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.ReplaceDomElement", {$ReplaceDomElement$:$AdfDhtmlDeckPeer$$.prototype.$ReplaceDomElement$});
$AdfDhtmlDeckPeer$$.prototype.$DomReplaceNotify$ = function $$AdfDhtmlDeckPeer$$$$$DomReplaceNotify$$($domNode$$28$$) {
  if (0 < $domNode$$28$$.id.indexOf("optRnd")) {
    var $agent$$278_dimensionsFromParent$$5$$ = $AdfAgent$$.$AGENT$, $callbackParams$$6_root$$7$$ = this.$getDomElement$();
    if (null != this.$_transitionCancelFunction$) {
      var $deleteCallbackParams_page$$104$$ = this.$_transitionCancelFunction$();
      this.$_transitionCancelFunction$ = null;
      null != $deleteCallbackParams_page$$104$$ && $AdfDhtmlDeckPeer$$.$_deleteElement$($callbackParams$$6_root$$7$$, $deleteCallbackParams_page$$104$$[1], !0, !1);
      $AdfPage$$.$PAGE$.$decrementPendingAnimation$();
    }
    var $deleteCallbackParams_page$$104$$ = $AdfPage$$.$PAGE$, $logger$$14$$ = $AdfLogger$$.$LOGGER$, $contentPanel$$7_properties$$58$$ = $callbackParams$$6_root$$7$$.firstChild, $oldChild$$6$$ = $contentPanel$$7_properties$$58$$.firstChild, $oldIndex$$3$$ = -1;
    null != $oldChild$$6$$.id && -1 == $oldChild$$6$$.id.indexOf("optRnd") ? $oldIndex$$3$$ = $agent$$278_dimensionsFromParent$$5$$.getAttribute($oldChild$$6$$, "data-afr-index") : $oldChild$$6$$ = null;
    var $newChild$$5$$ = $domNode$$28$$.firstChild, $newIndex$$4$$ = $agent$$278_dimensionsFromParent$$5$$.getAttribute($domNode$$28$$, "data-afr-index"), $component$$1051_transitionType$$1$$ = this.$getComponent$(), $component$$1051_transitionType$$1$$ = $AdfDhtmlDeckPeer$$.$_getTransitionType$($component$$1051_transitionType$$1$$, $callbackParams$$6_root$$7$$, $oldIndex$$3$$, $newIndex$$4$$);
    if ($newIndex$$4$$ == $oldIndex$$3$$) {
      if (-1 == $newIndex$$4$$) {
        return null;
      }
      if (null == $component$$1051_transitionType$$1$$) {
        return $callbackParams$$6_root$$7$$;
      }
    }
    if (this.$_swipeMgr$.$isWaitingForContent$()) {
      return -1 != $newIndex$$4$$ && $AdfDhtmlDeckPeer$$.$_replaceChild$($oldChild$$6$$, $newChild$$5$$), this.$_swipeMgr$.$discloseContentPanel$($contentPanel$$7_properties$$58$$), $callbackParams$$6_root$$7$$;
    }
    this.$_swipeMgr$.$isPanning$() && this.$_swipeMgr$.$restoreSwipePanel$();
    null != $oldChild$$6$$ && $AdfDhtmlDeckPeer$$.$_deleteElement$($callbackParams$$6_root$$7$$, $oldChild$$6$$, !1, !0);
    -1 != $newIndex$$4$$ && $contentPanel$$7_properties$$58$$.insertBefore($newChild$$5$$, $contentPanel$$7_properties$$58$$.firstChild);
    $agent$$278_dimensionsFromParent$$5$$ = "yes" == $agent$$278_dimensionsFromParent$$5$$.getAttribute($domNode$$28$$, "data-afr-dfp");
    $callbackParams$$6_root$$7$$ = [this, $oldChild$$6$$];
    $contentPanel$$7_properties$$58$$ = {parentFlipAllowed:!0};
    $contentPanel$$7_properties$$58$$.dimensionsFromParent = $agent$$278_dimensionsFromParent$$5$$;
    $contentPanel$$7_properties$$58$$.finishedFunction = $AdfDhtmlDeckPeer$$.$_statelessOptimizeReplaceFinished$;
    $contentPanel$$7_properties$$58$$.callbackParams = $callbackParams$$6_root$$7$$;
    $contentPanel$$7_properties$$58$$.animationEnabled = $deleteCallbackParams_page$$104$$.$isAnimationEnabled$() || $deleteCallbackParams_page$$104$$.$isAutomationEnabled$();
    $contentPanel$$7_properties$$58$$.isRtl = $deleteCallbackParams_page$$104$$.$getLocaleContext$().$isRightToLeft$();
    $contentPanel$$7_properties$$58$$.fineLogger = $adf$$.$shared$.$impl$.$animationUtils$.$getProxyFunction$($logger$$14$$, $logger$$14$$.fine);
    $AdfPage$$.$PAGE$.$incrementPendingAnimation$();
    this.$_transitionCancelFunction$ = $adf$$.$shared$.$impl$.$animationUtils$.transition($component$$1051_transitionType$$1$$, $oldChild$$6$$, $newChild$$5$$, $contentPanel$$7_properties$$58$$);
    null == this.$_transitionCancelFunction$ && $logger$$14$$.fine("Unexpected null transition cancel function.");
  }
  return $domNode$$28$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlDeckPeer.prototype.DomReplaceNotify", {$DomReplaceNotify$:$AdfDhtmlDeckPeer$$.prototype.$DomReplaceNotify$});
