var $AdfDhtmlMaximizePeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfDhtmlTogglePeer$$, "AdfDhtmlMaximizePeer", $JSCompiler_alias_TRUE$$, {$propertyChanges$:["maximized"], $eventHandlers$:[$AdfMaximizeEvent$$.$EVENT_TYPE$, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$]});
$goog$exportSymbol$$("AdfDhtmlMaximizePeer", $AdfDhtmlMaximizePeer$$);
$AdfDhtmlMaximizePeer$$.$InitSubclass$ = function $$AdfDhtmlMaximizePeer$$$$InitSubclass$$() {
  $AdfDhtmlMaximizePeer$$.$_SUB_ID$ = "_afrMax";
  $AdfDhtmlMaximizePeer$$.$_PLACEHOLDER_SUB_ID$ = "_afrPlaceHolder";
  $AdfDhtmlTogglePeer$$.$Config$(this, {propertyName:"maximized", clientEventType:$AdfMaximizeEvent$$, toggledTipResourceKey:"AFRestoreTip", untoggledTipResourceKey:"AFMaximizeTip"})
};
$goog$exportSymbol$$("AdfDhtmlMaximizePeer.InitSubclass", $AdfDhtmlMaximizePeer$$.$InitSubclass$);
$AdfDhtmlMaximizePeer$$.prototype.$ComponentMaximizedChanged$ = $AdfDhtmlTogglePeer$$.$TogglePropertyChangedImpl$;
$AdfDhtmlMaximizePeer$$.prototype.$HandleComponentMaximize$ = $AdfDhtmlTogglePeer$$.$HandleToggleEventImpl$;
$AdfDhtmlMaximizePeer$$.prototype.$QueueClientEvent$ = function $$AdfDhtmlMaximizePeer$$$$$QueueClientEvent$$($isMaximized$$2$$, $partial$$11$$) {
  var $component$$1074$$ = this.$getComponent$();
  (new $AdfMaximizeEvent$$($component$$1074$$, $isMaximized$$2$$, this.$EventPropagatesToServer$())).$queue$($partial$$11$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMaximizePeer.prototype.QueueClientEvent", {$QueueClientEvent$:$AdfDhtmlMaximizePeer$$.prototype.$QueueClientEvent$});
$AdfDhtmlMaximizePeer$$.prototype.$EventPropagatesToServer$ = $JSCompiler_returnArg$$($JSCompiler_alias_FALSE$$);
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMaximizePeer.prototype.EventPropagatesToServer", {$EventPropagatesToServer$:$AdfDhtmlMaximizePeer$$.prototype.$EventPropagatesToServer$});
$AdfDhtmlMaximizePeer$$.prototype.$GetButtonElement$ = function $$AdfDhtmlMaximizePeer$$$$$GetButtonElement$$() {
  var $buttonId$$9_component$$1075$$ = this.$getComponent$(), $buttonId$$9_component$$1075$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonId$$9_component$$1075$$.$getClientId$(), $AdfDhtmlMaximizePeer$$.$_SUB_ID$);
  return $AdfAgent$$.$AGENT$.getElementById($buttonId$$9_component$$1075$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMaximizePeer.prototype.GetButtonElement", {$GetButtonElement$:$AdfDhtmlMaximizePeer$$.prototype.$GetButtonElement$});
$AdfDhtmlMaximizePeer$$.$_mungeStyles$ = function $$AdfDhtmlMaximizePeer$$$$_mungeStyles$$($rootElement$$51$$, $maximized$$) {
  for(var $agent$$319$$ = $AdfAgent$$.$AGENT$, $mungeOverflow$$ = $AdfAgent$$.$IE_PLATFORM$ == $agent$$319$$.$getPlatform$() && 8 < $agent$$319$$.$getVersion$(), $parent$$42$$ = $rootElement$$51$$.parentNode;$parent$$42$$;) {
    if($parent$$42$$.style && $maximized$$ != "_oldZindex" in $parent$$42$$) {
      var $parentStyle$$ = $agent$$319$$.getOverrideStyle($parent$$42$$);
      $maximized$$ ? ($parent$$42$$.$_oldZindex$ = $parentStyle$$.zIndex, $parentStyle$$.zIndex = "auto", $mungeOverflow$$ && ($parent$$42$$.$_oldOverflow$ = $parentStyle$$.overflow, $parentStyle$$.overflow = "visible")) : ($parentStyle$$.zIndex = $parent$$42$$.$_oldZindex$, delete $parent$$42$$.$_oldZindex$, $mungeOverflow$$ && ($parentStyle$$.overflow = $parent$$42$$.$_oldOverflow$, delete $parent$$42$$.$_oldOverflow$))
    }
    $parent$$42$$ = $parent$$42$$.parentNode
  }
};
$AdfDhtmlMaximizePeer$$.prototype.$GetNewValueFromEvent$ = function $$AdfDhtmlMaximizePeer$$$$$GetNewValueFromEvent$$($componentEvent$$227$$) {
  return $componentEvent$$227$$.$isMaximized$()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMaximizePeer.prototype.GetNewValueFromEvent", {$GetNewValueFromEvent$:$AdfDhtmlMaximizePeer$$.prototype.$GetNewValueFromEvent$});
$AdfDhtmlMaximizePeer$$.prototype.$__updateClientMaximize$ = function $$AdfDhtmlMaximizePeer$$$$$__updateClientMaximize$$($headerHeight_rootElement$$52_wasStretched$$, $contentElement$$7$$, $animationFunc_contentParentStyle_maximized$$1$$) {
  $AdfAssert$$.$assertDomElement$($headerHeight_rootElement$$52_wasStretched$$);
  $AdfAssert$$.$assertDomElement$($contentElement$$7$$);
  $AdfAssert$$.$assertBoolean$($animationFunc_contentParentStyle_maximized$$1$$);
  if($animationFunc_contentParentStyle_maximized$$1$$) {
    var $agent$$320$$ = $AdfAgent$$.$AGENT$, $contentParentElement$$3$$ = $contentElement$$7$$.parentNode, $rootStyle$$5$$ = $agent$$320$$.getOverrideStyle($headerHeight_rootElement$$52_wasStretched$$), $contentStyle$$ = $agent$$320$$.getOverrideStyle($contentElement$$7$$);
    $animationFunc_contentParentStyle_maximized$$1$$ = $agent$$320$$.getOverrideStyle($contentParentElement$$3$$);
    var $bounds$$3_startSize$$ = $agent$$320$$.$getElementPageBounds$($headerHeight_rootElement$$52_wasStretched$$), $bounds$$3_startSize$$ = {top:$bounds$$3_startSize$$.top + "px", left:$bounds$$3_startSize$$.left + "px", width:$bounds$$3_startSize$$.right - $bounds$$3_startSize$$.left + "px", height:$bounds$$3_startSize$$.bottom - $bounds$$3_startSize$$.top + "px"};
    $headerHeight_rootElement$$52_wasStretched$$.$_oldStyle$ = {root:{position:$rootStyle$$5$$.position, top:$rootStyle$$5$$.top, left:$rootStyle$$5$$.left, width:$rootStyle$$5$$.width, height:$rootStyle$$5$$.height, zIndex:$rootStyle$$5$$.zIndex}, content:{position:$contentStyle$$.position, height:$contentStyle$$.height}, contentParent:{position:$animationFunc_contentParentStyle_maximized$$1$$.position, width:$animationFunc_contentParentStyle_maximized$$1$$.width, height:$animationFunc_contentParentStyle_maximized$$1$$.height, 
    left:$animationFunc_contentParentStyle_maximized$$1$$.left, right:$animationFunc_contentParentStyle_maximized$$1$$.right, top:$animationFunc_contentParentStyle_maximized$$1$$.top, bottom:$animationFunc_contentParentStyle_maximized$$1$$.bottom}, initialSize:$bounds$$3_startSize$$, contentDomElement:$contentElement$$7$$};
    $rootStyle$$5$$.position = "fixed";
    $rootStyle$$5$$.zIndex = 500;
    var $placeHolder$$ = $AdfPage$$.$PAGE$.$getDomDocument$().createElement("div"), $holderId$$ = $AdfRichUIPeer$$.$CreateSubId$($headerHeight_rootElement$$52_wasStretched$$.id, $AdfDhtmlMaximizePeer$$.$_PLACEHOLDER_SUB_ID$);
    $headerHeight_rootElement$$52_wasStretched$$.$_placeHolderId$ = $placeHolder$$.id = $holderId$$;
    $headerHeight_rootElement$$52_wasStretched$$.parentNode.appendChild($placeHolder$$);
    $AdfAgent$$.$AGENT$.$elementsAdded$($placeHolder$$);
    $AdfCollections$$.$copyInto$($placeHolder$$.style, $bounds$$3_startSize$$);
    $AdfCollections$$.$copyInto$($rootStyle$$5$$, $bounds$$3_startSize$$);
    $headerHeight_rootElement$$52_wasStretched$$ = "absolute" == $agent$$320$$.getComputedStyle($contentElement$$7$$).position;
    $contentStyle$$.position = "relative";
    $contentStyle$$.height = "100%";
    $animationFunc_contentParentStyle_maximized$$1$$.position = "absolute";
    $animationFunc_contentParentStyle_maximized$$1$$.width = "auto";
    $animationFunc_contentParentStyle_maximized$$1$$.height = "auto";
    $headerHeight_rootElement$$52_wasStretched$$ || ($headerHeight_rootElement$$52_wasStretched$$ = Math.max(0, $agent$$320$$.$getElementTop$($contentParentElement$$3$$) - $agent$$320$$.$getElementTop$($contentParentElement$$3$$.parentNode) - 1), $animationFunc_contentParentStyle_maximized$$1$$.top = $headerHeight_rootElement$$52_wasStretched$$ + "px", $animationFunc_contentParentStyle_maximized$$1$$.left = 0, $animationFunc_contentParentStyle_maximized$$1$$.right = 0, $animationFunc_contentParentStyle_maximized$$1$$.bottom = 
    0);
    $animationFunc_contentParentStyle_maximized$$1$$ = $AdfDhtmlMaximizePeer$$.$_handleZoom$
  }else {
    $animationFunc_contentParentStyle_maximized$$1$$ = $AdfDhtmlMaximizePeer$$.$_handleRestore$
  }
  window.setTimeout(this.$createCallback$($animationFunc_contentParentStyle_maximized$$1$$), 0)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlMaximizePeer.prototype.__updateClientMaximize", {$__updateClientMaximize$:$AdfDhtmlMaximizePeer$$.prototype.$__updateClientMaximize$});
$AdfDhtmlMaximizePeer$$.$_applyCSS$ = function $$AdfDhtmlMaximizePeer$$$$_applyCSS$$($style$$25$$, $propertyValue$$11$$) {
  for(var $prefixes$$ = ["", "-webkit-", "Moz", "ms"], $capitalizePropertyName$$ = [$JSCompiler_alias_FALSE$$, $JSCompiler_alias_FALSE$$, $JSCompiler_alias_TRUE$$, $JSCompiler_alias_TRUE$$], $prefixCount$$ = $prefixes$$.length, $i$$275$$ = 0;$i$$275$$ < $prefixCount$$;$i$$275$$++) {
    var $prefix$$17$$ = $prefixes$$[$i$$275$$], $modifiedPropertyName$$ = "transition";
    $capitalizePropertyName$$[$i$$275$$] && ($modifiedPropertyName$$ = "Transition");
    $style$$25$$[$prefix$$17$$ + $modifiedPropertyName$$] = $propertyValue$$11$$
  }
};
$AdfDhtmlMaximizePeer$$.$_handleRestore$ = function $$AdfDhtmlMaximizePeer$$$$_handleRestore$$() {
  var $oldStyle$$2_outerPeer$$ = this.$outerThis$;
  $oldStyle$$2_outerPeer$$ || ($oldStyle$$2_outerPeer$$ = this);
  var $rootElement$$53_rootStyle$$6$$ = $oldStyle$$2_outerPeer$$.$getDomElement$();
  if($oldStyle$$2_outerPeer$$ = $rootElement$$53_rootStyle$$6$$.$_oldStyle$) {
    $rootElement$$53_rootStyle$$6$$ = $AdfAgent$$.$AGENT$.getOverrideStyle($rootElement$$53_rootStyle$$6$$), $AdfPage$$.$PAGE$.$isAnimationEnabled$() ? ($AdfDhtmlMaximizePeer$$.$_applyCSS$($rootElement$$53_rootStyle$$6$$, "all .2ss ease-in"), $AdfCollections$$.$copyInto$($rootElement$$53_rootStyle$$6$$, $oldStyle$$2_outerPeer$$.initialSize), window.setTimeout(this.$createCallback$($AdfDhtmlMaximizePeer$$.$_cleanUpRestore$), 200)) : $AdfDhtmlMaximizePeer$$.$_cleanUpRestore$.apply(this)
  }
};
$AdfDhtmlMaximizePeer$$.$_cleanUpRestore$ = function $$AdfDhtmlMaximizePeer$$$$_cleanUpRestore$$() {
  var $outerPeer$$1_rootElement$$54$$ = this.$outerThis$;
  $outerPeer$$1_rootElement$$54$$ || ($outerPeer$$1_rootElement$$54$$ = this);
  var $outerPeer$$1_rootElement$$54$$ = $outerPeer$$1_rootElement$$54$$.$getDomElement$(), $oldStyle$$3$$ = $outerPeer$$1_rootElement$$54$$.$_oldStyle$, $holderId$$1_placeHolder$$1_rootStyle$$7$$ = $outerPeer$$1_rootElement$$54$$.$_placeHolderId$;
  delete $outerPeer$$1_rootElement$$54$$.$_placeHolderId$;
  $holderId$$1_placeHolder$$1_rootStyle$$7$$ = $AdfAgent$$.$AGENT$.getElementById($holderId$$1_placeHolder$$1_rootStyle$$7$$);
  $AdfAgent$$.$AGENT$.$elementsRemoved$($holderId$$1_placeHolder$$1_rootStyle$$7$$);
  $outerPeer$$1_rootElement$$54$$.parentNode.removeChild($holderId$$1_placeHolder$$1_rootStyle$$7$$);
  if($oldStyle$$3$$) {
    var $contentElement$$8_contentParentStyle$$1$$ = $oldStyle$$3$$.contentDomElement, $agent$$322$$ = $AdfAgent$$.$AGENT$, $holderId$$1_placeHolder$$1_rootStyle$$7$$ = $agent$$322$$.getOverrideStyle($outerPeer$$1_rootElement$$54$$), $contentStyle$$1$$ = $agent$$322$$.getOverrideStyle($contentElement$$8_contentParentStyle$$1$$), $contentElement$$8_contentParentStyle$$1$$ = $agent$$322$$.getOverrideStyle($contentElement$$8_contentParentStyle$$1$$.parentNode);
    $AdfDhtmlMaximizePeer$$.$_applyCSS$($holderId$$1_placeHolder$$1_rootStyle$$7$$, "");
    $AdfCollections$$.$copyInto$($holderId$$1_placeHolder$$1_rootStyle$$7$$, $oldStyle$$3$$.root);
    $AdfCollections$$.$copyInto$($contentStyle$$1$$, $oldStyle$$3$$.content);
    $AdfCollections$$.$copyInto$($contentElement$$8_contentParentStyle$$1$$, $oldStyle$$3$$.contentParent);
    delete $outerPeer$$1_rootElement$$54$$.$_oldStyle$;
    $AdfDhtmlMaximizePeer$$.$_mungeStyles$($outerPeer$$1_rootElement$$54$$, $JSCompiler_alias_FALSE$$)
  }
  $AdfPage$$.$PAGE$.$doResizeNotifyDom$($outerPeer$$1_rootElement$$54$$, $JSCompiler_alias_FALSE$$)
};
$AdfDhtmlMaximizePeer$$.$_handleZoom$ = function $$AdfDhtmlMaximizePeer$$$$_handleZoom$$() {
  var $outerPeer$$2_rootElement$$55_rootStyle$$8$$ = this.$outerThis$;
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$ || ($outerPeer$$2_rootElement$$55_rootStyle$$8$$ = this);
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$ = $outerPeer$$2_rootElement$$55_rootStyle$$8$$.$getDomElement$();
  $AdfDhtmlMaximizePeer$$.$_mungeStyles$($outerPeer$$2_rootElement$$55_rootStyle$$8$$, $JSCompiler_alias_TRUE$$);
  var $agent$$323_windowHeight$$8$$ = $AdfAgent$$.$AGENT$, $outerPeer$$2_rootElement$$55_rootStyle$$8$$ = $agent$$323_windowHeight$$8$$.getOverrideStyle($outerPeer$$2_rootElement$$55_rootStyle$$8$$), $windowWidth$$8$$ = $agent$$323_windowHeight$$8$$.getWindowWidth(), $agent$$323_windowHeight$$8$$ = $agent$$323_windowHeight$$8$$.getWindowHeight(), $animationEnabled$$2$$ = $AdfPage$$.$PAGE$.$isAnimationEnabled$();
  $animationEnabled$$2$$ && $AdfDhtmlMaximizePeer$$.$_applyCSS$($outerPeer$$2_rootElement$$55_rootStyle$$8$$, "all 0.2s ease-out");
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$.top = "0px";
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$.left = "0px";
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$.width = $windowWidth$$8$$ + "px";
  $outerPeer$$2_rootElement$$55_rootStyle$$8$$.height = $agent$$323_windowHeight$$8$$ + "px";
  $animationEnabled$$2$$ ? window.setTimeout(this.$createCallback$($AdfDhtmlMaximizePeer$$.$_cleanUpZoom$), 200) : $AdfDhtmlMaximizePeer$$.$_cleanUpZoom$.apply(this)
};
$AdfDhtmlMaximizePeer$$.$_cleanUpZoom$ = function $$AdfDhtmlMaximizePeer$$$$_cleanUpZoom$$() {
  var $outerPeer$$3_rootElement$$56$$ = this.$outerThis$;
  $outerPeer$$3_rootElement$$56$$ == $JSCompiler_alias_NULL$$ && ($outerPeer$$3_rootElement$$56$$ = this);
  var $outerPeer$$3_rootElement$$56$$ = $outerPeer$$3_rootElement$$56$$.$getDomElement$(), $rootStyle$$9$$ = $AdfAgent$$.$AGENT$.getOverrideStyle($outerPeer$$3_rootElement$$56$$);
  $AdfDhtmlMaximizePeer$$.$_applyCSS$($rootStyle$$9$$, "");
  $rootStyle$$9$$.width = "100%";
  $rootStyle$$9$$.height = "100%";
  $AdfPage$$.$PAGE$.$doResizeNotifyDom$($outerPeer$$3_rootElement$$56$$, $JSCompiler_alias_FALSE$$)
};
