var $AdfDhtmlChooseColorBasePeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlChooseColorBasePeer");
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer", $AdfDhtmlChooseColorBasePeer$$);
$AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$ = "lastUsedColor";
$AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$ = "colorValue";
$AdfDhtmlChooseColorBasePeer$$.prototype.$handleUpdateFromInputComponent$ = function $$AdfDhtmlChooseColorBasePeer$$$$$handleUpdateFromInputComponent$$($chooseComponent$$, $propertyName$$40$$, $newValue$$41$$) {
  $chooseComponent$$.setProperty($propertyName$$40$$, $newValue$$41$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.handleUpdateFromInputComponent", {$handleUpdateFromInputComponent$:$AdfDhtmlChooseColorBasePeer$$.prototype.$handleUpdateFromInputComponent$});
$AdfDhtmlChooseColorBasePeer$$.$InitSubclass$ = function $$AdfDhtmlChooseColorBasePeer$$$$InitSubclass$$() {
  $AdfObject$$.$ensureClassInitialization$(AdfRichChooseColor);
  $AdfObject$$.$ensureClassInitialization$(AdfRichInputColor);
  $AdfObject$$.$ensureClassInitialization$(AdfUIValue);
  $AdfObject$$.$ensureClassInitialization$($AdfDhtmlInputColorPeer$$);
  this.$_colorFormat$ = new TrColorConverter(["#RRGGBB"], !0);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_UP_EVENT_TYPE$, $AdfDialogEvent$$.$EVENT_TYPE$);
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, AdfRichChooseColor.DEFAULT_COLOR, AdfRichChooseColor.CUSTOM_COLOR_DATA);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichChooseColor.COLOR_DATA, AdfRichChooseColor.WIDTH, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, AdfRichChooseColor.DEFAULT_COLOR);
  this.$_SWATCH_EXPANDO$ = "_adfSw";
  this.$_BUTTON_EXPANDO$ = "_adfSwBtn";
  this.$_COLOR_VALUE_EXPANDO$ = "_adfClr";
  this.$_LAST_USED_COLOR_BTN$ = "LucBtn";
  this.$_DEFAULT_COLOR_BTN$ = "DfcBtn";
  this.$_CUSTOM_COLOR_BTN$ = "cstcBtn";
  this.$_CUSTOM_ROW_ID$ = "ccRow";
  this.$_CUSTOM_PANEL_WRAPPER_ID$ = "ccWrap";
  this.$_CUSTOM_PANEL$ = "ccPnl";
  this.$_CUSTOM_DLG_DRAG_ID$ = "tb";
  this.$_SELECTION_UNKNOWN$ = 0;
  this.$_SELECTION_OLD_SWATCH_KNOWN$ = 1;
  this.$_SELECTION_NEW_SWATCH_KNOWN$ = 2;
  this.$_SELECTION_SWATCHES_KNOWN$ = 3;
  this.$_SELECTION_PROCESSED$ = 4;
  this.$_prevSwatchSelectionMap$ = {};
  this.$_curSwatchSelectionMap$ = {};
  this.$_selectionStateMap$ = {};
  this.$_STANDARD_SWATCH_TABLE_ID$ = "stdTbl";
  this.$_initCustomPanelHandlerClass$();
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.InitSubclass", $AdfDhtmlChooseColorBasePeer$$.$InitSubclass$);
$AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$ = function $$AdfDhtmlChooseColorBasePeer$$$$_convertToColorString$$($colorObj$$) {
  return null == $colorObj$$ ? null : this.$_colorFormat$.getAsString($colorObj$$);
};
$AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$ = function $$AdfDhtmlChooseColorBasePeer$$$$_convertToColorObj$$($colorString$$) {
  return null == $colorString$$ ? null : this.$_colorFormat$.getAsObject($colorString$$);
};
$AdfDhtmlChooseColorBasePeer$$.$parse0To255$ = function $$AdfDhtmlChooseColorBasePeer$$$$parse0To255$$($result$$16_str$$13$$) {
  $AdfAssert$$.$assertString$($result$$16_str$$13$$);
  for (var $charCount$$ = $result$$16_str$$13$$.length, $i$$266$$ = 0;$i$$266$$ < $charCount$$;$i$$266$$++) {
    if (-1 == "0123456789".indexOf($result$$16_str$$13$$.charAt($i$$266$$))) {
      return null;
    }
  }
  $result$$16_str$$13$$ = parseInt($result$$16_str$$13$$);
  return !isNaN($result$$16_str$$13$$) && 0 <= $result$$16_str$$13$$ && 255 >= $result$$16_str$$13$$ ? $result$$16_str$$13$$ : null;
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.parse0To255", $AdfDhtmlChooseColorBasePeer$$.$parse0To255$);
$AdfDhtmlChooseColorBasePeer$$.$parseHexColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$parseHexColor$$($str$$14$$) {
  $AdfAssert$$.$assertString$($str$$14$$);
  var $returnValue$$3$$ = $str$$14$$;
  if (6 != $str$$14$$.length) {
    $returnValue$$3$$ = null;
  } else {
    for (var $i$$267$$ = 0;6 > $i$$267$$;$i$$267$$++) {
      if (-1 == "0123456789ABCDEFabcdef".indexOf($str$$14$$.charAt($i$$267$$))) {
        $returnValue$$3$$ = null;
        break;
      }
    }
  }
  null != $returnValue$$3$$ && ($returnValue$$3$$ = parseInt($str$$14$$, 16));
  return $returnValue$$3$$;
};
$goog$exportSymbol$$("AdfDhtmlChooseColorBasePeer.parseHexColor", $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$);
$AdfDhtmlChooseColorBasePeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlChooseColorBasePeer$$$$$InitDomElement$$($component$$805$$, $domElement$$99$$) {
  $AdfDhtmlChooseColorBasePeer$$.$superclass$.$InitDomElement$.call(this, $component$$805$$, $domElement$$99$$);
  var $inputColor$$ = $AdfDhtmlInputChooseBindingUtils$$.$getInputComponent$($component$$805$$.$getClientId$());
  null != $inputColor$$ && $inputColor$$.$getPeer$().$initChooseComponentValue$($inputColor$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlChooseColorBasePeer$$.prototype.$InitDomElement$});
function $JSCompiler_StaticMethods__getColorFromSwatch$$($color$$2_swatch$$) {
  $color$$2_swatch$$ = $color$$2_swatch$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
  return null != $color$$2_swatch$$ && "No Color" != $color$$2_swatch$$ ? $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($color$$2_swatch$$) : null;
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentLastUsedColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentLastUsedColor$$($buttonSwatchId_colorString$$1_component$$806_element$$213$$) {
  $buttonSwatchId_colorString$$1_component$$806_element$$213$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId_colorString$$1_component$$806_element$$213$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$);
  if ($buttonSwatchId_colorString$$1_component$$806_element$$213$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId_colorString$$1_component$$806_element$$213$$)) {
    return $buttonSwatchId_colorString$$1_component$$806_element$$213$$ = $buttonSwatchId_colorString$$1_component$$806_element$$213$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$), $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($buttonSwatchId_colorString$$1_component$$806_element$$213$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentLastUsedColor", {$GetComponentLastUsedColor$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentLastUsedColor$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentDefaultColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentDefaultColor$$($buttonSwatchId$$1_colorString$$2_component$$807$$) {
  $buttonSwatchId$$1_colorString$$2_component$$807$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId$$1_colorString$$2_component$$807$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$);
  $buttonSwatchId$$1_colorString$$2_component$$807$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId$$1_colorString$$2_component$$807$$).getAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$);
  return $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$($buttonSwatchId$$1_colorString$$2_component$$807$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentDefaultColor", {$GetComponentDefaultColor$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentDefaultColor$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentWidth$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentWidth$$($component$$808$$) {
  return $JSCompiler_StaticMethods__getSwatchRows$$($component$$808$$).length;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentWidth", {$GetComponentWidth$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentWidth$});
function $JSCompiler_StaticMethods__getSwatchRows$$($agent$$235_component$$809$$) {
  var $swatchTableId_tableElement$$4$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$235_component$$809$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_STANDARD_SWATCH_TABLE_ID$);
  $agent$$235_component$$809$$ = $AdfAgent$$.$AGENT$;
  $swatchTableId_tableElement$$4$$ = $agent$$235_component$$809$$.getElementById($swatchTableId_tableElement$$4$$);
  return $agent$$235_component$$809$$.$getTableRows$($swatchTableId_tableElement$$4$$);
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentColorData$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentColorData$$($component$$810_rows$$11$$) {
  $component$$810_rows$$11$$ = $JSCompiler_StaticMethods__getSwatchRows$$($component$$810_rows$$11$$);
  for (var $rowsLength$$ = $component$$810_rows$$11$$.length, $colorArray$$ = [], $rowColorArray$$ = null, $i$$268$$ = 0;$i$$268$$ < $rowsLength$$;$i$$268$$++) {
    $rowColorArray$$ = $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($component$$810_rows$$11$$[$i$$268$$]), $colorArray$$ = $colorArray$$.concat($rowColorArray$$);
  }
  return $colorArray$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentColorData", {$GetComponentColorData$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentColorData$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentCustomColorData$ = function $$AdfDhtmlChooseColorBasePeer$$$$$GetComponentCustomColorData$$($component$$811_customRowId_rowElement$$) {
  $component$$811_customRowId_rowElement$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$811_customRowId_rowElement$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
  if ($component$$811_customRowId_rowElement$$ = $AdfAgent$$.$AGENT$.getElementById($component$$811_customRowId_rowElement$$)) {
    return $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($component$$811_customRowId_rowElement$$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.GetComponentCustomColorData", {$GetComponentCustomColorData$:$AdfDhtmlChooseColorBasePeer$$.prototype.$GetComponentCustomColorData$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentCustomColorDataChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentCustomColorDataChanged$$($component$$814$$, $customColorRowId_domElement$$106_rowElement$$inline_1614$$, $newValue$$42$$) {
  $customColorRowId_domElement$$106_rowElement$$inline_1614$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$814$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
  $customColorRowId_domElement$$106_rowElement$$inline_1614$$ = $AdfAgent$$.$AGENT$.getElementById($customColorRowId_domElement$$106_rowElement$$inline_1614$$);
  var $colorArray$$inline_1615$$ = $newValue$$42$$, $rowChildrenArray$$inline_1616$$ = $customColorRowId_domElement$$106_rowElement$$inline_1614$$.childNodes, $length$$inline_1617$$ = $rowChildrenArray$$inline_1616$$.length, $childElement$$inline_1618$$ = null, $swatch$$inline_1619$$ = null, $agent$$inline_1620$$ = $AdfAgent$$.$AGENT$, $color$$inline_1621$$ = null, $colorIndex$$inline_1622$$ = 0;
  $agent$$inline_1620$$.$elementsRemoved$($customColorRowId_domElement$$106_rowElement$$inline_1614$$);
  null == $colorArray$$inline_1615$$ && ($colorArray$$inline_1615$$ = []);
  for (var $i$$inline_1623$$ = 0;$i$$inline_1623$$ < $length$$inline_1617$$;$i$$inline_1623$$++) {
    if ($childElement$$inline_1618$$ = $rowChildrenArray$$inline_1616$$[$i$$inline_1623$$], "TD" == $agent$$inline_1620$$.$getNodeName$($childElement$$inline_1618$$)) {
      if ($swatch$$inline_1619$$ = $childElement$$inline_1618$$.firstChild, $color$$inline_1621$$ = $colorArray$$inline_1615$$[$colorIndex$$inline_1622$$], $colorIndex$$inline_1622$$++, $AdfDomUtils$$.$removeCSSClassName$($swatch$$inline_1619$$, "p_AFTransparent"), null != $color$$inline_1621$$) {
        var $colorString$$inline_1624$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($color$$inline_1621$$);
        $swatch$$inline_1619$$.setAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$, $colorString$$inline_1624$$);
        $swatch$$inline_1619$$.style.backgroundColor = $colorString$$inline_1624$$;
        null != $colorString$$inline_1624$$ && ($colorString$$inline_1624$$ = $colorString$$inline_1624$$.substring(1));
        $colorString$$inline_1624$$ += " / " + $color$$inline_1621$$.red + "," + $color$$inline_1621$$.green + "," + $color$$inline_1621$$.blue;
        $swatch$$inline_1619$$.setAttribute("alt", $colorString$$inline_1624$$);
        $swatch$$inline_1619$$.setAttribute("title", $colorString$$inline_1624$$);
        $AdfDomUtils$$.$removeCSSClassName$($childElement$$inline_1618$$, "p_AFDisabled");
      } else {
        $AdfDomUtils$$.$addCSSClassName$($swatch$$inline_1619$$, "p_AFTransparent");
      }
    }
  }
  $agent$$inline_1620$$.$elementsAdded$($customColorRowId_domElement$$106_rowElement$$inline_1614$$);
  $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$814$$, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichInputColor.CUSTOM_COLOR_DATA, $newValue$$42$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentCustomColorDataChanged", {$ComponentCustomColorDataChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentCustomColorDataChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentColorValueChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentColorValueChanged$$($component$$815$$, $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$, $newSelectNode$$inline_1635_newValue$$43$$, $colorCount$$inline_1631_oldValue$$26$$) {
  var $clientId$$160_newCustomColorData$$inline_1632$$ = $component$$815$$.$getClientId$(), $oldSelectNode$$inline_1636_oldSelectedSwatch$$ = null, $newSelectedSwatch$$ = null;
  switch($JSCompiler_StaticMethods__getSelectionState$$($clientId$$160_newCustomColorData$$inline_1632$$)) {
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_OLD_SWATCH_KNOWN$:
      $oldSelectNode$$inline_1636_oldSelectedSwatch$$ = $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$160_newCustomColorData$$inline_1632$$];
      $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$815$$, $newSelectNode$$inline_1635_newValue$$43$$, !1);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_NEW_SWATCH_KNOWN$:
      $oldSelectNode$$inline_1636_oldSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$815$$, $colorCount$$inline_1631_oldValue$$26$$, !1);
      $newSelectedSwatch$$ = this.$_getCurrentSelection$($clientId$$160_newCustomColorData$$inline_1632$$);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$:
    ;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_PROCESSED$:
      $oldSelectNode$$inline_1636_oldSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$815$$, $colorCount$$inline_1631_oldValue$$26$$, !0);
      $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$815$$, $newSelectNode$$inline_1635_newValue$$43$$, !1);
      break;
    case $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_SWATCHES_KNOWN$:
      $oldSelectNode$$inline_1636_oldSelectedSwatch$$ = $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$160_newCustomColorData$$inline_1632$$], $newSelectedSwatch$$ = this.$_getCurrentSelection$($clientId$$160_newCustomColorData$$inline_1632$$);
  }
  if (null == $newSelectedSwatch$$ && null != $newSelectNode$$inline_1635_newValue$$43$$) {
    if ($clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$ = this.$GetComponentCustomColorData$($component$$815$$, $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$)) {
      $colorCount$$inline_1631_oldValue$$26$$ = $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$.length;
      $clientId$$160_newCustomColorData$$inline_1632$$ = null;
      if (null != $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$[$colorCount$$inline_1631_oldValue$$26$$ - 1]) {
        $clientId$$160_newCustomColorData$$inline_1632$$ = $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$.slice(), $clientId$$160_newCustomColorData$$inline_1632$$.splice(0, 1), $clientId$$160_newCustomColorData$$inline_1632$$[$colorCount$$inline_1631_oldValue$$26$$ - 1] = $newSelectNode$$inline_1635_newValue$$43$$;
      } else {
        for ($clientId$$160_newCustomColorData$$inline_1632$$ = $clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$.slice(), i = 0;i < $colorCount$$inline_1631_oldValue$$26$$;i++) {
          if (null == $clientId$$160_newCustomColorData$$inline_1632$$[i]) {
            $clientId$$160_newCustomColorData$$inline_1632$$[i] = $newSelectNode$$inline_1635_newValue$$43$$;
            break;
          }
        }
      }
      $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$815$$, AdfRichChooseColor.CUSTOM_COLOR_DATA, AdfRichInputColor.CUSTOM_COLOR_DATA, $clientId$$160_newCustomColorData$$inline_1632$$);
      $component$$815$$.setProperty(AdfRichChooseColor.CUSTOM_COLOR_DATA, $clientId$$160_newCustomColorData$$inline_1632$$);
    }
    $newSelectedSwatch$$ = $JSCompiler_StaticMethods__findSwatchByColor$$($component$$815$$, $newSelectNode$$inline_1635_newValue$$43$$, !1);
  }
  $newSelectNode$$inline_1635_newValue$$43$$ = $newSelectedSwatch$$;
  $oldSelectNode$$inline_1636_oldSelectedSwatch$$ != $newSelectNode$$inline_1635_newValue$$43$$ && ($clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$ = this.$getComponent$().$getClientId$(), null != $oldSelectNode$$inline_1636_oldSelectedSwatch$$ && null != $oldSelectNode$$inline_1636_oldSelectedSwatch$$.parentNode && $AdfDomUtils$$.$removeCSSClassName$($oldSelectNode$$inline_1636_oldSelectedSwatch$$.parentNode, "p_AFSelected"), $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$] = 
  $oldSelectNode$$inline_1636_oldSelectedSwatch$$, null != $newSelectNode$$inline_1635_newValue$$43$$ && $AdfDomUtils$$.$addCSSClassName$($newSelectNode$$inline_1635_newValue$$43$$.parentNode, "p_AFSelected"), $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$] = $newSelectNode$$inline_1635_newValue$$43$$, $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$inline_1637_customColors$$inline_1630_domElement$$107$$] = 
  $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_PROCESSED$);
  $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$815$$, $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, AdfUIValue.VALUE);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentColorValueChanged", {$ComponentColorValueChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentColorValueChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentLastUsedColorChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentLastUsedColorChanged$$($component$$816$$, $buttonSwatchId$$2_domElement$$108$$, $newValue$$44$$) {
  if ($buttonSwatchId$$2_domElement$$108$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$816$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$)) {
    $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$2_domElement$$108$$, $newValue$$44$$), $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$816$$, $AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $AdfDhtmlInputColorPeer$$.$__LAST_USED_COLOR$);
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentLastUsedColorChanged", {$ComponentLastUsedColorChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentLastUsedColorChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentDefaultColorChanged$ = function $$AdfDhtmlChooseColorBasePeer$$$$$ComponentDefaultColorChanged$$($buttonSwatchId$$3_component$$817$$, $domElement$$109$$, $newValue$$45$$) {
  $buttonSwatchId$$3_component$$817$$ = $AdfRichUIPeer$$.$CreateSubId$($buttonSwatchId$$3_component$$817$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$);
  $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$3_component$$817$$, $newValue$$45$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.ComponentDefaultColorChanged", {$ComponentDefaultColorChanged$:$AdfDhtmlChooseColorBasePeer$$.prototype.$ComponentDefaultColorChanged$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentClick$$($componentEvent$$133$$) {
  var $component$$818$$ = $componentEvent$$133$$.getSource(), $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $componentEvent$$133$$.$getNativeEventTarget$(), $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$ = $AdfAgent$$.$AGENT$;
  if (null != this.$_customPanelHandler$) {
    $componentEvent$$133$$.cancel();
  } else {
    var $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$ = $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$;
    "TD" == $AdfAgent$$.$AGENT$.$getNodeName$($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$) && ($oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$ = $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.firstChild);
    $JSCompiler_StaticMethods__isSwatch$$($oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$) ? ($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = "TD" == $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$.$getNodeName$($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$) ? $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.firstChild : 
    $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$ = $component$$818$$.$getClientId$(), $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$ = this.$_getCurrentSelection$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$), $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$] = 
    $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$, $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$] = $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$ = $JSCompiler_StaticMethods__getSelectionState$$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$), 
    $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$] = $oldSelectedSwatch$$1_selectionState_targetElement$$inline_1641$$ != $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$ ? $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_SWATCHES_KNOWN$ : $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_NEW_SWATCH_KNOWN$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $JSCompiler_StaticMethods__getColorFromSwatch$$($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$), 
    $component$$818$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $component$$818$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, $AdfUIComponent$$.$PROPAGATE_LOCALLY$), $componentEvent$$133$$.cancel(), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$818$$, 
    !0)) : null != $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_BUTTON_EXPANDO$) && ($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_BUTTON_EXPANDO$), $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == 
    $AdfDhtmlChooseColorBasePeer$$.$_LAST_USED_COLOR_BTN$ ? ($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $component$$818$$.$getProperty$($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$), $component$$818$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$updateInputComponentProperty$($component$$818$$, 
    $AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, AdfUIValue.VALUE), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$818$$)) : $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == $AdfDhtmlChooseColorBasePeer$$.$_DEFAULT_COLOR_BTN$ ? ($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $component$$818$$.$getProperty$(AdfRichChooseColor.DEFAULT_COLOR), $component$$818$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, 
    $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$818$$)) : $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ == $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_COLOR_BTN$ && ($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$818$$), 
    $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$ = $component$$818$$.$getProperty$($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$), null == this.$_customPanelHandler$ && (this.$_customPanelHandler$ = new $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, this)), 
    $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$818$$), $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$ = $AdfAgent$$.$AGENT$.getElementById($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$), $agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$ = $AdfRichUIPeer$$.$CreateSubId$($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$, 
    $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_DLG_DRAG_ID$), $AdfAgent$$.$AGENT$.getElementById($agent$$236_clientId$$161_colorParam_customPanelId$$inline_1645_dragElementId$$inline_1647$$), $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$.parentNode.removeChild($buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$), this.$showPopup$($component$$818$$, $buttonExpando_contentDom$$inline_1646_customPanelClientId_eventTarget$$48_newValue$$46_swatch$$1$$, 
    null, $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$), this.$_customPanelHandler$.$updateDisplay$(), this.$_customPanelHandler$.$updateOldColorSwatch$()), $componentEvent$$133$$.cancel());
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentClick$});
function $JSCompiler_StaticMethods__getCustomPanelId$$($component$$819$$) {
  return "old" == $AdfPage$$.$PAGE$.$getLookAndFeel$().$getSkinProperty$("af|dialog-tr-button-type") ? $AdfRichUIPeer$$.$CreateSubId$($component$$819$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$) : "AdfRichPopup" == $component$$819$$.getParent().getTypeName() ? $component$$819$$.getParent().getParent().$getClientId$() + "_" + $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$ : $component$$819$$.$getClientId$() + "_" + $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$;
}
function $JSCompiler_StaticMethods__isSwatch$$($element$$216$$) {
  return $element$$216$$ && $element$$216$$.attributes && null != $element$$216$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$_handleArrowKeys$ = function $$AdfDhtmlChooseColorBasePeer$$$$$_handleArrowKeys$$($element$$217$$, $key$$66$$) {
  var $targetElement$$28$$, $nexRow_pos$$19_prevRow$$3$$;
  switch($key$$66$$) {
    case $AdfKeyStroke$$.$ARROWUP_KEY$:
    ;
    case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      if ($targetElement$$28$$ = $key$$66$$ == $AdfKeyStroke$$.$ARROWUP_KEY$ ? $AdfDomUtils$$.$getPreviousElement$($element$$217$$.parentNode) : $AdfDomUtils$$.$getNextElement$($element$$217$$.parentNode)) {
        $nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getElementPosition$($element$$217$$), $targetElement$$28$$ = $AdfDomUtils$$.$getChildElementByPosition$($targetElement$$28$$, $element$$217$$.nodeType, $nexRow_pos$$19_prevRow$$3$$);
      }
      break;
    case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      $targetElement$$28$$ = $AdfDomUtils$$.$getNextElement$($element$$217$$);
      $targetElement$$28$$ || null == $element$$217$$.parentNode || ($nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getNextElement$($element$$217$$.parentNode)) && ($targetElement$$28$$ = $AdfDomUtils$$.$getFirstChildElement$($nexRow_pos$$19_prevRow$$3$$));
      $targetElement$$28$$ && $AdfDomUtils$$.$containsCSSClassName$($targetElement$$28$$, "p_AFDisabled") && ($targetElement$$28$$ = null);
      break;
    case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
      $targetElement$$28$$ = $AdfDomUtils$$.$getPreviousElement$($element$$217$$), $targetElement$$28$$ || null == $element$$217$$.parentNode || ($nexRow_pos$$19_prevRow$$3$$ = $AdfDomUtils$$.$getPreviousElement$($element$$217$$.parentNode)) && ($targetElement$$28$$ = $AdfDomUtils$$.$getLastChildElement$($nexRow_pos$$19_prevRow$$3$$));
  }
  $targetElement$$28$$ && ($element$$217$$ && $element$$217$$.setAttribute("tabIndex", "-1"), $targetElement$$28$$.setAttribute("tabIndex", "0"), $AdfFocusUtils$$.$focusElement$($targetElement$$28$$));
};
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentKeyDown$$($componentEvent$$134$$) {
  this.$getComponent$();
  var $agent$$238_keyCode$$46$$ = $AdfAgent$$.$AGENT$, $eventTarget$$49_evt$$89$$ = $componentEvent$$134$$.$getNativeEvent$(), $agent$$238_keyCode$$46$$ = $agent$$238_keyCode$$46$$.$getKeyCode$($eventTarget$$49_evt$$89$$);
  if (!$eventTarget$$49_evt$$89$$.ctrlKey) {
    switch($agent$$238_keyCode$$46$$) {
      case $AdfKeyStroke$$.$ARROWUP_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
        return $eventTarget$$49_evt$$89$$ = $componentEvent$$134$$.$getNativeEventTarget$(), null != this.$_customPanelHandler$ ? this.$_customPanelHandler$.$_handleArrowKeys$($eventTarget$$49_evt$$89$$, $agent$$238_keyCode$$46$$) : $JSCompiler_StaticMethods__isSwatch$$($eventTarget$$49_evt$$89$$.firstChild) && this.$_handleArrowKeys$($eventTarget$$49_evt$$89$$, $agent$$238_keyCode$$46$$), $componentEvent$$134$$.cancel(), !1;
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyDown", {$HandleComponentKeyDown$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyDown$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyUp$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentKeyUp$$($componentEvent$$135$$) {
  var $component$$821$$ = this.$getComponent$(), $agent$$239_keyCode$$47$$ = $AdfAgent$$.$AGENT$, $element$$218_evt$$90_newValue$$47$$ = $componentEvent$$135$$.$getNativeEvent$(), $agent$$239_keyCode$$47$$ = $agent$$239_keyCode$$47$$.$getKeyCode$($element$$218_evt$$90_newValue$$47$$);
  if (!$element$$218_evt$$90_newValue$$47$$.ctrlKey) {
    switch($agent$$239_keyCode$$47$$) {
      case $AdfKeyStroke$$.$ENTER_KEY$:
      ;
      case $AdfKeyStroke$$.$SPACE_KEY$:
        $element$$218_evt$$90_newValue$$47$$ = $componentEvent$$135$$.$getNativeEventTarget$().firstChild;
        $JSCompiler_StaticMethods__isSwatch$$($element$$218_evt$$90_newValue$$47$$) && ($AdfDomUtils$$.$addCSSClassName$($element$$218_evt$$90_newValue$$47$$, "p_AFSelected"), $element$$218_evt$$90_newValue$$47$$ = $JSCompiler_StaticMethods__getColorFromSwatch$$($element$$218_evt$$90_newValue$$47$$), $component$$821$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $element$$218_evt$$90_newValue$$47$$, !1, !0), $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$821$$, 
        !0), $componentEvent$$135$$.cancel());
        break;
      case $AdfKeyStroke$$.$ESC_KEY$:
        $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$821$$, !0), $componentEvent$$135$$.cancel();
    }
  }
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentKeyUp", {$HandleComponentKeyUp$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentKeyUp$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$PopupClosed$ = function $$AdfDhtmlChooseColorBasePeer$$$$$PopupClosed$$($component$$822_parentId$$4$$, $contentDom$$6_customPanelId$$, $popupId$$33$$) {
  $AdfDhtmlChooseColorBasePeer$$.$superclass$.$PopupClosed$.call(this, $component$$822_parentId$$4$$, $contentDom$$6_customPanelId$$);
  $popupId$$33$$ == $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$ && ($contentDom$$6_customPanelId$$ = $JSCompiler_StaticMethods__getCustomPanelId$$($component$$822_parentId$$4$$), $contentDom$$6_customPanelId$$ = $AdfAgent$$.$AGENT$.getElementById($contentDom$$6_customPanelId$$), $component$$822_parentId$$4$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$822_parentId$$4$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL_WRAPPER_ID$), $AdfAgent$$.$AGENT$.getElementById($component$$822_parentId$$4$$).appendChild($contentDom$$6_customPanelId$$), 
  this.$_customPanelHandler$ = null);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.PopupClosed", {$PopupClosed$:$AdfDhtmlChooseColorBasePeer$$.prototype.$PopupClosed$});
$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentDialog$ = function $$AdfDhtmlChooseColorBasePeer$$$$$HandleComponentDialog$$($componentEvent$$136$$) {
  var $component$$823$$ = this.$getComponent$();
  if ($componentEvent$$136$$.$getOutcome$() == $AdfDialogEvent$$.$OUTCOME_OK$) {
    var $newColor$$1$$ = this.$_customPanelHandler$.$getCurrentColorObj$(), $clientId$$162$$ = $component$$823$$.$getClientId$(), $oldSelectedSwatch$$2$$ = this.$_getCurrentSelection$($clientId$$162$$);
    $AdfDhtmlChooseColorBasePeer$$.$_prevSwatchSelectionMap$[$clientId$$162$$] = $oldSelectedSwatch$$2$$;
    $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$162$$] = $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_OLD_SWATCH_KNOWN$;
    $component$$823$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__COLOR_VALUE$, $newColor$$1$$, !1, !0);
    $component$$823$$.setProperty($AdfDhtmlChooseColorBasePeer$$.$__LAST_USED_COLOR$, $newColor$$1$$, !1, $AdfUIComponent$$.$PROPAGATE_LOCALLY$);
  }
  $componentEvent$$136$$.cancel();
  this.$hidePopup$(this.$getComponent$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_PANEL$);
  $AdfDhtmlInputChooseBindingUtils$$.$returnToInputComponent$($component$$823$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseColorBasePeer.prototype.HandleComponentDialog", {$HandleComponentDialog$:$AdfDhtmlChooseColorBasePeer$$.prototype.$HandleComponentDialog$});
function $JSCompiler_StaticMethods__findSwatchByColor$$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$, $colorToMatch$$2_colorToMatchStr$$, $selected$$5_swatch$$inline_1666$$) {
  $colorToMatch$$2_colorToMatchStr$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($colorToMatch$$2_colorToMatchStr$$);
  var $rows$$inline_1653_swatch$$4$$ = null;
  a: {
    for (var $rows$$inline_1653_swatch$$4$$ = $JSCompiler_StaticMethods__getSwatchRows$$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$), $rowsLength$$inline_1654$$ = $rows$$inline_1653_swatch$$4$$.length, $i$$inline_1655$$ = 0;$i$$inline_1655$$ < $rowsLength$$inline_1654$$;$i$$inline_1655$$++) {
      for (var $element$$inline_1656$$ = $AdfDomUtils$$.$getFirstChildElement$($rows$$inline_1653_swatch$$4$$[$i$$inline_1655$$]);$element$$inline_1656$$;) {
        if (!$selected$$5_swatch$$inline_1666$$ || $AdfDomUtils$$.$containsCSSClassName$($element$$inline_1656$$, "p_AFSelected")) {
          var $swatch$$inline_1657$$ = $AdfDomUtils$$.$getFirstChildElement$($element$$inline_1656$$), $color$$inline_1658$$ = $swatch$$inline_1657$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$);
          "No Color" == $color$$inline_1658$$ && ($color$$inline_1658$$ = null);
          if ($color$$inline_1658$$ == $colorToMatch$$2_colorToMatchStr$$) {
            $rows$$inline_1653_swatch$$4$$ = $swatch$$inline_1657$$;
            break a;
          }
        }
        $element$$inline_1656$$ = $AdfDomUtils$$.$getNextElement$($element$$inline_1656$$);
      }
    }
    $rows$$inline_1653_swatch$$4$$ = null;
  }
  if (!$rows$$inline_1653_swatch$$4$$) {
    a: {
      $component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$ = $AdfRichUIPeer$$.$CreateSubId$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$.$getClientId$(), $AdfDhtmlChooseColorBasePeer$$.$_CUSTOM_ROW_ID$);
      if ($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$ = $AdfAgent$$.$AGENT$.getElementById($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$)) {
        for ($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$ = $AdfDomUtils$$.$getFirstChildElement$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$);$component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$;) {
          if (!$AdfDomUtils$$.$containsCSSClassName$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$, "p_AFDisabled") && ($selected$$5_swatch$$inline_1666$$ = $AdfDomUtils$$.$getFirstChildElement$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$), $selected$$5_swatch$$inline_1666$$.getAttribute($AdfDhtmlChooseColorBasePeer$$.$_SWATCH_EXPANDO$) == $colorToMatch$$2_colorToMatchStr$$)) {
            $rows$$inline_1653_swatch$$4$$ = $selected$$5_swatch$$inline_1666$$;
            break a;
          }
          $component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$ = $AdfDomUtils$$.$getNextElement$($component$$826_customRowId$$inline_1663_element$$inline_1665_rowElement$$inline_1664$$);
        }
      }
      $rows$$inline_1653_swatch$$4$$ = null;
    }
  }
  return $rows$$inline_1653_swatch$$4$$;
}
function $JSCompiler_StaticMethods__updateButtonSwatch$$($buttonSwatchId$$4$$, $newColor$$2$$) {
  var $swatchElement$$ = $AdfAgent$$.$AGENT$.getElementById($buttonSwatchId$$4$$);
  if ($swatchElement$$) {
    if ($AdfDomUtils$$.$removeCSSClassName$($swatchElement$$, "p_AFTransparent"), null != $newColor$$2$$) {
      var $colorString$$4$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($newColor$$2$$);
      $swatchElement$$.style.backgroundColor = $colorString$$4$$;
      $swatchElement$$.setAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$, $colorString$$4$$);
    } else {
      $AdfDomUtils$$.$addCSSClassName$($swatchElement$$, "p_AFTransparent"), $swatchElement$$.removeAttribute($AdfDhtmlChooseColorBasePeer$$.$_COLOR_VALUE_EXPANDO$);
    }
  }
}
function $JSCompiler_StaticMethods__getColorArrayFromSwatchRow$$($rowChildrenArray$$1_rowElement$$3$$) {
  var $colorArray$$2$$ = [];
  $rowChildrenArray$$1_rowElement$$3$$ = $rowChildrenArray$$1_rowElement$$3$$.childNodes;
  for (var $length$$51$$ = $rowChildrenArray$$1_rowElement$$3$$.length, $childElement$$7_swatch$$6$$ = null, $agent$$241$$ = $AdfAgent$$.$AGENT$, $childElement$$7_swatch$$6$$ = null, $colorIndex$$1$$ = 0, $i$$271$$ = 0;$i$$271$$ < $length$$51$$;$i$$271$$++) {
    $childElement$$7_swatch$$6$$ = $rowChildrenArray$$1_rowElement$$3$$[$i$$271$$], "TD" == $agent$$241$$.$getNodeName$($childElement$$7_swatch$$6$$) && ($childElement$$7_swatch$$6$$ = $childElement$$7_swatch$$6$$.firstChild, $JSCompiler_StaticMethods__isSwatch$$($childElement$$7_swatch$$6$$) ? $colorArray$$2$$[$colorIndex$$1$$] = $JSCompiler_StaticMethods__getColorFromSwatch$$($childElement$$7_swatch$$6$$) : $colorArray$$2$$[$colorIndex$$1$$] = null, $colorIndex$$1$$++);
  }
  return $colorArray$$2$$;
}
$AdfDhtmlChooseColorBasePeer$$.prototype.$_getCurrentSelection$ = function $$AdfDhtmlChooseColorBasePeer$$$$$_getCurrentSelection$$($clientId$$168$$) {
  return $AdfDhtmlChooseColorBasePeer$$.$_curSwatchSelectionMap$[$clientId$$168$$];
};
function $JSCompiler_StaticMethods__getSelectionState$$($clientId$$169$$) {
  var $state$$30$$ = $AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$169$$];
  $state$$30$$ || ($AdfDhtmlChooseColorBasePeer$$.$_selectionStateMap$[$clientId$$169$$] = $state$$30$$ = $AdfDhtmlChooseColorBasePeer$$.$_SELECTION_UNKNOWN$);
  return $state$$30$$;
}
$AdfDhtmlChooseColorBasePeer$$.$_initSwatchSelectionHandlerClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_initSwatchSelectionHandlerClass$$() {
  $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$ = function $$AdfDhtmlChooseColorBasePeer$$$$_SwatchSelectionHandler$$() {
    this.Init();
  };
  $AdfObject$$.$createSubclass$($AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$, $AdfObject$$, "AdfDhtmlChooseColorBasePeer._SwatchSelectionHandler");
  $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$.prototype.Init = function $$AdfDhtmlChooseColorBasePeer$$$$_SwatchSelectionHandler$$$Init$() {
    $AdfDhtmlChooseColorBasePeer$$.$_SwatchSelectionHandler$.$superclass$.Init.call(this);
    this.$_prevSwatchSelectionMap$ = {};
    this.$_curSwatchSelectionMap$ = {};
    this.$_selectionStateMap$ = {};
  };
};
$AdfDhtmlChooseColorBasePeer$$.$_initCustomPanelHandlerClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_initCustomPanelHandlerClass$$() {
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$($rgbOriginalColor$$, $clientId$$176$$, $callPeer$$) {
    this.Init($rgbOriginalColor$$, $clientId$$176$$, $callPeer$$);
  };
  $AdfObject$$.$createSubclass$($AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$, $AdfObject$$, "AdfDhtmlChooseColorBasePeer._CustomPanelHandler");
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.Init = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$Init$($rgbOriginalColor$$1$$, $clientId$$177$$) {
    $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$superclass$.Init.call(this);
    this.$_clientId$ = $clientId$$177$$;
    var $colorString$$5_parsedRgbTotal$$ = $AdfDhtmlChooseColorBasePeer$$.$_convertToColorString$($rgbOriginalColor$$1$$), $colorString$$5_parsedRgbTotal$$ = null != $colorString$$5_parsedRgbTotal$$ && 0 != $rgbOriginalColor$$1$$.alpha ? $colorString$$5_parsedRgbTotal$$.substring(1) : "3F7B7B", $thisClass$$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$;
    this.$_hueSaturationMapId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_HUE_SATUR_MAP_ID$);
    this.$_crossHairImgId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_CROSSHAIR_ID$);
    this.$_luminosityMapId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_LUM_MAP_ID$);
    this.$_luminosityImgId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_LUM_IMG_ID$);
    this.$_sliderThumbId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_THUMB_ID$);
    this.$_currentColorSwatchId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_CUR_SWATCH_ID$);
    this.$_oldColorSwatchId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_PREV_SWATCH_ID$);
    this.$_hexFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_H_EDIT_ID$);
    this.$_rFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_R_EDIT_ID$);
    this.$_gFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_G_EDIT_ID$);
    this.$_bFieldId$ = $AdfRichUIPeer$$.$CreateSubId$($clientId$$177$$, $thisClass$$.$_B_EDIT_ID$);
    this.$_sliderBackgroundColor$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$(16777215);
    $colorString$$5_parsedRgbTotal$$ = $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$($colorString$$5_parsedRgbTotal$$);
    this.$_currentColor$ = this.$_oldColor$ = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$($colorString$$5_parsedRgbTotal$$);
    this.$_initElementDimensions$();
    this.$_bindToCustomEditDOM$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_initElementDimensions$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_initElementDimensions$$() {
    var $agent$$242$$ = $AdfAgent$$.$AGENT$, $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_crossHairImgId$);
    this.$_CROSSHAIR_IMG_WIDTH$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "width");
    this.$_CROSSHAIR_IMG_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    this.$_CROSSHAIR_IMG_MID_WIDTH$ = Math.floor(this.$_CROSSHAIR_IMG_WIDTH$ / 2);
    this.$_CROSSHAIR_IMG_MID_HEIGHT$ = Math.floor(this.$_CROSSHAIR_IMG_HEIGHT$ / 2);
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_sliderThumbId$);
    this.$_SLIDERTHUMB_IMG_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_luminosityMapId$);
    this.$_SLIDERDIV_ELEMENT_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
    $crossHair_hueSaturationMap_slider_thumb$$ = $agent$$242$$.getElementById(this.$_hueSaturationMapId$);
    this.$_HUESATURATIONMAP_WIDTH$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "width");
    this.$_HUESATURATIONMAP_HEIGHT$ = this.$_getStyleCSSLength$($agent$$242$$, $crossHair_hueSaturationMap_slider_thumb$$, "height");
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$InitClass$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$InitClass$$() {
    this.$_HUE_SATUR_MAP_ID$ = "hueSatMap";
    this.$_CROSSHAIR_ID$ = "crossHair";
    this.$_LUM_MAP_ID$ = "lumMap";
    this.$_LUM_IMG_ID$ = "lumImg";
    this.$_THUMB_ID$ = "thumb";
    this.$_H_EDIT_ID$ = "hEdit";
    this.$_R_EDIT_ID$ = "rEdit";
    this.$_G_EDIT_ID$ = "gEdit";
    this.$_B_EDIT_ID$ = "bEdit";
    this.$_PREV_SWATCH_ID$ = "cstPrevSwtch";
    this.$_CUR_SWATCH_ID$ = "cstCurSwtch";
    $AdfPage$$.$PAGE$.$getLookAndFeel$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_getStyleCSSLength$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_getStyleCSSLength$$($agent$$243_widthString$$, $element$$221_style$$18$$, $styleName$$1$$) {
    var $length$$52$$ = 0;
    $element$$221_style$$18$$ = $agent$$243_widthString$$.getComputedStyle($element$$221_style$$18$$);
    $agent$$243_widthString$$ = $agent$$243_widthString$$.$getStyleProperty$($element$$221_style$$18$$, $styleName$$1$$);
    null != $agent$$243_widthString$$ && ($length$$52$$ = $AdfAgent$$.$getCSSLengthAsInt$($agent$$243_widthString$$));
    return $length$$52$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_bindToCustomEditDOM$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_bindToCustomEditDOM$$() {
    var $bFieldId_clientId$$178$$ = this.$_clientId$;
    customHandlerClass = $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$;
    var $agent$$244$$ = $AdfAgent$$.$AGENT$, $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_H_EDIT_ID$), $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $agent$$244$$.getElementById($domNode$$25_gFieldId_hexFieldId_rFieldId$$), $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$25_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_R_EDIT_ID$);
    $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $agent$$244$$.getElementById($domNode$$25_gFieldId_hexFieldId_rFieldId$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$25_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_G_EDIT_ID$);
    $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $AdfAgent$$.$AGENT$.getElementById($domNode$$25_gFieldId_hexFieldId_rFieldId$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$25_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
    $bFieldId_clientId$$178$$ = $AdfRichUIPeer$$.$CreateSubId$($bFieldId_clientId$$178$$, customHandlerClass.$_B_EDIT_ID$);
    $domNode$$25_gFieldId_hexFieldId_rFieldId$$ = $AdfAgent$$.$AGENT$.getElementById($bFieldId_clientId$$178$$);
    $domChangeLister$$ = this.$createCallback$(this.$_handleDomChange$);
    $agent$$244$$.$addBubbleEventListener$($domNode$$25_gFieldId_hexFieldId_rFieldId$$, "change", $domChangeLister$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$getCurrentColorObj$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$getCurrentColorObj$$() {
    return $AdfDhtmlChooseColorBasePeer$$.$_convertToColorObj$("#" + this.$_currentColor$.$getRgbHex$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_handleDomChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_handleDomChange$$($domEvent$$25$$) {
    targetElementId = $AdfAgent$$.$AGENT$.$getEventTarget$($domEvent$$25$$).getAttribute("id");
    targetElementId == this.$_hexFieldId$ ? this.$_onHexFieldChange$($domEvent$$25$$) : targetElementId == this.$_rFieldId$ ? this.$_onRFieldChange$($domEvent$$25$$) : targetElementId == this.$_gFieldId$ ? this.$_onGFieldChange$($domEvent$$25$$) : targetElementId == this.$_bFieldId$ && this.$_onBFieldChange$($domEvent$$25$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateOldColorSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateOldColorSwatch$$() {
    this.$_updateSwatch$(this.$_oldColorSwatchId$, this.$_oldColor$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateNewColorSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateNewColorSwatch$$() {
    this.$_updateSwatch$(this.$_currentColorSwatchId$, this.$_currentColor$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateSwatch$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateSwatch$$($swatchId$$, $advancedColor$$) {
    $AdfAgent$$.$AGENT$.getElementById($swatchId$$).style.backgroundColor = "#" + $advancedColor$$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$updateDisplay$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$updateDisplay$$($skipElementId$$) {
    this.$updateNewColorSwatch$();
    $skipElementId$$ != this.$_hueSaturationMapId$ && $skipElementId$$ != this.$_luminosityMapId$ && (this.$_updateHueSaturationMap$(), this.$_updateLuminosityMapThumb$());
    $skipElementId$$ != this.$_luminosityMapId$ && this.$_updateLuminosityMapBackground$();
    $skipElementId$$ != this.$_hexFieldId$ && this.$_updateHexField$();
    $skipElementId$$ != this.$_rFieldId$ && $skipElementId$$ != this.$_gFieldId$ && $skipElementId$$ != this.$_bFieldId$ && (this.$_updateRField$(), this.$_updateGField$(), this.$_updateBField$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$handleComponentMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$handleComponentMouseDown$$($componentEvent$$137$$) {
    var $eventTarget$$52$$ = $componentEvent$$137$$.$getNativeEventTarget$(), $nativeEvent$$29$$ = $componentEvent$$137$$.$getNativeEvent$();
    targetElementId = $eventTarget$$52$$.getAttribute("id");
    if (targetElementId == this.$_hueSaturationMapId$ || targetElementId == this.$_crossHairImgId$) {
      this.$_onHueImageMouseDown$($nativeEvent$$29$$), $componentEvent$$137$$.cancel();
    } else {
      if (targetElementId == this.$_luminosityMapId$ || targetElementId == this.$_luminosityImgId$ || targetElementId == this.$_sliderThumbId$) {
        this.$_onBSliderMouseDown$($nativeEvent$$29$$), $componentEvent$$137$$.cancel();
      }
    }
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateHueSaturationMap$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateHueSaturationMap$$() {
    var $color$$6$$ = this.$_currentColor$, $crossHairImg$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $mapWidth$$ = this.$_HUESATURATIONMAP_WIDTH$;
    $crossHairImg$$.style.top = (1 - $color$$6$$.$_saturation$) * this.$_HUESATURATIONMAP_HEIGHT$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$ + "px";
    $AdfPage$$.$PAGE$.$getLocaleContext$().$isRightToLeft$() ? $crossHairImg$$.style.left = $mapWidth$$ - $color$$6$$.$_hue$ * $mapWidth$$ / 360 - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px" : $crossHairImg$$.style.left = $color$$6$$.$_hue$ * $mapWidth$$ / 360 - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px";
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_handleArrowKeys$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_handleArrowKeys$$($eventTarget$$53$$, $keyCode$$48$$) {
    switch($keyCode$$48$$) {
      case $AdfKeyStroke$$.$ARROWUP_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWDOWN_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWRIGHT_KEY$:
      ;
      case $AdfKeyStroke$$.$ARROWLEFT_KEY$:
        var $targetElementId$$1$$ = $eventTarget$$53$$.getAttribute("id"), $targetElement$$31$$ = $AdfAgent$$.$AGENT$.getElementById($targetElementId$$1$$), $deltaX$$14$$ = $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWRIGHT_KEY$ ? 1 : $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWLEFT_KEY$ ? -1 : 0, $deltaY$$17$$ = $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWDOWN_KEY$ ? 1 : $keyCode$$48$$ == $AdfKeyStroke$$.$ARROWUP_KEY$ ? -1 : 0;
        if ($targetElementId$$1$$ == this.$_hueSaturationMapId$ || $targetElementId$$1$$ == this.$_crossHairImgId$) {
          this.$_moveCrossHairByArrow$($deltaX$$14$$, $deltaY$$17$$), $AdfFocusUtils$$.$focusElement$($targetElement$$31$$);
        } else {
          if ($targetElementId$$1$$ == this.$_luminosityMapId$ || $targetElementId$$1$$ == this.$_luminosityImgId$ || $targetElementId$$1$$ == this.$_sliderThumbId$) {
            $keyCode$$48$$ != $AdfKeyStroke$$.$ARROWUP_KEY$ && $keyCode$$48$$ != $AdfKeyStroke$$.$ARROWDOWN_KEY$ || this.$_moveBThumbByArrow$($deltaY$$17$$), $AdfFocusUtils$$.$focusElement$($targetElement$$31$$);
          }
        }
      ;
    }
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateLuminosityMapBackground$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateLuminosityMapBackground$$() {
    var $color$$7$$ = this.$_currentColor$, $luminosityImgElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityImgId$);
    this.$_sliderBackgroundColor$.$setHsb$($color$$7$$.$_hue$, $color$$7$$.$_saturation$, .5);
    $luminosityImgElement$$.style.backgroundColor = "#" + this.$_sliderBackgroundColor$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateLuminosityMapThumb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateLuminosityMapThumb$$() {
    var $color$$8$$ = this.$_currentColor$;
    $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$).style.top = (1 - $color$$8$$.$_luminosity$) * this.$_SLIDERDIV_ELEMENT_HEIGHT$ - this.$_SLIDERTHUMB_IMG_HEIGHT$ / 2 + "px";
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateHexField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateHexField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_hexFieldId$).value = this.$_currentColor$.$getRgbHex$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateRField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateRField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_rFieldId$).value = this.$_currentColor$.$_red$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateGField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateGField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_gFieldId$).value = this.$_currentColor$.$_green$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_updateBField$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_updateBField$$() {
    $AdfAgent$$.$AGENT$.getElementById(this.$_bFieldId$).value = this.$_currentColor$.$_blue$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHexFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHexFieldChange$$($domEvent$$26$$) {
    var $inputElememt$$4$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hexFieldId$), $parsedValue$$ = $AdfDhtmlChooseColorBasePeer$$.$parseHexColor$($inputElememt$$4$$.value);
    null == $parsedValue$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($domEvent$$26$$), this.$_showHexValidationError$($inputElememt$$4$$.value), $AdfFocusUtils$$.$focusElement$($inputElememt$$4$$), this.$_updateHexField$()) : (this.$_currentColor$.$setRgbByTotal$($parsedValue$$), this.$updateDisplay$());
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_showRGBValidationError$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_showRGBValidationError$$($errorMessage$$2_inputString$$) {
    var $laf$$64$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
    $errorMessage$$2_inputString$$ = TrFastMessageFormatUtils.format($laf$$64$$.$getTranslatedString$("af_chooseColor.MSG_RGB_INVALID"), $errorMessage$$2_inputString$$);
    alert($errorMessage$$2_inputString$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_showHexValidationError$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_showHexValidationError$$($errorMessage$$3_inputString$$1$$) {
    var $laf$$65$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$();
    $errorMessage$$3_inputString$$1$$ = TrFastMessageFormatUtils.format($laf$$65$$.$getTranslatedString$("af_chooseColor.MSG_HEX_INVALID"), $errorMessage$$3_inputString$$1$$);
    alert($errorMessage$$3_inputString$$1$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onRFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onRFieldChange$$($event$$162$$) {
    var $fieldElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_rFieldId$), $parsedValue$$1$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$.value);
    null == $parsedValue$$1$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$162$$), this.$_showRGBValidationError$($fieldElement$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$), this.$_updateRField$()) : (this.$_currentColor$.$setRed$($parsedValue$$1$$), this.$updateDisplay$(this.$_rFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onGFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onGFieldChange$$($event$$163$$) {
    var $fieldElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_gFieldId$), $parsedValue$$2$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$1$$.value);
    null == $parsedValue$$2$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$163$$), this.$_showRGBValidationError$($fieldElement$$1$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$1$$), this.$_updateGField$()) : (this.$_currentColor$.$setGreen$($parsedValue$$2$$), this.$updateDisplay$(this.$_gFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBFieldChange$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBFieldChange$$($event$$164$$) {
    var $fieldElement$$2$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_bFieldId$), $parsedValue$$3$$ = $AdfDhtmlChooseColorBasePeer$$.$parse0To255$($fieldElement$$2$$.value);
    null == $parsedValue$$3$$ ? ($AdfAgent$$.$AGENT$.$eatEvent$($event$$164$$), this.$_showRGBValidationError$($fieldElement$$2$$.value), $AdfFocusUtils$$.$focusElement$($fieldElement$$2$$), this.$_updateBField$()) : (this.$_currentColor$.$setBlue$($parsedValue$$3$$), this.$updateDisplay$(this.$_bFieldId$));
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHueImageMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHueImageMouseDown$$($event$$165$$) {
    this.$_moveCrossHairToMousePosition$($event$$165$$);
    $AdfPage$$.$PAGE$.$startDrag$($event$$165$$, this.$createCallback$(this.$_onHueImageDrag$));
    $AdfAgent$$.$getAgent$().$eatEvent$($event$$165$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBSliderMouseDown$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBSliderMouseDown$$($event$$166$$) {
    this.$_moveBThumbToMousePosition$($event$$166$$);
    $AdfPage$$.$PAGE$.$startDrag$($event$$166$$, this.$createCallback$(this.$_onBThumbDrag$));
    $AdfAgent$$.$getAgent$().$eatEvent$($event$$166$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveCrossHairToMousePosition$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveCrossHairToMousePosition$$($event$$167_hueMapElement$$) {
    var $agent$$245_hue_relativeX$$ = $AdfAgent$$.$getAgent$(), $mousePosition$$4_relativeY$$ = $agent$$245_hue_relativeX$$.$getMousePosition$($event$$167_hueMapElement$$);
    $event$$167_hueMapElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hueSaturationMapId$);
    var $hueSaturationMapHeight_mapElementPosition$$ = $agent$$245_hue_relativeX$$.$getElementPosition$($event$$167_hueMapElement$$), $agent$$245_hue_relativeX$$ = $mousePosition$$4_relativeY$$.x - $hueSaturationMapHeight_mapElementPosition$$.x, $mousePosition$$4_relativeY$$ = $mousePosition$$4_relativeY$$.y - $hueSaturationMapHeight_mapElementPosition$$.y, $hueSaturationMapWidth$$ = this.$_HUESATURATIONMAP_WIDTH$, $hueSaturationMapHeight_mapElementPosition$$ = this.$_HUESATURATIONMAP_HEIGHT$, $agent$$245_hue_relativeX$$ = 
    Math.min($agent$$245_hue_relativeX$$, $hueSaturationMapWidth$$), $agent$$245_hue_relativeX$$ = Math.max(0, $agent$$245_hue_relativeX$$), $mousePosition$$4_relativeY$$ = Math.min($mousePosition$$4_relativeY$$, this.$_HUESATURATIONMAP_HEIGHT$), $mousePosition$$4_relativeY$$ = Math.max(0, $mousePosition$$4_relativeY$$), $crossHairImg$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $newLeft$$2_newTop$$2$$ = $mousePosition$$4_relativeY$$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$;
    0 == $mousePosition$$4_relativeY$$ && $newLeft$$2_newTop$$2$$++;
    $crossHairImg$$1$$.style.top = $newLeft$$2_newTop$$2$$ + "px";
    $newLeft$$2_newTop$$2$$ = $agent$$245_hue_relativeX$$ - this.$_CROSSHAIR_IMG_MID_WIDTH$;
    0 == $agent$$245_hue_relativeX$$ && $newLeft$$2_newTop$$2$$++;
    $crossHairImg$$1$$.style.left = $newLeft$$2_newTop$$2$$ + "px";
    $agent$$245_hue_relativeX$$ = Math.round(360 * $agent$$245_hue_relativeX$$ / $hueSaturationMapWidth$$);
    360 == $agent$$245_hue_relativeX$$ && ($agent$$245_hue_relativeX$$ = 0);
    this.$_currentColor$.$setHsb$($agent$$245_hue_relativeX$$, 1 - $mousePosition$$4_relativeY$$ / $hueSaturationMapHeight_mapElementPosition$$, this.$_currentColor$.$_luminosity$);
    this.$updateDisplay$($event$$167_hueMapElement$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveCrossHairByArrow$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveCrossHairByArrow$$($deltaX$$15$$, $deltaY$$18$$) {
    var $hueMapElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_hueSaturationMapId$), $crossHairImg$$2_hue$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_crossHairImgId$), $centerX$$ = $crossHairImg$$2_hue$$1$$.offsetLeft + this.$_CROSSHAIR_IMG_MID_WIDTH$ + $deltaX$$15$$, $centerY$$ = $crossHairImg$$2_hue$$1$$.offsetTop + this.$_CROSSHAIR_IMG_MID_HEIGHT$ + $deltaY$$18$$, $hueSaturationMapWidth$$1$$ = this.$_HUESATURATIONMAP_WIDTH$, $hueSaturationMapHeight$$1$$ = this.$_HUESATURATIONMAP_HEIGHT$, 
    $centerX$$ = Math.min($centerX$$, $hueSaturationMapWidth$$1$$), $centerX$$ = Math.max(0, $centerX$$), $centerY$$ = Math.min($centerY$$, $hueSaturationMapHeight$$1$$), $centerY$$ = Math.max(0, $centerY$$);
    $crossHairImg$$2_hue$$1$$.style.top = $centerY$$ - this.$_CROSSHAIR_IMG_MID_HEIGHT$ + "px";
    $crossHairImg$$2_hue$$1$$.style.left = $centerX$$ - this.$_CROSSHAIR_IMG_MID_WIDTH$ + "px";
    $crossHairImg$$2_hue$$1$$ = Math.round(360 * $centerX$$ / $hueSaturationMapWidth$$1$$);
    360 == $crossHairImg$$2_hue$$1$$ && ($crossHairImg$$2_hue$$1$$ = 0);
    this.$_currentColor$.$setHsb$($crossHairImg$$2_hue$$1$$, 1 - $centerY$$ / $hueSaturationMapHeight$$1$$, this.$_currentColor$.$_luminosity$);
    this.$updateDisplay$($hueMapElement$$1$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveBThumbToMousePosition$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveBThumbToMousePosition$$($event$$168_sliderElement$$) {
    var $agent$$246_relativeY$$1_sliderElementPosition$$ = $AdfAgent$$.$getAgent$(), $mousePosition$$5_sliderDivElementHeight$$ = $agent$$246_relativeY$$1_sliderElementPosition$$.$getMousePosition$($event$$168_sliderElement$$);
    $event$$168_sliderElement$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityMapId$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = $agent$$246_relativeY$$1_sliderElementPosition$$.$getElementPosition$($event$$168_sliderElement$$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = $mousePosition$$5_sliderDivElementHeight$$.y - $agent$$246_relativeY$$1_sliderElementPosition$$.y;
    $mousePosition$$5_sliderDivElementHeight$$ = this.$_SLIDERDIV_ELEMENT_HEIGHT$;
    $agent$$246_relativeY$$1_sliderElementPosition$$ = Math.min($agent$$246_relativeY$$1_sliderElementPosition$$, $mousePosition$$5_sliderDivElementHeight$$);
    $agent$$246_relativeY$$1_sliderElementPosition$$ = Math.max(0, $agent$$246_relativeY$$1_sliderElementPosition$$);
    $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$).style.top = $agent$$246_relativeY$$1_sliderElementPosition$$ - Math.floor(this.$_SLIDERTHUMB_IMG_HEIGHT$ / 2) + "px";
    this.$_currentColor$.$setHsb$(this.$_currentColor$.$_hue$, this.$_currentColor$.$_saturation$, 1 - $agent$$246_relativeY$$1_sliderElementPosition$$ / $mousePosition$$5_sliderDivElementHeight$$);
    this.$updateDisplay$($event$$168_sliderElement$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_moveBThumbByArrow$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_moveBThumbByArrow$$($deltaY$$19_newTop$$5$$) {
    var $sliderElement$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_luminosityMapId$), $thumbImg$$1$$ = $AdfAgent$$.$AGENT$.getElementById(this.$_sliderThumbId$), $sliderDivElementHeight$$1$$ = this.$_SLIDERDIV_ELEMENT_HEIGHT$, $sliderThumbImgHeight$$2$$ = this.$_SLIDERTHUMB_IMG_HEIGHT$, $relativeY$$2$$ = $thumbImg$$1$$.offsetTop + Math.floor($sliderThumbImgHeight$$2$$ / 2) + $deltaY$$19_newTop$$5$$, $relativeY$$2$$ = Math.min($relativeY$$2$$, $sliderDivElementHeight$$1$$), $relativeY$$2$$ = 
    Math.max(0, $relativeY$$2$$);
    $deltaY$$19_newTop$$5$$ = Math.min($thumbImg$$1$$.offsetTop + $deltaY$$19_newTop$$5$$, $sliderDivElementHeight$$1$$ - Math.floor($sliderThumbImgHeight$$2$$ / 2));
    $deltaY$$19_newTop$$5$$ = Math.max(-Math.floor($sliderThumbImgHeight$$2$$ / 2), $deltaY$$19_newTop$$5$$);
    $thumbImg$$1$$.style.top = $deltaY$$19_newTop$$5$$ + "px";
    this.$_currentColor$.$setHsb$(this.$_currentColor$.$_hue$, this.$_currentColor$.$_saturation$, 1 - $relativeY$$2$$ / $sliderDivElementHeight$$1$$);
    this.$updateDisplay$($sliderElement$$1$$.id);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onBThumbDrag$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onBThumbDrag$$($event$$169$$) {
    this.$_moveBThumbToMousePosition$($event$$169$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.prototype.$_onHueImageDrag$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$$_onHueImageDrag$$($event$$170$$) {
    this.$_moveCrossHairToMousePosition$($event$$170$$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$() {
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.$createInstanceFromRgbTotal$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$createInstanceFromRgbTotal$$($validRGBTotal$$) {
    $AdfAssert$$.$assertNumber$($validRGBTotal$$, "createInstanceFromRgbTotal: input must be number.");
    var $advancedColor$$1$$ = new $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$;
    $advancedColor$$1$$.$setRgbByTotal$($validRGBTotal$$);
    return $advancedColor$$1$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setRgbByTotal$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setRgbByTotal$$($validRGBTotal$$1$$) {
    var $rg$$ = Math.floor($validRGBTotal$$1$$ / 256);
    this.$_red$ = Math.floor($rg$$ / 256);
    this.$_green$ = $rg$$ % 256;
    this.$_blue$ = $validRGBTotal$$1$$ % 256;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setHsb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setHsb$$($hue$$4$$, $saturation$$2$$, $luminosity$$4$$) {
    this.$_hue$ = $hue$$4$$;
    this.$_saturation$ = $saturation$$2$$;
    this.$_luminosity$ = $luminosity$$4$$;
    this.$_populateRgb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setRed$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setRed$$($red$$3$$) {
    this.$_red$ = $red$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setGreen$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setGreen$$($green$$3$$) {
    this.$_green$ = $green$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$setBlue$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$setBlue$$($blue$$3$$) {
    this.$_blue$ = $blue$$3$$;
    this.$_populateHsb$();
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$getRgbHex$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$getRgbHex$$() {
    return this.$_getHex$(this.$_red$) + this.$_getHex$(this.$_green$) + this.$_getHex$(this.$_blue$);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_getHex$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_getHex$$($dec$$) {
    return "0123456789ABCDEF".charAt(Math.floor($dec$$ / 16)) + "0123456789ABCDEF".charAt($dec$$ % 16);
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_populateHsb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_populateHsb$$() {
    var $red$$4$$ = this.$_red$ / 255, $green$$4$$ = this.$_green$ / 255, $blue$$4$$ = this.$_blue$ / 255, $min$$3$$ = Math.min(Math.min($red$$4$$, $green$$4$$), $blue$$4$$), $max$$1$$ = Math.max(Math.max($red$$4$$, $green$$4$$), $blue$$4$$), $delta$$8$$ = $max$$1$$ - $min$$3$$, $hue$$5$$ = null, $saturation$$3$$ = null, $luminosity$$5$$ = ($max$$1$$ + $min$$3$$) / 2;
    0 != $max$$1$$ ? ($saturation$$3$$ = 0 == $delta$$8$$ ? 0 : .5 >= $luminosity$$5$$ ? $delta$$8$$ / ($max$$1$$ + $min$$3$$) : $delta$$8$$ / (2 - $max$$1$$ - $min$$3$$), 0 == $delta$$8$$ ? $hue$$5$$ = 0 : ($hue$$5$$ = 60 * ($red$$4$$ == $max$$1$$ ? ($green$$4$$ - $blue$$4$$) / $delta$$8$$ : $green$$4$$ == $max$$1$$ ? 2 + ($blue$$4$$ - $red$$4$$) / $delta$$8$$ : 4 + ($red$$4$$ - $green$$4$$) / $delta$$8$$), 0 > $hue$$5$$ && ($hue$$5$$ += 360))) : $hue$$5$$ = $saturation$$3$$ = 0;
    this.$_hue$ = $hue$$5$$;
    this.$_saturation$ = $saturation$$3$$;
    this.$_luminosity$ = $luminosity$$5$$;
  };
  $AdfDhtmlChooseColorBasePeer$$.$_CustomPanelHandler$.$_AdvancedColor$.prototype.$_populateRgb$ = function $$AdfDhtmlChooseColorBasePeer$$$$_CustomPanelHandler$$$_AdvancedColor$$$$_populateRgb$$() {
    var $hue$$6$$ = this.$_hue$, $saturation$$4_sectorIndex$$ = this.$_saturation$, $delta$$9_luminosity$$6$$ = this.$_luminosity$, $red$$5$$ = null, $green$$5$$ = null, $blue$$5$$ = null;
    if (0 == $saturation$$4_sectorIndex$$) {
      $red$$5$$ = $green$$5$$ = $blue$$5$$ = $delta$$9_luminosity$$6$$;
    } else {
      var $max$$2$$ = null, $factor$$2_min$$4$$ = null, $mid$$ = null, $factor$$2_min$$4$$ = null, $factor$$2_min$$4$$ = .5 <= $delta$$9_luminosity$$6$$ ? (1 - $delta$$9_luminosity$$6$$) * $saturation$$4_sectorIndex$$ : $delta$$9_luminosity$$6$$ * $saturation$$4_sectorIndex$$, $max$$2$$ = $factor$$2_min$$4$$ + $delta$$9_luminosity$$6$$, $factor$$2_min$$4$$ = $delta$$9_luminosity$$6$$ - $factor$$2_min$$4$$, $saturation$$4_sectorIndex$$ = Math.floor($hue$$6$$ / 60), $delta$$9_luminosity$$6$$ = $max$$2$$ - 
      $factor$$2_min$$4$$;
      switch($saturation$$4_sectorIndex$$) {
        case 0:
        ;
        case 2:
        ;
        case 4:
          $mid$$ = ($hue$$6$$ / 60 - $saturation$$4_sectorIndex$$) * $delta$$9_luminosity$$6$$ + $factor$$2_min$$4$$;
          break;
        case 1:
        ;
        case 3:
        ;
        case 5:
          $mid$$ = ($saturation$$4_sectorIndex$$ + 1 - $hue$$6$$ / 60) * $delta$$9_luminosity$$6$$ + $factor$$2_min$$4$$;
      }
      switch($saturation$$4_sectorIndex$$) {
        case 0:
          $red$$5$$ = $max$$2$$;
          $green$$5$$ = $mid$$;
          $blue$$5$$ = $factor$$2_min$$4$$;
          break;
        case 1:
          $red$$5$$ = $mid$$;
          $green$$5$$ = $max$$2$$;
          $blue$$5$$ = $factor$$2_min$$4$$;
          break;
        case 2:
          $red$$5$$ = $factor$$2_min$$4$$;
          $green$$5$$ = $max$$2$$;
          $blue$$5$$ = $mid$$;
          break;
        case 3:
          $red$$5$$ = $factor$$2_min$$4$$;
          $green$$5$$ = $mid$$;
          $blue$$5$$ = $max$$2$$;
          break;
        case 4:
          $red$$5$$ = $mid$$;
          $green$$5$$ = $factor$$2_min$$4$$;
          $blue$$5$$ = $max$$2$$;
          break;
        case 5:
          $red$$5$$ = $max$$2$$, $green$$5$$ = $factor$$2_min$$4$$, $blue$$5$$ = $mid$$;
      }
    }
    this.$_red$ = Math.round(255 * $red$$5$$);
    this.$_green$ = Math.round(255 * $green$$5$$);
    this.$_blue$ = Math.round(255 * $blue$$5$$);
  };
};
