// https://d3js.org/d3-drag/ Version 1.2.1. Copyright 2017 Mike Bostock. !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection"],e):e(t.d3=t.d3||{},t.d3,t.d3)}(this,function(t,e,n){"use strict";function o(){n.event.stopImmediatePropagation()}function i(t,e){var o=t.document.documentElement,i=n.select(t).on("dragstart.drag",null);e&&(i.on("click.drag",l,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in o?i.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}function r(t,e,n,o,i,r,c,u,s,a){this.target=t,this.type=e,this.subject=n,this.identifier=o,this.active=i,this.x=r,this.y=c,this.dx=u,this.dy=s,this._=a}function c(){return!n.event.button}function u(){return this.parentNode}function s(t){return null==t?{x:n.event.x,y:n.event.y}:t}function a(){return"ontouchstart"in this}var l=function(){n.event.preventDefault(),n.event.stopImmediatePropagation()},d=function(t){var e=t.document.documentElement,o=n.select(t).on("dragstart.drag",l,!0);"onselectstart"in e?o.on("selectstart.drag",l,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")},f=function(t){return function(){return t}};r.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};t.drag=function(){function t(t){t.on("mousedown.drag",h).filter(M).on("touchstart.drag",g).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){if(!T&&j.apply(this,arguments)){var t=b("mouse",k.apply(this,arguments),n.mouse,this,arguments);t&&(n.select(n.event.view).on("mousemove.drag",p,!0).on("mouseup.drag",v,!0),d(n.event.view),o(),x=!1,_=n.event.clientX,w=n.event.clientY,t("start"))}}function p(){if(l(),!x){var t=n.event.clientX-_,e=n.event.clientY-w;x=t*t+e*e>P}q.mouse("drag")}function v(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),i(n.event.view,x),l(),q.mouse("end")}function g(){if(j.apply(this,arguments)){var t,e,i=n.event.changedTouches,r=k.apply(this,arguments),c=i.length;for(t=0;t