var $AdfDhtmlChooseNumberSpinwheelPeer$$ = $AdfRichUIPeer$$.$createPeerClass$($AdfRichUIPeer$$, "AdfDhtmlChooseNumberSpinwheelPeer");
$goog$exportSymbol$$("AdfDhtmlChooseNumberSpinwheelPeer", $AdfDhtmlChooseNumberSpinwheelPeer$$);
$AdfDhtmlChooseNumberSpinwheelPeer$$.$InitSubclass$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$InitSubclass$$() {
  this.$_DEFAULT_WHEEL_ITEM_VALUE$ = 0;
  this.$_RENDERED_WHEEL_ITEMS_COUNT$ = 15;
  this.$_VISIBLE_WHEEL_ITEMS_COUNT$ = 5;
  this.$_PAN_DELTA_THRESHOLD$ = 27;
  this.$_WHEEL_DELTA_THRESHOLD$ = 2;
  this.$_MOMENTUM_ROLL_DELAY$ = this.$_PAN_MOMENTUM_FACTOR$ = 80;
  this.$_KEYBOARD_TYPE_DELAY$ = 2E3;
  this.$_WHEEL_ITEM_POSITION_PREFIX_CLASS$ = "AFWheelItemPos";
  $AdfRichUIPeer$$.$addComponentPropertyChanges$(this, AdfRichChooseNumberSpinwheel.VALUE);
  $AdfRichUIPeer$$.$addComponentPropertyGetters$(this, AdfRichChooseNumberSpinwheel.VALUE);
  $AdfRichUIPeer$$.$addComponentEventHandlers$(this, $AdfUIInputEvent$$.$BLUR_EVENT_TYPE$, $AdfUIInputEvent$$.$FOCUS_EVENT_TYPE$, $AdfUIInputEvent$$.$CLICK_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_DOWN_EVENT_TYPE$, $AdfUIInputEvent$$.$KEY_PRESS_EVENT_TYPE$);
  $AdfObject$$.$ensureClassInitialization$($AdfSwipeSupport$$);
};
$goog$exportSymbol$$("AdfDhtmlChooseNumberSpinwheelPeer.InitSubclass", $AdfDhtmlChooseNumberSpinwheelPeer$$.$InitSubclass$);
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$InitDomElement$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$InitDomElement$$($component$$866$$, $rootElement$$34$$) {
  $AdfDhtmlChooseNumberSpinwheelPeer$$.$superclass$.$InitDomElement$.call(this, $component$$866$$, $rootElement$$34$$);
  this.$BindToComponent$($component$$866$$, $rootElement$$34$$);
  $AdfDhtmlChooseNumberSpinwheelPeer$$.$_adjustProps$($component$$866$$);
  $AdfAssert$$.assert("DIV" == $rootElement$$34$$.nodeName);
  $AdfDhtmlChooseNumberSpinwheelPeer$$.$_renderAllRootAttributes$($component$$866$$, $rootElement$$34$$);
  var $priorItemValue$$inline_5788_value$$inline_5774$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getDefaultableValue$($component$$866$$), $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$ = $component$$866$$.getStepSize(), $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ = $component$$866$$.getMinimum(), $maxValue$$inline_5777_options$$inline_1704$$ = $component$$866$$.getMaximum(), $wheelItemCount$$inline_5778_wheelItemCountHalf$$inline_5790$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemCountToRender$($callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$, 
  $maxValue$$inline_5777_options$$inline_1704$$, $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$);
  if ($wheelItemCount$$inline_5778_wheelItemCountHalf$$inline_5790$$ <= $AdfDhtmlChooseNumberSpinwheelPeer$$.$_VISIBLE_WHEEL_ITEMS_COUNT$) {
    var $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ = this.$getComponent$();
    $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$.$_isArc$ = !0;
    $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$ = document.createDocumentFragment();
    for ($component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ = $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$.getStepSize();$callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ <= $maxValue$$inline_5777_options$$inline_1704$$;$callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ += $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$) {
      var $pos$$inline_5783_stepSize$$inline_5786$$ = $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ - $priorItemValue$$inline_5788_value$$inline_5774$$;
      $JSCompiler_StaticMethods__encodeItem$$(this, $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$() + $pos$$inline_5783_stepSize$$inline_5786$$, $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$);
    }
  } else {
    $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$ = document.createDocumentFragment();
    $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$();
    $JSCompiler_StaticMethods__encodeItem$$(this, $priorItemValue$$inline_5788_value$$inline_5774$$, $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ + "0", $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$);
    for (var $pos$$inline_5783_stepSize$$inline_5786$$ = this.$getComponent$().getStepSize(), $subsequentItemValue$$inline_5787$$ = $priorItemValue$$inline_5788_value$$inline_5774$$, $i$$inline_5789$$ = 1, $wheelItemCount$$inline_5778_wheelItemCountHalf$$inline_5790$$ = $wheelItemCount$$inline_5778_wheelItemCountHalf$$inline_5790$$ / 2;$i$$inline_5789$$ <= $wheelItemCount$$inline_5778_wheelItemCountHalf$$inline_5790$$;$i$$inline_5789$$++) {
      $subsequentItemValue$$inline_5787$$ += $pos$$inline_5783_stepSize$$inline_5786$$, $subsequentItemValue$$inline_5787$$ > $maxValue$$inline_5777_options$$inline_1704$$ && ($subsequentItemValue$$inline_5787$$ = $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$), $JSCompiler_StaticMethods__encodeItem$$(this, $subsequentItemValue$$inline_5787$$, $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ + $i$$inline_5789$$, $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$), 
      $priorItemValue$$inline_5788_value$$inline_5774$$ -= $pos$$inline_5783_stepSize$$inline_5786$$, $priorItemValue$$inline_5788_value$$inline_5774$$ < $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ && ($priorItemValue$$inline_5788_value$$inline_5774$$ = $maxValue$$inline_5777_options$$inline_1704$$), $JSCompiler_StaticMethods__encodeItem$$(this, $priorItemValue$$inline_5788_value$$inline_5774$$, $component$$inline_5779_stepSize$$inline_5781_wheelItemStyleClasses$$inline_5785$$ + 
      -$i$$inline_5789$$, $stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$, !0);
    }
  }
  this.$getDomElement$().appendChild($stepSize$$inline_5775_wheelBox$$inline_5780_wheelBox$$inline_5784$$);
  $component$$866$$.$__setIsRendered$(!0);
  $maxValue$$inline_5777_options$$inline_1704$$ = {};
  $maxValue$$inline_5777_options$$inline_1704$$[$AdfSwipeSupport$$.MODE] = $AdfSwipeSupport$$.$MODE_VERTICAL$;
  $maxValue$$inline_5777_options$$inline_1704$$[$AdfSwipeSupport$$.$SUPPORT_MOUSE$] = !0;
  $maxValue$$inline_5777_options$$inline_1704$$[$AdfSwipeSupport$$.$CALLBACK_PARAM$] = $component$$866$$;
  $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$ = {};
  $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$[$AdfSwipeSupport$$.$PANNING_CALLBACK$] = this.$createCallback$(this.$_handlePanning$);
  $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$[$AdfSwipeSupport$$.$PANEND_CALLBACK$] = this.$createCallback$(this.$_handlePanEnd$);
  $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$[$AdfSwipeSupport$$.$SWIPE_CALLBACK$] = this.$createCallback$(this.$_handleSwipe$);
  $component$$866$$.$_swipeHandler$ = new $AdfSwipeSupport$$($rootElement$$34$$, $callbacks$$inline_1705_i$$inline_5782_minValue$$inline_5776$$, $maxValue$$inline_5777_options$$inline_1704$$);
  $component$$866$$.$_mouseWheelHandle$ = this.$createCallback$(this.$_handleMouseWheel$);
  $rootElement$$34$$.addEventListener("wheel", $component$$866$$.$_mouseWheelHandle$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.InitDomElement", {$InitDomElement$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$InitDomElement$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$ComponentRemoved$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$ComponentRemoved$$($component$$867$$) {
  this.bind($component$$867$$);
  $component$$867$$.$_swipeHandler$.release();
  this.$getDomElement$().removeEventListener("wheel", $component$$867$$.$_mouseWheelHandle$);
  $AdfDhtmlChooseNumberSpinwheelPeer$$.$superclass$.$ComponentRemoved$.call(this, $component$$867$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.ComponentRemoved", {$ComponentRemoved$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$ComponentRemoved$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_adjustProps$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_adjustProps$$($component$$868$$) {
  var $itemLabels$$ = $component$$868$$.$getItemLabels$();
  0 !== $itemLabels$$.length && ($component$$868$$.setMaximum($itemLabels$$.length - 1), $component$$868$$.setMinimum(0), $component$$868$$.$setStepSize$(1));
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_getDefaultableValue$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_getDefaultableValue$$($component$$869$$) {
  var $value$$176$$ = $component$$869$$.getValue();
  return isNaN($value$$176$$) ? $AdfDhtmlChooseNumberSpinwheelPeer$$.$_DEFAULT_WHEEL_ITEM_VALUE$ >= $component$$869$$.getMinimum() && $AdfDhtmlChooseNumberSpinwheelPeer$$.$_DEFAULT_WHEEL_ITEM_VALUE$ <= $component$$869$$.getMaximum() ? $AdfDhtmlChooseNumberSpinwheelPeer$$.$_DEFAULT_WHEEL_ITEM_VALUE$ : $component$$869$$.getMinimum() : $value$$176$$;
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$ComponentValueChanged$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$ComponentValueChanged$$($component$$870$$, $domElement$$113_itemLabels$$1_posInDom$$, $newValue$$49$$) {
  $AdfAssert$$.$assertNumber$($newValue$$49$$);
  $domElement$$113_itemLabels$$1_posInDom$$ = $component$$870$$.$getItemLabels$();
  $domElement$$113_itemLabels$$1_posInDom$$ = $JSCompiler_StaticMethods__isItemInDom$$(this, $domElement$$113_itemLabels$$1_posInDom$$[$newValue$$49$$], !1);
  void 0 !== $domElement$$113_itemLabels$$1_posInDom$$ ? $JSCompiler_StaticMethods__rollToPos$$(this, $domElement$$113_itemLabels$$1_posInDom$$) : $JSCompiler_StaticMethods__rollToValue$$(this, $component$$870$$, $newValue$$49$$);
  return !1;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.ComponentValueChanged", {$ComponentValueChanged$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$ComponentValueChanged$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$GetComponentValue$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$GetComponentValue$$($component$$871$$, $domElement$$114$$) {
  var $textValue$$ = $domElement$$114$$.getAttribute("aria-valuenow");
  return parseInt($textValue$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.GetComponentValue", {$GetComponentValue$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$GetComponentValue$});
function $JSCompiler_StaticMethods__encodeItem$$($JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$, $isNegative$$inline_1732_itemValue$$2$$, $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$, $wheelBox$$2$$, $isPriorItem$$) {
  var $spinwheelItem$$ = document.createElement("div");
  $spinwheelItem$$.setAttribute("class", $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$);
  $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ = $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$.$getComponent$().$getItemLabels$();
  if (0 !== $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$.length) {
    $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$ = $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$[$isNegative$$inline_1732_itemValue$$2$$];
  } else {
    $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ = $isNegative$$inline_1732_itemValue$$2$$;
    ($isNegative$$inline_1732_itemValue$$2$$ = 0 > $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$) && ($itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ = Math.abs($itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$));
    $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ += "";
    for ($JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$ = $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$.$getComponent$().$getDigits$();$itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$.length < $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$;) {
      $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ = "0" + $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$;
    }
    $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$ = $isNegative$$inline_1732_itemValue$$2$$ ? "-" + $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$ : $itemLabels$$2_num$$inline_1731_s$$inline_1733_styleClass$$4$$;
  }
  $spinwheelItem$$.textContent = $JSCompiler_StaticMethods__encodeItem$self_JSCompiler_temp$$96_size$$inline_1734$$;
  $isPriorItem$$ ? $wheelBox$$2$$.insertBefore($spinwheelItem$$, $wheelBox$$2$$.firstChild) : $wheelBox$$2$$.appendChild($spinwheelItem$$);
}
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_renderAllRootAttributes$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_renderAllRootAttributes$$($component$$875$$, $rootElement$$36$$) {
  $rootElement$$36$$.setAttribute("role", "spinbutton");
  $rootElement$$36$$.setAttribute("aria-valuemin", $component$$875$$.getMinimum());
  $rootElement$$36$$.setAttribute("aria-valuemax", $component$$875$$.getMaximum());
  var $label$$17_rootStyleClass_value$$180$$ = $component$$875$$.getLabel();
  null != $label$$17_rootStyleClass_value$$180$$ && $rootElement$$36$$.setAttribute("aria-label", $label$$17_rootStyleClass_value$$180$$);
  $label$$17_rootStyleClass_value$$180$$ = $component$$875$$.getValue();
  if (!isNaN($label$$17_rootStyleClass_value$$180$$)) {
    $rootElement$$36$$.setAttribute("aria-valuenow", $label$$17_rootStyleClass_value$$180$$);
    var $itemLabels$$3$$ = $component$$875$$.$getItemLabels$();
    0 !== $itemLabels$$3$$.length && $rootElement$$36$$.setAttribute("aria-valuetext", $itemLabels$$3$$[$label$$17_rootStyleClass_value$$180$$]);
  }
  $rootElement$$36$$.setAttribute("tabindex", "0");
  $label$$17_rootStyleClass_value$$180$$ = $AdfPage$$.$PAGE$.$getLookAndFeel$().getStyleClass("af|chooseNumberSpinwheel");
  $AdfDomUtils$$.$addCSSClassName$($rootElement$$36$$, $label$$17_rootStyleClass_value$$180$$);
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemCountToRender$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_getWheelItemCountToRender$$($minValue$$4_totalNumbers$$, $maxValue$$4$$, $stepSize$$3$$) {
  $minValue$$4_totalNumbers$$ = ($maxValue$$4$$ - $minValue$$4_totalNumbers$$) / $stepSize$$3$$;
  if (0 > $minValue$$4_totalNumbers$$) {
    if (isNaN(component.getValue())) {
      throw "Combination of maximum, minimum and stepSize is invalid for component: " + component.$getClientId$();
    }
    $minValue$$4_totalNumbers$$ = 1;
  }
  return $AdfDhtmlChooseNumberSpinwheelPeer$$.$_RENDERED_WHEEL_ITEMS_COUNT$ > $minValue$$4_totalNumbers$$ ? $minValue$$4_totalNumbers$$ : $AdfDhtmlChooseNumberSpinwheelPeer$$.$_RENDERED_WHEEL_ITEMS_COUNT$;
};
$JSCompiler_prototypeAlias$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.prototype;
$JSCompiler_prototypeAlias$$.$_handleMouseWheel$ = function $$JSCompiler_prototypeAlias$$$$_handleMouseWheel$$($delta$$10_event$$180$$) {
  $AdfAgent$$.$AGENT$.preventDefault($delta$$10_event$$180$$);
  var $component$$877_rootElement$$38$$ = $delta$$10_event$$180$$.target;
  "spinbutton" !== $component$$877_rootElement$$38$$.getAttribute("role") && ($component$$877_rootElement$$38$$ = $component$$877_rootElement$$38$$.parentElement);
  "spinbutton" === $component$$877_rootElement$$38$$.getAttribute("role") && ($AdfFocusUtils$$.$focusElement$($component$$877_rootElement$$38$$), $component$$877_rootElement$$38$$ = $AdfPage$$.$PAGE$.$findComponent$($component$$877_rootElement$$38$$.id), this.bind($component$$877_rootElement$$38$$), $delta$$10_event$$180$$ = $delta$$10_event$$180$$.deltaY, $delta$$10_event$$180$$ > $AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_DELTA_THRESHOLD$ ? this.$_rollDown$($component$$877_rootElement$$38$$) : 
  $delta$$10_event$$180$$ < -$AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_DELTA_THRESHOLD$ && this.$_rollUp$($component$$877_rootElement$$38$$));
};
$JSCompiler_prototypeAlias$$.$_handlePanning$ = function $$JSCompiler_prototypeAlias$$$$_handlePanning$$($event$$181$$, $component$$878$$) {
  this.bind($component$$878$$);
  this.$_isPanning$ || ($AdfFocusUtils$$.$focusElement$(this.$getDomElement$()), this.$_isPanning$ = !0, this.$_delta$ = 0);
  var $delta$$11$$ = this.$_delta$ - $event$$181$$.deltaY;
  $delta$$11$$ > $AdfDhtmlChooseNumberSpinwheelPeer$$.$_PAN_DELTA_THRESHOLD$ ? (this.$_delta$ = $event$$181$$.deltaY, this.$_rollUp$($component$$878$$)) : $delta$$11$$ < -$AdfDhtmlChooseNumberSpinwheelPeer$$.$_PAN_DELTA_THRESHOLD$ && (this.$_delta$ = $event$$181$$.deltaY, this.$_rollDown$($component$$878$$));
};
$JSCompiler_prototypeAlias$$.$_handlePanEnd$ = function $$JSCompiler_prototypeAlias$$$$_handlePanEnd$$() {
  this.$_isPanning$ = null;
};
$JSCompiler_prototypeAlias$$.$_handleSwipe$ = function $$JSCompiler_prototypeAlias$$$$_handleSwipe$$($event$$183$$, $component$$880$$) {
  this.$_isPanning$ = null;
  this.bind($component$$880$$);
  for (var $numberOfRolls$$ = Math.floor($event$$183$$.$velocity$ * this.$getDomElement$().offsetHeight / $AdfDhtmlChooseNumberSpinwheelPeer$$.$_PAN_MOMENTUM_FACTOR$), $rollFunc$$ = 0 < $event$$183$$.deltaY ? this.$_rollDown$ : this.$_rollUp$, $page$$98$$ = $AdfPage$$.$PAGE$, $i$$284$$ = 0;$i$$284$$ < $numberOfRolls$$;$i$$284$$++) {
    $page$$98$$.$scheduleTimer$(this, $rollFunc$$, $component$$880$$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_MOMENTUM_ROLL_DELAY$ * $i$$284$$, {isSynchronized:!0});
  }
};
$JSCompiler_prototypeAlias$$.$_rollDown$ = function $$JSCompiler_prototypeAlias$$$$_rollDown$$($component$$881$$) {
  this.bind($component$$881$$);
  var $rootElement$$39$$ = this.$getDomElement$(), $lastSpinItem_priorItemValue$$1$$ = $rootElement$$39$$.lastElementChild;
  if ($lastSpinItem_priorItemValue$$1$$) {
    var $pos$$21$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getPos$($lastSpinItem_priorItemValue$$1$$), $minValue$$5_prevItem$$ = $lastSpinItem_priorItemValue$$1$$;
    if ($component$$881$$.$_isArc$) {
      if (0 == $pos$$21$$ + 1 - $rootElement$$39$$.childElementCount) {
        return;
      }
      $pos$$21$$++;
    } else {
      $minValue$$5_prevItem$$ = $lastSpinItem_priorItemValue$$1$$.previousElementSibling, $rootElement$$39$$.removeChild($lastSpinItem_priorItemValue$$1$$);
    }
    for (;$minValue$$5_prevItem$$;) {
      $minValue$$5_prevItem$$.setAttribute("class", $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$() + $pos$$21$$), 0 === $pos$$21$$ && $JSCompiler_StaticMethods__updateAriaAttributes$$(this, $minValue$$5_prevItem$$), $pos$$21$$--, $minValue$$5_prevItem$$ = $minValue$$5_prevItem$$.previousElementSibling;
    }
    $component$$881$$.$_isArc$ || ($lastSpinItem_priorItemValue$$1$$ = parseInt($rootElement$$39$$.firstElementChild.textContent) - $component$$881$$.getStepSize(), $minValue$$5_prevItem$$ = $component$$881$$.getMinimum(), $lastSpinItem_priorItemValue$$1$$ = $lastSpinItem_priorItemValue$$1$$ < $minValue$$5_prevItem$$ ? $component$$881$$.getMaximum() + 1 - ($minValue$$5_prevItem$$ - $lastSpinItem_priorItemValue$$1$$) : $lastSpinItem_priorItemValue$$1$$, $JSCompiler_StaticMethods__encodeItem$$(this, 
    $lastSpinItem_priorItemValue$$1$$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$() + $pos$$21$$, $rootElement$$39$$, !0));
  }
};
$JSCompiler_prototypeAlias$$.$_rollUp$ = function $$JSCompiler_prototypeAlias$$$$_rollUp$$($component$$882$$) {
  this.bind($component$$882$$);
  var $rootElement$$40$$ = this.$getDomElement$(), $firstSpinItem_subsequentItemValue$$1$$ = $rootElement$$40$$.firstElementChild;
  if ($firstSpinItem_subsequentItemValue$$1$$) {
    var $pos$$22$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getPos$($firstSpinItem_subsequentItemValue$$1$$), $maxValue$$5_nextItem$$1$$ = $firstSpinItem_subsequentItemValue$$1$$;
    if ($component$$882$$.$_isArc$) {
      if (0 == $pos$$22$$ - 1 + $rootElement$$40$$.childElementCount) {
        return;
      }
      $pos$$22$$--;
    } else {
      $maxValue$$5_nextItem$$1$$ = $firstSpinItem_subsequentItemValue$$1$$.nextElementSibling, $rootElement$$40$$.removeChild($firstSpinItem_subsequentItemValue$$1$$);
    }
    for (;$maxValue$$5_nextItem$$1$$;) {
      $maxValue$$5_nextItem$$1$$.setAttribute("class", $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$() + $pos$$22$$), 0 === $pos$$22$$ && $JSCompiler_StaticMethods__updateAriaAttributes$$(this, $maxValue$$5_nextItem$$1$$), $pos$$22$$++, $maxValue$$5_nextItem$$1$$ = $maxValue$$5_nextItem$$1$$.nextElementSibling;
    }
    $component$$882$$.$_isArc$ || ($firstSpinItem_subsequentItemValue$$1$$ = parseInt($rootElement$$40$$.lastElementChild.textContent) + $component$$882$$.getStepSize(), $maxValue$$5_nextItem$$1$$ = $component$$882$$.getMaximum(), $firstSpinItem_subsequentItemValue$$1$$ = $firstSpinItem_subsequentItemValue$$1$$ > $maxValue$$5_nextItem$$1$$ ? $component$$882$$.getMinimum() - 1 + ($firstSpinItem_subsequentItemValue$$1$$ - $maxValue$$5_nextItem$$1$$) : $firstSpinItem_subsequentItemValue$$1$$, $JSCompiler_StaticMethods__encodeItem$$(this, 
    $firstSpinItem_subsequentItemValue$$1$$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$() + $pos$$22$$, $rootElement$$40$$));
  }
};
function $JSCompiler_StaticMethods__updateAriaAttributes$$($JSCompiler_StaticMethods__updateAriaAttributes$self$$, $centerElement$$) {
  var $rootElement$$41$$ = $JSCompiler_StaticMethods__updateAriaAttributes$self$$.$getDomElement$(), $textContent$$2$$ = $centerElement$$.textContent, $intValue$$ = parseInt($textContent$$2$$);
  isNaN($intValue$$) ? ($rootElement$$41$$.setAttribute("aria-valuetext", $textContent$$2$$), $rootElement$$41$$.setAttribute("aria-valuenow", $JSCompiler_StaticMethods__updateAriaAttributes$self$$.$getComponent$().$getItemLabels$().indexOf($textContent$$2$$))) : $rootElement$$41$$.setAttribute("aria-valuenow", $intValue$$);
}
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_getPos$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_getPos$$($element$$224_styleClass$$5$$) {
  $element$$224_styleClass$$5$$ = $element$$224_styleClass$$5$$.getAttribute("class");
  return parseInt($element$$224_styleClass$$5$$.slice($element$$224_styleClass$$5$$.indexOf($AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_POSITION_PREFIX_CLASS$) + $AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_POSITION_PREFIX_CLASS$.length));
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentFocus$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$HandleComponentFocus$$() {
  var $component$$883$$ = this.$getComponent$();
  $component$$883$$.$_lastValue$ = $component$$883$$.getValue();
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.HandleComponentFocus", {$HandleComponentFocus$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentFocus$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentBlur$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$HandleComponentBlur$$() {
  var $component$$884$$ = this.$getComponent$(), $value$$181$$ = $component$$884$$.getValue();
  $value$$181$$ !== $component$$884$$.$_lastValue$ && $AdfValueChangeEvent$$.$queue$($component$$884$$, $component$$884$$.$_lastValue$, $value$$181$$, !1);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.HandleComponentBlur", {$HandleComponentBlur$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentBlur$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentClick$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$HandleComponentClick$$($componentEvent$$144_pos$$23_target$$120$$) {
  $componentEvent$$144_pos$$23_target$$120$$ = $componentEvent$$144_pos$$23_target$$120$$.$getNativeEventTarget$();
  $componentEvent$$144_pos$$23_target$$120$$ = $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getPos$($componentEvent$$144_pos$$23_target$$120$$);
  isNaN($componentEvent$$144_pos$$23_target$$120$$) || $JSCompiler_StaticMethods__rollToPos$$(this, $componentEvent$$144_pos$$23_target$$120$$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.HandleComponentClick", {$HandleComponentClick$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentClick$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentKeyDown$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$HandleComponentKeyDown$$($componentEvent$$145$$) {
  var $component$$885$$ = this.$getComponent$(), $keyCode$$49$$ = $componentEvent$$145$$.$getKeyCode$();
  $keyCode$$49$$ === $AdfKeyStroke$$.$ARROWDOWN_KEY$ ? ($componentEvent$$145$$.cancel(), this.$_rollDown$($component$$885$$)) : $keyCode$$49$$ === $AdfKeyStroke$$.$ARROWUP_KEY$ ? ($componentEvent$$145$$.cancel(), this.$_rollUp$($component$$885$$)) : $keyCode$$49$$ === $AdfKeyStroke$$.$BACKSPACE_KEY$ && void 0 !== $component$$885$$.$_keyboardValue$ && ($component$$885$$.$_keyboardValue$ = $component$$885$$.$_keyboardValue$.slice(0, -1), this.$getDomElement$().setAttribute("title", $component$$885$$.$_keyboardValue$));
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.HandleComponentKeyDown", {$HandleComponentKeyDown$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentKeyDown$});
$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentKeyPress$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$$HandleComponentKeyPress$$($componentEvent$$146_keyboardValue$$inline_1738_page$$99$$) {
  var $component$$886$$ = this.$getComponent$();
  void 0 === $component$$886$$.$_keyboardValue$ && ($component$$886$$.$_keyboardValue$ = "");
  $component$$886$$.$_keyboardValue$ += $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$.$getNativeEvent$().key;
  $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$ = $component$$886$$.$_keyboardValue$;
  var $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$;
  a: {
    if ($JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = $component$$886$$.$getItemLabels$(), 0 === $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$.length) {
      $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = !1;
    } else {
      var $i$$inline_5797_posInDom$$inline_5796$$ = $JSCompiler_StaticMethods__isItemInDom$$(this, $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$, !0);
      if (void 0 !== $i$$inline_5797_posInDom$$inline_5796$$) {
        $JSCompiler_StaticMethods__rollToPos$$(this, $i$$inline_5797_posInDom$$inline_5796$$), $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = !0;
      } else {
        for (var $i$$inline_5797_posInDom$$inline_5796$$ = 0, $len$$inline_5798$$ = $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$.length;$i$$inline_5797_posInDom$$inline_5796$$ < $len$$inline_5798$$;$i$$inline_5797_posInDom$$inline_5796$$++) {
          if ($AdfDhtmlChooseNumberSpinwheelPeer$$.$_matcher$($JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$[$i$$inline_5797_posInDom$$inline_5796$$], $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$, !0)) {
            $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = $component$$886$$.getValue();
            $JSCompiler_StaticMethods__rollToPos$$(this, $i$$inline_5797_posInDom$$inline_5796$$ - $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$);
            $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = !0;
            break a;
          }
        }
        $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ = void 0;
      }
    }
  }
  $JSCompiler_inline_result$$5486_itemLabels$$inline_5794_value$$inline_5799$$ || $JSCompiler_StaticMethods__rollToValue$$(this, $component$$886$$, $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$);
  this.$getDomElement$().setAttribute("title", $component$$886$$.$_keyboardValue$);
  $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$ = $AdfPage$$.$PAGE$;
  $component$$886$$.$_keyboardTimer$ ? $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$.$rescheduleTimer$($component$$886$$.$_keyboardTimer$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_KEYBOARD_TYPE_DELAY$) : $component$$886$$.$_keyboardTimer$ = $componentEvent$$146_keyboardValue$$inline_1738_page$$99$$.$scheduleTimer$(null, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_clearKeyboardValue$, $component$$886$$, $AdfDhtmlChooseNumberSpinwheelPeer$$.$_KEYBOARD_TYPE_DELAY$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfDhtmlChooseNumberSpinwheelPeer.prototype.HandleComponentKeyPress", {$HandleComponentKeyPress$:$AdfDhtmlChooseNumberSpinwheelPeer$$.prototype.$HandleComponentKeyPress$});
function $JSCompiler_StaticMethods__rollToValue$$($JSCompiler_StaticMethods__rollToValue$self$$, $component$$889_min$$5$$, $newValue$$50$$) {
  $newValue$$50$$ = parseInt($newValue$$50$$);
  if (!isNaN($newValue$$50$$)) {
    var $posInDom$$2_value$$183$$ = $JSCompiler_StaticMethods__isItemInDom$$($JSCompiler_StaticMethods__rollToValue$self$$, $newValue$$50$$, !1);
    if (void 0 !== $posInDom$$2_value$$183$$) {
      $JSCompiler_StaticMethods__rollToPos$$($JSCompiler_StaticMethods__rollToValue$self$$, $posInDom$$2_value$$183$$);
    } else {
      for (var $posInDom$$2_value$$183$$ = $component$$889_min$$5$$.getValue(), $stepSize$$4$$ = $component$$889_min$$5$$.getStepSize(), $i$$286$$ = $posInDom$$2_value$$183$$, $max$$3$$ = $component$$889_min$$5$$.getMaximum();$i$$286$$ <= $max$$3$$;$i$$286$$ += $stepSize$$4$$) {
        if ($i$$286$$ === $newValue$$50$$) {
          $JSCompiler_StaticMethods__rollToPos$$($JSCompiler_StaticMethods__rollToValue$self$$, ($i$$286$$ - $posInDom$$2_value$$183$$) / $stepSize$$4$$);
          return;
        }
      }
      $i$$286$$ = $posInDom$$2_value$$183$$;
      for ($component$$889_min$$5$$ = $component$$889_min$$5$$.getMinimum();$i$$286$$ >= $component$$889_min$$5$$;$i$$286$$ -= $stepSize$$4$$) {
        if ($i$$286$$ === $newValue$$50$$) {
          $JSCompiler_StaticMethods__rollToPos$$($JSCompiler_StaticMethods__rollToValue$self$$, ($i$$286$$ - $posInDom$$2_value$$183$$) / $stepSize$$4$$);
          break;
        }
      }
    }
  }
}
function $JSCompiler_StaticMethods__rollToPos$$($JSCompiler_StaticMethods__rollToPos$self$$, $pos$$24$$) {
  var $component$$890$$ = $JSCompiler_StaticMethods__rollToPos$self$$.$getComponent$(), $rollFunc$$1$$ = 0 > $pos$$24$$ ? $JSCompiler_StaticMethods__rollToPos$self$$.$_rollDown$ : $JSCompiler_StaticMethods__rollToPos$self$$.$_rollUp$;
  $pos$$24$$ = Math.abs($pos$$24$$);
  i = 0;
  for ($pos$$24$$ = Math.abs($pos$$24$$);i < $pos$$24$$;i++) {
    $rollFunc$$1$$.call($JSCompiler_StaticMethods__rollToPos$self$$, $component$$890$$);
  }
}
function $JSCompiler_StaticMethods__isItemInDom$$($JSCompiler_StaticMethods__isItemInDom$self_spinItem$$, $matchText$$, $isStartsWith$$) {
  for ($JSCompiler_StaticMethods__isItemInDom$self_spinItem$$ = $JSCompiler_StaticMethods__isItemInDom$self_spinItem$$.$getDomElement$().firstElementChild;$JSCompiler_StaticMethods__isItemInDom$self_spinItem$$;) {
    if ($AdfDhtmlChooseNumberSpinwheelPeer$$.$_matcher$($JSCompiler_StaticMethods__isItemInDom$self_spinItem$$.textContent, $matchText$$, $isStartsWith$$)) {
      return $AdfDhtmlChooseNumberSpinwheelPeer$$.$_getPos$($JSCompiler_StaticMethods__isItemInDom$self_spinItem$$);
    }
    $JSCompiler_StaticMethods__isItemInDom$self_spinItem$$ = $JSCompiler_StaticMethods__isItemInDom$self_spinItem$$.nextElementSibling;
  }
}
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_getWheelItemStyleClasses$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_getWheelItemStyleClasses$$() {
  $AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_STYLE_CLASSES$ || ($AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_STYLE_CLASSES$ = $AdfPage$$.$PAGE$.$getLookAndFeel$().getStyleClass("af|chooseNumberSpinwheel::item") + " " + $AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_POSITION_PREFIX_CLASS$);
  return $AdfDhtmlChooseNumberSpinwheelPeer$$.$_WHEEL_ITEM_STYLE_CLASSES$;
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_matcher$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_matcher$$($itemValue$$3$$, $matchText$$1$$, $isStartsWith$$1$$) {
  return $isStartsWith$$1$$ ? 0 === $itemValue$$3$$.toLowerCase().indexOf($matchText$$1$$.toLowerCase()) : $itemValue$$3$$ == $matchText$$1$$;
};
$AdfDhtmlChooseNumberSpinwheelPeer$$.$_clearKeyboardValue$ = function $$AdfDhtmlChooseNumberSpinwheelPeer$$$$_clearKeyboardValue$$($component$$891$$) {
  delete $component$$891$$.$_keyboardTimer$;
  delete $component$$891$$.$_keyboardValue$;
  $AdfRichUIPeer$$.$getDomElementForComponent$($component$$891$$).removeAttribute("title");
};
