function $AdfSafariTouchMoveManager$$($element$$135$$, $handlerCallback$$5$$, $touchCount$$5$$) {
  $AdfAssert$$.$assertDomNode$($element$$135$$, "Must have a DOM element to register a touch move with.");
  this.Init($element$$135$$, $handlerCallback$$5$$, $touchCount$$5$$)
}
$goog$exportSymbol$$("AdfSafariTouchMoveManager", $AdfSafariTouchMoveManager$$);
$AdfObject$$.$createSubclass$($AdfSafariTouchMoveManager$$, $AdfTouchMoveManager$$);
$AdfSafariTouchMoveManager$$.prototype.Init = function $$AdfSafariTouchMoveManager$$$$Init$($element$$136$$, $handlerCallback$$6_overflowValue$$, $touchCount$$6$$) {
  $AdfSafariTouchMoveManager$$.$superclass$.Init.call(this, $element$$136$$, $handlerCallback$$6_overflowValue$$, $touchCount$$6$$);
  this.$_touchCount$ = $touchCount$$6$$;
  this.$_handlerCallback$ = $handlerCallback$$6_overflowValue$$;
  this.$_element$ = $element$$136$$;
  this.$_touchMap$ = {};
  this.$_handleTouchStartCallaback$ = this.$createCallback$(this.$_handleTouchStart$);
  this.$_handleTouchEndCallaback$ = this.$createCallback$(this.$_handleTouchEnd$);
  this.$_handleTouchCancelCallaback$ = this.$createCallback$(this.$_handleTouchCancel$);
  this.$_handleTouchMoveCallaback$ = this.$createCallback$(this.$_handleTouchMove$);
  $element$$136$$.addEventListener("touchstart", this.$_handleTouchStartCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$136$$.addEventListener("touchend", this.$_handleTouchEndCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$136$$.addEventListener("touchcancel", this.$_handleTouchEndCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$136$$.addEventListener("touchmove", this.$_handleTouchMoveCallaback$, $JSCompiler_alias_TRUE$$);
  $handlerCallback$$6_overflowValue$$ = $AdfAgent$$.$AGENT$.getComputedStyle($element$$136$$).overflow;
  "scroll" != $handlerCallback$$6_overflowValue$$ && ($element$$136$$.style.overflow = "scroll", this.$_originalOverflowValue$ = $handlerCallback$$6_overflowValue$$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariTouchMoveManager.prototype.Init", {Init:$AdfSafariTouchMoveManager$$.prototype.Init});
$AdfSafariTouchMoveManager$$.prototype.$unregister$ = function $$AdfSafariTouchMoveManager$$$$$unregister$$() {
  var $element$$137$$ = this.$_element$;
  $element$$137$$.removeEventListener("touchstart", this.$_handleTouchStartCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$137$$.removeEventListener("touchend", this.$_handleTouchEndCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$137$$.removeEventListener("touchcancel", this.$_handleTouchEndCallaback$, $JSCompiler_alias_TRUE$$);
  $element$$137$$.removeEventListener("touchmove", this.$_handleTouchMoveCallaback$, $JSCompiler_alias_TRUE$$);
  delete this.$_handleTouchStartCallaback$;
  delete this.$_handleTouchEndCallaback$;
  delete this.$_handleTouchCancelCallaback$;
  delete this.$_handleTouchMoveCallaback$;
  delete this.$_touchMap$;
  delete this.$_element$;
  delete this.$_handlerCallback$;
  delete this.$_touchCount$;
  this.$_longTouchTimer$ && $AdfPage$$.$PAGE$.$cancelTimer$(this.$_longTouchTimer$);
  delete this.$_longTouchTimer$;
  delete this.$_longTouchEventCallback$;
  this.$_originalOverflowValue$ != $JSCompiler_alias_NULL$$ && ($element$$137$$.style.overflow = this.$_originalOverflowValue$, delete this.$_originalOverflowValue$)
};
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariTouchMoveManager.prototype.unregister", {$unregister$:$AdfSafariTouchMoveManager$$.prototype.$unregister$});
$AdfSafariTouchMoveManager$$.prototype.$setLongTouchEventCallback$ = $JSCompiler_set$$("$_longTouchEventCallback$");
$AdfObject$$.$exportPrototypeSymbol$("AdfSafariTouchMoveManager.prototype.setLongTouchEventCallback", {$setLongTouchEventCallback$:$AdfSafariTouchMoveManager$$.prototype.$setLongTouchEventCallback$});
$JSCompiler_prototypeAlias$$ = $AdfSafariTouchMoveManager$$.prototype;
$JSCompiler_prototypeAlias$$.$_handleTouchStart$ = function $$JSCompiler_prototypeAlias$$$$_handleTouchStart$$($touchEvent$$) {
  for(var $agent$$25$$ = $AdfAgent$$.$AGENT$, $changedTouches$$1$$ = $touchEvent$$.changedTouches, $changedTouch_identifier$$1$$, $i$$86$$ = 0;$i$$86$$ < $changedTouches$$1$$.length;$i$$86$$++) {
    $changedTouch_identifier$$1$$ = $changedTouches$$1$$[$i$$86$$];
    var $screenX$$3$$ = $changedTouch_identifier$$1$$.screenX, $screenY$$3$$ = $changedTouch_identifier$$1$$.screenY;
    $changedTouch_identifier$$1$$ = $changedTouch_identifier$$1$$.identifier;
    this.$_touchMap$[$changedTouch_identifier$$1$$] = {x:$screenX$$3$$, y:$screenY$$3$$, t:(new Date).getTime(), dx:0, dy:0, touchtype:$JSCompiler_alias_NULL$$, target:$agent$$25$$.$getEventTarget$($touchEvent$$)}
  }
  1 == $changedTouches$$1$$.length && this.$_longTouchEventCallback$ && (this.$_longTouchTimer$ = $AdfPage$$.$PAGE$.$scheduleTimer$(this, this.$_handleLongTouchStart$, $changedTouch_identifier$$1$$, 500))
};
$JSCompiler_prototypeAlias$$.$_handleLongTouchStart$ = function $$JSCompiler_prototypeAlias$$$$_handleLongTouchStart$$($eventId_touch$$2$$) {
  this.$_longTouchTimer$ = $JSCompiler_alias_NULL$$;
  $eventId_touch$$2$$ = this.$_touchMap$[$eventId_touch$$2$$];
  this.$_longTouchEventCallback$ && $eventId_touch$$2$$ && ($eventId_touch$$2$$.touchtype = "longtouch", this.$_longTouchEventCallback$($eventId_touch$$2$$))
};
$JSCompiler_prototypeAlias$$.$_handleTouchEnd$ = function $$JSCompiler_prototypeAlias$$$$_handleTouchEnd$$($changedTouches$$2_touchEvent$$1$$) {
  this.$_longTouchTimer$ && ($AdfPage$$.$PAGE$.$cancelTimer$(this.$_longTouchTimer$), delete this.$_longTouchTimer$);
  $changedTouches$$2_touchEvent$$1$$ = $changedTouches$$2_touchEvent$$1$$.changedTouches;
  for(var $i$$87$$ = 0;$i$$87$$ < $changedTouches$$2_touchEvent$$1$$.length;$i$$87$$++) {
    var $touchWrapper$$ = this.$_touchMap$[$changedTouches$$2_touchEvent$$1$$[$i$$87$$].identifier];
    "longtouch" == $touchWrapper$$.touchtype && this.$_longTouchEventCallback$ && this.$_longTouchEventCallback$();
    delete $touchWrapper$$
  }
};
$JSCompiler_prototypeAlias$$.$_handleTouchCancel$ = function $$JSCompiler_prototypeAlias$$$$_handleTouchCancel$$($touchEvent$$2$$) {
  this.$_handleTouchEnd$($touchEvent$$2$$)
};
$JSCompiler_prototypeAlias$$.$_handleTouchMove$ = function $$JSCompiler_prototypeAlias$$$$_handleTouchMove$$($scaleFactor_touchEvent$$3$$) {
  var $averageXDelta_touch1Direction_touches$$2$$ = $scaleFactor_touchEvent$$3$$.touches;
  this.$_longTouchTimer$ && ($AdfPage$$.$PAGE$.$cancelTimer$(this.$_longTouchTimer$), delete this.$_longTouchTimer$);
  if($averageXDelta_touch1Direction_touches$$2$$ && $averageXDelta_touch1Direction_touches$$2$$.length == this.$_touchCount$) {
    var $averageYDelta_t_touch2Data_touch2Direction$$ = (new Date).getTime(), $changedTouches$$3$$ = $scaleFactor_touchEvent$$3$$.changedTouches, $i$$88$$, $touch$$3_touch1Data_touchData$$, $j$$5_touchType$$;
    for($i$$88$$ = 0;$i$$88$$ < $changedTouches$$3$$.length;$i$$88$$++) {
      $touch$$3_touch1Data_touchData$$ = $changedTouches$$3$$[$i$$88$$];
      var $changesWereMovement_screenX$$4$$ = $touch$$3_touch1Data_touchData$$.screenX, $screenY$$4$$ = $touch$$3_touch1Data_touchData$$.screenY, $identifier$$3$$ = $touch$$3_touch1Data_touchData$$.identifier;
      $touch$$3_touch1Data_touchData$$ = this.$_touchMap$[$identifier$$3$$];
      var $deltaX$$1$$ = 0, $deltaY$$1$$ = 0, $origX$$ = $JSCompiler_alias_NULL$$, $origY$$ = $JSCompiler_alias_NULL$$;
      $j$$5_touchType$$ = $JSCompiler_alias_NULL$$;
      $touch$$3_touch1Data_touchData$$ && ($deltaX$$1$$ = $changesWereMovement_screenX$$4$$ - $touch$$3_touch1Data_touchData$$.x, $deltaY$$1$$ = $screenY$$4$$ - $touch$$3_touch1Data_touchData$$.y, $origX$$ = $touch$$3_touch1Data_touchData$$.origx, $origY$$ = $touch$$3_touch1Data_touchData$$.origy, $j$$5_touchType$$ = $touch$$3_touch1Data_touchData$$.touchtype);
      $origX$$ == $JSCompiler_alias_NULL$$ && ($origX$$ = $changesWereMovement_screenX$$4$$, $origY$$ = $screenY$$4$$);
      this.$_touchMap$[$identifier$$3$$] = {x:$changesWereMovement_screenX$$4$$, y:$screenY$$4$$, t:$averageYDelta_t_touch2Data_touch2Direction$$, dx:$deltaX$$1$$, dy:$deltaY$$1$$, origx:$origX$$, origy:$origY$$, touchtype:$j$$5_touchType$$}
    }
    $changedTouches$$3$$ = [];
    for($i$$88$$ in this.$_touchMap$) {
      $touch$$3_touch1Data_touchData$$ = this.$_touchMap$[$i$$88$$], 500 > $averageYDelta_t_touch2Data_touch2Direction$$ - $touch$$3_touch1Data_touchData$$.t && $changedTouches$$3$$.push($touch$$3_touch1Data_touchData$$)
    }
    if(2 == this.$_touchCount$) {
      $touch$$3_touch1Data_touchData$$ = this.$_touchMap$[$averageXDelta_touch1Direction_touches$$2$$[0].identifier];
      $averageYDelta_t_touch2Data_touch2Direction$$ = this.$_touchMap$[$averageXDelta_touch1Direction_touches$$2$$[1].identifier];
      if($touch$$3_touch1Data_touchData$$ == $JSCompiler_alias_NULL$$ || $averageYDelta_t_touch2Data_touch2Direction$$ == $JSCompiler_alias_NULL$$) {
        return
      }
      $touch$$3_touch1Data_touchData$$.touchtype == $JSCompiler_alias_NULL$$ && ($averageXDelta_touch1Direction_touches$$2$$ = $JSCompiler_StaticMethods__determineTouchDirection$$($touch$$3_touch1Data_touchData$$), $averageXDelta_touch1Direction_touches$$2$$ != $JSCompiler_alias_NULL$$ && ($averageYDelta_t_touch2Data_touch2Direction$$ = $JSCompiler_StaticMethods__determineTouchDirection$$($averageYDelta_t_touch2Data_touch2Direction$$), $averageYDelta_t_touch2Data_touch2Direction$$ != $JSCompiler_alias_NULL$$ && 
      ($j$$5_touchType$$ = $averageXDelta_touch1Direction_touches$$2$$ == $averageYDelta_t_touch2Data_touch2Direction$$ || (2 == $averageXDelta_touch1Direction_touches$$2$$.length && 1 == $averageYDelta_t_touch2Data_touch2Direction$$.length ? $averageXDelta_touch1Direction_touches$$2$$.charAt(0) == $averageYDelta_t_touch2Data_touch2Direction$$ || $averageXDelta_touch1Direction_touches$$2$$.charAt(1) == $averageYDelta_t_touch2Data_touch2Direction$$ : 1 == $averageXDelta_touch1Direction_touches$$2$$.length && 
      2 == $averageYDelta_t_touch2Data_touch2Direction$$.length && ($averageXDelta_touch1Direction_touches$$2$$ == $averageYDelta_t_touch2Data_touch2Direction$$.charAt(0) || $averageYDelta_t_touch2Data_touch2Direction$$ == $averageXDelta_touch1Direction_touches$$2$$.charAt(1))) ? "scroll" : "pinch", $touch$$3_touch1Data_touchData$$.touchtype = $j$$5_touchType$$)));
      $j$$5_touchType$$ = $touch$$3_touch1Data_touchData$$.touchtype;
      if($j$$5_touchType$$ == $JSCompiler_alias_NULL$$ || "pinch" == $j$$5_touchType$$) {
        return
      }
    }
    if($changedTouches$$3$$.length <= this.$_touchCount$) {
      for($j$$5_touchType$$ = $averageYDelta_t_touch2Data_touch2Direction$$ = $averageXDelta_touch1Direction_touches$$2$$ = 0;$j$$5_touchType$$ < $changedTouches$$3$$.length;$j$$5_touchType$$++) {
        $touch$$3_touch1Data_touchData$$ = $changedTouches$$3$$[$j$$5_touchType$$], $averageXDelta_touch1Direction_touches$$2$$ += $touch$$3_touch1Data_touchData$$.dx, $averageYDelta_t_touch2Data_touch2Direction$$ += $touch$$3_touch1Data_touchData$$.dy
      }
      $averageXDelta_touch1Direction_touches$$2$$ /= this.$_touchCount$;
      $averageYDelta_t_touch2Data_touch2Direction$$ /= this.$_touchCount$;
      $changesWereMovement_screenX$$4$$ = $JSCompiler_alias_TRUE$$;
      for($j$$5_touchType$$ = 0;$j$$5_touchType$$ < $changedTouches$$3$$.length;$j$$5_touchType$$++) {
        if($touch$$3_touch1Data_touchData$$ = $changedTouches$$3$$[$j$$5_touchType$$], 20 < Math.abs($touch$$3_touch1Data_touchData$$.dx - $averageXDelta_touch1Direction_touches$$2$$) || 20 < Math.abs($touch$$3_touch1Data_touchData$$.dy - $averageYDelta_t_touch2Data_touch2Direction$$)) {
          $changesWereMovement_screenX$$4$$ = $JSCompiler_alias_FALSE$$;
          break
        }
      }
      if($changesWereMovement_screenX$$4$$ && ($AdfAgent$$.$AGENT$.preventDefault($scaleFactor_touchEvent$$3$$), 0 != $averageXDelta_touch1Direction_touches$$2$$ || 0 != $averageYDelta_t_touch2Data_touch2Direction$$)) {
        $scaleFactor_touchEvent$$3$$ = window.outerWidth / window.innerWidth, this.$_handlerCallback$($averageXDelta_touch1Direction_touches$$2$$ * $scaleFactor_touchEvent$$3$$, $averageYDelta_t_touch2Data_touch2Direction$$ * $scaleFactor_touchEvent$$3$$)
      }
      for($i$$88$$ in this.$_touchMap$) {
        this.$_touchMap$[$i$$88$$].t = 0
      }
    }
  }
};
function $JSCompiler_StaticMethods__determineTouchDirection$$($distanceY_touchData$$1$$) {
  var $distanceX_origX$$1$$ = $distanceY_touchData$$1$$.origx, $directionX_origY$$1$$ = $distanceY_touchData$$1$$.origy;
  if($distanceX_origX$$1$$ == $JSCompiler_alias_NULL$$ || $directionX_origY$$1$$ == $JSCompiler_alias_NULL$$) {
    return $JSCompiler_alias_NULL$$
  }
  $distanceX_origX$$1$$ = $distanceY_touchData$$1$$.x - $distanceX_origX$$1$$;
  $distanceY_touchData$$1$$ = $distanceY_touchData$$1$$.y - $directionX_origY$$1$$;
  if(Math.sqrt(Math.pow($distanceX_origX$$1$$, 2) + Math.pow($distanceY_touchData$$1$$, 2)) < 0.01 * window.innerWidth) {
    return $JSCompiler_alias_NULL$$
  }
  $directionX_origY$$1$$ = $JSCompiler_alias_NULL$$;
  0.25 <= Math.abs($distanceX_origX$$1$$ / $distanceY_touchData$$1$$) && ($directionX_origY$$1$$ = 0 > $distanceX_origX$$1$$ ? "l" : "r");
  var $directionY$$ = $JSCompiler_alias_NULL$$;
  0.25 <= Math.abs($distanceY_touchData$$1$$ / $distanceX_origX$$1$$) && ($directionY$$ = 0 > $distanceY_touchData$$1$$ ? "u" : "d");
  return $directionX_origY$$1$$ != $JSCompiler_alias_NULL$$ && $directionY$$ != $JSCompiler_alias_NULL$$ ? $directionY$$ + $directionX_origY$$1$$ : $directionX_origY$$1$$ == $JSCompiler_alias_NULL$$ ? $directionY$$ : $directionY$$ == $JSCompiler_alias_NULL$$ ? $directionX_origY$$1$$ : $JSCompiler_alias_NULL$$
}
;