function $AdfRepositionable$$($floatingElement$$11$$, $handle$$) {
  this.Init($floatingElement$$11$$, $handle$$)
}
$goog$exportSymbol$$("AdfRepositionable", $AdfRepositionable$$);
$AdfObject$$.$createSubclass$($AdfRepositionable$$);
$AdfRepositionable$$.$InitClass$ = function $$AdfRepositionable$$$$InitClass$$() {
  var $prototype$$ = this.prototype;
  $prototype$$.$NORMAL$ = 0;
  $prototype$$.$START_DRAGGING$ = 1;
  $prototype$$.$DRAGGING$ = 2
};
$goog$exportSymbol$$("AdfRepositionable.InitClass", $AdfRepositionable$$.$InitClass$);
$AdfRepositionable$$.prototype.Init = function $$AdfRepositionable$$$$Init$($floatingElement$$12$$, $handle$$1$$) {
  $AdfRepositionable$$.$superclass$.Init.call(this);
  this.$_floatingElement$ = $floatingElement$$12$$;
  this.$_handle$ = $handle$$1$$;
  var $agent$$100$$ = $AdfAgent$$.$AGENT$;
  this.$_mousedownStub$ = this.$createCallback$(this.$_mouseDownHandler$);
  this.$_mousemoveStub$ = this.$createCallback$(this.$_mouseMoveHandler$);
  this.$_mouseupStub$ = this.$createCallback$(this.$_stopDragging$);
  $agent$$100$$.$getCapabilities$();
  $agent$$100$$.$addBubbleEventListener$(this.$_handle$, "touchstart", this.$_mousedownStub$);
  $agent$$100$$.$addBubbleEventListener$(this.$_handle$, "mousedown", this.$_mousedownStub$);
  $agent$$100$$.$disableUserSelect$($handle$$1$$);
  this.$_mouseStartY$ = this.$_mouseStartX$ = this.$_originalLeftPosition$ = this.$_originalTopPosition$ = $JSCompiler_alias_NULL$$;
  this.$_state$ = this.$NORMAL$
};
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.Init", {Init:$AdfRepositionable$$.prototype.Init});
$AdfRepositionable$$.prototype.$destroy$ = function $$AdfRepositionable$$$$$destroy$$() {
  var $agent$$101$$ = $AdfAgent$$.$AGENT$;
  $agent$$101$$.$removeBubbleEventListener$(this.$_handle$, "touchstart", this.$_mousedownStub$);
  $agent$$101$$.$removeBubbleEventListener$(this.$_handle$, "mousedown", this.$_mousedownStub$);
  this.$_state$ != this.$NORMAL$ && $AdfPage$$.$PAGE$.$stopDrag$()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.destroy", {$destroy$:$AdfRepositionable$$.prototype.$destroy$});
$AdfRepositionable$$.prototype.$getElement$ = function $$AdfRepositionable$$$$$getElement$$() {
  return this.$_floatingElement$.$getElement$()
};
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.getElement", {$getElement$:$AdfRepositionable$$.prototype.$getElement$});
$JSCompiler_prototypeAlias$$ = $AdfRepositionable$$.prototype;
$JSCompiler_prototypeAlias$$.$_mouseDownHandler$ = function $$JSCompiler_prototypeAlias$$$$_mouseDownHandler$$($evt$$65$$) {
  var $page$$64$$ = $AdfPage$$.$PAGE$;
  if(!$page$$64$$.$isDragging$()) {
    var $agent$$102_handle$$2$$ = $AdfAgent$$.$AGENT$;
    $evt$$65$$ = $evt$$65$$ || $agent$$102_handle$$2$$.$getDomWindow$().event;
    if(!($evt$$65$$ instanceof MouseEvent) || $agent$$102_handle$$2$$.$isLeftButton$($evt$$65$$)) {
      this.$_state$ = this.$START_DRAGGING$;
      $agent$$102_handle$$2$$.preventDefault($evt$$65$$);
      var $target$$91$$ = $agent$$102_handle$$2$$.$getEventTarget$($evt$$65$$);
      $AdfPage$$.$PAGE$.$getAutoDismissalManager$().$dismiss$($target$$91$$);
      if($agent$$102_handle$$2$$.$getPlatform$() == $AdfAgent$$.$IE_PLATFORM$) {
        $agent$$102_handle$$2$$ = this.$_handle$;
        try {
          $agent$$102_handle$$2$$.setActive()
        }catch($e$$91$$) {
          $AdfLogger$$.$LOGGER$.fine("Could not restore focus to handle:", $agent$$102_handle$$2$$.id ? $agent$$102_handle$$2$$.id : "unknown")
        }
      }
      $page$$64$$.$startDrag$($evt$$65$$, this.$_mousemoveStub$, this.$_mouseupStub$, $JSCompiler_alias_NULL$$, $JSCompiler_alias_TRUE$$)
    }
  }
};
$JSCompiler_prototypeAlias$$.$_mouseMoveHandler$ = function $$JSCompiler_prototypeAlias$$$$_mouseMoveHandler$$($evt$$66_pos$$17_windowWidth$$7$$, $deltaX$$4_moveDeltaX$$, $deltaY$$4_moveDeltaY$$) {
  var $agent$$103_windowHeight$$7$$ = $AdfAgent$$.$AGENT$;
  $evt$$66_pos$$17_windowWidth$$7$$ = $agent$$103_windowHeight$$7$$.$getMousePosition$($evt$$66_pos$$17_windowWidth$$7$$);
  if(this.$_state$ == this.$START_DRAGGING$) {
    this.$_onDragStart$.apply(this.$_floatingElement$);
    this.$_state$ = this.$DRAGGING$;
    this.$_mouseStartX$ = $evt$$66_pos$$17_windowWidth$$7$$.x;
    this.$_mouseStartY$ = $evt$$66_pos$$17_windowWidth$$7$$.y;
    this.$_originalLeftPosition$ = parseInt(this.$_floatingElement$.$getLeft$());
    this.$_originalTopPosition$ = parseInt(this.$_floatingElement$.$getTop$());
    this.$_moveDeltaY$ = this.$_moveDeltaX$ = 0;
    this.$_originalLeftPosition$ || (this.$_originalLeftPosition$ = 0);
    this.$_originalTopPosition$ || (this.$_originalTopPosition$ = 0);
    var $adjustment_documentElement$$10_el$$17$$ = $AdfPage$$.$PAGE$.$getDomDocument$().documentElement, $isIE$$6$$ = $agent$$103_windowHeight$$7$$.$getPlatform$() == $AdfAgent$$.$IE_PLATFORM$, $isRTL$$2$$ = $AdfPage$$.$PAGE$.$getLocaleContext$().$isRightToLeft$(), $domWindow$$80_shadowSize$$6$$ = $agent$$103_windowHeight$$7$$.$getDomWindow$();
    $evt$$66_pos$$17_windowWidth$$7$$ = $agent$$103_windowHeight$$7$$.$getWindowScrollWidth$($domWindow$$80_shadowSize$$6$$);
    var $agent$$103_windowHeight$$7$$ = $agent$$103_windowHeight$$7$$.$getWindowScrollHeight$($domWindow$$80_shadowSize$$6$$), $domWindow$$80_shadowSize$$6$$ = $AdfDhtmlShadowDecorator$$.$getShadowSize$(), $minLeft$$ = $isRTL$$2$$ ? $domWindow$$80_shadowSize$$6$$ : 0;
    $isIE$$6$$ && $isRTL$$2$$ && ($adjustment_documentElement$$10_el$$17$$ = $adjustment_documentElement$$10_el$$17$$.scrollWidth - $adjustment_documentElement$$10_el$$17$$.clientWidth, $minLeft$$ -= $adjustment_documentElement$$10_el$$17$$, $evt$$66_pos$$17_windowWidth$$7$$ -= $adjustment_documentElement$$10_el$$17$$);
    this.$_minLeft$ = $minLeft$$;
    $adjustment_documentElement$$10_el$$17$$ = this.$getElement$();
    this.$_wiggleWidth$ = $evt$$66_pos$$17_windowWidth$$7$$ - $adjustment_documentElement$$10_el$$17$$.offsetWidth - 2 * $domWindow$$80_shadowSize$$6$$;
    this.$_wiggleHeight$ = $agent$$103_windowHeight$$7$$ - $adjustment_documentElement$$10_el$$17$$.offsetHeight - 2 * $domWindow$$80_shadowSize$$6$$
  }
  this.$_state$ == this.$DRAGGING$ && ($deltaX$$4_moveDeltaX$$ = this.$_moveDeltaX$ += $deltaX$$4_moveDeltaX$$, $deltaY$$4_moveDeltaY$$ = this.$_moveDeltaY$ += $deltaY$$4_moveDeltaY$$, this.$_move$($deltaX$$4_moveDeltaX$$, $deltaY$$4_moveDeltaY$$))
};
$JSCompiler_prototypeAlias$$.$_stopDragging$ = function $$JSCompiler_prototypeAlias$$$$_stopDragging$$() {
  this.$_mouseStartY$ = this.$_mouseStartX$ = this.$_originalTopPosition$ = this.$_originalLeftPosition$ = $JSCompiler_alias_NULL$$;
  this.$_state$ == this.$DRAGGING$ && this.$_onDragEnd$.apply(this.$_floatingElement$);
  this.$_state$ = this.$NORMAL$
};
$JSCompiler_prototypeAlias$$.$_move$ = function $$JSCompiler_prototypeAlias$$$$_move$$($deltaX$$6$$, $deltaY$$6$$) {
  var $newLeft$$1$$ = this.$_originalLeftPosition$ + $deltaX$$6$$, $newTop$$1$$ = this.$_originalTopPosition$ + $deltaY$$6$$, $minLeft$$1$$ = this.$_minLeft$, $wiggleWidth$$ = this.$_wiggleWidth$, $wiggleHeight$$ = this.$_wiggleHeight$, $newLeft$$1$$ = $newLeft$$1$$ > $minLeft$$1$$ ? Math.min($newLeft$$1$$, $wiggleWidth$$) : $minLeft$$1$$, $newTop$$1$$ = 0 < $newTop$$1$$ ? Math.min($newTop$$1$$, $wiggleHeight$$) : 0;
  this.$_floatingElement$.setPosition($newTop$$1$$, $newLeft$$1$$);
  this.$_onDrag$()
};
$JSCompiler_prototypeAlias$$.$setDragStartHandler$ = $JSCompiler_set$$("$_onDragStart$");
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.setDragStartHandler", {$setDragStartHandler$:$AdfRepositionable$$.prototype.$setDragStartHandler$});
$AdfRepositionable$$.prototype.$setDragEndHandler$ = $JSCompiler_set$$("$_onDragEnd$");
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.setDragEndHandler", {$setDragEndHandler$:$AdfRepositionable$$.prototype.$setDragEndHandler$});
$AdfRepositionable$$.prototype.$setDragHandler$ = $JSCompiler_set$$("$_onDrag$");
$AdfObject$$.$exportPrototypeSymbol$("AdfRepositionable.prototype.setDragHandler", {$setDragHandler$:$AdfRepositionable$$.prototype.$setDragHandler$});
$AdfRepositionable$$.prototype.$_onDragStart$ = $JSCompiler_emptyFn$$();
$AdfRepositionable$$.prototype.$_onDragEnd$ = $JSCompiler_emptyFn$$();
$AdfRepositionable$$.prototype.$_onDrag$ = $JSCompiler_emptyFn$$();
