define(["./../dom.js"],function(_dom){function DataTransfer(){this.dropEffect="move",this.effectAllowed="all",this._data={}}function DragDropTouch(){if(this._lastClick=0,DragDropTouch._instance)throw"DragDropTouch instance already created.";"ontouchstart"in document&&(this._boundTouchMove=this._touchmove.bind(this),this._boundTouchEnd=this._touchend.bind(this),this._boundContextMenu=this._contextMenu.bind(this),_dom.default.addEventListener(document,"touchstart",this._touchstart.bind(this),{passive:!0}),this._boundOnPressHoldTimeoutFired=this.onPressHoldTimeoutFired.bind(this))}Object.defineProperty(DataTransfer.prototype,"types",{get:function(){return Object.keys(this._data)},enumerable:!0,configurable:!0}),DataTransfer.prototype.clearData=function(type){null!=type?delete this._data[type]:this._data=null},DataTransfer.prototype.getData=function(type){return this._data[type]||""},DataTransfer.prototype.setData=function(type,value){this._data[type]=value},DataTransfer.prototype.setDragImage=function(img,offsetX,offsetY){var ddt=DragDropTouch._instance;ddt._imgCustom=img,ddt._imgOffset={x:offsetX,y:offsetY}},DragDropTouch.prototype.addAdditionalEventListeners=function(dragSource){this._devicePixelRatio=window.devicePixelRatio||1,_dom.default.addEventListener(document,"touchmove",this._boundTouchMove,{passive:!1,capture:!1}),_dom.default.addEventListener(dragSource,"touchend",this._boundTouchEnd,{passive:!0}),_dom.default.addEventListener(dragSource,"touchcancel",this._boundTouchEnd,{passive:!0}),_dom.default.addEventListener(dragSource,"contextmenu",this._boundContextMenu,{passive:!0})},DragDropTouch.prototype.removeAdditionalEventListeners=function(dragSource){_dom.default.removeEventListener(document,"touchmove",this._boundTouchMove,{passive:!1,capture:!1}),(dragSource=dragSource||this._dragSource)&&(_dom.default.removeEventListener(dragSource,"touchend",this._boundTouchEnd,{passive:!0}),_dom.default.removeEventListener(dragSource,"touchcancel",this._boundTouchEnd,{passive:!0}),_dom.default.removeEventListener(dragSource,"contextmenu",this._boundContextMenu,{passive:!0}))},DragDropTouch.prototype.onPressHoldTimeoutFired=function(){this._isDragEnabled=!0;var scrollingElement=this._dragSource.closest(".scrollY");scrollingElement&&scrollingElement.classList.add("drag-preventScrollY")},DragDropTouch.prototype._contextMenu=function(e){this.removeAdditionalEventListeners(e.currentTarget),this._destroyImage(),this._reset()},DragDropTouch.prototype._touchstart=function(e){var target,src;this._shouldHandle(e)&&(this._reset(),src=(target=e.target).closest('[draggable="true"]'))&&(this.addAdditionalEventListeners(src),this._dragSource=src,this._ptDown=this._getPoint(e),this._lastTouch=e,src=target.classList.contains("dragHandle")?100:DragDropTouch._PRESSHOLDAWAIT,this._pressHoldInterval=setTimeout(this._boundOnPressHoldTimeoutFired,src))},DragDropTouch.prototype._touchmove=function(e){var dragEnabled=this._isDragEnabled,delta=this._getDelta(e),PRESSHOLDMARGIN=10*(this._devicePixelRatio||1);!dragEnabled&&PRESSHOLDMARGIN