function $AdfColumnDropTarget$$() {
  this.Init();
}
$goog$exportSymbol$$("AdfColumnDropTarget", $AdfColumnDropTarget$$);
$AdfObject$$.$createSubclass$($AdfColumnDropTarget$$, $AdfDropTarget$$);
$AdfColumnDropTarget$$.prototype.Init = function $$AdfColumnDropTarget$$$$Init$() {
  $AdfColumnDropTarget$$.$superclass$.Init.call(this, $AdfDnDContext$$.$ACTION_MOVE$);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.Init", {Init:$AdfColumnDropTarget$$.prototype.Init});
$AdfColumnDropTarget$$.prototype.$dragExit$ = function $$AdfColumnDropTarget$$$$$dragExit$$($dndContext$$55$$) {
  $JSCompiler_StaticMethods__removeUserFeedback$$(this);
  return $AdfColumnDropTarget$$.$superclass$.$dragExit$.apply(this, arguments);
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.dragExit", {$dragExit$:$AdfColumnDropTarget$$.prototype.$dragExit$});
$AdfColumnDropTarget$$.prototype.$GetAllowedActions$ = function $$AdfColumnDropTarget$$$$$GetAllowedActions$$() {
  return $AdfDnDContext$$.$ACTION_MOVE$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.GetAllowedActions", {$GetAllowedActions$:$AdfColumnDropTarget$$.prototype.$GetAllowedActions$});
$AdfColumnDropTarget$$.prototype.$drop$ = function $$AdfColumnDropTarget$$$$$drop$$($dndContext$$57$$) {
  $JSCompiler_StaticMethods__removeUserFeedback$$(this);
  if (null == $dndContext$$57$$.$_targetReorderId$ || null == $dndContext$$57$$.$_insertColumnAfter$) {
    return $AdfDnDContext$$.$ACTION_NONE$;
  }
  var $table$$3_targetColumn$$ = this.$getComponent$(), $dragColumn_showColsEvent$$ = $JSCompiler_StaticMethods__getDragColumn$$($dndContext$$57$$), $table$$3_targetColumn$$ = this.$_getTable$($table$$3_targetColumn$$), $dragColumn_showColsEvent$$ = new $AdfTableShowColumnsEvent$$($table$$3_targetColumn$$, $dragColumn_showColsEvent$$.$getClientId$(), "reorderColumn");
  $dragColumn_showColsEvent$$.$setTargetColumnId$($dndContext$$57$$.$_targetReorderId$);
  $dragColumn_showColsEvent$$.$setAfterTarget$($dndContext$$57$$.$_insertColumnAfter$);
  $dragColumn_showColsEvent$$.$queue$();
  delete $dndContext$$57$$.$_targetReorderId$;
  delete $dndContext$$57$$.$_insertColumnAfter$;
  return $AdfDnDContext$$.$ACTION_NONE$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.drop", {$drop$:$AdfColumnDropTarget$$.prototype.$drop$});
$AdfColumnDropTarget$$.prototype.$GetAllowedFlavors$ = function $$AdfColumnDropTarget$$$$$GetAllowedFlavors$$() {
  return [$AdfColumnDropTarget$$.$_FLAVOR$];
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.GetAllowedFlavors", {$GetAllowedFlavors$:$AdfColumnDropTarget$$.prototype.$GetAllowedFlavors$});
$AdfColumnDropTarget$$.prototype.$acceptDragEnter$ = function $$AdfColumnDropTarget$$$$$acceptDragEnter$$($dndContext$$59$$, $proposedAction$$18$$, $pageX$$29$$, $pageY$$29$$) {
  var $baseAccepted$$ = $AdfColumnDropTarget$$.$superclass$.$acceptDragEnter$.apply(this, arguments);
  if ($baseAccepted$$ != $AdfDnDContext$$.$ACTION_NONE$) {
    if (!$JSCompiler_StaticMethods__isDragAllowed$$(this, $dndContext$$59$$)) {
      return $AdfDnDContext$$.$ACTION_NONE$;
    }
    var $dndContext$$inline_674$$ = $dndContext$$59$$, $pageX$$inline_675$$ = $pageX$$29$$, $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$ = this.$getComponent$(), $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$ = this.$_getTable$($column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$), $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$ = $AdfRichUIPeer$$.$getDomContentElementForComponent$($column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$), 
    $dropTarget$$inline_5556$$ = $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$.ownerDocument.createElement("div");
    $dropTarget$$inline_5556$$.className = $AdfColumnDropTarget$$.$_COL_DROP_TAGET_CLASS$;
    var $dropTargetStyle$$inline_5557$$ = $dropTarget$$inline_5556$$.style;
    $dropTargetStyle$$inline_5557$$.position = "absolute";
    $dropTargetStyle$$inline_5557$$.width = "10px";
    $dropTargetStyle$$inline_5557$$.overflow = "hidden";
    $dropTargetStyle$$inline_5557$$.top = "0px";
    $dropTargetStyle$$inline_5557$$.zIndex = 1E3;
    $dropTargetStyle$$inline_5557$$.height = $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$.offsetHeight + "px";
    $AdfAgent$$.$AGENT$.$setOpacity$($dropTarget$$inline_5556$$, 80);
    $column$$inline_677_outerDiv$$inline_5555_table$$inline_5554$$.appendChild($dropTarget$$inline_5556$$);
    this.$_columnDropTarget$ = $dropTarget$$inline_5556$$;
    $JSCompiler_StaticMethods__positionColumnDropTarget$$(this, $dndContext$$inline_674$$, $pageX$$inline_675$$);
  }
  return $baseAccepted$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.acceptDragEnter", {$acceptDragEnter$:$AdfColumnDropTarget$$.prototype.$acceptDragEnter$});
$AdfColumnDropTarget$$.prototype.$acceptDragOver$ = function $$AdfColumnDropTarget$$$$$acceptDragOver$$($dndContext$$60$$, $proposedAction$$19$$, $pageX$$30$$, $pageY$$30$$) {
  var $baseAccepted$$1$$ = $AdfColumnDropTarget$$.$superclass$.$acceptDragOver$.apply(this, arguments);
  if ($baseAccepted$$1$$ != $AdfDnDContext$$.$ACTION_NONE$) {
    if (!$JSCompiler_StaticMethods__isDragAllowed$$(this, $dndContext$$60$$)) {
      return $AdfDnDContext$$.$ACTION_NONE$;
    }
    $JSCompiler_StaticMethods__positionColumnDropTarget$$(this, $dndContext$$60$$, $pageX$$30$$);
  }
  return $baseAccepted$$1$$;
};
$AdfObject$$.$exportPrototypeSymbol$("AdfColumnDropTarget.prototype.acceptDragOver", {$acceptDragOver$:$AdfColumnDropTarget$$.prototype.$acceptDragOver$});
function $JSCompiler_StaticMethods__isDragAllowed$$($JSCompiler_StaticMethods__isDragAllowed$self$$, $dndContext$$61$$) {
  var $column$$3$$ = $JSCompiler_StaticMethods__isDragAllowed$self$$.$getComponent$(), $dragColumn$$1$$ = $JSCompiler_StaticMethods__getDragColumn$$($dndContext$$61$$);
  return null == $dragColumn$$1$$ || $dragColumn$$1$$ == $column$$3$$ || $JSCompiler_StaticMethods__isDragAllowed$self$$.$_getTable$($dragColumn$$1$$) != $JSCompiler_StaticMethods__isDragAllowed$self$$.$_getTable$($column$$3$$) ? !1 : !0;
}
$AdfColumnDropTarget$$.prototype.$_getTable$ = function $$AdfColumnDropTarget$$$$$_getTable$$($c$$8_column$$4$$) {
  for (;null != $c$$8_column$$4$$;$c$$8_column$$4$$ = $c$$8_column$$4$$.getParent()) {
    if ($c$$8_column$$4$$ instanceof AdfRichTable) {
      return $c$$8_column$$4$$;
    }
  }
  return null;
};
function $JSCompiler_StaticMethods__getDragColumn$$($dndContext$$62_dragColumn$$2$$) {
  ($dndContext$$62_dragColumn$$2$$ = $dndContext$$62_dragColumn$$2$$.$getTransferable$().$getTransferData$($AdfColumnDropTarget$$.$_FLAVOR$)) && ($dndContext$$62_dragColumn$$2$$ = $dndContext$$62_dragColumn$$2$$[0]);
  return $dndContext$$62_dragColumn$$2$$ instanceof AdfRichColumn ? $dndContext$$62_dragColumn$$2$$ : null;
}
function $JSCompiler_StaticMethods__positionColumnDropTarget$$($JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$, $dndContext$$64$$, $outerDivMouseX_pageX$$32$$) {
  var $isRTL$$ = $AdfPage$$.$PAGE$.$getLocaleContext$().$isRightToLeft$(), $column$$7_dropTarget$$3$$ = $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.$getComponent$(), $extraX_headerDiv_table$$5$$ = $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.$_getTable$($column$$7_dropTarget$$3$$), $c$$9_outerDiv$$2$$ = $AdfRichUIPeer$$.$getDomContentElementForComponent$($extraX_headerDiv_table$$5$$), $column$$7_dropTarget$$3$$ = $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.$_columnDropTarget$, 
  $dropTargetStyle$$ = $column$$7_dropTarget$$3$$.style, $divPos_targetLeft$$ = $AdfAgent$$.$AGENT$.$getElementPosition$($c$$9_outerDiv$$2$$);
  $outerDivMouseX_pageX$$32$$ = Math.max($outerDivMouseX_pageX$$32$$ - $divPos_targetLeft$$.x, 0);
  var $cell$$1_tablePeer$$ = $extraX_headerDiv_table$$5$$.$getPeer$(), $extraX_headerDiv_table$$5$$ = $cell$$1_tablePeer$$.$__getColumnHeader$(), $cells$$3_div2$$, $table1$$ = $AdfDhtmlTableBasePeer$$.$__getChildBySubId$($extraX_headerDiv_table$$5$$, "t"), $cellCount_table2$$, $lastFrozen$$ = $cell$$1_tablePeer$$.$__getLastFrozen$();
  0 <= $lastFrozen$$ && ($cells$$3_div2$$ = $AdfDhtmlTableBasePeer$$.$__getChildBySubId$($extraX_headerDiv_table$$5$$, "d2"), $cellCount_table2$$ = $AdfDhtmlTableBasePeer$$.$__getChildBySubId$($cells$$3_div2$$, "t2"));
  var $headerTable$$1_table1Right$$, $extraX_headerDiv_table$$5$$ = 0, $divPos_targetLeft$$ = null, $currentScrollLeft$$ = $cell$$1_tablePeer$$.$__getCurrentScrollLeft$();
  $isRTL$$ ? ($headerTable$$1_table1Right$$ = $c$$9_outerDiv$$2$$.offsetWidth - $table1$$.offsetWidth, $cells$$3_div2$$ && $outerDivMouseX_pageX$$32$$ <= $headerTable$$1_table1Right$$ ? ($headerTable$$1_table1Right$$ = $cellCount_table2$$, $extraX_headerDiv_table$$5$$ = -$JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.$_currentScrollLeft$, $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$ = $cell$$1_tablePeer$$.$__getScrollerDimensions$(), 
  $cell$$1_tablePeer$$.$__getScrollDimensions$().scrollHeight > $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.offsetHeight && ($extraX_headerDiv_table$$5$$ += $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.offsetWidth - $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$.clientWidth)) : ($c$$9_outerDiv$$2$$.offsetWidth > $table1$$.offsetWidth && ($extraX_headerDiv_table$$5$$ = $c$$9_outerDiv$$2$$.offsetWidth - 
  $table1$$.offsetWidth), $headerTable$$1_table1Right$$ = $table1$$)) : $outerDivMouseX_pageX$$32$$ <= $table1$$.offsetWidth ? $headerTable$$1_table1Right$$ = $table1$$ : $cells$$3_div2$$ && ($extraX_headerDiv_table$$5$$ = $table1$$.offsetWidth, $extraX_headerDiv_table$$5$$ -= $currentScrollLeft$$, $headerTable$$1_table1Right$$ = $cellCount_table2$$);
  if (null != $headerTable$$1_table1Right$$) {
    -1 == $lastFrozen$$ && ($extraX_headerDiv_table$$5$$ -= $currentScrollLeft$$);
    for ($JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$ = $table1$$.rows.length - 1;0 <= $JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$;--$JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$) {
      for ($cells$$3_div2$$ = $headerTable$$1_table1Right$$.rows[$JSCompiler_StaticMethods__positionColumnDropTarget$self_i$$158_scrollerDimensions$$].cells, $cellCount_table2$$ = $cells$$3_div2$$.length, $c$$9_outerDiv$$2$$ = 0;$c$$9_outerDiv$$2$$ < $cellCount_table2$$;++$c$$9_outerDiv$$2$$) {
        if ($cell$$1_tablePeer$$ = $cells$$3_div2$$[$c$$9_outerDiv$$2$$], $cell$$1_tablePeer$$.getAttribute("_afrRoot") && null == $cell$$1_tablePeer$$.getAttribute("_afrRH")) {
          if (cellLeft = $cell$$1_tablePeer$$.offsetLeft + $extraX_headerDiv_table$$5$$, cellRight = cellLeft + $cell$$1_tablePeer$$.offsetWidth, $outerDivMouseX_pageX$$32$$ >= cellLeft && $outerDivMouseX_pageX$$32$$ <= cellRight - $cell$$1_tablePeer$$.offsetWidth / 2) {
            $dndContext$$64$$.$_insertColumnAfter$ = $isRTL$$;
            $dndContext$$64$$.$_targetReorderId$ = $cell$$1_tablePeer$$.id;
            $divPos_targetLeft$$ = cellLeft - $column$$7_dropTarget$$3$$.offsetWidth / 2;
            break;
          } else {
            if ($outerDivMouseX_pageX$$32$$ >= cellLeft && $outerDivMouseX_pageX$$32$$ <= cellRight) {
              $dndContext$$64$$.$_insertColumnAfter$ = !$isRTL$$;
              $dndContext$$64$$.$_targetReorderId$ = $cell$$1_tablePeer$$.id;
              $divPos_targetLeft$$ = cellRight - $column$$7_dropTarget$$3$$.offsetWidth / 2;
              break;
            }
          }
        }
      }
    }
    null != $divPos_targetLeft$$ && ($dropTargetStyle$$.left = Math.max($divPos_targetLeft$$, 0) + "px");
  }
}
function $JSCompiler_StaticMethods__removeUserFeedback$$($JSCompiler_StaticMethods__removeUserFeedback$self$$) {
  var $table$$7_tableDom$$ = $JSCompiler_StaticMethods__removeUserFeedback$self$$.$_getTable$($JSCompiler_StaticMethods__removeUserFeedback$self$$.$getComponent$()), $table$$7_tableDom$$ = $AdfRichUIPeer$$.$getDomContentElementForComponent$($table$$7_tableDom$$);
  null != $JSCompiler_StaticMethods__removeUserFeedback$self$$.$_columnDropTarget$ && ($table$$7_tableDom$$.removeChild($JSCompiler_StaticMethods__removeUserFeedback$self$$.$_columnDropTarget$), delete $JSCompiler_StaticMethods__removeUserFeedback$self$$.$_columnDropTarget$);
}
$AdfColumnDropTarget$$.$_FLAVOR$ = $AdfDataFlavor$$.$getDataFlavorForClass$($AdfUIComponent$$, "AdfRichColumn");
$AdfColumnDropTarget$$.$_COL_DROP_TAGET_CLASS$ = "AFColumnDropTarget";
