get the center of all the touches
@param   {Array}     touches
@returns {Object}    center
423811
function getCenter(touches) {
      var valuesX = [], valuesY = [];

      for(var t= 0,len=touches.length; t<len; t++) {
        valuesX.push(touches[t].pageX);
        valuesY.push(touches[t].pageY);
      }

      return {
        pageX: ((Math.min.apply(Math, valuesX) + Math.max.apply(Math, valuesX)) / 2),
          pageY: ((Math.min.apply(Math, valuesY) + Math.max.apply(Math, valuesY)) / 2)
      };
    }
801853
function(evt) {
        var distance = this.getDistance(evt.touches);
        var scale = distance / this.start.distance;
        return {
            distance: distance,
            delta: this.last.distance - distance,
            scale: scale
        };
    }
723371
function getCenter(pointers) {
    var pointersLength = pointers.length;

    // no need to loop when only one touch
    if (pointersLength === 1) {
        return {
            x: round(pointers[0].clientX),
            y: round(pointers[0].clientY)
        };
    }

    var x = 0, y = 0, i = 0;
    while (i < pointersLength) {
        x += pointers[i].clientX;
        y += pointers[i].clientY;
        i++;
    }

    return {
        x: round(x / pointersLength),
        y: round(y / pointersLength)
    };
}
1303227
function(evt) {
        evt.preventDefault();
        evt.stopPropagation();
        if (debug) { timedLog("endSecondFinger"); }
        if (evt.touches.length > 1) {
          if (debug) { timedLog("endSecondFinger - capped"); }
          return true;
        }
        if (debug) { timedLog("endSecondFinger - continued"); }
        handlers.startmark(evt);
        // If there are no fingers left on the screen,
        // we have not finished the handling
        return evt.touches.length !== 0;
      }
1330024
function() {
			for( var i = 0, j = this.touchableAreasCount; i < j; i++ ) {
				var area = this.touchableAreas[ i ];
				if( typeof area === 'undefined' ) continue;
				area.draw();
				// Go through all touches to see if any hit this area
				var touched = false;
				for( var k = 0, l = this.touches.length; k < l; k++ ) {
					var touch = this.touches[ k ];
					if( typeof touch === 'undefined' ) continue;
					var x = this.normalizeTouchPositionX(touch.clientX),
						y = this.normalizeTouchPositionY(touch.clientY);
					// Check that it's in the bounding box/circle
					if( area.check(x, y) && !touched) touched = this.touches[k];
				}

				if( touched ) {
					if( !area.active ) area.touchStartWrapper(touched);
					area.touchMoveWrapper(touched);
				} else if( area.active ) area.touchEndWrapper(touched);
			}
		}
263389
function getTouches(touches) {
        return Array.prototype.slice.call(touches).map(function (touch) {
            return {
                left: touch.pageX,
                top: touch.pageY
            };
        });
    }
586253
function(previousState, event) {
    var state = {};
    state.center = getCenter(event.targetTouches);
    state.pointers = [];
    for (var i = 0; i < event.targetTouches.length; ++i) {
      var t = event.targetTouches[i];
      state.pointers.push({ x: t.clientX, y : t.clientY });
    }
    state.numTouches = event.targetTouches.length;
    state.rotation = 0;
    state.scale = 1.0;
    state.deltaScale = 0.0;
    state.deltaRotation = 0.0;

    if (previousState.center) {
      state.deltaCenter = {
        x : state.center.x - previousState.center.x, 
        y : state.center.y - previousState.center.y
      };
    }

    if (previousState.numTouches !== 2 || state.numTouches !== 2) {
      return state;
    }
    if (previousState.initialPointers) {
      state.initialPointers = previousState.initialPointers;
    } else {
      state.initialPointers = previousState.pointers;
    }

    state.scale = getScale(state.initialPointers, state.pointers);
    state.deltaScale = state.scale - previousState.scale;
    state.rotation = getRotationAngle(state.initialPointers, state.pointers);
    state.deltaRotation = state.rotation - previousState.rotation;
    return state;
  }
1207978
function (e) {
        const map = this.getMap();
        const eventParam = {
            'domEvent': e
        };
        const actual = e.touches && e.touches.length > 0 ? e.touches[0] : e.changedTouches  && e.changedTouches.length > 0 ? e.changedTouches[0] : e;
        if (actual) {
            const containerPoint = getEventContainerPoint(actual, map._containerDOM);
            eventParam['coordinate'] = map.containerPointToCoordinate(containerPoint);
            eventParam['containerPoint'] = containerPoint;
            eventParam['viewPoint'] = map.containerPointToViewPoint(containerPoint);
            eventParam['pont2d'] = map._containerPointToPoint(containerPoint);
        }
        return eventParam;
    }
459120
function(refer, touchIndex) {
                if (!this.originEvent) {
                    return null;
                }
                var eventClient = this.originEvent.touches ? this.originEvent.touches[touchIndex || 0] : this.originEvent;
                var target = this.targetShape;
                var targetNode = target.shapeNode || target.node;
                var pScreen = new Point(eventClient && eventClient.clientX || 0, eventClient && eventClient.clientY || 0);
                var pTarget = Matrix.transformPoint(pScreen, targetNode.getScreenCTM().inverse());
                var pRefer = Matrix.getCTM(target, refer || "view").transformPoint(pTarget);
                return pRefer;
            }
17087
function () {
            return [{
                        evt : this.touchEventMap.touchmove,
                        cb : {
                            fn : this._pinchMove,
                            scope : this
                        }
                    }, {
                        evt : this.touchEventMap.touchend,
                        cb : {
                            fn : this._pinchEnd,
                            scope : this
                        }
                    }];
        }
758471
function touches(event) {
      if (MOUSE_EVENTS.indexOf(event.type) > -1) {
        return event;
      }

      return event.touches[0] || event.changedTouches[0];
    }
1267239
function getCursorPosition(event) {
  let cursorX;
  let cursorY;
  let rect = htmlElement.getBoundingClientRect();
  if (event.touches !== undefined) {
    cursorX = event.touches[0].clientX;
    cursorY = event.touches[0].clientY;
  } else {
    cursorX = event.clientX;
    cursorY = event.clientY;
  }
  return {
    x: cursorX - rect.left,
    y: cursorY - rect.top,
  };
}
640758
function () {
        this._touchHandler = $B.bind(function (e) {
            if ( !this._enable ) return this._removeTouchEvent();

            var evt, pageX1, pageY1, pageX2, pageY2, clientX1, clientY1, clientX2, clientY2,
                touches = e.touches, touch1, touch2, currentTouchLength = e.touches.length;

            if ( currentTouchLength > 1 ) {
                touch1 = touches[0];
                touch2 = touches[1];

                pageX1 = touch1.pageX;
                pageY1 = touch1.pageY;
                pageX2 = touch2.pageX;
                pageY2 = touch2.pageY;
                clientX1 = touch1.clientX;
                clientY1 = touch1.clientY;
                clientX2 = touch2.clientX;
                clientY2 = touch2.clientY;

                var distanceH = this._getDistance( pageX1, pageX2 ),
                    distanceV = this._getDistance( pageY1, pageY2 ),
                    radius = this._getRadius( distanceH, distanceV ),
                    radian = this._getRadian( distanceH, distanceV ),
                    degree = this._radianToDeg( radian ),
                    cPageX = this._getCenterPos( pageX1, pageX2, distanceH ),
                    cPageY = this._getCenterPos( pageY1, pageY2, distanceV ),
                    cClientX = this._getCenterPos( clientX1, clientX2, distanceH ),
                    cClientY = this._getCenterPos( clientY1, clientY2, distanceV );

                evt = {
                    type: '', pointers: this._getPointers( touches ),
                    growAngle: 0, growScale: 0, angle: 0, scale: 1,
                    degree: degree, radian: radian, radius: radius,
                    distance: radius * 2, distanceH: distanceH, distanceV: distanceV,
                    pageX: cPageX, pageY: cPageY, clientX: cClientX, clientY: cClientY, pan: false
                };

                if ( e.type == 'touchmove' ) {
                    e.preventDefault();

                    var gAngle = this._getBetweenAngle( this._oldPageX1, this._oldPageY1, pageX1, pageY1, this._oldCenterX, this._oldCenterY, cPageX, cPageY ),
                        tScale = radius / this._startRadius,
                        gScale = ( radius - this._oldRadius ) / this._startRadius;

                    this._totalAngle += gAngle;

                    evt.growAngle = gAngle;
                    evt.angle = this._totalAngle;
                    evt.scale = tScale;
                    evt.growScale = gScale;
                    evt.pan = this._isPanEvent( this._startDistanceH, this._startDistanceV, distanceH, distanceV );
                    this.dispatch( 'multitouchmove', evt );
                    //Start
                } else if ( e.type == 'touchstart' ) {
                    var touchStarted = this._hasMultiTouchStart;

                    this._hasMultiTouchStart = true;
                    this._startRadius = radius;
                    this._totalAngle = 0;
                    this._isPan = null;
                    this._startDistanceH = distanceH;
                    this._startDistanceV = distanceV;

                    if ( !touchStarted ) {
                        //start시에는 grow관련값이 모두 0이다.
                        this.dispatch( 'multitouchstart', evt );
                    }
                }

                this._oldPageX1 = pageX1;
                this._oldPageY1 = pageY1;
                this._oldCenterX = cPageX;
                this._oldCenterY = cPageY;
                this._oldRadius = radius;
                this._oldEvt = evt;
            }

            if ( e.type == 'touchend' || e.type == 'touchcancel' ) {
                //MultiTouchStart가 발생하고 난후에만 End이벤트가 발생한다.
                if ( this._hasMultiTouchStart && currentTouchLength < 2 ) {
                    this._removeTouchEvent();
                    this.dispatch( 'multitouchend', this._oldEvt );
                    this._hasMultiTouchStart = false;
                }
            }
        }, this);

        this._startHandler = $B.bind(function (e) {
            this._addTouchEvent();
        }, this);

        this._touchEvent = new $B.event.TouchEvent( this._target ).addListener( 'touchstart', this._startHandler );
        this._winTouchEvent = new $B.event.TouchEvent( window );
    }
341605
function getTargetTouch (touches, target) {
  return Array.prototype.slice.call(touches).filter(function (t) {
    return t.target === target
  })[0] || touches[0]
}
1071757
function() {

        var el = this.thumb.getEl();

        if (el) {
            /**
             * The center of the slider element is stored so we can 
             * place it in the correct position when the background is clicked.
             * @property thumbCenterPoint
             * @type {"x": int, "y": int}
             */
            this.thumbCenterPoint = { 
                    x: parseInt(el.offsetWidth/2, 10), 
                    y: parseInt(el.offsetHeight/2, 10) 
            };
        }

    }
1207964
function (event) {
            // Standard touch
            if (event.touches && event.touches.length >= 2) {
                var positions = aria.touch.Event.getPositions(event);
                this.primaryPoint = positions[0];
                this.secondaryPoint = positions[1];
            }
            // IE10 primary touch
            else if (event.isPrimary) {
                this.primaryPoint = aria.touch.Event.getPositions(event)[0];
            }
            // IE10 secondary touch
            else if (typeof event.isPrimary != 'undefined' && event.isPrimary === false) {
                this.secondaryPoint = aria.touch.Event.getPositions(event)[0];
            }
            if (event.touches && event.touches.length >= 2 || typeof event.isPrimary != 'undefined'
                    && event.isPrimary === false) {
                var dist = this._calculateDistance(this.primaryPoint.x, this.primaryPoint.y, this.secondaryPoint.x, this.secondaryPoint.y);
                var angle = this.__calculateAngle(this.primaryPoint.x, this.primaryPoint.y, this.secondaryPoint.x, this.secondaryPoint.y);
                this.initialPinchData = {
                    distance : dist,
                    dVariation : 0,
                    angle : angle
                };
                this.lastKnownAngle = angle;
                this.$raiseEvent({
                    name : "pinchstart",
                    distance : dist,
                    dVariation : 0,
                    angle : angle,
                    originalEvent : event
                });
                return this._gestureStart(event, this.initialPinchData);
            } else {
                return (event.returnValue != null) ? event.returnValue : !event.defaultPrevented;
            }
        }
1217793
function (evt) {
    if (evt.touches.length !== 1 || !this.data.touchEnabled) { return; }
    this.touchStart = {
      x: evt.touches[0].pageX,
      y: evt.touches[0].pageY
    };
    this.touchStarted = true;
  }